Odd SCSIDM behaviour in Arculator

discuss emulators of 26-bit acorn systems e.g. arculator and rpcemu
Post Reply
Boydie
Posts: 767
Joined: Sat Oct 24, 2015 9:25 am
Location: Sunny Wigan
Contact:

Odd SCSIDM behaviour in Arculator

Post by Boydie »

Not sure if this is an Arculator issue or a SCSIDM one...

I'm trying to configure 499MB SCSI drives. When I run Section in SCSIDM, it offers a default LFAU size of 12.

I can select a size of 11 and it works fine.
I can select a size of 9 and it refuses, stating it's too small.

When I try to select a size of 10, SCSIDM crashes with an error of "Fatal error in runtime system: malloc failed (heap corrupt).

This error happens in both Arculator 2.1 and 2.2, and both AKA31 and AKA32 podules. I've tried reducing the drive size - makes no difference.

Any suggestions what's going on?
User avatar
IanJeffray
Posts: 5963
Joined: Sat Jun 06, 2020 3:50 pm
Contact:

Re: Odd SCSIDM behaviour in Arculator

Post by IanJeffray »

What does PartitionManager have to say?
Boydie
Posts: 767
Joined: Sat Oct 24, 2015 9:25 am
Location: Sunny Wigan
Contact:

Re: Odd SCSIDM behaviour in Arculator

Post by Boydie »

IanJeffray wrote: Fri Sep 22, 2023 10:44 am What does PartitionManager have to say?
Works fine with the bog standard partitions, and will format to an LFAU of 1024 (which I presume equates to 10 in SCSIDM). So it bypasses 90% of the issue.
Only wrinkle is that it can't cope with RiscIX partitioning - it views the entire disc image rather than just the RISCOS bit that I sectioned under SCSIDM.
So having a fully functioning SCSIDM would be beneficial for a non-wasteful LFAU on the RiscIX drive - it still crashes on an LFAU setting of 10 when a RiscIX partition is sectioned.
sirbod
Posts: 1624
Joined: Mon Apr 09, 2012 9:44 am
Location: Essex
Contact:

Re: Odd SCSIDM behaviour in Arculator

Post by sirbod »

Boydie wrote: Fri Sep 22, 2023 1:42 pm Only wrinkle is that it can't cope with RiscIX partitioning - it views the entire disc image rather than just the RISCOS bit that I sectioned under SCSIDM.
So having a fully functioning SCSIDM would be beneficial for a non-wasteful LFAU on the RiscIX drive - it still crashes on an LFAU setting of 10 when a RiscIX partition is sectioned.
I can add the option to create a Risc iX partition...if I could find documentation on what's needed beyond the few bytes that change in the FileCore DiscRec.

I could also check if you're formatting an existing FileCore volume that has a Risc iX partition and copy it across?
Boydie
Posts: 767
Joined: Sat Oct 24, 2015 9:25 am
Location: Sunny Wigan
Contact:

Re: Odd SCSIDM behaviour in Arculator

Post by Boydie »

So far as I can tell, Section in SCSIDM splits the disk into "RiscIX" and "RISCOS" areas (whether these are genuine "partitiions" I don't know). Presumably it only then formats the RISCOS area, given that it will accept an LFAU that is way too small for the total capacity of the drive. (ISTR !RiscIXFS then handles any sub-sectioning of the RiscIX area?)

So presumably the RISCOS and RiscIX sections of the drive are identified in some way. Is it possible for these flags to be recognised.

It's quite straightforward to section the disk in SCSIDM with the incorrect LFAU. So "all" that should be required of PartitionManager would be to change the LFAU of the RISCOS area that SCSIDM creates.
As it stands PartitionManager can't differentiate between the two areas, so views the entire drive as a single FileCore volume. Would it be feasible, rather than trying to work out how to re-create a RiscIX partition, to recognise only the area that RISCOS will see and reformat that with a different LFAU and leave the RiscIX area untouched?
sirbod
Posts: 1624
Joined: Mon Apr 09, 2012 9:44 am
Location: Essex
Contact:

Re: Odd SCSIDM behaviour in Arculator

Post by sirbod »

I've altered the latest build of Partition Manager to retain an existing RISC iX partition when reformatted. That should allow you to partition with SCSIDM and then reformat the FileCore volume without losing the RISC iX partition information.

I don't have anything to test with, so please let me know if it works.

EDIT: On second thought, although it will retain the partition information I think it might overwrite parts of the RISC iX volume with the FileCore map as RISC iX is embedded into the FileCore volume.
Boydie wrote: Fri Sep 22, 2023 2:39 pm As it stands PartitionManager can't differentiate between the two areas, so views the entire drive as a single FileCore volume.
That's not the case. PM is aware of RISC iX partitions, you should see them if the drive is properly formatted with a Unix partition table within the RISC iX area.

If you've just partitioned the drive with SCSIDM, but not installed RISC iX then there's no partition information to be found so it will show as a full-disc FileCore drive.

I'll look at showing the RISC iX area when there's no Unix partition table to cover this scenario.

EDIT 2: I've adjusted PM so it hopefully now shows an uninitialized RISC iX area.
Boydie
Posts: 767
Joined: Sat Oct 24, 2015 9:25 am
Location: Sunny Wigan
Contact:

Re: Odd SCSIDM behaviour in Arculator

Post by Boydie »

Many thanks.

It's probably user error on my part, but I get "Unknown or missing variable in "Formats.Filecore" at line 197"...
sirbod
Posts: 1624
Joined: Mon Apr 09, 2012 9:44 am
Location: Essex
Contact:

Re: Odd SCSIDM behaviour in Arculator

Post by sirbod »

Boydie wrote: Fri Sep 22, 2023 4:11 pm It's probably user error on my part, but I get "Unknown or missing variable in "Formats.Filecore" at line 197"...
No...error on my part. I missed a % of the variable on that line. I've uploaded a revised build.

As I said, I couldn't test it so expect more issues that I'll need to fix.
Boydie
Posts: 767
Joined: Sat Oct 24, 2015 9:25 am
Location: Sunny Wigan
Contact:

Re: Odd SCSIDM behaviour in Arculator

Post by Boydie »

It now shows the RiscIX partition as a subset of the overall FileCore volume, but doesn't show the RISCOS partition as a discrete entity.
As a result, choosing to format the drive still selects the entirety of the disk rather than just the RISCOS partition, and gives it an LFAU of 4096.
sirbod
Posts: 1624
Joined: Mon Apr 09, 2012 9:44 am
Location: Essex
Contact:

Re: Odd SCSIDM behaviour in Arculator

Post by sirbod »

Boydie wrote: Fri Sep 22, 2023 6:03 pm It now shows the RiscIX partition as a subset of the overall FileCore volume, but doesn't show the RISCOS partition as a discrete entity.
The RISC iX region is embedded in the FileCore area with the RISC iX sectors marked as allocated in the FileCore map. I'll need to implement this last bit so FileCore reports the correct free space and to avoid overwriting the RISC iX region.

EDIT: I don't have the source for SCSIDM, but have found an ST506 RISC iX formatter. I'll see if I can mirror what it does during the format.
sirbod
Posts: 1624
Joined: Mon Apr 09, 2012 9:44 am
Location: Essex
Contact:

Re: Odd SCSIDM behaviour in Arculator

Post by sirbod »

sirbod wrote: Fri Sep 22, 2023 7:21 pm
Boydie wrote: Fri Sep 22, 2023 6:03 pm It now shows the RiscIX partition as a subset of the overall FileCore volume, but doesn't show the RISCOS partition as a discrete entity.
The RISC iX region is embedded in the FileCore area with the RISC iX sectors marked as allocated in the FileCore map. I'll need to implement this last bit so FileCore reports the correct free space and to avoid overwriting the RISC iX region.
I've now implemented mapping out the RISC iX area, if you'd like to give today's build a try.

I haven't tested it with an actual RISC iX install, although I did test a drive formatted via st506form2 to confirm the FileCore and RISC iX partitions looked the same after reformatting in PM.
Post Reply

Return to “32-bit acorn emulators”