runable Graphics wanted...

You need an actual VIC.

Moderator: Moderators

groepaz
Vic 20 Scientist
Posts: 1187
Joined: Wed Aug 25, 2010 5:30 pm

Re: runable Graphics wanted...

Post by groepaz »

It would be cool if those of you who are more familiar with vic20 than i am could formulate some rules that i can use to find the shared colors.

eg one that seems useful (which i dont use yet) is: "the color that appears in all HIRES blocks (with exactly two colors) must be the background color"

i am also still missing some good rules for multicolor - the goal is generally that from any given "minipaint" picture a screenshot can be saved that looks exactly the same as the original image. its close right now (judging from my tests) but still not 100% (even when ignoring the hires blocks)
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
User avatar
pixel
Vic 20 Scientist
Posts: 1357
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Re: runable Graphics wanted...

Post by pixel »

groepaz wrote: Mon May 03, 2021 3:15 pm It would be cool if those of you who are more familiar with vic20 than i am could formulate some rules that i can use to find the shared colors.

eg one that seems useful (which i dont use yet) is: "the color that appears in all HIRES blocks (with exactly two colors) must be the background color"

i am also still missing some good rules for multicolor - the goal is generally that from any given "minipaint" picture a screenshot can be saved that looks exactly the same as the original image. its close right now (judging from my tests) but still not 100% (even when ignoring the hires blocks)
Just before my main board makes popcorn: You also want to save images of non-VICs to MINIPAINT format and it does not work for VIC pictures yet?
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
groepaz
Vic 20 Scientist
Posts: 1187
Joined: Wed Aug 25, 2010 5:30 pm

Re: runable Graphics wanted...

Post by groepaz »

Just before my main board makes popcorn: You also want to save images of non-VICs to MINIPAINT format and it does not work for VIC pictures yet?
What are you trying to say? How does this help anyone?

Obviously the first and primary goal is to tweak the algo to produce proper screenshots of vic20 screens (and this already works quite well, except for hires blocks). And then, due to how things are implemented in VICE, it will also just work for any other system - with some limitations and quirks, obviously.

That said, it already works okish (the tables used to substitute colors still need tweaking, as said). Certainly good enough to produce a template for further pixeling.
sentinel-vic20.png
sentinel-vic20.png (6.65 KiB) Viewed 886 times
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
User avatar
tokra
Vic 20 Scientist
Posts: 1123
Joined: Tue Apr 27, 2010 5:32 pm
Location: Scheessel, Germany

Re: runable Graphics wanted...

Post by tokra »

One of the more obvious rules for multicolor would be:

Any color with color-code 8-15 must either be background-color or auxiliary color.

Combined with your hires-background-color-rule this would narrow down the aux-color in a lot of cases.

The border-color as the third global color in multicolor is pretty obvious as well.

This just leaves the char-color per 8x8 block, which must be of color-code 0-7.
groepaz
Vic 20 Scientist
Posts: 1187
Joined: Wed Aug 25, 2010 5:30 pm

Re: runable Graphics wanted...

Post by groepaz »

Any color with color-code 8-15 must either be background-color or auxiliary color.
yes, that i already check.
This just leaves the char-color per 8x8 block
8x16 (minipaint) :)
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
groepaz
Vic 20 Scientist
Posts: 1187
Joined: Wed Aug 25, 2010 5:30 pm

Re: runable Graphics wanted...

Post by groepaz »

OK, so... this is the result of last night's hacking. Hires blocks should work now. Produces pixel-exact screenshots from the Minigrafix examples now. For other stuff the color substitution tables still need tweaking (once again: patches welcome).

Find a test build here: https://github.com/VICE-Team/svn-mirror ... tag/r40006
hexe.png
hexe.png (3.52 KiB) Viewed 836 times
a.png
a.png (2.72 KiB) Viewed 836 times
Keep in mind scaling is the the default, and that will cause artefacts in many cases. To avoid this, use the cropping options.
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: runable Graphics wanted...

Post by Mike »

Nice! And thanks! :D

If people happen to produce a nice screenshot from this new feature of VICE, they probably should also post the corresponding *.prg file in the MG picture file format itself, so that file then can be loaded into MINIPAINT or used with MINIGRAFIK, etc. :wink:
User avatar
ops
Vic 20 Dabbler
Posts: 88
Joined: Mon Feb 19, 2018 11:25 am
Location: Finland

Re: runable Graphics wanted...

Post by ops »

Nice. Some minor glitches but overall result is pretty good.

Screenshot from 2021-05-09 09-21-56.png
groepaz
Vic 20 Scientist
Posts: 1187
Joined: Wed Aug 25, 2010 5:30 pm

Re: runable Graphics wanted...

Post by groepaz »

Some minor glitches (obviously) can't be avoided - unless the screen is already in "minigrafix" format :)
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
User avatar
tokra
Vic 20 Scientist
Posts: 1123
Joined: Tue Apr 27, 2010 5:32 pm
Location: Scheessel, Germany

Re: runable Graphics wanted...

Post by tokra »

I know this isn't a "standard" format, but at least for PAL you could use the "Maximum Overscan" mode I released in 2019 whose graphic-data-files are also runable. This uses the full possible resolution of 224x283 of the PAL-VIC (and VICE) and has 8x8 color-blocks. So basically you should be fine to display any VIC-screen that does not use raster effects. I never did a similar mode for NTSC (yet), though. Plus, since the graphics-data is embedded into speedcode this isn't as straightforward as Minigrafik. Essentially this format really is a proof-of-concept.

With a slightly smaller resolution you get much better color-possiblities like the MFLI-format (208x256 with 8x8 color blocks and border/background/aux per rasterline). Or if you want to go all in there is also Mike's VFLI-format which is like MFLI but with 8x1 color blocks.
groepaz
Vic 20 Scientist
Posts: 1187
Joined: Wed Aug 25, 2010 5:30 pm

Re: runable Graphics wanted...

Post by groepaz »

That's all way too involved - VICE isnt a graphics converter :) Even those simple formats are already questionable enough =P
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: runable Graphics wanted...

Post by Mike »

I find it remarkable the screenshot facility works so well - as seen with the in-game screenshot of Mega Vault - despite the resolution mismatch and despite the added restriction of the double sized attribute cells!

It is good to see that a rather simple counting heuristics fares that good. The algorithm I use to convert images into VFLI format is much more compute intensive and would not be suitable to produce screenshots at an instant.
groepaz
Vic 20 Scientist
Posts: 1187
Joined: Wed Aug 25, 2010 5:30 pm

Re: runable Graphics wanted...

Post by groepaz »

The approach i use (also for c64 hires and multicolor/koala screenshots) is to render a pixel exact representation of anything that is already matching the target format, but only by using heuristics and generic rules. And surprisingly, this works also very good for pictures that do NOT already match the target format :)
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
User avatar
Noizer
Vic 20 Devotee
Posts: 297
Joined: Tue May 15, 2018 12:00 pm
Location: Europa

Re: runable Graphics wanted...

Post by Noizer »

groepaz wrote: Fri May 21, 2021 6:17 pm .., And surprisingly, this works also very good for pictures that do NOT already match the target format :)
Would it be possible to make a 100% conversion without artifacts?
Valid rule today as earlier: 1 Byte = 8 Bits
-._/classes instead of masses\_.-
groepaz
Vic 20 Scientist
Posts: 1187
Joined: Wed Aug 25, 2010 5:30 pm

Re: runable Graphics wanted...

Post by groepaz »

well, of course not - when the picture does not match the requirements of the target format, of course compromises/approximations have to be made.
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
Post Reply