ref: 4207aec19f2cbb8b740e7a17faa527c68d8e0980
parent: 7532b134000967049aa173c4265a4e4cedb4e2ce
	author: aiju <devnull@localhost>
	date: Thu Oct 11 12:25:11 EDT 2018
	
games/gb: when the LCD is turned off, reset ppuy and ppustate to 0, fixes bug in dragon warriors iii reported by mischief
--- a/sys/src/games/gb/mem.c
+++ b/sys/src/games/gb/mem.c
@@ -107,8 +107,11 @@
break;
case LCDC:
ppusync();
- if((~v & reg[a] & LCDEN) != 0)
+		if((~v & reg[a] & LCDEN) != 0){+ ppuy = 0;
+ ppustate = 0;
delevent(&evhblank);
+ }
if((v & ~reg[a] & LCDEN) != 0)
addevent(&evhblank, 456*2);
break;
--
⑨