HForm on RPi4
Pages: 1 2
Alan Adams (2486) 1149 posts |
Source and download buttons are both present using Firefox. I’ve had a quick look at the source, and it doesn’t look as though adding sanity checks for boot disc or disc containing HForm would be too hard to add. Testing it in this form however is more of a problem. For example using the Messages file from the version of HForm distributed with the ARMX6 fails to load the message token WhichFSSM which asks what filesystem to use. (i.e. the message that causes the initial confusion). I also downloaded the disk image sources but couldn’t find HForm in there. I was hoping to get the matching files such as messages. [edit] Found Hform now, using Windows search facility on the expanded tarball. It was at |
Rick Murray (539) 13850 posts |
Oh, I don’t understand FileCore. <ducks>
That’s why when I link to bits of the source here, I usually link to the outdated CVS. Precisely because I use NetSurf and GitLab does not work with it.
→ Disc.RiscOS.Sources.Utilities.HForm |
Alan Adams (2486) 1149 posts |
Ah, thanks. I was looking in the wrong tarball. |
Bryan (8467) 468 posts |
That does depend on a number of things. Not least, which browser you are using. With Netsurf on RO, I don’t see the source or the button. With Firefox on a PC, I see the source with dubious syntax-colouring. (but not usefully editable) |
Martin Avison (27) 1494 posts |
Before spending time on minor mods to HForm, note that the Bounty for Filing system improvements includes …
… and this Bounty is marked as “Underway” |
mikko (3145) 123 posts |
It would be good to get a “bounty progress” report from ROOL. News of progress can only increase the likelihood of donations to other bounties… |
Alan Adams (2486) 1149 posts |
So for my own satisfaction I’ve modified HForm to include a sanity check. It’s a single extra function called just before the final “Are you Sure” message. It checks whether the drive and file system match the boot disc (by looking at SYS$PATH) and whether it matches the disc HForm is running from by checking Hform$dir. It tells the user that it is about to do something “undesirable” but doesn’t stop them. One extra line of code would stop it at that point. Currently it then always exits before asking “are you sure” in case of accidents. I’ve tested it on RPi (SDFS), ARMX6 (SCSIFS) and RPC RO4.02 (ADFS). On the latter it failed to detect that IDEFS was present, so didn’t give an option to format those drives. If anyone is interested in a slightly safer version as a stop-gap until a better one comes along, let me know and I’ll make it available. |
Erich Kraehenbuehl (1634) 181 posts |
My question is: How do i format a TF card with filecore format, if my RPi4 can not do it? |
Chris Gransden (337) 1207 posts |
Have you tried using an older version of HForm. The current version (2.75) fails to show any drives on my USB3 SD card adapter but 2.61 works fine.
Is your drive connected to ADFS, SCSIFS or SDFS (A/S/M)?S Format which drive (0 – 7) ?0 1 Dismounting drive Do you wish to retain this shape (Y/N) ? y A: no more changes to defect list A,B,C or D ? a Disc will be formatted as : 653 Cylinders, 17 Heads and 44 Sectors/Track Parking cylinder 654 |
Sprow (202) 1158 posts |
These 2 statements don’t make sense together, because FileSwitch (for *Copy) and SystemDisc both use exactly the same SWIs to find the memory card as HForm, which itself just uses the SWI that is behind *SCSIDevices. I just tried the micro SD card adapter I have, with a SanDisk card in it, plugged it into each of the Pi 4’s four main sockets, and it was recognised in each case, and HForm offered to format it. Can you (specifically in this order)
We’re getting confused there between a drive, which is the hole into which the media is inserted, and the disc, which is the thing on which the data is stored. Fixed discs (numbered 4-7 typically) have the disc fixed inside the drive, but removable discs (numbered 0-3 typically) do not. For multi-in-one card adapters these often report themselves as several drives, and if it’s more than 4-in-1 there’s a possibility the drive you’re interested in wont appear at all because FileCore’s run out of drive numbers. Avoid 5-in-1 and greater adapters to dodge that limit! Additionally, the adapter often doesn’t have a microswitch to notify RISC OS that a card was inserted, so if there’s an icon on the iconbar (for the drive) you might get a “Drive is empty” error even if your eyes can see the card. The key is to insert the card into the adapter before plugging the adapter into the USB socket. SDFS has some special timer based code to speculatively poll empty sockets should the designer have cheaped out an not put a microswitch (I’m looking at you Raspberry Pi), but that only applies to the motherboard sockets not a USB adapter. |
Sprow (202) 1158 posts |
Chris G – you didn’t have anything plugged in yesterday, but do today by the looks of things. Try running this DIM buf% 256 FOR i%=0 TO 7 SYS"XSCSI_Initialise",2,i%,buf% TO;F% PRINT F%AND1,~?buf% FOR k%=i% TO &FF STEP &20 SYS"XSCSI_Initialise",2,k%,buf% TO;F% PRINT F%AND1,~?buf% NEXT NEXT in that configuration, and hopefully some numbers might reveal what’s not being reported right. |
Chris Gransden (337) 1207 posts |
Here’s the output.
|
Sprow (202) 1158 posts |
Hmm, well that’s why it doesn’t list the disc – device id 0/LUN0 is reporting an error, but LUN1 isn’t. Can you see what the error is? DIM buf% 256 FOR i%=0 TO 1 SYS"XSCSI_Initialise",2,i%,buf% TOe%;F% IF (F%AND1)=1 THENSYS"XOS_GenerateError",e%+4 TOerr$:PRINT err$ PRINT i%,F%AND1,~?buf% FOR k%=i% TO &FF STEP &20 SYS"XSCSI_Initialise",2,k%,buf% TO;F% PRINT F%AND1,~?buf% NEXT NEXT |
Chris Gransden (337) 1207 posts |
Here’s the new output.
If I plug a CF card in then it works.
Is your drive connected to SCSIFS or SDFS (S/M) ? S Format which drive (0 – 7) ? 0 |
Sprow (202) 1158 posts |
The curse of the multi-in-one card reader strikes again. HForm will give up if LUN0 errors. Could you try this (which keeps going until a LUN not present error specifically) in all 4 combinations of CF/SD card present and not present? |
Rick Murray (539) 13850 posts |
Oh, some of those things are truly awful. I had one (given to me) that I wanted to use with XP. Insert an SD card, plug it in, suddenly we have E:, F:, G:, and H: appear. Which to pick? I got myself a replacement. That managed to make a bigger mess of a 4GB SD card than did old DOSFS (when it could only cope with 2GB). How, why, what, I don’t know. If a reader corrupts media, it is binned, no questions asked. I have two µSD readers (ought to get a full size SD one too) and that’s all they do. And they do it well. I won’t touch a multi-reader now. |
Chris Gransden (337) 1207 posts |
Here’s the results.
|
Alan Adams (2486) 1149 posts |
Out of curiosity I tried it here on a pi3. First problem was that HForm must have been seen, and specifically the most recent version, i.e. with a messages file containing the “WhichFSSM” tag. As you see earlier I have been amending the latest (i.e. from the current release hard disc image) HForm, to give more warnings. That version, with my 4-port reader and cards in slot 0 and 2, finds the first card, but not the third. Your runimage finds both. I’ve now added the sanity check code to that version here |
Sprow (202) 1158 posts |
The curse of the multi-in-one card reader strikes again. HForm will give up if LUN0 errors. Could you try this Excellent – 4 for 4.
Well, if by “problem” you mean you ran just the replacement !RunImage without first copying it inside HForm – the mind boggles what you were expecting to happen? And if by “most recent” you mean your copy predates December 2017 – then abandon hope all ye who enter here!
Excellent – 5 for 5.
I’ve added those two checks, albeit internationalised and without needing Reporter loaded, it moans appropriately on my Titanium on ADFS/SDFS/SCSIFS so hopefully it moans appropriately everywhere. |
Doug Webb (190) 1180 posts |
To be fair I went down that route first before the fog lifted and I thought “What are you doing you dxxxx”.
I assume version 2.76 will be made available ready for 5.28 release? :-) |
John WILLIAMS (8368) 495 posts |
What I’m not following is precisely that. Will (a) future version(s) include these modifications which are potentially helpful, but fall short of the “complete rewrite” demanded earlier? Grateful for any crumbs which fall from the table! |
Stuart Painting (5389) 714 posts |
It’s on Gitlab so I suspect the answer may be “yes”… |
Erich Kraehenbuehl (1634) 181 posts |
Could try it today. !Hform works now perfect for me. |
Chris Hall (132) 3558 posts |
I’ve added those two checks, albeit internationalised and without needing Reporter loaded, it moans appropriately on my Titanium on ADFS/SDFS/SCSIFS so hopefully it moans appropriately everywhere. Excellent! (Post updated 10 Oct): And I see it has now been committed by ROOL. 5.28 is not yet baked in aspic so it should make it … Can someone write a utility to save the disc map sectors to a file which occupies a specific physical address on the card so that an ‘unformat’ utility could recover it? Ideally this could be a standard fixed place, protected by a defect mapping (similar to how the ARMX6 hides the rom), rather than be protected by a file entry in the map. |
Pages: 1 2