More fun here. The SEGA splash screen for Sonic is supposed to have a white background, yet I get black:
Comparing to Mednafen trace logs to confirm I am writing the correct values at the correct locations.
What I see for pixel 0,0 on the screen is that there's no scrolling, and our nametable points to $6000 (or $c000 in bytes.)
Code: Select all
00142a 3c99 move.w (a1)+,(a6) 40000003 00000027 0000001b 00000027 00800000 00000000 00002715 0000ffff tS7cvznx 0001ec6c 00ff0180 fffff700 00000000 00000000 00c00004 00c00000 00fffdf8 00000000
* VRAM write 6000=0013
We write a tiledata attribute word of $0013. So that's palette #0, tile #$13. Let's make sure it's supposed to be writing that value there:
Code: Select all
001760 32ca move.w a2,(a1)+ 00000006 00000000 ffff0000 00006000 0000ff78 000003ef 0000000b 00000002 tS7cvZnx 0001ebb4 00ff0180 00000013 00000000 00000013 00000007 00c00004 00fffdc4 00000000
001762 524a addq.w #1,a2 00000006 00000000 ffff0000 00006000 0000ff78 000003ef 0000000b 00000002 tS7cvznx 0001ebb4 00ff0182 00000013 00000000 00000013 00000007 00c00004 00fffdc4 00000000
Yep. Confirmed with Mednafen too.
So that means we fetch tiledata from $130 for the first tile.
Code: Select all
001506 2882 move.l d2,(a4) 00000000 0000000e 11111111 00000000 ffffeeee 0000f800 0000000a 00000007 tS7cvznx 0001e797 ffffaa00 fffff700 00001504 00c00000 00000350 00c00004 00fffdc0 00000000
* VRAM write 0130=1111
The tile fetch returns $1111. Which means the first pixel has a color value of 1, palette #0.
And what's the color of CRAM entry 1? #$0000. So where is that getting set?
Code: Select all
001090 2abc move.l #$94009340,(a5) 000000ff 0000ff00 0000001a 0000ffff 00800000 00000000 00002715 0000ffff tS6cvZnx fffff608 00a10005 00002280 0000fb80 00000000 00c00004 00c00000 00fffdae 00000000
001096 2abc move.l #$96fd9580,(a5) 000000ff 0000ff00 0000001a 0000ffff 00800000 00000000 00002715 0000ffff tS6cvzNx fffff608 00a10005 00002280 0000fb80 00000000 00c00004 00c00000 00fffdae 00000000
00109c 3abc move.w #$977f,(a5) 000000ff 0000ff00 0000001a 0000ffff 00800000 00000000 00002715 0000ffff tS6cvzNx fffff608 00a10005 00002280 0000fb80 00000000 00c00004 00c00000 00fffdae 00000000
0010a0 3abc move.w #$c000,(a5) 000000ff 0000ff00 0000001a 0000ffff 00800000 00000000 00002715 0000ffff tS6cvzNx fffff608 00a10005 00002280 0000fb80 00000000 00c00004 00c00000 00fffdae 00000000
0010a4 31fc move.w #$0080,($fff640) 000000ff 0000ff00 0000001a 0000ffff 00800000 00000000 00002715 0000ffff tS6cvzNx fffff608 00a10005 00002280 0000fb80 00000000 00c00004 00c00000 00fffdae 00000000
0010aa 3ab8 move.w ($fff640),(a5) 000000ff 0000ff00 0000001a 0000ffff 00800000 00000000 00002715 0000ffff tS6cvznx fffff608 00a10005 00002280 0000fb80 00000000 00c00004 00c00000 00fffdae 00000000
0010ae 6024 bra $0010d4 000000ff 0000ff00 0000001a 0000ffff 00800000 00000000 00002715 0000ffff tS6cvznx fffff608 00a10005 00002280 0000fb80 00000000 00c00004 00c00000 00fffdae 00000000
* CRAM write 0000 = 0000
* CRAM write 0001 = 0000
68K->VDP DMA from 7ffd80*2=fffb00 of length 0040
DMA from $fffb02. Okay then ... where's that set?
Code: Select all
000370 2cc7 move.l d7,(a6)+ 0007ff00 0000afc7 00000000 00000000 00000000 00000000 000000bf 00000000 tS7cvZnx 00080000 0000018e 00000000 00000000 00000000 00000000 00fffb00 00fffe00 00000000
* RAM write fffb02=0000
So ... that's it. I don't see any possible way we can render white for pixel 0,0 on the SEGA splash screen for Sonic the Hedgehog.