ADFFS 2.85 public beta

Discuss ADFFS development and download test releases
JonAbbott
Posts: 3066
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

ADFFS 2.85 public beta

Post by JonAbbott »

Bug fixes for the IOMD and ARMv5+ builds.

Changes since 2.84
  • JIT on IOMD, MOVS PC,R0 codelet wasn't being created correctly (fixes SimCity 2000)
  • JIT debug was calculating an incorrect byte stepping for debug output
  • JIT core_debug wasn't dropping to the next line after displaying all registers
  • JIT on IOMD, LDR_check wasn't correctly checking if the Hypercall instruction needed to change when the instruction condition failed
  • JIT on IOMD, ZeroPain specific code was being skipped
  • JIT on IOMD, LDR_check wasn't checking LS correctly (fixes SimCity 2000)
  • ADFFS loader wasn't setting WimpSlot before running the open files check
  • JIT 32bit Modules loaded by VProtect were being inserted into the JIT RMA, instead of the actual RMA due to the way VProtect manually loads the Module into an RMA claim area. This is now detected and the injection switched to the actual RMA, the JIT RMA claim is then freed
  • JIT when the JIT shuts down and calls OS_Module to delete Module shims it was failing under RO4, leaving the shim resident and triggering aborts
  • JIT after cleaning the cache, it wasn't resetting the index/size to zero so once a full cache clean became necessary, every ranged clean from then on became a full cache clean
  • IRQ were not force enabled while the blitter was active
  • JIT on 26bit IOMD, hypervised CallBack handler was not using the 26bit PSR, causing a hard-lock when a CallBack was raised (fixes SimCity 2000)
  • ADFEmulateRISCOS on 26bit IOMD when emulating RO3.11 or earlier was failing to change the LDR on the IRQ vector to a B
  • ADFEmulateRISCOS was failing to remove the taskID from the list of hypervised tasks if the JIT wasn't active
  • IOMD 26bit could trigger "Parameter not recognised" errors after mounting a floppy image
  • ADFRemapVideoMemory wasn't checking for RISC OS 3.8x/4/6 with a StrongARM correctly
  • SA cache flush buffer wasn't being swapped, which may have caused some full cache cleans to not fully clean the cache
  • OS_ReadVduVariables, OS_ChangeDynamicArea, OS_ReadDynamicArea, OS_DynamicArea, *ADFRemapVideoMemory, *ScreenSize adjusted to handle the delta DA2 size when emulating earlier RO under RO3.8x/RO4.x/RO6.x
  • JIT wasn't collapsing the IRQ stack correctly on a RiscPC pre RO5 causing a crash when games are terminated via CTRL-SHIFT-F12
  • If a floppy image save is required when swapping discs via CTRL-SHIFT-Fx it was saving over the image being swapped too, instead of the image being dismounted
Known issues
  • Will cause a hard-lock when loaded on a Pinebook Pro. I'm working with R-Comp to get this resolved.
  • The video driver on the Pinebook and Pinebook Pro is not complete enough to support ADFFS. Once the above issue is resolved, I'm going to look at writing a new video driver for the Pinebook Pro.
  • If a WiFi stack is loaded (ROD or ROOL), SDIODriver will randomly get stuck in a race condition. This has been reported, but the root cause has yet to be identified
  • Audio is glitchy when the blitter is active, which is noticeable on a Pi when in MODE 32
  • Audio can be glitchy on a RiscPC SA 26bit
  • F1003801 Battle Chess (1993) (Krisalis Software) - slow on StrongARM
  • F1006501 Cannon Fodder (1994) (Krisalis Software) - goes into an unsupported video mode on RiscPC
  • F1060201 Chuck Rock [SA version] (2001) (R-Comp Interactive) - display is wrong when run on a RiscPC
  • F1015401 Fire & Ice (1995) (Warner Interactive Entertainment) - copperbar timing is incorrect on RiscPC, causing screen flickering
  • F1054501 Gods [RPC version] (2001) (R-Comp Interactive) - no sound effects and goes into an unsupported video mode on RiscPC
  • R-Comp RPC/SA versions of games mostly rely on Mode definition files to work and return to the desktop in the game mode. eg. James Pond, Chuck Rock, Gods etc
  • F1059801 Lemmings 2: The Tribes [SA version] (2001) (R-Comp Interactive) - music slows down in places on a RiscPC
Fixed issues
  • F1060201 Chuck Rock [SA version] (2001) (R-Comp Interactive) - may crash when starting a game on a RiscPC
  • F1015401 Fire & Ice (1995) (Warner Interactive Entertainment) - hangs after the loading screen on RO4.x
  • F1022701 Lemmings (1991) (Krisalis Software) - crashes while loading on RO3.8/4.x SA
  • F1026001 Nebulus (1992) (Krisalis Software) - crashes while loading on RO3.8/4.x SA
  • F1059701 Populous [RPC version] (2001) (R-Comp Interactive) - titles are too fast on a RiscPC
  • F1054601 SpeedBall 2 [RPC version] (2001) (R-Comp Interactive) - reports an error loading RmMin on a RiscPC
  • F1007201 Caverns (1991) (Minerva) - hard-lock when quit. Load, press SPACE twice, then CTRL-SHIFT-Q to repro, observed on RiscPC SA 3.71
  • F1059801 Lemmings 2: The Tribes [SA version] (2001) (R-Comp Interactive) - Variable name not recognised when run on a physical RiscPC; caused by SA incompatible code in the loader. Some of the sound effects are wrong
Script changes
  • F1032401 Scrabble (1994) (U.S. Gold) - added an IMB to the patching
  • F1021701 K.V. [v1.01] (1993) (High Risc Software Developments) - corrected the entry to the decrypt phase
  • F1058701 Premier Manager [SA version] (2000) (R-Comp Interactive) - script added
  • F1070901 DropShaft (1993) (Alexander Strong) - corrected the closing RMKill
  • F1026001 Nebulus (1992) (Krisalis Software) - corrected Joystick detection to use Joy_Test
  • F1064001 Blaston (1991) (Eterna) - added a brief pause to the exit to allow the Channel Handler to close down cleanly
  • F1010201 Cyborg (1992) (Alpine Software) - added a check for CFS32 being in the game folder. Added instructions for !Adventure
  • F1010201b Cyborg (1992) (Alpine Software) - added a check for the JIT being shutdown after the Intro and an early script exit
  • F1029801 Quest For Gold (1992) (Krisalis Software) - creates a save folder within the game directory if it doesn't exist; added a check for the JIT being shutdown after the Intro
  • F1048001 Quest For Gold [Learning Curve version] (1992) (Krisalis Software) - creates a save folder within the game directory if it doesn't exist; added a check for the JIT being shutdown after the Intro
  • F1016701 Freddy's Folly (1988) (Minerva) - patched to support an HD install
  • F1005201 Bobby Blockhead vs The Dark Planet (1991) (Atomic Software) - script now decompacts the code so the stack can be set on entry. Added HD install instructions
  • F1033101 SimCity 2000 [RPC version] (1994) (Krisalis Software) - Decodes and applies bug fixes back to RO3.1x, switched to the ARMv4 JIT for StrongARM onward
  • F1043801 SimCity 2000 [A5000 version] (1994) (Krisalis Software) - Decodes and applies bug fixes back to RO3.1x, switched to the ARMv4 JIT for RISC OS 3.5 onward
  • F1003801 Battle Chess (1993) (Krisalis Software) - Switched SWI handler to use CallASWI
  • F1022701 Lemmings (1991) (Krysalis Software) - JIT now used when run on RO4. Added HD install instructions
  • F1059701 Populous [RPC version] (2001) (R-Comp Interactive) - patches now applied back to RO3.11. Added HD install instructions
  • F1054601 SpeedBall 2 [RPC version] (2001) (R-Comp Interactive) - fixed RmMin load failure. Added HD install instructions
  • F1060201 Chuck Rock [SA version[ (2001) (R-Comp Interactive) - increased WimpSlot to avoid the patcher Module crashing when you start a game
  • F1015401 Fire & Ice (1995) (Warner Interactive Entertainment) - fixed a crash when run under RO4.x
  • F1007201 Caverns (1991) (Minerva) - switched to run under the JIT on RiscPC to avoid an exit crash
  • F1060201 Chuck Rock [SA version] (2001) (R-Comp Interactive) - now loads the Mode definition file, a reboot will be required when quitting though
  • F1054501 Gods [RPC version] (2001) (R-Comp Interactive) - no longer loads the Mode definition file on a RiscPC and removes the frame-rate limiter
  • F1059801 Lemmings 2: The Tribes [SA version] (2001) (R-Comp Interactive) - patch SA incompatible code in the SA patcher and apply Page Zero patching back to RO3.50
Attachments
adffs285.zip
16th Nov 2024
(1.31 MiB) Downloaded 84 times
JonAbbott
Posts: 3066
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: ADFFS 2.85 public beta

Post by JonAbbott »

Updated build in the OP, which fixes a few more serious bugs I've spotted while testing on a RiscPC SA RO 3.71
Zaspath
Posts: 1
Joined: Sat Nov 09, 2024 11:53 am

Re: ADFFS 2.85 public beta

Post by Zaspath »

Testing: SA 233 / 4.39 / 128MB RAM / Arcin32 4GB DOM / Etherlan 600 / RooL Clib

Games Tested

!AchetnHam : Good
!Alone : Good
!Battle : Immediate lock-up, no display, requires hard reset
!Burn'OutSA : Good
!Cannon : Immediate lock-up, no display, requires hard reset
!ChuckSA : Crash just after title
!Dune2 : Good
!Fire_Ice : Title screen loads, beyond that soft-lock, try to Shift-F12, hard lock
!GodsRPC : Forces 15khz, no sound in game, cannot quit
!JamesPdSA : Good, returns to desktop in 320 sreenmode
!Lemmings : Crash on start, enters 15khz, requires hard reset *
!Lemmings2SA : 15Khz, music starts, before title 'Variable name not recognised', music persists after exit.
!Lotus : Immediate lock-up, no display, requires hard reset
!MadProf : Immediate lock-up, no display, requires hard reset *
!Nebulus : Immediate lock-up, no display, requires hard reset
!PacMania : Slow down during intermission (Pac being chased by ghosts), in game is good, hard crash on exit of game (Shift+F12), may have been okay if I used Shift-Q (Habit)
!Pockets : Immediate lock-up, no display, requires hard reset
!PopulousRPC : Timing issues, runs too fast, title screen very hard to use, drops into demo within a second, but good otherwise
!SC2000RPC : Good
!SpeedBallPC : '!SpeedBallRPC.RmMin not found' on startup *
!Wolf32 : Good
!Zool : Screenmode not available *

* Krisalis Gold version works without issue

Humble request, please publish Paradroid 2000 to PackMan... Love that game :D
JonAbbott
Posts: 3066
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: ADFFS 2.85 public beta

Post by JonAbbott »

Zaspath wrote: Sat Nov 09, 2024 12:27 pm Battle Chess (1993) (Krisalis Software) - Immediate lock-up, no display, requires hard reset
I couldn't reproduce this. When it shows the Battle Chess logo screen, it's waiting for a key to be pressed. I played it for 15+ mins without issue, although it can be slow when it's making its decisions. Watching the game in debug mode, the JIT isn't doing anything, the game just appears to be doing a lot of processing.

I did however notice it was using the stack for SWI, so I've updated the script to switch it to use OS_CallASWI to avoid unnecessary self-modifying code. See if that speeds up the loading - which might be why it looked like it had hung.
Zaspath wrote: Sat Nov 09, 2024 12:27 pm Humble request, please publish Paradroid 2000 to PackMan... Love that game :D
It's packaged, but I can't release it as I don't have permission.

EDIT: I've just noticed you're testing under RO 4.39 (I was testing on RO3.71) - 4.39 is going to introduce a lot of OS issues, which I'll need to track down and see if it's possible to fix. If you can softload 3.71 and test that will confirm which games have issues under 4.39. I suspect quite a few games are not going to work because of the way 4.39 handles video memory. Cannon Fodder and Battle Chess are two that expect specific screensizes and won't work for example.

I'll change ADFFS to throw an error if the game needs a specific screensize and is being run under RO4.x
JonAbbott
Posts: 3066
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: ADFFS 2.85 public beta

Post by JonAbbott »

JonAbbott wrote: Sat Nov 09, 2024 5:16 pm I'll change ADFFS to throw an error if the game needs a specific screensize and is being run under RO4.3x
Updated build in the OP.

The check was already there but wasn't checking a low enough OS version. Games that can't run under RISC OS 4.39 should now throw an error. From a quick check at least 150 games will fail when run under RISC OS 4.39.

There will however be other games which have no video when run under RISC OS 4.39, but are working otherwise - they're not so easy to throw an error.
JonAbbott
Posts: 3066
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: ADFFS 2.85 public beta

Post by JonAbbott »

JonAbbott wrote: Sat Nov 09, 2024 5:16 pm 4.39 is going to introduce a lot of OS issues, which I'll need to track down and see if it's possible to fix. If you can softload 3.71 and test that will confirm which games have issues under 4.39. I suspect quite a few games are not going to work because of the way 4.39 handles video memory. Cannon Fodder and Battle Chess are two that expect specific screensizes and won't work for example.
I spent yesterday seeing if there's a solution to work around this OS limitation.

To be clear the limitation only comes into play if there's a StrongARM fitted, the OS uses a different code-path for ARM610/710 which handles Dynamic Area 2 (video memory / DA2) allocation as you'd expect. This is correctly checked in most areas of ADFFS, but not in the check I added the other day, so I'll correct that in the next build if I can't come up with a solution.

The problem is handling the DA2 size delta between what the game expects and what the OS has allocated. This is then complicated when a game is directly accessing the legacy IOC video memory below/above &2000000 as this needs to be remapped at every mode/DA2 change.

ADFFS does some of this already for the ARMv5/v7 builds, so building on that I've added delta tracking to MemAlloc, *ADFRemapVideoMemory, OS_ChangeDynamicArea and modified OS_ReadDynamicArea, OS_DynamicArea and OS_ReadVduVariables to adjust returned values by the delta.

With those changes *ADFRemapVideoMemory no longer hangs the machine and writes to the IOC screen address work, however the affected games still lock up and I'm unsure why. One thing ADFFS isn't currently doing is adjusting the delta DA2 size when the mode changes - that's normally done by the OS during the mode change process, but I don't think that's the issue as all game scripts allocate the correct amount of DA2 for the game...so something else is going on. I've yet to debug a game to find root cause.

On a separate note, whilst checking some of the games with reported issues above, I've noticed several fail during the decompress stage reporting an Abort against R8 (which is 0 at the time of the Abort). That decrypt code is normally patched by the OS (which checks all Absolutes when they're loaded), so I suspect RO4 might not be doing some of the expected patching...I've yet to investigate further, although I see the same issue regardless of processor so I'm fairly confident it's an OS-side issue ADFFS will need to cover.
JonAbbott
Posts: 3066
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: ADFFS 2.85 public beta

Post by JonAbbott »

Zaspath wrote: Sat Nov 09, 2024 12:27 pm Testing: SA 233 / 4.39 / 128MB RAM / Arcin32 4GB DOM / Etherlan 600 / RooL Clib
Try today's build and update the state of the games in your post please. Hopefully most will now work, or you'll see different issues. I've listed the games I've explicitly tested and fixed in the OP.

I've not tested on physical, but under emulation Lemmings, Nebulus and Fire & Ice are now working with your setup.

I had to make quite a lot of code changes to support screen memory being mapped in MB chunks, so there's potential for breaking other builds.
Zaspath wrote: Sat Nov 09, 2024 12:27 pm GodsRPC : Forces 15khz, no sound in game, cannot quit
Gods runs at 12.5fps from memory.
Zaspath wrote: Sat Nov 09, 2024 12:27 pm !Zool : Screenmode not available
Edit it's !Run and comment out the Set Zool$Mode line - it should then run on a RiscPC. I'll need to update the package.
JonAbbott
Posts: 3066
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: ADFFS 2.85 public beta

Post by JonAbbott »

Zaspath wrote: Sat Nov 09, 2024 12:27 pm !PacMania : ... hard crash on exit of game (Shift+F12), may have been okay if I used Shift-Q (Habit)
The crash caused when using CTRL-SHIFT-F12 to terminate a game should be fixed with today's build
JonAbbott
Posts: 3066
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: ADFFS 2.85 public beta

Post by JonAbbott »

Zaspath wrote: Sat Nov 09, 2024 12:27 pm !Lemmings2SA : 15Khz, music starts, before title 'Variable name not recognised', music persists after exit.
I've looked at this today, it's a bug in the SA patcher that's been bolted onto !RunImage. There's two issues:
  • The patcher isn't fully SA compatible, it's stacking PC incorrectly in several places
  • The Variable name not recognised error is being triggered by a code loop that self-modifies itself by mistake when it moves the decrypted game code from &8100 to &8000
The latest Boot scripts will patch these issues and the known Page Zero bugs. I've yet to test it on a Pi3 to see if it resolves the crashing I was seeing
Zaspath wrote: Sat Nov 09, 2024 12:27 pm !GodsRPC : Forces 15khz, no sound in game, cannot quit
The RPC conversion is hard coded it for 70Hz, I've adjusted the script to remove the frame-rate limiter.

To quit it's CTRL-ESC - as with most Krysalis titles. Bare in mind RPC/SA versions of games won't be running under the JIT, so you can't terminate them via CTRL-SHIFT-F12.

I noted the lack of sound in-game, I've yet to look at why that is
Zaspath wrote: Sat Nov 09, 2024 12:27 pm !JamesPdSA : Good, returns to desktop in 320 screenmode
This and most of the R-Comp RPC/SA conversions rely on a Mode definition file, so the desktop goes to the game's resolution when you quit out. I'll have to go through all of their conversions and see which need modifying so they're not dependent on bespoke modes
Zaspath wrote: Sat Nov 09, 2024 12:27 pm !ChuckSA : Crash just after title
The latest ADFFS fixes the crash, but the display is wrong as its expecting a bespoke 70Hz mode. I've temporarily altered the script to load the mode definition file, but it will result in the desktop going to 320x200 when you quit
JonAbbott
Posts: 3066
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: ADFFS 2.85 public beta

Post by JonAbbott »

Updated build in the OP to resolve an issue where swapping disc via CTRL-SHIFT-Fx would save over the disc being swapped too, instead of the current disc being dismounted, if the image was flagged to be saved back to HD.
Post Reply