summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Robbbert <Robbbert@users.noreply.github.com>2020-12-24 01:25:49 +1100
committer Robbbert <Robbbert@users.noreply.github.com>2020-12-24 01:25:49 +1100
commitfc2a3494857d6f34f5da1301e993a4d21276324b (patch)
tree89b8294e5dfc00cb9f5df34509f2983e7de20312
parent600a9894399e851a65f3c7de3c0d2b7e049d1cef (diff)
cdp1864, eti660: fixed colour bugs
-rw-r--r--src/devices/sound/cdp1864.cpp9
-rw-r--r--src/devices/sound/cdp1864.h2
-rw-r--r--src/mame/drivers/eti660.cpp23
3 files changed, 12 insertions, 22 deletions
diff --git a/src/devices/sound/cdp1864.cpp b/src/devices/sound/cdp1864.cpp
index f4a46748593..7f3811bf09b 100644
--- a/src/devices/sound/cdp1864.cpp
+++ b/src/devices/sound/cdp1864.cpp
@@ -359,7 +359,7 @@ void cdp1864_device::dma_w(uint8_t data)
int sx = screen().hpos() + 4;
int y = screen().vpos();
- if (!m_con)
+ if (m_con)
{
rdata = m_read_rdata();
bdata = m_read_bdata();
@@ -384,11 +384,16 @@ void cdp1864_device::dma_w(uint8_t data)
//-------------------------------------------------
// con_w - color on write
+// At start, color is disabled. If the CON
+// pin is taken low (or pulsed low), color is
+// enabled. It can only be disabled again by
+// resetting the chip.
//-------------------------------------------------
void cdp1864_device::con_w(int state)
{
- m_con = state;
+ if (!state)
+ m_con = true;
}
diff --git a/src/devices/sound/cdp1864.h b/src/devices/sound/cdp1864.h
index 6c589128ef7..589867997dd 100644
--- a/src/devices/sound/cdp1864.h
+++ b/src/devices/sound/cdp1864.h
@@ -152,7 +152,7 @@ private:
int m_disp; // display on
int m_dmaout; // DMA request active
int m_bgcolor; // background color
- int m_con; // color on
+ bool m_con; // color on
// sound state
int m_aoe; // audio on
diff --git a/src/mame/drivers/eti660.cpp b/src/mame/drivers/eti660.cpp
index 9a4747ebed3..379cdb2d55b 100644
--- a/src/mame/drivers/eti660.cpp
+++ b/src/mame/drivers/eti660.cpp
@@ -109,13 +109,11 @@ private:
/* video state */
u8 m_color_ram[0xc0];
u8 m_color;
- bool m_color_on;
};
/* Read/Write Handlers */
// Schematic is wrong, PCB layout is correct: D0-7 swapped around on PIA.
-// There's still a bug in the PIA: if ca2 is instructed to go low, nothing happens.
u8 eti660_state::pia_r()
{
u8 pia_offset = m_maincpu->get_memory_address() & 0x03;
@@ -128,19 +126,14 @@ void eti660_state::pia_w(u8 data)
u8 pia_offset = m_maincpu->get_memory_address() & 0x03;
data = bitswap<8>(data,0,1,2,3,4,5,6,7);
m_pia->write(pia_offset, data);
-
- // handle bug in PIA
- if ((pia_offset == 1) && ((data & 0x30) == 0x30))
- ca2_w(BIT(data, 3));
}
WRITE_LINE_MEMBER( eti660_state::ca2_w ) // test with Wipeout game - it should start up in colour
{
- m_color_on = !state;
m_cti->con_w(state);
}
- void eti660_state::colorram_w(offs_t offset, u8 data)
+void eti660_state::colorram_w(offs_t offset, u8 data)
{
offset = m_maincpu->get_memory_address() - 0xc80;
@@ -245,15 +238,10 @@ void eti660_state::dma_w(offs_t offset, u8 data)
m_color = 7;
- if (m_color_on)
- {
- u8 colorram_offset = ((offset & 0x1f0) >> 1) | (offset & 0x07);
+ u8 colorram_offset = ((offset & 0x1f0) >> 1) | (offset & 0x07);
- if (colorram_offset < 0xc0)
- m_color = m_color_ram[colorram_offset];
- }
- else
- m_color = m_p_videoram[offset] ? 7 : 0;
+ if (colorram_offset < 0xc0)
+ m_color = m_color_ram[colorram_offset];
m_cti->dma_w(data);
}
@@ -309,8 +297,6 @@ void eti660_state::pia_pa_w(u8 data)
void eti660_state::machine_reset()
{
m_resetcnt = 0;
- m_color_on = 0;
- m_cti->con_w(0);
m_maincpu->reset(); // needed
}
@@ -320,7 +306,6 @@ void eti660_state::machine_start()
save_item(NAME(m_color_ram));
save_item(NAME(m_color));
- save_item(NAME(m_color_on));
save_item(NAME(m_keylatch));
save_item(NAME(m_resetcnt));
}