PETSCII Art Converter
Hybrid image converter and manual editor for Commodore 64 — ابزار هیبریدی تبدیل تصویر و ویرایش دستی برای کمودور ۶۴
About This Tool
This online tool is designed for converting images to PETSCII graphics for the Commodore 64. Upload any image to automatically convert it to a 40×25 character grid, then edit each cell with the complete 256-character PETSCII palette and 16 standard C64 colors. Output formats include BASIC POKE, BASIC DATA, and 6502 Assembly code with a built-in assembler for PRG file export. This tool was independently developed from scratch by C64Spark and is part of the AmigaStore.ir tools collection.
How to Use
To get started, click the UPLOAD IMAGE button and select a PNG, JPG, GIF, or BMP file. Your image will be automatically resized to 320×200 pixels — the standard Commodore 64 screen resolution. The conversion algorithm then divides the image into 1000 blocks of 8×8 pixels. For each block, the closest character from the 256 PETSCII characters and the best color from the 16-color C64 palette is selected.
After conversion, you can manually edit any of the 1000 cells. The character palette is organized into 9 categories: uppercase letters and special characters, symbols and numbers, two sets of graphic characters, four reversed sets, and one special character. For coloring, all 16 standard Commodore 64 colors are available. Fill screen, clear screen, invert, and erase mode tools are available for faster editing.
For output, you have three options. POKE output generates compact BASIC code with direct POKE commands that includes only changed cells. DATA output uses the classic READ and DATA structure with a FOR loop — the standard C64 programming style. ASM output generates 6502 Assembly code that places your design directly into screen memory and color memory using loops and data tables.
In Assembly mode, the ASSEMBLE button converts the Assembly code to machine code HEX, and you can download the executable PRG file. The Assembly PRG is approximately 2KB in size and is executed with LOAD and SYS commands. All three outputs are configured so that after displaying the design, the cursor moves to the bottom of the screen so that the READY message and blinking cursor do not appear on top of your design.
File saving and loading is also available. BAS file for saving BASIC code, ASM file for saving Assembly code, and PRG file for execution on real hardware or emulators.
About the Assembly Output
The Assembly output of this tool is specifically designed for displaying PETSCII designs. It includes code for clearing the screen, setting colors, and transferring character and color data to screen memory. This Assembly code is not designed for running subroutines such as complex loops, game logic, or user input interaction, and is not a replacement for manual Assembly programming.
Technical Specs
- Output resolution: 40 columns × 25 rows (C64 standard)
- Character set: Full PETSCII ROM (256 characters)
- Colors: 16 C64 palette colors
- Supported input: PNG, JPG, GIF, BMP
- Output: BASIC (POKE/DATA), 6502 Assembly, .prg, .bas
- Built-in full 6502 assembler
- Assembly output uses loop + data tables (~2KB)
- Cursor positioned at bottom after rendering
FAQ
Does the output run on real hardware?
Yes. Load the BASIC PRG with LOAD and RUN, or load the Assembly PRG with LOAD and SYS.
What image formats are supported?
PNG, JPG, GIF, and BMP.
Can I edit a saved design later?
Yes. Save the BAS file and load it later through the Load File button.
What is the difference between POKE and DATA output?
POKE is more compact and direct. DATA uses the classic READ and FOR loop style of C64 programming.