Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for FC pins #2

Closed
dirkwhoffmann opened this issue Jan 23, 2020 · 2 comments
Closed

Add support for FC pins #2

dirkwhoffmann opened this issue Jan 23, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@dirkwhoffmann
Copy link
Owner

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:

  • Compute the proper FC value before a memory access happens. To avoid performance decrease, add config option EMULATE_FC.
  • Add an API function for querying the current value of FC2|FC1|FC0.
  • Add FC pin checking to the test runner (i.e., compare Moira’s FC value with the FC value computed by Musashi).
@dirkwhoffmann dirkwhoffmann added the enhancement New feature or request label Jan 23, 2020
@elmerucr
Copy link

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
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants