fcbpaint-0.5 (168*192, 8x4 char, inline splits)

Basic and Machine Language

Moderator: Moderators

Post Reply
tlr
Vic 20 Nerd
Posts: 567
Joined: Mon Oct 04, 2004 10:53 am

fcbpaint-0.5 (168*192, 8x4 char, inline splits)

Post by tlr »

Name: fcbpaint-0.5
Author: tlr
Release Date: 2010-05-21
Requirements: VIC-20 (PAL) with 32Kb expansion.
Download: fcbpaint-0.5.zip

Description:
This is a preview of an editor for a new graphics mode I've been working on for a while.

The mode has 168*192 pixels with 8x4 char color and inline color splits.
The editor and viewer is a little rough around the edges but fully usable.
currently PAL only.

Basic format:
- bitmapped mode
- 21 * 48 "chars"
- each char is 8*4 pixels (hires) or 4*4 pixels (multicolor)
- each line (pixel row) has an initial border, background and auxcolor. (aux = $900E, border+bg = $900F).
- each line can split $900E and/or $900F in-line.

Splits:
- one register can change at a time. (eg, border+bg _or_ aux)
- splits always start at a point and continue until the next split to the right or until the end of the line.
- splits can start on any half char boundary (but will happen one hires pixel late)
- splits are compiled to machine code upon entering the viewer.
- the only way to guarantee that a particular combination of splits is allowed is to enter the viewer and check.
- there are some rules that can be followed to make success likely:
-- splits are always allowed 3 chars appart.
-- in some cases splits as close as 2 or 2.5 chars appart are allowed.

See the included README.txt for details.

Editor screenshot:
Image
Last edited by tlr on Sat May 22, 2010 2:56 am, edited 1 time in total.
User avatar
tokra
Vic 20 Scientist
Posts: 1123
Joined: Tue Apr 27, 2010 5:32 pm
Location: Scheessel, Germany

Re: fcbpaint-0.5 (168*192, 8x4 char, inline splits)

Post by tokra »

Wow! That is some nifty graphics-mode. Let me see if I understand how it works:

- you DON'T use double height chars (8x16), but the standard chars (8x8) instead.
- character-RAM is at $1000-$1fff
- video-RAM is at $0000 AND $0200 using the same 504 chars twice
- and so color RAM is at $9400 and $9600
- every 4 raster lines you switch the video-RAM (color-RAM switches automatically) as such providing a higher color-resolution (8x4 instead of 8x8)
- background, border ($900f) and multicolor ($900e) are switched at least on EACH raster-line, more often as raster time allows

Am I correct?

Especially the last feature impresses me. How do you manage to time the splits inside a raster-line so flexbile that the user can more or less decide where the color changes?

Oh, and are the demo-pics somewhere that demonstrate the power of this graphics-mode?
Kananga
Vic 20 Afficionado
Posts: 317
Joined: Mon Mar 08, 2010 2:11 pm

Post by Kananga »

Nice graphics mode. The editor looks like a colourful version of breakout. :)
So, could you have a 40-column text-mode with full colors?
Buy the new Bug-Wizard, the first 100 bugs are free!
tlr
Vic 20 Nerd
Posts: 567
Joined: Mon Oct 04, 2004 10:53 am

Re: fcbpaint-0.5 (168*192, 8x4 char, inline splits)

Post by tlr »

tokra wrote:Wow! That is some nifty graphics-mode. Let me see if I understand how it works:

- you DON'T use double height chars (8x16), but the standard chars (8x8) instead.
- character-RAM is at $1000-$1fff
- video-RAM is at $0000 AND $0200 using the same 504 chars twice
- and so color RAM is at $9400 and $9600
- every 4 raster lines you switch the video-RAM (color-RAM switches automatically) as such providing a higher color-resolution (8x4 instead of 8x8)
- background, border ($900f) and multicolor ($900e) are switched at least on EACH raster-line, more often as raster time allows

Am I correct?
Yes.
tokra wrote:Especially the last feature impresses me. How do you manage to time the splits inside a raster-line so flexbile that the user can more or less decide where the color changes?
This is the complex part. It's not yet fully bug free but works surprisingly well.
The splits are contained in tables at $6600, one for each raster line every 32 bytes.
format:

Code: Select all

    VVVVVVVV, WWWWWWWW  (V=<val0E>, W=<val0F>)
    PPPPPPPR, VVVVVVVV  (P=Position, R=Register, V=Value) 
    ...
    00000000
It is rendered by an instruction scheduler and register allocator that tries to align stores to specific cycles.
Basically I reserve the Y register to do screen/color/char mem switching.
A and X are free to use.

For each line it will generate code like:

Code: Select all

LDX #$3C     ;2
LDA #$1B     ;2
STA $900F    ;4
STX $900F    ;4
STA $900F    ;4
LDA $3E      ;3  <-- trick   $00-$ff contains sequential values (LDA $3E <-> LDA #$3E) 
STA $900F    ;4
NOP          ;2
NOP          ;2
BIT $EA      ;3
When the viewer is active the viewer code is at $2000 which you can examine in the monitor. (Currently each raster line ends with 3 * CLD)
tokra wrote:Oh, and are the demo-pics somewhere that demonstrate the power of this graphics-mode?
Not yet but I'd love people to make some pics using it!
I'm not much of a graphician myself.
User avatar
Mike
Herr VC
Posts: 4839
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: fcbpaint-0.5 (168*192, 8x4 char, inline splits)

Post by Mike »

tlr wrote:HISTORY
-------

fcbpaint V0.5, 2009-11-19
This makes me wonder what other gems are hidden on other people's HDs. :shock:
tlr wrote:Not yet but I'd love people to make some pics using it!
Since the graphics mode used by fcbpaint is a true superset of the one used in MINIPAINT, a converter could serve as useful start point:

Code: Select all

10 REM ** MG2FCB V2
11 :
12 INPUT"MG FILE";S$:INPUT"FCB FILE";T$:DN=PEEK(186):@LOAD(S$),DN:B=PEEK(36879)
13 OPEN2,DN,1,T$:PRINT#2,CHR$(0)CHR$(81)CHR$(70)CHR$(67)CHR$(66)CHR$(0);
14 PRINT#2,CHR$(BAND7)CHR$(BAND7);:FORT=1TO250:PRINT#2,CHR$(0);:NEXT
15 FORY=0TO11:GOSUB21:NEXT:FORT=1TO32:PRINT#2,CHR$(0);:NEXT
16 FORY=12TO23:GOSUB21:NEXT:FORT=1TO32:PRINT#2,CHR$(0);:NEXT
17 GOSUB25:GOSUB25
18 A=PEEK(36878)AND240:FORY=1TO192:PRINT#2,CHR$(A)CHR$(B);
19 FORT=1TO30:PRINT#2,CHR$(0);:NEXT:NEXT:CLOSE2:@RETURN:END
20 :
21 FORX=0TO19:AD=4352+192*X+8*Y
22 FORT=0TO7:PRINT#2,CHR$(PEEK(AD+T));:NEXT
23 NEXT:FORT=0TO7:PRINT#2,CHR$(85);:NEXT:RETURN
24 :
25 FORY=0TO23:AD=37888+20*INT(Y/2)
26 FORX=0TO19:PRINT#2,CHR$(PEEK(AD+X)AND15);:NEXT:PRINT#2,CHR$(8);:NEXT
27 FORT=1TO8:PRINT#2,CHR$(0);:NEXT:RETURN
28 :
29 REM ** MG2FCB V2 WRITTEN 2019-03-02 BY MICHAEL KIRCHER
(download)

As an example, I've converted the Smurf image I recently did in MINIPAINT, and loaded it into fcbpaint:

Image

Greetings,

Michael

Edit: repaired defunct links (again)

Edit 2 (2019-03-02): decommissioned original version of MG2FCB. Link updated, please reload and use only new V2 version!
Last edited by Mike on Thu Feb 20, 2014 5:27 pm, edited 7 times in total.
tlr
Vic 20 Nerd
Posts: 567
Joined: Mon Oct 04, 2004 10:53 am

Re: fcbpaint-0.5 (168*192, 8x4 char, inline splits)

Post by tlr »

Mike wrote: Since the graphics mode used by fcbpaint is a true superset of the one used in MINIPAINT, a converter could serve as useful start point:

As an example, I've converted the Smurf image I recently did in MINIPAINT, and loaded it into fcbpaint:
Very useful, nicely done!
User avatar
Ivanhoe76
Vic 20 Devotee
Posts: 200
Joined: Fri Sep 28, 2007 11:17 am
Location: Italy

Post by Ivanhoe76 »

amazing work, tlr... you're achieving something incredible, even for the "back in the days programmers"!!!!
No one should tolerate death and violence because tolerance will generate habit.
User avatar
Mike
Herr VC
Posts: 4839
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

After toying around with fcbpaint a little bit, I found some of those edges, which could be rounded off:

- I'd like a directory display, preferably accessible from the main menu. Running it on VICE I often caught myself using the preview of 'Attach disc image ...', but of course that wouldn't be available on a real VIC-20, ;)

- Starting out from an empty canvas, it would be nice to be able to preset background, border, and auxiliary colour globally; so it isn't necessary to change them on every raster instead,

- In a related matter, being able to copy&paste the splits of a raster line would save a lot of time. In the mock-up screen of LeMans I had to re-do 3 splits, and 4 colour settings on all 192 rasters ...

- More a matter of ergonomy: the hectic cursor blinking is just short of annoying. It would be better if it only blinked at, say, the same rate as the normal text cursor.

- Finally, a quick key reference accessible with a hot key would a very useful addition. I found myself having a text window open to the right of the VICE window just for that reason.

Greetings,

Michael
tlr
Vic 20 Nerd
Posts: 567
Joined: Mon Oct 04, 2004 10:53 am

Post by tlr »

Mike wrote:After toying around with fcbpaint a little bit, I found some of those edges, which could be rounded off:

- I'd like a directory display, preferably accessible from the main menu. Running it on VICE I often caught myself using the preview of 'Attach disc image ...', but of course that wouldn't be available on a real VIC-20, ;)
True. Shouldn't be too hard.
- In a related matter, being able to copy&paste the splits of a raster line would save a lot of time. In the mock-up screen of LeMans I had to re-do 3 splits, and 4 colour settings on all 192 rasters ...

- More a matter of ergonomy: the hectic cursor blinking is just short of annoying. It would be better if it only blinked at, say, the same rate as the normal text cursor.

- Finally, a quick key reference accessible with a hot key would a very useful addition. I found myself having a text window open to the right of the VICE window just for that reason.
Good suggestions, will consider those!
Mike wrote:- Starting out from an empty canvas, it would be nice to be able to preset background, border, and auxiliary colour globally; so it isn't necessary to change them on every raster instead,
This is already possible but undocumented.
If you change colors in the editor, then exit to the menu and initialize the picture it should use the current colors.
User avatar
Mike
Herr VC
Posts: 4839
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

Exin has drawn a great picture (a Fire Pokemon?) with fcbpaint.

He noted, that a stand-alone viewer is still missing. Maybe, as alternative, a PC hosted converter could compile the fcb picture into a executable?

A bump also with a question whether there has been some progress with the editor in the meanwhile.

Greetings,

Michael
User avatar
Wilson
Vic 20 Enthusiast
Posts: 190
Joined: Mon Sep 28, 2009 7:19 am
Location: Brooklyn, NY

Post by Wilson »

Mike wrote:Exin has drawn a great picture (a Fire Pokemon?) with fcbpaint.
It is a very nice picture! But, as a Pokemon expert ;), I can tell you that it is not a Pokemon. Similar to one though.
I'm also interested to hear if there's been any activity with this project.
User avatar
Witzo
Vic 20 Afficionado
Posts: 381
Joined: Thu Dec 01, 2011 9:14 am
Location: The Hague

Post by Witzo »

Post Reply