2009-12-03

HAZE MAME (2009/12/02)

Standing in a Spotlight

One of the features of the Hyper Neogeo 64 hardware is additive blending (and I actually wonder if it’s the only blend mode it supports) Additive blend, as it’s name would suggest adds the colour from one image to another (as opposed to regular alpha blending which averages the colours of the source and destination)

In the most basic terms this means that any black parts of the image to be blended become invisible, and any grey/white parts cause the image to become tinted white. (In reality it can appear a bit more complex as both bitmaps can be full-colour, not greyscale)

We’ve already seen that this is supported on sprites; several places use it, and basic (buggy) support for it on sprites was added in the last MAME update.

It is however also used on the tilemap layers to do special effects. The Samurai Shodown games are a good example of this as they use it on various stages to add dust effects, and lighting effects. The following screens from the Samurai Shodown 64 Warriors Rage attract mode show it being used for a light beam. (Left is the normal tilemap data, right is with the additive blend enabled)
EmuCR:HAZE MAME (2009/12/02)
EmuCR:HAZE MAME (2009/12/02)It’s a subtle effect, but on the real hardware, with the 3d enabled (which it blends over) an impressive one for the time period.

The original Samurai Shodown 64 also uses it, although it’s probably less obvious in screenshots, but this is why there are ’solid’ layers covering the background graphics on some stages at the moment, they’re effect layers. This effect is move obvious when moving because the effect is moving quickly, creating disruptions in the original image which are meant to represent fog / snow.
EmuCR:HAZE MAME (2009/12/02)
EmuCR:HAZE MAME (2009/12/02)Of course, things aren’t that simple. MAME doesn’t natively support additive blending in it’s tilemap draw calls, so I had to copy half of tilemap.c into the driver to hook up the effect, and furthermore it isn’t clear how they enable it on the real hardware, so it’s currently hooked up to some debug keys anyway.

If you combine additive blending, and RGB control registers, you can use the blending to do other effects such as fading something out, or causing a whiteout. I have a feeling that they do this in places, which is making it more confusing and harder to tell which registers enable the / select the fade to use, and which enable the blending.

I wouldn’t expect astronomical progress on Hyper Neogeo 64 the same way that CPS3 was emulated, the 3D especially is tricky, and only really currently works in Fatal Fury, and partially in Buriki One due to some fairly gross 3d-ram access hacks, which don’t REALLY full represent how the hardware works. It’s a somewhat complex system, with limited test cases, and even understanding something as simple as the tilemap ordering and effect enables is difficult due to effects being used together making it hard to isolate individual bits responsible. Also, as a further roadblock, developers who generally do 3D work don’t seem very interested in the driver at all.

In other words, don’t expect these things to be fully playable for at least another couple of years, I know I’m not.


Source:http://mamedev.emulab.it/haze/

0 Comments

Post a Comment