** New Frontiers in VIC-Hires-Graphics, Part 17

Basic and Machine Language

Moderator: Moderators

Post Reply
User avatar
tokra
Vic 20 Scientist
Posts: 1123
Joined: Tue Apr 27, 2010 5:32 pm
Location: Scheessel, Germany

** New Frontiers in VIC-Hires-Graphics, Part 17

Post by tokra »

Image

Announcement/Download

MAXIMUM OVERSCAN

A further extension of the UBERMODE-graphics-mode from 2013 now providing a resolution of 224x283 pixels on a PAL VIC-20 with added raster-splits for more color-choices per picture:

- 224x283 hires or 112x283 multicolor pixels (true resolution)
- 8x8 blocks for foreground color (4x8 for multicolor)
- background/border color split every 8 rasterlines (36 total)
- auxiliary color split every 32 lines (9 total)
- 24K RAM expansion required

Short reference:

GRAPHIC ON: SYS 9774 (SPACE to return to BASIC prompt)

See pgm-import on how to set single pixels, clear the screen and on how to set the color-RAM and backgroud/border/auxiliary colors.

Technical background of the graphics-mode:

Back in 2015, a short time after creating some different modes for the VIC-20 I realized I was lying about 224x280 being the maximum possible resolution on the PAL VIC-20. In fact 3 more lines are possible and visible in VICE as well as monitors that can adjust the viewable area as much as possible, such as the Commodore 1084. With this monitor I checked that in fact 224x283 would be the maximum resolution fully visible. I tried expanding it to 232 horizontal width. but this would lead to some pixel being no longer inside the visible area.

As soon as I had the 224x283-mode working I still had some raster-time left which I used for raster-splits of the remaining global colors as much as possible.

This mode leaves just 2 cycles of CPU-time per raster unused - a single NOP-operation.

As usual a picture converter for converting monochrome 224x283 pixel .pgm-files is included in this package as well. This relatively short program also shows how to set pixels and colors. Simply convert any picture with a 4:3 aspect ratio without ratio correction to 224x283 on your PC and then have the PGM-converter run through it. This will create an executable files which can be RUNed or started by SYS 9774.

With this mode the PAL VIC-20 can now display 63392 pixels, just 608 short of the C64 in hires-mode!

History:

This mode lay dormant for some years, since I discussed with Mike from time to time to do a picture-converter for it. He (rightfully) noticed that the extra horizontal splits every 8 or 32 lines would usually not improve the picture quality very much and would not justify the programming-effort needed to take care of this (a simple case of diminishing returns). So I just went ahead with my usual .pgm-converter and hand-poked some colors into the Nordlicht-logo. The final picture (seen above) is just the result of a small BASIC-program that sets the pixels and colors in such a way you can see the colorfullness of this mode in its full glory :-)

I finally decided to release it in this years Gravedigger-competition at the Nordlicht-demoparty where it got the 7th place out of 13 in that compo.
User avatar
Witzo
Vic 20 Afficionado
Posts: 381
Joined: Thu Dec 01, 2011 9:14 am
Location: The Hague

Re: ** New Frontiers in VIC-Hires-Graphics, Part 17

Post by Witzo »

Impressive!
If only 14 year old me knew this was possible :)
User avatar
cbmeeks
Vic 20 Enthusiast
Posts: 190
Joined: Tue May 18, 2004 12:36 pm
Website: http://meeks.co
Location: 8-bit Land
Occupation: Code Monkey

Re: ** New Frontiers in VIC-Hires-Graphics, Part 17

Post by cbmeeks »

The VIC-20 never fails to amaze me. This is awesome.
Cat; the other white meat.
User avatar
tokra
Vic 20 Scientist
Posts: 1123
Joined: Tue Apr 27, 2010 5:32 pm
Location: Scheessel, Germany

Re: ** New Frontiers in VIC-Hires-Graphics, Part 17

Post by tokra »

Image

Download: http://www.tokra.de/vic/maximumoverscan ... rcolor.zip

Some time after the Nordlicht-demoparty Mike was so nice to re-work his PPM-converter for Ubermode (224x280 without rastersplits) to this mode, however without making use of the rastersplits for $900e and $900e. Essentially you have 3 more rows per picture compared to Ubermode. I made some conversions with it for a nice slideshow-disk-image and also added the PPM-converter to the tooldisk. Usage is as previous: First convert a picture to 224x283 and save as .ppm (binary encoding). Then let it run through the ppm2h4m.exe (or just rename as input.ppm and start ppm2h4m.cmd). The resulting file "result.h4m" is the file used by the "PPM IMPORT"-program on the VIC-20 side to create the executable graphic file for the vic - I usually do this in VICE in Warp-mode.
User avatar
orion70
VICtalian
Posts: 4341
Joined: Thu Feb 02, 2006 4:45 am
Location: Piacenza, Italy
Occupation: Biologist

Re: ** New Frontiers in VIC-Hires-Graphics, Part 17

Post by orion70 »

:shock: :shock: :shock: now THIS is impressive! Will try my own family pictures ASAP :D
funkheld
Vic 20 Devotee
Posts: 241
Joined: Tue Sep 10, 2019 4:23 am

Re: ** New Frontiers in VIC-Hires-Graphics, Part 17

Post by funkheld »

can you please put the source code once.
Thank you.
greeting
User avatar
tokra
Vic 20 Scientist
Posts: 1123
Joined: Tue Apr 27, 2010 5:32 pm
Location: Scheessel, Germany

Re: ** New Frontiers in VIC-Hires-Graphics, Part 17

Post by tokra »

orion70 wrote: Mon Dec 09, 2019 11:55 pm:shock: :shock: :shock: now THIS is impressive! Will try my own family pictures ASAP :D
Thanks :) Make sure to adjust the gamma a little before converting. I use a factor of 1.2 to 1.5. Otherwise the resulting pictures tend to get too dark.
funkheld wrote: Tue Dec 10, 2019 2:29 amcan you please put the source code once.
The source-code for the graphics-mode is in the download of the first post in this thread (maximumoverscan.zip contains 224283-24k.asm).
funkheld
Vic 20 Devotee
Posts: 241
Joined: Tue Sep 10, 2019 4:23 am

Re: ** New Frontiers in VIC-Hires-Graphics, Part 17

Post by funkheld »

hello thanks for the info.

greeting.
User avatar
orion70
VICtalian
Posts: 4341
Joined: Thu Feb 02, 2006 4:45 am
Location: Piacenza, Italy
Occupation: Biologist

Re: ** New Frontiers in VIC-Hires-Graphics, Part 17

Post by orion70 »

Ppm2h4m.exe not executable in win7 (even fiddling with compatibility modes) :(
It gives error0x000007b. Any explanation? Thanks in advance..
User avatar
tokra
Vic 20 Scientist
Posts: 1123
Joined: Tue Apr 27, 2010 5:32 pm
Location: Scheessel, Germany

Re: ** New Frontiers in VIC-Hires-Graphics, Part 17

Post by tokra »

Maybe you are missing one of the VisualC-runtime libraries? Mike should know which one is needed. I forgot and have so many on my system...
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: ** New Frontiers in VIC-Hires-Graphics, Part 17

Post by Mike »

tokra wrote:Mike should know which one is needed. I forgot and have so many on my system ...
The *.exe was compiled as 64-bit executable with Visual Studio 2015 on a Windows 10 PC, i.e. nominally, the recent C runtime package of Microsoft should suffice (vc_redist.x64.exe). Alessandro, if your PC has a 32-bit CPU, I can compile a 32-bit binary of ppm2h4m.exe, and you should install 'vc_redist.x86.exe' instead.
User avatar
orion70
VICtalian
Posts: 4341
Joined: Thu Feb 02, 2006 4:45 am
Location: Piacenza, Italy
Occupation: Biologist

Re: ** New Frontiers in VIC-Hires-Graphics, Part 17

Post by orion70 »

Ach, I'm afraid it won't be possible, as it's my work PC, and I have no admin rights to install whatsoever :cry: . Also, I could try this at home, but paradoxically I have way less spare time here :oops:
User avatar
tokra
Vic 20 Scientist
Posts: 1123
Joined: Tue Apr 27, 2010 5:32 pm
Location: Scheessel, Germany

Re: ** New Frontiers in VIC-Hires-Graphics, Part 17

Post by tokra »

David van Scouten has posted a tutorial video on how to convert pictures using the tools (in german) here:

https://odysee.com/@DvS_Arcade:b/VIC-20_Image-Tut:6

If anyone wants to try it themselves, this is a good starting point. Some things can be streamlined, but it certainly works the way he explains it.
User avatar
Noizer
Vic 20 Devotee
Posts: 297
Joined: Tue May 15, 2018 12:00 pm
Location: Europa

Re: ** New Frontiers in VIC-Hires-Graphics, Part 17

Post by Noizer »

Very intresting, do we have perhaps another working link of it? The video is loosing the connection over and over :cry:
Valid rule today as earlier: 1 Byte = 8 Bits
-._/classes instead of masses\_.-
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: ** New Frontiers in VIC-Hires-Graphics, Part 17

Post by Mike »

Noizer wrote:[...] do we have perhaps another working link of it? The video is loosing the connection over and over :cry:
Works for me.

The commentary function in the page tokra linked to is a more appropriate place where you can file your complaint.
Post Reply