
Specifically I can use it to extract out slices of my file and put the contents directly into banks. This is a swiss army knife for hacking bytes up to suit our needs. Thankfully early distributions of the spectrum next OS ships with a dot command called. The trick, is to then extract the assets back out. This is perfectly valid and my game.bas will load without issue.
SNX FILE CONVERTER FOR MAC FREE
So, as per the TL DR, because the exact file length of our program is in the header, I'm free to add in some stow away files to my file by concatenating my files together.įor example: txt2bas -i game.txt -o game.bas

What I can say is that padding this out and making sure I don't rely on some previously saved state for my games ensures that this isn't a factor. Strictly speaking this isn't quite true, I believe there's some amount of the BASIC right at the end that's used for variable state (when you `SAVE "filespec" it captures some of the variables, but I'm not entirely clear how much). What I figured was that since the length of the data was in the header, it was super likely that the Spectrum was reading this value, then slurping that length (and nothing more) into memory. Inside the PLUS3DOS header is two length properties: one for the total length, and one for the total length of the body (so length - 128). This file format is what's used to load NextBASIC files. This format is really just a header of 128 bytes and the file's contents. I've been poking around bytes for a good few years now, learning how headers work for different file types and through this I a little about the PLUS3DOS format. You will need a build command (later in this post), but that's essentially the trick. I would use this statement, instead of LOAD "sprites.spr" BANK 16. extract game.bas +83454 16384 -mb 16 - which reads as: extract 16,384 bytes (16K) at the offset 83,454 and load it directly into bank 16. extract to pull the asset out from mygame.bas into the appropriate bank, using syntax like. TL DRĬoncatenate your assets to the end of your NextBASIC file then use. There's one small downside (though not a blocker) that is: the user/player must select the right loader when a TAP file is about to load, and we as the authors (might) need to tell the user which option to select (it's "N" or enter). * Nearly - I've investigated myself and indeed have seen that Flappy Bird for the Next can be bundled into a self extracting TAP file. I've published 38 videos for new developers, designers, UX, UI, product owners and anyone who needs to conquer the command line today.
