It is currently Thu Jan 17, 2019 2:41 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Sat Nov 10, 2018 9:55 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 21001
Location: NE Indiana, USA (NTSC)
When the program turns on rendering by changing bit 7 of LCDC ($FF40) from 0 to 1, the PPU goes straight to the start of rendering (scanline 0). And for some reason, the LCD does not receive the first frame that the PPU generates, instead displaying a white screen for one frame. (On monochrome systems, this is the same whiter-than-white shade displayed when rendering is off.) Some games, such as Pokémon Pinball, use this blank frame to prepare things before the first visible frame, such as the sprite display list to be DMA copied to OAM during the first vblank.

Though recent BGB emulates this quirk, mGBA 0.8-5388-f92059be does not. This causes 1 frame of corruption to appear in Pokémon Pinball and numerous other games after a screen transition. Many games on KiGB's compatibility list are there because of this quirk.

So I've made a test ROM for this quirk. Expect a whiter-than-white screen on an authentic Game Boy or Game Boy Pocket, or a white screen on an authentic Game Boy Color, Game Boy Advance, or Game Boy Player. (I haven't tested it on my cousin's Super Game Boy yet.) On an emulator that does not emulate this quirk, it will instead speak truth.


Attachments:
firstwhite-0.01.zip [23.19 KiB]
Downloaded 100 times
Top
 Profile  
 
PostPosted: Sat Dec 29, 2018 3:39 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 21001
Location: NE Indiana, USA (NTSC)
Version 0.02 features a less cheeky failure message.


Attachments:
firstwhite-0.02.zip [24.19 KiB]
Downloaded 7 times
Top
 Profile  
 
PostPosted: Sun Dec 30, 2018 3:33 am 
Offline

Joined: Fri Feb 24, 2012 12:09 pm
Posts: 765
Thinking about it... the combination of first+white in the filename sounds much more concerning... initiallyblankscreen or missingblackgraypixels would avoid possible associations with racism... though nintendo apparently didn't care about that either when inventing their hardware design with enforced whiteness - their backlight driven handhelds would look much nicer if they would default to black screens, or allow to use custom a backdrop color during forced blank.


Top
 Profile  
 
PostPosted: Fri Jan 04, 2019 6:37 pm 
Offline
User avatar

Joined: Fri Jan 04, 2019 5:31 pm
Posts: 13
Location: France, right of a pile of consoles
Quick note about this on SGB: the SGB appears to lose VSync when rapidly turning the LCD on and off, which causes the picture to scroll.

Testing during development of my homebrew game also led to the conclusion that disabling the LCD on SGB simply causes the picture to stop updating, as evidenced by a lack of blinking during screen transitions. There's probably investigation to be made regarding the ICD2 chip.

_________________
The French Lord of Laziness (and a huge Legend of Zelda fan)
https://github.com/ISSOtm
ASMu is laifu <3


Top
 Profile  
 
PostPosted: Sun Jan 13, 2019 9:51 am 
Offline

Joined: Mon Mar 27, 2006 5:23 pm
Posts: 1397
Oooh, a very interesting test case. I wonder how higan emulates this in SGB mode.

It was very difficult to reverse engineer the ICD2 from scratch, and it's always felt incredibly hacky how to detect where to transfer uploaded Game Boy screen chunks to, based on the writes the SGB sends to the ICD2. Somehow it ended up stable enough to work with border uploads, game uploads, and even the weird >100% speed mode that causes skipped frames on a real SGB.

But I have a feeling this is going to push it even more, and not run correctly.


Top
 Profile  
 
PostPosted: Sun Jan 13, 2019 10:59 am 
Offline
User avatar

Joined: Fri Jan 04, 2019 5:31 pm
Posts: 13
Location: France, right of a pile of consoles
Higan doesn't emulate this correctly, according to this game I'm developing. Soft-resetting it causes it to enter a boot-loop until the key combo is released, and this triggers the same behavior tepple's ROM tests (turn the LCD off after that first frame).

Higan first shows a glitched frame (like, wrong tiles loaded? I can't tell exactly what's going on due to lacking a debugger) then a solid blank frame; this is roughly the same as BGB, which emulates the "white first frame" even on SGB.
On my SGB1, a garbled picture scrolls indefinitely (though the bottom tile line seems to behave differently?). This garbled picture appears to differ based on what's loaded in VRAM prior to resetting, though that might be a consequence of how my ROM works, I'm not sure.

_________________
The French Lord of Laziness (and a huge Legend of Zelda fan)
https://github.com/ISSOtm
ASMu is laifu <3


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group