From 15386236cf26603d17717a130b9ae61b2f1b3864 Mon Sep 17 00:00:00 2001 From: AJR Date: Tue, 21 Apr 2020 17:29:39 -0400 Subject: [PATCH] atarisy1.cpp, atarisy2.cpp, gauntlet.cpp: Modernization - Use generic latch devices for sound communications - More accurate handling of programmed sound resets - Add the other LS259 to gauntlet.cpp - Correct watchdog timeouts for all three drivers - General code cleanup atarigen: Eliminate ATARI_CLOCK_xxxMHz macros in favor of standard XTAL constants (nw) atariscom: Separate source file from atarigen.cpp; move IRQ handling to atarijsa (not a property of the actual device) (nw) --- scripts/target/mame/arcade.lua | 2 + src/mame/audio/atarijsa.cpp | 88 ++++++++- src/mame/audio/atarijsa.h | 15 +- src/mame/audio/atarisac.cpp | 6 +- src/mame/drivers/atarig1.cpp | 6 +- src/mame/drivers/atarig42.cpp | 6 +- src/mame/drivers/atarigt.cpp | 6 +- src/mame/drivers/atarigx2.cpp | 6 +- src/mame/drivers/atarisy1.cpp | 230 +++++++++++----------- src/mame/drivers/atarisy2.cpp | 343 +++++++++++++++++---------------- src/mame/drivers/batman.cpp | 4 +- src/mame/drivers/beathead.cpp | 2 +- src/mame/drivers/blstroid.cpp | 4 +- src/mame/drivers/cyberbal.cpp | 12 +- src/mame/drivers/cybstorm.cpp | 4 +- src/mame/drivers/eprom.cpp | 18 +- src/mame/drivers/gauntlet.cpp | 129 ++++++------- src/mame/drivers/offtwall.cpp | 4 +- src/mame/drivers/skullxbo.cpp | 4 +- src/mame/drivers/thunderj.cpp | 6 +- src/mame/drivers/vindictr.cpp | 4 +- src/mame/drivers/xybots.cpp | 4 +- src/mame/includes/atarisy1.h | 78 ++++---- src/mame/includes/atarisy2.h | 57 +++--- src/mame/includes/gauntlet.h | 21 +- src/mame/includes/harddriv.h | 1 + src/mame/includes/skullxbo.h | 4 + src/mame/machine/atarigen.cpp | 299 ---------------------------- src/mame/machine/atarigen.h | 103 ---------- src/mame/machine/atariscom.cpp | 234 ++++++++++++++++++++++ src/mame/machine/atariscom.h | 95 +++++++++ src/mame/video/atarisy1.cpp | 61 +++--- src/mame/video/atarisy2.cpp | 18 +- 33 files changed, 963 insertions(+), 911 deletions(-) create mode 100644 src/mame/machine/atariscom.cpp create mode 100644 src/mame/machine/atariscom.h diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua index 0abd77d0707..c74ed10efe3 100644 --- a/scripts/target/mame/arcade.lua +++ b/scripts/target/mame/arcade.lua @@ -1358,6 +1358,8 @@ files { MAME_DIR .. "src/mame/machine/asic65.h", MAME_DIR .. "src/mame/machine/atarigen.cpp", MAME_DIR .. "src/mame/machine/atarigen.h", + MAME_DIR .. "src/mame/machine/atariscom.cpp", + MAME_DIR .. "src/mame/machine/atariscom.h", MAME_DIR .. "src/mame/machine/mathbox.cpp", MAME_DIR .. "src/mame/machine/mathbox.h", MAME_DIR .. "src/mame/machine/slapstic.cpp", diff --git a/src/mame/audio/atarijsa.cpp b/src/mame/audio/atarijsa.cpp index 3547592763b..228e5725292 100644 --- a/src/mame/audio/atarijsa.cpp +++ b/src/mame/audio/atarijsa.cpp @@ -102,7 +102,7 @@ void atari_jsa_i_device::atarijsa1_map(address_map &map) map(0x2800, 0x2800).mirror(0x01f9); // N/C map(0x2802, 0x2802).mirror(0x01f9).r(m_soundcomm, FUNC(atari_sound_comm_device::sound_command_r)); // /RDP map(0x2804, 0x2804).mirror(0x01f9).r(FUNC(atari_jsa_i_device::rdio_r)); // /RDIO - map(0x2806, 0x2806).mirror(0x01f9).rw(m_soundcomm, FUNC(atari_sound_comm_device::sound_irq_ack_r), FUNC(atari_sound_comm_device::sound_irq_ack_w)); // R/W=/IRQACK + map(0x2806, 0x2806).mirror(0x01f9).rw(FUNC(atari_jsa_i_device::sound_irq_ack_r), FUNC(atari_jsa_i_device::sound_irq_ack_w)); // R/W=/IRQACK map(0x2a00, 0x2a00).mirror(0x01f9).w(FUNC(atari_jsa_i_device::tms5220_voice)); // /VOICE map(0x2a02, 0x2a02).mirror(0x01f9).w(m_soundcomm, FUNC(atari_sound_comm_device::sound_response_w)); // /WRP map(0x2a04, 0x2a04).mirror(0x01f9).w(FUNC(atari_jsa_i_device::wrio_w)); // /WRIO @@ -120,7 +120,7 @@ void atari_jsa_ii_device::atarijsa2_map(address_map &map) map(0x2800, 0x2800).mirror(0x01f9).r(FUNC(atari_jsa_ii_device::oki_r)); // /RDV map(0x2802, 0x2802).mirror(0x01f9).r(m_soundcomm, FUNC(atari_sound_comm_device::sound_command_r)); // /RDP map(0x2804, 0x2804).mirror(0x01f9).r(FUNC(atari_jsa_ii_device::rdio_r)); // /RDIO - map(0x2806, 0x2806).mirror(0x01f9).rw(m_soundcomm, FUNC(atari_sound_comm_device::sound_irq_ack_r), FUNC(atari_sound_comm_device::sound_irq_ack_w)); // R/W=/IRQACK + map(0x2806, 0x2806).mirror(0x01f9).rw(FUNC(atari_jsa_ii_device::sound_irq_ack_r), FUNC(atari_jsa_ii_device::sound_irq_ack_w)); // R/W=/IRQACK map(0x2a00, 0x2a00).mirror(0x01f9).w(FUNC(atari_jsa_ii_device::oki_w)); // /WRV map(0x2a02, 0x2a02).mirror(0x01f9).w(m_soundcomm, FUNC(atari_sound_comm_device::sound_response_w)); // /WRP map(0x2a04, 0x2a04).mirror(0x01f9).w(FUNC(atari_jsa_ii_device::wrio_w)); // /WRIO @@ -138,7 +138,7 @@ void atari_jsa_iii_device::atarijsa3_map(address_map &map) map(0x2800, 0x2801).mirror(0x05f8).rw(FUNC(atari_jsa_iii_device::oki_r), FUNC(atari_jsa_iii_device::overall_volume_w)); // /RDV map(0x2802, 0x2802).mirror(0x05f9).r(m_soundcomm, FUNC(atari_sound_comm_device::sound_command_r)); // /RDP map(0x2804, 0x2804).mirror(0x05f9).r(FUNC(atari_jsa_iii_device::rdio_r)); // /RDIO - map(0x2806, 0x2806).mirror(0x05f9).rw(m_soundcomm, FUNC(atari_sound_comm_device::sound_irq_ack_r), FUNC(atari_sound_comm_device::sound_irq_ack_w)); // R/W=/IRQACK + map(0x2806, 0x2806).mirror(0x05f9).rw(FUNC(atari_jsa_iii_device::sound_irq_ack_r), FUNC(atari_jsa_iii_device::sound_irq_ack_w)); // R/W=/IRQACK map(0x2a00, 0x2a01).mirror(0x05f8).w(FUNC(atari_jsa_iii_device::oki_w)); // /WRV map(0x2a02, 0x2a02).mirror(0x05f9).w(m_soundcomm, FUNC(atari_sound_comm_device::sound_response_w)); // /WRP map(0x2a04, 0x2a04).mirror(0x05f9).w(FUNC(atari_jsa_iii_device::wrio_w)); // /WRIO @@ -222,6 +222,8 @@ atari_jsa_base_device::atari_jsa_base_device(const machine_config &mconfig, devi m_cpu_bank(*this, "cpubank"), m_test_read_cb(*this), m_main_int_cb(*this), + m_timed_int(false), + m_ym2151_int(false), m_ym2151_volume(1.0), m_ym2151_ct1(0), m_ym2151_ct2(0) @@ -243,6 +245,8 @@ void atari_jsa_base_device::device_start() m_main_int_cb.resolve_safe(); // save states + save_item(NAME(m_timed_int)); + save_item(NAME(m_ym2151_int)); save_item(NAME(m_ym2151_volume)); save_item(NAME(m_ym2151_ct1)); save_item(NAME(m_ym2151_ct2)); @@ -324,12 +328,76 @@ READ_LINE_MEMBER(atari_jsa_base_device::main_test_read_line) // from the comm device to the owning callback //------------------------------------------------- -WRITE_LINE_MEMBER( atari_jsa_base_device::main_int_write_line ) +WRITE_LINE_MEMBER(atari_jsa_base_device::main_int_write_line) { m_main_int_cb(state); } +//------------------------------------------------- +// sound_irq_gen: Generates an IRQ signal to the +// 6502 sound processor. +//------------------------------------------------- + +INTERRUPT_GEN_MEMBER(atari_jsa_base_device::sound_irq_gen) +{ + m_timed_int = 1; + update_sound_irq(); +} + + +//------------------------------------------------- +// sound_irq_ack_r: Resets the IRQ signal to the +// 6502 sound processor. Both reads and writes +// can be used. +//------------------------------------------------- + +u8 atari_jsa_base_device::sound_irq_ack_r() +{ + if (!machine().side_effects_disabled()) + { + m_timed_int = 0; + update_sound_irq(); + } + return 0; +} + +void atari_jsa_base_device::sound_irq_ack_w(u8 data) +{ + m_timed_int = 0; + update_sound_irq(); +} + + +//------------------------------------------------- +// ym2151_irq_gen: Sets the state of the +// YM2151's IRQ line. +//------------------------------------------------- + +WRITE_LINE_MEMBER(atari_jsa_base_device::ym2151_irq_gen) +{ + m_ym2151_int = state; + update_sound_irq(); +} + + +//------------------------------------------------- +// update_sound_irq: Called whenever the IRQ state +// changes. An interrupt is generated if either +// sound_irq_gen() was called, or if the YM2151 +// generated an interrupt via the +// ym2151_irq_gen() callback. +//------------------------------------------------- + +void atari_jsa_base_device::update_sound_irq() +{ + if (m_timed_int || m_ym2151_int) + m_jsacpu->set_input_line(m6502_device::IRQ_LINE, ASSERT_LINE); + else + m_jsacpu->set_input_line(m6502_device::IRQ_LINE, CLEAR_LINE); +} + + //************************************************************************** // BASE DEVICE CLASS FOR OKI6295-BASED VERSIONS @@ -703,14 +771,14 @@ void atari_jsa_i_device::device_add_mconfig(machine_config &config) // basic machine hardware M6502(config, m_jsacpu, JSA_MASTER_CLOCK/2); m_jsacpu->set_addrmap(AS_PROGRAM, &atari_jsa_i_device::atarijsa1_map); - m_jsacpu->set_periodic_int("soundcomm", FUNC(atari_sound_comm_device::sound_irq_gen), attotime::from_hz(JSA_MASTER_CLOCK/4/16/16/14)); + m_jsacpu->set_periodic_int(FUNC(atari_jsa_i_device::sound_irq_gen), attotime::from_hz(JSA_MASTER_CLOCK/4/16/16/14)); // sound hardware ATARI_SOUND_COMM(config, m_soundcomm, m_jsacpu) .int_callback().set(FUNC(atari_jsa_base_device::main_int_write_line)); YM2151(config, m_ym2151, JSA_MASTER_CLOCK); - m_ym2151->irq_handler().set(m_soundcomm, FUNC(atari_sound_comm_device::ym2151_irq_gen)); + m_ym2151->irq_handler().set(FUNC(atari_jsa_i_device::ym2151_irq_gen)); m_ym2151->port_write_handler().set(FUNC(atari_jsa_base_device::ym2151_port_w)); m_ym2151->add_route(0, *this, 0.60, AUTO_ALLOC_INPUT, 0); m_ym2151->add_route(1, *this, 0.60, AUTO_ALLOC_INPUT, 1); @@ -834,14 +902,14 @@ void atari_jsa_ii_device::device_add_mconfig(machine_config &config) // basic machine hardware M6502(config, m_jsacpu, JSA_MASTER_CLOCK/2); m_jsacpu->set_addrmap(AS_PROGRAM, &atari_jsa_ii_device::atarijsa2_map); - m_jsacpu->set_periodic_int("soundcomm", FUNC(atari_sound_comm_device::sound_irq_gen), attotime::from_hz(JSA_MASTER_CLOCK/4/16/16/14)); + m_jsacpu->set_periodic_int(FUNC(atari_jsa_ii_device::sound_irq_gen), attotime::from_hz(JSA_MASTER_CLOCK/4/16/16/14)); // sound hardware ATARI_SOUND_COMM(config, m_soundcomm, m_jsacpu) .int_callback().set(FUNC(atari_jsa_base_device::main_int_write_line)); YM2151(config, m_ym2151, JSA_MASTER_CLOCK); - m_ym2151->irq_handler().set(m_soundcomm, FUNC(atari_sound_comm_device::ym2151_irq_gen)); + m_ym2151->irq_handler().set(FUNC(atari_jsa_ii_device::ym2151_irq_gen)); m_ym2151->port_write_handler().set(FUNC(atari_jsa_base_device::ym2151_port_w)); m_ym2151->add_route(ALL_OUTPUTS, *this, 0.60, AUTO_ALLOC_INPUT, 0); @@ -917,14 +985,14 @@ void atari_jsa_iii_device::device_add_mconfig(machine_config &config) // basic machine hardware M6502(config, m_jsacpu, JSA_MASTER_CLOCK/2); m_jsacpu->set_addrmap(AS_PROGRAM, &atari_jsa_iii_device::atarijsa3_map); - m_jsacpu->set_periodic_int("soundcomm", FUNC(atari_sound_comm_device::sound_irq_gen), attotime::from_hz(JSA_MASTER_CLOCK/4/16/16/14)); + m_jsacpu->set_periodic_int(FUNC(atari_jsa_iii_device::sound_irq_gen), attotime::from_hz(JSA_MASTER_CLOCK/4/16/16/14)); // sound hardware ATARI_SOUND_COMM(config, m_soundcomm, m_jsacpu) .int_callback().set(FUNC(atari_jsa_base_device::main_int_write_line)); YM2151(config, m_ym2151, JSA_MASTER_CLOCK); - m_ym2151->irq_handler().set(m_soundcomm, FUNC(atari_sound_comm_device::ym2151_irq_gen)); + m_ym2151->irq_handler().set(FUNC(atari_jsa_iii_device::ym2151_irq_gen)); m_ym2151->port_write_handler().set(FUNC(atari_jsa_base_device::ym2151_port_w)); m_ym2151->add_route(ALL_OUTPUTS, *this, 0.60, AUTO_ALLOC_INPUT, 0); diff --git a/src/mame/audio/atarijsa.h b/src/mame/audio/atarijsa.h index 35ef08d9088..47f4fd411be 100644 --- a/src/mame/audio/atarijsa.h +++ b/src/mame/audio/atarijsa.h @@ -18,7 +18,7 @@ #include "sound/ym2151.h" #include "sound/okim6295.h" #include "sound/pokey.h" -#include "machine/atarigen.h" +#include "machine/atariscom.h" //************************************************************************** @@ -78,6 +78,12 @@ public: // I/O lines DECLARE_WRITE_LINE_MEMBER(main_int_write_line); + // 6502 interrupt handlers + INTERRUPT_GEN_MEMBER(sound_irq_gen); + void sound_irq_ack_w(u8 data = 0); + u8 sound_irq_ack_r(); + DECLARE_WRITE_LINE_MEMBER(ym2151_irq_gen); + protected: // device-level overrides virtual void device_start() override; @@ -85,6 +91,7 @@ protected: // internal helpers virtual void update_all_volumes() = 0; + void update_sound_irq(); // devices required_device m_soundcomm; @@ -102,9 +109,11 @@ protected: devcb_write_line m_main_int_cb; // internal state + bool m_timed_int; + bool m_ym2151_int; double m_ym2151_volume; - uint8_t m_ym2151_ct1; - uint8_t m_ym2151_ct2; + uint8_t m_ym2151_ct1; + uint8_t m_ym2151_ct2; }; diff --git a/src/mame/audio/atarisac.cpp b/src/mame/audio/atarisac.cpp index b217914dde4..3dd58e2602c 100644 --- a/src/mame/audio/atarisac.cpp +++ b/src/mame/audio/atarisac.cpp @@ -38,7 +38,7 @@ void atari_sac_device::sac_6502_map(address_map &map) map(0x0000, 0x1fff).ram(); map(0x2000, 0x2001).mirror(0x7fe).rw(m_ym2151, FUNC(ym2151_device::read), FUNC(ym2151_device::write)); map(0x2800, 0x2800).mirror(0x3f9).w(m_datin, FUNC(generic_latch_8_device::write)); - map(0x2802, 0x2802).mirror(0x3f9).rw(m_soundcomm, FUNC(atari_sound_comm_device::sound_irq_ack_r), FUNC(atari_sound_comm_device::sound_irq_ack_w)); + map(0x2802, 0x2802).mirror(0x3f9).rw(FUNC(atari_sac_device::sound_irq_ack_r), FUNC(atari_sac_device::sound_irq_ack_w)); map(0x2804, 0x2804).mirror(0x3f9).w(m_soundcomm, FUNC(atari_sound_comm_device::sound_response_w)); map(0x2806, 0x2806).mirror(0x3f9).w(FUNC(atari_sac_device::wrio_w)); map(0x2c00, 0x2c00).mirror(0x3f9).r(m_soundcomm, FUNC(atari_sound_comm_device::sound_command_r)); @@ -246,7 +246,7 @@ void atari_sac_device::device_add_mconfig(machine_config &config) // basic machine hardware M6502(config, m_jsacpu, 14.318181_MHz_XTAL/8); m_jsacpu->set_addrmap(AS_PROGRAM, &atari_sac_device::sac_6502_map); - m_jsacpu->set_periodic_int("soundcomm", FUNC(atari_sound_comm_device::sound_irq_gen), attotime::from_hz(14.318181_MHz_XTAL/4/4/16/16/14)); + m_jsacpu->set_periodic_int(FUNC(atari_sac_device::sound_irq_gen), attotime::from_hz(14.318181_MHz_XTAL/4/4/16/16/14)); M68000(config, m_daccpu, 14.318181_MHz_XTAL/2); m_daccpu->set_addrmap(AS_PROGRAM, &atari_sac_device::sac_68k_map); @@ -264,7 +264,7 @@ void atari_sac_device::device_add_mconfig(machine_config &config) .int_callback().set(FUNC(atari_sac_device::main_int_write_line)); YM2151(config, m_ym2151, 14.318181_MHz_XTAL/4); - m_ym2151->irq_handler().set(m_soundcomm, FUNC(atari_sound_comm_device::ym2151_irq_gen)); + m_ym2151->irq_handler().set(FUNC(atari_sac_device::ym2151_irq_gen)); m_ym2151->port_write_handler().set(FUNC(atari_sac_device::ym2151_port_w)); m_ym2151->add_route(0, *this, 0.60, AUTO_ALLOC_INPUT, 0); m_ym2151->add_route(1, *this, 0.60, AUTO_ALLOC_INPUT, 1); diff --git a/src/mame/drivers/atarig1.cpp b/src/mame/drivers/atarig1.cpp index ddfd20bda65..1ca0d6d3a92 100644 --- a/src/mame/drivers/atarig1.cpp +++ b/src/mame/drivers/atarig1.cpp @@ -388,7 +388,7 @@ static const atari_rle_objects_config modesc_pitfight = void atarig1_state::atarig1(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, ATARI_CLOCK_14MHz); + M68000(config, m_maincpu, 14.318181_MHz_XTAL); m_maincpu->set_addrmap(AS_PROGRAM, &atarig1_state::main_map); EEPROM_2816(config, "eeprom").lock_after_write(true); @@ -408,7 +408,7 @@ void atarig1_state::atarig1(machine_config &config) SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK); /* note: these parameters are from published specs, not derived */ - m_screen->set_raw(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240); + m_screen->set_raw(14.318181_MHz_XTAL/2, 456, 0, 336, 262, 0, 240); m_screen->set_screen_update(FUNC(atarig1_state::screen_update_atarig1)); m_screen->set_palette("palette"); m_screen->screen_vblank().set_inputline(m_maincpu, M68K_IRQ_1, ASSERT_LINE); @@ -429,7 +429,7 @@ void atarig1_state::hydrap(machine_config &config) { atarig1(config); - ADC0809(config, m_adc, ATARI_CLOCK_14MHz/16); + ADC0809(config, m_adc, 14.318181_MHz_XTAL/16); m_adc->in_callback<0>().set_ioport("ADC0"); m_adc->in_callback<1>().set_ioport("ADC1"); m_adc->in_callback<2>().set_ioport("ADC2"); diff --git a/src/mame/drivers/atarig42.cpp b/src/mame/drivers/atarig42.cpp index 9b772160c9c..876501e6ddb 100644 --- a/src/mame/drivers/atarig42.cpp +++ b/src/mame/drivers/atarig42.cpp @@ -513,7 +513,7 @@ static const atari_rle_objects_config modesc_0x400 = void atarig42_state::atarig42(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, ATARI_CLOCK_14MHz); + M68000(config, m_maincpu, 14.318181_MHz_XTAL); m_maincpu->set_addrmap(AS_PROGRAM, &atarig42_state::main_map); TIMER(config, "scantimer").configure_scanline(FUNC(atarig42_state::scanline_update), m_screen, 0, 8); @@ -535,7 +535,7 @@ void atarig42_state::atarig42(machine_config &config) m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK); /* note: these parameters are from published specs, not derived */ /* the board uses an SOS chip to generate video signals */ - m_screen->set_raw(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240); + m_screen->set_raw(14.318181_MHz_XTAL/2, 456, 0, 336, 262, 0, 240); m_screen->set_screen_update(FUNC(atarig42_state::screen_update_atarig42)); m_screen->set_palette("palette"); m_screen->screen_vblank().set_inputline(m_maincpu, M68K_IRQ_4, ASSERT_LINE); @@ -556,7 +556,7 @@ void atarig42_0x200_state::atarig42_0x200(machine_config &config) atarig42(config); ATARI_RLE_OBJECTS(config, m_rle, 0, modesc_0x200); - ADC0809(config, m_adc, ATARI_CLOCK_14MHz / 16); + ADC0809(config, m_adc, 14.318181_MHz_XTAL / 16); m_adc->in_callback<0>().set_ioport("A2D0"); m_adc->in_callback<1>().set_ioport("A2D1"); diff --git a/src/mame/drivers/atarigt.cpp b/src/mame/drivers/atarigt.cpp index 5a482216913..91d4f8a0ce7 100644 --- a/src/mame/drivers/atarigt.cpp +++ b/src/mame/drivers/atarigt.cpp @@ -833,7 +833,7 @@ static const atari_rle_objects_config modesc = void atarigt_state::atarigt(machine_config &config) { /* basic machine hardware */ - M68EC020(config, m_maincpu, ATARI_CLOCK_50MHz/2); + M68EC020(config, m_maincpu, 50_MHz_XTAL/2); m_maincpu->set_addrmap(AS_PROGRAM, &atarigt_state::main_map); m_maincpu->set_periodic_int(FUNC(atarigt_state::scanline_int_gen), attotime::from_hz(250)); @@ -854,7 +854,7 @@ void atarigt_state::atarigt(machine_config &config) m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK); /* note: these parameters are from published specs, not derived */ /* the board uses a pair of GALs to determine H and V parameters */ - m_screen->set_raw(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240); + m_screen->set_raw(14.318181_MHz_XTAL/2, 456, 0, 336, 262, 0, 240); m_screen->set_screen_update(FUNC(atarigt_state::screen_update_atarigt)); m_screen->screen_vblank().set(FUNC(atarigt_state::video_int_write_line)); @@ -871,7 +871,7 @@ void atarigt_state::tmek(machine_config &config) { atarigt(config); - ADC0809(config, m_adc, ATARI_CLOCK_14MHz/16); // should be 447 kHz according to schematics, but that fails the self-test + ADC0809(config, m_adc, 14.318181_MHz_XTAL/16); // should be 447 kHz according to schematics, but that fails the self-test m_adc->in_callback<2>().set_ioport("AN4"); m_adc->in_callback<3>().set_ioport("AN1"); m_adc->in_callback<6>().set_ioport("AN2"); diff --git a/src/mame/drivers/atarigx2.cpp b/src/mame/drivers/atarigx2.cpp index 2ed0ba0201a..bce0c440ccf 100644 --- a/src/mame/drivers/atarigx2.cpp +++ b/src/mame/drivers/atarigx2.cpp @@ -1485,12 +1485,12 @@ static const atari_rle_objects_config modesc_0x400 = void atarigx2_state::atarigx2(machine_config &config) { /* basic machine hardware */ - M68EC020(config, m_maincpu, ATARI_CLOCK_14MHz); + M68EC020(config, m_maincpu, 14.318181_MHz_XTAL); m_maincpu->set_addrmap(AS_PROGRAM, &atarigx2_state::main_map); TIMER(config, "scantimer").configure_scanline(FUNC(atarigx2_state::scanline_update), m_screen, 0, 8); - ADC0809(config, m_adc, ATARI_CLOCK_14MHz/16); + ADC0809(config, m_adc, 14.318181_MHz_XTAL/16); m_adc->in_callback<0>().set_ioport("A2D0"); m_adc->in_callback<1>().set_ioport("A2D1"); m_adc->in_callback<2>().set_ioport("A2D2"); @@ -1515,7 +1515,7 @@ void atarigx2_state::atarigx2(machine_config &config) m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK); /* note: these parameters are from published specs, not derived */ /* the board uses a pair of GALs to determine H and V parameters */ - m_screen->set_raw(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240); + m_screen->set_raw(14.318181_MHz_XTAL/2, 456, 0, 336, 262, 0, 240); m_screen->set_screen_update(FUNC(atarigx2_state::screen_update_atarigx2)); m_screen->set_palette("palette"); m_screen->screen_vblank().set_inputline(m_maincpu, M68K_IRQ_4, ASSERT_LINE); diff --git a/src/mame/drivers/atarisy1.cpp b/src/mame/drivers/atarisy1.cpp index 2bc47b54c0d..668fb3c689f 100644 --- a/src/mame/drivers/atarisy1.cpp +++ b/src/mame/drivers/atarisy1.cpp @@ -194,7 +194,6 @@ RoadBlasters (aka Future Vette):005* #include "includes/atarisy1.h" #include "cpu/m68000/m68000.h" #include "cpu/m6502/m6502.h" -#include "machine/6522via.h" #include "machine/eeprompar.h" #include "machine/watchdog.h" #include "sound/pokey.h" @@ -210,22 +209,24 @@ RoadBlasters (aka Future Vette):005* * *************************************/ -void atarisy1_state::video_int_ack_w(uint16_t data) +void atarisy1_state::video_int_ack_w(uint8_t data) { m_maincpu->set_input_line(M68K_IRQ_4, CLEAR_LINE); } -MACHINE_START_MEMBER(atarisy1_state,atarisy1) +void atarisy1_state::machine_start() { atarigen_state::machine_start(); } -MACHINE_RESET_MEMBER(atarisy1_state,atarisy1) +void atarisy1_state::machine_reset() { atarigen_state::machine_reset(); + bankselect_w(0); + if (m_adc.found()) m_ajsint->in_w<0>(0); } @@ -238,13 +239,13 @@ MACHINE_RESET_MEMBER(atarisy1_state,atarisy1) *************************************/ template -READ8_MEMBER(atarisy1_state::digital_joystick_r) +uint8_t atarisy1_state::digital_joystick_r() { return BIT(ioport("IN0")->read(), 7 - Input) ? 0xf0 : 0x00; } -READ8_MEMBER(atarisy1_state::adc_r) +uint8_t atarisy1_state::adc_r(offs_t offset) { if (!m_adc.found()) return 0xff; @@ -252,13 +253,13 @@ READ8_MEMBER(atarisy1_state::adc_r) int value = m_adc->data_r(); if (!machine().side_effects_disabled()) - adc_w(space, offset, 0); + adc_w(offset, 0); return value; } -WRITE8_MEMBER(atarisy1_state::adc_w) +void atarisy1_state::adc_w(offs_t offset, uint8_t data) { if (!m_adc.found()) return; @@ -277,7 +278,7 @@ WRITE8_MEMBER(atarisy1_state::adc_w) * *************************************/ -READ16_MEMBER(atarisy1_state::trakball_r) +uint16_t atarisy1_state::trakball_r(offs_t offset) { int result = 0xff; @@ -325,7 +326,7 @@ READ16_MEMBER(atarisy1_state::trakball_r) * *************************************/ -READ8_MEMBER(atarisy1_state::switch_6502_r) +uint8_t atarisy1_state::switch_6502_r() { int temp = ioport("1820")->read(); if (!(ioport("F60000")->read() & 0x0040)) temp ^= 0x80; @@ -355,33 +356,21 @@ READ8_MEMBER(atarisy1_state::switch_6502_r) * D5 = LED (out) */ -WRITE8_MEMBER(atarisy1_state::via_pa_w) +void atarisy1_state::via_pb_w(uint8_t data) { - m_tms->data_w(data); -} - - -READ8_MEMBER(atarisy1_state::via_pa_r) -{ - return m_tms->status_r(); -} - - -WRITE8_MEMBER(atarisy1_state::via_pb_w) -{ - /* write strobe */ + // write strobe m_tms->wsq_w(data & 1); - /* read strobe */ + // read strobe m_tms->rsq_w((data & 2)>>1); - /* bit 4 is connected to an up-counter, clocked by SYCLKB */ + // bit 4 is connected to an up-counter, clocked by SYCLKB data = 5 | ((data >> 3) & 2); - m_tms->set_unscaled_clock(ATARI_CLOCK_14MHz/2 / (16 - data)); + m_tms->set_unscaled_clock(14.318181_MHz_XTAL/2 / (16 - data)); } -READ8_MEMBER(atarisy1_state::via_pb_r) +uint8_t atarisy1_state::via_pb_r() { return (m_tms->readyq_r() << 2) | (m_tms->intq_r() << 3); } @@ -416,16 +405,16 @@ WRITE_LINE_MEMBER(atarisy1_state::coin_counter_left_w) void atarisy1_state::main_map(address_map &map) { map(0x000000, 0x07ffff).rom(); - map(0x080000, 0x087fff).rom(); /* slapstic maps here */ + map(0x080000, 0x087fff).rom(); // slapstic maps here map(0x2e0000, 0x2e0001).r(FUNC(atarisy1_state::atarisy1_int3state_r)); map(0x400000, 0x401fff).ram(); map(0x800000, 0x800001).w(FUNC(atarisy1_state::atarisy1_xscroll_w)).share("xscroll"); map(0x820000, 0x820001).w(FUNC(atarisy1_state::atarisy1_yscroll_w)).share("yscroll"); map(0x840000, 0x840001).w(FUNC(atarisy1_state::atarisy1_priority_w)); - map(0x860000, 0x860001).w(FUNC(atarisy1_state::atarisy1_bankselect_w)).share("bankselect"); - map(0x880000, 0x880001).w("watchdog", FUNC(watchdog_timer_device::reset16_w)); - map(0x8a0000, 0x8a0001).w(FUNC(atarisy1_state::video_int_ack_w)); - map(0x8c0000, 0x8c0001).w("eeprom", FUNC(eeprom_parallel_28xx_device::unlock_write16)); + map(0x860001, 0x860001).w(FUNC(atarisy1_state::bankselect_w)); + map(0x880001, 0x880001).w("watchdog", FUNC(watchdog_timer_device::reset_w)); + map(0x8a0001, 0x8a0001).w(FUNC(atarisy1_state::video_int_ack_w)); + map(0x8c0001, 0x8c0001).w("eeprom", FUNC(eeprom_parallel_28xx_device::unlock_write8)); map(0x900000, 0x9fffff).ram(); map(0xa00000, 0xa01fff).ram().w(m_playfield_tilemap, FUNC(tilemap_device::write16)).share("playfield"); map(0xa02000, 0xa02fff).ram().w(FUNC(atarisy1_state::atarisy1_spriteram_w)).share("mob"); @@ -435,9 +424,9 @@ void atarisy1_state::main_map(address_map &map) map(0xf20000, 0xf20007).r(FUNC(atarisy1_state::trakball_r)); map(0xf40000, 0xf4001f).rw(FUNC(atarisy1_state::adc_r), FUNC(atarisy1_state::adc_w)).umask16(0x00ff); map(0xf60000, 0xf60003).portr("F60000"); - map(0xf80001, 0xf80001).w(m_soundcomm, FUNC(atari_sound_comm_device::main_command_w)); /* used by roadbls2 */ - map(0xfc0001, 0xfc0001).r(m_soundcomm, FUNC(atari_sound_comm_device::main_response_r)); - map(0xfe0001, 0xfe0001).w(m_soundcomm, FUNC(atari_sound_comm_device::main_command_w)); + map(0xf80001, 0xf80001).w(m_soundlatch, FUNC(generic_latch_8_device::write)); // used by roadbls2 + map(0xfc0001, 0xfc0001).r(m_mainlatch, FUNC(generic_latch_8_device::read)); + map(0xfe0001, 0xfe0001).w(m_soundlatch, FUNC(generic_latch_8_device::write)); } @@ -450,13 +439,14 @@ void atarisy1_state::main_map(address_map &map) void atarisy1_state::sound_map(address_map &map) { - map(0x0000, 0x0fff).ram(); - map(0x1000, 0x100f).m("via6522_0", FUNC(via6522_device::map)); - map(0x1800, 0x1801).rw("ymsnd", FUNC(ym2151_device::read), FUNC(ym2151_device::write)); - map(0x1810, 0x1810).rw(m_soundcomm, FUNC(atari_sound_comm_device::sound_command_r), FUNC(atari_sound_comm_device::sound_response_w)); - map(0x1820, 0x1820).r(FUNC(atarisy1_state::switch_6502_r)); - map(0x1820, 0x1827).w(m_outlatch, FUNC(ls259_device::write_d0)); - map(0x1870, 0x187f).rw("pokey", FUNC(pokey_device::read), FUNC(pokey_device::write)); + map(0x0000, 0x0fff).mirror(0x2000).ram(); + map(0x1000, 0x100f).mirror(0x27f0).m(m_via, FUNC(via6522_device::map)); // SNDEXT + map(0x1800, 0x1801).mirror(0x278e).rw("ymsnd", FUNC(ym2151_device::read), FUNC(ym2151_device::write)); + map(0x1810, 0x1810).mirror(0x278f).r(m_soundlatch, FUNC(generic_latch_8_device::read)); + map(0x1810, 0x1810).mirror(0x278f).w(m_mainlatch, FUNC(generic_latch_8_device::write)); + map(0x1820, 0x1820).mirror(0x278f).r(FUNC(atarisy1_state::switch_6502_r)); + map(0x1820, 0x1827).mirror(0x2788).w(m_outlatch, FUNC(ls259_device::write_d0)); + map(0x1870, 0x187f).mirror(0x2780).rw("pokey", FUNC(pokey_device::read), FUNC(pokey_device::write)); map(0x4000, 0xffff).rom(); } @@ -469,19 +459,19 @@ void atarisy1_state::sound_map(address_map &map) *************************************/ static INPUT_PORTS_START( marble ) - PORT_START("IN0") /* F20000 */ + PORT_START("IN0") // F20000 PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) PORT_REVERSE PORT_PLAYER(1) - PORT_START("IN1") /* F20002 */ + PORT_START("IN1") // F20002 PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) PORT_PLAYER(1) - PORT_START("IN2") /* F20004 */ + PORT_START("IN2") // F20004 PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) PORT_REVERSE PORT_PLAYER(2) - PORT_START("IN3") /* F20006 */ + PORT_START("IN3") // F20006 PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) PORT_PLAYER(2) - PORT_START("F60000") /* F60000 */ + PORT_START("F60000") // F60000 PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_START2 ) PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -489,38 +479,38 @@ static INPUT_PORTS_START( marble ) PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_SERVICE( 0x0040, IP_ACTIVE_LOW ) - PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_ATARI_COMM_MAIN_TO_SOUND_READY("soundcomm") + PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("soundlatch", generic_latch_8_device, pending_r) // 68KBUF PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("1820") /* 1820 (sound) */ + PORT_START("1820") // 1820 (sound) PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_ATARI_COMM_MAIN_TO_SOUND_READY("soundcomm") - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_ATARI_COMM_SOUND_TO_MAIN_READY("soundcomm") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("soundlatch", generic_latch_8_device, pending_r) // 68KBUF + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("mainlatch", generic_latch_8_device, pending_r) // SNDBUF PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) INPUT_PORTS_END static INPUT_PORTS_START( peterpak ) - PORT_START("IN0") /* F40000 */ + PORT_START("IN0") // F40000 PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) - PORT_START("IN1") /* n/a */ + PORT_START("IN1") // n/a PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_START("IN2") /* n/a */ + PORT_START("IN2") // n/a PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_START("IN3") /* n/a */ + PORT_START("IN3") // n/a PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_START("F60000") /* F60000 */ + PORT_START("F60000") // F60000 PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Left Throw/P1 Start") PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_START2 ) PORT_NAME("Right Throw/P2 Start") PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Jump") @@ -528,54 +518,54 @@ static INPUT_PORTS_START( peterpak ) PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_SERVICE( 0x0040, IP_ACTIVE_LOW ) - PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_ATARI_COMM_MAIN_TO_SOUND_READY("soundcomm") + PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("soundlatch", generic_latch_8_device, pending_r) // 68KBUF PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("1820") /* 1820 (sound) */ + PORT_START("1820") // 1820 (sound) PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_ATARI_COMM_MAIN_TO_SOUND_READY("soundcomm") - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_ATARI_COMM_SOUND_TO_MAIN_READY("soundcomm") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("soundlatch", generic_latch_8_device, pending_r) // 68KBUF + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("mainlatch", generic_latch_8_device, pending_r) // SNDBUF PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) INPUT_PORTS_END static INPUT_PORTS_START( indytemp ) - PORT_START("IN0") /* F40000 */ + PORT_START("IN0") // F40000 PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) - PORT_START("IN1") /* n/a */ + PORT_START("IN1") // n/a PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_START("IN2") /* n/a */ + PORT_START("IN2") // n/a PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_START("IN3") /* n/a */ + PORT_START("IN3") // n/a PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_START("F60000") /* F60000 */ + PORT_START("F60000") // F60000 PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Left Whip/P1 Start") PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_START2 ) PORT_NAME("Right Whip/P2 Start") - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* freeze? */ + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) // freeze? PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_SERVICE( 0x0040, IP_ACTIVE_LOW ) - PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_ATARI_COMM_MAIN_TO_SOUND_READY("soundcomm") + PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("soundlatch", generic_latch_8_device, pending_r) // 68KBUF PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("1820") /* 1820 (sound) */ + PORT_START("1820") // 1820 (sound) PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_ATARI_COMM_MAIN_TO_SOUND_READY("soundcomm") - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_ATARI_COMM_SOUND_TO_MAIN_READY("soundcomm") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("soundlatch", generic_latch_8_device, pending_r) // 68KBUF + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("mainlatch", generic_latch_8_device, pending_r) // SNDBUF PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) INPUT_PORTS_END @@ -584,7 +574,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( indytemc ) PORT_INCLUDE( indytemp ) - PORT_MODIFY("IN0") /* F40000 */ + PORT_MODIFY("IN0") // F40000 PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) @@ -594,20 +584,20 @@ INPUT_PORTS_END static INPUT_PORTS_START( roadrunn ) - PORT_START("IN0") /* F40000 */ + PORT_START("IN0") // F40000 PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1) - PORT_START("IN1") /* F40002 */ + PORT_START("IN1") // F40002 PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE PORT_PLAYER(1) - PORT_START("IN2") /* n/a */ + PORT_START("IN2") // n/a PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("IN3") /* n/a */ + PORT_START("IN3") // n/a PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("F60000") /* F60000 */ - /* Note that "P1 Button 1' and 'P2 Start' both act as "Hop' Buttons" in game" */ + PORT_START("F60000") // F60000 + // Note that "P1 Button 1' and 'P2 Start' both act as "Hop' Buttons" in game" PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Left Hop/P1 Start") PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Right Hop/P2 Start") PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -615,34 +605,34 @@ static INPUT_PORTS_START( roadrunn ) PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_SERVICE( 0x0040, IP_ACTIVE_LOW ) - PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_ATARI_COMM_MAIN_TO_SOUND_READY("soundcomm") + PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("soundlatch", generic_latch_8_device, pending_r) // 68KBUF PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("1820") /* 1820 (sound) */ + PORT_START("1820") // 1820 (sound) PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_ATARI_COMM_MAIN_TO_SOUND_READY("soundcomm") - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_ATARI_COMM_SOUND_TO_MAIN_READY("soundcomm") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("soundlatch", generic_latch_8_device, pending_r) // 68KBUF + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("mainlatch", generic_latch_8_device, pending_r) // SNDBUF PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) INPUT_PORTS_END static INPUT_PORTS_START( roadblst ) - PORT_START("IN0") /* F20000 */ + PORT_START("IN0") // F20000 PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) PORT_REVERSE - PORT_START("IN1") /* F40000 */ + PORT_START("IN1") // F40000 PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(64) - PORT_START("IN2") /* n/a */ + PORT_START("IN2") // n/a PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_START("IN3") /* n/a */ + PORT_START("IN3") // n/a PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_START("F60000") /* F60000 */ + PORT_START("F60000") // F60000 PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Special Weapon") PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Lasers") PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -650,15 +640,15 @@ static INPUT_PORTS_START( roadblst ) PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_SERVICE( 0x0040, IP_ACTIVE_LOW ) - PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_ATARI_COMM_MAIN_TO_SOUND_READY("soundcomm") + PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("soundlatch", generic_latch_8_device, pending_r) // 68KBUF PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("1820") /* 1820 (sound) */ + PORT_START("1820") // 1820 (sound) PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_ATARI_COMM_MAIN_TO_SOUND_READY("soundcomm") - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_ATARI_COMM_SOUND_TO_MAIN_READY("soundcomm") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("soundlatch", generic_latch_8_device, pending_r) // 68KBUF + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("mainlatch", generic_latch_8_device, pending_r) // SNDBUF PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) INPUT_PORTS_END @@ -697,7 +687,7 @@ GFXDECODE_END void atarisy1_state::add_adc(machine_config &config) { - ADC0809(config, m_adc, ATARI_CLOCK_14MHz/16); + ADC0809(config, m_adc, 14.318181_MHz_XTAL/16); m_adc->eoc_callback().set(m_ajsint, FUNC(input_merger_device::in_w<1>)); // IN7 = J102 pin 2 // IN6 = J102 pin 3 @@ -714,16 +704,13 @@ void atarisy1_state::add_adc(machine_config &config) void atarisy1_state::atarisy1(machine_config &config) { - /* basic machine hardware */ - M68010(config, m_maincpu, ATARI_CLOCK_14MHz/2); + // basic machine hardware + M68010(config, m_maincpu, 14.318181_MHz_XTAL/2); m_maincpu->set_addrmap(AS_PROGRAM, &atarisy1_state::main_map); - M6502(config, m_audiocpu, ATARI_CLOCK_14MHz/8); + M6502(config, m_audiocpu, 14.318181_MHz_XTAL/8); m_audiocpu->set_addrmap(AS_PROGRAM, &atarisy1_state::sound_map); - MCFG_MACHINE_START_OVERRIDE(atarisy1_state,atarisy1) - MCFG_MACHINE_RESET_OVERRIDE(atarisy1_state,atarisy1) - EEPROM_2804(config, "eeprom").lock_after_write(true); LS259(config, m_outlatch); // 15H (TTL) or 14F (LSI) @@ -733,13 +720,13 @@ void atarisy1_state::atarisy1(machine_config &config) m_outlatch->q_out_cb<6>().set(FUNC(atarisy1_state::coin_counter_right_w)); m_outlatch->q_out_cb<7>().set(FUNC(atarisy1_state::coin_counter_left_w)); - WATCHDOG_TIMER(config, "watchdog"); + WATCHDOG_TIMER(config, "watchdog").set_vblank_count(m_screen, 8); - TIMER(config, m_scanline_timer).configure_generic(FUNC(atarisy1_state::atarisy1_int3_callback)); - TIMER(config, m_int3off_timer).configure_generic(FUNC(atarisy1_state::atarisy1_int3off_callback)); - TIMER(config, m_yscroll_reset_timer).configure_generic(FUNC(atarisy1_state::atarisy1_reset_yscroll_callback)); + TIMER(config, m_scanline_timer).configure_generic(FUNC(atarisy1_state::int3_callback)); + TIMER(config, m_int3off_timer).configure_generic(FUNC(atarisy1_state::int3off_callback)); + TIMER(config, m_yscroll_reset_timer).configure_generic(FUNC(atarisy1_state::reset_yscroll_callback)); - /* video hardware */ + // video hardware GFXDECODE(config, m_gfxdecode, m_palette, gfx_atarisy1); PALETTE(config, m_palette).set_format(palette_device::IRGB_4444, 1024); @@ -752,40 +739,41 @@ void atarisy1_state::atarisy1(machine_config &config) SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK); - /* note: these parameters are from published specs, not derived */ - /* video timing comes from an 82S163 (H) and an 82S129 (V) */ - m_screen->set_raw(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240); + // note: these parameters are from published specs, not derived + // video timing comes from an 82S163 (H) and an 82S129 (V) + m_screen->set_raw(14.318181_MHz_XTAL/2, 456, 0, 336, 262, 0, 240); m_screen->set_screen_update(FUNC(atarisy1_state::screen_update_atarisy1)); m_screen->set_palette(m_palette); m_screen->screen_vblank().set_inputline(m_maincpu, M68K_IRQ_4, ASSERT_LINE); - MCFG_VIDEO_START_OVERRIDE(atarisy1_state,atarisy1) - - /* sound hardware */ - ATARI_SOUND_COMM(config, "soundcomm", "audiocpu") - .int_callback().set_inputline("maincpu", M68K_IRQ_6); + // sound hardware SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - ym2151_device &ymsnd(YM2151(config, "ymsnd", ATARI_CLOCK_14MHz/4)); - ymsnd.irq_handler().set(m_soundcomm, FUNC(atari_sound_comm_device::ym2151_irq_gen)); + GENERIC_LATCH_8(config, m_soundlatch); + m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, m6502_device::NMI_LINE); + + GENERIC_LATCH_8(config, m_mainlatch); + m_mainlatch->data_pending_callback().set_inputline(m_maincpu, M68K_IRQ_6); + + ym2151_device &ymsnd(YM2151(config, "ymsnd", 14.318181_MHz_XTAL/4)); + ymsnd.irq_handler().set_inputline(m_audiocpu, m6502_device::IRQ_LINE); ymsnd.add_route(0, "lspeaker", 0.80); ymsnd.add_route(1, "rspeaker", 0.80); - pokey_device &pokey(POKEY(config, "pokey", ATARI_CLOCK_14MHz/8)); + pokey_device &pokey(POKEY(config, "pokey", 14.318181_MHz_XTAL/8)); pokey.add_route(ALL_OUTPUTS, "lspeaker", 0.40); pokey.add_route(ALL_OUTPUTS, "rspeaker", 0.40); - TMS5220C(config, m_tms, ATARI_CLOCK_14MHz/2/11); + TMS5220C(config, m_tms, 14.318181_MHz_XTAL/2/11); m_tms->add_route(ALL_OUTPUTS, "lspeaker", 1.0); m_tms->add_route(ALL_OUTPUTS, "rspeaker", 1.0); - /* via */ - via6522_device &via(VIA6522(config, "via6522_0", ATARI_CLOCK_14MHz/8)); - via.readpa_handler().set(FUNC(atarisy1_state::via_pa_r)); - via.readpb_handler().set(FUNC(atarisy1_state::via_pb_r)); - via.writepa_handler().set(FUNC(atarisy1_state::via_pa_w)); - via.writepb_handler().set(FUNC(atarisy1_state::via_pb_w)); + VIA6522(config, m_via, 14.318181_MHz_XTAL/8); + m_via->readpa_handler().set(m_tms, FUNC(tms5220_device::status_r)); + m_via->readpb_handler().set(FUNC(atarisy1_state::via_pb_r)); + m_via->writepa_handler().set(m_tms, FUNC(tms5220_device::data_w)); + m_via->writepb_handler().set(FUNC(atarisy1_state::via_pb_w)); } void atarisy1_state::marble(machine_config &config) diff --git a/src/mame/drivers/atarisy2.cpp b/src/mame/drivers/atarisy2.cpp index e14fd15143e..7f4db21a1ff 100644 --- a/src/mame/drivers/atarisy2.cpp +++ b/src/mame/drivers/atarisy2.cpp @@ -195,7 +195,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(atarisy2_state::scanline_update) int scanline = param; if (scanline <= m_screen->height()) { - /* generate the 32V interrupt (IRQ 2) */ + // generate the 32V interrupt (IRQ 2) if ((scanline % 64) == 0) if (m_interrupt_enable & 4) { @@ -213,14 +213,14 @@ TIMER_DEVICE_CALLBACK_MEMBER(atarisy2_state::scanline_update) * *************************************/ -MACHINE_START_MEMBER(atarisy2_state,atarisy2) +void atarisy2_state::machine_start() { - atarigen_state::machine_start(); - m_leds.resolve(); m_scanline_int_state = false; m_video_int_state = false; + m_p2portwr_state = false; + m_p2portrd_state = false; save_item(NAME(m_interrupt_enable)); save_item(NAME(m_scanline_int_state)); @@ -234,13 +234,13 @@ MACHINE_START_MEMBER(atarisy2_state,atarisy2) } -MACHINE_RESET_MEMBER(atarisy2_state,atarisy2) +void atarisy2_state::machine_reset() { - atarigen_state::machine_reset(); m_slapstic->slapstic_reset(); - m_p2portwr_state = false; - m_p2portrd_state = false; + m_interrupt_enable = 0; + + sound_reset_w(1); } @@ -253,7 +253,7 @@ MACHINE_RESET_MEMBER(atarisy2_state,atarisy2) WRITE_LINE_MEMBER(atarisy2_state::vblank_int) { - /* clock the VBLANK through */ + // clock the VBLANK through if (state && BIT(m_interrupt_enable, 3)) { m_video_int_state = true; @@ -264,16 +264,20 @@ WRITE_LINE_MEMBER(atarisy2_state::vblank_int) void atarisy2_state::int0_ack_w(uint16_t data) { - /* reset sound IRQ */ + // reset sound IRQ m_p2portrd_state = false; update_interrupts(); } -void atarisy2_state::int1_ack_w(uint8_t data) +void atarisy2_state::sound_reset_w(uint8_t data) { - /* reset sound CPU */ - m_audiocpu->set_input_line(INPUT_LINE_RESET, (data & 1) ? ASSERT_LINE : CLEAR_LINE); + // reset sound CPU + m_audiocpu->set_input_line(INPUT_LINE_RESET, BIT(data, 0) ? ASSERT_LINE : CLEAR_LINE); + + sndrst_6502_w(0); + coincount_w(0); + switch_6502_w(0); } @@ -289,6 +293,18 @@ void atarisy2_state::int_enable_w(uint8_t data) } +INTERRUPT_GEN_MEMBER(atarisy2_state::sound_irq_gen) +{ + m_audiocpu->set_input_line(m6502_device::IRQ_LINE, ASSERT_LINE); +} + + +void atarisy2_state::sound_irq_ack_w(uint8_t data) +{ + m_audiocpu->set_input_line(m6502_device::IRQ_LINE, CLEAR_LINE); +} + + /************************************* * @@ -296,7 +312,7 @@ void atarisy2_state::int_enable_w(uint8_t data) * *************************************/ -WRITE16_MEMBER(atarisy2_state::bankselect_w) +void atarisy2_state::bankselect_w(offs_t offset, uint16_t data) { /*static const int bankoffset[64] = { @@ -327,7 +343,6 @@ WRITE16_MEMBER(atarisy2_state::bankselect_w) void atarisy2_state::device_post_load() { - atarigen_state::device_post_load(); } @@ -338,13 +353,13 @@ void atarisy2_state::device_post_load() * *************************************/ -READ16_MEMBER(atarisy2_state::switch_r) +uint16_t atarisy2_state::switch_r() { return ioport("1800")->read() | (ioport("1801")->read() << 8); } -READ8_MEMBER(atarisy2_state::switch_6502_r) +uint8_t atarisy2_state::switch_6502_r() { int result = ioport("1840")->read(); @@ -356,7 +371,7 @@ READ8_MEMBER(atarisy2_state::switch_6502_r) } -WRITE8_MEMBER(atarisy2_state::switch_6502_w) +void atarisy2_state::switch_6502_w(uint8_t data) { m_leds[0] = BIT(data, 2); m_leds[1] = BIT(data, 3); @@ -375,18 +390,18 @@ WRITE8_MEMBER(atarisy2_state::switch_6502_w) * *************************************/ -READ8_MEMBER(atarisy2_state::leta_r) +uint8_t atarisy2_state::leta_r(offs_t offset) { static const char *const letanames[] = { "LETA0", "LETA1", "LETA2", "LETA3" }; - if (offset <= 1 && m_pedal_count == -1) /* 720 */ + if (offset <= 1 && m_pedal_count == -1) // 720 { switch (ioport("SELECT")->read()) { - case 0: /* Real */ + case 0: // Real break; - case 1: /* Fake Joystick */ + case 1: // Fake Joystick */ /* special thanks to MAME Analog+ for the mapping code */ { int analogx = ioport("FAKE_JOY_X")->read() - 128; @@ -425,7 +440,7 @@ READ8_MEMBER(atarisy2_state::leta_r) } } - case 2: /* Fake Spinner */ + case 2: // Fake Spinner { int32_t diff; uint32_t temp; @@ -498,7 +513,7 @@ READ8_MEMBER(atarisy2_state::leta_r) if (offset == 0) return m_spin_center_count & 0xff; else - /* offset == 1 */ + // offset == 1 return rotate_count & 0xff; } @@ -604,11 +619,11 @@ READ8_MEMBER(atarisy2_state::leta_r) important. So it would be nice to add it in properly. */ -WRITE8_MEMBER(atarisy2_state::mixer_w) +void atarisy2_state::mixer_w(uint8_t data) { double rbott, rtop, gain; - /* these gains are cheesed up, but give an approximate effect */ + // these gains are cheesed up, but give an approximate effect /* * Before the volume adjustment, all channels pass through @@ -625,7 +640,7 @@ WRITE8_MEMBER(atarisy2_state::mixer_w) * */ - /* bits 0-2 control the volume of the YM2151, using 22k, 47k, and 100k resistors */ + // bits 0-2 control the volume of the YM2151, using 22k, 47k, and 100k resistors rtop = 1.0/(1.0/100 + 1.0/100); rbott = 0; if (!(data & 0x01)) rbott += 1.0/100; @@ -634,7 +649,7 @@ WRITE8_MEMBER(atarisy2_state::mixer_w) gain = (rbott == 0) ? 1.0 : ((1.0/rbott) / (rtop + (1.0/rbott))); m_ym2151->set_output_gain(ALL_OUTPUTS, gain); - /* bits 3-4 control the volume of the POKEYs, using 47k and 100k resistors */ + // bits 3-4 control the volume of the POKEYs, using 47k and 100k resistors rtop = 1.0/(1.0/100 + 1.0/100); rbott = 0; if (!(data & 0x08)) rbott += 1.0/47; @@ -643,7 +658,7 @@ WRITE8_MEMBER(atarisy2_state::mixer_w) m_pokey[0]->set_output_gain(ALL_OUTPUTS, gain); m_pokey[1]->set_output_gain(ALL_OUTPUTS, gain); - /* bits 5-7 control the volume of the TMS5220, using 22k, 47k, and 100k resistors */ + // bits 5-7 control the volume of the TMS5220, using 22k, 47k, and 100k resistors if (m_tms5220.found()) { rtop = 1.0/(1.0/100 + 1.0/100); @@ -657,58 +672,62 @@ WRITE8_MEMBER(atarisy2_state::mixer_w) } -WRITE8_MEMBER(atarisy2_state::sound_reset_w) +void atarisy2_state::sndrst_6502_w(uint8_t data) { - /* if no change, do nothing */ + // if no change, do nothing if ((data & 1) == m_sound_reset_state) return; m_sound_reset_state = data & 1; + m_ym2151->reset_w(m_sound_reset_state); - /* only track the 0 -> 1 transition */ + // only track the 0 -> 1 transition if (m_sound_reset_state == 0) return; - /* a large number of signals are reset when this happens */ - m_soundcomm->reset(); - m_ym2151->reset(); if (m_tms5220.found()) { m_tms5220->reset(); // technically what happens is the tms5220 gets a long stream of 0xFF written to it when sound_reset_state is 0 which halts the chip after a few frames, but this works just as well, even if it isn't exactly true to hardware... The hardware may not have worked either, the resistors to pull input to 0xFF are fighting against the ls263 gate holding the latched value to be sent to the chip. } - mixer_w(space, 0, 0); + mixer_w(0); } -READ16_MEMBER(atarisy2_state::sound_r) +uint16_t atarisy2_state::sound_r() { - /* clear the p2portwr state on a p1portrd */ - m_p2portwr_state = false; - update_interrupts(); + if (!machine().side_effects_disabled()) + { + // clear the p2portwr state on a p1portrd + m_p2portwr_state = false; + update_interrupts(); + } - /* handle it normally otherwise */ - return m_soundcomm->main_response_r() | 0xff00; + // handle it normally otherwise + return m_mainlatch->read() | 0xff00; } -WRITE8_MEMBER(atarisy2_state::sound_6502_w) +void atarisy2_state::sound_6502_w(uint8_t data) { - /* clock the state through */ + // clock the state through m_p2portwr_state = (m_interrupt_enable & 2) != 0; update_interrupts(); - /* handle it normally otherwise */ - m_soundcomm->sound_response_w(data); + // handle it normally otherwise + m_mainlatch->write(data); } -READ8_MEMBER(atarisy2_state::sound_6502_r) +uint8_t atarisy2_state::sound_6502_r() { - /* clock the state through */ - m_p2portrd_state = (m_interrupt_enable & 1) != 0; - update_interrupts(); + if (!machine().side_effects_disabled()) + { + // clock the state through + m_p2portrd_state = (m_interrupt_enable & 1) != 0; + update_interrupts(); + } - /* handle it normally otherwise */ - return m_soundcomm->sound_command_r(); + // handle it normally otherwise + return m_soundlatch->read(); } @@ -719,7 +738,7 @@ READ8_MEMBER(atarisy2_state::sound_6502_r) * *************************************/ -WRITE8_MEMBER(atarisy2_state::tms5220_w) +void atarisy2_state::tms5220_w(uint8_t data) { if (m_tms5220.found()) { @@ -727,7 +746,7 @@ WRITE8_MEMBER(atarisy2_state::tms5220_w) } } -WRITE8_MEMBER(atarisy2_state::tms5220_strobe_w) +void atarisy2_state::tms5220_strobe_w(offs_t offset, uint8_t data) { if (m_tms5220.found()) { @@ -741,7 +760,7 @@ WRITE8_MEMBER(atarisy2_state::tms5220_strobe_w) * *************************************/ -WRITE8_MEMBER(atarisy2_state::coincount_w) +void atarisy2_state::coincount_w(uint8_t data) { machine().bookkeeping().coin_counter_w(0, (data >> 0) & 1); machine().bookkeeping().coin_counter_w(1, (data >> 1) & 1); @@ -754,7 +773,7 @@ WRITE8_MEMBER(atarisy2_state::coincount_w) * *************************************/ -/* full memory map derived from schematics */ +// full memory map derived from schematics void atarisy2_state::main_map(address_map &map) { map.unmap_value_high(); @@ -764,11 +783,11 @@ void atarisy2_state::main_map(address_map &map) map(0x1400, 0x1403).mirror(0x007c).w(FUNC(atarisy2_state::bankselect_w)); map(0x1480, 0x148f).mirror(0x0070).w("adc", FUNC(adc0808_device::address_offset_start_w)).umask16(0x00ff); map(0x1580, 0x1581).mirror(0x001e).w(FUNC(atarisy2_state::int0_ack_w)); - map(0x15a0, 0x15a0).mirror(0x001e).w(FUNC(atarisy2_state::int1_ack_w)); + map(0x15a0, 0x15a0).mirror(0x001e).w(FUNC(atarisy2_state::sound_reset_w)); map(0x15c0, 0x15c1).mirror(0x001e).w(FUNC(atarisy2_state::scanline_int_ack_w)); map(0x15e0, 0x15e1).mirror(0x001e).w(FUNC(atarisy2_state::video_int_ack_w)); map(0x1600, 0x1600).mirror(0x007e).w(FUNC(atarisy2_state::int_enable_w)); - map(0x1680, 0x1680).mirror(0x007e).w(m_soundcomm, FUNC(atari_sound_comm_device::main_command_w)); + map(0x1680, 0x1680).mirror(0x007e).w(m_soundlatch, FUNC(generic_latch_8_device::write)); map(0x1700, 0x1701).mirror(0x007e).w(FUNC(atarisy2_state::xscroll_w)).share("xscroll"); map(0x1780, 0x1781).mirror(0x007e).w(FUNC(atarisy2_state::yscroll_w)).share("yscroll"); map(0x1800, 0x1801).mirror(0x03fe).r(FUNC(atarisy2_state::switch_r)).w("watchdog", FUNC(watchdog_timer_device::reset16_w)); @@ -787,7 +806,7 @@ void atarisy2_state::main_map(address_map &map) * *************************************/ -/* full memory map derived from schematics */ +// full memory map derived from schematics void atarisy2_state::vrambank_map(address_map &map) { map.unmap_value_high(); @@ -804,7 +823,7 @@ void atarisy2_state::vrambank_map(address_map &map) * *************************************/ -/* full memory map derived from schematics */ +// full memory map derived from schematics void atarisy2_state::sound_map(address_map &map) { map(0x0000, 0x0fff).mirror(0x2000).ram(); @@ -819,10 +838,10 @@ void atarisy2_state::sound_map(address_map &map) map(0x1872, 0x1873).mirror(0x2780).w(FUNC(atarisy2_state::tms5220_strobe_w)); map(0x1874, 0x1874).mirror(0x2781).w(FUNC(atarisy2_state::sound_6502_w)); map(0x1876, 0x1876).mirror(0x2781).w(FUNC(atarisy2_state::coincount_w)); - map(0x1878, 0x1878).mirror(0x2781).w(m_soundcomm, FUNC(atari_sound_comm_device::sound_irq_ack_w)); + map(0x1878, 0x1878).mirror(0x2781).w(FUNC(atarisy2_state::sound_irq_ack_w)); map(0x187a, 0x187a).mirror(0x2781).w(FUNC(atarisy2_state::mixer_w)); map(0x187c, 0x187c).mirror(0x2781).w(FUNC(atarisy2_state::switch_6502_w)); - map(0x187e, 0x187e).mirror(0x2781).w(FUNC(atarisy2_state::sound_reset_w)); + map(0x187e, 0x187e).mirror(0x2781).w(FUNC(atarisy2_state::sndrst_6502_w)); map(0x4000, 0xffff).rom(); } @@ -835,8 +854,8 @@ void atarisy2_state::sound_map(address_map &map) static INPUT_PORTS_START( paperboy ) PORT_START("1840") /*(sound) */ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_ATARI_COMM_MAIN_TO_SOUND_READY("soundcomm") - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_ATARI_COMM_SOUND_TO_MAIN_READY("soundcomm") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("soundlatch", generic_latch_8_device, pending_r) // P1TALK + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("mainlatch", generic_latch_8_device, pending_r) // P2TALK PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) @@ -849,8 +868,8 @@ static INPUT_PORTS_START( paperboy ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_ATARI_COMM_SOUND_TO_MAIN_READY("soundcomm") - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_ATARI_COMM_MAIN_TO_SOUND_READY("soundcomm") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("mainlatch", generic_latch_8_device, pending_r) // P2TALK + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("soundlatch", generic_latch_8_device, pending_r) // P1TALK PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) @@ -903,7 +922,7 @@ static INPUT_PORTS_START( paperboy ) PORT_DIPSETTING( 0xa0, "1 Each 3" ) PORT_DIPSETTING( 0x60, "2 Each 4" ) PORT_DIPSETTING( 0x20, "1 Each 2" ) - PORT_DIPSETTING( 0xc0, "1 Each ?" ) /* Not Documented */ + PORT_DIPSETTING( 0xc0, "1 Each ?" ) // Not Documented PORT_DIPSETTING( 0xe0, DEF_STR( Free_Play ) ) PORT_START("DSW1") @@ -922,8 +941,8 @@ static INPUT_PORTS_START( paperboy ) PORT_DIPSETTING( 0x00, "4" ) PORT_DIPSETTING( 0x30, "5" ) PORT_DIPSETTING( 0x10, "Infinite (Cheat)") - PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "5/6A:!2" ) /* Listed as "Unused" */ - PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "5/6A:!1" ) /* Listed as "Unused" */ + PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "5/6A:!2" ) // Listed as "Unused" + PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "5/6A:!1" ) // Listed as "Unused" INPUT_PORTS_END @@ -951,25 +970,25 @@ static INPUT_PORTS_START( 720 ) /* Center disc */ /* X1, X2 LETA inputs */ - PORT_MODIFY("LETA0") /* not direct mapped */ + PORT_MODIFY("LETA0") // not direct mapped PORT_BIT( 0xff, 0x00, IPT_DIAL_V ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_NAME("Center") PORT_CONDITION("SELECT",0x03,EQUALS,0x00) /* Rotate disc */ /* Y1, Y2 LETA inputs */ /* The disc has 72 teeth which are read by the hardware at 2x */ /* Computer hardware reads at 4x, so we set the sensitivity to 50% */ - PORT_MODIFY("LETA1") /* not direct mapped */ + PORT_MODIFY("LETA1") // not direct mapped PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_FULL_TURN_COUNT(144) PORT_NAME("Rotate") PORT_CONDITION("SELECT",0x03,EQUALS,0x00) - PORT_START("FAKE_JOY_X") /* not direct mapped */ + PORT_START("FAKE_JOY_X") // not direct mapped PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_CONDITION("SELECT",0x03,EQUALS,0x01) - PORT_START("FAKE_JOY_Y") /* not direct mapped */ + PORT_START("FAKE_JOY_Y") // not direct mapped PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE PORT_CONDITION("SELECT",0x03,EQUALS,0x01) /* Let's assume we are using a 1200 count spinner. We scale to get a 144 count. * 144/1200 = 0.12 = 12% */ - PORT_START("FAKE_SPINNER") /* not direct mapped */ + PORT_START("FAKE_SPINNER") // not direct mapped PORT_BIT( 0xffff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(12) PORT_KEYDELTA(10) PORT_CONDITION("SELECT",0x03,EQUALS,0x02) PORT_START("SELECT") @@ -1085,7 +1104,7 @@ static INPUT_PORTS_START( csprint ) PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_MODIFY("DSW1") - PORT_DIPNAME( 0x80, 0x00, "Auto High Score Reset" ) PORT_DIPLOCATION("5/6A:!1") /* "After 2000 Plays." */ + PORT_DIPNAME( 0x80, 0x00, "Auto High Score Reset" ) PORT_DIPLOCATION("5/6A:!1") // "After 2000 Plays." PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) INPUT_PORTS_END @@ -1116,7 +1135,7 @@ static INPUT_PORTS_START( apb ) PORT_MODIFY("DSW0") PORT_DIPNAME( 0xe0, 0x00, "Bonus Coins" ) PORT_DIPLOCATION("6/7A:!3,!2,!1") PORT_DIPSETTING( 0x00, DEF_STR( None ) ) - PORT_DIPSETTING( 0xc0, "1 Each 6" ) /* Not documented */ + PORT_DIPSETTING( 0xc0, "1 Each 6" ) // Not documented PORT_DIPSETTING( 0xa0, "1 Each 5" ) PORT_DIPSETTING( 0x80, "1 Each 4" ) PORT_DIPSETTING( 0x60, "1 Each 3" ) @@ -1125,7 +1144,7 @@ static INPUT_PORTS_START( apb ) PORT_DIPSETTING( 0xe0, DEF_STR( Free_Play ) ) PORT_MODIFY("DSW1") - PORT_DIPNAME( 0x01, 0x00, "Attract Lights" ) PORT_DIPLOCATION("5/6A:!8") /* Listed As Unused. */ + PORT_DIPNAME( 0x01, 0x00, "Attract Lights" ) PORT_DIPLOCATION("5/6A:!8") // Listed As Unused. PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x06, 0x00, "Max Continues" ) PORT_DIPLOCATION("5/6A:!7,!6") @@ -1207,17 +1226,14 @@ GFXDECODE_END void atarisy2_state::atarisy2(machine_config &config) { - /* basic machine hardware */ + // basic machine hardware T11(config, m_maincpu, MASTER_CLOCK/2); - m_maincpu->set_initial_mode(0x36ff); /* initial mode word has DAL15,14,11,8 pulled low */ + m_maincpu->set_initial_mode(0x36ff); // initial mode word has DAL15,14,11,8 pulled low m_maincpu->set_addrmap(AS_PROGRAM, &atarisy2_state::main_map); M6502(config, m_audiocpu, SOUND_CLOCK/8); m_audiocpu->set_addrmap(AS_PROGRAM, &atarisy2_state::sound_map); - m_audiocpu->set_periodic_int("soundcomm", FUNC(atari_sound_comm_device::sound_irq_gen), attotime::from_hz(MASTER_CLOCK/2/16/16/16/10)); - - MCFG_MACHINE_START_OVERRIDE(atarisy2_state,atarisy2) - MCFG_MACHINE_RESET_OVERRIDE(atarisy2_state,atarisy2) + m_audiocpu->set_periodic_int(FUNC(atarisy2_state::sound_irq_gen), attotime::from_hz(MASTER_CLOCK/2/16/16/16/10)); adc0809_device &adc(ADC0809(config, "adc", MASTER_CLOCK/32)); // 625 kHz adc.in_callback<0>().set_ioport("ADC0"); // J102 pin 5 (POT1) @@ -1233,9 +1249,9 @@ void atarisy2_state::atarisy2(machine_config &config) TIMER(config, "scantimer").configure_scanline(FUNC(atarisy2_state::scanline_update), m_screen, 0, 64); - WATCHDOG_TIMER(config, "watchdog"); + WATCHDOG_TIMER(config, "watchdog").set_time(attotime::from_hz(MASTER_CLOCK/2/16/16/16/256)); - /* video hardware */ + // video hardware GFXDECODE(config, "gfxdecode", "palette", gfx_atarisy2); PALETTE(config, "palette").set_format(2, &atarisy2_state::RRRRGGGGBBBBIIII, 256); @@ -1254,12 +1270,15 @@ void atarisy2_state::atarisy2(machine_config &config) ADDRESS_MAP_BANK(config, "vrambank").set_map(&atarisy2_state::vrambank_map).set_options(ENDIANNESS_LITTLE, 16, 15, 0x2000); - MCFG_VIDEO_START_OVERRIDE(atarisy2_state,atarisy2) - - /* sound hardware */ - ATARI_SOUND_COMM(config, m_soundcomm, m_audiocpu).int_callback().set_nop(); + // sound hardware SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); + + GENERIC_LATCH_8(config, m_soundlatch); + m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, m6502_device::NMI_LINE); + + GENERIC_LATCH_8(config, m_mainlatch); + YM2151(config, m_ym2151, SOUND_CLOCK/4); m_ym2151->add_route(0, "lspeaker", 0.60); m_ym2151->add_route(1, "rspeaker", 0.60); @@ -1301,7 +1320,7 @@ void atarisy2_state::ssprint(machine_config &config) atarisy2(config); SLAPSTIC(config, m_slapstic, 108, false); - /* sound hardware */ + // sound hardware config.device_remove("tms"); } @@ -1311,7 +1330,7 @@ void atarisy2_state::csprint(machine_config &config) atarisy2(config); SLAPSTIC(config, m_slapstic, 109, false); - /* sound hardware */ + // sound hardware config.device_remove("tms"); } @@ -1330,7 +1349,7 @@ void atarisy2_state::apb(machine_config &config) *************************************/ ROM_START( paperboy ) // ALL of these roms should be 136034-xxx but the correct labels aren't known per game rev! - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9*64k for T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9*64k for T11 code ROM_LOAD16_BYTE( "cpu_l07.rv3", 0x008000, 0x004000, CRC(4024bb9b) SHA1(9030ce5a6a1a3d769c699a92b32a55013f9766aa) ) ROM_LOAD16_BYTE( "cpu_n07.rv3", 0x008001, 0x004000, CRC(0260901a) SHA1(39d786f5c440ca1fd529ee73e2a4d2406cd1db8f) ) ROM_LOAD16_BYTE( "cpu_f06.rv2", 0x010000, 0x004000, CRC(3fea86ac) SHA1(90722bfd0426efbfb69714151f8644b56075b4c1) ) @@ -1342,7 +1361,7 @@ ROM_START( paperboy ) // ALL of these roms should be 136034-xxx but the correct ROM_LOAD16_BYTE( "cpu_l06.rv2", 0x070000, 0x004000, CRC(8a754466) SHA1(2c4c6ca797c7f4349c2893d8c0ba7e2658fdca99) ) ROM_LOAD16_BYTE( "cpu_s06.rv2", 0x070001, 0x004000, CRC(224209f9) SHA1(c41269bfadb8fff1c8ff0f6ea0b8e8b34feb49d6) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "cpu_a02.rv3", 0x004000, 0x004000, CRC(ba251bc4) SHA1(768e42608263205e412e651082ffa2a083b04644) ) ROM_LOAD( "cpu_b02.rv2", 0x008000, 0x004000, CRC(e4e7a8b9) SHA1(f11a0cf40d5c51ff180f0fa1cf676f95090a1010) ) ROM_LOAD( "cpu_c02.rv2", 0x00c000, 0x004000, CRC(d44c2aa2) SHA1(f1b00e36d87f6d77746cf003198c7f19aa2f4fab) ) @@ -1372,7 +1391,7 @@ ROM_END ROM_START( paperboyr2 ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9*64k for T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9*64k for T11 code ROM_LOAD16_BYTE( "cpu_l07.rv2", 0x008000, 0x004000, CRC(39d0a625) SHA1(c4f62cecbc8a122f58f98312517feccf9429f28b) ) ROM_LOAD16_BYTE( "cpu_n07.rv2", 0x008001, 0x004000, CRC(3c5de588) SHA1(faad02fee1528cd52af1fac315096a46a9eb9a85) ) ROM_LOAD16_BYTE( "cpu_f06.rv2", 0x010000, 0x004000, CRC(3fea86ac) SHA1(90722bfd0426efbfb69714151f8644b56075b4c1) ) @@ -1384,7 +1403,7 @@ ROM_START( paperboyr2 ) ROM_LOAD16_BYTE( "cpu_l06.rv2", 0x070000, 0x004000, CRC(8a754466) SHA1(2c4c6ca797c7f4349c2893d8c0ba7e2658fdca99) ) ROM_LOAD16_BYTE( "cpu_s06.rv2", 0x070001, 0x004000, CRC(224209f9) SHA1(c41269bfadb8fff1c8ff0f6ea0b8e8b34feb49d6) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "cpu_a02.rv2", 0x004000, 0x004000, CRC(4a759092) SHA1(26909df77f53ac19e205411b90558488badc82bd) ) ROM_LOAD( "cpu_b02.rv2", 0x008000, 0x004000, CRC(e4e7a8b9) SHA1(f11a0cf40d5c51ff180f0fa1cf676f95090a1010) ) ROM_LOAD( "cpu_c02.rv2", 0x00c000, 0x004000, CRC(d44c2aa2) SHA1(f1b00e36d87f6d77746cf003198c7f19aa2f4fab) ) @@ -1414,7 +1433,7 @@ ROM_END ROM_START( paperboyr1 ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9*64k for T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9*64k for T11 code ROM_LOAD16_BYTE( "cpu_l07.rv1", 0x008000, 0x004000, CRC(fd87a8ee) SHA1(f42fe59f62928bb36c00b6814e1af173d713fb2e) ) ROM_LOAD16_BYTE( "cpu_n07.rv1", 0x008001, 0x004000, CRC(a997e217) SHA1(85d97e62bb225f6302cdad18bf1299d364614ce4) ) ROM_LOAD16_BYTE( "cpu_f06.rv1", 0x010000, 0x004000, CRC(e871248d) SHA1(c660e21e47a958ee72857ca41e6a299ce4328076) ) @@ -1426,7 +1445,7 @@ ROM_START( paperboyr1 ) ROM_LOAD16_BYTE( "cpu_l06.rv1", 0x070000, 0x004000, CRC(ccbc58a6) SHA1(dd66317146c295524f83b8d40c20164e873752b5) ) ROM_LOAD16_BYTE( "cpu_s06.rv1", 0x070001, 0x004000, CRC(a7f14643) SHA1(d73c8ec2493617fce2e6822e8a6cde16a2de5965) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "cpu_a02.rv1", 0x004000, 0x004000, CRC(5479a788) SHA1(4cc5145e75ac6370f54eea33531f1f96160ee82b) ) ROM_LOAD( "cpu_b02.rv1", 0x008000, 0x004000, CRC(de4147c6) SHA1(c997510b2018291924abddfe604a8f738fd8035c) ) ROM_LOAD( "cpu_c02.rv1", 0x00c000, 0x004000, CRC(b71505fc) SHA1(15fd156038861cb715fce10f1c56f3ded851be39) ) @@ -1503,7 +1522,7 @@ PAPTST c000 2G 27128 paptstc000.bin ROM_START( paperboyp ) // program roms are all marked as BAD_DUMP due to (non-specific) comments about some roms not reading consistently (the first 4 had checksums printed on so could be verified) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9*64k for T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9*64k for T11 code ROM_LOAD16_BYTE( "fix-low.5p", 0x008000, 0x004000, BAD_DUMP CRC(55a7137b) SHA1(19bc2b7a64ab277b0e8e3d131d427db96da8e91e) ) ROM_LOAD16_BYTE( "fix-hi.5m", 0x008001, 0x004000, BAD_DUMP CRC(e386b4f9) SHA1(0c156c4fca38d6aaae1e5b4c52c6bfd0231f9954) ) ROM_LOAD16_BYTE( "l-0.7t", 0x010000, 0x004000, BAD_DUMP CRC(fbf26418) SHA1(f34e7ac253723f175dedf8126a3ee25e37ebdc5b) ) @@ -1515,7 +1534,7 @@ ROM_START( paperboyp ) ROM_LOAD16_BYTE( "low-3.5rs", 0x070000, 0x004000, BAD_DUMP CRC(a0afde83) SHA1(f4188af58c08b180fe2799a42f3cd92d425370df) ) ROM_LOAD16_BYTE( "hi-3.4rs", 0x070001, 0x004000, BAD_DUMP CRC(7a1a4d69) SHA1(492e95d4d418d91c0693c04664d3ee9c220e21f5) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "paptst4000.2a", 0x004000, 0x004000, BAD_DUMP CRC(e5ee1bca) SHA1(f467aae75ea3fe7178f64fe0cbcc20503ac0fa21) ) ROM_LOAD( "paptst8000.2c", 0x008000, 0x004000, BAD_DUMP CRC(c51ebdb0) SHA1(abba5c8a408c709ad447af02304bc04f887cf914) ) ROM_LOAD( "paptstc000.2g", 0x00c000, 0x004000, BAD_DUMP CRC(e663d9c2) SHA1(4d0c0e3b6710d2db03b35d0eded413d1cb43c9a7) ) @@ -1544,7 +1563,7 @@ ROM_END ROM_START( 720 ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9 * 64k T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9 * 64k T11 code ROM_LOAD16_BYTE( "136047-3126.7lm", 0x008000, 0x004000, CRC(43abd367) SHA1(bb58c42f25ef0ee5357782652e9e2b28df0ba82e) ) ROM_LOAD16_BYTE( "136047-3127.7mn", 0x008001, 0x004000, CRC(772e1e5b) SHA1(1ee9b6bd7b2a5e4866b7157db95ee38b53f5c4ce) ) ROM_LOAD16_BYTE( "136047-3128.6fh", 0x010000, 0x010000, CRC(bf6f425b) SHA1(22732465959c2d30383523e0354b8d3759963765) ) @@ -1554,7 +1573,7 @@ ROM_START( 720 ) ROM_LOAD16_BYTE( "136047-1130.6k", 0x050000, 0x010000, CRC(93fba845) SHA1(4de5867272af63be696855f2a4dff99476b213ad) ) ROM_LOAD16_BYTE( "136047-1133.6r", 0x050001, 0x010000, CRC(53c177be) SHA1(a60c81899944e0dda9886e6697edc4d9309ca8f4) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "136047-2134.2a", 0x004000, 0x004000, CRC(0db4ca28) SHA1(71c2e0eee0eee418bdd2f806bd6ce5ae1c72bf69) ) ROM_LOAD( "136047-1135.2b", 0x008000, 0x004000, CRC(b1f157d0) SHA1(26355324d49baa02acb777940d7f49d074a75fe5) ) ROM_LOAD( "136047-2136.2cd", 0x00c000, 0x004000, CRC(00b06bec) SHA1(cd771eea329e0f6ab5bff1035f931800cc5da545) ) @@ -1612,7 +1631,7 @@ ROM_END ROM_START( 720r3 ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9 * 64k T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9 * 64k T11 code ROM_LOAD16_BYTE( "136047-2126.7lm", 0x008000, 0x004000, CRC(d07e731c) SHA1(0ea742c14702f386fdbaf9a51b3a3439c2bc2f6b) ) ROM_LOAD16_BYTE( "136047-2127.7mn", 0x008001, 0x004000, CRC(2d19116c) SHA1(6f86b735b2c685f51d43c7b290c3fd245daa032c) ) ROM_LOAD16_BYTE( "136047-2128.6fh", 0x010000, 0x010000, CRC(edad0bc0) SHA1(9e50776221e25573ef6e072e604a52323bc0cef4) ) @@ -1622,7 +1641,7 @@ ROM_START( 720r3 ) ROM_LOAD16_BYTE( "136047-1130.6k", 0x050000, 0x010000, CRC(93fba845) SHA1(4de5867272af63be696855f2a4dff99476b213ad) ) ROM_LOAD16_BYTE( "136047-1133.6r", 0x050001, 0x010000, CRC(53c177be) SHA1(a60c81899944e0dda9886e6697edc4d9309ca8f4) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "136047-1134.2a", 0x004000, 0x004000, CRC(09a418c2) SHA1(017491bbcd0def695a23ab17b1e4fbd1fdf4d5d1) ) ROM_LOAD( "136047-1135.2b", 0x008000, 0x004000, CRC(b1f157d0) SHA1(26355324d49baa02acb777940d7f49d074a75fe5) ) ROM_LOAD( "136047-1136.2cd", 0x00c000, 0x004000, CRC(dad40e6d) SHA1(a94bc1b5f0a5218e9e44cd32f2ca6268b48072c2) ) @@ -1680,7 +1699,7 @@ ROM_END ROM_START( 720r2 ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9 * 64k T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9 * 64k T11 code ROM_LOAD16_BYTE( "136047-2126.7lm", 0x008000, 0x004000, CRC(d07e731c) SHA1(0ea742c14702f386fdbaf9a51b3a3439c2bc2f6b) ) ROM_LOAD16_BYTE( "136047-2127.7mn", 0x008001, 0x004000, CRC(2d19116c) SHA1(6f86b735b2c685f51d43c7b290c3fd245daa032c) ) ROM_LOAD16_BYTE( "136047-2128.6fh", 0x010000, 0x010000, CRC(edad0bc0) SHA1(9e50776221e25573ef6e072e604a52323bc0cef4) ) @@ -1690,7 +1709,7 @@ ROM_START( 720r2 ) ROM_LOAD16_BYTE( "136047-1130.6k", 0x050000, 0x010000, CRC(93fba845) SHA1(4de5867272af63be696855f2a4dff99476b213ad) ) ROM_LOAD16_BYTE( "136047-1133.6r", 0x050001, 0x010000, CRC(53c177be) SHA1(a60c81899944e0dda9886e6697edc4d9309ca8f4) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "136047-1134.2a", 0x004000, 0x004000, CRC(09a418c2) SHA1(017491bbcd0def695a23ab17b1e4fbd1fdf4d5d1) ) ROM_LOAD( "136047-1135.2b", 0x008000, 0x004000, CRC(b1f157d0) SHA1(26355324d49baa02acb777940d7f49d074a75fe5) ) ROM_LOAD( "136047-1136.2cd", 0x00c000, 0x004000, CRC(dad40e6d) SHA1(a94bc1b5f0a5218e9e44cd32f2ca6268b48072c2) ) @@ -1748,7 +1767,7 @@ ROM_END ROM_START( 720r1 ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9 * 64k T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9 * 64k T11 code ROM_LOAD16_BYTE( "136047-1126.7lm", 0x008000, 0x004000, CRC(f0ef298a) SHA1(5bbb84666333cd81ef3c5ffe7ad75a768c2af9aa) ) ROM_LOAD16_BYTE( "136047-1127.7mn", 0x008001, 0x004000, CRC(57e49398) SHA1(511310ff83067f62532894617c6a7de29807f265) ) ROM_LOAD16_BYTE( "136047-1128.6fh", 0x010000, 0x010000, CRC(2884dcff) SHA1(4a41a5064137673353ac6000d1435742f7b394c3) ) @@ -1758,7 +1777,7 @@ ROM_START( 720r1 ) ROM_LOAD16_BYTE( "136047-1130.6k", 0x050000, 0x010000, CRC(93fba845) SHA1(4de5867272af63be696855f2a4dff99476b213ad) ) ROM_LOAD16_BYTE( "136047-1133.6r", 0x050001, 0x010000, CRC(53c177be) SHA1(a60c81899944e0dda9886e6697edc4d9309ca8f4) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "136047-1134.2a", 0x004000, 0x004000, CRC(09a418c2) SHA1(017491bbcd0def695a23ab17b1e4fbd1fdf4d5d1) ) ROM_LOAD( "136047-1135.2b", 0x008000, 0x004000, CRC(b1f157d0) SHA1(26355324d49baa02acb777940d7f49d074a75fe5) ) ROM_LOAD( "136047-1136.2cd", 0x00c000, 0x004000, CRC(dad40e6d) SHA1(a94bc1b5f0a5218e9e44cd32f2ca6268b48072c2) ) @@ -1816,7 +1835,7 @@ ROM_END ROM_START( 720g ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9 * 64k T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9 * 64k T11 code ROM_LOAD16_BYTE( "136047-3226.7lm", 0x008000, 0x004000, CRC(472be9aa) SHA1(4635df889d4e5b798074950ebb433c3f101a414d) ) ROM_LOAD16_BYTE( "136047-2227.7mn", 0x008001, 0x004000, CRC(c628fcc9) SHA1(ed8194e10a6d66216b4977be77a197f7f9918899) ) ROM_LOAD16_BYTE( "136047-3228.6fh", 0x010000, 0x010000, CRC(10bbbce7) SHA1(cc23c606151ae7a49eef051c8e0649230902e705) ) @@ -1826,7 +1845,7 @@ ROM_START( 720g ) ROM_LOAD16_BYTE( "136047-1130.6k", 0x050000, 0x010000, CRC(93fba845) SHA1(4de5867272af63be696855f2a4dff99476b213ad) ) ROM_LOAD16_BYTE( "136047-1133.6r", 0x050001, 0x010000, CRC(53c177be) SHA1(a60c81899944e0dda9886e6697edc4d9309ca8f4) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "136047-2134.2a", 0x004000, 0x004000, CRC(0db4ca28) SHA1(71c2e0eee0eee418bdd2f806bd6ce5ae1c72bf69) ) ROM_LOAD( "136047-1135.2b", 0x008000, 0x004000, CRC(b1f157d0) SHA1(26355324d49baa02acb777940d7f49d074a75fe5) ) ROM_LOAD( "136047-2136.2cd", 0x00c000, 0x004000, CRC(00b06bec) SHA1(cd771eea329e0f6ab5bff1035f931800cc5da545) ) @@ -1884,7 +1903,7 @@ ROM_END ROM_START( 720gr1 ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9 * 64k T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9 * 64k T11 code ROM_LOAD16_BYTE( "136047-2226.7lm", 0x008000, 0x004000, CRC(bbe90b2a) SHA1(a7310b0d71db11f1fac0724b1f9aef425f50b691) ) ROM_LOAD16_BYTE( "136047-2227.7mn", 0x008001, 0x004000, CRC(c628fcc9) SHA1(ed8194e10a6d66216b4977be77a197f7f9918899) ) ROM_LOAD16_BYTE( "136047-2228.6fh", 0x010000, 0x010000, CRC(a115aa94) SHA1(226b62d3a5caa6ada774ae79f4a92e09bacee89b) ) @@ -1894,7 +1913,7 @@ ROM_START( 720gr1 ) ROM_LOAD16_BYTE( "136047-1130.6k", 0x050000, 0x010000, CRC(93fba845) SHA1(4de5867272af63be696855f2a4dff99476b213ad) ) ROM_LOAD16_BYTE( "136047-1133.6r", 0x050001, 0x010000, CRC(53c177be) SHA1(a60c81899944e0dda9886e6697edc4d9309ca8f4) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "136047-1134.2a", 0x004000, 0x004000, CRC(09a418c2) SHA1(017491bbcd0def695a23ab17b1e4fbd1fdf4d5d1) ) ROM_LOAD( "136047-1135.2b", 0x008000, 0x004000, CRC(b1f157d0) SHA1(26355324d49baa02acb777940d7f49d074a75fe5) ) ROM_LOAD( "136047-1136.2cd", 0x00c000, 0x004000, CRC(dad40e6d) SHA1(a94bc1b5f0a5218e9e44cd32f2ca6268b48072c2) ) @@ -1952,7 +1971,7 @@ ROM_END ROM_START( ssprint ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9*64k for T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9*64k for T11 code ROM_LOAD16_BYTE( "136042-330.7l", 0x008000, 0x004000, CRC(ee312027) SHA1(7caeaf6220022ffffc7d1feefec24163bed70275) ) ROM_LOAD16_BYTE( "136042-331.7n", 0x008001, 0x004000, CRC(2ef15354) SHA1(c8044bd2e435bdd423877b78f375f13588d1dfd1) ) ROM_LOAD16_BYTE( "136042-329.6f", 0x010000, 0x008000, CRC(ed1d6205) SHA1(7b2b2fd5eb12b1b6266d2becb96c8cf23cdaed26) ) @@ -1962,7 +1981,7 @@ ROM_START( ssprint ) ROM_LOAD16_BYTE( "136042-126.6l", 0x070000, 0x008000, CRC(92f5392c) SHA1(064ccf24a68440caa565c0467ba4bf4246133698) ) ROM_LOAD16_BYTE( "136042-122.6s", 0x070001, 0x008000, CRC(0381f362) SHA1(e33b6d4949cdee33f27cedf00ef20f1ce5011e24) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "136042-419.2bc", 0x008000, 0x004000, CRC(b277915a) SHA1(e0e8cd713950f45352b7c1de986b5b0b5c1703b3) ) ROM_LOAD( "136042-420.2d", 0x00c000, 0x004000, CRC(170b2c53) SHA1(c6d5657da29cf637cea940406fcff9a7328964f8) ) @@ -1999,7 +2018,7 @@ ROM_END ROM_START( ssprints ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9*64k for T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9*64k for T11 code ROM_LOAD16_BYTE( "136042-138.7l", 0x008000, 0x004000, CRC(234a7c65) SHA1(2686cb83f339e20b7168ebf22f97d11511815859) ) ROM_LOAD16_BYTE( "136042-139.7n", 0x008001, 0x004000, CRC(7652a461) SHA1(9afe5b1d8ad16906b9927e8ca7e1ce81f86352d2) ) ROM_LOAD16_BYTE( "136042-137.6f", 0x010000, 0x008000, CRC(fa4c7e9d) SHA1(88eedd7c24da591f75525d0229ff91fac8c2d4ad) ) @@ -2009,7 +2028,7 @@ ROM_START( ssprints ) ROM_LOAD16_BYTE( "136042-126.6l", 0x070000, 0x008000, CRC(92f5392c) SHA1(064ccf24a68440caa565c0467ba4bf4246133698) ) ROM_LOAD16_BYTE( "136042-122.6s", 0x070001, 0x008000, CRC(0381f362) SHA1(e33b6d4949cdee33f27cedf00ef20f1ce5011e24) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "136042-119.2bc", 0x008000, 0x004000, CRC(0c810231) SHA1(a5a637e12df7eae234fdc2d3957d122c196c65cd) ) ROM_LOAD( "136042-120.2d", 0x00c000, 0x004000, CRC(647b7481) SHA1(51b1b09919eee3d98e65d48e3a2af8321ccf8a02) ) @@ -2046,7 +2065,7 @@ ROM_END ROM_START( ssprintf ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9*64k for T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9*64k for T11 code ROM_LOAD16_BYTE( "136042-134.7l", 0x008000, 0x004000, CRC(b7757b44) SHA1(4d38addb68cb272e5cb9cfbfeb7c3a5aeb21ad26) ) ROM_LOAD16_BYTE( "136042-135.7n", 0x008001, 0x004000, CRC(4fc132ba) SHA1(6724c59d4942bb9196918f1f83bac7bb07099076) ) ROM_LOAD16_BYTE( "136042-133.6f", 0x010000, 0x008000, CRC(0b9f89da) SHA1(025650687af247f4bb7d070d69073cf7afbf9a27) ) @@ -2056,7 +2075,7 @@ ROM_START( ssprintf ) ROM_LOAD16_BYTE( "136042-126.6l", 0x070000, 0x008000, CRC(92f5392c) SHA1(064ccf24a68440caa565c0467ba4bf4246133698) ) ROM_LOAD16_BYTE( "136042-122.6s", 0x070001, 0x008000, CRC(0381f362) SHA1(e33b6d4949cdee33f27cedf00ef20f1ce5011e24) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "136042-119.2bc", 0x008000, 0x004000, CRC(0c810231) SHA1(a5a637e12df7eae234fdc2d3957d122c196c65cd) ) ROM_LOAD( "136042-120.2d", 0x00c000, 0x004000, CRC(647b7481) SHA1(51b1b09919eee3d98e65d48e3a2af8321ccf8a02) ) @@ -2093,7 +2112,7 @@ ROM_END ROM_START( ssprintg ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9*64k for T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9*64k for T11 code ROM_LOAD16_BYTE( "136042-430.7l", 0x008000, 0x004000, CRC(c21df5f5) SHA1(0b79cfa0a6f3c1c59d09ff6a741abc71dc3da240) ) ROM_LOAD16_BYTE( "136042-431.7n", 0x008001, 0x004000, CRC(5880fc58) SHA1(c4e6c48d99b903f80408f0ee81672ff259f131ae) ) ROM_LOAD16_BYTE( "136042-429.6f", 0x010000, 0x008000, CRC(2060f68a) SHA1(b435a6de3e5ea5c1b5ba14f755660f747d972c38) ) @@ -2103,7 +2122,7 @@ ROM_START( ssprintg ) ROM_LOAD16_BYTE( "136042-126.6l", 0x070000, 0x008000, CRC(92f5392c) SHA1(064ccf24a68440caa565c0467ba4bf4246133698) ) ROM_LOAD16_BYTE( "136042-122.6s", 0x070001, 0x008000, CRC(0381f362) SHA1(e33b6d4949cdee33f27cedf00ef20f1ce5011e24) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "136042-119.2bc", 0x008000, 0x004000, CRC(0c810231) SHA1(a5a637e12df7eae234fdc2d3957d122c196c65cd) ) ROM_LOAD( "136042-120.2d", 0x00c000, 0x004000, CRC(647b7481) SHA1(51b1b09919eee3d98e65d48e3a2af8321ccf8a02) ) @@ -2140,7 +2159,7 @@ ROM_END ROM_START( ssprint3 ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9*64k for T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9*64k for T11 code ROM_LOAD16_BYTE( "136042-330.7l", 0x008000, 0x004000, CRC(ee312027) SHA1(7caeaf6220022ffffc7d1feefec24163bed70275) ) ROM_LOAD16_BYTE( "136042-331.7n", 0x008001, 0x004000, CRC(2ef15354) SHA1(c8044bd2e435bdd423877b78f375f13588d1dfd1) ) ROM_LOAD16_BYTE( "136042-329.6f", 0x010000, 0x008000, CRC(ed1d6205) SHA1(7b2b2fd5eb12b1b6266d2becb96c8cf23cdaed26) ) @@ -2150,7 +2169,7 @@ ROM_START( ssprint3 ) ROM_LOAD16_BYTE( "136042-126.6l", 0x070000, 0x008000, CRC(92f5392c) SHA1(064ccf24a68440caa565c0467ba4bf4246133698) ) ROM_LOAD16_BYTE( "136042-122.6s", 0x070001, 0x008000, CRC(0381f362) SHA1(e33b6d4949cdee33f27cedf00ef20f1ce5011e24) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "136042-319.2bc", 0x008000, 0x004000, CRC(c7f31c16) SHA1(cfacf22405da5e3cf95059ea6b9677a5a8471496) ) ROM_LOAD( "136042-320.2d", 0x00c000, 0x004000, CRC(9815ece9) SHA1(95239e15fe3e3f9a66e0f4dae365f763656cb70b) ) @@ -2187,7 +2206,7 @@ ROM_END ROM_START( ssprintg1 ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9*64k for T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9*64k for T11 code ROM_LOAD16_BYTE( "136042-230.7l", 0x008000, 0x004000, CRC(e5b2da29) SHA1(99150184a3f065e934ed6f60731fe534a75ba991) ) ROM_LOAD16_BYTE( "136042-231.7n", 0x008001, 0x004000, CRC(fac14b00) SHA1(6e5bf1e80f3d04f670b8290195609c0ac0cacea2) ) ROM_LOAD16_BYTE( "136042-229.6f", 0x010000, 0x008000, CRC(78b01070) SHA1(ccfa6bd1068e7bd3524a7da93a901633256f0524) ) @@ -2197,7 +2216,7 @@ ROM_START( ssprintg1 ) ROM_LOAD16_BYTE( "136042-126.6l", 0x070000, 0x008000, CRC(92f5392c) SHA1(064ccf24a68440caa565c0467ba4bf4246133698) ) ROM_LOAD16_BYTE( "136042-122.6s", 0x070001, 0x008000, CRC(0381f362) SHA1(e33b6d4949cdee33f27cedf00ef20f1ce5011e24) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "136042-119.2bc", 0x008000, 0x004000, CRC(0c810231) SHA1(a5a637e12df7eae234fdc2d3957d122c196c65cd) ) ROM_LOAD( "136042-120.2d", 0x00c000, 0x004000, CRC(647b7481) SHA1(51b1b09919eee3d98e65d48e3a2af8321ccf8a02) ) @@ -2234,7 +2253,7 @@ ROM_END ROM_START( ssprint1 ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9*64k for T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9*64k for T11 code ROM_LOAD16_BYTE( "136042-130.7l", 0x008000, 0x004000, CRC(b1edc688) SHA1(2b5c4a20e54fda43b49e5f811ed144675f8e019b) ) ROM_LOAD16_BYTE( "136042-131.7n", 0x008001, 0x004000, CRC(df49dc5a) SHA1(7cdd54cbfd0dc0428394047a057892e7f7d17b50) ) ROM_LOAD16_BYTE( "136042-129.6f", 0x010000, 0x008000, CRC(8be22fca) SHA1(d663ef2e71bafbda5351d73e0b9a86bbfa66e225) ) @@ -2244,7 +2263,7 @@ ROM_START( ssprint1 ) ROM_LOAD16_BYTE( "136042-126.6l", 0x070000, 0x008000, CRC(92f5392c) SHA1(064ccf24a68440caa565c0467ba4bf4246133698) ) ROM_LOAD16_BYTE( "136042-122.6s", 0x070001, 0x008000, CRC(0381f362) SHA1(e33b6d4949cdee33f27cedf00ef20f1ce5011e24) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "136042-119.2bc", 0x008000, 0x004000, CRC(0c810231) SHA1(a5a637e12df7eae234fdc2d3957d122c196c65cd) ) ROM_LOAD( "136042-120.2d", 0x00c000, 0x004000, CRC(647b7481) SHA1(51b1b09919eee3d98e65d48e3a2af8321ccf8a02) ) @@ -2281,7 +2300,7 @@ ROM_END ROM_START( csprints ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9*64k for T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9*64k for T11 code ROM_LOAD16_BYTE( "136045-2326.7l", 0x008000, 0x004000, CRC(fd4ed0d3) SHA1(22d7a290c56975b8af82054b5fd8c9298f17f99a) ) ROM_LOAD16_BYTE( "136045-2327.7n", 0x008001, 0x004000, CRC(5ef2a65a) SHA1(3ead2b91abca5ff95bffcd1fd40d3ff635d7801f) ) ROM_LOAD16_BYTE( "136045-2325.6f", 0x010000, 0x008000, CRC(57253376) SHA1(100901de38f8561fc29d5b135b76b24755a4b1b2) ) @@ -2291,7 +2310,7 @@ ROM_START( csprints ) ROM_LOAD16_BYTE( "136045-1123.6l", 0x070000, 0x008000, CRC(0a4d216a) SHA1(53a4af7673c9dae1f6f2f13dce3c38a31ee12ee2) ) ROM_LOAD16_BYTE( "136045-1120.6s", 0x070001, 0x008000, CRC(103f3fde) SHA1(9a0e82c3294369858b7a6c978143d8145a8df5a2) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "136045-1118.2bc", 0x008000, 0x004000, CRC(eba41b2f) SHA1(a0d6e9f4609f2587b0fad6845e75653c10bf4249) ) ROM_LOAD( "136045-1119.2d", 0x00c000, 0x004000, CRC(9e49043a) SHA1(ec467fe1cd59c51e43c3acd83d300f5b3309a47a) ) @@ -2326,7 +2345,7 @@ ROM_END ROM_START( csprint ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9*64k for T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9*64k for T11 code ROM_LOAD16_BYTE( "136045-3126.7l", 0x008000, 0x004000, CRC(1dcf8b98) SHA1(6d83ea725a8448cd1fc31cdce2e24662db6b9bcf) ) ROM_LOAD16_BYTE( "136045-2127.7n", 0x008001, 0x004000, CRC(bdcbe42c) SHA1(6dce564ce53f7171f8c713185cbf8b99a421ca41) ) ROM_LOAD16_BYTE( "136045-2125.6f", 0x010000, 0x008000, CRC(76cc68b9) SHA1(651dbe8862afe2b7985a0a1cd1dabdbb1accc163) ) @@ -2336,7 +2355,7 @@ ROM_START( csprint ) ROM_LOAD16_BYTE( "136045-1123.6l", 0x070000, 0x008000, CRC(0a4d216a) SHA1(53a4af7673c9dae1f6f2f13dce3c38a31ee12ee2) ) ROM_LOAD16_BYTE( "136045-1120.6s", 0x070001, 0x008000, CRC(103f3fde) SHA1(9a0e82c3294369858b7a6c978143d8145a8df5a2) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "136045-1118.2bc", 0x008000, 0x004000, CRC(eba41b2f) SHA1(a0d6e9f4609f2587b0fad6845e75653c10bf4249) ) ROM_LOAD( "136045-1119.2d", 0x00c000, 0x004000, CRC(9e49043a) SHA1(ec467fe1cd59c51e43c3acd83d300f5b3309a47a) ) @@ -2371,7 +2390,7 @@ ROM_END ROM_START( csprints1 ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9*64k for T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9*64k for T11 code ROM_LOAD16_BYTE( "136045-1326.7l", 0x008000, 0x004000, CRC(cfa673a6) SHA1(db630ce26b6b2cf9215a7810ab6b93a5485bd5ae) ) ROM_LOAD16_BYTE( "136045-1327.7n", 0x008001, 0x004000, CRC(16c1dcab) SHA1(deb3eaff35e7b3810133c7ce74a528d3a58babb2) ) ROM_LOAD16_BYTE( "136045-1325.6f", 0x010000, 0x008000, CRC(8661f17b) SHA1(a9271fca78eba39484b1f806f675a69e33007633) ) @@ -2381,7 +2400,7 @@ ROM_START( csprints1 ) ROM_LOAD16_BYTE( "136045-1123.6l", 0x070000, 0x008000, CRC(0a4d216a) SHA1(53a4af7673c9dae1f6f2f13dce3c38a31ee12ee2) ) ROM_LOAD16_BYTE( "136045-1120.6s", 0x070001, 0x008000, CRC(103f3fde) SHA1(9a0e82c3294369858b7a6c978143d8145a8df5a2) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "136045-1118.2bc", 0x008000, 0x004000, CRC(eba41b2f) SHA1(a0d6e9f4609f2587b0fad6845e75653c10bf4249) ) ROM_LOAD( "136045-1119.2d", 0x00c000, 0x004000, CRC(9e49043a) SHA1(ec467fe1cd59c51e43c3acd83d300f5b3309a47a) ) @@ -2416,7 +2435,7 @@ ROM_END ROM_START( csprintf ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9*64k for T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9*64k for T11 code ROM_LOAD16_BYTE( "136045-1626.7l", 0x008000, 0x004000, CRC(f9d4fbd3) SHA1(df8bea5190203be6157b0825af107c31404bbdf8) ) ROM_LOAD16_BYTE( "136045-1627.7n", 0x008001, 0x004000, CRC(637f0afa) SHA1(ef89300b3d8fd8c2ddba76c0cdd2589f5ae16c81) ) ROM_LOAD16_BYTE( "136045-1625.6f", 0x010000, 0x008000, CRC(1edc6462) SHA1(6e1653b71240fdc865dca7ea7916e8468245ea2f) ) @@ -2426,7 +2445,7 @@ ROM_START( csprintf ) ROM_LOAD16_BYTE( "136045-1123.6l", 0x070000, 0x008000, CRC(0a4d216a) SHA1(53a4af7673c9dae1f6f2f13dce3c38a31ee12ee2) ) ROM_LOAD16_BYTE( "136045-1120.6s", 0x070001, 0x008000, CRC(103f3fde) SHA1(9a0e82c3294369858b7a6c978143d8145a8df5a2) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "136045-1118.2bc", 0x008000, 0x004000, CRC(eba41b2f) SHA1(a0d6e9f4609f2587b0fad6845e75653c10bf4249) ) ROM_LOAD( "136045-1119.2d", 0x00c000, 0x004000, CRC(9e49043a) SHA1(ec467fe1cd59c51e43c3acd83d300f5b3309a47a) ) @@ -2461,7 +2480,7 @@ ROM_END ROM_START( csprintg ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9*64k for T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9*64k for T11 code ROM_LOAD16_BYTE( "136045-2226.7l", 0x008000, 0x004000, CRC(1f437a3f) SHA1(f976a023124d002e922669585eb22334720c15e5) ) ROM_LOAD16_BYTE( "136045-1227.7n", 0x008001, 0x004000, CRC(d1dce1cc) SHA1(2de07c4730e1b5e4b11466220bb350f3263d43e7) ) ROM_LOAD16_BYTE( "136045-1225.6f", 0x010000, 0x008000, CRC(e787da64) SHA1(8a5a9731b39808525a69522006801322d27d1e6b) ) @@ -2471,7 +2490,7 @@ ROM_START( csprintg ) ROM_LOAD16_BYTE( "136045-1123.6l", 0x070000, 0x008000, CRC(0a4d216a) SHA1(53a4af7673c9dae1f6f2f13dce3c38a31ee12ee2) ) ROM_LOAD16_BYTE( "136045-1120.6s", 0x070001, 0x008000, CRC(103f3fde) SHA1(9a0e82c3294369858b7a6c978143d8145a8df5a2) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "136045-1118.2bc", 0x008000, 0x004000, CRC(eba41b2f) SHA1(a0d6e9f4609f2587b0fad6845e75653c10bf4249) ) ROM_LOAD( "136045-1119.2d", 0x00c000, 0x004000, CRC(9e49043a) SHA1(ec467fe1cd59c51e43c3acd83d300f5b3309a47a) ) @@ -2506,7 +2525,7 @@ ROM_END ROM_START( csprint2 ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9*64k for T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9*64k for T11 code ROM_LOAD16_BYTE( "136045-2126.7l", 0x008000, 0x004000, CRC(0ff83de8) SHA1(23f90b8f3ebd3d3bbd7a68aaecae5f45f1b477c0) ) ROM_LOAD16_BYTE( "136045-1127.7n", 0x008001, 0x004000, CRC(e3e37258) SHA1(64f48c1acbb02cc8f6b76232d142382007485fb2) ) ROM_LOAD16_BYTE( "136045-1125.6f", 0x010000, 0x008000, CRC(650623d2) SHA1(036cb441aba64d08f3b50f72cb22fed3b4766341) ) @@ -2516,7 +2535,7 @@ ROM_START( csprint2 ) ROM_LOAD16_BYTE( "136045-1123.6l", 0x070000, 0x008000, CRC(0a4d216a) SHA1(53a4af7673c9dae1f6f2f13dce3c38a31ee12ee2) ) ROM_LOAD16_BYTE( "136045-1120.6s", 0x070001, 0x008000, CRC(103f3fde) SHA1(9a0e82c3294369858b7a6c978143d8145a8df5a2) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "136045-1118.2bc", 0x008000, 0x004000, CRC(eba41b2f) SHA1(a0d6e9f4609f2587b0fad6845e75653c10bf4249) ) ROM_LOAD( "136045-1119.2d", 0x00c000, 0x004000, CRC(9e49043a) SHA1(ec467fe1cd59c51e43c3acd83d300f5b3309a47a) ) @@ -2551,7 +2570,7 @@ ROM_END ROM_START( csprintg1 ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9*64k for T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9*64k for T11 code ROM_LOAD16_BYTE( "136045-1226.7l", 0x008000, 0x004000, CRC(becfc276) SHA1(cc3a6ef91fb3a47426a347ba4f6df41582e6deba) ) ROM_LOAD16_BYTE( "136045-1227.7n", 0x008001, 0x004000, CRC(d1dce1cc) SHA1(2de07c4730e1b5e4b11466220bb350f3263d43e7) ) ROM_LOAD16_BYTE( "136045-1225.6f", 0x010000, 0x008000, CRC(e787da64) SHA1(8a5a9731b39808525a69522006801322d27d1e6b) ) @@ -2561,7 +2580,7 @@ ROM_START( csprintg1 ) ROM_LOAD16_BYTE( "136045-1123.6l", 0x070000, 0x008000, CRC(0a4d216a) SHA1(53a4af7673c9dae1f6f2f13dce3c38a31ee12ee2) ) ROM_LOAD16_BYTE( "136045-1120.6s", 0x070001, 0x008000, CRC(103f3fde) SHA1(9a0e82c3294369858b7a6c978143d8145a8df5a2) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "136045-1118.2bc", 0x008000, 0x004000, CRC(eba41b2f) SHA1(a0d6e9f4609f2587b0fad6845e75653c10bf4249) ) ROM_LOAD( "136045-1119.2d", 0x00c000, 0x004000, CRC(9e49043a) SHA1(ec467fe1cd59c51e43c3acd83d300f5b3309a47a) ) @@ -2596,7 +2615,7 @@ ROM_END ROM_START( csprint1 ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9*64k for T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9*64k for T11 code ROM_LOAD16_BYTE( "136045-1126.7l", 0x008000, 0x004000, CRC(a04ecbac) SHA1(56a77c9fd8cdd963616cf25838ade2a87a87947b) ) ROM_LOAD16_BYTE( "136045-1127.7n", 0x008001, 0x004000, CRC(e3e37258) SHA1(64f48c1acbb02cc8f6b76232d142382007485fb2) ) ROM_LOAD16_BYTE( "136045-1125.6f", 0x010000, 0x008000, CRC(650623d2) SHA1(036cb441aba64d08f3b50f72cb22fed3b4766341) ) @@ -2606,7 +2625,7 @@ ROM_START( csprint1 ) ROM_LOAD16_BYTE( "136045-1123.6l", 0x070000, 0x008000, CRC(0a4d216a) SHA1(53a4af7673c9dae1f6f2f13dce3c38a31ee12ee2) ) ROM_LOAD16_BYTE( "136045-1120.6s", 0x070001, 0x008000, CRC(103f3fde) SHA1(9a0e82c3294369858b7a6c978143d8145a8df5a2) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "136045-1118.2bc", 0x008000, 0x004000, CRC(eba41b2f) SHA1(a0d6e9f4609f2587b0fad6845e75653c10bf4249) ) ROM_LOAD( "136045-1119.2d", 0x00c000, 0x004000, CRC(9e49043a) SHA1(ec467fe1cd59c51e43c3acd83d300f5b3309a47a) ) @@ -2641,7 +2660,7 @@ ROM_END ROM_START( apb ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9 * 64k T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9 * 64k T11 code ROM_LOAD16_BYTE( "136051-2126.7l", 0x008000, 0x004000, CRC(8edf4726) SHA1(48ee833c84808abe0eb8b7932abf082af09066da) ) ROM_LOAD16_BYTE( "136051-2127.7n", 0x008001, 0x004000, CRC(e2b2aff2) SHA1(bded098d56d68a95333eb68bc0c9629a2257aa16) ) ROM_LOAD16_BYTE( "136051-7128.6f", 0x010000, 0x010000, CRC(c08504d2) SHA1(91762807270b6294f676efb40a2a7deb3732f358) ) @@ -2651,7 +2670,7 @@ ROM_START( apb ) ROM_LOAD16_BYTE( "136051-1132.6l", 0x070000, 0x010000, CRC(6d0e7a4e) SHA1(75aae74571c50d36639d0ae69b0614e5aedeb6e3) ) ROM_LOAD16_BYTE( "136051-1133.6s", 0x070001, 0x010000, CRC(af88d429) SHA1(432720afd4179d3df871226e0eb576d2ffde44c1) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "136051-5134.2a", 0x004000, 0x004000, CRC(1c8bdeed) SHA1(bbdbbb9a4903f98842d9a697410a2e3a2069284c) ) ROM_LOAD( "136051-5135.2bc", 0x008000, 0x004000, CRC(ed6adb91) SHA1(b1f1f0d1bda445a53de798fb6847c605afe53e3c) ) ROM_LOAD( "136051-5136.2d", 0x00c000, 0x004000, CRC(341f8486) SHA1(4cea39c0d8551ce7193e51de341f7297a94b8d9b) ) @@ -2712,7 +2731,7 @@ ROM_END ROM_START( apb6 ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9 * 64k T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9 * 64k T11 code ROM_LOAD16_BYTE( "136051-2126.7l", 0x008000, 0x004000, CRC(8edf4726) SHA1(48ee833c84808abe0eb8b7932abf082af09066da) ) ROM_LOAD16_BYTE( "136051-2127.7n", 0x008001, 0x004000, CRC(e2b2aff2) SHA1(bded098d56d68a95333eb68bc0c9629a2257aa16) ) ROM_LOAD16_BYTE( "136051-6128.6f", 0x010000, 0x010000, CRC(c852959d) SHA1(1bc5c3130ad5c9eae40646db25a038f93a802822) ) @@ -2722,7 +2741,7 @@ ROM_START( apb6 ) ROM_LOAD16_BYTE( "136051-1132.6l", 0x070000, 0x010000, CRC(6d0e7a4e) SHA1(75aae74571c50d36639d0ae69b0614e5aedeb6e3) ) ROM_LOAD16_BYTE( "136051-1133.6s", 0x070001, 0x010000, CRC(af88d429) SHA1(432720afd4179d3df871226e0eb576d2ffde44c1) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "136051-5134.2a", 0x004000, 0x004000, CRC(1c8bdeed) SHA1(bbdbbb9a4903f98842d9a697410a2e3a2069284c) ) ROM_LOAD( "136051-5135.2bc", 0x008000, 0x004000, CRC(ed6adb91) SHA1(b1f1f0d1bda445a53de798fb6847c605afe53e3c) ) ROM_LOAD( "136051-5136.2d", 0x00c000, 0x004000, CRC(341f8486) SHA1(4cea39c0d8551ce7193e51de341f7297a94b8d9b) ) @@ -2783,7 +2802,7 @@ ROM_END ROM_START( apb5 ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9 * 64k T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9 * 64k T11 code ROM_LOAD16_BYTE( "136051-2126.7l", 0x008000, 0x004000, CRC(8edf4726) SHA1(48ee833c84808abe0eb8b7932abf082af09066da) ) ROM_LOAD16_BYTE( "136051-2127.7n", 0x008001, 0x004000, CRC(e2b2aff2) SHA1(bded098d56d68a95333eb68bc0c9629a2257aa16) ) ROM_LOAD16_BYTE( "136051-5128.6f", 0x010000, 0x010000, CRC(4b4ff365) SHA1(89b203c03501a8762b24baa7dc911eaa76e259b3) ) @@ -2793,7 +2812,7 @@ ROM_START( apb5 ) ROM_LOAD16_BYTE( "136051-1132.6l", 0x070000, 0x010000, CRC(6d0e7a4e) SHA1(75aae74571c50d36639d0ae69b0614e5aedeb6e3) ) ROM_LOAD16_BYTE( "136051-1133.6s", 0x070001, 0x010000, CRC(af88d429) SHA1(432720afd4179d3df871226e0eb576d2ffde44c1) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "136051-5134.2a", 0x004000, 0x004000, CRC(1c8bdeed) SHA1(bbdbbb9a4903f98842d9a697410a2e3a2069284c) ) ROM_LOAD( "136051-5135.2bc", 0x008000, 0x004000, CRC(ed6adb91) SHA1(b1f1f0d1bda445a53de798fb6847c605afe53e3c) ) ROM_LOAD( "136051-5136.2d", 0x00c000, 0x004000, CRC(341f8486) SHA1(4cea39c0d8551ce7193e51de341f7297a94b8d9b) ) @@ -2854,7 +2873,7 @@ ROM_END ROM_START( apb4 ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9 * 64k T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9 * 64k T11 code ROM_LOAD16_BYTE( "136051-2126.7l", 0x008000, 0x004000, CRC(8edf4726) SHA1(48ee833c84808abe0eb8b7932abf082af09066da) ) ROM_LOAD16_BYTE( "136051-2127.7n", 0x008001, 0x004000, CRC(e2b2aff2) SHA1(bded098d56d68a95333eb68bc0c9629a2257aa16) ) ROM_LOAD16_BYTE( "136051-4128.6f", 0x010000, 0x010000, CRC(46009f6b) SHA1(344cbb6cc5c1ad5c1aec26ca12cafaf73305d801) ) @@ -2864,7 +2883,7 @@ ROM_START( apb4 ) ROM_LOAD16_BYTE( "136051-1132.6l", 0x070000, 0x010000, CRC(6d0e7a4e) SHA1(75aae74571c50d36639d0ae69b0614e5aedeb6e3) ) ROM_LOAD16_BYTE( "136051-1133.6s", 0x070001, 0x010000, CRC(af88d429) SHA1(432720afd4179d3df871226e0eb576d2ffde44c1) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "136051-5134.2a", 0x004000, 0x004000, CRC(1c8bdeed) SHA1(bbdbbb9a4903f98842d9a697410a2e3a2069284c) ) ROM_LOAD( "136051-5135.2bc", 0x008000, 0x004000, CRC(ed6adb91) SHA1(b1f1f0d1bda445a53de798fb6847c605afe53e3c) ) ROM_LOAD( "136051-5136.2d", 0x00c000, 0x004000, CRC(341f8486) SHA1(4cea39c0d8551ce7193e51de341f7297a94b8d9b) ) @@ -2925,7 +2944,7 @@ ROM_END ROM_START( apb3 ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9 * 64k T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9 * 64k T11 code ROM_LOAD16_BYTE( "136051-2126.7l", 0x008000, 0x004000, CRC(8edf4726) SHA1(48ee833c84808abe0eb8b7932abf082af09066da) ) ROM_LOAD16_BYTE( "136051-2127.7n", 0x008001, 0x004000, CRC(e2b2aff2) SHA1(bded098d56d68a95333eb68bc0c9629a2257aa16) ) ROM_LOAD16_BYTE( "136051-3128.6f", 0x010000, 0x010000, CRC(cbdbfb42) SHA1(2ae94264122d20903e760225468929396a7c855c) ) @@ -2935,7 +2954,7 @@ ROM_START( apb3 ) ROM_LOAD16_BYTE( "136051-1132.6l", 0x070000, 0x010000, CRC(6d0e7a4e) SHA1(75aae74571c50d36639d0ae69b0614e5aedeb6e3) ) ROM_LOAD16_BYTE( "136051-1133.6s", 0x070001, 0x010000, CRC(af88d429) SHA1(432720afd4179d3df871226e0eb576d2ffde44c1) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "136051-1134.2a", 0x004000, 0x004000, CRC(a65748b9) SHA1(20d51300382543f09e47bee7273b9074e5a4618a) ) ROM_LOAD( "136051-1135.2bc", 0x008000, 0x004000, CRC(e9692cea) SHA1(2b2d9638e012d326777e2e730e28cbacea6d9a72) ) ROM_LOAD( "136051-1136.2d", 0x00c000, 0x004000, CRC(92fc7657) SHA1(cfda3a191a5f7ee4157f9d226bcf3dd601cabee1) ) @@ -2996,7 +3015,7 @@ ROM_END ROM_START( apb2 ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9 * 64k T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9 * 64k T11 code ROM_LOAD16_BYTE( "136051-2126.7l", 0x008000, 0x004000, CRC(8edf4726) SHA1(48ee833c84808abe0eb8b7932abf082af09066da) ) ROM_LOAD16_BYTE( "136051-2127.7n", 0x008001, 0x004000, CRC(e2b2aff2) SHA1(bded098d56d68a95333eb68bc0c9629a2257aa16) ) ROM_LOAD16_BYTE( "136051-2128.6f", 0x010000, 0x010000, CRC(61a81436) SHA1(d4b964e4b1a801c9b4ed984d8b20a988d3a1f485) ) @@ -3006,7 +3025,7 @@ ROM_START( apb2 ) ROM_LOAD16_BYTE( "136051-1132.6l", 0x070000, 0x010000, CRC(6d0e7a4e) SHA1(75aae74571c50d36639d0ae69b0614e5aedeb6e3) ) ROM_LOAD16_BYTE( "136051-1133.6s", 0x070001, 0x010000, CRC(af88d429) SHA1(432720afd4179d3df871226e0eb576d2ffde44c1) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "136051-1134.2a", 0x004000, 0x004000, CRC(a65748b9) SHA1(20d51300382543f09e47bee7273b9074e5a4618a) ) ROM_LOAD( "136051-1135.2bc", 0x008000, 0x004000, CRC(e9692cea) SHA1(2b2d9638e012d326777e2e730e28cbacea6d9a72) ) ROM_LOAD( "136051-1136.2d", 0x00c000, 0x004000, CRC(92fc7657) SHA1(cfda3a191a5f7ee4157f9d226bcf3dd601cabee1) ) @@ -3067,7 +3086,7 @@ ROM_END ROM_START( apb1 ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9 * 64k T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9 * 64k T11 code ROM_LOAD16_BYTE( "136051-1126.7l", 0x008000, 0x004000, CRC(d385994c) SHA1(647ceccc4b434fca5a58e64193a369defc3d9c49) ) ROM_LOAD16_BYTE( "136051-1127.7n", 0x008001, 0x004000, CRC(9b40b0b4) SHA1(e23885e66ce2ad437db6e02313d2db11f3498bba) ) ROM_LOAD16_BYTE( "136051-1128.6f", 0x010000, 0x010000, CRC(8d5d9f4a) SHA1(96dcbd034f431dfad424331e0854a0c418988055) ) @@ -3077,7 +3096,7 @@ ROM_START( apb1 ) ROM_LOAD16_BYTE( "136051-1132.6l", 0x070000, 0x010000, CRC(6d0e7a4e) SHA1(75aae74571c50d36639d0ae69b0614e5aedeb6e3) ) ROM_LOAD16_BYTE( "136051-1133.6s", 0x070001, 0x010000, CRC(af88d429) SHA1(432720afd4179d3df871226e0eb576d2ffde44c1) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "136051-1134.2a", 0x004000, 0x004000, CRC(a65748b9) SHA1(20d51300382543f09e47bee7273b9074e5a4618a) ) ROM_LOAD( "136051-1135.2bc", 0x008000, 0x004000, CRC(e9692cea) SHA1(2b2d9638e012d326777e2e730e28cbacea6d9a72) ) ROM_LOAD( "136051-1136.2d", 0x00c000, 0x004000, CRC(92fc7657) SHA1(cfda3a191a5f7ee4157f9d226bcf3dd601cabee1) ) @@ -3138,7 +3157,7 @@ ROM_END ROM_START( apbg ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9 * 64k T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9 * 64k T11 code ROM_LOAD16_BYTE( "136051-2126.7l", 0x008000, 0x004000, CRC(8edf4726) SHA1(48ee833c84808abe0eb8b7932abf082af09066da) ) ROM_LOAD16_BYTE( "136051-2127.7n", 0x008001, 0x004000, CRC(e2b2aff2) SHA1(bded098d56d68a95333eb68bc0c9629a2257aa16) ) ROM_LOAD16_BYTE( "136051-1228.6f", 0x010000, 0x010000, CRC(44781913) SHA1(46659edbbbe664a22d3dbef63a62757d87403365) ) @@ -3148,7 +3167,7 @@ ROM_START( apbg ) ROM_LOAD16_BYTE( "136051-1132.6l", 0x070000, 0x010000, CRC(6d0e7a4e) SHA1(75aae74571c50d36639d0ae69b0614e5aedeb6e3) ) ROM_LOAD16_BYTE( "136051-1133.6s", 0x070001, 0x010000, CRC(af88d429) SHA1(432720afd4179d3df871226e0eb576d2ffde44c1) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "136051-4134.2a", 0x004000, 0x004000, CRC(45e03b0e) SHA1(d58f5e1095fd6a7c0253fcc9f0e55812c1677387) ) ROM_LOAD( "136051-4135.2bc", 0x008000, 0x004000, CRC(b4ca24b2) SHA1(86461da310b334f6b32c0e079de6852792284cc6) ) ROM_LOAD( "136051-4136.2d", 0x00c000, 0x004000, CRC(11efaabf) SHA1(76446b09bf7cacd713ab88d58793460c9d1a8b9b) ) @@ -3209,7 +3228,7 @@ ROM_END ROM_START( apbf ) - ROM_REGION( 0x90000, "maincpu", 0 ) /* 9 * 64k T11 code */ + ROM_REGION( 0x90000, "maincpu", 0 ) // 9 * 64k T11 code ROM_LOAD16_BYTE( "136051-2126.7l", 0x008000, 0x004000, CRC(8edf4726) SHA1(48ee833c84808abe0eb8b7932abf082af09066da) ) ROM_LOAD16_BYTE( "136051-2127.7n", 0x008001, 0x004000, CRC(e2b2aff2) SHA1(bded098d56d68a95333eb68bc0c9629a2257aa16) ) ROM_LOAD16_BYTE( "136051-1628.6f", 0x010000, 0x010000, CRC(075e9a18) SHA1(48376a51210f5967b355ea2ed83e967ac28de455) ) @@ -3219,7 +3238,7 @@ ROM_START( apbf ) ROM_LOAD16_BYTE( "136051-1132.6l", 0x070000, 0x010000, CRC(6d0e7a4e) SHA1(75aae74571c50d36639d0ae69b0614e5aedeb6e3) ) ROM_LOAD16_BYTE( "136051-1133.6s", 0x070001, 0x010000, CRC(af88d429) SHA1(432720afd4179d3df871226e0eb576d2ffde44c1) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */ + ROM_REGION( 0x10000, "audiocpu", 0 ) // 64k for 6502 code ROM_LOAD( "136051-5134.2a", 0x004000, 0x004000, CRC(1c8bdeed) SHA1(bbdbbb9a4903f98842d9a697410a2e3a2069284c) ) ROM_LOAD( "136051-5135.2bc", 0x008000, 0x004000, CRC(ed6adb91) SHA1(b1f1f0d1bda445a53de798fb6847c605afe53e3c) ) ROM_LOAD( "136051-5136.2d", 0x00c000, 0x004000, CRC(341f8486) SHA1(4cea39c0d8551ce7193e51de341f7297a94b8d9b) ) @@ -3291,7 +3310,7 @@ void atarisy2_state::init_paperboy() m_slapstic->slapstic_init(); - /* expand the 16k program ROMs into full 64k chunks */ + // expand the 16k program ROMs into full 64k chunks for (int i = 0x10000; i < 0x90000; i += 0x20000) { memcpy(&cpu1[i + 0x08000], &cpu1[i], 0x8000); @@ -3319,7 +3338,7 @@ void atarisy2_state::init_ssprint() m_slapstic->slapstic_init(); - /* expand the 32k program ROMs into full 64k chunks */ + // expand the 32k program ROMs into full 64k chunks for (int i = 0x10000; i < 0x90000; i += 0x20000) memcpy(&cpu1[i + 0x10000], &cpu1[i], 0x10000); @@ -3333,7 +3352,7 @@ void atarisy2_state::init_csprint() m_slapstic->slapstic_init(); - /* expand the 32k program ROMs into full 64k chunks */ + // expand the 32k program ROMs into full 64k chunks for (int i = 0x10000; i < 0x90000; i += 0x20000) memcpy(&cpu1[i + 0x10000], &cpu1[i], 0x10000); diff --git a/src/mame/drivers/batman.cpp b/src/mame/drivers/batman.cpp index bb289c4565e..f95324f26ee 100644 --- a/src/mame/drivers/batman.cpp +++ b/src/mame/drivers/batman.cpp @@ -186,7 +186,7 @@ GFXDECODE_END void batman_state::batman(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, ATARI_CLOCK_14MHz); + M68000(config, m_maincpu, 14.318181_MHz_XTAL); m_maincpu->set_addrmap(AS_PROGRAM, &batman_state::main_map); EEPROM_2816(config, "eeprom").lock_after_write(true); @@ -208,7 +208,7 @@ void batman_state::batman(machine_config &config) m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK); /* note: these parameters are from published specs, not derived */ /* the board uses a VAD chip to generate video signals */ - m_screen->set_raw(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240); + m_screen->set_raw(14.318181_MHz_XTAL/2, 456, 0, 336, 262, 0, 240); m_screen->set_screen_update(FUNC(batman_state::screen_update_batman)); m_screen->set_palette("palette"); diff --git a/src/mame/drivers/beathead.cpp b/src/mame/drivers/beathead.cpp index e5590015a80..bcb16369f56 100644 --- a/src/mame/drivers/beathead.cpp +++ b/src/mame/drivers/beathead.cpp @@ -336,7 +336,7 @@ INPUT_PORTS_END void beathead_state::beathead(machine_config &config) { /* basic machine hardware */ - ASAP(config, m_maincpu, ATARI_CLOCK_14MHz); + ASAP(config, m_maincpu, 14.318181_MHz_XTAL); m_maincpu->set_addrmap(AS_PROGRAM, &beathead_state::main_map); EEPROM_2804(config, "eeprom").lock_after_write(true); diff --git a/src/mame/drivers/blstroid.cpp b/src/mame/drivers/blstroid.cpp index d7e7e4dc1f5..6c0297bd625 100644 --- a/src/mame/drivers/blstroid.cpp +++ b/src/mame/drivers/blstroid.cpp @@ -182,7 +182,7 @@ GFXDECODE_END void blstroid_state::blstroid(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, ATARI_CLOCK_14MHz/2); + M68000(config, m_maincpu, 14.318181_MHz_XTAL/2); m_maincpu->set_addrmap(AS_PROGRAM, &blstroid_state::main_map); EEPROM_2804(config, "eeprom").lock_after_write(true); @@ -205,7 +205,7 @@ void blstroid_state::blstroid(machine_config &config) m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK); /* note: these parameters are from published specs, not derived */ /* the board uses an SOS-2 chip to generate video signals */ - m_screen->set_raw(ATARI_CLOCK_14MHz, 456*2, 0, 320*2, 262, 0, 240); + m_screen->set_raw(14.318181_MHz_XTAL, 456*2, 0, 320*2, 262, 0, 240); m_screen->set_screen_update(FUNC(blstroid_state::screen_update_blstroid)); m_screen->set_palette("palette"); m_screen->screen_vblank().set_inputline(m_maincpu, M68K_IRQ_2, ASSERT_LINE); diff --git a/src/mame/drivers/cyberbal.cpp b/src/mame/drivers/cyberbal.cpp index 10977d71f14..890702b8937 100644 --- a/src/mame/drivers/cyberbal.cpp +++ b/src/mame/drivers/cyberbal.cpp @@ -341,10 +341,10 @@ GFXDECODE_END void cyberbal_state::cyberbal_base(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, ATARI_CLOCK_14MHz/2); + M68000(config, m_maincpu, 14.318181_MHz_XTAL/2); m_maincpu->set_addrmap(AS_PROGRAM, &cyberbal_state::main_map); - M68000(config, m_extracpu, ATARI_CLOCK_14MHz/2); + M68000(config, m_extracpu, 14.318181_MHz_XTAL/2); m_extracpu->set_addrmap(AS_PROGRAM, &cyberbal_state::extra_map); config.set_maximum_quantum(attotime::from_hz(600)); @@ -379,7 +379,7 @@ void cyberbal_state::cyberbal_base(machine_config &config) m_lscreen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK); /* note: these parameters are from published specs, not derived */ /* the board uses an SOS-2 chip to generate video signals */ - m_lscreen->set_raw(ATARI_CLOCK_14MHz, 456*2, 0, 336*2, 262, 0, 240); + m_lscreen->set_raw(14.318181_MHz_XTAL, 456*2, 0, 336*2, 262, 0, 240); m_lscreen->set_screen_update(FUNC(cyberbal_state::screen_update_cyberbal_left)); m_lscreen->set_palette("lpalette"); m_lscreen->screen_vblank().set(FUNC(cyberbal_state::video_int_write_line)); /* or is it "right?" har, har! */ @@ -388,7 +388,7 @@ void cyberbal_state::cyberbal_base(machine_config &config) m_rscreen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK); /* note: these parameters are from published specs, not derived */ /* the board uses an SOS-2 chip to generate video signals */ - m_rscreen->set_raw(ATARI_CLOCK_14MHz, 456*2, 0, 336*2, 262, 0, 240); + m_rscreen->set_raw(14.318181_MHz_XTAL, 456*2, 0, 336*2, 262, 0, 240); m_rscreen->set_screen_update(FUNC(cyberbal_state::screen_update_cyberbal_right)); m_rscreen->set_palette("rpalette"); @@ -421,7 +421,7 @@ void cyberbal_state::cyberbalt(machine_config &config) void cyberbal2p_state::cyberbal2p(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, ATARI_CLOCK_14MHz/2); + M68000(config, m_maincpu, 14.318181_MHz_XTAL/2); m_maincpu->set_addrmap(AS_PROGRAM, &cyberbal2p_state::cyberbal2p_map); EEPROM_2816(config, "eeprom").lock_after_write(true); @@ -446,7 +446,7 @@ void cyberbal2p_state::cyberbal2p(machine_config &config) m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK); /* note: these parameters are from published specs, not derived */ /* the board uses an SOS-2 chip to generate video signals */ - m_screen->set_raw(ATARI_CLOCK_14MHz, 456*2, 0, 336*2, 262, 0, 240); + m_screen->set_raw(14.318181_MHz_XTAL, 456*2, 0, 336*2, 262, 0, 240); m_screen->set_screen_update(FUNC(cyberbal2p_state::screen_update_cyberbal2p)); m_screen->set_palette("palette"); m_screen->screen_vblank().set(FUNC(cyberbal2p_state::video_int_write_line)); diff --git a/src/mame/drivers/cybstorm.cpp b/src/mame/drivers/cybstorm.cpp index eea490e4e92..e8359cffba7 100644 --- a/src/mame/drivers/cybstorm.cpp +++ b/src/mame/drivers/cybstorm.cpp @@ -225,7 +225,7 @@ GFXDECODE_END void cybstorm_state::round2(machine_config &config) { /* basic machine hardware */ - M68EC020(config, m_maincpu, ATARI_CLOCK_14MHz); + M68EC020(config, m_maincpu, 14.318181_MHz_XTAL); m_maincpu->set_addrmap(AS_PROGRAM, &cybstorm_state::main_map); EEPROM_2816(config, "eeprom").lock_after_write(true); @@ -250,7 +250,7 @@ void cybstorm_state::round2(machine_config &config) m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK); /* note: these parameters are from published specs, not derived */ /* the board uses an SOS-2 chip to generate video signals */ - m_screen->set_raw(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240); + m_screen->set_raw(14.318181_MHz_XTAL/2, 456, 0, 336, 262, 0, 240); m_screen->set_screen_update(FUNC(cybstorm_state::screen_update_cybstorm)); } diff --git a/src/mame/drivers/eprom.cpp b/src/mame/drivers/eprom.cpp index 6cc775ec517..f5bd2ae8c6e 100644 --- a/src/mame/drivers/eprom.cpp +++ b/src/mame/drivers/eprom.cpp @@ -368,17 +368,17 @@ GFXDECODE_END void eprom_state::eprom(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, ATARI_CLOCK_14MHz/2); + M68000(config, m_maincpu, 14.318181_MHz_XTAL/2); m_maincpu->set_addrmap(AS_PROGRAM, &eprom_state::main_map); - M68000(config, m_extra, ATARI_CLOCK_14MHz/2); + M68000(config, m_extra, 14.318181_MHz_XTAL/2); m_extra->set_addrmap(AS_PROGRAM, &eprom_state::extra_map); config.set_maximum_quantum(attotime::from_hz(6000)); TIMER(config, "scantimer").configure_scanline(FUNC(eprom_state::scanline_update), m_screen, 0, 8); - ADC0809(config, m_adc, ATARI_CLOCK_14MHz/16); + ADC0809(config, m_adc, 14.318181_MHz_XTAL/16); m_adc->in_callback<0>().set_ioport("ADC0"); m_adc->in_callback<1>().set_ioport("ADC1"); m_adc->in_callback<2>().set_ioport("ADC2"); @@ -402,7 +402,7 @@ void eprom_state::eprom(machine_config &config) m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK); /* note: these parameters are from published specs, not derived */ /* the board uses a SYNGEN chip to generate video signals */ - m_screen->set_raw(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240); + m_screen->set_raw(14.318181_MHz_XTAL/2, 456, 0, 336, 262, 0, 240); m_screen->set_screen_update(FUNC(eprom_state::screen_update_eprom)); m_screen->set_palette(m_palette); m_screen->screen_vblank().set_inputline(m_maincpu, M68K_IRQ_4, ASSERT_LINE); @@ -424,7 +424,7 @@ void eprom_state::eprom(machine_config &config) void eprom_state::klaxp(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, ATARI_CLOCK_14MHz/2); + M68000(config, m_maincpu, 14.318181_MHz_XTAL/2); m_maincpu->set_addrmap(AS_PROGRAM, &eprom_state::main_map); config.set_maximum_quantum(attotime::from_hz(600)); @@ -449,7 +449,7 @@ void eprom_state::klaxp(machine_config &config) m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK); /* note: these parameters are from published specs, not derived */ /* the board uses a SYNGEN chip to generate video signals */ - m_screen->set_raw(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240); + m_screen->set_raw(14.318181_MHz_XTAL/2, 456, 0, 336, 262, 0, 240); m_screen->set_screen_update(FUNC(eprom_state::screen_update_eprom)); m_screen->set_palette(m_palette); m_screen->screen_vblank().set_inputline(m_maincpu, M68K_IRQ_4, ASSERT_LINE); @@ -469,14 +469,14 @@ void eprom_state::klaxp(machine_config &config) void eprom_state::guts(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, ATARI_CLOCK_14MHz/2); + M68000(config, m_maincpu, 14.318181_MHz_XTAL/2); m_maincpu->set_addrmap(AS_PROGRAM, &eprom_state::guts_map); config.set_maximum_quantum(attotime::from_hz(600)); TIMER(config, "scantimer").configure_scanline(FUNC(eprom_state::scanline_update), m_screen, 0, 8); - ADC0809(config, m_adc, ATARI_CLOCK_14MHz/16); + ADC0809(config, m_adc, 14.318181_MHz_XTAL/16); m_adc->in_callback<0>().set_ioport("ADC0"); m_adc->in_callback<1>().set_ioport("ADC1"); m_adc->in_callback<2>().set_ioport("ADC2"); @@ -500,7 +500,7 @@ void eprom_state::guts(machine_config &config) m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK); /* note: these parameters are from published specs, not derived */ /* the board uses a SYNGEN chip to generate video signals */ - m_screen->set_raw(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240); + m_screen->set_raw(14.318181_MHz_XTAL/2, 456, 0, 336, 262, 0, 240); m_screen->set_screen_update(FUNC(eprom_state::screen_update_guts)); m_screen->set_palette(m_palette); m_screen->screen_vblank().set_inputline(m_maincpu, M68K_IRQ_4, ASSERT_LINE); diff --git a/src/mame/drivers/gauntlet.cpp b/src/mame/drivers/gauntlet.cpp index 421cbd189f5..fe5d7c458e0 100644 --- a/src/mame/drivers/gauntlet.cpp +++ b/src/mame/drivers/gauntlet.cpp @@ -148,26 +148,23 @@ void gauntlet_state::video_int_ack_w(uint16_t data) TIMER_DEVICE_CALLBACK_MEMBER(gauntlet_state::scanline_update) { - /* sound IRQ is on 32V */ + // sound IRQ is on 32V if (param & 32) - m_soundcomm->sound_irq_gen(*m_audiocpu); - else - m_soundcomm->sound_irq_ack_w(); + m_audiocpu->set_input_line(m6502_device::IRQ_LINE, ASSERT_LINE); } -void gauntlet_state::machine_start() +uint8_t gauntlet_state::sound_irq_ack_r() { - atarigen_state::machine_start(); - save_item(NAME(m_sound_reset_val)); + if (!machine().side_effects_disabled()) + m_audiocpu->set_input_line(m6502_device::IRQ_LINE, CLEAR_LINE); + return 0xff; } -void gauntlet_state::machine_reset() +void gauntlet_state::sound_irq_ack_w(uint8_t data) { - m_sound_reset_val = 1; - - atarigen_state::machine_reset(); + m_audiocpu->set_input_line(m6502_device::IRQ_LINE, CLEAR_LINE); } @@ -178,25 +175,14 @@ void gauntlet_state::machine_reset() * *************************************/ -WRITE16_MEMBER(gauntlet_state::sound_reset_w) +WRITE_LINE_MEMBER(gauntlet_state::sound_reset_w) { - if (ACCESSING_BITS_0_7) + m_audiocpu->set_input_line(INPUT_LINE_RESET, state ? CLEAR_LINE : ASSERT_LINE); + m_soundctl->clear_w(state); + if (!state) { - int oldword = m_sound_reset_val; - COMBINE_DATA(&m_sound_reset_val); - - if ((oldword ^ m_sound_reset_val) & 1) - { - m_audiocpu->set_input_line(INPUT_LINE_RESET, (m_sound_reset_val & 1) ? CLEAR_LINE : ASSERT_LINE); - m_soundctl->clear_w(m_sound_reset_val & 1); - m_soundcomm->sound_cpu_reset(); - if (m_sound_reset_val & 1) - { - m_ym2151->set_output_gain(ALL_OUTPUTS, 0.0f); - m_pokey->set_output_gain(ALL_OUTPUTS, 0.0f); - m_tms5220->set_output_gain(ALL_OUTPUTS, 0.0f); - } - } + m_mainlatch->acknowledge_w(); + mixer_w(0); } } @@ -208,12 +194,12 @@ WRITE16_MEMBER(gauntlet_state::sound_reset_w) * *************************************/ -READ8_MEMBER(gauntlet_state::switch_6502_r) +uint8_t gauntlet_state::switch_6502_r() { int temp = 0x30; - if (m_soundcomm->main_to_sound_ready()) temp ^= 0x80; - if (m_soundcomm->sound_to_main_ready()) temp ^= 0x40; + if (m_soundlatch->pending_r()) temp ^= 0x80; + if (m_mainlatch->pending_r()) temp ^= 0x40; if (!m_tms5220->readyq_r()) temp ^= 0x20; if (!(ioport("803008")->read() & 0x0008)) temp ^= 0x10; @@ -230,7 +216,7 @@ READ8_MEMBER(gauntlet_state::switch_6502_r) WRITE_LINE_MEMBER(gauntlet_state::speech_squeak_w) { uint8_t data = 5 | (state ? 2 : 0); - m_tms5220->set_unscaled_clock(ATARI_CLOCK_14MHz/2 / (16 - data)); + m_tms5220->set_unscaled_clock(14.318181_MHz_XTAL/2 / (16 - data)); } WRITE_LINE_MEMBER(gauntlet_state::coin_counter_left_w) @@ -253,7 +239,7 @@ WRITE_LINE_MEMBER(gauntlet_state::coin_counter_right_w) * *************************************/ -WRITE8_MEMBER(gauntlet_state::mixer_w) +void gauntlet_state::mixer_w(uint8_t data) { m_ym2151->set_output_gain(ALL_OUTPUTS, (data & 7) / 7.0f); m_pokey->set_output_gain(ALL_OUTPUTS, ((data >> 3) & 3) / 3.0f); @@ -268,15 +254,15 @@ WRITE8_MEMBER(gauntlet_state::mixer_w) * *************************************/ -/* full map verified from schematics */ +// full map verified from schematics void gauntlet_state::main_map(address_map &map) { map.unmap_value_high(); map(0x000000, 0x037fff).mirror(0x280000).rom(); - map(0x038000, 0x03ffff).mirror(0x280000).rom(); /* slapstic maps here */ + map(0x038000, 0x03ffff).mirror(0x280000).rom(); // slapstic maps here map(0x040000, 0x07ffff).mirror(0x280000).rom(); - /* MBUS */ + // MBUS map(0x800000, 0x801fff).mirror(0x2fc000).ram(); map(0x802000, 0x802fff).mirror(0x2fc000).rw("eeprom", FUNC(eeprom_parallel_28xx_device::read), FUNC(eeprom_parallel_28xx_device::write)).umask16(0x00ff); map(0x803000, 0x803001).mirror(0x2fcef0).portr("803000"); @@ -284,14 +270,14 @@ void gauntlet_state::main_map(address_map &map) map(0x803004, 0x803005).mirror(0x2fcef0).portr("803004"); map(0x803006, 0x803007).mirror(0x2fcef0).portr("803006"); map(0x803008, 0x803009).mirror(0x2fcef0).portr("803008"); - map(0x80300f, 0x80300f).mirror(0x2fcef0).r(m_soundcomm, FUNC(atari_sound_comm_device::main_response_r)); + map(0x80300f, 0x80300f).mirror(0x2fcef0).r(m_mainlatch, FUNC(generic_latch_8_device::read)); map(0x803100, 0x803101).mirror(0x2fce8e).w("watchdog", FUNC(watchdog_timer_device::reset16_w)); - map(0x803120, 0x803121).mirror(0x2fce8e).w(m_soundcomm, FUNC(atari_sound_comm_device::sound_reset_w)); + map(0x803120, 0x80312f).mirror(0x2fce80).w("outlatch", FUNC(ls259_device::write_d0)).umask16(0x00ff); map(0x803140, 0x803141).mirror(0x2fce8e).w(FUNC(gauntlet_state::video_int_ack_w)); map(0x803150, 0x803151).mirror(0x2fce8e).w("eeprom", FUNC(eeprom_parallel_28xx_device::unlock_write16)); - map(0x803171, 0x803171).mirror(0x2fce8e).w(m_soundcomm, FUNC(atari_sound_comm_device::main_command_w)); + map(0x803171, 0x803171).mirror(0x2fce8e).w(m_soundlatch, FUNC(generic_latch_8_device::write)); - /* VBUS */ + // VBUS map(0x900000, 0x901fff).mirror(0x2c8000).ram().w(m_playfield_tilemap, FUNC(tilemap_device::write16)).share("playfield"); map(0x902000, 0x903fff).mirror(0x2c8000).ram().share("mob"); map(0x904000, 0x904fff).mirror(0x2c8000).ram(); @@ -310,20 +296,20 @@ void gauntlet_state::main_map(address_map &map) * *************************************/ -/* full map verified from schematics */ +// full map verified from schematics void gauntlet_state::sound_map(address_map &map) { map.unmap_value_high(); map(0x0000, 0x0fff).mirror(0x2000).ram(); - map(0x1000, 0x100f).mirror(0x27c0).w(m_soundcomm, FUNC(atari_sound_comm_device::sound_response_w)); - map(0x1010, 0x101f).mirror(0x27c0).r(m_soundcomm, FUNC(atari_sound_comm_device::sound_command_r)); + map(0x1000, 0x100f).mirror(0x27c0).w(m_mainlatch, FUNC(generic_latch_8_device::write)); + map(0x1010, 0x101f).mirror(0x27c0).r(m_soundlatch, FUNC(generic_latch_8_device::read)); map(0x1020, 0x102f).mirror(0x27c0).portr("COIN").w(FUNC(gauntlet_state::mixer_w)); map(0x1030, 0x1030).mirror(0x27cf).r(FUNC(gauntlet_state::switch_6502_r)); map(0x1030, 0x1037).mirror(0x27c8).w(m_soundctl, FUNC(ls259_device::write_d7)); map(0x1800, 0x180f).mirror(0x27c0).rw(m_pokey, FUNC(pokey_device::read), FUNC(pokey_device::write)); map(0x1810, 0x1811).mirror(0x27ce).rw(m_ym2151, FUNC(ym2151_device::read), FUNC(ym2151_device::write)); map(0x1820, 0x182f).mirror(0x27c0).w(m_tms5220, FUNC(tms5220_device::data_w)); - map(0x1830, 0x183f).mirror(0x27c0).rw(m_soundcomm, FUNC(atari_sound_comm_device::sound_irq_ack_r), FUNC(atari_sound_comm_device::sound_irq_ack_w)); + map(0x1830, 0x183f).mirror(0x27c0).rw(FUNC(gauntlet_state::sound_irq_ack_r), FUNC(gauntlet_state::sound_irq_ack_w)); map(0x4000, 0xffff).rom(); } @@ -379,12 +365,12 @@ static INPUT_PORTS_START( gauntlet ) PORT_START("803008") PORT_BIT( 0x0007, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_SERVICE( 0x0008, IP_ACTIVE_LOW ) - PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_ATARI_COMM_SOUND_TO_MAIN_READY("soundcomm") - PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_ATARI_COMM_MAIN_TO_SOUND_READY("soundcomm") + PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("mainlatch", generic_latch_8_device, pending_r) // SNDBUF + PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("soundlatch", generic_latch_8_device, pending_r) // 68KBUF PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") PORT_BIT( 0xff80, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_START("COIN") /* 1020 (sound) */ + PORT_START("COIN") // 1020 (sound) PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN4 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) @@ -427,12 +413,12 @@ static INPUT_PORTS_START( vindctr2 ) PORT_START("803008") PORT_BIT( 0x0007, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_SERVICE( 0x0008, IP_ACTIVE_LOW ) - PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_ATARI_COMM_SOUND_TO_MAIN_READY("soundcomm") - PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_ATARI_COMM_MAIN_TO_SOUND_READY("soundcomm") + PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("mainlatch", generic_latch_8_device, pending_r) // SNDBUF + PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("soundlatch", generic_latch_8_device, pending_r) // 68KBUF PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") PORT_BIT( 0xff80, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_START("COIN") /* 1020 (sound) */ + PORT_START("COIN") // 1020 (sound) PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN4 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) @@ -487,20 +473,27 @@ GFXDECODE_END void gauntlet_state::gauntlet_base(machine_config &config) { - /* basic machine hardware */ - M68010(config, m_maincpu, ATARI_CLOCK_14MHz/2); + // basic machine hardware + M68010(config, m_maincpu, 14.318181_MHz_XTAL/2); m_maincpu->set_addrmap(AS_PROGRAM, &gauntlet_state::main_map); - M6502(config, m_audiocpu, ATARI_CLOCK_14MHz/8); + M6502(config, m_audiocpu, 14.318181_MHz_XTAL/8); m_audiocpu->set_addrmap(AS_PROGRAM, &gauntlet_state::sound_map); EEPROM_2804(config, "eeprom").lock_after_write(true); + ls259_device &outlatch(LS259(config, "outlatch")); // 14A + //outlatch.q_out_cb<0>().set_output("led1").invert(); // LEDs not connected? + //outlatch.q_out_cb<1>().set_output("led2").invert(); + //outlatch.q_out_cb<2>().set_output("led3").invert(); + //outlatch.q_out_cb<3>().set_output("led4").invert(); + outlatch.q_out_cb<7>().set(FUNC(gauntlet_state::sound_reset_w)); + TIMER(config, "scantimer").configure_scanline(FUNC(gauntlet_state::scanline_update), m_screen, 0, 32); - WATCHDOG_TIMER(config, "watchdog"); + WATCHDOG_TIMER(config, "watchdog").set_vblank_count(m_screen, 8); - /* video hardware */ + // video hardware GFXDECODE(config, m_gfxdecode, "palette", gfx_gauntlet); PALETTE(config, "palette").set_format(palette_device::IRGB_4444, 1024); @@ -513,28 +506,32 @@ void gauntlet_state::gauntlet_base(machine_config &config) SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK); - /* note: these parameters are from published specs, not derived */ - /* the board uses a SYNGEN chip to generate video signals */ - m_screen->set_raw(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240); + // note: these parameters are from published specs, not derived + // the board uses a SYNGEN chip to generate video signals + m_screen->set_raw(14.318181_MHz_XTAL/2, 456, 0, 336, 262, 0, 240); m_screen->set_screen_update(FUNC(gauntlet_state::screen_update_gauntlet)); m_screen->set_palette("palette"); m_screen->screen_vblank().set_inputline(m_maincpu, M68K_IRQ_4, ASSERT_LINE); - /* sound hardware */ - ATARI_SOUND_COMM(config, m_soundcomm, m_audiocpu) - .int_callback().set_inputline(m_maincpu, M68K_IRQ_6); + // sound hardware SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - YM2151(config, m_ym2151, ATARI_CLOCK_14MHz/4); + GENERIC_LATCH_8(config, m_soundlatch); + m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, m6502_device::NMI_LINE); + + GENERIC_LATCH_8(config, m_mainlatch); + m_mainlatch->data_pending_callback().set_inputline(m_maincpu, M68K_IRQ_6); + + YM2151(config, m_ym2151, 14.318181_MHz_XTAL/4); m_ym2151->add_route(1, "lspeaker", 0.48); m_ym2151->add_route(0, "rspeaker", 0.48); - POKEY(config, m_pokey, ATARI_CLOCK_14MHz/8); + POKEY(config, m_pokey, 14.318181_MHz_XTAL/8); m_pokey->add_route(ALL_OUTPUTS, "lspeaker", 0.32); m_pokey->add_route(ALL_OUTPUTS, "rspeaker", 0.32); - TMS5220C(config, m_tms5220, ATARI_CLOCK_14MHz/2/11); /* potentially ATARI_CLOCK_14MHz/2/9 as well */ + TMS5220C(config, m_tms5220, 14.318181_MHz_XTAL/2/11); // potentially 14.318181_MHz_XTAL/2/9 as well m_tms5220->add_route(ALL_OUTPUTS, "lspeaker", 0.80); m_tms5220->add_route(ALL_OUTPUTS, "rspeaker", 0.80); @@ -1659,14 +1656,14 @@ void gauntlet_state::common_init(int vindctr2) uint8_t *rom = memregion("maincpu")->base(); slapstic_configure(*m_maincpu, 0x038000, 0, memregion("maincpu")->base() + 0x38000); - /* swap the top and bottom halves of the main CPU ROM images */ + // swap the top and bottom halves of the main CPU ROM images swap_memory(rom + 0x000000, rom + 0x008000, 0x8000); swap_memory(rom + 0x040000, rom + 0x048000, 0x8000); swap_memory(rom + 0x050000, rom + 0x058000, 0x8000); swap_memory(rom + 0x060000, rom + 0x068000, 0x8000); swap_memory(rom + 0x070000, rom + 0x078000, 0x8000); - /* indicate whether or not we are vindicators 2 */ + // indicate whether or not we are vindicators 2 m_vindctr2_screen_refresh = vindctr2; } diff --git a/src/mame/drivers/offtwall.cpp b/src/mame/drivers/offtwall.cpp index b802d4b2a9b..1394be336e8 100644 --- a/src/mame/drivers/offtwall.cpp +++ b/src/mame/drivers/offtwall.cpp @@ -339,7 +339,7 @@ GFXDECODE_END void offtwall_state::offtwall(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, ATARI_CLOCK_14MHz/2); + M68000(config, m_maincpu, 14.318181_MHz_XTAL/2); m_maincpu->set_addrmap(AS_PROGRAM, &offtwall_state::main_map); EEPROM_2816(config, "eeprom").lock_after_write(true); @@ -359,7 +359,7 @@ void offtwall_state::offtwall(machine_config &config) screen.set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK); /* note: these parameters are from published specs, not derived */ /* the board uses a VAD chip to generate video signals */ - screen.set_raw(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240); + screen.set_raw(14.318181_MHz_XTAL/2, 456, 0, 336, 262, 0, 240); screen.set_screen_update(FUNC(offtwall_state::screen_update_offtwall)); screen.set_palette("palette"); diff --git a/src/mame/drivers/skullxbo.cpp b/src/mame/drivers/skullxbo.cpp index 55af11f0f50..cafe5f233d6 100644 --- a/src/mame/drivers/skullxbo.cpp +++ b/src/mame/drivers/skullxbo.cpp @@ -238,7 +238,7 @@ GFXDECODE_END void skullxbo_state::skullxbo(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, ATARI_CLOCK_14MHz/2); + M68000(config, m_maincpu, 14.318181_MHz_XTAL/2); m_maincpu->set_addrmap(AS_PROGRAM, &skullxbo_state::main_map); TIMER(config, "scantimer").configure_scanline(FUNC(skullxbo_state::scanline_timer), m_screen, 0, 8); @@ -261,7 +261,7 @@ void skullxbo_state::skullxbo(machine_config &config) m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK); /* note: these parameters are from published specs, not derived */ /* the board uses an SOS-2 chip to generate video signals */ - m_screen->set_raw(ATARI_CLOCK_14MHz, 456*2, 0, 336*2, 262, 0, 240); + m_screen->set_raw(14.318181_MHz_XTAL, 456*2, 0, 336*2, 262, 0, 240); m_screen->set_screen_update(FUNC(skullxbo_state::screen_update_skullxbo)); m_screen->set_palette("palette"); m_screen->screen_vblank().set_inputline(m_maincpu, M68K_IRQ_2, ASSERT_LINE); diff --git a/src/mame/drivers/thunderj.cpp b/src/mame/drivers/thunderj.cpp index 571a18a4638..c5b3bc292f4 100644 --- a/src/mame/drivers/thunderj.cpp +++ b/src/mame/drivers/thunderj.cpp @@ -244,10 +244,10 @@ GFXDECODE_END void thunderj_state::thunderj(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, ATARI_CLOCK_14MHz/2); + M68000(config, m_maincpu, 14.318181_MHz_XTAL/2); m_maincpu->set_addrmap(AS_PROGRAM, &thunderj_state::main_map); - M68000(config, m_extra, ATARI_CLOCK_14MHz/2); + M68000(config, m_extra, 14.318181_MHz_XTAL/2); m_extra->set_addrmap(AS_PROGRAM, &thunderj_state::extra_map); EEPROM_2816(config, "eeprom").lock_after_write(true); @@ -272,7 +272,7 @@ void thunderj_state::thunderj(machine_config &config) m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK); /* note: these parameters are from published specs, not derived */ /* the board uses a VAD chip to generate video signals */ - m_screen->set_raw(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240); + m_screen->set_raw(14.318181_MHz_XTAL/2, 456, 0, 336, 262, 0, 240); m_screen->set_screen_update(FUNC(thunderj_state::screen_update_thunderj)); m_screen->set_palette("palette"); diff --git a/src/mame/drivers/vindictr.cpp b/src/mame/drivers/vindictr.cpp index 533fa4838de..b5e4e2fbd7d 100644 --- a/src/mame/drivers/vindictr.cpp +++ b/src/mame/drivers/vindictr.cpp @@ -189,7 +189,7 @@ GFXDECODE_END void vindictr_state::vindictr(machine_config &config) { /* basic machine hardware */ - M68010(config, m_maincpu, ATARI_CLOCK_14MHz/2); + M68010(config, m_maincpu, 14.318181_MHz_XTAL/2); m_maincpu->set_addrmap(AS_PROGRAM, &vindictr_state::main_map); TIMER(config, "scantimer").configure_scanline(FUNC(vindictr_state::scanline_update), m_screen, 0, 8); @@ -212,7 +212,7 @@ void vindictr_state::vindictr(machine_config &config) m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK); /* note: these parameters are from published specs, not derived */ /* the board uses a SYNGEN chip to generate video signals */ - m_screen->set_raw(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240); + m_screen->set_raw(14.318181_MHz_XTAL/2, 456, 0, 336, 262, 0, 240); m_screen->set_screen_update(FUNC(vindictr_state::screen_update_vindictr)); m_screen->set_palette(m_palette); diff --git a/src/mame/drivers/xybots.cpp b/src/mame/drivers/xybots.cpp index 52a0e1acc02..bcd4093b3ae 100644 --- a/src/mame/drivers/xybots.cpp +++ b/src/mame/drivers/xybots.cpp @@ -178,7 +178,7 @@ GFXDECODE_END void xybots_state::xybots(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, ATARI_CLOCK_14MHz/2); + M68000(config, m_maincpu, 14.318181_MHz_XTAL/2); m_maincpu->set_addrmap(AS_PROGRAM, &xybots_state::main_map); SLAPSTIC(config, "slapstic", 107, true); @@ -201,7 +201,7 @@ void xybots_state::xybots(machine_config &config) m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK); /* note: these parameters are from published specs, not derived */ /* the board uses a SYNGEN chip to generate video signals */ - m_screen->set_raw(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240); + m_screen->set_raw(14.318181_MHz_XTAL/2, 456, 0, 336, 262, 0, 240); m_screen->set_screen_update(FUNC(xybots_state::screen_update_xybots)); m_screen->set_palette("palette"); m_screen->screen_vblank().set_inputline(m_maincpu, M68K_IRQ_1, ASSERT_LINE); diff --git a/src/mame/includes/atarisy1.h b/src/mame/includes/atarisy1.h index 7f3a0a46144..a515eb4c3be 100644 --- a/src/mame/includes/atarisy1.h +++ b/src/mame/includes/atarisy1.h @@ -10,9 +10,11 @@ #pragma once +#include "machine/6522via.h" #include "machine/74259.h" #include "machine/adc0808.h" #include "machine/atarigen.h" +#include "machine/gen_latch.h" #include "machine/input_merger.h" #include "machine/timer.h" #include "sound/tms5220.h" @@ -27,25 +29,46 @@ public: atarisy1_state(const machine_config &mconfig, device_type type, const char *tag) : atarigen_state(mconfig, type, tag) , m_audiocpu(*this, "audiocpu") - , m_soundcomm(*this, "soundcomm") - , m_bankselect(*this, "bankselect") + , m_soundlatch(*this, "soundlatch") + , m_mainlatch(*this, "mainlatch") , m_mob(*this, "mob") , m_palette(*this, "palette") , m_adc(*this, "adc") , m_ajsint(*this, "ajsint") , m_playfield_tilemap(*this, "playfield") , m_alpha_tilemap(*this, "alpha") + , m_xscroll(*this, "xscroll") + , m_yscroll(*this, "yscroll") , m_yscroll_reset_timer(*this, "yreset_timer") , m_scanline_timer(*this, "scan_timer") , m_int3off_timer(*this, "int3off_timer") , m_tms(*this, "tms") , m_outlatch(*this, "outlatch") + , m_via(*this, "via") { } - required_device m_audiocpu; - required_device m_soundcomm; + void indytemp(machine_config &config); + void roadb110(machine_config &config); + void peterpak(machine_config &config); + void roadrunn(machine_config &config); + void roadb109(machine_config &config); + void marble(machine_config &config); + + void init_roadblst(); + void init_peterpak(); + void init_marble(); + void init_roadrunn(); + void init_indytemp(); + +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + virtual void video_start() override; + + required_device m_audiocpu; + required_device m_soundlatch; + required_device m_mainlatch; - required_shared_ptr m_bankselect; required_device m_mob; required_device m_palette; @@ -58,6 +81,8 @@ public: /* playfield parameters */ required_device m_playfield_tilemap; required_device m_alpha_tilemap; + required_shared_ptr m_xscroll; + required_shared_ptr m_yscroll; uint16_t m_playfield_lookup[256]; uint8_t m_playfield_tile_bank; uint16_t m_playfield_priority_pens; @@ -73,45 +98,37 @@ public: required_device m_tms; required_device m_outlatch; + required_device m_via; /* graphics bank tracking */ uint8_t m_bank_gfx[3][8]; uint8_t m_bank_color_shift[MAX_GFX_ELEMENTS]; + uint8_t m_bankselect; uint8_t m_cur[2][2]; - void video_int_ack_w(uint16_t data = 0); - template DECLARE_READ8_MEMBER(digital_joystick_r); - DECLARE_READ8_MEMBER(adc_r); - DECLARE_WRITE8_MEMBER(adc_w); - DECLARE_READ16_MEMBER(trakball_r); - DECLARE_READ8_MEMBER(switch_6502_r); + void video_int_ack_w(uint8_t data = 0); + template uint8_t digital_joystick_r(); + uint8_t adc_r(offs_t offset); + void adc_w(offs_t offset, uint8_t data); + uint16_t trakball_r(offs_t offset); + uint8_t switch_6502_r(); DECLARE_WRITE_LINE_MEMBER(coin_counter_right_w); DECLARE_WRITE_LINE_MEMBER(coin_counter_left_w); - DECLARE_WRITE8_MEMBER(via_pa_w); - DECLARE_READ8_MEMBER(via_pa_r); - DECLARE_WRITE8_MEMBER(via_pb_w); - DECLARE_READ8_MEMBER(via_pb_r); - void init_roadblst(); - void init_peterpak(); - void init_marble(); - void init_roadrunn(); - void init_indytemp(); + void via_pb_w(uint8_t data); + uint8_t via_pb_r(); TILE_GET_INFO_MEMBER(get_alpha_tile_info); TILE_GET_INFO_MEMBER(get_playfield_tile_info); - DECLARE_MACHINE_START(atarisy1); - DECLARE_MACHINE_RESET(atarisy1); - DECLARE_VIDEO_START(atarisy1); uint32_t screen_update_atarisy1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - TIMER_DEVICE_CALLBACK_MEMBER(atarisy1_reset_yscroll_callback); - TIMER_DEVICE_CALLBACK_MEMBER(atarisy1_int3off_callback); - TIMER_DEVICE_CALLBACK_MEMBER(atarisy1_int3_callback); + TIMER_DEVICE_CALLBACK_MEMBER(reset_yscroll_callback); + TIMER_DEVICE_CALLBACK_MEMBER(int3off_callback); + TIMER_DEVICE_CALLBACK_MEMBER(int3_callback); virtual void update_timers(int scanline); void decode_gfx(uint16_t *pflookup, uint16_t *molookup); int get_bank(uint8_t prom1, uint8_t prom2, int bpp); DECLARE_READ16_MEMBER( atarisy1_int3state_r ); DECLARE_WRITE16_MEMBER( atarisy1_spriteram_w ); - DECLARE_WRITE16_MEMBER( atarisy1_bankselect_w ); + void bankselect_w(uint8_t data); DECLARE_WRITE16_MEMBER( atarisy1_xscroll_w ); DECLARE_WRITE16_MEMBER( atarisy1_yscroll_w ); DECLARE_WRITE16_MEMBER( atarisy1_priority_w ); @@ -119,12 +136,7 @@ public: static const atari_motion_objects_config s_mob_config; void add_adc(machine_config &config); void atarisy1(machine_config &config); - void indytemp(machine_config &config); - void roadb110(machine_config &config); - void peterpak(machine_config &config); - void roadrunn(machine_config &config); - void roadb109(machine_config &config); - void marble(machine_config &config); + void main_map(address_map &map); void sound_map(address_map &map); }; diff --git a/src/mame/includes/atarisy2.h b/src/mame/includes/atarisy2.h index 03a965fa513..30ce7e40fcf 100644 --- a/src/mame/includes/atarisy2.h +++ b/src/mame/includes/atarisy2.h @@ -6,10 +6,10 @@ *************************************************************************/ -#include "machine/atarigen.h" #include "cpu/m6502/m6502.h" #include "cpu/t11/t11.h" #include "machine/bankdev.h" +#include "machine/gen_latch.h" #include "machine/timer.h" #include "machine/watchdog.h" #include "sound/ym2151.h" @@ -17,22 +17,28 @@ #include "sound/tms5220.h" #include "video/atarimo.h" #include "emupal.h" +#include "screen.h" #include "slapstic.h" #include "tilemap.h" -class atarisy2_state : public atarigen_state +class atarisy2_state : public driver_device { public: atarisy2_state(const machine_config &mconfig, device_type type, const char *tag) - : atarigen_state(mconfig, type, tag) + : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") , m_audiocpu(*this, "audiocpu") + , m_gfxdecode(*this, "gfxdecode") + , m_screen(*this, "screen") , m_mob(*this, "mob") , m_slapstic_base(*this, "slapstic_base") , m_vrambank(*this, "vrambank") , m_playfield_tilemap(*this, "playfield") , m_alpha_tilemap(*this, "alpha") - , m_soundcomm(*this, "soundcomm") + , m_xscroll(*this, "xscroll") + , m_yscroll(*this, "yscroll") + , m_soundlatch(*this, "soundlatch") + , m_mainlatch(*this, "mainlatch") , m_ym2151(*this, "ymsnd") , m_pokey(*this, "pokey%u", 1U) , m_tms5220(*this, "tms") @@ -55,13 +61,18 @@ public: void csprint(machine_config &config); protected: + virtual void machine_start() override; + virtual void machine_reset() override; virtual void device_post_load() override; + virtual void video_start() override; private: void update_interrupts(); required_device m_maincpu; required_device m_audiocpu; + required_device m_gfxdecode; + required_device m_screen; required_device m_mob; required_shared_ptr m_slapstic_base; required_device m_vrambank; @@ -70,10 +81,13 @@ private: required_device m_playfield_tilemap; required_device m_alpha_tilemap; + required_shared_ptr m_xscroll; + required_shared_ptr m_yscroll; int8_t m_pedal_count; - required_device m_soundcomm; + required_device m_soundlatch; + required_device m_mainlatch; required_device m_ym2151; required_device_array m_pokey; optional_device m_tms5220; @@ -105,29 +119,28 @@ private: void scanline_int_ack_w(uint16_t data); void video_int_ack_w(uint16_t data); void int0_ack_w(uint16_t data); - void int1_ack_w(uint8_t data); + void sound_reset_w(uint8_t data); void int_enable_w(uint8_t data); - DECLARE_WRITE16_MEMBER(bankselect_w); - DECLARE_READ16_MEMBER(switch_r); - DECLARE_READ8_MEMBER(switch_6502_r); - DECLARE_WRITE8_MEMBER(switch_6502_w); - DECLARE_READ8_MEMBER(leta_r); - DECLARE_WRITE8_MEMBER(mixer_w); - DECLARE_WRITE8_MEMBER(sound_reset_w); - DECLARE_READ16_MEMBER(sound_r); - DECLARE_WRITE8_MEMBER(sound_6502_w); - DECLARE_READ8_MEMBER(sound_6502_r); - DECLARE_WRITE8_MEMBER(tms5220_w); - DECLARE_WRITE8_MEMBER(tms5220_strobe_w); - DECLARE_WRITE8_MEMBER(coincount_w); + INTERRUPT_GEN_MEMBER(sound_irq_gen); + void sound_irq_ack_w(uint8_t data); + void bankselect_w(offs_t offset, uint16_t data); + uint16_t switch_r(); + uint8_t switch_6502_r(); + void switch_6502_w(uint8_t data); + uint8_t leta_r(offs_t offset); + void mixer_w(uint8_t data); + void sndrst_6502_w(uint8_t data); + uint16_t sound_r(); + void sound_6502_w(uint8_t data); + uint8_t sound_6502_r(); + void tms5220_w(uint8_t data); + void tms5220_strobe_w(offs_t offset, uint8_t data); + void coincount_w(uint8_t data); TIMER_DEVICE_CALLBACK_MEMBER(scanline_update); TILE_GET_INFO_MEMBER(get_alpha_tile_info); TILE_GET_INFO_MEMBER(get_playfield_tile_info); - DECLARE_MACHINE_START(atarisy2); - DECLARE_MACHINE_RESET(atarisy2); - DECLARE_VIDEO_START(atarisy2); uint32_t screen_update_atarisy2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(vblank_int); TIMER_CALLBACK_MEMBER(delayed_int_enable_w); diff --git a/src/mame/includes/gauntlet.h b/src/mame/includes/gauntlet.h index b0d71469119..f91ca41b5a7 100644 --- a/src/mame/includes/gauntlet.h +++ b/src/mame/includes/gauntlet.h @@ -12,6 +12,7 @@ #include "machine/atarigen.h" #include "machine/74259.h" +#include "machine/gen_latch.h" #include "machine/timer.h" #include "video/atarimo.h" #include "sound/ym2151.h" @@ -25,13 +26,16 @@ public: gauntlet_state(const machine_config &mconfig, device_type type, const char *tag) : atarigen_state(mconfig, type, tag), m_audiocpu(*this, "audiocpu"), - m_soundcomm(*this, "soundcomm"), + m_soundlatch(*this, "soundlatch"), + m_mainlatch(*this, "mainlatch"), m_ym2151(*this, "ymsnd"), m_pokey(*this, "pokey"), m_tms5220(*this, "tms"), m_soundctl(*this, "soundctl"), m_playfield_tilemap(*this, "playfield"), m_alpha_tilemap(*this, "alpha"), + m_xscroll(*this, "xscroll"), + m_yscroll(*this, "yscroll"), m_mob(*this, "mob") { } @@ -43,19 +47,19 @@ public: void gauntlet2(machine_config &config); protected: - virtual void machine_start() override; - virtual void machine_reset() override; virtual void video_start() override; private: void video_int_ack_w(uint16_t data = 0); TIMER_DEVICE_CALLBACK_MEMBER(scanline_update); - DECLARE_WRITE16_MEMBER(sound_reset_w); - DECLARE_READ8_MEMBER(switch_6502_r); + uint8_t sound_irq_ack_r(); + void sound_irq_ack_w(uint8_t data); + DECLARE_WRITE_LINE_MEMBER(sound_reset_w); + uint8_t switch_6502_r(); DECLARE_WRITE_LINE_MEMBER(speech_squeak_w); DECLARE_WRITE_LINE_MEMBER(coin_counter_left_w); DECLARE_WRITE_LINE_MEMBER(coin_counter_right_w); - DECLARE_WRITE8_MEMBER(mixer_w); + void mixer_w(uint8_t data); void swap_memory(void *ptr1, void *ptr2, int bytes); void common_init(int vindctr2); TILE_GET_INFO_MEMBER(get_alpha_tile_info); @@ -69,7 +73,8 @@ private: void sound_map(address_map &map); required_device m_audiocpu; - required_device m_soundcomm; + required_device m_soundlatch; + required_device m_mainlatch; required_device m_ym2151; required_device m_pokey; required_device m_tms5220; @@ -77,6 +82,8 @@ private: required_device m_playfield_tilemap; required_device m_alpha_tilemap; + required_shared_ptr m_xscroll; + required_shared_ptr m_yscroll; required_device m_mob; uint16_t m_sound_reset_val; diff --git a/src/mame/includes/harddriv.h b/src/mame/includes/harddriv.h index 1952d022f5b..92780fe5c92 100644 --- a/src/mame/includes/harddriv.h +++ b/src/mame/includes/harddriv.h @@ -11,6 +11,7 @@ #pragma once #include "audio/atarijsa.h" +#include "includes/slapstic.h" #include "bus/rs232/rs232.h" diff --git a/src/mame/includes/skullxbo.h b/src/mame/includes/skullxbo.h index 90cd36a4c54..1c2eafedb4c 100644 --- a/src/mame/includes/skullxbo.h +++ b/src/mame/includes/skullxbo.h @@ -24,6 +24,8 @@ public: m_jsa(*this, "jsa"), m_playfield_tilemap(*this, "playfield"), m_alpha_tilemap(*this, "alpha"), + m_xscroll(*this, "xscroll"), + m_yscroll(*this, "yscroll"), m_mob(*this, "mob"), m_playfield_latch(-1), m_scanline_int_state(0) @@ -58,6 +60,8 @@ private: required_device m_jsa; required_device m_playfield_tilemap; required_device m_alpha_tilemap; + required_shared_ptr m_xscroll; + required_shared_ptr m_yscroll; required_device m_mob; int m_playfield_latch; diff --git a/src/mame/machine/atarigen.cpp b/src/mame/machine/atarigen.cpp index 64d6a928501..aa97e3828ee 100644 --- a/src/mame/machine/atarigen.cpp +++ b/src/mame/machine/atarigen.cpp @@ -9,315 +9,16 @@ ***************************************************************************/ #include "emu.h" -#include "cpu/m6502/m6502.h" #include "atarigen.h" -/*************************************************************************** - CONSTANTS -***************************************************************************/ - -#define SOUND_TIMER_RATE attotime::from_usec(5) -#define SOUND_TIMER_BOOST attotime::from_usec(1000) - - - -//************************************************************************** -// SOUND COMMUNICATIONS DEVICE -//************************************************************************** - -// device type definition -DEFINE_DEVICE_TYPE(ATARI_SOUND_COMM, atari_sound_comm_device, "atarscom", "Atari Sound Communications") - -//------------------------------------------------- -// atari_sound_comm_device - constructor -//------------------------------------------------- - -atari_sound_comm_device::atari_sound_comm_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) - : device_t(mconfig, ATARI_SOUND_COMM, tag, owner, clock) - , m_main_int_cb(*this) - , m_sound_cpu(*this, finder_base::DUMMY_TAG) - , m_main_to_sound_ready(false) - , m_sound_to_main_ready(false) - , m_main_to_sound_data(0) - , m_sound_to_main_data(0) - , m_timed_int(0) - , m_ym2151_int(0) -{ -} - - -//------------------------------------------------- -// device_start: Start up the device -//------------------------------------------------- - -void atari_sound_comm_device::device_start() -{ - // resolve callbacks - m_main_int_cb.resolve_safe(); - - // register for save states - save_item(NAME(m_main_to_sound_ready)); - save_item(NAME(m_sound_to_main_ready)); - save_item(NAME(m_main_to_sound_data)); - save_item(NAME(m_sound_to_main_data)); - save_item(NAME(m_timed_int)); - save_item(NAME(m_ym2151_int)); -} - - -//------------------------------------------------- -// device_reset: Handle a device reset by -// clearing the interrupt lines and states -//------------------------------------------------- - -void atari_sound_comm_device::device_reset() -{ - // reset the internal interrupts states - m_timed_int = m_ym2151_int = 0; - - // reset the sound I/O states - m_main_to_sound_data = m_sound_to_main_data = 0; - m_main_to_sound_ready = m_sound_to_main_ready = false; -} - - -//------------------------------------------------- -// device_timer: Handle device-specific timer -// calbacks -//------------------------------------------------- - -void atari_sound_comm_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) -{ - switch (id) - { - case TID_SOUND_RESET: - delayed_sound_reset(param); - break; - - case TID_SOUND_WRITE: - delayed_sound_write(param); - break; - - case TID_6502_WRITE: - delayed_6502_write(param); - break; - } -} - - -//------------------------------------------------- -// sound_irq_gen: Generates an IRQ signal to the -// 6502 sound processor. -//------------------------------------------------- - -INTERRUPT_GEN_MEMBER(atari_sound_comm_device::sound_irq_gen) -{ - sound_irq(); -} - -void atari_sound_comm_device::sound_irq() -{ - m_timed_int = 1; - update_sound_irq(); -} - -//------------------------------------------------- -// sound_irq_ack_r: Resets the IRQ signal to the -// 6502 sound processor. Both reads and writes -// can be used. -//------------------------------------------------- - -u8 atari_sound_comm_device::sound_irq_ack_r() -{ - if (!machine().side_effects_disabled()) - { - m_timed_int = 0; - update_sound_irq(); - } - return 0; -} - -void atari_sound_comm_device::sound_irq_ack_w(u8 data) -{ - m_timed_int = 0; - update_sound_irq(); -} - - -//------------------------------------------------- -// atarigen_ym2151_irq_gen: Sets the state of the -// YM2151's IRQ line. -//------------------------------------------------- - -WRITE_LINE_MEMBER(atari_sound_comm_device::ym2151_irq_gen) -{ - m_ym2151_int = state; - update_sound_irq(); -} - - -//------------------------------------------------- -// sound_reset_w: Write handler which resets the -// sound CPU in response. -//------------------------------------------------- - -void atari_sound_comm_device::sound_reset_w(u16 data) -{ - synchronize(TID_SOUND_RESET); -} - - -//------------------------------------------------- -// main_command_w: Handles communication from the main CPU -// to the sound CPU. Two versions are provided, one with the -// data byte in the low 8 bits, and one with the data byte in -// the upper 8 bits. -//------------------------------------------------- - -void atari_sound_comm_device::main_command_w(u8 data) -{ - synchronize(TID_SOUND_WRITE, data); -} - - -//------------------------------------------------- -// main_response_r: Handles reading data communicated from the -// sound CPU to the main CPU. Two versions are provided, one -// with the data byte in the low 8 bits, and one with the data -// byte in the upper 8 bits. -//------------------------------------------------- - -u8 atari_sound_comm_device::main_response_r() -{ - if (!machine().side_effects_disabled()) - { - m_sound_to_main_ready = false; - m_main_int_cb(CLEAR_LINE); - } - return m_sound_to_main_data; -} - - -//------------------------------------------------- -// sound_response_w: Handles communication from the -// sound CPU to the main CPU. -//------------------------------------------------- - -void atari_sound_comm_device::sound_response_w(u8 data) -{ - synchronize(TID_6502_WRITE, data); -} - - -//------------------------------------------------- -// sound_command_r: Handles reading data -// communicated from the main CPU to the sound -// CPU. -//------------------------------------------------- - -u8 atari_sound_comm_device::sound_command_r() -{ - if (!machine().side_effects_disabled()) - { - m_main_to_sound_ready = false; - m_sound_cpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); - } - return m_main_to_sound_data; -} - - -//------------------------------------------------- -// update_sound_irq: Called whenever the IRQ state -// changes. An interrupt is generated if either -// sound_irq_gen() was called, or if the YM2151 -// generated an interrupt via the -// ym2151_irq_gen() callback. -//------------------------------------------------- - -void atari_sound_comm_device::update_sound_irq() -{ - if (m_timed_int || m_ym2151_int) - m_sound_cpu->set_input_line(M6502_IRQ_LINE, ASSERT_LINE); - else - m_sound_cpu->set_input_line(M6502_IRQ_LINE, CLEAR_LINE); -} - - -//------------------------------------------------- -// delayed_sound_reset: Synchronizes the sound -// reset command between the two CPUs. -//------------------------------------------------- - -void atari_sound_comm_device::delayed_sound_reset(int param) -{ - // unhalt and reset the sound CPU - if (param == 0) - { - m_sound_cpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); - m_sound_cpu->pulse_input_line(INPUT_LINE_RESET, attotime::zero); - } - - // reset the sound write state - m_sound_to_main_ready = false; - m_main_int_cb(CLEAR_LINE); - - // allocate a high frequency timer until a response is generated - // the main CPU is *very* sensistive to the timing of the response - machine().scheduler().boost_interleave(SOUND_TIMER_RATE, SOUND_TIMER_BOOST); -} - - -//------------------------------------------------- -// delayed_sound_write: Synchronizes a data write -// from the main CPU to the sound CPU. -//------------------------------------------------- - -void atari_sound_comm_device::delayed_sound_write(int data) -{ - // warn if we missed something - if (m_main_to_sound_ready) - logerror("Missed command from 680x0\n"); - - // set up the states and signal an NMI to the sound CPU - m_main_to_sound_data = data; - m_main_to_sound_ready = true; - m_sound_cpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); - - // allocate a high frequency timer until a response is generated - // the main CPU is *very* sensistive to the timing of the response - machine().scheduler().boost_interleave(SOUND_TIMER_RATE, SOUND_TIMER_BOOST); -} - - -//------------------------------------------------- -// delayed_6502_write: Synchronizes a data write -// from the sound CPU to the main CPU. -//------------------------------------------------- - -void atari_sound_comm_device::delayed_6502_write(int data) -{ - // warn if we missed something - if (m_sound_to_main_ready) - logerror("Missed result from 6502\n"); - - // set up the states and signal the sound interrupt to the main CPU - m_sound_to_main_data = data; - m_sound_to_main_ready = true; - m_main_int_cb(ASSERT_LINE); -} - - - /*************************************************************************** OVERALL INIT ***************************************************************************/ atarigen_state::atarigen_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) - , m_xscroll(*this, "xscroll") - , m_yscroll(*this, "yscroll") , m_slapstic_num(0) , m_slapstic(nullptr) , m_slapstic_bank(0) diff --git a/src/mame/machine/atarigen.h b/src/mame/machine/atarigen.h index 740ed821231..3087536b004 100644 --- a/src/mame/machine/atarigen.h +++ b/src/mame/machine/atarigen.h @@ -12,109 +12,9 @@ #define MAME_MACHINE_ATARIGEN_H #include "includes/slapstic.h" -#include "cpu/m6502/m6502.h" #include "screen.h" -/*************************************************************************** - CONSTANTS -***************************************************************************/ - -#define ATARI_CLOCK_14MHz XTAL(14'318'181) -#define ATARI_CLOCK_20MHz XTAL(20'000'000) -#define ATARI_CLOCK_32MHz XTAL(32'000'000) -#define ATARI_CLOCK_50MHz XTAL(50'000'000) - - - -//************************************************************************** -// TYPE DEFINITIONS -//************************************************************************** - -#define PORT_ATARI_COMM_SOUND_TO_MAIN_READY(_tag) \ - PORT_READ_LINE_DEVICE_MEMBER(_tag, atari_sound_comm_device, sound_to_main_ready) - -#define PORT_ATARI_COMM_MAIN_TO_SOUND_READY(_tag) \ - PORT_READ_LINE_DEVICE_MEMBER(_tag, atari_sound_comm_device, main_to_sound_ready) - - -// ======================> atari_sound_comm_device - -// device type definition -DECLARE_DEVICE_TYPE(ATARI_SOUND_COMM, atari_sound_comm_device) - -class atari_sound_comm_device : public device_t -{ -public: - // construction/destruction - template - atari_sound_comm_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cputag) - : atari_sound_comm_device(mconfig, tag, owner, (u32)0) - { - m_sound_cpu.set_tag(std::forward(cputag)); - } - - atari_sound_comm_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); - - // configuration helpers - auto int_callback() { return m_main_int_cb.bind(); } - - // getters - DECLARE_READ_LINE_MEMBER(main_to_sound_ready) { return m_main_to_sound_ready ? ASSERT_LINE : CLEAR_LINE; } - DECLARE_READ_LINE_MEMBER(sound_to_main_ready) { return m_sound_to_main_ready ? ASSERT_LINE : CLEAR_LINE; } - - // main cpu accessors (forward internally to the atari_sound_comm_device) - void main_command_w(u8 data); - u8 main_response_r(); - void sound_reset_w(u16 data = 0); - - // sound cpu accessors - void sound_cpu_reset() { synchronize(TID_SOUND_RESET, 1); } - void sound_response_w(u8 data); - u8 sound_command_r(); - void sound_irq_ack_w(u8 data = 0); - u8 sound_irq_ack_r(); - INTERRUPT_GEN_MEMBER(sound_irq_gen); - void sound_irq(); - - // additional helpers - DECLARE_WRITE_LINE_MEMBER(ym2151_irq_gen); - -protected: - // sound I/O helpers - void update_sound_irq(); - void delayed_sound_reset(int param); - void delayed_sound_write(int data); - void delayed_6502_write(int data); - - // device-level overrides - virtual void device_start() override; - virtual void device_reset() override; - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; - -private: - // timer IDs - enum - { - TID_SOUND_RESET, - TID_SOUND_WRITE, - TID_6502_WRITE - }; - - // configuration state - devcb_write_line m_main_int_cb; - - // internal state - required_device m_sound_cpu; - bool m_main_to_sound_ready; - bool m_sound_to_main_ready; - u8 m_main_to_sound_data; - u8 m_sound_to_main_data; - u8 m_timed_int; - u8 m_ym2151_int; -}; - - /*************************************************************************** TYPES & STRUCTURES ***************************************************************************/ @@ -151,9 +51,6 @@ protected: TID_ATARIGEN_LAST }; - optional_shared_ptr m_xscroll; - optional_shared_ptr m_yscroll; - /* internal state */ u8 m_slapstic_num; u16 * m_slapstic; diff --git a/src/mame/machine/atariscom.cpp b/src/mame/machine/atariscom.cpp new file mode 100644 index 00000000000..7165482d2f6 --- /dev/null +++ b/src/mame/machine/atariscom.cpp @@ -0,0 +1,234 @@ +// license:BSD-3-Clause +// copyright-holders:Aaron Giles +/*************************************************************************** + + atariscom.cpp + + Atari sound communications device. + +***************************************************************************/ + +#include "emu.h" +#include "atariscom.h" +#include "cpu/m6502/m6502.h" + + + +/*************************************************************************** + CONSTANTS +***************************************************************************/ + +#define SOUND_TIMER_RATE attotime::from_usec(5) +#define SOUND_TIMER_BOOST attotime::from_usec(1000) + + + +//************************************************************************** +// SOUND COMMUNICATIONS DEVICE +//************************************************************************** + +// device type definition +DEFINE_DEVICE_TYPE(ATARI_SOUND_COMM, atari_sound_comm_device, "atariscom", "Atari Sound Communications") + +//------------------------------------------------- +// atari_sound_comm_device - constructor +//------------------------------------------------- + +atari_sound_comm_device::atari_sound_comm_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, ATARI_SOUND_COMM, tag, owner, clock) + , m_main_int_cb(*this) + , m_sound_cpu(*this, finder_base::DUMMY_TAG) + , m_main_to_sound_ready(false) + , m_sound_to_main_ready(false) + , m_main_to_sound_data(0) + , m_sound_to_main_data(0) +{ +} + + +//------------------------------------------------- +// device_start: Start up the device +//------------------------------------------------- + +void atari_sound_comm_device::device_start() +{ + // resolve callbacks + m_main_int_cb.resolve_safe(); + + // register for save states + save_item(NAME(m_main_to_sound_ready)); + save_item(NAME(m_sound_to_main_ready)); + save_item(NAME(m_main_to_sound_data)); + save_item(NAME(m_sound_to_main_data)); +} + + +//------------------------------------------------- +// device_reset: Handle a device reset by +// clearing the interrupt lines and states +//------------------------------------------------- + +void atari_sound_comm_device::device_reset() +{ + // reset the sound I/O states + m_main_to_sound_data = m_sound_to_main_data = 0; + m_main_to_sound_ready = m_sound_to_main_ready = false; +} + + +//------------------------------------------------- +// device_timer: Handle device-specific timer +// calbacks +//------------------------------------------------- + +void atari_sound_comm_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) +{ + switch (id) + { + case TID_SOUND_RESET: + delayed_sound_reset(param); + break; + + case TID_SOUND_WRITE: + delayed_sound_write(param); + break; + + case TID_6502_WRITE: + delayed_6502_write(param); + break; + } +} + + +//------------------------------------------------- +// sound_reset_w: Write handler which resets the +// sound CPU in response. +//------------------------------------------------- + +void atari_sound_comm_device::sound_reset_w(u16 data) +{ + synchronize(TID_SOUND_RESET); +} + + +//------------------------------------------------- +// main_command_w: Handles communication from the main CPU +// to the sound CPU. Two versions are provided, one with the +// data byte in the low 8 bits, and one with the data byte in +// the upper 8 bits. +//------------------------------------------------- + +void atari_sound_comm_device::main_command_w(u8 data) +{ + synchronize(TID_SOUND_WRITE, data); +} + + +//------------------------------------------------- +// main_response_r: Handles reading data communicated from the +// sound CPU to the main CPU. Two versions are provided, one +// with the data byte in the low 8 bits, and one with the data +// byte in the upper 8 bits. +//------------------------------------------------- + +u8 atari_sound_comm_device::main_response_r() +{ + if (!machine().side_effects_disabled()) + { + m_sound_to_main_ready = false; + m_main_int_cb(CLEAR_LINE); + } + return m_sound_to_main_data; +} + + +//------------------------------------------------- +// sound_response_w: Handles communication from the +// sound CPU to the main CPU. +//------------------------------------------------- + +void atari_sound_comm_device::sound_response_w(u8 data) +{ + synchronize(TID_6502_WRITE, data); +} + + +//------------------------------------------------- +// sound_command_r: Handles reading data +// communicated from the main CPU to the sound +// CPU. +//------------------------------------------------- + +u8 atari_sound_comm_device::sound_command_r() +{ + if (!machine().side_effects_disabled()) + { + m_main_to_sound_ready = false; + m_sound_cpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); + } + return m_main_to_sound_data; +} + + +//------------------------------------------------- +// delayed_sound_reset: Synchronizes the sound +// reset command between the two CPUs. +//------------------------------------------------- + +void atari_sound_comm_device::delayed_sound_reset(int param) +{ + // unhalt and reset the sound CPU + if (param == 0) + { + m_sound_cpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); + m_sound_cpu->pulse_input_line(INPUT_LINE_RESET, attotime::zero); + } + + // reset the sound write state + m_sound_to_main_ready = false; + m_main_int_cb(CLEAR_LINE); + + // allocate a high frequency timer until a response is generated + // the main CPU is *very* sensistive to the timing of the response + machine().scheduler().boost_interleave(SOUND_TIMER_RATE, SOUND_TIMER_BOOST); +} + + +//------------------------------------------------- +// delayed_sound_write: Synchronizes a data write +// from the main CPU to the sound CPU. +//------------------------------------------------- + +void atari_sound_comm_device::delayed_sound_write(int data) +{ + // warn if we missed something + if (m_main_to_sound_ready) + logerror("Missed command from 680x0\n"); + + // set up the states and signal an NMI to the sound CPU + m_main_to_sound_data = data; + m_main_to_sound_ready = true; + m_sound_cpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); + + // allocate a high frequency timer until a response is generated + // the main CPU is *very* sensistive to the timing of the response + machine().scheduler().boost_interleave(SOUND_TIMER_RATE, SOUND_TIMER_BOOST); +} + + +//------------------------------------------------- +// delayed_6502_write: Synchronizes a data write +// from the sound CPU to the main CPU. +//------------------------------------------------- + +void atari_sound_comm_device::delayed_6502_write(int data) +{ + // warn if we missed something + if (m_sound_to_main_ready) + logerror("Missed result from 6502\n"); + + // set up the states and signal the sound interrupt to the main CPU + m_sound_to_main_data = data; + m_sound_to_main_ready = true; + m_main_int_cb(ASSERT_LINE); +} diff --git a/src/mame/machine/atariscom.h b/src/mame/machine/atariscom.h new file mode 100644 index 00000000000..6b1d96917d5 --- /dev/null +++ b/src/mame/machine/atariscom.h @@ -0,0 +1,95 @@ +// license:BSD-3-Clause +// copyright-holders:Aaron Giles +/*************************************************************************** + + atariscom.h + + Atari sound communications device. + +***************************************************************************/ + +#ifndef MAME_MACHINE_ATARISCOM_H +#define MAME_MACHINE_ATARISCOM_H + +#pragma once + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +#define PORT_ATARI_COMM_SOUND_TO_MAIN_READY(_tag) \ + PORT_READ_LINE_DEVICE_MEMBER(_tag, atari_sound_comm_device, sound_to_main_ready) + +#define PORT_ATARI_COMM_MAIN_TO_SOUND_READY(_tag) \ + PORT_READ_LINE_DEVICE_MEMBER(_tag, atari_sound_comm_device, main_to_sound_ready) + + +// ======================> atari_sound_comm_device + +// device type definition +DECLARE_DEVICE_TYPE(ATARI_SOUND_COMM, atari_sound_comm_device) + +class atari_sound_comm_device : public device_t +{ +public: + // construction/destruction + template + atari_sound_comm_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cputag) + : atari_sound_comm_device(mconfig, tag, owner, (u32)0) + { + m_sound_cpu.set_tag(std::forward(cputag)); + } + + atari_sound_comm_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + // configuration helpers + auto int_callback() { return m_main_int_cb.bind(); } + + // getters + DECLARE_READ_LINE_MEMBER(main_to_sound_ready) { return m_main_to_sound_ready ? ASSERT_LINE : CLEAR_LINE; } + DECLARE_READ_LINE_MEMBER(sound_to_main_ready) { return m_sound_to_main_ready ? ASSERT_LINE : CLEAR_LINE; } + + // main cpu accessors (forward internally to the atari_sound_comm_device) + void main_command_w(u8 data); + u8 main_response_r(); + void sound_reset_w(u16 data = 0); + + // sound cpu accessors + void sound_cpu_reset() { synchronize(TID_SOUND_RESET, 1); } + void sound_response_w(u8 data); + u8 sound_command_r(); + +protected: + // sound I/O helpers + void delayed_sound_reset(int param); + void delayed_sound_write(int data); + void delayed_6502_write(int data); + + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; + +private: + // timer IDs + enum + { + TID_SOUND_RESET, + TID_SOUND_WRITE, + TID_6502_WRITE + }; + + // configuration state + devcb_write_line m_main_int_cb; + + // internal state + required_device m_sound_cpu; + bool m_main_to_sound_ready; + bool m_sound_to_main_ready; + u8 m_main_to_sound_data; + u8 m_sound_to_main_data; +}; + + +#endif // MAME_MACHINE_ATARISCOM_H diff --git a/src/mame/video/atarisy1.cpp b/src/mame/video/atarisy1.cpp index 2c8690b33a5..43d1769f9eb 100644 --- a/src/mame/video/atarisy1.cpp +++ b/src/mame/video/atarisy1.cpp @@ -144,18 +144,18 @@ const atari_motion_objects_config atarisy1_state::s_mob_config = 0xffff /* resulting value to indicate "special" */ }; -VIDEO_START_MEMBER(atarisy1_state,atarisy1) +void atarisy1_state::video_start() { - /* first decode the graphics */ + // first decode the graphics uint16_t motable[256]; decode_gfx(m_playfield_lookup, motable); - /* modify the motion object code lookup */ + // modify the motion object code lookup std::vector &codelookup = m_mob->code_lookup(); for (unsigned int i = 0; i < codelookup.size(); i++) codelookup[i] = (i & 0xff) | ((motable[i >> 8] & 0xff) << 8); - /* modify the motion object color and gfx lookups */ + // modify the motion object color and gfx lookups std::vector &colorlookup = m_mob->color_lookup(); std::vector &gfxlookup = m_mob->gfx_lookup(); for (unsigned int i = 0; i < colorlookup.size(); i++) @@ -164,16 +164,18 @@ VIDEO_START_MEMBER(atarisy1_state,atarisy1) gfxlookup[i] = (motable[i] >> 8) & 15; } - /* reset the statics */ + // reset the statics m_mob->set_yscroll(256); m_next_timer_scanline = -1; m_scanline_int_state = 0; + m_bankselect = 0xff; - /* save state */ + // save state save_item(NAME(m_playfield_tile_bank)); save_item(NAME(m_playfield_priority_pens)); save_item(NAME(m_next_timer_scanline)); save_item(NAME(m_scanline_int_state)); + save_item(NAME(m_bankselect)); } @@ -184,41 +186,44 @@ VIDEO_START_MEMBER(atarisy1_state,atarisy1) * *************************************/ -WRITE16_MEMBER( atarisy1_state::atarisy1_bankselect_w ) +void atarisy1_state::bankselect_w(uint8_t data) { - uint16_t oldselect = *m_bankselect; - uint16_t newselect = oldselect, diff; + uint8_t oldselect = m_bankselect; + uint8_t newselect = data; int scanline = m_screen->vpos(); - /* update memory */ - COMBINE_DATA(&newselect); - diff = oldselect ^ newselect; + // update memory + uint8_t diff = oldselect ^ newselect; - /* sound CPU reset */ + // sound CPU reset if (BIT(diff, 7)) { m_outlatch->clear_w(BIT(newselect, 7)); m_audiocpu->set_input_line(INPUT_LINE_RESET, BIT(newselect, 7) ? CLEAR_LINE : ASSERT_LINE); - if (!BIT(newselect, 7)) m_soundcomm->sound_cpu_reset(); + if (!BIT(newselect, 7)) + { + m_mainlatch->acknowledge_w(); + m_via->reset(); + } } - /* if MO or playfield banks change, force a partial update */ - if (diff & 0x003c) + // if MO or playfield banks change, force a partial update + if (diff & 0x3c) m_screen->update_partial(scanline); - /* motion object bank select */ + // motion object bank select m_mob->set_bank((newselect >> 3) & 7); update_timers(scanline); - /* playfield bank select */ - if (diff & 0x0004) + // playfield bank select + if (diff & 0x04) { m_playfield_tile_bank = (newselect >> 2) & 1; m_playfield_tilemap->mark_all_dirty(); } - /* stash the new value */ - *m_bankselect = newselect; + // stash the new value + m_bankselect = newselect; } @@ -274,7 +279,7 @@ WRITE16_MEMBER( atarisy1_state::atarisy1_xscroll_w ) * *************************************/ -TIMER_DEVICE_CALLBACK_MEMBER(atarisy1_state::atarisy1_reset_yscroll_callback) +TIMER_DEVICE_CALLBACK_MEMBER(atarisy1_state::reset_yscroll_callback) { m_playfield_tilemap->set_scrolly(0, param); } @@ -354,26 +359,26 @@ WRITE16_MEMBER( atarisy1_state::atarisy1_spriteram_w ) * *************************************/ -TIMER_DEVICE_CALLBACK_MEMBER(atarisy1_state::atarisy1_int3off_callback) +TIMER_DEVICE_CALLBACK_MEMBER(atarisy1_state::int3off_callback) { - /* clear the state */ + // clear the state m_scanline_int_state = 0; m_maincpu->set_input_line(M68K_IRQ_3, CLEAR_LINE); } -TIMER_DEVICE_CALLBACK_MEMBER(atarisy1_state::atarisy1_int3_callback) +TIMER_DEVICE_CALLBACK_MEMBER(atarisy1_state::int3_callback) { int scanline = param; - /* update the state */ + // update the state m_scanline_int_state = 1; m_maincpu->set_input_line(M68K_IRQ_3, ASSERT_LINE); - /* set a timer to turn it off */ + // set a timer to turn it off m_int3off_timer->adjust(m_screen->scan_period()); - /* determine the time of the next one */ + // determine the time of the next one m_next_timer_scanline = -1; update_timers(scanline); } diff --git a/src/mame/video/atarisy2.cpp b/src/mame/video/atarisy2.cpp index 25461544f2f..ad4b00ae52b 100644 --- a/src/mame/video/atarisy2.cpp +++ b/src/mame/video/atarisy2.cpp @@ -77,13 +77,13 @@ const atari_motion_objects_config atarisy2_state::s_mob_config = 0 /* resulting value to indicate "special" */ }; -VIDEO_START_MEMBER(atarisy2_state,atarisy2) +void atarisy2_state::video_start() { - /* reset the statics */ + // reset the statics m_yscroll_reset_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(atarisy2_state::reset_yscroll_callback),this)); m_vrambank->set_bank(0); - /* save states */ + // save states save_item(NAME(m_playfield_tile_bank)); } @@ -239,13 +239,13 @@ uint32_t atarisy2_state::screen_update_atarisy2(screen_device &screen, bitmap_in bitmap_ind8 &priority_bitmap = screen.priority(); priority_bitmap.fill(0, cliprect); - /* draw the playfield */ + // draw the playfield m_playfield_tilemap->draw(screen, bitmap, cliprect, 0, 0); m_playfield_tilemap->draw(screen, bitmap, cliprect, 1, 1); m_playfield_tilemap->draw(screen, bitmap, cliprect, 2, 2); m_playfield_tilemap->draw(screen, bitmap, cliprect, 3, 3); - /* draw and merge the MO */ + // draw and merge the MO bitmap_ind16 &mobitmap = m_mob->bitmap(); for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next()) for (int y = rect->top(); y <= rect->bottom(); y++) @@ -258,21 +258,21 @@ uint32_t atarisy2_state::screen_update_atarisy2(screen_device &screen, bitmap_in { int mopriority = mo[x] >> atari_motion_objects_device::PRIORITY_SHIFT; - /* high priority PF? */ + // high priority PF? if ((mopriority + pri[x]) & 2) { - /* only gets priority if PF pen is less than 8 */ + // only gets priority if PF pen is less than 8 if (!(pf[x] & 0x08)) pf[x] = mo[x] & atari_motion_objects_device::DATA_MASK; } - /* low priority */ + // low priority else pf[x] = mo[x] & atari_motion_objects_device::DATA_MASK; } } - /* add the alpha on top */ + // add the alpha on top m_alpha_tilemap->draw(screen, bitmap, cliprect, 0, 0); return 0; }