diff options
author | Michael Forney <mforney@mforney.org> | 2021-02-05 23:19:23 +0000 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2022-03-18 17:32:11 -0700 |
commit | 27fe8ee3569ff13ff0fa6cb8d3af6ce48fe1a876 (patch) | |
tree | 4693ef01798c07bbddd4e215ab71c39477a06f76 /sys/src/games | |
parent | d5368b0799a2a335f4accac2027617c433db4fef (diff) |
games/gb: minor style fixes
Diffstat (limited to 'sys/src/games')
-rw-r--r-- | sys/src/games/gb/mem.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sys/src/games/gb/mem.c b/sys/src/games/gb/mem.c index c299c66f5..13509877f 100644 --- a/sys/src/games/gb/mem.c +++ b/sys/src/games/gb/mem.c @@ -473,13 +473,13 @@ memread(u16int a) 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 @@ memwrite(u16int a, u8int v) 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; } } |