skyfloogle / red-viper

A Virtual Boy emulator for the 3DS
794 stars 18 forks source link

Support executing code from RAM #57

Closed skyfloogle closed 7 months ago

skyfloogle commented 7 months ago

The emulator currently crashes when code is executed from any location other than ROM. In the past doing so has indicated an emulator bug, but Formula V does this occasionally and intentionally, and I understand other currently unreleased homebrew does as well. The current dynarec basically assumes all code is in ROM. I'm not sure how easy it would be to support volatile code in it. An interpreter would solve this issue, especially given these bits of code are generally not very large. It might be a large effort, but it would avoid increasing the dynarec's complexity, and interpreting the code every time is probably faster than recompiling it every time.

skyfloogle commented 7 months ago

In f905dd8 through 30211ed, an interpreter was added. It's very slow, and seems to glitch out badly after resetting the game, but it fulfils its purpose.