summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Robbbert <Robbbert@users.noreply.github.com>2022-05-25 00:44:54 +1000
committer Robbbert <Robbbert@users.noreply.github.com>2022-05-25 00:44:54 +1000
commit758914ddd39ec75f907e0ddda001593e4984d1ba (patch)
treee6dd4aa455c3e28f52e3aa1c78f202f52ce5b790
parentce6417ab04f5bab5375031b9832222b4ec187b3c (diff)
gts1,pps4: Fixed 2 cpu bugs, games are mostly playable.
-rw-r--r--src/devices/cpu/pps4/pps4.cpp17
-rw-r--r--src/devices/cpu/pps4/pps4.h1
-rw-r--r--src/mame/drivers/gts1.cpp25
3 files changed, 21 insertions, 22 deletions
diff --git a/src/devices/cpu/pps4/pps4.cpp b/src/devices/cpu/pps4/pps4.cpp
index 5b2a376536a..2e21cf07357 100644
--- a/src/devices/cpu/pps4/pps4.cpp
+++ b/src/devices/cpu/pps4/pps4.cpp
@@ -94,6 +94,7 @@ pps4_device::pps4_device(const machine_config &mconfig, device_type type, const
, m_dia_cb(*this)
, m_dib_cb(*this)
, m_do_cb(*this)
+ , m_wasldi(0)
{
}
@@ -613,12 +614,10 @@ void pps4_device::iEXD()
*/
void pps4_device::iLDI()
{
- // previous LDI instruction?
- if (0x70 == (m_Ip & 0xf0)) {
- LOG("%s: skip prev:%02x op:%02x\n", __FUNCTION__, m_Ip, m_I1);
- return;
- }
- m_A = ~m_I1 & 15;
+ if (!m_wasldi)
+ m_A = ~m_I1 & 15;
+
+ m_wasldi = 2;
}
/**
@@ -816,8 +815,8 @@ void pps4_device::iXS()
*/
void pps4_device::iCYS()
{
- const u16 sa = (m_SA >> 4) | (m_A << 8);
- m_A = m_SA & 15;
+ const u16 sa = (m_SA >> 4) | ((m_A^15) << 8);
+ m_A = ~m_SA & 15;
m_SA = sa;
}
@@ -1326,6 +1325,8 @@ void pps4_device::iSAG()
void pps4_device::execute_one()
{
m_I1 = ROP();
+ if (m_wasldi)
+ m_wasldi--;
if (m_Skip) {
m_Skip = 0;
LOG("%s: skip op:%02x\n", __FUNCTION__, m_I1);
diff --git a/src/devices/cpu/pps4/pps4.h b/src/devices/cpu/pps4/pps4.h
index ab6e58c5554..023e80a1fcd 100644
--- a/src/devices/cpu/pps4/pps4.h
+++ b/src/devices/cpu/pps4/pps4.h
@@ -84,6 +84,7 @@ protected:
memory_access<12, 0, 0, ENDIANNESS_LITTLE>::specific m_data;
memory_access< 8, 0, 0, ENDIANNESS_LITTLE>::specific m_io;
int m_icount;
+ int m_wasldi;
u8 m_A; //!< Accumulator A(4:1)
u8 m_X; //!< X register X(4:1)
diff --git a/src/mame/drivers/gts1.cpp b/src/mame/drivers/gts1.cpp
index 99cc00e8938..be4663fdc88 100644
--- a/src/mame/drivers/gts1.cpp
+++ b/src/mame/drivers/gts1.cpp
@@ -72,16 +72,13 @@ Z22 5101L 4-bit static RAM
Z23 MM6351-IJ Personality PROM
-ToDo:
-- When game started it plays the startup tune and kicks the ball to the shooter - but then
- -- You can't add more players;
- -- No switches register, so unable to score;
- -- The score flashes the high score as if the game had ended;
- -- You can still hit tilt (9-key) and X until it really is game over.
- -- If the lucky number matches you'll still get a free credit.
- -- Some games will go straight to test 11, or instant game over.
+Status:
+- All games are playable, to an extent
-- Z80-based sound board for hexagone and sahalove.
+ToDo:
+- Hunt down the remaining CPU bugs.
+- The sound-board sounds are very weird.
+- Z80-based sound board for hexagone and sahalove (no info available).
*****************************************************************************************************/
@@ -502,7 +499,7 @@ void gts1_state::gts1_solenoid_w(offs_t offset, u8 data) // WORKS
m_io_outputs[offset] = data;
}
-u8 gts1_state::gts1_switches_r(offs_t offset) // only switches with offset 0 are working; can't go in-game to try the others **********
+u8 gts1_state::gts1_switches_r(offs_t offset)
{
u8 data = 0;
if (offset > 7)
@@ -512,7 +509,7 @@ u8 gts1_state::gts1_switches_r(offs_t offset) // only switches with offset 0 are
data |= BIT(m_switches[i]->read(), offset & 7);
//LOG("%s: switches[bit %X of %X, using offset of %X] got %x\n", __FUNCTION__, i, m_strobe, offset&7, data);
}
- return data ? 0 : 1; // FIXME: inverted or normal?
+ return data ? 0 : 1;
}
void gts1_state::gts1_switches_w(offs_t offset, u8 data) // WORKS
@@ -686,7 +683,7 @@ u8 gts1_state::gts1_lamp_apm_r(offs_t offset) // Think this works - dips seem to
* @param offset 0 ... 2 = group
* @param data 4 bit value to write
*/
-void gts1_state::gts1_lamp_apm_w(offs_t offset, u8 data) // Working for the dips, not sure about the PM address. ***********
+void gts1_state::gts1_lamp_apm_w(offs_t offset, u8 data)
{
switch (offset) {
case 0: // LD1-LD4 on jumper J5
@@ -715,14 +712,14 @@ void gts1_state::gts1_lamp_apm_w(offs_t offset, u8 data) // Working for the dips
}
}
-u8 gts1_state::gts1_pa_r() // TODO: address normal or inverted? data normal or inverted? ***************
+u8 gts1_state::gts1_pa_r()
{
u16 addr = m_6351_addr ^ 0x3ff;
// return nibble from personality module ROM
u8 data = m_pm[addr];
LOG("%s: PROM READ @[%03x]:%02x\n", __FUNCTION__, addr, data);
//machine().debug_break();
- return ~data; // inverted = game over at start; normal = test mode at start
+ return data;
}
void gts1_state::gts1_do_w(u8 data)