mirror of
https://github.com/holub/mame
synced 2025-04-23 17:00:53 +03:00
Corrected VDP2 VRAM mirror, fixes missing gfxs in Civilization and Silhouette Mirage
This commit is contained in:
parent
400b9bcc29
commit
ff52c21549
@ -789,7 +789,7 @@ static ADDRESS_MAP_START( saturn_mem, AS_PROGRAM, 32, saturn_state )
|
||||
AM_RANGE(0x05c00000, 0x05c7ffff) AM_READWRITE_LEGACY(saturn_vdp1_vram_r, saturn_vdp1_vram_w)
|
||||
AM_RANGE(0x05c80000, 0x05cbffff) AM_READWRITE_LEGACY(saturn_vdp1_framebuffer0_r, saturn_vdp1_framebuffer0_w)
|
||||
AM_RANGE(0x05d00000, 0x05d0001f) AM_READWRITE16_LEGACY(saturn_vdp1_regs_r, saturn_vdp1_regs_w,0xffffffff)
|
||||
AM_RANGE(0x05e00000, 0x05efffff) AM_READWRITE_LEGACY(saturn_vdp2_vram_r, saturn_vdp2_vram_w)
|
||||
AM_RANGE(0x05e00000, 0x05e7ffff) AM_MIRROR(0x80000) AM_READWRITE_LEGACY(saturn_vdp2_vram_r, saturn_vdp2_vram_w)
|
||||
AM_RANGE(0x05f00000, 0x05f7ffff) AM_READWRITE_LEGACY(saturn_vdp2_cram_r, saturn_vdp2_cram_w)
|
||||
AM_RANGE(0x05f80000, 0x05fbffff) AM_READWRITE16_LEGACY(saturn_vdp2_regs_r, saturn_vdp2_regs_w,0xffffffff)
|
||||
AM_RANGE(0x05fe0000, 0x05fe00cf) AM_READWRITE(saturn_scu_r, saturn_scu_w)
|
||||
@ -797,7 +797,8 @@ static ADDRESS_MAP_START( saturn_mem, AS_PROGRAM, 32, saturn_state )
|
||||
AM_RANGE(0x20000000, 0x2007ffff) AM_ROM AM_SHARE("share6") // bios mirror
|
||||
AM_RANGE(0x22000000, 0x24ffffff) AM_ROM AM_SHARE("share7") // cart mirror
|
||||
AM_RANGE(0x45000000, 0x46ffffff) AM_WRITENOP
|
||||
AM_RANGE(0xc0000000, 0xc00007ff) AM_RAM // cache RAM, Dragon Ball Z sprites needs this
|
||||
AM_RANGE(0x60000000, 0x600003ff) AM_WRITENOP // cache address array
|
||||
AM_RANGE(0xc0000000, 0xc00007ff) AM_RAM // cache data array, Dragon Ball Z sprites relies on this
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( stv_mem, AS_PROGRAM, 32, saturn_state )
|
||||
@ -817,7 +818,7 @@ static ADDRESS_MAP_START( stv_mem, AS_PROGRAM, 32, saturn_state )
|
||||
AM_RANGE(0x05c00000, 0x05c7ffff) AM_READWRITE_LEGACY(saturn_vdp1_vram_r, saturn_vdp1_vram_w)
|
||||
AM_RANGE(0x05c80000, 0x05cbffff) AM_READWRITE_LEGACY(saturn_vdp1_framebuffer0_r, saturn_vdp1_framebuffer0_w)
|
||||
AM_RANGE(0x05d00000, 0x05d0001f) AM_READWRITE16_LEGACY(saturn_vdp1_regs_r, saturn_vdp1_regs_w,0xffffffff)
|
||||
AM_RANGE(0x05e00000, 0x05efffff) AM_READWRITE_LEGACY(saturn_vdp2_vram_r, saturn_vdp2_vram_w)
|
||||
AM_RANGE(0x05e00000, 0x05e7ffff) AM_MIRROR(0x80000) AM_READWRITE_LEGACY(saturn_vdp2_vram_r, saturn_vdp2_vram_w)
|
||||
AM_RANGE(0x05f00000, 0x05f7ffff) AM_READWRITE_LEGACY(saturn_vdp2_cram_r, saturn_vdp2_cram_w)
|
||||
AM_RANGE(0x05f80000, 0x05fbffff) AM_READWRITE16_LEGACY(saturn_vdp2_regs_r, saturn_vdp2_regs_w,0xffffffff)
|
||||
AM_RANGE(0x05fe0000, 0x05fe00cf) AM_READWRITE(saturn_scu_r, saturn_scu_w)
|
||||
|
@ -719,10 +719,10 @@ bit-> /----15----|----14----|----13----|----12----|----11----|----10----|----09
|
||||
#define STV_VDP2_MPOFN_ (state->m_vdp2_regs[0x03c/2])
|
||||
|
||||
/* Higher 3 bits of the map offset for each layer */
|
||||
#define STV_VDP2_N3MP_ ((STV_VDP2_MPOFN_ & 0x7000) >> 12)
|
||||
#define STV_VDP2_N2MP_ ((STV_VDP2_MPOFN_ & 0x0700) >> 8)
|
||||
#define STV_VDP2_N1MP_ ((STV_VDP2_MPOFN_ & 0x0070) >> 4)
|
||||
#define STV_VDP2_N0MP_ ((STV_VDP2_MPOFN_ & 0x0007) >> 0)
|
||||
#define STV_VDP2_N3MP_ ((STV_VDP2_MPOFN_ & 0x3000) >> 12)
|
||||
#define STV_VDP2_N2MP_ ((STV_VDP2_MPOFN_ & 0x0300) >> 8)
|
||||
#define STV_VDP2_N1MP_ ((STV_VDP2_MPOFN_ & 0x0030) >> 4)
|
||||
#define STV_VDP2_N0MP_ ((STV_VDP2_MPOFN_ & 0x0003) >> 0)
|
||||
|
||||
|
||||
|
||||
@ -736,8 +736,8 @@ bit-> /----15----|----14----|----13----|----12----|----11----|----10----|----09
|
||||
|
||||
#define STV_VDP2_MPOFR_ (state->m_vdp2_regs[0x03e/2])
|
||||
|
||||
#define STV_VDP2_RAMP_ ((STV_VDP2_MPOFR_ & 0x0007) >> 0)
|
||||
#define STV_VDP2_RBMP_ ((STV_VDP2_MPOFR_ & 0x0070) >> 4)
|
||||
#define STV_VDP2_RBMP_ ((STV_VDP2_MPOFR_ & 0x0030) >> 4)
|
||||
#define STV_VDP2_RAMP_ ((STV_VDP2_MPOFR_ & 0x0003) >> 0)
|
||||
|
||||
/* 180040 - MPABN0 - Map (NBG0, Plane A,B)
|
||||
bit-> /----15----|----14----|----13----|----12----|----11----|----10----|----09----|----08----\
|
||||
@ -5366,6 +5366,12 @@ static void stv_vdp2_draw_back(running_machine &machine, bitmap_rgb32 &bitmap, c
|
||||
}
|
||||
}
|
||||
|
||||
READ32_HANDLER ( saturn_vdp2_vram_r )
|
||||
{
|
||||
saturn_state *state = space.machine().driver_data<saturn_state>();
|
||||
|
||||
return state->m_vdp2_vram[offset];
|
||||
}
|
||||
|
||||
WRITE32_HANDLER ( saturn_vdp2_vram_w )
|
||||
{
|
||||
@ -5513,12 +5519,7 @@ READ32_HANDLER ( saturn_vdp2_cram_r )
|
||||
}
|
||||
|
||||
|
||||
READ32_HANDLER ( saturn_vdp2_vram_r )
|
||||
{
|
||||
saturn_state *state = space.machine().driver_data<saturn_state>();
|
||||
|
||||
return state->m_vdp2_vram[offset];
|
||||
}
|
||||
|
||||
WRITE32_HANDLER ( saturn_vdp2_cram_w )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user