Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ZX0 decompression examples

I have been looking into the ZX0 library

Having created a compress file by running this "zx0 testscreen.scr"
And to us this file this is a test file I created t.bas

#include "zx0.bas"

10 dzx0Standard(@testscreen1, 16384)
20 GOTO 20

        incbin "testscreen.scr.zx0"
    end asm

When compiled and run it indeed does display the image on screen.
Some questions:-

Q1.I have been able to convert some artwork (PNG) to .SCR and compress this and then load it on screen BUT (newbie alert) I am running out of memory/program crashes/resets Emulator.
So the question is, can I do this and if so HOW?
(A) load from a M: drive (emulator allowing) and/or
(B) use the 128K Mode and then use the memory banks for images and leave the '48K' for the main game?

Q2. How can I display the SCR file but only print it to the top half of the screen?
1/3 or 2/3rds is okay as well? Is there any code examples (ASM/ZXB)

Q3. Next to the text,
I want to next compress text files that contain a description of a game room.
Looking at an example I tried this (don't laugh!) :-

dzx0Standard(@Text1, 50000)

incbin "location1.txt.zx00"
end asm
incbin "location2.txt.zx00"
end asm

But this does nothing but load it to the address of 50000 but I want the routine to return a STRING containing the decompressed text?

Quote:UPDATE 4th April 2021: I have worked how to do Q3 in a standalone test.bas file but when I do this in my main program it crashes the app soon after starting it up?
I am using these params --tzx --BASIC --autorun  --heap=1000 --optimize 2  --org=25000--debug-memory  --debug-array 

Lots of questions but hopefully some kind person can help? :-)

Messages In This Thread
ZX0 decompression examples - by RandomiserUsr - 03-31-2021, 08:29 AM
RE: ZX0 decompression examples - by RandomiserUsr - 04-10-2021, 02:44 PM
RE: ZX0 decompression examples - by emook - 05-17-2021, 07:25 AM
RE: ZX0 decompression examples - by RandomiserUsr - 05-19-2021, 11:30 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)