Skip to content

Commit fd81e54

Browse files
authored
dt7.cpp / toaplan_v25_tables.h - correct (I think) an opcode for DT7 sound CPU (#14475)
1 parent 93c3467 commit fd81e54

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/mame/toaplan/dt7.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,9 @@ void dt7_state::dt7_irq(int state)
142142
// the audio CPU also has a 'serial' interrupt populated?
143143
// and the boards can be linked together
144144

145-
// triggering this prevents our other timer? interrupt from working however?
146-
//m_audiocpu->set_input_line(NEC_INPUT_LINE_INTP0, state ? ASSERT_LINE : CLEAR_LINE);
145+
// amongst other things this interrupt copies input data to where the 68k can see it
146+
// although triggering it here might not be correct as the game just ends up showing 'mach race'
147+
// m_audiocpu->set_input_line(NEC_INPUT_LINE_INTP0, state ? ASSERT_LINE : CLEAR_LINE);
147148
}
148149

149150

@@ -172,6 +173,10 @@ void dt7_state::eeprom_w(u8 data)
172173

173174
u8 dt7_state::read_port_2()
174175
{
176+
// input/coin data is read in bits 0/1
177+
// it's probably latched by toggling bit 2 low->high and shifted by toggling bit 3
178+
// it gets put in RAM then worked on by the external interrupt
179+
175180
logerror("%s: read port 2\n", machine().describe_context());
176181
return m_ioport_state;
177182
}

src/mame/toaplan/toaplan_v25_tables.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class toaplan_v25_tables
117117

118118
// 59 @ 73505 and 7379B
119119
//#define G_59 0xfa
120-
#define G_59 0xc3 // almost certainly has to be ret
120+
#define G_59 0xcf // almost certainly has to be reti (used at end of external interrupt)
121121

122122
static constexpr u8 dt7_decryption_table[256] = {
123123
// 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07, 0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f, /* 00 */

0 commit comments

Comments
 (0)