Page 1 of 1

Vector games how to get better image

Posted: Thu Apr 29, 2021 1:31 pm
by mr_mr_mr
I am interested in playing Gravitar but I am unsure how/if can I get better image quality. I am using hdmi and 1080p and the lines are not solid but dotted so to speak. I understand that this might be a limitation of original display being vector crt and that there is nothing to be done, but if there is some settings I can try to change, please advice.

Re: Vector games how to get better image

Posted: Thu Apr 29, 2021 2:49 pm
by mic_
To get it to look more like on the original arcade machine, the core would probably have to add some antaliasing when rendering the vectors. And possibly some slight "glow" around the vectors as well.

For a software emulator that shouldn't be that much of an issue, but I have no idea how practical it would be for a MiSTer core to do that. Perhaps it could be done in the form of a video filter instead of being part of the core(?).

Re: Vector games how to get better image

Posted: Thu Apr 29, 2021 10:03 pm
by LamerDeluxe
It is a real shame that the vector games don't look better. I am experienced in graphics programming, but I couldn't find where the vector drawing code was in MiSTer, assuming that part is done on the ARM CPU.

You'd need a higher resolution, anti-aliased bresenham line drawing and a two pass Gaussian blur for glow. For a better result you'd have to use additive blending. And then you should really vary the brightness of a vector according to the speed it is being drawn at.

For the best vector simulation you'd need HDR support, but the MiSTer can't output that.

I'm still hoping for some kind of solution with which you could attach a real vector display, or a CRT oscilloscope.

Re: Vector games how to get better image

Posted: Thu Apr 29, 2021 10:22 pm
by jimmystones
It's all on the FPGA side, the ARM CPU doesn't get involved in graphics really.

All the rendering on the vector cores I've seen has been using the original beam control signals to plot pixels on a frame buffer. It's usually double buffered so a completed image is being output to vga while the next one is drawn.

Here is the module in asteroids:
https://github.com/MiSTer-devel/Arcade- ... ids_dw.vhd

Putting image processing stages in to make it look nicer is probably possible, but sounds complicated to achieve in HDL to me :)

Re: Vector games how to get better image

Posted: Thu Apr 29, 2021 10:27 pm
by jca
LamerDeluxe wrote: Thu Apr 29, 2021 10:03 pm It is a real shame that the vector games don't look better. I am experienced in graphics programming, but I couldn't find where the vector drawing code was in MiSTer, assuming that part is done on the ARM CPU.
It is done in the FPGA.
LamerDeluxe wrote: Thu Apr 29, 2021 10:03 pm You'd need a higher resolution, anti-aliased bresenham line drawing and a two pass Gaussian blur for glow. For a better result you'd have to use additive blending. And then you should really vary the brightness of a vector according to the speed it is being drawn at.
It depends on how much time there is to accomplish this. The 6809 is not a speed demon so I guess there is time to improve the drawing.
LamerDeluxe wrote: Thu Apr 29, 2021 10:03 pm I'm still hoping for some kind of solution with which you could attach a real vector display, or a CRT oscilloscope.
I have been thinking about that for quite sometimes, in particular after reading on Hackaday about a project using an oscilloscope as the display. It was not done on FPGA but on a custom PCB using original components but for the part driving the scope.

Re: Vector games how to get better image

Posted: Fri Apr 30, 2021 1:24 am
by alanswx
I think battlezone looks better. I am not sure why it looks so low resolution. Of course it is a bit low resolution.

Battlezone has a different rendering engine.

Re: Vector games how to get better image

Posted: Fri Apr 30, 2021 2:22 am
by dmckean
jimmystones wrote: Thu Apr 29, 2021 10:22 pm It's all on the FPGA side, the ARM CPU doesn't get involved in graphics really.

All the rendering on the vector cores I've seen has been using the original beam control signals to plot pixels on a frame buffer. It's usually double buffered so a completed image is being output to vga while the next one is drawn.

Here is the module in asteroids:
https://github.com/MiSTer-devel/Arcade- ... ids_dw.vhd

Putting image processing stages in to make it look nicer is probably possible, but sounds complicated to achieve in HDL to me :)
It would be cool if we could output the raw beam control signals to some sort of external image processor and outputs realistic looking vector graphics.

Re: Vector games how to get better image

Posted: Fri Apr 30, 2021 7:59 am
by hitm4n
Vectrex is no good without some glow and persistence. I'd love to see Vectrex games in glowing glory.

Re: Vector games how to get better image

Posted: Fri Apr 30, 2021 9:39 am
by jimmystones
Outputting the beam stuff is already a done thing:

https://mobile.twitter.com/ashevans81/s ... 0998275079

As to some kind of external device to make a simulated vector output that looked nice, I have no doubt someone could make a pi do that! The question would be can it be lag free enough to be fun.

Re: Vector games how to get better image

Posted: Fri Apr 30, 2021 9:49 am
by LamerDeluxe
jca wrote: Thu Apr 29, 2021 10:27 pm I have been thinking about that for quite sometimes, in particular after reading on Hackaday about a project using an oscilloscope as the display. It was not done on FPGA but on a custom PCB using original components but for the part driving the scope.
The audio output of the Amiga used to be utilized for controlling laser shows. Oscilloscope music also works quite well. MiSTer would need some kind of proper DAC to be able to output to a scope, two channels for x/y and then one for brightness.
dmckean wrote: Fri Apr 30, 2021 2:22 am It would be cool if we could output the raw beam control signals to some sort of external image processor and outputs realistic looking vector graphics.
I am a bit surprised that the actual drawing of the vectors is being done by the FPGA, I wonder why that decision was made. It seems much more logical to me to output the control signals to the ARM CPU and have that draw the vectors at a better looking quality.

Re: Vector games how to get better image

Posted: Fri Apr 30, 2021 9:58 am
by jimmystones
The ARM has no direct access to the display, so you'd have to pass all that video output back over to the core so it could throw it back into the scaler! Theoretically possible I think using the shared DDR RAM space but not exactly simple.

Re: Vector games how to get better image

Posted: Fri Apr 30, 2021 10:33 am
by LamerDeluxe
jimmystones wrote: Fri Apr 30, 2021 9:58 am The ARM has no direct access to the display, so you'd have to pass all that video output back over to the core so it could throw it back into the scaler! Theoretically possible I think using the shared DDR RAM space but not exactly simple.
Ah, that explains it. I was thinking the scaler was running on the ARM and outputting to the display.

Re: Vector games how to get better image

Posted: Fri Apr 30, 2021 1:22 pm
by jca
LamerDeluxe wrote: Fri Apr 30, 2021 9:49 am The audio output of the Amiga used to be utilized for controlling laser shows. Oscilloscope music also works quite well. MiSTer would need some kind of proper DAC to be able to output to a scope, two channels for x/y and then one for brightness.
Laser show equipment wouldn't work in this case due to inertia. On MISTer it should be possible to use the User I/O port to control the scope using I2C DACs. For the Z output I do not know if the brightness is controlled or if it is just On/Off. In any case the data to drive the scope is already there as it is the values used to do the rasterization.

Re: Vector games how to get better image

Posted: Fri Apr 30, 2021 1:33 pm
by LamerDeluxe
jca wrote: Fri Apr 30, 2021 1:22 pm
LamerDeluxe wrote: Fri Apr 30, 2021 9:49 am The audio output of the Amiga used to be utilized for controlling laser shows. Oscilloscope music also works quite well. MiSTer would need some kind of proper DAC to be able to output to a scope, two channels for x/y and then one for brightness.
Laser show equipment wouldn't work in this case due to inertia. On MISTer it should be possible to use the User I/O port to control the scope using I2C DACs. For the Z output I do not know if the brightness is controlled or if it is just On/Off. In any case the data to drive the scope is already there as it is the values used to do the rasterization.
I know, that isn't why I mentioned it, more as one of the solutions that uses audio to control vectors. The Vectrex has variable brightness. It would also be handy for spot killing. Would be great if the User I/O solution could work.

Re: Vector games how to get better image

Posted: Fri Apr 30, 2021 1:47 pm
by jimmystones
Ash already did some work on this:

https://github.com/ElectronAsh/MiSTer_Vector

Re: Vector games how to get better image

Posted: Fri Apr 30, 2021 2:01 pm
by LamerDeluxe
jimmystones wrote: Fri Apr 30, 2021 1:47 pm Ash already did some work on this:

https://github.com/ElectronAsh/MiSTer_Vector
Really cool, with a 3D sync option even, I suppose to sync shutter glasses with 3D Vectrex games.

Re: Vector games how to get better image

Posted: Fri Apr 30, 2021 2:24 pm
by jca
It looks like it is more than that as I see RGB on the board. I will have a better look at it. Thanks for the link.

Re: Vector games how to get better image

Posted: Fri Apr 30, 2021 3:03 pm
by Hackshed_Carl
Take a look at the PDP-1 core. I'm pretty sure it manages to add the "glow" for spacewar but I'm not near my MiSTer currently to check

Re: Vector games how to get better image

Posted: Fri Apr 30, 2021 3:27 pm
by jimmystones
I think Space War is simulating a phospor coated radar screen which is a bit different, but it's possible there might be some useful techniques in there. The write-up on the PDP1 repo README is ... very involved!!

Re: Vector games how to get better image

Posted: Fri Apr 30, 2021 4:24 pm
by dmckean
jimmystones wrote: Fri Apr 30, 2021 9:39 am Outputting the beam stuff is already a done thing:

https://mobile.twitter.com/ashevans81/s ... 0998275079

As to some kind of external device to make a simulated vector output that looked nice, I have no doubt someone could make a pi do that! The question would be can it be lag free enough to be fun.
Interesting. I suppose it would be best if it were some sort of baremetal thing like the mt-32pi.

Re: Vector games how to get better image

Posted: Tue May 18, 2021 2:52 am
by lnielsen
I was thinking about this the other day, Could you use a small laser projector in a cabinet projecting against a screen from an old rear projection TV? I would think the smaller range would allow a lower cost projector to be used. I would love to do something like this if the cost was reasonable. My favorite vector game was Rip-Off!

Re: Vector games how to get better image

Posted: Tue May 18, 2021 11:40 pm
by jca
A priory this seems a good idea, but...
To move the beam you need mirrors which have a non negligible mass -> Inertia.
TV screens or oscilloscopes have a phosphor coating which provides a visual persistence longer than that of your eyes.
This means that with a laser you cannot take sharp corners at full speed or they will be rounded. You have to slow down when approaching a corner and speed up when leaving it. This has 2 effects: you also have to modulate the intensity of the beam so when it slows down the intensity is not greater than the rest of the line. As you cannot go has fast as with a CRT you cannot have as many lines with the laser without flickering due to the shorter visual persistence of your eyes.
In the end you cannot use directly an existing game out of the box, it would have to be re-written to take these effects into account.
Interesting video:
https://www.youtube.com/watch?v=FkHjG759ABY

Re: Vector games how to get better image

Posted: Wed May 19, 2021 3:10 am
by ash2fpga
jca wrote: Tue May 18, 2021 11:40 pm Interesting video:
https://www.youtube.com/watch?v=FkHjG759ABY
Getting some flashbacks to 80s/90s laser light shows here. :D