Mr.Nutz 2 background glitches

Ask anything your want about Megadrive/Genesis programming.

Moderator: BigEvilCorporation

Post Reply
MetalliC
Interested
Posts: 30
Joined: Sat Aug 25, 2012 12:45 pm
Location: UA

Mr.Nutz 2 background glitches

Post by MetalliC »

few months ago I've compiled Mr.Nutz 2 AKA Hoppin' Mad prototype rom.
and noticed game have some glitches on emulators - looks like part of background disappears in some conditions during platformer-style levels.
I think it was game glitches because its not final, but few users from assemblergames reported that glitch not happens on real hardware.
after small research appeared that it happens then H_INT VDP register == 0 and HBLANK interrupts is enabled.
to see this bug, simply start the game and wait for a demonstration of the second and subsequent levels.

bug can be seen on: Kega Fusion, Regen, MESS.
bug NOT present on Gens clones like Surreal, GS or plus GX.

anyone of genesis/smd Gurus have an idea why it can happens and what can be wrong in emulators like Kega and Regen ?
Eke
Very interested
Posts: 885
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

Post by Eke »

I only noticed a few glitches in Kega/Regen during water levels, when the screen is scrolling or refreshed.

From debugging, HINT is indeed used (but never with a value of zero) to eventually update Plane B VSCROLL and HSCROLL value mid-screen, on specific lines.

I also confirm it does not happen on real hardware.

From tests I once made, in normal mode (fullscreen vscroll), VSCROLL data is apparently latched at the very beginning of HBLANK and so is always HSCROLL data, for the upcoming line, which means any change of these values during H-INT callback would not appear until the next line, not the upcoming line. The issue you see in mentioned emulators are probably because of inaccurate HBLANK/HINT timings when trying to emulate mid-line changes.

Gens does not emulate mid-line changes (lines are rendered at once before HINT is being processed) so it would not be affected.

As for Genesis Plus GX, it has nothing to do with Gens (not sure why people always think this and it's also quite obvious if you look at the code... which I know you have done recently :wink: ), it's a modified port of Genesis Plus and supports mid-line display changes as well.
MetalliC
Interested
Posts: 30
Joined: Sat Aug 25, 2012 12:45 pm
Location: UA

Post by MetalliC »

thanks for clear explanation.
and sorry for mention Genesis Plus as Gens clone, yes I've seen code, its very good, accurate, etc. nothing like Gens and its clones. btw many thanks to Charles MacDonald and to you for this emulator.
Post Reply