diff options
author | aiju <devnull@localhost> | 2014-06-15 15:52:29 +0200 |
---|---|---|
committer | aiju <devnull@localhost> | 2014-06-15 15:52:29 +0200 |
commit | 838163670c27c9962f33f0cea680aba0f777dc59 (patch) | |
tree | 5222345c1ef9c43bed812a27c1922279c42bb20a /sys/src/games/md/cpu.c | |
parent | e30fc1fbdf2eaac19eac54e9e656c0db7fc5a108 (diff) |
games/md: add save game support, fix cpu bug
Diffstat (limited to 'sys/src/games/md/cpu.c')
-rw-r--r-- | sys/src/games/md/cpu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/src/games/md/cpu.c b/sys/src/games/md/cpu.c index fd05c980b..3a097a5ff 100644 --- a/sys/src/games/md/cpu.c +++ b/sys/src/games/md/cpu.c @@ -509,7 +509,7 @@ step(void) int n, m, d; static int cnt; - if(0 && pc == 0x23000000){ + if(0 && pc == 0x59500){ trace++; print("%x\n", curpc); } @@ -552,7 +552,7 @@ step(void) tim += 20; break; } - if((op & 0x13f) == 0x108){ /* MOVEP */ + if((op & 0x138) == 0x108){ /* MOVEP */ a = ra[op & 7] + (s16int)fetch16(); switch(s){ case 0: @@ -829,7 +829,7 @@ step(void) v = op >> 4 & 0xf; n = op & 7; if(v == 4){ /* TRAP */ - trap(op & 0xf, curpc); + trap(0x20 | op & 0xf, pc); break; }else if(v == 5){ if((op & 8) == 0){ /* LINK */ |