1024x768 and 15KHz TV modes on an A5000 with BenQ BL912 monitor

Arc/RPCs, peripherals, RISCOS operating system & ARM kit eg GP2x, BeagleBoard
Post Reply
User avatar
IanB
Posts: 370
Joined: Sun Sep 04, 2011 7:28 pm
Location: South Wales
Contact:

1024x768 and 15KHz TV modes on an A5000 with BenQ BL912 monitor

Post by IanB » Sat May 28, 2016 8:21 pm

A few months ago I reviewed the BenQ BL912 monitor (viewtopic.php?f=16&t=10591) which is popular with Amiga owners as it can display 15Khz TV modes as well as more normal VGA modes. Although it worked with my A5000, the quality of the picture in TV modes was poor because the pixel clock rate used by Acorn machines (16Mhz) didn't match the digital TV standard pixel clock rate of 13.5Mhz expected by the BenQ. It worked well with the Amiga because it's pixel clock rate was 14.3 Mhz and there was enough adjustment range in the monitor's clock setting to get the sample rates to match. I estimate there is +-1Mhz of adjustment, so not enough to change from 13.5 to 16.

To get good TV mode pictures with the BenQ I needed to have a 13.5Mhz pixel clock so I originally experimented with 13.5Mhz (for 576i) and 27Mhz (for 576p) oscillators on a modified version of paulv's Archimedes Ultra VIDC enhancer, driving it from an i2c controlled output port as the AUX bits used to control it on the Archimedes are not available on the A5000 or other machines. This worked giving excellent quality TV modes such as 320x256 and 640x256 and also 576p modes such as 640x512, all at 50Hz. However, the audio was way off pitch and consulting the RISCOS 3 PRMs indicated that the VIDC clock had to be a multiple of 4MHz (or within a few % of that multiple) for correct pitch.

Using 20.25 Mhz and 40.5 Mhz instead of 13.5Mhz and 27Mhz respectively worked around that as they were both close to multiples of 4Mhz and could generate the desired 13.5Mhz and 27Mhz clocks using the VIDC's 2/3 divider. However, oscillators with those frequencies are not readily available and when looking for possible solutions, I came across a low cost adafruit clock generator module (https://learn.adafruit.com/adafruit-si5 ... -breakout/) which can produce any desired frequency with I2C software control using PLLs locked to a single 25Mhz crystal. The module has 3 independent clock outputs which can be set to any frequency, or set to logic low or high so I used ouput 0 for the clock source and output 2 as a logic level to control switching between the original clock from the motherboard and the output of the module. Output 1 was unused.

I wrote a driver module which monitored mode changes using modes created with !CustomVDU and reprogrammed the adafruit module over I2C to generate the desired frequency in the custom modes so the video system on older VIDC based machines (i.e. the A5000 / A4000 / A3xxx / Archimedes etc) is now almost as versatile as the RISCPC or A7000.

Since then, as well as the TV modes, I've created various other resolutions such as 1024x768, 960x768 and 896x720 all at @50Hz, 45Hz & 40Hz (The latter two resolutions are square pixel on the BenQ which is a 5:4 monitor). Unfortunately 60 Hz needs too high a clock rate for my VIDC, However the BenQ will lock to all those lower refresh rates and many other monitors will lock to 50Hz these days. (The low refresh rate isn't a problem with LCD monitors as they don't have refresh flicker and indeed the lowest usable frequency is the best as that leaves more memory bandwidth for program execution).

This is still a work in progress but I'll post the construction details and software when I've finished. It should work on any Acorn RISCOS 3.10 or 3.11 machine and together with the BenQ monitor may be the ultimate LCD monitor solution for this era of machines as games run in the right 15Khz/50Hz TV modes at the right speed and you can still use a high resolution desktop.

1024x768:
1024x768.jpg
720x576 (576p):
720x576.jpg
640x256 TV mode @50 Hz (576i)
640x256.jpg
Photo of prototype setup:
VIDC-adafruit.jpg

steve3000
Posts: 1984
Joined: Sun Nov 25, 2012 12:43 am
Contact:

Re: 1024x768 and 15KHz TV modes on an A5000 with BenQ BL912 monitor

Post by steve3000 » Sat May 28, 2016 10:45 pm

Wow, excellent work!

Is that a 48MHz feed into your VIDC? :shock: How hot does it get at 48MHz? Do you have any cooling/heatsink fitted?

I've tried 40MHz in the past in my A310 and the vidc got very warm after a few minutes...so I decided not to go further without cooling (which I've not added yet).

However the A5000 vidc is a later version and (presumably) rated to 36Mhz, so you may well get reliability at higher overclocks. :)

User avatar
paulv
Posts: 3853
Joined: Tue Jan 25, 2011 6:37 pm
Location: Leicestershire
Contact:

Re: 1024x768 and 15KHz TV modes on an A5000 with BenQ BL912 monitor

Post by paulv » Sun May 29, 2016 12:13 am

=D> =D> =D> =D> =D>

:D

I've been waiting for this announcement for a week or two now. Very cool work Ian and I'm sorry I wasn't much help, not having access to my hardware is a real drag :(

I'm going to need to officially extend AutoVIDC to support your hardware mod properly, building it into AutoVIDC directly rather than having two modules as previously discussed in PM's. The reason for that is so that tools like Steve's LCDGameModes use AutoVIDC to control the VIDC clock generator in a standard way via the SWI's and it's the only bit of software that supports all the different VIDC Enhancers so Steve doesn't have to worry about all that... Extending AutoVIDC for this reason alone is the way to go I think.

On the hardware front, I'll just add that I've currently got 130 Ultra VIDC Enhancer PCB's enough and ACT153 chips to go with them. I'll finally be starting a build run of 40 "standard" Ultra VIDC Enhancers in the next few weeks which will be suitable for the A300/400, A400/1 and A3000 series machines.

Given the way Ian has modded the board for the adafruit clock generator, it will be entirely doable to adapt all existing Ultra VIDC Enhancers to accept the adafruit clock generator feed into the custom crystal position as Ian has done and switch to that feed when AutoVIDC doesn't recognise the clock speed that has been poked into &1228 when one of Ian's custom modes is generated. I've already got a version of AutoVIDC "sort of" talking to Ian's mod but development is hampered by me only having Arculator available to me at the moment :(

IIUC, from what Ian has told me, although the adafruit clock generator could be used to generate all the clock speeds required for and Arc, as a minimum, the original 24MHz clock must be available to the VIDC at power on otherwise RISC OS will complain and have a POST error because the POST routines check for the 24MHz clock speed being present at boot. As Ian's mod requires a module to drive the I2C clock selection and the board doesn't have a way to generate a clock until the driver is loaded for it, The Ultra VIDC board is required to MUX the clock sources as it does now, allowing the 24 MHz clock to pass through.

The event better news with Ian's mod is that even if 25.175 and 36MHz crystals become unobtainable in the future, adafruit board could be used to generate every clock speed that the Arc supports apart from the 24MHz clock and the Ultra VIDC board would simply become a neat way to MUX the clocks as per Ian's A5000 images above.

Finally, I've also got my prototype "driverless" PCB's that I have still got to play with but if they work, it'll mean that an A400/1 machine could have driver-less support for 24, 25.175 and 36MHz just like the A5000. Then support for the adafruit board could either be built into a patched RISC OS 3.11 image and become "driver-less" too by using a modified version of AutoVIDC for universal VIDC clock selection :D

Paul

User avatar
IanB
Posts: 370
Joined: Sun Sep 04, 2011 7:28 pm
Location: South Wales
Contact:

Re: 1024x768 and 15KHz TV modes on an A5000 with BenQ BL912 monitor

Post by IanB » Sun May 29, 2016 12:39 am

steve3000 wrote:How hot does it get at 48MHz? Do you have any cooling/heatsink fitted?
There is no discernable change in temperature on my A5000 VIDC and no heatsink is fitted.

It will go even higher, here's 1280x720 widescreen using a 50Mhz clock (didn't you say colour widescreen on VIDC1 is out of the question :wink: )
1280x720wide.jpg
Ok I cheated a bit, I don't have a widescreen monitor that will display the non standard 46Hz refresh so squashed the picture, here's what it actually looks like on the 5:4 monitor:
1280x720.jpg
Although I guess it will probably display on a BenQ widescreen monitor of similar vintage to the BL912 if it uses the same chipset.
steve3000 wrote:I've tried 40MHz in the past in my A310 and the vidc got very warm after a few minutes...so I decided not to go further without cooling (which I've not added yet).
The VIDC on my A5000 starts glitching at 51Mhz and falls over at 52Mhz with massive screen corruption.

I've got an A440 and an A440/1 but haven't tried them yet although I do have a standard VIDC enhancer on one of them so I know it will go to 36Mhz at least and that means I should be able to get 960x768 @ 40Hz on it as that only uses 36Mhz.

steve3000
Posts: 1984
Joined: Sun Nov 25, 2012 12:43 am
Contact:

Re: 1024x768 and 15KHz TV modes on an A5000 with BenQ BL912 monitor

Post by steve3000 » Sun May 29, 2016 7:33 am

IanB wrote:There is no discernable change in temperature on my A5000 VIDC and no heatsink is fitted.
Oh, that IS good to hear :)
IanB wrote:It will go even higher, here's 1280x720 widescreen using a 50Mhz clock (didn't you say colour widescreen on VIDC1 is out of the question :wink: )
=D> =D> I better eat my hat... :shock:
IanB wrote:The VIDC on my A5000 starts glitching at 51Mhz and falls over at 52Mhz with massive screen corruption.

I've got an A440 and an A440/1 but haven't tried them yet although I do have a standard VIDC enhancer on one of them so I know it will go to 36Mhz at least and that means I should be able to get 960x768 @ 40Hz on it as that only uses 36Mhz.
Yes the original VIDC (labelled Arabella) was only ever designed for 24MHz clock, but in fact it usually works at 36MHz, at least for a while. I recall I had to replace my original Arabella VIDC chip from my A310 shortly after I got a VIDC enhancer in the early 90's, because it died without warning (I had only been running 800x600 (36MHz) for a few days, iirc...) - but the replacement, labelled VY86C310-12QC (which should be fitted to the later machines) never failed.

One other issue you may run into (particularly on the older hardware Arcs), is the memory speed - this may prove limiting particularly for your wide screen mode. For example, the RISC OS screen mode with highest memory bandwidth is MODE 28 (640*480 @ 60Hz in 256c = 17.6Mb/s). If you try to generate 256 colour 800*600 @ 56Hz (ie. MODE 32, 800*600 @ 56Hz in 256c = 25.6Mb/s), you get pixel 'shimmer' because the memory can't keep up. Your widescreen mode gets close to this, 1280*720 @ 50Hz in 16c = 22.0Mb/s. Do you see any 'shimmering'? And if you click on the floppy drive, does the screen disappear during floppy access DMA?

Can't wait to try one of these :)

User avatar
IanB
Posts: 370
Joined: Sun Sep 04, 2011 7:28 pm
Location: South Wales
Contact:

Re: 1024x768 and 15KHz TV modes on an A5000 with BenQ BL912 monitor

Post by IanB » Sun May 29, 2016 9:45 pm

steve3000 wrote:Yes the original VIDC (labelled Arabella) was only ever designed for 24MHz clock, but in fact it usually works at 36MHz, at least for a while. I recall I had to replace my original Arabella VIDC chip from my A310 shortly after I got a VIDC enhancer in the early 90's, because it died without warning (I had only been running 800x600 (36MHz) for a few days, iirc...) - but the replacement, labelled VY86C310-12QC (which should be fitted to the later machines) never failed.
I have an Arabella chip in my Acorn spares collection. I don't recall it failing but I think I ordered a replacement because it just didn't work at 800x600. When I next dismantle the A440 and A440/1 to fit this mod I'll check their VIDCs.
steve3000 wrote:Your widescreen mode gets close to this, 1280*720 @ 50Hz in 16c = 22.0Mb/s. Do you see any 'shimmering'? And if you click on the floppy drive, does the screen disappear during floppy access DMA?
The above widescreen was only 46Hz, not 50Hz so no shimmering and no screen blanking during floppy activity. The failure at 52Mhz I observed is the same kind of sideways slippage of the video that you get on the RISC PC when exceeding it's video system capability.
The main reason for the board though is to get 13.5Mhz for good TV modes and although you can experiment with overclocking, underclocking might be more useful. As the BenQ monitor can lock down to 40Hz, all desktop modes can be underclocked to that so you can still end up with a higher desktop resolution even if your VIDC won't work at 36 Mhz.

One minor issue which I'm investigating at the moment is the 4Mhz multiple restriction of the VIDC clock. It doesn't have to be exactly a 4Mhz multiple, as long as it's within a few percent and as mentioned I'm using 20.25Mhz to get 13.5Mhz and 40.5Mhz to get 27MHz clocks for the TV modes. These are only 1.25% off so not really noticeable but the 40.5Mhz one is a significant overclock compared to using 27Mhz directly.

27Mhz is used for 720x576@50Hz (576p) a sort of half way between 640x480 and 800x600 and it's a standard that may work on quite a few recent monitors so would be a good candidate for an improved desktop resolution on a machine with limited overclocking capability but it would have to use 27 Mhz direcly rather than deriving it from 40.5Mhz.

The 27 Mhz clock is quite close to 28Mhz (3.7% which is less that the 4% pitch shift on 24fps film speeded up to 25fps for 50Hz TV) so that shouldn't be noticeable but unfortuately RISCOS always rounds down to the 4Mhz multiple rather than rounding to the nearest so the system gets setup for 24Mhz sample rates and you end up with 12.5% error instead of 3.7% which is really noticeable.

I managed to work around this by specifying the clock as 28Mhz in !CustomVDU but then actually generating a 27Mhz clock from the adafruit board when the system asked for 28Mhz and that meant RISCOS audio was set up for 28Mhz sound sampling resulting in only 3.7% error. While this works for this one case, I'm looking for a more general solution.

User avatar
IanB
Posts: 370
Joined: Sun Sep 04, 2011 7:28 pm
Location: South Wales
Contact:

Re: 1024x768 and 15KHz TV modes on an A5000 with BenQ BL912 monitor

Post by IanB » Tue May 31, 2016 7:07 pm

I fitted the upgrade to my A4000 but had a huge problem with crosstalk initially. My current test software was generating the clocks for all modes, including the 24, 25.175 and 36 Mhz ones and modes using those clocks showed serious patterning on the video caused by them beating with the internal ones of the same frequency. I got around this by disabling the adafruit clock for those modes and switching to the internal crystals but there was still beat patterning when using custom frequencies. Normally there is no way to disable the internal clock when using custom ones but I had an idea and removed the 25.175 Mhz crystal so that when it was selected, the internal clock was effectively disabled and that worked so the beat patterning was eliminated. The 25.175 Mhz clock is now generated by the adafruit board and I force the VIDC clock latch to select the non-working 25.175Mhz crystal source when using custom frequencies.
Finally there were some vertical stripes in the video output and I got rid of those by running the board from it's own 5V supply derived from the 12V with a 7805 regulator.

I assume this crosstalk is caused by PCB layout or maybe it's internal to the ARM250 itself. There were no problems like this on the A5000 but at least I found fixes for them on the A4000. The only issue with removing the 25.175Mhz crystal is that you can't configure the A4000 to startup in 640x480 modes.

Edit:
I connected the switching signal from output 2 of the adafruit to the return side of the 25.175 Mhz crystal via a schottky diode and that stalled the crystal when high (i.e when switching to a custom frequency) which had the same effect as removing it but allowed it to work normally on bootup.

User avatar
paulv
Posts: 3853
Joined: Tue Jan 25, 2011 6:37 pm
Location: Leicestershire
Contact:

Re: 1024x768 and 15KHz TV modes on an A5000 with BenQ BL912 monitor

Post by paulv » Thu Jun 02, 2016 1:08 am

IanB wrote:The 25.175 Mhz clock is now generated by the adafruit board and I force the VIDC clock latch to select the non-working 25.175Mhz crystal source when using custom frequencies.
Finally there were some vertical stripes in the video output and I got rid of those by running the board from it's own 5V supply derived from the 12V with a 7805 regulator.
It's interesting that you were seeing cross talk on the 25.175MHz clocks as much as you did. By the sounds of it though it's the A4000 rather than the adafruit or Ultra VIDC Enhancer board. I specifically designed the Ultra VIDC Enhancer to have the clock tracks for each crystal to be on opposite sides of the PCB so 24 on the top, 25.175 on the bottom, 36 on the top and "custom" on the bottom again. The physical layout of the tracks keeps the different clocks as far away from each other as possible and having a full ground plane on each side should again help reduce cross talk to just the connector from the PCB to the motherboard and possibly internally to the ACT153 chip on board.

Obviously, having the VIDC board as close as possible to the genlock header is desirable. The board could be mounted in a similar way to the Watford VIDC enhancer if needed to shorten the connections to the minimum but I've not seen significant issues on the older Arcs with clock connectors that are several inches in length, even when I was breadboarding the design my main issue seemed to be the capacitance of the connections on the breadboard itself which I solved by doubling up every wire on the breadboard implementation.

In your PM, you mention increasing the series resistor on the clock output of the Ultra VIDC Enhancer to a 1K value. I haven't reviewed the A4000 schematics. My choice was to use a 68R resistor in series as that's what the A540 uses and the Ultra VIDC Enhancer closely resembles the A540's schematic for clock selection. The later motherboards are significantly different and I never needed to consider the ARM250 before so haven't looked at its datasheet and I don't know what the internal configuration of the VIDC pins are like on that chip.
IanB wrote:I assume this crosstalk is caused by PCB layout or maybe it's internal to the ARM250 itself. There were no problems like this on the A5000 but at least I found fixes for them on the A4000. The only issue with removing the 25.175Mhz crystal is that you can't configure the A4000 to startup in 640x480 modes.
It'd be interesting to see if this issue carries through to the A30x0 machines too, obviously the older A3010's with the Adelaide board fitted may well be more like the A5000 and earlier Arc's.

My BENQ monitor arrived today and I have an A3000 which is still in its box but out of storage so I'll be up and running in a few days time with a proper hardware development environment. I'm pretty sure this A3000 is a 4MB, RISC OS 3, ARM2 config with a single 25.175MHz version of the original single clock VIDC Enhancer design. I can quickly swap out the board for an Ultra VIDC Enhancer and then I'll be able to join in the fun :D

Paul

User avatar
IanB
Posts: 370
Joined: Sun Sep 04, 2011 7:28 pm
Location: South Wales
Contact:

Re: 1024x768 and 15KHz TV modes on an A5000 with BenQ BL912 monitor

Post by IanB » Thu Jun 02, 2016 7:25 pm

paulv wrote:Obviously, having the VIDC board as close as possible to the genlock header is desirable. The board could be mounted in a similar way to the Watford VIDC enhancer if needed to shorten the connections to the minimum but I've not seen significant issues on the older Arcs with clock connectors that are several inches in length, even when I was breadboarding the design my main issue seemed to be the capacitance of the connections on the breadboard itself which I solved by doubling up every wire on the breadboard implementation.
I tried making up a mini version by glueing and wiring up a surface mount 74ACT157 to one side of the adafruit board and the clock in/out header to the other so that leads were kept to the absolute minimum (The '157 is a quad two way switch and one switch was used to select between the original clock and the adafruit clock under control of output 2)
This worked on the A5000 and looks neat but had exactly the same crosstalk problems on the A4000 so I can't really recommend building it this way as it's a bit too fiddly to add in the other things that are needed for reliable operation on the A4000 and maybe other ARM250 machines.
ada1.jpg
ada4.jpg
paulv wrote:In your PM, you mention increasing the series resistor on the clock output of the Ultra VIDC Enhancer to a 1K value. I haven't reviewed the A4000 schematics. My choice was to use a 68R resistor in series as that's what the A540 uses and the Ultra VIDC Enhancer closely resembles the A540's schematic for clock selection. The later motherboards are significantly different and I never needed to consider the ARM250 before so haven't looked at its datasheet and I don't know what the internal configuration of the VIDC pins are like on that chip.
I think changing the resistor to 1K had the most significant effect on crosstalk but I tried removing all three fixes, one at a time (regulator, resistor and crystal staller) and they all resulted in an increase in crosstalk. The A4000 already had a 68R resistor in the clock line going to the header and I tried both a wire link and a 68R resistor on the output of the switch without any real difference and only when I tried 1K did I get a significant improvement. The clock in and out are on adjacent pins on the ARM 250 and they are both near the RGB outputs as well so there is likely a lot of potential for capacitive coupling and raising the impedance seems to reduce that.

User avatar
IanB
Posts: 370
Joined: Sun Sep 04, 2011 7:28 pm
Location: South Wales
Contact:

Re: 1024x768 and 15KHz TV modes on an A5000 with BenQ BL912 monitor

Post by IanB » Fri Jun 03, 2016 10:56 pm

I finalised the A4000 version of the clock generator and it has the following differences compared to the original A5000 version:
I changed R3 to 470ohms (Although I used 1K initially, I thought that was a bit too high so I replaced it with a 1K pot and adjusted it for the lowest value to eliminate the vertical bars and that was about 300ohms. I then added a margin of around 50% to end up with the 470R final value).
I mounted a 78L05 voltage regulator to the +5v input of the board and added a 33n decoupling capacitor between the +12v input and ground which also acted to secure the free input leg of the regulator, I also changed C2 to a 100uF electrolytic.
The 0v connection is made to the VIDC header as well as the clock input/output and +12v is fed to the input of the regulator. The i2c signals are taken from the CMOS memory/RTC chip.

Here's a pic of the finished setup:
a4000.jpg
Note the darker blue cable going from output 2 to the north end of C99 via a schottky diode which is used to stall the 25.175 Mhz crystal when using custom frequencies.

Closeup of the voltage regulator mounting (The light blue cable is +12v):
vreg.jpg
Now it's finished, I'll probably shorten the cables a bit

User avatar
paulv
Posts: 3853
Joined: Tue Jan 25, 2011 6:37 pm
Location: Leicestershire
Contact:

Re: 1024x768 and 15KHz TV modes on an A5000 with BenQ BL912 monitor

Post by paulv » Sat Jun 04, 2016 1:34 pm

That's looking really great Ian, =D> =D> =D> I thought I ordered 5 of the clock gen boards but it turns out I ordered 10 so I've now got plenty of boards to experiment with and look at building up a few once I get a bit more familiar with the hardware.

As I've got the A3000 up and running (although the CF card seems to have failed whilst in storage) I'll be able to do some proper development and testing but one of the first things I want to do is see if I can use my "driverless" VIDC Enhancer circuitry to get the 25 and 36MHz clocks into the A3000 and then look at using the adafruit board for both under clocking and over clocking.

I've had a quick read of the breakout board datasheet https://cdn-learn.adafruit.com/download ... eakout.pdf but it doesn't seem to indicate the I2C address that the clockgen board lives at. Looking at the source code for the library https://github.com/adafruit/Adafruit_Si ... t_SI5351.h it looks like it's sat at 0x60/0x61 for write and read respectively unless I'm looking at entirely the wrong thing. I've not done much C/C++ programming in years :shock: As the Watford VIDC Enhancers site at 0x40/0x41 and 0x70/0x71, I'll be able to write a proper I2C detection routine into the AutoVIDC module so it can support all the different clock gen methods in the one module.

Also, I'm planning on branching AutoVIDC to version 3.0a and ripping out support for RISC OS 2 so I can reduce the complexity of the module and keep the size down as many of the techniques used in working out the clock speed required are only available in RISC OS 3. The RISC OS 2 support in AutoVIDC has to assume that there are fixed clock speeds available to the module so the latest AutoVIDC 2.xx is good enough.

My BENQ monitor also arrived a couple of days ago so after hooking up the screen to the A3000 and setting the monitor type to "multisync" the A3000 (with a single 25.175MHz clock quite happily runs everything from MODE 0 to MODE 28 in full screen with no letterboxing which is really nice. Obviously, not having the 36MHz clock in this machine at the moment means no MODEs 29-31 but then on an ARM2 machine, those modes are asking a lot of the hardware anyway so you don't really miss them :D

Paul

Zarchos
Posts: 2355
Joined: Sun May 19, 2013 8:19 am
Location: FRANCE

Re: 1024x768 and 15KHz TV modes on an A5000 with BenQ BL912 monitor

Post by Zarchos » Sat Jun 04, 2016 1:50 pm

This is really great.
If I read you correctly, you're going to implement the underclocking to get better synchronised screen modes, and the side effect will be that it frees some memory bandwidth (as detailed in one of your previous messages). Very good.

User avatar
paulv
Posts: 3853
Joined: Tue Jan 25, 2011 6:37 pm
Location: Leicestershire
Contact:

Re: 1024x768 and 15KHz TV modes on an A5000 with BenQ BL912 monitor

Post by paulv » Sat Jun 04, 2016 2:03 pm

Zarchos wrote:This is really great.
If I read you correctly, you're going to implement the underclocking to get better synchronised screen modes, and the side effect will be that it frees some memory bandwidth (as detailed in one of your previous messages). Very good.
With the variable rate clock gen, under and over-clocking are possible so yes, under clocking for better TV MODE sync rates for LCD screens and also over clocking for the higher end screen modes like 800x600 @ 60Hz instead of 800x600 @ 56.2Hz which is what a 36MHz clock provides and then as Ian has shown, custom screen modes like 1024x768 @ 50Hz.

Paul
Last edited by paulv on Sun Jun 05, 2016 12:42 am, edited 1 time in total.

User avatar
paulv
Posts: 3853
Joined: Tue Jan 25, 2011 6:37 pm
Location: Leicestershire
Contact:

Re: 1024x768 and 15KHz TV modes on an A5000 with BenQ BL912 monitor

Post by paulv » Sat Jun 04, 2016 7:38 pm

Here's a WIP shot of the "driverless" Ultra VIDC Enhancer and a potential mounting point for the adafruit board, although I'm leaving it off until I've experimented with the driverless board by itself :D
Driverless-UltraVIDC&adafruitClockGen.jpg
Since I took the photo earlier, all the passives are now soldered in on both boards and I've got to solder in all the IC's and oscillators tomorrow then it's just a matter of fitting and testing :D

Paul

User avatar
IanB
Posts: 370
Joined: Sun Sep 04, 2011 7:28 pm
Location: South Wales
Contact:

Re: 1024x768 and 15KHz TV modes on an A5000 with BenQ BL912 monitor

Post by IanB » Tue Jun 14, 2016 12:03 am

I've now got this working on my A440/1:

Previously this had a Watford Electronics VIDC enhancer which I had modified to work natively with RISCOS 3.1 by adding in the VIDC crystal selection and Sync polarity latch used by later machines like the A5000. As it was somewhat difficult to add the adafruit board to that combination, I decided to replace it with one of paulv's VIDC enhancer boards but in addition I modified it to control the sync polarity as well.

Here's a view of the new board linked up to the VIDC crystal latch on the left hand side:
a440-1.jpg
Here's a closeup of the VIDC board:
a440-1-close.jpg
Note the two diodes from output 2 of the adafruit board to the selection inputs. When output 2 goes high it forces selection of the custom crystal slot (i.e. the adafruit board) irrespective of the state of the crystal selection inputs. The resistors R1 & R2 in the selection lines are now 1K instead of 68R.

To get sync polarity control, I changed IC2 on paulv's board from a 7438 to a 74HC86 exclusive or gate and isolated pins 10 & 13 which I then connected to the sync invert control signals via a 74HC02 used as an inverter (chosen because the pins lined up)

This all seems to work OK but some of the new modes don't work, notably 720x576 and 640x512 in 256 colours. Also 720x576 in 16 colours seems to have some wraparound issues so the mode timings will need to be looked at. These limitations are due to the A440/1 having 8Mhz memory compared to 12Mhz in the A5000 & A4000.

Amazingly, the high resolution modes do seem to behave even on the "Arabella" chip used in my A440/1 with both 896x720 and 960x768 in 16 colours working. There is a very slight amount of crosstalk on the video occasionally but that was also present with the watford board. I may try some of the existing fixes to see if they make any difference.

The high resolution modes do seem to make 16 colour dithered images look a lot better quality as this screenshot shows:
desktop.jpg

User avatar
paulv
Posts: 3853
Joined: Tue Jan 25, 2011 6:37 pm
Location: Leicestershire
Contact:

Re: 1024x768 and 15KHz TV modes on an A5000 with BenQ BL912 monitor

Post by paulv » Tue Jun 14, 2016 8:53 am

That hi-res image looks great Ian =D> =D> =D> =D>

I'm a bit confused regarding the Sync signals though. In the photo's I don't see any connections feeding in the H and V sync's in or out and where have you put the 74HC86 IC, is it underneath the HC02, piggybacking the chip?

Also, is your 440/1 a later model motherboard that doesn't require the SoG fix or have you just cut the pin on the 7438 on the motherboard?

Paul

User avatar
IanB
Posts: 370
Joined: Sun Sep 04, 2011 7:28 pm
Location: South Wales
Contact:

Re: 1024x768 and 15KHz TV modes on an A5000 with BenQ BL912 monitor

Post by IanB » Tue Jun 14, 2016 5:09 pm

paulv wrote:is your 440/1 a later model motherboard that doesn't require the SoG fix or have you just cut the pin on the 7438 on the motherboard?
I originally cut the leg on the 7438 but it now uses the link on your board to control SoG
paulv wrote:I'm a bit confused regarding the Sync signals though. In the photo's I don't see any connections feeding in the H and V sync's in or out and where have you put the 74HC86 IC, is it underneath the HC02, piggybacking the chip?
I removed the 7438 from the Archimedes A440/1 PCB and replaced it with a socket to plug in your board. I then fitted a 74HC86 on to your board in the IC2 position instead of reusing the '38. If you look at the A440/1 circuit, the 7438 is used as four inverters, two driving H & V sync, one driving the hires sync and one for sync on green. One input of each of the gates is tied high so if you substitute a 74HC86 XOR chip it will work in a similar way as tieing one input high on an XOR gate forces the output to be the inverse of the other input.

This will break the sync on green feature as the output of the '86 isn't open collector but I didn't need that anyway and so I left the link open on your board to disable it which isolated pin 3. If needed, sync on green might be made to work by fitting a schottky diode in the link position as that would make the output of the '86 similar to an open collector.

The other outputs work OK without being open collector. In fact it's better that way as the rise times on sync edges will be much faster than relying on pullups and the A5000 uses the same chip anyway.

I then removed pins 10 & 13 from the header so that inputs 10 & 13 on the '86 were isolated from the motherboard which normally tied them high. (Note the empty pads on the photo).
Finally I soldered a 74HC02 on top of the 74HC86 as the outputs of the two gates on pins 10 & 13 lined up with the inputs on the '86 and I connected the sync control outputs of the latch to inputs 8/9 and 11/12 to invert them and the end result is that the sync circuit now resembles the one in an A5000 (pins 7,10,13 & 14 of the '02 are soldered to the '86, the rest are bent out).

To sum up, the H and V sync signals pass through two XOR gates and the other inputs of the XOR gates are the polarity control signals which have been inverted through the 74HC02. The 74HC86 will either invert or pass through the H and V sync signals depending on the state of the polarity control bits.

This mod will not be quite so easy on an A3xx or 4xx as that uses a 7405 rather than a 7438 so a simple substitution won't work and your new native control board might be the best solution.

User avatar
IanB
Posts: 370
Joined: Sun Sep 04, 2011 7:28 pm
Location: South Wales
Contact:

Re: 1024x768 and 15KHz TV modes on an A5000 with BenQ BL912 monitor

Post by IanB » Sun Jun 19, 2016 9:51 pm

I've now converted the last of my machines, an original A440 with RISC OS 2. I did consider upgrading this machine to RISC OS 3 but there seemed little point as I already have 3 other machines with that so I think it's more interesting to keep it with the original OS.

As RISCOS 2 doesn't have any native support for 25.175/36 Mhz crystals or adjustable sync polarity there didn't seem to be any point in adding those, so this is a minimal solution similar to the A4000 and A5000. I did make one change though, I replaced the 74LS05 sync output driver chip with a 74HC04 instead (The '05 is open collector and the '04 isn't). This improves the rise times on the H and V sync pulses compared to relying on pullups which improves compatibility with some vga switchboxes but requires a diode on pin 10 to simulate an open collector for one output used to mute the audio.
a440.jpg
The main issue is that the audio is way off pitch as RISCOS 2 has no concept of an adjustable VIDC clock so doesn't compensate the audio.
I'll have to investigate if anything can be done about that and I may upgrade to RISCOS 2.01 (if it will work on an A440) as that supported the ARM3, the crystals and adjustable sync polarity for the release of the A540.

Hi-res RISCOS 2:
riscos2.jpg

Zarchos
Posts: 2355
Joined: Sun May 19, 2013 8:19 am
Location: FRANCE

Re: 1024x768 and 15KHz TV modes on an A5000 with BenQ BL912 monitor

Post by Zarchos » Mon Jun 20, 2016 5:01 am

=D>

sirbod
Posts: 975
Joined: Mon Apr 09, 2012 8:44 am
Location: Essex
Contact:

Re: 1024x768 and 15KHz TV modes on an A5000 with BenQ BL912 monitor

Post by sirbod » Mon Jun 20, 2016 6:57 am

IanB wrote:The main issue is that the audio is way off pitch as RISCOS 2 has no concept of an adjustable VIDC clock so doesn't compensate the audio.
*TUNING may fix it. It won't correct hardcoded trackers that replace the Channel Handler, but will adjust Voices okay - assuming they're using the pitch value passed by SoundChannels.

steve3000
Posts: 1984
Joined: Sun Nov 25, 2012 12:43 am
Contact:

Re: 1024x768 and 15KHz TV modes on an A5000 with BenQ BL912 monitor

Post by steve3000 » Mon Jun 20, 2016 11:35 am

Ian, great work on RO2, I previously created a RO2 mode module for AutoVIDC, which contained modes 25-28 and 29-31 (for use with 25.175 and 36MHz xtals), I'll dig this out and attach later.
sirbod wrote: *TUNING may fix it. It won't correct hardcoded trackers that replace the Channel Handler, but will adjust Voices okay - assuming they're using the pitch value passed by SoundChannels.
Well remembered Jon - I was trying to think what that command was!

I certainly looked into suitable '*tuning' values for my RO2 mode module, with the intention of issuing the equivalent tuning SWI on each mode change, but I can't recall how far I got with this... Will take a look at my source code later and see...

User avatar
IanB
Posts: 370
Joined: Sun Sep 04, 2011 7:28 pm
Location: South Wales
Contact:

Re: 1024x768 and 15KHz TV modes on an A5000 with BenQ BL912 monitor

Post by IanB » Mon Jun 20, 2016 10:11 pm

sirbod wrote:*TUNING may fix it. It won't correct hardcoded trackers that replace the Channel Handler, but will adjust Voices okay - assuming they're using the pitch value passed by SoundChannels.
It does look like *TUNING would fix voices but not soundtracker type players. I also tried writing directly to the C0 register in the VIDC which controls the sample rates and that had a similar effect to *TUNING but when a soundtracker started playing it reverted to off-pitch so I guess that register got overwritten.

I then tried using RISCOS 2.01 and that works for the standard modes like SVGA but not for the custom frequencies like 13.5 Mhz or 44 Mhz. However, after some experimentation I did manage to get it fully working.

There are effectively 3 classes of RISCOS when dealing with custom VIDC frequencies:
Arthur 1.20 and RISCOS 2.00 - Only understand 24Mhz vidc frequencies and are probably hard coded that way.
RISCOS 2.01 and 3.00 - Understand the three standard crystal frequencies but can't read custom frequencies from mode definitions.
RISCOS 3.10 and 3.11 - Can read custom frequencies from mode definitions and compensate for them (subject to the 4Mhz multiple limit)

RISCOS 2.01 and presumably 3.00 have location &1228 in low memory (same as 3.1x) which maintains the current VIDC frequency but they can only read the standard crystal frequencies from mode definitions. My driver updates that location with the actual custom frequency during a Service_Modechange but it does it after the SoundDMA module has already read that location so I have to send another Service_Modechange after updating it and that seems to work.

I'll stick with RISCOS 2.01 for now and maybe revist 2.00 later after the remaining issues are ironed out.

One really bizarre problem unrelated to custom VIDC frequencies:
I'm using my RISC PC as an Econet file server and when the A440 with either RISCOS 2.00 or 2.01 starts up it completely locks up the RISC PC and only a reset or power cycle will fix it so I guess it must be sending the Econet equivalent of the Ping Of Death!

Edit: I resolved the Econet issue, I was running my experimental 32 bit compatible version of the Econet module on the RISC PC and that must have a subtle bug as the problem went away when I reverted to the 26 bit one I released a while ago. At least I've got an easy way of reproducing it!

User avatar
paulv
Posts: 3853
Joined: Tue Jan 25, 2011 6:37 pm
Location: Leicestershire
Contact:

Re: 1024x768 and 15KHz TV modes on an A5000 with BenQ BL912 monitor

Post by paulv » Tue Jun 21, 2016 9:49 pm

Forgive me, I've been mega busy with birthdays, work and family life this last week so only kind of keeping up with things.

With respect to RISC OS 2, AutoVIDC has mode maps per frequency with two mode maps for the 25.175MHz clock because RISC OS 2 has different definitions for the VGA modes it supports and different dotclock requirements compared to RISC OS 3. There's also a fourth mode map which is configurable so as long as the I2C driver can program the dotclock of the adafruit clock, you should be able to tell AutoVIDC to switch to that dotclock based on the mode map definition you provide. There's info on how to do this in the AutoVIDC user manual.

Paul

User avatar
IanB
Posts: 370
Joined: Sun Sep 04, 2011 7:28 pm
Location: South Wales
Contact:

Re: 1024x768 and 15KHz TV modes on an A5000 with BenQ BL912 monitor

Post by IanB » Wed Jun 22, 2016 9:00 pm

I just discovered the Benq monitor will work with composite sync on the VGA input and as a result works with a BBC micro as well:
bbcbenq.jpg
It has the same sample rate issue as the Archimedes and unfortunately that can't be fixed with the adafruit board because the beeb's dot clock has to be a multiple of the processor frequency. However putting 6Mhz video filters on the RGB outputs gets rid of the uneven pixel width aliasing effects and results in picture quality similar to the SCART input of a TV. (i.e mode 0 is a bit soft)

One possible solution for improved quality would be to make use of this project by prophet36: http://www.stardot.org.uk/forums/viewto ... 26&p=64877 which gave excellent quality in modes 0-6 but was abandoned due to the issues of handling interlaced mode 7.
This interface could be used for modes 0-6 and mode 7 could be passed through unchanged as the Benq can already handle the interlace.

I notice that the Benq BL912 has dropped to £99.99 on ebuyer.com

steve3000
Posts: 1984
Joined: Sun Nov 25, 2012 12:43 am
Contact:

Re: 1024x768 and 15KHz TV modes on an A5000 with BenQ BL912 monitor

Post by steve3000 » Wed Jun 22, 2016 11:00 pm

Just competed installing the adafruit board to my A540 :)

No time to test tonight, need sleep...

User avatar
vectorlight
Posts: 189
Joined: Sun Apr 10, 2016 12:23 pm
Location: UK
Contact:

Re: 1024x768 and 15KHz TV modes on an A5000 with BenQ BL912 monitor

Post by vectorlight » Sat Jul 23, 2016 6:29 am

paulv wrote:On the hardware front, I'll just add that I've currently got 130 Ultra VIDC Enhancer PCB's enough and ACT153 chips to go with them. I'll finally be starting a build run of 40 "standard" Ultra VIDC Enhancers in the next few weeks which will be suitable for the A300/400, A400/1 and A3000 series machines.
Hi Paul,

Any chance these can be made to work on an ARM250 machine? I've always wanted to overclock the VIDC core :D
3D Printing and Acorn A3010 Owner!

User avatar
paulv
Posts: 3853
Joined: Tue Jan 25, 2011 6:37 pm
Location: Leicestershire
Contact:

Re: 1024x768 and 15KHz TV modes on an A5000 with BenQ BL912 monitor

Post by paulv » Sat Jul 23, 2016 3:14 pm

vectorlight wrote:
paulv wrote:On the hardware front, I'll just add that I've currently got 130 Ultra VIDC Enhancer PCB's enough and ACT153 chips to go with them. I'll finally be starting a build run of 40 "standard" Ultra VIDC Enhancers in the next few weeks which will be suitable for the A300/400, A400/1 and A3000 series machines.
Hi Paul,

Any chance these can be made to work on an ARM250 machine? I've always wanted to overclock the VIDC core :D
I've not looked closely at the screenshot of the ARM 250 based machines but IIUC the ARM250 has a VIDC clock in and out so it may well be possible.

Paul

munchausen
Posts: 168
Joined: Fri May 30, 2014 8:53 am
Contact:

Re: 1024x768 and 15KHz TV modes on an A5000 with BenQ BL912 monitor

Post by munchausen » Sat Jul 23, 2016 7:42 pm

IanB wrote:I just discovered the Benq monitor will work with composite sync on the VGA input and as a result works with a BBC micro as well:

bbcbenq.jpg
It has the same sample rate issue as the Archimedes and unfortunately that can't be fixed with the adafruit board because the beeb's dot clock has to be a multiple of the processor frequency. However putting 6Mhz video filters on the RGB outputs gets rid of the uneven pixel width aliasing effects and results in picture quality similar to the SCART input of a TV. (i.e mode 0 is a bit soft)

One possible solution for improved quality would be to make use of this project by prophet36: http://www.stardot.org.uk/forums/viewto ... 26&p=64877 which gave excellent quality in modes 0-6 but was abandoned due to the issues of handling interlaced mode 7.
This interface could be used for modes 0-6 and mode 7 could be passed through unchanged as the Benq can already handle the interlace.

I notice that the Benq BL912 has dropped to £99.99 on ebuyer.com
Wow, that looks like a nice monitor for retro computers :D

Wonder if it works with an amstrad CPC.

User avatar
IanB
Posts: 370
Joined: Sun Sep 04, 2011 7:28 pm
Location: South Wales
Contact:

Re: 1024x768 and 15KHz TV modes on an A5000 with BenQ BL912 monitor

Post by IanB » Sat Jul 23, 2016 9:26 pm

vectorlight wrote: Any chance these can be made to work on an ARM250 machine? I've always wanted to overclock the VIDC core :D
I've already used paulv's boad with the adafruit module on my A4000 which is ARM250 based so that should work on other ARM250 machines.

see these posts above:
viewtopic.php?f=16&t=11218#p139308
viewtopic.php?f=16&t=11218#p139541

User avatar
IanB
Posts: 370
Joined: Sun Sep 04, 2011 7:28 pm
Location: South Wales
Contact:

Re: 1024x768 and 15KHz TV modes on an A5000 with BenQ BL912 monitor

Post by IanB » Sat Jul 23, 2016 10:03 pm

munchausen wrote: Wonder if it works with an amstrad CPC.
It would need some interface circuitry which I am working on at the moment.
As mentioned above, the RGB signals on the VGA input require some filtering to get rid of aliasing effects and I'm experimenting with that. Also the VGA input needs TTL level sync signals and although that is standard on the BBC RGB output, I think the Amstrad only has a sync signals at 0.3V on the composite output so that would need a sync separator like the LM 1881.

Post Reply