ref: 27fe8ee3569ff13ff0fa6cb8d3af6ce48fe1a876
parent: d5368b0799a2a335f4accac2027617c433db4fef
author: Michael Forney <mforney@mforney.org>
date: Fri Feb 5 18:19:23 EST 2021
games/gb: minor style fixes
--- a/sys/src/games/gb/mem.c
+++ b/sys/src/games/gb/mem.c
@@ -473,13 +473,13 @@
return mapper(READ, a);
case 12: case 14:
return wram[a & 0xfff];
+ case 13:
+ return wramb[a & 0xfff];
case 15:
if(a >= 0xff00)
return regread(a);
else if(a >= 0xfe00)
return oam[a - 0xfe00];
- case 13:
- return wramb[a & 0xfff];
}
return 0xff;
}
@@ -504,16 +504,15 @@
case 12: case 14:
wram[a & 0xfff] = v;
return;
+ case 13:
+ wramb[a & 0xfff] = v;
+ return;
case 15:
- if(a >= 0xff00){
+ if(a >= 0xff00)
regwrite(a, v);
- return;
- }else if(a >= 0xfe00){
+ else if(a >= 0xfe00)
oam[a - 0xfe00] = v;
- return;
- }
- case 13:
- wramb[a & 0xfff] = v;
+ return;
}
}