summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2019-11-05 09:58:36 -0500
committer AJR <ajrhacker@users.noreply.github.com>2019-11-05 09:58:36 -0500
commit6c517ab98e2b13ec76e82129e29d58ca82b2637e (patch)
treec1af6fe6bced9f9629ee16e9c7529f1f8d886179
parent0a5fed2ecec3c9e3cac23b769896548c28cc6091 (diff)
st2204, st2205u: Fix writes to high bytes of banking registers (nw)
st2204: Fix port control writes (nw) This fixes the memory banking problems in dyndesk and cartridge loading in gameking.
-rw-r--r--src/devices/cpu/m6502/st2204.cpp8
-rw-r--r--src/devices/cpu/m6502/st2205u.cpp8
-rw-r--r--src/mame/drivers/inteladv.cpp6
3 files changed, 10 insertions, 12 deletions
diff --git a/src/devices/cpu/m6502/st2204.cpp b/src/devices/cpu/m6502/st2204.cpp
index db13be2f8e5..3a6c794ba8b 100644
--- a/src/devices/cpu/m6502/st2204.cpp
+++ b/src/devices/cpu/m6502/st2204.cpp
@@ -293,7 +293,7 @@ u8 st2204_device::prrh_r()
void st2204_device::prrh_w(u8 data)
{
u16 &prr = downcast<mi_st2204 &>(*mintf).prr;
- prr = (data & 0x0f) << 16 | (prr & 0x00ff);
+ prr = u16(data & 0x0f) << 8 | (prr & 0x00ff);
}
u8 st2204_device::drrl_r()
@@ -315,7 +315,7 @@ u8 st2204_device::drrh_r()
void st2204_device::drrh_w(u8 data)
{
u16 &drr = downcast<mi_st2204 &>(*mintf).drr;
- drr = (data & 0x07) << 16 | (drr & 0x00ff);
+ drr = u16(data & 0x07) << 8 | (drr & 0x00ff);
}
u8 st2204_device::dmsl_r()
@@ -407,7 +407,7 @@ u8 st2204_device::dmrh_r()
void st2204_device::dmrh_w(u8 data)
{
u16 &dmr = downcast<mi_st2204 &>(*mintf).dmr;
- dmr = (data & 0x07) << 16 | (dmr & 0x00ff);
+ dmr = (data & 0x07) << 8 | (dmr & 0x00ff);
}
u8 st2204_device::pmem_r(offs_t offset)
@@ -434,7 +434,7 @@ void st2204_device::int_map(address_map &map)
{
map(0x0000, 0x0004).rw(FUNC(st2204_device::pdata_r), FUNC(st2204_device::pdata_w));
map(0x0005, 0x0005).rw(FUNC(st2204_device::psc_r), FUNC(st2204_device::psc_w));
- map(0x0008, 0x000c).rw(FUNC(st2204_device::pdata_r), FUNC(st2204_device::pdata_w));
+ map(0x0008, 0x000c).rw(FUNC(st2204_device::pctrl_r), FUNC(st2204_device::pctrl_w));
map(0x000d, 0x000d).rw(FUNC(st2204_device::pfc_r), FUNC(st2204_device::pfc_w));
map(0x000e, 0x000e).rw(FUNC(st2204_device::pfd_r), FUNC(st2204_device::pfd_w));
map(0x000f, 0x000f).rw(FUNC(st2204_device::pmcr_r), FUNC(st2204_device::pmcr_w));
diff --git a/src/devices/cpu/m6502/st2205u.cpp b/src/devices/cpu/m6502/st2205u.cpp
index 40d118be795..e43b79dc449 100644
--- a/src/devices/cpu/m6502/st2205u.cpp
+++ b/src/devices/cpu/m6502/st2205u.cpp
@@ -271,7 +271,7 @@ u8 st2205u_device::irrh_r()
void st2205u_device::irrh_w(u8 data)
{
u16 &irr = downcast<mi_st2205u &>(*mintf).irr;
- irr = (data & 0x8f) << 16 | (irr & 0x00ff);
+ irr = (data & 0x8f) << 8 | (irr & 0x00ff);
}
u8 st2205u_device::prrl_r()
@@ -293,7 +293,7 @@ u8 st2205u_device::prrh_r()
void st2205u_device::prrh_w(u8 data)
{
u16 &prr = downcast<mi_st2205u &>(*mintf).prr;
- prr = (data & 0x8f) << 16 | (prr & 0x00ff);
+ prr = (data & 0x8f) << 8 | (prr & 0x00ff);
}
u8 st2205u_device::drrl_r()
@@ -315,7 +315,7 @@ u8 st2205u_device::drrh_r()
void st2205u_device::drrh_w(u8 data)
{
u16 &drr = downcast<mi_st2205u &>(*mintf).drr;
- drr = (data & 0x87) << 16 | (drr & 0x00ff);
+ drr = (data & 0x87) << 8 | (drr & 0x00ff);
}
u8 st2205u_device::brrl_r()
@@ -337,7 +337,7 @@ u8 st2205u_device::brrh_r()
void st2205u_device::brrh_w(u8 data)
{
u16 &brr = downcast<mi_st2205u &>(*mintf).brr;
- brr = (data & 0x9f) << 16 | (brr & 0x00ff);
+ brr = (data & 0x9f) << 8 | (brr & 0x00ff);
}
u8 st2205u_device::pmcr_r()
diff --git a/src/mame/drivers/inteladv.cpp b/src/mame/drivers/inteladv.cpp
index 169f69eb304..9aa7184f6f7 100644
--- a/src/mame/drivers/inteladv.cpp
+++ b/src/mame/drivers/inteladv.cpp
@@ -4,9 +4,6 @@
VTech Intelligence Advance E/R Lerncomputer
- TODO: dyndesk writes to low memory go to external RAM instead? It also
- eventually runs off into nonexistent memory.
-
***************************************************************************/
#include "emu.h"
@@ -39,7 +36,8 @@ void inteladv_state::inteladv_map(address_map &map)
void inteladv_state::dyndesk_map(address_map &map)
{
- map(0x000000, 0x1fffff).rom().region("maincpu", 0).nopw();
+ map(0x000000, 0x1fffff).rom().region("maincpu", 0).mirror(0x400000); // why mirrored?
+ map(0x800000, 0x807fff).ram();
}
static INPUT_PORTS_START( inteladv )