FPEmulator

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

FPEmulator

Post by JonAbbott »

At the minute this isn't loaded in the !Run and I think this is going to potentially be an issue where there's a version loaded that has the Undefined Instruction Vector bug.

I propose adding a check into !Run for v4.12 thru v4.31 and force v4.32 if found.
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: FPEmulator

Post by JonAbbott »

This is now done, either grab the !Run or the full adffs215 distro from the dev site
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: FPEmulator

Post by JonAbbott »

FPEmulator v4.32 isn't SA or 32bit compatible.

Steve, you'll have to make Jeffrey aware and get it resolve before we can release ADFFS with it.
steve3000
Posts: 198
Joined: Thu May 02, 2013 9:25 pm

Re: FPEmulator

Post by steve3000 »

Jon, I've just had a look at this on the Pi.

The new version is not the problem. The old version, v4.31, doesn't seem to quit properly (*RMKill FPEmulator gives 'Bad vector release') - it look very much like the same problem as affects QTM.

As the old version is built into the Pi image, there's no way to replace it by soft loading FPEmulator 4.32. So I guess the best option might be to use a few *RMEnsure commands, to work out whether 4.12-4.31 is loaded, and if so, assume they can't be replaced? Only loading 4.32 if current FPE <4.12 or >4.31?

However I noticed the other day that a new RPi image has appeared on ROOL website, RO 5.21. With no explanation of changes... I wonder if it includes v4.32 of FPE?

I'll drop a line to Jeffrey anyhow.
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: FPEmulator

Post by JonAbbott »

It's probably another bug in the Castle versions then, as I'm seeing it on all my SA machines. I'll have to check which versions I'm running on all of them, it's going to be different. I know the Pi is 4.31, need to check the SA and Kinetic.

It's pointless trying to replace FPEmulator with this bug, we'll have to specifically state that on ARM2, users should manually update their FPEmulator.

EDIT: SA is 4.19, Kinetic is 4.09, Pi is 4.31
steve3000
Posts: 198
Joined: Thu May 02, 2013 9:25 pm

Re: FPEmulator

Post by steve3000 »

Does v4.32 load on the kinetic then? If the bug is the same, then v4.09 should quit with *RMKill, but the Pi v4.31 and SA v4.19 won't.
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: FPEmulator

Post by JonAbbott »

On the Kinetic...

rmkill FPEmulator (4.09) works as expected.
rmload FPEmulator (4.32) crashes with an Abort on Data transfer error, the code that aborts looks like the change you suggested. The problem is that on an SA page 0 is protected, so you can't directly write to the vector. It needs to hook into the vector through an official method, if this causes problems on ARM2 I suggest checking for RO3.5+ and using an official method, below RO3.5 directly write to page 0.

Code: Select all

ADD R1, R10, #20
ADD R0, R10, #12
SUB R0, R0, #12
MOV R0, R0, LSL #7
MOV R0, R0, LSR #8
ORR R0, R0, #&EA000000
MOV R14, #4
STR R0, [R14, #0]
The module doesn't have the 32bit flags, so won't load on RO5.

On the SA:
rmkill FPEmulator (4.19) works
rmload FPEmulator (4.32) fails, again due to the incompatible hook into the vector

So...my original statement that it's neither SA or 32bit compatible still stands :roll:
steve3000
Posts: 198
Joined: Thu May 02, 2013 9:25 pm

Re: FPEmulator

Post by steve3000 »

Ok, from what you've seen I expect v4.32 is just an updated version for pre-RO3.5 machines.

As I've not followed what has happened with !System over the past 10 years - is FPE in separate locations for different versions of Risc OS? Can you load from <System$Dir>.Modules?
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: FPEmulator

Post by JonAbbott »

Ive just rechecked PlingSystem.zip - there are three different binary versions of FPEmulator:

RO 3.10 - 4.32 (1.13MZ)
RO 3.50 - 4.32 (1.13MZ)
RO 4.00 - 4.32 (1.13EM)

There will be a fourth for RO5, which we don't have. It's not in HardDisc4, so will require a ROM update.

So...we'll need to put a RO version check into the !Run and load the correct version.

Q. On which machines do we need to load 4.32? Is it RO3.1 and below?
steve3000
Posts: 198
Joined: Thu May 02, 2013 9:25 pm

Re: FPEmulator

Post by steve3000 »

I think we may be over complicating the issue. QTM doesn't require any FPE, it just crashes on Arm2/250 if FPE v4.12-4.31 is loaded prior to QTM loading. However, the new version of QTM (v1.43) avoids the FPE bug in any case. If you are concerned about other software which might be having issues with undefined instruction vector - then yes, loading FPE 4.32 on RO 3.1 and below will avoid the FPE bug, but I'm not aware this is a problem?

I really think the best plan is to use <System$Dir>.Modules for loading FPE. You could supply a cut-down !System for RO3.1 computers containing the required RO3.1 System modules (as this is the only Risc OS where a Boot sequence isn't the norm). Alternatively provide the RO3.1 modules in a folder within ADFFS.

From memory (as I'm away from the Arc), this should be all you need to cope with loading RO3.1 modules from a local folder if !System is unavailable, and requiring !System for RO3.5+:

*Set ADFFSSystem$Dir <System$Dir>
*RMEnsure UtilityModule 3.5 *If "<ADFFSSystem$Dir>" = "" Then *Set ADFFSSystem$Dir <Obey$Dir>
*If "<ADFFSSystem$Dir>" ="" Error ADFFS requires !System has been initialised when running on Risc OS 3.5 and above

*RMEnsure FPEmulator 4.19 RMLoad <ADFFSSystem$Dir>.Modules.FPE

Then check the minimum version of FPE required for ADFFS (and associated modules) - I've put 4.19 here, but you may get away with a lower version.

Steve
Post Reply