diff options
author | R. Belmont <rb6502@users.noreply.github.com> | 2019-04-26 12:13:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-26 12:13:32 -0400 |
commit | 65bef99bcaf9e6f85394c2ff9c08b1cc14095834 (patch) | |
tree | 199d74c08b582998c244f18ba3fbf7b39cd20db4 | |
parent | 3991aba3886d8c14d055961fccdde05e41ae4789 (diff) | |
parent | a2b1172d2b5f0aeeafc34a255eb9189ce529dcd9 (diff) |
Merge pull request #4927 from cam900/tms57002_args
tms57002/*.* : Updates
-rw-r--r-- | src/devices/cpu/tms57002/57002dsm.cpp | 34 | ||||
-rw-r--r-- | src/devices/cpu/tms57002/57002dsm.h | 4 | ||||
-rw-r--r-- | src/devices/cpu/tms57002/tms57002.cpp | 481 | ||||
-rw-r--r-- | src/devices/cpu/tms57002/tms57002.h | 129 | ||||
-rw-r--r-- | src/devices/cpu/tms57002/tms57kdec.cpp | 55 | ||||
-rw-r--r-- | src/devices/cpu/tms57002/tmsops.cpp | 2 | ||||
-rw-r--r-- | src/mame/drivers/konamigq.cpp | 15 | ||||
-rw-r--r-- | src/mame/drivers/konamigx.cpp | 13 | ||||
-rw-r--r-- | src/mame/includes/konamigx.h | 2 |
9 files changed, 397 insertions, 338 deletions
diff --git a/src/devices/cpu/tms57002/57002dsm.cpp b/src/devices/cpu/tms57002/57002dsm.cpp index b8d03ab8172..79a5dae5972 100644 --- a/src/devices/cpu/tms57002/57002dsm.cpp +++ b/src/devices/cpu/tms57002/57002dsm.cpp @@ -2,7 +2,7 @@ // copyright-holders:Olivier Galibert /*************************************************************************** - 57002dsm.c + 57002dsm.cpp TMS57002 "DASP" emulator. @@ -15,18 +15,20 @@ tms57002_disassembler::tms57002_disassembler() { } -std::string tms57002_disassembler::get_memadr(uint32_t opcode, char type) +std::string tms57002_disassembler::get_memadr(u32 opcode, char type) { std::string buf; - if(((opcode & 0x400) && (type == 'c')) || (!(opcode & 0x400) && (type == 'd'))) { - if(opcode & 0x100) + if (((opcode & 0x400) && (type == 'c')) || (!(opcode & 0x400) && (type == 'd'))) + { + if (opcode & 0x100) buf = util::string_format("%c(%02x)", type, opcode & 0xff); - else if(opcode & 0x80) + else if (opcode & 0x80) buf = util::string_format("%c*+", type); else buf = util::string_format("%c*", type); - } else if(opcode & 0x200) + } + else if (opcode & 0x200) buf = util::string_format("%c*+", type); else buf = util::string_format("%c*", type); @@ -41,10 +43,12 @@ u32 tms57002_disassembler::opcode_alignment() const offs_t tms57002_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer ¶ms) { std::streampos original_pos = stream.tellp(); - uint32_t opcode = opcodes.r32(pc); - uint8_t fa = opcode >> 18; - if(fa == 0x3f) { - switch((opcode >> 11) & 0x7f) { // category 3 + u32 opcode = opcodes.r32(pc); + u8 fa = opcode >> 18; + if (fa == 0x3f) + { + switch ((opcode >> 11) & 0x7f) // category 3 + { #define DASM3 #include "cpu/tms57002/tms57002.hxx" @@ -54,8 +58,11 @@ offs_t tms57002_disassembler::disassemble(std::ostream &stream, offs_t pc, const util::stream_format(stream, "unk c3 %02x", (opcode >> 11) & 0x7f); break; } - } else { - switch(fa) { // category 1 + } + else + { + switch (fa) // category 1 + { case 0x00: break; @@ -72,7 +79,8 @@ offs_t tms57002_disassembler::disassemble(std::ostream &stream, offs_t pc, const if (!next_is_nop && stream.tellp() != original_pos) stream << " ; "; - switch((opcode >> 11) & 0x7f) { // category 2 + switch ((opcode >> 11) & 0x7f) // category 2 + { case 0x00: if (stream.tellp() == original_pos) util::stream_format(stream, "nop"); diff --git a/src/devices/cpu/tms57002/57002dsm.h b/src/devices/cpu/tms57002/57002dsm.h index 56ed3d0ea25..40721378e68 100644 --- a/src/devices/cpu/tms57002/57002dsm.h +++ b/src/devices/cpu/tms57002/57002dsm.h @@ -2,7 +2,7 @@ // copyright-holders:Olivier Galibert /*************************************************************************** - 57002dsm.c + 57002dsm.h TMS57002 "DASP" emulator. @@ -23,7 +23,7 @@ public: virtual offs_t disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer ¶ms) override; private: - static std::string get_memadr(uint32_t opcode, char type); + static std::string get_memadr(u32 opcode, char type); }; diff --git a/src/devices/cpu/tms57002/tms57002.cpp b/src/devices/cpu/tms57002/tms57002.cpp index 01ec9364e63..576450c10aa 100644 --- a/src/devices/cpu/tms57002/tms57002.cpp +++ b/src/devices/cpu/tms57002/tms57002.cpp @@ -2,7 +2,7 @@ // copyright-holders:Olivier Galibert /*************************************************************************** - tms57002.c + tms57002.cpp TMS57002 "DASP" emulator. @@ -21,7 +21,7 @@ void tms57002_device::internal_pgm(address_map &map) map(0x00, 0xff).ram(); } -tms57002_device::tms57002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms57002_device::tms57002_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : cpu_device(mconfig, TMS57002, tag, owner, clock) , device_sound_interface(mconfig, *this) , macc(0), macc_read(0), macc_write(0), st0(0), st1(0), sti(0), txrd(0) @@ -40,13 +40,15 @@ std::unique_ptr<util::disasm_interface> tms57002_device::create_disassembler() WRITE_LINE_MEMBER(tms57002_device::pload_w) { - uint8_t olds = sti; - if(state) + u8 olds = sti; + if (state) sti &= ~IN_PLOAD; else sti |= IN_PLOAD; - if(olds ^ sti) { - if (sti & IN_PLOAD) { + if (olds ^ sti) + { + if (sti & IN_PLOAD) + { hidx = 0; pc = 0; ca = 0; @@ -57,13 +59,15 @@ WRITE_LINE_MEMBER(tms57002_device::pload_w) WRITE_LINE_MEMBER(tms57002_device::cload_w) { - uint8_t olds = sti; - if(state) + u8 olds = sti; + if (state) sti &= ~IN_CLOAD; else sti |= IN_CLOAD; - if(olds ^ sti) { - if (sti & IN_CLOAD) { + if (olds ^ sti) + { + if (sti & IN_CLOAD) + { hidx = 0; //ca = 0; // Seems extremely dubious } @@ -95,20 +99,23 @@ void tms57002_device::device_reset() cache_flush(); } -WRITE8_MEMBER(tms57002_device::data_w) +void tms57002_device::data_w(u8 data) { - switch(sti & (IN_PLOAD|IN_CLOAD)) { + switch (sti & (IN_PLOAD|IN_CLOAD)) + { case 0: hidx = 0; sti &= ~SU_CVAL; break; case IN_PLOAD: host[hidx++] = data; - if(hidx >= 3) { - uint32_t val = (host[0]<<16) | (host[1]<<8) | host[2]; + if (hidx >= 3) + { + u32 val = (host[0]<<16) | (host[1]<<8) | host[2]; hidx = 0; - switch(sti & SU_MASK) { + switch (sti & SU_MASK) + { case SU_ST0: st0 = val; sti = (sti & ~SU_MASK) | SU_ST1; @@ -125,17 +132,21 @@ WRITE8_MEMBER(tms57002_device::data_w) } break; case IN_CLOAD: - if(sti & SU_CVAL) { + if (sti & SU_CVAL) + { host[hidx++] = data; - if(hidx >= 4) { - uint32_t val = (host[0]<<24) | (host[1]<<16) | (host[2]<<8) | host[3]; + if (hidx >= 4) + { + u32 val = (host[0]<<24) | (host[1]<<16) | (host[2]<<8) | host[3]; sti &= ~SU_CVAL; update[update_counter_head] = val; update_counter_head = (update_counter_head + 1) & 0x0f; hidx = 1; // the write shouldn't really happen until CLOAD is high though update_empty(); } - } else { + } + else + { sa = data; hidx = 0; sti |= SU_CVAL; @@ -144,8 +155,9 @@ WRITE8_MEMBER(tms57002_device::data_w) break; case IN_PLOAD|IN_CLOAD: host[hidx++] = data; - if(hidx >= 4) { - uint32_t val = (host[0]<<24) | (host[1]<<16) | (host[2]<<8) | host[3]; + if (hidx >= 4) + { + u32 val = (host[0]<<24) | (host[1]<<16) | (host[2]<<8) | host[3]; hidx = 0; cmem[ca++] = val; } @@ -153,15 +165,16 @@ WRITE8_MEMBER(tms57002_device::data_w) }; } -READ8_MEMBER(tms57002_device::data_r) +u8 tms57002_device::data_r() { - uint8_t res; - if(!(sti & S_HOST)) + u8 res; + if (!(sti & S_HOST)) return 0xff; res = host[hidx]; hidx++; - if(hidx == 4) { + if (hidx == 4) + { hidx = 0; sti &= ~S_HOST; update_dready(); @@ -202,14 +215,15 @@ void tms57002_device::update_empty() WRITE_LINE_MEMBER(tms57002_device::sync_w) { - if(sti & (IN_PLOAD /*| IN_CLOAD*/)) + if (sti & (IN_PLOAD /*| IN_CLOAD*/)) return; allow_update = 1; pc = 0; ca = 0; id = 0; - if(!(st0 & ST0_INCS)) { + if (!(st0 & ST0_INCS)) + { ba0--; ba1++; } @@ -220,20 +234,21 @@ WRITE_LINE_MEMBER(tms57002_device::sync_w) void tms57002_device::xm_init() { - uint32_t adr = xoa + xba; - uint32_t mask = 0; + u32 adr = xoa + xba; + u32 mask = 0; - switch(st0 & ST0_M) { + switch (st0 & ST0_M) + { case ST0_M_64K: mask = 0x0ffff; break; case ST0_M_256K: mask = 0x3ffff; break; case ST0_M_1M: mask = 0xfffff; break; } - if(st0 & ST0_WORD) + if (st0 & ST0_WORD) adr <<= 2; else adr <<= 1; - if(!(st0 & ST0_SEL)) + if (!(st0 & ST0_SEL)) adr <<= 1; xm_adr = adr & mask; @@ -241,158 +256,183 @@ void tms57002_device::xm_init() inline void tms57002_device::xm_step_read() { - uint32_t adr = xm_adr; - uint8_t v = data->read_byte(adr); + u32 adr = xm_adr; + u8 v = data->read_byte(adr); int done; - if(st0 & ST0_WORD) { - if(st0 & ST0_SEL) { + if (st0 & ST0_WORD) + { + if (st0 & ST0_SEL) + { int off = 16 - ((adr & 3) << 3); txrd = (txrd & ~(0xff << off)) | (v << off); done = off == 0; - } else { + } + else + { int off = 20 - ((adr & 7) << 2); txrd = (txrd & ~(0xf << off)) | ((v & 0xf) << off); done = off == 0; } - } else { - if(st0 & ST0_SEL) { + } + else + { + if (st0 & ST0_SEL) + { int off = 16 - ((adr & 1) << 3); txrd = (txrd & ~(0xff << off)) | (v << off); done = off == 8; - if(done) + if (done) txrd &= 0xffff00; - } else { + } + else + { int off = 20 - ((adr & 3) << 2); txrd = (txrd & ~(0xf << off)) | ((v & 0xf) << off); done = off == 8; - if(done) + if (done) txrd &= 0xffff00; } } - if(done) { + if (done) + { xrd = txrd; sti &= ~S_READ; xm_adr = 0; - } else + } + else xm_adr = adr+1; } inline void tms57002_device::xm_step_write() { - uint32_t adr = xm_adr; - uint8_t v; + u32 adr = xm_adr; + u8 v; int done; - if(st0 & ST0_WORD) { - if(st0 & ST0_SEL) { + if (st0 & ST0_WORD) + { + if (st0 & ST0_SEL) + { int off = 16 - ((adr & 3) << 3); v = xwr >> off; done = off == 0; - } else { + } + else + { int off = 20 - ((adr & 7) << 2); v = (xwr >> off) & 0xf; done = off == 0; } - } else { - if(st0 & ST0_SEL) { + } + else + { + if (st0 & ST0_SEL) + { int off = 16 - ((adr & 1) << 3); v = xwr >> off; done = off == 8; - } else { + } + else + { int off = 20 - ((adr & 3) << 2); v = (xwr >> off) & 0xf; done = off == 8; } } data->write_byte(adr, v); - if(done) { + if (done) + { sti &= ~S_WRITE; xm_adr = 0; - } else + } + else xm_adr = adr+1; } -int64_t tms57002_device::macc_to_output_0(int64_t rounding, uint64_t rmask) +s64 tms57002_device::macc_to_output_0(s64 rounding, u64 rmask) { - int64_t m = macc_read; - uint64_t m1; - int over = 0; + s64 m = macc_read; + u64 m1; + int over = false; // Overflow detection and shifting m1 = m & 0xf800000000000ULL; - if(m1 && m1 != 0xf800000000000ULL) - over = 1; + if (m1 && m1 != 0xf800000000000ULL) + over = true; m = (m + rounding) & rmask; // Second overflow detection m1 = m & 0xf800000000000ULL; - if(m1 && m1 != 0xf800000000000ULL) - over = 1; + if (m1 && m1 != 0xf800000000000ULL) + over = true; // Overflow handling - if(over) { + if (over) + { st1 |= ST1_MOV; } return m; } -int64_t tms57002_device::macc_to_output_1(int64_t rounding, uint64_t rmask) +s64 tms57002_device::macc_to_output_1(s64 rounding, u64 rmask) { - int64_t m = macc_read; - uint64_t m1; - int over = 0; + s64 m = macc_read; + u64 m1; + int over = false; // Overflow detection and shifting m1 = m & 0xfe00000000000ULL; - if(m1 && m1 != 0xfe00000000000ULL) - over = 1; + if (m1 && m1 != 0xfe00000000000ULL) + over = true; m <<= 2; m = (m + rounding) & rmask; // Second overflow detection m1 = m & 0xf800000000000ULL; - if(m1 && m1 != 0xf800000000000ULL) - over = 1; + if (m1 && m1 != 0xf800000000000ULL) + over = true; // Overflow handling - if(over) { + if (over) + { st1 |= ST1_MOV; } return m; } -int64_t tms57002_device::macc_to_output_2(int64_t rounding, uint64_t rmask) +s64 tms57002_device::macc_to_output_2(s64 rounding, u64 rmask) { - int64_t m = macc_read; - uint64_t m1; - int over = 0; + s64 m = macc_read; + u64 m1; + int over = false; // Overflow detection and shifting m1 = m & 0xff80000000000ULL; - if(m1 && m1 != 0xff80000000000ULL) - over = 1; + if (m1 && m1 != 0xff80000000000ULL) + over = true; m <<= 4; m = (m + rounding) & rmask; // Second overflow detection m1 = m & 0xf800000000000ULL; - if(m1 && m1 != 0xf800000000000ULL) - over = 1; + if (m1 && m1 != 0xf800000000000ULL) + over = true; // Overflow handling - if(over) { + if (over) + { st1 |= ST1_MOV; } return m; } -int64_t tms57002_device::macc_to_output_3(int64_t rounding, uint64_t rmask) +s64 tms57002_device::macc_to_output_3(s64 rounding, u64 rmask) { - int64_t m = macc_read; - uint64_t m1; - int over = 0; + s64 m = macc_read; + u64 m1; + int over = false; // Overflow detection and shifting m >>= 8; @@ -401,38 +441,40 @@ int64_t tms57002_device::macc_to_output_3(int64_t rounding, uint64_t rmask) // Second overflow detection m1 = m & 0xf800000000000ULL; - if(m1 && m1 != 0xf800000000000ULL) - over = 1; + if (m1 && m1 != 0xf800000000000ULL) + over = true; // Overflow handling - if(over) { + if (over) + { st1 |= ST1_MOV; } return m; } -int64_t tms57002_device::macc_to_output_0s(int64_t rounding, uint64_t rmask) +s64 tms57002_device::macc_to_output_0s(s64 rounding, u64 rmask) { - int64_t m = macc_read; - uint64_t m1; - int over = 0; + s64 m = macc_read; + u64 m1; + int over = false; // Overflow detection and shifting m1 = m & 0xf800000000000ULL; - if(m1 && m1 != 0xf800000000000ULL) - over = 1; + if (m1 && m1 != 0xf800000000000ULL) + over = true; m = (m + rounding) & rmask; // Second overflow detection m1 = m & 0xf800000000000ULL; - if(m1 && m1 != 0xf800000000000ULL) - over = 1; + if (m1 && m1 != 0xf800000000000ULL) + over = true; // Overflow handling - if(over) { + if (over) + { st1 |= ST1_MOV; - if(m & 0x8000000000000ULL) + if (m & 0x8000000000000ULL) m = 0xffff800000000000ULL; else m = 0x00007fffffffffffULL; @@ -440,29 +482,30 @@ int64_t tms57002_device::macc_to_output_0s(int64_t rounding, uint64_t rmask) return m; } -int64_t tms57002_device::macc_to_output_1s(int64_t rounding, uint64_t rmask) +s64 tms57002_device::macc_to_output_1s(s64 rounding, u64 rmask) { - int64_t m = macc_read; - uint64_t m1; - int over = 0; + s64 m = macc_read; + u64 m1; + int over = false; // Overflow detection and shifting m1 = m & 0xfe00000000000ULL; - if(m1 && m1 != 0xfe00000000000ULL) - over = 1; + if (m1 && m1 != 0xfe00000000000ULL) + over = true; m <<= 2; m = (m + rounding) & rmask; // Second overflow detection m1 = m & 0xf800000000000ULL; - if(m1 && m1 != 0xf800000000000ULL) - over = 1; + if (m1 && m1 != 0xf800000000000ULL) + over = true; // Overflow handling - if(over) { + if (over) + { st1 |= ST1_MOV; - if(m & 0x8000000000000ULL) + if (m & 0x8000000000000ULL) m = 0xffff800000000000ULL; else m = 0x00007fffffffffffULL; @@ -470,29 +513,30 @@ int64_t tms57002_device::macc_to_output_1s(int64_t rounding, uint64_t rmask) return m; } -int64_t tms57002_device::macc_to_output_2s(int64_t rounding, uint64_t rmask) +s64 tms57002_device::macc_to_output_2s(s64 rounding, u64 rmask) { - int64_t m = macc_read; - uint64_t m1; - int over = 0; + s64 m = macc_read; + u64 m1; + int over = false; // Overflow detection and shifting m1 = m & 0xff80000000000ULL; - if(m1 && m1 != 0xff80000000000ULL) - over = 1; + if (m1 && m1 != 0xff80000000000ULL) + over = true; m <<= 4; m = (m + rounding) & rmask; // Second overflow detection m1 = m & 0xf800000000000ULL; - if(m1 && m1 != 0xf800000000000ULL) - over = 1; + if (m1 && m1 != 0xf800000000000ULL) + over = true; // Overflow handling - if(over) { + if (over) + { st1 |= ST1_MOV; - if(m & 0x8000000000000ULL) + if (m & 0x8000000000000ULL) m = 0xffff800000000000ULL; else m = 0x00007fffffffffffULL; @@ -500,11 +544,11 @@ int64_t tms57002_device::macc_to_output_2s(int64_t rounding, uint64_t rmask) return m; } -int64_t tms57002_device::macc_to_output_3s(int64_t rounding, uint64_t rmask) +s64 tms57002_device::macc_to_output_3s(s64 rounding, u64 rmask) { - int64_t m = macc_read; - uint64_t m1; - int over = 0; + s64 m = macc_read; + u64 m1; + int over = false; // Overflow detection and shifting m >>= 8; @@ -513,13 +557,14 @@ int64_t tms57002_device::macc_to_output_3s(int64_t rounding, uint64_t rmask) // Second overflow detection m1 = m & 0xf800000000000ULL; - if(m1 && m1 != 0xf800000000000ULL) - over = 1; + if (m1 && m1 != 0xf800000000000ULL) + over = true; // Overflow handling - if(over) { + if (over) + { st1 |= ST1_MOV; - if(m & 0x8000000000000ULL) + if (m & 0x8000000000000ULL) m = 0xffff800000000000ULL; else m = 0x00007fffffffffffULL; @@ -527,60 +572,64 @@ int64_t tms57002_device::macc_to_output_3s(int64_t rounding, uint64_t rmask) return m; } -int64_t tms57002_device::check_macc_overflow_0() +s64 tms57002_device::check_macc_overflow_0() { - int64_t m = macc_read; - uint64_t m1; + s64 m = macc_read; + u64 m1; // Overflow detection m1 = m & 0xf800000000000ULL; - if(m1 && m1 != 0xf800000000000ULL) { + if (m1 && m1 != 0xf800000000000ULL) + { st1 |= ST1_MOV; } return m; } -int64_t tms57002_device::check_macc_overflow_1() +s64 tms57002_device::check_macc_overflow_1() { - int64_t m = macc_read; - uint64_t m1; + s64 m = macc_read; + u64 m1; // Overflow detection m1 = m & 0xfe00000000000ULL; - if(m1 && m1 != 0xfe00000000000ULL) { + if (m1 && m1 != 0xfe00000000000ULL) + { st1 |= ST1_MOV; } return m; } -int64_t tms57002_device::check_macc_overflow_2() +s64 tms57002_device::check_macc_overflow_2() { - int64_t m = macc_read; - uint64_t m1; + s64 m = macc_read; + u64 m1; // Overflow detection m1 = m & 0xff80000000000ULL; - if(m1 && m1 != 0xff80000000000ULL) { + if (m1 && m1 != 0xff80000000000ULL) + { st1 |= ST1_MOV; } return m; } -int64_t tms57002_device::check_macc_overflow_3() +s64 tms57002_device::check_macc_overflow_3() { return macc_read; } -int64_t tms57002_device::check_macc_overflow_0s() +s64 tms57002_device::check_macc_overflow_0s() { - int64_t m = macc_read; - uint64_t m1; + s64 m = macc_read; + u64 m1; // Overflow detection m1 = m & 0xf800000000000ULL; - if(m1 && m1 != 0xf800000000000ULL) { + if (m1 && m1 != 0xf800000000000ULL) + { st1 |= ST1_MOV; - if(m & 0x8000000000000ULL) + if (m & 0x8000000000000ULL) m = 0xffff800000000000ULL; else m = 0x00007fffffffffffULL; @@ -588,16 +637,17 @@ int64_t tms57002_device::check_macc_overflow_0s() return m; } -int64_t tms57002_device::check_macc_overflow_1s() +s64 tms57002_device::check_macc_overflow_1s() { - int64_t m = macc_read; - uint64_t m1; + s64 m = macc_read; + u64 m1; // Overflow detection m1 = m & 0xfe00000000000ULL; - if(m1 && m1 != 0xfe00000000000ULL) { + if (m1 && m1 != 0xfe00000000000ULL) + { st1 |= ST1_MOV; - if(m & 0x8000000000000ULL) + if (m & 0x8000000000000ULL) m = 0xffff800000000000ULL; else m = 0x00007fffffffffffULL; @@ -605,16 +655,17 @@ int64_t tms57002_device::check_macc_overflow_1s() return m; } -int64_t tms57002_device::check_macc_overflow_2s() +s64 tms57002_device::check_macc_overflow_2s() { - int64_t m = macc_read; - uint64_t m1; + s64 m = macc_read; + u64 m1; // Overflow detection m1 = m & 0xff80000000000ULL; - if(m1 && m1 != 0xff80000000000ULL) { + if (m1 && m1 != 0xff80000000000ULL) + { st1 |= ST1_MOV; - if(m & 0x8000000000000ULL) + if (m & 0x8000000000000ULL) m = 0xffff800000000000ULL; else m = 0x00007fffffffffffULL; @@ -622,23 +673,23 @@ int64_t tms57002_device::check_macc_overflow_2s() return m; } -int64_t tms57002_device::check_macc_overflow_3s() +s64 tms57002_device::check_macc_overflow_3s() { return macc_read; } -uint32_t tms57002_device::get_cmem(uint8_t addr) +u32 tms57002_device::get_cmem(u8 addr) { - if(sa == addr && update_counter_head != update_counter_tail) + if (sa == addr && update_counter_head != update_counter_tail) sti |= S_UPDATE; - if(sti & S_UPDATE) + if (sti & S_UPDATE) { cmem[addr] = update[update_counter_tail]; update_counter_tail = (update_counter_tail + 1) & 0x0f; update_empty(); - if(update_counter_head == update_counter_tail) + if (update_counter_head == update_counter_tail) sti &= ~S_UPDATE; return cmem[addr]; // The value of crm is ignored during an update. @@ -646,10 +697,10 @@ uint32_t tms57002_device::get_cmem(uint8_t addr) else { int crm = (st1 & ST1_CRM) >> ST1_CRM_SHIFT; - uint32_t cvar = cmem[addr]; - if(crm == 1) + u32 cvar = cmem[addr]; + if (crm == 1) return (cvar & 0xffff0000); - else if(crm == 2) + else if (crm == 2) return (cvar << 16); return cvar; } @@ -659,52 +710,56 @@ void tms57002_device::cache_flush() { int i; cache.hused = cache.iused = 0; - for(i=0; i != 256; i++) + for (i = 0; i != 256; i++) cache.hashbase[i] = -1; - for(i=0; i != HBS; i++) { + for (i = 0; i != HBS; i++) + { cache.hashnode[i].st1 = 0; cache.hashnode[i].ipc = -1; cache.hashnode[i].next = -1; } - for(i=0; i != IBS; i++) { + for (i = 0; i != IBS; i++) + { cache.inst[i].op = 0; cache.inst[i].next = -1; cache.inst[i].param = 0; } } -void tms57002_device::add_one(cstate *cs, unsigned short op, uint8_t param) +void tms57002_device::add_one(cstate *cs, u16 op, u8 param) { - short ipc = cache.iused++; + s16 ipc = cache.iused++; cache.inst[ipc].op = op; cache.inst[ipc].param = param; cache.inst[ipc].next = -1; - if(cs->ipc != -1) + if (cs->ipc != -1) cache.inst[cs->ipc].next = ipc; cs->ipc = ipc; - if(cs->hnode != -1) { + if (cs->hnode != -1) + { cache.hashnode[cs->hnode].ipc = ipc; cs->hnode = -1; } } -void tms57002_device::decode_one(uint32_t opcode, cstate *cs, void (tms57002_device::*dec)(uint32_t opcode, unsigned short *op, cstate *cs)) +void tms57002_device::decode_one(u32 opcode, cstate *cs, void (tms57002_device::*dec)(u32 opcode, u16 *op, cstate *cs)) { - unsigned short op = 0; + u16 op = 0; (this->*dec)(opcode, &op, cs); - if(!op) + if (!op) return; add_one(cs, op, opcode & 0xff); } -short tms57002_device::get_hash(unsigned char adr, uint32_t st1, short *pnode) +s16 tms57002_device::get_hash(u8 adr, u32 st1, s16 *pnode) { - short hnode; + s16 hnode; st1 &= ST1_CACHE; *pnode = -1; hnode = cache.hashbase[adr]; - while(hnode != -1) { - if(cache.hashnode[hnode].st1 == st1) + while(hnode != -1) + { + if (cache.hashnode[hnode].st1 == st1) return cache.hashnode[hnode].ipc; *pnode = hnode; hnode = cache.hashnode[hnode].next; @@ -712,13 +767,13 @@ short tms57002_device::get_hash(unsigned char adr, uint32_t st1, short *pnode) return -1; } -short tms57002_device::get_hashnode(unsigned char adr, uint32_t st1, short pnode) +s16 tms57002_device::get_hashnode(u8 adr, u32 st1, s16 pnode) { - short hnode = cache.hused++; + s16 hnode = cache.hused++; cache.hashnode[hnode].st1 = st1 & ST1_CACHE; cache.hashnode[hnode].ipc = -1; cache.hashnode[hnode].next = -1; - if(pnode == -1) + if (pnode == -1) cache.hashbase[adr] = hnode; else cache.hashnode[pnode].next = hnode; @@ -727,15 +782,16 @@ short tms57002_device::get_hashnode(unsigned char adr, uint32_t st1, short pnode int tms57002_device::decode_get_pc() { - short pnode, res; + s16 pnode, res; cstate cs; - uint8_t adr = pc; + u8 adr = pc; res = get_hash(adr, st1, &pnode); - if(res != -1) + if (res != -1) return res; - if(HBS - cache.hused < 256 || IBS - cache.iused < 256*3) { + if (HBS - cache.hused < 256 || IBS - cache.iused < 256*3) + { cache_flush(); pnode = -1; } @@ -744,13 +800,14 @@ int tms57002_device::decode_get_pc() cs.ipc = -1; cs.branch = 0; - for(;;) { - short ipc; - uint32_t opcode = program->read_dword(adr); + for (;;) + { + s16 ipc; + u32 opcode = program->read_dword(adr); cs.inc = 0; - if((opcode & 0xfc0000) == 0xfc0000) + if ((opcode & 0xfc0000) == 0xfc0000) decode_one(opcode, &cs, &tms57002_device::decode_cat3); else { decode_one(opcode, &cs, &tms57002_device::decode_cat2_pre); @@ -759,12 +816,13 @@ int tms57002_device::decode_get_pc() } add_one(&cs, cs.inc, 0); - if(cs.branch) + if (cs.branch) break; adr++; ipc = get_hash(adr, st1, &pnode); - if(ipc != -1) { + if (ipc != -1) + { cache.inst[cs.ipc].next = ipc; break; } @@ -778,18 +836,20 @@ void tms57002_device::execute_run() { int ipc = -1; - while(icount > 0 && !(sti & (S_IDLE | IN_PLOAD /*| IN_CLOAD*/))) { + while(icount > 0 && !(sti & (S_IDLE | IN_PLOAD /*| IN_CLOAD*/))) + { int iipc; debugger_instruction_hook(pc); - if(ipc == -1) + if (ipc == -1) ipc = decode_get_pc(); iipc = ipc; - if(sti & (S_READ|S_WRITE)) { - if(sti & S_READ) + if (sti & (S_READ|S_WRITE)) + { + if (sti & S_READ) xm_step_read(); else xm_step_write(); @@ -798,11 +858,13 @@ void tms57002_device::execute_run() macc_read = macc_write; macc_write = macc; - for(;;) { + for (;;) + { const icd *i = cache.inst + ipc; ipc = i->next; - switch(i->op) { + switch (i->op) + { case 0: goto inst; @@ -829,24 +891,30 @@ void tms57002_device::execute_run() inst: icount--; - if(rptc) { + if (rptc) + { rptc--; ipc = iipc; - } else if(sti & S_BRANCH) { + } + else if (sti & S_BRANCH) + { sti &= ~S_BRANCH; ipc = -1; - } else { + } + else + { pc++; // Wraps if it reaches 256, next wraps too update_pc0(); } - if(rptc_next) { + if (rptc_next) + { rptc = rptc_next; rptc_next = 0; } } - if(icount > 0) + if (icount > 0) icount = 0; } @@ -854,12 +922,15 @@ void tms57002_device::sound_stream_update(sound_stream &stream, stream_sample_t { assert(samples == 1); - if(st0 & ST0_SIM) { + if (st0 & ST0_SIM) + { si[0] = (inputs[0][0] << 8) & 0xffffff; si[1] = (inputs[1][0] << 8) & 0xffffff; si[2] = (inputs[2][0] << 8) & 0xffffff; si[3] = (inputs[3][0] << 8) & 0xffffff; - } else { + } + else + { si[0] = inputs[0][0] & 0xffffff; si[1] = inputs[1][0] & 0xffffff; si[2] = inputs[2][0] & 0xffffff; @@ -955,17 +1026,17 @@ void tms57002_device::device_start() save_item(NAME(allow_update)); } -uint32_t tms57002_device::execute_min_cycles() const +u32 tms57002_device::execute_min_cycles() const { return 1; } -uint32_t tms57002_device::execute_max_cycles() const +u32 tms57002_device::execute_max_cycles() const { return 3; } -uint32_t tms57002_device::execute_input_lines() const +u32 tms57002_device::execute_input_lines() const { return 0; } diff --git a/src/devices/cpu/tms57002/tms57002.h b/src/devices/cpu/tms57002/tms57002.h index 28e57dc7969..b5decb23998 100644 --- a/src/devices/cpu/tms57002/tms57002.h +++ b/src/devices/cpu/tms57002/tms57002.h @@ -12,16 +12,17 @@ #pragma once -class tms57002_device : public cpu_device, public device_sound_interface { +class tms57002_device : public cpu_device, public device_sound_interface +{ public: - tms57002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms57002_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); auto dready_callback() { return m_dready_callback.bind(); } auto pc0_callback() { return m_pc0_callback.bind(); } auto empty_callback() { return m_empty_callback.bind(); } - DECLARE_READ8_MEMBER(data_r); - DECLARE_WRITE8_MEMBER(data_w); + u8 data_r(); + void data_w(u8 data); DECLARE_WRITE_LINE_MEMBER(pload_w); DECLARE_WRITE_LINE_MEMBER(cload_w); @@ -37,9 +38,9 @@ protected: virtual void device_reset() override; virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override; virtual space_config_vector memory_space_config() const override; - virtual uint32_t execute_min_cycles() const override; - virtual uint32_t execute_max_cycles() const override; - virtual uint32_t execute_input_lines() const override; + virtual u32 execute_min_cycles() const override; + virtual u32 execute_max_cycles() const override; + virtual u32 execute_input_lines() const override; virtual void execute_run() override; virtual std::unique_ptr<util::disasm_interface> create_disassembler() override; @@ -99,19 +100,19 @@ private: enum { INC_CA = 1, INC_ID = 2 }; struct icd { - unsigned short op; - short next; - unsigned char param; + u16 op; + s16 next; + u8 param; }; struct hcd { - unsigned int st1; - short ipc; - short next; + u32 st1; + s16 ipc; + s16 next; }; struct cd { - short hashbase[256]; + s16 hashbase[256]; hcd hashnode[HBS]; icd inst[IBS]; int hused, iused; @@ -120,30 +121,30 @@ private: struct cstate { int branch; int inc; - short hnode; - short ipc; + s16 hnode; + s16 ipc; }; // macc_read and macc_write are used by non-pipelined instructions - int64_t macc, macc_read, macc_write; + s64 macc, macc_read, macc_write; - uint32_t cmem[256]; - uint32_t dmem0[256]; - uint32_t dmem1[32]; + u32 cmem[256]; + u32 dmem0[256]; + u32 dmem1[32]; - uint32_t si[4], so[4]; + u32 si[4], so[4]; - uint32_t st0, st1, sti; - uint32_t aacc, xoa, xba, xwr, xrd, txrd, creg; + u32 st0, st1, sti; + u32 aacc, xoa, xba, xwr, xrd, txrd, creg; - uint8_t pc, hpc, ca, id, ba0, ba1, rptc, rptc_next, sa; + u8 pc, hpc, ca, id, ba0, ba1, rptc, rptc_next, sa; - uint32_t xm_adr; + u32 xm_adr; - uint8_t host[4], hidx, allow_update; + u8 host[4], hidx, allow_update; - uint32_t update[16]; - uint8_t update_counter_head, update_counter_tail; + u32 update[16]; + u8 update_counter_head, update_counter_tail; cd cache; @@ -157,21 +158,21 @@ private: int icount; int unsupported_inst_warning; - void decode_error(uint32_t opcode); - void decode_cat1(uint32_t opcode, unsigned short *op, cstate *cs); - void decode_cat2_pre(uint32_t opcode, unsigned short *op, cstate *cs); - void decode_cat3(uint32_t opcode, unsigned short *op, cstate *cs); - void decode_cat2_post(uint32_t opcode, unsigned short *op, cstate *cs); - - inline int xmode(uint32_t opcode, char type, cstate *cs); - inline int sfao(uint32_t st1); - inline int dbp(uint32_t st1); - inline int crm(uint32_t st1); - inline int sfai(uint32_t st1); - inline int sfmo(uint32_t st1); - inline int rnd(uint32_t st1); - inline int movm(uint32_t st1); - inline int sfma(uint32_t st1); + void decode_error(u32 opcode); + void decode_cat1(u32 opcode, u16 *op, cstate *cs); + void decode_cat2_pre(u32 opcode, u16 *op, cstate *cs); + void decode_cat3(u32 opcode, u16 *op, cstate *cs); + void decode_cat2_post(u32 opcode, u16 *op, cstate *cs); + + inline int xmode(u32 opcode, char type, cstate *cs); + inline int sfao(u32 st1); + inline int dbp(u32 st1); + inline int crm(u32 st1); + inline int sfai(u32 st1); + inline int sfmo(u32 st1); + inline int rnd(u32 st1); + inline int movm(u32 st1); + inline int sfma(u32 st1); void update_dready(); void update_pc0(); @@ -180,29 +181,29 @@ private: void xm_init(); void xm_step_read(); void xm_step_write(); - int64_t macc_to_output_0(int64_t rounding, uint64_t rmask); - int64_t macc_to_output_1(int64_t rounding, uint64_t rmask); - int64_t macc_to_output_2(int64_t rounding, uint64_t rmask); - int64_t macc_to_output_3(int64_t rounding, uint64_t rmask); - int64_t macc_to_output_0s(int64_t rounding, uint64_t rmask); - int64_t macc_to_output_1s(int64_t rounding, uint64_t rmask); - int64_t macc_to_output_2s(int64_t rounding, uint64_t rmask); - int64_t macc_to_output_3s(int64_t rounding, uint64_t rmask); - int64_t check_macc_overflow_0(); - int64_t check_macc_overflow_1(); - int64_t check_macc_overflow_2(); - int64_t check_macc_overflow_3(); - int64_t check_macc_overflow_0s(); - int64_t check_macc_overflow_1s(); - int64_t check_macc_overflow_2s(); - int64_t check_macc_overflow_3s(); + s64 macc_to_output_0(s64 rounding, u64 rmask); + s64 macc_to_output_1(s64 rounding, u64 rmask); + s64 macc_to_output_2(s64 rounding, u64 rmask); + s64 macc_to_output_3(s64 rounding, u64 rmask); + s64 macc_to_output_0s(s64 rounding, u64 rmask); + s64 macc_to_output_1s(s64 rounding, u64 rmask); + s64 macc_to_output_2s(s64 rounding, u64 rmask); + s64 macc_to_output_3s(s64 rounding, u64 rmask); + s64 check_macc_overflow_0(); + s64 check_macc_overflow_1(); + s64 check_macc_overflow_2(); + s64 check_macc_overflow_3(); + s64 check_macc_overflow_0s(); + s64 check_macc_overflow_1s(); + s64 check_macc_overflow_2s(); + s64 check_macc_overflow_3s(); void cache_flush(); - void add_one(cstate *cs, unsigned short op, uint8_t param); - void decode_one(uint32_t opcode, cstate *cs, void (tms57002_device::*dec)(uint32_t opcode, unsigned short *op, cstate *cs)); - short get_hash(unsigned char adr, uint32_t st1, short *pnode); - short get_hashnode(unsigned char adr, uint32_t st1, short pnode); + void add_one(cstate *cs, u16 op, u8 param); + void decode_one(u32 opcode, cstate *cs, void (tms57002_device::*dec)(u32 opcode, u16 *op, cstate *cs)); + s16 get_hash(u8 adr, u32 st1, s16 *pnode); + s16 get_hashnode(u8 adr, u32 st1, s16 pnode); int decode_get_pc(); - uint32_t get_cmem(uint8_t addr); + u32 get_cmem(u8 addr); #define CINTRPDECL #include "../../emu/cpu/tms57002/tms57002.hxx" diff --git a/src/devices/cpu/tms57002/tms57kdec.cpp b/src/devices/cpu/tms57002/tms57kdec.cpp index 4c6dd2dc026..75af9b2af95 100644 --- a/src/devices/cpu/tms57002/tms57kdec.cpp +++ b/src/devices/cpu/tms57002/tms57kdec.cpp @@ -2,7 +2,7 @@ // copyright-holders:Olivier Galibert /*************************************************************************** - tms57kdec.c + tms57kdec.cpp TMS57002 "DASP" emulator. @@ -13,80 +13,82 @@ #include "tms57002.h" #include <algorithm> -inline int tms57002_device::xmode(uint32_t opcode, char type, cstate *cs) +inline int tms57002_device::xmode(u32 opcode, char type, cstate *cs) { - if(((opcode & 0x400) && (type == 'c')) || (!(opcode & 0x400) && (type == 'd'))) { - if(opcode & 0x100) + if (((opcode & 0x400) && (type == 'c')) || (!(opcode & 0x400) && (type == 'd'))) + { + if (opcode & 0x100) return 0; - else if(opcode & 0x80) + else if (opcode & 0x80) cs->inc |= type == 'c' ? INC_CA : INC_ID; return 1; } - else if(opcode & 0x200) + else if (opcode & 0x200) cs->inc |= type == 'c' ? INC_CA : INC_ID; return 1; } -inline int tms57002_device::sfao(uint32_t st1) +inline int tms57002_device::sfao(u32 st1) { return st1 & ST1_SFAO ? 1 : 0; } -inline int tms57002_device::dbp(uint32_t st1) +inline int tms57002_device::dbp(u32 st1) { return st1 & ST1_DBP ? 1 : 0; } -inline int tms57002_device::crm(uint32_t st1) +inline int tms57002_device::crm(u32 st1) { // value overridden during cvar update - if(update_counter_head != update_counter_tail) + if (update_counter_head != update_counter_tail) return 0; int crm = (st1 & ST1_CRM) >> ST1_CRM_SHIFT; return crm <= 2 ? crm : 0; } -inline int tms57002_device::sfai(uint32_t st1) +inline int tms57002_device::sfai(u32 st1) { return st1 & ST1_SFAI ? 1 : 0; } -inline int tms57002_device::sfmo(uint32_t st1) +inline int tms57002_device::sfmo(u32 st1) { return (st1 & ST1_SFMO) >> ST1_SFMO_SHIFT; } -inline int tms57002_device::rnd(uint32_t st1) +inline int tms57002_device::rnd(u32 st1) { int rnd = (st1 & ST1_RND) >> ST1_RND_SHIFT; return rnd <= 4 ? rnd : 0; } -inline int tms57002_device::movm(uint32_t st1) +inline int tms57002_device::movm(u32 st1) { return st1 & ST1_MOVM ? 1 : 0; } -inline int tms57002_device::sfma(uint32_t st1) +inline int tms57002_device::sfma(u32 st1) { return (st1 & ST1_SFMA) >> ST1_SFMA_SHIFT; } -void tms57002_device::decode_error(uint32_t opcode) +void tms57002_device::decode_error(u32 opcode) { - if(unsupported_inst_warning) + if (unsupported_inst_warning) return; unsupported_inst_warning = 1; popmessage("tms57002: %06x - Contact Mamedev", opcode); } -void tms57002_device::decode_cat1(uint32_t opcode, unsigned short *op, cstate *cs) +void tms57002_device::decode_cat1(u32 opcode, unsigned short *op, cstate *cs) { - switch(opcode >> 18) { + switch (opcode >> 18) + { case 0x00: // nop break; @@ -101,9 +103,10 @@ void tms57002_device::decode_cat1(uint32_t opcode, unsigned short *op, cstate *c } } -void tms57002_device::decode_cat2_pre(uint32_t opcode, unsigned short *op, cstate *cs) +void tms57002_device::decode_cat2_pre(u32 opcode, unsigned short *op, cstate *cs) { - switch((opcode >> 11) & 0x7f) { + switch ((opcode >> 11) & 0x7f) + { case 0x00: // nop break; @@ -118,9 +121,10 @@ void tms57002_device::decode_cat2_pre(uint32_t opcode, unsigned short *op, cstat } } -void tms57002_device::decode_cat2_post(uint32_t opcode, unsigned short *op, cstate *cs) +void tms57002_device::decode_cat2_post(u32 opcode, unsigned short *op, cstate *cs) { - switch((opcode >> 11) & 0x7f) { + switch ((opcode >> 11) & 0x7f) + { case 0x00: // nop break; @@ -135,9 +139,10 @@ void tms57002_device::decode_cat2_post(uint32_t opcode, unsigned short *op, csta } } -void tms57002_device::decode_cat3(uint32_t opcode, unsigned short *op, cstate *cs) +void tms57002_device::decode_cat3(u32 opcode, unsigned short *op, cstate *cs) { - switch((opcode >> 11) & 0x7f) { + switch ((opcode >> 11) & 0x7f) + { case 0x00: // nop break; diff --git a/src/devices/cpu/tms57002/tmsops.cpp b/src/devices/cpu/tms57002/tmsops.cpp index 46e90a56339..ec4afa798fd 100644 --- a/src/devices/cpu/tms57002/tmsops.cpp +++ b/src/devices/cpu/tms57002/tmsops.cpp @@ -2,7 +2,7 @@ // copyright-holders:Olivier Galibert /*************************************************************************** - tms57002.c + tmsops.cpp TMS57002 "DASP" emulator. diff --git a/src/mame/drivers/konamigq.cpp b/src/mame/drivers/konamigq.cpp index 4984d8b2a0a..0586be76030 100644 --- a/src/mame/drivers/konamigq.cpp +++ b/src/mame/drivers/konamigq.cpp @@ -119,8 +119,6 @@ private: DECLARE_WRITE16_MEMBER(eeprom_w); DECLARE_WRITE8_MEMBER(pcmram_w); DECLARE_READ8_MEMBER(pcmram_r); - DECLARE_READ16_MEMBER(tms57002_data_word_r); - DECLARE_WRITE16_MEMBER(tms57002_data_word_w); DECLARE_READ16_MEMBER(tms57002_status_word_r); DECLARE_WRITE16_MEMBER(tms57002_control_word_w); DECLARE_MACHINE_START(konamigq); @@ -201,17 +199,6 @@ INTERRUPT_GEN_MEMBER(konamigq_state::tms_sync) m_dasp->sync_w(1); } -READ16_MEMBER(konamigq_state::tms57002_data_word_r) -{ - return m_dasp->data_r(space, 0); -} - -WRITE16_MEMBER(konamigq_state::tms57002_data_word_w) -{ - if (ACCESSING_BITS_0_7) - m_dasp->data_w(space, 0, data); -} - READ16_MEMBER(konamigq_state::tms57002_status_word_r) { return (m_dasp->dready_r() ? 4 : 0) | @@ -241,7 +228,7 @@ void konamigq_state::konamigq_sound_map(address_map &map) map(0x100000, 0x10ffff).ram(); map(0x200000, 0x2004ff).rw("k054539_1", FUNC(k054539_device::read), FUNC(k054539_device::write)).umask16(0xff00); map(0x200000, 0x2004ff).rw("k054539_2", FUNC(k054539_device::read), FUNC(k054539_device::write)).umask16(0x00ff); - map(0x300000, 0x300001).rw(FUNC(konamigq_state::tms57002_data_word_r), FUNC(konamigq_state::tms57002_data_word_w)); + map(0x300001, 0x300001).rw(m_dasp, FUNC(tms57002_device::data_r), FUNC(tms57002_device::data_w)); map(0x400000, 0x40001f).rw(m_k056800, FUNC(k056800_device::sound_r), FUNC(k056800_device::sound_w)).umask16(0x00ff); map(0x500000, 0x500001).rw(FUNC(konamigq_state::tms57002_status_word_r), FUNC(konamigq_state::tms57002_control_word_w)); map(0x580000, 0x580001).nopw(); // 'NRES' - D2: K056602 /RESET diff --git a/src/mame/drivers/konamigx.cpp b/src/mame/drivers/konamigx.cpp index 565a2837f3d..e21c69d77bf 100644 --- a/src/mame/drivers/konamigx.cpp +++ b/src/mame/drivers/konamigx.cpp @@ -1077,17 +1077,6 @@ void konamigx_state::gx_type4_map(address_map &map) /**********************************************************************************/ /* Sound handling */ -READ16_MEMBER(konamigx_state::tms57002_data_word_r) -{ - return m_dasp->data_r(space, 0); -} - -WRITE16_MEMBER(konamigx_state::tms57002_data_word_w) -{ - if (ACCESSING_BITS_0_7) - m_dasp->data_w(space, 0, data); -} - READ16_MEMBER(konamigx_state::tms57002_status_word_r) { return (m_dasp->dready_r() ? 4 : 0) | @@ -1117,7 +1106,7 @@ void konamigx_state::gxsndmap(address_map &map) map(0x100000, 0x10ffff).ram(); map(0x200000, 0x2004ff).rw(m_k054539_1, FUNC(k054539_device::read), FUNC(k054539_device::write)).umask16(0xff00); map(0x200000, 0x2004ff).rw(m_k054539_2, FUNC(k054539_device::read), FUNC(k054539_device::write)).umask16(0x00ff); - map(0x300000, 0x300001).rw(FUNC(konamigx_state::tms57002_data_word_r), FUNC(konamigx_state::tms57002_data_word_w)); + map(0x300001, 0x300001).rw(m_dasp, FUNC(tms57002_device::data_r), FUNC(tms57002_device::data_w)); map(0x400000, 0x40001f).rw(m_k056800, FUNC(k056800_device::sound_r), FUNC(k056800_device::sound_w)).umask16(0x00ff); map(0x500000, 0x500001).rw(FUNC(konamigx_state::tms57002_status_word_r), FUNC(konamigx_state::tms57002_control_word_w)); map(0x580000, 0x580001).nopw(); // 'NRES' - D2: K056602 /RESET diff --git a/src/mame/includes/konamigx.h b/src/mame/includes/konamigx.h index 2a116ca9f70..ac5702361ae 100644 --- a/src/mame/includes/konamigx.h +++ b/src/mame/includes/konamigx.h @@ -71,8 +71,6 @@ public: DECLARE_READ32_MEMBER(type3_sync_r); DECLARE_WRITE32_MEMBER(type4_prot_w); DECLARE_WRITE32_MEMBER(type1_cablamps_w); - DECLARE_READ16_MEMBER(tms57002_data_word_r); - DECLARE_WRITE16_MEMBER(tms57002_data_word_w); DECLARE_READ16_MEMBER(tms57002_status_word_r); DECLARE_WRITE16_MEMBER(tms57002_control_word_w); DECLARE_READ16_MEMBER(K055550_word_r); |