diff --git a/src/mame/drivers/playmark.cpp b/src/mame/drivers/playmark.cpp index 62f25ba6699..00258cb34df 100644 --- a/src/mame/drivers/playmark.cpp +++ b/src/mame/drivers/playmark.cpp @@ -43,7 +43,7 @@ to correct the music playback sequencing and also allow sound effect samples to play on any of the three available sample channels. The fourth channel is reserved for music playback. -There is another World Beach Volley with a (undumped) S87C751 for sound instead of a +There is another World Beach Volley with a S87C751 for sound instead of a PIC (also with an OKI M6295) which fully matches "World Beach Volley (set 1)" for the other ROMS. It's an original PCB from Playmark Italy. @@ -83,7 +83,6 @@ A |__ |_MCT1413P_| | TODO: - Hard Times sound is controlled by a PIC16C57 whose internal ROM is currently missing. -- Dump the World Beach Volley sound S87C751 internal ROM. - Lucky Boom has some minor colour issue with the background - see the title screen. The game selects the wrong colour for some tiles. The tiles should be colour 0x01 not 0x02. Affects the backgrounds in game however it's barely noticeable. @@ -100,14 +99,11 @@ TODO: #include "speaker.h" -void playmark_state::coinctrl_w(offs_t offset, uint16_t data, uint16_t mem_mask) +void playmark_state::coinctrl_w(u8 data) { - if (ACCESSING_BITS_8_15) - { - machine().bookkeeping().coin_counter_w(0, data & 0x0100); - machine().bookkeeping().coin_counter_w(1, data & 0x0200); - } - if (data & 0xfcff) + machine().bookkeeping().coin_counter_w(0, data & 0x01); + machine().bookkeeping().coin_counter_w(1, data & 0x02); + if (data & 0xfc) logerror("Writing %04x to unknown coin control bits\n", data); } @@ -118,94 +114,62 @@ void playmark_state::coinctrl_w(offs_t offset, uint16_t data, uint16_t mem_mask) ***************************************************************************/ -void playmark_state::wbeachvl_coin_eeprom_w(offs_t offset, uint16_t data, uint16_t mem_mask) -{ - if (ACCESSING_BITS_0_7) - { - /* bits 0-3 are coin counters? (only 0 used?) */ - machine().bookkeeping().coin_counter_w(0, data & 0x01); - machine().bookkeeping().coin_counter_w(1, data & 0x02); - machine().bookkeeping().coin_counter_w(2, data & 0x04); - machine().bookkeeping().coin_counter_w(3, data & 0x08); - - /* bits 5-7 control EEPROM */ - m_eeprom->cs_write((data & 0x20) ? ASSERT_LINE : CLEAR_LINE); - m_eeprom->di_write((data & 0x80) >> 7); - m_eeprom->clk_write((data & 0x40) ? CLEAR_LINE : ASSERT_LINE); - } -} - -void playmark_state::hotmind_coin_eeprom_w(offs_t offset, uint16_t data, uint16_t mem_mask) -{ - if (ACCESSING_BITS_0_7) - { -// if (data & 0x80) logerror("PC$%06x Writing unknown bits %02x to the Coin/EEPROM port\n", m_maincpu->pcbase(), data); - - if (data) { - if ((m_dispenser_latch & 0x80) == 0) m_dispenser_latch = 0; - if (data & 0x10) { - m_dispenser_latch |= ((data & 0x10) | 0x80); - m_token->motor_w(1); - } - } - else { - m_dispenser_latch &= 0x7f; - m_token->motor_w(BIT(m_dispenser_latch, 4)); - } - m_ticket->motor_w(BIT(data, 3)); - - machine().bookkeeping().coin_counter_w(0, data & 0x20); /* Coin In counter - transistor driven */ - machine().bookkeeping().coin_counter_w(1, data & 0x40); /* Token/Ticket Out counter - transistor driven */ - - m_eeprom->cs_write((data & 1) ? ASSERT_LINE : CLEAR_LINE); - m_eeprom->di_write((data & 4) >> 2); - m_eeprom->clk_write((data & 2) ? ASSERT_LINE : CLEAR_LINE ); - } -} - -void playmark_state::luckboomh_dispenser_w(offs_t offset, uint16_t data, uint16_t mem_mask) -{ - if (ACCESSING_BITS_0_7) - { -// if (data & 0x87) logerror("PC$%06x Writing unknown bits %02x to the Coin/EEPROM port\n", m_maincpu->pcbase(), data); - - if (data) { - if ((m_dispenser_latch & 0x80) == 0) m_dispenser_latch = 0; - if (data & 0x10) { - m_dispenser_latch |= ((data & 0x10) | 0x80); - m_token->motor_w(1); - } - } - else { - m_dispenser_latch &= 0x7f; - m_token->motor_w(BIT(m_dispenser_latch, 4)); - } - m_ticket->motor_w(BIT(data, 3)); - - machine().bookkeeping().coin_counter_w(0, data & 0x20); /* Coin In counter - transistor driven */ - machine().bookkeeping().coin_counter_w(1, data & 0x40); /* Token/Ticket Out counter - transistor driven */ - } -} - -void playmark_state::hrdtimes_coin_w(uint16_t data) +void playmark_state::wbeachvl_coin_eeprom_w(u8 data) { + // bits 0-3 are coin counters? (only 0 used?) machine().bookkeeping().coin_counter_w(0, data & 0x01); machine().bookkeeping().coin_counter_w(1, data & 0x02); + machine().bookkeeping().coin_counter_w(2, data & 0x04); + machine().bookkeeping().coin_counter_w(3, data & 0x08); + + // bits 5-7 control EEPROM + m_eeprom->cs_write((data & 0x20) ? ASSERT_LINE : CLEAR_LINE); + m_eeprom->di_write((data & 0x80) >> 7); + m_eeprom->clk_write((data & 0x40) ? CLEAR_LINE : ASSERT_LINE); } -void playmark_state::playmark_snd_command_w(offs_t offset, uint16_t data, uint16_t mem_mask) +void playmark_state::hotmind_coin_eeprom_w(u8 data) { - if (ACCESSING_BITS_0_7) - { -// logerror("PC$%06x 68K Writing sound command %02x to OKI\n",m_maincpu->pcbase(), data); +// if (data & 0x80) logerror("PC$%06x Writing unknown bits %02x to the Coin/EEPROM port\n", m_maincpu->pcbase(), data); - m_snd_command = (data & 0xff); - m_snd_flag = 1; - m_maincpu->yield(); - } + luckboomh_dispenser_w(data); + + m_eeprom->cs_write((data & 1) ? ASSERT_LINE : CLEAR_LINE); + m_eeprom->di_write((data & 4) >> 2); + m_eeprom->clk_write((data & 2) ? ASSERT_LINE : CLEAR_LINE ); } -uint8_t playmark_state::playmark_snd_command_r() +void playmark_state::luckboomh_dispenser_w(u8 data) +{ +// if (data & 0x87) logerror("PC$%06x Writing unknown bits %02x to the Coin/EEPROM port\n", m_maincpu->pcbase(), data); + + if (data) { + if ((m_dispenser_latch & 0x80) == 0) m_dispenser_latch = 0; + if (data & 0x10) { + m_dispenser_latch |= ((data & 0x10) | 0x80); + m_token->motor_w(1); + } + } + else { + m_dispenser_latch &= 0x7f; + m_token->motor_w(BIT(m_dispenser_latch, 4)); + } + m_ticket->motor_w(BIT(data, 3)); + + machine().bookkeeping().coin_counter_w(0, data & 0x20); // Coin In counter - transistor driven + machine().bookkeeping().coin_counter_w(1, data & 0x40); // Token/Ticket Out counter - transistor driven +} + +void playmark_state::playmark_snd_command_w(u8 data) +{ +// logerror("PC$%06x 68K Writing sound command %02x to OKI\n",m_maincpu->pcbase(), data); + + m_snd_command = data; + m_snd_flag = 1; + m_maincpu->yield(); +} + +u8 playmark_state::playmark_snd_command_r() { int data = 0; @@ -223,7 +187,7 @@ uint8_t playmark_state::playmark_snd_command_r() return data; } -uint8_t playmark_state::playmark_snd_flag_r() +u8 playmark_state::playmark_snd_flag_r() { if (m_snd_flag) { @@ -235,7 +199,7 @@ uint8_t playmark_state::playmark_snd_flag_r() } -void playmark_state::playmark_oki_banking_w(uint8_t data) +void playmark_state::playmark_oki_banking_w(u8 data) { logerror("%s Writing %02x to PortA (OKI bank select)\n",machine().describe_context(),data); @@ -244,12 +208,12 @@ void playmark_state::playmark_oki_banking_w(uint8_t data) m_okibank->set_entry(bank & (m_oki_numbanks - 1)); } -void playmark_state::playmark_oki_w(uint8_t data) +void playmark_state::playmark_oki_w(u8 data) { m_oki_command = data; } -void playmark_state::playmark_snd_control_w(uint8_t data) +void playmark_state::playmark_snd_control_w(u8 data) { /* This port controls communications to and from the 68K and the OKI device. @@ -272,9 +236,9 @@ void playmark_state::playmark_snd_control_w(uint8_t data) } } -void playmark_state::hrdtimes_snd_control_w(uint8_t data) +void playmark_state::hrdtimes_snd_control_w(u8 data) { - /* 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. */ + // 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. int bank = data & 3; m_okibank->set_entry(bank & (m_oki_numbanks - 1)); @@ -294,22 +258,22 @@ void playmark_state::hrdtimes_snd_control_w(uint8_t data) void playmark_state::bigtwin_main_map(address_map &map) { map(0x000000, 0x0fffff).rom(); - map(0x304000, 0x304001).noprw(); /* watchdog? irq ack? */ + map(0x304000, 0x304001).noprw(); // watchdog? irq ack? map(0x440000, 0x4403ff).ram().share("spriteram"); map(0x500000, 0x500fff).w(FUNC(playmark_state::wbeachvl_fgvideoram_w)).share("videoram2"); - map(0x501000, 0x501fff).nopw(); /* unused RAM? */ + map(0x501000, 0x501fff).nopw(); // unused RAM? map(0x502000, 0x503fff).w(FUNC(playmark_state::wbeachvl_txvideoram_w)).share("videoram1"); - map(0x504000, 0x50ffff).nopw(); /* unused RAM? */ + map(0x504000, 0x50ffff).nopw(); // unused RAM? map(0x510000, 0x51000b).w(FUNC(playmark_state::bigtwin_scroll_w)); - map(0x51000c, 0x51000d).nopw(); /* always 3? */ + map(0x51000c, 0x51000d).nopw(); // always 3? map(0x600000, 0x67ffff).ram().share("bgvideoram"); map(0x700010, 0x700011).portr("SYSTEM"); map(0x700012, 0x700013).portr("P1"); map(0x700014, 0x700015).portr("P2"); - map(0x700016, 0x700017).w(FUNC(playmark_state::coinctrl_w)); + map(0x700016, 0x700016).w(FUNC(playmark_state::coinctrl_w)); map(0x70001a, 0x70001b).portr("DSW2"); map(0x70001c, 0x70001d).portr("DSW1"); - map(0x70001e, 0x70001f).w(FUNC(playmark_state::playmark_snd_command_w)); + map(0x70001f, 0x70001f).w(FUNC(playmark_state::playmark_snd_command_w)); map(0x780000, 0x7807ff).w(m_palette, FUNC(palette_device::write16)).share("palette"); // map(0xe00000, 0xe00001) ?? written on startup map(0xff0000, 0xffffff).ram(); @@ -329,8 +293,8 @@ void playmark_state::bigtwinb_main_map(address_map &map) map(0x300014, 0x300015).portr("P2"); map(0x30001a, 0x30001b).portr("DSW2"); map(0x30001c, 0x30001d).portr("DSW1"); - map(0x30001e, 0x30001f).w(FUNC(playmark_state::playmark_snd_command_w)); - map(0x304000, 0x304001).nopw(); /* watchdog? irq ack? */ + map(0x30001f, 0x30001f).w(FUNC(playmark_state::playmark_snd_command_w)); + map(0x304000, 0x304001).nopw(); // watchdog? irq ack? map(0xff0000, 0xffffff).ram(); } @@ -343,16 +307,16 @@ void playmark_state::wbeachvl_main_map(address_map &map) map(0x508000, 0x509fff).ram().w(FUNC(playmark_state::wbeachvl_txvideoram_w)).share("videoram1"); map(0x50f000, 0x50ffff).ram().share("rowscroll"); map(0x510000, 0x51000b).w(FUNC(playmark_state::wbeachvl_scroll_w)); - map(0x51000c, 0x51000d).nopw(); /* 2 and 3 */ + map(0x51000c, 0x51000d).nopw(); // 2 and 3 // map(0x700000, 0x700001) ?? written on startup map(0x710010, 0x710011).portr("SYSTEM"); map(0x710012, 0x710013).portr("P1"); map(0x710014, 0x710015).portr("P2"); - map(0x710016, 0x710017).w(FUNC(playmark_state::wbeachvl_coin_eeprom_w)); + map(0x710017, 0x710017).w(FUNC(playmark_state::wbeachvl_coin_eeprom_w)); map(0x710018, 0x710019).portr("P3"); map(0x71001a, 0x71001b).portr("P4"); // map(0x71001c, 0x71001d).r(FUNC(playmark_state::playmark_snd_status???)); - map(0x71001e, 0x71001f).w(FUNC(playmark_state::playmark_snd_command_w)); + map(0x71001f, 0x71001f).w(FUNC(playmark_state::playmark_snd_command_w)); map(0x780000, 0x780fff).w(m_palette, FUNC(palette_device::write16)).share("palette"); map(0xff0000, 0xffffff).ram(); } @@ -360,20 +324,20 @@ void playmark_state::wbeachvl_main_map(address_map &map) void playmark_state::excelsr_main_map(address_map &map) { map(0x000000, 0x2fffff).rom(); - map(0x304000, 0x304001).nopw(); /* watchdog? irq ack? */ + map(0x304000, 0x304001).nopw(); // watchdog? irq ack? map(0x440000, 0x440cff).ram().share("spriteram"); map(0x500000, 0x500fff).ram().w(FUNC(playmark_state::wbeachvl_fgvideoram_w)).share("videoram2"); map(0x501000, 0x501fff).ram().w(FUNC(playmark_state::wbeachvl_txvideoram_w)).share("videoram1"); map(0x510000, 0x51000b).w(FUNC(playmark_state::excelsr_scroll_w)); - map(0x51000c, 0x51000d).nopw(); /* 2 and 3 */ + map(0x51000c, 0x51000d).nopw(); // 2 and 3 map(0x600000, 0x67ffff).ram().share("bgvideoram"); map(0x700010, 0x700011).portr("SYSTEM"); map(0x700012, 0x700013).portr("P1"); map(0x700014, 0x700015).portr("P2"); - map(0x700016, 0x700017).w(FUNC(playmark_state::coinctrl_w)); + map(0x700016, 0x700016).w(FUNC(playmark_state::coinctrl_w)); map(0x70001a, 0x70001b).portr("DSW2"); map(0x70001c, 0x70001d).portr("DSW1"); - map(0x70001e, 0x70001f).w(FUNC(playmark_state::playmark_snd_command_w)); + map(0x70001f, 0x70001f).w(FUNC(playmark_state::playmark_snd_command_w)); map(0x780000, 0x7807ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); map(0xff0000, 0xffffff).ram(); } @@ -397,11 +361,11 @@ void playmark_state::hrdtimes_main_map(address_map &map) map(0x300010, 0x300011).portr("SYSTEM"); map(0x300012, 0x300013).portr("P1"); map(0x300014, 0x300015).portr("P2"); - map(0x300016, 0x300017).w(FUNC(playmark_state::hrdtimes_coin_w)); + map(0x300017, 0x300017).w(FUNC(playmark_state::coinctrl_w)); map(0x30001a, 0x30001b).portr("DSW2"); map(0x30001c, 0x30001d).portr("DSW1"); -// map(0x30001e, 0x30001f).w(FUNC(playmark_state::playmark_snd_command_w)); - map(0x304000, 0x304001).nopw(); /* watchdog? irq ack? */ +// map(0x30001f, 0x30001f).w(FUNC(playmark_state::playmark_snd_command_w)); + map(0x304000, 0x304001).nopw(); // watchdog? irq ack? } void playmark_state::hotmind_main_map(address_map &map) @@ -415,11 +379,12 @@ void playmark_state::hotmind_main_map(address_map &map) map(0x280000, 0x2807ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); map(0x300010, 0x300011).portr("COINS"); map(0x300012, 0x300013).portr("P1"); - map(0x300014, 0x300015).portr("DISPENSER").w(FUNC(playmark_state::hotmind_coin_eeprom_w)); + map(0x300014, 0x300015).portr("DISPENSER"); + map(0x300015, 0x300015).w(FUNC(playmark_state::hotmind_coin_eeprom_w)); map(0x30001a, 0x30001b).portr("DSW2"); map(0x30001c, 0x30001d).portr("DSW1"); - map(0x30001e, 0x30001f).w(FUNC(playmark_state::playmark_snd_command_w)); - map(0x304000, 0x304001).nopw(); /* watchdog? irq ack? */ + map(0x30001f, 0x30001f).w(FUNC(playmark_state::playmark_snd_command_w)); + map(0x304000, 0x304001).nopw(); // watchdog? irq ack? map(0xff0000, 0xffffff).ram(); } @@ -434,10 +399,11 @@ void playmark_state::luckboomh_main_map(address_map &map) map(0x280000, 0x2807ff).w(m_palette, FUNC(palette_device::write16)).share("palette"); map(0x300010, 0x300011).portr("COINS"); map(0x300012, 0x300013).portr("P1"); - map(0x300014, 0x300015).portr("DISPENSER").w(FUNC(playmark_state::luckboomh_dispenser_w)); + map(0x300014, 0x300015).portr("DISPENSER"); + map(0x300015, 0x300015).w(FUNC(playmark_state::luckboomh_dispenser_w)); map(0x30001c, 0x30001d).portr("SERVICE"); - map(0x30001e, 0x30001f).w(FUNC(playmark_state::playmark_snd_command_w)); - map(0x304000, 0x304001).nopw(); /* watchdog? irq ack? */ + map(0x30001f, 0x30001f).w(FUNC(playmark_state::playmark_snd_command_w)); + map(0x304000, 0x304001).nopw(); // watchdog? irq ack? map(0xff0000, 0xff03ff).ram().share("nvram"); map(0xff8000, 0xffffff).ram(); } @@ -539,7 +505,7 @@ static INPUT_PORTS_START( bigtwin ) PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:5,6") -// PORT_DIPSETTING( 0x20, DEF_STR( Easy ) ) /* Seems same as Medium */ + PORT_DIPSETTING( 0x20, DEF_STR( Easy ) ) // Seems same as Medium PORT_DIPSETTING( 0x30, DEF_STR( Medium ) ) PORT_DIPSETTING( 0x10, DEF_STR( Hard ) ) PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) @@ -555,7 +521,7 @@ static INPUT_PORTS_START( bigtwinb ) PORT_INCLUDE( bigtwin ) PORT_MODIFY("DSW2") - PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:3") /* No nudes, No Censor dipswitch */ + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:3") // No nudes, No Censor dipswitch PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) INPUT_PORTS_END @@ -568,8 +534,8 @@ static INPUT_PORTS_START( wbeachvl ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN4 ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_SERVICE_NO_TOGGLE(0x20, IP_ACTIVE_LOW) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* ?? see code at 746a. sound status? */ - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read) /* EEPROM data */ + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) // ?? see code at 746a. sound status? + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read) // EEPROM data PORT_START("P1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) @@ -770,7 +736,7 @@ static INPUT_PORTS_START( hotmind ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("token", ticket_dispenser_device, line_r) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Ticket Dispenser Empty") PORT_CODE(KEYCODE_T) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("ticket", ticket_dispenser_device, line_r) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read) /* EEPROM data */ + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read) // EEPROM data PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("DSW1") @@ -884,10 +850,10 @@ static const gfx_layout spritelayout = }; static GFXDECODE_START( gfx_bigtwin ) - GFXDECODE_ENTRY( "gfx2", 0, spritelayout, 0x200, 16 ) /* colors 0x200-0x2ff */ - GFXDECODE_ENTRY( "gfx1", 0, tilelayout, 0x000, 8 ) /* colors 0x000-0x07f */ - GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0x080, 8 ) /* colors 0x080-0x0ff */ - /* background bitmap uses colors 0x100-0x1ff */ + GFXDECODE_ENTRY( "gfx2", 0, spritelayout, 0x200, 16 ) // colors 0x200-0x2ff + GFXDECODE_ENTRY( "gfx1", 0, tilelayout, 0x000, 8 ) // colors 0x000-0x07f + GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0x080, 8 ) // colors 0x080-0x0ff + // background bitmap uses colors 0x100-0x1ff GFXDECODE_END @@ -915,7 +881,7 @@ static const gfx_layout wtilelayout = 32*8 }; -/* tiles are 6 bpp, sprites only 5bpp */ +// tiles are 6 bpp, sprites only 5bpp static const gfx_layout wspritelayout = { 16,16, @@ -930,16 +896,16 @@ static const gfx_layout wspritelayout = }; static GFXDECODE_START( gfx_wbeachvl ) - GFXDECODE_ENTRY( "gfx1", 0, wspritelayout, 0x600, 16 ) /* colors 0x600-0x7ff */ - GFXDECODE_ENTRY( "gfx1", 0, wtilelayout, 0x000, 16 ) /* colors 0x000-0x3ff */ - GFXDECODE_ENTRY( "gfx1", 0, wcharlayout, 0x400, 8 ) /* colors 0x400-0x5ff */ + GFXDECODE_ENTRY( "gfx1", 0, wspritelayout, 0x600, 16 ) // colors 0x600-0x7ff + GFXDECODE_ENTRY( "gfx1", 0, wtilelayout, 0x000, 16 ) // colors 0x000-0x3ff + GFXDECODE_ENTRY( "gfx1", 0, wcharlayout, 0x400, 8 ) // colors 0x400-0x5ff GFXDECODE_END static GFXDECODE_START( gfx_excelsr ) - GFXDECODE_ENTRY( "gfx2", 0, tilelayout, 0x200, 16 ) /* colors 0x200-0x2ff */ - GFXDECODE_ENTRY( "gfx1", 0, tilelayout, 0x000, 8 ) /* colors 0x000-0x07f */ - GFXDECODE_ENTRY( "gfx1", 0, tilelayout, 0x080, 8 ) /* colors 0x080-0x0ff */ - /* background bitmap uses colors 0x100-0x1ff */ + GFXDECODE_ENTRY( "gfx2", 0, tilelayout, 0x200, 16 ) // colors 0x200-0x2ff + GFXDECODE_ENTRY( "gfx1", 0, tilelayout, 0x000, 8 ) // colors 0x000-0x07f + GFXDECODE_ENTRY( "gfx1", 0, tilelayout, 0x080, 8 ) // colors 0x080-0x0ff + // background bitmap uses colors 0x100-0x1ff GFXDECODE_END static const gfx_layout hrdtimes_full_layout = @@ -992,39 +958,39 @@ static const gfx_layout hotmind_charlayout = static GFXDECODE_START( gfx_hrdtimes ) - GFXDECODE_ENTRY( "gfx2", 0, hrdtimes_full_layout, 0x200, 32 ) /* colors 0x200-0x2ff - Sprites */ - GFXDECODE_ENTRY( "gfx1", 0, hrdtimes_tilelayout, 0x000, 16 ) /* colors 0x000-0x0ff - BG */ - GFXDECODE_ENTRY( "gfx1", 0x80000, hrdtimes_tilelayout, 0x000, 16 ) /* colors 0x000-0x0ff - FG */ - GFXDECODE_ENTRY( "gfx1", 0xfc000, hrdtimes_charlayout, 0x100, 8 ) /* colors 0x100-0x17f - Text */ + GFXDECODE_ENTRY( "gfx2", 0, hrdtimes_full_layout, 0x200, 32 ) // colors 0x200-0x2ff - Sprites + GFXDECODE_ENTRY( "gfx1", 0, hrdtimes_tilelayout, 0x000, 16 ) // colors 0x000-0x0ff - BG + GFXDECODE_ENTRY( "gfx1", 0x80000, hrdtimes_tilelayout, 0x000, 16 ) // colors 0x000-0x0ff - FG + GFXDECODE_ENTRY( "gfx1", 0xfc000, hrdtimes_charlayout, 0x100, 8 ) // colors 0x100-0x17f - Text GFXDECODE_END static GFXDECODE_START( gfx_hotmind ) - GFXDECODE_ENTRY( "gfx2", 0, hrdtimes_full_layout, 0x200, 32 ) /* colors 0x200-0x2ff */ - GFXDECODE_ENTRY( "gfx1", 0, hrdtimes_tilelayout, 0x000, 16 ) /* colors 0x000-0x0ff */ - GFXDECODE_ENTRY( "gfx1", 0x20000, hrdtimes_tilelayout, 0x000, 16 ) /* colors 0x000-0x0ff */ - GFXDECODE_ENTRY( "gfx1", 0x30000, hotmind_charlayout, 0x100, 8 ) /* colors 0x100-0x17f */ + GFXDECODE_ENTRY( "gfx2", 0, hrdtimes_full_layout, 0x200, 32 ) // colors 0x200-0x2ff + GFXDECODE_ENTRY( "gfx1", 0, hrdtimes_tilelayout, 0x000, 16 ) // colors 0x000-0x0ff + GFXDECODE_ENTRY( "gfx1", 0x20000, hrdtimes_tilelayout, 0x000, 16 ) // colors 0x000-0x0ff + GFXDECODE_ENTRY( "gfx1", 0x30000, hotmind_charlayout, 0x100, 8 ) // colors 0x100-0x17f GFXDECODE_END static GFXDECODE_START( gfx_luckboomh ) - GFXDECODE_ENTRY( "gfx2", 0, hrdtimes_full_layout, 0x200, 32 ) /* colors 0x200-0x2ff */ - GFXDECODE_ENTRY( "gfx1", 0, hrdtimes_full_layout, 0x000, 16 ) /* colors 0x000-0x0ff */ - GFXDECODE_ENTRY( "gfx1", 0, hrdtimes_full_layout, 0x000, 16 ) /* colors 0x000-0x0ff */ - GFXDECODE_ENTRY( "gfx1", 0x30000, hotmind_charlayout, 0x100, 8 ) /* colors 0x100-0x17f */ + GFXDECODE_ENTRY( "gfx2", 0, hrdtimes_full_layout, 0x200, 32 ) // colors 0x200-0x2ff + GFXDECODE_ENTRY( "gfx1", 0, hrdtimes_full_layout, 0x000, 16 ) // colors 0x000-0x0ff + GFXDECODE_ENTRY( "gfx1", 0, hrdtimes_full_layout, 0x000, 16 ) // colors 0x000-0x0ff + GFXDECODE_ENTRY( "gfx1", 0x30000, hotmind_charlayout, 0x100, 8 ) // colors 0x100-0x17f GFXDECODE_END static GFXDECODE_START( gfx_bigtwinb ) - GFXDECODE_ENTRY( "gfx2", 0, spritelayout, 0x300, 16 ) /* colors 0x300-0x3ff */ - GFXDECODE_ENTRY( "gfx1", 0, hrdtimes_tilelayout, 0x000, 16 ) /* colors 0x000-0x0ff */ - GFXDECODE_ENTRY( "gfx1", 0x40000, hrdtimes_tilelayout, 0x000, 16 ) /* colors 0x000-0x0ff */ - GFXDECODE_ENTRY( "gfx1", 0x40000, hotmind_charlayout, 0x200, 16 ) /* colors 0x200-0x2ff */ + GFXDECODE_ENTRY( "gfx2", 0, spritelayout, 0x300, 16 ) // colors 0x300-0x3ff + GFXDECODE_ENTRY( "gfx1", 0, hrdtimes_tilelayout, 0x000, 16 ) // colors 0x000-0x0ff + GFXDECODE_ENTRY( "gfx1", 0x40000, hrdtimes_tilelayout, 0x000, 16 ) // colors 0x000-0x0ff + 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(); + const u32 len = memregion("oki")->bytes(); + u8 *rgn = memregion("oki")->base(); m_oki_numbanks = len / 0x20000; @@ -1058,10 +1024,10 @@ void playmark_state::machine_reset() { m_bgscrollx = 0; m_bgscrolly = 0; - m_bg_enable = 0; - m_bg_full_size = 0; + m_bg_enable = false; + m_bg_full_size = false; m_fgscrollx = 0; - m_fg_rowscroll_enable = 0; + m_fg_rowscroll_enable = false; memset(m_scroll, 0, sizeof(m_scroll)); m_snd_command = 0; @@ -1073,8 +1039,8 @@ void playmark_state::machine_reset() void playmark_state::bigtwin(machine_config &config) { - /* basic machine hardware */ - M68000(config, m_maincpu, 12000000); /* 12 MHz */ + // basic machine hardware + M68000(config, m_maincpu, 12000000); // 12 MHz m_maincpu->set_addrmap(AS_PROGRAM, &playmark_state::bigtwin_main_map); m_maincpu->set_vblank_int("screen", FUNC(playmark_state::irq2_line_hold)); @@ -1085,7 +1051,7 @@ void playmark_state::bigtwin(machine_config &config) m_audiocpu->read_c().set(FUNC(playmark_state::playmark_snd_flag_r)); m_audiocpu->write_c().set(FUNC(playmark_state::playmark_snd_control_w)); - /* video hardware */ + // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(58); screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); @@ -1099,7 +1065,7 @@ void playmark_state::bigtwin(machine_config &config) MCFG_VIDEO_START_OVERRIDE(playmark_state,bigtwin) - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); OKIM6295(config, m_oki, 1000000, okim6295_device::PIN7_HIGH); @@ -1109,7 +1075,7 @@ void playmark_state::bigtwin(machine_config &config) void playmark_state::bigtwinb(machine_config &config) { - /* basic machine hardware */ + // basic machine hardware M68000(config, m_maincpu, XTAL(24'000'000)/2); m_maincpu->set_addrmap(AS_PROGRAM, &playmark_state::bigtwinb_main_map); m_maincpu->set_vblank_int("screen", FUNC(playmark_state::irq2_line_hold)); @@ -1121,7 +1087,7 @@ void playmark_state::bigtwinb(machine_config &config) m_audiocpu->read_c().set(FUNC(playmark_state::playmark_snd_flag_r)); m_audiocpu->write_c().set(FUNC(playmark_state::playmark_snd_control_w)); - /* video hardware */ + // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(58); screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); @@ -1135,7 +1101,7 @@ void playmark_state::bigtwinb(machine_config &config) MCFG_VIDEO_START_OVERRIDE(playmark_state,bigtwinb) - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); OKIM6295(config, m_oki, 1000000, okim6295_device::PIN7_HIGH); @@ -1145,12 +1111,12 @@ void playmark_state::bigtwinb(machine_config &config) void playmark_state::wbeachvl(machine_config &config) { - /* basic machine hardware */ - M68000(config, m_maincpu, 12000000); /* 12 MHz */ + // basic machine hardware + M68000(config, m_maincpu, 12000000); // 12 MHz m_maincpu->set_addrmap(AS_PROGRAM, &playmark_state::wbeachvl_main_map); m_maincpu->set_vblank_int("screen", FUNC(playmark_state::irq2_line_hold)); - PIC16C57(config, m_audiocpu, XTAL(24'000'000)/2); /* 12MHz with internal 4x divisor */ + PIC16C57(config, m_audiocpu, XTAL(24'000'000)/2); // 12MHz with internal 4x divisor m_audiocpu->write_a().set(FUNC(playmark_state::playmark_oki_banking_w)); // wrong? m_audiocpu->read_b().set(FUNC(playmark_state::playmark_snd_command_r)); m_audiocpu->write_b().set(FUNC(playmark_state::playmark_oki_w)); @@ -1160,7 +1126,7 @@ void playmark_state::wbeachvl(machine_config &config) EEPROM_93C46_16BIT(config, "eeprom").default_value(0); - /* video hardware */ + // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(58); screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); @@ -1174,7 +1140,7 @@ void playmark_state::wbeachvl(machine_config &config) MCFG_VIDEO_START_OVERRIDE(playmark_state,wbeachvl) - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); OKIM6295(config, m_oki, 1000000, okim6295_device::PIN7_HIGH); @@ -1184,19 +1150,19 @@ void playmark_state::wbeachvl(machine_config &config) void playmark_state::excelsr(machine_config &config) { - /* basic machine hardware */ - M68000(config, m_maincpu, XTAL(24'000'000)/2); /* 12 MHz */ + // basic machine hardware + M68000(config, m_maincpu, XTAL(24'000'000)/2); // 12 MHz m_maincpu->set_addrmap(AS_PROGRAM, &playmark_state::excelsr_main_map); m_maincpu->set_vblank_int("screen", FUNC(playmark_state::irq2_line_hold)); - PIC16C57(config, m_audiocpu, XTAL(24'000'000)/2); /* 12MHz with internal 4x divisor */ + PIC16C57(config, m_audiocpu, XTAL(24'000'000)/2); // 12MHz with internal 4x divisor m_audiocpu->write_a().set(FUNC(playmark_state::playmark_oki_banking_w)); m_audiocpu->read_b().set(FUNC(playmark_state::playmark_snd_command_r)); m_audiocpu->write_b().set(FUNC(playmark_state::playmark_oki_w)); m_audiocpu->read_c().set(FUNC(playmark_state::playmark_snd_flag_r)); m_audiocpu->write_c().set(FUNC(playmark_state::playmark_snd_control_w)); - /* video hardware */ + // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(58); screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); @@ -1210,30 +1176,30 @@ void playmark_state::excelsr(machine_config &config) MCFG_VIDEO_START_OVERRIDE(playmark_state,excelsr) - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); - OKIM6295(config, m_oki, XTAL(1'000'000), okim6295_device::PIN7_HIGH); /* 1MHz resonator */ + OKIM6295(config, m_oki, XTAL(1'000'000), okim6295_device::PIN7_HIGH); // 1MHz resonator m_oki->add_route(ALL_OUTPUTS, "mono", 1.0); m_oki->set_addrmap(0, &playmark_state::oki_map); } void playmark_state::hrdtimes(machine_config &config) { - /* basic machine hardware */ - M68000(config, m_maincpu, XTAL(24'000'000)/2); /* verified on pcb */ + // basic machine hardware + M68000(config, m_maincpu, XTAL(24'000'000)/2); // verified on pcb m_maincpu->set_addrmap(AS_PROGRAM, &playmark_state::hrdtimes_main_map); m_maincpu->set_vblank_int("screen", FUNC(playmark_state::irq6_line_hold)); - PIC16C57(config, m_audiocpu, XTAL(24'000'000)/2); /* verified on pcb */ + PIC16C57(config, m_audiocpu, XTAL(24'000'000)/2); // verified on pcb // m_audiocpu->write_a().set(FUNC(playmark_state::playmark_oki_banking_w)); // Banking data output but not wired. Port C is wired to the OKI banking instead m_audiocpu->read_b().set(FUNC(playmark_state::playmark_snd_command_r)); m_audiocpu->write_b().set(FUNC(playmark_state::playmark_oki_w)); m_audiocpu->read_c().set(FUNC(playmark_state::playmark_snd_flag_r)); m_audiocpu->write_c().set(FUNC(playmark_state::hrdtimes_snd_control_w)); - m_audiocpu->set_disable(); /* Internal code is not dumped yet */ + m_audiocpu->set_disable(); // Internal code is not dumped yet - /* video hardware */ + // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(58); screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); @@ -1247,22 +1213,22 @@ void playmark_state::hrdtimes(machine_config &config) MCFG_VIDEO_START_OVERRIDE(playmark_state,hrdtimes) - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); - OKIM6295(config, m_oki, XTAL(1'000'000), okim6295_device::PIN7_HIGH); /* verified on pcb */ + OKIM6295(config, m_oki, XTAL(1'000'000), okim6295_device::PIN7_HIGH); // verified on pcb m_oki->add_route(ALL_OUTPUTS, "mono", 1.0); m_oki->set_addrmap(0, &playmark_state::oki_map); } void playmark_state::hotmind(machine_config &config) { - /* basic machine hardware */ - M68000(config, m_maincpu, XTAL(24'000'000)/2); /* verified on pcb */ + // basic machine hardware + M68000(config, m_maincpu, XTAL(24'000'000)/2); // verified on pcb m_maincpu->set_addrmap(AS_PROGRAM, &playmark_state::hotmind_main_map); m_maincpu->set_vblank_int("screen", FUNC(playmark_state::irq6_line_hold)); // irq 2 and 6 point to the same location on hotmind - PIC16C57(config, m_audiocpu, XTAL(24'000'000)/2); /* verified on pcb */ + PIC16C57(config, m_audiocpu, XTAL(24'000'000)/2); // verified on pcb // m_audiocpu->write_a().set(FUNC(playmark_state::playmark_oki_banking_w)); // Banking data output but not wired. Port C is wired to the OKI banking instead m_audiocpu->read_b().set(FUNC(playmark_state::playmark_snd_command_r)); m_audiocpu->write_b().set(FUNC(playmark_state::playmark_oki_w)); @@ -1271,7 +1237,7 @@ void playmark_state::hotmind(machine_config &config) EEPROM_93C46_16BIT(config, "eeprom").default_value(0); - /* video hardware */ + // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(58); screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); @@ -1288,22 +1254,22 @@ void playmark_state::hotmind(machine_config &config) TICKET_DISPENSER(config, m_ticket, attotime::from_msec(350), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH); TICKET_DISPENSER(config, m_token, attotime::from_msec(350), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH); - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); - OKIM6295(config, m_oki, XTAL(1'000'000), okim6295_device::PIN7_HIGH); /* verified on pcb */ + OKIM6295(config, m_oki, XTAL(1'000'000), okim6295_device::PIN7_HIGH); // verified on pcb m_oki->add_route(ALL_OUTPUTS, "mono", 1.0); m_oki->set_addrmap(0, &playmark_state::oki_map); } void playmark_state::luckboomh(machine_config &config) { - /* basic machine hardware */ - M68000(config, m_maincpu, XTAL(24'000'000)/2); /* verified on pcb */ + // basic machine hardware + M68000(config, m_maincpu, XTAL(24'000'000)/2); // verified on pcb m_maincpu->set_addrmap(AS_PROGRAM, &playmark_state::luckboomh_main_map); m_maincpu->set_vblank_int("screen", FUNC(playmark_state::irq6_line_hold)); - PIC16C57(config, m_audiocpu, XTAL(24'000'000)/2); /* verified on pcb */ + PIC16C57(config, m_audiocpu, XTAL(24'000'000)/2); // verified on pcb // m_audiocpu->write_a().set(FUNC(playmark_state::playmark_oki_banking_w)); // Banking data output but not wired. Port C is wired to the OKI banking instead m_audiocpu->read_b().set(FUNC(playmark_state::playmark_snd_command_r)); m_audiocpu->write_b().set(FUNC(playmark_state::playmark_oki_w)); @@ -1312,7 +1278,7 @@ void playmark_state::luckboomh(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - /* video hardware */ + // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(58); screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); @@ -1329,10 +1295,10 @@ void playmark_state::luckboomh(machine_config &config) TICKET_DISPENSER(config, m_ticket, attotime::from_msec(350), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH); TICKET_DISPENSER(config, m_token, attotime::from_msec(350), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH); - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); - OKIM6295(config, m_oki, XTAL(1'000'000), okim6295_device::PIN7_HIGH); /* verified on pcb */ + OKIM6295(config, m_oki, XTAL(1'000'000), okim6295_device::PIN7_HIGH); // verified on pcb m_oki->add_route(ALL_OUTPUTS, "mono", 1.0); m_oki->set_addrmap(0, &playmark_state::oki_map); } @@ -1345,13 +1311,13 @@ void playmark_state::luckboomh(machine_config &config) ***************************************************************************/ ROM_START( bigtwin ) - ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x100000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "2.302", 0x000000, 0x80000, CRC(e6767f60) SHA1(ec0ba1c786e6fde04601c2f3f619e3c6545f9239) ) ROM_LOAD16_BYTE( "3.301", 0x000001, 0x80000, CRC(5aba6990) SHA1(4f664a91819fdd27821fa607425701d83fcbd8ce) ) - ROM_REGION( 0x1000, "audiocpu", ROMREGION_ERASE00 ) /* sound (PIC16C57) */ + ROM_REGION( 0x1000, "audiocpu", ROMREGION_ERASE00 ) // sound (PIC16C57) // ROM_LOAD( "16c57hs.bin", 0x0000, 0x1000, CRC(b4c95cc3) SHA1(7fc9b141e7782aa5c17310ee06db99d884537c30) ) - /* ROM will be copied here by the init code from "user1" */ + // ROM will be copied here by the init code from "user1" ROM_REGION( 0x3000, "user1", 0 ) ROM_LOAD( "pic16c57-hs_bigtwin_015.hex", 0x0000, 0x2d4c, CRC(c07e9375) SHA1(7a6714ab888ea6e37bc037bc7419f0998868cfce) ) @@ -1368,18 +1334,18 @@ ROM_START( bigtwin ) ROM_LOAD( "10.323", 0x40000, 0x20000, CRC(2a03432e) SHA1(44722b83093211d88460cbcd9e9c0b638d24ad3e) ) ROM_LOAD( "11.324", 0x60000, 0x20000, CRC(2c980c4c) SHA1(77af29a1f5d4302650915f4a7daf2918a2519a6e) ) - ROM_REGION( 0x40000, "oki", 0 ) /* OKIM6295 samples */ + ROM_REGION( 0x40000, "oki", 0 ) // OKIM6295 samples ROM_LOAD( "1.013", 0x00000, 0x40000, CRC(ff6671dc) SHA1(517941946a3edfc2da0b7aa8a106ebb4ae849beb) ) ROM_END ROM_START( bigtwinb ) - ROM_REGION( 0x40000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x40000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "2.u67", 0x00000, 0x20000, CRC(f5cdf1a9) SHA1(974328cf2b4ec5834a519e3300ee1ad8bc4d5c04) ) ROM_LOAD16_BYTE( "3.u66", 0x00001, 0x20000, CRC(084e990f) SHA1(d7c2e08c7f7c7b453dd19dcf1f30bad46d943c8a) ) - ROM_REGION( 0x1000, "audiocpu", ROMREGION_ERASE00 ) /* sound (PIC16C57) */ + ROM_REGION( 0x1000, "audiocpu", ROMREGION_ERASE00 ) // sound (PIC16C57) // ROM_LOAD( "16c57hs.bin", 0x0000, 0x1000, CRC(b4c95cc3) SHA1(7fc9b141e7782aa5c17310ee06db99d884537c30) ) - /* ROM will be copied here by the init code from "user1" */ + // ROM will be copied here by the init code from "user1" ROM_REGION( 0x3000, "user1", 0 ) ROM_LOAD( "pic16c57-hs_bigtwin_015.hex", 0x0000, 0x2d4c, CRC(c07e9375) SHA1(7a6714ab888ea6e37bc037bc7419f0998868cfce) ) @@ -1400,16 +1366,16 @@ ROM_START( bigtwinb ) ROM_LOAD( "9.u84", 0x40000, 0x20000, CRC(2a03432e) SHA1(44722b83093211d88460cbcd9e9c0b638d24ad3e) ) ROM_LOAD( "8.u83", 0x60000, 0x20000, CRC(2c980c4c) SHA1(77af29a1f5d4302650915f4a7daf2918a2519a6e) ) - ROM_REGION( 0x40000, "oki", 0 ) /* OKIM6295 samples */ + ROM_REGION( 0x40000, "oki", 0 ) // OKIM6295 samples ROM_LOAD( "io13.bin", 0x00000, 0x40000, CRC(ff6671dc) SHA1(517941946a3edfc2da0b7aa8a106ebb4ae849beb) ) ROM_END ROM_START( wbeachvl ) - ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x80000, "maincpu", 0 ) // 68000 code 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( 0x1009, "audiocpu", ROMREGION_ERASE00 ) /* sound (PIC16C57) */ + 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) ) @@ -1426,20 +1392,19 @@ ROM_START( wbeachvl ) ROM_LOAD( "wbv_08.bin", 0x480000, 0x80000, CRC(07e4b416) SHA1(a780ef0bd11897ab437359985f6e4852030ddbbf) ) ROM_LOAD( "wbv_15.bin", 0x500000, 0x80000, CRC(4e1a82d2) SHA1(9e66b52ba8e8144f772183396fc1a2fbb37ed2bc) ) ROM_LOAD( "wbv_09.bin", 0x580000, 0x20000, CRC(894ce354) SHA1(331aeabbe10cd645776da2dc0829acc2275e72dc) ) - /* 5a0000-5fffff is empty */ + // 5a0000-5fffff is empty - /* $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 */ + // $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( "wbv_01.bin", 0x00000, 0x100000, CRC(ac33f25f) SHA1(5d9ed16650aeb297d565376a99b31c88ab611668) ) ROM_END ROM_START( wbeachvl2 ) - ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x80000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "2.bin", 0x000000, 0x40000, CRC(8993487e) SHA1(c927ae655807f9046f66ff96a30bd2c6fa671566) ) ROM_LOAD16_BYTE( "3.bin", 0x000001, 0x40000, CRC(15904789) SHA1(640c80bbf7302529e1a39c2ae60e018ecb176478) ) - ROM_REGION( 0x1009, "audiocpu", ROMREGION_ERASE00 ) /* sound (PIC16C57) */ + 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) ) @@ -1456,20 +1421,19 @@ ROM_START( wbeachvl2 ) ROM_LOAD( "wbv_08.bin", 0x480000, 0x80000, CRC(07e4b416) SHA1(a780ef0bd11897ab437359985f6e4852030ddbbf) ) ROM_LOAD( "wbv_15.bin", 0x500000, 0x80000, CRC(4e1a82d2) SHA1(9e66b52ba8e8144f772183396fc1a2fbb37ed2bc) ) ROM_LOAD( "wbv_09.bin", 0x580000, 0x20000, CRC(894ce354) SHA1(331aeabbe10cd645776da2dc0829acc2275e72dc) ) - /* 5a0000-5fffff is empty */ + // 5a0000-5fffff is empty - /* $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 */ + // $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( "wbv_01.bin", 0x00000, 0x100000, CRC(ac33f25f) SHA1(5d9ed16650aeb297d565376a99b31c88ab611668) ) ROM_END ROM_START( wbeachvl3 ) - ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x80000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "2.u16", 0x000000, 0x40000, CRC(f0f4c282) SHA1(94850b45368c3d09629852adc8ca08164b7a7a94) ) ROM_LOAD16_BYTE( "3.u15", 0x000001, 0x40000, CRC(99775c21) SHA1(fa80a81c59142abcf751352d7a7f9e0d3b5172c9) ) - ROM_REGION( 0x1009, "audiocpu", ROMREGION_ERASE00 ) /* sound (PIC16C57) */ + 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) ) @@ -1486,16 +1450,15 @@ ROM_START( wbeachvl3 ) ROM_LOAD( "wbv_08.bin", 0x480000, 0x80000, CRC(07e4b416) SHA1(a780ef0bd11897ab437359985f6e4852030ddbbf) ) ROM_LOAD( "wbv_15.bin", 0x500000, 0x80000, CRC(4e1a82d2) SHA1(9e66b52ba8e8144f772183396fc1a2fbb37ed2bc) ) ROM_LOAD( "wbv_09.bin", 0x580000, 0x20000, CRC(894ce354) SHA1(331aeabbe10cd645776da2dc0829acc2275e72dc) ) - /* 5a0000-5fffff is empty */ + // 5a0000-5fffff is empty - /* $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 */ + // $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( "wbv_01.bin", 0x00000, 0x100000, CRC(ac33f25f) SHA1(5d9ed16650aeb297d565376a99b31c88ab611668) ) ROM_END ROM_START( excelsr ) - ROM_REGION( 0x300000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x300000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "22.u301", 0x000001, 0x80000, CRC(f0aa1c1b) SHA1(5ed68181defe6cde6f4979508f0cfce9e9743912) ) // sldh w/excelsra ROM_LOAD16_BYTE( "19.u302", 0x000000, 0x80000, CRC(9a8acddc) SHA1(c7868317998bb98c630685a0b242ffd1fbdc54ed) ) // sldh w/excelsra ROM_LOAD16_BYTE( "21.u303", 0x100001, 0x80000, CRC(fdf9bd64) SHA1(783e3b8b70f8751915715e2455990c1c8eec6a71) ) @@ -1503,8 +1466,8 @@ ROM_START( excelsr ) ROM_LOAD16_BYTE( "20.u305", 0x200001, 0x80000, CRC(8692afe9) SHA1(b4411bad64a9a6efd8eb13dcf7c5eebfb5681f3d) ) ROM_LOAD16_BYTE( "17.u306", 0x200000, 0x80000, CRC(978f9a6b) SHA1(9514b97f071fd20740218a58af877765beffedad) ) - ROM_REGION( 0x1000, "audiocpu", ROMREGION_ERASE00 ) /* sound (PIC16C57) */ - /* ROM will be copied here by the init code from "user1" */ + ROM_REGION( 0x1000, "audiocpu", ROMREGION_ERASE00 ) // sound (PIC16C57) + // ROM will be copied here by the init code from "user1" ROM_REGION( 0x3000, "user1", 0 ) ROM_LOAD( "pic16c57-hs_excelsior_i015.hex", 0x0000, 0x2d4c, CRC(022c6941) SHA1(8ead40bfa7aa783b1ce62bd6cfa673cb876e29e7) ) @@ -1521,14 +1484,13 @@ ROM_START( excelsr ) ROM_LOAD( "23.u323", 0x100000, 0x80000, CRC(d8e1453b) SHA1(a3edb05abe486d4cce30f5caf14be619b6886f7c) ) ROM_LOAD( "27.u324", 0x180000, 0x80000, CRC(eca2c079) SHA1(a07957b427d55c8ca1efb0e83ee3b603f06bed58) ) - /* $00000-$20000 stays the same in all sound banks, */ - /* the second half of the bank is what gets switched */ - ROM_REGION( 0x80000, "oki", 0 ) /* Samples */ + // $00000-$20000 stays the same in all sound banks, the second half of the bank is what gets switched + ROM_REGION( 0x80000, "oki", 0 ) // Samples ROM_LOAD( "16.i013", 0x000000, 0x80000, CRC(7ed9da5d) SHA1(352f1e89613feb1902b6d87adb996ed1c1d8108e) ) ROM_END ROM_START( excelsra ) - ROM_REGION( 0x300000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x300000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "22.u301", 0x000001, 0x80000, CRC(55dca2da) SHA1(b16ce3c12f635e165740b0a72a6cfd838e4ce701) ) // sldh ROM_LOAD16_BYTE( "19.u302", 0x000000, 0x80000, CRC(d13990a8) SHA1(4f002c4a9003af9963a601c78be446815e9bae92) ) // sldh ROM_LOAD16_BYTE( "21.u303", 0x100001, 0x80000, CRC(fdf9bd64) SHA1(783e3b8b70f8751915715e2455990c1c8eec6a71) ) @@ -1536,8 +1498,8 @@ ROM_START( excelsra ) ROM_LOAD16_BYTE( "20.u305", 0x200001, 0x80000, CRC(8692afe9) SHA1(b4411bad64a9a6efd8eb13dcf7c5eebfb5681f3d) ) ROM_LOAD16_BYTE( "17.u306", 0x200000, 0x80000, CRC(978f9a6b) SHA1(9514b97f071fd20740218a58af877765beffedad) ) - ROM_REGION( 0x1000, "audiocpu", ROMREGION_ERASE00 ) /* sound (PIC16C57) */ - /* ROM will be copied here by the init code from "user1" */ + ROM_REGION( 0x1000, "audiocpu", ROMREGION_ERASE00 ) // sound (PIC16C57) + // ROM will be copied here by the init code from "user1" ROM_REGION( 0x3000, "user1", 0 ) ROM_LOAD( "pic16c57-hs_excelsior_i015.hex", 0x0000, 0x2d4c, CRC(022c6941) SHA1(8ead40bfa7aa783b1ce62bd6cfa673cb876e29e7) ) @@ -1554,19 +1516,18 @@ ROM_START( excelsra ) ROM_LOAD( "23.u323", 0x100000, 0x80000, CRC(d8e1453b) SHA1(a3edb05abe486d4cce30f5caf14be619b6886f7c) ) ROM_LOAD( "27.u324", 0x180000, 0x80000, CRC(eca2c079) SHA1(a07957b427d55c8ca1efb0e83ee3b603f06bed58) ) - /* $00000-$20000 stays the same in all sound banks, */ - /* the second half of the bank is what gets switched */ - ROM_REGION( 0x80000, "oki", 0 ) /* Samples */ + // $00000-$20000 stays the same in all sound banks, the second half of the bank is what gets switched + ROM_REGION( 0x80000, "oki", 0 ) // Samples ROM_LOAD( "16.i013", 0x000000, 0x80000, CRC(7ed9da5d) SHA1(352f1e89613feb1902b6d87adb996ed1c1d8108e) ) ROM_END ROM_START( hrdtimes ) - ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x100000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "31.u67", 0x00000, 0x80000, CRC(53eb041b) SHA1(7437da1ceb26e9518a3085560b8a42f37e77ace9) ) ROM_LOAD16_BYTE( "32.u66", 0x00001, 0x80000, CRC(f2c6b382) SHA1(d73affed091a261c4bfe17f409657e0a46b6c163) ) - ROM_REGION( 0x1000, "audiocpu", ROMREGION_ERASE00 ) /* sound (PIC16C57) */ - /* ROM will be copied here by the init code from "user1" */ + ROM_REGION( 0x1000, "audiocpu", ROMREGION_ERASE00 ) // sound (PIC16C57) + // ROM will be copied here by the init code from "user1" ROM_REGION( 0x3000, "user1", 0 ) ROM_LOAD( "pic16c57.hex", 0x0000, 0x1000, NO_DUMP ) @@ -1583,21 +1544,20 @@ ROM_START( hrdtimes ) ROM_LOAD16_BYTE( "35.u84", 0x100000, 0x80000, CRC(7bde46ec) SHA1(1d26d268e1fc937e23ae7d93a1f86386b899a0c2) ) ROM_LOAD16_BYTE( "39.u83", 0x100001, 0x80000, CRC(a0bae586) SHA1(0b2bb0c5c51b2717b820f0176d5775df21652667) ) - /* $00000-$20000 stays the same in all sound banks, */ - /* the second half of the bank is what gets switched */ - ROM_REGION( 0x80000, "oki", 0 ) /* Samples */ + // $00000-$20000 stays the same in all sound banks, the second half of the bank is what gets switched + 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 */ +// Different revision of the PCB, uses larger gfx ROMs, however the content is the same ROM_START( hrdtimesa ) - ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x100000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "u67.bin", 0x00000, 0x80000, CRC(3e1334cb) SHA1(9523c04f92371a35c297280b42b1604e23790a1e) ) ROM_LOAD16_BYTE( "u66.bin", 0x00001, 0x80000, CRC(041ec30a) SHA1(00476ebd0a64cbd027be159cae7666d2df6d11ba) ) - ROM_REGION( 0x1000, "audiocpu", ROMREGION_ERASE00 ) /* sound (PIC16C57) */ - /* ROM will be copied here by the init code from "user1" */ + ROM_REGION( 0x1000, "audiocpu", ROMREGION_ERASE00 ) // sound (PIC16C57) + // ROM will be copied here by the init code from "user1" ROM_REGION( 0x3000, "user1", 0 ) ROM_LOAD( "pic16c57.hex", 0x0000, 0x1000, NO_DUMP ) @@ -1610,9 +1570,8 @@ ROM_START( hrdtimesa ) ROM_LOAD( "mh1_playmark_ht", 0x000000, 0x100000, CRC(927e5989) SHA1(b01444a3ff57cc2e10594e23c0343c956ed3ee32) ) ROM_LOAD( "mh2_playmark_ht", 0x100000, 0x100000, CRC(e76f001b) SHA1(217c06ca3618275c22e33cfe318ec6c970d4862c) ) - /* $00000-$20000 stays the same in all sound banks, */ - /* the second half of the bank is what gets switched */ - ROM_REGION( 0x80000, "oki", 0 ) /* Samples */ + // $00000-$20000 stays the same in all sound banks, the second half of the bank is what gets switched + ROM_REGION( 0x80000, "oki", 0 ) // Samples ROM_LOAD( "io13.bin", 0x00000, 0x80000, CRC(fa5e50ae) SHA1(f3bd87c83fca9269cc2f19db1fbf55540c96f931) ) ROM_END @@ -1660,12 +1619,12 @@ Notes: */ ROM_START( hotmind ) - ROM_REGION( 0x40000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x40000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "21.u67", 0x00000, 0x20000, CRC(e9000f7f) SHA1(c19fee7b774d3f30f4d4025a63ec396ec119c855) ) ROM_LOAD16_BYTE( "22.u66", 0x00001, 0x20000, CRC(2c518ec5) SHA1(6d9e81ddb5793d64e22dc0254519b947f6ec6954) ) - ROM_REGION( 0x1000, "audiocpu", ROMREGION_ERASE00 ) /* sound (PIC16C57) */ - /* ROM will be copied here by the init code from "user1" */ + ROM_REGION( 0x1000, "audiocpu", ROMREGION_ERASE00 ) // sound (PIC16C57) + // ROM will be copied here by the init code from "user1" ROM_REGION( 0x3000, "user1", 0 ) ROM_LOAD( "hotmind_pic16c57-hs_io15.hex", 0x0000, 0x2d4c, BAD_DUMP CRC(f3300d13) SHA1(78892453c7374ea3d1606cdb81197cc466e2a8c5) ) // protected, contains upper nibble? @@ -1687,10 +1646,10 @@ 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( 0x40000, "oki", 0 ) /* Samples */ + 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_REGION( 0x8000, "plds", 0 ) // These were read protected ROM_LOAD( "palce16v8h-25-pc4_u58.jed", 0x0000, 0xb89, BAD_DUMP CRC(ba88c1da) SHA1(9b55e96eee44a467bdfbf760137ccb2fb3afedf0) ) ROM_LOAD( "palce16v8h-25-pc4_u182.jed", 0x0000, 0xb89, BAD_DUMP CRC(ba88c1da) SHA1(9b55e96eee44a467bdfbf760137ccb2fb3afedf0) ) ROM_LOAD( "palce16v8h-25-pc4_jamma.jed", 0x0000, 0xb89, BAD_DUMP CRC(ba88c1da) SHA1(9b55e96eee44a467bdfbf760137ccb2fb3afedf0) ) // On the Jamma Expansion board @@ -1700,12 +1659,12 @@ ROM_START( hotmind ) ROM_END ROM_START( luckboomh ) - ROM_REGION( 0x40000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x40000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "21.u67", 0x00000, 0x20000, CRC(5578dd75) SHA1(ed3c2ea302f8bfe49ab5d8c33e572492daa651ae) ) ROM_LOAD16_BYTE( "22.u66", 0x00001, 0x20000, CRC(1eb72a39) SHA1(d7ea9985013fd8cb89389829dbff2f2710a2297d) ) - ROM_REGION( 0x2000, "audiocpu", ROMREGION_ERASE00 ) /* sound (PIC16C57) */ - /* ROM will be copied here by the init code from "user1" */ + ROM_REGION( 0x2000, "audiocpu", ROMREGION_ERASE00 ) // sound (PIC16C57) + // ROM will be copied here by the init code from "user1" ROM_LOAD( "luckyboom_pic16c57-hs_io15.bin", 0x00000, 0x2000, BAD_DUMP CRC(c4b9c78e) SHA1(e85766383b22a62f19bf272d86d53c7fb1eb5ac4) ) // protected, contains upper nibble? ROM_REGION( 0x3000, "user1", 0 ) @@ -1721,24 +1680,24 @@ ROM_START( luckboomh ) ROM_LOAD16_BYTE( "28.u40", 0x040001, 0x10000, CRC(40e65ed1) SHA1(bc75eb816c58eb0f983bb0eaee854c54e306e1da) ) ROM_CONTINUE( 0x060001, 0x10000 ) - ROM_REGION( 0x80000, "gfx2", 0 ) /* Sprites */ + ROM_REGION( 0x80000, "gfx2", 0 ) // Sprites ROM_LOAD16_BYTE( "26.u86", 0x00000, 0x20000, CRC(d3ee7d82) SHA1(b0b3df19d60430e7a9fa29fdfff2183a32986d2d) ) ROM_LOAD16_BYTE( "30.u85", 0x00001, 0x20000, CRC(4b8a9558) SHA1(9f0f2d8f50f21cf188ad778c3a0a68ec23380b23) ) ROM_LOAD16_BYTE( "25.u84", 0x40000, 0x20000, CRC(e1ab5cf5) SHA1(f76d00537cfd6f09439e44071875bf021622fd07) ) ROM_LOAD16_BYTE( "29.u83", 0x40001, 0x20000, CRC(9572d2d4) SHA1(90d55b1f13dc93041160530e8c1ce8def6e02bcf) ) - ROM_REGION( 0x40000, "oki", 0 ) /* Samples */ + 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) +u8 playmark_state::playmark_asciitohex(u8 data) { - /* Convert ASCII data to HEX */ + // Convert ASCII data to HEX if ((data >= 0x30) && (data < 0x3a)) data -= 0x30; - data &= 0xdf; /* remove case sensitivity */ + data &= 0xdf; // remove case sensitivity if ((data >= 0x41) && (data < 0x5b)) data -= 0x37; return data; @@ -1746,12 +1705,12 @@ uint8_t playmark_state::playmark_asciitohex(uint8_t data) void playmark_state::playmark_decode_pic_hex_dump(void) { - uint8_t *playmark_PICROM_HEX = memregion("user1")->base(); - uint16_t *playmark_PICROM = (uint16_t *)memregion("audiocpu")->base(); + u8 *playmark_PICROM_HEX = memregion("user1")->base(); + u16 *playmark_PICROM = (u16 *)memregion("audiocpu")->base(); int32_t offs, data; - uint16_t src_pos = 0; - uint16_t dst_pos = 0; - uint8_t data_hi, data_lo; + u16 src_pos = 0; + u16 dst_pos = 0; + u8 data_hi, data_lo; /**** Convert the PIC16C57 ASCII HEX dumps to pure HEX ****/ do @@ -1783,7 +1742,7 @@ void playmark_state::playmark_decode_pic_hex_dump(void) src_pos += 32; } - /* Get the PIC16C57 Config register data */ + // Get the PIC16C57 Config register data if ((playmark_PICROM_HEX[src_pos + 0] == ':') && (playmark_PICROM_HEX[src_pos + 1] == '0') && @@ -1801,10 +1760,10 @@ void playmark_state::playmark_decode_pic_hex_dump(void) m_audiocpu->set_config(data); - src_pos = 0x7fff; /* Force Exit */ + src_pos = 0x7fff; // Force Exit } src_pos += 1; - } while (src_pos < 0x2d4c); /* 0x2d4c is the size of the HEX rom loaded */ + } while (src_pos < 0x2d4c); // 0x2d4c is the size of the HEX rom loaded } diff --git a/src/mame/drivers/powerbal.cpp b/src/mame/drivers/powerbal.cpp index 7099e1bbeeb..c1590ba0f75 100644 --- a/src/mame/drivers/powerbal.cpp +++ b/src/mame/drivers/powerbal.cpp @@ -47,19 +47,19 @@ protected: virtual void machine_reset() override; private: - int m_tilebank; - int m_bg_yoffset; + u8 m_tilebank; + s8 m_bg_yoffset; - TILE_GET_INFO_MEMBER(powerbal_get_bg_tile_info); + TILE_GET_INFO_MEMBER(get_bg_tile_info); DECLARE_VIDEO_START(powerbal); DECLARE_VIDEO_START(atombjt); - uint32_t screen_update_powerbal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void draw_sprites_powerbal( bitmap_ind16 &bitmap, const rectangle &cliprect ); - void magicstk_coin_eeprom_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - void magicstk_bgvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - void tile_banking_w(uint16_t data); - void atombjt_tile_banking_w(uint16_t data); - void oki_banking(uint16_t data); + u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); + void magicstk_coin_eeprom_w(u8 data); + void bgvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0); + void tile_banking_w(u16 data); + void atombjt_tile_banking_w(u16 data); + void oki_banking(u16 data); void magicstk_main_map(address_map &map); void oki_map(address_map &map); void powerbal_main_map(address_map &map); @@ -67,25 +67,22 @@ private: }; -void powerbal_state::magicstk_coin_eeprom_w(offs_t offset, uint16_t data, uint16_t mem_mask) +void powerbal_state::magicstk_coin_eeprom_w(u8 data) { - if (ACCESSING_BITS_0_7) - { - machine().bookkeeping().coin_counter_w(0, data & 0x20); + machine().bookkeeping().coin_counter_w(0, data & 0x20); - m_eeprom->cs_write((data & 8) ? ASSERT_LINE : CLEAR_LINE); - m_eeprom->di_write((data & 2) >> 1); - m_eeprom->clk_write((data & 4) ? CLEAR_LINE : ASSERT_LINE); - } + m_eeprom->cs_write((data & 8) ? ASSERT_LINE : CLEAR_LINE); + m_eeprom->di_write((data & 2) >> 1); + m_eeprom->clk_write((data & 4) ? CLEAR_LINE : ASSERT_LINE); } -void powerbal_state::magicstk_bgvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask) +void powerbal_state::bgvideoram_w(offs_t offset, u16 data, u16 mem_mask) { - COMBINE_DATA(&m_videoram1[offset]); + COMBINE_DATA(&m_videoram[0][offset]); m_bg_tilemap->mark_tile_dirty(offset); } -void powerbal_state::tile_banking_w(uint16_t data) +void powerbal_state::tile_banking_w(u16 data) { if (((data >> 12) & 0x0f) != m_tilebank) { @@ -94,7 +91,7 @@ void powerbal_state::tile_banking_w(uint16_t data) } } -void powerbal_state::atombjt_tile_banking_w(uint16_t data) +void powerbal_state::atombjt_tile_banking_w(u16 data) { if ((data & 0x0f) != m_tilebank) { @@ -103,7 +100,7 @@ void powerbal_state::atombjt_tile_banking_w(uint16_t data) } } -void powerbal_state::oki_banking(uint16_t data) +void powerbal_state::oki_banking(u16 data) { int bank = data & 3; m_okibank->set_entry(bank & (m_oki_numbanks - 1)); @@ -116,10 +113,11 @@ void powerbal_state::magicstk_main_map(address_map &map) map(0x094000, 0x094001).nopw(); map(0x094002, 0x094003).nopw(); map(0x094004, 0x094005).w(FUNC(powerbal_state::tile_banking_w)); - map(0x098180, 0x09917f).ram().w(FUNC(powerbal_state::magicstk_bgvideoram_w)).share("videoram1"); + map(0x098180, 0x09917f).ram().w(FUNC(powerbal_state::bgvideoram_w)).share("videoram1"); map(0x0c2010, 0x0c2011).portr("IN0"); map(0x0c2012, 0x0c2013).portr("IN1"); - map(0x0c2014, 0x0c2015).portr("IN2").w(FUNC(powerbal_state::magicstk_coin_eeprom_w)); + map(0x0c2014, 0x0c2015).portr("IN2"); + map(0x0c2015, 0x0c2015).w(FUNC(powerbal_state::magicstk_coin_eeprom_w)); map(0x0c2016, 0x0c2017).portr("DSW1"); map(0x0c2018, 0x0c2019).portr("DSW2"); map(0x0c201c, 0x0c201d).w(FUNC(powerbal_state::oki_banking)); @@ -136,7 +134,7 @@ void powerbal_state::powerbal_main_map(address_map &map) map(0x094000, 0x094001).nopw(); map(0x094002, 0x094003).nopw(); map(0x094004, 0x094005).w(FUNC(powerbal_state::tile_banking_w)); - map(0x098000, 0x098fff).ram().w(FUNC(powerbal_state::magicstk_bgvideoram_w)).share("videoram1"); + map(0x098000, 0x098fff).ram().w(FUNC(powerbal_state::bgvideoram_w)).share("videoram1"); map(0x099000, 0x09bfff).ram(); // not used map(0x0c2010, 0x0c2011).portr("IN0"); map(0x0c2012, 0x0c2013).portr("IN1"); @@ -159,8 +157,8 @@ void powerbal_state::atombjt_map(address_map &map) map(0x080014, 0x080015).noprw(); // always 1 in this bootleg. Flip-screen switch not present according to dip sheet. map(0x088000, 0x0883ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); map(0x094000, 0x094001).w(FUNC(powerbal_state::atombjt_tile_banking_w)); - map(0x094002, 0x094003).noprw(); /* IRQ enable? */ - map(0x09c000, 0x09cfff).mirror(0x1000).ram().w(FUNC(powerbal_state::magicstk_bgvideoram_w)).share("videoram1"); + map(0x094002, 0x094003).noprw(); // IRQ enable? + map(0x09c000, 0x09cfff).mirror(0x1000).ram().w(FUNC(powerbal_state::bgvideoram_w)).share("videoram1"); map(0x0c2010, 0x0c2011).portr("IN0"); map(0x0c2012, 0x0c2013).portr("IN1"); map(0x0c2014, 0x0c2015).portr("IN2"); @@ -244,7 +242,7 @@ static INPUT_PORTS_START( powerbal ) 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 ) ) /* Manual shows this as "Weapon" Off for Yes and On for No - Meaning is unknown */ + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) ) // Manual shows this as "Weapon" Off for Yes and On for No - Meaning is unknown PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x08, 0x08, DEF_STR( Language ) ) @@ -284,7 +282,7 @@ static INPUT_PORTS_START( magicstk ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN2") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read) /* EEPROM data */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read) // EEPROM data PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -352,8 +350,8 @@ static INPUT_PORTS_START( magicstk ) PORT_DIPSETTING( 0xa0, "Hard 7" ) PORT_DIPSETTING( 0x20, "Very Hard 6" ) PORT_DIPSETTING( 0xc0, "Very Hard 5" ) -// PORT_DIPSETTING( 0x80, "Very Hard 4" ) -// PORT_DIPSETTING( 0x40, "Very Hard 4" ) + PORT_DIPSETTING( 0x80, "Very Hard 4" ) + PORT_DIPSETTING( 0x40, "Very Hard 4" ) PORT_DIPSETTING( 0x00, "Very Hard 4" ) PORT_DIPSETTING( 0x60, "Normal 8" ) PORT_DIPSETTING( 0xe0, "Easy 9" ) @@ -381,7 +379,7 @@ static INPUT_PORTS_START( hotminda ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN2") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read) /* EEPROM data */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read) // EEPROM data PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -446,9 +444,9 @@ static INPUT_PORTS_START( atombjt ) // verified with dip sheet PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* shown in service mode, but no effect */ - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* Maybe unused */ - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* Maybe unused */ + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) // shown in service mode, but no effect + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) // Maybe unused + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // Maybe unused PORT_START("IN1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) @@ -522,34 +520,32 @@ static INPUT_PORTS_START( atombjt ) // verified with dip sheet INPUT_PORTS_END -TILE_GET_INFO_MEMBER(powerbal_state::powerbal_get_bg_tile_info) +TILE_GET_INFO_MEMBER(powerbal_state::get_bg_tile_info) { - int code = (m_videoram1[tile_index] & 0x07ff) + m_tilebank * 0x800; - int colr = m_videoram1[tile_index] & 0xf000; + int code = (m_videoram[0][tile_index] & 0x07ff) + m_tilebank * 0x800; + int colr = m_videoram[0][tile_index] & 0xf000; - if (m_videoram1[tile_index] & 0x800) + if (m_videoram[0][tile_index] & 0x800) code |= 0x8000; tileinfo.set(1, code, colr >> 12, 0); } -void powerbal_state::draw_sprites_powerbal(bitmap_ind16 &bitmap, const rectangle &cliprect ) +void powerbal_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ) { int height = m_gfxdecode->gfx(0)->height(); for (int offs = 4; offs < m_spriteram.bytes() / 2; offs += 4) { - int sx, sy, code, color, flipx; - - sy = m_spriteram[offs + 3 - 4]; /* typical Playmark style... */ + int sy = m_spriteram[offs + 3 - 4]; // typical Playmark style... if (sy & 0x8000) - return; /* end of list marker */ + return; // end of list marker - flipx = sy & 0x4000; - sx = (m_spriteram[offs + 1] & 0x01ff) - 16 - 7; + int flipx = sy & 0x4000; + int sx = (m_spriteram[offs + 1] & 0x01ff) - 16 - 7; sy = (256 - 8 - height - sy) & 0xff; - code = m_spriteram[offs + 2]; - color = (m_spriteram[offs + 1] & 0xf000) >> 12; + int code = m_spriteram[offs + 2]; + int color = (m_spriteram[offs + 1] & 0xf000) >> 12; m_gfxdecode->gfx(0)->transpen(bitmap,cliprect, code, @@ -561,7 +557,7 @@ void powerbal_state::draw_sprites_powerbal(bitmap_ind16 &bitmap, const rectangle VIDEO_START_MEMBER(powerbal_state,powerbal) { - m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(powerbal_state::powerbal_get_bg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); + m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(powerbal_state::get_bg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); m_xoffset = -20; @@ -570,7 +566,7 @@ VIDEO_START_MEMBER(powerbal_state,powerbal) VIDEO_START_MEMBER(powerbal_state,atombjt) { - m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(powerbal_state::powerbal_get_bg_tile_info)), TILEMAP_SCAN_COLS, 8, 8, 64, 32); + m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(powerbal_state::get_bg_tile_info)), TILEMAP_SCAN_COLS, 8, 8, 64, 32); m_xoffset = 0x23; m_yoffset = 0x09; @@ -579,10 +575,10 @@ VIDEO_START_MEMBER(powerbal_state,atombjt) m_bg_tilemap->set_scrollx(0, -64); } -uint32_t powerbal_state::screen_update_powerbal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +u32 powerbal_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); - draw_sprites_powerbal(bitmap, cliprect); + draw_sprites(bitmap, cliprect); return 0; } @@ -613,8 +609,8 @@ static const gfx_layout tilelayout = static GFXDECODE_START( gfx_powerbal ) - GFXDECODE_ENTRY( "gfx2", 0, tilelayout, 0x100, 16 ) /* colors 0x100-0x1ff */ - GFXDECODE_ENTRY( "gfx1", 0, magicstk_charlayout, 0x000, 16 ) /* colors 0x000-0x0ff */ + GFXDECODE_ENTRY( "gfx2", 0, tilelayout, 0x100, 16 ) // colors 0x100-0x1ff + GFXDECODE_ENTRY( "gfx1", 0, magicstk_charlayout, 0x000, 16 ) // colors 0x000-0x0ff GFXDECODE_END @@ -632,18 +628,18 @@ void powerbal_state::machine_reset() void powerbal_state::powerbal(machine_config &config) { - /* basic machine hardware */ - M68000(config, m_maincpu, 12000000); /* 12 MHz */ + // basic machine hardware + M68000(config, m_maincpu, 12_MHz_XTAL); m_maincpu->set_addrmap(AS_PROGRAM, &powerbal_state::powerbal_main_map); m_maincpu->set_vblank_int("screen", FUNC(powerbal_state::irq2_line_hold)); - /* video hardware */ + // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(61); screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); screen.set_size(128*8, 64*8); screen.set_visarea(0*8, 40*8-1, 0*8, 30*8-1); - screen.set_screen_update(FUNC(powerbal_state::screen_update_powerbal)); + screen.set_screen_update(FUNC(powerbal_state::screen_update)); screen.set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_powerbal); @@ -651,30 +647,30 @@ void powerbal_state::powerbal(machine_config &config) MCFG_VIDEO_START_OVERRIDE(powerbal_state,powerbal) - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); - OKIM6295(config, m_oki, 1000000, okim6295_device::PIN7_HIGH); + OKIM6295(config, m_oki, 1_MHz_XTAL, okim6295_device::PIN7_HIGH); m_oki->add_route(ALL_OUTPUTS, "mono", 1.0); m_oki->set_addrmap(0, &powerbal_state::oki_map); } void powerbal_state::magicstk(machine_config &config) { - /* basic machine hardware */ - M68000(config, m_maincpu, 12000000); /* 12 MHz */ + // basic machine hardware + M68000(config, m_maincpu, 12_MHz_XTAL); m_maincpu->set_addrmap(AS_PROGRAM, &powerbal_state::magicstk_main_map); m_maincpu->set_vblank_int("screen", FUNC(powerbal_state::irq2_line_hold)); EEPROM_93C46_16BIT(config, "eeprom").default_value(0); - /* video hardware */ + // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(61); screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */); screen.set_size(128*8, 64*8); screen.set_visarea(0*8, 40*8-1, 0*8, 30*8-1); - screen.set_screen_update(FUNC(powerbal_state::screen_update_powerbal)); + screen.set_screen_update(FUNC(powerbal_state::screen_update)); screen.set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_powerbal); @@ -682,10 +678,10 @@ void powerbal_state::magicstk(machine_config &config) MCFG_VIDEO_START_OVERRIDE(powerbal_state,powerbal) - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); - OKIM6295(config, m_oki, 1000000, okim6295_device::PIN7_HIGH); + OKIM6295(config, m_oki, 1_MHz_XTAL, okim6295_device::PIN7_HIGH); m_oki->add_route(ALL_OUTPUTS, "mono", 1.0); m_oki->set_addrmap(0, &powerbal_state::oki_map); } @@ -753,7 +749,7 @@ Notes: */ ROM_START( powerbal ) - ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x80000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "3.u67", 0x00000, 0x40000, CRC(3aecdde4) SHA1(e78373246d55f120e8d94f4606da874df439b823) ) ROM_LOAD16_BYTE( "2.u66", 0x00001, 0x40000, CRC(a4552a19) SHA1(88b84daa1fd36d5c683cf0d6dce341aedbc360d1) ) @@ -769,21 +765,20 @@ ROM_START( powerbal ) ROM_LOAD( "10.u84", 0x100000, 0x80000, CRC(90412135) SHA1(499619c72613a1dd63a6504e39b159a18a71f4fa) ) ROM_LOAD( "11.u83", 0x180000, 0x80000, CRC(92d7d40a) SHA1(81879945790feb9aeb45750e9b5ded3356571503) ) - /* $00000-$20000 stays the same in all sound banks, */ - /* the second half of the bank is the area that gets switched */ - ROM_REGION( 0x80000, "oki", 0 ) /* OKI Samples */ + // $00000-$20000 stays the same in all sound banks, the second half of the bank is the area that gets switched + 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 */ - ROM_LOAD( "palce22v10h.u183", 0x0200, 0x02dd, NO_DUMP ) /* PAL is read protected */ - ROM_LOAD( "palce22v10h.u211", 0x0600, 0x02dd, NO_DUMP ) /* PAL is read protected */ - ROM_LOAD( "palce22v10h.bin", 0x0a00, 0x02dd, NO_DUMP ) /* PAL is soldered */ - ROM_LOAD( "pal22v10a.bin", 0x0e00, 0x02dd, NO_DUMP ) /* PAL is soldered */ + ROM_LOAD( "palce16v8h.u102", 0x0000, 0x0117, NO_DUMP ) // PAL is read protected + ROM_LOAD( "palce22v10h.u183", 0x0200, 0x02dd, NO_DUMP ) // PAL is read protected + ROM_LOAD( "palce22v10h.u211", 0x0600, 0x02dd, NO_DUMP ) // PAL is read protected + ROM_LOAD( "palce22v10h.bin", 0x0a00, 0x02dd, NO_DUMP ) // PAL is soldered + ROM_LOAD( "pal22v10a.bin", 0x0e00, 0x02dd, NO_DUMP ) // PAL is soldered ROM_END ROM_START( magicstk ) - ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x80000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "12.u67", 0x00000, 0x20000, CRC(70a9c66f) SHA1(0cf4b2d0f796e35881d68adc69eca4360d6ad693) ) ROM_LOAD16_BYTE( "11.u66", 0x00001, 0x20000, CRC(a9d7c90e) SHA1(e12517776dc14747b4bbe49f93c4d7e83e8eae01) ) @@ -799,18 +794,18 @@ ROM_START( magicstk ) ROM_LOAD( "19.u84", 0x40000, 0x20000, CRC(ee12d5b2) SHA1(872edff5a35d2725e3dd752a5f609aca995bfeff) ) ROM_LOAD( "20.u83", 0x60000, 0x20000, CRC(a07f542b) SHA1(0c17629142a90687460b4c951f2062f5c7de8921) ) - ROM_REGION( 0x40000, "oki", 0 ) /* OKI Samples */ + ROM_REGION( 0x40000, "oki", 0 ) // OKI Samples ROM_LOAD( "10.u16", 0x00000, 0x20000, CRC(1e4a03ef) SHA1(6a134daa9a6d8dbda51cab348627f078c3dde8c7) ) ROM_REGION( 0x0800, "plds", 0 ) - ROM_LOAD( "palce16v8.u33", 0x0000, 0x0117, NO_DUMP ) /* PAL is read protected */ - ROM_LOAD( "palce16v8.u58", 0x0200, 0x0117, NO_DUMP ) /* PAL is read protected */ - ROM_LOAD( "gal22v10b.bin", 0x0400, 0x02e5, NO_DUMP ) /* GAL is soldered */ + ROM_LOAD( "palce16v8.u33", 0x0000, 0x0117, NO_DUMP ) // PAL is read protected + ROM_LOAD( "palce16v8.u58", 0x0200, 0x0117, NO_DUMP ) // PAL is read protected + ROM_LOAD( "gal22v10b.bin", 0x0400, 0x02e5, NO_DUMP ) // GAL is soldered ROM_END ROM_START( hotminda ) - ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x80000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "rom1.rom", 0x00001, 0x20000, CRC(33aaceba) SHA1(a914400b081eabd869f1ca2c843a91b03af510b1) ) ROM_LOAD16_BYTE( "rom2.rom", 0x00000, 0x20000, CRC(f5accd9f) SHA1(12194ea7c35263be9afd91f0abe2041998528af9) ) @@ -826,7 +821,7 @@ ROM_START( hotminda ) ROM_LOAD( "rom19.rom", 0x40000, 0x20000, CRC(223ad90f) SHA1(57b4e364f21aeea24a99deb6bab13019846e8f9b) ) ROM_LOAD( "rom20.rom", 0x60000, 0x20000, CRC(ab37a273) SHA1(2051ee99a7ff3f4fc2b91c2c9d4e4da2f12db256) ) - ROM_REGION( 0x40000, "oki", 0 ) /* OKI Samples */ + ROM_REGION( 0x40000, "oki", 0 ) // OKI Samples ROM_LOAD( "rom10.rom", 0x00000, 0x40000, CRC(0bf3a3e5) SHA1(2ae06f37a6bcd20bc5fbaa90d970aba2ebf3cf5a) ) ROM_END diff --git a/src/mame/includes/playmark.h b/src/mame/includes/playmark.h index 9a89b15c2ce..4923f02e41b 100644 --- a/src/mame/includes/playmark.h +++ b/src/mame/includes/playmark.h @@ -18,9 +18,7 @@ public: playmark_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_bgvideoram(*this, "bgvideoram"), - m_videoram1(*this, "videoram1"), - m_videoram2(*this, "videoram2"), - m_videoram3(*this, "videoram3"), + m_videoram(*this, "videoram%u", 1U), m_spriteram(*this, "spriteram"), m_rowscroll(*this, "rowscroll"), m_sprtranspen(0), @@ -49,66 +47,71 @@ protected: virtual void machine_start() override; virtual void machine_reset() override; - /* memory pointers */ - optional_shared_ptr m_bgvideoram; - required_shared_ptr m_videoram1; - optional_shared_ptr m_videoram2; - optional_shared_ptr m_videoram3; - required_shared_ptr m_spriteram; - optional_shared_ptr m_rowscroll; + // memory pointers + optional_shared_ptr m_bgvideoram; + optional_shared_ptr_array m_videoram; + required_shared_ptr m_spriteram; + optional_shared_ptr m_rowscroll; - /* video-related */ - tilemap_t *m_tx_tilemap; - tilemap_t *m_fg_tilemap; - tilemap_t *m_bg_tilemap; - int m_bgscrollx; - int m_bgscrolly; - int m_bg_enable; - int m_bg_full_size; - int m_fgscrollx; - int m_fg_rowscroll_enable; + // video-related + tilemap_t *m_tx_tilemap; + tilemap_t *m_fg_tilemap; + tilemap_t *m_bg_tilemap; + s32 m_bgscrollx; + s16 m_bgscrolly; + bool m_bg_enable; + bool m_bg_full_size; + u32 m_fgscrollx; + bool m_fg_rowscroll_enable; - int m_xoffset; - int m_yoffset; - int m_pri_masks[3]; - uint16_t m_scroll[7]; - int m_sprtranspen; + s8 m_xoffset; + s8 m_yoffset; + u16 m_pri_masks[3]; + u16 m_scroll[7]; + u8 m_sprtranspen; - /* misc */ - uint16_t m_snd_command; - uint16_t m_snd_flag; - uint8_t m_oki_control; - uint8_t m_oki_command; - uint8_t m_dispenser_latch; - int m_oki_numbanks; + // misc + u16 m_snd_command; + u16 m_snd_flag; + u8 m_oki_control; + u8 m_oki_command; + u8 m_dispenser_latch; + u8 m_oki_numbanks; void configure_oki_banks(); - /* devices */ + // devices required_device m_oki; optional_memory_bank m_okibank; optional_device m_eeprom; - void coinctrl_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - void wbeachvl_coin_eeprom_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - void hotmind_coin_eeprom_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - void luckboomh_dispenser_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - void hrdtimes_coin_w(uint16_t data); - void playmark_snd_command_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - uint8_t playmark_snd_command_r(); - uint8_t playmark_snd_flag_r(); - void playmark_oki_w(uint8_t data); - void playmark_snd_control_w(uint8_t data); - void hrdtimes_snd_control_w(uint8_t data); - void wbeachvl_txvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - void wbeachvl_fgvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - void wbeachvl_bgvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - void hrdtimes_txvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - void hrdtimes_fgvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - void hrdtimes_bgvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - void bigtwin_scroll_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - void wbeachvl_scroll_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - void excelsr_scroll_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - void hrdtimes_scroll_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - void playmark_oki_banking_w(uint8_t data); + required_device m_maincpu; + optional_device m_audiocpu; + required_device m_gfxdecode; + required_device m_palette; + optional_device m_ticket; + optional_device m_token; + +private: + void coinctrl_w(u8 data); + void wbeachvl_coin_eeprom_w(u8 data); + void hotmind_coin_eeprom_w(u8 data); + void luckboomh_dispenser_w(u8 data); + void playmark_snd_command_w(u8 data); + u8 playmark_snd_command_r(); + u8 playmark_snd_flag_r(); + void playmark_oki_w(u8 data); + void playmark_snd_control_w(u8 data); + void hrdtimes_snd_control_w(u8 data); + void wbeachvl_txvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0); + void wbeachvl_fgvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0); + void wbeachvl_bgvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0); + void hrdtimes_txvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0); + void hrdtimes_fgvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0); + void hrdtimes_bgvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0); + void bigtwin_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0); + void wbeachvl_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0); + void excelsr_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0); + void hrdtimes_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0); + void playmark_oki_banking_w(u8 data); TILE_GET_INFO_MEMBER(bigtwin_get_tx_tile_info); TILE_GET_INFO_MEMBER(bigtwin_get_fg_tile_info); TILE_GET_INFO_MEMBER(wbeachvl_get_tx_tile_info); @@ -126,22 +129,16 @@ protected: DECLARE_VIDEO_START(hrdtimes); DECLARE_VIDEO_START(luckboomh); TILEMAP_MAPPER_MEMBER(playmark_tilemap_scan_pages); - uint32_t screen_update_bigtwin(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - uint32_t screen_update_bigtwinb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - uint32_t screen_update_wbeachvl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - uint32_t screen_update_excelsr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - uint32_t screen_update_hrdtimes(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + u32 screen_update_bigtwin(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + u32 screen_update_bigtwinb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + u32 screen_update_wbeachvl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + u32 screen_update_excelsr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + u32 screen_update_hrdtimes(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int codeshift ); void bigtwinb_draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int codeshift ); void draw_bitmap( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ); - uint8_t playmark_asciitohex(uint8_t data); + u8 playmark_asciitohex(u8 data); void playmark_decode_pic_hex_dump(void); - required_device m_maincpu; - optional_device m_audiocpu; - required_device m_gfxdecode; - required_device m_palette; - optional_device m_ticket; - optional_device m_token; void bigtwin_main_map(address_map &map); void bigtwinb_main_map(address_map &map); diff --git a/src/mame/video/playmark.cpp b/src/mame/video/playmark.cpp index 834a363b4b1..24612c8ad55 100644 --- a/src/mame/video/playmark.cpp +++ b/src/mame/video/playmark.cpp @@ -13,39 +13,39 @@ TILE_GET_INFO_MEMBER(playmark_state::bigtwin_get_tx_tile_info) { - uint16_t code = m_videoram1[2 * tile_index]; - uint16_t color = m_videoram1[2 * tile_index + 1]; + u16 code = m_videoram[0][2 * tile_index]; + u16 color = m_videoram[0][2 * tile_index + 1]; tileinfo.set(2, code, color, 0); } TILE_GET_INFO_MEMBER(playmark_state::bigtwin_get_fg_tile_info) { - uint16_t code = m_videoram2[2 * tile_index]; - uint16_t color = m_videoram2[2 * tile_index + 1]; + u16 code = m_videoram[1][2 * tile_index]; + u16 color = m_videoram[1][2 * tile_index + 1]; tileinfo.set(1, code, color, 0); } TILE_GET_INFO_MEMBER(playmark_state::wbeachvl_get_tx_tile_info) { - uint16_t code = m_videoram1[2 * tile_index]; - uint16_t color = m_videoram1[2 * tile_index + 1]; + u16 code = m_videoram[0][2 * tile_index]; + u16 color = m_videoram[0][2 * tile_index + 1]; tileinfo.set(2, code, (color >> 2), 0); } TILE_GET_INFO_MEMBER(playmark_state::wbeachvl_get_fg_tile_info) { - uint16_t code = m_videoram2[2 * tile_index]; - uint16_t color = m_videoram2[2 * tile_index + 1]; + u16 code = m_videoram[1][2 * tile_index]; + u16 color = m_videoram[1][2 * tile_index + 1]; tileinfo.set(1, (code & 0x7fff), (color >> 2) + 8, (code & 0x8000) ? TILE_FLIPX : 0); } TILE_GET_INFO_MEMBER(playmark_state::wbeachvl_get_bg_tile_info) { - uint16_t code = m_videoram3[2 * tile_index]; - uint16_t color = m_videoram3[2 * tile_index + 1]; + u16 code = m_videoram[2][2 * tile_index]; + u16 color = m_videoram[2][2 * tile_index + 1]; tileinfo.set(1, (code & 0x7fff), (color >> 2), (code & 0x8000) ? TILE_FLIPX : 0); } @@ -53,24 +53,24 @@ TILE_GET_INFO_MEMBER(playmark_state::wbeachvl_get_bg_tile_info) TILE_GET_INFO_MEMBER(playmark_state::hrdtimes_get_tx_tile_info) { - int code = m_videoram1[tile_index] & 0x0fff; - int colr = m_videoram1[tile_index] & 0xe000; + int code = m_videoram[0][tile_index] & 0x0fff; + int colr = m_videoram[0][tile_index] & 0xe000; tileinfo.set(3, code, (colr >> 13), 0); } TILE_GET_INFO_MEMBER(playmark_state::hrdtimes_get_fg_tile_info) { - int code = m_videoram2[tile_index] & 0x1fff; - int colr = m_videoram2[tile_index] & 0xe000; + int code = m_videoram[1][tile_index] & 0x1fff; + int colr = m_videoram[1][tile_index] & 0xe000; tileinfo.set(2, code, (colr >> 13) + 8, 0); } TILE_GET_INFO_MEMBER(playmark_state::hrdtimes_get_bg_tile_info) { - int code = m_videoram3[tile_index] & 0x1fff; - int colr = m_videoram3[tile_index] & 0xe000; + int code = m_videoram[2][tile_index] & 0x1fff; + int colr = m_videoram[2][tile_index] & 0xe000; tileinfo.set(1, code, (colr >> 13), 0); } @@ -78,8 +78,8 @@ TILE_GET_INFO_MEMBER(playmark_state::hrdtimes_get_bg_tile_info) TILE_GET_INFO_MEMBER(playmark_state::bigtwinb_get_tx_tile_info) { - int code = m_videoram1[tile_index] & 0x0fff; - int colr = m_videoram1[tile_index] & 0xf000; + int code = m_videoram[0][tile_index] & 0x0fff; + int colr = m_videoram[0][tile_index] & 0xf000; tileinfo.set(3, code, (colr >> 12), 0); } @@ -202,7 +202,7 @@ VIDEO_START_MEMBER(playmark_state,luckboomh) -// hard times level 2-4 boss(truck) needs this.. or something similar. +// Hard Times level 2-4 boss(truck) needs this.. or something similar. #define TILES_PER_PAGE_Y (0x20) #define TILES_PER_PAGE_X (0x20) #define PAGES_PER_TMAP_Y (0x1) @@ -217,7 +217,7 @@ TILEMAP_MAPPER_MEMBER(playmark_state::playmark_tilemap_scan_pages) (row % TILES_PER_PAGE_Y) * TILES_PER_PAGE_X; } -// theres enough ram for 64*128 on each tilemap.. +// there's enough ram for 64*128 on each tilemap.. VIDEO_START_MEMBER(playmark_state,hrdtimes) { @@ -246,96 +246,96 @@ VIDEO_START_MEMBER(playmark_state,hrdtimes) ***************************************************************************/ -void playmark_state::wbeachvl_txvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask) +void playmark_state::wbeachvl_txvideoram_w(offs_t offset, u16 data, u16 mem_mask) { - COMBINE_DATA(&m_videoram1[offset]); + COMBINE_DATA(&m_videoram[0][offset]); m_tx_tilemap->mark_tile_dirty(offset / 2); } -void playmark_state::wbeachvl_fgvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask) +void playmark_state::wbeachvl_fgvideoram_w(offs_t offset, u16 data, u16 mem_mask) { - COMBINE_DATA(&m_videoram2[offset]); + COMBINE_DATA(&m_videoram[1][offset]); m_fg_tilemap->mark_tile_dirty(offset / 2); } -void playmark_state::wbeachvl_bgvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask) +void playmark_state::wbeachvl_bgvideoram_w(offs_t offset, u16 data, u16 mem_mask) { - COMBINE_DATA(&m_videoram3[offset]); + COMBINE_DATA(&m_videoram[2][offset]); m_bg_tilemap->mark_tile_dirty(offset / 2); } -void playmark_state::hrdtimes_txvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask) +void playmark_state::hrdtimes_txvideoram_w(offs_t offset, u16 data, u16 mem_mask) { - COMBINE_DATA(&m_videoram1[offset]); + COMBINE_DATA(&m_videoram[0][offset]); m_tx_tilemap->mark_tile_dirty(offset); } -void playmark_state::hrdtimes_fgvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask) +void playmark_state::hrdtimes_fgvideoram_w(offs_t offset, u16 data, u16 mem_mask) { - COMBINE_DATA(&m_videoram2[offset]); + COMBINE_DATA(&m_videoram[1][offset]); m_fg_tilemap->mark_tile_dirty(offset); } -void playmark_state::hrdtimes_bgvideoram_w(offs_t offset, uint16_t data, uint16_t mem_mask) +void playmark_state::hrdtimes_bgvideoram_w(offs_t offset, u16 data, u16 mem_mask) { - COMBINE_DATA(&m_videoram3[offset]); + COMBINE_DATA(&m_videoram[2][offset]); m_bg_tilemap->mark_tile_dirty(offset); } -void playmark_state::bigtwin_scroll_w(offs_t offset, uint16_t data, uint16_t mem_mask) -{ - data = COMBINE_DATA(&m_scroll[offset]); - - switch (offset) - { - case 0: m_tx_tilemap->set_scrollx(0, data + 2); break; - case 1: m_tx_tilemap->set_scrolly(0, data); break; - case 2: m_bgscrollx = -(data + 4); break; - case 3: m_bgscrolly = (-data) & 0x1ff; - m_bg_enable = data & 0x0200; - m_bg_full_size = data & 0x0400; - break; - case 4: m_fg_tilemap->set_scrollx(0, data + 6); break; - case 5: m_fg_tilemap->set_scrolly(0, data); break; - } -} - -void playmark_state::wbeachvl_scroll_w(offs_t offset, uint16_t data, uint16_t mem_mask) -{ - data = COMBINE_DATA(&m_scroll[offset]); - - switch (offset) - { - case 0: m_tx_tilemap->set_scrollx(0, data + 2); break; - case 1: m_tx_tilemap->set_scrolly(0, data); break; - case 2: m_fgscrollx = data + 4;break; - case 3: m_fg_tilemap->set_scrolly(0, data & 0x3ff); - m_fg_rowscroll_enable = data & 0x0800; - break; - case 4: m_bg_tilemap->set_scrollx(0, data + 6); break; - case 5: m_bg_tilemap->set_scrolly(0, data); break; - } -} - -void playmark_state::excelsr_scroll_w(offs_t offset, uint16_t data, uint16_t mem_mask) +void playmark_state::bigtwin_scroll_w(offs_t offset, u16 data, u16 mem_mask) { data = COMBINE_DATA(&m_scroll[offset]); switch (offset) { case 0: m_tx_tilemap->set_scrollx(0, data + 2); break; - case 1: m_tx_tilemap->set_scrolly(0, data); break; - case 2: m_bgscrollx = -data; break; - case 3: m_bgscrolly = (-data + 2)& 0x1ff; - m_bg_enable = data & 0x0200; - m_bg_full_size = data & 0x0400; + case 1: m_tx_tilemap->set_scrolly(0, data); break; + case 2: m_bgscrollx = -(data + 4); break; + case 3: m_bgscrolly = (-data) & 0x1ff; + m_bg_enable = BIT(data, 9); + m_bg_full_size = BIT(data, 10); + break; + case 4: m_fg_tilemap->set_scrollx(0, data + 6); break; + case 5: m_fg_tilemap->set_scrolly(0, data); break; + } +} + +void playmark_state::wbeachvl_scroll_w(offs_t offset, u16 data, u16 mem_mask) +{ + data = COMBINE_DATA(&m_scroll[offset]); + + switch (offset) + { + case 0: m_tx_tilemap->set_scrollx(0, data + 2); break; + case 1: m_tx_tilemap->set_scrolly(0, data); break; + case 2: m_fgscrollx = data + 4; break; + case 3: m_fg_tilemap->set_scrolly(0, data & 0x3ff); + m_fg_rowscroll_enable = BIT(data, 11); + break; + case 4: m_bg_tilemap->set_scrollx(0, data + 6); break; + case 5: m_bg_tilemap->set_scrolly(0, data); break; + } +} + +void playmark_state::excelsr_scroll_w(offs_t offset, u16 data, u16 mem_mask) +{ + data = COMBINE_DATA(&m_scroll[offset]); + + switch (offset) + { + case 0: m_tx_tilemap->set_scrollx(0, data + 2); break; + case 1: m_tx_tilemap->set_scrolly(0, data); break; + case 2: m_bgscrollx = -data; break; + case 3: m_bgscrolly = (-data + 2) & 0x1ff; + m_bg_enable = BIT(data, 9); + m_bg_full_size = BIT(data, 10); break; case 4: m_fg_tilemap->set_scrollx(0, data + 6); break; case 5: m_fg_tilemap->set_scrolly(0, data); break; } } -void playmark_state::hrdtimes_scroll_w(offs_t offset, uint16_t data, uint16_t mem_mask) +void playmark_state::hrdtimes_scroll_w(offs_t offset, u16 data, u16 mem_mask) { data = COMBINE_DATA(&m_scroll[offset]); @@ -361,12 +361,11 @@ void playmark_state::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, int offs, start_offset = m_spriteram.bytes() / 2 - 4; int height = m_gfxdecode->gfx(0)->height(); int colordiv = m_gfxdecode->gfx(0)->granularity() / 16; - uint16_t *spriteram = m_spriteram; // find the "end of list" to draw the sprites in reverse order for (offs = 4; offs < m_spriteram.bytes() / 2; offs += 4) { - if (spriteram[offs + 3 - 4] == 0x2000) /* end of list marker */ + if (m_spriteram[offs + 3 - 4] == 0x2000) // end of list marker { start_offset = offs - 4; break; @@ -375,16 +374,14 @@ void playmark_state::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, for (offs = start_offset; offs >= 4; offs -= 4) { - int sx, sy, code, color, flipx, pri; + int sy = m_spriteram[offs + 3 - 4]; // -4? what the... ??? - sy = spriteram[offs + 3 - 4]; /* -4? what the... ??? */ - - flipx = sy & 0x4000; - sx = (spriteram[offs + 1] & 0x01ff) - 16 - 7; + int flipx = sy & 0x4000; + int sx = (m_spriteram[offs + 1] & 0x01ff) - 16 - 7; sy = (256 - 8 - height - sy) & 0xff; - code = spriteram[offs + 2] >> codeshift; - color = ((spriteram[offs + 1] & 0x3e00) >> 9) / colordiv; - pri = (spriteram[offs + 1] & 0x8000) >> 15; + int code = m_spriteram[offs + 2] >> codeshift; + int color = ((m_spriteram[offs + 1] & 0x3e00) >> 9) / colordiv; + int pri = (m_spriteram[offs + 1] & 0x8000) >> 15; if(!pri && (color & 0x0c) == 0x0c) pri = 2; @@ -403,12 +400,11 @@ void playmark_state::bigtwinb_draw_sprites( screen_device &screen, bitmap_ind16 { int offs, start_offset = m_spriteram.bytes() / 2 - 4; int height = m_gfxdecode->gfx(0)->height(); - uint16_t *spriteram = m_spriteram; // find the "end of list" to draw the sprites in reverse order for (offs = 4; offs < m_spriteram.bytes() / 2; offs += 4) { - if (spriteram[offs + 3 - 4] == 0x2000) /* end of list marker */ + if (m_spriteram[offs + 3 - 4] == 0x2000) // end of list marker { start_offset = offs - 4; break; @@ -417,15 +413,13 @@ void playmark_state::bigtwinb_draw_sprites( screen_device &screen, bitmap_ind16 for (offs = start_offset; offs >= 4; offs -= 4) { - int sx, sy, code, color, flipx; + int sy = m_spriteram[offs + 3 - 4]; // -4? what the... ??? - sy = spriteram[offs + 3 - 4]; /* -4? what the... ??? */ - - flipx = sy & 0x4000; - sx = (spriteram[offs + 1] & 0x01ff) - 16 - 7; + int flipx = sy & 0x4000; + int sx = (m_spriteram[offs + 1] & 0x01ff) - 16 - 7; sy = (256 - 8 - height - sy) & 0xff; - code = spriteram[offs + 2] >> codeshift; - color = ((spriteram[offs + 1] & 0xf000) >> 12); + int code = m_spriteram[offs + 2] >> codeshift; + int color = ((m_spriteram[offs + 1] & 0xf000) >> 12); m_gfxdecode->gfx(0)->transpen(bitmap,cliprect, code, @@ -450,17 +444,17 @@ void playmark_state::draw_bitmap( screen_device &screen, bitmap_ind16 &bitmap, c { bitmap.pix((y + m_bgscrolly) & 0x1ff, (x + m_bgscrollx) & 0x1ff) = 0x100 + color; - uint8_t *const pri = &screen.priority().pix((y + m_bgscrolly) & 0x1ff); + u8 *const pri = &screen.priority().pix((y + m_bgscrolly) & 0x1ff); pri[(x + m_bgscrollx) & 0x1ff] |= 2; } else { - /* 50% size */ + // 50% size if(!(x % 2) && !(y % 2)) { bitmap.pix((y / 2 + m_bgscrolly) & 0x1ff, (x / 2 + m_bgscrollx) & 0x1ff) = 0x100 + color; - uint8_t *const pri = &screen.priority().pix((y / 2 + m_bgscrolly) & 0x1ff); + u8 *const pri = &screen.priority().pix((y / 2 + m_bgscrolly) & 0x1ff); pri[(x / 2 + m_bgscrollx) & 0x1ff] |= 2; } } @@ -471,7 +465,7 @@ void playmark_state::draw_bitmap( screen_device &screen, bitmap_ind16 &bitmap, c } } -uint32_t playmark_state::screen_update_bigtwin(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +u32 playmark_state::screen_update_bigtwin(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { screen.priority().fill(0, cliprect); @@ -484,7 +478,7 @@ uint32_t playmark_state::screen_update_bigtwin(screen_device &screen, bitmap_ind } -uint32_t playmark_state::screen_update_bigtwinb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +u32 playmark_state::screen_update_bigtwinb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { // video enabled if (m_scroll[6] & 1) @@ -499,7 +493,7 @@ uint32_t playmark_state::screen_update_bigtwinb(screen_device &screen, bitmap_in return 0; } -uint32_t playmark_state::screen_update_excelsr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +u32 playmark_state::screen_update_excelsr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { screen.priority().fill(0, cliprect); @@ -511,7 +505,7 @@ uint32_t playmark_state::screen_update_excelsr(screen_device &screen, bitmap_ind return 0; } -uint32_t playmark_state::screen_update_wbeachvl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +u32 playmark_state::screen_update_wbeachvl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { if (m_fg_rowscroll_enable) { @@ -536,7 +530,7 @@ uint32_t playmark_state::screen_update_wbeachvl(screen_device &screen, bitmap_in return 0; } -uint32_t playmark_state::screen_update_hrdtimes(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +u32 playmark_state::screen_update_hrdtimes(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { screen.priority().fill(0, cliprect);