From 839f09e7c31c821ad88c5237479d1472e42b9ee6 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Sat, 8 Feb 2020 14:07:35 +0100 Subject: New working clones ------------------ Three Ds - Three Dealers Casino House (set 2) [tbd] --- src/mame/drivers/pastelg.cpp | 217 ++++++++++++++++++++----------------------- src/mame/includes/pastelg.h | 83 +++++++++-------- src/mame/mame.lst | 1 + src/mame/video/pastelg.cpp | 117 ++++++++++------------- 4 files changed, 195 insertions(+), 223 deletions(-) diff --git a/src/mame/drivers/pastelg.cpp b/src/mame/drivers/pastelg.cpp index f3f4b7f5e1c..bb112bea620 100644 --- a/src/mame/drivers/pastelg.cpp +++ b/src/mame/drivers/pastelg.cpp @@ -38,20 +38,18 @@ void pastelg_state::machine_start() save_item(NAME(m_mux_data)); } -READ8_MEMBER(pastelg_state::pastelg_sndrom_r) +uint8_t pastelg_state::pastelg_sndrom_r() { - uint8_t *ROM = memregion("voice")->base(); - - return ROM[pastelg_blitter_src_addr_r() & 0x7fff]; + return m_voice_rom[pastelg_blitter_src_addr_r() & 0x7fff]; } -void pastelg_state::pastelg_map(address_map &map) +void pastelg_state::prg_map(address_map &map) { map(0x0000, 0xbfff).rom(); map(0xe000, 0xe7ff).ram().share("nvram"); } -READ8_MEMBER(pastelg_state::pastelg_irq_ack_r) +uint8_t pastelg_state::irq_ack_r() { m_maincpu->set_input_line(0, CLEAR_LINE); return 0; @@ -65,45 +63,45 @@ void pastelg_state::pastelg_io_map(address_map &map) map(0x81, 0x81).r("aysnd", FUNC(ay8910_device::data_r)); map(0x82, 0x83).w("aysnd", FUNC(ay8910_device::data_address_w)); map(0x90, 0x90).portr("SYSTEM"); - map(0x90, 0x96).w(FUNC(pastelg_state::pastelg_blitter_w)); + map(0x90, 0x96).w(FUNC(pastelg_state::blitter_w)); map(0xa0, 0xa0).rw(m_nb1413m3, FUNC(nb1413m3_device::inputport1_r), FUNC(nb1413m3_device::inputportsel_w)); map(0xb0, 0xb0).r(m_nb1413m3, FUNC(nb1413m3_device::inputport2_r)).w(FUNC(pastelg_state::pastelg_romsel_w)); map(0xc0, 0xc0).r(FUNC(pastelg_state::pastelg_sndrom_r)); map(0xc0, 0xcf).writeonly().share("clut"); - map(0xd0, 0xd0).r(FUNC(pastelg_state::pastelg_irq_ack_r)).w("dac", FUNC(dac_byte_interface::data_w)); + map(0xd0, 0xd0).r(FUNC(pastelg_state::irq_ack_r)).w("dac", FUNC(dac_byte_interface::data_w)); map(0xe0, 0xe0).portr("DSWC"); } -READ8_MEMBER(pastelg_state::threeds_inputport1_r) +uint8_t pastelg_state::threeds_inputport1_r() { switch(m_mux_data) { - case 0x01: return ioport("KEY0_PL1")->read(); - case 0x02: return ioport("KEY1_PL1")->read(); - case 0x04: return ioport("KEY2_PL1")->read(); - case 0x08: return ioport("KEY3_PL1")->read(); - case 0x10: return ioport("KEY4_PL1")->read(); + case 0x01: return m_p1_keys[0]->read(); + case 0x02: return m_p1_keys[1]->read(); + case 0x04: return m_p1_keys[2]->read(); + case 0x08: return m_p1_keys[3]->read(); + case 0x10: return m_p1_keys[4]->read(); } return 0xff; } -READ8_MEMBER(pastelg_state::threeds_inputport2_r) +uint8_t pastelg_state::threeds_inputport2_r() { switch(m_mux_data) { - case 0x01: return ioport("KEY0_PL2")->read(); - case 0x02: return ioport("KEY1_PL2")->read(); - case 0x04: return ioport("KEY2_PL2")->read(); - case 0x08: return ioport("KEY3_PL2")->read(); - case 0x10: return ioport("KEY4_PL2")->read(); + case 0x01: return m_p2_keys[0]->read(); + case 0x02: return m_p2_keys[1]->read(); + case 0x04: return m_p2_keys[2]->read(); + case 0x08: return m_p2_keys[3]->read(); + case 0x10: return m_p2_keys[4]->read(); } return 0xff; } -WRITE8_MEMBER(pastelg_state::threeds_inputportsel_w) +void pastelg_state::threeds_inputportsel_w(uint8_t data) { m_mux_data = ~data; } @@ -114,12 +112,12 @@ void pastelg_state::threeds_io_map(address_map &map) map(0x81, 0x81).r("aysnd", FUNC(ay8910_device::data_r)); map(0x82, 0x83).w("aysnd", FUNC(ay8910_device::data_address_w)); map(0x90, 0x90).portr("SYSTEM").w(FUNC(pastelg_state::threeds_romsel_w)); - map(0xf0, 0xf6).w(FUNC(pastelg_state::pastelg_blitter_w)); + map(0xf0, 0xf6).w(FUNC(pastelg_state::blitter_w)); map(0xa0, 0xa0).rw(FUNC(pastelg_state::threeds_inputport1_r), FUNC(pastelg_state::threeds_inputportsel_w)); - map(0xb0, 0xb0).r(FUNC(pastelg_state::threeds_inputport2_r)).w(FUNC(pastelg_state::threeds_output_w));//writes: bit 3 is coin lockout, bit 1 is coin counter + map(0xb0, 0xb0).r(FUNC(pastelg_state::threeds_inputport2_r)).w(FUNC(pastelg_state::threeds_output_w)); //writes: bit 3 is coin lockout, bit 1 is coin counter map(0xc0, 0xcf).writeonly().share("clut"); map(0xc0, 0xc0).r(FUNC(pastelg_state::threeds_rom_readback_r)); - map(0xd0, 0xd0).r(FUNC(pastelg_state::pastelg_irq_ack_r)).w("dac", FUNC(dac_byte_interface::data_w)); + map(0xd0, 0xd0).r(FUNC(pastelg_state::irq_ack_r)).w("dac", FUNC(dac_byte_interface::data_w)); } static INPUT_PORTS_START( pastelg ) @@ -211,84 +209,56 @@ INPUT_PORTS_END static INPUT_PORTS_START( threeds ) PORT_START("DSWA") - PORT_DIPNAME( 0x01, 0x01, "0" ) - PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x07, 0x04, "Game Out Rate" ) PORT_DIPLOCATION("DSWA:1,2,3") + PORT_DIPSETTING( 0x07, "55" ) + PORT_DIPSETTING( 0x06, "60" ) + PORT_DIPSETTING( 0x05, "65" ) + PORT_DIPSETTING( 0x04, "70" ) + PORT_DIPSETTING( 0x03, "75" ) + PORT_DIPSETTING( 0x02, "80" ) + PORT_DIPSETTING( 0x01, "85" ) + PORT_DIPSETTING( 0x00, "90" ) + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWA:4") PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x30, 0x20, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSWA:5,6") + PORT_DIPSETTING( 0x30, "0" ) + PORT_DIPSETTING( 0x20, "1" ) + PORT_DIPSETTING( 0x10, "2" ) + PORT_DIPSETTING( 0x00, "3" ) + PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DSWA:7,8") + PORT_DIPSETTING ( 0xc0, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING ( 0x80, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING ( 0x40, DEF_STR( 1C_5C ) ) + PORT_DIPSETTING ( 0x00, "1 Coin/10 Credits" ) PORT_START("DSWB") - PORT_DIPNAME( 0x01, 0x01, "1" ) - PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - - PORT_START("DSWC") - PORT_DIPNAME( 0x01, 0x01, "2" ) + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSWB:1") PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWB:2") PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWB:3") PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWB:4") PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWB:5") PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWB:6") PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWB:7") PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSWB:8") PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("KEY0_PL1") + PORT_START("PL1_KEY0") PORT_BIT( 0x03, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("1P Start / Deal") PORT_BIT( 0x38, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -297,7 +267,7 @@ static INPUT_PORTS_START( threeds ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("KEY1_PL1") + PORT_START("PL1_KEY1") PORT_BIT( 0x03, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) PORT_NAME("1P Bet") PORT_CODE(KEYCODE_S) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("1P Hold 5") PORT_CODE(KEYCODE_B) @@ -305,18 +275,18 @@ static INPUT_PORTS_START( threeds ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("1P Hold 1") PORT_CODE(KEYCODE_Z) PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("KEY2_PL1") + PORT_START("PL1_KEY2") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("1P Change Dealer") PORT_CODE(KEYCODE_A) PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("KEY3_PL1") + PORT_START("PL1_KEY3") PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("1P Hold 4") PORT_CODE(KEYCODE_V) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("1P Hold 2") PORT_CODE(KEYCODE_X) PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("KEY4_PL1") + PORT_START("PL1_KEY4") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_NAME("1P Small") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) PORT_NAME("1P Big") PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP ) PORT_NAME("1P Flip Flop") @@ -324,7 +294,7 @@ static INPUT_PORTS_START( threeds ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) PORT_NAME("1P Take Score") PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("KEY0_PL2") + PORT_START("PL2_KEY0") PORT_BIT( 0x03, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) PORT_NAME("2P Start / Deal") PORT_BIT( 0x38, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -333,7 +303,7 @@ static INPUT_PORTS_START( threeds ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("KEY1_PL2") + PORT_START("PL2_KEY1") PORT_BIT( 0x03, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) PORT_NAME("2P Bet") PORT_PLAYER(2) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("2P Hold 5") PORT_PLAYER(2) @@ -341,18 +311,18 @@ static INPUT_PORTS_START( threeds ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("2P Hold 1") PORT_PLAYER(2) PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("KEY2_PL2") + PORT_START("PL2_KEY2") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("2P Change Dealer") PORT_PLAYER(2) PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("KEY3_PL2") + PORT_START("PL2_KEY3") PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("2P Hold 4") PORT_PLAYER(2) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("2P Hold 2") PORT_PLAYER(2) PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("KEY4_PL2") + PORT_START("PL2_KEY4") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_NAME("2P Small") PORT_PLAYER(2) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) PORT_NAME("2P Big") PORT_PLAYER(2) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP ) PORT_NAME("2P Flip Flop") PORT_PLAYER(2) @@ -390,8 +360,8 @@ INPUT_PORTS_END void pastelg_state::pastelg(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 19968000/4); /* unknown divider, galds definitely relies on this for correct voice pitch */ - m_maincpu->set_addrmap(AS_PROGRAM, &pastelg_state::pastelg_map); + Z80(config, m_maincpu, 19968000/4); // unknown divider, galds definitely relies on this for correct voice pitch + m_maincpu->set_addrmap(AS_PROGRAM, &pastelg_state::prg_map); m_maincpu->set_addrmap(AS_IO, &pastelg_state::pastelg_io_map); m_maincpu->set_vblank_int("screen", FUNC(pastelg_state::irq0_line_assert)); // nmiclock not written, chip is 1411M1 instead of 1413M3 @@ -405,10 +375,10 @@ void pastelg_state::pastelg(machine_config &config) m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0)); m_screen->set_size(256, 256); m_screen->set_visarea(0, 256-1, 16, 240-1); - m_screen->set_screen_update(FUNC(pastelg_state::screen_update_pastelg)); + m_screen->set_screen_update(FUNC(pastelg_state::screen_update)); m_screen->set_palette("palette"); - PALETTE(config, "palette", FUNC(pastelg_state::pastelg_palette), 32); + PALETTE(config, "palette", FUNC(pastelg_state::palette), 32); /* sound hardware */ SPEAKER(config, "speaker").front_center(); @@ -450,8 +420,8 @@ Note void pastelg_state::threeds(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 19968000/4); /* unknown divider, galds definitely relies on this for correct voice pitch */ - m_maincpu->set_addrmap(AS_PROGRAM, &pastelg_state::pastelg_map); + Z80(config, m_maincpu, 19968000/4); // unknown divider, galds definitely relies on this for correct voice pitch + m_maincpu->set_addrmap(AS_PROGRAM, &pastelg_state::prg_map); m_maincpu->set_addrmap(AS_IO, &pastelg_state::threeds_io_map); m_maincpu->set_vblank_int("screen", FUNC(pastelg_state::irq0_line_assert)); @@ -464,10 +434,10 @@ void pastelg_state::threeds(machine_config &config) m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0)); m_screen->set_size(256, 256); m_screen->set_visarea(0, 256-1, 16, 240-1); - m_screen->set_screen_update(FUNC(pastelg_state::screen_update_pastelg)); + m_screen->set_screen_update(FUNC(pastelg_state::screen_update)); m_screen->set_palette("palette"); - PALETTE(config, "palette", FUNC(pastelg_state::pastelg_palette), 32); + PALETTE(config, "palette", FUNC(pastelg_state::palette), 32); /* sound hardware */ SPEAKER(config, "speaker").front_center(); @@ -485,15 +455,15 @@ void pastelg_state::threeds(machine_config &config) ROM_START( pastelg ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* program */ + ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "pgal_09.bin", 0x00000, 0x04000, CRC(1e494af3) SHA1(1597a7da22ecfbb1df83cf9d0acc7a8be461bc2c) ) ROM_LOAD( "pgal_10.bin", 0x04000, 0x04000, CRC(677cccea) SHA1(a294bf4e3c5e74291160a0858371961868afc1d1) ) ROM_LOAD( "pgal_11.bin", 0x08000, 0x04000, CRC(c2ccea38) SHA1(0374e8aa0e7961426e417ffe6e1a0d8dc7fd9ecf) ) - ROM_REGION( 0x08000, "voice", 0 ) /* voice */ + ROM_REGION( 0x08000, "voice", 0 ) ROM_LOAD( "pgal_08.bin", 0x00000, 0x08000, CRC(895961a1) SHA1(f02d517f46cc490db02c4feb369e2a386c764297) ) - ROM_REGION( 0x38000, "gfx1", 0 ) /* gfx */ + ROM_REGION( 0x38000, "blitter", 0 ) ROM_LOAD( "pgal_01.bin", 0x00000, 0x08000, CRC(1bb14d52) SHA1(b3974e3c9b56a752ddcb206f7bb2bc658b0e77f1) ) ROM_LOAD( "pgal_02.bin", 0x08000, 0x08000, CRC(ea85673a) SHA1(85ef2bb736fe5229ce4153197db8a57bca982a8b) ) ROM_LOAD( "pgal_03.bin", 0x10000, 0x08000, CRC(40011248) SHA1(935f442a47e02bf8c6ccb324c7fad1b481b8b19a) ) @@ -502,20 +472,18 @@ ROM_START( pastelg ) ROM_LOAD( "pgal_06.bin", 0x28000, 0x08000, CRC(f56acfe8) SHA1(2f4ad3990f2d4d4a9fcec7adab119459423b308b) ) ROM_LOAD( "pgal_07.bin", 0x30000, 0x08000, CRC(fa4226dc) SHA1(2313449521f81a191e87f1e4c0f3473f3c27dd9d) ) - ROM_REGION( 0x0040, "proms", 0 ) /* color */ + ROM_REGION( 0x0040, "proms", 0 ) // color ROM_LOAD( "pgal_bp1.bin", 0x0000, 0x0020, CRC(2b7fc61a) SHA1(278830e8728ea143208376feb20fff56de88ae1c) ) ROM_LOAD( "pgal_bp2.bin", 0x0020, 0x0020, CRC(4433021e) SHA1(e0d6619a193d26ad24788d4af5ef01ee89cffacd) ) ROM_END ROM_START( threeds ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* program */ + ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "ft9.9a", 0x00000, 0x04000, CRC(bc0e7cfd) SHA1(4e84f573fb2c1228757d34b8bc69649b145d9707) ) // labeled FT9 (red label) ROM_LOAD( "ft10.10a", 0x04000, 0x04000, CRC(e185d9f5) SHA1(98d4a824ed6a89e42543fb87daed33ef606bcced) ) // labeled FT10 (red label) ROM_LOAD( "ft11.11a", 0x08000, 0x04000, CRC(d1fb728b) SHA1(46e8e6ccdc1b78da29c969cd9290158c96bac4c4) ) // labeled FT11 (red label) - ROM_REGION( 0x08000, "voice", ROMREGION_ERASE00 ) /* voice */ - - ROM_REGION( 0x38000, "gfx1", 0 ) /* gfx */ + ROM_REGION( 0x38000, "blitter", 0 ) ROM_LOAD( "1.1a", 0x00000, 0x08000, CRC(5734ca7d) SHA1(d22b9e604cc4e2c0bb4eb32ded06bb5fa519965f) ) // roms 1 through 7 where labeled simply "1" through "7" in black labels ROM_LOAD( "2.2a", 0x08000, 0x08000, CRC(c7f21718) SHA1(4b2956d499e4db63e7f2329420e3d0313e6360ed) ) ROM_LOAD( "3.3a", 0x10000, 0x08000, CRC(87bd0a9e) SHA1(a0443017ef4c19f0135c4f764a96457f02cda743) ) @@ -524,21 +492,39 @@ ROM_START( threeds ) ROM_LOAD( "6.6a", 0x28000, 0x08000, CRC(d86ebe8d) SHA1(2ede43899501ae27db26b48f53f010a4f0df0307) ) ROM_LOAD( "7.7a", 0x30000, 0x08000, CRC(6704950a) SHA1(fd60ff2351deb87f19e517cfaedc7ac3dd4aac8d) ) - ROM_REGION( 0x0040, "proms", 0 ) /* color */ + ROM_REGION( 0x0040, "proms", 0 ) // color + ROM_LOAD( "mb7112e.7h", 0x0000, 0x0020, CRC(2c4f7343) SHA1(7b069c4a4d68ef308d1c1f773ece4b124428da3f) ) + ROM_LOAD( "mb7112e.7j", 0x0020, 0x0020, CRC(181f2a88) SHA1(a75ea981127fc667bb6b9f2ae2766aa2147ff04a) ) +ROM_END + +ROM_START( threedsa ) // Dumped from an original Nichibutsu PCB: TD1412a + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "bo9.9a", 0x00000, 0x04000, CRC(352577cf) SHA1(26cea6ee0f303b1a2c2ba3325351656da89d588b) ) + ROM_LOAD( "bo10.10a", 0x04000, 0x04000, CRC(d191fb4b) SHA1(42882cfc1c0ed82f320a1a95ecbedfaa91d5dd94) ) + ROM_LOAD( "bo11.11a", 0x08000, 0x04000, CRC(17318e4b) SHA1(6814141cb643c997b2fafcdc5da2c49e19647d85) ) + + ROM_REGION( 0x38000, "blitter", 0 ) + ROM_LOAD( "1.1a", 0x00000, 0x08000, CRC(5734ca7d) SHA1(d22b9e604cc4e2c0bb4eb32ded06bb5fa519965f) ) + ROM_LOAD( "2.2a", 0x08000, 0x08000, CRC(c7f21718) SHA1(4b2956d499e4db63e7f2329420e3d0313e6360ed) ) + ROM_LOAD( "3.3a", 0x10000, 0x08000, CRC(87bd0a9e) SHA1(a0443017ef4c19f0135c4f764a96457f02cda743) ) + ROM_LOAD( "4.4a", 0x18000, 0x08000, CRC(b75ecf2b) SHA1(50b8f27988dd24ff475a500d361db3c7a7051f40) ) + ROM_LOAD( "5.5a", 0x20000, 0x08000, CRC(22ee5cf6) SHA1(09725a73f5f107e6fcb1994d94a50748726318b0) ) + ROM_LOAD( "6.6a", 0x28000, 0x08000, CRC(d86ebe8d) SHA1(2ede43899501ae27db26b48f53f010a4f0df0307) ) + ROM_LOAD( "7.7a", 0x30000, 0x08000, CRC(6704950a) SHA1(fd60ff2351deb87f19e517cfaedc7ac3dd4aac8d) ) + + ROM_REGION( 0x0040, "proms", 0 ) // color ROM_LOAD( "mb7112e.7h", 0x0000, 0x0020, CRC(2c4f7343) SHA1(7b069c4a4d68ef308d1c1f773ece4b124428da3f) ) ROM_LOAD( "mb7112e.7j", 0x0020, 0x0020, CRC(181f2a88) SHA1(a75ea981127fc667bb6b9f2ae2766aa2147ff04a) ) ROM_END // might be a bootleg (or licensed) board? had a sub-board (containing only logic) marked "Sky Dragon" and there were no Nichibutsu markings on any of the PCBs or chips ROM_START( galds ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* program */ + ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "dg8.ic3", 0x00000, 0x04000, CRC(06c6a98f) SHA1(828deef4e725cafef5088fc2dfab63b62ae0feb0) ) ROM_LOAD( "dg9.ic2", 0x04000, 0x04000, CRC(a53eca09) SHA1(001ebb04378e6d7dd5ad15b272e1346655b91eee)) ROM_LOAD( "dg10.ic1", 0x08000, 0x04000, CRC(6c380c64) SHA1(3f6b037a8a40fd5c4bc3b469ee3c9f1e1bd302a0) ) - ROM_REGION( 0x08000, "voice", ROMREGION_ERASE00 ) /* voice */ - - ROM_REGION( 0x38000, "gfx1", 0 ) /* gfx - the same as threeds */ + ROM_REGION( 0x38000, "blitter", 0 ) // the same as threeds ROM_LOAD( "dg1.ic11", 0x00000, 0x08000, CRC(5734ca7d) SHA1(d22b9e604cc4e2c0bb4eb32ded06bb5fa519965f) ) ROM_LOAD( "dg2.ic10", 0x08000, 0x08000, CRC(c7f21718) SHA1(4b2956d499e4db63e7f2329420e3d0313e6360ed) ) ROM_LOAD( "dg3.ic9", 0x10000, 0x08000, CRC(87bd0a9e) SHA1(a0443017ef4c19f0135c4f764a96457f02cda743) ) @@ -547,13 +533,14 @@ ROM_START( galds ) ROM_LOAD( "dg6.ic6", 0x28000, 0x08000, CRC(d86ebe8d) SHA1(2ede43899501ae27db26b48f53f010a4f0df0307) ) ROM_LOAD( "dg7.ic5", 0x30000, 0x08000, CRC(6704950a) SHA1(fd60ff2351deb87f19e517cfaedc7ac3dd4aac8d) ) - ROM_REGION( 0x0040, "proms", 0 ) /* color */ + ROM_REGION( 0x0040, "proms", 0 ) // color ROM_LOAD( "mb7112e.7h", 0x0000, 0x0020, CRC(2c4f7343) SHA1(7b069c4a4d68ef308d1c1f773ece4b124428da3f) ) ROM_LOAD( "mb7112e.7j", 0x0020, 0x0020, CRC(181f2a88) SHA1(a75ea981127fc667bb6b9f2ae2766aa2147ff04a) ) ROM_END -GAME( 1985, pastelg, 0, pastelg, pastelg, pastelg_state, empty_init, ROT0, "Nichibutsu", "Pastel Gal (Japan 851224)", MACHINE_SUPPORTS_SAVE ) -GAME( 1985, threeds, 0, threeds, threeds, pastelg_state, empty_init, ROT0, "Nichibutsu", "Three Ds - Three Dealers Casino House", MACHINE_SUPPORTS_SAVE ) -GAME( 1985, galds, threeds, threeds, galds, pastelg_state, empty_init, ROT0, "Nihon System Corp.", "Gals Ds - Three Dealers Casino House (bootleg?)", MACHINE_SUPPORTS_SAVE ) +GAME( 1985, pastelg, 0, pastelg, pastelg, pastelg_state, empty_init, ROT0, "Nichibutsu", "Pastel Gal (Japan 851224)", MACHINE_SUPPORTS_SAVE ) +GAME( 1985, threeds, 0, threeds, threeds, pastelg_state, empty_init, ROT0, "Nichibutsu", "Three Ds - Three Dealers Casino House (set 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1985, threedsa, threeds, threeds, threeds, pastelg_state, empty_init, ROT0, "Nichibutsu", "Three Ds - Three Dealers Casino House (set 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1985, galds, threeds, threeds, galds, pastelg_state, empty_init, ROT0, "Nihon System Corp.", "Gals Ds - Three Dealers Casino House (bootleg?)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/includes/pastelg.h b/src/mame/includes/pastelg.h index c551f7f9d98..0966868c6ab 100644 --- a/src/mame/includes/pastelg.h +++ b/src/mame/includes/pastelg.h @@ -12,67 +12,74 @@ class pastelg_state : public driver_device { public: - enum - { - TIMER_BLITTER - }; - pastelg_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu"), m_nb1413m3(*this, "nb1413m3"), m_screen(*this, "screen"), - m_clut(*this, "clut") + m_clut(*this, "clut"), + m_blitter_rom(*this, "blitter"), + m_voice_rom(*this, "voice"), + m_p1_keys(*this, "PL1_KEY%u", 0U), + m_p2_keys(*this, "PL2_KEY%u", 0U) { } + void threeds(machine_config &config); + void pastelg(machine_config &config); + +private: required_device m_maincpu; required_device m_nb1413m3; required_device m_screen; required_shared_ptr m_clut; + required_region_ptr m_blitter_rom; + optional_region_ptr m_voice_rom; + optional_ioport_array<5> m_p1_keys; + optional_ioport_array<5> m_p2_keys; uint8_t m_mux_data; - int m_blitter_destx; - int m_blitter_desty; - int m_blitter_sizex; - int m_blitter_sizey; - int m_blitter_src_addr; - int m_gfxrom; - int m_dispflag; - int m_flipscreen; - int m_blitter_direction_x; - int m_blitter_direction_y; - int m_palbank; + uint8_t m_blitter_destx; + uint8_t m_blitter_desty; + uint8_t m_blitter_sizex; + uint8_t m_blitter_sizey; + uint16_t m_blitter_src_addr; + uint8_t m_gfxbank; + bool m_dispflag; + bool m_flipscreen; + bool m_blitter_direction_x; + bool m_blitter_direction_y; + uint8_t m_palbank; std::unique_ptr m_videoram; - int m_flipscreen_old; + bool m_flipscreen_old; emu_timer *m_blitter_timer; - DECLARE_READ8_MEMBER(pastelg_sndrom_r); - DECLARE_READ8_MEMBER(pastelg_irq_ack_r); - DECLARE_READ8_MEMBER(threeds_inputport1_r); - DECLARE_READ8_MEMBER(threeds_inputport2_r); - DECLARE_WRITE8_MEMBER(threeds_inputportsel_w); - DECLARE_WRITE8_MEMBER(pastelg_blitter_w); - DECLARE_WRITE8_MEMBER(threeds_romsel_w); - DECLARE_WRITE8_MEMBER(threeds_output_w); - DECLARE_READ8_MEMBER(threeds_rom_readback_r); - DECLARE_WRITE8_MEMBER(pastelg_romsel_w); + uint8_t irq_ack_r(); + void blitter_w(offs_t offset, uint8_t data); + void blitter_timer_callback(void *ptr, s32 param); + + uint8_t pastelg_sndrom_r(); + void pastelg_romsel_w(address_space &space, uint8_t data); + + uint8_t threeds_inputport1_r(); + uint8_t threeds_inputport2_r(); + void threeds_inputportsel_w(uint8_t data); + void threeds_romsel_w(uint8_t data); + void threeds_output_w(uint8_t data); + uint8_t threeds_rom_readback_r(); virtual void machine_start() override; virtual void video_start() override; - void pastelg_palette(palette_device &palette) const; - uint32_t screen_update_pastelg(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - int pastelg_blitter_src_addr_r(); - void pastelg_vramflip(); - void pastelg_gfxdraw(); + void palette(palette_device &palette) const; + uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + void vramflip(); + void gfxdraw(); - void threeds(machine_config &config); - void pastelg(machine_config &config); + uint16_t pastelg_blitter_src_addr_r(); + + void prg_map(address_map &map); void pastelg_io_map(address_map &map); - void pastelg_map(address_map &map); void threeds_io_map(address_map &map); -protected: - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; }; #endif // MAME_INCLUDES_PASTELG_H diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 330f1c615b6..a42df8a30a2 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -32122,6 +32122,7 @@ pass // (c) 1992 Oksan galds // (c) 1985 pastelg // (c) 1985 threeds // (c) 1985 +threedsa // (c) 1985 @source:patapata.cpp patapata // 1993 NTC / NMK / ATLUS diff --git a/src/mame/video/pastelg.cpp b/src/mame/video/pastelg.cpp index c04df9fc244..29b0b92f146 100644 --- a/src/mame/video/pastelg.cpp +++ b/src/mame/video/pastelg.cpp @@ -15,7 +15,7 @@ ******************************************************************************/ -void pastelg_state::pastelg_palette(palette_device &palette) const +void pastelg_state::palette(palette_device &palette) const { const uint8_t *color_prom = memregion("proms")->base(); @@ -48,12 +48,12 @@ void pastelg_state::pastelg_palette(palette_device &palette) const ******************************************************************************/ -int pastelg_state::pastelg_blitter_src_addr_r() +uint16_t pastelg_state::pastelg_blitter_src_addr_r() { return m_blitter_src_addr; } -WRITE8_MEMBER(pastelg_state::pastelg_blitter_w) +void pastelg_state::blitter_w(offs_t offset, uint8_t data) { switch (offset) { @@ -63,52 +63,49 @@ WRITE8_MEMBER(pastelg_state::pastelg_blitter_w) case 3: m_blitter_desty = data; break; case 4: m_blitter_sizex = data; break; case 5: m_blitter_sizey = data; - /* writing here also starts the blit */ - pastelg_gfxdraw(); + // writing here also starts the blit + gfxdraw(); break; case 6: m_blitter_direction_x = (data & 0x01) ? 1 : 0; m_blitter_direction_y = (data & 0x02) ? 1 : 0; m_flipscreen = (data & 0x04) ? 0 : 1; m_dispflag = (data & 0x08) ? 0 : 1; - pastelg_vramflip(); + vramflip(); break; } } -WRITE8_MEMBER(pastelg_state::threeds_romsel_w) +void pastelg_state::threeds_romsel_w(uint8_t data) { - if (data&0xfc) printf("%02x\n",data); - m_gfxrom = (data & 0x3); + if (data & 0xfc) printf("%02x\n", data); + m_gfxbank = (data & 0x3); } -WRITE8_MEMBER(pastelg_state::threeds_output_w) +void pastelg_state::threeds_output_w(uint8_t data) { m_palbank = ((data & 0x10) >> 4); } -READ8_MEMBER(pastelg_state::threeds_rom_readback_r) +uint8_t pastelg_state::threeds_rom_readback_r() { - uint8_t *GFX = memregion("gfx1")->base(); - - return GFX[(m_blitter_src_addr | (m_gfxrom << 16)) & 0x3ffff]; + return m_blitter_rom[(m_blitter_src_addr | (m_gfxbank << 16)) & 0x3ffff]; } -WRITE8_MEMBER(pastelg_state::pastelg_romsel_w) +void pastelg_state::pastelg_romsel_w(address_space &space, uint8_t data) { - int gfxlen = memregion("gfx1")->bytes(); - m_gfxrom = ((data & 0xc0) >> 6); + m_gfxbank = ((data & 0xc0) >> 6); m_palbank = ((data & 0x10) >> 4); m_nb1413m3->sndrombank1_w(space, 0, data); - if ((m_gfxrom << 16) > (gfxlen - 1)) + if ((m_gfxbank << 16) > m_blitter_rom.mask()) { #ifdef MAME_DEBUG popmessage("GFXROM BANK OVER!!"); #endif - m_gfxrom &= (gfxlen / 0x20000 - 1); + m_gfxbank &= (m_blitter_rom.length() / 0x20000 - 1); } } @@ -116,21 +113,19 @@ WRITE8_MEMBER(pastelg_state::pastelg_romsel_w) ******************************************************************************/ -void pastelg_state::pastelg_vramflip() +void pastelg_state::vramflip() { - int x, y; - uint8_t color1, color2; int width = m_screen->width(); int height = m_screen->height(); if (m_flipscreen == m_flipscreen_old) return; - for (y = 0; y < height; y++) + for (int y = 0; y < height; y++) { - for (x = 0; x < width; x++) + for (int x = 0; x < width; x++) { - color1 = m_videoram[(y * width) + x]; - color2 = m_videoram[((y ^ 0xff) * width) + (x ^ 0xff)]; + uint8_t color1 = m_videoram[(y * width) + x]; + uint8_t color2 = m_videoram[((y ^ 0xff) * width) + (x ^ 0xff)]; m_videoram[(y * width) + x] = color2; m_videoram[((y ^ 0xff) * width) + (x ^ 0xff)] = color1; } @@ -139,45 +134,29 @@ void pastelg_state::pastelg_vramflip() m_flipscreen_old = m_flipscreen; } -void pastelg_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) +void pastelg_state::blitter_timer_callback(void *ptr, s32 param) { - switch (id) - { - case TIMER_BLITTER: - m_nb1413m3->busyflag_w(1); - break; - default: - throw emu_fatalerror("Unknown id in pastelg_state::device_timer"); - } + m_nb1413m3->busyflag_w(1); } -void pastelg_state::pastelg_gfxdraw() +void pastelg_state::gfxdraw() { - uint8_t *GFX = memregion("gfx1")->base(); int width = m_screen->width(); - int x, y; - int dx, dy; - int startx, starty; int sizex, sizey; int incx, incy; - int ctrx, ctry; - int readflag; - int gfxaddr, gfxlen; - int count; - uint8_t color; m_nb1413m3->m_busyctr = 0; - startx = m_blitter_destx + m_blitter_sizex; - starty = m_blitter_desty + m_blitter_sizey; + int startx = m_blitter_destx + m_blitter_sizex; + int starty = m_blitter_desty + m_blitter_sizey; if (m_blitter_direction_x) { - if (m_blitter_sizex&0x80) sizex = 0xff-m_blitter_sizex; - else sizex=m_blitter_sizex; + if (m_blitter_sizex & 0x80) sizex = 0xff - m_blitter_sizex; + else sizex = m_blitter_sizex; incx = 1; } else @@ -188,8 +167,8 @@ void pastelg_state::pastelg_gfxdraw() if (m_blitter_direction_y) { - if (m_blitter_sizey&0x80) sizey = 0xff-m_blitter_sizey; - else sizey=m_blitter_sizey; + if (m_blitter_sizey & 0x80) sizey = 0xff - m_blitter_sizey; + else sizey = m_blitter_sizey; incy = 1; } else @@ -198,23 +177,22 @@ void pastelg_state::pastelg_gfxdraw() incy = -1; } - gfxlen = memregion("gfx1")->bytes(); - gfxaddr = (m_gfxrom << 16) + m_blitter_src_addr; + int gfxaddr = (m_gfxbank << 16) + m_blitter_src_addr; - readflag = 0; + int readflag = 0; - count = 0; - y = starty; + int count = 0; + int y = starty; - for (ctry = sizey; ctry >= 0; ctry--) + for (int ctry = sizey; ctry >= 0; ctry--) { - x = startx; + int x = startx; - for (ctrx = sizex; ctrx >= 0; ctrx--) + for (int ctrx = sizex; ctrx >= 0; ctrx--) { - gfxaddr = (m_gfxrom << 16) + ((m_blitter_src_addr + count)); + gfxaddr = (m_gfxbank << 16) + ((m_blitter_src_addr + count)); - if ((gfxaddr > (gfxlen - 1))) + if (gfxaddr > m_blitter_rom.mask()) { #ifdef MAME_DEBUG popmessage("GFXROM ADDRESS OVER!!"); @@ -222,10 +200,10 @@ void pastelg_state::pastelg_gfxdraw() gfxaddr = 0; } - color = GFX[gfxaddr]; + uint8_t color = m_blitter_rom[gfxaddr]; - dx = x & 0xff; - dy = y & 0xff; + int dx = x & 0xff; + int dy = y & 0xff; if (m_flipscreen) { @@ -286,13 +264,13 @@ void pastelg_state::video_start() m_videoram = make_unique_clear(width * height); - m_blitter_timer = timer_alloc(TIMER_BLITTER); + m_blitter_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pastelg_state::blitter_timer_callback), this)); save_item(NAME(m_blitter_desty)); save_item(NAME(m_blitter_sizex)); save_item(NAME(m_blitter_sizey)); save_item(NAME(m_blitter_src_addr)); - save_item(NAME(m_gfxrom)); + save_item(NAME(m_gfxbank)); save_item(NAME(m_dispflag)); save_item(NAME(m_flipscreen)); save_item(NAME(m_blitter_direction_x)); @@ -306,16 +284,15 @@ void pastelg_state::video_start() ******************************************************************************/ -uint32_t pastelg_state::screen_update_pastelg(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +uint32_t pastelg_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { if (m_dispflag) { - int x, y; int width = screen.width(); int height = screen.height(); - for (y = 0; y < height; y++) - for (x = 0; x < width; x++) + for (int y = 0; y < height; y++) + for (int x = 0; x < width; x++) bitmap.pix16(y, x) = m_videoram[(y * width) + x]; } else -- cgit v1.2.3