ref: bfa89313b50f2adc4158f97df2361b2d4eb3b226
parent: 6cf2b9ed3cbad5265e6a34ecadc0f2fae4feb42d
author: aiju <devnull@localhost>
date: Tue Feb 25 18:25:28 EST 2014
games/nes: it's too late to write code
--- a/sys/src/games/nes/apu.c
+++ b/sys/src/games/nes/apu.c
@@ -94,11 +94,12 @@
(*a)--;
}
a = apuctr + TRILIN;
- if((apuctr[RELOAD] & (1<<2)) != 0){- *a = mem[0x4008];
- apuctr[RELOAD] &= ~(1<<2);
- }else if(*a != 0)
+ if((apuctr[RELOAD] & (1<<2)) != 0)
+ *a = mem[0x4008] & 0x7f;
+ else if(*a != 0)
(*a)--;
+ if((mem[0x4008] & 0x80) == 0)
+ apuctr[RELOAD] &= ~(1<<2);
}
void
--
⑨