Random adventures in vic20 charcell graphics

Basic and Machine Language

Moderator: Moderators

Post Reply
jbevren
Vic 20 Newbie
Posts: 7
Joined: Thu Apr 28, 2011 10:18 am

Random adventures in vic20 charcell graphics

Post by jbevren »

I thought I'd share a quick basic scratchup that plots a gingerbread fractal on unexpanded vic.

The program uses dynamic character cell allocation, starting from 255 and going down (potentially to 0). For informational ability, the first 64 chars are copied from ram during init. 8)

http://jbevren.net/gingerbread-vic.zip

Beware, it plots some 10k points in two phases, so it takes 20-30 minutes.

Feel free to modify the start points in the data statements at the end to suit your needs. The app does not do bounds checking in the plot routine, so after it gets past char 0 (to char -1) it bombs out. :twisted:

:EDIT: preview image post. Thanks Schema! :idea:

Image
-jbev
User avatar
Schema
factor
Posts: 1430
Joined: Tue Mar 23, 2004 7:07 am
Website: http://www.jammingsignal.com
Location: Toronto, Ontario

Post by Schema »

Cool!
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

Looks pretty cool in 2000-3000% speed...
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
jbevren
Vic 20 Newbie
Posts: 7
Joined: Thu Apr 28, 2011 10:18 am

Post by jbevren »

Yeah the preview isnt an exact match to the program in the d64. The number that counts down is how many characters are still unallocated.

If you guys have any questions about the way it works feel free to post here. I'll monitor the thread for at least a couple days :lol:
-jbev
User avatar
Mike
Herr VC
Posts: 4842
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

Also works fine in MINIGRAFIK (download):

Image

Here's the converted program:

Code: Select all

10 REM ** GINGERBREAD
11 @ON:@CLR
12 READX$,Y1:ON-(X$="END")GOTO14:X1=VAL(X$)
13 FORI=1TO5000:OX=X1:OY=Y1:X1=1-OY+ABS(OX):Y1=OX:@1,X1*11+47.5,Y1*13+57.5:NEXT:GOTO12
14 GETA$:ON-(A$="")GOTO14:@RETURN:END
15 :
16 DATA-3.14,0
17 DATA-0.14,0
18 DATAEND,0
19 :
20 REM ** GINGERBREAD, CONVERTED 2011-04-28 TO MINIGRAFIK BY MIKE
Greetings,

Michael
Last edited by Mike on Sat May 07, 2011 3:48 am, edited 1 time in total.
jbevren
Vic 20 Newbie
Posts: 7
Joined: Thu Apr 28, 2011 10:18 am

Post by jbevren »

Nice Michael! :)

For others that arent familiar with minigrafik, dont stumble as I did: the wedge requires 8k or more of expansion. :)

I couldnt work out why it wouldnt run. However, I kinda wonder why the 1541 goes blinky when it crashes on an unexpanded vic ;)
-jbev
User avatar
Mike
Herr VC
Posts: 4842
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

Hi!
jbevren wrote:For others that arent familiar with minigrafik, dont stumble as I did: the wedge requires 8k or more of expansion. :)
Yes, indeed MG requires at least an +8K RAM expansion. The complete address range of $1000 to $1FFF is used to store the bitmap.

It has been around for quite some time now, though. The original version was written in 1985(!) by W. Wirth, and ran on a unexpanded or +3K VIC-20, but only provided 128x128 pixels. I rewrote it from scratch in 2006 for a resolution of 160x192 and did another update in 2008. You'll find several programs and games here in Denial, which use MG.
I couldnt work out why it wouldnt run. However, I kinda wonder why the 1541 goes blinky when it crashes on an unexpanded vic ;)
It's not a bug, it's a feature. ;)
User avatar
Jeff-20
Denial Founder
Posts: 5759
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

Really cool!
High Scores, Links, and Jeff's Basic Games page.
rhurst
Omega Star Commander
Posts: 1371
Joined: Thu Jan 31, 2008 2:12 pm
Website: https://robert.hurst-ri.us
Location: Providence, RI
Occupation: Tech & Innovation

Post by rhurst »

And if you really like 'features', try my stuff. :lol:

Using dynamic characters in this manner is slick, nice job. When I look at this fractal, I think of my Droid X phone running Gingerbread. Sweet!
Any technology distinguishable from magic is insufficiently advanced.
https://robert.hurst-ri.us/rob/retrocomputing
jbevren
Vic 20 Newbie
Posts: 7
Joined: Thu Apr 28, 2011 10:18 am

Post by jbevren »

A nice feature in my plot subroutine is that carefully crafted coordinates can be used to set specific bits in the I/O hardware (or anywhere in memory for that matter). Top that! :D
-jbev
Post Reply