-
Notifications
You must be signed in to change notification settings - Fork 7
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
Targeting machines other than Apple Ii #87
Comments
Yes, it is possible. The compiler and the code it generates don't really care what machine you are targeting. The compiler itself has been used to target other machines before--particularly the 65816 Nintendo. There are two issues you will face. The first is the compiler itself runs on an Apple IIGS or emulator. It would be a heavy lift to port it. The second is the runt time libraries. Most, like floating-point math and string functions, are platform agnostic, but IO commands definitely are not. You would either need to rewrite the ones you use for your target machine or not use them. Source is included for the run time libraries, wo rewriting them is a viable option. |
In addition to what Mike said, having done that sort of thing before,
adding a library layer to replace I/O is ultimately not that hard, and can
be made to be transparent to apps - just link in your custom libc first.
…On Thu, Feb 15, 2024 at 8:37 AM MikeW50 ***@***.***> wrote:
Yes, it is possible. The compiler and the code it generates don't really
care what machine you are targeting. The compiler itself has been used to
target other machines before--particularly the 65816 Nintendo.
There are two issues you will face.
The first is the compiler itself runs on an Apple IIGS or emulator. It
would be a heavy lift to port it.
The second is the runt time libraries. Most, like floating-point math and
string functions, are platform agnostic, but IO commands definitely are
not. You would either need to rewrite the ones you use for your target
machine or not use them.
Source is included for the run time libraries, wo rewriting them is a
viable option.
—
Reply to this email directly, view it on GitHub
<#87 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BCVGEF2JLL2QPISC7HW6S43YTYFQFAVCNFSM6AAAAABDJMYL22VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBWGEYTEMBWHE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
As Mike and Jawaid mentioned, this is possible. A couple more points:
|
Isn't the makebin tool still in there somewhere? I'm relying on some pretty old memories here, but look for a utility with that name in the ORCA install. Once the program is linked, it is still an Apple IIGS object file, as mentioned, but makebin converts it to a binary image set up to run at a specific address. if you prefer to write your own loader so you can do relocatable loading like the Apple IIGS does, makebin already has most of the code. |
That `makebin` program might just be the best starting point until I can really look into the code. Thanks for that very useful tidbit!
|
I've built a couple of 65816-based systems and have used ca65 for most of the code. Even though the 6502 landscape is slim when it comes to compilers, ones with a 65816 target are slim to none.
Is it possible to use the compiler with a generic target, or a target that can be defined in config or code? Even stopping after the assembly generation step would be better then nothing.
The text was updated successfully, but these errors were encountered: