mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
Decrypted code in "Harem" [Luca Elia]
New games added or promoted from NOT_WORKING status --------------------------------------------------- Harem [Dave Hollister, hap, Luca Elia]
This commit is contained in:
parent
af28402f2e
commit
a59ccb2aa9
@ -170,6 +170,18 @@ void scramble_sh_init(running_machine &machine)
|
||||
}
|
||||
|
||||
|
||||
// Harem
|
||||
|
||||
WRITE8_DEVICE_HANDLER( harem_portA_w )
|
||||
{
|
||||
// Speech?
|
||||
}
|
||||
WRITE8_DEVICE_HANDLER( harem_portB_w )
|
||||
{
|
||||
// Speech?
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
AD2083 TMS5110 implementation (still wrong!)
|
||||
|
||||
|
@ -371,40 +371,57 @@ static ADDRESS_MAP_START( hunchbks_readport, AS_IO, 8, scramble_state )
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
// Harem
|
||||
|
||||
static ADDRESS_MAP_START( harem_map, AS_PROGRAM, 8, scramble_state )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_ROM
|
||||
|
||||
AM_RANGE(0x2000, 0x27ff) AM_RAM
|
||||
AM_RANGE(0x4000, 0x47ff) AM_RAM
|
||||
AM_RANGE(0x4800, 0x4fff) AM_READWRITE(galaxold_videoram_r, galaxold_videoram_w) AM_SHARE("videoram")
|
||||
AM_RANGE(0x5000, 0x5000) AM_WRITENOP
|
||||
AM_RANGE(0x5800, 0x5800) AM_READ(watchdog_reset_r) AM_WRITE(galaxold_nmi_enable_w) // or is nmi mask 5801 like other games?
|
||||
AM_RANGE(0x5801, 0x5807) AM_WRITENOP
|
||||
|
||||
AM_RANGE(0x4000, 0x403f) AM_RAM_WRITE(galaxold_attributesram_w) AM_SHARE("attributesram")
|
||||
AM_RANGE(0x4040, 0x405f) AM_RAM AM_SHARE("spriteram")
|
||||
AM_RANGE(0x4060, 0x407f) AM_RAM AM_SHARE("bulletsram")
|
||||
AM_RANGE(0x4080, 0x47ff) AM_RAM
|
||||
|
||||
AM_RANGE(0x4800, 0x4bff) AM_READWRITE(galaxold_videoram_r, galaxold_videoram_w) AM_SHARE("videoram")
|
||||
AM_RANGE(0x4c00, 0x4fff) AM_READWRITE(galaxold_videoram_r, galaxold_videoram_w) // mirror address
|
||||
|
||||
AM_RANGE(0x5000, 0x5000) AM_RAM_WRITE(racknrol_tiles_bank_w) AM_SHARE("racknrol_tbank") // high bits of tiles, 1 bit every 4 columns
|
||||
AM_RANGE(0x5800, 0x5800) AM_READ(watchdog_reset_r) AM_WRITE(galaxold_nmi_enable_w)
|
||||
|
||||
AM_RANGE(0x5801, 0x5801) AM_WRITE(harem_decrypt_clk_w) // run-time bitswap selection
|
||||
AM_RANGE(0x5802, 0x5802) AM_WRITE(harem_decrypt_bit_w)
|
||||
AM_RANGE(0x5803, 0x5803) AM_WRITE(harem_decrypt_rst_w)
|
||||
|
||||
AM_RANGE(0x5804, 0x5804) AM_WRITE(galaxold_coin_counter_w)
|
||||
AM_RANGE(0x5805, 0x5805) AM_WRITE(galaxold_gfxbank_w) // bit 0 = sprite tiles high bit
|
||||
AM_RANGE(0x5806, 0x5806) AM_WRITE(galaxold_flip_screen_x_w) // maybe (0 at boot)
|
||||
AM_RANGE(0x5807, 0x5807) AM_WRITE(galaxold_flip_screen_y_w) // ""
|
||||
|
||||
AM_RANGE(0x6100, 0x6103) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write)
|
||||
AM_RANGE(0x6200, 0x6203) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write)
|
||||
AM_RANGE(0x8000, 0x9fff) AM_ROM
|
||||
|
||||
// placeholders
|
||||
AM_RANGE(0xff00, 0xff3f) AM_RAM_WRITE(galaxold_attributesram_w) AM_SHARE("attributesram")
|
||||
AM_RANGE(0xff40, 0xff5f) AM_RAM AM_SHARE("spriteram")
|
||||
AM_RANGE(0xff60, 0xff7f) AM_RAM AM_SHARE("bulletsram")
|
||||
AM_RANGE(0x8000, 0x9fff) AM_ROMBANK("rombank") // bitswapped rom
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( harem_sound_map, AS_PROGRAM, 8, scramble_state )
|
||||
AM_RANGE(0x0000, 0x2fff) AM_ROM
|
||||
AM_RANGE(0x6000, 0x6000) AM_READNOP
|
||||
AM_RANGE(0x8000, 0x83ff) AM_RAM
|
||||
AM_RANGE(0xa000, 0xa000) AM_WRITENOP
|
||||
AM_RANGE(0xa000, 0xafff) AM_WRITE(scramble_filter_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( harem_sound_io_map, AS_IO, 8, scramble_state )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0xff)
|
||||
AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("8910.1", ay8910_address_w)
|
||||
AM_RANGE(0x08, 0x08) AM_DEVWRITE_LEGACY("8910.1", ay8910_data_w)
|
||||
AM_RANGE(0x10, 0x10) AM_DEVWRITE_LEGACY("8910.2", ay8910_address_w)
|
||||
AM_RANGE(0x20, 0x20) AM_DEVWRITE_LEGACY("8910.2", ay8910_data_w)
|
||||
AM_RANGE(0x40, 0x40) AM_DEVWRITE_LEGACY("8910.3", ay8910_address_w)
|
||||
AM_RANGE(0x80, 0x80) AM_DEVWRITE_LEGACY("8910.3", ay8910_data_w)
|
||||
AM_RANGE(0x80, 0x80) AM_READ(soundlatch_byte_r)
|
||||
|
||||
// ports->speech?:
|
||||
AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY ("8910.3", ay8910_address_w)
|
||||
AM_RANGE(0x08, 0x08) AM_DEVREADWRITE_LEGACY("8910.3", ay8910_r, ay8910_data_w)
|
||||
// same as scramble:
|
||||
AM_RANGE(0x10, 0x10) AM_DEVWRITE_LEGACY ("8910.1", ay8910_address_w)
|
||||
AM_RANGE(0x20, 0x20) AM_DEVREADWRITE_LEGACY("8910.1", ay8910_r, ay8910_data_w)
|
||||
AM_RANGE(0x40, 0x40) AM_DEVWRITE_LEGACY ("8910.2", ay8910_address_w)
|
||||
AM_RANGE(0x80, 0x80) AM_DEVREADWRITE_LEGACY("8910.2", ay8910_r, ay8910_data_w) // read soundlatch
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
@ -1144,83 +1161,56 @@ INPUT_PORTS_END
|
||||
|
||||
|
||||
static INPUT_PORTS_START( harem )
|
||||
PORT_START("IN0")
|
||||
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
|
||||
PORT_START("IN0") // $6100 - PPI0 Port A
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
|
||||
PORT_START("IN1")
|
||||
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
|
||||
PORT_START("IN1") // $6101 - PPI0 Port B
|
||||
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )
|
||||
PORT_DIPSETTING( 0x03, "2" )
|
||||
PORT_DIPSETTING( 0x02, "3" )
|
||||
PORT_DIPSETTING( 0x01, "4" )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Infinite ) )
|
||||
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( Unknown ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
|
||||
|
||||
PORT_START("IN2")
|
||||
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
|
||||
PORT_START("IN2") // $6102 - PPI0 Port C
|
||||
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) // used
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )
|
||||
PORT_DIPSETTING( 0x0c, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 1C_3C ) )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
|
||||
PORT_DIPNAME( 0xa0, 0xa0, "Difficulty?" )
|
||||
PORT_DIPSETTING( 0xa0, "0" )
|
||||
PORT_DIPSETTING( 0x80, "1" )
|
||||
PORT_DIPSETTING( 0x20, "2" )
|
||||
PORT_DIPSETTING( 0x00, "3" )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
@ -1449,6 +1439,15 @@ static const ay8910_interface triplep_ay8910_interface =
|
||||
DEVCB_NULL
|
||||
};
|
||||
|
||||
static const ay8910_interface harem_ay8910_interface_3 =
|
||||
{
|
||||
AY8910_LEGACY_OUTPUT,
|
||||
AY8910_DEFAULT_LOADS,
|
||||
DEVCB_NULL, // Port A read
|
||||
DEVCB_NULL, // Port B read
|
||||
DEVCB_HANDLER(harem_portA_w), // Port A write
|
||||
DEVCB_HANDLER(harem_portB_w), // Port B write
|
||||
};
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
@ -1491,6 +1490,7 @@ static MACHINE_CONFIG_START( scramble, scramble_state )
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
|
||||
MCFG_SOUND_ADD("8910.1", AY8910, 14318000/8)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.16)
|
||||
|
||||
@ -1741,12 +1741,12 @@ static MACHINE_CONFIG_DERIVED( harem, scramble )
|
||||
MCFG_CPU_PROGRAM_MAP(harem_sound_map)
|
||||
MCFG_CPU_IO_MAP(harem_sound_io_map)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SOUND_MODIFY("8910.2")
|
||||
MCFG_SOUND_CONFIG(triplep_ay8910_interface)
|
||||
MCFG_VIDEO_START_OVERRIDE(scramble_state,harem)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SOUND_ADD("8910.3", AY8910, 14318000/8)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.16)
|
||||
MCFG_SOUND_CONFIG(harem_ay8910_interface_3)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
/***************************************************************************
|
||||
@ -2208,46 +2208,44 @@ ROM_END
|
||||
|
||||
ROM_START( harem )
|
||||
ROM_REGION( 0x10000, "maincpu", 0 )
|
||||
ROM_LOAD( "p0_ic85.bin", 0x0000, 0x2000, CRC(4521b753) SHA1(9033f9c3be8fec1e5ff251e9f60faaf3848a1a1e) )
|
||||
ROM_LOAD( "p1_ic87.bin", 0x8000, 0x2000, BAD_DUMP CRC(3cc5d1e8) SHA1(827e2d20de2a00ec016ead249ed3afdccd0c856c) ) // encrypted?
|
||||
// looks like a bitswap on data, call addresses from $0000-$1fff to here tell that $99 is near certainly $c9(ret)
|
||||
// Other values with a pretty good chance: $40 is $10(djnz), $dd is $dd(ix prefix)
|
||||
ROM_LOAD( "p0_ic85.bin", 0x0000, 0x2000, CRC(4521b753) SHA1(9033f9c3be8fec1e5ff251e9f60faaf3848a1a1e) )
|
||||
ROM_LOAD( "p1_ic87.bin", 0x8000, 0x2000, CRC(3cc5d1e8) SHA1(827e2d20de2a00ec016ead249ed3afdccd0c856c) ) // encrypted
|
||||
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 )
|
||||
ROM_LOAD( "s1_ic12.bin", 0x0000, 0x2000, CRC(b54799dd) SHA1(b6aeb010257cba48a52afd33b4f8031c7d99550c) )
|
||||
ROM_LOAD( "s2_ic13.bin", 0x2000, 0x1000, CRC(2d5573a4) SHA1(1fdcd99d89e078509634742b2116a35bb199fe4b) )
|
||||
ROM_LOAD( "s1_ic12.bin", 0x0000, 0x2000, CRC(b54799dd) SHA1(b6aeb010257cba48a52afd33b4f8031c7d99550c) )
|
||||
ROM_LOAD( "s2_ic13.bin", 0x2000, 0x1000, CRC(2d5573a4) SHA1(1fdcd99d89e078509634742b2116a35bb199fe4b) )
|
||||
|
||||
ROM_REGION( 0x2000, "unknown", 0 ) /* TMS-based ROM? */
|
||||
ROM_REGION( 0x2000, "unknown", 0 ) // TMS-based ROM?
|
||||
ROM_LOAD( "a1_ic25.bin", 0x0000, 0x2000, CRC(279f923a) SHA1(166b1b625997766f0de7cc18af52c42268022fcb) )
|
||||
|
||||
ROM_REGION( 0x4000, "gfx1", 0 )
|
||||
ROM_LOAD( "m0_ic36.bin", 0x0000, 0x2000, CRC(64b3c6d6) SHA1(e71092585f7ffdae85b2a4c9add1bc71e5a608a8) )
|
||||
ROM_LOAD( "m1_ic37.bin", 0x2000, 0x2000, CRC(cb0324fb) SHA1(61612f683810339d5d5f31daa4c475d0338d446f) )
|
||||
ROM_LOAD( "m1_ic37.bin", 0x0000, 0x2000, CRC(cb0324fb) SHA1(61612f683810339d5d5f31daa4c475d0338d446f) )
|
||||
ROM_LOAD( "m0_ic36.bin", 0x2000, 0x2000, CRC(64b3c6d6) SHA1(e71092585f7ffdae85b2a4c9add1bc71e5a608a8) )
|
||||
|
||||
ROM_REGION( 0x0020, "proms", 0 )
|
||||
ROM_LOAD( "harem.clr", 0x0000, 0x0020, CRC(c9a2bf73) SHA1(dad65ebf43a5df147e334afd552e67f5fcd26df7) )
|
||||
ROM_LOAD( "harem.clr", 0x0000, 0x0020, CRC(c9a2bf73) SHA1(dad65ebf43a5df147e334afd552e67f5fcd26df7) )
|
||||
ROM_END
|
||||
|
||||
|
||||
GAME( 1982, triplep, 0, triplep, triplep, scramble_state, scramble_ppi, ROT90, "K.K. International", "Triple Punch", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1982, knockout, triplep, triplep, triplep, scramble_state, scramble_ppi, ROT90, "bootleg? (KKK)", "Knock Out!! (bootleg?)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1981, mariner, 0, mariner, scramble, scramble_state, mariner, ROT90, "Amenip", "Mariner", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE)
|
||||
GAME( 1981, 800fath, mariner, mariner, 800fath, scramble_state, mariner, ROT90, "Amenip (US Billiards Inc. license)", "800 Fathoms", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1981, ckongs, ckong, ckongs, ckongs, scramble_state, ckongs, ROT90, "bootleg", "Crazy Kong (Scramble hardware)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1981, mars, 0, mars, mars, scramble_state, mars, ROT90, "Artic", "Mars", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1982, devilfsh, 0, devilfsh, devilfsh, scramble_state, devilfsh, ROT90, "Artic", "Devil Fish", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1983, newsin7, 0, newsin7, newsin7, scramble_state, mars, ROT90, "ATW USA, Inc.", "New Sinbad 7", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1984, mrkougar, 0, mrkougar, mrkougar, scramble_state, mrkougar, ROT90, "ATW", "Mr. Kougar", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1983, mrkougar2,mrkougar, mrkougar, mrkougar, scramble_state, mrkougar, ROT90, "ATW", "Mr. Kougar (earlier)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1983, mrkougb, mrkougar, mrkougb, mrkougar, scramble_state, mrkougb, ROT90, "bootleg", "Mr. Kougar (bootleg set 1)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1983, mrkougb2, mrkougar, mrkougb, mrkougar, scramble_state, mrkougb, ROT90, "bootleg", "Mr. Kougar (bootleg set 2)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1982, hotshock, 0, hotshock, hotshock, scramble_state, hotshock, ROT90, "E.G. Felaco (Domino license)", "Hot Shocker", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1982, hotshockb,hotshock, hotshock, hotshock, scramble_state, hotshock, ROT90, "E.G. Felaco", "Hot Shocker (early revision?)", GAME_SUPPORTS_SAVE ) // has "Dudley presents" (protagonist of the game), instead of Domino
|
||||
GAME( 198?, conquer, 0, hotshock, hotshock, driver_device, 0, ROT90, "<unknown>", "Conqueror", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE)
|
||||
GAME( 1983, hunchbks, hunchbak, hunchbks, hunchbks, scramble_state, scramble_ppi, ROT90, "Century Electronics", "Hunchback (Scramble hardware)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1982, triplep, 0, triplep, triplep, scramble_state, scramble_ppi, ROT90, "K.K. International", "Triple Punch", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1982, knockout, triplep, triplep, triplep, scramble_state, scramble_ppi, ROT90, "bootleg? (KKK)", "Knock Out!! (bootleg?)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1981, mariner, 0, mariner, scramble, scramble_state, mariner, ROT90, "Amenip", "Mariner", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND )
|
||||
GAME( 1981, 800fath, mariner, mariner, 800fath, scramble_state, mariner, ROT90, "Amenip (US Billiards Inc. license)", "800 Fathoms", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND )
|
||||
GAME( 1981, ckongs, ckong, ckongs, ckongs, scramble_state, ckongs, ROT90, "bootleg", "Crazy Kong (Scramble hardware)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1981, mars, 0, mars, mars, scramble_state, mars, ROT90, "Artic", "Mars", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1982, devilfsh, 0, devilfsh, devilfsh, scramble_state, devilfsh, ROT90, "Artic", "Devil Fish", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1983, newsin7, 0, newsin7, newsin7, scramble_state, mars, ROT90, "ATW USA, Inc.", "New Sinbad 7", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1984, mrkougar, 0, mrkougar, mrkougar, scramble_state, mrkougar, ROT90, "ATW", "Mr. Kougar", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1983, mrkougar2,mrkougar, mrkougar, mrkougar, scramble_state, mrkougar, ROT90, "ATW", "Mr. Kougar (earlier)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1983, mrkougb, mrkougar, mrkougb, mrkougar, scramble_state, mrkougb, ROT90, "bootleg", "Mr. Kougar (bootleg set 1)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1983, mrkougb2, mrkougar, mrkougb, mrkougar, scramble_state, mrkougb, ROT90, "bootleg", "Mr. Kougar (bootleg set 2)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1982, hotshock, 0, hotshock, hotshock, scramble_state, hotshock, ROT90, "E.G. Felaco (Domino license)", "Hot Shocker", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1982, hotshockb,hotshock, hotshock, hotshock, scramble_state, hotshock, ROT90, "E.G. Felaco", "Hot Shocker (early revision?)", GAME_SUPPORTS_SAVE ) // has "Dudley presents" (protagonist of the game), instead of Domino
|
||||
GAME( 198?, conquer, 0, hotshock, hotshock, driver_device, 0, ROT90, "<unknown>", "Conqueror", GAME_NOT_WORKING )
|
||||
GAME( 1983, hunchbks, hunchbak, hunchbks, hunchbks, scramble_state, scramble_ppi, ROT90, "Century Electronics", "Hunchback (Scramble hardware)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1984, hncholms, huncholy, hncholms, hncholms, scramble_state, scramble_ppi, ROT90, "Century Electronics / Seatongrove Ltd", "Hunchback Olympic (Scramble hardware)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1983, cavelon, 0, cavelon, cavelon, scramble_state, cavelon, ROT90, "Jetsoft", "Cavelon", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1982, mimonscr, mimonkey, mimonscr, mimonscr, scramble_state, mimonscr, ROT90, "bootleg", "Mighty Monkey (bootleg on Scramble hardware)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1983, ad2083, 0, ad2083, ad2083, scramble_state, ad2083, ROT90, "Midcoin", "A. D. 2083", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE)
|
||||
GAME( 1981, turpins, turtles, turpins, turpins, driver_device, 0, ROT90, "bootleg", "Turpin (bootleg on Scramble hardware)", GAME_NO_SOUND | GAME_SUPPORTS_SAVE ) // haven't hooked up the sound CPU yet
|
||||
GAME( 1983, harem, 0, harem, harem, scramble_state, harem, ROT90, "I.G.R.", "Harem", GAME_NO_SOUND | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1983, cavelon, 0, cavelon, cavelon, scramble_state, cavelon, ROT90, "Jetsoft", "Cavelon", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1982, mimonscr, mimonkey, mimonscr, mimonscr, scramble_state, mimonscr, ROT90, "bootleg", "Mighty Monkey (bootleg on Scramble hardware)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1983, ad2083, 0, ad2083, ad2083, scramble_state, ad2083, ROT90, "Midcoin", "A. D. 2083", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND )
|
||||
GAME( 1981, turpins, turtles, turpins, turpins, driver_device, 0, ROT90, "bootleg", "Turpin (bootleg on Scramble hardware)", GAME_NO_SOUND | GAME_SUPPORTS_SAVE ) // haven't hooked up the sound CPU yet
|
||||
GAME( 1983, harem, 0, harem, harem, scramble_state, harem, ROT90, "I.G.R.", "Harem", GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND ) // colors, missing speech?
|
||||
|
@ -713,5 +713,5 @@ ROM_END
|
||||
GAME( 1995, cannball, 0, yunsung8, cannball, driver_device, 0, ROT0, "Yun Sung / Soft Vision", "Cannon Ball (Yun Sung, horizontal)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1995, cannballv, cannball, yunsung8, cannbalv, driver_device, 0, ROT270, "Yun Sung / T&K", "Cannon Ball (Yun Sung, vertical)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1995, magix, 0, yunsung8, magix, driver_device, 0, ROT0, "Yun Sung", "Magix / Rock", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1995, magixb, 0, yunsung8, magix, driver_device, 0, ROT0, "bootleg", "Magix / Rock (bootleg)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1995, magixb, magix, yunsung8, magix, driver_device, 0, ROT0, "bootleg", "Magix / Rock (bootleg)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1994?, rocktris, 0, yunsung8, rocktris, driver_device, 0, ROT0, "Yun Sung", "Rock Tris", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
|
||||
|
@ -141,6 +141,7 @@ public:
|
||||
TILE_GET_INFO_MEMBER(dambustr_get_tile_info2);
|
||||
TILE_GET_INFO_MEMBER(get_tile_info);
|
||||
TILE_GET_INFO_MEMBER(rockclim_get_tile_info);
|
||||
TILE_GET_INFO_MEMBER(harem_get_tile_info);
|
||||
DECLARE_MACHINE_RESET(galaxold);
|
||||
DECLARE_VIDEO_START(galaxold);
|
||||
DECLARE_PALETTE_INIT(galaxold);
|
||||
@ -175,6 +176,7 @@ public:
|
||||
DECLARE_VIDEO_START(scorpion);
|
||||
DECLARE_VIDEO_START(ad2083);
|
||||
DECLARE_VIDEO_START(dambustr);
|
||||
DECLARE_VIDEO_START(harem);
|
||||
UINT32 screen_update_galaxold(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_dambustr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(hunchbks_vh_interrupt);
|
||||
@ -183,8 +185,6 @@ public:
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(galaxold_interrupt_timer);
|
||||
DECLARE_WRITE_LINE_MEMBER(galaxold_7474_9m_2_q_callback);
|
||||
DECLARE_WRITE_LINE_MEMBER(galaxold_7474_9m_1_callback);
|
||||
|
||||
|
||||
};
|
||||
|
||||
/*----------- defined in video/galaxold.c -----------*/
|
||||
|
@ -19,6 +19,14 @@ public:
|
||||
UINT8 m_security_2B_counter;
|
||||
UINT8 m_xb;
|
||||
|
||||
// harem
|
||||
UINT8 m_harem_decrypt_mode;
|
||||
UINT8 m_harem_decrypt_bit;
|
||||
UINT8 m_harem_decrypt_clk;
|
||||
UINT8 m_harem_decrypt_count;
|
||||
UINT8 *m_harem_decrypted_data;
|
||||
UINT8 *m_harem_decrypted_opcodes;
|
||||
|
||||
DECLARE_CUSTOM_INPUT_MEMBER(darkplnt_custom_r);
|
||||
DECLARE_CUSTOM_INPUT_MEMBER(ckongs_coinage_r);
|
||||
DECLARE_READ8_MEMBER(hncholms_prot_r);
|
||||
@ -32,6 +40,10 @@ public:
|
||||
DECLARE_WRITE8_MEMBER(mars_ppi8255_0_w);
|
||||
DECLARE_WRITE8_MEMBER(mars_ppi8255_1_w);
|
||||
|
||||
DECLARE_WRITE8_MEMBER(harem_decrypt_bit_w);
|
||||
DECLARE_WRITE8_MEMBER(harem_decrypt_clk_w);
|
||||
DECLARE_WRITE8_MEMBER(harem_decrypt_rst_w);
|
||||
|
||||
DECLARE_DRIVER_INIT(cavelon);
|
||||
DECLARE_DRIVER_INIT(mariner);
|
||||
DECLARE_DRIVER_INIT(mrkougb);
|
||||
@ -91,5 +103,8 @@ DECLARE_READ8_DEVICE_HANDLER( hotshock_soundlatch_r );
|
||||
DECLARE_WRITE8_DEVICE_HANDLER( scramble_sh_irqtrigger_w );
|
||||
DECLARE_WRITE8_DEVICE_HANDLER( mrkougar_sh_irqtrigger_w );
|
||||
|
||||
DECLARE_WRITE8_DEVICE_HANDLER( harem_portA_w );
|
||||
DECLARE_WRITE8_DEVICE_HANDLER( harem_portB_w );
|
||||
|
||||
MACHINE_CONFIG_EXTERN( ad2083_audio );
|
||||
|
||||
|
@ -621,6 +621,90 @@ DRIVER_INIT_MEMBER(scramble_state,ad2083)
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
Harem run-time decryption
|
||||
*************************************************************/
|
||||
|
||||
WRITE8_MEMBER(scramble_state::harem_decrypt_bit_w)
|
||||
{
|
||||
m_harem_decrypt_bit = data;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(scramble_state::harem_decrypt_clk_w)
|
||||
{
|
||||
if ((data & 1) && !(m_harem_decrypt_clk & 1))
|
||||
{
|
||||
m_harem_decrypt_mode = ((m_harem_decrypt_mode >> 1) | ((m_harem_decrypt_bit & 1) << 3)) & 0x0f;
|
||||
m_harem_decrypt_count++;
|
||||
|
||||
// logerror("%s: decrypt mode = %02x, count = %x\n", machine().describe_context(), m_harem_decrypt_mode, m_harem_decrypt_count);
|
||||
}
|
||||
|
||||
m_harem_decrypt_clk = data;
|
||||
|
||||
if (m_harem_decrypt_count == 4)
|
||||
{
|
||||
int bank;
|
||||
switch (m_harem_decrypt_mode)
|
||||
{
|
||||
case 0x03: bank = 0; break;
|
||||
case 0x09: bank = 1; break;
|
||||
case 0x0a: bank = 2; break;
|
||||
default:
|
||||
logerror("%s: warning, unknown decrypt mode = %02x\n", machine().describe_context(), m_harem_decrypt_mode);
|
||||
bank = 0;
|
||||
}
|
||||
|
||||
membank("rombank")->set_base (m_harem_decrypted_data + 0x2000 * bank);
|
||||
membank("rombank")->set_base_decrypted (m_harem_decrypted_opcodes + 0x2000 * bank);
|
||||
|
||||
// logerror("%s: decrypt mode = %02x (bank %x) active\n", machine().describe_context(), m_harem_decrypt_mode, bank);
|
||||
|
||||
m_harem_decrypt_mode = 0;
|
||||
m_harem_decrypt_count = 0;
|
||||
}
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(scramble_state::harem_decrypt_rst_w)
|
||||
{
|
||||
m_harem_decrypt_mode = 0;
|
||||
m_harem_decrypt_count = 0;
|
||||
|
||||
// logerror("%s: decrypt mode reset\n", machine().describe_context());
|
||||
}
|
||||
|
||||
DRIVER_INIT_MEMBER(scramble_state,harem)
|
||||
{
|
||||
UINT8 *ROM = machine().root_device().memregion("maincpu")->base() + 0x8000;
|
||||
size_t size = 0x2000;
|
||||
|
||||
UINT8 *data = m_harem_decrypted_data = auto_alloc_array(machine(), UINT8, size * 3);
|
||||
UINT8 *opcodes = m_harem_decrypted_opcodes = auto_alloc_array(machine(), UINT8, size * 3);
|
||||
|
||||
// decryption 03
|
||||
for (int i = 0; i < size; i++)
|
||||
{
|
||||
UINT8 x = ROM[i];
|
||||
opcodes[size * 0 + i] = BITSWAP8(x, 7,0,5,2,3,4,1,6);
|
||||
data [size * 0 + i] = BITSWAP8(x, 7,6,5,0,3,4,1,2);
|
||||
}
|
||||
|
||||
// decryption 09
|
||||
for (int i = 0; i < size; i++)
|
||||
{
|
||||
UINT8 x = ROM[i];
|
||||
opcodes[size * 1 + i] = BITSWAP8(x, 7,0,5,6,3,2,1,4);
|
||||
data [size * 1 + i] = BITSWAP8(x, 7,4,5,0,3,6,1,2);
|
||||
}
|
||||
|
||||
// decryption 0a
|
||||
for (int i = 0; i < size; i++)
|
||||
{
|
||||
UINT8 x = ROM[i];
|
||||
opcodes[size * 2 + i] = BITSWAP8(x, 7,2,5,6,3,0,1,4);
|
||||
data [size * 2 + i] = BITSWAP8(x, 7,2,5,4,3,0,1,6);
|
||||
}
|
||||
|
||||
membank("rombank")->set_base (m_harem_decrypted_data);
|
||||
membank("rombank")->set_base_decrypted (m_harem_decrypted_opcodes);
|
||||
}
|
||||
|
@ -765,6 +765,41 @@ VIDEO_START_MEMBER(galaxold_state,racknrol)
|
||||
m_color_mask = 0xff;
|
||||
}
|
||||
|
||||
|
||||
// Harem
|
||||
|
||||
TILE_GET_INFO_MEMBER(galaxold_state::harem_get_tile_info)
|
||||
{
|
||||
int code = m_videoram[tile_index];
|
||||
UINT8 x = tile_index & 0x1f;
|
||||
UINT8 color = m_attributesram[(x << 1) | 1] & 7;
|
||||
UINT8 bank = BIT(m_racknrol_tiles_bank[0], x/4); // 1 bit every 4 columns
|
||||
|
||||
code |= bank * 0x200;
|
||||
|
||||
SET_TILE_INFO_MEMBER(0, code, color, 0);
|
||||
}
|
||||
|
||||
static void harem_modify_spritecode(running_machine &machine, UINT8 *spriteram, int *code, int *flipx, int *flipy, int offs)
|
||||
{
|
||||
galaxold_state *state = machine.driver_data<galaxold_state>();
|
||||
*code |= (state->m_gfxbank[0] << 7) | 0x40;
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(galaxold_state,harem)
|
||||
{
|
||||
video_start_common(machine());
|
||||
m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(galaxold_state::harem_get_tile_info),this),TILEMAP_SCAN_ROWS,8,8,32,32);
|
||||
// m_bg_tilemap->set_transparent_pen(0); // opaque tilemap to get sky and sand colors
|
||||
|
||||
m_bg_tilemap->set_scroll_cols(32);
|
||||
|
||||
m_color_mask = (machine().gfx[0]->granularity() == 4) ? 7 : 3;
|
||||
|
||||
m_modify_spritecode = harem_modify_spritecode;
|
||||
}
|
||||
|
||||
|
||||
VIDEO_START_MEMBER(galaxold_state,bongo)
|
||||
{
|
||||
VIDEO_START_CALL_MEMBER(galaxold_plain);
|
||||
|
Loading…
Reference in New Issue
Block a user