Caverns

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

Re: Caverns

Post by JonAbbott »

Caverns does weird things on RO4 / SA, when it writes the cursor it tries writing past CursorData (1F03800-1F03FFF) well into "nowhere" (1F08000-1F87FFF)

Works fine on RO4 / ARM710 and RO3.71 / SA, so it must be related to the changes made on RO4 to support either lazy task swapping or the cached screen. Needs further investigation.

One thing I have noticed is that RO4 / SA puts page protection on CursorChunkAddress (1F00000-1F08000), so I've added support to the abort handler to do the write on the games behalf. I suspect it may do the same to page zero, but haven't checked yet.
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: Caverns

Post by JonAbbott »

JonAbbott wrote:On further investigation, this is what happens when there's no VRAM (seems my 2mb strip is faulty). Behaviour is identical on both ARM610 and StrongARM. With 1MB or 2MB of VRAM there's no corruption, just juddering when scrolling horizontally.
Need to figure out why these two issues occur, the no-VRAM issue must be ram timing issues although I'm not sure how to fix it.

The juddering could be a difference in capabilities between VIDC1 and VIDC20, Xavier mentioned some MEMC bits which allow you to specify which byte the DMA starts on...that might cause this issue although I can find no mention of it in my manuals.
JonAbbott wrote:Caverns does weird things on RO4 / SA, when it writes the cursor it tries writing past CursorData (1F03800-1F03FFF) well into "nowhere" (1F08000-1F87FFF)
I'll try this under the JIT to see if its a StrongARM compatibility issue.
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: Caverns

Post by JonAbbott »

JonAbbott wrote:2. Scrolling not working on a RiscPC
Adding hardware scrolling seems to have resolved the corrupt display when the game scrolled, it's still not quite correct on physical though as it jumps horizontally by 32 or so pixels.

It scrolls correctly under emulation however, not that it helps!
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Caverns scrolling issue on RiscPC

Post by JonAbbott »

Having seen the exact same problem on the Pi, I've tracked the cause down to Vinit / Vstart not being quad-word aligned. I've tried forcing this on the RiscPC build, but it doesn't appear to resolve the problem as it does on the Pi.
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: Caverns

Post by JonAbbott »

I've been looking at the issues with Caverns on IOMD recently as I'm fixing issues in the IOMD build of ADFFS.

Pointer issue
ie the ship not appearing. This is caused by the game directly writing its Pointer to 1F03800. It does that because OS_Word 21 has a Pointer height restriction of 32. I can see the developer did originally code it to use OS_Word 21 as the code is now orphaned, but it obviously didn't work as the Pointer height is over half the screen height.

ADFFS currently translates the writes to 1F03800 on all machines except IOMD 32bit as the memory location of the Pointer is unknown. I might try reading the Physical address of the Pointer via CURSINIT and add a double page mapping to 1F03800 in L2PT. The other option is to perform a Physical->Logical translation of CURSINIT and proxy the writes which is probably less invasive.
Scrolling issue
Scrolling is only an issue with VRAM fitted so I suspect its a misconfiguration of the FIFO Preload value (ARM7500 Datasheet 10.2), or VRAM/SnA/Hdis values in DCTL (VIDC20 datasheet 4.1.27)
Post Reply