tofro wrote:Andrew wrote:
I tried several ways to compress/decompress, but all are too slow for a QL without at least a Gold Card, and I would want the game to run on QL+Trump Card or a QL+vdriveQL (compiled Superbasic)
Impressive! And, apparently, a juicy plot.
Those b&w pictures should benefit greatly from RLE compression. Simple and small. Something along the lines of
Thank you tofro!
I tried the RLE encoding/decoding but it is still too slow in compiled SBasic
On an unexpanded QL I got the following results:
Lbytes data to memory buffer <1 sec
Decode buffer and write decoded data into another memory buffer = 17-20 seconds, depending on the screen
Move_Mem from buffer to screen < 1 sec
It is far to slow for my practical purposes. I need to decode in less than 3 seconds, and do it in Sbasic (I have not used C language since 1997)
Images are 360 x 151 pixels
Code: Select all
100 WINDOW#1,512,256,0,0: PAPER#1,0: CLS#1
110 ConfigDrv$='Dos2_Picole_'
120 FileName$='street'&'_SCC': REMark the compressed file in format - BytesCount, Color
130 mem1=FLEN(\ConfigDrv$&FileName$)
140 mem=ALCHP(mem1): REMark Reserve memory for compressed image
150 all=ALCHP(13590) : REMark Reserve memory for uncompressed image 360 x 151 pixels
155 crt=all
160 LBYTES ConfigDrv$&FileName$, mem : REMark Load compressed image to buffer
170 FOR i=0 TO mem1-1 STEP 2 : REMark Decompress image and write it to uncompressed buffer
180 cnt=PEEK (mem+i)
190 cod=PEEK (mem+i+1)
200 FILLMEM_B crt, cnt, cod
210 crt=crt+cnt
220 END FOR i
230 Loadscr: : REMark Move decompressed image to screen
240 RECHP mem
250 RECHP all
360 DEFine PROCedure Loadscr
390 FOR i=0 TO 150
400 MOVE_MEM all+i*90, 131072+(13+i)*128+32, 90
410 NEXT i
420 END FOR i
440 END DEFine LoadScr