ref: c6ec2041ad9bb2dbb6b710c7efdbf2fc8de4f5ba
parent: 22cf5562fae445333c83d7d562156943dbe1716b
author: cinap_lenrek <[email protected]>
date: Fri Oct 20 23:43:29 EDT 2023
games/md: ignore invalid writes (makes cave story work)
--- a/sys/src/games/md/mem.c
+++ b/sys/src/games/md/mem.c
@@ -75,7 +75,7 @@
case 0x30f3: case 0x30f5: case 0x30f7: case 0x30f9: case 0x30fb:
return;
}
- sysfatal("write to 0xa1%.4x (pc=%#.6ux)", a, curpc);
+ fprint(2, "write to 0xa1%.4x (pc=%#.6ux)", a, curpc);
}
void
@@ -286,7 +286,7 @@
break;
default:
invalid:
- sysfatal("write to %#.6x (pc=%#.6x)", a, curpc);
+ fprint(2, "write to %#.6x (pc=%#.6x)", a, curpc);
}
}
@@ -404,7 +404,8 @@
memwrite(0xc00000 | a & 0x7e, v | v << 8, (a & 1) != 0 ? 0xff : 0xff00);
return;
}
- sysfatal("z80 write to %#.4x (pc=%#.4x)", a, scurpc);
+ fprint(2, "z80 write to %#.4x (pc=%#.4x)", a, scurpc);
+ return;
default:
memwrite(z80bank << 15 | a & 0x7ffe, v << 8 | v, (a & 1) != 0 ? 0xff : 0xff00);
}