Page 1 of 1

New demo uploaded: C64 image file viewer (koala format)

Posted: Wed Dec 02, 2020 10:02 pm
by desertfish



C64 image file viewer (koala format)




View File






I wrote a program that loads Commodore-64 multicolor pixel art images in the "koala" file format, and displays them to a regular Commander X16  320x200 graphics screen.

The C64 uses a fixed palette of 16 colors for all its graphics.

I do find that the saturation of the default colors in de c64 palette in the Cx16 emulator is not very good though: when the images are displayed on a C64 or in an emulator like Vice for instance, they look much better in my opinion.

So the program sets a custom palette (the "pepto" Vic-II colors) to make the images look closer like they would on a C64.

 

This program has been integrated in a multi-format image viewer now, the source code of that is here https://github.com/irmen/prog8/tree/master/examples/cx16/imageviewer






 

New demo uploaded: C64 image file viewer (koala format)

Posted: Thu Dec 03, 2020 9:39 am
by AndyMt


Quote




I do find that the saturation of the colors in de c64 palette is not very good in the Cx16 emulator though: when the images are displayed on a C64 or in an emulator like Vice for instance, they look much better in my opinion.



I noticed that, too. In most colors seem to be too dark, a few too bright (Yellow if I recall correctly). Have you tried tweaking the palette for your viewer? 

Other than that: great tool!


New demo uploaded: C64 image file viewer (koala format)

Posted: Thu Dec 03, 2020 5:08 pm
by desertfish

Tweaking the Vera's color palette was easier than I thought.

I've uploaded a new version that changes the color palette to the well-known 'pepto' Vic-II palette and the images look a lot better now

 


New demo uploaded: C64 image file viewer (koala format)

Posted: Sat Dec 05, 2020 7:02 pm
by desertfish

I'm going to take this a step further, and implement a sort of library to load various image formats.

So currently we have:


  • Koala paint C64 multicolor image (fixed size 160x200, 16 fixed colors)


I'm busy investigating:


  • BMP  (windows bitmap image files, various sizes, up to 256 colors, uncompressed),  have a Python prototype working


  • PCX (paintbrush image files, various sizes, up to 256 colors, very simple compression), have a Python prototype working


  • GIF (up to 256 colors, compressed) would be nice but perhaps the decompressor is too complex? I don't yet know how it works.


  • PNG (up to 256 colors, DEFLATE compressed)  requires zlib to decompress.   Have a Python prototype working.   6502 decompressor: see Andy's link below


  • IFF ILBM (Often used on the Amiga) Have a Python prototype working. No HAM support though



New demo uploaded: C64 image file viewer (koala format)

Posted: Sat Dec 05, 2020 10:36 pm
by AndyMt

Gif can be unpacked using zlib if I'm not mistaken. And there is a 6502 implementation:

https://github.com/pfusik/zlib6502


New demo uploaded: C64 image file viewer (koala format)

Posted: Sat Dec 05, 2020 10:45 pm
by desertfish

@AndyMt ooh thanks for that link!! Actually, it's PNG that can be unpacked using zlib, which is even better!