RiscPC support

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

Re: RiscPC support

Post by JonAbbott »

steve3000 wrote:That's great! :) (well the 57Hz is great, not the missing 2 pixels)

It was my test - forgot to explain that. 57Hz means your CR code is good.
It's not like I wasted several hours trying to fix it back to 60Hz :lol:

Okay, that rules out CR completely then.
steve3000 wrote:The pixel left/right shift is very strange. You've confirmed your code gives the same result as mine in the VIDCompare programme, so since we've gone about this with two different translation methods (actually three if you count my BASIC routine), then we can be fairly sure we're getting the 'right' values. So I'm not sure why the shift is happening. I would just double-check your HSWR code though (I'll check mine when I'm back), as it is the shift that is not correct - the left/right chopping occur as a result of that 2 pixel shift...(although if you do solve HSWR, then check how HDSR/HDER respond with the fixed HSWR). If we can't spot an error in our translation, then I can go back to the RO source and see if there's anything obvious there which RO does and we don't...
We know the parameters are geometrically correct, as the screen displays okay under emulation with all pixels showing. I have however manipulated all the parameters, so the screen doesn't move during pokemode. Some values needed increasing by 2, some reducing by 2. The conversions are now:

HCR - 6
HSWR - 8
HBSR - 16
HDSR / HDER (+3 1bit, +11 2bit, +15 4bit, +17 8bit)
HBER - 16
HCSR - 11
HIR

VCR + 32
VSWR - 1
VBSR - 1
VDSR - 1
VDER - 1
VBER - 1
VCSR - 1
VCER - 1
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: RiscPC support

Post by JonAbbott »

JonAbbott wrote:HCR - 6
HSWR - 8
HBSR - 16
HDSR / HDER (+3 1bit, +11 2bit, +15 4bit, +17 8bit)
HBER - 14
HCSR - 23
HIR
I've changed HBER to be -16 to match HBSR...doesn't seem to make any difference either way, but sounds more correct being the same value.

Under emulation everything is correct and we've now proved CR is correct, perhaps the VIDC parameters that work on VIDC1 simply don't work for VIDC20. Turning LCDgm on and switching to standard modes produces the same mirrored effect, where alternate frames flicker and the screen is copied down and right. It's a as if interlacing is on.

EDIT1: Here's a photo of MODE 13, with VIDC translation and LCDgm on. What isn't obvious from the picture is that every other frame is blank, so the text is grey, not white. The screen is static though.
MODE 13 under LCDgm
MODE 13 under LCDgm
photoVCR6F4.JPG (41.9 KiB) Viewed 6186 times
EDIT2: I've now pokemode'd several stock RO3.1 modes and they all translate correctly, so the only conclusion I can come to is that the tricks LCDgm uses on VIDC1 do not work on VIDC20.

To that end, I tried LCDgm under GameOn (it providing the VIDC translation) - the end result is exactly the same in MODE 0 (screen duplicated to the right and grey), MODE 13 doesn't appear at all - neither do any of the JP screens. Make of that what you will!

I think the LCDgm mode parameters need altering for VIDC20


EDIT3: Changing VCR from &A06F4000 to &A0700000 fixes all the stock MODES. Doesn't affect James Pond though.
MODE 13 under LCDgm with VCR changed to &A0700000
MODE 13 under LCDgm with VCR changed to &A0700000
photoVCR700.JPG (34.36 KiB) Viewed 6186 times
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: RiscPC support

Post by JonAbbott »

Changing ADFFS to increase VCR by &1C results in .....
James Pond, on RiscPC with ADFFS and LCDgm 0.22
James Pond, on RiscPC with ADFFS and LCDgm 0.22
photoVCRplus1C.JPG (31.67 KiB) Viewed 6185 times
:D Think we can all pat ourselves on the back at this point!!! :D
PaulV
Posts: 97
Joined: Thu May 02, 2013 8:33 pm
Location: Leicestershire
Contact:

Re: RiscPC support

Post by PaulV »

That is awesome! Nice work both of you!

I've been quiet for the last few weeks due to work commitments and general life things which make June a nightmare month for getting any spare time for hobbies but I've been following your posts with interest.

Hopefully in the next week or two I should be able to help with testing a bit more. My RISC PC hasn't been fired up in over a month :oops:

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

Re: RiscPC support

Post by JonAbbott »

Some more photos

Boogie Buggy, Manchester United Europe, Pesky Muskrats, Sensible Soccer and YAIG are scrambled (I'll post photos later)
Caverns...the ship is missing, so I need to check the cursor code. It's missing under emulation as well, so ADFFS at fault here I expect.
Lemmings...the timing is out, the palette change is occurring slightly early.
Manchester United Europe...the cursor is out - as we'd expect as we've commented the corrective code out.
Rockfall...the monitor locks, but the screen in blank

All games above appear correct under emulation except Rockfall, which is missing the left of the title screen - in game its correct. So mainly timing issues rather than geometry I'd say.

With LCDGameModes enabled higher res desktop modes are scrambled. 800x600x256 for example is knackered, no idea why as we're not touching them, I've yet to investigate.
Attachments
Lemmings...timing is out, palette changing too early
Lemmings...timing is out, palette changing too early
photoLemmings.JPG (26.04 KiB) Viewed 6180 times
Cyber Ape
Cyber Ape
photoCyberApe1.JPG (16.5 KiB) Viewed 6180 times
Chuck Rock
Chuck Rock
photoChuckRock1.JPG (20.1 KiB) Viewed 6180 times
Caverns...missing the ship (ie cursor is wrong)
Caverns...missing the ship (ie cursor is wrong)
photoCaverns1.JPG (11.64 KiB) Viewed 6180 times
steve3000
Posts: 198
Joined: Thu May 02, 2013 9:25 pm

Re: RiscPC support

Post by steve3000 »

Excellent work! Great to see you've got JP working!

I'll have to look into why VCR needs to be shifted further when I'm back. VCR directly controls the refresh rate - what rate are you getting now?

EDIT: the other pictures have now loaded up (slow connection) - great to see them too! The missing caverns ship will be same reason as ManU cursor. Should be straight forward to fix once we look at how the RO3.5+ cursor offset is handled in ZP.
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: RiscPC support

Post by JonAbbott »

PaulV wrote:Hopefully in the next week or two I should be able to help with testing a bit more. My RISC PC hasn't been fired up in over a month :oops:
It's nowhere near ready for testing, so I wouldn't worry. There are several issues to sort out first, including:

1. Stop LCDgm from affecting VGA / SVGA modes
2. Cursor corrective code needs to go back into LCDgm and account for RO version zero page differences
3. Clock speed support, although ADFFS supports it, LCDgm is currently fixed at 24Mhz. We could use higher rates and get the screens to actually fill the screen and maintain the aspect ratio
4. ModeExtension support - which will need changes to both ADFFS and LCDgm. Needed for Diggers and Fervour.
5. Alter LCDgm to check if VIDC translation is enabled, prior to writing to VIDC1. I can add an SWI to ADFFS to check this, or an SWI to turn translation on / off ... or both.
steve3000 wrote:I'll have to look into why VCR needs to be shifted further when I'm back. VCR directly controls the refresh rate - what rate are you getting now?
It could simply be too low for VIDC20, the values Chuck Rock and James Pond write are too low as well...which is why I'm increasing the value in ADFFS.

I'll confirm refresh rates when I'm home tonight.
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: RiscPC support

Post by JonAbbott »

steve3000 wrote:I'll have to look into why VCR needs to be shifted further when I'm back. VCR directly controls the refresh rate - what rate are you getting now?
James Pond is showing 720x400 @ 66Hz

The scrambling you get with Boogie Buggy, Manchester United Europe, Pesky Muskrats, Sensible Soccer and YAIG
Attachments
photoManUE1.JPG
photoManUE1.JPG (17.02 KiB) Viewed 6175 times
PaulV
Posts: 97
Joined: Thu May 02, 2013 8:33 pm
Location: Leicestershire
Contact:

Re: RiscPC support

Post by PaulV »

Running at 66Hz indicates that you're running the VIDC clock at 24MHz.

I know you've said the VIDC20 clock is fixed at 24MHz but I always thought that the VIDC20 had a variable voltage controlled clock speed via the VCO circuitry that's on board.

A 25.175MHz clock speed would increase the refresh rate of that particular screen to 70.1Hz if I'm not mistaken which is the target refresh rate is it not?

Feel free to shoot me down, my experience with RISC PC hardware is very limited...

EDIT: The actual figures should be...

24MHz Dot clock

H: 30kHz
V: 66.8Hz

25.175MHz Dot clock

H: 31.5Khz
V: 70.1Hz

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

Re: RiscPC support

Post by JonAbbott »

PaulV wrote:Running at 66Hz indicates that you're running the VIDC clock at 24MHz.
LCDgm is setting the clock to 24MHz, should I change LCDgm to set 25.175 instead?
PaulV wrote:I know you've said the VIDC20 clock is fixed at 24MHz but I always thought that the VIDC20 had a variable voltage controlled clock speed via the VCO circuitry that's on board.
The reference clock is fixed at 24MHz, the VCO output can be anything from 55MHz to 100MHz which is then divided by up to 8 to set the pixel rate. It's incredibly flexible.
PaulV wrote:A 25.175MHz clock speed would increase the refresh rate of that particular screen to 70.1Hz if I'm not mistaken which is the target refresh rate is it not?
I've no idea :lol:, you tell me, LCDgm is your baby! What does 0.21 do?
Post Reply