diff options
author | RobertoFresca <robbie@mamedev.org> | 2018-05-19 23:18:21 -0300 |
---|---|---|
committer | RobertoFresca <robbie@mamedev.org> | 2018-05-19 23:18:21 -0300 |
commit | dd28ab7c73b07a656841b51766f3e17a35b0e34d (patch) | |
tree | d19627210497158be47d2dd9547e1f6a4a546d6f | |
parent | 77d7d3a5cf875f9b0c85b986229f0cb601205293 (diff) | |
parent | eeb2c80ce223f04aa030b3db4ed649caef47d833 (diff) |
Merge branch 'master' of https://github.com/mamedev/mame
-rw-r--r-- | src/mame/drivers/cocoloco.cpp | 2 | ||||
-rw-r--r-- | src/mame/drivers/fidel6502.cpp | 50 | ||||
-rw-r--r-- | src/mame/drivers/leland.cpp | 66 | ||||
-rw-r--r-- | src/mame/drivers/novag6502.cpp | 14 | ||||
-rw-r--r-- | src/mame/drivers/novag68k.cpp | 4 | ||||
-rw-r--r-- | src/mame/drivers/pc100.cpp | 156 | ||||
-rw-r--r-- | src/mame/drivers/spyhuntertec.cpp | 109 | ||||
-rw-r--r-- | src/mame/drivers/wallc.cpp | 10 | ||||
-rw-r--r-- | src/mame/includes/leland.h | 110 | ||||
-rw-r--r-- | src/mame/machine/leland.cpp | 34 | ||||
-rw-r--r-- | src/mame/mame.lst | 1 | ||||
-rw-r--r-- | src/mame/video/leland.cpp | 47 |
12 files changed, 428 insertions, 175 deletions
diff --git a/src/mame/drivers/cocoloco.cpp b/src/mame/drivers/cocoloco.cpp index aa51ba4a4a4..72a7360a0cb 100644 --- a/src/mame/drivers/cocoloco.cpp +++ b/src/mame/drivers/cocoloco.cpp @@ -601,4 +601,4 @@ ROM_END // YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS GAME( 1981, cocoloco, 0, cocoloco, cocoloco, cocoloco_state, empty_init, ROT90, "Petaco S.A.", "Coco Loco (set 1)", MACHINE_SUPPORTS_SAVE ) // PCB 112-020 GAME( 1981, cocolocoa, cocoloco, cocoloco, cocolocoa, cocoloco_state, empty_init, ROT90, "Recel S.A.", "Coco Loco (set 2)", MACHINE_SUPPORTS_SAVE ) // PCB 112-020 -GAME( 1981, cocolocob, cocoloco, cocoloco, cocoloco, cocoloco_state, empty_init, ROT90, "Petaco S.A.", "Coco Loco (set 3)", MACHINE_SUPPORTS_SAVE ) // PCB 112-025
\ No newline at end of file +GAME( 1981, cocolocob, cocoloco, cocoloco, cocoloco, cocoloco_state, empty_init, ROT90, "Petaco S.A.", "Coco Loco (set 3)", MACHINE_SUPPORTS_SAVE ) // PCB 112-025 diff --git a/src/mame/drivers/fidel6502.cpp b/src/mame/drivers/fidel6502.cpp index 799abe314f7..72174ca7553 100644 --- a/src/mame/drivers/fidel6502.cpp +++ b/src/mame/drivers/fidel6502.cpp @@ -924,7 +924,9 @@ WRITE8_MEMBER(fidel6502_state::sc12_trampoline_w) READ8_MEMBER(fidel6502_state::sc12_trampoline_r) { - sc12_set_cpu_freq(offset); + if (!machine().side_effects_disabled()) + sc12_set_cpu_freq(offset); + return m_sc12_map->read8(space, offset); } @@ -1275,7 +1277,7 @@ void fidel6502_state::eag_map(address_map &map) map(0x7020, 0x7027).w(this, FUNC(fidel6502_state::eas_segment_w)).nopr(); map(0x7030, 0x7037).w(this, FUNC(fidel6502_state::eas_led_w)).nopr(); map(0x7050, 0x7050).r(this, FUNC(fidel6502_state::eas_input_r)); - map(0x8000, 0x9fff).rom(); //.nopw() + map(0x8000, 0x9fff).ram(); map(0xa000, 0xbfff).bankr("rombank"); map(0xc000, 0xffff).rom(); } @@ -2546,13 +2548,12 @@ ROM_END ROM_START( feag2100 ) - ROM_REGION( 0x8000, "rombank", 0 ) - ROM_LOAD("el2100.1", 0x0000, 0x8000, CRC(9b62b7d5) SHA1(cfcaea2e36c2d52fe4a85c77dbc7fa135893860c) ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_COPY("rombank", 0, 0x8000, 0x2000) - ROM_LOAD("el2100.2", 0xc000, 0x2000, CRC(76fec42f) SHA1(34660edb8458919fd179e93fdab3fe428a6625d0) ) - ROM_LOAD("el2100.3", 0xe000, 0x2000, CRC(2079a506) SHA1(a7bb83138c7b6eff6ea96702d453a214697f4890) ) + ROM_LOAD("el2100.2", 0xc000, 0x2000, CRC(76fec42f) SHA1(34660edb8458919fd179e93fdab3fe428a6625d0) ) + ROM_LOAD("el2100.3", 0xe000, 0x2000, CRC(2079a506) SHA1(a7bb83138c7b6eff6ea96702d453a214697f4890) ) + + ROM_REGION( 0x8000, "rombank", 0 ) + ROM_LOAD("el2100.1", 0x0000, 0x8000, CRC(9b62b7d5) SHA1(cfcaea2e36c2d52fe4a85c77dbc7fa135893860c) ) ROM_REGION( 0x2000, "speech", 0 ) ROM_LOAD("101-32107", 0x0000, 0x1000, BAD_DUMP CRC(f35784f9) SHA1(348e54a7fa1e8091f89ac656b4da22f28ca2e44d) ) // taken from csc, assume correct @@ -2560,39 +2561,36 @@ ROM_START( feag2100 ) ROM_END ROM_START( feag2100sp ) - ROM_REGION( 0x8000, "rombank", 0 ) - ROM_LOAD("el2100.1", 0x0000, 0x8000, CRC(9b62b7d5) SHA1(cfcaea2e36c2d52fe4a85c77dbc7fa135893860c) ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_COPY("rombank", 0, 0x8000, 0x2000) - ROM_LOAD("el2100.2", 0xc000, 0x2000, CRC(76fec42f) SHA1(34660edb8458919fd179e93fdab3fe428a6625d0) ) - ROM_LOAD("el2100.3", 0xe000, 0x2000, CRC(2079a506) SHA1(a7bb83138c7b6eff6ea96702d453a214697f4890) ) + ROM_LOAD("el2100.2", 0xc000, 0x2000, CRC(76fec42f) SHA1(34660edb8458919fd179e93fdab3fe428a6625d0) ) + ROM_LOAD("el2100.3", 0xe000, 0x2000, CRC(2079a506) SHA1(a7bb83138c7b6eff6ea96702d453a214697f4890) ) + + ROM_REGION( 0x8000, "rombank", 0 ) + ROM_LOAD("el2100.1", 0x0000, 0x8000, CRC(9b62b7d5) SHA1(cfcaea2e36c2d52fe4a85c77dbc7fa135893860c) ) ROM_REGION( 0x2000, "speech", 0 ) ROM_LOAD("101-64106", 0x0000, 0x2000, BAD_DUMP CRC(8766e128) SHA1(78c7413bf240159720b131ab70bfbdf4e86eb1e9) ) // taken from vcc/fexcelv, assume correct ROM_END ROM_START( feag2100g ) - ROM_REGION( 0x8000, "rombank", 0 ) - ROM_LOAD("el2100.1", 0x0000, 0x8000, CRC(9b62b7d5) SHA1(cfcaea2e36c2d52fe4a85c77dbc7fa135893860c) ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_COPY("rombank", 0, 0x8000, 0x2000) - ROM_LOAD("el2100.2", 0xc000, 0x2000, CRC(76fec42f) SHA1(34660edb8458919fd179e93fdab3fe428a6625d0) ) - ROM_LOAD("el2100.3", 0xe000, 0x2000, CRC(2079a506) SHA1(a7bb83138c7b6eff6ea96702d453a214697f4890) ) + ROM_LOAD("el2100.2", 0xc000, 0x2000, CRC(76fec42f) SHA1(34660edb8458919fd179e93fdab3fe428a6625d0) ) + ROM_LOAD("el2100.3", 0xe000, 0x2000, CRC(2079a506) SHA1(a7bb83138c7b6eff6ea96702d453a214697f4890) ) + + ROM_REGION( 0x8000, "rombank", 0 ) + ROM_LOAD("el2100.1", 0x0000, 0x8000, CRC(9b62b7d5) SHA1(cfcaea2e36c2d52fe4a85c77dbc7fa135893860c) ) ROM_REGION( 0x2000, "speech", 0 ) ROM_LOAD("101-64101", 0x0000, 0x2000, BAD_DUMP CRC(6c85e310) SHA1(20d1d6543c1e6a1f04184a2df2a468f33faec3ff) ) // taken from fexcelv, assume correct ROM_END ROM_START( feag2100fr ) - ROM_REGION( 0x8000, "rombank", 0 ) - ROM_LOAD("el2100.1", 0x0000, 0x8000, CRC(9b62b7d5) SHA1(cfcaea2e36c2d52fe4a85c77dbc7fa135893860c) ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_COPY("rombank", 0, 0x8000, 0x2000) - ROM_LOAD("el2100.2", 0xc000, 0x2000, CRC(76fec42f) SHA1(34660edb8458919fd179e93fdab3fe428a6625d0) ) - ROM_LOAD("el2100.3", 0xe000, 0x2000, CRC(2079a506) SHA1(a7bb83138c7b6eff6ea96702d453a214697f4890) ) + ROM_LOAD("el2100.2", 0xc000, 0x2000, CRC(76fec42f) SHA1(34660edb8458919fd179e93fdab3fe428a6625d0) ) + ROM_LOAD("el2100.3", 0xe000, 0x2000, CRC(2079a506) SHA1(a7bb83138c7b6eff6ea96702d453a214697f4890) ) + + ROM_REGION( 0x8000, "rombank", 0 ) + ROM_LOAD("el2100.1", 0x0000, 0x8000, CRC(9b62b7d5) SHA1(cfcaea2e36c2d52fe4a85c77dbc7fa135893860c) ) ROM_REGION( 0x2000, "speech", 0 ) ROM_LOAD("101-64105", 0x0000, 0x2000, BAD_DUMP CRC(fe8c5c18) SHA1(2b64279ab3747ee81c86963c13e78321c6cfa3a3) ) // taken from fexcelv, assume correct diff --git a/src/mame/drivers/leland.cpp b/src/mame/drivers/leland.cpp index ffe2d7d29e7..8c3c18c8083 100644 --- a/src/mame/drivers/leland.cpp +++ b/src/mame/drivers/leland.cpp @@ -107,26 +107,26 @@ void leland_state::master_redline_map_io(address_map &map) } -void leland_state::master_map_program_2(address_map &map) +void ataxx_state::master_map_program_2(address_map &map) { map(0x0000, 0x1fff).rom(); map(0x2000, 0x9fff).bankr("masterbank_0"); - map(0xa000, 0xdfff).bankr("masterbank_1").w(this, FUNC(leland_state::ataxx_battery_ram_w)).share("battery"); + map(0xa000, 0xdfff).bankr("masterbank_1").w(this, FUNC(ataxx_state::ataxx_battery_ram_w)).share("battery"); map(0xe000, 0xf7ff).ram().share("mainram"); - map(0xf800, 0xffff).rw(this, FUNC(leland_state::ataxx_paletteram_and_misc_r), FUNC(leland_state::ataxx_paletteram_and_misc_w)).share("palette"); + map(0xf800, 0xffff).rw(this, FUNC(ataxx_state::ataxx_paletteram_and_misc_r), FUNC(ataxx_state::ataxx_paletteram_and_misc_w)).share("palette"); } -void leland_state::master_map_io_2(address_map &map) +void ataxx_state::master_map_io_2(address_map &map) { map.global_mask(0xff); map(0x04, 0x04).r(m_sound, FUNC(leland_80186_sound_device::leland_80186_response_r)); map(0x05, 0x05).w(m_sound, FUNC(leland_80186_sound_device::leland_80186_command_hi_w)); map(0x06, 0x06).w(m_sound, FUNC(leland_80186_sound_device::leland_80186_command_lo_w)); map(0x0c, 0x0c).w(m_sound, FUNC(leland_80186_sound_device::ataxx_80186_control_w)); - map(0x20, 0x20).rw(this, FUNC(leland_state::ataxx_eeprom_r), FUNC(leland_state::ataxx_eeprom_w)); - map(0xd0, 0xef).rw(this, FUNC(leland_state::ataxx_mvram_port_r), FUNC(leland_state::ataxx_mvram_port_w)); - map(0xf0, 0xff).rw(this, FUNC(leland_state::ataxx_master_input_r), FUNC(leland_state::ataxx_master_output_w)); + map(0x20, 0x20).rw(this, FUNC(ataxx_state::ataxx_eeprom_r), FUNC(ataxx_state::ataxx_eeprom_w)); + map(0xd0, 0xef).rw(this, FUNC(ataxx_state::ataxx_mvram_port_r), FUNC(ataxx_state::ataxx_mvram_port_w)); + map(0xf0, 0xff).rw(this, FUNC(ataxx_state::ataxx_master_input_r), FUNC(ataxx_state::ataxx_master_output_w)); } @@ -179,10 +179,10 @@ void leland_state::slave_map_program(address_map &map) } -void leland_state::slave_map_io_2(address_map &map) +void ataxx_state::slave_map_io_2(address_map &map) { map.global_mask(0xff); - map(0x60, 0x7f).rw(this, FUNC(leland_state::ataxx_svram_port_r), FUNC(leland_state::ataxx_svram_port_w)); + map(0x60, 0x7f).rw(this, FUNC(ataxx_state::ataxx_svram_port_r), FUNC(ataxx_state::ataxx_svram_port_w)); } /************************************* @@ -990,9 +990,6 @@ MACHINE_CONFIG_START(leland_state::leland) MCFG_DEVICE_PROGRAM_MAP(slave_small_map_program) MCFG_DEVICE_IO_MAP(slave_map_io) - MCFG_MACHINE_START_OVERRIDE(leland_state,leland) - MCFG_MACHINE_RESET_OVERRIDE(leland_state,leland) - MCFG_EEPROM_SERIAL_93C46_ADD("eeprom") MCFG_NVRAM_ADD_0FILL("battery") @@ -1053,7 +1050,7 @@ MACHINE_CONFIG_START(leland_state::lelandi) MACHINE_CONFIG_END -MACHINE_CONFIG_START(leland_state::ataxx) +MACHINE_CONFIG_START(ataxx_state::ataxx) /* basic machine hardware */ MCFG_DEVICE_ADD("master", Z80, 6000000) @@ -1064,9 +1061,6 @@ MACHINE_CONFIG_START(leland_state::ataxx) MCFG_DEVICE_PROGRAM_MAP(slave_map_program) MCFG_DEVICE_IO_MAP(slave_map_io_2) - MCFG_MACHINE_START_OVERRIDE(leland_state,ataxx) - MCFG_MACHINE_RESET_OVERRIDE(leland_state,ataxx) - MCFG_EEPROM_SERIAL_93C56_ADD("eeprom") MCFG_EEPROM_SERIAL_ENABLE_STREAMING() @@ -1080,7 +1074,7 @@ MACHINE_CONFIG_START(leland_state::ataxx) MACHINE_CONFIG_END -MACHINE_CONFIG_START(leland_state::wsf) +MACHINE_CONFIG_START(ataxx_state::wsf) ataxx(config); MCFG_DEVICE_REMOVE("custom") @@ -3218,27 +3212,27 @@ void leland_state::init_pigout() } -void leland_state::init_ataxx() +void ataxx_state::init_ataxx() { leland_rotate_memory("master"); leland_rotate_memory("slave"); /* set up additional input ports */ - m_master->space(AS_IO).install_read_handler(0x00, 0x03, read8_delegate(FUNC(leland_state::ataxx_trackball_r),this)); + m_master->space(AS_IO).install_read_handler(0x00, 0x03, read8_delegate(FUNC(ataxx_state::ataxx_trackball_r),this)); } -void leland_state::init_ataxxj() +void ataxx_state::init_ataxxj() { leland_rotate_memory("master"); leland_rotate_memory("slave"); /* set up additional input ports */ - m_master->space(AS_IO).install_read_handler(0x00, 0x03, read8_delegate(FUNC(leland_state::ataxx_trackball_r),this)); + m_master->space(AS_IO).install_read_handler(0x00, 0x03, read8_delegate(FUNC(ataxx_state::ataxx_trackball_r),this)); } -void leland_state::init_wsf() +void ataxx_state::init_wsf() { leland_rotate_memory("master"); leland_rotate_memory("slave"); @@ -3250,24 +3244,24 @@ void leland_state::init_wsf() } -void leland_state::init_indyheat() +void ataxx_state::init_indyheat() { leland_rotate_memory("master"); leland_rotate_memory("slave"); /* set up additional input ports */ - m_master->space(AS_IO).install_read_handler(0x00, 0x02, read8_delegate(FUNC(leland_state::indyheat_wheel_r),this)); - m_master->space(AS_IO).install_read_handler(0x08, 0x0b, read8_delegate(FUNC(leland_state::indyheat_analog_r),this)); + m_master->space(AS_IO).install_read_handler(0x00, 0x02, read8_delegate(FUNC(ataxx_state::indyheat_wheel_r),this)); + m_master->space(AS_IO).install_read_handler(0x08, 0x0b, read8_delegate(FUNC(ataxx_state::indyheat_analog_r),this)); m_master->space(AS_IO).install_read_port(0x0d, 0x0d, "P1"); m_master->space(AS_IO).install_read_port(0x0e, 0x0e, "P2"); m_master->space(AS_IO).install_read_port(0x0f, 0x0f, "P3"); /* set up additional output ports */ - m_master->space(AS_IO).install_write_handler(0x08, 0x0b, write8_delegate(FUNC(leland_state::indyheat_analog_w),this)); + m_master->space(AS_IO).install_write_handler(0x08, 0x0b, write8_delegate(FUNC(ataxx_state::indyheat_analog_w),this)); } -void leland_state::init_brutforc() +void ataxx_state::init_brutforc() { leland_rotate_memory("master"); leland_rotate_memory("slave"); @@ -3279,7 +3273,7 @@ void leland_state::init_brutforc() } -void leland_state::init_asylum() +void ataxx_state::init_asylum() { leland_rotate_memory("master"); leland_rotate_memory("slave"); @@ -3342,11 +3336,11 @@ GAME( 1990, pigout, 0, lelandi, pigout, leland_state, init_pigou GAME( 1990, pigouta, pigout, lelandi, pigout, leland_state, init_pigout, ROT0, "Leland Corporation", "Pig Out: Dine Like a Swine! (rev 1)", 0 ) /* Ataxx-era PCB, 80186 sound */ -GAME( 1990, ataxx, 0, ataxx, ataxx, leland_state, init_ataxx, ROT0, "Leland Corporation", "Ataxx (rev 5)", 0 ) -GAME( 1990, ataxxa, ataxx, ataxx, ataxx, leland_state, init_ataxx, ROT0, "Leland Corporation", "Ataxx (rev 4)", 0 ) -GAME( 1990, ataxxe, ataxx, ataxx, ataxx, leland_state, init_ataxx, ROT0, "Leland Corporation", "Ataxx (Europe)", 0 ) -GAME( 1990, ataxxj, ataxx, ataxx, ataxx, leland_state, init_ataxxj, ROT0, "Leland Corporation (Capcom license)", "Ataxx (Japan)", 0 ) -GAME( 1990, wsf, 0, wsf, wsf, leland_state, init_wsf, ROT0, "Leland Corporation", "World Soccer Finals (rev 3)", 0 ) -GAME( 1991, indyheat, 0, wsf, indyheat, leland_state, init_indyheat, ROT0, "Leland Corporation", "Danny Sullivan's Indy Heat (rev 1)", 0 ) -GAME( 1991, brutforc, 0, wsf, brutforc, leland_state, init_brutforc, ROT0, "Leland Corporation", "Brute Force", 0 ) -GAME( 1991, asylum, 0, wsf, brutforc, leland_state, init_asylum, ROT270, "Leland Corporation", "Asylum (prototype)", 0 ) +GAME( 1990, ataxx, 0, ataxx, ataxx, ataxx_state, init_ataxx, ROT0, "Leland Corporation", "Ataxx (rev 5)", 0 ) +GAME( 1990, ataxxa, ataxx, ataxx, ataxx, ataxx_state, init_ataxx, ROT0, "Leland Corporation", "Ataxx (rev 4)", 0 ) +GAME( 1990, ataxxe, ataxx, ataxx, ataxx, ataxx_state, init_ataxx, ROT0, "Leland Corporation", "Ataxx (Europe)", 0 ) +GAME( 1990, ataxxj, ataxx, ataxx, ataxx, ataxx_state, init_ataxxj, ROT0, "Leland Corporation (Capcom license)", "Ataxx (Japan)", 0 ) +GAME( 1990, wsf, 0, wsf, wsf, ataxx_state, init_wsf, ROT0, "Leland Corporation", "World Soccer Finals (rev 3)", 0 ) +GAME( 1991, indyheat, 0, wsf, indyheat, ataxx_state, init_indyheat, ROT0, "Leland Corporation", "Danny Sullivan's Indy Heat (rev 1)", 0 ) +GAME( 1991, brutforc, 0, wsf, brutforc, ataxx_state, init_brutforc, ROT0, "Leland Corporation", "Brute Force", 0 ) +GAME( 1991, asylum, 0, wsf, brutforc, ataxx_state, init_asylum, ROT270, "Leland Corporation", "Asylum (prototype)", 0 ) diff --git a/src/mame/drivers/novag6502.cpp b/src/mame/drivers/novag6502.cpp index 3e108d567bf..56a0167a856 100644 --- a/src/mame/drivers/novag6502.cpp +++ b/src/mame/drivers/novag6502.cpp @@ -79,10 +79,12 @@ class novag6502_state : public novagbase_state public: novag6502_state(const machine_config &mconfig, device_type type, const char *tag) : novagbase_state(mconfig, type, tag), - m_hlcd0538(*this, "hlcd0538") + m_hlcd0538(*this, "hlcd0538"), + m_rombank(*this, "rombank") { } optional_device<hlcd0538_device> m_hlcd0538; + optional_memory_bank m_rombank; TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(M6502_IRQ_LINE, ASSERT_LINE); } TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(M6502_IRQ_LINE, CLEAR_LINE); } @@ -423,7 +425,7 @@ WRITE8_MEMBER(novag6502_state::sexpert_leds_w) WRITE8_MEMBER(novag6502_state::sexpert_mux_w) { // d0: rom bankswitch - membank("bank1")->set_entry(data & 1); + m_rombank->set_entry(data & 1); // d3: enable beeper m_beeper->set_state(data >> 3 & 1); @@ -458,12 +460,12 @@ MACHINE_RESET_MEMBER(novag6502_state, sexpert) novagbase_state::machine_reset(); sexpert_set_cpu_freq(); - membank("bank1")->set_entry(0); + m_rombank->set_entry(0); } void novag6502_state::init_sexpert() { - membank("bank1")->configure_entries(0, 2, memregion("maincpu")->base() + 0x8000, 0x8000); + m_rombank->configure_entries(0, 2, memregion("maincpu")->base() + 0x8000, 0x8000); } @@ -475,7 +477,7 @@ void novag6502_state::init_sexpert() WRITE8_MEMBER(novag6502_state::sforte_lcd_control_w) { // d3: rom bankswitch - membank("bank1")->set_entry(data >> 3 & 1); + m_rombank->set_entry(data >> 3 & 1); // assume same as sexpert sexpert_lcd_control_w(space, 0, data); @@ -540,7 +542,7 @@ void novag6502_state::sforte_map(address_map &map) map(0x1ff7, 0x1ff7).w(this, FUNC(novag6502_state::sforte_lcd_data_w)); map(0x1ffc, 0x1fff).rw("acia", FUNC(mos6551_device::read), FUNC(mos6551_device::write)); map(0x2000, 0x7fff).rom(); - map(0x8000, 0xffff).bankr("bank1"); + map(0x8000, 0xffff).bankr("rombank"); } void novag6502_state::sexpert_map(address_map &map) diff --git a/src/mame/drivers/novag68k.cpp b/src/mame/drivers/novag68k.cpp index 138953672bb..ab767d36f93 100644 --- a/src/mame/drivers/novag68k.cpp +++ b/src/mame/drivers/novag68k.cpp @@ -288,7 +288,7 @@ MACHINE_CONFIG_END ******************************************************************************/ ROM_START( diablo68 ) - ROM_REGION16_BE( 0x20000, "maincpu", 0 ) + ROM_REGION16_BE( 0x20000, "maincpu", ROMREGION_ERASE00 ) ROM_LOAD16_BYTE("evenurom.bin", 0x00000, 0x8000, CRC(03477746) SHA1(8bffcb159a61e59bfc45411e319aea6501ebe2f9) ) ROM_LOAD16_BYTE("oddlrom.bin", 0x00001, 0x8000, CRC(e182dbdd) SHA1(24dacbef2173fa737636e4729ff22ec1e6623ca5) ) ROM_LOAD16_BYTE("book.bin", 0x10000, 0x8000, CRC(553a5c8c) SHA1(ccb5460ff10766a5ca8008ae2cffcff794318108) ) // no odd rom @@ -296,7 +296,7 @@ ROM_END ROM_START( scorpio68 ) - ROM_REGION16_BE( 0x20000, "maincpu", 0 ) + ROM_REGION16_BE( 0x20000, "maincpu", ROMREGION_ERASE00 ) ROM_LOAD16_BYTE("s_evn_904.u3", 0x00000, 0x8000, CRC(a8f63245) SHA1(0ffdc6eb8ecad730440b0bfb2620fb00820e1aea) ) ROM_LOAD16_BYTE("s_odd_c18.u2", 0x00001, 0x8000, CRC(4f033319) SHA1(fce228b1705b7156d4d01ef92b22a875d0f6f321) ) ROM_LOAD16_BYTE("502.u4", 0x10000, 0x8000, CRC(553a5c8c) SHA1(ccb5460ff10766a5ca8008ae2cffcff794318108) ) // no odd rom diff --git a/src/mame/drivers/pc100.cpp b/src/mame/drivers/pc100.cpp index 821b6fdb4be..44db620258b 100644 --- a/src/mame/drivers/pc100.cpp +++ b/src/mame/drivers/pc100.cpp @@ -80,20 +80,30 @@ public: m_beeper(*this, "beeper"), m_rtc(*this, "rtc"), m_fdc(*this, "upd765"), + m_pic(*this, "pic8259"), m_palette(*this, "palette"), m_kanji_rom(*this, "kanji"), m_vram(*this, "vram"), + m_keys(*this, "ROW.%u", 0U), m_rtc_portc(0) { } - + void pc100(machine_config &config); + DECLARE_INPUT_CHANGED_MEMBER(key_stroke); +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + virtual void video_start() override; +private: required_device<cpu_device> m_maincpu; required_device<beep_device> m_beeper; required_device<msm58321_device> m_rtc; required_device<upd765a_device> m_fdc; + required_device<pic8259_device> m_pic; required_device<palette_device> m_palette; required_region_ptr<uint16_t> m_kanji_rom; required_region_ptr<uint16_t> m_vram; + required_ioport_array<6> m_keys; DECLARE_READ16_MEMBER(pc100_vram_r); DECLARE_WRITE16_MEMBER(pc100_vram_w); @@ -119,7 +129,7 @@ public: uint16_t m_kanji_addr; uint8_t m_timer_mode; - uint8_t m_bank_r,m_bank_w; + uint8_t m_bank_r,m_bank_w,m_key; bool m_nmi_mask, m_irq_state, m_drq_state; struct{ @@ -129,9 +139,6 @@ public: uint8_t addr; uint8_t reg[8]; }m_crtc; - virtual void machine_start() override; - virtual void machine_reset() override; - virtual void video_start() override; uint32_t screen_update_pc100(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(pc100_vblank_irq); TIMER_DEVICE_CALLBACK_MEMBER(pc100_600hz_irq); @@ -145,7 +152,6 @@ public: WRITE_LINE_MEMBER(rtc_portc_2_w) { m_rtc_portc = (m_rtc_portc & ~(1 << 2)) | ((state & 1) << 2); } WRITE_LINE_MEMBER(rtc_portc_3_w) { m_rtc_portc = (m_rtc_portc & ~(1 << 3)) | ((state & 1) << 3); } uint8_t m_rtc_portc; - void pc100(machine_config &config); void pc100_io(address_map &map); void pc100_map(address_map &map); }; @@ -255,6 +261,11 @@ READ8_MEMBER( pc100_state::pc100_key_r ) { if(offset) return ioport("DSW")->read(); // bit 5: horizontal/vertical monitor dsw + else + { + m_pic->ir3_w(0); + return m_key; + } return 0; } @@ -337,9 +348,121 @@ void pc100_state::pc100_io(address_map &map) map(0x84, 0x87).nopw(); //kanji "strobe" signal 0/1 } +INPUT_CHANGED_MEMBER(pc100_state::key_stroke) +{ + if(newval != oldval) + { + m_key = ((uint8_t)(uintptr_t)(param) & 0xff); + if(!((newval ^ oldval) & newval)) + m_key |= 0x80; + m_pic->ir3_w(1); + } +} /* Input ports */ static INPUT_PORTS_START( pc100 ) + PORT_START("ROW.0") + PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x00) + PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x01) + PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x02) + PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x03) + PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x04) + PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x05) + PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x06) + PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x07) + PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x08) + PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x09) + PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x0a) + PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x0b) + PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x0c) + PORT_BIT(0x2000, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x0d) + PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x0e) + PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x0f) + PORT_START("ROW.1") + PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x10) + PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x11) + PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_TAB) PORT_CHAR('\t') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x12) + PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x13) + PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x14) + PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x15) + PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x16) + PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x17) + PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x18) + PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x19) + PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x1a) + PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x1b) + PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x1c) + PORT_BIT(0x2000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x1d) + PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x1e) + PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x1f) + PORT_START("ROW.2") + PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x20) + PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x21) + PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('W') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x22) + PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('E') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x23) + PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x24) + PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x25) + PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x26) + PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x27) + PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x28) + PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('P') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x29) + PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('O') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x2a) + PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x2b) + PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('R') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x2c) + PORT_BIT(0x2000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('T') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x2d) + PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x2e) + PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('U') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x2f) + PORT_START("ROW.3") + PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('I') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x30) + PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('A') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x31) + PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('S') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x32) + PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('D') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x33) + PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('F') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x34) + PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('G') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x35) + PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('H') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x36) + PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x37) + PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x38) + PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x39) + PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('X') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x3a) + PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('K') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x3b) + PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x3c) + PORT_BIT(0x2000, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x3d) + PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x3e) + PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('J') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x3f) + PORT_START("ROW.4") + PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('L') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x40) + PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x41) + PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x42) + PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('C') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x43) + PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('V') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x44) + PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('B') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x45) + PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('N') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x46) + PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('M') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x47) + PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x48) + PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x49) + PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x4a) + PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x4b) + PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x4c) + PORT_BIT(0x2000, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x4d) + PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x4e) + PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x4f) + PORT_START("ROW.5") + PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x50) + PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x51) + PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x52) + PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x53) + PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x54) + PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x55) + PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x56) + PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x57) + PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x58) + PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x59) + PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x5a) + PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x5b) + PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x5c) + PORT_BIT(0x2000, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x5d) + PORT_BIT(0x4000, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x5e) + PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_UNKNOWN) PORT_CHANGED_MEMBER(DEVICE_SELF, pc100_state, key_stroke, 0x5f) PORT_START("DSW") PORT_DIPNAME( 0x01, 0x01, "DSW" ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) @@ -446,20 +569,21 @@ void pc100_state::machine_start() void pc100_state::machine_reset() { m_beeper->set_state(0); + m_key = 0xf0; } INTERRUPT_GEN_MEMBER(pc100_state::pc100_vblank_irq) { - machine().device<pic8259_device>("pic8259")->ir4_w(0); - machine().device<pic8259_device>("pic8259")->ir4_w(1); + m_pic->ir4_w(0); + m_pic->ir4_w(1); } TIMER_DEVICE_CALLBACK_MEMBER(pc100_state::pc100_600hz_irq) { if(m_timer_mode == 0) { - machine().device<pic8259_device>("pic8259")->ir2_w(0); - machine().device<pic8259_device>("pic8259")->ir2_w(1); + m_pic->ir2_w(0); + m_pic->ir2_w(1); } } @@ -467,8 +591,8 @@ TIMER_DEVICE_CALLBACK_MEMBER(pc100_state::pc100_100hz_irq) { if(m_timer_mode == 1) { - machine().device<pic8259_device>("pic8259")->ir2_w(0); - machine().device<pic8259_device>("pic8259")->ir2_w(1); + m_pic->ir2_w(0); + m_pic->ir2_w(1); } } @@ -476,8 +600,8 @@ TIMER_DEVICE_CALLBACK_MEMBER(pc100_state::pc100_50hz_irq) { if(m_timer_mode == 2) { - machine().device<pic8259_device>("pic8259")->ir2_w(0); - machine().device<pic8259_device>("pic8259")->ir2_w(1); + m_pic->ir2_w(0); + m_pic->ir2_w(1); } } @@ -485,8 +609,8 @@ TIMER_DEVICE_CALLBACK_MEMBER(pc100_state::pc100_10hz_irq) { if(m_timer_mode == 3) { - machine().device<pic8259_device>("pic8259")->ir2_w(0); - machine().device<pic8259_device>("pic8259")->ir2_w(1); + m_pic->ir2_w(0); + m_pic->ir2_w(1); } } diff --git a/src/mame/drivers/spyhuntertec.cpp b/src/mame/drivers/spyhuntertec.cpp index e13065ecab7..1bc0711b478 100644 --- a/src/mame/drivers/spyhuntertec.cpp +++ b/src/mame/drivers/spyhuntertec.cpp @@ -723,6 +723,107 @@ MACHINE_CONFIG_END +/* + Spy Hunter (Recreativos Franco) + Licensed by Bally Midway. + Original PCB. +*/ + +ROM_START( spyhuntsp ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "1.bin", 0x0000, 0x4000, CRC(ae05b8a2) SHA1(8854368206c484b30865a4d29ac85f854599e791) ) + ROM_LOAD( "2.bin", 0x4000, 0x4000, CRC(c96f5d69) SHA1(528b1ded5d4fea008482cace48c96ec162d78bae) ) + ROM_LOAD( "3.bin", 0x8000, 0x4000, CRC(bd6c1a5c) SHA1(c47fe5daccead4a3ea326c2b0b12405e24f9e222) ) + ROM_LOAD( "4.bin", 0xc000, 0x2000, CRC(3ea6a65c) SHA1(1320ce17044307ed3c4f2459631a9aa1734f1f30) ) + + ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_LOAD( "5.bin", 0x0000, 0x2000, CRC(33fe2829) SHA1(e6950dbf681242bf23542ca6604e62eacb431101) ) + + ROM_REGION( 0x08000, "gfx1", 0 ) + ROM_LOAD32_BYTE( "6.bin", 0x0000, 0x200, CRC(6b76f46a) SHA1(4b398084c42a60fcfa4a9bf14f844e36a3f42723) ) + ROM_CONTINUE(0x0001, 0x200) + ROM_CONTINUE(0x0800, 0x200) + ROM_CONTINUE(0x0801, 0x200) + ROM_CONTINUE(0x1000, 0x200) + ROM_CONTINUE(0x1001, 0x200) + ROM_CONTINUE(0x1800, 0x200) + ROM_CONTINUE(0x1801, 0x200) + ROM_CONTINUE(0x2000, 0x200) + ROM_CONTINUE(0x2001, 0x200) + ROM_CONTINUE(0x2800, 0x200) + ROM_CONTINUE(0x2801, 0x200) + ROM_CONTINUE(0x3000, 0x200) + ROM_CONTINUE(0x3001, 0x200) + ROM_CONTINUE(0x3800, 0x200) + ROM_CONTINUE(0x3801, 0x200) + ROM_LOAD32_BYTE( "7.bin", 0x0002, 0x200, CRC(085bd7a7) SHA1(c35c309b6c6485baec54d4434dea44abf4d48f41) ) + ROM_CONTINUE(0x0003, 0x200) + ROM_CONTINUE(0x0802, 0x200) + ROM_CONTINUE(0x0803, 0x200) + ROM_CONTINUE(0x1002, 0x200) + ROM_CONTINUE(0x1003, 0x200) + ROM_CONTINUE(0x1802, 0x200) + ROM_CONTINUE(0x1803, 0x200) + ROM_CONTINUE(0x2002, 0x200) + ROM_CONTINUE(0x2003, 0x200) + ROM_CONTINUE(0x2802, 0x200) + ROM_CONTINUE(0x2803, 0x200) + ROM_CONTINUE(0x3002, 0x200) + ROM_CONTINUE(0x3003, 0x200) + ROM_CONTINUE(0x3802, 0x200) + ROM_CONTINUE(0x3803, 0x200) + ROM_LOAD32_BYTE( "8.bin", 0x4000, 0x200, CRC(e699b329) SHA1(cb4b8c7b6fa1cb1144a18f1442dc3b267c408914) ) + ROM_CONTINUE(0x4001, 0x200) + ROM_CONTINUE(0x4800, 0x200) + ROM_CONTINUE(0x4801, 0x200) + ROM_CONTINUE(0x5000, 0x200) + ROM_CONTINUE(0x5001, 0x200) + ROM_CONTINUE(0x5800, 0x200) + ROM_CONTINUE(0x5801, 0x200) + ROM_CONTINUE(0x6000, 0x200) + ROM_CONTINUE(0x6001, 0x200) + ROM_CONTINUE(0x6800, 0x200) + ROM_CONTINUE(0x6801, 0x200) + ROM_CONTINUE(0x7000, 0x200) + ROM_CONTINUE(0x7001, 0x200) + ROM_CONTINUE(0x7800, 0x200) + ROM_CONTINUE(0x7801, 0x200) + ROM_LOAD32_BYTE( "9.bin", 0x4002, 0x200, CRC(6d462ec7) SHA1(0ff37f75b0eeceb86177a3f7c93834d5c0e24515) ) + ROM_CONTINUE(0x4003, 0x200) + ROM_CONTINUE(0x4802, 0x200) + ROM_CONTINUE(0x4803, 0x200) + ROM_CONTINUE(0x5002, 0x200) + ROM_CONTINUE(0x5003, 0x200) + ROM_CONTINUE(0x5802, 0x200) + ROM_CONTINUE(0x5803, 0x200) + ROM_CONTINUE(0x6002, 0x200) + ROM_CONTINUE(0x6003, 0x200) + ROM_CONTINUE(0x6802, 0x200) + ROM_CONTINUE(0x6803, 0x200) + ROM_CONTINUE(0x7002, 0x200) + ROM_CONTINUE(0x7003, 0x200) + ROM_CONTINUE(0x7802, 0x200) + ROM_CONTINUE(0x7803, 0x200) + + ROM_REGION( 0x10000, "gfx2", ROMREGION_INVERT ) + ROM_LOAD( "10.bin", 0x00000, 0x4000, CRC(6f9fd416) SHA1(a51c86e5b22c91fc44673f53400b58af40b18065) ) + ROM_LOAD( "11.bin", 0x04000, 0x4000, CRC(75526ffe) SHA1(ff1adf6f9b6595114d0bd06b72d9eb7bbf70144d) ) + ROM_LOAD( "12.bin", 0x08000, 0x4000, CRC(82ee7a4d) SHA1(184720de76680275bf7c4a171f03a0ce771d91fc) ) + ROM_LOAD( "13.bin", 0x0c000, 0x4000, CRC(0cc592a3) SHA1(b3563bde83432cdbaedb88d4d222da30bf679b08) ) + + ROM_REGION( 0x01000, "gfx3", 0 ) + ROM_LOAD( "14.bin", 0x00000, 0x1000, CRC(87a4c130) SHA1(7792afdc36b0f3bd51c387d04d38f60c85fd2e93) ) + + ROM_REGION( 0x200, "proms", 0 ) + ROM_LOAD( "82s129.ic19", 0x0000, 0x0100, CRC(b9dc4d09) SHA1(56176e5c40e6926784cfe93b2e5241c2b46f4a38) ) + ROM_LOAD( "82s129.ic20", 0x0100, 0x0100, CRC(b9dc4d09) SHA1(56176e5c40e6926784cfe93b2e5241c2b46f4a38) ) + + ROM_REGION( 0x200, "proms2", 0 ) + ROM_LOAD( "prom.1c8", 0x0000, 0x0200, CRC(ce69832d) SHA1(a663cbf762232f3ed9fc0b42a559e1ca4639589b) ) + +ROM_END + + ROM_START( spyhuntpr ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "1.bin", 0x0000, 0x4000, CRC(2a2f77cb) SHA1(e1b74c951efb2a49bef0507ab3268b274515f339) ) @@ -811,11 +912,17 @@ ROM_START( spyhuntpr ) ROM_LOAD( "14.bin", 0x00000, 0x1000, CRC(87a4c130) SHA1(7792afdc36b0f3bd51c387d04d38f60c85fd2e93) ) ROM_END + void spyhuntertec_state::init_spyhuntertec() { m_spyhunt_sprite_color_mask = 0x00; m_spyhunt_scroll_offset = 16; } +/*************************************************************************** +* Game Drivers * +***************************************************************************/ -GAMEL(1983, spyhuntpr, spyhunt, spyhuntertec, spyhuntertec, spyhuntertec_state, init_spyhuntertec, ROT90, "bootleg (Recreativos Franco S.A. license, Tecfri)", "Spy Hunter (Spain, Recreativos Franco S.A., Tecfri PCB)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE, layout_spyhunttec ) +// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS LAYOUT +GAMEL(1983, spyhuntsp, spyhunt, spyhuntertec, spyhuntertec, spyhuntertec_state, init_spyhuntertec, ROT90, "Recreativos Franco S.A. (Bally Midway license)", "Spy Hunter (Spain, Recreativos Franco S.A., Bally Midway license)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE, layout_spyhunttec ) +GAMEL(1983, spyhuntpr, spyhunt, spyhuntertec, spyhuntertec, spyhuntertec_state, init_spyhuntertec, ROT90, "bootleg (Recreativos Franco S.A. license, Tecfri)", "Spy Hunter (Spain, Recreativos Franco S.A., Tecfri PCB)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE, layout_spyhunttec ) diff --git a/src/mame/drivers/wallc.cpp b/src/mame/drivers/wallc.cpp index ce3780b746b..b6b38a5e6ba 100644 --- a/src/mame/drivers/wallc.cpp +++ b/src/mame/drivers/wallc.cpp @@ -100,6 +100,7 @@ private: TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_bg_tile_info_unkitpkr); + TILE_GET_INFO_MEMBER(get_bg_tile_info_sidampkr); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_PALETTE_INIT(wallc); @@ -233,6 +234,11 @@ TILE_GET_INFO_MEMBER(wallc_state::get_bg_tile_info_unkitpkr) SET_TILE_INFO_MEMBER(0, code, 1, 0); } +TILE_GET_INFO_MEMBER(wallc_state::get_bg_tile_info_sidampkr) +{ + SET_TILE_INFO_MEMBER(0, m_videoram[tile_index] | 0x100, 0, 0); +} + void wallc_state::video_start() { m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(wallc_state::get_bg_tile_info), this), TILEMAP_SCAN_COLS_FLIP_Y, 8, 8, 32, 32); @@ -245,7 +251,7 @@ VIDEO_START_MEMBER(wallc_state, unkitpkr) VIDEO_START_MEMBER(wallc_state, sidampkr) { - m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(wallc_state::get_bg_tile_info), this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); + m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(wallc_state::get_bg_tile_info_sidampkr), this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); } uint32_t wallc_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) @@ -772,5 +778,5 @@ GAME( 1984, wallc, 0, wallc, wallc, wallc_state, init_wallc, RO GAME( 1984, wallca, wallc, wallca, wallc, wallc_state, init_wallca, ROT0, "Midcoin", "Wall Crash (set 2)", MACHINE_SUPPORTS_SAVE ) GAME( 1984, brkblast, wallc, wallc, wallc, wallc_state, init_wallca, ROT0, "bootleg (Fadesa)", "Brick Blast (bootleg of Wall Crash)", MACHINE_SUPPORTS_SAVE ) // Spanish bootleg board, Fadesa stickers / text on various components -GAME( 1984, sidampkr, 0, sidampkr, sidampkr, wallc_state, init_sidam, ROT270, "Sidam", "unknown Sidam Poker", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs correct decoding of the color PROM. Using the unkitpkr one gives correct colors and makes the game playable. +GAME( 1984, sidampkr, 0, sidampkr, sidampkr, wallc_state, init_sidam, ROT270, "Sidam", "unknown Sidam poker", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE ) // colors should be verified GAME( 198?, unkitpkr, 0, unkitpkr, unkitpkr, wallc_state, init_unkitpkr, ROT0, "<unknown>", "unknown Italian poker game", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/includes/leland.h b/src/mame/includes/leland.h index 865ba89a662..e5e79f0ede8 100644 --- a/src/mame/includes/leland.h +++ b/src/mame/includes/leland.h @@ -48,7 +48,6 @@ public: , m_slave_base(*this, "slave") , m_bg_gfxrom(*this, "bg_gfx") , m_bg_prom(*this, "bg_prom") - , m_xrom_base(*this, "xrom") , m_master_bankslot(*this, "masterbank_%u", 0U) , m_slave_bankslot(*this, "slavebank") { } @@ -70,14 +69,12 @@ public: required_region_ptr<uint8_t> m_slave_base; required_region_ptr<uint8_t> m_bg_gfxrom; optional_region_ptr<uint8_t> m_bg_prom; - optional_region_ptr<uint8_t> m_xrom_base; required_memory_bank_array<2> m_master_bankslot; required_memory_bank m_slave_bankslot; uint8_t m_dac_control; uint8_t *m_alleymas_kludge_mem; - std::unique_ptr<uint8_t[]> m_ataxx_qram; uint8_t m_gfx_control; uint8_t m_wcol_enable; emu_timer *m_master_int_timer; @@ -94,12 +91,8 @@ public: uint8_t m_top_board_bank; uint8_t m_sound_port_bank; uint8_t m_alternate_bank; - uint8_t m_master_bank; void (leland_state::*m_update_master_bank)(); - uint32_t m_xrom1_addr; - uint32_t m_xrom2_addr; uint8_t m_battery_ram_enable; - std::unique_ptr<uint8_t[]> m_extra_tram; std::unique_ptr<uint8_t[]> m_video_ram; struct vram_state_data m_vram_state[2]; uint16_t m_xscroll; @@ -121,23 +114,14 @@ public: DECLARE_READ8_MEMBER(offroad_wheel_1_r); DECLARE_READ8_MEMBER(offroad_wheel_2_r); DECLARE_READ8_MEMBER(offroad_wheel_3_r); - DECLARE_READ8_MEMBER(ataxx_trackball_r); - DECLARE_READ8_MEMBER(indyheat_wheel_r); - DECLARE_READ8_MEMBER(indyheat_analog_r); - DECLARE_WRITE8_MEMBER(indyheat_analog_w); DECLARE_WRITE8_MEMBER(leland_master_alt_bankswitch_w); DECLARE_WRITE8_MEMBER(leland_battery_ram_w); - DECLARE_WRITE8_MEMBER(ataxx_battery_ram_w); DECLARE_READ8_MEMBER(leland_master_analog_key_r); DECLARE_WRITE8_MEMBER(leland_master_analog_key_w); DECLARE_READ8_MEMBER(leland_master_input_r); DECLARE_WRITE8_MEMBER(leland_master_output_w); - DECLARE_READ8_MEMBER(ataxx_master_input_r); - DECLARE_WRITE8_MEMBER(ataxx_master_output_w); DECLARE_WRITE8_MEMBER(leland_gated_paletteram_w); DECLARE_READ8_MEMBER(leland_gated_paletteram_r); - DECLARE_WRITE8_MEMBER(ataxx_paletteram_and_misc_w); - DECLARE_READ8_MEMBER(ataxx_paletteram_and_misc_r); DECLARE_WRITE8_MEMBER(leland_slave_small_banksw_w); DECLARE_WRITE8_MEMBER(leland_slave_large_banksw_w); DECLARE_WRITE8_MEMBER(ataxx_slave_banksw_w); @@ -149,12 +133,6 @@ public: DECLARE_WRITE8_MEMBER(leland_slave_video_addr_w); DECLARE_WRITE8_MEMBER(leland_svram_port_w); DECLARE_READ8_MEMBER(leland_svram_port_r); - DECLARE_WRITE8_MEMBER(ataxx_mvram_port_w); - DECLARE_WRITE8_MEMBER(ataxx_svram_port_w); - DECLARE_READ8_MEMBER(ataxx_mvram_port_r); - DECLARE_READ8_MEMBER(ataxx_svram_port_r); - DECLARE_READ8_MEMBER(ataxx_eeprom_r); - DECLARE_WRITE8_MEMBER(ataxx_eeprom_w); DECLARE_READ8_MEMBER(leland_sound_port_r); DECLARE_WRITE8_MEMBER(leland_sound_port_w); DECLARE_WRITE8_MEMBER(leland_gfx_port_w); @@ -179,26 +157,14 @@ public: void init_upyoural(); void init_cerberus(); void init_aafbd2p(); - void init_ataxx(); - void init_ataxxj(); - void init_wsf(); - void init_indyheat(); - void init_brutforc(); - void init_asylum(); - DECLARE_MACHINE_START(ataxx); - DECLARE_MACHINE_RESET(ataxx); - DECLARE_MACHINE_START(leland); - DECLARE_MACHINE_RESET(leland); - DECLARE_VIDEO_START(leland); - DECLARE_VIDEO_START(leland2); - DECLARE_VIDEO_START(ataxx); + virtual void machine_start() override; + virtual void machine_reset() override; + virtual void video_start() override; tilemap_t *m_tilemap; TILEMAP_MAPPER_MEMBER(leland_scan); TILE_GET_INFO_MEMBER(leland_get_tile_info); - TILEMAP_MAPPER_MEMBER(ataxx_scan); - TILE_GET_INFO_MEMBER(ataxx_get_tile_info); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(leland_master_interrupt); TIMER_CALLBACK_MEMBER(leland_interrupt_callback); @@ -219,34 +185,90 @@ public: void redline_bankswitch(); void viper_bankswitch(); void offroad_bankswitch(); - void ataxx_bankswitch(); void leland_init_eeprom(uint8_t default_val, const uint16_t *data, uint8_t serial_offset, uint8_t serial_type); void ataxx_init_eeprom(const uint16_t *data); int keycard_r(); void keycard_w(int data); void leland_rotate_memory(const char *cpuname); void init_master_ports(uint8_t mvram_base, uint8_t io_base); - void ataxx(machine_config &config); void redline(machine_config &config); void lelandi(machine_config &config); void leland(machine_config &config); void quarterb(machine_config &config); - void wsf(machine_config &config); void leland_video(machine_config &config); - void ataxx_video(machine_config &config); void master_map_io(address_map &map); - void master_map_io_2(address_map &map); void master_map_program(address_map &map); - void master_map_program_2(address_map &map); void master_redline_map_io(address_map &map); void slave_large_map_program(address_map &map); void slave_map_io(address_map &map); - void slave_map_io_2(address_map &map); void slave_map_program(address_map &map); void slave_small_map_program(address_map &map); }; +class ataxx_state : public leland_state +{ +public: + ataxx_state(const machine_config &mconfig, device_type type, const char *tag) + : leland_state(mconfig, type, tag) + , m_xrom_base(*this, "xrom") + { + } + + void init_ataxx(); + void init_ataxxj(); + void init_wsf(); + void init_indyheat(); + void init_brutforc(); + void init_asylum(); + + void ataxx(machine_config &config); + void wsf(machine_config &config); + +protected: + DECLARE_READ8_MEMBER(ataxx_trackball_r); + DECLARE_READ8_MEMBER(indyheat_wheel_r); + DECLARE_READ8_MEMBER(indyheat_analog_r); + DECLARE_WRITE8_MEMBER(indyheat_analog_w); + + DECLARE_WRITE8_MEMBER(ataxx_battery_ram_w); + DECLARE_READ8_MEMBER(ataxx_master_input_r); + DECLARE_WRITE8_MEMBER(ataxx_master_output_w); + DECLARE_WRITE8_MEMBER(ataxx_paletteram_and_misc_w); + DECLARE_READ8_MEMBER(ataxx_paletteram_and_misc_r); + DECLARE_WRITE8_MEMBER(ataxx_mvram_port_w); + DECLARE_WRITE8_MEMBER(ataxx_svram_port_w); + DECLARE_READ8_MEMBER(ataxx_mvram_port_r); + DECLARE_READ8_MEMBER(ataxx_svram_port_r); + DECLARE_READ8_MEMBER(ataxx_eeprom_r); + DECLARE_WRITE8_MEMBER(ataxx_eeprom_w); + + TILEMAP_MAPPER_MEMBER(ataxx_scan); + TILE_GET_INFO_MEMBER(ataxx_get_tile_info); + + void ataxx_bankswitch(); + + virtual void machine_start() override; + virtual void machine_reset() override; + virtual void video_start() override; + + void ataxx_video(machine_config &config); + + void master_map_program_2(address_map &map); + void master_map_io_2(address_map &map); + void slave_map_io_2(address_map &map); + +private: + required_region_ptr<uint8_t> m_xrom_base; + + std::unique_ptr<uint8_t[]> m_ataxx_qram; + uint8_t m_master_bank; + uint32_t m_xrom1_addr; + uint32_t m_xrom2_addr; + std::unique_ptr<uint8_t[]> m_extra_tram; +}; + + #define SERIAL_TYPE_NONE 0 #define SERIAL_TYPE_ADD 1 #define SERIAL_TYPE_ADD_XOR 2 diff --git a/src/mame/machine/leland.cpp b/src/mame/machine/leland.cpp index d7873d0cb6f..02e5db9f8a1 100644 --- a/src/mame/machine/leland.cpp +++ b/src/mame/machine/leland.cpp @@ -245,7 +245,7 @@ READ8_MEMBER(leland_state::offroad_wheel_3_r) * *************************************/ -READ8_MEMBER(leland_state::ataxx_trackball_r) +READ8_MEMBER(ataxx_state::ataxx_trackball_r) { static const char *const tracknames[] = { "AN0", "AN1", "AN2", "AN3" }; @@ -260,7 +260,7 @@ READ8_MEMBER(leland_state::ataxx_trackball_r) * *************************************/ -READ8_MEMBER(leland_state::indyheat_wheel_r) +READ8_MEMBER(ataxx_state::indyheat_wheel_r) { static const char *const tracknames[] = { "AN0", "AN1", "AN2" }; @@ -268,7 +268,7 @@ READ8_MEMBER(leland_state::indyheat_wheel_r) } -READ8_MEMBER(leland_state::indyheat_analog_r) +READ8_MEMBER(ataxx_state::indyheat_analog_r) { switch (offset) { @@ -289,7 +289,7 @@ READ8_MEMBER(leland_state::indyheat_analog_r) } -WRITE8_MEMBER(leland_state::indyheat_analog_w) +WRITE8_MEMBER(ataxx_state::indyheat_analog_w) { static const char *const tracknames[] = { "AN3", "AN4", "AN5" }; @@ -315,7 +315,7 @@ WRITE8_MEMBER(leland_state::indyheat_analog_w) * *************************************/ -MACHINE_START_MEMBER(leland_state,leland) +void leland_state::machine_start() { /* start scanline interrupts going */ m_master_int_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(leland_state::leland_interrupt_callback),this)); @@ -337,7 +337,7 @@ MACHINE_START_MEMBER(leland_state,leland) } -MACHINE_RESET_MEMBER(leland_state,leland) +void leland_state::machine_reset() { m_master_int_timer->adjust(m_screen->time_until_pos(8), 8); @@ -372,8 +372,9 @@ MACHINE_RESET_MEMBER(leland_state,leland) } -MACHINE_START_MEMBER(leland_state,ataxx) +void ataxx_state::machine_start() { + // TODO: further untangle driver so the base class doesn't have stuff that isn't common and this can call the base implementation /* set the odd data banks */ m_extra_tram = std::make_unique<uint8_t[]>(ATAXX_EXTRA_TRAM_SIZE); @@ -391,8 +392,9 @@ MACHINE_START_MEMBER(leland_state,ataxx) } -MACHINE_RESET_MEMBER(leland_state,ataxx) +void ataxx_state::machine_reset() { + // TODO: further untangle driver so the base class doesn't have stuff that isn't common and this can call the base implementation memset(m_extra_tram.get(), 0, ATAXX_EXTRA_TRAM_SIZE); m_master_int_timer->adjust(m_screen->time_until_pos(8), 8); @@ -597,7 +599,7 @@ void leland_state::offroad_bankswitch() /* bankswitching for Ataxx, WSF, Indy Heat, and Brute Force */ -void leland_state::ataxx_bankswitch() +void ataxx_state::ataxx_bankswitch() { static const uint32_t bank_list[] = { @@ -820,7 +822,7 @@ void leland_state::ataxx_init_eeprom(const uint16_t *data) * *************************************/ -READ8_MEMBER(leland_state::ataxx_eeprom_r) +READ8_MEMBER(ataxx_state::ataxx_eeprom_r) { int port = ioport("IN2")->read(); if (LOG_EEPROM) logerror("%s:EE read\n", machine().describe_context()); @@ -828,7 +830,7 @@ READ8_MEMBER(leland_state::ataxx_eeprom_r) } -WRITE8_MEMBER(leland_state::ataxx_eeprom_w) +WRITE8_MEMBER(ataxx_state::ataxx_eeprom_w) { if (LOG_EEPROM) logerror("%s:EE write %d%d%d\n", machine().describe_context(), (data >> 6) & 1, (data >> 5) & 1, (data >> 4) & 1); @@ -857,7 +859,7 @@ WRITE8_MEMBER(leland_state::leland_battery_ram_w) } -WRITE8_MEMBER(leland_state::ataxx_battery_ram_w) +WRITE8_MEMBER(ataxx_state::ataxx_battery_ram_w) { if (m_battery_ram_enable) { @@ -1169,7 +1171,7 @@ WRITE8_MEMBER(leland_state::leland_master_output_w) } -READ8_MEMBER(leland_state::ataxx_master_input_r) +READ8_MEMBER(ataxx_state::ataxx_master_input_r) { int result = 0xff; @@ -1193,7 +1195,7 @@ READ8_MEMBER(leland_state::ataxx_master_input_r) } -WRITE8_MEMBER(leland_state::ataxx_master_output_w) +WRITE8_MEMBER(ataxx_state::ataxx_master_output_w) { switch (offset) { @@ -1251,7 +1253,7 @@ READ8_MEMBER(leland_state::leland_gated_paletteram_r) } -WRITE8_MEMBER(leland_state::ataxx_paletteram_and_misc_w) +WRITE8_MEMBER(ataxx_state::ataxx_paletteram_and_misc_w) { if (m_wcol_enable) m_palette->write8(space, offset, data); @@ -1282,7 +1284,7 @@ WRITE8_MEMBER(leland_state::ataxx_paletteram_and_misc_w) } -READ8_MEMBER(leland_state::ataxx_paletteram_and_misc_r) +READ8_MEMBER(ataxx_state::ataxx_paletteram_and_misc_r) { if (m_wcol_enable) return m_palette->basemem().read8(offset); diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 26e4de7bdbe..0732bb94a23 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -35368,6 +35368,7 @@ spyu // GX857 (c) 1989 (US) @source:spyhuntertec.cpp spyhuntpr // +spyhuntsp // @source:squale.cpp squale // diff --git a/src/mame/video/leland.cpp b/src/mame/video/leland.cpp index 5fe938c4590..3b7e90d57cd 100644 --- a/src/mame/video/leland.cpp +++ b/src/mame/video/leland.cpp @@ -74,13 +74,13 @@ TILE_GET_INFO_MEMBER(leland_state::leland_get_tile_info) * *************************************/ -TILEMAP_MAPPER_MEMBER(leland_state::ataxx_scan) +TILEMAP_MAPPER_MEMBER(ataxx_state::ataxx_scan) { /* logical (col,row) -> memory offset */ return (col & 0xff) | ((row & 0x3f) << 8) | ((row & 0x40) << 9); } -TILE_GET_INFO_MEMBER(leland_state::ataxx_get_tile_info) +TILE_GET_INFO_MEMBER(ataxx_state::ataxx_get_tile_info) { uint16_t tile = m_ataxx_qram[tile_index] | ((m_ataxx_qram[0x4000 | tile_index] & 0x7f) << 8); SET_TILE_INFO_MEMBER(0, tile, 0, 0); @@ -93,7 +93,7 @@ TILE_GET_INFO_MEMBER(leland_state::ataxx_get_tile_info) * *************************************/ -VIDEO_START_MEMBER(leland_state,leland) +void leland_state::video_start() { /* tilemap */ m_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(leland_state::leland_get_tile_info),this), tilemap_mapper_delegate(FUNC(leland_state::leland_scan),this), 8, 8, 256, 256); @@ -118,10 +118,11 @@ VIDEO_START_MEMBER(leland_state,leland) } } -VIDEO_START_MEMBER(leland_state,ataxx) +void ataxx_state::video_start() { + // TODO: further untangle driver so the base class doesn't have stuff that isn't common and this can call the base implementation /* tilemap */ - m_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(leland_state::ataxx_get_tile_info),this), tilemap_mapper_delegate(FUNC(leland_state::ataxx_scan),this), 8, 8, 256, 128); + m_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(ataxx_state::ataxx_get_tile_info),this), tilemap_mapper_delegate(FUNC(ataxx_state::ataxx_scan),this), 8, 8, 256, 128); /* first do the standard stuff */ m_video_ram = make_unique_clear<uint8_t[]>(VRAM_SIZE); @@ -200,12 +201,12 @@ WRITE8_MEMBER(leland_state::leland_gfx_port_w) void leland_state::leland_video_addr_w(address_space &space, int offset, int data, int num) { - struct vram_state_data *state = m_vram_state + num; + struct vram_state_data &state = m_vram_state[num]; if (!offset) - state->m_addr = (state->m_addr & 0xfe00) | ((data << 1) & 0x01fe); + state.m_addr = (state.m_addr & 0xfe00) | ((data << 1) & 0x01fe); else - state->m_addr = ((data << 9) & 0xfe00) | (state->m_addr & 0x01fe); + state.m_addr = ((data << 9) & 0xfe00) | (state.m_addr & 0x01fe); } @@ -402,14 +403,14 @@ READ8_MEMBER(leland_state::leland_svram_port_r) * *************************************/ -WRITE8_MEMBER(leland_state::ataxx_mvram_port_w) +WRITE8_MEMBER(ataxx_state::ataxx_mvram_port_w) { offset = ((offset >> 1) & 0x07) | ((offset << 3) & 0x08) | (offset & 0x10); - machine().scheduler().synchronize(timer_expired_delegate(FUNC(leland_state::leland_delayed_mvram_w),this), 0x00000 | (offset << 8) | data); + machine().scheduler().synchronize(timer_expired_delegate(FUNC(ataxx_state::leland_delayed_mvram_w),this), 0x00000 | (offset << 8) | data); } -WRITE8_MEMBER(leland_state::ataxx_svram_port_w) +WRITE8_MEMBER(ataxx_state::ataxx_svram_port_w) { offset = ((offset >> 1) & 0x07) | ((offset << 3) & 0x08) | (offset & 0x10); leland_vram_port_w(space, offset, data, 1); @@ -422,14 +423,14 @@ WRITE8_MEMBER(leland_state::ataxx_svram_port_w) * *************************************/ -READ8_MEMBER(leland_state::ataxx_mvram_port_r) +READ8_MEMBER(ataxx_state::ataxx_mvram_port_r) { offset = ((offset >> 1) & 0x07) | ((offset << 3) & 0x08) | (offset & 0x10); return leland_vram_port_r(space, offset, 0); } -READ8_MEMBER(leland_state::ataxx_svram_port_r) +READ8_MEMBER(ataxx_state::ataxx_svram_port_r) { offset = ((offset >> 1) & 0x07) | ((offset << 3) & 0x08) | (offset & 0x10); return leland_vram_port_r(space, offset, 1); @@ -444,24 +445,24 @@ READ8_MEMBER(leland_state::ataxx_svram_port_r) uint32_t leland_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - bitmap_ind16 &src = m_tilemap->pixmap(); - int height_mask = m_tilemap->height()-1; + bitmap_ind16 const &src = m_tilemap->pixmap(); + int const height_mask = m_tilemap->height() - 1; /* for each scanline in the visible region */ for (int y = cliprect.min_y; y <= cliprect.max_y; y++) { - uint16_t *dst = &bitmap.pix16(y); - uint8_t *fg_src = &m_video_ram[y << 8]; + uint16_t *const dst = &bitmap.pix16(y); + uint8_t const *const fg_src = &m_video_ram[y << 8]; /* for each pixel on the scanline */ for (int x = cliprect.min_x; x <= cliprect.max_x; x++) { /* compute the effective scrolled pixel coordinates */ - uint16_t sx = (x + m_xscroll) & 0x07ff; - uint16_t sy = (y + m_yscroll) & height_mask; + uint16_t const sx = (x + m_xscroll) & 0x07ff; + uint16_t const sy = (y + m_yscroll) & height_mask; /* build the pen, background is d0-d5 */ - pen_t pen = src.pix16(sy,sx) & 0x3f; + pen_t pen = src.pix16(sy, sx) & 0x3f; /* foreground is d6-d9 */ if (x & 0x01) @@ -514,9 +515,6 @@ static GFXDECODE_START( gfx_ataxx ) GFXDECODE_END MACHINE_CONFIG_START(leland_state::leland_video) - - MCFG_VIDEO_START_OVERRIDE(leland_state,leland) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_leland) MCFG_PALETTE_ADD("palette", 1024) MCFG_PALETTE_FORMAT(BBGGGRRR) @@ -530,9 +528,8 @@ MACHINE_CONFIG_START(leland_state::leland_video) MCFG_SCREEN_PALETTE("palette") MACHINE_CONFIG_END -MACHINE_CONFIG_START(leland_state::ataxx_video) +MACHINE_CONFIG_START(ataxx_state::ataxx_video) leland_video(config); - MCFG_VIDEO_START_OVERRIDE(leland_state,ataxx) MCFG_DEVICE_REPLACE("gfxdecode", GFXDECODE, "palette", gfx_ataxx) MCFG_PALETTE_MODIFY("palette") |