Punch is a virtual computer system that draws inspiration from iconic computing platforms such as the Commodore 64, Amiga 500, and Atari ST. Notable features include:
- Utilization of the MC6809 CPU using the MC6809 library
- A total of 16MB of video RAM, 64KB directly accessible by the CPU
- Screen resolution of 320x200 pixels, refresh rate of 60Hz
- Blitter chip for fast graphics processing
- Programmable using either MC6809 assembly or the Squirrel Programming Language
work in progress
$000-$0ffdirect page (default after reset)$100-$3ffavailable ram and system stack pointer (768 bytes)$0400-$0fffinput/output area$400-$41fcore$800status register$801control register
$420-$43ftimer$440-$45fcommander (scripting engine)$500-$5ffkeyboard$500status register$501control register (writing only)$502/$503keyboard repeat delay ms (16 bit unsigned)$504/$505keyboard repeat speed ms (16 bit unsigned)$506pop keyboard event (reading only)$580-$5ffkeyboard state
$600-$7ffsound (big endian)$600-$61fsid 0$620-$63fsid 1$640-$65fsid 2$660-$67fsid 3$680-$69fsid 0 (all registers readable)$6a0-$6bfsid 1 (all registers readable)$6c0-$6dfsid 2 (all registers readable)$6e0-$6ffsid 3 (all registers readable)$700-$71fanalog 0$720-$73fanalog 1$740-$75fanalog 2$760-$77fanalog 3$780-$78fdelays (wip)$790-$79fmixer$7a0-$7ff(wip) reserved *$e00-$effblitter
$800-$8ffblitter base page$800status register (unused)$801control register- write
0b00000001: blit source to destination surface - write
0b00000010: tile blit source/dest/tile - write
0b00000100: clear destination surface with drawing color - write
0b00001000: pset - write
0b00010000: line - write
0b00100000: rectangle - write
0b01000000: solid rectangle
- write
$802source surface pointer (lowest nibble only)$803destination surface pointer (lowest nibble only)$804tile surface pointer (lowest nibble)$805drawing color$808-$809x0 for drawing operations (16 bit signed)$80a-$80by0 for drawing operations (16 bit signed)$80c-$80dx1 for drawing operations (16 bit signed)$80e-$80fy1 for drawing operations (16 bit signed)$810-$813vram peek base address (24 bits, $e10 always #$00)$818added alpha value during blits$819added gamma red during blits$81aadded gamma green during blits$81badded gamma blue during blits$81cadded gamma r, g and b (write only)
$900-$9ffblitter vram poke / peek page (see $810-$813)$a00-$affblitter surface descriptors (16 in total, 16 bytes each)$ax0-$ax1x position (16 bit signed)$ax2-$ax3y position (16 bit signed)$ax4-$ax5w width (16 bit unsigned)$ax6-$ax7h height (16 bit unsigned)$ax8-$axbbase address of surface data ($ax8 will always contain$00)$axcflags_0$axdflags_1$axeflags_2$axfindex ("sprite pointer")
$b00-$bffreserved$c00-$fffcolor table (32 bits color, 256 values, for 1, 2, 4 and 8 bit modes)$1000-$1fffcolor index tables (for 1, 2, 4 and ...)
$2000-$fbff55kb ram ($fc00 is initial usp)$fc00-$ffff1kb kernel + vectors
$010000-$ffffffavailable vram (16.320kb) of which:$f00000-$f2d8ffdefault framebuffer vram (182kb)$f3e800draw color, 32 bit, stored in vram (is this correct)
Create a build directory in the source tree mkdir build, run cmake .. from that directory and run make. Alternatively do mkdir Debug, run cmake -DCMAKE_BUILD_TYPE=Debug .. from that directory and run make.
Below some more OS specific intructions on how to prepare the build environment.
- Install Xcode from App Store
- When it asks to install command line tools, do that
- Install Homebrew
- From the Homebrew command line, install cmake and SDL2 libraries
To be done
To be done
- CCS64 - A Commodore 64 Emulator by Per Håkan Sundell.
- Commander X16 - The Commander X16 is a modern 8-bit computer currently in active development. It is the brainchild of David "the 8 Bit Guy" Murray.
- Commander X16 emulator - Software version of Commander X16.
- freeverb - Free, studio-quality reverb SOURCE CODE in the public domain
- Hatari - Hatari is an Atari ST/STE/TT/Falcon emulator.
- lib65ce02 - CSG65CE02 emulator written in C.
- MC6809 - MC6809 cpu emulator written in C++.
- Mega65 - The 21st century realization of the C65 heritage.
- Moira - Motorola 68000 cpu emulator written in C++ by Dirk W. Hoffmann.
- reSID - ReSID is a Commodore 6581 and 8580 Sound Interface Device emulator by Dag Lem.
- SDL Simple DirectMedia Layer - A cross-platform development library by Sam Lantinga designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware.
- Squirrel - Squirrel is a high level imperative, object-oriented programming language, designed to be a light-weight scripting language that fits in the size, memory bandwidth, and real-time requirements of applications like video games.
- stb - single-file public domain (or MIT licensed) libraries for C/C++
- TIC-80 - TIC-80 is a free and open source fantasy computer for making, playing and sharing tiny games.
- vAmiga - An Amiga 500, 1000, or 2000 on your Apple Macintosh by Dirk W. Hoffmann.
- vasm - A portable and retargetable assembler.
- VICE - The Versatile Commodore Emulator.
- VirtualC64 - A Commodore 64 on your Apple Macintosh by Dirk W. Hoffmann.
- visual6502 - Visual Transistor-level Simulation of the 6502 CPU and other chips.
Copyright (c) 2023-2025 elmerucr
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

