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

Support for AppleSingle input files #17

Open
ryandesign opened this issue Sep 30, 2021 · 5 comments
Open

Support for AppleSingle input files #17

ryandesign opened this issue Sep 30, 2021 · 5 comments

Comments

@ryandesign
Copy link
Contributor

cc65 now outputs AppleSingle files. These encapsulate both the executable program and its metadata such as its load address. AppleCommander can add such AppleSingle files to a disk image properly.

But to use these files with c2t, I first have to decode the file (applesingle file.as -o file) and then give the decoded file to c2t, telling it what load address to use.

Might c2t be enhanced to natively support AppleSingle input files so that manually specifying the load address would not be necessary?

@snoglobe
Copy link

snoglobe commented Feb 13, 2022

I agree, this would be amazing.
What program are you using to decode the file? I can't find it anywhere.

@datajerk
Copy link
Owner

That support is already there, unless AppleSingle headers are not the same a DOS headers:

From c2t -h:

input(s) without a .mon or .dsk extension is assumed to be a binary with a 4
byte header.  If the header is missing then you must append ,load_address to
each binary input missing a header, e.g. filename,800.  The load address
will be read as hex.

If a binary is ripped from disk it should have the 4 byte header (load address and size).

If AppleSingle has a different header then I'd need the spec and examples to consider adding support.

c2d (https://github.com/datajerk/c2d) works the same way and will create bootable disks (without DOS) for single binaries.

@ryandesign
Copy link
Contributor Author

AppleSingle is unrelated to DOS headers and information about the format should not be difficult to find. One place to start is https://en.wikipedia.org/wiki/AppleSingle_and_AppleDouble_formats.

@ryandesign
Copy link
Contributor Author

What program are you using to decode the file? I can't find it anywhere.

Are you asking about where to get the applesingle program I mentioned? It is part of the Darwin operating system that is the heart of macOS. I don't know what alternatives exist for non-Mac operating systems.

@ryandesign
Copy link
Contributor Author

@datajerk I found the AppleCommander issue filed by the developer of cc65 explaining the motivation for using AppleSingle as the interchange format:

AppleCommander/AppleCommander#20

@snoglobe I also found the AppleCommander subproject that implements AppleSingle support in a Java library and command-line utility; maybe it is of use to you:

https://github.com/AppleCommander/applesingle

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

3 participants