added PIC16c57 dump to wbeachvl [Caps0ff]

this gives partial sound, OKI banking setup for the game is incorrect in the driver so music doesn't currently play
also I cleaned up OKI banking in the whole driver by using configured banking to make further work cleaner
This commit is contained in:
David Haywood 2016-12-16 22:06:43 +00:00
parent f34174de56
commit 694eabe89d
3 changed files with 85 additions and 150 deletions

View File

@ -207,17 +207,11 @@ READ8_MEMBER(playmark_state::playmark_snd_flag_r)
WRITE8_MEMBER(playmark_state::playmark_oki_banking_w)
{
logerror("PC$%03x Writing %02x to PortA (OKI bank select) previous bank was %02x\n",space.device().safe_pcbase(),data,m_old_oki_bank);
logerror("PC$%03x Writing %02x to PortA (OKI bank select)\n",space.device().safe_pcbase(),data);
if (m_old_oki_bank != (data & 7))
{
m_old_oki_bank = data & 7;
int bank = data & 7;
if (((m_old_oki_bank - 1) * 0x40000) < memregion("oki")->bytes())
{
m_oki->set_rom_bank(m_old_oki_bank - 1);
}
}
m_okibank->set_entry(bank & (m_oki_numbanks - 1));
}
WRITE8_MEMBER(playmark_state::playmark_oki_w)
@ -252,17 +246,8 @@ WRITE8_MEMBER(playmark_state::hrdtimes_snd_control_w)
{
/* This port controls communications to and from the 68K and the OKI device. See playmark_snd_control_w above. OKI banking is also handled here. */
if (m_old_oki_bank != (data & 3))
{
// logerror("PC$%03x Writing %02x to PortC (OKI bank select bits). Previous bank was %02x\n",space.device().safe_pcbase(),(data&3),m_old_oki_bank);
m_old_oki_bank = data & 3;
if ((m_old_oki_bank * 0x40000) < memregion("oki")->bytes())
{
m_oki->set_rom_bank(m_old_oki_bank);
}
}
int bank = data & 3;
m_okibank->set_entry(bank & (m_oki_numbanks - 1));
m_oki_control = data;
@ -340,7 +325,7 @@ static ADDRESS_MAP_START( wbeachvl_main_map, AS_PROGRAM, 16, playmark_state )
AM_RANGE(0x710018, 0x710019) AM_READ_PORT("P3")
AM_RANGE(0x71001a, 0x71001b) AM_READ_PORT("P4")
// AM_RANGE(0x71001c, 0x71001d) AM_READ(playmark_snd_status???)
// AM_RANGE(0x71001e, 0x71001f) AM_WRITE(playmark_snd_command_w)
AM_RANGE(0x71001e, 0x71001f) AM_WRITE(playmark_snd_command_w)
AM_RANGE(0x780000, 0x780fff) AM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
AM_RANGE(0xff0000, 0xffffff) AM_RAM
ADDRESS_MAP_END
@ -426,6 +411,12 @@ static ADDRESS_MAP_START( luckboomh_main_map, AS_PROGRAM, 16, playmark_state )
AM_RANGE(0xff8000, 0xffffff) AM_RAM
ADDRESS_MAP_END
static ADDRESS_MAP_START( oki_map, AS_0, 8, playmark_state )
AM_RANGE(0x00000, 0x1ffff) AM_ROM
AM_RANGE(0x20000, 0x3ffff) AM_ROMBANK("okibank")
ADDRESS_MAP_END
static INPUT_PORTS_START( bigtwin )
PORT_START("SYSTEM")
@ -1169,6 +1160,20 @@ static GFXDECODE_START( bigtwinb )
GFXDECODE_ENTRY( "gfx1", 0x40000, hotmind_charlayout, 0x200, 16 ) /* colors 0x200-0x2ff */
GFXDECODE_END
void playmark_state::configure_oki_banks()
{
if (m_okibank)
{
const uint32_t len = memregion("oki")->bytes();
uint8_t *rgn = memregion("oki")->base();
m_oki_numbanks = len / 0x20000;
m_okibank->configure_entries(0, m_oki_numbanks, rgn, 0x20000);
m_okibank->set_entry(1);
}
}
MACHINE_START_MEMBER(playmark_state,playmark)
{
save_item(NAME(m_bgscrollx));
@ -1183,10 +1188,13 @@ MACHINE_START_MEMBER(playmark_state,playmark)
save_item(NAME(m_snd_flag));
save_item(NAME(m_oki_control));
save_item(NAME(m_oki_command));
save_item(NAME(m_old_oki_bank));
save_item(NAME(m_dispenser_latch));
configure_oki_banks();
}
MACHINE_RESET_MEMBER(playmark_state,playmark)
{
m_bgscrollx = 0;
@ -1201,7 +1209,6 @@ MACHINE_RESET_MEMBER(playmark_state,playmark)
m_snd_flag = 0;
m_oki_control = 0;
m_oki_command = 0;
m_old_oki_bank = 0;
m_dispenser_latch = 0;
}
@ -1243,6 +1250,7 @@ static MACHINE_CONFIG_START( bigtwin, playmark_state )
MCFG_OKIM6295_ADD("oki", 1000000, OKIM6295_PIN7_HIGH)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( bigtwinb, playmark_state )
@ -1283,6 +1291,7 @@ static MACHINE_CONFIG_START( bigtwinb, playmark_state )
MCFG_OKIM6295_ADD("oki", 1000000, OKIM6295_PIN7_HIGH)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( wbeachvl, playmark_state )
@ -1293,13 +1302,13 @@ static MACHINE_CONFIG_START( wbeachvl, playmark_state )
MCFG_CPU_VBLANK_INT_DRIVER("screen", playmark_state, irq2_line_hold)
MCFG_CPU_ADD("audiocpu", PIC16C57, XTAL_24MHz/2) /* 12MHz with internal 4x divisor */
MCFG_PIC16C5x_WRITE_A_CB(WRITE8(playmark_state, playmark_oki_banking_w))
MCFG_PIC16C5x_WRITE_A_CB(WRITE8(playmark_state, playmark_oki_banking_w)) // wrong?
MCFG_PIC16C5x_READ_B_CB(READ8(playmark_state, playmark_snd_command_r))
MCFG_PIC16C5x_WRITE_B_CB(WRITE8(playmark_state, playmark_oki_w))
MCFG_PIC16C5x_READ_C_CB(READ8(playmark_state, playmark_snd_flag_r))
MCFG_PIC16C5x_WRITE_C_CB(WRITE8(playmark_state, playmark_snd_control_w))
// MCFG_PIC16C5x_WRITE_C_CB(WRITE8(playmark_state, hrdtimes_snd_control_w)) // probably closer to this, but this only supports 2 sample bank bits
MCFG_PIC16C5x_T0_CB(READLINE(playmark_state, PIC16C5X_T0_clk_r))
MCFG_DEVICE_DISABLE() /* Internal code is not dumped yet */
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
MCFG_EEPROM_SERIAL_DEFAULT_VALUE(0)
@ -1327,6 +1336,7 @@ static MACHINE_CONFIG_START( wbeachvl, playmark_state )
MCFG_OKIM6295_ADD("oki", 1000000, OKIM6295_PIN7_HIGH)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( excelsr, playmark_state )
@ -1367,6 +1377,7 @@ static MACHINE_CONFIG_START( excelsr, playmark_state )
MCFG_OKIM6295_ADD("oki", XTAL_1MHz, OKIM6295_PIN7_HIGH) /* 1MHz resonator */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( hrdtimes, playmark_state )
@ -1408,6 +1419,7 @@ static MACHINE_CONFIG_START( hrdtimes, playmark_state )
MCFG_OKIM6295_ADD("oki", XTAL_1MHz, OKIM6295_PIN7_HIGH) /* verified on pcb */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( hotmind, playmark_state )
@ -1454,6 +1466,7 @@ static MACHINE_CONFIG_START( hotmind, playmark_state )
MCFG_OKIM6295_ADD("oki", XTAL_1MHz, OKIM6295_PIN7_HIGH) /* verified on pcb */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( luckboomh, playmark_state )
@ -1499,6 +1512,7 @@ static MACHINE_CONFIG_START( luckboomh, playmark_state )
MCFG_OKIM6295_ADD("oki", XTAL_1MHz, OKIM6295_PIN7_HIGH) /* verified on pcb */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map)
MACHINE_CONFIG_END
@ -1573,8 +1587,9 @@ ROM_START( wbeachvl )
ROM_LOAD16_BYTE( "wbv_02.bin", 0x000000, 0x40000, CRC(c7cca29e) SHA1(03af361081d688c4204a95f7f5babcc598b72c23) )
ROM_LOAD16_BYTE( "wbv_03.bin", 0x000001, 0x40000, CRC(db4e69d5) SHA1(119bf35a463d279ddde67ab08f6f1bab9f05cf0c) )
ROM_REGION( 0x1000, "audiocpu", ROMREGION_ERASE00 ) /* sound (PIC16C57) */
ROM_LOAD( "pic16c57", 0x0000, 0x1000, NO_DUMP )
ROM_REGION( 0x1009, "audiocpu", ROMREGION_ERASE00 ) /* sound (PIC16C57) */
// 0x1000 rom data (actually 0x800 12-bit words), + 0x9 config bytes
ROM_LOAD( "pic16c57", 0x00000, 0x1009, CRC(35439064) SHA1(ab0c5bafd76a2cb2a2e5ddb9d0578fd7e2241e43) )
ROM_REGION( 0x600000, "gfx1", 0 )
ROM_LOAD( "wbv_10.bin", 0x000000, 0x80000, CRC(50680f0b) SHA1(ed76ef6ced70ba7e9558162aa94bbe9f19bbabe6) )
@ -1591,26 +1606,10 @@ ROM_START( wbeachvl )
ROM_LOAD( "wbv_09.bin", 0x580000, 0x20000, CRC(894ce354) SHA1(331aeabbe10cd645776da2dc0829acc2275e72dc) )
/* 5a0000-5fffff is empty */
ROM_REGION( 0x100000, "user2", 0 ) /* OKIM6295 samples */
ROM_LOAD( "wbv_01.bin", 0x00000, 0x100000, CRC(ac33f25f) SHA1(5d9ed16650aeb297d565376a99b31c88ab611668) )
/* $00000-$20000 stays the same in all sound banks, */
/* the second half of the bank is what gets switched */
ROM_REGION( 0x1c0000, "oki", 0 ) /* Samples */
ROM_COPY( "user2", 0x000000, 0x000000, 0x020000)
ROM_COPY( "user2", 0x020000, 0x020000, 0x020000)
ROM_COPY( "user2", 0x000000, 0x040000, 0x020000)
ROM_COPY( "user2", 0x040000, 0x060000, 0x020000)
ROM_COPY( "user2", 0x000000, 0x080000, 0x020000)
ROM_COPY( "user2", 0x060000, 0x0a0000, 0x020000)
ROM_COPY( "user2", 0x000000, 0x0c0000, 0x020000)
ROM_COPY( "user2", 0x080000, 0x0e0000, 0x020000)
ROM_COPY( "user2", 0x000000, 0x100000, 0x020000)
ROM_COPY( "user2", 0x0a0000, 0x120000, 0x020000)
ROM_COPY( "user2", 0x000000, 0x140000, 0x020000)
ROM_COPY( "user2", 0x0c0000, 0x160000, 0x020000)
ROM_COPY( "user2", 0x000000, 0x180000, 0x020000)
ROM_COPY( "user2", 0x0e0000, 0x1a0000, 0x020000)
ROM_REGION( 0x100000, "oki", 0 ) /* Samples */
ROM_LOAD( "wbv_01.bin", 0x00000, 0x100000, CRC(ac33f25f) SHA1(5d9ed16650aeb297d565376a99b31c88ab611668) )
ROM_END
ROM_START( wbeachvl2 )
@ -1618,8 +1617,9 @@ ROM_START( wbeachvl2 )
ROM_LOAD16_BYTE( "2.bin", 0x000000, 0x40000, CRC(8993487e) SHA1(c927ae655807f9046f66ff96a30bd2c6fa671566) )
ROM_LOAD16_BYTE( "3.bin", 0x000001, 0x40000, CRC(15904789) SHA1(640c80bbf7302529e1a39c2ae60e018ecb176478) )
ROM_REGION( 0x1000, "audiocpu", ROMREGION_ERASE00 ) /* sound (PIC16C57) */
ROM_LOAD( "pic16c57", 0x0000, 0x1000, NO_DUMP )
ROM_REGION( 0x1009, "audiocpu", ROMREGION_ERASE00 ) /* sound (PIC16C57) */
// 0x1000 rom data (actually 0x800 12-bit words), + 0x9 config bytes
ROM_LOAD( "pic16c57", 0x00000, 0x1009, CRC(35439064) SHA1(ab0c5bafd76a2cb2a2e5ddb9d0578fd7e2241e43) )
ROM_REGION( 0x600000, "gfx1", 0 )
ROM_LOAD( "wbv_10.bin", 0x000000, 0x80000, CRC(50680f0b) SHA1(ed76ef6ced70ba7e9558162aa94bbe9f19bbabe6) )
@ -1636,26 +1636,10 @@ ROM_START( wbeachvl2 )
ROM_LOAD( "wbv_09.bin", 0x580000, 0x20000, CRC(894ce354) SHA1(331aeabbe10cd645776da2dc0829acc2275e72dc) )
/* 5a0000-5fffff is empty */
ROM_REGION( 0x100000, "user2", 0 ) /* OKIM6295 samples */
ROM_LOAD( "wbv_01.bin", 0x00000, 0x100000, CRC(ac33f25f) SHA1(5d9ed16650aeb297d565376a99b31c88ab611668) )
/* $00000-$20000 stays the same in all sound banks, */
/* the second half of the bank is what gets switched */
ROM_REGION( 0x1c0000, "oki", 0 ) /* Samples */
ROM_COPY( "user2", 0x000000, 0x000000, 0x020000)
ROM_COPY( "user2", 0x020000, 0x020000, 0x020000)
ROM_COPY( "user2", 0x000000, 0x040000, 0x020000)
ROM_COPY( "user2", 0x040000, 0x060000, 0x020000)
ROM_COPY( "user2", 0x000000, 0x080000, 0x020000)
ROM_COPY( "user2", 0x060000, 0x0a0000, 0x020000)
ROM_COPY( "user2", 0x000000, 0x0c0000, 0x020000)
ROM_COPY( "user2", 0x080000, 0x0e0000, 0x020000)
ROM_COPY( "user2", 0x000000, 0x100000, 0x020000)
ROM_COPY( "user2", 0x0a0000, 0x120000, 0x020000)
ROM_COPY( "user2", 0x000000, 0x140000, 0x020000)
ROM_COPY( "user2", 0x0c0000, 0x160000, 0x020000)
ROM_COPY( "user2", 0x000000, 0x180000, 0x020000)
ROM_COPY( "user2", 0x0e0000, 0x1a0000, 0x020000)
ROM_REGION( 0x100000, "oki", 0 ) /* Samples */
ROM_LOAD( "wbv_01.bin", 0x00000, 0x100000, CRC(ac33f25f) SHA1(5d9ed16650aeb297d565376a99b31c88ab611668) )
ROM_END
ROM_START( wbeachvl3 )
@ -1663,8 +1647,9 @@ ROM_START( wbeachvl3 )
ROM_LOAD16_BYTE( "2.u16", 0x000000, 0x40000, CRC(f0f4c282) SHA1(94850b45368c3d09629852adc8ca08164b7a7a94) )
ROM_LOAD16_BYTE( "3.u15", 0x000001, 0x40000, CRC(99775c21) SHA1(fa80a81c59142abcf751352d7a7f9e0d3b5172c9) )
ROM_REGION( 0x1000, "audiocpu", ROMREGION_ERASE00 ) /* sound (PIC16C57) */
ROM_LOAD( "pic16c57", 0x0000, 0x1000, NO_DUMP )
ROM_REGION( 0x1009, "audiocpu", ROMREGION_ERASE00 ) /* sound (PIC16C57) */
// 0x1000 rom data (actually 0x800 12-bit words), + 0x9 config bytes
ROM_LOAD( "pic16c57", 0x00000, 0x1009, CRC(35439064) SHA1(ab0c5bafd76a2cb2a2e5ddb9d0578fd7e2241e43) )
ROM_REGION( 0x600000, "gfx1", 0 )
ROM_LOAD( "wbv_10.bin", 0x000000, 0x80000, CRC(50680f0b) SHA1(ed76ef6ced70ba7e9558162aa94bbe9f19bbabe6) )
@ -1681,26 +1666,10 @@ ROM_START( wbeachvl3 )
ROM_LOAD( "wbv_09.bin", 0x580000, 0x20000, CRC(894ce354) SHA1(331aeabbe10cd645776da2dc0829acc2275e72dc) )
/* 5a0000-5fffff is empty */
ROM_REGION( 0x100000, "user2", 0 ) /* OKIM6295 samples */
ROM_LOAD( "wbv_01.bin", 0x00000, 0x100000, CRC(ac33f25f) SHA1(5d9ed16650aeb297d565376a99b31c88ab611668) )
/* $00000-$20000 stays the same in all sound banks, */
/* the second half of the bank is what gets switched */
ROM_REGION( 0x1c0000, "oki", 0 ) /* Samples */
ROM_COPY( "user2", 0x000000, 0x000000, 0x020000)
ROM_COPY( "user2", 0x020000, 0x020000, 0x020000)
ROM_COPY( "user2", 0x000000, 0x040000, 0x020000)
ROM_COPY( "user2", 0x040000, 0x060000, 0x020000)
ROM_COPY( "user2", 0x000000, 0x080000, 0x020000)
ROM_COPY( "user2", 0x060000, 0x0a0000, 0x020000)
ROM_COPY( "user2", 0x000000, 0x0c0000, 0x020000)
ROM_COPY( "user2", 0x080000, 0x0e0000, 0x020000)
ROM_COPY( "user2", 0x000000, 0x100000, 0x020000)
ROM_COPY( "user2", 0x0a0000, 0x120000, 0x020000)
ROM_COPY( "user2", 0x000000, 0x140000, 0x020000)
ROM_COPY( "user2", 0x0c0000, 0x160000, 0x020000)
ROM_COPY( "user2", 0x000000, 0x180000, 0x020000)
ROM_COPY( "user2", 0x0e0000, 0x1a0000, 0x020000)
ROM_REGION( 0x100000, "oki", 0 ) /* Samples */
ROM_LOAD( "wbv_01.bin", 0x00000, 0x100000, CRC(ac33f25f) SHA1(5d9ed16650aeb297d565376a99b31c88ab611668) )
ROM_END
ROM_START( excelsr )
@ -1730,18 +1699,10 @@ ROM_START( excelsr )
ROM_LOAD( "23.u323", 0x100000, 0x80000, CRC(d8e1453b) SHA1(a3edb05abe486d4cce30f5caf14be619b6886f7c) )
ROM_LOAD( "27.u324", 0x180000, 0x80000, CRC(eca2c079) SHA1(a07957b427d55c8ca1efb0e83ee3b603f06bed58) )
ROM_REGION( 0x80000, "user2", 0 ) /* OKIM6295 samples */
ROM_LOAD( "16.i013", 0x000000, 0x80000, CRC(7ed9da5d) SHA1(352f1e89613feb1902b6d87adb996ed1c1d8108e) )
/* $00000-$20000 stays the same in all sound banks, */
/* the second half of the bank is what gets switched */
ROM_REGION( 0xc0000, "oki", 0 ) /* Samples */
ROM_COPY( "user2", 0x000000, 0x000000, 0x020000)
ROM_COPY( "user2", 0x020000, 0x020000, 0x020000)
ROM_COPY( "user2", 0x000000, 0x040000, 0x020000)
ROM_COPY( "user2", 0x040000, 0x060000, 0x020000)
ROM_COPY( "user2", 0x000000, 0x080000, 0x020000)
ROM_COPY( "user2", 0x060000, 0x0a0000, 0x020000)
ROM_REGION( 0x80000, "oki", 0 ) /* Samples */
ROM_LOAD( "16.i013", 0x000000, 0x80000, CRC(7ed9da5d) SHA1(352f1e89613feb1902b6d87adb996ed1c1d8108e) )
ROM_END
ROM_START( excelsra )
@ -1771,18 +1732,10 @@ ROM_START( excelsra )
ROM_LOAD( "23.u323", 0x100000, 0x80000, CRC(d8e1453b) SHA1(a3edb05abe486d4cce30f5caf14be619b6886f7c) )
ROM_LOAD( "27.u324", 0x180000, 0x80000, CRC(eca2c079) SHA1(a07957b427d55c8ca1efb0e83ee3b603f06bed58) )
ROM_REGION( 0x80000, "user2", 0 ) /* OKIM6295 samples */
ROM_LOAD( "16.i013", 0x000000, 0x80000, CRC(7ed9da5d) SHA1(352f1e89613feb1902b6d87adb996ed1c1d8108e) )
/* $00000-$20000 stays the same in all sound banks, */
/* the second half of the bank is what gets switched */
ROM_REGION( 0xc0000, "oki", 0 ) /* Samples */
ROM_COPY( "user2", 0x000000, 0x000000, 0x020000)
ROM_COPY( "user2", 0x020000, 0x020000, 0x020000)
ROM_COPY( "user2", 0x000000, 0x040000, 0x020000)
ROM_COPY( "user2", 0x040000, 0x060000, 0x020000)
ROM_COPY( "user2", 0x000000, 0x080000, 0x020000)
ROM_COPY( "user2", 0x060000, 0x0a0000, 0x020000)
ROM_REGION( 0x80000, "oki", 0 ) /* Samples */
ROM_LOAD( "16.i013", 0x000000, 0x80000, CRC(7ed9da5d) SHA1(352f1e89613feb1902b6d87adb996ed1c1d8108e) )
ROM_END
ROM_START( hrdtimes )
@ -1810,15 +1763,8 @@ ROM_START( hrdtimes )
/* $00000-$20000 stays the same in all sound banks, */
/* the second half of the bank is what gets switched */
ROM_REGION( 0x100000, "oki", 0 ) /* Samples */
ROM_LOAD( "30.io13", 0x00000, 0x20000, CRC(fa5e50ae) SHA1(f3bd87c83fca9269cc2f19db1fbf55540c96f931) )
ROM_CONTINUE( 0x60000, 0x20000 )
ROM_CONTINUE( 0xa0000, 0x20000 )
ROM_CONTINUE( 0xe0000, 0x20000 )
ROM_COPY( "oki", 0x000000, 0x20000, 0x20000 )
ROM_COPY( "oki", 0x000000, 0x40000, 0x20000 )
ROM_COPY( "oki", 0x000000, 0x80000, 0x20000 )
ROM_COPY( "oki", 0x000000, 0xc0000, 0x20000 )
ROM_REGION( 0x80000, "oki", 0 ) /* Samples */
ROM_LOAD( "30.io13", 0x00000, 0x80000, CRC(fa5e50ae) SHA1(f3bd87c83fca9269cc2f19db1fbf55540c96f931) )
ROM_END
/* Different revision of the PCB, uses larger gfx ROMs, however the content is the same */
@ -1844,15 +1790,8 @@ ROM_START( hrdtimesa )
/* $00000-$20000 stays the same in all sound banks, */
/* the second half of the bank is what gets switched */
ROM_REGION( 0x100000, "oki", 0 ) /* Samples */
ROM_LOAD( "io13.bin", 0x00000, 0x20000, CRC(fa5e50ae) SHA1(f3bd87c83fca9269cc2f19db1fbf55540c96f931) )
ROM_CONTINUE( 0x60000, 0x20000 )
ROM_CONTINUE( 0xa0000, 0x20000 )
ROM_CONTINUE( 0xe0000, 0x20000 )
ROM_COPY( "oki", 0x000000, 0x20000, 0x20000 )
ROM_COPY( "oki", 0x000000, 0x40000, 0x20000 )
ROM_COPY( "oki", 0x000000, 0x80000, 0x20000 )
ROM_COPY( "oki", 0x000000, 0xc0000, 0x20000 )
ROM_REGION( 0x80000, "oki", 0 ) /* Samples */
ROM_LOAD( "io13.bin", 0x00000, 0x80000, CRC(fa5e50ae) SHA1(f3bd87c83fca9269cc2f19db1fbf55540c96f931) )
ROM_END
/*
@ -1926,11 +1865,8 @@ ROM_START( hotmind )
ROM_LOAD16_BYTE( "25.u84", 0x40000, 0x20000, CRC(c4fd4445) SHA1(ab0c5a328a312740595b5c92a1050527140518f3) )
ROM_LOAD16_BYTE( "29.u83", 0x40001, 0x20000, CRC(0bebfb53) SHA1(d4342f808141b70af98c370004153a31d120e2a4) )
ROM_REGION( 0x80000, "oki", 0 ) /* Samples */
ROM_LOAD( "20.io13", 0x00000, 0x20000, CRC(0bf3a3e5) SHA1(2ae06f37a6bcd20bc5fbaa90d970aba2ebf3cf5a) )
ROM_CONTINUE( 0x60000, 0x20000 )
ROM_COPY( "oki", 0x000000, 0x20000, 0x20000 )
ROM_COPY( "oki", 0x000000, 0x40000, 0x20000 )
ROM_REGION( 0x40000, "oki", 0 ) /* Samples */
ROM_LOAD( "20.io13", 0x00000, 0x40000, CRC(0bf3a3e5) SHA1(2ae06f37a6bcd20bc5fbaa90d970aba2ebf3cf5a) )
ROM_REGION( 0x8000, "plds", 0 ) /* These were read protected */
ROM_LOAD( "palce16v8h-25-pc4_u58.jed", 0x0000, 0xb89, BAD_DUMP CRC(ba88c1da) SHA1(9b55e96eee44a467bdfbf760137ccb2fb3afedf0) )
@ -1969,14 +1905,12 @@ ROM_START( luckboomh )
ROM_LOAD16_BYTE( "25.u84", 0x40000, 0x20000, CRC(e1ab5cf5) SHA1(f76d00537cfd6f09439e44071875bf021622fd07) )
ROM_LOAD16_BYTE( "29.u83", 0x40001, 0x20000, CRC(9572d2d4) SHA1(90d55b1f13dc93041160530e8c1ce8def6e02bcf) )
ROM_REGION( 0x80000, "oki", 0 ) /* Samples */
ROM_LOAD( "20.io13", 0x00000, 0x20000, CRC(0d42c0a3) SHA1(1b1d4c7dcbb063e8bf133063770b753947d1a017) )
ROM_CONTINUE( 0x60000, 0x20000 )
ROM_COPY( "oki", 0x000000, 0x20000, 0x20000 )
ROM_COPY( "oki", 0x000000, 0x40000, 0x20000 )
ROM_REGION( 0x40000, "oki", 0 ) /* Samples */
ROM_LOAD( "20.io13", 0x00000, 0x40000, CRC(0d42c0a3) SHA1(1b1d4c7dcbb063e8bf133063770b753947d1a017) )
ROM_END
uint8_t playmark_state::playmark_asciitohex(uint8_t data)
{
/* Convert ASCII data to HEX */
@ -2061,9 +1995,9 @@ DRIVER_INIT_MEMBER(playmark_state,pic_decode)
GAME( 1995, bigtwin, 0, bigtwin, bigtwin, playmark_state, pic_decode, ROT0, "Playmark", "Big Twin", MACHINE_SUPPORTS_SAVE )
GAME( 1995, bigtwinb, bigtwin, bigtwinb, bigtwinb, playmark_state, pic_decode, ROT0, "Playmark", "Big Twin (No Girls Conversion)", MACHINE_SUPPORTS_SAVE )
GAME( 1995, wbeachvl, 0, wbeachvl, wbeachvl, driver_device, 0, ROT0, "Playmark", "World Beach Volley (set 1)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1995, wbeachvl2, wbeachvl, wbeachvl, wbeachvl, driver_device, 0, ROT0, "Playmark", "World Beach Volley (set 2)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1995, wbeachvl3, wbeachvl, wbeachvl, wbeachvl, driver_device, 0, ROT0, "Playmark", "World Beach Volley (set 3)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1995, wbeachvl, 0, wbeachvl, wbeachvl, driver_device, 0, ROT0, "Playmark", "World Beach Volley (set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1995, wbeachvl2, wbeachvl, wbeachvl, wbeachvl, driver_device, 0, ROT0, "Playmark", "World Beach Volley (set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1995, wbeachvl3, wbeachvl, wbeachvl, wbeachvl, driver_device, 0, ROT0, "Playmark", "World Beach Volley (set 3)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1996, excelsr, 0, excelsr, excelsr, playmark_state, pic_decode, ROT0, "Playmark", "Excelsior (set 1)", MACHINE_SUPPORTS_SAVE )
GAME( 1996, excelsra, excelsr, excelsr, excelsr, playmark_state, pic_decode, ROT0, "Playmark", "Excelsior (set 2)", MACHINE_SUPPORTS_SAVE )
GAME( 1994, hrdtimes, 0, hrdtimes, hrdtimes, driver_device, 0, ROT0, "Playmark", "Hard Times (set 1)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )

View File

@ -78,13 +78,8 @@ WRITE16_MEMBER(powerbal_state::tile_banking_w)
WRITE16_MEMBER(powerbal_state::oki_banking)
{
if (data & 3)
{
int addr = (data & 3) - 1;
if (addr * 0x40000 < memregion("oki")->bytes())
m_oki->set_rom_bank(addr);
}
int bank = data & 3;
m_okibank->set_entry(bank & (m_oki_numbanks - 1));
}
static ADDRESS_MAP_START( magicstk_main_map, AS_PROGRAM, 16, powerbal_state )
@ -128,6 +123,10 @@ static ADDRESS_MAP_START( powerbal_main_map, AS_PROGRAM, 16, powerbal_state )
AM_RANGE(0x103000, 0x103fff) AM_RAM
ADDRESS_MAP_END
static ADDRESS_MAP_START( oki_map, AS_0, 8, powerbal_state )
AM_RANGE(0x00000, 0x1ffff) AM_ROM
AM_RANGE(0x20000, 0x3ffff) AM_ROMBANK("okibank")
ADDRESS_MAP_END
static INPUT_PORTS_START( powerbal )
PORT_START("IN0")
@ -484,6 +483,7 @@ MACHINE_START_MEMBER(powerbal_state,powerbal)
MACHINE_RESET_MEMBER(powerbal_state,powerbal)
{
m_tilebank = 0;
configure_oki_banks();
}
static MACHINE_CONFIG_START( powerbal, powerbal_state )
@ -516,6 +516,7 @@ static MACHINE_CONFIG_START( powerbal, powerbal_state )
MCFG_OKIM6295_ADD("oki", 1000000, OKIM6295_PIN7_HIGH)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( magicstk, powerbal_state )
@ -551,6 +552,7 @@ static MACHINE_CONFIG_START( magicstk, powerbal_state )
MCFG_OKIM6295_ADD("oki", 1000000, OKIM6295_PIN7_HIGH)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map)
MACHINE_CONFIG_END
@ -622,12 +624,8 @@ ROM_START( powerbal )
/* $00000-$20000 stays the same in all sound banks, */
/* the second half of the bank is the area that gets switched */
ROM_REGION( 0xc0000, "oki", 0 ) /* OKI Samples */
ROM_LOAD( "1.u16", 0x00000, 0x40000, CRC(12776dbc) SHA1(9ab9930fd581296642834d2cb4ba65264a588af3) )
ROM_CONTINUE( 0x60000, 0x20000 )
ROM_CONTINUE( 0xa0000, 0x20000 )
ROM_COPY( "oki", 0x000000, 0x40000, 0x20000)
ROM_COPY( "oki", 0x000000, 0x80000, 0x20000)
ROM_REGION( 0x80000, "oki", 0 ) /* OKI Samples */
ROM_LOAD( "1.u16", 0x00000, 0x80000, CRC(12776dbc) SHA1(9ab9930fd581296642834d2cb4ba65264a588af3) )
ROM_REGION( 0x1200, "plds", 0 )
ROM_LOAD( "palce16v8h.u102", 0x0000, 0x0117, NO_DUMP ) /* PAL is read protected */

View File

@ -16,6 +16,7 @@ public:
m_spriteram(*this, "spriteram"),
m_rowscroll(*this, "rowscroll"),
m_oki(*this, "oki"),
m_okibank(*this, "okibank"),
m_eeprom(*this, "eeprom"),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
@ -51,11 +52,13 @@ public:
uint16_t m_snd_flag;
uint8_t m_oki_control;
uint8_t m_oki_command;
int m_old_oki_bank;
uint8_t m_dispenser_latch;
int m_oki_numbanks;
void configure_oki_banks();
/* devices */
required_device<okim6295_device> m_oki;
optional_memory_bank m_okibank;
optional_device<eeprom_serial_93cxx_device> m_eeprom;
DECLARE_WRITE16_MEMBER(coinctrl_w);
DECLARE_WRITE16_MEMBER(wbeachvl_coin_eeprom_w);