// scratchpad
map_l1_mem(mem_readtab, 0, 0x1f800000, 0x1000, psxH);
+ map_l1_mem(mem_readtab, 0, 0x9f800000, 0x1000, psxH);
map_l1_mem(mem_writetab, 0, 0x1f800000, 0x1000, psxH);
+ map_l1_mem(mem_writetab, 0, 0x9f800000, 0x1000, psxH);
// I/O
map_item(&mem_readtab[0x1f801000 >> 12], mem_iortab, 1);
+ map_item(&mem_readtab[0x9f801000 >> 12], mem_iortab, 1);
+ map_item(&mem_readtab[0xbf801000 >> 12], mem_iortab, 1);
map_item(&mem_writetab[0x1f801000 >> 12], mem_iowtab, 1);
+ map_item(&mem_writetab[0x9f801000 >> 12], mem_iowtab, 1);
+ map_item(&mem_writetab[0xbf801000 >> 12], mem_iowtab, 1);
// L2
// unmapped tables
u32 t;
t = mem >> 16;
- if (t == 0x1f80) {
- if (mem < 0x1f801000)
+ if (t == 0x1f80 || t == 0x9f80 || t == 0xbf80) {
+ if ((mem & 0xffff) < 0x400)
return psxHu8(mem);
else
return psxHwRead8(mem);
u32 t;
t = mem >> 16;
- if (t == 0x1f80) {
- if (mem < 0x1f801000)
+ if (t == 0x1f80 || t == 0x9f80 || t == 0xbf80) {
+ if ((mem & 0xffff) < 0x400)
return psxHu16(mem);
else
return psxHwRead16(mem);
u32 t;
t = mem >> 16;
- if (t == 0x1f80) {
- if (mem < 0x1f801000)
+ if (t == 0x1f80 || t == 0x9f80 || t == 0xbf80) {
+ if ((mem & 0xffff) < 0x400)
return psxHu32(mem);
else
return psxHwRead32(mem);
u32 t;
t = mem >> 16;
- if (t == 0x1f80) {
- if (mem < 0x1f801000)
+ if (t == 0x1f80 || t == 0x9f80 || t == 0xbf80) {
+ if ((mem & 0xffff) < 0x400)
psxHu8(mem) = value;
else
psxHwWrite8(mem, value);
u32 t;
t = mem >> 16;
- if (t == 0x1f80) {
- if (mem < 0x1f801000)
+ if (t == 0x1f80 || t == 0x9f80 || t == 0xbf80) {
+ if ((mem & 0xffff) < 0x400)
psxHu16ref(mem) = SWAPu16(value);
else
psxHwWrite16(mem, value);
// if ((mem&0x1fffff) == 0x71E18 || value == 0x48088800) SysPrintf("t2fix!!\n");
t = mem >> 16;
- if (t == 0x1f80) {
- if (mem < 0x1f801000)
+ if (t == 0x1f80 || t == 0x9f80 || t == 0xbf80) {
+ if ((mem & 0xffff) < 0x400)
psxHu32ref(mem) = SWAPu32(value);
else
psxHwWrite32(mem, value);
u32 t;
t = mem >> 16;
- if (t == 0x1f80) {
- if (mem < 0x1f801000)
+ if (t == 0x1f80 || t == 0x9f80 || t == 0xbf80) {
+ if ((mem & 0xffff) < 0x400)
return (void *)&psxH[mem];
else
return NULL;