RIP-Comm / clementine

Gameboy Advance emulator.
MIT License
48 stars 13 forks source link

Revert increment after fetch + small fixes #135

Closed AlessioC31 closed 1 year ago

AlessioC31 commented 1 year ago

To be merged after #134 .

This PR mainly reverts the increment after fetch commit.

I also changed the MSR instruction to use set_mode_raw, directly setting the mode bits, this is because the BIOS wants to execute:

image

And it was failing since it was trying to do set_mode(Mode::try_from(0b00000).unwrap()) (0b00000 is not a mode). But if the BIOS wants to do it we should let it do :D

I've also added a panic in the branch_and_exchange as we don't have the THUMB mode yet, thus every instruction executed after the branch_and_exchanged is meaningless (the bios was looping).