ref: 81bec2e600d8b930d5c77cac83ed7ed3469dd596
parent: ee383bc809ae07295701aa1a821f529107e90d40
author: aiju <devnull@localhost>
date: Wed Apr 1 08:49:59 EDT 2015
games/c64: writes to I/O area do not affect underlying memory (documentation lied)
--- a/sys/src/games/c64/mem.c
+++ b/sys/src/games/c64/mem.c
@@ -280,8 +280,11 @@
void
memwrite(u16int a, u8int v)
{- if(a >> 12 == 13 && !((pla & (HIRAM|LORAM)) == 0 || pla == 1 || (pla & CHAREN) == 0 && (pla & (EXROM|GAME)) != EXROM))
+ if(a >> 12 == 13 && !((pla & (HIRAM|LORAM)) == 0 || pla == 1 || (pla & CHAREN) == 0 && (pla & (EXROM|GAME)) != EXROM)){miowrite(a & 0xfff, v);
+ io();
+ return;
+ }
ram[a] = v;
if(a == 1)
pla = pla & ~7 | v & 7;
--
⑨