Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compression #23

Closed
ghost opened this issue Jan 7, 2016 · 12 comments
Closed

Compression #23

ghost opened this issue Jan 7, 2016 · 12 comments
Milestone

Comments

@ghost
Copy link

ghost commented Jan 7, 2016

A new enhancement idea:

Something like Exomizer (or similar) integrated in CPCTelera library and build system would be a great feature.

Thank you.

@lronaldo lronaldo added this to the 1.5 milestone Jan 7, 2016
@lronaldo
Copy link
Owner

lronaldo commented Jan 7, 2016

This feature was already in our internal todo list. I think is a greatly important feature. However, it will require time to find a great way of including the feature into the build system, to make it easy and comfortable to use.

It will also be interesting to have a live compressor, to be able to compress things live (It could be useful for procedurally generated content, for instance)

@deringenieur71
Copy link

I have an idea -> you put exomize into tool_path and spend a makro/skript. Like here 👍
http://www.cpcwiki.eu/forum/programming/(cpctelera)bit-arrays/msg122514/#msg122514

@lronaldo
Copy link
Owner

Thank you, @deringenieur71. We are thinking on similar ideas to include exomizer and other compression utilities. Our main concerns are being respectful with original authors and their licences and designing a good way to automate the proccess of having compressed data.

Hope to have this future well integrated soon 😄

@Arnaud6128
Copy link
Collaborator

The LZ48 compressor was release and it works very well with SDCC/CPCTelera. The Cruncher/Decruncher C Code is provided. Maybe we can add it to CPCTelera and include other compressors in near futur.
http://www.cpcwiki.eu/forum/programming/lz48-cruncherdecruncher/

@lronaldo
Copy link
Owner

Thank you, @Arnaud6128. I've already considered LZ48/49 compressor. I think it is really interesting and I've been following the development since its inception. I've already have a look at your adaptation. Thank you very much for all the nice work you are doing :). I hope to be ready to start again in 8 to 10 days and add all these many great things to CPCtelera.

@Arnaud6128
Copy link
Collaborator

i don't know if it's possible, but a very useful feature could be to directly decompress data into video without having to copy into temporary buffer.

@lronaldo
Copy link
Owner

@Arnaud6128 You can do that already. You only have to decompress to Video RAM. Many games already do that for backgrounds and presentation screens. Are you referring to a different way of decompressing?

@Arnaud6128
Copy link
Collaborator

I was refering about sprites for decompression and blitting in the same operation.
For sprite i had to decompress it in buffer and call cpct_drawSprite to display the buffer and i was thinking about a function like cpct_drawCompressedSprite.

@lronaldo
Copy link
Owner

@Arnaud6128 I have thought of similar ideas time ago, but I concluded that they are rarely of use. Individual sprites are normally to small to be compressed individually. Moreover, decompressing and blitting simultaneously would be many times slower than normal blitting. All in all, having general compressed sprites does not seem a good idea. There may be some special cases in which that's actually useful (very big sprites that do not need to be drawn fast, for instance), but then its priority to be implemented becomes lower.

The only interesting way would be finding some special compressing format that doesn't hurt overall blitting performance: something specially designed for sprites. In that case, and having good performance tests, it could be really beneficial. I think that requires a good deal of thinking, trying and redesigning, or a bright idea. It's a great challenge to invest some time researching :)

@AugustoRuiz
Copy link
Collaborator

AugustoRuiz commented Dec 16, 2016 via email

@AugustoRuiz
Copy link
Collaborator

AugustoRuiz commented Dec 16, 2016 via email

@lronaldo
Copy link
Owner

Current development branch has compression integrated:

  • ZX7B compressor integrated,(thanks to @antoniovillena)
  • cpct_pack front-end command for easy usage
  • Makefile macros ADD2PACK and PACKZX7B up and running. They let the user add selected files to a packing group and then generate two files (.c .h) with the compressed data array for all added files. It also generates constants for easily using compressed and uncompressed data.
  • cpct_zx7b_decrunch_s function to decompress previously compressed data.

Everything is automated and ready to use.

I will continue adding more versions of ZX7B and also Exomizer, but I consider this issue solved by now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants