Here is an ENGLISH TRANSLATION of V 1.11 by Google Gemini;
Wedge80
A C128 BASIC extension for VDC graphics Copyright (c) 2026 Graham (Francesco Gramignani)
Version 1.11 Revision 15/1/2026
Introduction
Wedge80 is a program that allows for the creation and display of high-resolution graphic images via the VDC (Video Display Controller, MOS 8563) video interface of the Commodore 128.
This project was born from a desire to study the inner workings of Pangea Basic (
The name "Wedge80" refers to the fact that this program uses a technique called "wedging," which allows for adding new instructions to the BASIC interpreter or modifying its behavior. While the C128's BASIC 7.0 includes a set of dedicated graphics instructions, they are designed for 40-column mode (managed by the VIC-II chip) and do not support the graphic capabilities of the VDC chip, which is normally used only for 80-column text mode.
Wedge80 does not add entirely new keywords to C128 BASIC 7.0; instead, it extends existing instructions to work with the VDC chip's bitmap mode. It maintains the original syntax and ensures full compatibility with existing software. These instructions consist of commands and functions that can be used by the user in both direct and program modes.
Installation
To install Wedge80, simply run the "BOOT" program provided in the .d64 image file. On the VICE emulator, this can be done by dragging the disk image into the program window.
Alternatively, you can load and run the machine language code directly with the command: BOOT "WEDGE80"
On early versions of the C128, a bug in the KERNAL prevents the BOOT command from working correctly. In those cases, use the following commands:
BLOAD "WEDGE80"
SYS 4864
Or:
LOAD "WEDGE80",8,1
NEW (Necessary!)
SYS 4864
During installation, a portion of the native BASIC 7.0 graphics routines is copied into RAM and "patched" to adapt them to the VDC chip's bitmap graphics.
The RAM area hosting the new routines includes:
- Cassette buffer and Disk boot buffer:
[$0b00-$0bff] - RS-232 input buffer:
[$0c00-$0cff] - RS-232 output buffer:
[$0d00-$0dff]
The RAM dedicated to sprites remains available:
- Sprite pattern storage area:
[$0e00-$0fff]
These patches are necessary because the VDC has its own dedicated RAM, separate from the C128's main memory, and must be accessed via specific registers. Furthermore, VDC bitmap memory is organized differently than the VIC-II (where cells are 8x8 pixels); in the VDC, cells are arranged linearly across the screen and continue onto the next line.
Usage
Once installed, the program displays a welcome message to signal that the system is ready. The HELP command (accessible via the Help key on the C128 keyboard, or the "End" key in VICE) retains its original function but also displays the status of Wedge80 and the AUTOFAST function (explained below).
Wedge80 can be deactivated with the QUIT command (which normally returns an 'UNIMPLEMENTED COMMAND' error in standard BASIC 7.0) without losing any BASIC program currently in memory. It can be reactivated at any time with SYS 4864, provided the memory where the main Wedge80 routines reside (Application Program Area: $1300-$1bff) has not been erased or overwritten.
With Wedge80 installed, traditional VIC-II graphics and extended VDC graphics can be used simultaneously. Graphics commands and functions are applied to the last graphics mode selected via the GRAPHIC command (Shortcut: F1):
- GRAPHIC 1: VIC-II bitmap (320 x 200, 2 colors per 8x8 cell)
- GRAPHIC 3: VIC-II multicolor bitmap (160 x 200, 4 colors per 8x8 cell)
- GRAPHIC 6: VDC bitmap (640 x 200, 2 colors for the whole screen)
Modes 2 and 4 are similar to 1 and 2 but with "split screen" enabled (not available on VDC). To clear the screen, append ,1 to the commands above, or use SCNCLR (Shortcut: F4), though the latter does not change the current graphic mode.
To draw a line, use the DRAW command, which uses the Bresenham algorithm: DRAW [mode] [,x0,y0] [TO x1,y1] [...]
On the VDC screen, the mode option (which replaces the "source" parameter on the VIC-II) indicates how pixels are drawn:
- 0: Erase
- 1: Draw (default)
- 2: XOR with pixels already on the screen
Coordinates can be expressed relatively by prefixing them with + or -, or by using polar notation (length and angle in degrees separated by a semicolon ;).
VDC bitmap mode can be deactivated as follows:
- GRAPHIC 5: Cursor moves to 80-column text screen.
- GRAPHIC OFF: Cursor remains on 40-column screen.
Note: Switching between VDC text and bitmap mode overwrites the contained information. This is because Wedge80 is designed for a standard C128 with only 16 KB of VDC RAM—just enough for a 640 x 200 2-color resolution. Future versions may support 64 KB VDC RAM or swap memory to preserve screen data.
Auto FAST Mode
By default, Wedge80 enables AUTOFAST mode. This allows Wedge80's extended commands to execute in FAST (2 MHz) mode and then automatically return to SLOW (1 MHz) mode once the operation is finished. This was added because in 2 MHz mode, the 40-column (VIC-II) screen is disabled; AUTOFAST ensures the user can use graphics commands easily while still having a functional 40-column text display when the command finishes.
AUTOFAST can be disabled by manually using the FAST or SLOW commands. It can be re-enabled with the command AUTO FAST.
ESCAPE Sequences
The C128 features screen editor functions accessible via the ESC key followed by another key. Notably, ESC X toggles between 40 and 80-column modes. Wedge80 includes a specific wedge to monitor when ESC X is called while the VDC is in bitmap mode.
Extended BASIC
The following commands are extended in Wedge80: GRAPHIC, SCNCLR, COLOR, DRAW, BOX, CIRCLE, PAINT, CHAR, SSHAPE, GSHAPE, LOCATE, AUTO, FAST, SLOW, HELP, QUIT.
The following functions are extended: RCLR(n), RDOT(n), RGR(n), POS(n).
BASIC Commands (Summary)
(Note: Most of the technical syntax for GRAPHIC, SCNCLR, COLOR, DRAW, BOX, CIRCLE, PAINT, CHAR, SSHAPE, GSHAPE, LOCATE, etc., was already provided in English in your source text and remains unchanged.)
Key Additions/Changes for VDC:
- GRAPHIC 6: New VDC Bitmap mode.
- COLOR 7, col: New VDC bitmap foreground color.
- CHAR: Now supports mode 0 (clear), 2 (XOR), and 3 (OR).
- RDOT(2): Returns pixel status (0=off, 1=on) for VDC.
- RGR(1-3): New options for screen type, width, and scale mode.
- POS(1): New option to get the current row.
Wedge80 Library (Machine Language)
Wedge80 provides a library of functions accessible via a Jump Table starting at $1300. This ensures that programs developed using these routines remain compatible even if the main program is updated.
(The Jump Table provided in your text is already in a technical format suitable for English documentation.)
Demos and Sketch80
Several BASIC demos are included:
- TITLE: Welcome screen.
- DOUBLE GLOBE: Simultaneous VDC and VIC-II graphics.
- RACING CARS / SPACESHIPS: Demonstrates SSHAPE/GSHAPE.
Sketch80 is a special demo written in assembly that uses the Wedge80 library. It allows you to draw using the C128 cursor keys.
Controls:
- HOME: Center screen / CLR: Clear screen.
- B/F: Change Background/Foreground colors.
- C/X: Toggle Clear/XOR modes.
- D/S: Toggle Double width / FAST speed.
- ESC / RUN-STOP: Exit.
Happy drawing! Graham