AutoVIDC 2.08 available for testing

Discuss AutoVIDC by Paul Vernon
PaulV
Posts: 97
Joined: Thu May 02, 2013 8:33 pm
Location: Leicestershire
Contact:

AutoVIDC 2.08 available for testing

Post by PaulV »

Hi All,

I've just put AutoVIDC v2.08 on the FTP server for testing/review. ATM I've just put the module up there.

Changes wise, this module should now support WE Super VIDC Sync. Polarity as well as setting the clock speed. Other than that, the module is the same as 2.07 so unless you have a WE VIDC Enhancer you shouldn't see any difference in the module.

I have however tweaked the AutoVIDC_ModeSyncPolarity SWI in the way it handles the stack and returns to the calling program. The reason for this is with that minor tweak, I can use that SWI as a function via a Branch and Link.

The module is now up to 7352 bytes but I haven't as yet done any optimisation/code reduction although I've got plenty of thoughts on this and I'm pretty sure I should be able to reduce the size significantly. For example all the clock setting functionality in the Service handler could now be removed and replaced with Branch and Link to the code that provides the SetClock SWI function.

I keep saying I'll optimise once AutoVIDC is functionally complete and then something comes up that means it's not complete. Adding in the Sync. Pol support for Super VIDC enhancers is just one of these extra bits of functionality that has popped up. I'm hoping that this really is the last functional change to the module.

Anyhow, I've done plenty of SWI calls and MODE changes and interrogated the WE VIDC Enhancer then worked back the data to derive Sync. Polarity based on Steve's information and it all seems to tally. That rogue bit that was being flipped is definitely connected to one of the the inverted Sync. Polarity bits and as such mirrors whatever that one is set to.

Happy testing

Paul
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: AutoVIDC 2.08 available for testing

Post by JonAbbott »

I'll drop it in with ADFFS and do some testing, I need to do quite a lot on the A440/1 to confirm moving the DA into application space doesn't cause any side effects.
PaulV
Posts: 97
Joined: Thu May 02, 2013 8:33 pm
Location: Leicestershire
Contact:

Re: AutoVIDC 2.08 available for testing

Post by PaulV »

Hi All,

I've placed the latest revision of AutoVIDC 2.08 on the FTP server for testing. It's had significant changes resulting in a total drop in module size of 584 bytes to 6768 bytes. :D

This drop in size is the result of re-working the service handler which now makes extensive use of the functionality provided by the SWI's but it doesn't call the code through the SWI's, instead it uses Branch and Link to enter the SWI functions. The reason for this is that at the time the service handler first runs during initialisation of AutoVIDC, the SWI's haven't been registered with RISC OS so in order to use the code, Branch and Link is the only method of access.

I've also re-factored some of the units and re-named some of the files too. I've also pulled in the riscos constants file as per ADFFS and LCDgm uses as it seems to me like a nice way of standardising some of the code in AutoVIDC.

I'm still unsure about the Sync. Polarity for the WE Super VIDC Enhancer as per this post. I think I'm back to front but would appreciate a second pair of eyes on it just to double check. If I am, it's no great shakes to change, requiring one MOV to become a MVN and one MVN to become a MOV. It's just difficult to test without one of these beasties to get some empirical evidence :|

I've fixed the new implementation of the service handler as per my previous post so the "SetClock" routines get called only once.

Testing wise, I've just tested on the following machines:

A310 - RISC OS 2
A410/1 - RISC OS 3.11
A5000 - RISC OS 3.11

Everything seems to be behaving nicely and there are no issue with LCDgm switching the clock speed etc. as far as I can tell. MODE switching is behaving on my LCD monitor and my AKF50 which is hooked up to the A5000.

Other than me being unsure about the WE Sync. Polarity, I think this revision is ready for release.

Paul
PaulV
Posts: 97
Joined: Thu May 02, 2013 8:33 pm
Location: Leicestershire
Contact:

Re: AutoVIDC 2.08 available for testing

Post by PaulV »

A further update to version 2.08 is now on the servers. It includes two changes.

1. The WE Sync. Polarity code is now inverted and it seems to me that I was indeed wrong before. Looks better now :D
2. As per Steve's suggestion, there is now a "Manuals" folder on the adf image. Right now it only includes details on the SWI's.

Paul
steve3000
Posts: 198
Joined: Thu May 02, 2013 9:25 pm

Re: AutoVIDC 2.08 available for testing

Post by steve3000 »

Great, I'll download in a moment - need to check it's all good with LCDgm 0.20, as that's ready for release!

Steve
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: AutoVIDC 2.08 available for testing

Post by JonAbbott »

I've dropped in into ADFFS and will do some testing during the week.

In the !Run I'm simply checking if AutoVIDC is loaded and forcing it if not. Should I also be checking the version number and reloading if an older one is present?
PaulV
Posts: 97
Joined: Thu May 02, 2013 8:33 pm
Location: Leicestershire
Contact:

Re: AutoVIDC 2.08 available for testing

Post by PaulV »

At the moment, versions 2.06 to 2.08 should operate in the same way as they all have the same SWI available and the differences are either bug fixes or support for other VIDC Enhancers so it's not a problem in terms of version used.

In the not too distant future, I'll be incorporating my take on Steve's clock detection code to detect available clocks on Aux IO based enhancers and add in a suitable SWI to allow people to query what clock speeds are available.

I'm thinking that when I do this, I'll skip to version 2.10 as it's quite a big feature to add. At which point, yes, forcing the version of AutoVIDC to 2.10 would be a good idea as it will ensure LCDgm will have the ability to provide better fixes for games if it knows that a 25.175MHz clock is available.

Paul
steve3000
Posts: 198
Joined: Thu May 02, 2013 9:25 pm

Re: AutoVIDC 2.08 available for testing

Post by steve3000 »

It'll be great to get that code in AutoVIDC. I'll have a go at reducing the size of it if you like? It'll mean a few more direct hardware access tweaks, but hey, Acorn aren't likely to resurrect themselves and release another Risc OS 3.1 machine any time soon, so I think we're ok?...Providing the code returns the computer to the same state after testing.

The reason why the speed detection code under-reads (and I have already fudged it a little too) is partly because of other interrupts, but also because Risc OS tries to reset the sound frequency register on each sound DMA interrupt (this is where Risc OS reduces the sound frequency to cope with faster clocked modes like 36MHz VIDC). As I don't want to use the corrected clock frequency, I then have to overwrite what Risc OS has just done, or, for example, the code reads out 24MHz in Mode 31. As I'm not sure exactly when/where Risc OS does it's correction, I expect I'm not always catching it in time, so over the course of a few 1/100ths of a second Risc OS's attempts to slow down the interrupt have some effect, and we read out a little too slow for each mode.

Solution is easy - trap the hardware IRQ vector and catch all the sound interrupts directly during the test - without passing them on for Risc OS to play with.

Steve
PaulV
Posts: 97
Joined: Thu May 02, 2013 8:33 pm
Location: Leicestershire
Contact:

Re: AutoVIDC 2.08 available for testing

Post by PaulV »

I'm planning on adding in the code in its own file and then including it into AutoVIDC employing a suitable branch and link at a suitable point within the initialisation code.

I'd like to have a crack at implementing things and then let you have a review of things after a first attempt if that's okay with you :D

Paul
steve3000
Posts: 198
Joined: Thu May 02, 2013 9:25 pm

Re: AutoVIDC 2.08 available for testing

Post by steve3000 »

Certainly Paul go ahead!

I'm tied up this weekend anyhow so no coding for me.

The difficult bit is to restore the sound system correctly (as there are numerous bugs in RISC OS 2 and different bugs in RISC OS 3) which makes it tricky. But I know these bugs well so happy to help there!

Steve
Post Reply