summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author mooglyguy <therealmogminer@gmail.com>2018-12-07 00:07:08 +0100
committer mooglyguy <therealmogminer@gmail.com>2018-12-07 00:07:32 +0100
commit7ca7e6597b5b6d9ce5142ad153fb31f3395c5cac (patch)
tree7f1b6942098979f2a66f3a7dc9e332a057948ad4
parentf9f2a1f95a22f915d73be308d6dae46fae39572f (diff)
-tms32010.cpp: Removed MCFG. [Ryan Holtz]
(nw) Fixed validation.
-rw-r--r--src/devices/bus/isa/dectalk.cpp8
-rw-r--r--src/devices/bus/isa/dectalk.h2
-rw-r--r--src/devices/cpu/tms32010/tms32010.h9
-rw-r--r--src/devices/sound/bsmt2000.cpp13
-rw-r--r--src/devices/sound/swp30.h2
-rw-r--r--src/mame/audio/harddriv.cpp8
-rw-r--r--src/mame/drivers/atarisy4.cpp50
-rw-r--r--src/mame/drivers/coolpool.cpp9
-rw-r--r--src/mame/drivers/ddenlovr.cpp2
-rw-r--r--src/mame/drivers/dectalk.cpp11
-rw-r--r--src/mame/drivers/exelv.cpp30
-rw-r--r--src/mame/drivers/toaplan1.cpp13
-rw-r--r--src/mame/drivers/tomcat.cpp58
-rw-r--r--src/mame/drivers/tsispch.cpp2
-rw-r--r--src/mame/drivers/twincobr.cpp13
-rw-r--r--src/mame/drivers/wardner.cpp22
-rw-r--r--src/mame/includes/harddriv.h2
-rw-r--r--src/mame/includes/toaplan1.h11
-rw-r--r--src/mame/includes/twincobr.h11
-rw-r--r--src/mame/machine/asic65.cpp14
-rw-r--r--src/mame/machine/asic65.h2
-rw-r--r--src/mame/machine/toaplan1.cpp10
-rw-r--r--src/mame/machine/twincobr.cpp85
23 files changed, 194 insertions, 193 deletions
diff --git a/src/devices/bus/isa/dectalk.cpp b/src/devices/bus/isa/dectalk.cpp
index 8498b55231c..86cde3cffda 100644
--- a/src/devices/bus/isa/dectalk.cpp
+++ b/src/devices/bus/isa/dectalk.cpp
@@ -163,10 +163,10 @@ MACHINE_CONFIG_START(dectalk_isa_device::device_add_mconfig)
MCFG_DEVICE_PROGRAM_MAP(dectalk_cpu_map)
MCFG_80186_TMROUT0_HANDLER(WRITELINE(*this, dectalk_isa_device, clock_w));
- MCFG_DEVICE_ADD("dectalk_dsp", TMS32015, XTAL(20'000'000))
- MCFG_DEVICE_IO_MAP(dectalk_dsp_io)
- MCFG_TMS32010_BIO_IN_CB(READLINE(*this, dectalk_isa_device, bio_line_r))
- MCFG_DEVICE_PROGRAM_MAP(dectalk_dsp_map)
+ TMS32015(config, m_dsp, XTAL(20'000'000));
+ m_dsp->set_addrmap(AS_PROGRAM, &dectalk_isa_device::dectalk_dsp_map);
+ m_dsp->set_addrmap(AS_IO, &dectalk_isa_device::dectalk_dsp_io);
+ m_dsp->bio().set(FUNC(dectalk_isa_device::bio_line_r));
SPEAKER(config, "speaker").front_center();
MCFG_DEVICE_ADD("dac", DAC_12BIT_R2R, 0) MCFG_SOUND_ROUTE(0, "speaker", 1.0) // unknown DAC
diff --git a/src/devices/bus/isa/dectalk.h b/src/devices/bus/isa/dectalk.h
index e728b1a24d6..373c33e5ac1 100644
--- a/src/devices/bus/isa/dectalk.h
+++ b/src/devices/bus/isa/dectalk.h
@@ -55,7 +55,7 @@ private:
required_device<i80186_cpu_device> m_cpu;
required_device<dac_12bit_r2r_device> m_dac;
- required_device<cpu_device> m_dsp;
+ required_device<tms32015_device> m_dsp;
};
DECLARE_DEVICE_TYPE(ISA8_DECTALK, dectalk_isa_device)
diff --git a/src/devices/cpu/tms32010/tms32010.h b/src/devices/cpu/tms32010/tms32010.h
index 023bb1787a4..2b290a3945e 100644
--- a/src/devices/cpu/tms32010/tms32010.h
+++ b/src/devices/cpu/tms32010/tms32010.h
@@ -15,16 +15,9 @@
#pragma once
-
-
-#define MCFG_TMS32010_BIO_IN_CB(_devcb) \
- downcast<tms32010_device &>(*device).set_bio_in_cb(DEVCB_##_devcb); /* BIO input */
-
-
#define TMS32010_INT_PENDING 0x80000000
#define TMS32010_INT_NONE 0
-
enum
{
TMS32010_PC=1, TMS32010_SP, TMS32010_STR, TMS32010_ACC,
@@ -45,7 +38,7 @@ public:
tms32010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// configuration helpers
- template <class Object> devcb_base &set_bio_in_cb(Object &&cb) { return m_bio_in.set_callback(std::forward<Object>(cb)); }
+ auto bio() { return m_bio_in.bind(); }
void tms32010_ram(address_map &map);
void tms32015_ram(address_map &map);
diff --git a/src/devices/sound/bsmt2000.cpp b/src/devices/sound/bsmt2000.cpp
index 722b8ecd6a1..4104b83a619 100644
--- a/src/devices/sound/bsmt2000.cpp
+++ b/src/devices/sound/bsmt2000.cpp
@@ -94,13 +94,14 @@ const tiny_rom_entry *bsmt2000_device::device_rom_region() const
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(bsmt2000_device::device_add_mconfig)
- MCFG_DEVICE_ADD("bsmt2000", TMS32015, DERIVED_CLOCK(1,1))
- MCFG_DEVICE_PROGRAM_MAP(tms_program_map)
+void bsmt2000_device::device_add_mconfig(machine_config &config)
+{
+ tms32015_device &tms(TMS32015(config, "bsmt2000", DERIVED_CLOCK(1,1)));
+ tms.set_addrmap(AS_PROGRAM, &bsmt2000_device::tms_program_map);
// data map is internal to the CPU
- MCFG_DEVICE_IO_MAP(tms_io_map)
- MCFG_TMS32010_BIO_IN_CB(READLINE(*this, bsmt2000_device, tms_write_pending_r))
-MACHINE_CONFIG_END
+ tms.set_addrmap(AS_IO, &bsmt2000_device::tms_io_map);
+ tms.bio().set(FUNC(bsmt2000_device::tms_write_pending_r));
+}
//-------------------------------------------------
diff --git a/src/devices/sound/swp30.h b/src/devices/sound/swp30.h
index 56e24b453f0..8a46f293077 100644
--- a/src/devices/sound/swp30.h
+++ b/src/devices/sound/swp30.h
@@ -37,7 +37,7 @@ private:
u16 m_program_pfp[0x180], m_program_pint[0x80], m_program_plfo[0x80];
- u16 m_volume[0x40], m_freq[0x40], m_pan[0x40], m_dry_rev[0x40], m_cho_var[0x40];
+ u16 m_volume[0x40], m_freq[0x40], m_pan[0x40], m_dry_rev[0x40];//, m_cho_var[0x40];
u16 m_envelope[0x40][3];
u16 m_lpf_cutoff[0x40], m_lpf_cutoff_inc[0x40], m_lpf_reso[0x40], m_hpf_cutoff[0x40];
s16 m_eq_filter[0x40][6];
diff --git a/src/mame/audio/harddriv.cpp b/src/mame/audio/harddriv.cpp
index 5bb4c7a4967..598ff034ea9 100644
--- a/src/mame/audio/harddriv.cpp
+++ b/src/mame/audio/harddriv.cpp
@@ -446,11 +446,11 @@ MACHINE_CONFIG_START(harddriv_sound_board_device::device_add_mconfig)
m_latch->q_out_cb<4>().set_inputline(m_sounddsp, INPUT_LINE_HALT).invert(); // RES320
m_latch->q_out_cb<7>().set(FUNC(harddriv_sound_board_device::led_w));
- MCFG_DEVICE_ADD("sounddsp", TMS32010, XTAL(20'000'000))
- MCFG_DEVICE_PROGRAM_MAP(driversnd_dsp_program_map)
+ TMS32010(config, m_sounddsp, XTAL(20'000'000));
+ m_sounddsp->set_addrmap(AS_PROGRAM, &harddriv_sound_board_device::driversnd_dsp_program_map);
/* Data Map is internal to the CPU */
- MCFG_DEVICE_IO_MAP(driversnd_dsp_io_map)
- MCFG_TMS32010_BIO_IN_CB(READLINE(*this, harddriv_sound_board_device, hdsnddsp_get_bio))
+ m_sounddsp->set_addrmap(AS_IO, &harddriv_sound_board_device::driversnd_dsp_io_map);
+ m_sounddsp->bio().set(FUNC(harddriv_sound_board_device::hdsnddsp_get_bio));
/* sound hardware */
SPEAKER(config, "speaker").front_center();
diff --git a/src/mame/drivers/atarisy4.cpp b/src/mame/drivers/atarisy4.cpp
index 4ccb756928e..fc86e10a9c9 100644
--- a/src/mame/drivers/atarisy4.cpp
+++ b/src/mame/drivers/atarisy4.cpp
@@ -147,7 +147,7 @@ protected:
void dsp0_io_map(address_map &map);
required_device<cpu_device> m_maincpu;
- required_device<cpu_device> m_dsp0;
+ required_device<tms32010_device> m_dsp0;
required_memory_bank m_dsp0_bank1;
@@ -201,7 +201,7 @@ protected:
void dsp1_io_map(address_map &map);
private:
- required_device<cpu_device> m_dsp1;
+ required_device<tms32010_device> m_dsp1;
required_memory_bank m_dsp1_bank1;
};
@@ -807,36 +807,36 @@ INPUT_PORTS_END
*
*************************************/
-MACHINE_CONFIG_START(atarisy4_state::atarisy4)
- MCFG_DEVICE_ADD(m_maincpu, M68000, 8000000)
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", atarisy4_state, vblank_int)
-
- MCFG_DEVICE_ADD(m_dsp0, TMS32010, 16000000)
- MCFG_DEVICE_PROGRAM_MAP(dsp0_map)
- MCFG_DEVICE_IO_MAP(dsp0_io_map)
- MCFG_TMS32010_BIO_IN_CB(READLINE(*this, atarisy4_state, dsp0_bio_r))
+void atarisy4_state::atarisy4(machine_config &config)
+{
+ M68000(config, m_maincpu, 8000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &atarisy4_state::main_map);
+ m_maincpu->set_vblank_int("screen", FUNC(atarisy4_state::vblank_int));
+ TMS32010(config, m_dsp0, 16000000);
+ m_dsp0->set_addrmap(AS_PROGRAM, &atarisy4_state::dsp0_map);
+ m_dsp0->set_addrmap(AS_IO, &atarisy4_state::dsp0_io_map);
+ m_dsp0->bio().set(FUNC(atarisy4_state::dsp0_bio_r));
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(32000000/2, 660, 0, 512, 404, 0, 384)
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK)
- MCFG_SCREEN_UPDATE_DRIVER(atarisy4_state, screen_update_atarisy4)
- MCFG_PALETTE_ADD("palette", 256)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(32000000/2, 660, 0, 512, 404, 0, 384);
+ m_screen->set_video_attributes(VIDEO_UPDATE_AFTER_VBLANK);
+ m_screen->set_screen_update(FUNC(atarisy4_state::screen_update_atarisy4));
-MACHINE_CONFIG_END
+ PALETTE(config, m_palette, 256);
+}
-MACHINE_CONFIG_START(airrace_state::airrace)
+void airrace_state::airrace(machine_config &config)
+{
atarisy4(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(airrace_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &airrace_state::airrace_map);
- MCFG_DEVICE_ADD(m_dsp1, TMS32010, 16000000)
- MCFG_DEVICE_PROGRAM_MAP(dsp1_map)
- MCFG_DEVICE_IO_MAP(dsp1_io_map)
- MCFG_TMS32010_BIO_IN_CB(READLINE(*this, airrace_state, dsp1_bio_r))
-MACHINE_CONFIG_END
+ TMS32010(config, m_dsp1, 16000000);
+ m_dsp1->set_addrmap(AS_PROGRAM, &airrace_state::dsp1_map);
+ m_dsp1->set_addrmap(AS_IO, &airrace_state::dsp1_io_map);
+ m_dsp1->bio().set(FUNC(airrace_state::dsp1_bio_r));
+}
/*************************************
diff --git a/src/mame/drivers/coolpool.cpp b/src/mame/drivers/coolpool.cpp
index 9fb6139e987..945c12246f9 100644
--- a/src/mame/drivers/coolpool.cpp
+++ b/src/mame/drivers/coolpool.cpp
@@ -725,11 +725,12 @@ MACHINE_CONFIG_START(coolpool_state::amerdart)
m_maincpu->set_shiftreg_in_callback(FUNC(coolpool_state::to_shiftreg));
m_maincpu->set_shiftreg_out_callback(FUNC(coolpool_state::from_shiftreg));
- MCFG_DEVICE_ADD("dsp", TMS32015, XTAL(40'000'000)/2)
- MCFG_DEVICE_PROGRAM_MAP(amerdart_dsp_pgm_map)
+ tms32015_device &dsp(TMS32015(config, m_dsp, XTAL(40'000'000)/2));
+ dsp.set_addrmap(AS_PROGRAM, &coolpool_state::amerdart_dsp_pgm_map);
/* Data Map is internal to the CPU */
- MCFG_DEVICE_IO_MAP(amerdart_dsp_io_map)
- MCFG_TMS32010_BIO_IN_CB(READLINE(*this, coolpool_state, amerdart_dsp_bio_line_r))
+ dsp.set_addrmap(AS_IO, &coolpool_state::amerdart_dsp_io_map);
+ dsp.bio().set(FUNC(coolpool_state::amerdart_dsp_bio_line_r));
+
MCFG_TIMER_DRIVER_ADD_SCANLINE("audioint", coolpool_state, amerdart_audio_int_gen, "screen", 0, 1)
GENERIC_LATCH_16(config, m_main2dsp);
diff --git a/src/mame/drivers/ddenlovr.cpp b/src/mame/drivers/ddenlovr.cpp
index df3712c8b36..d040b81a74c 100644
--- a/src/mame/drivers/ddenlovr.cpp
+++ b/src/mame/drivers/ddenlovr.cpp
@@ -9844,7 +9844,7 @@ void ddenlovr_state::ultrchmp(machine_config &config)
void ddenlovr_state::quizchq(machine_config &config)
{
/* basic machine hardware */
- tmpz84c015_device &maincpu(TMPZ84C015(config, "maincpu", XTAL(16'000'000)/2)); /* Verified */
+ tmpz84c015_device &maincpu(TMPZ84C015(config, m_maincpu, XTAL(16'000'000)/2)); /* Verified */
maincpu.set_addrmap(AS_PROGRAM, &ddenlovr_state::quizchq_map);
maincpu.set_addrmap(AS_IO, &ddenlovr_state::quizchq_portmap);
maincpu.in_pa_callback().set(FUNC(ddenlovr_state::rongrong_input_r));
diff --git a/src/mame/drivers/dectalk.cpp b/src/mame/drivers/dectalk.cpp
index 61728babbcb..4805da6c6bf 100644
--- a/src/mame/drivers/dectalk.cpp
+++ b/src/mame/drivers/dectalk.cpp
@@ -293,7 +293,7 @@ private:
bool m_hack_self_test_is_second_read; // temp variable for hack below
required_device<m68000_base_device> m_maincpu;
- required_device<cpu_device> m_dsp;
+ required_device<tms32010_device> m_dsp;
required_device<scn2681_device> m_duart;
required_device<x2212_device> m_nvram;
required_device<dac_word_interface> m_dac;
@@ -887,10 +887,11 @@ MACHINE_CONFIG_START(dectalk_state::dectalk)
MCFG_MC68681_INPORT_CALLBACK(READ8(*this, dectalk_state, duart_input))
MCFG_MC68681_OUTPORT_CALLBACK(WRITE8(*this, dectalk_state, duart_output))
- MCFG_DEVICE_ADD("dsp", TMS32010, XTAL(20'000'000)) /* Y1 20MHz xtal */
- MCFG_DEVICE_PROGRAM_MAP(tms32010_mem)
- MCFG_DEVICE_IO_MAP(tms32010_io)
- MCFG_TMS32010_BIO_IN_CB(READLINE(*this, dectalk_state, spc_semaphore_r)) //read infifo-has-data-in-it fifo readable status
+ TMS32010(config, m_dsp, XTAL(20'000'000)); /* Y1 20MHz xtal */
+ m_dsp->set_addrmap(AS_PROGRAM, &dectalk_state::tms32010_mem);
+ m_dsp->set_addrmap(AS_IO, &dectalk_state::tms32010_io);
+ m_dsp->bio().set(FUNC(dectalk_state::spc_semaphore_r)); //read infifo-has-data-in-it fifo readable status
+
#ifdef USE_LOOSE_TIMING
MCFG_QUANTUM_TIME(attotime::from_hz(100))
#else
diff --git a/src/mame/drivers/exelv.cpp b/src/mame/drivers/exelv.cpp
index 3d6b7968cf6..a9100970c09 100644
--- a/src/mame/drivers/exelv.cpp
+++ b/src/mame/drivers/exelv.cpp
@@ -76,7 +76,6 @@ public:
exelv_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
- m_subcpu(*this, "subcpu"),
m_tms3556(*this, "tms3556"),
m_tms5220c(*this, "tms5220c"),
m_cart(*this, "cartslot")
@@ -87,7 +86,6 @@ public:
private:
required_device<tms7000_device> m_maincpu;
- required_device<tms7000_device> m_subcpu;
required_device<tms3556_device> m_tms3556;
required_device<tms5220c_device> m_tms5220c;
optional_device<generic_slot_device> m_cart;
@@ -494,13 +492,13 @@ MACHINE_CONFIG_START(exelv_state::exl100)
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", exelv_state, exelv_hblank_interrupt, "screen", 0, 1)
MCFG_MACHINE_START_OVERRIDE(exelv_state, exl100)
- TMS7041(config, m_subcpu, XTAL(4'915'200));
- m_subcpu->in_porta().set(FUNC(exelv_state::tms7041_porta_r));
- m_subcpu->out_portb().set(FUNC(exelv_state::tms7041_portb_w));
- m_subcpu->in_portc().set(FUNC(exelv_state::tms7041_portc_r));
- m_subcpu->out_portc().set(FUNC(exelv_state::tms7041_portc_w));
- m_subcpu->in_portd().set(FUNC(exelv_state::tms7041_portd_r));
- m_subcpu->out_portd().set(FUNC(exelv_state::tms7041_portd_w));
+ tms7041_device &subcpu(TMS7041(config, "tms7041", XTAL(4'915'200)));
+ subcpu.in_porta().set(FUNC(exelv_state::tms7041_porta_r));
+ subcpu.out_portb().set(FUNC(exelv_state::tms7041_portb_w));
+ subcpu.in_portc().set(FUNC(exelv_state::tms7041_portc_r));
+ subcpu.out_portc().set(FUNC(exelv_state::tms7041_portc_w));
+ subcpu.in_portd().set(FUNC(exelv_state::tms7041_portd_r));
+ subcpu.out_portd().set(FUNC(exelv_state::tms7041_portd_w));
MCFG_QUANTUM_PERFECT_CPU("maincpu")
@@ -550,13 +548,13 @@ MACHINE_CONFIG_START(exelv_state::exeltel)
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", exelv_state, exelv_hblank_interrupt, "screen", 0, 1)
MCFG_MACHINE_START_OVERRIDE(exelv_state, exeltel)
- TMS7042(config, m_subcpu, XTAL(4'915'200));
- m_subcpu->in_porta().set(FUNC(exelv_state::tms7041_porta_r));
- m_subcpu->out_portb().set(FUNC(exelv_state::tms7041_portb_w));
- m_subcpu->in_portc().set(FUNC(exelv_state::tms7041_portc_r));
- m_subcpu->out_portc().set(FUNC(exelv_state::tms7041_portc_w));
- m_subcpu->in_portd().set(FUNC(exelv_state::tms7041_portd_r));
- m_subcpu->out_portd().set(FUNC(exelv_state::tms7041_portd_w));
+ tms7042_device &subcpu(TMS7042(config, "tms7042", XTAL(4'915'200)));
+ subcpu.in_porta().set(FUNC(exelv_state::tms7041_porta_r));
+ subcpu.out_portb().set(FUNC(exelv_state::tms7041_portb_w));
+ subcpu.in_portc().set(FUNC(exelv_state::tms7041_portc_r));
+ subcpu.out_portc().set(FUNC(exelv_state::tms7041_portc_w));
+ subcpu.in_portd().set(FUNC(exelv_state::tms7041_portd_r));
+ subcpu.out_portd().set(FUNC(exelv_state::tms7041_portd_w));
MCFG_QUANTUM_PERFECT_CPU("maincpu")
diff --git a/src/mame/drivers/toaplan1.cpp b/src/mame/drivers/toaplan1.cpp
index 8599036800e..b6300b318e1 100644
--- a/src/mame/drivers/toaplan1.cpp
+++ b/src/mame/drivers/toaplan1.cpp
@@ -609,7 +609,6 @@ Stephh's and AWJ's notes (based on the games M68000 and Z80 code and some tests)
#include "includes/toaplan1.h"
#include "includes/toaplipt.h"
-#include "cpu/tms32010/tms32010.h"
#include "cpu/z80/z80.h"
#include "cpu/z180/z180.h"
#include "machine/74259.h"
@@ -927,14 +926,14 @@ void toaplan1_state::outzone_sound_io_map(address_map &map)
/***************************** TMS32010 Memory Map **************************/
-void toaplan1_state::DSP_program_map(address_map &map)
+void toaplan1_state::dsp_program_map(address_map &map)
{
map(0x000, 0x7ff).rom();
}
/* $000 - 08F TMS32010 Internal Data RAM in Data Address Space */
-void toaplan1_state::DSP_io_map(address_map &map)
+void toaplan1_state::dsp_io_map(address_map &map)
{
map(0, 0).w(FUNC(toaplan1_state::demonwld_dsp_addrsel_w));
map(1, 1).rw(FUNC(toaplan1_state::demonwld_dsp_r), FUNC(toaplan1_state::demonwld_dsp_w));
@@ -2076,10 +2075,10 @@ MACHINE_CONFIG_START(toaplan1_state::demonwld)
MCFG_DEVICE_PROGRAM_MAP(toaplan1_sound_map)
MCFG_DEVICE_IO_MAP(demonwld_sound_io_map)
- MCFG_DEVICE_ADD("dsp", TMS32010, XTAL(28'000'000)/2)
- MCFG_DEVICE_PROGRAM_MAP(DSP_program_map)
- MCFG_DEVICE_IO_MAP(DSP_io_map)
- MCFG_TMS32010_BIO_IN_CB(READLINE(*this, toaplan1_state, demonwld_BIO_r))
+ TMS32010(config, m_dsp, XTAL(28'000'000)/2);
+ m_dsp->set_addrmap(AS_PROGRAM, &toaplan1_state::dsp_program_map);
+ m_dsp->set_addrmap(AS_IO, &toaplan1_state::dsp_io_map);
+ m_dsp->bio().set(FUNC(toaplan1_state::demonwld_bio_r));
MCFG_QUANTUM_TIME(attotime::from_hz(600))
diff --git a/src/mame/drivers/tomcat.cpp b/src/mame/drivers/tomcat.cpp
index 56d629591de..c419a32565b 100644
--- a/src/mame/drivers/tomcat.cpp
+++ b/src/mame/drivers/tomcat.cpp
@@ -47,14 +47,14 @@
class tomcat_state : public driver_device
{
public:
- tomcat_state(const machine_config &mconfig, device_type type, const char *tag) :
- driver_device(mconfig, type, tag),
- m_tms(*this, "tms"),
- m_shared_ram(*this, "shared_ram"),
- m_maincpu(*this, "maincpu"),
- m_dsp(*this, "dsp"),
- m_adc(*this, "adc"),
- m_mainlatch(*this, "mainlatch")
+ tomcat_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag)
+ , m_tms(*this, "tms")
+ , m_shared_ram(*this, "shared_ram")
+ , m_maincpu(*this, "maincpu")
+ , m_dsp(*this, "dsp")
+ , m_adc(*this, "adc")
+ , m_mainlatch(*this, "mainlatch")
{ }
void tomcat(machine_config &config);
@@ -74,7 +74,7 @@ private:
DECLARE_READ16_MEMBER(tomcat_320bio_r);
DECLARE_READ8_MEMBER(tomcat_nvram_r);
DECLARE_WRITE8_MEMBER(tomcat_nvram_w);
- DECLARE_READ_LINE_MEMBER(dsp_BIO_r);
+ DECLARE_READ_LINE_MEMBER(dsp_bio_r);
DECLARE_WRITE8_MEMBER(soundlatches_w);
virtual void machine_start() override;
void dsp_map(address_map &map);
@@ -84,11 +84,11 @@ private:
required_device<tms5220_device> m_tms;
required_shared_ptr<uint16_t> m_shared_ram;
uint8_t m_nvram[0x800];
- int m_dsp_BIO;
+ int m_dsp_bio;
int m_dsp_idle;
required_device<cpu_device> m_maincpu;
- required_device<cpu_device> m_dsp;
+ required_device<tms32010_device> m_dsp;
required_device<adc0808_device> m_adc;
required_device<ls259_device> m_mainlatch;
};
@@ -151,7 +151,7 @@ WRITE_LINE_MEMBER(tomcat_state::mres_w)
// When Low: Reset TMS320
// When High: Release reset of TMS320
if (state)
- m_dsp_BIO = 0;
+ m_dsp_bio = 0;
m_dsp->set_input_line(INPUT_LINE_RESET, state ? CLEAR_LINE : ASSERT_LINE);
}
@@ -178,29 +178,29 @@ READ16_MEMBER(tomcat_state::tomcat_inputs2_r)
READ16_MEMBER(tomcat_state::tomcat_320bio_r)
{
- m_dsp_BIO = 1;
+ m_dsp_bio = 1;
m_maincpu->suspend(SUSPEND_REASON_SPIN, 1);
return 0;
}
-READ_LINE_MEMBER(tomcat_state::dsp_BIO_r)
+READ_LINE_MEMBER(tomcat_state::dsp_bio_r)
{
- if ( m_dsp->pc() == 0x0001 )
+ if (m_dsp->pc() == 0x0001)
{
- if ( m_dsp_idle == 0 )
+ if (m_dsp_idle == 0)
{
m_dsp_idle = 1;
- m_dsp_BIO = 0;
+ m_dsp_bio = 0;
}
- return !m_dsp_BIO;
+ return !m_dsp_bio;
}
- else if ( m_dsp->pc() == 0x0003 )
+ else if (m_dsp->pc() == 0x0003)
{
- if ( m_dsp_BIO == 1 )
+ if (m_dsp_bio == 1)
{
m_dsp_idle = 0;
- m_dsp_BIO = 0;
- m_maincpu->resume(SUSPEND_REASON_SPIN );
+ m_dsp_bio = 0;
+ m_maincpu->resume(SUSPEND_REASON_SPIN);
return 0;
}
else
@@ -211,7 +211,7 @@ READ_LINE_MEMBER(tomcat_state::dsp_BIO_r)
}
else
{
- return !m_dsp_BIO;
+ return !m_dsp_bio;
}
}
@@ -302,10 +302,10 @@ void tomcat_state::machine_start()
subdevice<nvram_device>("nvram")->set_base(m_nvram, 0x800);
save_item(NAME(m_nvram));
- save_item(NAME(m_dsp_BIO));
+ save_item(NAME(m_dsp_bio));
save_item(NAME(m_dsp_idle));
- m_dsp_BIO = 0;
+ m_dsp_bio = 0;
}
MACHINE_CONFIG_START(tomcat_state::tomcat)
@@ -314,11 +314,11 @@ MACHINE_CONFIG_START(tomcat_state::tomcat)
MCFG_DEVICE_PERIODIC_INT_DRIVER(tomcat_state, irq1_line_assert, 5*60)
//MCFG_DEVICE_PERIODIC_INT_DRIVER(tomcat_state, irq1_line_assert, 12.096_MHz_XTAL / 16 / 16 / 16 / 12)
- MCFG_DEVICE_ADD("dsp", TMS32010, 16_MHz_XTAL)
- MCFG_DEVICE_PROGRAM_MAP( dsp_map)
- MCFG_TMS32010_BIO_IN_CB(READLINE(*this, tomcat_state, dsp_BIO_r))
+ TMS32010(config, m_dsp, 16_MHz_XTAL);
+ m_dsp->set_addrmap(AS_PROGRAM, &tomcat_state::dsp_map);
+ m_dsp->bio().set(FUNC(tomcat_state::dsp_bio_r));
- MCFG_DEVICE_ADD("soundcpu", M6502, 14.318181_MHz_XTAL / 8 )
+ MCFG_DEVICE_ADD("soundcpu", M6502, 14.318181_MHz_XTAL / 8)
MCFG_DEVICE_DISABLE()
MCFG_DEVICE_PROGRAM_MAP( sound_map)
diff --git a/src/mame/drivers/tsispch.cpp b/src/mame/drivers/tsispch.cpp
index 2d299a84e34..106e6782950 100644
--- a/src/mame/drivers/tsispch.cpp
+++ b/src/mame/drivers/tsispch.cpp
@@ -382,7 +382,7 @@ MACHINE_CONFIG_START(tsispch_state::prose2k)
/* TODO: hook up p0, p1, int */
UPD7725(config, m_dsp, 8000000); /* VERIFIED clock, unknown divider; correct dsp type is UPD77P20 */
m_dsp->set_addrmap(AS_PROGRAM, &tsispch_state::dsp_prg_map);
- m_dsp->set_addrmap(AS_IO, &tsispch_state::dsp_data_map);
+ m_dsp->set_addrmap(AS_DATA, &tsispch_state::dsp_data_map);
m_dsp->p0().set(FUNC(tsispch_state::dsp_to_8086_p0_w));
m_dsp->p1().set(FUNC(tsispch_state::dsp_to_8086_p1_w));
diff --git a/src/mame/drivers/twincobr.cpp b/src/mame/drivers/twincobr.cpp
index 36eb59236aa..4c9fd9a51e4 100644
--- a/src/mame/drivers/twincobr.cpp
+++ b/src/mame/drivers/twincobr.cpp
@@ -383,7 +383,6 @@ Shark Zame
#include "cpu/m68000/m68000.h"
#include "cpu/mcs48/mcs48.h"
-#include "cpu/tms32010/tms32010.h"
#include "cpu/z80/z80.h"
#include "sound/3812intf.h"
#include "speaker.h"
@@ -442,14 +441,14 @@ void twincobr_state::sound_io_map(address_map &map)
/***************************** TMS32010 Memory Map **************************/
-void twincobr_state::DSP_program_map(address_map &map)
+void twincobr_state::dsp_program_map(address_map &map)
{
map(0x000, 0x7ff).rom();
}
/* $000 - 08F TMS32010 Internal Data RAM in Data Address Space */
-void twincobr_state::DSP_io_map(address_map &map)
+void twincobr_state::dsp_io_map(address_map &map)
{
map(0, 0).w(FUNC(twincobr_state::twincobr_dsp_addrsel_w));
map(1, 1).rw(FUNC(twincobr_state::twincobr_dsp_r), FUNC(twincobr_state::twincobr_dsp_w));
@@ -660,11 +659,11 @@ MACHINE_CONFIG_START(twincobr_state::twincobr)
MCFG_DEVICE_PROGRAM_MAP(sound_program_map)
MCFG_DEVICE_IO_MAP(sound_io_map)
- MCFG_DEVICE_ADD("dsp", TMS32010, XTAL(28'000'000)/2) /* 14MHz CLKin */
- MCFG_DEVICE_PROGRAM_MAP(DSP_program_map)
+ TMS32010(config, m_dsp, XTAL(28'000'000)/2); /* 14MHz CLKin */
+ m_dsp->set_addrmap(AS_PROGRAM, &twincobr_state::dsp_program_map);
/* Data Map is internal to the CPU */
- MCFG_DEVICE_IO_MAP(DSP_io_map)
- MCFG_TMS32010_BIO_IN_CB(READLINE(*this, twincobr_state, twincobr_BIO_r))
+ m_dsp->set_addrmap(AS_IO, &twincobr_state::dsp_io_map);
+ m_dsp->bio().set(FUNC(twincobr_state::twincobr_bio_r));
MCFG_QUANTUM_TIME(attotime::from_hz(6000))
diff --git a/src/mame/drivers/wardner.cpp b/src/mame/drivers/wardner.cpp
index 18855f257f6..ff852bb61ba 100644
--- a/src/mame/drivers/wardner.cpp
+++ b/src/mame/drivers/wardner.cpp
@@ -141,9 +141,9 @@ out:
class wardner_state : public twincobr_state
{
public:
- wardner_state(const machine_config &mconfig, device_type type, const char *tag) :
- twincobr_state(mconfig, type, tag),
- m_membank(*this, "membank")
+ wardner_state(const machine_config &mconfig, device_type type, const char *tag)
+ : twincobr_state(mconfig, type, tag)
+ , m_membank(*this, "membank")
{
}
@@ -160,8 +160,8 @@ private:
DECLARE_WRITE8_MEMBER(wardner_bank_w);
- void DSP_io_map(address_map &map);
- void DSP_program_map(address_map &map);
+ void dsp_io_map(address_map &map);
+ void dsp_program_map(address_map &map);
void main_bank_map(address_map &map);
void main_io_map(address_map &map);
void main_program_map(address_map &map);
@@ -242,14 +242,14 @@ void wardner_state::sound_io_map(address_map &map)
/***************************** TMS32010 Memory Map **************************/
-void wardner_state::DSP_program_map(address_map &map)
+void wardner_state::dsp_program_map(address_map &map)
{
map(0x000, 0x5ff).rom();
}
/* $000 - 08F TMS32010 Internal Data RAM in Data Address Space */
-void wardner_state::DSP_io_map(address_map &map)
+void wardner_state::dsp_io_map(address_map &map)
{
map(0x00, 0x00).w(FUNC(wardner_state::wardner_dsp_addrsel_w));
map(0x01, 0x01).rw(FUNC(wardner_state::wardner_dsp_r), FUNC(wardner_state::wardner_dsp_w));
@@ -392,11 +392,11 @@ MACHINE_CONFIG_START(wardner_state::wardner)
MCFG_DEVICE_PROGRAM_MAP(sound_program_map)
MCFG_DEVICE_IO_MAP(sound_io_map)
- MCFG_DEVICE_ADD("dsp", TMS32010, XTAL(14'000'000)) /* 14MHz Crystal CLKin */
- MCFG_DEVICE_PROGRAM_MAP(DSP_program_map)
+ TMS32010(config, m_dsp, XTAL(14'000'000)); /* 14MHz Crystal CLKin */
+ m_dsp->set_addrmap(AS_PROGRAM, &wardner_state::dsp_program_map);
/* Data Map is internal to the CPU */
- MCFG_DEVICE_IO_MAP(DSP_io_map)
- MCFG_TMS32010_BIO_IN_CB(READLINE(*this, wardner_state, twincobr_BIO_r))
+ m_dsp->set_addrmap(AS_IO, &wardner_state::dsp_io_map);
+ m_dsp->bio().set(FUNC(wardner_state::twincobr_bio_r));
MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame */
diff --git a/src/mame/includes/harddriv.h b/src/mame/includes/harddriv.h
index 4ca13a575a3..aab3b1897b6 100644
--- a/src/mame/includes/harddriv.h
+++ b/src/mame/includes/harddriv.h
@@ -553,7 +553,7 @@ private:
required_device<cpu_device> m_soundcpu;
required_device<ls259_device> m_latch;
required_device<dac_word_interface> m_dac;
- required_device<cpu_device> m_sounddsp;
+ required_device<tms32010_device> m_sounddsp;
required_shared_ptr<uint16_t> m_sounddsp_ram;
required_region_ptr<uint8_t> m_sound_rom;
diff --git a/src/mame/includes/toaplan1.h b/src/mame/includes/toaplan1.h
index 496d337a2f5..b687bd71173 100644
--- a/src/mame/includes/toaplan1.h
+++ b/src/mame/includes/toaplan1.h
@@ -10,6 +10,7 @@
#pragma once
#include "cpu/m68000/m68000.h"
+#include "cpu/tms32010/tms32010.h"
#include "sound/3812intf.h"
#include "video/toaplan_scu.h"
#include "emupal.h"
@@ -57,7 +58,7 @@ protected:
/* Demon world */
int m_dsp_on;
- int m_dsp_BIO;
+ int m_dsp_bio;
int m_dsp_execute;
uint32_t m_dsp_addr_w;
uint32_t m_main_ram_seg;
@@ -108,7 +109,7 @@ protected:
DECLARE_READ16_MEMBER(demonwld_dsp_r);
DECLARE_WRITE16_MEMBER(demonwld_dsp_w);
DECLARE_WRITE16_MEMBER(demonwld_dsp_bio_w);
- DECLARE_READ_LINE_MEMBER(demonwld_BIO_r);
+ DECLARE_READ_LINE_MEMBER(demonwld_bio_r);
DECLARE_WRITE16_MEMBER(demonwld_dsp_ctrl_w);
DECLARE_READ16_MEMBER(samesame_port_6_word_r);
DECLARE_READ16_MEMBER(toaplan1_shared_r);
@@ -179,13 +180,13 @@ protected:
required_device<m68000_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
required_device<ym3812_device> m_ymsnd;
- optional_device<cpu_device> m_dsp;
+ optional_device<tms32010_device> m_dsp;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
- void DSP_io_map(address_map &map);
- void DSP_program_map(address_map &map);
+ void dsp_io_map(address_map &map);
+ void dsp_program_map(address_map &map);
void demonwld_main_map(address_map &map);
void demonwld_sound_io_map(address_map &map);
void hellfire_main_map(address_map &map);
diff --git a/src/mame/includes/twincobr.h b/src/mame/includes/twincobr.h
index 6cd75e8e917..5bcda60c5bc 100644
--- a/src/mame/includes/twincobr.h
+++ b/src/mame/includes/twincobr.h
@@ -9,6 +9,7 @@
#pragma once
+#include "cpu/tms32010/tms32010.h"
#include "machine/74259.h"
#include "video/mc6845.h"
#include "video/bufsprite.h"
@@ -52,7 +53,7 @@ protected:
int32_t m_bg_ram_bank;
int m_intenable;
int m_dsp_on;
- int m_dsp_BIO;
+ int m_dsp_bio;
int m_fsharkbt_8741;
int m_dsp_execute;
uint32_t m_dsp_addr_w;
@@ -86,7 +87,7 @@ protected:
DECLARE_WRITE16_MEMBER(twincobr_dsp_bio_w);
DECLARE_READ16_MEMBER(fsharkbt_dsp_r);
DECLARE_WRITE16_MEMBER(fsharkbt_dsp_w);
- DECLARE_READ_LINE_MEMBER(twincobr_BIO_r);
+ DECLARE_READ_LINE_MEMBER(twincobr_bio_r);
DECLARE_WRITE_LINE_MEMBER(int_enable_w);
DECLARE_WRITE_LINE_MEMBER(dsp_int_w);
DECLARE_WRITE_LINE_MEMBER(coin_counter_1_w);
@@ -135,7 +136,7 @@ protected:
void twincobr_log_vram();
void twincobr_driver_savestate();
required_device<cpu_device> m_maincpu;
- required_device<cpu_device> m_dsp;
+ required_device<tms32010_device> m_dsp;
required_device<toaplan_scu_device> m_spritegen;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
@@ -143,8 +144,8 @@ protected:
required_device<ls259_device> m_mainlatch;
required_device<ls259_device> m_coinlatch;
- void DSP_io_map(address_map &map);
- void DSP_program_map(address_map &map);
+ void dsp_io_map(address_map &map);
+ void dsp_program_map(address_map &map);
void fsharkbt_i8741_io_map(address_map &map);
void main_program_map(address_map &map);
void sound_io_map(address_map &map);
diff --git a/src/mame/machine/asic65.cpp b/src/mame/machine/asic65.cpp
index 45fec746d91..3222baa4187 100644
--- a/src/mame/machine/asic65.cpp
+++ b/src/mame/machine/asic65.cpp
@@ -538,14 +538,14 @@ void asic65_device::asic65_io_map(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(asic65_device::device_add_mconfig)
-
+void asic65_device::device_add_mconfig(machine_config &config)
+{
/* ASIC65 */
- MCFG_DEVICE_ADD("asic65cpu", TMS32010, 20000000)
- MCFG_DEVICE_PROGRAM_MAP(asic65_program_map)
- MCFG_DEVICE_IO_MAP(asic65_io_map)
- MCFG_TMS32010_BIO_IN_CB(READLINE(*this, asic65_device, get_bio))
-MACHINE_CONFIG_END
+ TMS32010(config, m_ourcpu, 20000000);
+ m_ourcpu->set_addrmap(AS_PROGRAM, &asic65_device::asic65_program_map);
+ m_ourcpu->set_addrmap(AS_IO, &asic65_device::asic65_io_map);
+ m_ourcpu->bio().set(FUNC(asic65_device::get_bio));
+}
diff --git a/src/mame/machine/asic65.h b/src/mame/machine/asic65.h
index 441c26ce17b..c283eac23ca 100644
--- a/src/mame/machine/asic65.h
+++ b/src/mame/machine/asic65.h
@@ -68,7 +68,7 @@ private:
uint8_t m_last_bank;
/* ROM-based interface states */
- required_device<cpu_device> m_ourcpu;
+ required_device<tms32010_device> m_ourcpu;
uint8_t m_tfull;
uint8_t m_68full;
uint8_t m_cmd;
diff --git a/src/mame/machine/toaplan1.cpp b/src/mame/machine/toaplan1.cpp
index 51ec990975f..7f0df70d4b3 100644
--- a/src/mame/machine/toaplan1.cpp
+++ b/src/mame/machine/toaplan1.cpp
@@ -83,7 +83,7 @@ WRITE16_MEMBER(toaplan1_state::demonwld_dsp_bio_w)
logerror("DSP PC:%04x IO write %04x at port 3\n", m_dsp->pcbase(), data);
if (data & 0x8000) {
- m_dsp_BIO = CLEAR_LINE;
+ m_dsp_bio = CLEAR_LINE;
}
if (data == 0) {
if (m_dsp_execute) {
@@ -91,13 +91,13 @@ WRITE16_MEMBER(toaplan1_state::demonwld_dsp_bio_w)
m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
m_dsp_execute = 0;
}
- m_dsp_BIO = ASSERT_LINE;
+ m_dsp_bio = ASSERT_LINE;
}
}
-READ_LINE_MEMBER(toaplan1_state::demonwld_BIO_r)
+READ_LINE_MEMBER(toaplan1_state::demonwld_bio_r)
{
- return m_dsp_BIO;
+ return m_dsp_bio;
}
@@ -288,7 +288,7 @@ void toaplan1_state::demonwld_driver_savestate()
save_item(NAME(m_dsp_on));
save_item(NAME(m_dsp_addr_w));
save_item(NAME(m_main_ram_seg));
- save_item(NAME(m_dsp_BIO));
+ save_item(NAME(m_dsp_bio));
save_item(NAME(m_dsp_execute));
machine().save().register_postload(save_prepost_delegate(FUNC(toaplan1_state::demonwld_restore_dsp), this));
}
diff --git a/src/mame/machine/twincobr.cpp b/src/mame/machine/twincobr.cpp
index 2a081806c11..5fa63ece69a 100644
--- a/src/mame/machine/twincobr.cpp
+++ b/src/mame/machine/twincobr.cpp
@@ -55,13 +55,14 @@ READ16_MEMBER(twincobr_state::twincobr_dsp_r)
/* DSP can read data from main CPU RAM via DSP IO port 1 */
uint16_t input_data = 0;
- switch (m_main_ram_seg) {
- case 0x30000:
- case 0x40000:
- case 0x50000: {address_space &mainspace = m_maincpu->space(AS_PROGRAM);
- input_data = mainspace.read_word(m_main_ram_seg + m_dsp_addr_w);
- break;}
- default: logerror("DSP PC:%04x Warning !!! IO reading from %08x (port 1)\n",m_dsp->pcbase(),m_main_ram_seg + m_dsp_addr_w); break;
+ switch (m_main_ram_seg)
+ {
+ case 0x30000:
+ case 0x40000:
+ case 0x50000: {address_space &mainspace = m_maincpu->space(AS_PROGRAM);
+ input_data = mainspace.read_word(m_main_ram_seg + m_dsp_addr_w);
+ break;}
+ default: logerror("DSP PC:%04x Warning !!! IO reading from %08x (port 1)\n",m_dsp->pcbase(),m_main_ram_seg + m_dsp_addr_w); break;
}
LOG(("DSP PC:%04x IO read %04x at %08x (port 1)\n",m_dsp->pcbase(),input_data,m_main_ram_seg + m_dsp_addr_w));
return input_data;
@@ -71,13 +72,14 @@ WRITE16_MEMBER(twincobr_state::twincobr_dsp_w)
{
/* Data written to main CPU RAM via DSP IO port 1 */
m_dsp_execute = 0;
- switch (m_main_ram_seg) {
- case 0x30000: if ((m_dsp_addr_w < 3) && (data == 0)) m_dsp_execute = 1;
- case 0x40000:
- case 0x50000: {address_space &mainspace = m_maincpu->space(AS_PROGRAM);
- mainspace.write_word(m_main_ram_seg + m_dsp_addr_w, data);
- break;}
- default: logerror("DSP PC:%04x Warning !!! IO writing to %08x (port 1)\n",m_dsp->pcbase(),m_main_ram_seg + m_dsp_addr_w); break;
+ switch (m_main_ram_seg)
+ {
+ case 0x30000: if ((m_dsp_addr_w < 3) && (data == 0)) m_dsp_execute = 1;
+ case 0x40000:
+ case 0x50000: {address_space &mainspace = m_maincpu->space(AS_PROGRAM);
+ mainspace.write_word(m_main_ram_seg + m_dsp_addr_w, data);
+ break;}
+ default: logerror("DSP PC:%04x Warning !!! IO writing to %08x (port 1)\n",m_dsp->pcbase(),m_main_ram_seg + m_dsp_addr_w); break;
}
LOG(("DSP PC:%04x IO write %04x at %08x (port 1)\n",m_dsp->pcbase(),data,m_main_ram_seg + m_dsp_addr_w));
}
@@ -102,14 +104,15 @@ READ16_MEMBER(twincobr_state::wardner_dsp_r)
/* DSP can read data from main CPU RAM via DSP IO port 1 */
uint16_t input_data = 0;
- switch (m_main_ram_seg) {
- case 0x7000:
- case 0x8000:
- case 0xa000: {address_space &mainspace = m_maincpu->space(AS_PROGRAM);
- input_data = mainspace.read_byte(m_main_ram_seg + (m_dsp_addr_w + 0))
- | (mainspace.read_byte(m_main_ram_seg + (m_dsp_addr_w + 1)) << 8);
- break;}
- default: logerror("DSP PC:%04x Warning !!! IO reading from %08x (port 1)\n",m_dsp->pcbase(),m_main_ram_seg + m_dsp_addr_w); break;
+ switch (m_main_ram_seg)
+ {
+ case 0x7000:
+ case 0x8000:
+ case 0xa000: {address_space &mainspace = m_maincpu->space(AS_PROGRAM);
+ input_data = mainspace.read_byte(m_main_ram_seg + (m_dsp_addr_w + 0))
+ | (mainspace.read_byte(m_main_ram_seg + (m_dsp_addr_w + 1)) << 8);
+ break;}
+ default: logerror("DSP PC:%04x Warning !!! IO reading from %08x (port 1)\n",m_dsp->pcbase(),m_main_ram_seg + m_dsp_addr_w); break;
}
LOG(("DSP PC:%04x IO read %04x at %08x (port 1)\n",m_dsp->pcbase(),input_data,m_main_ram_seg + m_dsp_addr_w));
return input_data;
@@ -119,14 +122,15 @@ WRITE16_MEMBER(twincobr_state::wardner_dsp_w)
{
/* Data written to main CPU RAM via DSP IO port 1 */
m_dsp_execute = 0;
- switch (m_main_ram_seg) {
- case 0x7000: if ((m_dsp_addr_w < 3) && (data == 0)) m_dsp_execute = 1;
- case 0x8000:
- case 0xa000: {address_space &mainspace = m_maincpu->space(AS_PROGRAM);
- mainspace.write_byte(m_main_ram_seg + (m_dsp_addr_w + 0), (data & 0xff));
- mainspace.write_byte(m_main_ram_seg + (m_dsp_addr_w + 1), ((data >> 8) & 0xff));
- break;}
- default: logerror("DSP PC:%04x Warning !!! IO writing to %08x (port 1)\n",m_dsp->pcbase(),m_main_ram_seg + m_dsp_addr_w); break;
+ switch (m_main_ram_seg)
+ {
+ case 0x7000: if ((m_dsp_addr_w < 3) && (data == 0)) m_dsp_execute = 1;
+ case 0x8000:
+ case 0xa000: {address_space &mainspace = m_maincpu->space(AS_PROGRAM);
+ mainspace.write_byte(m_main_ram_seg + (m_dsp_addr_w + 0), (data & 0xff));
+ mainspace.write_byte(m_main_ram_seg + (m_dsp_addr_w + 1), ((data >> 8) & 0xff));
+ break;}
+ default: logerror("DSP PC:%04x Warning !!! IO writing to %08x (port 1)\n",m_dsp->pcbase(),m_main_ram_seg + m_dsp_addr_w); break;
}
LOG(("DSP PC:%04x IO write %04x at %08x (port 1)\n",m_dsp->pcbase(),data,m_main_ram_seg + m_dsp_addr_w));
}
@@ -139,16 +143,19 @@ WRITE16_MEMBER(twincobr_state::twincobr_dsp_bio_w)
/* data 0x0000 means set DSP BIO line active and disable */
/* communication to main processor*/
LOG(("DSP PC:%04x IO write %04x at port 3\n",m_dsp->pcbase(),data));
- if (data & 0x8000) {
- m_dsp_BIO = CLEAR_LINE;
+ if (data & 0x8000)
+ {
+ m_dsp_bio = CLEAR_LINE;
}
- if (data == 0) {
- if (m_dsp_execute) {
+ if (data == 0)
+ {
+ if (m_dsp_execute)
+ {
LOG(("Turning the main CPU on\n"));
m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
m_dsp_execute = 0;
}
- m_dsp_BIO = ASSERT_LINE;
+ m_dsp_bio = ASSERT_LINE;
}
}
@@ -171,9 +178,9 @@ WRITE16_MEMBER(twincobr_state::fsharkbt_dsp_w)
#endif
}
-READ_LINE_MEMBER(twincobr_state::twincobr_BIO_r)
+READ_LINE_MEMBER(twincobr_state::twincobr_bio_r)
{
- return m_dsp_BIO;
+ return m_dsp_bio;
}
@@ -248,7 +255,7 @@ MACHINE_RESET_MEMBER(twincobr_state,twincobr)
m_dsp_addr_w = 0;
m_main_ram_seg = 0;
m_dsp_execute = 0;
- m_dsp_BIO = CLEAR_LINE;
+ m_dsp_bio = CLEAR_LINE;
m_fsharkbt_8741 = -1;
}
@@ -258,7 +265,7 @@ void twincobr_state::twincobr_driver_savestate()
save_item(NAME(m_dsp_on));
save_item(NAME(m_dsp_addr_w));
save_item(NAME(m_main_ram_seg));
- save_item(NAME(m_dsp_BIO));
+ save_item(NAME(m_dsp_bio));
save_item(NAME(m_dsp_execute));
save_item(NAME(m_fsharkbt_8741));