4th Dimension games on Pi2

Discuss ADFFS development and download test releases
Andy1979
Posts: 6
Joined: Sun Mar 17, 2019 11:39 pm

4th Dimension games on Pi2

Post by Andy1979 »

Duplication of my post on stardot, as felt more useful to include in the JASPP forum. https://stardot.org.uk/forums/viewtopic ... 29&t=16616

I've recently installed RISC OS 5.27 on my Pi 2 B and it works beautifully with all of the packaged games so no issues with the setup.

Next step was to dust off my original games on floppy and make some JFDs using my old A3010.

I got Flashback working. I have the version on 2 HD disks (F1053201), but needed to use the Obey file for the DD version in order to make it run.
Also got Aldebaran working - under emulation (!ArchiEmu) as it uses WIMP mode, and Simon the Sorcerer (although copy protection is still there).

I've had mixed success with my 4th Dimension titles as follows:

Saloon Cars Deluxe - Works fine

E-Type II - As for Aldebaran this works fine in !ArchiEmu

Virtual Golf - Doesn't work either under emulation or natively on the Pi. Causes !ArchiEmu to reboot.

Stunt Racer 2000 - I've got the 2 disk version (F1035101). The music starts, but it gets stuck on the loading screen which is compressed into a letterbox. That's the point where it asks for disk 2, but Ctrl-Shift-F2 doesn't work. I get a similar result in !ArchiEmu - the load screen shrinks the vertical height of the window (while this happens the music slows down so something odd is happening) and I can't get past the point it asks for disk 2. Oddly, it does work in Red Squirrel on my Windows 10 machine, so I know the JFDs are OK. Is a newer version available from anywhere?

The following games are from the "Real McCoy 2" compilation (not sure if that means they are different versions?):
Apocalypse - Works fine on the Pi.
The Olympics - Runs, but so fast it's unplayable on the Pi. Haven't tried under emulation yet.
Holed Out - Can't seem to get this to work. Maybe a problem with the image?
Inertia - My original floppy seems to be corrupt - doesn't verify on the A3010 and I get a 'disk error' when trying to boot the JFD.

I've heard mention that 4D released some patches for their games to make them work on later hardware. Does anyone know if they are available to download? I'm not interested in buying the games again as I can always revert to running on original hardware if I can't get them going.

Things I haven't tried:
- Installing games to hard disk in !ArchiEmu and running them without ADFFS
- Forcing 50Hz mode
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: 4th Dimension games on Pi2

Post by JonAbbott »

Andy1979 wrote: Mon Mar 18, 2019 11:00 am I got Flashback working. I have the version on 2 HD disks (F1053201), but needed to use the Obey file for the DD version in order to make it run.
I've yet to see a copy of that version, so there's no boot script for it. Perhaps you'd consider eMailing the ADF/JFD to me so I can start work on it.
Andy1979 wrote: Mon Mar 18, 2019 11:00 am Also got Aldebaran working - under emulation (!ArchiEmu) as it uses WIMP mode
This was working under RISC OS 5, see the ADFFS 2.71 OP as that details the state of each Wimp game. Wimp menus can sometimes hang, I believe the Wimp switches tasks without calling the filters, so UpCalls etc tend to lock the machine.
Andy1979 wrote: Mon Mar 18, 2019 11:00 am Simon the Sorcerer (although copy protection is still there).
When HD installed, the manual based protection should be bypassed. Just click anywhere three times - I had to put that bit back as the game was crashing without it. At some point I'll completely remove it.
Andy1979 wrote: Mon Mar 18, 2019 11:00 am E-Type II - As for Aldebaran this works fine in !ArchiEmu
Should work under RISC OS 5 I believe, with the usual Wimp caveats.
Andy1979 wrote: Mon Mar 18, 2019 11:00 am Virtual Golf - Doesn't work either under emulation or natively on the Pi. Causes !ArchiEmu to reboot.
Sound like the protection is failing. You may have a different release to the imaged copy (v1.0), so may need to create your own recording file to image it correctly. Again, if you could eMail me a copy I'll confirm.
Andy1979 wrote: Mon Mar 18, 2019 11:00 am Stunt Racer 2000 - I've got the 2 disk version (F1035101). The music starts, but it gets stuck on the loading screen which is compressed into a letterbox. That's the point where it asks for disk 2, but Ctrl-Shift-F2 doesn't work.
I did mean to fix the squished screen, but didn't get round to it. Best option is to HD install it to avoid floppy swapping.

That said, I've just tested it and got an Abort on Data transfer when it started the demo, so I may need to fix some bugs.
Andy1979 wrote: Mon Mar 18, 2019 11:00 am The Olympics - Runs, but so fast it's unplayable on the Pi. Haven't tried under emulation yet.
This is one I need to modify to add speed regulation. There were problems with screen corruption in this game, so it was on the backburner for a long time and I ran out of time to fix it for 2.72.
Andy1979 wrote: Mon Mar 18, 2019 11:00 am Holed Out - Can't seem to get this to work. Maybe a problem with the image?
What's the issue? Although I've not looked at the Real McCoy version, the original works (F1019901). Looking at the recording file, it doesn't look like it has disc protection.
Andy1979 wrote: Mon Mar 18, 2019 11:00 am I've heard mention that 4D released some patches for their games to make them work on later hardware. Does anyone know if they are available to download? I'm not interested in buying the games again as I can always revert to running on original hardware if I can't get them going.
I may be wrong, but I thought they were only ever patched to StrongArm/RISC OS 4. David Bradforth did assure me all the games would be released for free, but that was many years ago and nothing has appeared on the website yet. I suspect any patches share the same fate.
Andy1979
Posts: 6
Joined: Sun Mar 17, 2019 11:39 pm

Re: 4th Dimension games on Pi2

Post by Andy1979 »

Thanks Jon that's super helpful. I'll send over some of the tricker JFDs in a few days - I'm away with work at the moment.

Managed to find a 'no disk' patch for the 4D games on Acorn Arcade, so might try installing some of them to hard drive under emulation and see how that goes.
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: 4th Dimension games on Pi2

Post by JonAbbott »

JonAbbott wrote: Mon Mar 18, 2019 7:49 pm
Andy1979 wrote: Mon Mar 18, 2019 11:00 am Also got Aldebaran working - under emulation (!ArchiEmu) as it uses WIMP mode
This was working under RISC OS 5, see the ADFFS 2.71 OP as that details the state of each Wimp game. Wimp menus can sometimes hang, I believe the Wimp switches tasks without calling the filters, so UpCalls etc tend to lock the machine.
It appears Aldebaran crashes under ADFFS 2.72 on RISC OS 5, so stick with emulation for it.
Andy1979
Posts: 6
Joined: Sun Mar 17, 2019 11:39 pm

Re: 4th Dimension games on Pi2

Post by Andy1979 »

Thanks Jon - I've just emailed over some JFDs.

Yes, Aldebaran loads to the icon bar but crashes on start. Couldn't read the error message due to whatever font the game has loaded, but seemed to be the standard 'This application has gone wrong' message. It runs great in !ArchiEmu so no matter.

E-Type II does run, but doing anything with the wimp menus (e.g. changing to a 1 player game) locks the machine. Again it works great under emulation so no big deal.

Will hopefully have time over the weekend to try your suggestions on the others.
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: 4th Dimension games on Pi2

Post by JonAbbott »

I've had a look at the images you sent over.

Holed Out!! - Needs imaging as "Real McCoy 2, The: Holed Out!!", hopefully it will then work. ADFFS 2.72 doesn't contain a boot script for this version yet, so add the Obey script below as !ADFFS.Obey.F1049603 if you want to run it on the Pi.

Code: Select all

ADFS
Set Obey$Dir ADFS::0.$.!HOLEDOUT
DIR <Obey$Dir>

WimpSlot -min 128k -max 128k
IF ADFFS$OSVersion>=&35000 THEN ADFEmulateRISCOS 2.00
IF ADFFS$OSVersion>=&50000 THEN ADFRemapVideoMemory 13 240 ELSE ScreenSize 240
SpriteFree 240
RMAFree 200
IF ADFFS$OSVersion>=&50000 THEN GOARM3JIT 0
RMENSURE SHOOSH 1 <Obey$Dir>.MODULES.SHOOSH
RMENSURE CRACK 1 <Obey$Dir>.MODULES.CRACK
RMENSURE TREECRASH 1 <Obey$Dir>.MODULES.TREECRASH
RMENSURE PLOP 1 <Obey$Dir>.MODULES.PLOP
RMENSURE HOLED 1 <Obey$Dir>.MODULES.HOLED
RMENSURE BELL 1 <Obey$Dir>.MODULES.BELL
RMENSURE CLIPNOISE 1 <Obey$Dir>.MODULES.CLIPNOISE
SLOAD <Obey$Dir>.SPRITES

Set Alias$L. LOAD<32>
Set Alias$RMCLEAR ADFDoNothing
Set Alias$RMTIDY ADFDoNothing
| Allow us to patch HOLEDOUT3
KEY 0 610QUIT|MRUN|F|M
ECHO <21>
FX 225,1
FX 138,0,128
BASIC -load HOLEDOUT2
| Add a mouse debounce to the preview screen
KEY 0 1865REPEAT:MOUSEX%,Y%,T%:UNTILT%=0|MRUN|F|M
ECHO <21>
FX 225,1
FX 138,0,128
BASIC -load HOLEDOUT3
UnSet Alias$L.
UnSet Alias$RMCLEAR
UnSet Alias$RMTIDY
IF ADFFS$OSVersion>=&50000 THEN GOARM3JIT
IF ADFFS$OSVersion>=&50000 THEN ADFRemapVideoMemory
IF ADFFS$OSVersion>=&35000 THEN ADFEmulateRISCOS
Virtual Golf - Disc 1 is failing the protection check and then attempts to erase the floppy. Check if the original floppy works on an Arc, as the the protection sectors have been imaged but may not be correct.
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: 4th Dimension games on Pi2

Post by JonAbbott »

JonAbbott wrote: Mon Mar 18, 2019 7:49 pm
Andy1979 wrote: Mon Mar 18, 2019 11:00 am Simon the Sorcerer (although copy protection is still there).
When HD installed, the manual based protection should be bypassed. Just click anywhere three times - I had to put that bit back as the game was crashing without it. At some point I'll completely remove it.
See if the following script completely removes the protection check from Simon the Sorcerer, without any knock on effects to the game:

Code: Select all

| To install to hard disc:
| 1. Insert disc 9 and Boot via ADFFS Filer\Boot floppy
| 2. Replace !Simon.!Run with this file

IfThere <Obey$Dir>.00.0031 THEN ELSE Set Obey$Dir ADFS::0.$.!Simon

| Change the line below to 1, to use a VGA mode on StrongARM
Set Simon$VGA 0

Set Simon$Dir <Obey$Dir>
IF ADFFS$OSVersion>=&35000 THEN RMAFree 100 ELSE RMAFree 40
IF ADFFS$OSVersion>=&35000 THEN RMEnsure QTMTracker 1.45 RMLoad ADFFS:trackers.QTMModule
IF ADFFS$OSVersion>=&35000 THEN RMEnsure DesktopTracker 2.02 RMLoad ADFFS:trackers.DTT

IF "<Simon$VGA>"="1" THEN ScreenSize 256 ELSE ScreenSize 80
WimpSlot -min 640K -max 640K
IF ADFFS$CPUID>=&A10 THEN ADFEmulateRISCOS 3.71

| Prevent code elevation
IF ADFFS$CPUID>=&A10 THEN JITMEMORYA 18E50 EF020016 E1A00000

| Fix bug in code: Error handler writes to the wrong address
IF ADFFS$CPUID>=&A10 THEN JITMEMORYA D81C E50F0148 E50F0144

| Fix bug in code: Error handler is setting the wrong register
IF ADFFS$CPUID>=&A10 THEN JITMEMORYA 42584 E28FC000 E28F0000

| Fix bug in code: Stack overflow checks are signed
IF ADFFS$CPUID>=&A10 THEN JITMEMORYA 39E38 EA002565 E1A0F00E
IF ADFFS$CPUID>=&A10 THEN JITMEMORYA 39E3C EA002565 E1A0F00E

| Stop Func:Swi from using the stack for SWI's
IF ADFFS$CPUID>=&A10 THEN JITMEMORYA 2F1BC E28F4010 E58F000C
IF ADFFS$CPUID>=&A10 THEN JITMEMORYA 2F1C0 E89403E0 E1A00000
IF ADFFS$CPUID>=&A10 THEN JITMEMORYA 2F1C4 E92D03E1 E1A00000
IF ADFFS$CPUID>=&A10 THEN JITMEMORYA 2F1E0 E28DD018 E8FD83F0

| Stop Func:Swi2 from using the stack for SWI's
IF ADFFS$CPUID>=&A10 THEN JITMEMORYA 2F1FC E28F4008 E58F3004
IF ADFFS$CPUID>=&A10 THEN JITMEMORYA 2F200 E89400E0 E1A00000
IF ADFFS$CPUID>=&A10 THEN JITMEMORYA 2F204 E92D00E8 E1A00000
IF ADFFS$CPUID>=&A10 THEN JITMEMORYA 2F210 E28DD010 E8FD83F0

| Don't stack SWI followed by B
IF ADFFS$CPUID>=&A10 THEN JITMEMORYA 42E44 E92D0009 E58F0000
IF ADFFS$CPUID>=&A10 THEN JITMEMORYA 42E50 E28DD008 E8BD5000

RMEnsure DesktopTracker 1.11 RMLoad <Simon$Dir>.execute.DDT -ac

IF ADFFS$CPUID>=&A10 THEN GOARM3JIT 0
| Prevent Wimp task, we only need the ModeExtension part
RMLoad <Simon$Dir>.execute.!RunImage

| Skip protection check by ignoring the first Act_ScreenTextMsg
LOAD <Simon$Dir>.execute.!Runner 8000
MEMORYA 18F8C EF000011 { > null: }
GO 8000
MEMORYA 37CE4 EBFFE29D { > null: }
MEMORYA 3075C 0 { > null: }
MEMORYA 30760 E1A0C00D { > null: }
MEMORYA 30764 E92DD830 { > null: }
MEMORYA 30768 E24CB004 { > null: }
MEMORYA 3076C E55F4015 { > null: }
MEMORYA 30770 E2544001 { > null: }
MEMORYA 30774 454F401D { > null: }
MEMORYA 30778 4A000022 { > null: }

IF "<Simon$VGA>"="0" THEN ADFGO 8000;<Simon$Dir>.execute.!Runner <Simon$Dir>.execute.gamebase 0
IF "<Simon$VGA>"="1" THEN ADFGO 8000;<Simon$Dir>.execute.!Runner <Simon$Dir>.execute.gamebase 1

IF ADFFS$CPUID>=&A10 THEN GOARM3JIT
IF ADFFS$CPUID>=&A10 THEN ADFEmulateRISCOS
IF ADFFS$OSVersion>=&35000 THEN RMKill QTMTracker
IF ADFFS$OSVersion>=&35000 THEN RMKill DesktopTracker
UnSet Simon$VGA
UnSet Simon$Dir
Andy1979
Posts: 6
Joined: Sun Mar 17, 2019 11:39 pm

Re: 4th Dimension games on Pi2

Post by Andy1979 »

Thanks for the scripts Jon.

I get a disk error when I try to install Simon the Sorcerer to the hard disc - probably because I'm using ADFs downloaded from the internet because I couldn't be bothered to image all 9 original floppies. I've got it installed to the CF card in my A3010 which the Pi can read, so will try your script with that.

Hadn't realised that Real McCoy was separately imaged, maybe that's why Inertia doesn't work too. Will re-image those disks and report back. It'll probably be the weekend before I get chance.
Andy1979
Posts: 6
Joined: Sun Mar 17, 2019 11:39 pm

Re: 4th Dimension games on Pi2

Post by Andy1979 »

I've now had time to try out the above.

Using the 'Real McCoy 2' JFDRecord files for Holed Out!! and Inertia has yielded JFDs that work under emulation. Neither works on the Pi in Risc OS 5.27 but that's fine. The script above for Holed Out!! gives an error that 'SHOOSH' isn't a 32-bit module.

I can't get Simon the Sorcerer to run from hard disc on the Pi using either the above script or the one that comes with ADFFS. I get an "abort on data transfer at &01112200".

I also ran Virtual Golf from the original floppies on my A3010 and it works perfectly. If it helps it's version 1.00 of the game (think it was purchased at the Acorn World show when it had just been released).
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: 4th Dimension games on Pi2

Post by JonAbbott »

Andy1979 wrote: Sat Mar 30, 2019 1:30 pm The script above for Holed Out!! gives an error that 'SHOOSH' isn't a 32-bit module.
My mistake, the JIT wasn't being started early enough. I've corrected the script above.
Andy1979 wrote: Sat Mar 30, 2019 1:30 pm I can't get Simon the Sorcerer to run from hard disc on the Pi using either the above script or the one that comes with ADFFS. I get an "abort on data transfer at &01112200".
Send me a copy of disc 1, so I can check it's the same version.
Andy1979 wrote: Sat Mar 30, 2019 1:30 pm I also ran Virtual Golf from the original floppies on my A3010 and it works perfectly. If it helps it's version 1.00 of the game (think it was purchased at the Acorn World show when it had just been released).
If you can run it on physical, create a recording file and image it using that. I looked at what it was doing and the protection was different from my original, so it's possible its slightly different.
Post Reply