emu-rs / rustual-boy

Rustual Boy - A Virtual Boy emulator.
https://rustualboy.com/
Apache License 2.0
232 stars 30 forks source link

Implement interrupt mask level in psw register #28

Closed jwestfall69 closed 7 years ago

jwestfall69 commented 7 years ago

This implements the interrupt mask level in the psw register based on pages 119-120 of the v810 hardware arch manual and from information provided in the VB Sacred Tech Scroll.

Some homebrew titles use a generic interrupt handler that takes care of load/store of registers, but then uses the psw interrupt mask level value as their index into a jump vector for calling the correct function for a given interrupt. With the value always being 0 it causes them to crash.