What's new

MAME dev Aaron Giles on UMK3 palette bug...

Aaron Giles maintains a blog regarding various MAME fiddlings he does, and his newest post contains a tidbit on UMK3... and possibility of (eventually) fixing the palette bug...

"Finally, I took a look at the Mortal Kombat 3 bug where the palette on the character selection screen or the intro screen is all wrong. This turns out to be a cycle counting issue. The code that builds up these screens sets up a queue of palette entries to change. Each character that is displayed has its own palette, so if there are a lot of characters, there are a lot of palette changes to queue. But palettes are only changed in the VBLANK routine, so it’s possible for the queue to get too full, depending on how quickly the game accumulates entries in the queue. When it hits its limit, it fortunately doesn’t corrupt memory (good), but instead throws everything out of the queue (bad), leaving you with a bunch of missed palette changes.

This queueing behavior is why the problem gets worse if you have unlocked a bunch of characters, because more characters are displayed on the screen, and thus more palettes get queued.

The reason this worked on a real machine is probably due to the TMS34010’s cache. We don’t emulate the cache behavior in MAME; rather, we act like all instructions are in the cache, and count the minimum number of cycles for each instruction. This is generally the right approach, but in this case it works against us because we allow the code that sets up the palette queues to run too fast, overflowing the queues before the VBLANK comes in and clears everything out.

So for now, we’ll just have to live with it. The 34010 cache is described in gory detail in the manual, so it is possible to simulate it eventually. But for now, a little color glitch isn’t going to hurt anything. "
Here's the direct link for those interested: http://aarongiles.com/?p=209

--flux
 

dreemernj

Ambassador
Cool find. And the reason for the glitch in MAME is a valid reason for the glitch to happen elsewhere as well. In the other versions of UMK3 they mustn't simulate the processor's cache 100% correctly either.
 

ZAQ

Noob
I'm not really worried about it, I know where all of the characters are if none of them are shown.

I guess it would be shitty to see if you were trying to sell plays at a flea market or something.

They should work on fixing the audio first, even though I dont even hear it anymore.

I like some of them enough to snap their entire victory pose sequence
 

Shock

Administrator
Premium Supporter
With the excepton of some intial delay in audio that eventually evens out, it works fine in newer mames. The color glitch however, I have still yet to see on XBL.
 
abc ur dead0 said:
Of this year?
I provided a link to the original post, even... not too difficult to click it and read the date... but for your convenience...

This entry was posted on Wednesday, May 9th, 2007 at 12:28 pm

Scheisse said:
Who is this guy anyway?
We should get a hold of him if he can modify games.
Aaron Giles is the coordinator for the MAME project (or at least was) and one of the more high profile developers. From his posts on his blog, I don't think he's particularly interested in fighting games, and he seems to be busy enough with fixing all the other broken drivers - although making him aware of various wishes can't really hurt!

I know the palette issue isn't a biggie, just thought it was interesting to learn the reason why it happens and that it IS possible to fix, just probably won't occur for quite a while (or ever if the 'street fighter 2 turbo runs too fast' bug is any indication!)

--flux
 

NinjaGrinder

A living, Breathing Piece of Defecating Meat
LOL yeah, I remember shock putting the tanya voice in MPD when kitana turns yellow with the shang/jade glitch