Enter The Realm screen geometry

Discuss VIDC, translation to VIDC20 and emulation of VIDC
Post Reply
JonAbbott
Posts: 3034
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Enter The Realm screen geometry

Post by JonAbbott »

This game sets VBSR, VBER, HBSR and HBER, relying HDSR, HDER, VDSR, VDER to be "known" values.

Under the ADFFS blitter, the screen ends up with the wrong horizontal borders resulting in 4 pixels missing off the left of the screen and an additional 12 pixels on the right of the screen.

The screen width in pixels is correct at 304 pixels, its just the border positions that appear to be wrong.

Values written by the game are:

VBSR = 166-(1024>>3) = 38
VBER = 166+(1024>>3) = 294
HBSR = 143-(613>>3)+3 = 70
HBER = 143+(613>>3)+3 = 222

Which result in a screen width of 304 pixels, a left border overlap of 12 pixels and a right border overlap of 4 pixels using RISC OS 3.11 MODE 9 values.

For the game to appear correct, the left and right border overlaps need to be 8 pixels.
JonAbbott
Posts: 3034
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: Enter The Realm screen geometry

Post by JonAbbott »

I've gone though the VIDC1->VIDC20 conversion on paper (ADFFS emulates VIDC20) and end up with the exact same results as ADFFS does.

If I correct the values in-line in the blitter, the scrolling in James Pond 2 is wrong, so I'm confident the conversion is currently correct. The only other way it can be fixed is by shifting the HDSR/HDER values for MODE 9 right by 10 pixels.

The next test is to see what the game does on IOMD with ADFFS, as it goes though the same VIDC1->VIDC20 conversion process.
JonAbbott
Posts: 3034
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: Enter The Realm screen geometry

Post by JonAbbott »

I believe I've tracked down the issue. The game was written with RISC OS 2 in mind, which uses slightly different VIDC values. The game code checks if its running under RISC OS 3.00 or above and only alters the VIDC1 registers on RISC OS 2.0 or lower.

Switching ADFFS to emulate RISC OS 3.00 has highlighted another issue. When the game loads the intro logo via *SLOAD <Obey$Dir>.INTRO.LOGO RISC OS reports its a bad sprite file.

Fixes required are:
  • Add the RISC OS 2 VIDC1 MODE parameter table
  • Fix the *SLOAD issue - the Sprite file needs decrypting by the protection Module
Post Reply