MINIPAINT 1.2
Moderator: Moderators
- Mike
- Herr VC
- Posts: 4890
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
MINIPAINT 1.2
Hi, all!
Here's MINIPAINT, an editor for high resolution pictures on the VIC-20 (+16K RAM expansion required).
MINIPAINT is pixel-oriented, i.e. you can freely define individual pixels. The size of the picture is fixed to 160 pixels width and 192 pixels height.
The main screen of the editor shows three windows. All edit operations are done in the first – largest – window, which shows a zoomed view into the picture. This window is overlaid by a dialog box, when you invoke the help screens or want to access storage media.
A second window shows the same view in original size. This allows you to judge the mixing of nearby colours in the analogue video signal.
The third window shows all currently available colours, the cursor co-ordinates, and other additional information. Pressing the SPACE key toggles between editor and a full-screen preview.
MINIPAINT and the stored picture files are compatible to both PAL and NTSC. The pictures can easily be used by your own programs in BASIC and machine language. For BASIC programmers, the MINIGRAFIK extension provides powerful commands for loading, saving, and manipulating pictures in this file format.
A comprehensive manual, including a tutorial, is also available for download.
Greetings,
Michael
Here's MINIPAINT, an editor for high resolution pictures on the VIC-20 (+16K RAM expansion required).
MINIPAINT is pixel-oriented, i.e. you can freely define individual pixels. The size of the picture is fixed to 160 pixels width and 192 pixels height.
The main screen of the editor shows three windows. All edit operations are done in the first – largest – window, which shows a zoomed view into the picture. This window is overlaid by a dialog box, when you invoke the help screens or want to access storage media.
A second window shows the same view in original size. This allows you to judge the mixing of nearby colours in the analogue video signal.
The third window shows all currently available colours, the cursor co-ordinates, and other additional information. Pressing the SPACE key toggles between editor and a full-screen preview.
MINIPAINT and the stored picture files are compatible to both PAL and NTSC. The pictures can easily be used by your own programs in BASIC and machine language. For BASIC programmers, the MINIGRAFIK extension provides powerful commands for loading, saving, and manipulating pictures in this file format.
A comprehensive manual, including a tutorial, is also available for download.
Greetings,
Michael
Last edited by Mike on Thu Feb 20, 2014 4:33 pm, edited 8 times in total.
- Mike
- Herr VC
- Posts: 4890
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Thanks!orion70, Jeff-20, nbla000 wrote: Michael, you're always a source of surprise! Congrats on this remarkable effort.
oh my goodness...!
Wow, very good tool, my compliments !!! [...]
I did the first designs on the concept of MINIPAINT one year ago. Since the file format of the pictures had been fixed by the @SAVE, and @LOAD commands of MINIGRAFIK, it appeared to me as logical step to write the corresponding editor.
Then I thought, if I could use something like MS Paint on the PC, and take a small MG programm on the VIC to convert the picture, what would be the point in writing an editor running on the VIC? This is how I produced the graphics for VICtoria, for example. For this reason, I put aside the project for quite a while.
Two months ago, two or three postings, not directly referring to each other, asked about a 'standard' image format, asked about 'low-res' blocky 4x4 pixel graphics, and a means to display the pictures of another editor, which proved to be rather difficult. I realised there could be a sense in writing the editor for MG bitmaps, after all.
This is the main motivation for this project for me. The two parts of MINIPAINT, namely the editor itself, and MINIGRAFIK again, are working together as team:nbla000 wrote:... and the batch processing suite idea is very interesting.
MINIPAINT allows for a fine pixel oriented manipulation of the picture - where the draw mode, and the forthcoming attribute cell cut&paste expand its capabilities here. And MINIGRAFIK, even though it at first only makes the foundation of the editor - in providing the TV system neutral graphics mode, and storage -, it also allows for any conceivable off-line picture manipulation and conversion.
And since the editor has to 'compete' with programs like MS Paint, I considered it would be nice if the user might not anymore be aware of that MINIPAINT indeed runs on the VIC-20.
Greetings,
Michael
- Mike
- Herr VC
- Posts: 4890
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Koala export
Here's the program to export MG pictures in Koala format, ...
... with a supplementing Koala pic viewer for the C64:
Light purple, light cyan, and light yellow are converted to dark, medium, and light grey, respectively. All other colours are preserved.
The Koala pic viewer of course also displays original Koala files. Koala painter itself saves the files with a preceding control character. Even though, the viewer can load them with '?PIC x*', with x=A..P.
Greetings,
Michael
Code: Select all
10 V=36864:DIMR(15):FORT=0TO15:READR(T):NEXT
11 INPUT"MG SOURCE";S$:INPUT"KOALA TARGET";T$
12 @LOAD(S$),8:OPEN2,8,2,T$+",P,W":PRINT#2,CHR$(0)CHR$(96);
13 FORA=0TO191STEP8:FORB=0TO159STEP4:FORC=0TO7
14 PRINT#2,CHR$(64*@(B,A+C)+16*@(B+1,A+C)+4*@(B+2,A+C)+@(B+3,A+C));
15 NEXT:NEXT:NEXT:FORT=0TO319:PRINT#2,CHR$(170);:NEXT
16 D=R(PEEK(V+15)AND7):FORA=0TO11:FORB=1TO2:FORC=0TO19
17 A$=CHR$(16*R(PEEK(37888+A*20+C)AND7)+D):PRINT#2,A$A$;
18 NEXT:NEXT:NEXT:FORT=0TO39:PRINT#2,CHR$(D);:NEXT
19 D=R(PEEK(V+14)/16):FORT=0TO999:PRINT#2,CHR$(D);:NEXT
20 D=R(PEEK(V+15)/16):PRINT#2,CHR$(D);:CLOSE2:@RETURN:END
21 DATA0,1,2,3,4,5,6,7,9,8,10,12,11,13,14,15
22 :
23 REM ** MG TO KOALA EXPORT WRITTEN 2009 BY M. KIRCHER
Code: Select all
10 POKE55,0:POKE56,32:CLR:V=53248
11 FORT=0TO53:READA:POKE49152+T,A:NEXT
12 INPUT"KOALA PIC NAME";N$
13 SYS57812(N$),8:POKE780,0:POKE781,0:POKE782,32:SYS65493
14 POKEV+17,59:POKEV+22,216:POKEV+24,24
15 POKEV+32,PEEK(16192)
16 POKEV+33,PEEK(18192)
17 SYS49152
18 GETA$:IFA$=""THEN18
19 SYS58648:END
20 :
21 DATA 160,0,185,64,63,153,0,4,185,64,64,153,0,5,185,64,65,153,0,6,185,64,66
22 DATA 153,0,7,185,40,67,153,0,216,185,40,68,153,0,217,185,40,69,153,0,218,185
23 DATA 40,70,153,0,219,200,208,205,96
24 :
25 REM ** KOALA PIC LOADER WRITTEN 2009
26 REM BY MICHAEL KIRCHER
The Koala pic viewer of course also displays original Koala files. Koala painter itself saves the files with a preceding control character. Even though, the viewer can load them with '?PIC x*', with x=A..P.
Greetings,
Michael
Last edited by Mike on Thu Feb 20, 2014 4:34 pm, edited 3 times in total.
- Mike
- Herr VC
- Posts: 4890
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Well, that leaves some hard guesswork to the back-converter, but then ...saehn wrote:Now if there's a way to convert a KOA to MiniPaint, I'd be in love!
The greys would be converted back to light purple, light cyan, and light yellow.Of course, it would have the same color restrictions...
One attribute cell in MG format translates to 2x2 attribute cells in Koala, starting at even text co-ordinates.and maybe you could only use double-wide pixels in the KOA,
Should an 8x16 area use only either the background colour (which is stored in the Koala - and thus known), or one of the first 8 colours, it can be processed back to valid MG data - as hires cell.
... actually, the MG format gives 192 lines (at 160 pixels horizontal resolution), and KOALA EXPORT fills the remaining 8 lines with the MG border colour.and 176 high pixels... but that would be fine with me!
The hard part is working out the heuristics for detecting which colour is the auxiliary colour. I'll look into it.
Edit: I've found a solution. It will require two passes over the source image. The first pass scans the picture until two different four-colour cells are found, which contain 3 non-background, non-border colours total. The non-background, non-border colour which appears in both cells must be the auxiliary colour. The second pass then knows all 3 global colours, and can assign the foreground colour for each attribute cell.
- Pedro Lambrini
- Vic 20 Scientist
- Posts: 1132
- Joined: Mon Dec 01, 2008 11:36 am
Wow! Real life usage of this in my crappy BASIC programs is a little over my head but I know a gem when I see one. It'll be interesting to see how all the real talent around will use this...can't wait!
"...That of the Eastern tribe being like a multitude of colours as if a rainbow had settled upon its brow..." Daniels 1:3
- Mike
- Herr VC
- Posts: 4890
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Hi, Pedro,
o 3D function & Mandelbrot set,
o MINIGRAFIK Demo,
o Wall clock,
o 3D Bar Chart,
o another 3D function by nippur72,
o 3D Pie Chart,
o Earth globe,
o animated Earth globe,
o MG text print,
o PGM Import, which will also be included in the batch processing suite of MINIPAINT, and finally of course:
o VICtoria Gold Edition (together with orion70).
Greetings,
Michael
Over the last years I've published quite some examples which use the MINIGRAFIK extension. They were never meant as complete solutions but rather as starting points to improve upon, or to spark other ideas:Pedro Lambrini wrote:Wow! Real life usage of this in my crappy BASIC programs is a little over my head [...]
o 3D function & Mandelbrot set,
o MINIGRAFIK Demo,
o Wall clock,
o 3D Bar Chart,
o another 3D function by nippur72,
o 3D Pie Chart,
o Earth globe,
o animated Earth globe,
o MG text print,
o PGM Import, which will also be included in the batch processing suite of MINIPAINT, and finally of course:
o VICtoria Gold Edition (together with orion70).
I see the whole lot simply as tools. Something to make VIC graphics easier accessible. As I wrote earlier, one program in the batch processing suite will transform MINIPAINT into a character set editor for all 256 characters - I presume this is the first native program which is able to do that. Even if a game doesn't use bitmapped graphics, its presentation can always profit from a set of UDG's.Pedro Lambrini, Ivanhoe76 wrote:[...]but I know a gem when I see one. It'll be interesting to see how all the real talent around will use this...can't wait!
really awesome!!!
Greetings,
Michael
- Mike
- Herr VC
- Posts: 4890
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Here's King Tut (contained in the Pictures section of the MG batch suite), pixeled with MINIPAINT:
I used a suitably cropped, and re-sized photo, and a variant of PGM import to obtain a first workstage in white, light orange, orange, and blue. The lower part of the snake (in cyan), and the black shades were added in MINIPAINT.
Outside MINIGRAFIK, or MINIPAINT the file must be loaded ,8 (not ,8,1!), and then RUN. You'll need at least an 8K RAM expander to view the image this way.
I used a suitably cropped, and re-sized photo, and a variant of PGM import to obtain a first workstage in white, light orange, orange, and blue. The lower part of the snake (in cyan), and the black shades were added in MINIPAINT.
Outside MINIGRAFIK, or MINIPAINT the file must be loaded ,8 (not ,8,1!), and then RUN. You'll need at least an 8K RAM expander to view the image this way.
Last edited by Mike on Fri Sep 16, 2016 1:55 pm, edited 4 times in total.
- Mike
- Herr VC
- Posts: 4890
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
I presume you mean the King Tut image.
Unfortunately, VICE will load the file ',8,1', which won't work directly, because MG images do have a load address of $10F1. If you however, load the file by LOAD"KING TUT.PRG",8 and then RUN it, the image is displayed. The VIC waits for a key press, and then resets.
This is just one of several possible ways to display a MG format file: LOADing, and RUNning it, as if it were a BASIC program. I suppose it can't be more simple. The second, and third way means: using the @LOAD command of MINIGRAFIK, or loading it into MINIPAINT. All these methods also apply with the file residing in a *.d64 disc image file, or on a physical 5 1/4 inch disk - with a real VIC-20.
Unfortunately, VICE will load the file ',8,1', which won't work directly, because MG images do have a load address of $10F1. If you however, load the file by LOAD"KING TUT.PRG",8 and then RUN it, the image is displayed. The VIC waits for a key press, and then resets.
This is just one of several possible ways to display a MG format file: LOADing, and RUNning it, as if it were a BASIC program. I suppose it can't be more simple. The second, and third way means: using the @LOAD command of MINIGRAFIK, or loading it into MINIPAINT. All these methods also apply with the file residing in a *.d64 disc image file, or on a physical 5 1/4 inch disk - with a real VIC-20.
Last edited by Mike on Thu Sep 29, 2016 4:07 am, edited 2 times in total.