VDI questions

GFA, ASM, STOS, ...

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

mikro
Hardware Guru
Hardware Guru
Posts: 3005
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

Re: VDI questions

Post by mikro »

If you really like the idea, I wouldn't give up so early. Software can be always fixed but developing hardware is far more harder. :)
stormy
Atari God
Atari God
Posts: 1363
Joined: Tue Jan 26, 2016 12:39 pm

Re: VDI questions

Post by stormy »

Isn't that just normal behavior on anything that isn't 16bit/24bit true colour? Like, if I open Papyrus in Mint using my ATI graphics card in 256 colours, it totally messes up the desktop palette behind the app, until I close Papyrus (same for other apps too) And this is using NVDI. So I wouldn't say you're discovering something unique? Unless there are two completely different palette problems with different reasons behind them, I don't know.
pixelpusher
Atarian
Atarian
Posts: 9
Joined: Sat Sep 25, 2021 1:59 pm

Re: VDI questions

Post by pixelpusher »

stormy wrote: Wed Oct 26, 2022 6:17 pm Isn't that just normal behavior on anything that isn't 16bit/24bit true colour? Like, if I open Papyrus in Mint using my ATI graphics card in 256 colours, it totally messes up the desktop palette behind the app, until I close Papyrus (same for other apps too) And this is using NVDI. So I wouldn't say you're discovering something unique? Unless there are two completely different palette problems with different reasons behind them, I don't know.
If I understood it right, then there's no hardware palette in Badwolf's 8 bit format (it's 256 colors, but with a 3-3-2 bit rgb format - resulting a "coarse" resolution for the blue component).

A software palette (if already up and running now) should avoid any interference - assuming it is per virtual workstation and not global for the device - and if that's case, then there could be indeed a problem in the transformation code of the driver (looking at the screenshot).
User avatar
Badwolf
Captain Atari
Captain Atari
Posts: 371
Joined: Thu Mar 16, 2017 12:09 pm

Re: VDI questions

Post by Badwolf »

mikro wrote: Wed Oct 26, 2022 6:08 pm If you really like the idea, I wouldn't give up so early. Software can be always fixed but developing hardware is far more harder. :)
Thanks, Mikro. I'll carry on playing with it for now, but like Jean says, if the application software makes assumptions there isn't much I can do about that. :)
stormy wrote: Wed Oct 26, 2022 6:17 pm Isn't that just normal behavior on anything that isn't 16bit/24bit true colour? Like, if I open Papyrus in Mint using my ATI graphics card in 256 colours, it totally messes up the desktop palette behind the app
That's exactly what I want to avoid by doing 8 bit true colour. :) You've described palette-based (colour look up table/CLUT) modes. Mine doesn't have that.

Mine's the 'sub-optimal' 332 format describe at the top of https://en.wikipedia.org/wiki/8-bit_color
pixelpusher wrote: Wed Oct 26, 2022 6:33 pm A software palette (if already up and running now) should avoid any interference - assuming it is per virtual workstation and not global for the device - and if that's case, then there could be indeed a problem in the transformation code of the driver (looking at the screenshot).
Annoyingly there seem to be some software that uses multiple Virtual Workstations, but sets the palette for only one. Or at least that's what seems to be going on in a couple of places, but I could be wrong. Changing to a global palette (so the last request wins) didn't seem to affect anything, so it may be that actually it's a bit pattern assumption (à la Jean) kicking in.

Still need to fix some other problems before worrying about that, though. My Expand function is all wrong (hence the white icons in my screenshot) and blitting overlapping windows in the desktop is off by a number of pixels.

But thank you everyone for the help and encouragement. :-)

BW
DFB1 Open source 50MHz 030 and TT-RAM accelerator for the Falcon
DSTB1 Open source 16Mhz 68k and AltRAM accelerator for the ST
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
User avatar
Badwolf
Captain Atari
Captain Atari
Posts: 371
Joined: Thu Mar 16, 2017 12:09 pm

Re: VDI questions

Post by Badwolf »

Actually, one other question whilst I'm thinking about it.

A related, but not quite the same project comes from my work on PiStorm.

Here you can have a virtual graphics card in the Raspberry Pi, displayed on the HDMI port with very quick memory access.

So obviously I've set up a 16-bit VGA mode on my STE:-
Screenshot_2022-11-02_20-22-38.png

BUT!

The system font is wrong -- it's still the small system font picked up, I presume, from the low resolution the system booted in and all the icons in Vision (and some dialogue boxes) are half height.

Can anyone point me at the bit of the OS I need to fondle in FVDI to correct this?

Cheers,

BW
You do not have the required permissions to view the files attached to this post.
DFB1 Open source 50MHz 030 and TT-RAM accelerator for the Falcon
DSTB1 Open source 16Mhz 68k and AltRAM accelerator for the ST
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
stormy
Atari God
Atari God
Posts: 1363
Joined: Tue Jan 26, 2016 12:39 pm

Re: VDI questions

Post by stormy »

Hope crap BW you did it!!! Hdmi 16bit output from pi storm!!! Wouldn't the font be chosen in assign.sys ?
User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2841
Joined: Sun Jul 31, 2011 1:11 pm

Re: VDI questions

Post by Eero Tamminen »

Badwolf wrote: Wed Nov 02, 2022 8:25 pm The system font is wrong -- it's still the small system font picked up, I presume, from the low resolution the system booted in and all the icons in Vision (and some dialogue boxes) are half height.

Can anyone point me at the bit of the OS I need to fondle in FVDI to correct this?
Check what Hatari VDI mode does: https://git.tuxfamily.org/hatari/hatari ... vdi.c#n970

(EmuTOS sources could also be of interest, but I cannot point where the calculations are done.)
ThorstenOtto
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2372
Joined: Sun Aug 03, 2014 5:54 pm

Re: VDI questions

Post by ThorstenOtto »

The only place in fVDI i found for this, is here: https://github.com/freemint/fvdi/blob/m ... stn.c#L350 It does not seem to modify the default font in the linea variables though, so this might still be set by the ROM VDI from the boot resolution.

In EmuTOS, it is done here: https://github.com/emutos/emutos/blob/m ... ext.c#L604 (the default font is shortly after set by comparing this value)

So both use the same heuristic: if vertical resolution is >= 400, use 8x16 font, else use 8x8 font
User avatar
Badwolf
Captain Atari
Captain Atari
Posts: 371
Joined: Thu Mar 16, 2017 12:09 pm

Re: VDI questions

Post by Badwolf »

Eero Tamminen wrote: Thu Nov 03, 2022 12:03 am Check what Hatari VDI mode does: https://git.tuxfamily.org/hatari/hatari ... vdi.c#n970
ThorstenOtto wrote: Thu Nov 03, 2022 5:16 am The only place in fVDI i found for this, is here: https://github.com/freemint/fvdi/blob/m ... stn.c#L350 It does not seem to modify the default font in the linea variables though, so this might still be set by the ROM VDI from the boot resolution.

In EmuTOS, it is done here: https://github.com/emutos/emutos/blob/m ... ext.c#L604 (the default font is shortly after set by comparing this value)
Thank you both! I hadn't considered Line-A variables for that one.

I always forget Line-A as, in my mind, it's only for ST Modes. But I think that's actually only true of the functions, the variables are still a starting point for some things, aren't they?

Thanks again, I'll have a play with that.

BW
DFB1 Open source 50MHz 030 and TT-RAM accelerator for the Falcon
DSTB1 Open source 16Mhz 68k and AltRAM accelerator for the ST
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
ThorstenOtto
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2372
Joined: Sun Aug 03, 2014 5:54 pm

Re: VDI questions

Post by ThorstenOtto »

The point is, that the AES uses the current font to obtain the character sizes for the normal and small font ("small" here is the one that is used for icon texts). In Emutos, this is done here:

https://github.com/emutos/emutos/blob/m ... raf.c#L405

TOS essentially does the same.
User avatar
mfro
Atari God
Atari God
Posts: 1167
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

Re: VDI questions

Post by mfro »

This might be caused by two recent commits (that appeared unrelated, but apparently aren't). At least I've seen wrong (too small) font sizes with the bitplane driver as well. Not sure if it's the same issue, but worth a try.

Can you recompile with these commits reverted:

Code: Select all

git revert 7689c70 60934b6
to see if you have the same issue??

(https://github.com/freemint/fvdi/pull/3 ... 1126942949)
User avatar
Badwolf
Captain Atari
Captain Atari
Posts: 371
Joined: Thu Mar 16, 2017 12:09 pm

Re: VDI questions

Post by Badwolf »

mfro wrote: Thu Nov 03, 2022 5:07 pm Can you recompile with these commits reverted:

Code: Select all

git revert 7689c70 60934b6
to see if you have the same issue??

Mfro!

Sorry, I made a mistake previously -- I was using the new driver, but not the engine I compiled.

Sure enough, these reverts solve the problem for me! :cheers:

Apologies for the errant message previously (included below).

BW


WRONG MESSAGE:
Hi Mfro,

Many thanks for that, but I've given that a try and it makes no difference at my end, I'm afraid.

Interestingly starting FVDI from high res doesn't fix the issue either. It must default to the 9 point font.

Trying to figure out how to hack the Line-A variables ATM.

Cheers,

BW
DFB1 Open source 50MHz 030 and TT-RAM accelerator for the Falcon
DSTB1 Open source 16Mhz 68k and AltRAM accelerator for the ST
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
User avatar
Badwolf
Captain Atari
Captain Atari
Posts: 371
Joined: Thu Mar 16, 2017 12:09 pm

Re: VDI questions

Post by Badwolf »

stormy wrote: Wed Nov 02, 2022 10:07 pm !!!
Hey Steve,

I wouldn't call it a complete solution, but how's it look now? :-)

Screenshot_2022-11-03_21-38-43.png

BW
You do not have the required permissions to view the files attached to this post.
DFB1 Open source 50MHz 030 and TT-RAM accelerator for the Falcon
DSTB1 Open source 16Mhz 68k and AltRAM accelerator for the ST
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
m0n0
Captain Atari
Captain Atari
Posts: 436
Joined: Mon Oct 05, 2009 3:13 am

Re: VDI questions

Post by m0n0 »

Sorry for such a noob question, but I tried to understand this thread, and so I analysed the color count of the image posted above. Imagemagick says:

69945 colors.

Command used: identify -format "%k" Screenshot_2022-11-03_21-38-43.png

So, even with some transformation and conversion applied - is 69945 an realistic value for an 8 bit true color image? This is much more than 8 bit can hold, at least from my understanding.

Probably I'm getting something totally wrong... but I would like to understand this, anyway.

My definition of true color: If there is any palette involved at any time (in this piece of art), it can not be called true color.

BTW: nice looking result :-)
Last edited by m0n0 on Fri Nov 04, 2022 12:27 am, edited 1 time in total.
m0n0
Captain Atari
Captain Atari
Posts: 436
Joined: Mon Oct 05, 2009 3:13 am

Re: VDI questions

Post by m0n0 »

JeanMars wrote: Tue Oct 18, 2022 12:21 pm Interesting! But looks only monochrome and 16bit color modes are supported:

Code: Select all

                  subq.w   #1,d0          ;nur eine Ebene, monochrom?
                  beq      vr_trnfm_mono
                  sub.w    #16-1,d0       ;16 Ebenen?
                  bne.s    vr_trnfm_exit
Cheers,
Jean
Nope, "16 Ebenen?" translates to "16 color planes?" which results in 4 bit (not 16).
ThorstenOtto
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2372
Joined: Sun Aug 03, 2014 5:54 pm

Re: VDI questions

Post by ThorstenOtto »

16 planes means 16 bits, not 16 colors.
User avatar
mfro
Atari God
Atari God
Posts: 1167
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

Re: VDI questions

Post by mfro »

m0n0 wrote: Thu Nov 03, 2022 11:14 pm ...
Probably I'm getting something totally wrong... but I would like to understand this, anyway.
...
You probably missed Badwolf's switch from the 3x2x2 (8 bit - 256 colour) hardware originally discussed to the PiStorm-based 16-bit HDMI graphics halfway down the page? That last screenshot is indeed 16-bit true colour on the latter hardware.

And yes, it's a pretty one :thumbs:
JeanMars
Captain Atari
Captain Atari
Posts: 429
Joined: Fri Apr 09, 2010 5:15 pm
Location: France
Contact:

Re: VDI questions

Post by JeanMars »

Hi Badwolf,
I wouldn't call it a complete solution, but how's it look now? :-)
Nice! What did you do? At some point, I was even about to put the blame on VISION itself about bad icon rendering ;-)

Cheers,
Jean
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3951
Joined: Sat Jun 30, 2012 9:33 am

Re: VDI questions

Post by dml »

This looks fun. There's something I'd like to try if I had one of these attached to my MegaST...
User avatar
Badwolf
Captain Atari
Captain Atari
Posts: 371
Joined: Thu Mar 16, 2017 12:09 pm

Re: VDI questions

Post by Badwolf »

mfro wrote: Fri Nov 04, 2022 6:35 am
m0n0 wrote: Thu Nov 03, 2022 11:14 pm Probably I'm getting something totally wrong... but I would like to understand this, anyway.
You probably missed Badwolf's switch from the 3x2x2 (8 bit - 256 colour) hardware originally discussed to the PiStorm-based 16-bit HDMI graphics halfway down the page? That last screenshot is indeed 16-bit true colour on the latter hardware.
Sorry, yes -- it's two projects in one thread (as I'm using fVDI for both -- the learning curve's less steep than NVDI for now).

The first few screenshots were of Hatari simulating a Mega ST with another program simulating my cartridge port graphics card. I'm aiming at 8-bit VGA on that and am trying to do a paletteless 3-3-2 bits 'true colour' driver.

The last couple of screenshots are from my PiStormST work where I'm using a similar technique to have a virtual 'graphics card' rendered on the Raspberry Pi and output via HDMI. This is a much more normal 16-bit display. 5-6-5bit RGB.

Since I'm really bad with TOS and the techniques I'm using so similar, I've kept my questions on the same thread.

Cheers,

BW
DFB1 Open source 50MHz 030 and TT-RAM accelerator for the Falcon
DSTB1 Open source 16Mhz 68k and AltRAM accelerator for the ST
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
User avatar
Badwolf
Captain Atari
Captain Atari
Posts: 371
Joined: Thu Mar 16, 2017 12:09 pm

Re: VDI questions

Post by Badwolf »

JeanMars wrote: Fri Nov 04, 2022 8:18 am
I wouldn't call it a complete solution, but how's it look now? :-)
Nice! What did you do? At some point, I was even about to put the blame on VISION itself about bad icon rendering ;-)
Cheers,
Jean
Thanks Jean, but it's actually a different project -- that's a proper 16-bit screen and Vision is quite happy with that.

The only problem I was having with Vision there was that it seems to calcualte its icon height and its window height differently, so icons were not fitting in the window. this is probably technically a bug, but i would have thought one unlikely to occur very often in real life.

This was made visible because of an fVDI issue causing the system font to remain at 8x8 instead of 8x16 after my resolution change.

BW
DFB1 Open source 50MHz 030 and TT-RAM accelerator for the Falcon
DSTB1 Open source 16Mhz 68k and AltRAM accelerator for the ST
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
User avatar
Badwolf
Captain Atari
Captain Atari
Posts: 371
Joined: Thu Mar 16, 2017 12:09 pm

Re: VDI questions

Post by Badwolf »

dml wrote: Fri Nov 04, 2022 9:04 am This looks fun. There's something I'd like to try if I had one of these attached to my MegaST...
Thanks. :-)

It's not really viable yet (because of that bloody ST-RAM read performance issue!), but it's a fun demo.

Screenshot_2022-11-03_22-05-51.png

...shall I do a 1920x1080 one..?

BW
You do not have the required permissions to view the files attached to this post.
DFB1 Open source 50MHz 030 and TT-RAM accelerator for the Falcon
DSTB1 Open source 16Mhz 68k and AltRAM accelerator for the ST
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
User avatar
mfro
Atari God
Atari God
Posts: 1167
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

Re: VDI questions

Post by mfro »

Badwolf wrote: Thu Nov 03, 2022 7:36 pm ...
Sure enough, these reverts solve the problem for me! :cheers:
...
I have now reverted both offending commits in the upstream repository until somebody comes up with a solution.

If the choice is between having correct font sizes in the desktop and fix31 font height calculation, I opt for the former.
JeanMars
Captain Atari
Captain Atari
Posts: 429
Joined: Fri Apr 09, 2010 5:15 pm
Location: France
Contact:

Re: VDI questions

Post by JeanMars »

Hi badwolf,
Thanks for the update, there should à b un in vision when it comes to low/unsual resolutions. Could you please post vision.log ?
User avatar
Badwolf
Captain Atari
Captain Atari
Posts: 371
Joined: Thu Mar 16, 2017 12:09 pm

Re: VDI questions

Post by Badwolf »

JeanMars wrote: Fri Nov 04, 2022 12:11 pm Hi badwolf,
Thanks for the update, there should à b un in vision when it comes to low/unsual resolutions. Could you please post vision.log ?
Hi there. Unfortunately as it's working now, I don't see the issue any more -- if I can precipitate it again, I will do. :-)

BW
DFB1 Open source 50MHz 030 and TT-RAM accelerator for the Falcon
DSTB1 Open source 16Mhz 68k and AltRAM accelerator for the ST
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
Post Reply

Return to “Coding”