|
Post by turboxray on Nov 6, 2021 15:43:51 GMT
So, which of these compression schemes are "sliding" window and which are fixed dictionary based? I.e. Which are these are hucard format friendly? And the ones that are, what's the ram/buffer foot print?
|
|
|
Post by elmer on Nov 6, 2021 17:30:46 GMT
So, which of these compression schemes are "sliding" window and which are fixed dictionary based? I.e. Which are these are hucard format friendly? And the ones that are, what's the ram/buffer foot print? They're all sliding-window based, but Einar Saukas's ZX0 compressor and Emmanuel Marty's Salvador compressor both allow you to specify the window size, and to pre-load the window with a "dictionary" file ... so they're both suitable for decompressing directly from a HuCard to VRAM, if you use a window buffer (say 4KB) in the PCE's RAM. I haven't personally written a ZX0 decompressor that does that, because it'll be horribly slow, just like Hudson's LZSS decompressor was in Seiya Monogatari, but it would be possible to do ... in which case, the ram/buffer footprint would be whatever you wanted to set the window size to, just like LZSS. If anyone does think of pre-loading the window, I hope that they come up with a better "dictionary" than Hudon did, because my limited testing showed that their dictionary was almost never used when decompressing real-world game data, and it just wasted both CPU time and ROM space in copying it to the window.
|
|
|
Post by turboxray on Nov 6, 2021 19:02:21 GMT
I was looking for something that allowed a 512byte ringer buffer to decompress to vram on hucards. PuCrunch allows this and gets really good results for that small of a window, but I'd like to see how some other compressions schemes compare.
|
|
|
Post by turboxray on Nov 6, 2021 19:04:37 GMT
So, which of these compression schemes are "sliding" window and which are fixed dictionary based? I.e. Which are these are hucard format friendly? And the ones that are, what's the ram/buffer foot print? If anyone does think of pre-loading the window, I hope that they come up with a better "dictionary" than Hudon did, because my limited testing showed that their dictionary was almost never used when decompressing real-world game data, and it just wasted both CPU time and ROM space in copying it to the window. Gate of Thunder used it, and it seemed to work out fair enough. I think it was realtime generated, but a fixed pattern, before the LZSS decomp was called. So it didn't take much any space other than the code to generate it.
|
|
|
Post by elmer on Nov 7, 2021 17:06:05 GMT
I was looking for something that allowed a 512byte ringer buffer to decompress to vram on hucards. PuCrunch allows this and gets really good results for that small of a window, but I'd like to see how some other compressions schemes compare. FYI, I've added PuCrunch to the examples on the previous page. I have no idea of how well ZX0/Salvador is going to do with a window size as small as you're using, but it will be interesting to hear. Gate of Thunder used it, and it seemed to work out fair enough. I think it was realtime generated, but a fixed pattern, before the LZSS decomp was called. So it didn't take much any space other than the code to generate it. I don't know where the decompression code is in Gate of Thunder, but here's the table from Anearth, and "yes", its also realtime generated, which takes a bunch of CPU cycles, and 63 bytes of code. That isn't a lot of code if there's a concrete benefit, but I certainly didn't see one in the Anearth data that I decompressed ... perhaps I just didn't decompress the right files. $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $01 $01 $01 $01 $01 $01 $01 $01 $01 $01 $01 $01 $01 $02 $02 $02 $02 $02 $02 $02 $02 $02 $02 $02 $02 $02 $03 $03 $03 $03 $03 $03 $03 $03 $03 $03 $03 $03 $03 $04 $04 $04 $04 $04 $04 $04 $04 $04 $04 $04 $04 $04 $05 $05 $05 $05 $05 $05 $05 $05 $05 $05 $05 $05 $05 $06 $06 $06 $06 $06 $06 $06 $06 $06 $06 $06 $06 $06 $07 $07 $07 $07 $07 $07 $07 $07 $07 $07 $07 $07 $07 $08 $08 $08 $08 $08 $08 $08 $08 $08 $08 $08 $08 $08 $09 $09 $09 $09 $09 $09 $09 $09 $09 $09 $09 $09 $09 $0A $0A $0A $0A $0A $0A $0A $0A $0A $0A $0A $0A $0A $0B $0B $0B $0B $0B $0B $0B $0B $0B $0B $0B $0B $0B $0C $0C $0C $0C $0C $0C $0C $0C $0C $0C $0C $0C $0C $0D $0D $0D $0D $0D $0D $0D $0D $0D $0D $0D $0D $0D $0E $0E $0E $0E $0E $0E $0E $0E $0E $0E $0E $0E $0E $0F $0F $0F $0F $0F $0F $0F $0F $0F $0F $0F $0F $0F $10 $10 $10 $10 $10 $10 $10 $10 $10 $10 $10 $10 $10 $11 $11 $11 $11 $11 $11 $11 $11 $11 $11 $11 $11 $11 $12 $12 $12 $12 $12 $12 $12 $12 $12 $12 $12 $12 $12 $13 $13 $13 $13 $13 $13 $13 $13 $13 $13 $13 $13 $13 $14 $14 $14 $14 $14 $14 $14 $14 $14 $14 $14 $14 $14 $15 $15 $15 $15 $15 $15 $15 $15 $15 $15 $15 $15 $15 $16 $16 $16 $16 $16 $16 $16 $16 $16 $16 $16 $16 $16 $17 $17 $17 $17 $17 $17 $17 $17 $17 $17 $17 $17 $17 $18 $18 $18 $18 $18 $18 $18 $18 $18 $18 $18 $18 $18 $19 $19 $19 $19 $19 $19 $19 $19 $19 $19 $19 $19 $19 $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1A $1B $1B $1B $1B $1B $1B $1B $1B $1B $1B $1B $1B $1B $1C $1C $1C $1C $1C $1C $1C $1C $1C $1C $1C $1C $1C $1D $1D $1D $1D $1D $1D $1D $1D $1D $1D $1D $1D $1D $1E $1E $1E $1E $1E $1E $1E $1E $1E $1E $1E $1E $1E $1F $1F $1F $1F $1F $1F $1F $1F $1F $1F $1F $1F $1F $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $21 $21 $21 $21 $21 $21 $21 $21 $21 $21 $21 $21 $21 $22 $22 $22 $22 $22 $22 $22 $22 $22 $22 $22 $22 $22 $23 $23 $23 $23 $23 $23 $23 $23 $23 $23 $23 $23 $23 $24 $24 $24 $24 $24 $24 $24 $24 $24 $24 $24 $24 $24 $25 $25 $25 $25 $25 $25 $25 $25 $25 $25 $25 $25 $25 $26 $26 $26 $26 $26 $26 $26 $26 $26 $26 $26 $26 $26 $27 $27 $27 $27 $27 $27 $27 $27 $27 $27 $27 $27 $27 $28 $28 $28 $28 $28 $28 $28 $28 $28 $28 $28 $28 $28 $29 $29 $29 $29 $29 $29 $29 $29 $29 $29 $29 $29 $29 $2A $2A $2A $2A $2A $2A $2A $2A $2A $2A $2A $2A $2A $2B $2B $2B $2B $2B $2B $2B $2B $2B $2B $2B $2B $2B $2C $2C $2C $2C $2C $2C $2C $2C $2C $2C $2C $2C $2C $2D $2D $2D $2D $2D $2D $2D $2D $2D $2D $2D $2D $2D $2E $2E $2E $2E $2E $2E $2E $2E $2E $2E $2E $2E $2E $2F $2F $2F $2F $2F $2F $2F $2F $2F $2F $2F $2F $2F $30 $30 $30 $30 $30 $30 $30 $30 $30 $30 $30 $30 $30 $31 $31 $31 $31 $31 $31 $31 $31 $31 $31 $31 $31 $31 $32 $32 $32 $32 $32 $32 $32 $32 $32 $32 $32 $32 $32 $33 $33 $33 $33 $33 $33 $33 $33 $33 $33 $33 $33 $33 $34 $34 $34 $34 $34 $34 $34 $34 $34 $34 $34 $34 $34 $35 $35 $35 $35 $35 $35 $35 $35 $35 $35 $35 $35 $35 $36 $36 $36 $36 $36 $36 $36 $36 $36 $36 $36 $36 $36 $37 $37 $37 $37 $37 $37 $37 $37 $37 $37 $37 $37 $37 $38 $38 $38 $38 $38 $38 $38 $38 $38 $38 $38 $38 $38 $39 $39 $39 $39 $39 $39 $39 $39 $39 $39 $39 $39 $39 $3A $3A $3A $3A $3A $3A $3A $3A $3A $3A $3A $3A $3A $3B $3B $3B $3B $3B $3B $3B $3B $3B $3B $3B $3B $3B $3C $3C $3C $3C $3C $3C $3C $3C $3C $3C $3C $3C $3C $3D $3D $3D $3D $3D $3D $3D $3D $3D $3D $3D $3D $3D $3E $3E $3E $3E $3E $3E $3E $3E $3E $3E $3E $3E $3E $3F $3F $3F $3F $3F $3F $3F $3F $3F $3F $3F $3F $3F $40 $40 $40 $40 $40 $40 $40 $40 $40 $40 $40 $40 $40 $41 $41 $41 $41 $41 $41 $41 $41 $41 $41 $41 $41 $41 $42 $42 $42 $42 $42 $42 $42 $42 $42 $42 $42 $42 $42 $43 $43 $43 $43 $43 $43 $43 $43 $43 $43 $43 $43 $43 $44 $44 $44 $44 $44 $44 $44 $44 $44 $44 $44 $44 $44 $45 $45 $45 $45 $45 $45 $45 $45 $45 $45 $45 $45 $45 $46 $46 $46 $46 $46 $46 $46 $46 $46 $46 $46 $46 $46 $47 $47 $47 $47 $47 $47 $47 $47 $47 $47 $47 $47 $47 $48 $48 $48 $48 $48 $48 $48 $48 $48 $48 $48 $48 $48 $49 $49 $49 $49 $49 $49 $49 $49 $49 $49 $49 $49 $49 $4A $4A $4A $4A $4A $4A $4A $4A $4A $4A $4A $4A $4A $4B $4B $4B $4B $4B $4B $4B $4B $4B $4B $4B $4B $4B $4C $4C $4C $4C $4C $4C $4C $4C $4C $4C $4C $4C $4C $4D $4D $4D $4D $4D $4D $4D $4D $4D $4D $4D $4D $4D $4E $4E $4E $4E $4E $4E $4E $4E $4E $4E $4E $4E $4E $4F $4F $4F $4F $4F $4F $4F $4F $4F $4F $4F $4F $4F $50 $50 $50 $50 $50 $50 $50 $50 $50 $50 $50 $50 $50 $51 $51 $51 $51 $51 $51 $51 $51 $51 $51 $51 $51 $51 $52 $52 $52 $52 $52 $52 $52 $52 $52 $52 $52 $52 $52 $53 $53 $53 $53 $53 $53 $53 $53 $53 $53 $53 $53 $53 $54 $54 $54 $54 $54 $54 $54 $54 $54 $54 $54 $54 $54 $55 $55 $55 $55 $55 $55 $55 $55 $55 $55 $55 $55 $55 $56 $56 $56 $56 $56 $56 $56 $56 $56 $56 $56 $56 $56 $57 $57 $57 $57 $57 $57 $57 $57 $57 $57 $57 $57 $57 $58 $58 $58 $58 $58 $58 $58 $58 $58 $58 $58 $58 $58 $59 $59 $59 $59 $59 $59 $59 $59 $59 $59 $59 $59 $59 $5A $5A $5A $5A $5A $5A $5A $5A $5A $5A $5A $5A $5A $5B $5B $5B $5B $5B $5B $5B $5B $5B $5B $5B $5B $5B $5C $5C $5C $5C $5C $5C $5C $5C $5C $5C $5C $5C $5C $5D $5D $5D $5D $5D $5D $5D $5D $5D $5D $5D $5D $5D $5E $5E $5E $5E $5E $5E $5E $5E $5E $5E $5E $5E $5E $5F $5F $5F $5F $5F $5F $5F $5F $5F $5F $5F $5F $5F $60 $60 $60 $60 $60 $60 $60 $60 $60 $60 $60 $60 $60 $61 $61 $61 $61 $61 $61 $61 $61 $61 $61 $61 $61 $61 $62 $62 $62 $62 $62 $62 $62 $62 $62 $62 $62 $62 $62 $63 $63 $63 $63 $63 $63 $63 $63 $63 $63 $63 $63 $63 $64 $64 $64 $64 $64 $64 $64 $64 $64 $64 $64 $64 $64 $65 $65 $65 $65 $65 $65 $65 $65 $65 $65 $65 $65 $65 $66 $66 $66 $66 $66 $66 $66 $66 $66 $66 $66 $66 $66 $67 $67 $67 $67 $67 $67 $67 $67 $67 $67 $67 $67 $67 $68 $68 $68 $68 $68 $68 $68 $68 $68 $68 $68 $68 $68 $69 $69 $69 $69 $69 $69 $69 $69 $69 $69 $69 $69 $69 $6A $6A $6A $6A $6A $6A $6A $6A $6A $6A $6A $6A $6A $6B $6B $6B $6B $6B $6B $6B $6B $6B $6B $6B $6B $6B $6C $6C $6C $6C $6C $6C $6C $6C $6C $6C $6C $6C $6C $6D $6D $6D $6D $6D $6D $6D $6D $6D $6D $6D $6D $6D $6E $6E $6E $6E $6E $6E $6E $6E $6E $6E $6E $6E $6E $6F $6F $6F $6F $6F $6F $6F $6F $6F $6F $6F $6F $6F $70 $70 $70 $70 $70 $70 $70 $70 $70 $70 $70 $70 $70 $71 $71 $71 $71 $71 $71 $71 $71 $71 $71 $71 $71 $71 $72 $72 $72 $72 $72 $72 $72 $72 $72 $72 $72 $72 $72 $73 $73 $73 $73 $73 $73 $73 $73 $73 $73 $73 $73 $73 $74 $74 $74 $74 $74 $74 $74 $74 $74 $74 $74 $74 $74 $75 $75 $75 $75 $75 $75 $75 $75 $75 $75 $75 $75 $75 $76 $76 $76 $76 $76 $76 $76 $76 $76 $76 $76 $76 $76 $77 $77 $77 $77 $77 $77 $77 $77 $77 $77 $77 $77 $77 $78 $78 $78 $78 $78 $78 $78 $78 $78 $78 $78 $78 $78 $79 $79 $79 $79 $79 $79 $79 $79 $79 $79 $79 $79 $79 $7A $7A $7A $7A $7A $7A $7A $7A $7A $7A $7A $7A $7A $7B $7B $7B $7B $7B $7B $7B $7B $7B $7B $7B $7B $7B $7C $7C $7C $7C $7C $7C $7C $7C $7C $7C $7C $7C $7C $7D $7D $7D $7D $7D $7D $7D $7D $7D $7D $7D $7D $7D $7E $7E $7E $7E $7E $7E $7E $7E $7E $7E $7E $7E $7E $7F $7F $7F $7F $7F $7F $7F $7F $7F $7F $7F $7F $7F $80 $80 $80 $80 $80 $80 $80 $80 $80 $80 $80 $80 $80 $81 $81 $81 $81 $81 $81 $81 $81 $81 $81 $81 $81 $81 $82 $82 $82 $82 $82 $82 $82 $82 $82 $82 $82 $82 $82 $83 $83 $83 $83 $83 $83 $83 $83 $83 $83 $83 $83 $83 $84 $84 $84 $84 $84 $84 $84 $84 $84 $84 $84 $84 $84 $85 $85 $85 $85 $85 $85 $85 $85 $85 $85 $85 $85 $85 $86 $86 $86 $86 $86 $86 $86 $86 $86 $86 $86 $86 $86 $87 $87 $87 $87 $87 $87 $87 $87 $87 $87 $87 $87 $87 $88 $88 $88 $88 $88 $88 $88 $88 $88 $88 $88 $88 $88 $89 $89 $89 $89 $89 $89 $89 $89 $89 $89 $89 $89 $89 $8A $8A $8A $8A $8A $8A $8A $8A $8A $8A $8A $8A $8A $8B $8B $8B $8B $8B $8B $8B $8B $8B $8B $8B $8B $8B $8C $8C $8C $8C $8C $8C $8C $8C $8C $8C $8C $8C $8C $8D $8D $8D $8D $8D $8D $8D $8D $8D $8D $8D $8D $8D $8E $8E $8E $8E $8E $8E $8E $8E $8E $8E $8E $8E $8E $8F $8F $8F $8F $8F $8F $8F $8F $8F $8F $8F $8F $8F $90 $90 $90 $90 $90 $90 $90 $90 $90 $90 $90 $90 $90 $91 $91 $91 $91 $91 $91 $91 $91 $91 $91 $91 $91 $91 $92 $92 $92 $92 $92 $92 $92 $92 $92 $92 $92 $92 $92 $93 $93 $93 $93 $93 $93 $93 $93 $93 $93 $93 $93 $93 $94 $94 $94 $94 $94 $94 $94 $94 $94 $94 $94 $94 $94 $95 $95 $95 $95 $95 $95 $95 $95 $95 $95 $95 $95 $95 $96 $96 $96 $96 $96 $96 $96 $96 $96 $96 $96 $96 $96 $97 $97 $97 $97 $97 $97 $97 $97 $97 $97 $97 $97 $97 $98 $98 $98 $98 $98 $98 $98 $98 $98 $98 $98 $98 $98 $99 $99 $99 $99 $99 $99 $99 $99 $99 $99 $99 $99 $99 $9A $9A $9A $9A $9A $9A $9A $9A $9A $9A $9A $9A $9A $9B $9B $9B $9B $9B $9B $9B $9B $9B $9B $9B $9B $9B $9C $9C $9C $9C $9C $9C $9C $9C $9C $9C $9C $9C $9C $9D $9D $9D $9D $9D $9D $9D $9D $9D $9D $9D $9D $9D $9E $9E $9E $9E $9E $9E $9E $9E $9E $9E $9E $9E $9E $9F $9F $9F $9F $9F $9F $9F $9F $9F $9F $9F $9F $9F $A0 $A0 $A0 $A0 $A0 $A0 $A0 $A0 $A0 $A0 $A0 $A0 $A0 $A1 $A1 $A1 $A1 $A1 $A1 $A1 $A1 $A1 $A1 $A1 $A1 $A1 $A2 $A2 $A2 $A2 $A2 $A2 $A2 $A2 $A2 $A2 $A2 $A2 $A2 $A3 $A3 $A3 $A3 $A3 $A3 $A3 $A3 $A3 $A3 $A3 $A3 $A3 $A4 $A4 $A4 $A4 $A4 $A4 $A4 $A4 $A4 $A4 $A4 $A4 $A4 $A5 $A5 $A5 $A5 $A5 $A5 $A5 $A5 $A5 $A5 $A5 $A5 $A5 $A6 $A6 $A6 $A6 $A6 $A6 $A6 $A6 $A6 $A6 $A6 $A6 $A6 $A7 $A7 $A7 $A7 $A7 $A7 $A7 $A7 $A7 $A7 $A7 $A7 $A7 $A8 $A8 $A8 $A8 $A8 $A8 $A8 $A8 $A8 $A8 $A8 $A8 $A8 $A9 $A9 $A9 $A9 $A9 $A9 $A9 $A9 $A9 $A9 $A9 $A9 $A9 $AA $AA $AA $AA $AA $AA $AA $AA $AA $AA $AA $AA $AA $AB $AB $AB $AB $AB $AB $AB $AB $AB $AB $AB $AB $AB $AC $AC $AC $AC $AC $AC $AC $AC $AC $AC $AC $AC $AC $AD $AD $AD $AD $AD $AD $AD $AD $AD $AD $AD $AD $AD $AE $AE $AE $AE $AE $AE $AE $AE $AE $AE $AE $AE $AE $AF $AF $AF $AF $AF $AF $AF $AF $AF $AF $AF $AF $AF $B0 $B0 $B0 $B0 $B0 $B0 $B0 $B0 $B0 $B0 $B0 $B0 $B0 $B1 $B1 $B1 $B1 $B1 $B1 $B1 $B1 $B1 $B1 $B1 $B1 $B1 $B2 $B2 $B2 $B2 $B2 $B2 $B2 $B2 $B2 $B2 $B2 $B2 $B2 $B3 $B3 $B3 $B3 $B3 $B3 $B3 $B3 $B3 $B3 $B3 $B3 $B3 $B4 $B4 $B4 $B4 $B4 $B4 $B4 $B4 $B4 $B4 $B4 $B4 $B4 $B5 $B5 $B5 $B5 $B5 $B5 $B5 $B5 $B5 $B5 $B5 $B5 $B5 $B6 $B6 $B6 $B6 $B6 $B6 $B6 $B6 $B6 $B6 $B6 $B6 $B6 $B7 $B7 $B7 $B7 $B7 $B7 $B7 $B7 $B7 $B7 $B7 $B7 $B7 $B8 $B8 $B8 $B8 $B8 $B8 $B8 $B8 $B8 $B8 $B8 $B8 $B8 $B9 $B9 $B9 $B9 $B9 $B9 $B9 $B9 $B9 $B9 $B9 $B9 $B9 $BA $BA $BA $BA $BA $BA $BA $BA $BA $BA $BA $BA $BA $BB $BB $BB $BB $BB $BB $BB $BB $BB $BB $BB $BB $BB $BC $BC $BC $BC $BC $BC $BC $BC $BC $BC $BC $BC $BC $BD $BD $BD $BD $BD $BD $BD $BD $BD $BD $BD $BD $BD $BE $BE $BE $BE $BE $BE $BE $BE $BE $BE $BE $BE $BE $BF $BF $BF $BF $BF $BF $BF $BF $BF $BF $BF $BF $BF $C0 $C0 $C0 $C0 $C0 $C0 $C0 $C0 $C0 $C0 $C0 $C0 $C0 $C1 $C1 $C1 $C1 $C1 $C1 $C1 $C1 $C1 $C1 $C1 $C1 $C1 $C2 $C2 $C2 $C2 $C2 $C2 $C2 $C2 $C2 $C2 $C2 $C2 $C2 $C3 $C3 $C3 $C3 $C3 $C3 $C3 $C3 $C3 $C3 $C3 $C3 $C3 $C4 $C4 $C4 $C4 $C4 $C4 $C4 $C4 $C4 $C4 $C4 $C4 $C4 $C5 $C5 $C5 $C5 $C5 $C5 $C5 $C5 $C5 $C5 $C5 $C5 $C5 $C6 $C6 $C6 $C6 $C6 $C6 $C6 $C6 $C6 $C6 $C6 $C6 $C6 $C7 $C7 $C7 $C7 $C7 $C7 $C7 $C7 $C7 $C7 $C7 $C7 $C7 $C8 $C8 $C8 $C8 $C8 $C8 $C8 $C8 $C8 $C8 $C8 $C8 $C8 $C9 $C9 $C9 $C9 $C9 $C9 $C9 $C9 $C9 $C9 $C9 $C9 $C9 $CA $CA $CA $CA $CA $CA $CA $CA $CA $CA $CA $CA $CA $CB $CB $CB $CB $CB $CB $CB $CB $CB $CB $CB $CB $CB $CC $CC $CC $CC $CC $CC $CC $CC $CC $CC $CC $CC $CC $CD $CD $CD $CD $CD $CD $CD $CD $CD $CD $CD $CD $CD $CE $CE $CE $CE $CE $CE $CE $CE $CE $CE $CE $CE $CE $CF $CF $CF $CF $CF $CF $CF $CF $CF $CF $CF $CF $CF $D0 $D0 $D0 $D0 $D0 $D0 $D0 $D0 $D0 $D0 $D0 $D0 $D0 $D1 $D1 $D1 $D1 $D1 $D1 $D1 $D1 $D1 $D1 $D1 $D1 $D1 $D2 $D2 $D2 $D2 $D2 $D2 $D2 $D2 $D2 $D2 $D2 $D2 $D2 $D3 $D3 $D3 $D3 $D3 $D3 $D3 $D3 $D3 $D3 $D3 $D3 $D3 $D4 $D4 $D4 $D4 $D4 $D4 $D4 $D4 $D4 $D4 $D4 $D4 $D4 $D5 $D5 $D5 $D5 $D5 $D5 $D5 $D5 $D5 $D5 $D5 $D5 $D5 $D6 $D6 $D6 $D6 $D6 $D6 $D6 $D6 $D6 $D6 $D6 $D6 $D6 $D7 $D7 $D7 $D7 $D7 $D7 $D7 $D7 $D7 $D7 $D7 $D7 $D7 $D8 $D8 $D8 $D8 $D8 $D8 $D8 $D8 $D8 $D8 $D8 $D8 $D8 $D9 $D9 $D9 $D9 $D9 $D9 $D9 $D9 $D9 $D9 $D9 $D9 $D9 $DA $DA $DA $DA $DA $DA $DA $DA $DA $DA $DA $DA $DA $DB $DB $DB $DB $DB $DB $DB $DB $DB $DB $DB $DB $DB $DC $DC $DC $DC $DC $DC $DC $DC $DC $DC $DC $DC $DC $DD $DD $DD $DD $DD $DD $DD $DD $DD $DD $DD $DD $DD $DE $DE $DE $DE $DE $DE $DE $DE $DE $DE $DE $DE $DE $DF $DF $DF $DF $DF $DF $DF $DF $DF $DF $DF $DF $DF $E0 $E0 $E0 $E0 $E0 $E0 $E0 $E0 $E0 $E0 $E0 $E0 $E0 $E1 $E1 $E1 $E1 $E1 $E1 $E1 $E1 $E1 $E1 $E1 $E1 $E1 $E2 $E2 $E2 $E2 $E2 $E2 $E2 $E2 $E2 $E2 $E2 $E2 $E2 $E3 $E3 $E3 $E3 $E3 $E3 $E3 $E3 $E3 $E3 $E3 $E3 $E3 $E4 $E4 $E4 $E4 $E4 $E4 $E4 $E4 $E4 $E4 $E4 $E4 $E4 $E5 $E5 $E5 $E5 $E5 $E5 $E5 $E5 $E5 $E5 $E5 $E5 $E5 $E6 $E6 $E6 $E6 $E6 $E6 $E6 $E6 $E6 $E6 $E6 $E6 $E6 $E7 $E7 $E7 $E7 $E7 $E7 $E7 $E7 $E7 $E7 $E7 $E7 $E7 $E8 $E8 $E8 $E8 $E8 $E8 $E8 $E8 $E8 $E8 $E8 $E8 $E8 $E9 $E9 $E9 $E9 $E9 $E9 $E9 $E9 $E9 $E9 $E9 $E9 $E9 $EA $EA $EA $EA $EA $EA $EA $EA $EA $EA $EA $EA $EA $EB $EB $EB $EB $EB $EB $EB $EB $EB $EB $EB $EB $EB $EC $EC $EC $EC $EC $EC $EC $EC $EC $EC $EC $EC $EC $ED $ED $ED $ED $ED $ED $ED $ED $ED $ED $ED $ED $ED $EE $EE $EE $EE $EE $EE $EE $EE $EE $EE $EE $EE $EE $EF $EF $EF $EF $EF $EF $EF $EF $EF $EF $EF $EF $EF $F0 $F0 $F0 $F0 $F0 $F0 $F0 $F0 $F0 $F0 $F0 $F0 $F0 $F1 $F1 $F1 $F1 $F1 $F1 $F1 $F1 $F1 $F1 $F1 $F1 $F1 $F2 $F2 $F2 $F2 $F2 $F2 $F2 $F2 $F2 $F2 $F2 $F2 $F2 $F3 $F3 $F3 $F3 $F3 $F3 $F3 $F3 $F3 $F3 $F3 $F3 $F3 $F4 $F4 $F4 $F4 $F4 $F4 $F4 $F4 $F4 $F4 $F4 $F4 $F4 $F5 $F5 $F5 $F5 $F5 $F5 $F5 $F5 $F5 $F5 $F5 $F5 $F5 $F6 $F6 $F6 $F6 $F6 $F6 $F6 $F6 $F6 $F6 $F6 $F6 $F6 $F7 $F7 $F7 $F7 $F7 $F7 $F7 $F7 $F7 $F7 $F7 $F7 $F7 $F8 $F8 $F8 $F8 $F8 $F8 $F8 $F8 $F8 $F8 $F8 $F8 $F8 $F9 $F9 $F9 $F9 $F9 $F9 $F9 $F9 $F9 $F9 $F9 $F9 $F9 $FA $FA $FA $FA $FA $FA $FA $FA $FA $FA $FA $FA $FA $FB $FB $FB $FB $FB $FB $FB $FB $FB $FB $FB $FB $FB $FC $FC $FC $FC $FC $FC $FC $FC $FC $FC $FC $FC $FC $FD $FD $FD $FD $FD $FD $FD $FD $FD $FD $FD $FD $FD $FE $FE $FE $FE $FE $FE $FE $FE $FE $FE $FE $FE $FE $FF $FF $FF $FF $FF $FF $FF $FF $FF $FF $FF $FF $FF $00 $01 $02 $03 $04 $05 $06 $07 $08 $09 $0A $0B $0C $0D $0E $0F $10 $11 $12 $13 $14 $15 $16 $17 $18 $19 $1A $1B $1C $1D $1E $1F $20 $21 $22 $23 $24 $25 $26 $27 $28 $29 $2A $2B $2C $2D $2E $2F $30 $31 $32 $33 $34 $35 $36 $37 $38 $39 $3A $3B $3C $3D $3E $3F $40 $41 $42 $43 $44 $45 $46 $47 $48 $49 $4A $4B $4C $4D $4E $4F $50 $51 $52 $53 $54 $55 $56 $57 $58 $59 $5A $5B $5C $5D $5E $5F $60 $61 $62 $63 $64 $65 $66 $67 $68 $69 $6A $6B $6C $6D $6E $6F $70 $71 $72 $73 $74 $75 $76 $77 $78 $79 $7A $7B $7C $7D $7E $7F $80 $81 $82 $83 $84 $85 $86 $87 $88 $89 $8A $8B $8C $8D $8E $8F $90 $91 $92 $93 $94 $95 $96 $97 $98 $99 $9A $9B $9C $9D $9E $9F $A0 $A1 $A2 $A3 $A4 $A5 $A6 $A7 $A8 $A9 $AA $AB $AC $AD $AE $AF $B0 $B1 $B2 $B3 $B4 $B5 $B6 $B7 $B8 $B9 $BA $BB $BC $BD $BE $BF $C0 $C1 $C2 $C3 $C4 $C5 $C6 $C7 $C8 $C9 $CA $CB $CC $CD $CE $CF $D0 $D1 $D2 $D3 $D4 $D5 $D6 $D7 $D8 $D9 $DA $DB $DC $DD $DE $DF $E0 $E1 $E2 $E3 $E4 $E5 $E6 $E7 $E8 $E9 $EA $EB $EC $ED $EE $EF $F0 $F1 $F2 $F3 $F4 $F5 $F6 $F7 $F8 $F9 $FA $FB $FC $FD $FE $FF $FF $FE $FD $FC $FB $FA $F9 $F8 $F7 $F6 $F5 $F4 $F3 $F2 $F1 $F0 $EF $EE $ED $EC $EB $EA $E9 $E8 $E7 $E6 $E5 $E4 $E3 $E2 $E1 $E0 $DF $DE $DD $DC $DB $DA $D9 $D8 $D7 $D6 $D5 $D4 $D3 $D2 $D1 $D0 $CF $CE $CD $CC $CB $CA $C9 $C8 $C7 $C6 $C5 $C4 $C3 $C2 $C1 $C0 $BF $BE $BD $BC $BB $BA $B9 $B8 $B7 $B6 $B5 $B4 $B3 $B2 $B1 $B0 $AF $AE $AD $AC $AB $AA $A9 $A8 $A7 $A6 $A5 $A4 $A3 $A2 $A1 $A0 $9F $9E $9D $9C $9B $9A $99 $98 $97 $96 $95 $94 $93 $92 $91 $90 $8F $8E $8D $8C $8B $8A $89 $88 $87 $86 $85 $84 $83 $82 $81 $80 $7F $7E $7D $7C $7B $7A $79 $78 $77 $76 $75 $74 $73 $72 $71 $70 $6F $6E $6D $6C $6B $6A $69 $68 $67 $66 $65 $64 $63 $62 $61 $60 $5F $5E $5D $5C $5B $5A $59 $58 $57 $56 $55 $54 $53 $52 $51 $50 $4F $4E $4D $4C $4B $4A $49 $48 $47 $46 $45 $44 $43 $42 $41 $40 $3F $3E $3D $3C $3B $3A $39 $38 $37 $36 $35 $34 $33 $32 $31 $30 $2F $2E $2D $2C $2B $2A $29 $28 $27 $26 $25 $24 $23 $22 $21 $20 $1F $1E $1D $1C $1B $1A $19 $18 $17 $16 $15 $14 $13 $12 $11 $10 $0F $0E $0D $0C $0B $0A $09 $08 $07 $06 $05 $04 $03 $02 $01 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20 $20
|
|
|
Post by elmer on Nov 8, 2021 0:11:25 GMT
I haven't personally written a ZX0 decompressor that does that, because it'll be horribly slow, just like Hudson's LZSS decompressor was in Seiya Monogatari, but it would be possible to do ... in which case, the ram/buffer footprint would be whatever you wanted to set the window size to, just like LZSS. All right, now I have written a ZX0 decompressor that writes to VRAM (with a ring-buffer in main RAM) ... I post it in a day or so when I've confirmed that I didn't screw it up.
|
|
|
Post by elmer on Nov 10, 2021 12:18:00 GMT
All right, now I have written a ZX0 decompressor that writes to VRAM (with a ring-buffer in main RAM) ... I post it in a day or so when I've confirmed that I didn't screw it up. Here is my latest ZX0 decompressor code, all cleaned up and *hopefully* made usable as fastcalls for HuC (I believe, but I've not actually tested that). A quick test showed that decompressing directly to VRAM was 25% slower than decompressing to RAM and then copying the data to VRAM with a TIA. Attachments:unpack-zx0.asm (11.99 KB)
common.asm (1.49 KB)
|
|
vectrex28
What's a PC Engine?
Posts: 2
Homebrew skills: Coder, Pixel Artist
Fave PCE Shooter: 1943 Kai
Fave PCE Platformer: Legendary Axe
Fave PCE Game Overall: 1943 Kai
Fave PCE RPG: Bubblegum Crash
Currently Playing: TotK
|
Post by vectrex28 on Jun 6, 2023 4:01:02 GMT
Yes but it's also much slower too,in fact it seems that LZSA has multiple schemes depending on what you want, faster decompression but low ratio, or the contrary. Yes, LZSA2 is about 20% slower to decompress than LZSA1, but then there is always a tradeoff between compression ratio and speed, or else we'd all use RLE for speed, or deflate for compression ratio. The point is ... LZ4 compresses worse than LZSA1 and isn't any faster, and LZSA2 compresses much better than either (sometimes approaching aplib), and it is still fast-enough that you're unlikely to ever notice a difference. I went through the whole thing with some LZ4 fans in a compression thread on AtariAge. You can see an LZ4-vs-LZSA1 comparison here, and a size-test of various compressors here. Please note that I continued to improve both the LZSA1 and LZSA2 decompressors after those posts, and they're both a little smaller and faster. The code seems a bit more complex than the LZ4 one. Most of what looks like complexity in my LZSA decompressors is just optional code paths so that smaller-or-faster versions of the code are both in the same source file. You can look at Peter Ferrie's 6502 versions of the code in the LZSA distribution on gihub. They're easier to read, but decompress significantly slower than mine. He's the guy that wrote the 6502 LZ4 decompressor that you're probably looking at. Quick Q: I've been messing with this a little bit, but since I cannot seem to get it to decompress I just want to know if I'm on the right track. I put a small compressed image in MPR3, at $6000. It was compressed with the latest release's executable found on Emmanuel Marty's github (1.41 I believe). Here's the command I used for that: lzsa -v -f 2 compression_test.pcr compression_test_comp.pcr When trying to decompress from the CLI, it does work (with the -d argument) My decompression ASM code is as follows - I'm trying to decompress the image starting from address $3000. The only modifications I did was to declare the variables in a different ZP address (but they should use the same labels, in the same order.) LDA #LOW(compression_test)
STA <lzsa_srcptr
LDA #HIGH(compression_test)
STA <lzsa_srcptr+1
STZ <lzsa_dstptr
LDA #$30
STA <lzsa_dstptr+1
JSR lzsa2_unpack Any help would be appreciated
|
|
|
Post by DarkKobold on Jun 12, 2023 23:12:36 GMT
I don't recognize that file format, .pcr. Did you make your own file with the image separated into bitplanes? When you say it doesn't work, what does that mean?
|
|
|
Post by elmer on Jun 14, 2023 16:06:44 GMT
lzsa -v -f 2 compression_test.pcr compression_test_comp.pcr As you have already found out elsewhere, my libraries assume that you compress the data *without* adding a pointless header, so ... lzsa -r -f 2 compression_test.pcr compression_test_comp.pcr And for compressing data to ZX0 with Emmanuel Marty's "Salvador" compressor, the command line would be ... salvador -classic compression_test.pcr compression_test_comp.pcr Or, if you wanted to limit compression to a 4KB window in order to decompress directly to VRAM from a HuCARD game (using a 4KB window buffer in main RAM) ... salvador -classic -w 4096 compression_test.pcr compression_test_comp.pcr
|
|