Maxigrafik

Basic and Machine Language

Moderator: Moderators

armypavarmy
Vic 20 Newbie
Posts: 18
Joined: Wed Oct 02, 2013 1:54 am

Maxigrafik

Postby armypavarmy » Sat Sep 23, 2017 9:14 am

Hello
here are my last works
with Maxigrafik
converted from CBM Plus / 4 and ZX
Spectrum.
I hope I like it. Armando
Maxigrafik-Screen.rar
(2.74 KiB) Downloaded 27 times

User avatar
Mike
Herr VC
Posts: 2951
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Maxigrafik

Postby Mike » Sun Oct 01, 2017 10:14 am

15 downloads of "Maxigrafik-Screen.rar" (mine included) without any other replies thus far leave me at least with some question marks above my head. At least, Armando didn't make it *that* simple to assess what is to do with the files "d1d-scr", "gasket-scr" and "snoopy-scr" contained within the archive.

Either people are indeed well acquainted with MAXIGRAFIK and thus know how to use the files and just don't bother to follow-up here - which raises the question why there haven't been other releases for MAXIGRAFIK in the meantime -, or they downloaded the archive, don't know what to do with the files, don't find any hint somewhere in the forum what could be done with the files, and are too afraid(?) to ask. Whatever.

To clear up that matter regardless, these three files are supposed to be used with the two commands GLOAD and SHOW of the MAXIGRAFIK extension. They contain completely rendered pictures, but are - unfortunately - not the BASIC programs that were used to render those pictures. Those BASIC programs actually might have been much more interesting (for a follow-up discussion) than 'just' some converted line art. IMO.

...

Armando, I'd also suggest you switch to *.zip for further uploads: *.rar is a proprietary archive format, and the only program that officially supports it is WinRAR. WinRAR comes with a shareware licence, i.e. it is subject to a charge after a trial period. Actually, for myself I'm also not too eager to install yet another specialised file browser onto my computer just for decompressing that single *.rar archive that comes across once a year. Any arguments regarding *possibly* *slightly* better compression rates don't outweigh the unnecessary hassles with that format.

I've put the three files below, repackaged in a *.zip archive.

Greetings,

Michael
Attachments
maxigrafik-screens.zip
(2.79 KiB) Downloaded 11 times

armypavarmy
Vic 20 Newbie
Posts: 18
Joined: Wed Oct 02, 2013 1:54 am

Maxigrafik---Bingo

Postby armypavarmy » Tue Oct 03, 2017 5:02 am

Hello
I am preparing the "Bingo"
with Maxigrafik to large
numbers.
in enclosed demo screeen.
when the program finishes
will attach. the file.
-------------- Armando greetings

scr-bingo.rar
(651 Bytes) Downloaded 27 times

User avatar
tonyrocks
Vic 20 Dabbler
Posts: 90
Joined: Mon Jan 04, 2016 10:17 pm
Website: http://www.tonyrocks.com
Location: Pittsburgh
Occupation: IBM Watson Engr

Re: Maxigrafik---Bingo

Postby tonyrocks » Tue Oct 03, 2017 9:54 am

I cannot read RAR files. :( Can you use zip?

armypavarmy
Vic 20 Newbie
Posts: 18
Joined: Wed Oct 02, 2013 1:54 am

Re: Maxigrafik---Bingo

Postby armypavarmy » Tue Oct 03, 2017 12:12 pm

Attach file compressed 7Zip
scr-bingo.7z
(688 Bytes) Downloaded 11 times

armypavarmy
Vic 20 Newbie
Posts: 18
Joined: Wed Oct 02, 2013 1:54 am

Re: Maxigrafik

Postby armypavarmy » Thu Oct 05, 2017 9:28 am

Hello Mike
About your notes:

I thought I'd send the screens first to know if
Someone was interested.
No problem for the listener.
First I can send them ...... ..Zippati.
Thank you for your interest in my work.
Your advice is useful and valuable to me.
I usually use the 7Zip program.
Tell me if it's okay.
Thanks again ............ .Armando

User avatar
Mike
Herr VC
Posts: 2951
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Maxigrafik

Postby Mike » Thu Oct 05, 2017 3:37 pm

If you look into the various threads here in Denial where I posted examples for MINIGRAFIK, I usually followed up "teaser" pictures with the programs that produced those screens. Unless those pictures were the result of manual work in MINIPAINT, and obviously no such program existed (I'd then still attach the corresponding MG file).

I did so without necessarily being asked for, merely I think it's just illogical to post something along programmed computer art into the Programming section of a Forum without following up with the program that did the feat. Regards "gauging the interest": with a hobby as obscure as ours one needs a good lot of instrinsic motivation anyhow - you'll fare much better getting responses for your VIC-20 work here in Denial than in any other related forum. But you should be at least a little more consequent. :)

So it's up to you: you attach the programs here in the threads, and you might find people here obliged to say something about those programs, follow up, improve them, spark new ideas, whatever. Just those static screens probably aren't going deliver enough incentive for this. My thoughts already.

And regarding the file type best suited for attachments, just look around what's usually used in the forum: you'll find plain *.d64 files, *.prg or *.d64 (or other storage image file types) archived in *.zip, etc. - unfortunately, plain *.prg is disallowed by the forum software for whatever reason. On the contrary, *.7z and especially *.rar are extremely, well, rare. *.zip is supported out-of-the-box in all Windows installations since XP, it is also a standard archive format with all Unixes (that includes Macs, iOS and Android) so there's no good reason to use yet another compressor unless for specialist needs. Programs (or parts thereof) in text form should be posted in code-tags, that should go without saying. Etc.

armypavarmy
Vic 20 Newbie
Posts: 18
Joined: Wed Oct 02, 2013 1:54 am

Maxigrafik

Postby armypavarmy » Fri Oct 06, 2017 9:09 am

Maxprg.zip
(1.35 KiB) Downloaded 8 times

The enclosed file contains four programs for Maxigrafik.
These are the programs I've written that I had already written
The "scr-demo" files in the previous topics.
Lists have been drawn from Plus / 4 and Zx Spectrum programs
And adapted by me for Maxigrafik.
Armando

User avatar
Mike
Herr VC
Posts: 2951
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Maxigrafik

Postby Mike » Sat Oct 07, 2017 3:36 am

Nice! Here's my suggestion for program "1.13":

Code: Select all

10 REM LISTING 1.13-V3
15 N=12
20 R=10
25 MULTI0:CLEAR
30 FORI=0TON-1
35 P=2*{PI}*I/N
40 X=3*R*COS(P)
45 Y=5*R*SIN(P)
50 CIRCLE1,104.5+X,128.5-Y,3*R,5*R
55 NEXT
60 SHOW

This shows the drawing centered on screen at (104,128), also with correctly rounded co-ordinates. The x- and y-semiaxes have been carefully chosen to compensate the PAL pixel aspect ratio of ~1.67:1.00, so CIRCLE indeed draws circles and they are all arranged in circle-form around the screen centre so they all intersect there.

The variables N and R in lines 15 and 20 can be changed to other sensible values to obtain slightly different drawings.

...

As for the other three programs, they could quite as well have been done with MINIGRAFIK. They either don't occupy that big screen area for their drawings to justify the use of MAXIGRAFIK, or - in case of "gsr" - could easily be reduced to the smaller 160x192 resolution without "losing" the effect. Would also have the charm that one could see how they work (which is not possible with MAXIGRAFIK).

It would also be possible to re-port "1.13" to MINIGRAFIK, even if MG misses the CIRCLE command. That command could easily be retro-fitted with a small ML library (but as no-one asked for that, thus far I didn't bother to post it. :P)
Attachments
113v3.zip
(512 Bytes) Downloaded 2 times

armypavarmy
Vic 20 Newbie
Posts: 18
Joined: Wed Oct 02, 2013 1:54 am

Re: Maxigrafik

Postby armypavarmy » Sun Oct 08, 2017 5:18 am

Hello
Thak for 113v3.zip.........OK- OK

Minigraph does not have circle command
It would be ok for me if inserted.
Graphics programs I write to them
first with Minigrafik because '
it shows development.
Besides that nice to see it is also useful
to edit any parameters in the list.
with Minigrafik programs I can use
if I need "Diskmerge" and "Renumber"
without problems.
When the programs are Ok I write listed for Maxigrafik

One of the problems with some conversions
This is due to the fact that the graphical commands are available
are very limited in use options.

Armando

User avatar
Mike
Herr VC
Posts: 2951
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Maxigrafik

Postby Mike » Sun Oct 08, 2017 6:22 am

armypavarmy wrote:One of the problems with some conversions
This is due to the fact that the graphical commands are available
are very limited in use options.

MINIGRAFIK implements a minimal set of graphics commands on purpose.

I aimed to include all really necessary and indispensable commands. A programm that uses MG will always need the commands to switch on the graphics, clear the bitmap and return to text mode. Without at least a pixel plot command we'd sorely miss the purpose, no? The line-drawing variant was included because doing lines just with single pixel plots incurs a speed hit that can't be tolerated for most applications - so line-drawing is in, too. At least some applications also require a pixel read function - it's there. Unless one can save and load the hires screen, you really can't take that extension serious (now guess what: screen load/save is *missing* with Super Expander). You can count on that most client programs use nearly all code of MG, so there's no dead code around when it is active.

Any extensions beyond that would only add bloat if they were added to the core of MINIGRAFIK. I excluded colour definition commands, because POKEs to the addresses 646, 36878 and 36879 are entirely sufficient to do the job. Not all programs need to draw circles, not all programs need to print text into the bitmap. Still, in the past I have provided ML libraries that add those functions. Often enough, they can also be implemented as BASIC sub-routines, and still be fast enough for most needs. Not everything needs to be provided as dedicated BASIC command.

I have published quite a few examples beyond simple 'toy' programs for MINIGRAFIK over the last years. Take a look how they do things, and what can be done with the - what you call apparently "very limited" - set of its graphics commands. And then please re-think your opinion.

armypavarmy
Vic 20 Newbie
Posts: 18
Joined: Wed Oct 02, 2013 1:54 am

Re: Maxigrafik

Postby armypavarmy » Sun Oct 08, 2017 12:56 pm

Hi Mike


One of the problems with some conversions
This is due to the fact that the graphical commands are available
are very limited in use options.

Maybe I did not explain
and I was misunderstood.
The Limits Note of the
Graphic controls only concern MAXIGRAFIK
if the program was done for graphics.
if you can not or do not want to improve it.
sorry but patience.

Armando

User avatar
Mike
Herr VC
Posts: 2951
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Maxigrafik

Postby Mike » Sun Oct 08, 2017 1:26 pm

armypavarmy wrote:One of the problems with some conversions
This is due to the fact that the graphical commands are available
are very limited in use options.

I'm lost on that one. What do you expect? A pixel plot is specified by a co-ordinate pair and colour source. A line plot needs two co-ordinate pairs and a colour source. With MAXIGRAFIK, the CIRCLE command takes the centre, the two half-axes, and colour. All commands can be switched between hires and multi-colour. So, what's your problem exactly? At one point, you'll have to put an algorithm around the graphics primitives anyhow, so the program draws exactly what you want.

You can't expect that both graphics extensions would aim to reproduce a 1:1 compatibility to the graphics commands of some other computer. The commands are tooled to suit the VIC-20 hardware.

if you can not or do not want to improve it.
sorry but patience.

As I wrote, MINIGRAFIK got support with ML libraries over time. These libraries are just not going to be added to the main executable of MINIGRAFIK. Simple as that.

In principle, that also applies to MAXIGRAFIK. But in that case, the user base has been much smaller than with MINIGRAFIK in the last years, so there had been much less incentive on tokra's and my side to improve anything there. MAXIGRAFIK works fine as is. Besides, the graphics mode of MAXIGRAFIK was surpassed quite soon by newer graphics modes, also for NTSC. I wrote some converters for those new graphics modes, but that was it: no one here in the forum asked for further programming support for those modes. You should understand that whatever time then is available gets devoted to other projects.

armypavarmy
Vic 20 Newbie
Posts: 18
Joined: Wed Oct 02, 2013 1:54 am

Re: Maxigrafik

Postby armypavarmy » Mon Oct 09, 2017 5:51 am

Hello

I do not want to critique absolutely
your work or that of others.
You invited me to enter my jobs
I thought you wanted to improve
the Maxigrafik program to get
miglir graphic results.
I understand that's not so.
I enclose four small lists attached
to let you know what I mean by limiting the graphic commands.
Anyway thanks ........ greetings Armando
Grafik--plus4.doc.zip
(2.41 KiB) Downloaded 5 times

User avatar
Mike
Herr VC
Posts: 2951
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Maxigrafik

Postby Mike » Mon Oct 09, 2017 12:52 pm

Hi, Armando,

the kind of programs you put into the *.doc file actually confirm my presumptions.

I can tell you it's entirely possible to port these all over to MINIGRAFIK (and for that matter, MAXIGRAFIK) by taking into account the different resolutions and pixel aspect ratios. But first, let me comment on those four programs:

Code: Select all

5 REM GR III
10 GRAPHIC1,1
20 FORY=1TO255:FORX=1TO255
30 DRAW 1,X,X AND Y
40 NEXT X,Y

Some pattern effect. This one will already pose difficult to produce the intended output even on the plus/4! The pixels with Y-coordinates 200..255 are not going to be displayed. Any port will have to keep the 1:1 pixel mapping to retain the effect, that means MINIGRAFIK will only show the top-left 160x192 pixels, and MAXIGRAFIK the (top-)left 208x256 pixels.

Code: Select all

5  REM GR IV
10 GRAPHIC1,1
20 FORY=1TO255:FORX=1TO255
30 DRAW 1,X,X,X AND Y,Y
40 NEXT X,Y

Another pattern effect, with the same 'problems'. "DRAW1,X,X,X AND Y,Y" can be re-written as "DRAW1,X,X:DRAW1,X AND Y,Y" - a no-brainer.

Code: Select all

0 SCNCLR: REM GR XIX
1 POKE 774,156
10 GRAPHIC1,1
20 FOR X=0 TO360 STEP6
30 CIRCLE 1,65+X*.5,80,60,33,,,X
40 NEXT
45 FOR I=1 TO 10000:NEXT
50 GRAPHIC0

The POKE in line 1 and the FOR loop in line 45 are irrelevant. The program draws a helix-like figurine from rotated ellipses. That will require both MINIGRAFIK and MAXIGRAFIK to 'emulate' the CIRCLE algorithm as it is implemented in BASIC V3.5 and V7. With a table-based implementation for SIN()- and COS()-values, this will be roughly as fast as the original code.

Finally:

Code: Select all

100 REM GRK 6
170 COLOR 4,1,1
180 COLOR 0,1,1
190 COLOR 1,5,1
200 GRAPHIC 1,1
210 :
220 FOR X=0 TO360 STEP 2
230 DRAW,160,100 TO 100;X
240 DRAW ,30,30 TO30;X
250 DRAW ,30,170 TO 30;X
260 DRAW ,290,170 TO 30;X
270 DRAW ,290,30 TO 30;X
280 NEXT X

The only 'issue' here is the alternative syntax for Polar-co-ordinates (which specify length and angle) as TO-parameter. Again, just some math necessary here - the conversion between Cartesian- and Polar-co-ordinates (knowing that the "length;angle"-syntax takes the current pixel co-ordinate as origin!). The only thing that makes this slightly more difficult is the non-square pixel-aspect ratio of the VIC-20, but it's doable.

Actually, what the last program intends to do is drawing five filled circles. And it does a pretty bad job at that.

...

Two options here: either you take my comments here as good hint how you could proceed with a port, and try it for yourself. Or you give me a few days to find a free evening after work, and I'll do the port.

Greetings,

Michael

P.S. actually, there's a third option - someone else from the forum chimes in and is faster at porting these programs than we two. :)


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest