Png to Bin converter

Created for the Commander X16

- 115 binaries served since Januarry 30, 2020


This page can convert a png file to a binary file that can be used in the CommanderX16.
For full control of palette/colors, be sure to store your image as indexed instead of truecolor.

If the image is stored as truecolor, this page will try to convert it to indexed based on your selection of bits per pixel.
If you do not want to change the default palette on the CX16, be sure to import the palette from here, into your drawing program.
If you do want to change palette, it is recommended to store the entire 4, 16 or 256 color palette with the image.


Address: (ex. 4000 to store at address $x4000 in VRAM where x is the banknumber chosen by LOAD command)
If you leave the field empty, $0000 is inserted.

To load your bin file into Video RAM (VRAM), you can use the LOAD kernal API call.
In the CX16, it has been modified to be able to load data directly into VRAM. Before calling LOAD, you must call SETLFS and SETNAM

You can find an example of loading a 4bpp 320x240 image here.

For sprite-/tile-maps, you should create an image with the width of your sprite/tile and then place the sprites/tiles vertically.

Default Commander X16 palette as stored in memory:

!word $0000,$0FFF,$0808,$0AFE,$0C4C,$00C5,$000A,$0EE7,$0D85,$0640,$0F77,$0333,$0777,$0AF6,$008F,$0BBB
!word $0000,$0111,$0222,$0333,$0444,$0555,$0666,$0777,$0888,$0999,$0AAA,$0BBB,$0CCC,$0DDD,$OEEE,$0FFF
!word $0211,$0433,$0644,$0866,$0A88,$0C99,$0FBB,$0211,$0422,$0633,$0844,$0A55,$0C66,$0F77,$0200,$0411
!word $0611,$0822,$0A22,$0C33,$0F33,$0200,$0400,$0600,$0800,$0A00,$0C00,$0F00,$0221,$0443,$0664,$0886
!word $0AA8,$0CC9,$0FEB,$0211,$0432,$0653,$0874,$0A95,$0CB6,$0FD7,$0210,$0431,$0651,$0862,$0A82,$0CA3
!word $0FC3,$0210,$0430,$0640,$0860,$0A80,$0C90,$0FB0,$0121,$0343,$0564,$0786,$09A8,$0BC9,$0DFB,$0121
!word $0342,$0463,$0684,$08A5,$09C6,$0bF7,$0120,$0241,$0461,$0582,$06A2,$08C3,$09F3,$0120,$0240,$0360
!word $0480,$05A0,$06C0,$07F0,$0121,$0343,$0465,$0686,$08A8,$09CA,$0BFC,$0121,$0242,$0364,$0485,$05A6
!word $06C8,$07F9,$0020,$0141,$0162,$0283,$02A4,$03C5,$03F6,$0020,$0041,$0061,$0082,$00A2,$00C3,$00F3
!word $0122,$0344,$0466,$0688,$08AA,$09CC,$0BFF,$0122,$0244,$0366,$0488,$05AA,$06CC,$07FF,$0022,$0144
!word $0166,$0288,$02AA,$03CC,$03FF,$0022,$0044,$0066,$0088,$00AA,$00CC,$00FF,$0112,$0334,$0456,$0668
!word $088A,$09AC,$0BCF,$0112,$0224,$0346,$0458,$056A,$068C,$079F,$0002,$0114,$0126,$0238,$024A,$035C
!word $036F,$0002,$0014,$0016,$0028,$002A,$003C,$003F,$0112,$0334,$0546,$0768,$098A,$0B9C,$0DBF,$0112
!word $0324,$0436,$0648,$085A,$096C,$0B7F,$0102,$0214,$0416,$0528,$062A,$083C,$093F,$0102,$0204,$0306
!word $0408,$050A,$060C,$070F,$0212,$0434,$0646,$0868,$0A8A,$0C9C,$0FBE,$0211,$0423,$0635,$0847,$0A59
!word $0C6B,$0F7D,$0201,$0413,$0615,$0826,$0A28,$0C3A,$0F3C,$0201,$0403,$0604,$0806,$0A08,$0C09,$0F0B

The palette can be pasted directly into your program and then the program can copy it to VERA at address $F1000
Remember to set a label before pasting the palette.