To keep the motivation up, I started putting together a vertical skyscraper level. It won't feature any flying vans.
Making screen layouts in code
Re: Making screen layouts in code
I'd expect setting CRT_ORG_DATA to -1 to produce the separate DATA bin file. Odd that it didn't.clebin wrote: ↑Fri Apr 22, 2022 2:58 pm I did had real "doh!" moment earlier. I said I can't get my program to work when I move the DATA section around, no matter what I tried. Even CRT_ORG_DATA=-1 wouldn't work, which I read is supposed to stick it at the end of the code section but in a different bin file.
At that point I checked my file-sizes and realised that "-create-app" doesn't actually stick together the generated *_CODE.bin and *_DATA.bin files in the TAP file. Argh, no wonder it crashes every time!! So now I have to figure out z88dk-appmake to combine them. Slowly, I feel like the mist is clearing...
In my experience the -create-app option is overrated. It only seems capable of doing really basic stuff, and doesn't complain when something harder is put in front of it. It normally gets those wrong, as you've found out. I use individual compile-to-object, link, and app-make commands in any less-than-trivial projects.
Derek Fountain, author of the ZX Spectrum C Programmer's Getting Started Guide and various open source games, hardware and other projects, including an IF1 and ZX Microdrive emulator.
Re: Making screen layouts in code
I've moved my 'Spectrum Tiled Tool' from Bitbucket to Github:
https://github.com/clebin/spectiledtool
I also added the simple RLE compression that @dfzx suggested (cheers again) as an extra option:
This is only for the tilemap/screen data. If you use --format=asm, it adds a 16-bit number at the beginning to denote the size of the data.
I'm saving 40-60% depending on the screen with no noticeable extra delay in switching screens, so that'll give me enough space to be getting along with for now.
https://github.com/clebin/spectiledtool
I also added the simple RLE compression that @dfzx suggested (cheers again) as an extra option:
Code: Select all
php SpecTiledTool.php --tileset=tileset.tsj --map=map.tmj --graphics=tiles.gif --compression=rle --format=c
I'm saving 40-60% depending on the screen with no noticeable extra delay in switching screens, so that'll give me enough space to be getting along with for now.
Re: Making screen layouts in code
Has this restored stability?
Derek Fountain, author of the ZX Spectrum C Programmer's Getting Started Guide and various open source games, hardware and other projects, including an IF1 and ZX Microdrive emulator.
Re: Making screen layouts in code
Yes it's running stable now thanks. I'm not relocating the DATA section anywhere at the moment as I haven't figured out z88dk-appmake yet, but speed is fine so far with the code in contended memory.
Re: Making screen layouts in code
Another little screenshot:
It might be obvious now which game I'm remaking... although it's not exactly a well-loved title!
I was on the verge of releasing it, but decided to bit the bullet and revise those screen layouts again. By saving each building, tree, phone-box, etc as an individual tilemap and combining them to build the screen I should be able to save 2-3k total. That's huge in the context of this game as I'd had to strip everything right back to fit into RAM, including the wasp pictured in this shot.
It might be obvious now which game I'm remaking... although it's not exactly a well-loved title!
I was on the verge of releasing it, but decided to bit the bullet and revise those screen layouts again. By saving each building, tree, phone-box, etc as an individual tilemap and combining them to build the screen I should be able to save 2-3k total. That's huge in the context of this game as I'd had to strip everything right back to fit into RAM, including the wasp pictured in this shot.