Hi all!
Sorry, if my English isn't good : )
I'm newbie in emulation! Seven days ago i started to write my first emulator (of course NES ^__^). I had no imagination about how to write it or how it should works : ) Anyway, after 7 days (now) i can run few simple games, like SuperMarioBrothers, Excitebike, IceClimber and few more with 0 mapper.
Before implementing various mappers i want to fix all emu glitches. look at screen below:
This is the only one GFX bug in Mario, everything else looks really good. Second day i can't figure out why some parts of background in startup menu are missing and few of them are replaced with "red cloud" sprites : \
First thing i thought is that i did something wrong in background rendering code! I checked it 10 times - everything looks fine.
Then i used FCEUX to find one my corrupted tile address in VRAM and tiles ID in PatternTable!
That tile:
Here should be renderer tile with ID == 0x46 but instead rendered tile 0x24 (transparent) o_O
FCEUX says, that this tile ID is placed in 0x21A5 VRAM address (NameTable0). I made a few hooks to watch - what and when is writing at that address - and.. surprise! Game exactly writes value 0x24 (transparent)!!! It means, that i render everything correcly but game writes wrong values in NameTable0!
And question is: "why?" I think, that this is some kind of GFX debugging, implemented by Mario game programmers ) It's just a reaction on something made wrong. So, maybe somebody know what exactly can allow game to produce such glitches?
Big thanx to all! : )
Sorry, if my English isn't good : )
I'm newbie in emulation! Seven days ago i started to write my first emulator (of course NES ^__^). I had no imagination about how to write it or how it should works : ) Anyway, after 7 days (now) i can run few simple games, like SuperMarioBrothers, Excitebike, IceClimber and few more with 0 mapper.
Before implementing various mappers i want to fix all emu glitches. look at screen below:
This is the only one GFX bug in Mario, everything else looks really good. Second day i can't figure out why some parts of background in startup menu are missing and few of them are replaced with "red cloud" sprites : \
First thing i thought is that i did something wrong in background rendering code! I checked it 10 times - everything looks fine.
Then i used FCEUX to find one my corrupted tile address in VRAM and tiles ID in PatternTable!
That tile:
Here should be renderer tile with ID == 0x46 but instead rendered tile 0x24 (transparent) o_O
FCEUX says, that this tile ID is placed in 0x21A5 VRAM address (NameTable0). I made a few hooks to watch - what and when is writing at that address - and.. surprise! Game exactly writes value 0x24 (transparent)!!! It means, that i render everything correcly but game writes wrong values in NameTable0!
And question is: "why?" I think, that this is some kind of GFX debugging, implemented by Mario game programmers ) It's just a reaction on something made wrong. So, maybe somebody know what exactly can allow game to produce such glitches?
Big thanx to all! : )