summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraiju <devnull@localhost>2014-06-14 20:18:57 +0200
committeraiju <devnull@localhost>2014-06-14 20:18:57 +0200
commite30fc1fbdf2eaac19eac54e9e656c0db7fc5a108 (patch)
tree83205f783d605056f2563cf46e9e25b4aadcad8e
parent37a5b4e9c3f58a4c87a88415036cf46f8e90d0a2 (diff)
downloadplan9front-e30fc1fbdf2eaac19eac54e9e656c0db7fc5a108.tar.xz
games/md: small fixes
-rw-r--r--sys/src/games/md/cpu.c4
-rw-r--r--sys/src/games/md/vdp.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/sys/src/games/md/cpu.c b/sys/src/games/md/cpu.c
index eaf19069b..fd05c980b 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 == 0x1300){
+ if(0 && pc == 0x23000000){
trace++;
print("%x\n", curpc);
}
@@ -894,7 +894,7 @@ step(void)
case 0x4e75: pc = pop32(); tim += 16; break; /* RTS */
case 0x4e76: if((rS & FLAGV) != 0) trap(7, curpc); tim += 4; break; /* TRAPV */
case 0x4e77: /* RTR */
- rS = rS & 0xff00 | fetch16() & 0xff;
+ rS = rS & 0xff00 | pop16() & 0xff;
pc = pop32();
tim += 20;
break;
diff --git a/sys/src/games/md/vdp.c b/sys/src/games/md/vdp.c
index a16f08841..6c63a984a 100644
--- a/sys/src/games/md/vdp.c
+++ b/sys/src/games/md/vdp.c
@@ -326,7 +326,7 @@ vdpstep(void)
if(vdpy == 0 || vdpy >= 225)
hctr = reg[HORCTR];
else
- if(--hctr == 0){
+ if(hctr-- == 0){
if((reg[MODE1] & IE1) != 0)
irq |= INTHOR;
hctr = reg[HORCTR];