Jump to content
  • 0

Loading Programs from SD Card Image


EasyModeGamer
 Share

Question

Is there a way to properly load programs with associated BIN files from the SD card image? If you were using the host filesystem, you can call the emulator from the folder with the program, but you can't do that with the SD card image. Besides, I don't want to have to have the program preloaded when I start the emulator with no way to run any other programs without using a different batch file to start the emulator.

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Hmm ... I don't know which programs you are referring to. There are two different types of loading files. One, where the target address from the .BIN file (the first two bytes) is used, and another one where the program itself decides (at runtime) where the program is loaded in memory. The latter is known to be broken in the latest official emulator (R38) when trying to load from an SD card, unfortunately. It could be the case that your programs are trying to load files that way and therefore do not succeed.
 

That red spot in the top right typically indicates disk activity. From what is known about that emulator bug I could imagine that your programs are suffering from it. The file is loaded at address 0, and depending on how large it is, the program that is running gets overridden, causing the X16 to crash. If that's the case, I'm afraid that at the moment, you cannot use those programs from the SD card.

 

Edited by kliepatsch
Link to comment
Share on other sites

  • 0

I'm not sure what your question is.  Do you mean is there a way to load an SD card image after you've started the emulator?  There isn't currently a way, no.  That's just a limitation of the emulator.  If you want to load a different SD card image, you have to restart the emulator with a different command line.

Link to comment
Share on other sites

  • 0

To be able to load programs from the SD card, you have to start the emulator from the command line like this:

x16emu -sdcard sdcard.img

That way, all files on the image are visible to the emulator. They can then be loaded like

LOAD"MYPROG.PRG"

.BIN files could be loaded the same way, as long as they are loaded to the address that is stored in the files themselves (the first two bytes in .BIN files often determine the address where the file is loaded).

But I think most programs will take care of loading the necessary .BIN files themselves.

Link to comment
Share on other sites

  • 0
1 hour ago, kliepatsch said:

To be able to load programs from the SD card, you have to start the emulator from the command line like this:

x16emu -sdcard sdcard.img

That way, all files on the image are visible to the emulator. They can then be loaded like

LOAD"MYPROG.PRG"

.BIN files could be loaded the same way, as long as they are loaded to the address that is stored in the files themselves (the first two bytes in .BIN files often determine the address where the file is loaded).

But I think most programs will take care of loading the necessary .BIN files themselves.

I have no problem loading the SD card image and I can load any program that doesn't require a .bin file. However, when I try to load a program that DOES require a .bin file, I just get a black screen. Currently, I have all of those programs in different subdirectories of the SD card image, but it still didn't work when I put them in the main directory.

EDIT: It actually doesn't go directly to a black screen when I try to load Brixx. For a split second a mouse cursor appears, then the screen goes mostly black with a red cursor in the top right which disappears after a second. Also, I can get garbage on the screen in flappy bird by mashing keys. Invaderz is the only game out of the three that doesn't get the red cursor.

Edited by EasyModeGamer
Link to comment
Share on other sites

  • 0
7 minutes ago, kliepatsch said:

Hmm ... I don't know which programs you are referring to. There are two different types of loading files. One, where the target address from the .BIN file (the first two bytes) is used, and another one where the program itself decides (at runtime) where the program is loaded in memory. The latter is known to be broken in the latest official emulator (R38) when trying to load from an SD card, unfortunately. It could be the case that your programs are trying to load files that way and therefore do not succeed.
 

That red spot in the top right typically indicates disk activity. From what is known about that emulator bug I could imagine that your programs are suffering from it. The file is loaded at address 0, and depending on how large it is, the program that is running gets overridden, causing the X16 to crash. If that's the case, I'm afraid that at the moment, you cannot use those programs from the SD card.

 

The difference is, the garbage on flappy bird seems to indicate the program is running, it just lacks the .bin files it needs to work properly. Could this be caused by the bug you're describing? I'm pretty new to this kind of stuff.

EDIT: Nevermind, I just realized that even if the program isn't overwritten, it still won't know where to find the bin files. Sorry!

Edited by EasyModeGamer
Link to comment
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.

 Share

×
×
  • Create New...

Important Information

Please review our Terms of Use