Videopac G7000
Last changed: 2007-08-31

The VPP screen editor

The VPP screen editor is an example program showing how to insert the FlashCART firmware into your own programs. It uses the firmware to transfer screens between the Videopac+ and the PC. It also shows how to send local commands to the firmware. Since it is a demo program it still has some rough edges and is missing some minor features, but it is usable.

The VPP screen editor needs a Videopac+ and a FlashCART to run with all features. It is possible to run it on a MegaCART, but you can't save your work. You can also run it on a O2em with a working MegaCART emulation, version 1.17.4 is ok, or patch version 1.18 with the patches by me on its sourceforge page. If you do the latter you can even save your work in the debugger with savevpp, but there is no way to load it back into O2em.

The saved screens have the same format as the demo screens for my slide show program.

Instructions for the Videopac+ screen editor

The editor has several different modes. Each mode has its own set of functions. The editor starts in main mode. From there you can access all other modes with certain keys. You can always get back to the main mode by pressing the ESC key.

Moving the cursor

In main mode you can move the cursor with the cursor keys of the Videopac+ keyboard. Use SHIFT and cursor left/right to jump to the beginning or end of a line. You can also press the × key to jump to the home position. The home position is at X00 Y00 at the top left of the screen just under the service row. The uppermost line is the service row, it can be turned on and off independently from the rest of the screen under program control. It is also logically below all other lines at Y1F. The cursor movements follow the physical positions, so to reach the service row press cursor up from the home position.

You can also move the cursor in all modes with the joystick.

The info display

There is a 2 line information display on the screen. Its default position is in the lower right of the screen.

The first line shows the cursor position. The hexadecimal number after X is the column, the hexadecimal number after Y is the row. Behind the cursor position is one char for the current mode or nothing for main mode.

The second line shows the character and attribute of the cursor position in hexadecimal, the char after C, the attribute after A. The space after that is used for several things. First it shows any incompletely entered hexadecimal number after a H. It also shows a default attribute after D, but only when it is active.

The info display can be moved to all 4 screen corners or turned off by pressing the m key. Each press moves to a different position.

Global display parameters

The Videopac+ has some global display parameters: blinking, conceal mode and box mode. All these modes can be toggled by pressing b for blink, c for conceal and o for box mode. There is no display for the currently chosen settings since they are obvious as soon as they are used.

Attribute changes

Press a to enter attribute change mode. This is signalled by an A as the mode letter. Any hexadecimal number you enter sets the current attribute and moves to the next cursor position. The cursor keys still move the cursor around. Press ESC to leave this mode.

You can set a default attribute for the insert and replace modes by pressing SHIFT a end entering a hexadecimal number. All further char changes also set the attribute to this default value. This is shown after D in the second line of the info display. Press CNTL a to clear the default attribute.

Character changes

There are 2 different char changing modes: insert and replace mode. Replace mode overwrites anything already written while insert mode moves it to the right and loses the char at the end of the line. Both modes are available as normal and hex modes.

Press r to enter normal replacement mode. It has the mode letter R. Any key pressed on the keyboard will now change the current char to whatever key you pressed. Use SHIFT for upper case and special chars. The attribute will only be changed if the default attribute is active. Only the joystick can be used for cursor movement, the cursor keys are used to write math symbols.

Press SHIFT r to enter replace hex mode. It has the mode letter X. Now you can enter hexadecimal numbers for the char data. The default attribute works as usual. You can also use the cursor keys for cursor movement.

Press i for insert mode, the mode letter is I. Any key pressed on the keyboard will now insert the symbol on the key. The rest of the line is moved to to right, the char on the right border is lost. The attribute is copied from the char under the cursor, except when the default attribute is active.

Press SHIFT ifor insert hex mode, mode letter H. Any hexadecimal number entered on the keyboard will be inserted at the cursor position while the rest of the line is shifted to the right. The attribute handling is the same as in normal insert mode.

Store a position, range definitions

Press the . key to store the current position. If there is already a stored position the cursor is moved there. Use CNTL . to clear the stored position. The stored position is mostly used for range definitions. It defines a rectangle together with the current cursor positions for certain commands.

Deleting stuff

Use CLEAR to delete the char under the cursor. The rest of the line is moved left and a space will be inserted at the right border. Use SHIFT CLEAR to delete the current line. The rest of the screen is moved up and an empty line is inserted at the bottom of the screen. Use CNTL CLEAR to clear the range between cursor and stored position. If there is no stored position the whole screen is cleared.

Inserting and splitting of lines

Press ENTER to split the current line before the cursor position. The part starting at the cursor position is moved to the start of the next line. All other lines behind that are moved down one line, the last line is lost.

Press SHIFT ENTER to insert a line before the current line. The screen starting with the current line is moved down, the last line is lost.

Using the EEPROM for copy and paste

If you have an EEPROM on the FlashCART you can store and retrieve char and attribute data. There are no checks if the data will fit into the EEPROM. Only a 93C86 is big enough for a full screen. It is too small to also store slice data. There is no way to store slice data locally, you need a PC for that.

Press s then y for confirmation to save the rectangle between the stored position and the cursor position into the EEPROM. If there is no stored position then the whole screen is stored.

Press l then y for confirmation to load the stored EEPROM contents back to the screen at the current cursor position as top left for the stored contents. If the stored contents is too wide or high to fit on the screen it is not loaded back.

Activating FlashCART communication

Press f then y for confirmation to start the FlashCART communication mode. Then you can use the PC to save the current screen with --readvpp or use --writevpp to load back a previously saved screen. Use the --endcomm command to get back to main mode. ESC does not work here since the code running is no longer from the VPP editor but from the FlashCART firmware.

The slice editor

Press e over a char with editable slice data (0A0h-0FFh) to enter the slice editor. The info display is changed to a bitmap of the char you edit in white. The edit cursor is the small red dot. You can leave the slice editor by pressing e again or by using ESC.

Cursor and bitmap moving

The cursor keys now move the edit cursor over the bitmap display. You can also use the joystick for that. Use m to move the bitmap display to any of the corners or to the middle of the screen. You can also turn off the whole VPP display by pressing b. Press it again to activate the VPP display again. Use c to toggle the display of the edit cursor.

Changing the bitmap

Use y or YES to set the current bitmap position, n or NO to clear it or SPACE to invert it. All these changes are also directly shown on the char which was under the cursor when the slice editor was started.

The block graphics editor

Press g to start the block graphics editor. Again the info display and cursor change, you can now draw block graphics in 2x3 blocks per char. Leave it by pressing g or ESC. The cursor keys work as usual including SHIFT for begin or end of line.

The info display

The cursor positions now have another digit reflecting the cursor position inside the char. The cursor is a small red dot. The second line of the info display shows information about the colors and mode in which you can draw. First after the C is the foreground color, defaulting to white. Separated by a space is the background color, this is black by default. Next is a filled block or a = symbol to show if the blocks touch each other or not. Last is an S or B for stable or blinking graphics. The info display can be moved as usual with m.

Changing display parameters

Since you can draw blinking or stable blocks, the b key can still be used to toggle display blinking on or off. The c can be used to turn off the red dot cursor. Pressing it again turns the cursor back on.

Selecting colors and mode

Use the keys 0-7 to select the foreground color. Use SHIFT 0-SHIFT 7 to select the background color. You can exchange foreground and background color by using the SPACE key. Use f to toggle fill mode and l to toggle blink mode. All these keys do not change anything on screen, they just set the parameters.

Drawing block graphics

Press the RET key to set background color, foreground color, blink and fill bit of the current char cell to the selected values. Use y or YES to draw a block with the currently selected values. Use n or NO to clear a block with the currently selected values.

Key reference

KeyFunction
All modes
ESCBack to main mode
JoystickMove cursor
Cursor keysMove cursor
Main mode
SHIFT left/rightMove to begin/end of line
bToggle display blink mode
cToggle display conceal mode
oToggle display box mode
mMove info display
.Swap stored and current cursor position
CNTL .Clear stored cursor position
CLEARDelete current char
SHIFT CLEARDelete current line
CNTL CLEARDelete range
ENTERSplit line
SHIFT ENTERInsert line
aAttribute mode
SHIFT aSet default attribute
CNTL aClear default attribute
iInsert mode
SHIFT iInsert hex mode
rReplace mode
SHIFT rReplace hex mode
s then ySave range to EEPROM
l then yLoad from EEPROM
f then yFlashCART communication
eSlice editor mode
gBlock graphics editor mode
Slice editor mode
eBack to main mode
mMove bitmap display
bToggle VPP display on/off
cToggle bitmap cursor on/off
YESSet current pixel
NOClear current pixel
SPACEToggle current pixel
Block graphics editor mode
gBack to main mode
SHIFT left/rightMove to begin/end of line
mMove info display
cToggle dot cursor on/off
bToggle display blink mode
0-7Select foreground color
SHIFT 0-7Select background color
SPACEExchange selected foreground and background color
fSelect fill bit
lSelect blink bit
RETSet colors and mode for current char cell
YESDraw pixel at current dot cursor position
NOClear pixel at current dot cursor position

The download

Other useful pages