shonumi / gbe-plus

DMG/GBC/GBA emulator and experimental NDS emulator.
GNU General Public License v2.0
530 stars 80 forks source link

[DMG] only unmasked INTs should wake from HALT #25

Closed NasenSpray closed 8 years ago

NasenSpray commented 8 years ago

see https://github.com/shonumi/gbe-plus/blob/master/src/dmg/z80.cpp#L219

else if(mem->memory_map[IF_FLAG] && mem->memory_map[IE_FLAG]) { halt = false; return false; }

should be

else if(mem->memory_map[IF_FLAG] & mem->memory_map[IE_FLAG]) { halt = false; return false; }

shonumi commented 8 years ago

Good catch! Dunno how that was missed all this time. Guess not a lot of games take advantage of this behavior.