summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/m6502/xavix.cpp
diff options
context:
space:
mode:
author David Haywood <hazemamewip@hotmail.com>2018-02-08 21:03:57 +0000
committer R. Belmont <rb6502@users.noreply.github.com>2018-02-08 16:03:57 -0500
commitf2caf3fbb009076d3c8ab3dae7de4982dcc07e3c (patch)
tree18bcc9b2b19aaaa775794b5a68cc9b0cb3830cfa /src/devices/cpu/m6502/xavix.cpp
parent15556478e7f2796688bd654b9ea7806d5b07b889 (diff)
xavix - some changes to keep code running better, I think it's trying… (#3180)
* xavix - some changes to keep code running better, I think it's trying to do a palette writes at 6800/6900 before crashing now (nw) * new machines marked as NOT WORKING Play TV Monster Truck [Sean Riddle, Peter Wilhelmsen] * experiments (nw) * ram address 0xff (internal ram / zero page ram) is used to bank data reads at 0x8000 (the equiavlent of how the custom ocpods bank code reads there instead)
Diffstat (limited to 'src/devices/cpu/m6502/xavix.cpp')
-rw-r--r--src/devices/cpu/m6502/xavix.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/devices/cpu/m6502/xavix.cpp b/src/devices/cpu/m6502/xavix.cpp
index 55a5212c069..7a30f1a3e1b 100644
--- a/src/devices/cpu/m6502/xavix.cpp
+++ b/src/devices/cpu/m6502/xavix.cpp
@@ -67,7 +67,10 @@ uint8_t xavix_device::mi_xavix_normal::read(uint16_t adr)
if (adr < 0x8000)
return program->read_byte(adr);
else
- return program->read_byte(base->adr_with_bank(adr));
+ {
+ uint8_t data_bank = program->read_byte(0xff);
+ return program->read_byte((data_bank << 16) | adr);
+ }
}
uint8_t xavix_device::mi_xavix_normal::read_sync(uint16_t adr)
@@ -91,7 +94,10 @@ void xavix_device::mi_xavix_normal::write(uint16_t adr, uint8_t val)
if (adr < 0x8000)
program->write_byte(adr, val);
else
- program->write_byte(base->adr_with_bank(adr), val);
+ {
+ uint8_t data_bank = program->read_byte(0xff);
+ program->write_byte((data_bank << 16) | adr, val);
+ }
}
xavix_device::mi_xavix_nd::mi_xavix_nd(xavix_device *_base) : mi_xavix_normal(_base)