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

Improvement to paging logic #12

Open
haerfest opened this issue Oct 17, 2023 · 1 comment
Open

Improvement to paging logic #12

haerfest opened this issue Oct 17, 2023 · 1 comment

Comments

@haerfest
Copy link

In a thread on the Stardot forum it was revealed that Electron OS 1.00 expects SHEILA &FE05, used to both clear interrupts and page in sideways RAM/ROM, to only page when all interrupt-clearing bits are zero, i.e. &0x. Most expansions that support sideways RAM/ROM, such as the Plus 1, implement logic to that effect.

Elkulator currently honours every paging request, which in specific circumstances could lead to the OS inadvertently paging in bank #0 when servicing interrupts.

Probably placing the code in ula.c lines 249-255 inside a guard is sufficient:

if ((val & 0xF0) == 0x00)
{
  // existing paging code
}
@uiopaubo
Copy link
Contributor

uiopaubo commented Dec 8, 2024

I've extended this logic in the pull request for this topic, hopefully capturing the proper hardware behaviour.

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

No branches or pull requests

2 participants