I'm trying to replicate the VDP setup and clear screen process in the Sonic 1 disassembly from SonicRetro.org, and this issue is bugging me.
There's two sets of VDP registers, one for initial setup (clearing CRAM, displaying checksum error) and one for the game itself:
Code: Select all
VDPSetupArray: dc.w $8004, $8134, $8230, $8328 ; XREF: VDPSetupGame dc.w $8407, $857C, $8600, $8700 dc.w $8800, $8900, $8A00, $8B00 dc.w $8C81, $8D3F, $8E00, $8F02 dc.w $9001, $9100, $9200
(from: http://cgfm2.emuviews.com/txt/genvdp.txt)$01 - Mode Set Register No. 2
d7 - TMS9918 / Genesis display select
d6 - DISP (Display Enable)
d5 - IE0 (Vertical Interrupt Enable)
d4 - M1 (DMA Enable)
d3 - M2 (PAL / NTSC)
d2 - SMS / Genesis display select
d1 - 0 (No effect)
d0 - 0 (See notes)
...and at no point can I find this bit being set manually in code. None of my own test apps work without this bit set, how does this ROM enable the display?