-tms32010.cpp: Removed MCFG. [Ryan Holtz]

(nw) Fixed validation.
This commit is contained in:
mooglyguy 2018-12-07 00:07:08 +01:00
parent f9f2a1f95a
commit 7ca7e6597b
23 changed files with 194 additions and 193 deletions

View File

@ -163,10 +163,10 @@ MACHINE_CONFIG_START(dectalk_isa_device::device_add_mconfig)
MCFG_DEVICE_PROGRAM_MAP(dectalk_cpu_map) MCFG_DEVICE_PROGRAM_MAP(dectalk_cpu_map)
MCFG_80186_TMROUT0_HANDLER(WRITELINE(*this, dectalk_isa_device, clock_w)); MCFG_80186_TMROUT0_HANDLER(WRITELINE(*this, dectalk_isa_device, clock_w));
MCFG_DEVICE_ADD("dectalk_dsp", TMS32015, XTAL(20'000'000)) TMS32015(config, m_dsp, XTAL(20'000'000));
MCFG_DEVICE_IO_MAP(dectalk_dsp_io) m_dsp->set_addrmap(AS_PROGRAM, &dectalk_isa_device::dectalk_dsp_map);
MCFG_TMS32010_BIO_IN_CB(READLINE(*this, dectalk_isa_device, bio_line_r)) m_dsp->set_addrmap(AS_IO, &dectalk_isa_device::dectalk_dsp_io);
MCFG_DEVICE_PROGRAM_MAP(dectalk_dsp_map) m_dsp->bio().set(FUNC(dectalk_isa_device::bio_line_r));
SPEAKER(config, "speaker").front_center(); SPEAKER(config, "speaker").front_center();
MCFG_DEVICE_ADD("dac", DAC_12BIT_R2R, 0) MCFG_SOUND_ROUTE(0, "speaker", 1.0) // unknown DAC MCFG_DEVICE_ADD("dac", DAC_12BIT_R2R, 0) MCFG_SOUND_ROUTE(0, "speaker", 1.0) // unknown DAC

View File

@ -55,7 +55,7 @@ private:
required_device<i80186_cpu_device> m_cpu; required_device<i80186_cpu_device> m_cpu;
required_device<dac_12bit_r2r_device> m_dac; 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) DECLARE_DEVICE_TYPE(ISA8_DECTALK, dectalk_isa_device)

View File

@ -15,16 +15,9 @@
#pragma once #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_PENDING 0x80000000
#define TMS32010_INT_NONE 0 #define TMS32010_INT_NONE 0
enum enum
{ {
TMS32010_PC=1, TMS32010_SP, TMS32010_STR, TMS32010_ACC, 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); tms32010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// configuration helpers // 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 tms32010_ram(address_map &map);
void tms32015_ram(address_map &map); void tms32015_ram(address_map &map);

View File

@ -94,13 +94,14 @@ const tiny_rom_entry *bsmt2000_device::device_rom_region() const
// device_add_mconfig - add device configuration // device_add_mconfig - add device configuration
//------------------------------------------------- //-------------------------------------------------
MACHINE_CONFIG_START(bsmt2000_device::device_add_mconfig) void bsmt2000_device::device_add_mconfig(machine_config &config)
MCFG_DEVICE_ADD("bsmt2000", TMS32015, DERIVED_CLOCK(1,1)) {
MCFG_DEVICE_PROGRAM_MAP(tms_program_map) 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 // data map is internal to the CPU
MCFG_DEVICE_IO_MAP(tms_io_map) tms.set_addrmap(AS_IO, &bsmt2000_device::tms_io_map);
MCFG_TMS32010_BIO_IN_CB(READLINE(*this, bsmt2000_device, tms_write_pending_r)) tms.bio().set(FUNC(bsmt2000_device::tms_write_pending_r));
MACHINE_CONFIG_END }
//------------------------------------------------- //-------------------------------------------------

View File

@ -37,7 +37,7 @@ private:
u16 m_program_pfp[0x180], m_program_pint[0x80], m_program_plfo[0x80]; 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_envelope[0x40][3];
u16 m_lpf_cutoff[0x40], m_lpf_cutoff_inc[0x40], m_lpf_reso[0x40], m_hpf_cutoff[0x40]; u16 m_lpf_cutoff[0x40], m_lpf_cutoff_inc[0x40], m_lpf_reso[0x40], m_hpf_cutoff[0x40];
s16 m_eq_filter[0x40][6]; s16 m_eq_filter[0x40][6];

View File

@ -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<4>().set_inputline(m_sounddsp, INPUT_LINE_HALT).invert(); // RES320
m_latch->q_out_cb<7>().set(FUNC(harddriv_sound_board_device::led_w)); m_latch->q_out_cb<7>().set(FUNC(harddriv_sound_board_device::led_w));
MCFG_DEVICE_ADD("sounddsp", TMS32010, XTAL(20'000'000)) TMS32010(config, m_sounddsp, XTAL(20'000'000));
MCFG_DEVICE_PROGRAM_MAP(driversnd_dsp_program_map) m_sounddsp->set_addrmap(AS_PROGRAM, &harddriv_sound_board_device::driversnd_dsp_program_map);
/* Data Map is internal to the CPU */ /* Data Map is internal to the CPU */
MCFG_DEVICE_IO_MAP(driversnd_dsp_io_map) m_sounddsp->set_addrmap(AS_IO, &harddriv_sound_board_device::driversnd_dsp_io_map);
MCFG_TMS32010_BIO_IN_CB(READLINE(*this, harddriv_sound_board_device, hdsnddsp_get_bio)) m_sounddsp->bio().set(FUNC(harddriv_sound_board_device::hdsnddsp_get_bio));
/* sound hardware */ /* sound hardware */
SPEAKER(config, "speaker").front_center(); SPEAKER(config, "speaker").front_center();

View File

@ -147,7 +147,7 @@ protected:
void dsp0_io_map(address_map &map); void dsp0_io_map(address_map &map);
required_device<cpu_device> m_maincpu; required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_dsp0; required_device<tms32010_device> m_dsp0;
required_memory_bank m_dsp0_bank1; required_memory_bank m_dsp0_bank1;
@ -201,7 +201,7 @@ protected:
void dsp1_io_map(address_map &map); void dsp1_io_map(address_map &map);
private: private:
required_device<cpu_device> m_dsp1; required_device<tms32010_device> m_dsp1;
required_memory_bank m_dsp1_bank1; required_memory_bank m_dsp1_bank1;
}; };
@ -807,36 +807,36 @@ INPUT_PORTS_END
* *
*************************************/ *************************************/
MACHINE_CONFIG_START(atarisy4_state::atarisy4) void atarisy4_state::atarisy4(machine_config &config)
MCFG_DEVICE_ADD(m_maincpu, M68000, 8000000) {
MCFG_DEVICE_PROGRAM_MAP(main_map) M68000(config, m_maincpu, 8000000);
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", atarisy4_state, vblank_int) m_maincpu->set_addrmap(AS_PROGRAM, &atarisy4_state::main_map);
m_maincpu->set_vblank_int("screen", FUNC(atarisy4_state::vblank_int));
MCFG_DEVICE_ADD(m_dsp0, TMS32010, 16000000) TMS32010(config, m_dsp0, 16000000);
MCFG_DEVICE_PROGRAM_MAP(dsp0_map) m_dsp0->set_addrmap(AS_PROGRAM, &atarisy4_state::dsp0_map);
MCFG_DEVICE_IO_MAP(dsp0_io_map) m_dsp0->set_addrmap(AS_IO, &atarisy4_state::dsp0_io_map);
MCFG_TMS32010_BIO_IN_CB(READLINE(*this, atarisy4_state, dsp0_bio_r)) m_dsp0->bio().set(FUNC(atarisy4_state::dsp0_bio_r));
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));
MCFG_SCREEN_ADD("screen", RASTER) PALETTE(config, m_palette, 256);
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)
MACHINE_CONFIG_END void airrace_state::airrace(machine_config &config)
{
MACHINE_CONFIG_START(airrace_state::airrace)
atarisy4(config); atarisy4(config);
MCFG_DEVICE_MODIFY("maincpu") m_maincpu->set_addrmap(AS_PROGRAM, &airrace_state::airrace_map);
MCFG_DEVICE_PROGRAM_MAP(airrace_map)
MCFG_DEVICE_ADD(m_dsp1, TMS32010, 16000000) TMS32010(config, m_dsp1, 16000000);
MCFG_DEVICE_PROGRAM_MAP(dsp1_map) m_dsp1->set_addrmap(AS_PROGRAM, &airrace_state::dsp1_map);
MCFG_DEVICE_IO_MAP(dsp1_io_map) m_dsp1->set_addrmap(AS_IO, &airrace_state::dsp1_io_map);
MCFG_TMS32010_BIO_IN_CB(READLINE(*this, airrace_state, dsp1_bio_r)) m_dsp1->bio().set(FUNC(airrace_state::dsp1_bio_r));
MACHINE_CONFIG_END }
/************************************* /*************************************

View File

@ -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_in_callback(FUNC(coolpool_state::to_shiftreg));
m_maincpu->set_shiftreg_out_callback(FUNC(coolpool_state::from_shiftreg)); m_maincpu->set_shiftreg_out_callback(FUNC(coolpool_state::from_shiftreg));
MCFG_DEVICE_ADD("dsp", TMS32015, XTAL(40'000'000)/2) tms32015_device &dsp(TMS32015(config, m_dsp, XTAL(40'000'000)/2));
MCFG_DEVICE_PROGRAM_MAP(amerdart_dsp_pgm_map) dsp.set_addrmap(AS_PROGRAM, &coolpool_state::amerdart_dsp_pgm_map);
/* Data Map is internal to the CPU */ /* Data Map is internal to the CPU */
MCFG_DEVICE_IO_MAP(amerdart_dsp_io_map) dsp.set_addrmap(AS_IO, &coolpool_state::amerdart_dsp_io_map);
MCFG_TMS32010_BIO_IN_CB(READLINE(*this, coolpool_state, amerdart_dsp_bio_line_r)) 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) MCFG_TIMER_DRIVER_ADD_SCANLINE("audioint", coolpool_state, amerdart_audio_int_gen, "screen", 0, 1)
GENERIC_LATCH_16(config, m_main2dsp); GENERIC_LATCH_16(config, m_main2dsp);

View File

@ -9844,7 +9844,7 @@ void ddenlovr_state::ultrchmp(machine_config &config)
void ddenlovr_state::quizchq(machine_config &config) void ddenlovr_state::quizchq(machine_config &config)
{ {
/* basic machine hardware */ /* 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_PROGRAM, &ddenlovr_state::quizchq_map);
maincpu.set_addrmap(AS_IO, &ddenlovr_state::quizchq_portmap); maincpu.set_addrmap(AS_IO, &ddenlovr_state::quizchq_portmap);
maincpu.in_pa_callback().set(FUNC(ddenlovr_state::rongrong_input_r)); maincpu.in_pa_callback().set(FUNC(ddenlovr_state::rongrong_input_r));

View File

@ -293,7 +293,7 @@ private:
bool m_hack_self_test_is_second_read; // temp variable for hack below bool m_hack_self_test_is_second_read; // temp variable for hack below
required_device<m68000_base_device> m_maincpu; 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<scn2681_device> m_duart;
required_device<x2212_device> m_nvram; required_device<x2212_device> m_nvram;
required_device<dac_word_interface> m_dac; 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_INPORT_CALLBACK(READ8(*this, dectalk_state, duart_input))
MCFG_MC68681_OUTPORT_CALLBACK(WRITE8(*this, dectalk_state, duart_output)) MCFG_MC68681_OUTPORT_CALLBACK(WRITE8(*this, dectalk_state, duart_output))
MCFG_DEVICE_ADD("dsp", TMS32010, XTAL(20'000'000)) /* Y1 20MHz xtal */ TMS32010(config, m_dsp, XTAL(20'000'000)); /* Y1 20MHz xtal */
MCFG_DEVICE_PROGRAM_MAP(tms32010_mem) m_dsp->set_addrmap(AS_PROGRAM, &dectalk_state::tms32010_mem);
MCFG_DEVICE_IO_MAP(tms32010_io) m_dsp->set_addrmap(AS_IO, &dectalk_state::tms32010_io);
MCFG_TMS32010_BIO_IN_CB(READLINE(*this, dectalk_state, spc_semaphore_r)) //read infifo-has-data-in-it fifo readable status m_dsp->bio().set(FUNC(dectalk_state::spc_semaphore_r)); //read infifo-has-data-in-it fifo readable status
#ifdef USE_LOOSE_TIMING #ifdef USE_LOOSE_TIMING
MCFG_QUANTUM_TIME(attotime::from_hz(100)) MCFG_QUANTUM_TIME(attotime::from_hz(100))
#else #else

View File

@ -76,7 +76,6 @@ public:
exelv_state(const machine_config &mconfig, device_type type, const char *tag) exelv_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag), : driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"), m_maincpu(*this, "maincpu"),
m_subcpu(*this, "subcpu"),
m_tms3556(*this, "tms3556"), m_tms3556(*this, "tms3556"),
m_tms5220c(*this, "tms5220c"), m_tms5220c(*this, "tms5220c"),
m_cart(*this, "cartslot") m_cart(*this, "cartslot")
@ -87,7 +86,6 @@ public:
private: private:
required_device<tms7000_device> m_maincpu; required_device<tms7000_device> m_maincpu;
required_device<tms7000_device> m_subcpu;
required_device<tms3556_device> m_tms3556; required_device<tms3556_device> m_tms3556;
required_device<tms5220c_device> m_tms5220c; required_device<tms5220c_device> m_tms5220c;
optional_device<generic_slot_device> m_cart; 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_TIMER_DRIVER_ADD_SCANLINE("scantimer", exelv_state, exelv_hblank_interrupt, "screen", 0, 1)
MCFG_MACHINE_START_OVERRIDE(exelv_state, exl100) MCFG_MACHINE_START_OVERRIDE(exelv_state, exl100)
TMS7041(config, m_subcpu, XTAL(4'915'200)); tms7041_device &subcpu(TMS7041(config, "tms7041", XTAL(4'915'200)));
m_subcpu->in_porta().set(FUNC(exelv_state::tms7041_porta_r)); subcpu.in_porta().set(FUNC(exelv_state::tms7041_porta_r));
m_subcpu->out_portb().set(FUNC(exelv_state::tms7041_portb_w)); subcpu.out_portb().set(FUNC(exelv_state::tms7041_portb_w));
m_subcpu->in_portc().set(FUNC(exelv_state::tms7041_portc_r)); subcpu.in_portc().set(FUNC(exelv_state::tms7041_portc_r));
m_subcpu->out_portc().set(FUNC(exelv_state::tms7041_portc_w)); subcpu.out_portc().set(FUNC(exelv_state::tms7041_portc_w));
m_subcpu->in_portd().set(FUNC(exelv_state::tms7041_portd_r)); subcpu.in_portd().set(FUNC(exelv_state::tms7041_portd_r));
m_subcpu->out_portd().set(FUNC(exelv_state::tms7041_portd_w)); subcpu.out_portd().set(FUNC(exelv_state::tms7041_portd_w));
MCFG_QUANTUM_PERFECT_CPU("maincpu") 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_TIMER_DRIVER_ADD_SCANLINE("scantimer", exelv_state, exelv_hblank_interrupt, "screen", 0, 1)
MCFG_MACHINE_START_OVERRIDE(exelv_state, exeltel) MCFG_MACHINE_START_OVERRIDE(exelv_state, exeltel)
TMS7042(config, m_subcpu, XTAL(4'915'200)); tms7042_device &subcpu(TMS7042(config, "tms7042", XTAL(4'915'200)));
m_subcpu->in_porta().set(FUNC(exelv_state::tms7041_porta_r)); subcpu.in_porta().set(FUNC(exelv_state::tms7041_porta_r));
m_subcpu->out_portb().set(FUNC(exelv_state::tms7041_portb_w)); subcpu.out_portb().set(FUNC(exelv_state::tms7041_portb_w));
m_subcpu->in_portc().set(FUNC(exelv_state::tms7041_portc_r)); subcpu.in_portc().set(FUNC(exelv_state::tms7041_portc_r));
m_subcpu->out_portc().set(FUNC(exelv_state::tms7041_portc_w)); subcpu.out_portc().set(FUNC(exelv_state::tms7041_portc_w));
m_subcpu->in_portd().set(FUNC(exelv_state::tms7041_portd_r)); subcpu.in_portd().set(FUNC(exelv_state::tms7041_portd_r));
m_subcpu->out_portd().set(FUNC(exelv_state::tms7041_portd_w)); subcpu.out_portd().set(FUNC(exelv_state::tms7041_portd_w));
MCFG_QUANTUM_PERFECT_CPU("maincpu") MCFG_QUANTUM_PERFECT_CPU("maincpu")

View File

@ -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/toaplan1.h"
#include "includes/toaplipt.h" #include "includes/toaplipt.h"
#include "cpu/tms32010/tms32010.h"
#include "cpu/z80/z80.h" #include "cpu/z80/z80.h"
#include "cpu/z180/z180.h" #include "cpu/z180/z180.h"
#include "machine/74259.h" #include "machine/74259.h"
@ -927,14 +926,14 @@ void toaplan1_state::outzone_sound_io_map(address_map &map)
/***************************** TMS32010 Memory 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(); map(0x000, 0x7ff).rom();
} }
/* $000 - 08F TMS32010 Internal Data RAM in Data Address Space */ /* $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(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)); 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_PROGRAM_MAP(toaplan1_sound_map)
MCFG_DEVICE_IO_MAP(demonwld_sound_io_map) MCFG_DEVICE_IO_MAP(demonwld_sound_io_map)
MCFG_DEVICE_ADD("dsp", TMS32010, XTAL(28'000'000)/2) TMS32010(config, m_dsp, XTAL(28'000'000)/2);
MCFG_DEVICE_PROGRAM_MAP(DSP_program_map) m_dsp->set_addrmap(AS_PROGRAM, &toaplan1_state::dsp_program_map);
MCFG_DEVICE_IO_MAP(DSP_io_map) m_dsp->set_addrmap(AS_IO, &toaplan1_state::dsp_io_map);
MCFG_TMS32010_BIO_IN_CB(READLINE(*this, toaplan1_state, demonwld_BIO_r)) m_dsp->bio().set(FUNC(toaplan1_state::demonwld_bio_r));
MCFG_QUANTUM_TIME(attotime::from_hz(600)) MCFG_QUANTUM_TIME(attotime::from_hz(600))

View File

@ -47,14 +47,14 @@
class tomcat_state : public driver_device class tomcat_state : public driver_device
{ {
public: public:
tomcat_state(const machine_config &mconfig, device_type type, const char *tag) : tomcat_state(const machine_config &mconfig, device_type type, const char *tag)
driver_device(mconfig, type, tag), : driver_device(mconfig, type, tag)
m_tms(*this, "tms"), , m_tms(*this, "tms")
m_shared_ram(*this, "shared_ram"), , m_shared_ram(*this, "shared_ram")
m_maincpu(*this, "maincpu"), , m_maincpu(*this, "maincpu")
m_dsp(*this, "dsp"), , m_dsp(*this, "dsp")
m_adc(*this, "adc"), , m_adc(*this, "adc")
m_mainlatch(*this, "mainlatch") , m_mainlatch(*this, "mainlatch")
{ } { }
void tomcat(machine_config &config); void tomcat(machine_config &config);
@ -74,7 +74,7 @@ private:
DECLARE_READ16_MEMBER(tomcat_320bio_r); DECLARE_READ16_MEMBER(tomcat_320bio_r);
DECLARE_READ8_MEMBER(tomcat_nvram_r); DECLARE_READ8_MEMBER(tomcat_nvram_r);
DECLARE_WRITE8_MEMBER(tomcat_nvram_w); 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); DECLARE_WRITE8_MEMBER(soundlatches_w);
virtual void machine_start() override; virtual void machine_start() override;
void dsp_map(address_map &map); void dsp_map(address_map &map);
@ -84,11 +84,11 @@ private:
required_device<tms5220_device> m_tms; required_device<tms5220_device> m_tms;
required_shared_ptr<uint16_t> m_shared_ram; required_shared_ptr<uint16_t> m_shared_ram;
uint8_t m_nvram[0x800]; uint8_t m_nvram[0x800];
int m_dsp_BIO; int m_dsp_bio;
int m_dsp_idle; int m_dsp_idle;
required_device<cpu_device> m_maincpu; 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<adc0808_device> m_adc;
required_device<ls259_device> m_mainlatch; required_device<ls259_device> m_mainlatch;
}; };
@ -151,7 +151,7 @@ WRITE_LINE_MEMBER(tomcat_state::mres_w)
// When Low: Reset TMS320 // When Low: Reset TMS320
// When High: Release reset of TMS320 // When High: Release reset of TMS320
if (state) if (state)
m_dsp_BIO = 0; m_dsp_bio = 0;
m_dsp->set_input_line(INPUT_LINE_RESET, state ? CLEAR_LINE : ASSERT_LINE); 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) READ16_MEMBER(tomcat_state::tomcat_320bio_r)
{ {
m_dsp_BIO = 1; m_dsp_bio = 1;
m_maincpu->suspend(SUSPEND_REASON_SPIN, 1); m_maincpu->suspend(SUSPEND_REASON_SPIN, 1);
return 0; 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_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_idle = 0;
m_dsp_BIO = 0; m_dsp_bio = 0;
m_maincpu->resume(SUSPEND_REASON_SPIN ); m_maincpu->resume(SUSPEND_REASON_SPIN);
return 0; return 0;
} }
else else
@ -211,7 +211,7 @@ READ_LINE_MEMBER(tomcat_state::dsp_BIO_r)
} }
else 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); subdevice<nvram_device>("nvram")->set_base(m_nvram, 0x800);
save_item(NAME(m_nvram)); save_item(NAME(m_nvram));
save_item(NAME(m_dsp_BIO)); save_item(NAME(m_dsp_bio));
save_item(NAME(m_dsp_idle)); save_item(NAME(m_dsp_idle));
m_dsp_BIO = 0; m_dsp_bio = 0;
} }
MACHINE_CONFIG_START(tomcat_state::tomcat) 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, 5*60)
//MCFG_DEVICE_PERIODIC_INT_DRIVER(tomcat_state, irq1_line_assert, 12.096_MHz_XTAL / 16 / 16 / 16 / 12) //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) TMS32010(config, m_dsp, 16_MHz_XTAL);
MCFG_DEVICE_PROGRAM_MAP( dsp_map) m_dsp->set_addrmap(AS_PROGRAM, &tomcat_state::dsp_map);
MCFG_TMS32010_BIO_IN_CB(READLINE(*this, tomcat_state, dsp_BIO_r)) 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_DISABLE()
MCFG_DEVICE_PROGRAM_MAP( sound_map) MCFG_DEVICE_PROGRAM_MAP( sound_map)

View File

@ -382,7 +382,7 @@ MACHINE_CONFIG_START(tsispch_state::prose2k)
/* TODO: hook up p0, p1, int */ /* TODO: hook up p0, p1, int */
UPD7725(config, m_dsp, 8000000); /* VERIFIED clock, unknown divider; correct dsp type is UPD77P20 */ 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_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->p0().set(FUNC(tsispch_state::dsp_to_8086_p0_w));
m_dsp->p1().set(FUNC(tsispch_state::dsp_to_8086_p1_w)); m_dsp->p1().set(FUNC(tsispch_state::dsp_to_8086_p1_w));

View File

@ -383,7 +383,6 @@ Shark Zame
#include "cpu/m68000/m68000.h" #include "cpu/m68000/m68000.h"
#include "cpu/mcs48/mcs48.h" #include "cpu/mcs48/mcs48.h"
#include "cpu/tms32010/tms32010.h"
#include "cpu/z80/z80.h" #include "cpu/z80/z80.h"
#include "sound/3812intf.h" #include "sound/3812intf.h"
#include "speaker.h" #include "speaker.h"
@ -442,14 +441,14 @@ void twincobr_state::sound_io_map(address_map &map)
/***************************** TMS32010 Memory 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(); map(0x000, 0x7ff).rom();
} }
/* $000 - 08F TMS32010 Internal Data RAM in Data Address Space */ /* $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(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)); 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_PROGRAM_MAP(sound_program_map)
MCFG_DEVICE_IO_MAP(sound_io_map) MCFG_DEVICE_IO_MAP(sound_io_map)
MCFG_DEVICE_ADD("dsp", TMS32010, XTAL(28'000'000)/2) /* 14MHz CLKin */ TMS32010(config, m_dsp, XTAL(28'000'000)/2); /* 14MHz CLKin */
MCFG_DEVICE_PROGRAM_MAP(DSP_program_map) m_dsp->set_addrmap(AS_PROGRAM, &twincobr_state::dsp_program_map);
/* Data Map is internal to the CPU */ /* Data Map is internal to the CPU */
MCFG_DEVICE_IO_MAP(DSP_io_map) m_dsp->set_addrmap(AS_IO, &twincobr_state::dsp_io_map);
MCFG_TMS32010_BIO_IN_CB(READLINE(*this, twincobr_state, twincobr_BIO_r)) m_dsp->bio().set(FUNC(twincobr_state::twincobr_bio_r));
MCFG_QUANTUM_TIME(attotime::from_hz(6000)) MCFG_QUANTUM_TIME(attotime::from_hz(6000))

View File

@ -141,9 +141,9 @@ out:
class wardner_state : public twincobr_state class wardner_state : public twincobr_state
{ {
public: public:
wardner_state(const machine_config &mconfig, device_type type, const char *tag) : wardner_state(const machine_config &mconfig, device_type type, const char *tag)
twincobr_state(mconfig, type, tag), : twincobr_state(mconfig, type, tag)
m_membank(*this, "membank") , m_membank(*this, "membank")
{ {
} }
@ -160,8 +160,8 @@ private:
DECLARE_WRITE8_MEMBER(wardner_bank_w); DECLARE_WRITE8_MEMBER(wardner_bank_w);
void DSP_io_map(address_map &map); void dsp_io_map(address_map &map);
void DSP_program_map(address_map &map); void dsp_program_map(address_map &map);
void main_bank_map(address_map &map); void main_bank_map(address_map &map);
void main_io_map(address_map &map); void main_io_map(address_map &map);
void main_program_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 **************************/ /***************************** 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(); map(0x000, 0x5ff).rom();
} }
/* $000 - 08F TMS32010 Internal Data RAM in Data Address Space */ /* $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(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)); 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_PROGRAM_MAP(sound_program_map)
MCFG_DEVICE_IO_MAP(sound_io_map) MCFG_DEVICE_IO_MAP(sound_io_map)
MCFG_DEVICE_ADD("dsp", TMS32010, XTAL(14'000'000)) /* 14MHz Crystal CLKin */ TMS32010(config, m_dsp, XTAL(14'000'000)); /* 14MHz Crystal CLKin */
MCFG_DEVICE_PROGRAM_MAP(DSP_program_map) m_dsp->set_addrmap(AS_PROGRAM, &wardner_state::dsp_program_map);
/* Data Map is internal to the CPU */ /* Data Map is internal to the CPU */
MCFG_DEVICE_IO_MAP(DSP_io_map) m_dsp->set_addrmap(AS_IO, &wardner_state::dsp_io_map);
MCFG_TMS32010_BIO_IN_CB(READLINE(*this, wardner_state, twincobr_BIO_r)) m_dsp->bio().set(FUNC(wardner_state::twincobr_bio_r));
MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame */ MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame */

View File

@ -553,7 +553,7 @@ private:
required_device<cpu_device> m_soundcpu; required_device<cpu_device> m_soundcpu;
required_device<ls259_device> m_latch; required_device<ls259_device> m_latch;
required_device<dac_word_interface> m_dac; 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_shared_ptr<uint16_t> m_sounddsp_ram;
required_region_ptr<uint8_t> m_sound_rom; required_region_ptr<uint8_t> m_sound_rom;

View File

@ -10,6 +10,7 @@
#pragma once #pragma once
#include "cpu/m68000/m68000.h" #include "cpu/m68000/m68000.h"
#include "cpu/tms32010/tms32010.h"
#include "sound/3812intf.h" #include "sound/3812intf.h"
#include "video/toaplan_scu.h" #include "video/toaplan_scu.h"
#include "emupal.h" #include "emupal.h"
@ -57,7 +58,7 @@ protected:
/* Demon world */ /* Demon world */
int m_dsp_on; int m_dsp_on;
int m_dsp_BIO; int m_dsp_bio;
int m_dsp_execute; int m_dsp_execute;
uint32_t m_dsp_addr_w; uint32_t m_dsp_addr_w;
uint32_t m_main_ram_seg; uint32_t m_main_ram_seg;
@ -108,7 +109,7 @@ protected:
DECLARE_READ16_MEMBER(demonwld_dsp_r); DECLARE_READ16_MEMBER(demonwld_dsp_r);
DECLARE_WRITE16_MEMBER(demonwld_dsp_w); DECLARE_WRITE16_MEMBER(demonwld_dsp_w);
DECLARE_WRITE16_MEMBER(demonwld_dsp_bio_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_WRITE16_MEMBER(demonwld_dsp_ctrl_w);
DECLARE_READ16_MEMBER(samesame_port_6_word_r); DECLARE_READ16_MEMBER(samesame_port_6_word_r);
DECLARE_READ16_MEMBER(toaplan1_shared_r); DECLARE_READ16_MEMBER(toaplan1_shared_r);
@ -179,13 +180,13 @@ protected:
required_device<m68000_device> m_maincpu; required_device<m68000_device> m_maincpu;
required_device<cpu_device> m_audiocpu; required_device<cpu_device> m_audiocpu;
required_device<ym3812_device> m_ymsnd; 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<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen; required_device<screen_device> m_screen;
required_device<palette_device> m_palette; required_device<palette_device> m_palette;
void DSP_io_map(address_map &map); void dsp_io_map(address_map &map);
void DSP_program_map(address_map &map); void dsp_program_map(address_map &map);
void demonwld_main_map(address_map &map); void demonwld_main_map(address_map &map);
void demonwld_sound_io_map(address_map &map); void demonwld_sound_io_map(address_map &map);
void hellfire_main_map(address_map &map); void hellfire_main_map(address_map &map);

View File

@ -9,6 +9,7 @@
#pragma once #pragma once
#include "cpu/tms32010/tms32010.h"
#include "machine/74259.h" #include "machine/74259.h"
#include "video/mc6845.h" #include "video/mc6845.h"
#include "video/bufsprite.h" #include "video/bufsprite.h"
@ -52,7 +53,7 @@ protected:
int32_t m_bg_ram_bank; int32_t m_bg_ram_bank;
int m_intenable; int m_intenable;
int m_dsp_on; int m_dsp_on;
int m_dsp_BIO; int m_dsp_bio;
int m_fsharkbt_8741; int m_fsharkbt_8741;
int m_dsp_execute; int m_dsp_execute;
uint32_t m_dsp_addr_w; uint32_t m_dsp_addr_w;
@ -86,7 +87,7 @@ protected:
DECLARE_WRITE16_MEMBER(twincobr_dsp_bio_w); DECLARE_WRITE16_MEMBER(twincobr_dsp_bio_w);
DECLARE_READ16_MEMBER(fsharkbt_dsp_r); DECLARE_READ16_MEMBER(fsharkbt_dsp_r);
DECLARE_WRITE16_MEMBER(fsharkbt_dsp_w); 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(int_enable_w);
DECLARE_WRITE_LINE_MEMBER(dsp_int_w); DECLARE_WRITE_LINE_MEMBER(dsp_int_w);
DECLARE_WRITE_LINE_MEMBER(coin_counter_1_w); DECLARE_WRITE_LINE_MEMBER(coin_counter_1_w);
@ -135,7 +136,7 @@ protected:
void twincobr_log_vram(); void twincobr_log_vram();
void twincobr_driver_savestate(); void twincobr_driver_savestate();
required_device<cpu_device> m_maincpu; 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<toaplan_scu_device> m_spritegen;
required_device<gfxdecode_device> m_gfxdecode; required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen; required_device<screen_device> m_screen;
@ -143,8 +144,8 @@ protected:
required_device<ls259_device> m_mainlatch; required_device<ls259_device> m_mainlatch;
required_device<ls259_device> m_coinlatch; required_device<ls259_device> m_coinlatch;
void DSP_io_map(address_map &map); void dsp_io_map(address_map &map);
void DSP_program_map(address_map &map); void dsp_program_map(address_map &map);
void fsharkbt_i8741_io_map(address_map &map); void fsharkbt_i8741_io_map(address_map &map);
void main_program_map(address_map &map); void main_program_map(address_map &map);
void sound_io_map(address_map &map); void sound_io_map(address_map &map);

View File

@ -538,14 +538,14 @@ void asic65_device::asic65_io_map(address_map &map)
// device_add_mconfig - add device configuration // device_add_mconfig - add device configuration
//------------------------------------------------- //-------------------------------------------------
MACHINE_CONFIG_START(asic65_device::device_add_mconfig) void asic65_device::device_add_mconfig(machine_config &config)
{
/* ASIC65 */ /* ASIC65 */
MCFG_DEVICE_ADD("asic65cpu", TMS32010, 20000000) TMS32010(config, m_ourcpu, 20000000);
MCFG_DEVICE_PROGRAM_MAP(asic65_program_map) m_ourcpu->set_addrmap(AS_PROGRAM, &asic65_device::asic65_program_map);
MCFG_DEVICE_IO_MAP(asic65_io_map) m_ourcpu->set_addrmap(AS_IO, &asic65_device::asic65_io_map);
MCFG_TMS32010_BIO_IN_CB(READLINE(*this, asic65_device, get_bio)) m_ourcpu->bio().set(FUNC(asic65_device::get_bio));
MACHINE_CONFIG_END }

View File

@ -68,7 +68,7 @@ private:
uint8_t m_last_bank; uint8_t m_last_bank;
/* ROM-based interface states */ /* ROM-based interface states */
required_device<cpu_device> m_ourcpu; required_device<tms32010_device> m_ourcpu;
uint8_t m_tfull; uint8_t m_tfull;
uint8_t m_68full; uint8_t m_68full;
uint8_t m_cmd; uint8_t m_cmd;

View File

@ -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); logerror("DSP PC:%04x IO write %04x at port 3\n", m_dsp->pcbase(), data);
if (data & 0x8000) { if (data & 0x8000) {
m_dsp_BIO = CLEAR_LINE; m_dsp_bio = CLEAR_LINE;
} }
if (data == 0) { if (data == 0) {
if (m_dsp_execute) { 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_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
m_dsp_execute = 0; 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_on));
save_item(NAME(m_dsp_addr_w)); save_item(NAME(m_dsp_addr_w));
save_item(NAME(m_main_ram_seg)); 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_dsp_execute));
machine().save().register_postload(save_prepost_delegate(FUNC(toaplan1_state::demonwld_restore_dsp), this)); machine().save().register_postload(save_prepost_delegate(FUNC(toaplan1_state::demonwld_restore_dsp), this));
} }

View File

@ -55,7 +55,8 @@ READ16_MEMBER(twincobr_state::twincobr_dsp_r)
/* DSP can read data from main CPU RAM via DSP IO port 1 */ /* DSP can read data from main CPU RAM via DSP IO port 1 */
uint16_t input_data = 0; uint16_t input_data = 0;
switch (m_main_ram_seg) { switch (m_main_ram_seg)
{
case 0x30000: case 0x30000:
case 0x40000: case 0x40000:
case 0x50000: {address_space &mainspace = m_maincpu->space(AS_PROGRAM); case 0x50000: {address_space &mainspace = m_maincpu->space(AS_PROGRAM);
@ -71,7 +72,8 @@ WRITE16_MEMBER(twincobr_state::twincobr_dsp_w)
{ {
/* Data written to main CPU RAM via DSP IO port 1 */ /* Data written to main CPU RAM via DSP IO port 1 */
m_dsp_execute = 0; m_dsp_execute = 0;
switch (m_main_ram_seg) { switch (m_main_ram_seg)
{
case 0x30000: if ((m_dsp_addr_w < 3) && (data == 0)) m_dsp_execute = 1; case 0x30000: if ((m_dsp_addr_w < 3) && (data == 0)) m_dsp_execute = 1;
case 0x40000: case 0x40000:
case 0x50000: {address_space &mainspace = m_maincpu->space(AS_PROGRAM); case 0x50000: {address_space &mainspace = m_maincpu->space(AS_PROGRAM);
@ -102,7 +104,8 @@ READ16_MEMBER(twincobr_state::wardner_dsp_r)
/* DSP can read data from main CPU RAM via DSP IO port 1 */ /* DSP can read data from main CPU RAM via DSP IO port 1 */
uint16_t input_data = 0; uint16_t input_data = 0;
switch (m_main_ram_seg) { switch (m_main_ram_seg)
{
case 0x7000: case 0x7000:
case 0x8000: case 0x8000:
case 0xa000: {address_space &mainspace = m_maincpu->space(AS_PROGRAM); case 0xa000: {address_space &mainspace = m_maincpu->space(AS_PROGRAM);
@ -119,7 +122,8 @@ WRITE16_MEMBER(twincobr_state::wardner_dsp_w)
{ {
/* Data written to main CPU RAM via DSP IO port 1 */ /* Data written to main CPU RAM via DSP IO port 1 */
m_dsp_execute = 0; m_dsp_execute = 0;
switch (m_main_ram_seg) { switch (m_main_ram_seg)
{
case 0x7000: if ((m_dsp_addr_w < 3) && (data == 0)) m_dsp_execute = 1; case 0x7000: if ((m_dsp_addr_w < 3) && (data == 0)) m_dsp_execute = 1;
case 0x8000: case 0x8000:
case 0xa000: {address_space &mainspace = m_maincpu->space(AS_PROGRAM); case 0xa000: {address_space &mainspace = m_maincpu->space(AS_PROGRAM);
@ -139,16 +143,19 @@ WRITE16_MEMBER(twincobr_state::twincobr_dsp_bio_w)
/* data 0x0000 means set DSP BIO line active and disable */ /* data 0x0000 means set DSP BIO line active and disable */
/* communication to main processor*/ /* communication to main processor*/
LOG(("DSP PC:%04x IO write %04x at port 3\n",m_dsp->pcbase(),data)); LOG(("DSP PC:%04x IO write %04x at port 3\n",m_dsp->pcbase(),data));
if (data & 0x8000) { if (data & 0x8000)
m_dsp_BIO = CLEAR_LINE; {
m_dsp_bio = CLEAR_LINE;
} }
if (data == 0) { if (data == 0)
if (m_dsp_execute) { {
if (m_dsp_execute)
{
LOG(("Turning the main CPU on\n")); LOG(("Turning the main CPU on\n"));
m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
m_dsp_execute = 0; 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 #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_dsp_addr_w = 0;
m_main_ram_seg = 0; m_main_ram_seg = 0;
m_dsp_execute = 0; m_dsp_execute = 0;
m_dsp_BIO = CLEAR_LINE; m_dsp_bio = CLEAR_LINE;
m_fsharkbt_8741 = -1; 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_on));
save_item(NAME(m_dsp_addr_w)); save_item(NAME(m_dsp_addr_w));
save_item(NAME(m_main_ram_seg)); 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_dsp_execute));
save_item(NAME(m_fsharkbt_8741)); save_item(NAME(m_fsharkbt_8741));