diff options
author | Astatin <[email protected]> | 2025-03-07 22:01:12 +0900 |
---|---|---|
committer | Astatin <[email protected]> | 2025-03-07 22:01:12 +0900 |
commit | df5a1c83d8c5d680e1bd4ef1c6793db964ebebea (patch) | |
tree | 4875d7634f915df26045a4f7c355422b531c372e /src/io.rs | |
parent | 85fd7f345b360fa644732e194498eaf3eacefbf4 (diff) |
Add gamepad recorder & gamepad replay
Diffstat (limited to 'src/io.rs')
-rw-r--r-- | src/io.rs | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -22,15 +22,9 @@ impl Memory { 0x42 => self.display.viewport_y, 0x43 => self.display.viewport_x, 0x41 => { - let mut ret = match self.display.lcd_interrupt_mode { - 3 => 0b01000000, - 2 => 0b00100000, - 1 => 0b00010000, - 0 => 0b00001000, - _ => 0, - }; + let mut ret = 0b00001000 << self.display.lcd_interrupt_mode; - ret |= if self.display.ly > 0x90 { + ret |= if self.display.ly >= 0x90 { 1 } else if self.display.stat < 80 { 2 |