nurpax / petmate

PETSCII editor with Electron/React/Redux
MIT License
178 stars 14 forks source link

REQUEST: Support for the .pet file format #202

Closed MarkkuR closed 3 years ago

MarkkuR commented 3 years ago

There's now this tool https://csdb.dk/release/?id=198395, which lets you extend pics to the borders. For PETSCII it only supports its own .pet format, however. Luckily it's very simple and well documented, a few extra bytes plus the char/color data.

nurpax commented 3 years ago

Sounds pretty easy to add. Where can I find the .pet format docs? I couldn't find online docs or a GitHub page for the tool..

manuelvio commented 3 years ago

I'll copy this here for reference, .pet format is described in the formats.txt file included in the distribution.

Binary file with a .pet extension that includes the following information, without any padding:
        - 1 byte: screen width in chars (40 for whole C64 screen)
        - 1 byte: screen height in chars (25 for whole C64 screen)
        - 1 byte: border color ($D020)
        - 1 byte: background color ($D021)
        - 1 byte: 0 for uppercase PETSCII, 1 for lowercase PETSCII
        - <width * height> bytes: video RAM data
        - <width * height> bytes: color RAM data
manuelvio commented 3 years ago

Ok, the exporter works, time for a PR :) seven nation raster