some work on the 3 games in dec8.c which use the bac06 tilemaps[David Haywood]
This commit is contained in:
parent
eb209b150f
commit
41562709b6
@ -314,8 +314,9 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( hippodrm_sub_map, AS_PROGRAM, 8 )
|
||||
AM_RANGE(0x000000, 0x00ffff) AM_ROM
|
||||
AM_RANGE(0x180000, 0x1800ff) AM_READWRITE(hippodrm_shared_r, hippodrm_shared_w)
|
||||
AM_RANGE(0x1a0000, 0x1a001f) AM_DEVWRITE("tilegen3", deco_bac06_pf_control_8bit_w)
|
||||
AM_RANGE(0x1a1000, 0x1a17ff) AM_DEVREADWRITE("tilegen3", deco_bac06_pf_data_8bit_r, deco_bac06_pf_data_8bit_w)
|
||||
AM_RANGE(0x1a0000, 0x1a0007) AM_DEVWRITE("tilegen3", deco_bac06_pf_control0_8bit_packed_w)
|
||||
AM_RANGE(0x1a0010, 0x1a001f) AM_DEVWRITE("tilegen3", deco_bac06_pf_control1_8bit_swap_w)
|
||||
AM_RANGE(0x1a1000, 0x1a17ff) AM_DEVREADWRITE("tilegen3", deco_bac06_pf_data_8bit_swap_r, deco_bac06_pf_data_8bit_swap_w)
|
||||
AM_RANGE(0x1d0000, 0x1d00ff) AM_READWRITE(hippodrm_prot_r, hippodrm_prot_w)
|
||||
AM_RANGE(0x1f0000, 0x1f1fff) AM_RAMBANK("bank8") /* Main ram */
|
||||
AM_RANGE(0x1ff400, 0x1ff403) AM_WRITE(h6280_irq_status_w)
|
||||
|
@ -47,7 +47,7 @@ To do:
|
||||
#include "sound/3526intf.h"
|
||||
#include "sound/msm5205.h"
|
||||
#include "includes/dec8.h"
|
||||
|
||||
#include "video/decbac06.h"
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
@ -489,8 +489,8 @@ static WRITE8_HANDLER( flip_screen_w ) { flip_screen_set(space->machine, data);
|
||||
|
||||
static ADDRESS_MAP_START( cobra_map, AS_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM
|
||||
AM_RANGE(0x0800, 0x0fff) AM_READWRITE(dec8_pf0_data_r, dec8_pf0_data_w) AM_BASE_MEMBER(dec8_state, pf0_data)
|
||||
AM_RANGE(0x1000, 0x17ff) AM_READWRITE(dec8_pf1_data_r, dec8_pf1_data_w) AM_BASE_MEMBER(dec8_state, pf1_data)
|
||||
AM_RANGE(0x0800, 0x0fff) AM_DEVREADWRITE("tilegen1", deco_bac06_pf_data_8bit_r, deco_bac06_pf_data_8bit_w)
|
||||
AM_RANGE(0x1000, 0x17ff) AM_DEVREADWRITE("tilegen2", deco_bac06_pf_data_8bit_r, deco_bac06_pf_data_8bit_w)
|
||||
AM_RANGE(0x1800, 0x1fff) AM_RAM
|
||||
AM_RANGE(0x2000, 0x27ff) AM_RAM_WRITE(dec8_videoram_w) AM_BASE_SIZE_MEMBER(dec8_state, videoram, videoram_size)
|
||||
AM_RANGE(0x2800, 0x2fff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
|
||||
@ -500,9 +500,11 @@ static ADDRESS_MAP_START( cobra_map, AS_PROGRAM, 8 )
|
||||
AM_RANGE(0x3801, 0x3801) AM_READ_PORT("IN1") /* Player 2 */
|
||||
AM_RANGE(0x3802, 0x3802) AM_READ_PORT("DSW0") /* Dip 1 */
|
||||
AM_RANGE(0x3803, 0x3803) AM_READ_PORT("DSW1") /* Dip 2 */
|
||||
AM_RANGE(0x3800, 0x381f) AM_WRITE(dec8_bac06_0_w)
|
||||
AM_RANGE(0x3800, 0x3807) AM_DEVWRITE("tilegen1", deco_bac06_pf_control0_8bit_w)
|
||||
AM_RANGE(0x3810, 0x381f) AM_DEVWRITE("tilegen1", deco_bac06_pf_control1_8bit_w)
|
||||
AM_RANGE(0x3a00, 0x3a00) AM_READ_PORT("IN2") /* VBL & coins */
|
||||
AM_RANGE(0x3a00, 0x3a1f) AM_WRITE(dec8_bac06_1_w)
|
||||
AM_RANGE(0x3a00, 0x3a07) AM_DEVWRITE("tilegen2", deco_bac06_pf_control0_8bit_w)
|
||||
AM_RANGE(0x3a10, 0x3a1f) AM_DEVWRITE("tilegen2", deco_bac06_pf_control1_8bit_w)
|
||||
AM_RANGE(0x3c00, 0x3c00) AM_WRITE(dec8_bank_w)
|
||||
AM_RANGE(0x3c02, 0x3c02) AM_WRITE(buffer_spriteram_w) /* DMA */
|
||||
AM_RANGE(0x3e00, 0x3e00) AM_WRITE(dec8_sound_w)
|
||||
@ -514,10 +516,9 @@ static ADDRESS_MAP_START( meikyuh_map, AS_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x0fff) AM_RAM
|
||||
AM_RANGE(0x1000, 0x17ff) AM_RAM
|
||||
AM_RANGE(0x1800, 0x1fff) AM_RAM_WRITE(dec8_videoram_w) AM_BASE_SIZE_MEMBER(dec8_state, videoram, videoram_size)
|
||||
AM_RANGE(0x2000, 0x27ff) AM_READWRITE(dec8_pf0_data_r, dec8_pf0_data_w) AM_BASE_MEMBER(dec8_state, pf0_data)
|
||||
AM_RANGE(0x2800, 0x2bff) AM_RAM
|
||||
AM_RANGE(0x2c00, 0x2dff) AM_RAM AM_BASE_MEMBER(dec8_state, row)
|
||||
AM_RANGE(0x2e00, 0x2fff) AM_RAM /* Unused */
|
||||
AM_RANGE(0x2000, 0x27ff) AM_DEVREADWRITE("tilegen1", deco_bac06_pf_data_8bit_r, deco_bac06_pf_data_8bit_w)
|
||||
AM_RANGE(0x2800, 0x2bff) AM_RAM // colscroll? mirror?
|
||||
AM_RANGE(0x2c00, 0x2fff) AM_DEVREADWRITE("tilegen1", deco_bac06_pf_rowscroll_8bit_r, deco_bac06_pf_rowscroll_8bit_w)
|
||||
AM_RANGE(0x3000, 0x37ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
|
||||
AM_RANGE(0x3800, 0x3800) AM_READ_PORT("IN0") /* Player 1 */
|
||||
AM_RANGE(0x3800, 0x3800) AM_WRITE(dec8_sound_w)
|
||||
@ -525,7 +526,8 @@ static ADDRESS_MAP_START( meikyuh_map, AS_PROGRAM, 8 )
|
||||
AM_RANGE(0x3802, 0x3802) AM_READ_PORT("IN2") /* Player 3 */
|
||||
AM_RANGE(0x3803, 0x3803) AM_READ_PORT("DSW0") /* Start buttons + VBL */
|
||||
AM_RANGE(0x3820, 0x3820) AM_READ_PORT("DSW1") /* Dip */
|
||||
AM_RANGE(0x3820, 0x383f) AM_WRITE(dec8_bac06_0_w)
|
||||
AM_RANGE(0x3820, 0x3827) AM_DEVWRITE("tilegen1", deco_bac06_pf_control0_8bit_w)
|
||||
AM_RANGE(0x3830, 0x383f) AM_DEVREADWRITE("tilegen1", deco_bac06_pf_control1_8bit_r, deco_bac06_pf_control1_8bit_w)
|
||||
AM_RANGE(0x3840, 0x3840) AM_READ(i8751_h_r)
|
||||
AM_RANGE(0x3840, 0x3840) AM_WRITE(ghostb_bank_w)
|
||||
AM_RANGE(0x3860, 0x3860) AM_READ(i8751_l_r)
|
||||
@ -539,7 +541,7 @@ static ADDRESS_MAP_START( srdarwin_map, AS_PROGRAM, 8 )
|
||||
AM_RANGE(0x0600, 0x07ff) AM_RAM AM_BASE_GENERIC(spriteram)
|
||||
AM_RANGE(0x0800, 0x0fff) AM_RAM_WRITE(srdarwin_videoram_w) AM_BASE_MEMBER(dec8_state, videoram) AM_SIZE_GENERIC(spriteram)
|
||||
AM_RANGE(0x1000, 0x13ff) AM_RAM
|
||||
AM_RANGE(0x1400, 0x17ff) AM_READWRITE(dec8_pf0_data_r, dec8_pf0_data_w) AM_BASE_MEMBER(dec8_state, pf0_data)
|
||||
AM_RANGE(0x1400, 0x17ff) AM_READWRITE(dec8_bg_data_r, dec8_bg_data_w) AM_BASE_MEMBER(dec8_state, bg_data)
|
||||
AM_RANGE(0x1800, 0x1801) AM_WRITE(srdarwin_i8751_w)
|
||||
AM_RANGE(0x1802, 0x1802) AM_WRITE(i8751_reset_w) /* Maybe.. */
|
||||
AM_RANGE(0x1803, 0x1803) AM_WRITENOP /* NMI ack */
|
||||
@ -560,7 +562,7 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( gondo_map, AS_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x17ff) AM_RAM
|
||||
AM_RANGE(0x1800, 0x1fff) AM_RAM_WRITE(dec8_videoram_w) AM_BASE_SIZE_MEMBER(dec8_state, videoram, videoram_size)
|
||||
AM_RANGE(0x2000, 0x27ff) AM_READWRITE(dec8_pf0_data_r, dec8_pf0_data_w) AM_BASE_MEMBER(dec8_state, pf0_data)
|
||||
AM_RANGE(0x2000, 0x27ff) AM_READWRITE(dec8_bg_data_r, dec8_bg_data_w) AM_BASE_MEMBER(dec8_state, bg_data)
|
||||
AM_RANGE(0x2800, 0x2bff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_split1_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0x2c00, 0x2fff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_split2_w) AM_BASE_GENERIC(paletteram2)
|
||||
AM_RANGE(0x3000, 0x37ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) /* Sprites */
|
||||
@ -585,7 +587,7 @@ static ADDRESS_MAP_START( oscar_map, AS_PROGRAM, 8 )
|
||||
AM_RANGE(0x0f00, 0x0fff) AM_RAM
|
||||
AM_RANGE(0x1000, 0x1fff) AM_RAM AM_SHARE("share2")
|
||||
AM_RANGE(0x2000, 0x27ff) AM_RAM_WRITE(dec8_videoram_w) AM_BASE_SIZE_MEMBER(dec8_state, videoram, videoram_size)
|
||||
AM_RANGE(0x2800, 0x2fff) AM_READWRITE(dec8_pf0_data_r, dec8_pf0_data_w) AM_BASE_MEMBER(dec8_state, pf0_data)
|
||||
AM_RANGE(0x2800, 0x2fff) AM_DEVREADWRITE("tilegen1", deco_bac06_pf_data_8bit_r, deco_bac06_pf_data_8bit_w)
|
||||
AM_RANGE(0x3000, 0x37ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) /* Sprites */
|
||||
AM_RANGE(0x3800, 0x3bff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_be_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0x3c00, 0x3c00) AM_READ_PORT("IN0")
|
||||
@ -593,7 +595,8 @@ static ADDRESS_MAP_START( oscar_map, AS_PROGRAM, 8 )
|
||||
AM_RANGE(0x3c02, 0x3c02) AM_READ_PORT("IN2") /* VBL & coins */
|
||||
AM_RANGE(0x3c03, 0x3c03) AM_READ_PORT("DSW0") /* Dip 1 */
|
||||
AM_RANGE(0x3c04, 0x3c04) AM_READ_PORT("DSW1")
|
||||
AM_RANGE(0x3c00, 0x3c1f) AM_WRITE(dec8_bac06_0_w)
|
||||
AM_RANGE(0x3c00, 0x3c07) AM_DEVWRITE("tilegen1", deco_bac06_pf_control0_8bit_w)
|
||||
AM_RANGE(0x3c10, 0x3c1f) AM_DEVWRITE("tilegen1", deco_bac06_pf_control1_8bit_w)
|
||||
AM_RANGE(0x3c80, 0x3c80) AM_WRITE(buffer_spriteram_w) /* DMA */
|
||||
AM_RANGE(0x3d00, 0x3d00) AM_WRITE(dec8_bank_w) /* BNKS */
|
||||
AM_RANGE(0x3d80, 0x3d80) AM_WRITE(dec8_sound_w) /* SOUN */
|
||||
@ -632,7 +635,7 @@ static ADDRESS_MAP_START( lastmisn_map, AS_PROGRAM, 8 )
|
||||
AM_RANGE(0x2000, 0x27ff) AM_RAM_WRITE(dec8_videoram_w) AM_BASE_SIZE_MEMBER(dec8_state, videoram, videoram_size)
|
||||
AM_RANGE(0x2800, 0x2fff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
|
||||
AM_RANGE(0x3000, 0x37ff) AM_RAM AM_SHARE("share2")
|
||||
AM_RANGE(0x3800, 0x3fff) AM_READWRITE(dec8_pf0_data_r, dec8_pf0_data_w) AM_BASE_MEMBER(dec8_state, pf0_data)
|
||||
AM_RANGE(0x3800, 0x3fff) AM_READWRITE(dec8_bg_data_r, dec8_bg_data_w) AM_BASE_MEMBER(dec8_state, bg_data)
|
||||
AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
|
||||
AM_RANGE(0x8000, 0xffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
@ -653,7 +656,7 @@ static ADDRESS_MAP_START( lastmisn_sub_map, AS_PROGRAM, 8 )
|
||||
AM_RANGE(0x2000, 0x27ff) AM_RAM_WRITE(dec8_videoram_w)
|
||||
AM_RANGE(0x2800, 0x2fff) AM_WRITE(shackled_sprite_w)
|
||||
AM_RANGE(0x3000, 0x37ff) AM_RAM AM_SHARE("share2")
|
||||
AM_RANGE(0x3800, 0x3fff) AM_READWRITE(dec8_pf0_data_r, dec8_pf0_data_w)
|
||||
AM_RANGE(0x3800, 0x3fff) AM_READWRITE(dec8_bg_data_r, dec8_bg_data_w)
|
||||
AM_RANGE(0x4000, 0xffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -676,7 +679,7 @@ static ADDRESS_MAP_START( shackled_map, AS_PROGRAM, 8 )
|
||||
AM_RANGE(0x2000, 0x27ff) AM_RAM_WRITE(dec8_videoram_w)
|
||||
AM_RANGE(0x2800, 0x2fff) AM_READWRITE(shackled_sprite_r, shackled_sprite_w)
|
||||
AM_RANGE(0x3000, 0x37ff) AM_RAM AM_SHARE("share2")
|
||||
AM_RANGE(0x3800, 0x3fff) AM_READWRITE(dec8_pf0_data_r, dec8_pf0_data_w) AM_BASE_MEMBER(dec8_state, pf0_data)
|
||||
AM_RANGE(0x3800, 0x3fff) AM_READWRITE(dec8_bg_data_r, dec8_bg_data_w) AM_BASE_MEMBER(dec8_state, bg_data)
|
||||
AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
|
||||
AM_RANGE(0x8000, 0xffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
@ -702,7 +705,7 @@ static ADDRESS_MAP_START( shackled_sub_map, AS_PROGRAM, 8 )
|
||||
AM_RANGE(0x2000, 0x27ff) AM_RAM_WRITE(dec8_videoram_w) AM_BASE_SIZE_MEMBER(dec8_state, videoram, videoram_size)
|
||||
AM_RANGE(0x2800, 0x2fff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
|
||||
AM_RANGE(0x3000, 0x37ff) AM_RAM AM_SHARE("share2")
|
||||
AM_RANGE(0x3800, 0x3fff) AM_READWRITE(dec8_pf0_data_r, dec8_pf0_data_w)
|
||||
AM_RANGE(0x3800, 0x3fff) AM_READWRITE(dec8_bg_data_r, dec8_bg_data_w)
|
||||
AM_RANGE(0x4000, 0xffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -726,7 +729,7 @@ static ADDRESS_MAP_START( csilver_map, AS_PROGRAM, 8 )
|
||||
AM_RANGE(0x2000, 0x27ff) AM_RAM_WRITE(dec8_videoram_w)
|
||||
AM_RANGE(0x2800, 0x2fff) AM_READWRITE(shackled_sprite_r, shackled_sprite_w)
|
||||
AM_RANGE(0x3000, 0x37ff) AM_RAM AM_SHARE("share2")
|
||||
AM_RANGE(0x3800, 0x3fff) AM_READWRITE(dec8_pf0_data_r, dec8_pf0_data_w) AM_BASE_MEMBER(dec8_state, pf0_data)
|
||||
AM_RANGE(0x3800, 0x3fff) AM_READWRITE(dec8_bg_data_r, dec8_bg_data_w) AM_BASE_MEMBER(dec8_state, bg_data)
|
||||
AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
|
||||
AM_RANGE(0x8000, 0xffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
@ -743,14 +746,14 @@ static ADDRESS_MAP_START( csilver_sub_map, AS_PROGRAM, 8 )
|
||||
AM_RANGE(0x2000, 0x27ff) AM_RAM_WRITE(dec8_videoram_w) AM_BASE_SIZE_MEMBER(dec8_state, videoram, videoram_size)
|
||||
AM_RANGE(0x2800, 0x2fff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
|
||||
AM_RANGE(0x3000, 0x37ff) AM_RAM AM_SHARE("share2")
|
||||
AM_RANGE(0x3800, 0x3fff) AM_READWRITE(dec8_pf0_data_r, dec8_pf0_data_w)
|
||||
AM_RANGE(0x3800, 0x3fff) AM_READWRITE(dec8_bg_data_r, dec8_bg_data_w)
|
||||
AM_RANGE(0x4000, 0xffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( garyoret_map, AS_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x17ff) AM_RAM
|
||||
AM_RANGE(0x1800, 0x1fff) AM_RAM_WRITE(dec8_videoram_w) AM_BASE_SIZE_MEMBER(dec8_state, videoram, videoram_size)
|
||||
AM_RANGE(0x2000, 0x27ff) AM_READWRITE(dec8_pf0_data_r, dec8_pf0_data_w) AM_BASE_MEMBER(dec8_state, pf0_data)
|
||||
AM_RANGE(0x2000, 0x27ff) AM_READWRITE(dec8_bg_data_r, dec8_bg_data_w) AM_BASE_MEMBER(dec8_state, bg_data)
|
||||
AM_RANGE(0x2800, 0x2bff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_split1_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0x2c00, 0x2fff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_split2_w) AM_BASE_GENERIC(paletteram2)
|
||||
AM_RANGE(0x3000, 0x37ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) /* Sprites */
|
||||
@ -1949,7 +1952,7 @@ static MACHINE_START( dec8 )
|
||||
state->save_item(NAME(state->toggle));
|
||||
|
||||
state->save_item(NAME(state->scroll2));
|
||||
state->save_item(NAME(state->pf0_control));
|
||||
state->save_item(NAME(state->bg_control));
|
||||
state->save_item(NAME(state->pf1_control));
|
||||
}
|
||||
|
||||
@ -1967,7 +1970,7 @@ static MACHINE_RESET( dec8 )
|
||||
state->scroll2[0] = state->scroll2[1] = state->scroll2[2] = state->scroll2[3] = 0;
|
||||
for (i = 0; i < 0x20; i++)
|
||||
{
|
||||
state->pf0_control[i] = 0;
|
||||
state->bg_control[i] = 0;
|
||||
state->pf1_control[i] = 0;
|
||||
}
|
||||
}
|
||||
@ -1990,6 +1993,11 @@ static MACHINE_CONFIG_START( cobracom, dec8_state )
|
||||
/* video hardware */
|
||||
MCFG_VIDEO_ATTRIBUTES(VIDEO_BUFFERS_SPRITERAM)
|
||||
|
||||
MCFG_DEVICE_ADD("tilegen1", deco_bac06_, 0)
|
||||
deco_bac06_device_config::set_gfx_region(device, 2,2);
|
||||
MCFG_DEVICE_ADD("tilegen2", deco_bac06_, 0)
|
||||
deco_bac06_device_config::set_gfx_region(device, 3,3);
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(58)
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529) /* 58Hz, 529ms Vblank duration */)
|
||||
@ -2037,6 +2045,9 @@ static MACHINE_CONFIG_START( ghostb, dec8_state )
|
||||
/* video hardware */
|
||||
MCFG_VIDEO_ATTRIBUTES(VIDEO_BUFFERS_SPRITERAM)
|
||||
|
||||
MCFG_DEVICE_ADD("tilegen1", deco_bac06_, 0)
|
||||
deco_bac06_device_config::set_gfx_region(device, 2,2);
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(58)
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* 58Hz, 529ms Vblank duration */)
|
||||
@ -2067,6 +2078,58 @@ static MACHINE_CONFIG_START( ghostb, dec8_state )
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
static MACHINE_CONFIG_START( oscar, dec8_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", HD6309, XTAL_12MHz/2) /* verified on pcb */
|
||||
MCFG_CPU_PROGRAM_MAP(oscar_map)
|
||||
MCFG_CPU_VBLANK_INT("screen", oscar_interrupt)
|
||||
|
||||
MCFG_CPU_ADD("sub", HD6309, XTAL_12MHz/2) /* verified on pcb */
|
||||
MCFG_CPU_PROGRAM_MAP(oscar_sub_map)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", M6502, XTAL_12MHz/8)
|
||||
MCFG_CPU_PROGRAM_MAP(oscar_s_map)
|
||||
/* NMIs are caused by the main CPU */
|
||||
MCFG_QUANTUM_TIME(attotime::from_hz(2400)) /* 40 CPU slices per frame */
|
||||
|
||||
MCFG_MACHINE_START(dec8)
|
||||
MCFG_MACHINE_RESET(dec8)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_VIDEO_ATTRIBUTES(VIDEO_BUFFERS_SPRITERAM)
|
||||
|
||||
MCFG_DEVICE_ADD("tilegen1", deco_bac06_, 0)
|
||||
deco_bac06_device_config::set_gfx_region(device, 2,2);
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(58)
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* 58Hz, 529ms Vblank duration */)
|
||||
MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
MCFG_SCREEN_SIZE(32*8, 32*8)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
|
||||
MCFG_SCREEN_UPDATE(oscar)
|
||||
|
||||
MCFG_GFXDECODE(oscar)
|
||||
MCFG_PALETTE_LENGTH(512)
|
||||
|
||||
MCFG_VIDEO_START(oscar)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
|
||||
MCFG_SOUND_ADD("ym1", YM2203, XTAL_12MHz/8) /* verified on pcb */
|
||||
MCFG_SOUND_ROUTE(0, "mono", 0.23)
|
||||
MCFG_SOUND_ROUTE(1, "mono", 0.23)
|
||||
MCFG_SOUND_ROUTE(2, "mono", 0.23)
|
||||
MCFG_SOUND_ROUTE(3, "mono", 0.20)
|
||||
|
||||
MCFG_SOUND_ADD("ym2", YM3526, XTAL_12MHz/4) /* verified on pcb */
|
||||
MCFG_SOUND_CONFIG(ym3526_config)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
static MACHINE_CONFIG_START( srdarwin, dec8_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
@ -2159,54 +2222,6 @@ static MACHINE_CONFIG_START( gondo, dec8_state )
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_START( oscar, dec8_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", HD6309, XTAL_12MHz/2) /* verified on pcb */
|
||||
MCFG_CPU_PROGRAM_MAP(oscar_map)
|
||||
MCFG_CPU_VBLANK_INT("screen", oscar_interrupt)
|
||||
|
||||
MCFG_CPU_ADD("sub", HD6309, XTAL_12MHz/2) /* verified on pcb */
|
||||
MCFG_CPU_PROGRAM_MAP(oscar_sub_map)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", M6502, XTAL_12MHz/8)
|
||||
MCFG_CPU_PROGRAM_MAP(oscar_s_map)
|
||||
/* NMIs are caused by the main CPU */
|
||||
MCFG_QUANTUM_TIME(attotime::from_hz(2400)) /* 40 CPU slices per frame */
|
||||
|
||||
MCFG_MACHINE_START(dec8)
|
||||
MCFG_MACHINE_RESET(dec8)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_VIDEO_ATTRIBUTES(VIDEO_BUFFERS_SPRITERAM)
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(58)
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* 58Hz, 529ms Vblank duration */)
|
||||
MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
MCFG_SCREEN_SIZE(32*8, 32*8)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
|
||||
MCFG_SCREEN_UPDATE(oscar)
|
||||
|
||||
MCFG_GFXDECODE(oscar)
|
||||
MCFG_PALETTE_LENGTH(512)
|
||||
|
||||
MCFG_VIDEO_START(oscar)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
|
||||
MCFG_SOUND_ADD("ym1", YM2203, XTAL_12MHz/8) /* verified on pcb */
|
||||
MCFG_SOUND_ROUTE(0, "mono", 0.23)
|
||||
MCFG_SOUND_ROUTE(1, "mono", 0.23)
|
||||
MCFG_SOUND_ROUTE(2, "mono", 0.23)
|
||||
MCFG_SOUND_ROUTE(3, "mono", 0.20)
|
||||
|
||||
MCFG_SOUND_ADD("ym2", YM3526, XTAL_12MHz/4) /* verified on pcb */
|
||||
MCFG_SOUND_CONFIG(ym3526_config)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_START( lastmisn, dec8_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
@ -2550,26 +2565,26 @@ DE-0273-1
|
||||
|-------------------------------------------------------------|
|
||||
| 2018 DW09 DW00 |
|
||||
| 2018 |
|
||||
| DW08 |-|
|
||||
| |---------| 6264 | |
|
||||
| | | DW07 | |
|
||||
| |L7A0072 | | |
|
||||
| |DATA EAST| DW06 | |
|
||||
| |BAC 06 | | |
|
||||
|J |---------| | |
|
||||
|A DW19 |-|
|
||||
|M |
|
||||
|M DSW1 DSW2 DW18 |
|
||||
|A |-|
|
||||
| 6116 |---| | |
|
||||
| | H | | |
|
||||
| DW05 | D | DW04 | |
|
||||
| | 6 | 2018 | |
|
||||
| 65C02 YM3812 | 3 | DW03 | |
|
||||
| | C | | |
|
||||
| YM2203 YM3014 | 0 | DW02 |-|
|
||||
| YM3014 | 9 | |
|
||||
| VOL UPC324 |---| DW01-5 i8751H 8MHz |
|
||||
| DW08 |-|
|
||||
| |---------| 6264 | |
|
||||
| | | DW07 | |
|
||||
| |L7A0072 | | |
|
||||
| |DATA EAST| DW06 | |
|
||||
| |BAC 06 | | |
|
||||
|J |---------| | |
|
||||
|A DW19 |-|
|
||||
|M |
|
||||
|M DSW1 DSW2 DW18 |
|
||||
|A |-|
|
||||
| 6116 |---| | |
|
||||
| | H | | |
|
||||
| DW05 | D | DW04 | |
|
||||
| | 6 | 2018 | |
|
||||
| 65C02 YM3812 | 3 | DW03 | |
|
||||
| | C | | |
|
||||
| YM2203 YM3014 | 0 | DW02 |-|
|
||||
| YM3014 | 9 | |
|
||||
| VOL UPC324 |---| DW01-5 i8751H 8MHz |
|
||||
|-------------------------------------------------------------|
|
||||
Notes:
|
||||
2018 - 2K x8 SRAM (DIP24)
|
||||
@ -2592,28 +2607,28 @@ Notes:
|
||||
|
||||
DE-0259-1
|
||||
|-------------------------------------------------------------|
|
||||
| |
|
||||
| 2018 |
|
||||
| 2018 |-|
|
||||
| |
|
||||
| 2018 |
|
||||
| 2018 |-|
|
||||
| 2018 | |
|
||||
| 2018 | |
|
||||
| 2018 2018 | |
|
||||
| 2018 | |
|
||||
| 2018 2018 | |
|
||||
| | |
|
||||
| DW10 |-------| | |
|
||||
| | | | |
|
||||
| DW11 2018 | DRL40 | |-|
|
||||
| | | |
|
||||
| DW12 |-------| |
|
||||
| DW10 |-------| | |
|
||||
| | | | |
|
||||
| DW11 2018 | DRL40 | |-|
|
||||
| | | |
|
||||
| DW12 |-------| |
|
||||
| |-|
|
||||
| DW13 2018 | |
|
||||
| VSC30 |-------| | |
|
||||
| DW14 | | | |
|
||||
| | DRL40 | | |
|
||||
| DW15 2018 | | | |
|
||||
| HMC20 |-------| | |
|
||||
| DW13 2018 | |
|
||||
| VSC30 |-------| | |
|
||||
| DW14 | | | |
|
||||
| | DRL40 | | |
|
||||
| DW15 2018 | | | |
|
||||
| HMC20 |-------| | |
|
||||
| DW16 |-|
|
||||
| |
|
||||
|12MHz DW17 2018 |
|
||||
| |
|
||||
|12MHz DW17 2018 |
|
||||
|-------------------------------------------------------------|
|
||||
Notes:
|
||||
2018 - 2K x8 SRAM (DIP24)
|
||||
|
@ -7,7 +7,7 @@ public:
|
||||
|
||||
/* memory pointers */
|
||||
UINT8 * videoram;
|
||||
UINT8 * pf0_data;
|
||||
UINT8 * bg_data;
|
||||
UINT8 * pf1_data;
|
||||
UINT8 * row;
|
||||
// UINT8 * paletteram; // currently this uses generic palette handling
|
||||
@ -16,11 +16,11 @@ public:
|
||||
size_t videoram_size;
|
||||
|
||||
/* video-related */
|
||||
tilemap_t *pf0_tilemap, *pf1_tilemap, *fix_tilemap;
|
||||
tilemap_t *bg_tilemap, *pf1_tilemap, *fix_tilemap;
|
||||
//int scroll1[4];
|
||||
int scroll2[4];
|
||||
int pf0_control[0x20], pf1_control[0x20];
|
||||
int gfx_mask, game_uses_priority;
|
||||
int bg_control[0x20], pf1_control[0x20];
|
||||
int game_uses_priority;
|
||||
|
||||
/* misc */
|
||||
int i8751_port0, i8751_port1;
|
||||
@ -60,9 +60,9 @@ VIDEO_START( garyoret );
|
||||
|
||||
WRITE8_HANDLER( dec8_bac06_0_w );
|
||||
WRITE8_HANDLER( dec8_bac06_1_w );
|
||||
WRITE8_HANDLER( dec8_pf0_data_w );
|
||||
WRITE8_HANDLER( dec8_bg_data_w );
|
||||
WRITE8_HANDLER( dec8_pf1_data_w );
|
||||
READ8_HANDLER( dec8_pf0_data_r );
|
||||
READ8_HANDLER( dec8_bg_data_r );
|
||||
READ8_HANDLER( dec8_pf1_data_r );
|
||||
WRITE8_HANDLER( srdarwin_videoram_w );
|
||||
WRITE8_HANDLER( dec8_scroll2_w );
|
||||
|
@ -161,14 +161,14 @@ SCREEN_UPDATE( hbarrel )
|
||||
{
|
||||
flip_screen_set(screen->machine, screen->machine->device<deco_bac06_device>("tilegen1")->get_flip_state());
|
||||
|
||||
screen->machine->device<deco_bac06_device>("tilegen3")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,TILEMAP_DRAW_OPAQUE);
|
||||
screen->machine->device<deco_bac06_device>("tilegen3")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
|
||||
draw_sprites(screen->machine,bitmap,cliprect,0x08,0x08);
|
||||
screen->machine->device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0);
|
||||
screen->machine->device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
|
||||
|
||||
/* HB always keeps pf2 on top of pf3, no need explicitly support priority register */
|
||||
|
||||
draw_sprites(screen->machine,bitmap,cliprect,0x08,0x00);
|
||||
screen->machine->device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0);
|
||||
screen->machine->device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -182,32 +182,32 @@ SCREEN_UPDATE( baddudes )
|
||||
/* WARNING: inverted wrt Midnight Resistance */
|
||||
if ((state->pri & 0x01) == 0)
|
||||
{
|
||||
screen->machine->device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,TILEMAP_DRAW_OPAQUE);
|
||||
screen->machine->device<deco_bac06_device>("tilegen3")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0);
|
||||
screen->machine->device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
|
||||
screen->machine->device<deco_bac06_device>("tilegen3")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
|
||||
|
||||
if (state->pri & 2)
|
||||
screen->machine->device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,TILEMAP_DRAW_LAYER0); /* Foreground pens only */
|
||||
screen->machine->device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0,0x08,0x08,0x08,0x08); // upper 8 pens of upper 8 priority marked tiles /* Foreground pens only */
|
||||
|
||||
draw_sprites(screen->machine,bitmap,cliprect,0x00,0x00);
|
||||
|
||||
if (state->pri & 4)
|
||||
screen->machine->device<deco_bac06_device>("tilegen3")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,TILEMAP_DRAW_LAYER0); /* Foreground pens only */
|
||||
screen->machine->device<deco_bac06_device>("tilegen3")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0,0x08,0x08,0x08,0x08); // upper 8 pens of upper 8 priority marked tiles /* Foreground pens only */
|
||||
}
|
||||
else
|
||||
{
|
||||
screen->machine->device<deco_bac06_device>("tilegen3")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,TILEMAP_DRAW_OPAQUE);
|
||||
screen->machine->device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0);
|
||||
screen->machine->device<deco_bac06_device>("tilegen3")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
|
||||
screen->machine->device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
|
||||
|
||||
if (state->pri & 2)
|
||||
screen->machine->device<deco_bac06_device>("tilegen3")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,TILEMAP_DRAW_LAYER0); /* Foreground pens only */
|
||||
screen->machine->device<deco_bac06_device>("tilegen3")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0,0x08,0x08,0x08,0x08); // upper 8 pens of upper 8 priority marked tiles /* Foreground pens only */
|
||||
|
||||
draw_sprites(screen->machine,bitmap,cliprect,0x00,0x00);
|
||||
|
||||
if (state->pri & 4)
|
||||
screen->machine->device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,TILEMAP_DRAW_LAYER0); /* Foreground pens only */
|
||||
screen->machine->device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0,0x08,0x08,0x08,0x08); // upper 8 pens of upper 8 priority marked tiles /* Foreground pens only */
|
||||
}
|
||||
|
||||
screen->machine->device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0);
|
||||
screen->machine->device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -231,21 +231,21 @@ SCREEN_UPDATE( robocop )
|
||||
/* Robocop uses it only for the title screen, so this might be just */
|
||||
/* completely wrong. The top 8 bits of the register might mean */
|
||||
/* something (they are 0x80 in midres, 0x00 here) */
|
||||
screen->machine->device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,TILEMAP_DRAW_LAYER1|TILEMAP_DRAW_OPAQUE);
|
||||
screen->machine->device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
|
||||
|
||||
if (state->pri & 0x02)
|
||||
draw_sprites(screen->machine,bitmap,cliprect,0x08,trans);
|
||||
|
||||
screen->machine->device<deco_bac06_device>("tilegen3")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0);
|
||||
screen->machine->device<deco_bac06_device>("tilegen3")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
|
||||
}
|
||||
else
|
||||
{
|
||||
screen->machine->device<deco_bac06_device>("tilegen3")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,TILEMAP_DRAW_OPAQUE);
|
||||
screen->machine->device<deco_bac06_device>("tilegen3")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
|
||||
|
||||
if (state->pri & 0x02)
|
||||
draw_sprites(screen->machine,bitmap,cliprect,0x08,trans);
|
||||
|
||||
screen->machine->device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0);
|
||||
screen->machine->device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
|
||||
}
|
||||
|
||||
if (state->pri & 0x02)
|
||||
@ -253,7 +253,7 @@ SCREEN_UPDATE( robocop )
|
||||
else
|
||||
draw_sprites(screen->machine,bitmap,cliprect,0x00,0x00);
|
||||
|
||||
screen->machine->device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0);
|
||||
screen->machine->device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -266,9 +266,9 @@ SCREEN_UPDATE( birdtry )
|
||||
/* This game doesn't have the extra playfield chip on the game board, but
|
||||
the palette does show through. */
|
||||
bitmap_fill(bitmap,cliprect,screen->machine->pens[768]);
|
||||
screen->machine->device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0);
|
||||
screen->machine->device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
|
||||
draw_sprites(screen->machine,bitmap,cliprect,0x00,0x00);
|
||||
screen->machine->device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0);
|
||||
screen->machine->device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -281,17 +281,17 @@ SCREEN_UPDATE( hippodrm )
|
||||
|
||||
if (state->pri & 0x01)
|
||||
{
|
||||
screen->machine->device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,TILEMAP_DRAW_OPAQUE);
|
||||
screen->machine->device<deco_bac06_device>("tilegen3")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0);
|
||||
screen->machine->device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
|
||||
screen->machine->device<deco_bac06_device>("tilegen3")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
|
||||
}
|
||||
else
|
||||
{
|
||||
screen->machine->device<deco_bac06_device>("tilegen3")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,TILEMAP_DRAW_OPAQUE);
|
||||
screen->machine->device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0);
|
||||
screen->machine->device<deco_bac06_device>("tilegen3")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
|
||||
screen->machine->device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
|
||||
}
|
||||
|
||||
draw_sprites(screen->machine,bitmap,cliprect,0x00,0x00);
|
||||
screen->machine->device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0);
|
||||
screen->machine->device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -302,16 +302,16 @@ SCREEN_UPDATE( slyspy )
|
||||
dec0_state *state = screen->machine->driver_data<dec0_state>();
|
||||
flip_screen_set(screen->machine, screen->machine->device<deco_bac06_device>("tilegen1")->get_flip_state());
|
||||
|
||||
screen->machine->device<deco_bac06_device>("tilegen3")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,TILEMAP_DRAW_OPAQUE);
|
||||
screen->machine->device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0);
|
||||
screen->machine->device<deco_bac06_device>("tilegen3")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
|
||||
screen->machine->device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
|
||||
|
||||
draw_sprites(screen->machine,bitmap,cliprect,0x00,0x00);
|
||||
|
||||
/* Redraw top 8 pens of top 8 palettes over sprites */
|
||||
if (state->pri&0x80)
|
||||
screen->machine->device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,TILEMAP_DRAW_LAYER0);
|
||||
screen->machine->device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0,0x08,0x08,0x08,0x08); // upper 8 pens of upper 8 priority marked tiles
|
||||
|
||||
screen->machine->device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0);
|
||||
screen->machine->device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -330,21 +330,21 @@ SCREEN_UPDATE( midres )
|
||||
|
||||
if (state->pri & 0x01)
|
||||
{
|
||||
screen->machine->device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,TILEMAP_DRAW_OPAQUE);
|
||||
screen->machine->device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
|
||||
|
||||
if (state->pri & 0x02)
|
||||
draw_sprites(screen->machine,bitmap,cliprect,0x08,trans);
|
||||
|
||||
screen->machine->device<deco_bac06_device>("tilegen3")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0);
|
||||
screen->machine->device<deco_bac06_device>("tilegen3")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
|
||||
}
|
||||
else
|
||||
{
|
||||
screen->machine->device<deco_bac06_device>("tilegen3")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,TILEMAP_DRAW_OPAQUE);
|
||||
screen->machine->device<deco_bac06_device>("tilegen3")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
|
||||
|
||||
if (state->pri & 0x02)
|
||||
draw_sprites(screen->machine,bitmap,cliprect,0x08,trans);
|
||||
|
||||
screen->machine->device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0);
|
||||
screen->machine->device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
|
||||
}
|
||||
|
||||
if (state->pri & 0x02)
|
||||
@ -352,7 +352,7 @@ SCREEN_UPDATE( midres )
|
||||
else
|
||||
draw_sprites(screen->machine,bitmap,cliprect,0x00,0x00);
|
||||
|
||||
screen->machine->device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0);
|
||||
screen->machine->device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -6,8 +6,9 @@ Cobra Command:
|
||||
256 colours, palette generated by ram.
|
||||
|
||||
The Real Ghostbusters:
|
||||
1 Deco VSC30 (M60348)
|
||||
1 Deco HMC20 (M60232)
|
||||
1 Deco VSC30 (M60348) (on DE-0259-1 sub board)
|
||||
1 Deco HMC20 (M60232) (on DE-0259-1 sub board)
|
||||
1 x BAC06 (on DE-0273-1 board)
|
||||
|
||||
1 playfield, same as above, with rowscroll
|
||||
1024 colours from 2 proms.
|
||||
@ -42,6 +43,7 @@ sprites.
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/dec8.h"
|
||||
#include "video/decbac06.h"
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
@ -99,43 +101,19 @@ PALETTE_INIT( ghostb )
|
||||
}
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( dec8_bac06_0_w )
|
||||
WRITE8_HANDLER( dec8_bg_data_w )
|
||||
{
|
||||
dec8_state *state = space->machine->driver_data<dec8_state>();
|
||||
state->pf0_control[offset] = data;
|
||||
state->bg_data[offset] = data;
|
||||
tilemap_mark_tile_dirty(state->bg_tilemap, offset / 2);
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( dec8_bac06_1_w )
|
||||
READ8_HANDLER( dec8_bg_data_r )
|
||||
{
|
||||
dec8_state *state = space->machine->driver_data<dec8_state>();
|
||||
state->pf1_control[offset] = data;
|
||||
return state->bg_data[offset];
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( dec8_pf0_data_w )
|
||||
{
|
||||
dec8_state *state = space->machine->driver_data<dec8_state>();
|
||||
state->pf0_data[offset] = data;
|
||||
tilemap_mark_tile_dirty(state->pf0_tilemap, offset / 2);
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( dec8_pf1_data_w )
|
||||
{
|
||||
dec8_state *state = space->machine->driver_data<dec8_state>();
|
||||
state->pf1_data[offset] = data;
|
||||
tilemap_mark_tile_dirty(state->pf1_tilemap, offset / 2);
|
||||
}
|
||||
|
||||
READ8_HANDLER( dec8_pf0_data_r )
|
||||
{
|
||||
dec8_state *state = space->machine->driver_data<dec8_state>();
|
||||
return state->pf0_data[offset];
|
||||
}
|
||||
|
||||
READ8_HANDLER( dec8_pf1_data_r )
|
||||
{
|
||||
dec8_state *state = space->machine->driver_data<dec8_state>();
|
||||
return state->pf1_data[offset];
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( dec8_videoram_w )
|
||||
{
|
||||
@ -151,13 +129,6 @@ WRITE8_HANDLER( srdarwin_videoram_w )
|
||||
tilemap_mark_tile_dirty(state->fix_tilemap, offset);
|
||||
}
|
||||
|
||||
#ifdef UNUSED_FUNCTION
|
||||
WRITE8_HANDLER( dec8_scroll1_w )
|
||||
{
|
||||
dec8_state *state = space->machine->driver_data<dec8_state>();
|
||||
state->scroll1[offset] = data;
|
||||
}
|
||||
#endif
|
||||
|
||||
WRITE8_HANDLER( dec8_scroll2_w )
|
||||
{
|
||||
@ -425,43 +396,17 @@ static void srdarwin_draw_sprites( running_machine* machine, bitmap_t *bitmap, c
|
||||
}
|
||||
}
|
||||
|
||||
/* Draw character tiles, each game has different colour masks */
|
||||
#if 0
|
||||
static void draw_characters( running_machine* machine, bitmap_t *bitmap, const rectangle *cliprect, int mask, int shift )
|
||||
{
|
||||
dec8_state *state = machine->driver_data<dec8_state>();
|
||||
int mx, my, tile, color, offs;
|
||||
|
||||
for (offs = 0x800 - 2; offs >= 0; offs -= 2)
|
||||
{
|
||||
tile = state->videoram[offs + 1] + ((state->videoram[offs] & 0xf) << 8);
|
||||
|
||||
if (!tile) continue;
|
||||
|
||||
color = (state->videoram[offs] & mask) >> shift;
|
||||
mx = (offs / 2) % 32;
|
||||
my = (offs / 2) / 32;
|
||||
|
||||
drawgfx_transpen(bitmap,cliprect,machine->gfx[0],
|
||||
tile,color,0,0, 8 * mx, 8 * my, 0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
SCREEN_UPDATE( cobracom )
|
||||
{
|
||||
dec8_state *state = screen->machine->driver_data<dec8_state>();
|
||||
tilemap_set_scrollx(state->pf0_tilemap, 0, (state->pf0_control[0x10] << 8) + state->pf0_control[0x11]);
|
||||
tilemap_set_scrolly(state->pf0_tilemap, 0, (state->pf0_control[0x12] << 8) + state->pf0_control[0x13]);
|
||||
tilemap_set_scrollx(state->pf1_tilemap, 0, (state->pf1_control[0x10] << 8) + state->pf1_control[0x11]);
|
||||
tilemap_set_scrolly(state->pf1_tilemap, 0, (state->pf1_control[0x12] << 8) + state->pf1_control[0x13]);
|
||||
flip_screen_set(screen->machine, state->pf0_control[0] >> 7);
|
||||
|
||||
tilemap_draw(bitmap, cliprect, state->pf0_tilemap, 0, 0);
|
||||
flip_screen_set(screen->machine, state->bg_control[0] >> 7);
|
||||
|
||||
screen->machine->device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
|
||||
draw_sprites2(screen->machine, bitmap, cliprect, 1);
|
||||
tilemap_draw(bitmap, cliprect, state->pf1_tilemap, 0, 0);
|
||||
screen->machine->device<deco_bac06_device>("tilegen2")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
|
||||
draw_sprites2(screen->machine, bitmap, cliprect, 2);
|
||||
tilemap_draw(bitmap, cliprect, state->fix_tilemap, 0, 0);
|
||||
return 0;
|
||||
@ -469,12 +414,13 @@ SCREEN_UPDATE( cobracom )
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
/*
|
||||
static TILE_GET_INFO( get_bac0_tile_info )
|
||||
{
|
||||
dec8_state *state = machine->driver_data<dec8_state>();
|
||||
int tile, color, offs = tile_index << 1;
|
||||
|
||||
tile = (state->pf0_data[offs] << 8) | state->pf0_data[offs + 1];
|
||||
tile = (state->bg_data[offs] << 8) | state->bg_data[offs + 1];
|
||||
color = tile >> 12;
|
||||
if (color > 7 && state->game_uses_priority)
|
||||
tileinfo->category = 1;
|
||||
@ -506,12 +452,8 @@ static TILE_GET_INFO( get_bac1_tile_info )
|
||||
color & 3,
|
||||
0);
|
||||
}
|
||||
*/
|
||||
|
||||
static TILEMAP_MAPPER( bac0_scan_rows )
|
||||
{
|
||||
/* logical (col,row) -> memory offset */
|
||||
return ((col & 0x0f) + ((row & 0x0f) << 4)) + ((col & 0x10) << 5) + ((row & 0x10) << 4);
|
||||
}
|
||||
|
||||
static TILE_GET_INFO( get_cobracom_fix_tile_info )
|
||||
{
|
||||
@ -530,15 +472,14 @@ static TILE_GET_INFO( get_cobracom_fix_tile_info )
|
||||
VIDEO_START( cobracom )
|
||||
{
|
||||
dec8_state *state = machine->driver_data<dec8_state>();
|
||||
state->pf0_tilemap = tilemap_create(machine, get_bac0_tile_info, bac0_scan_rows, 16, 16, 32, 32);
|
||||
state->pf1_tilemap = tilemap_create(machine, get_bac1_tile_info, bac0_scan_rows, 16, 16, 32, 32);
|
||||
state->fix_tilemap = tilemap_create(machine, get_cobracom_fix_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
|
||||
|
||||
tilemap_set_transparent_pen(state->pf1_tilemap, 0);
|
||||
tilemap_set_transparent_pen(state->fix_tilemap, 0);
|
||||
|
||||
state->game_uses_priority = 0;
|
||||
state->gfx_mask = 0x3;
|
||||
machine->device<deco_bac06_device>("tilegen1")->set_colmask(0x3);
|
||||
machine->device<deco_bac06_device>("tilegen2")->set_colmask(0x3);
|
||||
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
@ -546,23 +487,7 @@ VIDEO_START( cobracom )
|
||||
SCREEN_UPDATE( ghostb )
|
||||
{
|
||||
dec8_state *state = screen->machine->driver_data<dec8_state>();
|
||||
if (state->pf0_control[0] & 0x4)
|
||||
{ /* Rowscroll */
|
||||
int offs;
|
||||
|
||||
tilemap_set_scroll_rows(state->pf0_tilemap, 512);
|
||||
for (offs = 0; offs < 512; offs += 2)
|
||||
tilemap_set_scrollx(state->pf0_tilemap, offs / 2, (state->pf0_control[0x10] << 8) + state->pf0_control[0x11] +
|
||||
(state->row[offs] << 8) + state->row[offs + 1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
tilemap_set_scroll_rows(state->pf0_tilemap, 1);
|
||||
tilemap_set_scrollx(state->pf0_tilemap, 0, (state->pf0_control[0x10] << 8) + state->pf0_control[0x11]);
|
||||
}
|
||||
tilemap_set_scrolly(state->pf0_tilemap, 0, (state->pf0_control[0x12] << 8) + state->pf0_control[0x13]);
|
||||
|
||||
tilemap_draw(bitmap, cliprect, state->pf0_tilemap, 0, 0);
|
||||
screen->machine->device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
|
||||
draw_sprites1(screen->machine, bitmap, cliprect, 0);
|
||||
tilemap_draw(bitmap, cliprect, state->fix_tilemap, 0, 0);
|
||||
return 0;
|
||||
@ -585,12 +510,11 @@ static TILE_GET_INFO( get_ghostb_fix_tile_info )
|
||||
VIDEO_START( ghostb )
|
||||
{
|
||||
dec8_state *state = machine->driver_data<dec8_state>();
|
||||
state->pf0_tilemap = tilemap_create(machine, get_bac0_tile_info, bac0_scan_rows, 16, 16, 32, 32);
|
||||
state->fix_tilemap = tilemap_create(machine, get_ghostb_fix_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
|
||||
tilemap_set_transparent_pen(state->fix_tilemap, 0);
|
||||
|
||||
state->game_uses_priority = 0;
|
||||
state->gfx_mask = 0xf;
|
||||
machine->device<deco_bac06_device>("tilegen1")->set_colmask(0xf);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
@ -598,15 +522,12 @@ VIDEO_START( ghostb )
|
||||
SCREEN_UPDATE( oscar )
|
||||
{
|
||||
dec8_state *state = screen->machine->driver_data<dec8_state>();
|
||||
tilemap_set_scrollx(state->pf0_tilemap,0, (state->pf0_control[0x10] << 8) + state->pf0_control[0x11]);
|
||||
tilemap_set_scrolly(state->pf0_tilemap,0, (state->pf0_control[0x12] << 8) + state->pf0_control[0x13]);
|
||||
flip_screen_set(screen->machine, state->pf0_control[1] >> 7);
|
||||
flip_screen_set(screen->machine, state->bg_control[1] >> 7);
|
||||
|
||||
tilemap_draw(bitmap,cliprect, state->pf0_tilemap, TILEMAP_DRAW_LAYER1 | 0, 0);
|
||||
tilemap_draw(bitmap,cliprect, state->pf0_tilemap, TILEMAP_DRAW_LAYER1 | 1, 0);
|
||||
tilemap_draw(bitmap,cliprect, state->pf0_tilemap, TILEMAP_DRAW_LAYER0 | 0, 0);
|
||||
// we mimic the priority scheme in dec0.c, this was originally a bit different, so this could be wrong
|
||||
screen->machine->device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
|
||||
draw_sprites2(screen->machine, bitmap, cliprect, 0);
|
||||
tilemap_draw(bitmap,cliprect, state->pf0_tilemap, TILEMAP_DRAW_LAYER0 | 1, 0);
|
||||
screen->machine->device<deco_bac06_device>("tilegen1")->deco_bac06_pf_draw(screen->machine,bitmap,cliprect,0, 0x08,0x08,0x08,0x08);
|
||||
tilemap_draw(bitmap,cliprect, state->fix_tilemap, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
@ -628,14 +549,13 @@ static TILE_GET_INFO( get_oscar_fix_tile_info )
|
||||
VIDEO_START( oscar )
|
||||
{
|
||||
dec8_state *state = machine->driver_data<dec8_state>();
|
||||
state->pf0_tilemap = tilemap_create(machine, get_bac0_tile_info, bac0_scan_rows, 16, 16, 32, 32);
|
||||
state->fix_tilemap = tilemap_create(machine, get_oscar_fix_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
|
||||
|
||||
tilemap_set_transparent_pen(state->fix_tilemap, 0);
|
||||
tilemap_set_transmask(state->pf0_tilemap, 0, 0x00ff, 0xff00); /* Bottom 8 pens */
|
||||
|
||||
state->game_uses_priority = 1;
|
||||
state->gfx_mask = 0x7;
|
||||
machine->device<deco_bac06_device>("tilegen1")->set_colmask(0x7);
|
||||
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
@ -643,10 +563,10 @@ VIDEO_START( oscar )
|
||||
SCREEN_UPDATE( lastmisn )
|
||||
{
|
||||
dec8_state *state = screen->machine->driver_data<dec8_state>();
|
||||
tilemap_set_scrollx(state->pf0_tilemap, 0, ((state->scroll2[0] << 8)+ state->scroll2[1]));
|
||||
tilemap_set_scrolly(state->pf0_tilemap, 0, ((state->scroll2[2] << 8)+ state->scroll2[3]));
|
||||
tilemap_set_scrollx(state->bg_tilemap, 0, ((state->scroll2[0] << 8)+ state->scroll2[1]));
|
||||
tilemap_set_scrolly(state->bg_tilemap, 0, ((state->scroll2[2] << 8)+ state->scroll2[3]));
|
||||
|
||||
tilemap_draw(bitmap, cliprect, state->pf0_tilemap, 0, 0);
|
||||
tilemap_draw(bitmap, cliprect, state->bg_tilemap, 0, 0);
|
||||
draw_sprites1(screen->machine, bitmap, cliprect, 0);
|
||||
tilemap_draw(bitmap, cliprect, state->fix_tilemap, 0, 0);
|
||||
return 0;
|
||||
@ -655,14 +575,14 @@ SCREEN_UPDATE( lastmisn )
|
||||
SCREEN_UPDATE( shackled )
|
||||
{
|
||||
dec8_state *state = screen->machine->driver_data<dec8_state>();
|
||||
tilemap_set_scrollx(state->pf0_tilemap, 0, ((state->scroll2[0] << 8) + state->scroll2[1]));
|
||||
tilemap_set_scrolly(state->pf0_tilemap, 0, ((state->scroll2[2] << 8) + state->scroll2[3]));
|
||||
tilemap_set_scrollx(state->bg_tilemap, 0, ((state->scroll2[0] << 8) + state->scroll2[1]));
|
||||
tilemap_set_scrolly(state->bg_tilemap, 0, ((state->scroll2[2] << 8) + state->scroll2[3]));
|
||||
|
||||
tilemap_draw(bitmap, cliprect, state->pf0_tilemap, TILEMAP_DRAW_LAYER1 | 0, 0);
|
||||
tilemap_draw(bitmap, cliprect, state->pf0_tilemap, TILEMAP_DRAW_LAYER1 | 1, 0);
|
||||
tilemap_draw(bitmap, cliprect, state->pf0_tilemap, TILEMAP_DRAW_LAYER0 | 0, 0);
|
||||
tilemap_draw(bitmap, cliprect, state->bg_tilemap, TILEMAP_DRAW_LAYER1 | 0, 0);
|
||||
tilemap_draw(bitmap, cliprect, state->bg_tilemap, TILEMAP_DRAW_LAYER1 | 1, 0);
|
||||
tilemap_draw(bitmap, cliprect, state->bg_tilemap, TILEMAP_DRAW_LAYER0 | 0, 0);
|
||||
draw_sprites1(screen->machine, bitmap, cliprect, 0);
|
||||
tilemap_draw(bitmap, cliprect, state->pf0_tilemap, TILEMAP_DRAW_LAYER0 | 1, 0);
|
||||
tilemap_draw(bitmap, cliprect, state->bg_tilemap, TILEMAP_DRAW_LAYER0 | 1, 0);
|
||||
tilemap_draw(bitmap, cliprect, state->fix_tilemap, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
@ -677,7 +597,7 @@ static TILE_GET_INFO( get_lastmisn_tile_info )
|
||||
{
|
||||
dec8_state *state = machine->driver_data<dec8_state>();
|
||||
int offs = tile_index * 2;
|
||||
int tile = state->pf0_data[offs + 1] + (state->pf0_data[offs] << 8);
|
||||
int tile = state->bg_data[offs + 1] + (state->bg_data[offs] << 8);
|
||||
int color = tile >> 12;
|
||||
|
||||
if (color > 7 && state->game_uses_priority)
|
||||
@ -709,7 +629,7 @@ static TILE_GET_INFO( get_lastmisn_fix_tile_info )
|
||||
VIDEO_START( lastmisn )
|
||||
{
|
||||
dec8_state *state = machine->driver_data<dec8_state>();
|
||||
state->pf0_tilemap = tilemap_create(machine, get_lastmisn_tile_info, lastmisn_scan_rows, 16, 16, 32, 32);
|
||||
state->bg_tilemap = tilemap_create(machine, get_lastmisn_tile_info, lastmisn_scan_rows, 16, 16, 32, 32);
|
||||
state->fix_tilemap = tilemap_create(machine, get_lastmisn_fix_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
|
||||
|
||||
tilemap_set_transparent_pen(state->fix_tilemap, 0);
|
||||
@ -719,11 +639,11 @@ VIDEO_START( lastmisn )
|
||||
VIDEO_START( shackled )
|
||||
{
|
||||
dec8_state *state = machine->driver_data<dec8_state>();
|
||||
state->pf0_tilemap = tilemap_create(machine, get_lastmisn_tile_info, lastmisn_scan_rows, 16, 16, 32, 32);
|
||||
state->bg_tilemap = tilemap_create(machine, get_lastmisn_tile_info, lastmisn_scan_rows, 16, 16, 32, 32);
|
||||
state->fix_tilemap = tilemap_create(machine, get_lastmisn_fix_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
|
||||
|
||||
tilemap_set_transparent_pen(state->fix_tilemap, 0);
|
||||
tilemap_set_transmask(state->pf0_tilemap, 0, 0x000f, 0xfff0); /* Bottom 12 pens */
|
||||
tilemap_set_transmask(state->bg_tilemap, 0, 0x000f, 0xfff0); /* Bottom 12 pens */
|
||||
state->game_uses_priority = 1;
|
||||
}
|
||||
|
||||
@ -732,11 +652,11 @@ VIDEO_START( shackled )
|
||||
SCREEN_UPDATE( srdarwin )
|
||||
{
|
||||
dec8_state *state = screen->machine->driver_data<dec8_state>();
|
||||
tilemap_set_scrollx(state->pf0_tilemap, 0, (state->scroll2[0] << 8) + state->scroll2[1]);
|
||||
tilemap_set_scrollx(state->bg_tilemap, 0, (state->scroll2[0] << 8) + state->scroll2[1]);
|
||||
|
||||
tilemap_draw(bitmap, cliprect, state->pf0_tilemap, TILEMAP_DRAW_LAYER1, 0);
|
||||
tilemap_draw(bitmap, cliprect, state->bg_tilemap, TILEMAP_DRAW_LAYER1, 0);
|
||||
srdarwin_draw_sprites(screen->machine, bitmap, cliprect, 0); //* (srdarwin37b5gre)
|
||||
tilemap_draw(bitmap, cliprect, state->pf0_tilemap, TILEMAP_DRAW_LAYER0, 0);
|
||||
tilemap_draw(bitmap, cliprect, state->bg_tilemap, TILEMAP_DRAW_LAYER0, 0);
|
||||
srdarwin_draw_sprites(screen->machine, bitmap, cliprect, 1);
|
||||
tilemap_draw(bitmap, cliprect, state->fix_tilemap, 0, 0);
|
||||
return 0;
|
||||
@ -764,7 +684,7 @@ static TILE_GET_INFO( get_srdarwin_fix_tile_info )
|
||||
static TILE_GET_INFO( get_srdarwin_tile_info )
|
||||
{
|
||||
dec8_state *state = machine->driver_data<dec8_state>();
|
||||
int tile = state->pf0_data[2 * tile_index + 1] + (state->pf0_data[2 * tile_index] << 8);
|
||||
int tile = state->bg_data[2 * tile_index + 1] + (state->bg_data[2 * tile_index] << 8);
|
||||
int color = tile >> 12 & 3;
|
||||
int bank;
|
||||
|
||||
@ -782,14 +702,14 @@ static TILE_GET_INFO( get_srdarwin_tile_info )
|
||||
VIDEO_START( srdarwin )
|
||||
{
|
||||
dec8_state *state = machine->driver_data<dec8_state>();
|
||||
state->pf0_tilemap = tilemap_create(machine, get_srdarwin_tile_info, tilemap_scan_rows, 16, 16, 32, 16);
|
||||
state->bg_tilemap = tilemap_create(machine, get_srdarwin_tile_info, tilemap_scan_rows, 16, 16, 32, 16);
|
||||
state->fix_tilemap = tilemap_create(machine, get_srdarwin_fix_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
|
||||
|
||||
tilemap_set_transparent_pen(state->fix_tilemap, 0);
|
||||
tilemap_set_transmask(state->pf0_tilemap, 0, 0xffff, 0x0000); //* draw as background only
|
||||
tilemap_set_transmask(state->pf0_tilemap, 1, 0x00ff, 0xff00); /* Bottom 8 pens */
|
||||
tilemap_set_transmask(state->pf0_tilemap, 2, 0x00ff, 0xff00); /* Bottom 8 pens */
|
||||
tilemap_set_transmask(state->pf0_tilemap, 3, 0x0000, 0xffff); //* draw as foreground only
|
||||
tilemap_set_transmask(state->bg_tilemap, 0, 0xffff, 0x0000); //* draw as background only
|
||||
tilemap_set_transmask(state->bg_tilemap, 1, 0x00ff, 0xff00); /* Bottom 8 pens */
|
||||
tilemap_set_transmask(state->bg_tilemap, 2, 0x00ff, 0xff00); /* Bottom 8 pens */
|
||||
tilemap_set_transmask(state->bg_tilemap, 3, 0x0000, 0xffff); //* draw as foreground only
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
@ -797,12 +717,12 @@ VIDEO_START( srdarwin )
|
||||
SCREEN_UPDATE( gondo )
|
||||
{
|
||||
dec8_state *state = screen->machine->driver_data<dec8_state>();
|
||||
tilemap_set_scrollx(state->pf0_tilemap, 0, ((state->scroll2[0] << 8) + state->scroll2[1]));
|
||||
tilemap_set_scrolly(state->pf0_tilemap, 0, ((state->scroll2[2] << 8) + state->scroll2[3]));
|
||||
tilemap_set_scrollx(state->bg_tilemap, 0, ((state->scroll2[0] << 8) + state->scroll2[1]));
|
||||
tilemap_set_scrolly(state->bg_tilemap, 0, ((state->scroll2[2] << 8) + state->scroll2[3]));
|
||||
|
||||
tilemap_draw(bitmap, cliprect, state->pf0_tilemap, TILEMAP_DRAW_LAYER1, 0);
|
||||
tilemap_draw(bitmap, cliprect, state->bg_tilemap, TILEMAP_DRAW_LAYER1, 0);
|
||||
draw_sprites1(screen->machine, bitmap, cliprect, 2);
|
||||
tilemap_draw(bitmap, cliprect, state->pf0_tilemap, TILEMAP_DRAW_LAYER0, 0);
|
||||
tilemap_draw(bitmap, cliprect, state->bg_tilemap, TILEMAP_DRAW_LAYER0, 0);
|
||||
draw_sprites1(screen->machine, bitmap, cliprect, 1);
|
||||
tilemap_draw(bitmap, cliprect, state->fix_tilemap, 0, 0);
|
||||
return 0;
|
||||
@ -811,12 +731,12 @@ SCREEN_UPDATE( gondo )
|
||||
SCREEN_UPDATE( garyoret )
|
||||
{
|
||||
dec8_state *state = screen->machine->driver_data<dec8_state>();
|
||||
tilemap_set_scrollx(state->pf0_tilemap, 0, ((state->scroll2[0] << 8) + state->scroll2[1]));
|
||||
tilemap_set_scrolly(state->pf0_tilemap, 0, ((state->scroll2[2] << 8) + state->scroll2[3]));
|
||||
tilemap_set_scrollx(state->bg_tilemap, 0, ((state->scroll2[0] << 8) + state->scroll2[1]));
|
||||
tilemap_set_scrolly(state->bg_tilemap, 0, ((state->scroll2[2] << 8) + state->scroll2[3]));
|
||||
|
||||
tilemap_draw(bitmap, cliprect, state->pf0_tilemap, 0, 0);
|
||||
tilemap_draw(bitmap, cliprect, state->bg_tilemap, 0, 0);
|
||||
draw_sprites1(screen->machine, bitmap, cliprect, 0);
|
||||
tilemap_draw(bitmap, cliprect, state->pf0_tilemap, 1, 0);
|
||||
tilemap_draw(bitmap, cliprect, state->bg_tilemap, 1, 0);
|
||||
tilemap_draw(bitmap, cliprect, state->fix_tilemap, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
@ -839,7 +759,7 @@ static TILE_GET_INFO( get_gondo_tile_info )
|
||||
{
|
||||
dec8_state *state = machine->driver_data<dec8_state>();
|
||||
int offs = tile_index * 2;
|
||||
int tile = state->pf0_data[offs + 1] + (state->pf0_data[offs] << 8);
|
||||
int tile = state->bg_data[offs + 1] + (state->bg_data[offs] << 8);
|
||||
int color = tile>> 12;
|
||||
|
||||
if (color > 7 && state->game_uses_priority)
|
||||
@ -858,10 +778,10 @@ VIDEO_START( gondo )
|
||||
{
|
||||
dec8_state *state = machine->driver_data<dec8_state>();
|
||||
state->fix_tilemap = tilemap_create(machine, get_gondo_fix_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
|
||||
state->pf0_tilemap = tilemap_create(machine, get_gondo_tile_info, tilemap_scan_rows, 16, 16, 32, 32);
|
||||
state->bg_tilemap = tilemap_create(machine, get_gondo_tile_info, tilemap_scan_rows, 16, 16, 32, 32);
|
||||
|
||||
tilemap_set_transparent_pen(state->fix_tilemap, 0);
|
||||
tilemap_set_transmask(state->pf0_tilemap, 0, 0x00ff, 0xff00); /* Bottom 8 pens */
|
||||
tilemap_set_transmask(state->bg_tilemap, 0, 0x00ff, 0xff00); /* Bottom 8 pens */
|
||||
state->game_uses_priority = 0;
|
||||
}
|
||||
|
||||
@ -869,7 +789,7 @@ VIDEO_START( garyoret )
|
||||
{
|
||||
dec8_state *state = machine->driver_data<dec8_state>();
|
||||
state->fix_tilemap = tilemap_create(machine, get_gondo_fix_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
|
||||
state->pf0_tilemap = tilemap_create(machine, get_gondo_tile_info, tilemap_scan_rows, 16, 16, 32, 32);
|
||||
state->bg_tilemap = tilemap_create(machine, get_gondo_tile_info, tilemap_scan_rows, 16, 16, 32, 32);
|
||||
|
||||
tilemap_set_transparent_pen(state->fix_tilemap, 0);
|
||||
state->game_uses_priority = 1;
|
||||
|
@ -124,16 +124,18 @@ static TILE_GET_INFO_DEVICE( get_pf8x8_tile_info )
|
||||
{
|
||||
deco_bac06_device *dev = (deco_bac06_device*)device;
|
||||
int tile=dev->pf_data[tile_index];
|
||||
SET_TILE_INFO_DEVICE(dev->tile_region,tile&0xfff,tile>>12,0);
|
||||
int colourpri=(tile>>12);
|
||||
SET_TILE_INFO_DEVICE(dev->tile_region,tile&0xfff,0,0);
|
||||
tileinfo->category = colourpri;
|
||||
}
|
||||
|
||||
static TILE_GET_INFO_DEVICE( get_pf16x16_tile_info )
|
||||
{
|
||||
deco_bac06_device *dev = (deco_bac06_device*)device;
|
||||
int tile=dev->pf_data[tile_index];
|
||||
int pri=((tile>>12)>7);
|
||||
SET_TILE_INFO_DEVICE(dev->tile_region,tile&0xfff,tile>>12,0);
|
||||
tileinfo->group = pri;
|
||||
int colourpri=(tile>>12);
|
||||
SET_TILE_INFO_DEVICE(dev->tile_region,tile&0xfff,0,0);
|
||||
tileinfo->category = colourpri;
|
||||
}
|
||||
|
||||
|
||||
@ -158,7 +160,8 @@ void deco_bac06_device::device_start()
|
||||
pf_rowscroll = auto_alloc_array_clear(this->machine, UINT16, 0x2000 / 2);
|
||||
pf_colscroll = auto_alloc_array_clear(this->machine, UINT16, 0x2000 / 2);
|
||||
|
||||
create_tilemaps(m_gfxregion8x8, m_gfxregion16x16);
|
||||
create_tilemaps(m_gfxregion8x8, m_gfxregion16x16);
|
||||
m_gfxcolmask = 0x0f;
|
||||
}
|
||||
|
||||
void deco_bac06_device::device_reset()
|
||||
@ -167,7 +170,7 @@ void deco_bac06_device::device_reset()
|
||||
}
|
||||
|
||||
|
||||
static void custom_tilemap_draw(running_machine *machine,
|
||||
void deco_bac06_device::custom_tilemap_draw(running_machine *machine,
|
||||
bitmap_t *bitmap,
|
||||
const rectangle *cliprect,
|
||||
tilemap_t *tilemap_ptr,
|
||||
@ -175,10 +178,16 @@ static void custom_tilemap_draw(running_machine *machine,
|
||||
const UINT16 *colscroll_ptr,
|
||||
const UINT16 *control0,
|
||||
const UINT16 *control1,
|
||||
int flags)
|
||||
int flags,
|
||||
UINT16 penmask,
|
||||
UINT16 pencondition,
|
||||
UINT16 colprimask,
|
||||
UINT16 colpricondition
|
||||
)
|
||||
{
|
||||
const bitmap_t *src_bitmap = tilemap_get_pixmap(tilemap_ptr);
|
||||
int x, y, p;
|
||||
const bitmap_t *flags_bitmap = tilemap_get_flagsmap(tilemap_ptr);
|
||||
int x, y, p, colpri;
|
||||
int column_offset=0, src_x=0, src_y=0;
|
||||
UINT32 scrollx=control1[0];
|
||||
UINT32 scrolly=control1[1];
|
||||
@ -230,26 +239,23 @@ static void custom_tilemap_draw(running_machine *machine,
|
||||
column_offset=colscroll_ptr[((src_x >> 3) >> (control1[2]&0xf))&(0x3f>>(control1[2]&0xf))];
|
||||
|
||||
p = *BITMAP_ADDR16(src_bitmap, (src_y + column_offset)&height_mask, src_x&width_mask);
|
||||
|
||||
colpri = *BITMAP_ADDR8(flags_bitmap, (src_y + column_offset)&height_mask, src_x&width_mask)&0xf;
|
||||
|
||||
src_x++;
|
||||
if ((flags&TILEMAP_DRAW_OPAQUE) || (p&0xf))
|
||||
{
|
||||
if( flags & TILEMAP_DRAW_LAYER0 )
|
||||
{
|
||||
/* Top 8 pens of top 8 palettes only */
|
||||
if ((p&0x88)==0x88)
|
||||
*BITMAP_ADDR16(bitmap, y, x) = p;
|
||||
}
|
||||
else
|
||||
*BITMAP_ADDR16(bitmap, y, x) = p;
|
||||
|
||||
|
||||
if ((p&penmask)==pencondition)
|
||||
if((colpri&colprimask)==colpricondition)
|
||||
*BITMAP_ADDR16(bitmap, y, x) = p+(colpri&m_gfxcolmask)*0x10;
|
||||
}
|
||||
}
|
||||
src_y++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void deco_bac06_device::deco_bac06_pf_draw(running_machine *machine,bitmap_t *bitmap,const rectangle *cliprect,int flags)
|
||||
void deco_bac06_device::deco_bac06_pf_draw(running_machine *machine,bitmap_t *bitmap,const rectangle *cliprect,int flags,UINT16 penmask, UINT16 pencondition,UINT16 colprimask, UINT16 colpricondition)
|
||||
{
|
||||
tilemap_t* tm = 0;
|
||||
|
||||
@ -278,20 +284,28 @@ void deco_bac06_device::deco_bac06_pf_draw(running_machine *machine,bitmap_t *bi
|
||||
};
|
||||
|
||||
if (tm)
|
||||
custom_tilemap_draw(machine,bitmap,cliprect,tm,pf_rowscroll,pf_colscroll,pf_control_0,pf_control_1,flags);
|
||||
custom_tilemap_draw(machine,bitmap,cliprect,tm,pf_rowscroll,pf_colscroll,pf_control_0,pf_control_1,flags, penmask, pencondition, colprimask, colpricondition);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
WRITE16_DEVICE_HANDLER( deco_bac06_pf_control_0_w )
|
||||
{
|
||||
offset &= 3;
|
||||
deco_bac06_device *dev = (deco_bac06_device*)device;
|
||||
COMBINE_DATA(&dev->pf_control_0[offset]);
|
||||
}
|
||||
|
||||
READ16_DEVICE_HANDLER( deco_bac06_pf_control_1_r )
|
||||
{
|
||||
offset &= 3;
|
||||
deco_bac06_device *dev = (deco_bac06_device*)device;
|
||||
return dev->pf_control_1[offset];
|
||||
}
|
||||
|
||||
WRITE16_DEVICE_HANDLER( deco_bac06_pf_control_1_w )
|
||||
{
|
||||
offset &= 7;
|
||||
deco_bac06_device *dev = (deco_bac06_device*)device;
|
||||
COMBINE_DATA(&dev->pf_control_1[offset]);
|
||||
}
|
||||
@ -314,49 +328,22 @@ READ16_DEVICE_HANDLER( deco_bac06_pf_data_r )
|
||||
return dev->pf_data[offset];
|
||||
}
|
||||
|
||||
WRITE8_DEVICE_HANDLER( deco_bac06_pf_control_8bit_w )
|
||||
{
|
||||
deco_bac06_device *dev = (deco_bac06_device*)device;
|
||||
UINT16 myword;
|
||||
|
||||
dev->buffer[offset]=data;
|
||||
|
||||
/* Rearrange little endian bytes from H6280 into big endian words for 68k */
|
||||
offset&=0xffe;
|
||||
myword=dev->buffer[offset] + (dev->buffer[offset+1]<<8);
|
||||
|
||||
if (offset<0x10) deco_bac06_pf_control_0_w(device,offset/2,myword,0xffff);
|
||||
else deco_bac06_pf_control_1_w(device,(offset-0x10)/2,myword,0xffff);
|
||||
}
|
||||
|
||||
WRITE8_DEVICE_HANDLER( deco_bac06_pf_data_8bit_w )
|
||||
{
|
||||
deco_bac06_device *dev = (deco_bac06_device*)device;
|
||||
if (offset&1) { /* MSB has changed */
|
||||
UINT16 lsb=dev->pf_data[offset>>1];
|
||||
UINT16 newword=(lsb&0xff) | (data<<8);
|
||||
dev->pf_data[offset>>1]=newword;
|
||||
}
|
||||
else { /* LSB has changed */
|
||||
UINT16 msb=dev->pf_data[offset>>1];
|
||||
UINT16 newword=(msb&0xff00) | data;
|
||||
dev->pf_data[offset>>1]=newword;
|
||||
}
|
||||
tilemap_mark_tile_dirty(dev->pf8x8_tilemap[0],offset>>1);
|
||||
tilemap_mark_tile_dirty(dev->pf8x8_tilemap[1],offset>>1);
|
||||
tilemap_mark_tile_dirty(dev->pf8x8_tilemap[2],offset>>1);
|
||||
tilemap_mark_tile_dirty(dev->pf16x16_tilemap[0],offset>>1);
|
||||
tilemap_mark_tile_dirty(dev->pf16x16_tilemap[1],offset>>1);
|
||||
tilemap_mark_tile_dirty(dev->pf16x16_tilemap[2],offset>>1);
|
||||
if (offset&1)
|
||||
deco_bac06_pf_data_w(device,offset/2,data,0x00ff);
|
||||
else
|
||||
deco_bac06_pf_data_w(device,offset/2,data<<8,0xff00);
|
||||
}
|
||||
|
||||
READ8_DEVICE_HANDLER( deco_bac06_pf_data_8bit_r )
|
||||
{
|
||||
deco_bac06_device *dev = (deco_bac06_device*)device;
|
||||
if (offset&1) /* MSB */
|
||||
return dev->pf_data[offset>>1]>>8;
|
||||
|
||||
return dev->pf_data[offset>>1]&0xff;
|
||||
return deco_bac06_pf_data_r(device,offset/2,0x00ff);
|
||||
else
|
||||
return deco_bac06_pf_data_r(device,offset/2,0xff00)>>8;
|
||||
}
|
||||
|
||||
WRITE16_DEVICE_HANDLER( deco_bac06_pf_rowscroll_w )
|
||||
@ -383,3 +370,85 @@ READ16_DEVICE_HANDLER( deco_bac06_pf_colscroll_r )
|
||||
return dev->pf_colscroll[offset];
|
||||
}
|
||||
|
||||
/* used by dec8.c */
|
||||
WRITE8_DEVICE_HANDLER( deco_bac06_pf_control0_8bit_w )
|
||||
{
|
||||
if (offset&1)
|
||||
deco_bac06_pf_control_0_w(device,offset/2,data,0x00ff); // oscar (mirrors?)
|
||||
else
|
||||
deco_bac06_pf_control_0_w(device,offset/2,data,0x00ff);
|
||||
}
|
||||
|
||||
/* used by dec8.c */
|
||||
READ8_DEVICE_HANDLER( deco_bac06_pf_control1_8bit_r )
|
||||
{
|
||||
if (offset&1)
|
||||
return deco_bac06_pf_control_1_r(device,offset/2,0x00ff);
|
||||
else
|
||||
return deco_bac06_pf_control_1_r(device,offset/2,0xff00)>>8;
|
||||
}
|
||||
|
||||
/* used by dec8.c */
|
||||
WRITE8_DEVICE_HANDLER( deco_bac06_pf_control1_8bit_w )
|
||||
{
|
||||
if (offset&1)
|
||||
deco_bac06_pf_control_1_w(device,offset/2,data,0x00ff);
|
||||
else
|
||||
deco_bac06_pf_control_1_w(device,offset/2,data<<8,0xff00);
|
||||
}
|
||||
|
||||
READ8_DEVICE_HANDLER( deco_bac06_pf_rowscroll_8bit_r )
|
||||
{
|
||||
if (offset&1)
|
||||
return deco_bac06_pf_rowscroll_r(device,offset/2,0x00ff);
|
||||
else
|
||||
return deco_bac06_pf_rowscroll_r(device,offset/2,0xff00)>>8;
|
||||
}
|
||||
|
||||
|
||||
WRITE8_DEVICE_HANDLER( deco_bac06_pf_rowscroll_8bit_w )
|
||||
{
|
||||
if (offset&1)
|
||||
deco_bac06_pf_rowscroll_w(device,offset/2,data,0x00ff);
|
||||
else
|
||||
deco_bac06_pf_rowscroll_w(device,offset/2,data<<8,0xff00);
|
||||
}
|
||||
|
||||
|
||||
/* used by hippodrm */
|
||||
WRITE8_DEVICE_HANDLER( deco_bac06_pf_control0_8bit_packed_w )
|
||||
{
|
||||
if (offset&1)
|
||||
deco_bac06_pf_control_0_w(device,offset/2,data<<8,0xff00);
|
||||
else
|
||||
deco_bac06_pf_control_0_w(device,offset/2,data,0x00ff);
|
||||
}
|
||||
|
||||
/* used by hippodrm */
|
||||
WRITE8_DEVICE_HANDLER( deco_bac06_pf_control1_8bit_swap_w )
|
||||
{
|
||||
if (offset&1)
|
||||
deco_bac06_pf_control_1_w(device,offset/2,data<<8,0xff00);
|
||||
else
|
||||
deco_bac06_pf_control_1_w(device,offset/2,data,0x00ff);
|
||||
|
||||
}
|
||||
|
||||
/* used by hippodrm */
|
||||
READ8_DEVICE_HANDLER( deco_bac06_pf_data_8bit_swap_r )
|
||||
{
|
||||
if (offset&1)
|
||||
return deco_bac06_pf_data_r(device,offset/2,0xff00)>>8;
|
||||
else
|
||||
return deco_bac06_pf_data_r(device,offset/2,0x00ff);
|
||||
}
|
||||
|
||||
/* used by hippodrm */
|
||||
WRITE8_DEVICE_HANDLER( deco_bac06_pf_data_8bit_swap_w )
|
||||
{
|
||||
if (offset&1)
|
||||
deco_bac06_pf_data_w(device,offset/2,data<<8,0xff00);
|
||||
else
|
||||
deco_bac06_pf_data_w(device,offset/2,data,0x00ff);
|
||||
|
||||
}
|
||||
|
@ -30,12 +30,14 @@ public:
|
||||
tilemap_t* pf16x16_tilemap[3];
|
||||
int tile_region;
|
||||
void create_tilemaps(int region8x8,int region16x16);
|
||||
UINT16 pf_control_0[4];
|
||||
UINT16 pf_control_1[4];
|
||||
UINT16 pf_control_0[8];
|
||||
UINT16 pf_control_1[8];
|
||||
|
||||
void deco_bac06_pf_draw(running_machine *machine,bitmap_t *bitmap,const rectangle *cliprect,int flags);
|
||||
void deco_bac06_pf_draw(running_machine *machine,bitmap_t *bitmap,const rectangle *cliprect,int flags,UINT16 penmask, UINT16 pencondition,UINT16 colprimask, UINT16 colpricondition);
|
||||
UINT8 get_flip_state(void) { return pf_control_0[0]&0x80; };
|
||||
int buffer[0x20];
|
||||
void set_colmask(int data) { m_gfxcolmask = data; }
|
||||
|
||||
UINT8 m_gfxcolmask;
|
||||
|
||||
protected:
|
||||
virtual void device_start();
|
||||
@ -45,13 +47,26 @@ protected:
|
||||
UINT8 m_gfxregion8x8;
|
||||
UINT8 m_gfxregion16x16;
|
||||
|
||||
|
||||
void custom_tilemap_draw(running_machine *machine,
|
||||
bitmap_t *bitmap,
|
||||
const rectangle *cliprect,
|
||||
tilemap_t *tilemap_ptr,
|
||||
const UINT16 *rowscroll_ptr,
|
||||
const UINT16 *colscroll_ptr,
|
||||
const UINT16 *control0,
|
||||
const UINT16 *control1,
|
||||
int flags,
|
||||
UINT16 penmask, UINT16 pencondition,UINT16 colprimask, UINT16 colpricondition);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
};
|
||||
|
||||
/* 16-bit accessors */
|
||||
|
||||
WRITE16_DEVICE_HANDLER( deco_bac06_pf_control_0_w );
|
||||
READ16_DEVICE_HANDLER( deco_bac06_pf_control_1_r );
|
||||
WRITE16_DEVICE_HANDLER( deco_bac06_pf_control_1_w );
|
||||
|
||||
WRITE16_DEVICE_HANDLER( deco_bac06_pf_data_w );
|
||||
@ -61,10 +76,25 @@ READ16_DEVICE_HANDLER( deco_bac06_pf_rowscroll_r );
|
||||
WRITE16_DEVICE_HANDLER( deco_bac06_pf_colscroll_w );
|
||||
READ16_DEVICE_HANDLER( deco_bac06_pf_colscroll_r );
|
||||
|
||||
/* 8-bit accessors */
|
||||
|
||||
/* for dec8.c */
|
||||
READ8_DEVICE_HANDLER( deco_bac06_pf_data_8bit_r );
|
||||
WRITE8_DEVICE_HANDLER( deco_bac06_pf_control_8bit_w );
|
||||
WRITE8_DEVICE_HANDLER( deco_bac06_pf_data_8bit_w );
|
||||
|
||||
WRITE8_DEVICE_HANDLER( deco_bac06_pf_control0_8bit_w );
|
||||
READ8_DEVICE_HANDLER( deco_bac06_pf_control1_8bit_r );
|
||||
WRITE8_DEVICE_HANDLER( deco_bac06_pf_control1_8bit_w );
|
||||
|
||||
READ8_DEVICE_HANDLER( deco_bac06_pf_rowscroll_8bit_r );
|
||||
WRITE8_DEVICE_HANDLER( deco_bac06_pf_rowscroll_8bit_w );
|
||||
|
||||
/* for hippodrm (dec0.c) */
|
||||
WRITE8_DEVICE_HANDLER( deco_bac06_pf_control0_8bit_packed_w );
|
||||
WRITE8_DEVICE_HANDLER( deco_bac06_pf_control1_8bit_swap_w );
|
||||
READ8_DEVICE_HANDLER( deco_bac06_pf_data_8bit_swap_r );
|
||||
WRITE8_DEVICE_HANDLER( deco_bac06_pf_data_8bit_swap_w );
|
||||
|
||||
const device_type deco_bac06_ = deco_bac06_device_config::static_alloc_device_config;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user