Petmate - C64 PETSCII editor

A cross-platform PETSCII image editor.

View the Project on GitHub nurpax/petmate

Petmate

Petmate is a cross-platform C64 PETSCII image editor, drawing inspiration from the PETSCII editor.

Petmate runs locally on a Mac/Windows/Linux machine and doesn’t require an internet connection.

Petmate screenshot w/ PETSCII by Manuel Vio

Download Petmate

Features

You can view github issues for upcoming features/fixes.

Keyboard shortcuts

General:

Pan/zoom (new in Petmate 0.7):

Open/Save/Save As: use platform shortcuts (e.g., Save is Ctrl+S on Windows, ⌘S on Mac).

Undo/Redo: use platform shortcuts (e.g., ⌘Z and ⌘⇧Z on Mac).

Using Petmate to edit Dir Art

Petmate 0.7.0 adds experimental support for editing directory art in C64 .d64 disk image files.

The process of making directory art with Petmate is as follows:

  1. Create a 16xN screen in Petmate. (Or alternatively, load in a .d64 that already contains several directory entries.)
  2. Export the 16xN screen as a .json file.
  3. Use c1541js to patch your art into a .d64 file. The .d64 file must contain an appropriate amount of directory entries, you can use f.ex. VICE’s c1541 tool to author such .d64 files.

A command line example for step #3:

Let’s say you have a .d64 file called demo1.d64 and your dir art is exported into a file called dirart.json. Run the following command:

# Patch in dirart using demo1.d64 as the source and write
# the result into demo1-result.d64:

c1541js --json dirart.json demo1.d64 demo1-result.d64

At the time of writing (2019-03-16), Petmate doesn’t validate that the contents of your dir art make sense as directory entries. It will just write whatever screencodes you used in your Petmate screen. The special character control codes will be shown more prominently in future Petmate versions.

Processing PETSCII content

Petmate 0.7 adds a new .json export format. It is intended to stay unchanged across Petmate versions and its intended to be easy to consume by content processing scripts written in say Python or JavaScript.

The structure of Petmate’s .json export format is pretty simple:

{
    "version": 1,
    "framebufs": [
        {
            "width": 16,
            "height": 14,
            "backgroundColor": 6,
            "borderColor": 14,
            "charset": "upper",
            "name": "screen_003",
            "screencodes": [ ... ],   # a flat array of width*height screencodes
            "colors": [ ... ],        # a flat array of width*height colors
        }
    ]
}

Importing PETSCII from PNG image files

As of version 0.6.0, Petmate supports importing PETSCII from PNG images. This import feature matches pixel data against the C64 ROM charsets (upper and lower case fonts). There is no “fuzzy” machine vision style matching, the code doing the import is looking for a pixel perfect match. This means images that have been scaled (double pixeled or other scale ratio) cannot currently be imported. The PNG importer also expects the image dimensions and borders to match those of VICE:

Colors are matched by quantizing the input pixels into indexed color by looking at the closest mean square error against all the color palettes supported by Petmate, and picking the match that has the smallest mean square error. If the input image contains colors that are wildly different from the Petmate prebaked palettes, some colors may come out wrong. Please report any problems via GitHub issues.

Preferences

The settings are saved in the following location:

Release history

Petmate 0.7.1 (2019-06-03)

Petmate 0.7.0 (2019-03-16)

Petmate 0.6.1 (2019-02-12)

Petmate 0.6.0 (2019-01-01)

Petmate 0.5.0 (2018-11-23)

Petmate 0.4.1 (2018-09-04)

Petmate 0.4.0 (2018-09-02)

Petmate 0.3.2 (2018-08-21)

Petmate 0.3.1 (2018-08-16)

Petmate 0.3.0 (2018-08-11)

Petmate 0.2.5 (2018-08-09)

Petmate 0.2.4 (2018-08-08)

Petmate 0.2.3 (2018-08-07)

Petmate 0.2.2 (2018-08-06)

Petmate 0.2.1 (2018-08-05)

Petmate 0.2.0 (2018-08-03)

Petmate 0.1.1 (2018-07-31)

Petmate 0.1.0 (2018-07-29)