RiscPC support

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

Re: RiscPC support

Post by JonAbbott »

JonAbbott wrote:Compared to RO3.11, the ship is also out slightly, being down and right a bit, so our cursor correction may be out slightly or need to be bit depth specific. Manchester United Europe is spot on.
I've checked both Caverns and Manchester United Europe on RO3.5 against physical A310/RO2 on analogue monitor. MU is perfect, Caverns is out by +8 pixels horizontally and vertically
steve3000
Posts: 198
Joined: Thu May 02, 2013 9:25 pm

Re: RiscPC support

Post by steve3000 »

I've a feeling just from playing caverns on the A4000 with LCDgm running that the ship position is out slightly, compared to monitortype 0... Think this must be down to the LCDgm mode parameters. Am I right in thinking Caverns is 256 colours and ManU is 16?
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: RiscPC support

Post by JonAbbott »

steve3000 wrote:I've a feeling just from playing caverns on the A4000 with LCDgm running that the ship position is out slightly, compared to monitortype 0... Think this must be down to the LCDgm mode parameters. Am I right in thinking Caverns is 256 colours and ManU is 16?
I checked Caverns on the A310 against Caverns on the A4000 with LCDgm and it looked correct to me. The +8 issue only occurs under translation to VIDC20.

Thinking logically, it can't be bit depth specific as that wouldn't affect the vertical position. It also happens under emulation, if that's any help. HBSR/VBSR perhaps?

I think ManU Europe is MODE 13 and Caverns MODE 9, but don't quote me on that, as I've not checked. I was toying with the idea of shoving debug info out the serial port, so we can see what's going on.

EDIT: Caverns is MODE 9. If I turn borders on in Red Squirrel, there are no horizontal borders - it looks like VBSR is higher or the same as VDSR. Caverns is setting that parameter by the looks of it. Is that relevant?
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: RiscPC support

Post by JonAbbott »

I think there may be an issue with borders. Quite a few games hang under Red Squirrel if I turn "Display borders" on, implying the borders are overlapping the display.

Should we track the parameters and alter borders if they're inside HDSR/HDER and VDSR/VDER?
steve3000
Posts: 198
Joined: Thu May 02, 2013 9:25 pm

Re: RiscPC support

Post by steve3000 »

Yes, could well be a border issue - setting borders to overlap display is perfectly allowable by VIDC1. In fact it's essential for horizontal scrolling, but not essential for vertical scrolling, although sometimes vertical overlap is useful particularly with overscan or restricted screen size to hide excess plotting area.

You're right about bit depth - that won't affect vertical.

I need to have a look at the translation and compare on my RPC. I hope to have some time this weekend to do that, but I really need to apply for a new job this weekend too...
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: RiscPC support

Post by JonAbbott »

I've tried fixing xBSR to xDSR and xBER to xDER for H and V and Red Squirrel still locks up with Boogie Buggy when LCDGameModes is on and borders are displayed. However...according to the TRM, to turn borders off HBSR=HDSR and HBER=HDER - but this doesn't seem to be the case, it looks like it should be something like HBSR=HDSR+4

Anyhow...it could just be a quirk of the emulator. I'd like to see Boogie Buggy and ManU etc displaying on physical to be certain.

As these overscan games may take a while to fix, should be release what we have now so we don't hold up ADFFS any longer? We can then put out more regular updates as we fix VCR, overscan etc.
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: RiscPC support

Post by JonAbbott »

An observation. On the A4000 JP goes to 640x350 @ 70Hz. I get the same settings on the RiscPC, but the display is garbled - this is fixed by increasing VCR by 20, which results in 720x400 @ 67Hz if I don't correct the pixel rate.

What does that tell us?
steve3000
Posts: 198
Joined: Thu May 02, 2013 9:25 pm

Re: RiscPC support

Post by steve3000 »

Ah ha...

That suggests the sync polarity is wrong on the RiscPC. Pushing VCR up by 20 makes the V size too large for 350 lines, so the monitor switches to 720x400, and that size can accept any sync settings.

640x350 requires H +ve, V -ve
720x400 can accept any, but usually H +ve, V +ve

But why is the display garbled...? I doubt VIDC20 is doing anything different to the output data... So is the monitor just fussy? Do you have an Acorn multisync to hand, or even just a different brand of LCD monitor? My LCD pops into 720x400 if the polarity is wrong, but yours might be trying to partially interpret the signal and getting things wrong...?

Also, in answer to your previous question where I store the sync polarity bits in CR for VIDC1, this is what RISC OS does just to keep a zero page copy of the current sync polarity alongside CR. VIDC1 does nothing with these bits when CR is written - as sync polarity is set on the IOC latch for pre-Risc PC computers.
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: RiscPC support

Post by JonAbbott »

I've double checked and its setting the correct polarity, if I get it wrong (when leaving VCR alone) it does indeed go to 720x400. When correct it goes to 640x350.

So...we know the polarity is correct.

Which leads back to VIDC20 not liking the parameters we're using, or we're not translating them correctly. I suspect HCR / VCR or HSWR / VSWR are slightly wrong, as we know the border and display parameters are correct from writing default MODE parameters and not seeing the display shift. Admittedly we've only tried MODE 27 - which isn't used for games, we do need to check MODE 9 / 13 are correct.

EDIT: Taking it a step further, the border and display parameters are going to be controlled by the game (taking James Pond as an example), so we can rule them out immediately. Which leaves us with only 5 variables:

HCR
HSWR
VCR
VSWR
Clock rate

I'll knock up some code so we can alter these dynamically, which may help track the issue down.
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: RiscPC support

Post by JonAbbott »

JonAbbott wrote:I'll knock up some code so we can alter these dynamically, which may help track the issue down.
Now added and up on the dev site. Use CTRL-<cursor keys> to alter HSWR / VSWR and CTRL-SHIFT-<cursor keys> to alter HCR / VCR. Down/Left reduce the value, Up/Right increase the value.

Will add clock rate tonight, when I'm back.
Post Reply