First D64 + file handling


In the past days I was working on D64 creation and the file loading routines.

I already had some resources ready for use, now it was the time to merge everything into a disk image. Previously I was testing them by including them in the main executable, but the big plan was to have everything on disk, and load only the necessary data, and only when it's needed.

For eg, the title screen. I only need it once at the beginning, I should load it directly to screenram at the start, and simply forget it. When the game starts, the screen can be deleted. 

The same applies to Krills's truboloader provided by TRSE. It can be included in the main file unnecessarily increasing its size. Or it can be stored on disk, and load it, when it's needed. Currently I'm using VICE with virtual device emulation instead of True Drive, so every loading is blazingly fast with the original KERNAL LOAD routines. Ofc in the future we will need the turbo on real hardware, but this is still so far away 😄

Also I have sprites and the charset, and their location in memory was changed a few times already. I thought it will be easier to maintain everything in separate files, and load them to the location where I wanted. 

Yes, I could include the sprites data in the main prg too, but for eg if I specify to include the sprite data at $8000, then my generated prg will be huge. Because the saved .prg file will have everything from $0800 (the basic start) to $8xxx (the end of the spritedata) including the huge amount of unused bytes between them. 

Now my main .prg contains only the code, and loads everything to the exact memory location where it's needed. With this "trick" now it's about 3.5 kbyte (~15 blocks), and loads "extremely" fast.

The first directory

My goal with this approach is to improve the initial user experience and to ease my future work.

With working loading functions I was able to put the titlescreen data directly to screenram and the "titlecolors" file to the color ram. And finally, we have something on the screen!

Because it loads directly into the "playable" area of the screen, the joystick functions and everything are working as intended. Now it's using only 0-7 pixel scrolling by rasterIRQ. (If somebody download the d64 file, that's the twithching when using the joy2 ) My next plan is to implement a real full screen scrolling.

I'll need that, beause the next-next step will be to load the world data into the play area, and walk around a bit.

Oh, but first, I have to debug what's happening with the network communication, because it hangs right after the initialization...

There is still a lot to do... 😣 But hey! Big dreams need big problems to solve 😁

Files

v8id_disk1-20251113.d64 170 kB
8 days ago

Get V8id

Leave a comment

Log in with itch.io to leave a comment.