mirror of
https://github.com/holub/mame
synced 2025-04-20 15:32:45 +03:00
Jaleco 'Bomb's Away' Improvements [aDG4W+qp0]
This commit is contained in:
parent
0e24966dd1
commit
4ee7a57a71
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -2985,6 +2985,7 @@ src/mame/video/jagobj.c svneol=native#text/plain
|
||||
src/mame/video/jaguar.c svneol=native#text/plain
|
||||
src/mame/video/jailbrek.c svneol=native#text/plain
|
||||
src/mame/video/jalblend.c svneol=native#text/plain
|
||||
src/mame/video/jalblend.h svneol=native#text/plain
|
||||
src/mame/video/jedi.c svneol=native#text/plain
|
||||
src/mame/video/jpmimpct.c svneol=native#text/plain
|
||||
src/mame/video/kan_panb.c svneol=native#text/plain
|
||||
|
@ -17,7 +17,6 @@ Supported games :
|
||||
Argus (C) 1986 NMK / Jaleco
|
||||
Valtric (C) 1986 NMK / Jaleco
|
||||
Butasan (C) 1987 NMK / Jaleco
|
||||
Bombs Away (C) 1988 Jaleco
|
||||
|
||||
|
||||
System specs :
|
||||
@ -111,54 +110,46 @@ extern UINT8 *butasan_bg1ram;
|
||||
VIDEO_START( argus );
|
||||
VIDEO_START( valtric );
|
||||
VIDEO_START( butasan );
|
||||
VIDEO_START( bombsa );
|
||||
VIDEO_RESET( argus );
|
||||
VIDEO_RESET( valtric );
|
||||
VIDEO_RESET( butasan );
|
||||
VIDEO_RESET( bombsa );
|
||||
VIDEO_UPDATE( argus );
|
||||
VIDEO_UPDATE( valtric );
|
||||
VIDEO_UPDATE( butasan );
|
||||
VIDEO_UPDATE( bombsa );
|
||||
|
||||
static UINT8 argus_bank_latch = 0x00;
|
||||
static UINT8 butasan_page_latch = 0x00;
|
||||
|
||||
READ8_HANDLER( argus_txram_r );
|
||||
READ8_HANDLER( butasan_txram_r );
|
||||
READ8_HANDLER( bombsa_txram_r );
|
||||
READ8_HANDLER( argus_bg1ram_r );
|
||||
READ8_HANDLER( butasan_bg0ram_r );
|
||||
READ8_HANDLER( butasan_bg1ram_r );
|
||||
READ8_HANDLER( argus_paletteram_r );
|
||||
READ8_HANDLER( bombsa_paletteram_r );
|
||||
READ8_HANDLER( butasan_txbackram_r );
|
||||
READ8_HANDLER( butasan_bg0backram_r );
|
||||
|
||||
WRITE8_HANDLER( argus_txram_w );
|
||||
WRITE8_HANDLER( butasan_txram_w );
|
||||
WRITE8_HANDLER( bombsa_txram_w );
|
||||
WRITE8_HANDLER( argus_bg1ram_w );
|
||||
WRITE8_HANDLER( butasan_bg0ram_w );
|
||||
WRITE8_HANDLER( butasan_bg1ram_w );
|
||||
WRITE8_HANDLER( argus_bg0_scrollx_w );
|
||||
WRITE8_HANDLER( argus_bg0_scrolly_w );
|
||||
WRITE8_HANDLER( butasan_bg0_scrollx_w );
|
||||
WRITE8_HANDLER( argus_bg1_scrollx_w );
|
||||
WRITE8_HANDLER( argus_bg1_scrolly_w );
|
||||
WRITE8_HANDLER( argus_bg_status_w );
|
||||
WRITE8_HANDLER( valtric_bg_status_w );
|
||||
WRITE8_HANDLER( butasan_bg0_status_w );
|
||||
WRITE8_HANDLER( argus_flipscreen_w );
|
||||
WRITE8_HANDLER( argus_paletteram_w );
|
||||
|
||||
WRITE8_HANDLER( valtric_bg_status_w );
|
||||
WRITE8_HANDLER( valtric_paletteram_w );
|
||||
WRITE8_HANDLER( valtric_mosaic_w );
|
||||
WRITE8_HANDLER( valtric_unknown_w );
|
||||
|
||||
READ8_HANDLER( butasan_pagedram_r );
|
||||
READ8_HANDLER( butasan_bg1ram_r );
|
||||
READ8_HANDLER( butasan_txbackram_r );
|
||||
READ8_HANDLER( butasan_bg0backram_r );
|
||||
WRITE8_HANDLER( butasan_pageselect_w );
|
||||
WRITE8_HANDLER( butasan_pagedram_w );
|
||||
WRITE8_HANDLER( butasan_bg1ram_w );
|
||||
WRITE8_HANDLER( butasan_bg0_status_w );
|
||||
WRITE8_HANDLER( butasan_paletteram_w );
|
||||
WRITE8_HANDLER( bombsa_paletteram_w );
|
||||
WRITE8_HANDLER( butasan_txbackram_w );
|
||||
WRITE8_HANDLER( butasan_bg0backram_w );
|
||||
WRITE8_HANDLER( butasan_bg1_status_w );
|
||||
WRITE8_HANDLER( bombsa_pageselect_w );
|
||||
WRITE8_HANDLER( valtric_mosaic_w);
|
||||
WRITE8_HANDLER( butasan_unknown_w );
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
@ -169,9 +160,9 @@ WRITE8_HANDLER( valtric_mosaic_w);
|
||||
static INTERRUPT_GEN( argus_interrupt )
|
||||
{
|
||||
if (cpu_getiloops() == 0)
|
||||
cpunum_set_input_line_and_vector(machine, 0, 0, HOLD_LINE, 0xd7); /* RST 10h */
|
||||
cpunum_set_input_line_and_vector(machine, 0, 0, HOLD_LINE, 0xd7); /* RST 10h */
|
||||
else
|
||||
cpunum_set_input_line_and_vector(machine, 0, 0, HOLD_LINE, 0xcf); /* RST 08h */
|
||||
cpunum_set_input_line_and_vector(machine, 0, 0, HOLD_LINE, 0xcf); /* RST 08h */
|
||||
}
|
||||
|
||||
/* Handler called by the YM2203 emulator when the internal timers cause an IRQ */
|
||||
@ -197,83 +188,15 @@ static const ym2203_interface ym2203_config =
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#if 0
|
||||
static READ8_HANDLER( argus_bankselect_r )
|
||||
{
|
||||
return argus_bank_latch;
|
||||
}
|
||||
#endif
|
||||
|
||||
static WRITE8_HANDLER( argus_bankselect_w )
|
||||
{
|
||||
UINT8 *RAM = memory_region(machine, "main");
|
||||
int bankaddress;
|
||||
|
||||
argus_bank_latch = data;
|
||||
bankaddress = 0x10000 + ((data & 7) * 0x4000);
|
||||
memory_set_bankptr(1, &RAM[bankaddress]); /* Select 8 banks of 16k */
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( butasan_pageselect_w )
|
||||
{
|
||||
butasan_page_latch = data;
|
||||
}
|
||||
|
||||
static READ8_HANDLER( butasan_pagedram_r )
|
||||
{
|
||||
if (!(butasan_page_latch & 0x01))
|
||||
{
|
||||
if (offset < 0x0800) /* BG0 RAM */
|
||||
{
|
||||
return butasan_bg0ram_r( machine, offset );
|
||||
}
|
||||
else if (offset < 0x1000) /* Back BG0 RAM */
|
||||
{
|
||||
return butasan_bg0backram_r( machine, offset - 0x0800 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (offset < 0x0800) /* Text RAM */
|
||||
{
|
||||
return butasan_txram_r( machine, offset );
|
||||
}
|
||||
else if (offset < 0x1000) /* Back text RAM */
|
||||
{
|
||||
return butasan_txbackram_r( machine, offset - 0x0800 );
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( butasan_pagedram_w )
|
||||
{
|
||||
if (!(butasan_page_latch & 0x01))
|
||||
{
|
||||
if (offset < 0x0800) /* BG0 RAM */
|
||||
{
|
||||
butasan_bg0ram_w( machine, offset, data );
|
||||
}
|
||||
else if (offset < 0x1000) /* Back BG0 RAM */
|
||||
{
|
||||
butasan_bg0backram_w( machine, offset - 0x0800, data );
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if (offset < 0x0800) /* Text RAM */
|
||||
{
|
||||
butasan_txram_w( machine, offset, data );
|
||||
}
|
||||
else if (offset < 0x1000) /* Back text RAM */
|
||||
{
|
||||
butasan_txbackram_w( machine, offset - 0x0800, data );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
@ -316,6 +239,7 @@ static ADDRESS_MAP_START( valtric_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0xc200, 0xc200) AM_WRITE(soundlatch_w)
|
||||
AM_RANGE(0xc201, 0xc201) AM_WRITE(argus_flipscreen_w)
|
||||
AM_RANGE(0xc202, 0xc202) AM_WRITE(argus_bankselect_w)
|
||||
AM_RANGE(0xc300, 0xc300) AM_WRITE(valtric_unknown_w)
|
||||
AM_RANGE(0xc308, 0xc309) AM_WRITE(argus_bg1_scrollx_w) AM_BASE(&argus_bg1_scrollx)
|
||||
AM_RANGE(0xc30a, 0xc30b) AM_WRITE(argus_bg1_scrolly_w) AM_BASE(&argus_bg1_scrolly)
|
||||
AM_RANGE(0xc30c, 0xc30c) AM_WRITE(valtric_bg_status_w)
|
||||
@ -336,11 +260,12 @@ static ADDRESS_MAP_START( butasan_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0xc002, 0xc002) AM_READ_PORT("P2")
|
||||
AM_RANGE(0xc003, 0xc003) AM_READ_PORT("DSW1")
|
||||
AM_RANGE(0xc004, 0xc004) AM_READ_PORT("DSW2")
|
||||
AM_RANGE(0xc100, 0xc100) AM_WRITE(butasan_unknown_w)
|
||||
AM_RANGE(0xc200, 0xc200) AM_WRITE(soundlatch_w)
|
||||
AM_RANGE(0xc201, 0xc201) AM_WRITE(argus_flipscreen_w)
|
||||
AM_RANGE(0xc202, 0xc202) AM_WRITE(argus_bankselect_w)
|
||||
AM_RANGE(0xc203, 0xc203) AM_WRITE(butasan_pageselect_w)
|
||||
AM_RANGE(0xc300, 0xc301) AM_WRITE(butasan_bg0_scrollx_w) AM_BASE(&argus_bg0_scrollx)
|
||||
AM_RANGE(0xc300, 0xc301) AM_WRITE(argus_bg0_scrollx_w) AM_BASE(&argus_bg0_scrollx)
|
||||
AM_RANGE(0xc302, 0xc303) AM_WRITE(argus_bg0_scrolly_w) AM_BASE(&argus_bg0_scrolly)
|
||||
AM_RANGE(0xc304, 0xc304) AM_WRITE(butasan_bg0_status_w)
|
||||
AM_RANGE(0xc308, 0xc309) AM_WRITE(argus_bg1_scrollx_w) AM_BASE(&argus_bg1_scrollx)
|
||||
@ -354,35 +279,6 @@ static ADDRESS_MAP_START( butasan_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0xf680, 0xffff) AM_RAM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
WRITE8_HANDLER( bombsa_txram_w );
|
||||
READ8_HANDLER( bombsa_txram_r );
|
||||
|
||||
static ADDRESS_MAP_START( bombsa_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x7fff) AM_ROM
|
||||
AM_RANGE(0x8000, 0xbfff) AM_RAMBANK(1)
|
||||
AM_RANGE(0xc000, 0xcfff) AM_RAM
|
||||
|
||||
/* ports look like the other games */
|
||||
AM_RANGE(0xd000, 0xd000) AM_WRITE(soundlatch_w) // confirmed
|
||||
// AM_RANGE(0xd001, 0xd001) AM_WRITE(argus_flipscreen_w)
|
||||
AM_RANGE(0xd002, 0xd002) AM_WRITE(argus_bankselect_w)
|
||||
AM_RANGE(0xd003, 0xd003) AM_WRITE(bombsa_pageselect_w) // 0,1,0,1,0,1 etc.
|
||||
|
||||
AM_RANGE(0xd000, 0xd1ff) AM_RAM
|
||||
AM_RANGE(0xd200, 0xd7ff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
|
||||
AM_RANGE(0xd800, 0xdfff) AM_RAM
|
||||
|
||||
/* Input ports */
|
||||
AM_RANGE(0xe000, 0xe000) AM_READ_PORT("SYSTEM")
|
||||
AM_RANGE(0xe001, 0xe001) AM_READ_PORT("P1")
|
||||
AM_RANGE(0xe002, 0xe002) AM_READ_PORT("P2")
|
||||
AM_RANGE(0xe003, 0xe003) AM_READ_PORT("DSW1")
|
||||
AM_RANGE(0xe004, 0xe004) AM_READ_PORT("DSW2")
|
||||
AM_RANGE(0xe000, 0xe7ff) AM_WRITE(SMH_RAM) // ??
|
||||
AM_RANGE(0xe800, 0xefff) AM_READWRITE(bombsa_txram_r, bombsa_txram_w) AM_BASE(&argus_txram) // banked? it gets corrupted at game start, maybe its banked and one layer can be 16x16 or 8x8?
|
||||
AM_RANGE(0xf000, 0xffff) AM_READWRITE(bombsa_paletteram_r, bombsa_paletteram_w) AM_BASE(&argus_paletteram) // banked?
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( sound_map_a, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x7fff) AM_ROM
|
||||
AM_RANGE(0x8000, 0x87ff) AM_RAM
|
||||
@ -395,18 +291,13 @@ static ADDRESS_MAP_START( sound_map_b, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_r)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( sound_map_c, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0xbfff) AM_ROM
|
||||
AM_RANGE(0xc000, 0xc7ff) AM_RAM
|
||||
AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_r)
|
||||
AM_RANGE(0xf000, 0xf000) AM_WRITEONLY // Is this a confirm of some sort?
|
||||
ADDRESS_MAP_END
|
||||
|
||||
#if 0
|
||||
static ADDRESS_MAP_START( sound_portmap_1, ADDRESS_SPACE_IO, 8 )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0xff)
|
||||
AM_RANGE(0x00, 0x00) AM_READWRITE(ym2203_status_port_0_r, ym2203_control_port_0_w)
|
||||
AM_RANGE(0x01, 0x01) AM_READWRITE(ym2203_read_port_0_r, ym2203_write_port_0_w)
|
||||
ADDRESS_MAP_END
|
||||
#endif
|
||||
|
||||
static ADDRESS_MAP_START( sound_portmap_2, ADDRESS_SPACE_IO, 8 )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0xff)
|
||||
@ -461,13 +352,13 @@ static INPUT_PORTS_START( argus )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x06, 0x06, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:6,7")
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( Easy ) )
|
||||
PORT_DIPSETTING( 0x06, DEF_STR( Medium ) )
|
||||
PORT_DIPSETTING( 0x06, DEF_STR( Normal ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Hard ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
|
||||
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW1:5")
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x10, 0x00, DEF_STR( Cabinet) ) PORT_DIPLOCATION("SW1:4")
|
||||
PORT_DIPNAME( 0x10, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:4")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Cocktail ) )
|
||||
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:3")
|
||||
@ -491,7 +382,7 @@ static INPUT_PORTS_START( argus )
|
||||
PORT_DIPSETTING( 0x18, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0x14, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( 1C_4C ) )
|
||||
PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Coin_A) ) PORT_DIPLOCATION("SW2:1,2,3")
|
||||
PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW2:1,2,3")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( 3C_1C ) )
|
||||
@ -505,8 +396,20 @@ INPUT_PORTS_END
|
||||
static INPUT_PORTS_START( valtric )
|
||||
PORT_INCLUDE( argus )
|
||||
|
||||
PORT_MODIFY("DSW1")
|
||||
PORT_DIPNAME( 0x06, 0x06, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:6,7")
|
||||
PORT_DIPSETTING( 0x06, DEF_STR( Normal ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( Hard ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Harder ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
|
||||
PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2")
|
||||
PORT_DIPSETTING( 0x00, "2" )
|
||||
PORT_DIPSETTING( 0xc0, "3" )
|
||||
PORT_DIPSETTING( 0x80, "4" )
|
||||
PORT_DIPSETTING( 0x40, "5" )
|
||||
|
||||
PORT_MODIFY("DSW2")
|
||||
PORT_DIPNAME( 0x01, 0x01, "Invulnerability (Cheat") PORT_DIPLOCATION("SW2:8")
|
||||
PORT_DIPNAME( 0x01, 0x01, "Invulnerability (Cheat)" ) PORT_DIPLOCATION("SW2:8")
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x1c, 0x1c, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW2:4,5,6")
|
||||
@ -533,13 +436,13 @@ static INPUT_PORTS_START( butasan )
|
||||
PORT_INCLUDE( valtric )
|
||||
|
||||
PORT_MODIFY("SYSTEM")
|
||||
PORT_SERVICE( 0x20, IP_ACTIVE_LOW )
|
||||
PORT_SERVICE( 0x20, IP_ACTIVE_LOW )
|
||||
|
||||
PORT_MODIFY("DSW1")
|
||||
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW1:8")
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x02, 0x02, "Invulnerability (Cheat)") PORT_DIPLOCATION("SW1:7")
|
||||
PORT_DIPNAME( 0x02, 0x02, "Invulnerability (Cheat)" ) PORT_DIPLOCATION("SW1:7")
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:5,6")
|
||||
@ -561,35 +464,6 @@ static INPUT_PORTS_START( butasan )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( bombsa )
|
||||
PORT_INCLUDE( argus )
|
||||
|
||||
PORT_MODIFY("SYSTEM")
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 )
|
||||
|
||||
PORT_MODIFY("DSW1")
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "SW1:8" ) // Coin_B
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "SW1:7" )
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "SW1:6" ) // Coin_B
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW1:5" ) // Coin_B
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "SW1:4" )
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW1:3" )
|
||||
PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x40, "2 Coins 1 Credit/4 Coins 3 Credits" )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) )
|
||||
|
||||
PORT_MODIFY("DSW2")
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "SW2:8" )
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "SW2:7" )
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "SW2:6" )
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW2:5" )
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "SW2:4" )
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW2:3" )
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "SW2:2" )
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW2:1" )
|
||||
INPUT_PORTS_END
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
@ -600,7 +474,7 @@ INPUT_PORTS_END
|
||||
static const gfx_layout charlayout =
|
||||
{
|
||||
8,8, /* 8x8 characters */
|
||||
1024, /* 1024 characters */
|
||||
1024, /* 1024 characters */
|
||||
4, /* 4 bits per pixel */
|
||||
{ 0, 1, 2, 3 },
|
||||
{ 0, 4, 8, 12, 16, 20, 24, 28 },
|
||||
@ -611,7 +485,7 @@ static const gfx_layout charlayout =
|
||||
static const gfx_layout tilelayout_256 =
|
||||
{
|
||||
16,16, /* 16x16 characters */
|
||||
256, /* 256 characters */
|
||||
256, /* 256 characters */
|
||||
4, /* 4 bits per pixel */
|
||||
{ 0, 1, 2, 3 },
|
||||
{ 0, 4, 8, 12, 16, 20, 24, 28,
|
||||
@ -624,7 +498,7 @@ static const gfx_layout tilelayout_256 =
|
||||
static const gfx_layout tilelayout_512 =
|
||||
{
|
||||
16,16, /* 16x16 characters */
|
||||
512, /* 512 characters */
|
||||
512, /* 512 characters */
|
||||
4, /* 4 bits per pixel */
|
||||
{ 0, 1, 2, 3 },
|
||||
{ 0, 4, 8, 12, 16, 20, 24, 28,
|
||||
@ -637,7 +511,7 @@ static const gfx_layout tilelayout_512 =
|
||||
static const gfx_layout tilelayout_1024 =
|
||||
{
|
||||
16,16, /* 16x16 characters */
|
||||
1024, /* 1024 characters */
|
||||
1024, /* 1024 characters */
|
||||
4, /* 4 bits per pixel */
|
||||
{ 0, 1, 2, 3 },
|
||||
{ 0, 4, 8, 12, 16, 20, 24, 28,
|
||||
@ -650,7 +524,7 @@ static const gfx_layout tilelayout_1024 =
|
||||
static const gfx_layout tilelayout_2048 =
|
||||
{
|
||||
16,16, /* 16x16 characters */
|
||||
2048, /* 2048 characters */
|
||||
2048, /* 2048 characters */
|
||||
4, /* 4 bits per pixel */
|
||||
{ 0, 1, 2, 3 },
|
||||
{ 0, 4, 8, 12, 16, 20, 24, 28,
|
||||
@ -663,7 +537,7 @@ static const gfx_layout tilelayout_2048 =
|
||||
static const gfx_layout tilelayout_4096 =
|
||||
{
|
||||
16,16, /* 16x16 characters */
|
||||
4096, /* 4096 characters */
|
||||
4096, /* 4096 characters */
|
||||
4, /* 4 bits per pixel */
|
||||
{ 0, 1, 2, 3 },
|
||||
{ 0, 4, 8, 12, 16, 20, 24, 28,
|
||||
@ -681,7 +555,7 @@ static GFXDECODE_START( argus )
|
||||
GFXDECODE_END
|
||||
|
||||
static GFXDECODE_START( valtric )
|
||||
GFXDECODE_ENTRY( "gfx1", 0, tilelayout_1024, 0*16, 16 )
|
||||
GFXDECODE_ENTRY( "gfx1", 0, tilelayout_1024, 0*16, 16 )
|
||||
GFXDECODE_ENTRY( "gfx2", 0, tilelayout_2048, 16*16, 16 )
|
||||
GFXDECODE_ENTRY( "gfx3", 0, charlayout, 32*16, 16 )
|
||||
GFXDECODE_END
|
||||
@ -693,11 +567,6 @@ static GFXDECODE_START( butasan )
|
||||
GFXDECODE_ENTRY( "gfx4", 0, charlayout, 32*16, 16 )
|
||||
GFXDECODE_END
|
||||
|
||||
static GFXDECODE_START( bombsa )
|
||||
GFXDECODE_ENTRY( "gfx1", 0, tilelayout_1024, 32*16, 16 )
|
||||
GFXDECODE_ENTRY( "gfx2", 0, tilelayout_1024, 0*16, 16 )
|
||||
GFXDECODE_ENTRY( "gfx3", 0, charlayout, 16*16, 16 )
|
||||
GFXDECODE_END
|
||||
|
||||
static MACHINE_DRIVER_START( argus )
|
||||
|
||||
@ -708,7 +577,11 @@ static MACHINE_DRIVER_START( argus )
|
||||
|
||||
MDRV_CPU_ADD("audio", Z80, 5000000)
|
||||
MDRV_CPU_PROGRAM_MAP(sound_map_a,0)
|
||||
#if 0
|
||||
MDRV_CPU_IO_MAP(sound_portmap_1,0)
|
||||
#else
|
||||
MDRV_CPU_IO_MAP(sound_portmap_2,0)
|
||||
#endif
|
||||
|
||||
MDRV_INTERLEAVE(10)
|
||||
|
||||
@ -719,6 +592,7 @@ static MACHINE_DRIVER_START( argus )
|
||||
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32)
|
||||
MDRV_SCREEN_SIZE(32*16, 32*16)
|
||||
MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
|
||||
|
||||
MDRV_GFXDECODE(argus)
|
||||
MDRV_PALETTE_LENGTH(896)
|
||||
|
||||
@ -729,12 +603,27 @@ static MACHINE_DRIVER_START( argus )
|
||||
/* sound hardware */
|
||||
MDRV_SPEAKER_STANDARD_MONO("mono")
|
||||
|
||||
#if 0
|
||||
MDRV_SOUND_ADD("ym", YM2203, 6000000 / 4)
|
||||
MDRV_SOUND_CONFIG(ym2203_config)
|
||||
MDRV_SOUND_ROUTE(0, "mono", 0.15)
|
||||
MDRV_SOUND_ROUTE(1, "mono", 0.15)
|
||||
MDRV_SOUND_ROUTE(2, "mono", 0.15)
|
||||
MDRV_SOUND_ROUTE(3, "mono", 0.50)
|
||||
#else
|
||||
MDRV_SOUND_ADD("ym1", YM2203, 6000000 / 4)
|
||||
MDRV_SOUND_CONFIG(ym2203_config)
|
||||
MDRV_SOUND_ROUTE(0, "mono", 0.15)
|
||||
MDRV_SOUND_ROUTE(1, "mono", 0.15)
|
||||
MDRV_SOUND_ROUTE(2, "mono", 0.15)
|
||||
MDRV_SOUND_ROUTE(3, "mono", 0.50)
|
||||
|
||||
MDRV_SOUND_ADD("ym2", YM2203, 6000000 / 4)
|
||||
MDRV_SOUND_ROUTE(0, "mono", 0.15)
|
||||
MDRV_SOUND_ROUTE(1, "mono", 0.15)
|
||||
MDRV_SOUND_ROUTE(2, "mono", 0.15)
|
||||
MDRV_SOUND_ROUTE(3, "mono", 0.50)
|
||||
#endif
|
||||
MACHINE_DRIVER_END
|
||||
|
||||
static MACHINE_DRIVER_START( valtric )
|
||||
@ -757,6 +646,7 @@ static MACHINE_DRIVER_START( valtric )
|
||||
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32)
|
||||
MDRV_SCREEN_SIZE(32*16, 32*16)
|
||||
MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
|
||||
|
||||
MDRV_GFXDECODE(valtric)
|
||||
MDRV_PALETTE_LENGTH(768)
|
||||
|
||||
@ -801,6 +691,7 @@ static MACHINE_DRIVER_START( butasan )
|
||||
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32)
|
||||
MDRV_SCREEN_SIZE(32*16, 32*16)
|
||||
MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
|
||||
|
||||
MDRV_GFXDECODE(butasan)
|
||||
MDRV_PALETTE_LENGTH(768)
|
||||
|
||||
@ -825,50 +716,6 @@ static MACHINE_DRIVER_START( butasan )
|
||||
MDRV_SOUND_ROUTE(3, "mono", 1.0)
|
||||
MACHINE_DRIVER_END
|
||||
|
||||
static MACHINE_DRIVER_START( bombsa )
|
||||
|
||||
/* basic machine hardware */
|
||||
MDRV_CPU_ADD("main", Z80, 5000000) /* 5 MHz */
|
||||
MDRV_CPU_PROGRAM_MAP(bombsa_map,0)
|
||||
MDRV_CPU_VBLANK_INT_HACK(argus_interrupt,2)
|
||||
|
||||
MDRV_CPU_ADD("audio", Z80, 12000000 / 2) /* maybe CPU speeds are reversed? Probably not (ajg) */
|
||||
MDRV_CPU_PROGRAM_MAP(sound_map_c,0)
|
||||
MDRV_CPU_IO_MAP(sound_portmap_2,0)
|
||||
|
||||
MDRV_INTERLEAVE(10)
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("main", RASTER)
|
||||
MDRV_SCREEN_REFRESH_RATE(54) /* Guru says : VSync - 54Hz . HSync - 15.25kHz */
|
||||
MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
|
||||
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
MDRV_SCREEN_SIZE(32*16, 32*16)
|
||||
MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
|
||||
MDRV_GFXDECODE(bombsa)
|
||||
MDRV_PALETTE_LENGTH(0x1000/2)
|
||||
|
||||
MDRV_VIDEO_START(bombsa)
|
||||
MDRV_VIDEO_RESET(bombsa)
|
||||
MDRV_VIDEO_UPDATE(bombsa)
|
||||
|
||||
/* sound hardware */
|
||||
MDRV_SPEAKER_STANDARD_MONO("mono")
|
||||
|
||||
MDRV_SOUND_ADD("ym1", YM2203, 12000000 / 8)
|
||||
MDRV_SOUND_CONFIG(ym2203_config)
|
||||
MDRV_SOUND_ROUTE(0, "mono", 0.30)
|
||||
MDRV_SOUND_ROUTE(1, "mono", 0.30)
|
||||
MDRV_SOUND_ROUTE(2, "mono", 0.30)
|
||||
MDRV_SOUND_ROUTE(3, "mono", 1.0)
|
||||
|
||||
MDRV_SOUND_ADD("ym2", YM2203, 12000000 / 8)
|
||||
MDRV_SOUND_ROUTE(0, "mono", 0.30)
|
||||
MDRV_SOUND_ROUTE(1, "mono", 0.30)
|
||||
MDRV_SOUND_ROUTE(2, "mono", 0.30)
|
||||
MDRV_SOUND_ROUTE(3, "mono", 1.0)
|
||||
MACHINE_DRIVER_END
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
@ -878,37 +725,37 @@ MACHINE_DRIVER_END
|
||||
|
||||
ROM_START( argus )
|
||||
ROM_REGION( 0x28000, "main", 0 ) /* Main CPU */
|
||||
ROM_LOAD( "ag_02.bin", 0x00000, 0x08000, CRC(278a3f3d) SHA1(c5ac5a004ebf0194c33f71dab4020fa636cefbc2) )
|
||||
ROM_LOAD( "ag_03.bin", 0x10000, 0x08000, CRC(3a7f3bfa) SHA1(b11e134c084fc3c982dfe31836c1cf3fc0d481fd) )
|
||||
ROM_LOAD( "ag_04.bin", 0x18000, 0x08000, CRC(76adc9f6) SHA1(e223a8b2371c51f121958ee3687c777f597334c9) )
|
||||
ROM_LOAD( "ag_05.bin", 0x20000, 0x08000, CRC(f76692d6) SHA1(1dc353a042cdda909eb9f1b1ca749a3b3eaa01e4) )
|
||||
ROM_LOAD( "ag_02.bin", 0x00000, 0x08000, CRC(278a3f3d) SHA1(c5ac5a004ebf0194c33f71dab4020fa636cefbc2) )
|
||||
ROM_LOAD( "ag_03.bin", 0x10000, 0x08000, CRC(3a7f3bfa) SHA1(b11e134c084fc3c982dfe31836c1cf3fc0d481fd) )
|
||||
ROM_LOAD( "ag_04.bin", 0x18000, 0x08000, CRC(76adc9f6) SHA1(e223a8b2371c51f121958ee3687c777f597334c9) )
|
||||
ROM_LOAD( "ag_05.bin", 0x20000, 0x08000, CRC(f76692d6) SHA1(1dc353a042cdda909eb9f1b1ca749a3b3eaa01e4) )
|
||||
|
||||
ROM_REGION( 0x10000, "audio", 0 ) /* Sound CPU */
|
||||
ROM_LOAD( "ag_01.bin", 0x00000, 0x04000, CRC(769e3f57) SHA1(209160a96486ab0b90967c015143ec28fba2e2a4) )
|
||||
ROM_LOAD( "ag_01.bin", 0x00000, 0x04000, CRC(769e3f57) SHA1(209160a96486ab0b90967c015143ec28fba2e2a4) )
|
||||
|
||||
ROM_REGION( 0x20000, "gfx1", ROMREGION_DISPOSE ) /* Sprite */
|
||||
ROM_LOAD( "ag_09.bin", 0x00000, 0x08000, CRC(6dbc1c58) SHA1(ef7b6901b702dd347b3a3f162162138175efe578) )
|
||||
ROM_LOAD( "ag_08.bin", 0x08000, 0x08000, CRC(ce6e987e) SHA1(9de257d8061ec917f4d443ff509fd457f995d73b) )
|
||||
ROM_LOAD( "ag_07.bin", 0x10000, 0x08000, CRC(bbb9638d) SHA1(61dec71d4d976bef3af26d0dc9c0355fd1098ffb) )
|
||||
ROM_LOAD( "ag_06.bin", 0x18000, 0x08000, CRC(655b48f8) SHA1(4fce1dffe091b97e7055955743434e49e97b4b79) )
|
||||
ROM_LOAD( "ag_09.bin", 0x00000, 0x08000, CRC(6dbc1c58) SHA1(ef7b6901b702dd347b3a3f162162138175efe578) )
|
||||
ROM_LOAD( "ag_08.bin", 0x08000, 0x08000, CRC(ce6e987e) SHA1(9de257d8061ec917f4d443ff509fd457f995d73b) )
|
||||
ROM_LOAD( "ag_07.bin", 0x10000, 0x08000, CRC(bbb9638d) SHA1(61dec71d4d976bef3af26d0dc9c0355fd1098ffb) )
|
||||
ROM_LOAD( "ag_06.bin", 0x18000, 0x08000, CRC(655b48f8) SHA1(4fce1dffe091b97e7055955743434e49e97b4b79) )
|
||||
|
||||
ROM_REGION( 0x20000, "gfx2", ROMREGION_DISPOSE ) /* BG0 */
|
||||
ROM_LOAD( "ag_13.bin", 0x00000, 0x08000, CRC(20274268) SHA1(9b7767d14bd169dabe6add0623d353bf4b59779b) )
|
||||
ROM_LOAD( "ag_14.bin", 0x08000, 0x08000, CRC(ceb8860b) SHA1(90e094686d9d18e49e4848d18d1e31ac95f13937) )
|
||||
ROM_LOAD( "ag_11.bin", 0x10000, 0x08000, CRC(99ce8556) SHA1(39caababd6e20ecb0375b85fb6490ee0b04f0949) )
|
||||
ROM_LOAD( "ag_12.bin", 0x18000, 0x08000, CRC(e0e5377c) SHA1(b5981d832127d0b28b6a7bb0437716593e0ed71a) )
|
||||
ROM_LOAD( "ag_13.bin", 0x00000, 0x08000, CRC(20274268) SHA1(9b7767d14bd169dabe6add0623d353bf4b59779b) )
|
||||
ROM_LOAD( "ag_14.bin", 0x08000, 0x08000, CRC(ceb8860b) SHA1(90e094686d9d18e49e4848d18d1e31ac95f13937) )
|
||||
ROM_LOAD( "ag_11.bin", 0x10000, 0x08000, CRC(99ce8556) SHA1(39caababd6e20ecb0375b85fb6490ee0b04f0949) )
|
||||
ROM_LOAD( "ag_12.bin", 0x18000, 0x08000, CRC(e0e5377c) SHA1(b5981d832127d0b28b6a7bb0437716593e0ed71a) )
|
||||
|
||||
ROM_REGION( 0x08000, "gfx3", ROMREGION_DISPOSE ) /* BG1 */
|
||||
ROM_LOAD( "ag_17.bin", 0x00000, 0x08000, CRC(0f12d09b) SHA1(718db4ff016526dddacdf6f0088f247ee97c6543) )
|
||||
ROM_LOAD( "ag_17.bin", 0x00000, 0x08000, CRC(0f12d09b) SHA1(718db4ff016526dddacdf6f0088f247ee97c6543) )
|
||||
|
||||
ROM_REGION( 0x08000, "gfx4", ROMREGION_DISPOSE ) /* Text */
|
||||
ROM_LOAD( "ag_10.bin", 0x00000, 0x04000, CRC(2de696c4) SHA1(1ad0f1cde127a1618c2ea74a53e522963a79e5ce) )
|
||||
ROM_LOAD( "ag_10.bin", 0x00000, 0x04000, CRC(2de696c4) SHA1(1ad0f1cde127a1618c2ea74a53e522963a79e5ce) )
|
||||
|
||||
ROM_REGION( 0x08000, "user1", 0 ) /* Map */
|
||||
ROM_LOAD( "ag_15.bin", 0x00000, 0x08000, CRC(99834c1b) SHA1(330f271771b158493b28bb178c8cda98efd1d90c) )
|
||||
ROM_LOAD( "ag_15.bin", 0x00000, 0x08000, CRC(99834c1b) SHA1(330f271771b158493b28bb178c8cda98efd1d90c) )
|
||||
|
||||
ROM_REGION( 0x08000, "user2", 0 ) /* Pattern */
|
||||
ROM_LOAD( "ag_16.bin", 0x00000, 0x08000, CRC(39a51714) SHA1(ad89a630f1352eb4d8beeeebf909d5e2b5d7cc12) )
|
||||
ROM_LOAD( "ag_16.bin", 0x00000, 0x08000, CRC(39a51714) SHA1(ad89a630f1352eb4d8beeeebf909d5e2b5d7cc12) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( valtric )
|
||||
@ -969,104 +816,7 @@ ROM_START( butasan )
|
||||
ROM_END
|
||||
|
||||
|
||||
/*
|
||||
Bombs Away
|
||||
Jaleco, 1988
|
||||
|
||||
PCB Layout
|
||||
----------
|
||||
|
||||
BB-8744
|
||||
|------------------------------------------|
|
||||
| 1 Z80(1) 4 |
|
||||
| 6116 5MHz |-|
|
||||
|VOL YM2203 5 | |
|
||||
|4558 YM2203 Z80(2) | |
|
||||
|4558 YM3014 6 | |
|
||||
| YM3014 | |
|
||||
|J 6116 6264 | |
|
||||
|A |-|
|
||||
|M |
|
||||
|M |
|
||||
|A |-|
|
||||
| | |
|
||||
| | |
|
||||
| 2 62256 | |
|
||||
| DSW1 | |
|
||||
| 3 62256 | |
|
||||
| DSW2 82S137 |-|
|
||||
| |
|
||||
|------------------------------------------|
|
||||
Notes:
|
||||
Z80(1) clock - 5.000MHz
|
||||
Z80(2) clock - 6.000MHz [12/2]
|
||||
YM2203 clock - 1.500MHz [12/8, both]
|
||||
VSync - 54Hz
|
||||
HSync - 15.25kHz
|
||||
|
||||
|
||||
BB-8745
|
||||
|--------------------------------|
|
||||
| |
|
||||
| |-----| |-|
|
||||
| |N8633| | |
|
||||
| |-S | | |
|
||||
| |-----| | |
|
||||
| 82S123 | |
|
||||
| |-----| | |
|
||||
| |N8633| |-|
|
||||
| |-V | |
|
||||
|2018 | | |
|
||||
|2018 7 |6116 | 12MHz |-|
|
||||
| |-----| | |
|
||||
| |-----| | |
|
||||
| |N8633| | |
|
||||
| |-V64 | | |
|
||||
| | | | |
|
||||
| 9 8 |6264 | |-|
|
||||
| |-----| |
|
||||
|--------------------------------|
|
||||
Notes:
|
||||
3 soldered-in 'modules' are located on this PCB.
|
||||
N-8633-V 6-7 TOYOCOM
|
||||
N-8633-V64 6-7 TOYOCOM
|
||||
N-8633-S 6-7 TOYOCOM
|
||||
The 2 larger ones have 62 pins, 31 pins on each side of a small PCB. The PCB contains some
|
||||
surface mounted logic chips and some surface mounted RAM.
|
||||
The smaller module has 40 pins, 20 pins on each side of a small PCB. The PCB contains only
|
||||
logic on both sides.
|
||||
*/
|
||||
|
||||
ROM_START( bombsa )
|
||||
ROM_REGION( 0x30000, "main", 0 ) /* Main CPU */
|
||||
ROM_LOAD( "4.7a", 0x00000, 0x08000, CRC(0191f6a7) SHA1(10a0434abbf4be068751e65c81b1a211729e3742) )
|
||||
/* these fail their self-test... should be checked on real hw (hold start1+start2 on boot) */
|
||||
ROM_LOAD( "5.7c", 0x10000, 0x08000, BAD_DUMP CRC(095c451a) SHA1(892ca84376f89640ad4d28f1e548c26bc8f72c0e) ) // contains palettes etc. but fails rom check??
|
||||
ROM_LOAD( "6.7d", 0x20000, 0x10000, BAD_DUMP CRC(89f9dc0f) SHA1(5cf6a7aade3d56bc229d3771bc4141ad0c0e8da2) )
|
||||
|
||||
ROM_REGION( 0x10000, "audio", 0 ) /* Sound CPU */
|
||||
ROM_LOAD( "1.3a", 0x00000, 0x08000, CRC(92801404) SHA1(c4ff47989d355b18a909eaa88f138e2f68178ecc) )
|
||||
|
||||
ROM_REGION( 0x20000, "gfx1", ROMREGION_DISPOSE ) /* Sprite */
|
||||
ROM_LOAD( "2.4p", 0x00000, 0x10000, CRC(bd972ff4) SHA1(63bfb455bc0ae1d31e6f1066864ec0c8d2d0cf99) )
|
||||
ROM_LOAD( "3.4s", 0x10000, 0x10000, CRC(9a8a8a97) SHA1(13328631202c196c9d8791cc6063048eb6be0472) )
|
||||
|
||||
ROM_REGION( 0x20000, "gfx2", ROMREGION_DISPOSE ) /* BG0 */
|
||||
/* some corrupt 'blank' characters, should also be checked with a redump */
|
||||
ROM_LOAD( "8.2l", 0x00000, 0x10000, BAD_DUMP CRC(3391c769) SHA1(7ae7575ac81d6e0d915c279c1f57a9bc6d096bd6) )
|
||||
ROM_LOAD( "9.2m", 0x10000, 0x10000, BAD_DUMP CRC(5b315976) SHA1(d17cc1926f926bdd88b66ea6af88dac30880e7d4) )
|
||||
|
||||
ROM_REGION( 0x08000, "gfx3", ROMREGION_DISPOSE ) /* Text */
|
||||
ROM_LOAD( "7.4f", 0x00000, 0x08000, CRC(400114b9) SHA1(db2f3ba05a2005ae0e0e7d19c8739353032cbeab) )
|
||||
|
||||
ROM_REGION( 0x08000, "user1", ROMREGION_DISPOSE ) /* Proms */
|
||||
ROM_LOAD( "82s131.7l", 0x000, 0x200, CRC(6a7d13c0) SHA1(2a835a4ac1acb7663d0b915d0339af9800284da6) )
|
||||
ROM_LOAD( "82s137.3t", 0x000, 0x400, CRC(59e44236) SHA1(f53d99694fa5acd7cc51dd78e09f0d2ef730e7a4) )
|
||||
ROM_END
|
||||
|
||||
|
||||
/* ( YEAR NAME PARENT MACHINE INPUT INIT MONITOR COMPANY FULLNAME ) */
|
||||
/* ( YEAR NAME PARENT MACHINE INPUT INIT MONITOR COMPANY FULLNAME ) */
|
||||
GAME( 1986, argus, 0, argus, argus, 0, ROT270, "[NMK] (Jaleco license)", "Argus" , GAME_IMPERFECT_GRAPHICS )
|
||||
GAME( 1986, valtric, 0, valtric, valtric, 0, ROT270, "[NMK] (Jaleco license)", "Valtric" , GAME_IMPERFECT_GRAPHICS )
|
||||
GAME( 1987, butasan, 0, butasan, butasan, 0, ROT0, "[NMK] (Jaleco license)", "Butasan (Japan)", GAME_IMPERFECT_GRAPHICS )
|
||||
GAME( 1988, bombsa, 0, bombsa, bombsa, 0, ROT270, "Jaleco", "Bombs Away" , GAME_NOT_WORKING )
|
||||
|
@ -3258,7 +3258,7 @@ ROM_END
|
||||
// this is actually Beach Spikers...
|
||||
//PIC16C622A (317-0317-COM)
|
||||
//(sticker 253-5508-0317)
|
||||
//ROM_LOAD("317-0317-com.data", 0x00, 0x50, BAD_DUMP CRC(66efe433) SHA1(7f7b52202ed9b1e20516aaa7553cc3cc677a70b5) )
|
||||
//ROM_LOAD("317-0317-com.data", 0x00, 0x50, CRC(66efe433) SHA1(7f7b52202ed9b1e20516aaa7553cc3cc677a70b5) )
|
||||
|
||||
|
||||
ROM_START( initd )
|
||||
|
@ -86,25 +86,25 @@ Video RAM is also banked at locations from c000 to dfff.
|
||||
|
||||
3) MAIN CPU MEMORY MAP.
|
||||
|
||||
0000-7fff ROM
|
||||
8000-bfff paged ROM
|
||||
c000-dfff paged RAM (RAM/VRAM/IO)
|
||||
0000-7fff ROM
|
||||
8000-bfff paged ROM
|
||||
c000-dfff paged RAM (RAM/VRAM/IO)
|
||||
f000-f1ff I/O
|
||||
f200-f7ff Sprites registers (misc RAM)
|
||||
f800-ffff Work RAM
|
||||
f800-ffff Work RAM
|
||||
|
||||
-paged RAM memory map
|
||||
|
||||
Bank 0
|
||||
|
||||
c000-cfff Background tile buffer
|
||||
e000-dfff RAM (dummy background image for software collisions)
|
||||
d000-dfff RAM (dummy background image for software collisions)
|
||||
|
||||
Bank 1
|
||||
|
||||
c000-c3ff I/O
|
||||
c400-cbff Palette RAM
|
||||
d000-d800 Foreground tile buffer
|
||||
c400-cfff Palette RAM
|
||||
d000-dfff Foreground tile buffer
|
||||
|
||||
|
||||
4) I/O
|
||||
@ -153,55 +153,55 @@ c308 BACKGROUND SCROLL Y least significant 8 bits
|
||||
|
||||
c309 BACKGROUND SCROLL Y most significant 2 bits
|
||||
|
||||
76543210
|
||||
||
|
||||
|^-- Y scroll bit 8
|
||||
^--- Y scroll bit 9
|
||||
76543210
|
||||
||
|
||||
|^-- Y scroll bit 8
|
||||
^--- Y scroll bit 9
|
||||
|
||||
c30A BACKGROUND SCROLL X least significant 8 bits
|
||||
|
||||
c30B BACKGROUND SCROLL X MSB
|
||||
|
||||
76543210
|
||||
||||||||
|
||||
|||||||^-- X scroll bit 8
|
||||
||||||^--- Unknown (title screen)
|
||||
^^^^^^---- Unknown (title screen: 0xff)
|
||||
76543210
|
||||
||||||||
|
||||
|||||||^-- X scroll bit 8
|
||||
||||||^--- Unknown (title screen)
|
||||
^^^^^^---- Unknown (title screen: 0xff)
|
||||
|
||||
c30C SCREEN MODE
|
||||
|
||||
76543210
|
||||
||
|
||||
|^-- background enable bit (0 means black BG)
|
||||
^--- grey background enable bit
|
||||
76543210
|
||||
||
|
||||
|^-- background enable bit (0 means black BG)
|
||||
^--- grey background enable bit
|
||||
|
||||
c5fe BACKGROUND PALETTE INTENSITY (red and green)
|
||||
|
||||
76543210
|
||||
||||||||
|
||||
||||^^^^-- green intensity
|
||||
^^^^------ red intensity
|
||||
76543210
|
||||
||||||||
|
||||
||||^^^^-- green intensity
|
||||
^^^^------ red intensity
|
||||
|
||||
c5ff BACKGROUND PALETTE INTENSITY (blue)
|
||||
|
||||
76543210
|
||||
||||||||
|
||||
76543210
|
||||
||||||||
|
||||
||||^^^^-- unknown (?)
|
||||
^^^^------ blue intensity
|
||||
^^^^------ blue intensity
|
||||
|
||||
-RAM f000-f1ff
|
||||
|
||||
f000 SOUND COMMAND (?)
|
||||
|
||||
f001 UNKNOWN
|
||||
maybe some external HW like a flashing light
|
||||
when a coin falls in slot (?)
|
||||
maybe some external HW like a flashing light
|
||||
when a coin falls in slot (?)
|
||||
|
||||
f002 ROM PAGE SELECTOR
|
||||
select four (0-3) ROM pages at 8000-bfff.
|
||||
select four (0-3) ROM pages at 8000-bfff.
|
||||
|
||||
f003 VRAM PAGE SELECTOR
|
||||
selects two (0-1) VRAM pages at c000-dfff.
|
||||
selects two (0-1) VRAM pages at c000-dfff.
|
||||
|
||||
f004 UNKNOWN
|
||||
|
||||
@ -234,7 +234,7 @@ color output is 736 colors.
|
||||
Some additional palette effects are provided for background.
|
||||
Sprite palette 15's transparent color (c5fe-c5ff) is the global
|
||||
background intensity.
|
||||
Background Intensity is encoded in the same way of colors,and
|
||||
Background intensity is encoded in the same way of colors,and
|
||||
affects the intensity of each color component (BGR).
|
||||
The least significant nibble of c5ff is unknown,it assumes value
|
||||
0xf occasionaly when the other nibbles are changed.The only
|
||||
@ -314,20 +314,55 @@ The first sprite data is located at f20b,then f21b and so on.
|
||||
#include "sound/2203intf.h"
|
||||
|
||||
|
||||
extern WRITE8_HANDLER( psychic5_paged_ram_w );
|
||||
extern WRITE8_HANDLER( psychic5_vram_page_select_w );
|
||||
extern WRITE8_HANDLER( psychic5_title_screen_w );
|
||||
WRITE8_HANDLER( psychic5_paged_ram_w );
|
||||
WRITE8_HANDLER( psychic5_vram_page_select_w );
|
||||
WRITE8_HANDLER( psychic5_title_screen_w );
|
||||
|
||||
extern READ8_HANDLER( psychic5_paged_ram_r );
|
||||
extern READ8_HANDLER( psychic5_vram_page_select_r );
|
||||
READ8_HANDLER( psychic5_paged_ram_r );
|
||||
READ8_HANDLER( psychic5_vram_page_select_r );
|
||||
|
||||
extern MACHINE_RESET( psychic5 );
|
||||
VIDEO_START( psychic5 );
|
||||
VIDEO_RESET( psychic5 );
|
||||
VIDEO_UPDATE( psychic5 );
|
||||
|
||||
extern VIDEO_START( psychic5 );
|
||||
extern VIDEO_UPDATE( psychic5 );
|
||||
|
||||
static int psychic5_bank_latch = 0x0;
|
||||
extern UINT8 *bombsa_paletteram;
|
||||
WRITE8_HANDLER( bombsa_paged_ram_w );
|
||||
WRITE8_HANDLER( bombsa_unknown_w );
|
||||
|
||||
VIDEO_START( bombsa );
|
||||
VIDEO_RESET( bombsa );
|
||||
VIDEO_UPDATE( bombsa );
|
||||
|
||||
|
||||
static UINT8 psychic5_bank_latch;
|
||||
|
||||
static MACHINE_RESET( psychic5 )
|
||||
{
|
||||
psychic5_bank_latch = 0xff;
|
||||
flip_screen_set(0);
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Interrupt(s)
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
static INTERRUPT_GEN( psychic5_interrupt )
|
||||
{
|
||||
if (cpu_getiloops() == 0)
|
||||
cpunum_set_input_line_and_vector(machine, 0, 0, HOLD_LINE, 0xd7); /* RST 10h */
|
||||
else
|
||||
cpunum_set_input_line_and_vector(machine, 0, 0, HOLD_LINE, 0xcf); /* RST 08h */
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Memory Handler(s)
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
static READ8_HANDLER( psychic5_bankselect_r )
|
||||
{
|
||||
@ -339,7 +374,7 @@ static WRITE8_HANDLER( psychic5_bankselect_w )
|
||||
UINT8 *RAM = memory_region(machine, "main");
|
||||
int bankaddress;
|
||||
|
||||
if (data != psychic5_bank_latch)
|
||||
if (psychic5_bank_latch != data)
|
||||
{
|
||||
psychic5_bank_latch = data;
|
||||
bankaddress = 0x10000 + ((data & 3) * 0x4000);
|
||||
@ -347,6 +382,19 @@ static WRITE8_HANDLER( psychic5_bankselect_w )
|
||||
}
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( bombsa_bankselect_w )
|
||||
{
|
||||
UINT8 *RAM = memory_region(machine, "main");
|
||||
int bankaddress;
|
||||
|
||||
if (psychic5_bank_latch != data)
|
||||
{
|
||||
psychic5_bank_latch = data;
|
||||
bankaddress = 0x10000 + ((data & 7) * 0x4000);
|
||||
memory_set_bankptr(1, &RAM[bankaddress]); /* Select 8 banks of 16k */
|
||||
}
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( psychic5_coin_counter_w )
|
||||
{
|
||||
coin_counter_w(0, data & 0x01);
|
||||
@ -359,59 +407,45 @@ static WRITE8_HANDLER( psychic5_coin_counter_w )
|
||||
}
|
||||
}
|
||||
|
||||
static INTERRUPT_GEN( psychic5_interrupt )
|
||||
static WRITE8_HANDLER( bombsa_flipscreen_w )
|
||||
{
|
||||
if (cpu_getiloops() == 0)
|
||||
cpunum_set_input_line_and_vector(machine, 0, 0, HOLD_LINE, 0xd7); /* RST 10h */
|
||||
else
|
||||
cpunum_set_input_line_and_vector(machine, 0, 0, HOLD_LINE, 0xcf); /* RST 08h */
|
||||
// bit 7 toggles flip screen
|
||||
if (data & 0x80)
|
||||
{
|
||||
flip_screen_set(!flip_screen_get());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x7fff) AM_READ(SMH_ROM)
|
||||
AM_RANGE(0x8000, 0xbfff) AM_READ(SMH_BANK1)
|
||||
AM_RANGE(0xc000, 0xdfff) AM_READ(psychic5_paged_ram_r)
|
||||
AM_RANGE(0xe000, 0xefff) AM_READ(SMH_RAM)
|
||||
AM_RANGE(0xf000, 0xf000) AM_READ(SMH_RAM)
|
||||
AM_RANGE(0xf001, 0xf001) AM_READ(SMH_NOP) // ???
|
||||
AM_RANGE(0xf002, 0xf002) AM_READ(psychic5_bankselect_r)
|
||||
AM_RANGE(0xf003, 0xf003) AM_READ(psychic5_vram_page_select_r)
|
||||
AM_RANGE(0xf004, 0xf004) AM_READ(SMH_NOP) // ???
|
||||
AM_RANGE(0xf005, 0xf005) AM_READ(SMH_NOP) // ???
|
||||
AM_RANGE(0xf006, 0xf1ff) AM_READ(SMH_NOP)
|
||||
AM_RANGE(0xf200, 0xf7ff) AM_READ(SMH_RAM)
|
||||
AM_RANGE(0xf800, 0xffff) AM_READ(SMH_RAM)
|
||||
/***************************************************************************
|
||||
|
||||
Memory Map(s)
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
static ADDRESS_MAP_START( psychic5_main_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x7fff) AM_ROM
|
||||
AM_RANGE(0x8000, 0xbfff) AM_RAMBANK(1)
|
||||
AM_RANGE(0xc000, 0xdfff) AM_READWRITE(psychic5_paged_ram_r, psychic5_paged_ram_w)
|
||||
AM_RANGE(0xe000, 0xefff) AM_RAM
|
||||
AM_RANGE(0xf000, 0xf000) AM_RAM_WRITE(soundlatch_w)
|
||||
AM_RANGE(0xf001, 0xf001) AM_READWRITE(SMH_NOP, psychic5_coin_counter_w)
|
||||
AM_RANGE(0xf002, 0xf002) AM_READWRITE(psychic5_bankselect_r, psychic5_bankselect_w)
|
||||
AM_RANGE(0xf003, 0xf003) AM_READWRITE(psychic5_vram_page_select_r, psychic5_vram_page_select_w)
|
||||
AM_RANGE(0xf004, 0xf004) AM_NOP // ???
|
||||
AM_RANGE(0xf005, 0xf005) AM_READWRITE(SMH_NOP, psychic5_title_screen_w)
|
||||
AM_RANGE(0xf006, 0xf1ff) AM_NOP
|
||||
AM_RANGE(0xf200, 0xf7ff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
|
||||
AM_RANGE(0xf800, 0xffff) AM_RAM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x7fff) AM_WRITE(SMH_ROM)
|
||||
AM_RANGE(0x8000, 0xbfff) AM_WRITE(SMH_BANK1)
|
||||
AM_RANGE(0xc000, 0xdfff) AM_WRITE(psychic5_paged_ram_w)
|
||||
AM_RANGE(0xe000, 0xefff) AM_WRITE(SMH_RAM)
|
||||
AM_RANGE(0xf000, 0xf000) AM_WRITE(soundlatch_w)
|
||||
AM_RANGE(0xf001, 0xf001) AM_WRITE(psychic5_coin_counter_w)
|
||||
AM_RANGE(0xf002, 0xf002) AM_WRITE(psychic5_bankselect_w)
|
||||
AM_RANGE(0xf003, 0xf003) AM_WRITE(psychic5_vram_page_select_w)
|
||||
AM_RANGE(0xf004, 0xf004) AM_WRITE(SMH_NOP) // ???
|
||||
AM_RANGE(0xf005, 0xf005) AM_WRITE(psychic5_title_screen_w)
|
||||
AM_RANGE(0xf006, 0xf1ff) AM_WRITE(SMH_NOP)
|
||||
AM_RANGE(0xf200, 0xf7ff) AM_WRITE(SMH_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
|
||||
AM_RANGE(0xf800, 0xffff) AM_WRITE(SMH_RAM)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( sound_readmem, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x7fff) AM_READ(SMH_ROM)
|
||||
AM_RANGE(0xc000, 0xc7ff) AM_READ(SMH_RAM)
|
||||
static ADDRESS_MAP_START( psychic5_sound_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x7fff) AM_ROM
|
||||
AM_RANGE(0xc000, 0xc7ff) AM_RAM
|
||||
AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_r)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( sound_writemem, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x7fff) AM_WRITE(SMH_ROM)
|
||||
AM_RANGE(0xc000, 0xc7ff) AM_WRITE(SMH_RAM)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( sound_io_map, ADDRESS_SPACE_IO, 8 )
|
||||
static ADDRESS_MAP_START( psychic5_soundport_map, ADDRESS_SPACE_IO, 8 )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0xff)
|
||||
AM_RANGE(0x00, 0x00) AM_WRITE(ym2203_control_port_0_w)
|
||||
AM_RANGE(0x01, 0x01) AM_WRITE(ym2203_write_port_0_w)
|
||||
@ -420,87 +454,177 @@ static ADDRESS_MAP_START( sound_io_map, ADDRESS_SPACE_IO, 8 )
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
static ADDRESS_MAP_START( bombsa_main_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x7fff) AM_ROM
|
||||
AM_RANGE(0x8000, 0xbfff) AM_RAMBANK(1)
|
||||
AM_RANGE(0xc000, 0xcfff) AM_RAM
|
||||
|
||||
/* ports look like the other games */
|
||||
AM_RANGE(0xd000, 0xd000) AM_WRITE(soundlatch_w) // confirmed
|
||||
AM_RANGE(0xd001, 0xd001) AM_WRITE(bombsa_flipscreen_w)
|
||||
AM_RANGE(0xd002, 0xd002) AM_READWRITE(psychic5_bankselect_r, bombsa_bankselect_w)
|
||||
AM_RANGE(0xd003, 0xd003) AM_READWRITE(psychic5_vram_page_select_r, psychic5_vram_page_select_w)
|
||||
AM_RANGE(0xd005, 0xd005) AM_WRITE(bombsa_unknown_w) // ?
|
||||
|
||||
AM_RANGE(0xd000, 0xd1ff) AM_RAM
|
||||
AM_RANGE(0xd200, 0xd7ff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
|
||||
AM_RANGE(0xd800, 0xdfff) AM_RAM
|
||||
|
||||
AM_RANGE(0xe000, 0xffff) AM_READWRITE(psychic5_paged_ram_r, bombsa_paged_ram_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( bombsa_sound_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0xbfff) AM_ROM
|
||||
AM_RANGE(0xc000, 0xc7ff) AM_RAM
|
||||
AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_r)
|
||||
AM_RANGE(0xf000, 0xf000) AM_WRITEONLY // Is this a confirm of some sort?
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( bombsa_soundport_map, ADDRESS_SPACE_IO, 8 )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0xff)
|
||||
AM_RANGE(0x00, 0x00) AM_READWRITE(ym2203_status_port_0_r, ym2203_control_port_0_w)
|
||||
AM_RANGE(0x01, 0x01) AM_READWRITE(ym2203_read_port_0_r, ym2203_write_port_0_w)
|
||||
AM_RANGE(0x80, 0x80) AM_READWRITE(ym2203_status_port_1_r, ym2203_control_port_1_w)
|
||||
AM_RANGE(0x81, 0x81) AM_READWRITE(ym2203_read_port_1_r, ym2203_write_port_1_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
static INPUT_PORTS_START( psychic5 )
|
||||
PORT_START("IN0")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_START("SYSTEM") /* system control */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
|
||||
PORT_START("P1") /* player 1 controls */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_START("P1") /* player 1 controls */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_START("P2") /* player 2 controls */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_START("P2") /* player 2 controls */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_START("DSW0")
|
||||
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Difficulty ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( Normal ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Hard ) )
|
||||
PORT_DIPNAME( 0x10, 0x00, DEF_STR( Cabinet ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Cocktail ) )
|
||||
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Lives ) )
|
||||
PORT_DIPSETTING( 0x80, "2" )
|
||||
PORT_DIPSETTING( 0xc0, "3" )
|
||||
PORT_DIPSETTING( 0x40, "4" )
|
||||
PORT_DIPSETTING( 0x00, "5" )
|
||||
PORT_START("DSW1")
|
||||
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unused ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Difficulty ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( Normal ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Hard ) )
|
||||
PORT_DIPNAME( 0x10, 0x00, DEF_STR( Cabinet ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Cocktail ) )
|
||||
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Lives ) )
|
||||
PORT_DIPSETTING( 0x80, "2" )
|
||||
PORT_DIPSETTING( 0xc0, "3" )
|
||||
PORT_DIPSETTING( 0x40, "4" )
|
||||
PORT_DIPSETTING( 0x00, "5" )
|
||||
|
||||
PORT_START("DSW1")
|
||||
PORT_DIPNAME( 0x01, 0x01, "Invulnerability (Cheat)")
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Coin_A ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x60, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0xe0, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0xa0, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) )
|
||||
PORT_DIPNAME( 0x1c, 0x1c, DEF_STR( Coin_B ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( 4C_1C ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x0c, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x1c, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x18, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0x14, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( 1C_4C ) )
|
||||
PORT_START("DSW2")
|
||||
PORT_DIPNAME( 0x01, 0x01, "Invulnerability (Cheat)" )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unused ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Coin_A ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x60, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0xe0, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0xa0, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) )
|
||||
PORT_DIPNAME( 0x1c, 0x1c, DEF_STR( Coin_B ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( 4C_1C ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x0c, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x1c, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x18, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0x14, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( 1C_4C ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( bombsa )
|
||||
PORT_START("SYSTEM") /* system control */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
|
||||
PORT_START("P1") /* player 1 control */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_START("P2") /* player 2 control */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_START("DSW1")
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "SW1:8" ) // Coin_B
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "SW1:7" )
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "SW1:6" ) // Coin_B
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW1:5" ) // Coin_B
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "SW1:4" )
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW1:3" )
|
||||
PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x40, "2 Coins 1 Credit/4 Coins 3 Credits" )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) )
|
||||
|
||||
PORT_START("DSW2")
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "SW2:8" )
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "SW2:7" )
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "SW2:6" )
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW2:5" )
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "SW2:4" )
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW2:3" )
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "SW2:2" )
|
||||
PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW2:1" ) // flip screen ?
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
@ -533,6 +657,12 @@ static GFXDECODE_START( psychic5 )
|
||||
GFXDECODE_ENTRY( "gfx3", 0, charlayout, 32*16, 16 )
|
||||
GFXDECODE_END
|
||||
|
||||
static GFXDECODE_START( bombsa )
|
||||
GFXDECODE_ENTRY( "gfx1", 0, spritelayout, 32*16, 16 )
|
||||
GFXDECODE_ENTRY( "gfx2", 0, spritelayout, 0*16, 16 )
|
||||
GFXDECODE_ENTRY( "gfx3", 0, charlayout, 16*16, 16 )
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
|
||||
static void irqhandler(running_machine *machine, int irq)
|
||||
@ -553,15 +683,15 @@ static const ym2203_interface ym2203_config =
|
||||
static MACHINE_DRIVER_START( psychic5 )
|
||||
|
||||
/* basic machine hardware */
|
||||
MDRV_CPU_ADD("main", Z80, 6000000)
|
||||
MDRV_CPU_PROGRAM_MAP(readmem,writemem)
|
||||
MDRV_CPU_ADD("main", Z80, XTAL_12MHz/2)
|
||||
MDRV_CPU_PROGRAM_MAP(psychic5_main_map,0)
|
||||
MDRV_CPU_VBLANK_INT_HACK(psychic5_interrupt,2)
|
||||
|
||||
MDRV_CPU_ADD("audio", Z80, 6000000)
|
||||
MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem)
|
||||
MDRV_CPU_IO_MAP(sound_io_map,0)
|
||||
MDRV_CPU_ADD("audio", Z80, XTAL_12MHz/2)
|
||||
MDRV_CPU_PROGRAM_MAP(psychic5_sound_map,0)
|
||||
MDRV_CPU_IO_MAP(psychic5_soundport_map,0)
|
||||
|
||||
MDRV_INTERLEAVE(10) /* Allow time for 2nd cpu to interleave*/
|
||||
MDRV_INTERLEAVE(10) /* Allow time for 2nd cpu to interleave */
|
||||
MDRV_MACHINE_RESET(psychic5)
|
||||
|
||||
/* video hardware */
|
||||
@ -577,25 +707,72 @@ static MACHINE_DRIVER_START( psychic5 )
|
||||
MDRV_PALETTE_LENGTH(768)
|
||||
|
||||
MDRV_VIDEO_START(psychic5)
|
||||
MDRV_VIDEO_RESET(psychic5)
|
||||
MDRV_VIDEO_UPDATE(psychic5)
|
||||
|
||||
/* sound hardware */
|
||||
MDRV_SPEAKER_STANDARD_MONO("mono")
|
||||
|
||||
MDRV_SOUND_ADD("ym1", YM2203, 6000000/4)
|
||||
MDRV_SOUND_ADD("ym1", YM2203, XTAL_12MHz/8)
|
||||
MDRV_SOUND_CONFIG(ym2203_config)
|
||||
MDRV_SOUND_ROUTE(0, "mono", 0.15)
|
||||
MDRV_SOUND_ROUTE(1, "mono", 0.15)
|
||||
MDRV_SOUND_ROUTE(2, "mono", 0.15)
|
||||
MDRV_SOUND_ROUTE(3, "mono", 0.50)
|
||||
|
||||
MDRV_SOUND_ADD("ym2", YM2203, 6000000/4)
|
||||
MDRV_SOUND_ADD("ym2", YM2203, XTAL_12MHz/8)
|
||||
MDRV_SOUND_ROUTE(0, "mono", 0.15)
|
||||
MDRV_SOUND_ROUTE(1, "mono", 0.15)
|
||||
MDRV_SOUND_ROUTE(2, "mono", 0.15)
|
||||
MDRV_SOUND_ROUTE(3, "mono", 0.50)
|
||||
MACHINE_DRIVER_END
|
||||
|
||||
static MACHINE_DRIVER_START( bombsa )
|
||||
|
||||
/* basic machine hardware */
|
||||
MDRV_CPU_ADD("main", Z80, XTAL_12MHz/2 ) /* 6 MHz */
|
||||
MDRV_CPU_PROGRAM_MAP(bombsa_main_map,0)
|
||||
MDRV_CPU_VBLANK_INT_HACK(psychic5_interrupt,2)
|
||||
|
||||
MDRV_CPU_ADD("audio", Z80, XTAL_5MHz )
|
||||
MDRV_CPU_PROGRAM_MAP(bombsa_sound_map,0)
|
||||
MDRV_CPU_IO_MAP(bombsa_soundport_map,0)
|
||||
|
||||
MDRV_INTERLEAVE(10)
|
||||
MDRV_MACHINE_RESET(psychic5)
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("main", RASTER)
|
||||
MDRV_SCREEN_REFRESH_RATE(54) /* Guru says : VSync - 54Hz . HSync - 15.25kHz */
|
||||
MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
|
||||
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32)
|
||||
MDRV_SCREEN_SIZE(64*8, 32*8)
|
||||
MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
|
||||
|
||||
MDRV_GFXDECODE(bombsa)
|
||||
MDRV_PALETTE_LENGTH(768)
|
||||
|
||||
MDRV_VIDEO_START(bombsa)
|
||||
MDRV_VIDEO_RESET(bombsa)
|
||||
MDRV_VIDEO_UPDATE(bombsa)
|
||||
|
||||
/* sound hardware */
|
||||
MDRV_SPEAKER_STANDARD_MONO("mono")
|
||||
|
||||
MDRV_SOUND_ADD("ym1", YM2203, XTAL_12MHz/8)
|
||||
MDRV_SOUND_CONFIG(ym2203_config)
|
||||
MDRV_SOUND_ROUTE(0, "mono", 0.30)
|
||||
MDRV_SOUND_ROUTE(1, "mono", 0.30)
|
||||
MDRV_SOUND_ROUTE(2, "mono", 0.30)
|
||||
MDRV_SOUND_ROUTE(3, "mono", 1.0)
|
||||
|
||||
MDRV_SOUND_ADD("ym2", YM2203, XTAL_12MHz/8)
|
||||
MDRV_SOUND_ROUTE(0, "mono", 0.30)
|
||||
MDRV_SOUND_ROUTE(1, "mono", 0.30)
|
||||
MDRV_SOUND_ROUTE(2, "mono", 0.30)
|
||||
MDRV_SOUND_ROUTE(3, "mono", 1.0)
|
||||
MACHINE_DRIVER_END
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
@ -604,25 +781,121 @@ MACHINE_DRIVER_END
|
||||
***************************************************************************/
|
||||
|
||||
ROM_START( psychic5 )
|
||||
ROM_REGION( 0x20000, "main", 0 ) /* 2*64K for main CPU, Z80 */
|
||||
ROM_REGION( 0x20000, "main", 0 ) /* Main CPU */
|
||||
ROM_LOAD( "p5d", 0x00000, 0x08000, CRC(90259249) SHA1(ac2d8dd95f6c04b6ad726136931e37dcd537e977) )
|
||||
ROM_LOAD( "p5e", 0x10000, 0x10000, CRC(72298f34) SHA1(725be2fbf5f3622f646c0fb8e6677cbddf0b1fc2) )
|
||||
|
||||
ROM_REGION( 0x10000, "audio", 0 ) /*64K for 2nd z80 CPU*/
|
||||
ROM_REGION( 0x10000, "audio", 0 ) /* Sound CPU */
|
||||
ROM_LOAD( "p5a", 0x00000, 0x08000, CRC(50060ecd) SHA1(e6051fb4a1fa9429cfb6084e8a5dfe994a08280b) )
|
||||
|
||||
ROM_REGION( 0x20000, "gfx1", ROMREGION_DISPOSE )
|
||||
ROM_LOAD( "p5b", 0x00000, 0x10000, CRC(7e3f87d4) SHA1(b8e7fa3f96d2e3937e4cb530f105bb84d5743b43) ) /* sprite tiles */
|
||||
ROM_REGION( 0x20000, "gfx1", ROMREGION_DISPOSE ) /* sprite tiles */
|
||||
ROM_LOAD( "p5b", 0x00000, 0x10000, CRC(7e3f87d4) SHA1(b8e7fa3f96d2e3937e4cb530f105bb84d5743b43) )
|
||||
ROM_LOAD( "p5c", 0x10000, 0x10000, CRC(8710fedb) SHA1(c7e8dc6b733e4ecce37d56fc429c00ade8736ff3) )
|
||||
|
||||
ROM_REGION( 0x20000, "gfx2", ROMREGION_DISPOSE )
|
||||
ROM_LOAD( "p5g", 0x00000, 0x10000, CRC(f9262f32) SHA1(bae2dc77be7024bd85f213e4da746c5903db6ea5) ) /* background tiles */
|
||||
ROM_REGION( 0x20000, "gfx2", ROMREGION_DISPOSE ) /* background tiles */
|
||||
ROM_LOAD( "p5g", 0x00000, 0x10000, CRC(f9262f32) SHA1(bae2dc77be7024bd85f213e4da746c5903db6ea5) )
|
||||
ROM_LOAD( "p5h", 0x10000, 0x10000, CRC(c411171a) SHA1(d5893563715ba231e42b084b88f5176bb94a4da9) )
|
||||
|
||||
ROM_REGION( 0x08000, "gfx3", ROMREGION_DISPOSE )
|
||||
ROM_LOAD( "p5f", 0x00000, 0x08000, CRC(04d7e21c) SHA1(6046c506bdedc233e3730f90c7897e847bec8758) ) /* foreground tiles */
|
||||
ROM_REGION( 0x08000, "gfx3", ROMREGION_DISPOSE ) /* foreground tiles */
|
||||
ROM_LOAD( "p5f", 0x00000, 0x08000, CRC(04d7e21c) SHA1(6046c506bdedc233e3730f90c7897e847bec8758) )
|
||||
ROM_END
|
||||
|
||||
|
||||
/*
|
||||
Bombs Away
|
||||
Jaleco, 1988
|
||||
|
||||
PCB Layout
|
||||
----------
|
||||
|
||||
BB-8744
|
||||
|------------------------------------------|
|
||||
| 1 Z80(1) 4 |
|
||||
| 6116 5MHz |-|
|
||||
|VOL YM2203 5 | |
|
||||
|4558 YM2203 Z80(2) | |
|
||||
|4558 YM3014 6 | |
|
||||
| YM3014 | |
|
||||
|J 6116 6264 | |
|
||||
|A |-|
|
||||
|M |
|
||||
|M |
|
||||
|A |-|
|
||||
| | |
|
||||
| | |
|
||||
| 2 62256 | |
|
||||
| DSW1 | |
|
||||
| 3 62256 | |
|
||||
| DSW2 82S137 |-|
|
||||
| |
|
||||
|------------------------------------------|
|
||||
Notes:
|
||||
Z80(1) clock - 5.000MHz
|
||||
Z80(2) clock - 6.000MHz [12/2]
|
||||
YM2203 clock - 1.500MHz [12/8, both]
|
||||
VSync - 54Hz
|
||||
HSync - 15.25kHz
|
||||
|
||||
|
||||
BB-8745
|
||||
|--------------------------------|
|
||||
| |
|
||||
| |-----| |-|
|
||||
| |N8633| | |
|
||||
| |-S | | |
|
||||
| |-----| | |
|
||||
| 82S123 | |
|
||||
| |-----| | |
|
||||
| |N8633| |-|
|
||||
| |-V | |
|
||||
|2018 | | |
|
||||
|2018 7 |6116 | 12MHz |-|
|
||||
| |-----| | |
|
||||
| |-----| | |
|
||||
| |N8633| | |
|
||||
| |-V64 | | |
|
||||
| | | | |
|
||||
| 9 8 |6264 | |-|
|
||||
| |-----| |
|
||||
|--------------------------------|
|
||||
Notes:
|
||||
3 soldered-in 'modules' are located on this PCB.
|
||||
N-8633-V 6-7 TOYOCOM
|
||||
N-8633-V64 6-7 TOYOCOM
|
||||
N-8633-S 6-7 TOYOCOM
|
||||
The 2 larger ones have 62 pins, 31 pins on each side of a small PCB. The PCB contains some
|
||||
surface mounted logic chips and some surface mounted RAM.
|
||||
The smaller module has 40 pins, 20 pins on each side of a small PCB. The PCB contains only
|
||||
logic on both sides.
|
||||
*/
|
||||
|
||||
ROM_START( bombsa )
|
||||
ROM_REGION( 0x30000, "main", 0 ) /* Main CPU */
|
||||
ROM_LOAD( "4.7a", 0x00000, 0x08000, CRC(0191f6a7) SHA1(10a0434abbf4be068751e65c81b1a211729e3742) )
|
||||
/* these fail their self-test... should be checked on real hw (hold start1+start2 on boot) */
|
||||
ROM_LOAD( "5.7c", 0x10000, 0x08000, BAD_DUMP CRC(095c451a) SHA1(892ca84376f89640ad4d28f1e548c26bc8f72c0e) ) // contains palettes etc. but fails rom check??
|
||||
ROM_LOAD( "6.7d", 0x20000, 0x10000, BAD_DUMP CRC(89f9dc0f) SHA1(5cf6a7aade3d56bc229d3771bc4141ad0c0e8da2) )
|
||||
|
||||
ROM_REGION( 0x10000, "audio", 0 ) /* Sound CPU */
|
||||
ROM_LOAD( "1.3a", 0x00000, 0x08000, CRC(92801404) SHA1(c4ff47989d355b18a909eaa88f138e2f68178ecc) )
|
||||
|
||||
ROM_REGION( 0x20000, "gfx1", ROMREGION_DISPOSE ) /* sprite tiles */
|
||||
ROM_LOAD( "2.4p", 0x00000, 0x10000, CRC(bd972ff4) SHA1(63bfb455bc0ae1d31e6f1066864ec0c8d2d0cf99) )
|
||||
ROM_LOAD( "3.4s", 0x10000, 0x10000, CRC(9a8a8a97) SHA1(13328631202c196c9d8791cc6063048eb6be0472) )
|
||||
|
||||
ROM_REGION( 0x20000, "gfx2", ROMREGION_DISPOSE ) /* background tiles */
|
||||
/* some corrupt 'blank' characters, should also be checked with a redump */
|
||||
ROM_LOAD( "8.2l", 0x00000, 0x10000, BAD_DUMP CRC(3391c769) SHA1(7ae7575ac81d6e0d915c279c1f57a9bc6d096bd6) )
|
||||
ROM_LOAD( "9.2m", 0x10000, 0x10000, BAD_DUMP CRC(5b315976) SHA1(d17cc1926f926bdd88b66ea6af88dac30880e7d4) )
|
||||
|
||||
ROM_REGION( 0x08000, "gfx3", ROMREGION_DISPOSE ) /* foreground tiles */
|
||||
ROM_LOAD( "7.4f", 0x00000, 0x08000, CRC(400114b9) SHA1(db2f3ba05a2005ae0e0e7d19c8739353032cbeab) )
|
||||
|
||||
ROM_REGION( 0x08000, "proms", ROMREGION_DISPOSE ) /* Proms */
|
||||
ROM_LOAD( "82s131.7l", 0x000, 0x200, CRC(6a7d13c0) SHA1(2a835a4ac1acb7663d0b915d0339af9800284da6) )
|
||||
ROM_LOAD( "82s137.3t", 0x200, 0x400, CRC(59e44236) SHA1(f53d99694fa5acd7cc51dd78e09f0d2ef730e7a4) )
|
||||
ROM_END
|
||||
|
||||
|
||||
GAME( 1987, psychic5, 0, psychic5, psychic5, 0, ROT270, "Jaleco", "Psychic 5", 0 )
|
||||
GAME( 1988, bombsa, 0, bombsa, bombsa, 0, ROT270, "Jaleco", "Bombs Away", GAME_NOT_WORKING )
|
||||
|
@ -803,6 +803,7 @@ $(MAMEOBJ)/itech.a: \
|
||||
$(MAMEOBJ)/jaleco.a: \
|
||||
$(DRIVERS)/aeroboto.o $(VIDEO)/aeroboto.o \
|
||||
$(DRIVERS)/argus.o $(VIDEO)/argus.o \
|
||||
$(VIDEO)/jalblend.o \
|
||||
$(DRIVERS)/bestleag.o \
|
||||
$(DRIVERS)/bigstrkb.o $(VIDEO)/bigstrkb.o \
|
||||
$(DRIVERS)/blueprnt.o $(VIDEO)/blueprnt.o \
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -11,9 +11,12 @@
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
#include "jalblend.h"
|
||||
|
||||
|
||||
/* each palette entry contains a fourth 'alpha' value */
|
||||
static UINT8 *jal_blend_table;
|
||||
UINT8 *jal_blend_table;
|
||||
|
||||
/*
|
||||
* 'Alpha' Format
|
||||
@ -21,158 +24,163 @@ static UINT8 *jal_blend_table;
|
||||
*
|
||||
* Bytes | Use
|
||||
* -76543210-+----------------
|
||||
* xxxx---- | unknown - maybe special background?
|
||||
* ----x--- | unknown - same as above
|
||||
* ----x--- | blend enable flag (?)
|
||||
* -----x-- | red add/subtract
|
||||
* ------x- | green add/subtract
|
||||
* -------x | blue add/subtract
|
||||
*/
|
||||
|
||||
/* basically an add/subtract function with clamping */
|
||||
static rgb_t jal_blend_func(rgb_t dest, rgb_t addMe, UINT8 alpha)
|
||||
rgb_t jal_blend_func(rgb_t dest, rgb_t addMe, UINT8 alpha)
|
||||
{
|
||||
int r = (float)RGB_RED (addMe) ;
|
||||
int g = (float)RGB_GREEN(addMe) ;
|
||||
int b = (float)RGB_BLUE (addMe) ;
|
||||
int r, g, b;
|
||||
int ir, ig, ib;
|
||||
|
||||
int rd = (float)RGB_RED (dest) ;
|
||||
int gd = (float)RGB_GREEN(dest) ;
|
||||
int bd = (float)RGB_BLUE (dest) ;
|
||||
r = (int)RGB_RED (dest);
|
||||
g = (int)RGB_GREEN(dest);
|
||||
b = (int)RGB_BLUE (dest);
|
||||
|
||||
int finalR, finalG, finalB ;
|
||||
ir = (int)RGB_RED (addMe);
|
||||
ig = (int)RGB_GREEN(addMe);
|
||||
ib = (int)RGB_BLUE (addMe);
|
||||
|
||||
int subR = (alpha & 0x04) >> 2 ;
|
||||
int subG = (alpha & 0x02) >> 1 ;
|
||||
int subB = (alpha & 0x01) ;
|
||||
if (alpha & 4)
|
||||
{ r -= ir; if (r < 0) r = 0; }
|
||||
else
|
||||
{ r += ir; if (r > 255) r = 255; }
|
||||
if (alpha & 2)
|
||||
{ g -= ig; if (g < 0) g = 0; }
|
||||
else
|
||||
{ g += ig; if (g > 255) g = 255; }
|
||||
if (alpha & 1)
|
||||
{ b -= ib; if (b < 0) b = 0; }
|
||||
else
|
||||
{ b += ib; if (b > 255) b = 255; }
|
||||
|
||||
if (subR) finalR = rd - r ;
|
||||
else finalR = rd + r ;
|
||||
if (finalR < 0) finalR = 0 ;
|
||||
else if (finalR > 255) finalR = 255 ;
|
||||
|
||||
|
||||
if (subG) finalG = gd - g ;
|
||||
else finalG = gd + g ;
|
||||
if (finalG < 0) finalG = 0 ;
|
||||
else if (finalG > 255) finalG = 255 ;
|
||||
|
||||
|
||||
if (subB) finalB = bd - b ;
|
||||
else finalB = bd + b ;
|
||||
if (finalB < 0) finalB = 0 ;
|
||||
else if (finalB > 255) finalB = 255 ;
|
||||
|
||||
return MAKE_RGB((UINT8)finalR,(UINT8)finalG,(UINT8)finalB) ;
|
||||
return MAKE_RGB(r,g,b);
|
||||
}
|
||||
|
||||
static void jal_blend_drawgfx( running_machine *machine, bitmap_t *dest_bmp,const gfx_element *gfx,
|
||||
UINT32 code,UINT32 color,int flipx,int flipy,int offsx,int offsy,
|
||||
const rectangle *clip,int transparency,int transparent_color)
|
||||
void jal_blend_drawgfx(running_machine *machine,bitmap_t *dest_bmp,const gfx_element *gfx,
|
||||
UINT32 code,UINT32 color,int flipx,int flipy,int offsx,int offsy,
|
||||
const rectangle *clip,int transparency,int transparent_color)
|
||||
{
|
||||
/* drawgfx(dest_bmp, gfx, code, color, flipx, flipy, offsx, offsy, clip, TRANSPARENCY_PEN, 15); */
|
||||
|
||||
int xstart, ystart, xend, yend, xinc, yinc;
|
||||
int xtile, ytile ;
|
||||
int code_offset = 0;
|
||||
|
||||
int wide = 1 ;
|
||||
int high = 1 ;
|
||||
|
||||
if (flipx) { xstart = wide-1; xend = -1; xinc = -1; }
|
||||
else { xstart = 0; xend = wide; xinc = +1; }
|
||||
|
||||
if (flipy) { ystart = high-1; yend = -1; yinc = -1; }
|
||||
else { ystart = 0; yend = high; yinc = +1; }
|
||||
if (jal_blend_table == NULL)
|
||||
{
|
||||
drawgfx(dest_bmp,gfx,code,color,flipx,flipy,offsx,offsy,clip,transparency,transparent_color);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Start drawing */
|
||||
if( gfx )
|
||||
if (gfx)
|
||||
{
|
||||
for (ytile = ystart; ytile != yend; ytile += yinc )
|
||||
const pen_t *pal = &machine->pens[gfx->color_base + gfx->color_granularity * (color % gfx->total_colors)];
|
||||
const UINT8 *alpha = &jal_blend_table[gfx->color_granularity * (color % gfx->total_colors)];
|
||||
UINT8 *source_base = gfx->gfxdata + (code % gfx->total_elements) * gfx->char_modulo;
|
||||
int x_index_base, y_index, sx, sy, ex, ey;
|
||||
int xinc, yinc;
|
||||
|
||||
xinc = flipx ? -1 : 1;
|
||||
yinc = flipy ? -1 : 1;
|
||||
|
||||
x_index_base = flipx ? gfx->width-1 : 0;
|
||||
y_index = flipy ? gfx->height-1 : 0;
|
||||
|
||||
/* start coordinates */
|
||||
sx = offsx;
|
||||
sy = offsy;
|
||||
|
||||
/* end coordinates */
|
||||
ex = sx + gfx->width;
|
||||
ey = sy + gfx->height;
|
||||
|
||||
if (clip)
|
||||
{
|
||||
for (xtile = xstart; xtile != xend; xtile += xinc )
|
||||
if (sx < clip->min_x)
|
||||
{ /* clip left */
|
||||
int pixels = clip->min_x-sx;
|
||||
sx += pixels;
|
||||
x_index_base += xinc*pixels;
|
||||
}
|
||||
if (sy < clip->min_y)
|
||||
{ /* clip top */
|
||||
int pixels = clip->min_y-sy;
|
||||
sy += pixels;
|
||||
y_index += yinc*pixels;
|
||||
}
|
||||
/* NS 980211 - fixed incorrect clipping */
|
||||
if (ex > clip->max_x+1)
|
||||
{ /* clip right */
|
||||
ex = clip->max_x+1;
|
||||
}
|
||||
if (ey > clip->max_y+1)
|
||||
{ /* clip bottom */
|
||||
ey = clip->max_y+1;
|
||||
}
|
||||
}
|
||||
|
||||
if (ex > sx)
|
||||
{ /* skip if inner loop doesn't draw anything */
|
||||
int x, y;
|
||||
|
||||
/* 32-bit destination bitmap */
|
||||
if (dest_bmp->bpp == 32)
|
||||
{
|
||||
const pen_t *pal = &machine->pens[gfx->color_base + gfx->color_granularity * (color % gfx->total_colors)];
|
||||
const UINT8 *alpha = &jal_blend_table[gfx->color_granularity * (color % gfx->total_colors)];
|
||||
int source_base = ((code + code_offset++) % gfx->total_elements) * gfx->height;
|
||||
|
||||
int x_index_base, y_index, sx, sy, ex, ey;
|
||||
|
||||
if (flipx) { x_index_base = gfx->width-1; }
|
||||
else { x_index_base = 0; }
|
||||
|
||||
if (flipy) { y_index = gfx->height-1; }
|
||||
else { y_index = 0; }
|
||||
|
||||
/* start coordinates */
|
||||
sx = offsx + xtile*gfx->width;
|
||||
sy = offsy + ytile*gfx->height;
|
||||
|
||||
/* end coordinates */
|
||||
ex = sx + gfx->width;
|
||||
ey = sy + gfx->height;
|
||||
|
||||
if( clip )
|
||||
/* taken from case 7: TRANSPARENCY_ALPHARANGE */
|
||||
for (y = sy; y < ey; y++)
|
||||
{
|
||||
if( sx < clip->min_x)
|
||||
{ /* clip left */
|
||||
int pixels = clip->min_x-sx;
|
||||
sx += pixels;
|
||||
x_index_base += xinc*pixels;
|
||||
}
|
||||
if( sy < clip->min_y )
|
||||
{ /* clip top */
|
||||
int pixels = clip->min_y-sy;
|
||||
sy += pixels;
|
||||
y_index += yinc*pixels;
|
||||
}
|
||||
/* NS 980211 - fixed incorrect clipping */
|
||||
if( ex > clip->max_x+1 )
|
||||
{ /* clip right */
|
||||
int pixels = ex-clip->max_x-1;
|
||||
ex -= pixels;
|
||||
}
|
||||
if( ey > clip->max_y+1 )
|
||||
{ /* clip bottom */
|
||||
int pixels = ey-clip->max_y-1;
|
||||
ey -= pixels;
|
||||
}
|
||||
}
|
||||
|
||||
if( ex>sx )
|
||||
{ /* skip if inner loop doesn't draw anything */
|
||||
int y;
|
||||
|
||||
/* taken from case 7: TRANSPARENCY_ALPHARANGE */
|
||||
UINT8 *source = gfx->gfxdata + (source_base + y_index)*gfx->line_modulo + x_index_base;
|
||||
UINT32 *dest = (UINT32 *)dest_bmp->base + sy*dest_bmp->rowpixels + sx;
|
||||
int src_modulo = yinc*gfx->line_modulo - xinc*(ex-sx);
|
||||
int dst_modulo = dest_bmp->rowpixels - (ex-sx);
|
||||
|
||||
for( y=sy; y<ey; y++ )
|
||||
UINT8 *source = source_base + y_index*gfx->line_modulo;
|
||||
UINT32 *dest = BITMAP_ADDR32(dest_bmp, y, 0);
|
||||
int x_index = x_index_base;
|
||||
for (x = sx; x < ex; x++)
|
||||
{
|
||||
int x;
|
||||
for( x=sx; x<ex; x++ )
|
||||
int c = source[x_index];
|
||||
if (c != transparent_color)
|
||||
{
|
||||
int c = *source;
|
||||
if( c != transparent_color )
|
||||
if (alpha[c] & 8)
|
||||
{
|
||||
if( alpha[c] == 0x00 )
|
||||
{
|
||||
/* Skip the costly alpha step altogether */
|
||||
*dest = pal[c];
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Comp with clamp */
|
||||
*dest = jal_blend_func(*dest, pal[c], alpha[c]) ;
|
||||
}
|
||||
/* Comp with clamp */
|
||||
dest[x] = jal_blend_func(dest[x], pal[c], alpha[c]);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Skip the costly alpha step altogether */
|
||||
dest[x] = pal[c];
|
||||
}
|
||||
dest++;
|
||||
source += xinc;
|
||||
}
|
||||
dest += dst_modulo;
|
||||
source += src_modulo;
|
||||
x_index += xinc;
|
||||
}
|
||||
y_index += yinc;
|
||||
}
|
||||
}
|
||||
|
||||
/* 16-bit destination bitmap */
|
||||
else
|
||||
{
|
||||
/* taken from case 7: TRANSPARENCY_ALPHARANGE */
|
||||
for (y = sy; y < ey; y++)
|
||||
{
|
||||
UINT8 *source = source_base + y_index*gfx->line_modulo;
|
||||
UINT16 *dest = BITMAP_ADDR16(dest_bmp, y, 0);
|
||||
int x_index = x_index_base;
|
||||
for (x = sx; x < ex; x++)
|
||||
{
|
||||
int c = source[x_index];
|
||||
if (c != transparent_color)
|
||||
{
|
||||
if (alpha[c] & 8)
|
||||
{
|
||||
/* Comp with clamp */
|
||||
dest[x] = jal_blend_func(dest[x], pal[c], alpha[c]);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Skip the costly alpha step altogether */
|
||||
dest[x] = pal[c];
|
||||
}
|
||||
}
|
||||
x_index += xinc;
|
||||
}
|
||||
y_index += yinc;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
5
src/mame/video/jalblend.h
Normal file
5
src/mame/video/jalblend.h
Normal file
@ -0,0 +1,5 @@
|
||||
extern UINT8 *jal_blend_table;
|
||||
rgb_t jal_blend_func(rgb_t dest, rgb_t addMe, UINT8 alpha);
|
||||
void jal_blend_drawgfx(running_machine *machine,bitmap_t *dest_bmp,const gfx_element *gfx,
|
||||
UINT32 code,UINT32 color,int flipx,int flipy,int offsx,int offsy,
|
||||
const rectangle *clip,int transparency,int transparent_color);
|
@ -1,12 +1,13 @@
|
||||
/***************************************************************************
|
||||
Psychic 5
|
||||
Bombs Away
|
||||
|
||||
Functions to emulate the video hardware of the machine.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
#include "jalblend.c"
|
||||
#include "jalblend.h"
|
||||
|
||||
#define BG_SCROLLX_LSB 0x308
|
||||
#define BG_SCROLLX_MSB 0x309
|
||||
@ -16,9 +17,12 @@
|
||||
#define BG_PAL_INTENSITY_RG 0x1fe
|
||||
#define BG_PAL_INTENSITY_BU 0x1ff
|
||||
|
||||
static int ps5_vram_page;
|
||||
static int bg_clip_mode;
|
||||
static int title_screen;
|
||||
static UINT8 ps5_vram_page;
|
||||
static UINT8 bg_clip_mode;
|
||||
static UINT8 title_screen;
|
||||
static UINT8 psychic5_bg_status;
|
||||
|
||||
static UINT8 *ps5_pagedram[2];
|
||||
|
||||
/* Paged RAM 0 */
|
||||
static UINT8 *psychic5_bg_videoram;
|
||||
@ -31,287 +35,308 @@ static UINT8 *psychic5_fg_videoram;
|
||||
|
||||
static tilemap *bg_tilemap, *fg_tilemap;
|
||||
|
||||
MACHINE_RESET( psychic5 )
|
||||
static int bg_palette_ram_base;
|
||||
static int bg_palette_base;
|
||||
|
||||
static UINT16 palette_intensity;
|
||||
|
||||
static UINT8 bombsa_unknown;
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
Palette color
|
||||
***************************************************************************/
|
||||
|
||||
static void psychic5_change_palette(running_machine *machine, int color, int offset)
|
||||
{
|
||||
bg_clip_mode = -10;
|
||||
flip_screen_set(0);
|
||||
UINT8 lo = ps5_palette_ram[offset & ~1];
|
||||
UINT8 hi = ps5_palette_ram[offset | 1];
|
||||
if (jal_blend_table != NULL) jal_blend_table[color] = hi & 0x0f;
|
||||
palette_set_color_rgb(machine, color, pal4bit(lo >> 4), pal4bit(lo), pal4bit(hi >> 4));
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( psychic5_vram_page_select_w )
|
||||
static void psychic5_change_bg_palette(running_machine *machine, int color, int lo_offs, int hi_offs)
|
||||
{
|
||||
ps5_vram_page = data;
|
||||
UINT8 r,g,b,lo,hi,ir,ig,ib,ix;
|
||||
rgb_t irgb;
|
||||
|
||||
/* red,green,blue intensities */
|
||||
ir = pal4bit(palette_intensity >> 12);
|
||||
ig = pal4bit(palette_intensity >> 8);
|
||||
ib = pal4bit(palette_intensity >> 4);
|
||||
ix = palette_intensity & 0x0f;
|
||||
|
||||
irgb = MAKE_RGB(ir,ig,ib);
|
||||
|
||||
lo = ps5_palette_ram[lo_offs];
|
||||
hi = ps5_palette_ram[hi_offs];
|
||||
|
||||
/* red,green,blue component */
|
||||
r = pal4bit(lo >> 4);
|
||||
g = pal4bit(lo);
|
||||
b = pal4bit(hi >> 4);
|
||||
|
||||
/* Grey background enable */
|
||||
if (psychic5_bg_status & 2)
|
||||
{
|
||||
UINT8 val = (r + g + b) / 3; /* Grey */
|
||||
/* Just leave plain grey */
|
||||
palette_set_color(machine,color,jal_blend_func(MAKE_RGB(val,val,val),irgb,ix));
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Seems fishy, but the title screen would be black otherwise... */
|
||||
if (!(title_screen & 1))
|
||||
{
|
||||
/* Leave the world as-is */
|
||||
palette_set_color(machine,color,jal_blend_func(MAKE_RGB(r,g,b),irgb,ix));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void set_background_palette_intensity(running_machine *machine)
|
||||
{
|
||||
int i;
|
||||
palette_intensity = ps5_palette_ram[BG_PAL_INTENSITY_BU] |
|
||||
(ps5_palette_ram[BG_PAL_INTENSITY_RG]<<8);
|
||||
|
||||
/* for all of the background palette */
|
||||
for (i = 0; i < 0x100; i++)
|
||||
psychic5_change_bg_palette(machine,bg_palette_base+i,bg_palette_ram_base+i*2,bg_palette_ram_base+i*2+1);
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
Memory handler
|
||||
***************************************************************************/
|
||||
|
||||
READ8_HANDLER( psychic5_vram_page_select_r )
|
||||
{
|
||||
return ps5_vram_page;
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( psychic5_vram_page_select_w )
|
||||
{
|
||||
ps5_vram_page = data & 1;
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( psychic5_title_screen_w )
|
||||
{
|
||||
title_screen = data & 0x01;
|
||||
}
|
||||
|
||||
static void psychic5_paletteram_w(running_machine *machine, int color_offs, int offset, int data)
|
||||
{
|
||||
int r,g,b,a,val;
|
||||
|
||||
ps5_palette_ram[offset] = data;
|
||||
|
||||
/* red component */
|
||||
r = (ps5_palette_ram[offset & ~1] >> 4) & 0x0f ;
|
||||
|
||||
/* green component */
|
||||
g = (ps5_palette_ram[offset & ~1]) & 0x0f ;
|
||||
|
||||
/* blue component */
|
||||
b = (ps5_palette_ram[offset | 1] >> 4) & 0x0f ;
|
||||
|
||||
/* "alpha" component */
|
||||
val = (ps5_palette_ram[offset | 1] & 0x0f) & 0x0f ;
|
||||
a = (val << 4) | val ;
|
||||
|
||||
jal_blend_table[(offset / 2)-color_offs] = a ;
|
||||
|
||||
palette_set_color_rgb(machine,(offset / 2)-color_offs,pal4bit(r),pal4bit(g),pal4bit(b));
|
||||
}
|
||||
|
||||
static void set_background_palette_intensity(running_machine *machine)
|
||||
{
|
||||
int i,r,g,b,val,lo,hi,ir,ig,ib,ix;
|
||||
|
||||
/* red,green,blue intensites */
|
||||
ir = ps5_palette_ram[BG_PAL_INTENSITY_RG] >> 4 ; ir = (ir << 4) | ir ;
|
||||
ig = ps5_palette_ram[BG_PAL_INTENSITY_RG] & 15 ; ig = (ig << 4) | ig ;
|
||||
ib = ps5_palette_ram[BG_PAL_INTENSITY_BU] >> 4 ; ib = (ib << 4) | ib ;
|
||||
ix = ps5_palette_ram[0x1ff] & 0x0f ;
|
||||
|
||||
/* for all of the background palette */
|
||||
for (i = 0; i < 0x100; i++)
|
||||
{
|
||||
lo = ps5_palette_ram[0x400+i*2];
|
||||
hi = ps5_palette_ram[0x400+i*2+1];
|
||||
|
||||
/* red component */
|
||||
val = (lo >> 4) & 0x0f;
|
||||
r = (val << 4) | val ;
|
||||
|
||||
/* green component */
|
||||
val = (lo & 15) & 0x0f;
|
||||
g = (val << 4) | val ;
|
||||
|
||||
/* blue component */
|
||||
val = (hi >> 4) & 0x0f;
|
||||
b = (val << 4) | val ;
|
||||
|
||||
/* Grey background enable */
|
||||
if (ps5_io_ram[BG_SCREEN_MODE] & 0x02)
|
||||
{
|
||||
val = (UINT8)((r + g + b) / 3); /* Grey */
|
||||
|
||||
if (ix != 0x0) /* Tint the grey */
|
||||
{
|
||||
UINT32 result = jal_blend_func(MAKE_RGB(val,val,val), MAKE_RGB(ir, ig, ib), jal_blend_table[0xff]) ;
|
||||
palette_set_color(machine, 0x100+i, result) ;
|
||||
}
|
||||
else /* Just leave plain grey */
|
||||
{
|
||||
palette_set_color(machine,0x100+i,MAKE_RGB(val,val,val));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Seems fishy, but the title screen would be black otherwise... */
|
||||
if (!title_screen)
|
||||
{
|
||||
if (ix != 0x0) /* Tint the world */
|
||||
{
|
||||
UINT32 result = jal_blend_func(MAKE_RGB(r, g, b), MAKE_RGB(ir, ig, ib), jal_blend_table[0xff]) ;
|
||||
palette_set_color(machine, 0x100+i, result) ;
|
||||
}
|
||||
else /* Leave the world as-is */
|
||||
{
|
||||
palette_set_color(machine,0x100+i,MAKE_RGB(r,g,b)) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static WRITE8_HANDLER( psychic5_bg_videoram_w )
|
||||
{
|
||||
psychic5_bg_videoram[offset] = data;
|
||||
tilemap_mark_tile_dirty(bg_tilemap, offset / 2);
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( psychic5_fg_videoram_w )
|
||||
{
|
||||
psychic5_fg_videoram[offset] = data;
|
||||
tilemap_mark_tile_dirty(fg_tilemap, offset / 2);
|
||||
title_screen = data;
|
||||
}
|
||||
|
||||
READ8_HANDLER( psychic5_paged_ram_r )
|
||||
{
|
||||
int val;
|
||||
if (ps5_vram_page == 1)
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
case 0x00: return input_port_read(machine, "SYSTEM");
|
||||
case 0x01: return input_port_read(machine, "P1");
|
||||
case 0x02: return input_port_read(machine, "P2");
|
||||
case 0x03: return input_port_read(machine, "DSW1");
|
||||
case 0x04: return input_port_read(machine, "DSW2");
|
||||
}
|
||||
}
|
||||
|
||||
if (!ps5_vram_page)
|
||||
{
|
||||
if (offset < 0x1000)
|
||||
return psychic5_bg_videoram[offset];
|
||||
else
|
||||
return ps5_dummy_bg_ram[offset & 0xfff];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (offset < 0x400)
|
||||
{
|
||||
val = 0;
|
||||
switch(offset)
|
||||
{
|
||||
case 0x00:
|
||||
val = input_port_read(machine, "IN0");
|
||||
break;
|
||||
case 0x01:
|
||||
val = input_port_read(machine, "P1");
|
||||
break;
|
||||
case 0x02:
|
||||
val = input_port_read(machine, "P2");
|
||||
break;
|
||||
case 0x03:
|
||||
val = input_port_read(machine, "DSW0");
|
||||
break;
|
||||
case 0x04:
|
||||
val = input_port_read(machine, "DSW1");
|
||||
break;
|
||||
default:
|
||||
val = ps5_io_ram[offset];
|
||||
}
|
||||
return (val);
|
||||
}
|
||||
else if (offset < 0x1000)
|
||||
{
|
||||
return ps5_palette_ram[offset-0x400];
|
||||
}
|
||||
else
|
||||
{
|
||||
return psychic5_fg_videoram[offset & 0xfff];
|
||||
}
|
||||
}
|
||||
return ps5_pagedram[ps5_vram_page][offset];
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( psychic5_paged_ram_w )
|
||||
{
|
||||
if (!ps5_vram_page)
|
||||
ps5_pagedram[ps5_vram_page][offset] = data;
|
||||
|
||||
if (ps5_vram_page == 0)
|
||||
{
|
||||
if (offset < 0x1000)
|
||||
psychic5_bg_videoram_w(machine,offset,data);
|
||||
else
|
||||
ps5_dummy_bg_ram[offset & 0xfff] = data;
|
||||
if (offset <= 0xfff)
|
||||
tilemap_mark_tile_dirty(bg_tilemap, offset >> 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (offset < 0x400)
|
||||
if (offset == BG_SCROLLX_LSB || offset == BG_SCROLLX_MSB)
|
||||
{
|
||||
ps5_io_ram[offset] = data;
|
||||
UINT16 bg_scrollx = ps5_io_ram[BG_SCROLLX_LSB] | (ps5_io_ram[BG_SCROLLX_MSB] << 8);
|
||||
tilemap_set_scrollx(bg_tilemap, 0, bg_scrollx);
|
||||
}
|
||||
else if (offset < 0x600)
|
||||
else if (offset == BG_SCROLLY_LSB || offset == BG_SCROLLY_MSB)
|
||||
{
|
||||
psychic5_paletteram_w(machine, 000, offset-0x400, data);
|
||||
UINT16 bg_scrolly = ps5_io_ram[BG_SCROLLY_LSB] | (ps5_io_ram[BG_SCROLLY_MSB] << 8);
|
||||
tilemap_set_scrolly(bg_tilemap, 0, bg_scrolly);
|
||||
}
|
||||
else if (offset > 0x5ff && offset< 0x800)
|
||||
else if (offset == BG_SCREEN_MODE)
|
||||
{
|
||||
ps5_palette_ram[offset-0x400] = data;
|
||||
}
|
||||
else if (offset > 0x7ff && offset < 0xa00)
|
||||
{
|
||||
psychic5_paletteram_w(machine, 256, offset-0x400, data);
|
||||
}
|
||||
else if (offset > 0x9ff && offset < 0xc00)
|
||||
{
|
||||
psychic5_paletteram_w(machine, 256, offset-0x400, data);
|
||||
}
|
||||
else if (offset < 0x1000)
|
||||
{
|
||||
ps5_palette_ram[offset-0x400] = data;
|
||||
}
|
||||
else
|
||||
{
|
||||
psychic5_fg_videoram_w(machine, offset & 0xfff, data);
|
||||
psychic5_bg_status = ps5_io_ram[BG_SCREEN_MODE];
|
||||
}
|
||||
else if (offset >= 0x400 && offset <= 0x5ff) /* Sprite color */
|
||||
psychic5_change_palette(machine,((offset >> 1) & 0xff)+0x000,offset-0x400);
|
||||
else if (offset >= 0x800 && offset <= 0x9ff) /* BG color */
|
||||
psychic5_change_palette(machine,((offset >> 1) & 0xff)+0x100,offset-0x400);
|
||||
else if (offset >= 0xa00 && offset <= 0xbff) /* Text color */
|
||||
psychic5_change_palette(machine,((offset >> 1) & 0xff)+0x200,offset-0x400);
|
||||
else if (offset >= 0x1000)
|
||||
tilemap_mark_tile_dirty(fg_tilemap, (offset-0x1000) >> 1);
|
||||
}
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( bombsa_paged_ram_w )
|
||||
{
|
||||
ps5_pagedram[ps5_vram_page][offset] = data;
|
||||
|
||||
if (ps5_vram_page == 0)
|
||||
{
|
||||
tilemap_mark_tile_dirty(bg_tilemap, offset >> 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (offset == BG_SCROLLX_LSB || offset == BG_SCROLLX_MSB)
|
||||
{
|
||||
UINT16 bg_scrollx = ps5_io_ram[BG_SCROLLX_LSB] | (ps5_io_ram[BG_SCROLLX_MSB] << 8);
|
||||
tilemap_set_scrollx(bg_tilemap, 0, bg_scrollx);
|
||||
}
|
||||
else if (offset == BG_SCROLLY_LSB || offset == BG_SCROLLY_MSB)
|
||||
{
|
||||
UINT16 bg_scrolly = ps5_io_ram[BG_SCROLLY_LSB] | (ps5_io_ram[BG_SCROLLY_MSB] << 8);
|
||||
tilemap_set_scrolly(bg_tilemap, 0, bg_scrolly);
|
||||
}
|
||||
else if (offset == BG_SCREEN_MODE)
|
||||
{
|
||||
psychic5_bg_status = ps5_io_ram[BG_SCREEN_MODE];
|
||||
}
|
||||
else if (offset >= 0x0800 && offset <= 0x0fff)
|
||||
tilemap_mark_tile_dirty(fg_tilemap, (offset & 0x7ff) >> 1);
|
||||
else if (offset >= 0x1000 && offset <= 0x15ff)
|
||||
psychic5_change_palette(machine, (offset >> 1) & 0x3ff, offset-0x1000);
|
||||
}
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( bombsa_unknown_w )
|
||||
{
|
||||
bombsa_unknown = data;
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
Callbacks for the tilemap code
|
||||
***************************************************************************/
|
||||
|
||||
static TILE_GET_INFO( get_bg_tile_info )
|
||||
{
|
||||
int offs = tile_index * 2;
|
||||
int offs = tile_index << 1;
|
||||
int attr = psychic5_bg_videoram[offs + 1];
|
||||
int code = psychic5_bg_videoram[offs] + ((attr & 0xc0) << 2);
|
||||
int code = psychic5_bg_videoram[offs] | ((attr & 0xc0) << 2);
|
||||
int color = attr & 0x0f;
|
||||
int flags = ((attr & 0x10) ? TILE_FLIPX : 0) + ((attr & 0x20) ? TILE_FLIPY : 0);
|
||||
int flags = TILE_FLIPYX((attr & 0x30) >> 4);
|
||||
|
||||
SET_TILE_INFO(1, code, color, flags);
|
||||
}
|
||||
|
||||
static TILE_GET_INFO( get_fg_tile_info )
|
||||
{
|
||||
int offs = tile_index * 2;
|
||||
int offs = tile_index << 1;
|
||||
int attr = psychic5_fg_videoram[offs + 1];
|
||||
int code = psychic5_fg_videoram[offs] + ((attr & 0xc0) << 2);
|
||||
int code = psychic5_fg_videoram[offs] | ((attr & 0xc0) << 2);
|
||||
int color = attr & 0x0f;
|
||||
int flags = ((attr & 0x10) ? TILE_FLIPX : 0) + ((attr & 0x20) ? TILE_FLIPY : 0);
|
||||
int flags = TILE_FLIPYX((attr & 0x30) >> 4);
|
||||
|
||||
SET_TILE_INFO(2, code, color, flags);
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
Initialize and destroy video hardware emulation
|
||||
***************************************************************************/
|
||||
|
||||
VIDEO_START( psychic5 )
|
||||
{
|
||||
psychic5_bg_videoram = auto_malloc(0x1000);
|
||||
psychic5_fg_videoram = auto_malloc(0x1000);
|
||||
ps5_dummy_bg_ram = auto_malloc(0x1000);
|
||||
ps5_io_ram = auto_malloc(0x400);
|
||||
ps5_palette_ram = auto_malloc(0xc00);
|
||||
jal_blend_table = auto_malloc(0xc00);
|
||||
|
||||
memset(psychic5_bg_videoram, 0,0x1000);
|
||||
memset(psychic5_fg_videoram,0,0x1000);
|
||||
memset(ps5_dummy_bg_ram,0,0x1000);
|
||||
memset(ps5_io_ram,0,0x400);
|
||||
memset(ps5_palette_ram,0,0xc00);
|
||||
memset(jal_blend_table,0,0xc00) ;
|
||||
|
||||
bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols,
|
||||
16, 16, 64, 32);
|
||||
|
||||
fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_cols,
|
||||
8, 8, 32, 32);
|
||||
/* info offset w h col row */
|
||||
bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols, 16, 16, 64, 32);
|
||||
fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_cols, 8, 8, 32, 32);
|
||||
|
||||
tilemap_set_transparent_pen(fg_tilemap, 15);
|
||||
|
||||
ps5_pagedram[0] = auto_malloc(0x2000);
|
||||
ps5_pagedram[1] = auto_malloc(0x2000);
|
||||
|
||||
psychic5_bg_videoram = &ps5_pagedram[0][0x0000];
|
||||
ps5_dummy_bg_ram = &ps5_pagedram[0][0x1000];
|
||||
ps5_io_ram = &ps5_pagedram[1][0x0000];
|
||||
ps5_palette_ram = &ps5_pagedram[1][0x0400];
|
||||
psychic5_fg_videoram = &ps5_pagedram[1][0x1000];
|
||||
|
||||
jal_blend_table = auto_malloc(0xc00);
|
||||
|
||||
bg_palette_ram_base = 0x400;
|
||||
bg_palette_base = 0x100;
|
||||
}
|
||||
|
||||
#define DRAW_SPRITE(code, sx, sy) jal_blend_drawgfx(machine, bitmap, machine->gfx[0], code, color, flipx, flipy, sx, sy, cliprect, TRANSPARENCY_PEN, 15);
|
||||
/* #define DRAW_SPRITE(code, sx, sy) drawgfx(bitmap, machine->gfx[0], code, color, flipx, flipy, sx, sy, cliprect, TRANSPARENCY_PEN, 15); */
|
||||
VIDEO_START( bombsa )
|
||||
{
|
||||
/* info offset w h col row */
|
||||
bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols, 16, 16, 128, 32);
|
||||
fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_cols, 8, 8, 32, 32);
|
||||
|
||||
static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect )
|
||||
tilemap_set_transparent_pen(fg_tilemap, 15);
|
||||
|
||||
ps5_pagedram[0] = auto_malloc(0x2000);
|
||||
ps5_pagedram[1] = auto_malloc(0x2000);
|
||||
|
||||
psychic5_bg_videoram = &ps5_pagedram[0][0x0000];
|
||||
ps5_dummy_bg_ram = &ps5_pagedram[0][0x1000];
|
||||
ps5_io_ram = &ps5_pagedram[1][0x0000];
|
||||
psychic5_fg_videoram = &ps5_pagedram[1][0x0800];
|
||||
ps5_palette_ram = &ps5_pagedram[1][0x1000];
|
||||
|
||||
//jal_blend_table = auto_malloc(0xc00);
|
||||
jal_blend_table = NULL;
|
||||
|
||||
bg_palette_ram_base = 0x000;
|
||||
bg_palette_base = 0x000;
|
||||
}
|
||||
|
||||
VIDEO_RESET( psychic5 )
|
||||
{
|
||||
bg_clip_mode = 0;
|
||||
ps5_vram_page = 0;
|
||||
psychic5_bg_status = 0;
|
||||
memset(ps5_pagedram[0],0,0x2000);
|
||||
memset(ps5_pagedram[1],0,0x2000);
|
||||
palette_intensity = 0;
|
||||
if (jal_blend_table != NULL) memset(jal_blend_table,0,0xc00);
|
||||
}
|
||||
|
||||
VIDEO_RESET( bombsa )
|
||||
{
|
||||
ps5_vram_page = 0;
|
||||
psychic5_bg_status = 0;
|
||||
title_screen = 0;
|
||||
memset(ps5_pagedram[0],0,0x2000);
|
||||
memset(ps5_pagedram[1],0,0x2000);
|
||||
palette_intensity = 0;
|
||||
if (jal_blend_table != NULL) memset(jal_blend_table,0,0xc00);
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
Screen refresh
|
||||
***************************************************************************/
|
||||
|
||||
#define DRAW_SPRITE(code, sx, sy) jal_blend_drawgfx(machine, bitmap, machine->gfx[0], code, color, flipx, flipy, sx, sy, cliprect, TRANSPARENCY_PEN, 15);
|
||||
|
||||
static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect)
|
||||
{
|
||||
int offs;
|
||||
|
||||
if (title_screen)
|
||||
return;
|
||||
else
|
||||
bg_clip_mode = -10;
|
||||
|
||||
for (offs = 11; offs < spriteram_size; offs += 16)
|
||||
/* Draw the sprites */
|
||||
for (offs = 0; offs < spriteram_size; offs += 16)
|
||||
{
|
||||
int tileofs0, tileofs1, tileofs2, tileofs3, temp1, temp2;
|
||||
int attr = spriteram[offs + 2];
|
||||
int code = spriteram[offs + 3] + ((attr & 0xc0) << 2);
|
||||
int color = spriteram[offs + 4] & 0x0f;
|
||||
int attr = spriteram[offs + 13];
|
||||
int code = spriteram[offs + 14] | ((attr & 0xc0) << 2);
|
||||
int color = spriteram[offs + 15] & 0x0f;
|
||||
int flipx = attr & 0x10;
|
||||
int flipy = attr & 0x20;
|
||||
int sx = spriteram[offs + 1];
|
||||
int sy = spriteram[offs];
|
||||
int size32 = attr & 0x08;
|
||||
int sx = spriteram[offs + 12];
|
||||
int sy = spriteram[offs + 11];
|
||||
int size = (attr & 0x08) ? 32:16;
|
||||
|
||||
if (attr & 0x01) sx -= 256;
|
||||
if (attr & 0x04) sy -= 256;
|
||||
@ -324,31 +349,20 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta
|
||||
flipy = !flipy;
|
||||
}
|
||||
|
||||
if (flipy)
|
||||
if (size == 32)
|
||||
{
|
||||
tileofs0 = 1; tileofs1 = 0; tileofs2 = 3; tileofs3 = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
tileofs0 = 0; tileofs1 = 1; tileofs2 = 2; tileofs3 = 3;
|
||||
}
|
||||
int x0,x1,y0,y1;
|
||||
|
||||
if (flipx)
|
||||
{
|
||||
temp1 = tileofs0;
|
||||
temp2 = tileofs1;
|
||||
tileofs0 = tileofs2;
|
||||
tileofs1 = tileofs3;
|
||||
tileofs2 = temp1;
|
||||
tileofs3 = temp2;
|
||||
}
|
||||
if (flipx) { x0 = 2; x1 = 0; }
|
||||
else { x0 = 0; x1 = 2; }
|
||||
|
||||
if (size32)
|
||||
{
|
||||
DRAW_SPRITE(code + tileofs0, sx, sy)
|
||||
DRAW_SPRITE(code + tileofs1, sx, sy + 16)
|
||||
DRAW_SPRITE(code + tileofs2, sx + 16, sy)
|
||||
DRAW_SPRITE(code + tileofs3, sx + 16, sy + 16)
|
||||
if (flipy) { y0 = 1; y1 = 0; }
|
||||
else { y0 = 0; y1 = 1; }
|
||||
|
||||
DRAW_SPRITE(code + x0 + y0, sx, sy)
|
||||
DRAW_SPRITE(code + x0 + y1, sx, sy + 16)
|
||||
DRAW_SPRITE(code + x1 + y0, sx + 16, sy)
|
||||
DRAW_SPRITE(code + x1 + y1, sx + 16, sy + 16)
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -360,106 +374,89 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta
|
||||
}
|
||||
}
|
||||
|
||||
static void draw_background(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect )
|
||||
static void draw_background(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect)
|
||||
{
|
||||
int bg_scrollx = (ps5_io_ram[BG_SCROLLX_LSB] + ((ps5_io_ram[BG_SCROLLX_MSB] & 0x03) << 8)) & 0x3ff;
|
||||
int bg_scrolly = (ps5_io_ram[BG_SCROLLY_LSB] + ((ps5_io_ram[BG_SCROLLY_MSB] & 0x01) << 8)) & 0x1ff;
|
||||
static int sx1 = 0, sy1 = 0, sy2 = 0;
|
||||
|
||||
tilemap_set_scrollx(bg_tilemap, 0, bg_scrollx);
|
||||
tilemap_set_scrolly(bg_tilemap, 0, bg_scrolly);
|
||||
rectangle clip = *cliprect;
|
||||
|
||||
set_background_palette_intensity(machine);
|
||||
|
||||
if (ps5_io_ram[BG_SCREEN_MODE] & 0x01) /* background enable */
|
||||
if (!(title_screen & 1))
|
||||
{
|
||||
if (title_screen)
|
||||
{
|
||||
rectangle clip = *cliprect;
|
||||
|
||||
int sx1 = spriteram[12]; /* sprite 0 */
|
||||
int sy1 = spriteram[11];
|
||||
int tile = spriteram[14];
|
||||
int sy2 = spriteram[11+128]; /* sprite 8 */
|
||||
|
||||
if (bg_clip_mode >=0 && bg_clip_mode < 3 && sy1==240) bg_clip_mode = 0;
|
||||
if (bg_clip_mode > 2 && bg_clip_mode < 5 && sy2==240) bg_clip_mode = -10;
|
||||
if (bg_clip_mode > 4 && bg_clip_mode < 7 && sx1==240) bg_clip_mode = 0;
|
||||
if (bg_clip_mode > 6 && bg_clip_mode < 9 && (sx1==240 || sx1==0)) bg_clip_mode = -10;
|
||||
|
||||
if (sy1!=240 && sy1!=0 && bg_clip_mode<=0)
|
||||
{
|
||||
if (sy1 > 128)
|
||||
bg_clip_mode = 1;
|
||||
else
|
||||
bg_clip_mode = 2;
|
||||
}
|
||||
|
||||
if (sy2!=240 && sy2!=0 && bg_clip_mode<=0)
|
||||
{
|
||||
if (sy2 > 128)
|
||||
bg_clip_mode = 3;
|
||||
else
|
||||
bg_clip_mode = 4;
|
||||
}
|
||||
|
||||
if (sx1!=240 && sx1!=0 && bg_clip_mode<=0 && tile==0x3c)
|
||||
{
|
||||
if (sx1 > 128)
|
||||
bg_clip_mode = 5;
|
||||
else
|
||||
bg_clip_mode = 6;
|
||||
}
|
||||
|
||||
if (sx1!=240 && sx1!=0 && bg_clip_mode<=0 && tile==0x1c)
|
||||
{
|
||||
if (sx1 > 128)
|
||||
bg_clip_mode = 7;
|
||||
else
|
||||
bg_clip_mode = 8;
|
||||
}
|
||||
|
||||
if (bg_clip_mode)
|
||||
{
|
||||
if (bg_clip_mode == 1)
|
||||
clip.min_y = sy1;
|
||||
else if (bg_clip_mode == 2)
|
||||
clip.max_y = sy1;
|
||||
else if (bg_clip_mode == 3)
|
||||
clip.max_y = sy2;
|
||||
else if (bg_clip_mode == 4)
|
||||
clip.min_y = sy2;
|
||||
else if (bg_clip_mode == 5)
|
||||
clip.min_x = sx1;
|
||||
else if (bg_clip_mode == 6)
|
||||
clip.max_x = sx1;
|
||||
else if (bg_clip_mode == 7)
|
||||
clip.max_x = sx1;
|
||||
else if (bg_clip_mode == 8)
|
||||
clip.min_x = sx1;
|
||||
else if (bg_clip_mode == -10)
|
||||
{
|
||||
clip.min_x = 0;
|
||||
clip.min_y = 0;
|
||||
clip.max_x = 0;
|
||||
clip.max_y = 0;
|
||||
}
|
||||
|
||||
fillbitmap(bitmap, get_black_pen(machine), cliprect);
|
||||
tilemap_draw(bitmap, &clip, bg_tilemap, 0, 0);
|
||||
}
|
||||
else
|
||||
tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0);
|
||||
}
|
||||
else
|
||||
tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0);
|
||||
bg_clip_mode = 0;
|
||||
sx1 = sy1 = sy2 = 0;
|
||||
}
|
||||
else
|
||||
fillbitmap(bitmap, get_black_pen(machine), cliprect);
|
||||
{
|
||||
int sy1_old = sy1;
|
||||
int sx1_old = sx1;
|
||||
int sy2_old = sy2;
|
||||
|
||||
sy1 = spriteram[11]; /* sprite 0 */
|
||||
sx1 = spriteram[12];
|
||||
sy2 = spriteram[11+128]; /* sprite 8 */
|
||||
|
||||
switch (bg_clip_mode)
|
||||
{
|
||||
case 0: case 4: if (sy1_old != sy1) bg_clip_mode++; break;
|
||||
case 2: case 6: if (sy2_old != sy2) bg_clip_mode++; break;
|
||||
case 8: case 10:
|
||||
case 12: case 14: if (sx1_old != sx1) bg_clip_mode++; break;
|
||||
case 1: case 5: if (sy1 == 0xf0) bg_clip_mode++; break;
|
||||
case 3: case 7: if (sy2 == 0xf0) bg_clip_mode++; break;
|
||||
case 9: case 11: if (sx1 == 0xf0) bg_clip_mode++; break;
|
||||
case 13: case 15: if (sx1_old == 0xf0) bg_clip_mode++;
|
||||
case 16: if (sy1 != 0x00) bg_clip_mode = 0; break;
|
||||
}
|
||||
|
||||
switch (bg_clip_mode)
|
||||
{
|
||||
case 0: case 4: case 8: case 12: case 16:
|
||||
clip.min_x = clip.max_x = clip.min_y = clip.max_y = 0;
|
||||
break;
|
||||
case 1: clip.min_y = sy1; break;
|
||||
case 3: clip.max_y = sy2; break;
|
||||
case 5: clip.max_y = sy1; break;
|
||||
case 7: clip.min_y = sy2; break;
|
||||
case 9: case 15: clip.min_x = sx1; break;
|
||||
case 11: case 13: clip.max_x = sx1; break;
|
||||
}
|
||||
|
||||
if (flip_screen_get())
|
||||
{
|
||||
int min_x,max_x,min_y,max_y;
|
||||
min_x = 255 - clip.max_x;
|
||||
max_x = 255 - clip.min_x;
|
||||
min_y = 255 - clip.max_y;
|
||||
max_y = 255 - clip.min_y;
|
||||
clip.min_x = min_x;
|
||||
clip.max_x = max_x;
|
||||
clip.min_y = min_y;
|
||||
clip.max_y = max_y;
|
||||
}
|
||||
}
|
||||
|
||||
tilemap_draw(bitmap, &clip, bg_tilemap, 0, 0);
|
||||
}
|
||||
|
||||
VIDEO_UPDATE( psychic5 )
|
||||
{
|
||||
draw_background(screen->machine, bitmap, cliprect);
|
||||
fillbitmap(bitmap, get_black_pen(screen->machine), cliprect);
|
||||
if (psychic5_bg_status & 1) /* Backgound enable */
|
||||
draw_background(screen->machine, bitmap, cliprect);
|
||||
if (!(title_screen & 1))
|
||||
draw_sprites(screen->machine, bitmap, cliprect);
|
||||
tilemap_draw(bitmap, cliprect, fg_tilemap, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIDEO_UPDATE( bombsa )
|
||||
{
|
||||
if (psychic5_bg_status & 1) /* Backgound enable */
|
||||
tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0);
|
||||
else
|
||||
fillbitmap(bitmap, screen->machine->pens[0x0ff], cliprect);
|
||||
draw_sprites(screen->machine, bitmap, cliprect);
|
||||
tilemap_draw(bitmap, cliprect, fg_tilemap, 0, 0);
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user