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

Clear Cache before VBR call in default demo. #256

Open
terriblefire opened this issue Mar 21, 2024 · 1 comment
Open

Clear Cache before VBR call in default demo. #256

terriblefire opened this issue Mar 21, 2024 · 1 comment

Comments

@terriblefire
Copy link

terriblefire commented Mar 21, 2024

In your awesome example code, the code to get the VBR will crash on an 060 with Caches enabled because the data you specify as the instructions to execute in supervisor mode will never actually be written to ram. Its held purely on the stack (and in cache)

Please add...

CacheClearU();

immediately before

vbr = (APTR)Supervisor((ULONG (*)())getvbr);

and code will run even with 060 MMU+Caches enabled.

@terriblefire
Copy link
Author

I guess another way to do it would be to declare it globally rather than as a local variable.

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

1 participant