mirror of
https://github.com/holub/mame
synced 2025-05-25 07:15:25 +03:00
Haze: attempt to fix MT 4044
This commit is contained in:
parent
17a3a88ada
commit
1f7f4877e4
@ -128,6 +128,30 @@ Pipi & Bibis | Fix Eight | V-Five | Snow Bros. 2 |
|
|||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "gp9001.h"
|
#include "gp9001.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
Single VDP mixing priority note:
|
||||||
|
|
||||||
|
Initial thoughts were that 16 levels of priority exist for both sprites and tilemaps, ie GP9001_PRIMASK 0xf
|
||||||
|
However the end of level scene rendered on the first VDP in Batsugun strongly suggests otherwise.
|
||||||
|
|
||||||
|
Sprites have 'priority' bits of 0x0600 (level 0x6) set
|
||||||
|
Tilemaps have 'priority' bits of 0x7000 (level 0x7) set
|
||||||
|
|
||||||
|
If a mask of 0xf is used then the tilemaps render above the sprites, which causes the V bonus items near the
|
||||||
|
counters to be invisible (in addition to the English character quote text)
|
||||||
|
|
||||||
|
using a mask of 0xe causes both priority levels to be equal, allowing the sprites to render above the tilemap.
|
||||||
|
|
||||||
|
The alternative option of allowing sprites to render a priority level higher than tilemaps breaks at least the
|
||||||
|
'Welcome to..' screen in Batrider after selecting your character.
|
||||||
|
|
||||||
|
It is unknown if the current solution breaks anything. The majority of titles don't make extensive use of the
|
||||||
|
priority system.
|
||||||
|
|
||||||
|
*/
|
||||||
|
#define GP9001_PRIMASK (0x000e)
|
||||||
|
|
||||||
|
|
||||||
static WRITE16_DEVICE_HANDLER( gp9001_bg_tilemap_w )
|
static WRITE16_DEVICE_HANDLER( gp9001_bg_tilemap_w )
|
||||||
{
|
{
|
||||||
gp9001vdp_device *vdp = (gp9001vdp_device*)device;
|
gp9001vdp_device *vdp = (gp9001vdp_device*)device;
|
||||||
@ -1034,9 +1058,10 @@ void gp9001vdp_device::draw_sprites( running_machine *machine, bitmap_t *bitmap,
|
|||||||
int attrib, sprite, color, priority, flipx, flipy, sx, sy;
|
int attrib, sprite, color, priority, flipx, flipy, sx, sy;
|
||||||
int sprite_sizex, sprite_sizey, dim_x, dim_y, sx_base, sy_base;
|
int sprite_sizex, sprite_sizey, dim_x, dim_y, sx_base, sy_base;
|
||||||
int bank, sprite_num;
|
int bank, sprite_num;
|
||||||
|
UINT16 primask = (GP9001_PRIMASK << 8);
|
||||||
|
|
||||||
attrib = source[offs];
|
attrib = source[offs];
|
||||||
priority = primap[((attrib & 0x0f00)>>8)]+1;
|
priority = primap[((attrib & primask)>>8)]+1;
|
||||||
|
|
||||||
if ((attrib & 0x8000))
|
if ((attrib & 0x8000))
|
||||||
{
|
{
|
||||||
@ -1231,7 +1256,7 @@ void gp9001vdp_device::gp9001_draw_custom_tilemap(running_machine* machine, bitm
|
|||||||
int realx = (x+scrollx)&0x1ff;
|
int realx = (x+scrollx)&0x1ff;
|
||||||
|
|
||||||
UINT16 pixdat = srcptr[realx];
|
UINT16 pixdat = srcptr[realx];
|
||||||
UINT8 pixpri = ((pixdat & 0xf000)>>12);
|
UINT8 pixpri = ((pixdat & (GP9001_PRIMASK<<12))>>12);
|
||||||
|
|
||||||
if (pri_enable[pixpri])
|
if (pri_enable[pixpri])
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user