Wedge80
A downloadable tool
Wedge80 a C128 BASIC extension for VDC graphics
Copyright (c) 2026 Graham (Francesco Gramignani)
Version 1.12
Revision 29/1/2026
https://graham-it.itch.io
https://github.com/graham-it
https://csdb.dk/scener/?id=40810
Wedge80 is a program that extends the Commodore 128's BASIC V7 to support the graphics capabilities of the MOS 8563 VDC (Video Display Controller) chip, which is normally used only in 80-column text mode.
The name comes from the use of 'wedging', a programming technique that allows the behavior of the BASIC interpreter to be modified transparently to the user.
Wedge80 is compatible with all official revisions of BASIC V7 ROMs released for the C128, identified by the year of publication (1985 or 1986) displayed on the machine's startup screen.
Extended BASIC
To access the VDC chip's graphics capabilities, Wedge80 uses the same instruction set as BASIC V7, maintaining the original syntax and extending the range of supported parameters.
This way, the Wedge80 can manage both the extended graphics on the VDC and the standard graphics on the VIC-II, even simultaneously, ensuring full compatibility with existing software.
These instructions consist of commands and functions that can be entered by the user in either direct or program mode.
The extended commands are:
| GRAPHIC | Selects the current screen mode |
| SCNCLR | Clears the selected screen mode |
| COLOR | Sets a color for the selected source |
| LOCATE | Places the pixel cursor to a specified position |
| DRAW | Draws dots, lines, and shapes |
| BOX | Draws a BOX on the screen |
| CIRCLE | Draws circles, ellipses or arcs |
| PAINT | Fills an area starting from a specified position |
| CHAR | Displays a string of characters on current bitmap screen |
| SSHAPE | Saves an area of the the screen into a BASIC string variable |
| GSHAPE | Draws a shape stored in a BASIC string variable |
| AUTO | Enables the AUTOFAST mode |
| FAST | Sets the clock speed to 2 MHz (then AUTOFAST disabled) |
| SLOW | Sets the clock speed to 1 MHz (then AUTOFAST disabled) |
| HELP | Displays Wedge80 info followed by the last BASIC program error |
| QUIT | Disables Wedge80 BASIC extension |
The extended functions are:
| RGR(n) | Returns the value of the current screen mode |
| RDOT(n) | Returns the current bitmap coordinates or pixel status |
| RCLR(n) | Returns the value of the color source specified |
| POS(n) | Returns the cursor position within the current text screen window |
A detailed description of the Wedge80's extended instructions is provided in the "BASIC commands" and "BASIC functions" sections at the end of this document (in alphabetical order).
Instructions not mentioned remain unchanged, and for their use, please refer to the BASIC V7 Encyclopedia, found in the "Commodore 128 Personal Computer System Guide" and the "Commodore 128 Programmer's Reference Guide" (Bantam, 1986).
Installation
To install Wedge80, after inserting the disk containing the program, you can proceed in the following ways:
DLOAD "BOOT" (equivalent to LOAD "BOOT",8)
RUN
or:
RUN "BOOT"
The spaces were added for readability and are ignored by the BASIC interpreter.
With the VICE C128 emulator, you can drag the provided disk image (.d64) into the program window to automatically load and install Wedge80.
Alternatively, if you want to keep a BASIC program already present in memory, you can load and execute the machine language code directly, with the command:
BOOT "WEDGE80"
This command may not work in early versions of the C128, due to a bug in the KERNAL, so you need to use the following commands:
BLOAD "WEDGE80"
SYS 4864
or:
LOAD "BOOT",8,1
NEW (required command)
SYS 4864
In the latter case, any BASIC program present in memory will no longer be available.
Utilization
With Wedge80, you can manage both extended graphics on VDC and standard graphics on VIC-II, even simultaneously.
Graphics commands are applied to the last graphics mode used, which can be selected with the GRAPHIC command (quickly accessed from the keyboard with the 'F1' key):
- GRAPHIC 1 VIC-II bitmap (320 x 200, 2 colors per 8 x 8 cell)
- GRAPHIC 3 VIC-II bitmap (160 x 200, 4 colors per 8 x 8 cell)
- GRAPHIC 6 VDC bitmap (640 x 200, 2 colors for the entire screen)
Modes 2 and 4 are similar to modes 1 and 2 with the addition of split screen (not available on VDC).
To clear the screen, simply add the '1' option preceded by a comma to the commands described above, or use the SCNCLR command (corresponding to the 'F4' key).
To draw a line on the screen, you can use the DRAW command, which (as in BASIC V7) is based on the Bresenham algorithm:
DRAW [mode][,x0,y0][TO x1,y1][...]
The options in square brackets can be omitted, but if the first parameter is missing, the initial coordinate pair must be preceded by a comma.
The 'mode' option (which replaces 'source', i.e., the color source in the case of the VIC-II) on the VDC screen specifies how pixels should be drawn:
0 = to delete
1 = to draw (default)
2 = performs an XOR with the pixels already present on the screen
Coordinates represent the starting and ending points of the line, which can be extended with other lines to form a line segment or polygon.
If the starting coordinates are omitted, the line will start from the last point drawn by the previous instruction. If the 'TO' keyword is missing, one or more isolated points will be drawn.
In addition, coordinates can be expressed relative to the current position in the following ways:
- by prefixing the coordinates with the '+' and '-' signs
- using polar notation, length and angle (in sexagesimal degrees)
separated by a semicolon ';'
VDC bitmap mode can be deactivated in the following ways:
- GRAPHIC 5 the cursor switches to the 80-column display
- GRAPHIC OFF the cursor remains on the 40-column screen
Auto FAST mode
When Wedge80 is started, AUTOFAST mode is enabled by default. This allows extended Wedge80 commands to be executed in FAST mode (2 MHz), then automatically reverts to SLOW mode (1 MHz) upon completion.
AUTOFAST mode works in both direct and program modes and applies to both screens (VDC and VIC-II). It can be deactivated with the standard 'FAST' and 'SLOW' commands.
To reactivate it, enter the 'AUTO FAST' command (with or without the space between the two keywords).
At any time, you can find out whether AUTOFAST mode is active by using the 'HELP' command (which can be called up using the relevant hotkey on the C128 keyboard, which on the VICE emulator corresponds to the 'End' key).
ESCAPE sequences
The C128 offers several functions for controlling the screen editor, accessible directly from the keyboard via the ESC key (which in VICE 3.9 corresponds to the 'F9' key on a PC, or the 'F1' key in previous versions), followed by a key to form a sequence.
Among these, the 'ESC X' sequence allows you to quickly switch between 40-column and 80-column text mode (and vice versa).
When the 'ESC X' sequence is detected and the VDC is in bitmap mode, the 80-column text mode will be restored automatically, transparently to the user.
C128 Color table
The colors available on the VDC chip are different from those of the VIC-II, however in BASIC V7 their codes are rearranged to have a similar correspondence:
| Code | VIC-II | VDC |
|---|---|---|
| 1 | Black | Black |
| 2 | White | White |
| 3 | Red | Dark Red |
| 4 | Cyan | Light Cyan |
| 5 | Purple | Light Purple |
| 6 | Green | Dark Green |
| 7 | Blue | Dark Blue |
| 8 | Yellow | Light Yellow |
| 9 | Orange | Dark Purple |
| 10 | Brown | Brown |
| 11 | Light Red | Light Red |
| 12 | Dark Gray | Dark Cyan |
| 13 | Medium Gray | Medium Gray |
| 14 | Light Green | Light Green |
| 15 | Light Blue | Light Blue |
| 16 | Light Gray | Light Gray |
Wedge80 Library
Once installed, Wedge80 offers a function library that allows you to use the VDC graphics routines directly from a program written in machine language.
This is done via a predefined 'Jump table', ensuring compatibility of programs developed with this library, even if an updated version of Wedge80 is installed.
Jump table:
| Routine name | Address | Function (arguments/results) |
|---|---|---|
| InstWedge | $1300 | Install Wedge80 |
| StartWedge | $1303 | Enable Wedge80 |
| QuitWedge | $1306 | Disable Wedge80 |
| SetMem80_IO | $1309 | Set VDC bitmap address (enabling I/O space) |
| SetMem80 | $130c | Set VDC bitmap address |
| GetMode80 | $130f | Get VDC mode (VDC register 25 -> a) |
| SwapMode80 | $1312 | Swap VDC mode (text/bitmap) |
| SetTxt80 | $1315 | Activate VDC text mode |
| SetBmp80 | $1318 | Activate VDC bitmap mode |
| ClrBmp80 | $131b | Clear VDC bitmap screen |
| GetBgCol80 | $131e | Get VDC background color (RGBI code -> a) |
| SetBgCol80 | $1321 | Set VDC background color (a = RGBI code) |
| GetFgCol80 | $1324 | Get VDC foreground color (RGBI code -> a) |
| SetFgCol80 | $1327 | Set VDC foreground color (a = RGBI code) |
| GPlot80 | $132a | Draw a pixel (plotmode, XPOS, YPOS) (considering WIDTH mode and FILFLG) |
| GPlot80a | $132d | Draw a pixel (plotmode, XPOS, YPOS) |
| ReadPt80 | $1330 | Test a pixel (plotmode, XPOS, YPOS) (cell mask -> a) (zero bit = pixel status) (carry set = coords out of range) |
| DrawLn80 | $1333 | Draw a line (plotmode, XPOS, YPOS, XDEST, YDEST) |
| DrawBox80 | $1336 | Draw a box (plotmode, XCORDl, YCORDl, XCORD2, YCORD2, BOXANG) (x = fill flag) |
| Circle80 | $1339 | Draw a circle (plotmode, XCIRCL, YCIRCL, XRCOS, YRCOS, YRSIN, XRSIN, ANGBEG, ANGEND) (CIRSUB and DSTPOS to get 1st point on circle) (x = degrees per segment) |
| Paint80 | $133c | Fill a graphics area (plotmode, XPOS, YPOS) |
BASIC demos
Wedge80 comes with some demo programs written in BASIC to show how it works:
| BALLOON | A simple drawing |
| DARKNESS | Intensive use of lines |
| GFX EXAMPLES | Examples of geometric shapes |
| GLOBE80/40 | A comparison between the VDC and VIC-II graphics modes |
| MARBLE | Demonstration of the use of the CIRCLE command |
| MONOSCOPE | A classic TV test pattern |
| RND LINES | Draws random lines |
| RND SHAPES | Draws random polygons (using the CIRCLE command) |
| SIN(X) | Plots the graph of a mathematical function |
| RACING CARS | Demonstrates the use of the GSHAPE/SSHAPE commands |
| SPACESHIPS | Composes a figure by joining multiple modules (GSHAPE/SSHAPE) |
Sketch80 demo
Sketch80 is a simple demonstration program that allows you to draw on the VDC screen in graphical mode using the cursor keys.
Unlike the previous programs, this program is written in Assembly and uses the graphics library provided by Wedge80, which helps reduce the size of the compiled file.
The program resides in the BASIC area and can be loaded and started in the usual ways. When the program starts, it checks whether Wedge80 is installed and displays a warning if it is not.
The keyboard commands are as follows:
| HOME | Home position (center of the screen) |
| CLR | Clear screen (SHIFT+HOME) |
| LEFT | Move left |
| RIGHT | Move right |
| UP | Move up |
| DOWN | Move down |
| B | Change background color (SHIFT = rapid) |
| F | Change foreground color (SHIFT = rapid) |
| C | Clear mode (set/clear) |
| X | XOR mode (on/off) |
| D | Pixel width (single/double) |
| S | Clock speed (FAST/SLOW) |
| ESC | Exit |
| RUN/STOP | Exit (with break error) |
The arrow keys are those of the C128's extended keyboard (the gray keys in the top row), which on the VICE emulator correspond to the normal four cursor keys.
If the edges of the screen (side, top or bottom) are crossed, the cursor will appear on the opposite side.
Technical notes
The Wedge80 was designed for use on a standard C128 which has only 16 KB of dedicated VDC video RAM, enough to display a 2-color graphics resolution of 640 x 200 pixels.
Since the VDC's bitmap mode shares some memory with the 80-column text mode, every time you switch between modes, the information in that mode is overwritten.
In the current version of Wedge80, the BOX command has a bug that prevents the 'fill' option from working correctly in combination with XOR mode.
However, the XOR mode issues affecting the DRAW and CIRCLE commands in previous versions have been fixed.
Wedge80 remains active even in case of 'Warm start' (following the RUN/STOP + RESTORE keys are pressed) and the VDC is returned to 80-column text mode.
If the VDC is in bitmap mode at the time of a 'Warm start', consistency will be lost with the flag that redirects the output of graphics commands to the last used device (VIC-II or VDC).
In this condition, any command to draw on the VDC will write to the memory in text mode, causing abnormal characters and colors to appear.
To update the flag indicating the current graphics mode, simply re-enter one of the following commands:
- GRAPHIC 5 to maintain 80-column text mode
- GRAPHIC 6 to activate the VDC bitmap mode
During installation, some of BASIC V7's native graphics routines are copied to RAM and patched to match the VDC chip's bitmap graphics.
The RAM portion 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]
For this reason, while Wedge80 is active, it will not be possible to use the cassette device and the RS-232 interface.
However, the RAM dedicated to sprites remains available:
- Sprite pattern storage area [$0e00-$0fff]
Additionally, to access block 1 of RAM, some routines are installed in the 'Common RAM' (specifically in page 3 of the memory):
- Retrieve a character from RAM #1 [$03e4-$03ec] - Write a character to RAM #1 [$03ed-$03f5] - Eval patch routine [$03f6-$03fb]
These will overwrite part of the DO_DMA routine, making it impossible to access any external expansion memory (REU):
- RAM-resident portion of DMA routine [$03f0-$03fc]
If you ever need to restore the above functions, you can disable Wedge80 with the 'QUIT' command (which in BASIC V7 returns the error message 'UNIMPLEMENTED COMMAND').
After completing these operations, you can re-enable Wedge80 with the 'SYS 4864' command, unless the 'Application Program Area' memory area ($1300-$1bff) has been overwritten.
BASIC commands
The options indicated in square brackets are optional and, in the absence of a parameter, the subsequent parameters must be preceded by a comma, in a number equal to the omitted options.
The commands described here are arranged alphabetically, and spaces between options are added only for readability and are ignored by the BASIC interpreter.
AUTO
Enables the AUTOFAST mode.
Command syntax:
AUTO FAST (*)
(*) the space between keywords can be omitted.
Note: without the FAST argument, it operates as the standard AUTO command.
BOX
Draws a BOX on the screen as specified by the parameters that follow the command.
Command syntax:
BOX [mode],x0,y0 [,x1,y1][,angle][,fill]
mode =
0 clear pixels
1 set pixels (default)
2 XOR with foreground
x0,y0 = the top left corner coordinates
x1,y1 = the opposite corner (default = current position)
angle = the rotation in clockwise degrees (default = 0)
fill =
0 do not fill the shape (default)
1 fill the shape (*)
(*) the fill option does not work with XOR mode, due to the use of the standard BOX routine.
CHAR
Displays a string of characters to the bitmap screen at the position specified.
Command syntax:
CHAR [mode],col,row [,string][,rev]
mode =
0 clear using char shape (*)
1 draw solid char (default)
2 XOR with foreground (*)
3 OR with foreground (*)
col = 0..79 column to start printing at
row = 0..24 row to start printing at
string = string of characters to be printed
rev =
0 normal mode (default)
1 (or n > 1) reverse mode
(*) new options
CIRCLE
Draws circles, ellipses or arcs depending on the parameters specified after the command.
Command syntax:
CIRCLE [mode][,xc,yc][,xr][,yr][,sa][,ea][,angle][,incr]
mode =
0 clear pixels
1 set pixels (default)
2 XOR with foreground
xc,yc = the center of the circle (default = current position)
xr = the horizontal radius (default = 0)
yr = the vertical radius (default = xr)
sa = the starting arc angle (default = 0)
ea = the ending arc angle (default = 360)
angle = the rotation angle in degrees (default = 0)
incr = the number of degrees between each segment (default = 2)
Note: varying the number of degrees between each segment, it draws regular polygons as tringle (120), square (90), pentagon (72), exagon (60), etc.
COLOR
Sets a color for the selected source.
Command syntax:
COLOR src,col
src =
0 VIC-II background color
1 VIC-II bitmap foreground color
2 VIC-II multicolor 1
3 VIC-II multicolor 2
4 VIC-II border color
5 VIC-II or VDC text char color
6 VDC text/bitmap background color
7 VDC bitmap foreground color (*)
col = 1..16 the value of the color to be used
(*) new option
DRAW
Draws dots, lines, and shapes at the positions specified by the coordinates.
Command syntax:
DRAW [mode][,x0,y0][TO x1,y1][...]
mode =
0 clear pixels
1 set pixels (default)
2 XOR with foreground
x0,y0 = starting coordinates (default = current position)
x1,y1 = ending coordinates
Note: without parameters, it draws a dot at current coords.
FAST
Sets the clock speed to 2 MHz.
Command syntax:
FAST
Note: it implicitly disables the AUTOFAST mode.
GRAPHIC
Selects the screen mode and changes the current graphics screen.
Command syntax:
GRAPHIC mode[,clr][,sl]
mode =
0 VIC-II text (40-column)
1 VIC-II bitmap (320 x 200)
2 VIC-II split screen bitmap
3 VIC-II multicolor bitmap (160 x 200)
4 VIC-II split screen multicolor bitmap
5 VDC text (80-column)
6 VDC bitmap (640 x 200) (*)
clr =
0 do not clear screen (default)
1 clear screen (implicit on VDC switching from bitmap to text mode)
sl = 0..24 the starting line number of the VIC split screen bitmap (default = 20) (not available on VDC)
Alternate syntax:
GRAPHIC cmd
cmd =
CLR the VIC-II bitmap screen is cleared and then deallocated
OFF the VDC display is switched to 80-column text mode and then cleared, without changing the current text mode (*)
(*) new options
GSHAPE
Draws a shape stored in a BASIC string variable.
Command syntax:
GSHAPE string[,x,y][,mode]
string = the string variable where the shape to be drawn is stored
x,y = the top left corner coordinates where the shape is to be drawn (default = current coords)
mode =
0 place the shape as is
1 invert the shape
2 OR the shape with the area
3 AND the shape with the area
4 XOR the shape with the area
HELP
Displays program info, then operates as the standard HELP command.
Command syntax:
HELP
LOCATE
Places the pixel cursor to a specified position on the bitmap screen.
Command syntax:
LOCATE x,y
x,y: the position to move the bitmap pixel cursor to
PAINT
Fills an area starting from a specified position.
Command syntax:
PAINT [mode][,x,y][,opt]
mode =
0 clear all contiguous active pixels
1 fill an empty area (default)
x, y = the starting coordinates (default = current coords)
opt =
0 paint an area that is defined by the color source specified
1 paint an area that is defined by any non-background source (*)
(*) not applicable to 2-color bitmap
Note: the RUN/STOP key breaks painting at any time.
QUIT
Disables Wedge80 BASIC extension.
Command syntax:
QUIT
To disable Wedge80, the following steps are performed:
- Restore ESC handler indirect vector
- Restore BASIC indirect vectors
- Restore DO_DMA routine
- Restore VDC text mode
- Clear Wedge80 status flag (INIT_STATUS at $0a04, bit 5)
- Print a message
SCNCLR
Clears the selected screen mode, without changing the current graphics screen.
Command syntax:
SCNCLR [mode]
mode =
0 VIC-II text (40-column)
1 VIC-II bitmap (320 x 200)
2 VIC-II split screen bitmap
3 VIC-II multicolor bitmap (160 x 200)
4 VIC-II split screen multicolor bitmap
5 VDC text (80-column)
6 VDC bitmap (640 x 200) (*)
(*) new option
Note: without an argument, both the current text screen and the current active graphics screen will be cleared.
SLOW
Sets the clock speed to 1 MHz.
Command syntax:
SLOW
Note: it implicitly disables the AUTOFAST mode.
SSHAPE
Saves an area of the the screen into a BASIC string variable.
Command syntax:
SSHAPE string,x0,y0 [,x1,y1]
string = the string variable to which you wish to save the area of screen
(max 251 bytes = 2008 pixels)
the remaining 4 bytes are used for the shape size (x,y)
x0,y0 = the starting corner coordinates for the save
x1,y1 = the opposite corner (default = current coords)
BASIC functions
The functions described here accept a numeric value as an argument, enclosed in parentheses, and return the corresponding numeric value.
RCLR
Returns the current color value (1..16) of the color source specified.
Function syntax:
result = RCLR(n)
n =
0 VIC-II background color
1 VIC-II bitmap foreground color
2 VIC-II multicolor 1
3 VIC-II multicolor 2
4 VIC-II border color
5 VIC-II or VDC text char color
6 VDC text/bitmap background color
7 VDC bitmap foreground color (*)
(*) new option
RDOT
Returns the current pixel cursor coordinates or the pixel status at current position
depending on the value specified.
Function syntax:
result = RDOT(n)
n =
0 x-coord of the pixel cursor
1 y-coord of the pixel cursor
2 pixel status at current position (*)
(*) result applied to the current graphics screen:
VIC-II: color source of the pixel (0..3)
VDC: pixel status (0 = off, 1 = on)
RGR
Returns the value of the current screen mode.
Function syntax:
result = RGR(n)
n =
0 current screen mode (standard option)
1 current graphics screen (0 = VIC-II, 1 = VDC) (*)
2 current width mode (1 = normal, 2 = double) (*)
3 (or n > 3) current scale mode (0 = not active, 1 = active) (*)
(*) new options
For n = 0 the values and their meanings are as follows:
0 40 column text mode
1 Standard bitmap mode
2 Split screen bitmap mode
3 Multicolor bitmap mode
4 Split screen multicolor bitmap mode
5 80 column text mode
POS
Returns a value that indicates where the cursor is within the current text screen window (40 or 80 column).
Function syntax:
result = POS(n)
n =
0 cursor column
1 (or n > 1) cursor row (*)
(*) new option
Wedge80 v1.12 (c) 2026 Graham
https://graham-it.itch.io
https://github.com/graham-it
https://csdb.dk/scener/?id=40810
Download
Development log
- C128 Wedge80 v1.12 released47 days ago












Comments
Log in with itch.io to leave a comment.
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
BOOTcommand from working correctly. In those cases, use the following commands:BLOAD "WEDGE80"SYS 4864Or:
LOAD "WEDGE80",8,1NEW(Necessary!)SYS 4864During 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:
[$0b00-$0bff][$0c00-$0cff][$0d00-$0dff]The RAM dedicated to sprites remains available:
[$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):
Modes 2 and 4 are similar to 1 and 2 but with "split screen" enabled (not available on VDC). To clear the screen, append
,1to 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
modeoption (which replaces the "source" parameter on the VIC-II) indicates how pixels are drawn: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:
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
FASTorSLOWcommands. It can be re-enabled with the commandAUTO 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:
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:
Sketch80 is a special demo written in assembly that uses the Wedge80 library. It allows you to draw using the C128 cursor keys.
Controls:
Happy drawing! Graham
Thanks again! As you can see, the project is constantly evolving...
I am very impressed what you are doing so far, would be nice if you also could implement support for 64kb VDC and option for more (custum ?) resulutions. Keep it going on.
This is one of my goals, thanks for the appreciation!
Here is an ENGLISH TRANSLATION of the Instructions (done by Gemini AI):
Introduction
Wedge80 is a program that allows you to create and view high-resolution graphic images using the VDC (Video Display Controller, MOS 8563) video interface of the Commodore C128. The name refers to the fact that this program utilizes a technique called a 'wedge', which allows the user to interact with it through the BASIC command interpreter. These commands can be entered in both direct mode and program mode and use the same instruction set as the BASIC V7 language, ensuring compatibility with existing software.
Installation
Wedge80 consists of a single file, which can be installed into the C128's memory in the following ways:
Additionally, the provided .d64 image includes a 'BOOT' file, which allows you to start Wedge80 on the VICE emulator simply by dragging the disk image into the program window. During installation, some BASIC V7 graphic routines are copied into RAM and 'patched' so they can be applied to the bitmap graphics of the VDC chip, which has a different memory organization than the VIC-II.
Basic Usage
Once installed, the program prints a welcome message to inform the user that the system is ready for use. The 'HELP' command (accessible via the dedicated key on the C128 keyboard), while maintaining its original function, allows you to check if Wedge80 is active and view its version number. On the VICE 3.9 emulator, the 'HELP' key corresponds to the 'End' key, while in previous versions, it corresponds to the 'F5' key on the PC.
Wedge80 can be deactivated with the 'QUIT' command (which normally returns the 'unimplemented command' error message) without losing any BASIC program currently in memory. Furthermore, it can be reactivated at any time with the 'SYS 4864' command, provided that the user memory ($1300-$1bff) has not been cleared or overwritten.
With Wedge80 installed, traditional VIC-II graphics and extended VDC graphics can be used simultaneously. In fact, graphic commands are applied to the last graphic mode used, which is selected as follows:
The GRAPHIC command can be quickly called from the keyboard using the 'F1' key. To clear the screen, simply add the option '1' to the GRAPHIC command, or use the SCNCLR command (corresponding to the 'F4' key).
To draw a line on the screen, use the DRAW command, which in BASIC V7 is based on the Bresenham algorithm: DRAW mode, x0, y0 TO x1, y1
The 'mode' option, which replaces 'source' (the color source in the classic version), indicates how pixels should be drawn on the VDC screen:
The coordinates represent the starting and ending points of the line. Initial coordinates can be omitted to continue from the last point drawn. For more details on the commands affected by Wedge80, see the "BASIC commands" section below.
Auto FAST mode
When Wedge80 is started, the 'autofast' function is enabled. This allows Wedge80's extended commands to execute in FAST mode (2 MHz) and then automatically return to SLOW mode (1 MHz) once the operation is finished. This function was added for user convenience, as in FAST mode, the 40-column screen (VIC-II) is disabled, and the latter is the only active text screen while the 80-column output (VDC) is in graphic mode. The 'autofast' function works in both direct and program modes and can be deactivated by 'forcing' the processor speed with the standard 'FAST' and 'SLOW' commands. To reactivate the 'autofast' function, enter the command 'FAST AUTO' (with or without a space between the two keywords).
ESC sequences
The Commodore 128 offers various functions accessible directly from the keyboard via ESCAPE sequences (the ESC key on VICE 3.9 corresponds to the 'F9' key on the PC). Among these, the 'ESC X' sequence allows you to quickly switch between 40-column and 80-column text modes (and vice versa). This necessitated an additional 'wedge' to monitor when the 'ESC X' sequence is called while the VDC is in bitmap mode.
Note that every time you switch from 80-column text mode to VDC bitmap mode (and vice versa), the information contained within is overwritten. This choice was made because Wedge80 was designed for use on a standard C128 (not C128 DCR), which has only 16 KB of dedicated VDC video RAM—just enough to represent a 640 x 200 pixel resolution with 2 colors. Nothing prevents expanding the memory manageable by Wedge80 to 64 KB in the future, or allocating swap memory in the C128's main RAM to avoid losing information (text or bitmap) whenever the mode is changed.
Extended BASIC
The commands whose functionalities are extended by Wedge80 are:
The affected functions are:
Thanks for the translation, the description I posted was just a draft...
very nice idea, thank you.
Thank you for your interest!