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
cc65 breaks on devices or configurations where the 'zero page' is not at 0 #498
Comments
|
What's the current status of PR #319? Anyone working on this? |
|
Having dug a bit the offender seems only to be in the runtime. so for now I've patched my runtime and I will link my fixed routine in crt0 so it gets used and found before the buggy cc65 one. Using the existing jmpvec helper fixes the problem nicely (but leaves the jmpvec and interrupt bug even more of a problem) |
A pull request with the described change would be in general welcome.
I can't follow you. Please elaborate. |
|
I'll send you a pull request once I've tested a bit more and looked for other cases. |
|
Sorry but I lost track of what aspects of this issue having maybe been solved in the meanwhile. @EtchedPixels: Could you please provide a short feedback on the status of this issue from your perspective? |
|
@oliverschmidt My current status is that I have a 'sufficiently rigged demo' that I can build my Fuzix kernel on 65C816 with the kernel code in bank1, data in bank2 and ZP / S in bank 0. To do that I've had to
To do it all properly also needs a compiler tweak. I want to spend the time to get it all working and right and tidy first |
|
Thanks for the quick feedback :-) So we'll just keep this issue open as-is you'll come back with news when you're ready... |
|
https://github.com/EtchedPixels/FUZIX/wiki/Using-CC65-on-the-65C816 is where I am today |
|
I wonder if/how we could create a testcase for this... tricky :) |
|
Not very - use a 65C816. |
|
I mean a testcase for our regression testbench :) |
|
What are the requirements for the regression setup - there are plenty of 65C816 emulators out there, and some of them even work. It ought to be trivial to hack https://github.com/EtchedPixels/v65c816 into whatever your test suite needs if you can let me know what you require. |
|
it uses the simulator from the cc65 toolchain, no external tools allowed - so probably has to wait until someone adds 65816 to it. |
|
I'll try and find time to product a compatible 65C816 simulator with the same PV API (or similar). Your current PV API allows the tested code to overwrite and access arbitrary file paths which is bad - worse yet PvOpen has a buffer overflow so your test can actually execute arbitrary native code on the host ! |
|
As @mrdudz already pointed out, we're not going to make use of any external tools in our CI. |
In various pieces of compiler generated code you find patterns of the form
STA $08
STX $09
JMP $0008
which breaks on the HuC (DP at $2000) and also on 65c816 if you are running code outside of bank 0.
I was thinking about adding a compiler option --unaliased-zp which would
PSHX
PSHA
RTS (1 clock longer)
for this case and for -Os on 65C02 as it's also half the size
(it needs something uglier on 6502 - but you'd not normally build 6502 with this option...)
Thoughts ?
The text was updated successfully, but these errors were encountered: