dirkwhoffmann / Moira

A Motorola 68000 emulator written in C++
https://dirkwhoffmann.github.io/Moira
Other
106 stars 13 forks source link

Add support for FC pins #2

Closed dirkwhoffmann closed 4 years ago

dirkwhoffmann commented 4 years ago

The purpose of the function code pins (FC0 - FC2) is to make the 68000 connectable to a MMU. They are not implemented at the moment, simply because the Amiga has no MMU.

TODO:

elmerucr commented 4 years ago

Sounds like a nice idea. Sooner or later I will try to incorporate this feature in my project to have some form of memory protection between kernel and user space.

dirkwhoffmann commented 4 years ago

Done. There is a new API function readFC() that can be used to query the FC pins.

Unfortunately, the test runner is only able to partially verify this feature. It compares the FC value with Musashi on every memory write. It doesn't check on reads, because the test runner cannot do this in general (Musashi performs prefetching in a different, presumably more simpler way).

However, Moira performs very well in vAmiga so far where I used Toni Wilens cputester to check the instructions. Toni's tool verifies the FC bits indirectly, because they are part of the stack frames generated in case of address errors. I wasn't able to check address errors for all instructions yet (for some, I need to wait until the next release of UAE comes out), but for the instructions tested so far, the values looked good.