Jump to content
Sign in to follow this  

Abusing the Emulator for Fun and Profit

Recommended Posts

Just this afternoon, I realized that when I pass “-bas my-file” to the emulator, it is TYPED IN, so to speak.

If I didn’t care about compatibility with the X16, then I could front-load my program with a pile of initializations in “immediate mode” without incurring the penalty of storing lines of BASIC DATA statements.

Useless in the light of wanting to support the X16 as a physical chunk of hardware, so mostly an amusing observation.  Unless I use that in the place of loading data files into the RAM banks perhaps... but I don’t see the benefit there, so.

  • Like 2

Share this post

Link to post
Share on other sites

Good observation. This could be used to do script-generated configuration, though only with the emulator. But, that may be useful in determining a fixed configuration to use for production.

Another good use case I can see is programmatically initializing VRAM and/or banked RAM, then NEW-ing it out to load in the program code, which could be in BASIC or machine language. This would really only be useful when the initialization has a randomized element to it, otherwise you could just load pre-initialized binaries. This use case would extend to production, where the initialization program blows itself away with the actual application code once it's done. Developing this construct would be very easy by just loading ASCII BASIC files from the host until the init/launch code is finalized. Cuts down on a lot of the process.

  • Like 1

Share this post

Link to post
Share on other sites

I just realized that this is more powerful and useful than I thought:


One of the games I'm writing uses data ... this data is already established, so its nature and content are understood.  All I have to do is get it on the SD card in a way that the X16 likes.

I expect to have around 125 subdirectories, each with 16 files give or take.  Each file is smaller than 8K in size.



"Immediate" mode can be used to create one subdirectory and its 16 files in one shot.

Or maybe more... since this is immediate mode, I can make it a "stream" of small programs, each of which creates a file.

Or, even better, one program that creates a file, and immediate data that loads in the data to write AND run that program, then load in another set of data, run the program, and repeat 2000 times.


Edited by rje

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.

Reply to this topic...

×   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.

Sign in to follow this  

  • Create New...

Important Information

Please review our Terms of Use