diff --git a/examples/sdl/src/main.rs b/examples/sdl/src/main.rs index 2e236739c81b0488159c8132e66c0d5408420ba3..140783c7988cd48b8025e5210997a855ce34bc48 100644 --- a/examples/sdl/src/main.rs +++ b/examples/sdl/src/main.rs @@ -85,14 +85,14 @@ fn main() { game_boy.load_boot_default(); //game_boy.load_rom_file("../../res/roms.prop/tetris.gb"); - game_boy.load_rom_file("../../res/roms.prop/dr_mario.gb"); + //game_boy.load_rom_file("../../res/roms.prop/dr_mario.gb"); //game_boy.load_rom_file("../../res/roms.prop/alleyway.gb"); //game_boy.load_rom_file("../../res/roms/firstwhite.gb"); //game_boy.load_rom_file("../../res/roms/opus5.gb"); //game_boy.load_rom_file("../../res/roms/paradius/cpu/01-special.gb"); // PASSED - //game_boy.load_rom_file("../../res/roms/paradius/cpu/02-interrupts.gb"); + game_boy.load_rom_file("../../res/roms/paradius/cpu/02-interrupts.gb"); //game_boy.load_rom_file("../../res/roms/paradius/cpu/03-op sp,hl.gb"); // PASSED //game_boy.load_rom_file("../../res/roms/paradius/cpu/04-op r,imm.gb"); // PASSED //game_boy.load_rom_file("../../res/roms/paradius/cpu/05-op rp.gb"); // PASSED diff --git a/src/cpu.rs b/src/cpu.rs index ad6e6b3be9c3e140a701657d8190ee89daa66ccb..5d3b2c5f49e9660dccaf55c1b4a2c52f8796d491 100644 --- a/src/cpu.rs +++ b/src/cpu.rs @@ -130,9 +130,8 @@ impl Cpu { return 16; } - // @todo aggregate the handling of these interrupts - if (self.mmu.ie & 0x04 == 0x04) && self.mmu.timer().int_tima() { + else if (self.mmu.ie & 0x04 == 0x04) && self.mmu.timer().int_tima() { println!("Going to run Timer interrupt handler (0x50)"); self.disable_int();