dmsc/fastbasic

Question on virtual disk access

Closed this issue · 9 comments

When compiling an XEX file, is it possible to attach a 'virtual' ATR image so I only have to distribute a single .XEX? I want to be able to save and load in this same space as well. This will keep it simple for any users from having to create a blank disk and attaching to the emulator on their own.

dmsc commented

Hi!

I don't completely understand your question.

Are you using the PC compiler?

Do you want to generate an ATR image with the Atari executable inside?

Have Fun!

Yes I'm using the PC compiler and created a large map using fastbasic. Want to be able to load/save or just integrate it directly into program. Able to generate and use the ATR image without having to manually create one would be ideal, but i would settle for even a bunch of DATA statements I can use for the program/game.

dmsc commented

Hi!

To integrate data directly to the program, you can use the DATA FILE statement:

  DATA mydata() BYTEFILE "my-local-file.bin"

This will read the binary file "my-local-file.bin" into your program, as the mydata() byte array. You can also use "WORDFILE" for reading as a word array.

Note that this does not work in the Atari compiler, only using the PC compiler.

Is this what you need?

Have Fun!

dmsc commented

Hi!

You can run the XEX directly in the emulator, you don't need an ATR.

Or I still don't really understand your use case :(

Have Fun!

dmsc commented

Hi!

I understand now, you want to test the game preserving the data in the disk image.

What I normally do is to activate the "H:" device in the emulator, and load/save the data from the H: device during development.

This way, I can load the emulator with my XEX and have it access all the data files in the H: device instantly, without the need for an ATR file. This also has the advantage that I can directly copy (and backup) the data files.

If you are using Altirra, you can load the emulator with Altirra /hdpathrw my_folder my_file.xex

Have Fun!

dmsc commented

Closing as seems resolved.