Funkpaint

Funkpaint is a multi format editor supporting hires, multi, multicolor interlaced pictures. It runs on a Commodore 64/128 and supports various input devices and memory expansions.

Features:

Last test version: Funkpaint 0.44b (2016.03.29)

Screenshot of zoom editor

Changelog:

0.44b
Fix filling and filled circle line-width.
Older changes are listed at the end of the document.

The zoom editor

The zoom editor is for doing pixel level work, so most of the screen is covered by a magnified view of the image. On hires pictures the pixel size is 4×4, for multicolor it's 8×4 and for multicolor interlace it's 8×8.

The zoom area is bordered by scrollbar which indicate the position of the edited window relative to the complete image size. It can also be used to navigate around in the image by clicking on the scroll bar which moves the area to the selected position.

Clicking the arrows will scroll the image to the respective direction. If a Micromys mouse adapter is used with a scroll wheel mouse then it's possible to scroll vertically with the scroll wheel. Horizontal scrolling is achieved by holding down the SHIFT key. The F2, F4, F6 and F8 keys are assigned for image scrolling as well.

The flashing rectangle in the zoom area is the cursor where new pixels will be set by SPACE (drawing color) or DEL (delete color). The cursor can be moved around by the cursor keys in the respective directions. The F1, F3, F5 and F7 keys can be used to move by 8 pixels, which is useful for fast line drawing. When moving the cursor with keys the zoom area scrolls automatically in a way that at least one character row/column is always visible ahead.

Flashing crosses near to the cursor mark the borders of the active character for hires and multicolor pictures.

Setting pixels can be done by the cursor keys while holding the SPACE or the DEL keys or by holding the left or right mouse buttons while moving the mouse. When using the mouse for drawing the cursor follows it.

The top right corner contains an original sized cut out of the edited image for multicolor and hires pictures. For multicolor interlace pictures use the button to preview changes.

There's a 4×4 block of colors on the right side, this can be used to select the drawing color by left or right clicking on it. The drawing color is shown by a flashing rectangle, the delete color (right button or DEL key) is not indicated. The drawing color and the delete color can be exchanged by pressing C.

Setting the drawing color to the one under the cursor can also be done by using the STOP key, or the middle mouse button.

Colors can also be selected from the keyboard by the 1, 2, 3, 4, 5, 6, 7 and 8 keys with or without shift just like in BASIC, or by pressing the Q, W, E, R, T, Y, U, O and I keys for the shifted set of colors.

Dittering mode can be changed by the H key. The current one is displayed next to the brush display.

Brush size can be changed by the D key. The current one is displayed next to the color display.

The A key select pen and the S the brush.

The movement speed is displayed after the SPEED: text. Big numbers mean faster movement. The + and buttons can be used to adjust the speed.

The active pixel and character positions are displayed after the XP:, YP:, XC: and YC: texts respectively.

The colors used in the active character are shown after the C1 (bits %10, lower nibble), C2 (bits %01, high nibble) and C3 (bits %11, color memory). The background color is displayed after BK (bits %00), while the foreground color is FG (bits set on hires images). Unused bit combinations are indicated by two shades of gray instead of a single color.

The bit pattern assignment is automatic. If the painted color is present in the character, the already assigned bit pattern is used, otherwise the first free one is used from top to bottom.

It can happen that there are no more free bit patterns to assign the new color. Then the bit pattern of the overwritten pixel will be assigned to the new color, which will recolor all the other pixels with this bit combination in the character. On multicolor and multicolor interlace images if this was a background pixel, then no pixel is set or recolored.

On hires and multicolor images the foreground and background colors can be exchanged by pressing SHIFT + C. This will not change the displayed image itself, but it can be used to ensure consistent assignment of bit patterns of colors for underlayed sprites use for example. SHIFT + X toggles transparency display mode, which makes bit pattern verification easier.

Pressing the button takes to the view mode, while pressing M activates the disk menu.

The color of background for multicolor and multicolor interlace pictures can be set to the drawing color by pressing B.

The HOME key fills up the active character with background color on multicolor and multicolor interlace pictures. On hires pictures the delete color is used. The complete picture can be filled up using CLR.

The undo function is activated by SHIFT + Z, redo is C= + Z. The undo level depends on the available memory. There's no redo and only a limited single level of undo without a memory expansion. Simple moving and drawing with the same color with the keyboard does not create an undo point.

The L key toggles between pixel and interlace emulation in the interlace zoom editor.


The view mode

The view mode shows the whole picture at the same time. There's a toolbar made of sprites on the top border.

The color rectangles can be used to select the drawing color and the delete color by clicking with the left and right mouse button. The drawing color and the delete color can be exchanged by pressing C.

Setting the drawing color to the one under the mouse can also be done by using the middle mouse button.

Colors can also be selected from the keyboard by the 1, 2, 3, 4, 5, 6, 7 and 8 keys with or without shift just like in BASIC, or by pressing the Q, W, E, R, T, Y, U, O and I keys for the shifted set of colors.

The color of background for multicolor and multicolor interlace pictures can be set to the drawing color by pressing B.

The pen and brush icons can be used for free hand drawing.

The brush select icon shows the actual brush. Clicking multiple times on the icon selects different sizes.

The filled polygon icon works like the freehand mode. However when the button is released the area is closed by a line to the starting point and then it's filled up.

The line icon is for line drawing, the start point is selected by holding down the left button, the end point is set when the button is released.

The curve icon is for curved lines, selecting start and end is the same as for the straight line, after that the control point is placed by left clicking.

The box and filled box icons are for box drawing, the start corner is selected by holding down the left button, the end corner is set when the button is released.

The circle and filled circle icons draws circles. The middle point is selected by holding down the left button, the diameter is set when the button is released.

The copy icon activates copy mode. Area definition works like the box drawing tool (select, hold, release). Copies are created by left click, exit with STOP.

The flood fill icon fill a closed area. It fills up the area where it was started bordered by other colors.

The pattern icon shows the current dittering mode. Clicking multiple times on the icon selects different patterns.

To select the tools from keyboard use the A, S, D, F, G and H keys, this is equivalent to clicking on them.

The undo function is activated by SHIFT + Z, redo is C= + Z.

The + and buttons can be used to adjust the joy speed.

Right now the cursor keys can be used to scroll the image by 8 pixels. This function will go away as soon as the copy function is implemented.

Pressing SPACE or takes back to the zoom editor. If the mouse was moved then the zoom editor follows it's position. If you don't want this then use the latter one, that will not alter the position.

Pressing M activates the disk menu.


The file manager

Most of the screen is covered by the directory list. This can be updated by pressing D.

The active drive can be selected by pressing C.

Loading and saving is done by L and S, executable pictures can be saved by P.

Loading or saving in other picture formats are selected by pressing the keys as indicated on the right side, right now these are Koala and Art studio.

Pressing E or CRSR=> takes back to the zoom editor.


Picture formats

Hires
2 bytes load address
1024 bytes screen
8000 bytes bitmap
Multicolor (same as Drazpaint)
2 bytes load address
1024 bytes color
1024 bytes screen
8000 bytes bitmap
1 byte background
Multicolor interlace (same as Drazlace)
2 bytes load address
1024 bytes color
1024 bytes screen
8000 bytes bitmap
1 byte background
1 byte padding
1 byte shifting mode (0/1)
189 bytes padding
8000 bytes bitmap

Input devices

Joystick
8 directions, with acceleration. 1 button only. Works on port 1 or 2.
Amiga mouse / Atari ST mouse / Atari CX-22 trackball

1 button only when connected to the joy port, unless the resistor hack for right/middle buttons was done on the POT lines. The mouse blocks the keyboard most of the time, but maybe it's slightly better on port 2.

3 buttons are supported on the userport classical games adapter port 3 (PB6 as right and PA2 as middle buttons). This method is recommended as the keyboard is not disturbed.

Some Amiga mouse converters may not work as they give the pulses too fast.

1351 mouse

2 buttons, 5 with Micromys or compatible adapters.

Please note that after the mouse is connected for the first few movements the cursor jumps around. This is normal, and it starts to behave after the encoding range is determined.

Works on both ports, but port 2 is recommended to avoid unexpected interference with the keyboard (e.g. left button and right shift on port 1 blocks operation).

C128 num pad
8 directions, with acceleration using the number keys. Left button is key 5 or 0, right is ..

If not all 3 buttons exists the right button can be emulated by pressing SHIFT and the middle one by C= together with the left button.

Sideways scrolling can be achieved by pressing SHIFT while scrolling vertically.

A special keyboard handler is used to track simultaneous key presses, this allows using cursor keys in zoom mode while holding down the SPACE or DEL. It can suppress most joy port disturbance, however there's a smaller chance of invalid key presses if port 2 is used.


Memory expansion

Extended and internal memory is used for storing undo states. The number of states depends on the memory size.

None
Minimal undo. Can't undo bigger changes fully, and some operations or no supported at all. Use carefully and only when nothing else is available.
C128
The second bank is used in native mode as a 60 KiB storage.
DTV
1920 KiB is available.
GeoRAM
Size is autodetected, maximum of 4096 KiB can be used.
IDE64
64 KiB in several files for compatibility, as only 0.91 beta can read/write fast enough within a single file.
+60K
48 KiB can be used.
Ramcart
64 or 128 KiB can be used, size is detected.
REU
Up to 16 MiB, size is detected.
RetroReplay
Only 31 KiB. There could be some screen bugs while saving undo.
SuperRAM
Up to 15616 KiB, as indicated by the memory expansion registers.

Undo sizes are:

9 KiB hires
10 KiB multi color
18 KiB multi color interlace

There needs to be space for redo as well, that's why on RetroReplay there's no undo functionality for multicolor interlace pictures.

The internal minimal undo has only a very small memory and is one-way only (no redo). If it runs out of memory part of the changes will not be undone. Block changes like character erase, block copy, screen clearing or file load can't be undone with it.


Old changelog:

0.44a
Update documentation, remove DTV support.
0.43f
Limited undo of small changes even when no memory expansion is present
Larger brushes up to 8x8
Pen/brush directly selectable in zoom mode with A and S
0.43e
No more "color optimization". All pixels are preserved, unless forced to change by a color clash. As a follow up background color can be changed now without the risk of removing matching pixels.
Added B key to change background colour in view mode too.
0.43d
Get rid of inverted line/curve/box/circle preview, instead draw it for real so that color clashes can be previewed as well.
Fix color replacement strategy for filling
0.43c
Transparency mode and bit swapping for multi zoom (for transparency verification)
Exiting view mode with arrow will not move the zoom position now even if the mouse moved.
0.43b
Fix unused color display in hires zoom
Updated interlace zoom mode featuring interlace "emulation" (l)
Non-shifting interlace not supported any more
Set background color from right color when clearing multicolor or interlace
Dittering applies to inverted preview too
Block copy function, except for DTV.
Some C128 fixes
Transparency mode for hires zoom (for transparency verification)
0.43a
Leave one character scroll offset when moving by keyboard in zoom
Function-key fast movement in zoom can draw now with space/del held
View mode brushes, lines, etc. now available in zoom mode too, except for filling in some variants.
Display and change ditter mode in zoom
Scrolling from keyboard, disk menu from view mode
0.42b
Speed applies to mouse too, not just joy emulation. Bigger number now means faster.
Do not process numpad keys on C128 if mouse is on numpad
Additional left/right buttons for C128 numpad mouse
Dittering is not bound to specific tools anymore, more varieties, works in zoom mode
Better color replacement in view mode
Mouse support in disk menu file list, scroll bar implemented
Show draw and "clear" colors in zoom mode
Some zoom mode SuperCPU fixes
Speed up drawing a bit
0.42a
Fix filled box, and DTV filling
1351 range calibration/jump fix, Micromys support (wheel)
Support Amiga middle/right button with POT resistor hack
Driver for Atari ST mouse/CX-22 trackball
Left arrow switches back to zoom mode too
Most input devices work on both ports now, but better use port 2
Cursor follows mouse in zoom mode even when not drawing
Fix invalid device number on startup and junk directory header when it can't be loaded.
0.41d
Added filled circle, circle radius calculation, keep background color if koala picture is too short.
0.41c
Added filled polygon drawing tool
0.41b
Some hires optimization, multicolor circle draw fixed, DTV undo bug fixed, native c128 hires/multi version, some NTSC view mode raster bugs fixed, improved switching.
0.41a
Multi zoom preview, use delete color for HOME in hires zoom, better indication of unused bit patterns.