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

Feature Request: Loading headerless files #211

Closed
Elektron72 opened this issue May 8, 2021 · 2 comments · Fixed by #216
Closed

Feature Request: Loading headerless files #211

Elektron72 opened this issue May 8, 2021 · 2 comments · Fixed by #216

Comments

@Elektron72
Copy link
Contributor

Elektron72 commented May 8, 2021

The kernal LOAD routine expects files to contain a two-byte header specifying the address at which they should be loaded. Although the LOAD routine can be instructed to load at an arbitrary address, it is impossible to load the first two bytes of a file as data using only this routine. This makes it difficult to handle file formats that do not include this header.

@ZeroByteOrg
Copy link
Contributor

I concur. If you want to make a program that opens standard files such as .ZIP files, .VGM files, .WAV files, .BMP files, etc - then you're just SOL unless you roll your own loader from scratch.

@irmen
Copy link
Contributor

irmen commented Dec 3, 2021

You could do this already with some nasty code that goes like this

OPEN file
CHRIN 2 bytes, store them at given load address
CLOSE file
LOAD file at address+2
return load size + 2

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

Successfully merging a pull request may close this issue.

3 participants