summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2020-03-21 21:15:40 +0100
committer hap <happppp@users.noreply.github.com>2020-03-21 21:15:40 +0100
commit21ede04ecd987647b5922ee3a8c61da02ba623e0 (patch)
tree94362eca706002d099ff356e198ee888a9053938
parentf7b9064893b6320ef5a986ae363809720e48aa17 (diff)
segac2: change segac2_tfrceacjpb set_ignore_read_direction to a bit more logical set_ddr_override mask, port D works ok now (nw)
-rw-r--r--src/mame/drivers/novag_supremo.cpp3
-rw-r--r--src/mame/drivers/segac2.cpp7
-rw-r--r--src/mame/machine/315_5296.cpp5
-rw-r--r--src/mame/machine/315_5296.h5
4 files changed, 11 insertions, 9 deletions
diff --git a/src/mame/drivers/novag_supremo.cpp b/src/mame/drivers/novag_supremo.cpp
index eac5a2aef61..49bd11712d4 100644
--- a/src/mame/drivers/novag_supremo.cpp
+++ b/src/mame/drivers/novag_supremo.cpp
@@ -16,7 +16,8 @@ Supremo also had a "limited edition" rerelease in 1990, plastic is fake-wood
instead of black, otherwise it's the same game.
TODO:
-- does not work, most likely due to incomplete cpu emulation (unemulated timer registers)
+- does not work, most likely due to incomplete cpu emulation (unemulated timer registers),
+ could also be a bad rom dump on top of that
- is 1988 version the same ROM?
******************************************************************************/
diff --git a/src/mame/drivers/segac2.cpp b/src/mame/drivers/segac2.cpp
index 27190686b6d..5f614d5c6e7 100644
--- a/src/mame/drivers/segac2.cpp
+++ b/src/mame/drivers/segac2.cpp
@@ -1661,14 +1661,15 @@ void segac2_state::segac2(machine_config &config)
void segac2_state::segac2_tfrceacjpb(machine_config& config)
{
segac2(config);
- m_io->set_ignore_read_direction();
+ m_io->set_ddr_override(0xf); // game erroneously writes 0x58 to DDR
}
-// Ribbit does random measure of UPD7759 sample #A playback time and reset to round 1 if its not in expected range (see routine @1D8D2)
-// current UPD code is too fast, add slight delay
void segac2_state::segac2_ribbit(machine_config& config)
{
segac2(config);
+
+ // Ribbit does random measure of UPD7759 sample #A playback time and reset to round 1 if it's not in expected range (see routine @1D8D2)
+ // current UPD code is too fast, add slight delay
m_upd7759->set_start_delay(250);
}
diff --git a/src/mame/machine/315_5296.cpp b/src/mame/machine/315_5296.cpp
index 52ddf998d40..e977bc02be7 100644
--- a/src/mame/machine/315_5296.cpp
+++ b/src/mame/machine/315_5296.cpp
@@ -37,7 +37,7 @@ sega_315_5296_device::sega_315_5296_device(const machine_config &mconfig, const
m_in_port_cb(*this),
m_out_port_cb(*this),
m_out_cnt_cb(*this),
- m_ignore_read_direction(false)
+ m_dir_override(0xff)
{
}
@@ -56,6 +56,7 @@ void sega_315_5296_device::device_start()
save_item(NAME(m_output_latch));
save_item(NAME(m_cnt));
save_item(NAME(m_dir));
+ save_item(NAME(m_dir_override));
}
//-------------------------------------------------
@@ -89,7 +90,7 @@ READ8_MEMBER( sega_315_5296_device::read )
// port A to H
case 0x0: case 0x1: case 0x2: case 0x3: case 0x4: case 0x5: case 0x6: case 0x7:
// if the port is configured as an output, return the last thing written
- if ((m_dir & 1 << offset) && (m_ignore_read_direction == false))
+ if (m_dir & m_dir_override & 1 << offset)
return m_output_latch[offset];
// otherwise, return an input port
diff --git a/src/mame/machine/315_5296.h b/src/mame/machine/315_5296.h
index c3cc2172de9..2b8d30acc91 100644
--- a/src/mame/machine/315_5296.h
+++ b/src/mame/machine/315_5296.h
@@ -47,7 +47,7 @@ public:
auto out_cnt1_callback() { return m_out_cnt_cb[1].bind(); }
auto out_cnt2_callback() { return m_out_cnt_cb[2].bind(); }
- void set_ignore_read_direction() { m_ignore_read_direction = true; }
+ void set_ddr_override(uint8_t mask) { m_dir_override = mask; }
DECLARE_READ8_MEMBER(read);
DECLARE_WRITE8_MEMBER(write);
@@ -67,8 +67,7 @@ private:
uint8_t m_output_latch[8];
uint8_t m_cnt;
uint8_t m_dir;
-
- bool m_ignore_read_direction;
+ uint8_t m_dir_override;
};
// device type definition