Jump to content
  • 0
desertfish

file loading bugs when loading from sdcard image?

Question

Hi, when putting files on an Sdcard image, I discovered some problems when loading them, that do not occur when loading files in the emulator from a host directory.

Most notably, it seems that when loading a file from an sdcard image, the kernel (?) ignores the reallocation address passed to the LOAD call and always seems to load the file at $0000

I think this also manifests itself in Basic when using the VLOAD command, for instance:

working, loading a file from a host directory, ends up at $2000 or about halfway down the screen ram:

image.png.e7ed0b380f5b7eb9fbcbe5af83f8e1de.png

 

not working, doing the same with the exact same file but this time loading from an sdcard image, it loads at $0000 no matter what you do:

image.png.0bd08dcfa3e7c60be0827a32d5c39f94.png

 

Net result is that any program or game that is loading data files, doesn't work when copied onto an sd card image.... 😞       (I've tried my own image viewer demo program and three other games, all refuse to work from an sd card image but work fine when loading from a shared host folder in the emulator)

 

Is this a known issue?

Could it be  a KERNAL bug or a bug in the Emulator itself somewhere?

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Yeah, this is a bug in the kernal right now that ignores the address passed in.  I put in a pull request to fix this a while ago, but Michael Steil hasn't been active lately so it hasn't been picked up yet.  It doesn't happen when you're not using an SD card image because, in that mode, the emulator bypasses the kernal completely and loads the file into memory itself, and it properly handles the arguments being passed in.

  • Thanks 1

Share this post


Link to post
Share on other sites
  • 0

Thank you for clearing that up! I did look on github a bit for issues that might be similar but didn’t look through the pull requests...

 

Share this post


Link to post
Share on other sites
  • 0
On 12/3/2020 at 9:19 PM, Ender said:

Yeah, this is a bug in the kernal right now that ignores the address passed in.  I put in a pull request to fix this a while ago, but Michael Steil hasn't been active lately so it hasn't been picked up yet.  It doesn't happen when you're not using an SD card image because, in that mode, the emulator bypasses the kernal completely and loads the file into memory itself, and it properly handles the arguments being passed in.

He hasn't been responding to me neither ... I guess he's putting his priorities.

Share this post


Link to post
Share on other sites
  • 0
On 2/6/2021 at 7:49 PM, svenvandevelde said:

He hasn't been responding to me neither ... I guess he's putting his priorities.

Related to my other post regarding the load API, i've also been testing the .vhd virtual disks and using the -sdcard option in the x16emu.

Unfortunately, the address indeed is ignored, and the files are loaded at another place in the memory than the place that you indicate using the X and Y registers of the FFD5 API, unfortunately. It would be good to get this bug fixed. I think the only option now is to write my own loader ... using open, close API and read byte by byte.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Please review our Terms of Use