This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
mg_notes:apple_iic:mig_chip [2018/07/06 12:17] M.G. [MIG RAM] |
mg_notes:apple_iic:mig_chip [2018/08/01 19:40] M.G. [MIG Address Space] |
||
---|---|---|---|
Line 3: | Line 3: | ||
The MIG is a custom chip in the Apple IIc Plus that provides signals for accessing 3.5%%"%% disk drives and access to a 2K static RAM chip mainly used to buffer 3.5%%"%% sector data for reading and writing. The RAM is also used for the accelerator. | The MIG is a custom chip in the Apple IIc Plus that provides signals for accessing 3.5%%"%% disk drives and access to a 2K static RAM chip mainly used to buffer 3.5%%"%% sector data for reading and writing. The RAM is also used for the accelerator. | ||
- | **2018-06-04 update:** Work by [[http://leon.bottou.org/start|Léon Bottou]] has significantly increased understanding of the MIG chip. See his comments [[https://github.com/mgcaret/rom4x/issues/8|here]] and [[https://github.com/leonbottou/kegs-universal|working emulation]] of the MIG. | + | **2018-06-04 update:** Work by [[http://leon.bottou.org/start|Léon Bottou]] has significantly increased understanding of the MIG chip. See his comments [[https://github.com/mgcaret/rom4x/issues/8|here]] and [[https://github.com/leonbottou/kegs-universal|working emulation]] (also [[https://github.com/leonbottou/gsplus-universal|this]]) of the MIG. |
+ | **2018-08-01 update:** Based on the work Léon and I have done, [[https://github.com/rb6502|R. Belmont]] has implemented MIG emulation in [[https://github.com/mamedev/mame|MAME]] and the Apple IIc Plus emulation is now [[https://github.com/mamedev/mame/commit/31aaae7491ea4233de75456af178054e650f4344|working]] (also see [[https://github.com/mamedev/mame/commit/7bd14bedf6fd824853c406248dd4a36db17ecb7b|here]]). | ||
===== Functional Description ===== | ===== Functional Description ===== | ||
Line 56: | Line 57: | ||
===== MIG Address Space ==== | ===== MIG Address Space ==== | ||
- | Obvious access to the MIG is via a 1024-byte (or more... see below) window at $CC00 (mirrored at $DE00) that becomes visible only when the aux firmware bank is selected. | + | Access/control of the MIG is via a $800-byte window starting at $C800 when the aux firmware bank is selected. The window is repeated at $D800 (I/O select is mediated by the lower half ROM select), but is not usable unless the accelerator is disabled. The lower $600 bytes of this space is shared with the ROM, and the upper $200 bytes is used for the MIG RAM window and other control functions. |
==== MIG Control ==== | ==== MIG Control ==== | ||
Line 102: | Line 102: | ||
^ Page(s) ^ Byte ^ Use ^ | ^ Page(s) ^ Byte ^ Use ^ | ||
^ $00 | | Used by SmartPort firmware. | | ^ $00 | | Used by SmartPort firmware. | | ||
- | | $00 | $00-$02 | 3.5 firmware: current track position of units 0-2. | | + | | $00 | $00-$02 | 3.5: current track position of units 0-2. | |
- | | $00 | $03-$05 | 3.5 Read/Write: Trk/Sec/Head of requested block. b5 of $05 = Head. | | + | | $00 | $03-$07 | 3.5 R/W: Trk/Sec/Head/Format/Checksum of address field requested block. \\ $05 b5=Head, b0=track high bit. \\ $06 b5=sides, b0-4=interleave. | |
- | | $00 | $06 | 3.5 Format: format of the disk (b5 = sides, 0=1, 1=2; b0-4 = interleave). | | + | | $00 | $08 | 3.5 R/W: sector number translated to disk nibble. | |
+ | | $00 | $08-$09 | 5.25 R/W: requested sector and track. | | ||
+ | | $00 | $09-$0C | 3.5 R/W: sector address data for sector header just read.| | ||
+ | | $00 | $0D | 3.5 R: if address checksum fails, computed checksum is put here. | | ||
| $00 | $0E | Used to save unit looked up from $14+ (3.5) or Disk II drive # (b6 will be set). | | | $00 | $0E | Used to save unit looked up from $14+ (3.5) or Disk II drive # (b6 will be set). | | ||
| $00 | $0F | Holds number of detected 3.5 drives+smartport devices | | | $00 | $0F | Holds number of detected 3.5 drives+smartport devices | | ||
- | | $00 | $10 | Interleave of the 3.5 disk system, always $04. | | + | | $00 | $10 | 3.5: System interleave, always $04. | |
| $00 | $11 | Used to save/restore language card state. | | | $00 | $11 | Used to save/restore language card state. | | ||
| $00 | $12-$13 | Used for indirect jump by SmartPort firmware. | | | $00 | $12-$13 | Used for indirect jump by SmartPort firmware. | | ||
| $00 | $14-$1B | Used to hold valid smartport device numbers, b7 = "dumb" 3.5" drive. | | | $00 | $14-$1B | Used to hold valid smartport device numbers, b7 = "dumb" 3.5" drive. | | ||
+ | ^ $00-$2A | $1C-$1F | Used by the [[mg_notes:apple_iic:secret_iicplus_smartport|Disk II SmartPort]] firmware for prenibble/denibble. | | ||
^ $01 | | Used by SmartPort firmware. | | ^ $01 | | Used by SmartPort firmware. | | ||
| $01 | $00-$0F | 3.5 Format: sector numbers to be written out | | | $01 | $00-$0F | 3.5 Format: sector numbers to be written out | | ||
Line 116: | Line 120: | ||
| $01 | $11 | 3.5 Format: number of sectors in track being formatted | | | $01 | $11 | 3.5 Format: number of sectors in track being formatted | | ||
^ $02 | $00-$09 | Used by the [[accelerator|accelerator]] firmware. | | ^ $02 | $00-$09 | Used by the [[accelerator|accelerator]] firmware. | | ||
- | ^ $02-$2A | $1C-$1F | Used by the [[mg_notes:apple_iic:secret_iicplus_smartport|Disk II SmartPort]] firmware. Purpose still unknown. | | ||
^ $03-$18 | | 3.5 Read/Write: 704-byte GCR-coded sector buffer. | | ^ $03-$18 | | 3.5 Read/Write: 704-byte GCR-coded sector buffer. | | ||
^ $03-$03+n | $09-$0D | 3.5 Format: Precomputed track/sector/side/format/checksum for track of n sectors. | | ^ $03-$03+n | $09-$0D | 3.5 Format: Precomputed track/sector/side/format/checksum for track of n sectors. | |