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

32-bit mapper ops across pages fix #13

Closed
wants to merge 1 commit into from

Conversation

rakslice
Copy link
Contributor

Divide the 32-bit mapper reads and writes into 16-bit ops to handle ops across page boundaries; check address alignment in 16-bit reads

@ewenmcneill
Copy link
Contributor

To record what we discovered in Discord:

more --version

seems to be a good trigger of this cross-page read issue.

With this fix, it now seems to run correctly:

# cd /usr/tmp
# ls -l core
core not found
# more --version
Usage: more [-dfln] [+linenum | +/pattern] name1 name2 ...
# 

and without this fix it would always crash (usually bus error trying to access a wild address in ROM from user space, sometimes "illegal instruction" in a way that didn't make sense).

Since the 68010 is a 16-bit address bus processor, with 32-bit internals, it appears the compiler used by Plexus quite happily generated 16-bit aligned accesses to 32-bit values. And if those spanned a page boundary, the real hardware would do two map lookups, but the emulator was previously only doing one map lookup.

Great find!

Ewen

@rakslice
Copy link
Contributor Author

Closing already fixed :D

@rakslice rakslice closed this Jun 28, 2024
@rakslice rakslice reopened this Jun 28, 2024
@Spritetm Spritetm closed this in 33d2bb7 Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants