palette format is also different (nw)

This commit is contained in:
David Haywood 2013-11-21 04:14:11 +00:00
parent e006d2d71b
commit 2a38f691dd
3 changed files with 151 additions and 4 deletions

View File

@ -534,6 +534,29 @@ static ADDRESS_MAP_START( spyhunt_portmap, AS_IO, 8, mcr3_state )
AM_RANGE(0xf0, 0xf3) AM_DEVREADWRITE("ctc", z80ctc_device, read, write)
ADDRESS_MAP_END
static ADDRESS_MAP_START( spyhuntpr_map, AS_PROGRAM, 8, mcr3_state )
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x0000, 0xdfff) AM_ROM
AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(spyhunt_videoram_w) AM_SHARE("videoram")
AM_RANGE(0xe800, 0xebff) AM_MIRROR(0x0400) AM_RAM_WRITE(spyhunt_alpharam_w) AM_SHARE("spyhunt_alpha")
AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_SHARE("nvram")
AM_RANGE(0xf800, 0xf9ff) AM_RAM AM_SHARE("spriteram")
AM_RANGE(0xfb80, 0xfbff) AM_RAM AM_WRITE(spyhuntpr_paletteram_w) AM_SHARE("paletteram")
AM_RANGE(0xfc00, 0xfc00) AM_READ_PORT("IN0")
AM_RANGE(0xfc01, 0xfc01) AM_READ_PORT("IN1")
AM_RANGE(0xfc02, 0xfc02) AM_READ_PORT("IN2")
AM_RANGE(0xfc03, 0xfc03) AM_READ_PORT("IN3")
// AM_RANGE(0xfc01, 0xfc01) AM_READ_PORT("IN3")
// AM_RANGE(0xfa80, 0xfdff) AM_RAM
AM_RANGE(0xfe00, 0xffff) AM_RAM // a modified copy of spriteram for this hw??
ADDRESS_MAP_END
static ADDRESS_MAP_START( spyhuntpr_portmap, AS_IO, 8, mcr3_state )
ADDRESS_MAP_UNMAP_HIGH
ADDRESS_MAP_GLOBAL_MASK(0xff)
@ -942,6 +965,111 @@ static INPUT_PORTS_START( spyhunt )
PORT_BIT( 0xff, 0x74, IPT_PADDLE ) PORT_MINMAX(0x34,0xb4) PORT_SENSITIVITY(40) PORT_KEYDELTA(10)
INPUT_PORTS_END
static INPUT_PORTS_START( spyhuntpr )
PORT_START("IN0")
PORT_DIPNAME( 0x0001, 0x0001, "0" )
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_START("IN1")
PORT_DIPNAME( 0x0001, 0x0001, "1" )
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_START("IN2")
PORT_DIPNAME( 0x0001, 0x0001, "2" )
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_START("IN3")
PORT_DIPNAME( 0x0001, 0x0001, "3" )
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0008, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
INPUT_PORTS_END
/* not verified, no manual found */
static INPUT_PORTS_START( crater )
@ -1106,7 +1234,7 @@ static const gfx_layout spyhuntpr_charlayout =
64,16,
RGN_FRAC(1,8),
4,
{ 0, 2*8, 0x4000*8 + 0, 0x4000*8 + 2*8},
{ 0*8, 0x4000*8 + 2*8, 0x4000*8 + 0*8, 2*8 },
EXTENDED_XOFFS,
{ 0*8, 4*8, 8*8, 12*8, 16*8, 20*8, 24*8, 28*8, 1*8, 5*8, 9*8, 13*8, 17*8, 21*8, 25*8, 29*8 },
32*8,
@ -1259,7 +1387,7 @@ static MACHINE_CONFIG_START( spyhuntpr, mcr3_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/4)
MCFG_CPU_PROGRAM_MAP(spyhunt_map)
MCFG_CPU_PROGRAM_MAP(spyhuntpr_map)
MCFG_CPU_IO_MAP(spyhuntpr_portmap)
MCFG_CPU_CONFIG(mcr_daisy_chain)
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", mcr3_state, mcr_interrupt, "screen", 0, 1)
@ -1587,7 +1715,7 @@ ROM_START( spyhuntpr )
ROM_LOAD( "5.bin", 0x0000, 0x2000, CRC(33fe2829) SHA1(e6950dbf681242bf23542ca6604e62eacb431101) )
ROM_REGION( 0x08000, "gfx1", 0 )
ROM_REGION( 0x08000, "gfx1", ROMREGION_INVERT )
ROM_LOAD32_BYTE( "6.bin", 0x0000, 0x200, CRC(6b76f46a) SHA1(4b398084c42a60fcfa4a9bf14f844e36a3f42723) )
ROM_CONTINUE(0x0001, 0x200)
ROM_CONTINUE(0x0800, 0x200)
@ -1880,6 +2008,6 @@ GAME( 1987, stargrds, 0, mono_sg, stargrds, mcr3_state, stargrds, ROT0,
/* MCR scrolling games */
GAMEL(1983, spyhunt, 0, mcrsc_csd, spyhunt, mcr3_state, spyhunt, ROT90, "Bally Midway", "Spy Hunter", GAME_SUPPORTS_SAVE, layout_spyhunt )
GAMEL(1983, spyhuntp, spyhunt, mcrsc_csd, spyhunt, mcr3_state, spyhunt, ROT90, "Bally Midway (Playtronic license)", "Spy Hunter (Playtronic license)", GAME_SUPPORTS_SAVE, layout_spyhunt )
GAME (1983, spyhuntpr, spyhunt, spyhuntpr, spyhunt, mcr3_state, spyhuntpr, ROT90, "Bally Midway", "Spy Hunter (prototype)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) // or bootleg??
GAME (1983, spyhuntpr,spyhunt, spyhuntpr, spyhuntpr,mcr3_state, spyhuntpr,ROT90, "Bally Midway", "Spy Hunter (bootleg / prototype of low cost PCB?)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) // PCB made in Valencia Spain? has Bally Midway logo, but board is dated '85' and it seems very 'unofficial'
GAME( 1984, crater, 0, mcrscroll, crater, mcr3_state, crater, ORIENTATION_FLIP_X, "Bally Midway", "Crater Raider", GAME_SUPPORTS_SAVE )
GAMEL(1985, turbotag, 0, mcrsc_csd, turbotag, mcr3_state, turbotag, ROT90, "Bally Midway", "Turbo Tag (prototype)", GAME_SUPPORTS_SAVE, layout_turbotag )

View File

@ -23,6 +23,7 @@ public:
tilemap_t *m_bg_tilemap;
tilemap_t *m_alpha_tilemap;
DECLARE_WRITE8_MEMBER(mcr3_paletteram_w);
DECLARE_WRITE8_MEMBER(spyhuntpr_paletteram_w);
DECLARE_WRITE8_MEMBER(mcr3_videoram_w);
DECLARE_WRITE8_MEMBER(spyhunt_videoram_w);
DECLARE_WRITE8_MEMBER(spyhunt_alpharam_w);

View File

@ -71,6 +71,13 @@ TILE_GET_INFO_MEMBER(mcr3_state::spyhunt_get_alpha_tile_info)
PALETTE_INIT_MEMBER(mcr3_state,spyhunt)
{
int i;
for (i = 0; i < machine().total_colors(); i++)
{
palette_set_color(machine(),i,RGB_BLACK); /* black */
}
/* alpha colors are hard-coded */
palette_set_color(machine(),4*16+0,MAKE_RGB(0x00,0x00,0x00));
palette_set_color(machine(),4*16+1,MAKE_RGB(0x00,0xff,0x00));
@ -150,6 +157,17 @@ WRITE8_MEMBER(mcr3_state::mcr3_paletteram_w)
palette_set_color_rgb(machine(), offset / 2, pal3bit(((offset & 1) << 2) + (data >> 6)), pal3bit(data >> 0), pal3bit(data >> 3));
}
WRITE8_MEMBER(mcr3_state::spyhuntpr_paletteram_w)
{
m_generic_paletteram_8[offset] = data;
offset = (offset & 0x0f) | (offset & 0x60) >> 1;
int r = (data & 0x07) >> 0;
int g = (data & 0x38) >> 3;
int b = (data & 0xc0) >> 6;
palette_set_color(machine(), offset, MAKE_RGB(r<<5,g<<5,b<<6));
}
/*************************************