News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

VGA through rpi pico - How many colors possible on border?

Started by gregg, 15:46, 15 April 24

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Brocky

this is cool...finally a converter that works!..gonna have to get one...

i wonder if this could be simplified with something like an ESP32 WROVER and its ADCs and inbuilt comparators... i know it can output 64 colour VGA..

eto

Quote from: gregg on 23:24, 13 November 24Yep. I had test screen appearing on power off after a second in earlier version but it was causing some issues, so I switched it off and did not fix yet.
would turning black/off be a possibility? Test screen after power on is fine, but if I turn off the CPC it's a bit misleading to see the last frame.

Quote from: gregg on 23:24, 13 November 24Scanlines should be easy to add... instead of doubling each row I would just put every second row black?
It's worth giving it a try. Or maybe half brightness? Of course that would require another resistor per colour and another PCB revision.

Quote from: gregg on 23:24, 13 November 24The case looks awesome! It that case 3d printed? Is there a chance you would share the design?

Sure. The one you see in the picture is a special one as I pass through the power and can turn on/off everything with a switch. I also made another version which is just the case for the converter without any additions. I did not test it yet though... I'll make a test print today and share it.

eto

Quote from: gregg on 23:24, 13 November 24Is there a chance you would share the design?
Find attached the STL. I'm not 100% sure that it will fit as I can't test it as my converter is already fully assembled and I don't want to tear it apart again. But I think it should be fine. 

One version for the top of the case is for the pure PCB and the other is the one I used which offers options to add a power connector, power outlet and a switch. Not sure if anyone else will use it as I designed it for the components I already had. 

For the cords I also made some strain reliefs. I am absolutely not sure if that is a good design but it works for me. Put the cable through the hole before soldering it internally (check that it has the right size - there are 3 different diameters). Adjust the length so there is not too much cable inside and then press the little part into the slot - this should keep the cable in place and secure the internal soldering from any accidental ripping. 

Brocky

Quote from: Brocky on 03:08, 14 November 24this is cool...finally a converter that works!..gonna have to get one...

i wonder if this could be simplified with something like an ESP32 WROVER and its ADCs and inbuilt comparators... i know it can output 64 colour VGA..

im just looking at the pinout on the rpi pico...  it seems it has 3 ADCs... wouldnt they be perfect to read the RGB values from the CPC instead of the dedicated comparators?
the ADCs will be able to determine the levels and you can code them appropriately...
https://microcontrollerslab.com/raspberry-pi-pico-adc-tutorial/

im gonna have to grab a few picos to play with!

EDIT: never mind ..found the answer "First I wanted to use ADCs in RP2040, but they are just too slow."
96 clock cycles x (1 / 48MHz) = 2 μs per sample (500kS/s). for one conversion..we need 3x that... :(
ESP32 ADCs are not up to the task either :(

gregg

Unfortunately ADCs in pico are just too slow. I wasn't able to read samples fast enough with them. Actually that was also quite hard to find fast enough comparators that were cheap in the same time.
But if you find any way to do it without comparators, that would be great. It would simplify the design a lot.

Brocky

got some comparators on the way!.. 
atm it seems theres no "cheap" mcu that has fast enough ADCs.. or if they do, they only have 1! 

Brocky

ive just finished making up a vga4cpc board, (and i streamed building it on youtube!)

it works great in Pinball Dreams, i havent had a chance to test ghost n goblins yet  :D

one "demo" i seen that had issues is the 128k wonderboy remake, it uses a strange resolution
@gregg are you able to look into supporting this one please? see attached (cant find it on cpcpower)

ive got another 2 boards to make up... one for a friend, one to sell..and ill have 2 spare PCBs left if anyone needs one

@gregg you might want to start a new thread with VGA4CPC in the title, this is a great little board and it deserves more attention!

next step is to work out if i can put it IN the CPC and power it..

dodogildo

Quote from: Brocky on 13:03, 20 February 25it works great in Pinball Dreams, i havent had a chance to test ghost n goblins yet  :D
Very nice. BTW, Relentless is known having weirdness with various displays. Did you test it as well?

eto

Quote from: dodogildo on 13:44, 20 February 25
Quote from: Brocky on 13:03, 20 February 25it works great in Pinball Dreams, i havent had a chance to test ghost n goblins yet  :D
Very nice. BTW, Relentless is known having weirdness with various displays. Did you test it as well?
I did when I built it. It works very well. 

gregg

@Brocky I will take a look at Wonderboy. Looking at the videos I think it does scroll in some not-so-standard way. I only implemented the case when hsync is reduced from 4us to 3us. That is the most popular one, but not the only one possible. Looking at the videos on YT the border is shaking a lot so I guess hsync is reduced even more. I will confirm it, but if it is true, then I will need to find a way to handle it. The trick I am using right now will no longer work, so that would be a cool challenge to fix it.

gregg

@Brocky When you said about putting it inside to power it, actually I was thinking about one more option - make it smaller but with two plugs mounted on the board that would go to video out and power in on the back (of course the board would have to be different for each Amstrad model). It would be like flat board that plugs on the back of Amstrad to both ports and on other side it would have vga socket and the power input where you would connect Amstrad power supply and it would power both - this board and Amstrad.

Brocky

i was thinkin of wiring it directly to the video connector pins on the cpc board.. and 5v to the picos pins.. (that way both original monitor, if i ever get one, and vga monitor can work side by side)
i was thinking about cutting a hole in the back of the cpc to plug VGA in..between the cpc board and disk drive... only problem.. i need access to that reset switch to reset the vga4cpc board as it sometimes doesnt detect a change eg when ya switch off the cpc, the vga4cpc board will continue to show the last screen and not detect when the cpc is switched back on, hitting reset finds the signal..
i guess i could also rewire the reset button to move it to the cpc case...i may not even need to do that if the board is powered down/up with the CPC..


i already have added a rom switch on the back, im not scared to cut a hole in the back of the 6128 case.. its pretty rough as it is anyways..

gregg

@Brocky I tested Wonderboy and IMO looks as expected. It is not really smooth (not as smooth as relentless), but when I recorded it in slow motion it scrolls exactly the same amount in each frame. I checked it with oscilloscope and it uses exactly the same technique as Relentless - hsync switching between 4us and 3us. I also checked videos online and Wonderboy looks exactly the same.
Could you make a video how it looks for you and maybe as some point of reference how it should look like? I don't have an original Amstrad monitor to compare.

Brocky

Quote from: gregg on 22:45, 22 February 25@Brocky I tested Wonderboy and IMO looks as expected. It is not really smooth (not as smooth as relentless), but when I recorded it in slow motion it scrolls exactly the same amount in each frame. I checked it with oscilloscope and it uses exactly the same technique as Relentless - hsync switching between 4us and 3us. I also checked videos online and Wonderboy looks exactly the same.
Could you make a video how it looks for you and maybe as some point of reference how it should look like? I don't have an original Amstrad monitor to compare.

interesting....
ill get a screenshot of what im seeing a bit later

Brocky

very interesting....
i just finished making up another 2.5 vga4cpc boards (0.5 coz im missing a pico and vga connector!)

but... wonderboy worked fine on these 2 new ones!
with the first one.. its was splitting the scanlines.. displayed half on one side of the screen and half on the other...yet everything else worked fine...
i even switched between 50 and 60hz modes and was gettin the same thing.... but the new ones are fine?! weird!.. i may need to recheck the soldering on the first one...

gregg

There is also an existing problem that sometimes it was switching to such a weird state especially when turning on Amstrad but resetting the board helped. I am just trying to debug it again now, but no luck so far. But if you say it is a constant issue and reset does not help, then potential reason may be a bad solder on one of the pico pins related to VSync generated internally from CSync, so check the solder on Pico's pins: 10, 14 and 29.

Brocky

Quote from: gregg on 23:53, 23 February 25There is also an existing problem that sometimes it was switching to such a weird state especially when turning on Amstrad but resetting the board helped. I am just trying to debug it again now, but no luck so far. But if you say it is a constant issue and reset does not help, then potential reason may be a bad solder on one of the pico pins related to VSync generated internally from CSync, so check the solder on Pico's pins: 10, 14 and 29.
all good now after a touch up of the picos pins...they are really finicky to solder right...(doesnt help my eyes aint what they used to be!)

@eto i tried printing the case you posted above, but im having issues pluging in the usb cable the the recessed usb port on the pico..
just a heads up for anyone wanting to print it.. may need to cut a wider hole..


Brocky

seems like it maybe somewhat still monitor dependent, 

eg, with my old VGA CRT monitor, the eagle on pinball dreams looked fine, yet on my LCD monitor, the eagle has the split scan lines and shimmer...
but for the most part it helps in alot of games where there is trouble with other converters..

Powered by SMFPacks Menu Editor Mod