mirror of
https://github.com/holub/mame
synced 2025-04-25 09:50:04 +03:00
coolpool, cave, foodf, itech32, slapstic, dvk_kcgd, dfruit, by17, by35: Remove machine().device, nw
This commit is contained in:
parent
a0688e6fbb
commit
a0cb3db810
@ -442,23 +442,22 @@ MACHINE_CONFIG_START(atarig1_state::atarig1)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
MACHINE_CONFIG_START(atarig1_state::hydra)
|
||||
MACHINE_CONFIG_START(atarig1_state::hydrap)
|
||||
atarig1(config);
|
||||
MCFG_ATARIRLE_ADD("rle", modesc_hydra)
|
||||
MCFG_SLAPSTIC_ADD("slapstic", 116)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
MACHINE_CONFIG_START(atarig1_state::hydrap)
|
||||
hydra(config);
|
||||
MCFG_DEVICE_REMOVE("slapstic")
|
||||
MACHINE_CONFIG_START(atarig1_state::hydra)
|
||||
hydrap(config);
|
||||
MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 116, true)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
MACHINE_CONFIG_START(atarig1_state::pitfight9)
|
||||
atarig1(config);
|
||||
MCFG_ATARIRLE_ADD("rle", modesc_pitfight)
|
||||
MCFG_SLAPSTIC_ADD("slapstic", 114)
|
||||
MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 114, true)
|
||||
MCFG_DEVICE_REMOVE("adc")
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
@ -466,7 +465,7 @@ MACHINE_CONFIG_END
|
||||
MACHINE_CONFIG_START(atarig1_state::pitfight7)
|
||||
atarig1(config);
|
||||
MCFG_ATARIRLE_ADD("rle", modesc_pitfight)
|
||||
MCFG_SLAPSTIC_ADD("slapstic", 112)
|
||||
MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 112, true)
|
||||
MCFG_DEVICE_REMOVE("adc")
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
@ -474,7 +473,7 @@ MACHINE_CONFIG_END
|
||||
MACHINE_CONFIG_START(atarig1_state::pitfight)
|
||||
atarig1(config);
|
||||
MCFG_ATARIRLE_ADD("rle", modesc_pitfight)
|
||||
MCFG_SLAPSTIC_ADD("slapstic", 111)
|
||||
MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 111, true)
|
||||
MCFG_DEVICE_REMOVE("adc")
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
@ -482,7 +481,7 @@ MACHINE_CONFIG_END
|
||||
MACHINE_CONFIG_START(atarig1_state::pitfightj)
|
||||
atarig1(config);
|
||||
MCFG_ATARIRLE_ADD("rle", modesc_pitfight)
|
||||
MCFG_SLAPSTIC_ADD("slapstic", 113)
|
||||
MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 113, true)
|
||||
MCFG_DEVICE_REMOVE("adc")
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
@ -800,7 +800,7 @@ MACHINE_CONFIG_END
|
||||
|
||||
MACHINE_CONFIG_START(atarisy1_state::marble)
|
||||
atarisy1(config);
|
||||
MCFG_SLAPSTIC_ADD("slapstic", 103)
|
||||
MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 103, true)
|
||||
|
||||
// No joystick
|
||||
MCFG_DEVICE_REMOVE("adc")
|
||||
@ -809,7 +809,7 @@ MACHINE_CONFIG_END
|
||||
|
||||
MACHINE_CONFIG_START(atarisy1_state::peterpak)
|
||||
atarisy1(config);
|
||||
MCFG_SLAPSTIC_ADD("slapstic", 107)
|
||||
MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 107, true)
|
||||
|
||||
// Digital joystick read through ADC
|
||||
MCFG_DEVICE_MODIFY("adc")
|
||||
@ -821,7 +821,7 @@ MACHINE_CONFIG_END
|
||||
|
||||
MACHINE_CONFIG_START(atarisy1_state::indytemp)
|
||||
atarisy1(config);
|
||||
MCFG_SLAPSTIC_ADD("slapstic", 105)
|
||||
MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 105, true)
|
||||
|
||||
// Digital joystick read through ADC
|
||||
MCFG_DEVICE_MODIFY("adc")
|
||||
@ -833,7 +833,7 @@ MACHINE_CONFIG_END
|
||||
|
||||
MACHINE_CONFIG_START(atarisy1_state::roadrunn)
|
||||
atarisy1(config);
|
||||
MCFG_SLAPSTIC_ADD("slapstic", 108)
|
||||
MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 108, true)
|
||||
|
||||
// Hall-effect analog joystick
|
||||
MCFG_DEVICE_MODIFY("adc")
|
||||
@ -843,7 +843,7 @@ MACHINE_CONFIG_END
|
||||
|
||||
MACHINE_CONFIG_START(atarisy1_state::roadb109)
|
||||
atarisy1(config);
|
||||
MCFG_SLAPSTIC_ADD("slapstic", 109)
|
||||
MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 109, true)
|
||||
|
||||
// Road Blasters gas pedal
|
||||
MCFG_DEVICE_MODIFY("adc")
|
||||
@ -852,7 +852,7 @@ MACHINE_CONFIG_END
|
||||
|
||||
MACHINE_CONFIG_START(atarisy1_state::roadb110)
|
||||
atarisy1(config);
|
||||
MCFG_SLAPSTIC_ADD("slapstic", 110)
|
||||
MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 110, true)
|
||||
|
||||
// Road Blasters gas pedal
|
||||
MCFG_DEVICE_MODIFY("adc")
|
||||
|
@ -1261,7 +1261,7 @@ MACHINE_CONFIG_END
|
||||
|
||||
MACHINE_CONFIG_START(atarisy2_state::paperboy)
|
||||
atarisy2(config);
|
||||
MCFG_SLAPSTIC_ADD("slapstic", 105)
|
||||
MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 105, false)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
@ -1271,13 +1271,13 @@ MACHINE_CONFIG_START(atarisy2_state::_720)
|
||||
issues with the sound CPU; temporarily increasing the sound CPU frequency
|
||||
to ~2.2MHz "fixes" the problem */
|
||||
|
||||
MCFG_SLAPSTIC_ADD("slapstic", 107)
|
||||
MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 107, false)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
MACHINE_CONFIG_START(atarisy2_state::ssprint)
|
||||
atarisy2(config);
|
||||
MCFG_SLAPSTIC_ADD("slapstic", 108)
|
||||
MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 108, false)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_DEVICE_REMOVE("tms")
|
||||
@ -1286,7 +1286,7 @@ MACHINE_CONFIG_END
|
||||
|
||||
MACHINE_CONFIG_START(atarisy2_state::csprint)
|
||||
atarisy2(config);
|
||||
MCFG_SLAPSTIC_ADD("slapstic", 109)
|
||||
MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 109, false)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_DEVICE_REMOVE("tms")
|
||||
@ -1295,7 +1295,7 @@ MACHINE_CONFIG_END
|
||||
|
||||
MACHINE_CONFIG_START(atarisy2_state::apb)
|
||||
atarisy2(config);
|
||||
MCFG_SLAPSTIC_ADD("slapstic", 110)
|
||||
MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 110, false)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
@ -347,7 +347,7 @@ MACHINE_CONFIG_START(atetris_state::atetris)
|
||||
MCFG_DEVICE_ADD("maincpu", M6502,MASTER_CLOCK/8)
|
||||
MCFG_DEVICE_PROGRAM_MAP(main_map)
|
||||
|
||||
MCFG_SLAPSTIC_ADD("slapstic", 101)
|
||||
MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 101, false)
|
||||
|
||||
MCFG_DEVICE_ADD("eeprom", EEPROM_PARALLEL_2804, 0)
|
||||
MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
|
||||
|
@ -37,6 +37,8 @@ public:
|
||||
, m_nvram(*this, "nvram")
|
||||
, m_pia_u10(*this, "pia_u10")
|
||||
, m_pia_u11(*this, "pia_u11")
|
||||
, m_zero_crossing_active_timer(*this, "timer_z_pulse")
|
||||
, m_display_refresh_timer(*this, "timer_d_pulse")
|
||||
, m_io_test(*this, "TEST")
|
||||
, m_io_dsw0(*this, "DSW0")
|
||||
, m_io_dsw1(*this, "DSW1")
|
||||
@ -86,6 +88,8 @@ private:
|
||||
required_shared_ptr<uint8_t> m_nvram;
|
||||
required_device<pia6821_device> m_pia_u10;
|
||||
required_device<pia6821_device> m_pia_u11;
|
||||
required_device<timer_device> m_zero_crossing_active_timer;
|
||||
required_device<timer_device> m_display_refresh_timer;
|
||||
required_ioport m_io_test;
|
||||
required_ioport m_io_dsw0;
|
||||
required_ioport m_io_dsw1;
|
||||
@ -805,9 +809,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( by17_state::timer_z_freq )
|
||||
+--------------------------+ +-----
|
||||
*/
|
||||
|
||||
timer_device *zero_crossing_active_timer = machine().device<timer_device>("timer_z_pulse");
|
||||
|
||||
zero_crossing_active_timer->adjust(attotime::from_usec(700));
|
||||
m_zero_crossing_active_timer->adjust(attotime::from_usec(700));
|
||||
|
||||
m_u10_cb1 = true;
|
||||
m_pia_u10->cb1_w(m_u10_cb1);
|
||||
@ -835,9 +837,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( by17_state::u11_timer )
|
||||
-+ +---+
|
||||
*/
|
||||
|
||||
timer_device *display_refresh_timer = machine().device<timer_device>("timer_d_pulse");
|
||||
|
||||
display_refresh_timer->adjust(attotime::from_msec(2.85));
|
||||
m_display_refresh_timer->adjust(attotime::from_msec(2.85));
|
||||
|
||||
m_u11_ca1 = true;
|
||||
m_pia_u11->ca1_w(m_u11_ca1);
|
||||
@ -1019,7 +1019,7 @@ MACHINE_CONFIG_START(by17_state::by17)
|
||||
MCFG_PIA_IRQA_HANDLER(INPUTLINE("maincpu", M6800_IRQ_LINE))
|
||||
MCFG_PIA_IRQB_HANDLER(INPUTLINE("maincpu", M6800_IRQ_LINE))
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_z_freq", by17_state, timer_z_freq, attotime::from_hz(100)) // Mains Line Frequency * 2
|
||||
MCFG_TIMER_DRIVER_ADD("timer_z_pulse", by17_state, timer_z_pulse) // Active pulse length from Zero Crossing detector
|
||||
MCFG_TIMER_DRIVER_ADD(m_zero_crossing_active_timer, by17_state, timer_z_pulse) // Active pulse length from Zero Crossing detector
|
||||
|
||||
MCFG_DEVICE_ADD("pia_u11", PIA6821, 0)
|
||||
MCFG_PIA_READPA_HANDLER(READ8(*this, by17_state, u11_a_r))
|
||||
@ -1032,7 +1032,7 @@ MACHINE_CONFIG_START(by17_state::by17)
|
||||
MCFG_PIA_IRQA_HANDLER(INPUTLINE("maincpu", M6800_IRQ_LINE))
|
||||
MCFG_PIA_IRQB_HANDLER(INPUTLINE("maincpu", M6800_IRQ_LINE))
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_d_freq", by17_state, u11_timer, attotime::from_hz(317)) // 555 timer
|
||||
MCFG_TIMER_DRIVER_ADD("timer_d_pulse", by17_state, timer_d_pulse) // 555 Active pulse length
|
||||
MCFG_TIMER_DRIVER_ADD(m_display_refresh_timer, by17_state, timer_d_pulse) // 555 Active pulse length
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
@ -112,6 +112,8 @@ protected:
|
||||
, m_nvram(*this, "nvram")
|
||||
, m_pia_u10(*this, "pia_u10")
|
||||
, m_pia_u11(*this, "pia_u11")
|
||||
, m_zero_crossing_active_timer(*this, "timer_z_pulse")
|
||||
, m_display_refresh_timer(*this, "timer_d_pulse")
|
||||
, m_io_test(*this, "TEST")
|
||||
, m_io_dsw0(*this, "DSW0")
|
||||
, m_io_dsw1(*this, "DSW1")
|
||||
@ -176,6 +178,8 @@ private:
|
||||
required_shared_ptr<uint8_t> m_nvram;
|
||||
required_device<pia6821_device> m_pia_u10;
|
||||
required_device<pia6821_device> m_pia_u11;
|
||||
required_device<timer_device> m_zero_crossing_active_timer;
|
||||
required_device<timer_device> m_display_refresh_timer;
|
||||
required_ioport m_io_test;
|
||||
required_ioport m_io_dsw0;
|
||||
required_ioport m_io_dsw1;
|
||||
@ -209,6 +213,7 @@ protected:
|
||||
, m_snd_prom(*this, "sound1")
|
||||
, m_discrete(*this, "discrete")
|
||||
, m_timer_s_freq(*this, "timer_s_freq")
|
||||
, m_snd_sustain_timer(*this, "timer_as2888")
|
||||
{ }
|
||||
|
||||
DECLARE_WRITE8_MEMBER(u11_b_as2888_w);
|
||||
@ -219,13 +224,13 @@ protected:
|
||||
void as2888_audio(machine_config &config);
|
||||
|
||||
private:
|
||||
bool m_timer_as2888;
|
||||
uint8_t m_snd_sel;
|
||||
uint8_t m_snd_tone_gen;
|
||||
uint8_t m_snd_div;
|
||||
required_region_ptr<uint8_t> m_snd_prom;
|
||||
required_device<discrete_device> m_discrete;
|
||||
required_device<timer_device> m_timer_s_freq;
|
||||
required_device<timer_device> m_snd_sustain_timer;
|
||||
};
|
||||
|
||||
|
||||
@ -637,9 +642,7 @@ WRITE_LINE_MEMBER( as2888_state::u11_cb2_as2888_w )
|
||||
{
|
||||
if (state)
|
||||
{
|
||||
timer_device *snd_sustain_timer = machine().device<timer_device>("timer_as2888");
|
||||
snd_sustain_timer->adjust(attotime::from_msec(5));
|
||||
m_timer_as2888 = true;
|
||||
m_snd_sustain_timer->adjust(attotime::from_msec(5));
|
||||
|
||||
m_discrete->write(machine().dummy_space(), NODE_08, 11); // 11 volt pulse
|
||||
}
|
||||
@ -868,9 +871,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( by35_state::timer_z_freq )
|
||||
+--------------------------+ +-----
|
||||
*/
|
||||
|
||||
timer_device *zero_crossing_active_timer = machine().device<timer_device>("timer_z_pulse");
|
||||
|
||||
zero_crossing_active_timer->adjust(attotime::from_usec(700));
|
||||
m_zero_crossing_active_timer->adjust(attotime::from_usec(700));
|
||||
|
||||
m_u10_cb1 = true;
|
||||
m_pia_u10->cb1_w(m_u10_cb1);
|
||||
@ -897,9 +898,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( by35_state::u11_timer )
|
||||
-+ +---+
|
||||
*/
|
||||
|
||||
timer_device *display_refresh_timer = machine().device<timer_device>("timer_d_pulse");
|
||||
|
||||
display_refresh_timer->adjust(attotime::from_msec(2.85));
|
||||
m_display_refresh_timer->adjust(attotime::from_msec(2.85));
|
||||
|
||||
m_u11_ca1 = true;
|
||||
m_pia_u11->ca1_w(m_u11_ca1);
|
||||
@ -941,8 +940,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( as2888_state::timer_as2888 )
|
||||
}
|
||||
|
||||
m_discrete->write(machine().dummy_space(), NODE_08, 0);
|
||||
timer.adjust(attotime::never);
|
||||
m_timer_as2888 = false;
|
||||
m_snd_sustain_timer->adjust(attotime::never);
|
||||
|
||||
LOG("Sustain off\n");
|
||||
}
|
||||
@ -1120,7 +1118,7 @@ MACHINE_CONFIG_START(by35_state::by35)
|
||||
MCFG_PIA_IRQA_HANDLER(INPUTLINE("maincpu", M6800_IRQ_LINE))
|
||||
MCFG_PIA_IRQB_HANDLER(INPUTLINE("maincpu", M6800_IRQ_LINE))
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_z_freq", by35_state, timer_z_freq, attotime::from_hz(100)) // Mains Line Frequency * 2
|
||||
MCFG_TIMER_DRIVER_ADD("timer_z_pulse", by35_state, timer_z_pulse) // Active pulse length from Zero Crossing detector
|
||||
MCFG_TIMER_DRIVER_ADD(m_zero_crossing_active_timer, by35_state, timer_z_pulse) // Active pulse length from Zero Crossing detector
|
||||
|
||||
MCFG_DEVICE_ADD("pia_u11", PIA6821, 0)
|
||||
MCFG_PIA_READPA_HANDLER(READ8(*this, by35_state, u11_a_r))
|
||||
@ -1133,7 +1131,7 @@ MACHINE_CONFIG_START(by35_state::by35)
|
||||
MCFG_PIA_IRQA_HANDLER(INPUTLINE("maincpu", M6800_IRQ_LINE))
|
||||
MCFG_PIA_IRQB_HANDLER(INPUTLINE("maincpu", M6800_IRQ_LINE))
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_d_freq", by35_state, u11_timer, attotime::from_hz(317)) // 555 timer
|
||||
MCFG_TIMER_DRIVER_ADD("timer_d_pulse", by35_state, timer_d_pulse) // 555 Active pulse length
|
||||
MCFG_TIMER_DRIVER_ADD(m_display_refresh_timer, by35_state, timer_d_pulse) // 555 Active pulse length
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
MACHINE_CONFIG_START(as2888_state::as2888_audio)
|
||||
@ -1146,7 +1144,7 @@ MACHINE_CONFIG_START(as2888_state::as2888_audio)
|
||||
MCFG_PIA_CB2_HANDLER(WRITELINE(*this, as2888_state, u11_cb2_as2888_w))
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_s_freq", as2888_state, timer_s, attotime::from_hz(353000)) // Inverter clock on AS-2888 sound board
|
||||
MCFG_TIMER_DRIVER_ADD("timer_as2888", as2888_state, timer_as2888)
|
||||
MCFG_TIMER_DRIVER_ADD(m_snd_sustain_timer, as2888_state, timer_as2888)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
@ -2737,8 +2737,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( cave_state::sailormn_startup )
|
||||
|
||||
MACHINE_RESET_MEMBER(cave_state,sailormn)
|
||||
{
|
||||
timer_device *startup = machine().device<timer_device>("startup");
|
||||
startup->adjust(attotime::from_usec(1000), 0, attotime::zero);
|
||||
m_startup->adjust(attotime::from_usec(1000), 0, attotime::zero);
|
||||
MACHINE_RESET_CALL_MEMBER(cave);
|
||||
}
|
||||
|
||||
@ -2750,7 +2749,7 @@ MACHINE_CONFIG_START(cave_state::sailormn)
|
||||
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt)
|
||||
|
||||
// could be a wachdog, but if it is then our watchdog address is incorrect as there are periods where the game doesn't write it.
|
||||
MCFG_TIMER_DRIVER_ADD("startup", cave_state, sailormn_startup)
|
||||
MCFG_TIMER_DRIVER_ADD(m_startup, cave_state, sailormn_startup)
|
||||
|
||||
MCFG_DEVICE_ADD("audiocpu", Z80, 8_MHz_XTAL) // Bidirectional Communication
|
||||
MCFG_DEVICE_PROGRAM_MAP(sailormn_sound_map)
|
||||
|
@ -703,6 +703,9 @@ public:
|
||||
m_ata(*this, "ata"),
|
||||
m_screen(*this, "screen"),
|
||||
m_palette(*this, "palette"),
|
||||
m_legacy_pci(*this, "pcibus"),
|
||||
m_jvs_host(*this, "cobra_jvs_host"),
|
||||
m_dmadac(*this, "dac%u", 1U),
|
||||
m_generic_paletteram_32(*this, "paletteram"),
|
||||
m_main_ram(*this, "main_ram"),
|
||||
m_sub_ram(*this, "sub_ram"),
|
||||
@ -722,6 +725,9 @@ public:
|
||||
required_device<ata_interface_device> m_ata;
|
||||
required_device<screen_device> m_screen;
|
||||
required_device<palette_device> m_palette;
|
||||
required_device<pci_bus_legacy_device> m_legacy_pci;
|
||||
required_device<cobra_jvs_host> m_jvs_host;
|
||||
required_device_array<dmadac_sound_device, 2> m_dmadac;
|
||||
required_shared_ptr<uint32_t> m_generic_paletteram_32;
|
||||
required_shared_ptr<uint64_t> m_main_ram;
|
||||
required_shared_ptr<uint32_t> m_sub_ram;
|
||||
@ -830,8 +836,6 @@ public:
|
||||
std::unique_ptr<int16_t[]> m_sound_dma_buffer_r;
|
||||
uint32_t m_sound_dma_ptr;
|
||||
|
||||
dmadac_sound_device *m_dmadac[2];
|
||||
|
||||
void init_racjamdx();
|
||||
void init_bujutsu();
|
||||
void init_cobra();
|
||||
@ -1404,16 +1408,12 @@ void cobra_state::mpc106_pci_w(int function, int reg, uint32_t data, uint32_t me
|
||||
|
||||
READ64_MEMBER(cobra_state::main_mpc106_r)
|
||||
{
|
||||
pci_bus_legacy_device *device = machine().device<pci_bus_legacy_device>("pcibus");
|
||||
//return pci_64be_r(offset, mem_mask);
|
||||
return device->read_64be(space, offset, mem_mask);
|
||||
return m_legacy_pci->read_64be(space, offset, mem_mask);
|
||||
}
|
||||
|
||||
WRITE64_MEMBER(cobra_state::main_mpc106_w)
|
||||
{
|
||||
pci_bus_legacy_device *device = machine().device<pci_bus_legacy_device>("pcibus");
|
||||
//pci_64be_w(offset, data, mem_mask);
|
||||
device->write_64be(space, offset, data, mem_mask);
|
||||
m_legacy_pci->write_64be(space, offset, data, mem_mask);
|
||||
}
|
||||
|
||||
READ64_MEMBER(cobra_state::main_fifo_r)
|
||||
@ -2002,15 +2002,13 @@ WRITE32_MEMBER(cobra_state::sub_sound_dma_w)
|
||||
{
|
||||
m_sound_dma_ptr = 0;
|
||||
|
||||
dmadac_transfer(&m_dmadac[0], 1, 0, 1, DMA_SOUND_BUFFER_SIZE, m_sound_dma_buffer_l.get());
|
||||
dmadac_transfer(&m_dmadac[1], 1, 0, 1, DMA_SOUND_BUFFER_SIZE, m_sound_dma_buffer_r.get());
|
||||
m_dmadac[0]->transfer(0, 0, 1, DMA_SOUND_BUFFER_SIZE, m_sound_dma_buffer_l.get());
|
||||
m_dmadac[1]->transfer(0, 0, 1, DMA_SOUND_BUFFER_SIZE, m_sound_dma_buffer_r.get());
|
||||
}
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(cobra_state::sub_jvs_w)
|
||||
{
|
||||
cobra_jvs_host *jvs = machine().device<cobra_jvs_host>("cobra_jvs_host");
|
||||
|
||||
#if LOG_JVS
|
||||
printf("sub_jvs_w: %02X\n", data);
|
||||
#endif
|
||||
@ -2018,7 +2016,7 @@ WRITE8_MEMBER(cobra_state::sub_jvs_w)
|
||||
const uint8_t *rec_data;
|
||||
uint32_t rec_size;
|
||||
|
||||
jvs->write(data, rec_data, rec_size);
|
||||
m_jvs_host->write(data, rec_data, rec_size);
|
||||
|
||||
if (rec_size > 0)
|
||||
{
|
||||
@ -3274,12 +3272,10 @@ void cobra_state::machine_reset()
|
||||
|
||||
m_sound_dma_ptr = 0;
|
||||
|
||||
m_dmadac[0] = machine().device<dmadac_sound_device>("dac1");
|
||||
m_dmadac[1] = machine().device<dmadac_sound_device>("dac2");
|
||||
dmadac_enable(&m_dmadac[0], 1, 1);
|
||||
dmadac_enable(&m_dmadac[1], 1, 1);
|
||||
dmadac_set_frequency(&m_dmadac[0], 1, 44100);
|
||||
dmadac_set_frequency(&m_dmadac[1], 1, 44100);
|
||||
m_dmadac[0]->enable(1);
|
||||
m_dmadac[1]->enable(1);
|
||||
m_dmadac[0]->set_frequency(44100);
|
||||
m_dmadac[1]->set_frequency(44100);
|
||||
}
|
||||
|
||||
MACHINE_CONFIG_START(cobra_state::cobra)
|
||||
@ -3300,7 +3296,7 @@ MACHINE_CONFIG_START(cobra_state::cobra)
|
||||
MCFG_QUANTUM_TIME(attotime::from_hz(15005))
|
||||
|
||||
|
||||
MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0)
|
||||
MCFG_PCI_BUS_LEGACY_ADD(m_legacy_pci, 0)
|
||||
MCFG_PCI_BUS_LEGACY_DEVICE(0, DEVICE_SELF, cobra_state, mpc106_pci_r, mpc106_pci_w)
|
||||
|
||||
MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", nullptr, true)
|
||||
@ -3322,10 +3318,10 @@ MACHINE_CONFIG_START(cobra_state::cobra)
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
|
||||
|
||||
MCFG_DEVICE_ADD("dac1", DMADAC)
|
||||
MCFG_DEVICE_ADD(m_dmadac[0], DMADAC)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
|
||||
|
||||
MCFG_DEVICE_ADD("dac2", DMADAC)
|
||||
MCFG_DEVICE_ADD(m_dmadac[1], DMADAC)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
|
||||
|
||||
MCFG_DEVICE_ADD("m48t58", M48T58, 0)
|
||||
@ -3337,12 +3333,12 @@ MACHINE_CONFIG_START(cobra_state::cobra)
|
||||
MCFG_K001604_ROZ_OFFSET(0) // correct?
|
||||
MCFG_K001604_PALETTE("palette")
|
||||
|
||||
MCFG_DEVICE_ADD("cobra_jvs_host", COBRA_JVS_HOST, 4000000)
|
||||
MCFG_JVS_DEVICE_ADD("cobra_jvs1", COBRA_JVS, "cobra_jvs_host")
|
||||
MCFG_DEVICE_ADD(m_jvs_host, COBRA_JVS_HOST, 4000000)
|
||||
MCFG_JVS_DEVICE_ADD(m_jvs1, COBRA_JVS, "cobra_jvs_host")
|
||||
cobra_jvs::static_set_main_board(*device, true);
|
||||
MCFG_JVS_DEVICE_ADD("cobra_jvs2", COBRA_JVS, "cobra_jvs_host")
|
||||
MCFG_JVS_DEVICE_ADD(m_jvs2, COBRA_JVS, "cobra_jvs_host")
|
||||
cobra_jvs::static_set_main_board(*device, true);
|
||||
MCFG_JVS_DEVICE_ADD("cobra_jvs3", COBRA_JVS, "cobra_jvs_host")
|
||||
MCFG_JVS_DEVICE_ADD(m_jvs3, COBRA_JVS, "cobra_jvs_host")
|
||||
cobra_jvs::static_set_main_board(*device, true);
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
@ -164,8 +164,7 @@ WRITE16_MEMBER(coolpool_state::nvram_thrash_w)
|
||||
if (!memcmp(nvram_unlock_seq, m_nvram_write_seq, sizeof(nvram_unlock_seq)))
|
||||
{
|
||||
m_nvram_write_enable = 1;
|
||||
timer_device *nvram_timer = machine().device<timer_device>("nvram_timer");
|
||||
nvram_timer->adjust(attotime::from_msec(1000));
|
||||
m_nvram_timer->adjust(attotime::from_msec(1000));
|
||||
}
|
||||
}
|
||||
|
||||
@ -738,7 +737,7 @@ MACHINE_CONFIG_START(coolpool_state::amerdart)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(coolpool_state,amerdart)
|
||||
MCFG_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD("nvram_timer", coolpool_state, nvram_write_timeout)
|
||||
MCFG_TIMER_DRIVER_ADD(m_nvram_timer, coolpool_state, nvram_write_timeout)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
@ -783,7 +782,7 @@ MACHINE_CONFIG_START(coolpool_state::coolpool)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(coolpool_state,coolpool)
|
||||
MCFG_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD("nvram_timer", coolpool_state, nvram_write_timeout)
|
||||
MCFG_TIMER_DRIVER_ADD(m_nvram_timer, coolpool_state, nvram_write_timeout)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_TLC34076_ADD("tlc34076", TLC34076_6_BIT)
|
||||
|
@ -475,7 +475,7 @@ MACHINE_CONFIG_START(cyberbal_state::cyberbalt)
|
||||
MCFG_EEPROM_2816_ADD("eeprom")
|
||||
MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
|
||||
|
||||
MCFG_SLAPSTIC_ADD("slapstic", 116)
|
||||
MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 116, true)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
@ -146,14 +146,12 @@ WRITE8_MEMBER(dfruit_state::dfruit_ram_bank_w)
|
||||
|
||||
uint8_t dfruit_state::ram_bank_r(uint16_t offset, uint8_t bank_num)
|
||||
{
|
||||
address_space &vdp_space = machine().device<tc0091lvc_device>("tc0091lvc")->space();
|
||||
return vdp_space.read_byte(offset + (m_ram_bank[bank_num]) * 0x1000);;
|
||||
return m_vdp->space().read_byte(offset + (m_ram_bank[bank_num]) * 0x1000);;
|
||||
}
|
||||
|
||||
void dfruit_state::ram_bank_w(uint16_t offset, uint8_t data, uint8_t bank_num)
|
||||
{
|
||||
address_space &vdp_space = machine().device<tc0091lvc_device>("tc0091lvc")->space();
|
||||
vdp_space.write_byte(offset + (m_ram_bank[bank_num]) * 0x1000,data);;
|
||||
m_vdp->space().write_byte(offset + (m_ram_bank[bank_num]) * 0x1000,data);;
|
||||
}
|
||||
|
||||
READ8_MEMBER(dfruit_state::dfruit_ram_0_r) { return ram_bank_r(offset, 0); }
|
||||
|
@ -161,8 +161,6 @@ void kcgd_state::machine_reset()
|
||||
|
||||
void kcgd_state::video_start()
|
||||
{
|
||||
// screen_device *screen = machine().device<screen_device>("screen");
|
||||
|
||||
// 64 kwords, word size is 17 bits
|
||||
m_videoram = std::make_unique<uint32_t[]>(65536);
|
||||
|
||||
@ -170,10 +168,10 @@ void kcgd_state::video_start()
|
||||
m_tmpbmp.allocate(KCGD_DISP_HORZ, KCGD_DISP_VERT);
|
||||
/*
|
||||
m_vsync_on_timer = timer_alloc(TIMER_ID_VSYNC_ON);
|
||||
m_vsync_on_timer->adjust(screen->time_until_pos(0, 0), 0, screen->frame_period());
|
||||
m_vsync_on_timer->adjust(m_screen->time_until_pos(0, 0), 0, m_screen->frame_period());
|
||||
|
||||
m_vsync_off_timer = timer_alloc(TIMER_ID_VSYNC_OFF);
|
||||
m_vsync_off_timer->adjust(screen->time_until_pos(16, 0), 0, screen->frame_period());
|
||||
m_vsync_off_timer->adjust(m_screen->time_until_pos(16, 0), 0, m_screen->frame_period());
|
||||
*/
|
||||
m_500hz_timer = timer_alloc(TIMER_ID_500HZ);
|
||||
m_500hz_timer->adjust(attotime::from_hz(500), 0, attotime::from_hz(500));
|
||||
|
@ -148,8 +148,7 @@ void foodf_state::machine_start()
|
||||
|
||||
void foodf_state::machine_reset()
|
||||
{
|
||||
timer_device *scan_timer = machine().device<timer_device>("scan_timer");
|
||||
scan_timer->adjust(m_screen->time_until_pos(0));
|
||||
m_scan_timer->adjust(m_screen->time_until_pos(0));
|
||||
}
|
||||
|
||||
|
||||
@ -334,7 +333,7 @@ MACHINE_CONFIG_START(foodf_state::foodf)
|
||||
MCFG_WATCHDOG_ADD("watchdog")
|
||||
MCFG_WATCHDOG_VBLANK_INIT("screen", 8)
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD("scan_timer", foodf_state, scanline_update_timer)
|
||||
MCFG_TIMER_DRIVER_ADD(m_scan_timer, foodf_state, scanline_update_timer)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_foodf)
|
||||
|
@ -550,25 +550,25 @@ MACHINE_CONFIG_END
|
||||
|
||||
MACHINE_CONFIG_START(gauntlet_state::gauntlet)
|
||||
gauntlet_base(config);
|
||||
MCFG_SLAPSTIC_ADD("slapstic", 104)
|
||||
MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 104, true)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
MACHINE_CONFIG_START(gauntlet_state::gaunt2p)
|
||||
gauntlet_base(config);
|
||||
MCFG_SLAPSTIC_ADD("slapstic", 107)
|
||||
MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 107, true)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
MACHINE_CONFIG_START(gauntlet_state::gauntlet2)
|
||||
gauntlet_base(config);
|
||||
MCFG_SLAPSTIC_ADD("slapstic", 106)
|
||||
MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 106, true)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
MACHINE_CONFIG_START(gauntlet_state::vindctr2)
|
||||
gauntlet_base(config);
|
||||
MCFG_SLAPSTIC_ADD("slapstic", 118)
|
||||
MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 118, true)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
@ -1460,8 +1460,7 @@ MACHINE_CONFIG_START(harddriv_state::driver_nomsp)
|
||||
MCFG_DEVICE_PROGRAM_MAP(driver_68k_map)
|
||||
MCFG_DEVICE_PERIODIC_INT_DRIVER(harddriv_state, hd68k_irq_gen, HARDDRIV_MASTER_CLOCK/16/16/16/16/2)
|
||||
|
||||
MCFG_SLAPSTIC_ADD("slapstic", 117)
|
||||
MCFG_SLAPSTIC_68K_ACCESS(1)
|
||||
MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 117, true)
|
||||
|
||||
MCFG_WATCHDOG_ADD("watchdog")
|
||||
|
||||
|
@ -359,7 +359,6 @@ Notes:
|
||||
#include "cpu/tms32031/tms32031.h"
|
||||
#include "machine/6522via.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "machine/timekpr.h"
|
||||
#include "machine/watchdog.h"
|
||||
#include "sound/es5506.h"
|
||||
|
||||
@ -1812,7 +1811,7 @@ MACHINE_CONFIG_START(itech32_state::tourny)
|
||||
|
||||
/* basic machine hardware */
|
||||
|
||||
MCFG_DEVICE_ADD("m48t02", M48T02, 0)
|
||||
MCFG_DEVICE_ADD(m_timekeeper, M48T02, 0)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
@ -4525,8 +4524,7 @@ void itech32_state::init_wcbowln()
|
||||
|
||||
void itech32_state::install_timekeeper()
|
||||
{
|
||||
timekeeper_device *m48t02 = machine().device<timekeeper_device>("m48t02");
|
||||
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x681000, 0x6817ff, read8_delegate(FUNC(timekeeper_device::read), m48t02), write8_delegate(FUNC(timekeeper_device::write), m48t02), 0xffffffff);
|
||||
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x681000, 0x6817ff, read8_delegate(FUNC(timekeeper_device::read), &(*m_timekeeper)), write8_delegate(FUNC(timekeeper_device::write), &(*m_timekeeper)), 0xffffffff);
|
||||
}
|
||||
|
||||
void itech32_state::init_wcbowlt()
|
||||
|
@ -343,7 +343,7 @@ MACHINE_CONFIG_START(rampart_state::rampart)
|
||||
MCFG_DEVICE_ADD("maincpu", M68000, MASTER_CLOCK/2)
|
||||
MCFG_DEVICE_PROGRAM_MAP(main_map)
|
||||
|
||||
MCFG_SLAPSTIC_ADD("slapstic", 118)
|
||||
MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 118, true)
|
||||
|
||||
MCFG_EEPROM_2816_ADD("eeprom")
|
||||
MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
|
||||
|
@ -379,7 +379,7 @@ MACHINE_CONFIG_START(starwars_state::esb)
|
||||
MCFG_DEVICE_MODIFY("maincpu")
|
||||
MCFG_DEVICE_PROGRAM_MAP(esb_main_map)
|
||||
|
||||
MCFG_SLAPSTIC_ADD("slapstic", 101)
|
||||
MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 101, false)
|
||||
|
||||
MCFG_DEVICE_MODIFY("outlatch")
|
||||
MCFG_ADDRESSABLE_LATCH_Q4_OUT_CB(MEMBANK("bank1"))
|
||||
|
@ -180,7 +180,7 @@ MACHINE_CONFIG_START(xybots_state::xybots)
|
||||
MCFG_DEVICE_ADD("maincpu", M68000, ATARI_CLOCK_14MHz/2)
|
||||
MCFG_DEVICE_PROGRAM_MAP(main_map)
|
||||
|
||||
MCFG_SLAPSTIC_ADD("slapstic", 107)
|
||||
MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 107, true)
|
||||
|
||||
MCFG_EEPROM_2804_ADD("eeprom")
|
||||
MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true)
|
||||
|
@ -69,6 +69,7 @@ public:
|
||||
, m_screen(*this, "screen")
|
||||
, m_palette(*this, "palette")
|
||||
, m_soundlatch(*this, "soundlatch")
|
||||
, m_startup(*this, "startup")
|
||||
, m_led_outputs(*this, "led%u", 0U)
|
||||
{ }
|
||||
|
||||
@ -316,6 +317,7 @@ protected:
|
||||
required_device<screen_device> m_screen;
|
||||
required_device<palette_device> m_palette;
|
||||
optional_device<generic_latch_16_device> m_soundlatch;
|
||||
optional_device<timer_device> m_startup;
|
||||
output_finder<9> m_led_outputs;
|
||||
|
||||
int m_rasflag;
|
||||
|
@ -17,6 +17,7 @@ public:
|
||||
, m_tlc34076(*this, "tlc34076")
|
||||
, m_main2dsp(*this, "main2dsp")
|
||||
, m_dsp2main(*this, "dsp2main")
|
||||
, m_nvram_timer(*this, "nvram_timer")
|
||||
, m_vram_base(*this, "vram_base")
|
||||
, m_nvram(*this, "nvram")
|
||||
, m_dsp_rom(*this, "dspdata")
|
||||
@ -29,6 +30,8 @@ public:
|
||||
required_device<generic_latch_16_device> m_main2dsp;
|
||||
required_device<generic_latch_16_device> m_dsp2main;
|
||||
|
||||
required_device<timer_device> m_nvram_timer;
|
||||
|
||||
required_shared_ptr<uint16_t> m_vram_base;
|
||||
required_shared_ptr<uint16_t> m_nvram;
|
||||
required_region_ptr<uint8_t> m_dsp_rom;
|
||||
|
@ -21,6 +21,7 @@ public:
|
||||
atarigen_state(mconfig, type, tag),
|
||||
m_nvram(*this, "nvram"),
|
||||
m_playfield_tilemap(*this, "playfield"),
|
||||
m_scan_timer(*this, "scan_timer"),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_leds(*this, "led%u", 0U)
|
||||
{ }
|
||||
@ -46,6 +47,7 @@ protected:
|
||||
private:
|
||||
required_device<x2212_device> m_nvram;
|
||||
required_device<tilemap_device> m_playfield_tilemap;
|
||||
required_device<timer_device> m_scan_timer;
|
||||
|
||||
double m_rweights[3];
|
||||
double m_gweights[3];
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#include "machine/nvram.h"
|
||||
#include "machine/ticket.h"
|
||||
#include "machine/timekpr.h"
|
||||
#include "emupal.h"
|
||||
#include "screen.h"
|
||||
|
||||
@ -31,6 +32,7 @@ public:
|
||||
m_screen(*this, "screen"),
|
||||
m_palette(*this, "palette"),
|
||||
m_ticket(*this, "ticket"),
|
||||
m_timekeeper(*this, "m48t02"),
|
||||
m_main_ram(*this, "main_ram", 0),
|
||||
m_nvram(*this, "nvram", 0),
|
||||
m_video(*this, "video", 0),
|
||||
@ -50,6 +52,7 @@ public:
|
||||
required_device<screen_device> m_screen;
|
||||
required_device<palette_device> m_palette;
|
||||
required_device<ticket_dispenser_device> m_ticket;
|
||||
optional_device<timekeeper_device> m_timekeeper;
|
||||
|
||||
optional_shared_ptr<uint16_t> m_main_ram;
|
||||
optional_shared_ptr<uint16_t> m_nvram;
|
||||
|
@ -19,10 +19,8 @@
|
||||
|
||||
DECLARE_DEVICE_TYPE(SLAPSTIC, atari_slapstic_device)
|
||||
|
||||
#define MCFG_SLAPSTIC_ADD(_tag, _chip) \
|
||||
MCFG_DEVICE_ADD(_tag, SLAPSTIC, 0) \
|
||||
MCFG_SLAPSTIC_NUM(_chip)
|
||||
|
||||
#define MCFG_SLAPSTIC_NUM(_chipnum) \
|
||||
downcast<atari_slapstic_device &>(*device).set_chipnum(_chipnum);
|
||||
|
||||
/*************************************
|
||||
*
|
||||
@ -110,18 +108,17 @@ enum
|
||||
};
|
||||
|
||||
|
||||
#define MCFG_SLAPSTIC_NUM(_chipnum) \
|
||||
downcast<atari_slapstic_device &>(*device).set_chipnum(_chipnum);
|
||||
|
||||
#define MCFG_SLAPSTIC_68K_ACCESS(_type) \
|
||||
downcast<atari_slapstic_device &>(*device).set_access68k(_type);
|
||||
|
||||
|
||||
|
||||
class atari_slapstic_device : public device_t
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
atari_slapstic_device(const machine_config &mconfig, const char *tag, device_t *owner, int chipnum, bool m68k_mode)
|
||||
: atari_slapstic_device(mconfig, tag, owner, (uint32_t)0)
|
||||
{
|
||||
set_chipnum(chipnum);
|
||||
set_access68k(m68k_mode ? 1 : 0);
|
||||
}
|
||||
|
||||
atari_slapstic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
void slapstic_init();
|
||||
|
@ -766,13 +766,6 @@ void atari_slapstic_device::device_validity_check(validity_checker &valid) const
|
||||
|
||||
void atari_slapstic_device::slapstic_init()
|
||||
{
|
||||
if (access_68k == -1)
|
||||
{
|
||||
/* see if we're 68k or 6502/6809 based */
|
||||
device_type cputype = machine().device(":maincpu")->type();
|
||||
access_68k = (cputype == M68000 || cputype == M68010);
|
||||
}
|
||||
|
||||
/* set up the parameters */
|
||||
slapstic = *slapstic_table[m_chipnum - 101];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user