Initial analysis: http://hastebin.com/evodajoxas.coffee
The cartridge is boring and is just a regular program.
Command interface is $21e0-$21e5, which is the BIOS talking to the SuperDisc hardware.
Code: Select all
w$21e0 = ???
r$21e1 = status?
d7 => 0 = ready, 1 = busy ??
w$21e1 = ???
w$21e2 = command select
r$21e3 = read command (see below)
w$21e3 = write command (see below)
w$21e4 = enable? (writes #$0e at boot-up; #$00 after failing to detect drive)
d0 = ???
d1 = ???
d2 = ???
d3 = ???
w$21e5 = ???
Code: Select all
[Write Mode]
w$21e2 = command select
w$21e3 = send
01 = DRIF
02 = CHCT (#$10 written here to exist SFX-100 MONITOR MENU)
03 = DECT
04 = INMS
05 = INCL
06 = CI
07,08 = DMAD (ex: $21e2=#$07, $21e3=#$00, $21e3=#$10 => DMA = #$1000)
09,0A = DMXF
0B,0C = DRAD
0D = PLBA
[Read Mode]
w$21e2 = command select
r$21e3 = receive (called once or twice)
00 = DMA
01 = INST
02 = STS
03 = HFLG
X4 = HMIN (04 ... guessing the X means "there's more than one of these", eg 14, 24, etc)
X5 = HSEC (05)
X6 = HBLK (06)
X7 = HMOD (07)
08 = SFIL
09 = SCH
0A = SMOD
0B = SCI
0C,0D = CMAD
XE = MDFM (0E)
XF = ADPC (0F)
18,19 = DMXF
1A,1B = DMAD
1C,1D = DRAD
I'm going to wire up a skeleton emulation of the device so that I can trigger IRQs in response to writes, but I'm very unlikely to try and emulate the entire thing. Really kind of pointless, just something to do for fun I guess.
Really need to find a patent or tech sheet on the CXD18000.