Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Digimon Adventure 2001 - first enemy is invisible #14
In "Digimon Adventure 2001" by BBD and its variants - Digimon Adventure 2002 6, Digimon 9, Digimon Yellow Jade, probably more - the first enemy you encounter is invisible.
This only happens the first time it should appear - if you let the demo play before starting, or die and restart the level, or proceed further into the level and come back, it'll show up as normal.
In other (current) emulators and on real hardware it shows up fine. This bug WAS present in old versions of VBA from which the GEST code was originally derived, but was fixed at some point and no longer appears in VBA-M.
After a bit of investigation - it appears that when running in hhugboy, the game writes this enemy's sprite tiles to VRAM bank 1, but the sprite is always read from (the same location in) bank 0. Normally the sprite should be written to bank 0 so its attributes are all correct here, the problem is the tiles being written to the wrong bank in the first place.
It seems like the game should never really write any tiles to bank 1 - observing it in other emus, it does occasionally write tiles to bank 1 when there's a lot of stuff going on, but it never seems to read from that bank, so normally the affected sprite will be wrong at least for a frame when it does this.
But this is an occasional glitch in other emulators, whereas in hhugboy the wrong bank is consistently selected when this enemy's sprites are first loaded. And since there doesn't seem to be any problem with the sprite attributes or with writing to the VRAM bank register, I'm kinda at a loss - maybe it's some weird timing issue?