Digimon Adventure 2001 - first enemy is invisible #14

Open
tzlion opened this Issue Oct 9, 2016 · 0 comments

Comments

Projects
None yet
1 participant
@tzlion
Owner

tzlion commented Oct 9, 2016

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.

image

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?

@tzlion tzlion added the bug label Nov 13, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment