A modern Python-based viewer for TRS-80 Color Computer (CoCo) and Atari ST graphics file formats. View and convert MAX, CM3, CLP, MGE, MAC, PCX, GIF, TNY, NIB, IMG, and HR image files from vintage computer disk images.
- Multiple Format Support: MAX (CoCoMax 1/2), CM3 (CoCoMax 3), CLP (MAX-10 Clipboard), MGE (Graphics Exchange), MAC (MacPaint), PCX (PC Paintbrush), GIF, TNY (Atari ST Tiny), IMG (Digiscan RASCAN), and HR (RASCAN CoCo 3)
- Dual Interface: GUI viewer and command-line tools
- DSK Image Support: Browse and extract files from Color Computer and Atari ST disk images
- High-Quality Conversion: Export to modern PNG format
- NTSC Artifact Colors: Supports MAX artifact color modes (BR/RB)
- Comprehensive Documentation: Technical format specifications for developers
- Monochrome and artifact-colored bitmap images
- 256Γ192 resolution (typical)
- 1 bit per pixel with NTSC color artifact support
- Simple 5-byte header format
- 16-color palette-based images
- 320Γ192 or 320Γ384 resolution
- Run-length compression
- Advanced color palette system
- Embedded pictures from MAX-10 word processor
- Container format with text, rulers, and graphics
- Monochrome bitmap pictures
- Variable dimensions
- ANIMTOOL-style graphics exchange format
- 320x200x16 resolution
- RLE compression or raw bitmap
- RGB/Composite monitor type support
- 32-character title field
- Classic Macintosh bitmap format
- 576Γ720 monochrome resolution
- PackBits RLE compression
- 512-byte header (or PNTG variant with 640-byte header)
- 1 bit per pixel (black and white)
- ZSoft PC Paintbrush format
- Multiple color depths: 1-bit, 4-bit (EGA), 8-bit (VGA), 24-bit
- Run-length encoding compression
- 128-byte header with embedded EGA palette
- Optional 256-color VGA palette at file end
- Standard GIF89a/GIF87a format
- Natively supported via PIL/Pillow library
- Indexed color (up to 256 colors)
- LZW compression
- Compressed image format for Atari ST computers
- Three resolutions supported:
- Low: 320Γ200, 16 colors (4 bitplanes)
- Medium: 640Γ200, 4 colors (2 bitplanes)
- High: 640Γ400, monochrome (1 bitplane)
- Custom RLE compression optimized for vertical columns
- Interleaved bitplane format
- 9-bit color palette (3 bits per RGB channel)
- File extensions: .TNY, .TN1, .TN2, .TN3
- Compressed image format for the TRS-80 Color Computer by Steve
- Native resolution: 640Γ200, 4 colors (2bpp)
- Sophisticated two-level RLE compression scheme (byte-level and nibble-level)
- Encapsulated within a standard DECB BIN container file
- 34-byte embedded header containing pointers, XOR flags, and palette data
- Includes a 16-color GIME palette (though typically overridden by 4-color loader palettes)
- Optional XOR delta decoding for improved vertical line compression
- Digitized image format for the TRS-80 Color Computer 3
- 18-byte header: 1 dummy byte, 1 video mode byte, 16 palette values
- Five video modes supported:
- Mode 0: 640Γ200, 4-color grayscale (2 bits per pixel)
- Mode 1: 320Γ200, 16 colors (4 bits per pixel)
- Mode 2: 640Γ200, 16 dithered grayscale (4 bits per pixel)
- Mode 3: 320Γ200, 4096 "FlikPic" colors (3 separate RGB buffers)
- Mode 4: 320Γ200, 3D anaglyph (2 buffers: red + cyan for 3D glasses)
- Custom RLE compression with alternating uncompressed/compressed blocks
- CoCo 3 hardware palette (6-bit RGB encoding)
- Multi-file grayscale image format for the TRS-80 Color Computer 3
- 640Γ200 resolution, 4-shade grayscale (2 bits per pixel)
- Split across 4 sequential files: HR0, HR1, HR2, HR3
- Wrapped in SAVEM (DECB BIN) container format
- Inverted grayscale palette (0=white, 3=black)
- 32,000 bytes of pixel data total (8,000 bytes per file)
- Python 3.7 or higher
- PyQt6 for the GUI
- Pillow (PIL) library for image processing
git clone https://github.com/reyco2000/CoCo-Image-Viewer.git
cd CoCo-Image-Viewerpip install pillow PyQt6Or create a virtual environment:
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install pillow PyQt6Launch the interactive GUI viewer:
python3 main_new.py- Click "Open DSK File" to browse for a disk image
- Navigate to the
DSK-sampledirectory - Select a DSK file (e.g.,
CM3PIC01.DSK,CCMAX.DSK,CLIPART3.dsk) - Click on any MAX, CM3, CLP, MGE, MAC, PCX, GIF, TNY, NIB, IMG, or HR file to view it
- Use the zoom slider to adjust image size (0.25x to 2x)
- Export images to PNG with the export buttons
python3 main_new.py list DSK-sample/CLIPART3.dskOutput:
CATCHER.CLP
BATTER.CLP
RUNNER.CLP
SURFER.CLP
...
MAX files:
python3 main_new.py extract DSK-sample/CCMAX.DSK TITLE.MAX output.pngCM3 files:
python3 main_new.py extract DSK-sample/CM3PIC01.DSK Jinx.CM3 output.pngCLP files:
python3 main_new.py extract DSK-sample/CLIPART3.dsk SOCCER.CLP soccer.pngMGE files:
python3 main_new.py extract DSK-sample/CLRMAX-1.DSK PICTURE.MGE output.pngMAC files (MacPaint):
python3 main_new.py extract DSK-sample/MACPICS.DSK IMAGE.MAC output.pngPCX files:
python3 main_new.py extract DSK-sample/PCXPICS.DSK IMAGE.PCX output.pngGIF files:
python3 main_new.py extract DSK-sample/GIFPICS.DSK IMAGE.GIF output.pngTNY files (Atari ST Tiny):
python3 main_new.py extract DSK-sample/ATARIST.DSK IMAGE.TNY output.png
python3 main_new.py extract DSK-sample/ATARIST.DSK IMAGE.TN1 output.pngThe repository includes sample disk images in the DSK-sample/ directory:
| File | Size | Description | Contains |
|---|---|---|---|
CCMAX.DSK |
158K | CoCoMax 1/2 images | MAX format files |
CM3PIC01.DSK |
158K | CoCoMax 3 images | CM3 format files (Jinx.CM3, Snail.CM3, etc.) |
CLIPART3.dsk |
158K | MAX-10 clip art | CLP format files (Sports: BASEBALL, SOCCER, HOCKEY, etc.) |
CLRMAX-1.DSK |
158K | ColorMax images | MGE format files |
For additional DSK files, visit: https://colorcomputerarchive.com/repo/Disks/Pictures/
# Browse CCMAX.DSK
python3 main_new.py list DSK-sample/CCMAX.DSK
# Extract from CM3PIC01.DSK (384-row image)
python3 main_new.py extract DSK-sample/CM3PIC01.DSK Jinx.CM3 jinx.png
# Extract from CM3PIC01.DSK (192-row image)
python3 main_new.py extract DSK-sample/CM3PIC01.DSK Snail.CM3 snail.png
# Extract sports clipart
python3 main_new.py extract DSK-sample/CLIPART3.dsk SOCCER.CLP soccer.png
python3 main_new.py extract DSK-sample/CLIPART3.dsk BASEBALL.CLP baseball.pngCoCo-Image-Viewer/
βββ main_new.py # Main application (PyQt6 GUI + CLI)
β
βββ coco_image_formats/ # Reusable image format library
β βββ __init__.py # Package exports
β βββ dsk.py # DSK image handling
β βββ max_format.py # MAX format converter
β βββ cm3_format.py # CM3 format converter
β βββ mge_format.py # MGE format converter
β βββ clp_format.py # CLP format converter
β βββ mac_format.py # MAC (MacPaint) format converter
β βββ pcx_format.py # PCX format converter
β βββ tny_format.py # TNY (Atari ST Tiny) format converter
β βββ img_format.py # IMG (Digiscan RASCAN) format converter
β βββ hr_format.py # HR (RASCAN CoCo 3) format converter
β βββ utils.py # Shared utilities
β
βββ README.md # This file
βββ LICENSE # MIT License
βββ .gitignore # Git ignore patterns
β
βββ DSK-sample/ # Sample disk images
β βββ CCMAX.DSK # CoCoMax 1/2 images (MAX format)
β βββ CM3PIC01.DSK # CoCoMax 3 images (CM3 format)
β βββ CLIPART3.dsk # MAX-10 clipart (CLP format - sports)
β βββ CLRMAX-1.DSK # ColorMax images (MGE format)
β βββ README.md # Link to more DSK files
β
βββ documentation/ # Technical documentation
βββ COCO-PICS-FORMATS.md # CoCo format specifications
βββ CLP File.txt # MAX-10 format reference
βββ TNY_IMPLEMENTATION.md # Atari ST Tiny format documentation
βββ shared.png # Screenshot
-
main_new.py - Main Application (PyQt6 GUI + CLI)
- Modern PyQt6-based GUI viewer
- CLI with three subcommands:
gui,list,extract - Zoom slider (0.25x to 2x)
- Export single image to PNG with pre-filled filename
- Export All to PNG batch export
- Filter to show only supported file types
- DSK path display
- Uses
coco_image_formatslibrary for format conversion
-
coco_image_formats/ - Reusable Library Package
- DSK parsing logic (DSKImage, DirectoryEntry, JVCHeader classes)
- MAX-to-PPM conversion (artifact colors with YIQ color space)
- CM3-to-PPM conversion (two-stage decompression and palette handling)
- CLP-to-PPM conversion (MAX-10 clipboard picture extraction)
- MGE-to-PPM conversion (RLE decompression and palette conversion)
- MAC-to-PPM conversion (PackBits decompression, PNTG variant support)
- PCX-to-PPM conversion (1/4/8/24-bit color depths, RLE decompression)
- TNY-to-PPM conversion (Atari ST Tiny format with bitplane decoding)
- IMG-to-PPM conversion (Digiscan RASCAN multi-mode digitizer format)
- HR-to-PPM conversion (RASCAN CoCo 3 multi-file grayscale)
- GIF support via PIL/Pillow native handling
-
COCO-PICS-FORMATS.md (1200+ lines)
- Comprehensive technical reference for programmers
- Complete format specifications: MAX, CM3, MGE, CLP, MAC, PCX, GIF
- Byte-by-byte header breakdowns
- Code examples and algorithms
- Common pitfalls and optimization tips
- Color encoding details and compression algorithms
-
- Atari ST Tiny format implementation guide
- Complete specification and decoder details
- Bitplane format explanation
- RLE decompression algorithm
- Column reordering and color palette conversion
- Integration notes and testing results
-
- Original MAX-10 technical reference by Dave Stampe
- CLP file structure specification
- Paragraph tag system documentation
- Picture format details
All disk images are 158KB DSK/JVC format (DECB file system):
- CCMAX.DSK - CoCoMax 1/2 pictures (MAX format)
- CM3PIC01.DSK - CoCoMax 3 pictures with 16-color palettes
- CLIPART3.dsk - Sports clipart: SOCCER, BASEBALL, HOCKEY, SURFER, etc.
- CLRMAX-1.DSK - MGE format images (ColorMax/ANIMTOOL format)
The project uses a modular architecture:
- main_new.py: PyQt6 GUI application with CLI support
- coco_image_formats/: Reusable library for all format conversions
- Dependencies: PyQt6 for GUI, Pillow for image processing
- Granules: 9 sectors Γ 256 bytes = 2,304 bytes
- FAT: Track 17, Sector 2 (granule chain tracking)
- Directory: Track 17, Sectors 3-11 (72 entry capacity)
- Granule Mapping: 2 granules per track, skipping Track 17
MAX Artifact Colors (NTSC):
- BR Mode: Blue-Red phase artifacts
- RB Mode: Red-Blue phase artifacts (reversed)
- YIQ color space conversion for composite video simulation
CM3 Palette:
- 6-bit RGB encoding (2 bits per channel)
- 16 colors from 64 possible combinations
- Scaling:
rgb8 = rgb2 Γ 85(0β0, 1β85, 2β170, 3β255)
CLP Bitmaps:
- 1 bit per pixel: 0=white, 1=black
- MSB first (bit 7 = leftmost pixel)
- Padding byte required at end of each line
DSK Image β Extract File β Parse Format β Convert to PPM β Save as PNG
β β β β β
JVC/DECB granules MAX/CM3/CLP/MGE/ RGB pixels Pillow library
IMG/HR/etc.
| Operation | MAX | CM3 | CLP | MGE | MAC | PCX | GIF | TNY | NIB | IMG | HR |
|---|---|---|---|---|---|---|---|---|---|---|---|
| View in GUI | β | β | β | β | β | β | β | β | β | β | β |
| Extract to PNG | β | β | β | β | β | β | β | β | β | β | β |
| Artifact colors | β (BR/RB) | β | β | β | β | β | β | β | β | β | β |
| Palette support | β | β (16) | β | β (16) | β | β (16/256) | β (256) | β (16) | β (16) | β (16) | β |
| Compression | β | β (RLE) | β | β (RLE) | β (PackBits) | β (RLE) | β (LZW) | β (RLE) | β (RLE) | β (RLE) | β |
# Test MAX format
python3 main_new.py list DSK-sample/CCMAX.DSK
python3 main_new.py extract DSK-sample/CCMAX.DSK <filename>.MAX test.png
# Test CM3 format (192 rows)
python3 main_new.py extract DSK-sample/CM3PIC01.DSK Snail.CM3 test.png
# Test CM3 format (384 rows)
python3 main_new.py extract DSK-sample/CM3PIC01.DSK Jinx.CM3 test.png
# Test CLP format (sports clipart)
python3 main_new.py extract DSK-sample/CLIPART3.dsk SOCCER.CLP test.png
python3 main_new.py extract DSK-sample/CLIPART3.dsk CATCHER.CLP test.png
# Test MGE format
python3 main_new.py list DSK-sample/CLRMAX-1.DSK
python3 main_new.py extract DSK-sample/CLRMAX-1.DSK <filename>.MGE test.pngTo add support for additional Color Computer graphics formats:
- Create a new
xxx_format.pymodule incoco_image_formats/ - Implement a
convert_xxx_to_ppm()function - Export the function in
coco_image_formats/__init__.py - Add format detection in
main_new.py(on_file_select()method) - Add format support in CLI (
extractcommand inmain_new.py) - Update help text and documentation
- Add test cases with sample files
- MAX format only supports arte modes 0, 1, and 2 (BW, BR, RB)
- CM3 motif/pattern data is read but not used in rendering
- CLP files only extract the first picture paragraph
- Maximum CLP image size: 7,660 bytes (per MAX-10 specification)
- MGE format only supports resolution byte 0 (320x200)
- GUI displays one image at a time (no multi-image gallery view)
pip install pillowpip install PyQt6- Ensure the file is a valid MAX/CM3/CLP format
- Check that the DSK image is not corrupted
- Verify the file extension matches the actual format
- Check file paths - DSK samples are in
DSK-sample/directory
- CLP files may contain only text, rulers, or page breaks
- Only files with picture paragraphs (tag 0x01) will display
- Ensure PyQt6 is installed:
pip install PyQt6 - On Linux, you may need:
sudo apt install python3-pyqt6or install via pip - Check for any error messages in the terminal
Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow PEP 8 style guidelines for Python code
- Add docstrings to all functions and classes
- Update documentation for new features
- Test with sample files before submitting
- Include format specifications for new file types
- Add MGE format support (ColorMax/ANIMTOOL)
- Add MAC format support (MacPaint)
- Add PCX format support (PC Paintbrush)
- Add GIF format support
- Zoom and pan controls in GUI (PyQt6 version)
- Add batch conversion mode (Export All to PNG)
- Implement multi-image gallery view in GUI
- Support for other CoCo formats (RAT, HRS, VEF, PIX)
- Image preview thumbnails in file list
- Color palette editor for CM3/MGE images
- Drag-and-drop DSK file loading
This project is licensed under the MIT License - see the LICENSE file for details.
- MAX/CM3: Based on CoCoMax software by Colorware
- CLP: MAX-10 Word Processor format by Dave Stampe
- coco-tools by Jamie Cho - Reference implementations
- Pillow - Python Imaging Library
- Color Computer community for format documentation and sample files
- Mathieu Bouchard - cm3toppm implementation reference
- Jamie Cho (jamieleecho) - coco-tools package and format knowledge
- Dave Stampe - MAX-10 CLP format technical documentation
- Color Computer Archive - Sample files and documentation
- Colorware - Original MAX and CM3 software
- π€ Developed with assistance from Claude Code
- Color Computer Archive - Software and documentation
- Color Computer Archive - Pictures - More DSK files
- CoCopedia - Color Computer wiki
- coco-tools GitHub - Format conversion utilities
- maxtoppm - MAX/ART to PPM converter
- cm3toppm - CM3 to PPM converter
- veftopng - VEF to PNG converter
- Toolshed - CoCo disk utilities
- COCO-PICS-FORMATS.md - Deep dive into MAX, CM3, MGE, CLP, MAC, PCX, and GIF formats
- TNY_IMPLEMENTATION.md - Atari ST Tiny format specification and implementation
- CLP File.txt - Original MAX-10 format specification
- β IMG format support (Digiscan RASCAN multi-mode digitizer)
- β Five video modes: 4-color 640Γ200, 16-color 320Γ200, dithered gray 640Γ200, 4096-color FlikPic, 3D anaglyph
- β Custom RLE decompression with alternating block structure
- β HR format support (RASCAN CoCo 3 Video RAM Sequence)
- β Multi-file HR0βHR3 auto-concatenation for 640Γ200 grayscale images
- β SAVEM container extraction for HR files
- β NIB format support (Nibble compressed format for TRS-80 CoCo)
- β Two-level RLE compression (byte-level and nibble-level)
- β DECB BIN container parsing with embedded header
- β 640Γ200 4-color native resolution
- β Optional XOR delta decoding for vertical line compression
- β TNY format support (Atari ST Tiny with interleaved bitplane decoding)
- β Support for all three Atari ST resolutions (320Γ200, 640Γ200, 640Γ400)
- β Custom RLE decompression with column reordering
- β 9-bit color palette support (3 bits per channel)
- β File extensions: .TNY, .TN1, .TN2, .TN3
- β Comprehensive TNY documentation (TNY_IMPLEMENTATION.md)
- β Test suite for TNY decoder validation
- β MAC format support (MacPaint with PackBits decompression)
- β PCX format support (1-bit, 4-bit EGA, 8-bit VGA, 24-bit true color)
- β GIF format support (native PIL/Pillow handling)
- β PyQt6 GUI version (main_new.py) with zoom controls
- β Export to PNG with pre-filled filename
- β Export All to PNG batch functionality
- β
Reusable
coco_image_formatslibrary package - β Updated documentation with MAC, PCX, and GIF specifications
- β MGE format support (ColorMax/ANIMTOOL)
- β RLE decompression for MGE files
- β RGB/Composite monitor palette conversion
- β Updated documentation with MGE specifications
- β MAX format support with artifact colors
- β CM3 format support with compression
- β CLP format support for MAX-10 pictures
- β GUI viewer for browsing DSK images
- β CLI tools for extraction and conversion
- β Comprehensive programmer documentation
- β Sample disk images included (4 DSK files)
- β Self-contained single-file design
Made with β€οΈ by Reinaldo Torres β a proud CoCo enthusiast π§ reyco2000@gmail.com
π’ Proud member and co-creator of the CoCoByte Club https://cocobyte.co/
π See more on @ChipShift https://github.com/reyco2000/
