RISC OS Open
A fast and easily customised operating system for ARM devices
ROOL
Home | News | Software | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account
Forums → General →

How to test FileSwitch Module?

Subscribe to How to test FileSwitch Module? 17 posts, 6 voices

 
Dec 8, 2008 8:45pm
Avatar Thomas Milius (126) 40 posts

Two weekends ago we had a private RISC OS meeting. One of us wanted to count some files inside various directories. He had to detect that OS_FSControl 28 is limited to 4GB which is meanwhile a bit small. He tried to implement the file counting in another way. Parallel to this I tried to extend OS_FSControl to 64 Bit.

I think that I made the modification right. However before publishing it we wanted to test it. And yes thats the problem.

The fileswitch module is so central that it refuses to be RMLoaded etc.. Therefore my question: Has anyone an idea how to test central modules like this?

Many thanks in advance

Thomas Milius

 
Dec 8, 2008 10:30pm
Avatar Steve Revill (20) 542 posts

Build an IYONIX ROM image and softload it – sadly that requires someone to tweak the SoftLoad tool to softload on the IYONIX (it was written for the RiscPC). I think Adrian Lees was having a look at doing this so it would be worth asking him how he’s getting on.

Doing a ROM build is a simple case of checking all of the sources out as defined in the Products/Tungsten/modules file and then installing the Acorn C/C++ tools into that build environment, running RiscOS/Apps/!Builder and doing a “Tungsten” build. I think ROM builds are described on our Wiki somewhere.

 
Dec 8, 2008 10:31pm
Avatar Steve Revill (20) 542 posts

The SoftLoad tool sources, for those who are interested, are here…

http://www.riscosopen.org/viewer/view/castle/RiscOS/Utilities/Debugging/SoftLoad/
 
Dec 9, 2008 12:00am
Avatar Ben Avison (25) 225 posts
There is a slightly less heavyweight way of testing FileSwitch. Write a little BASIC program which
  • allocates an RMA block
  • loads the test FileSwitch module into it
  • does the “insert module from memory” OS_Module call
  • reinitialises all the filing systems (or as many as desired) so they re-register with the new FileSwitch
 
Dec 9, 2008 8:46pm
Avatar Thomas Milius (126) 40 posts

Many thanks for the hints.

I shall try to start with Ben’s way first for it seems a Bit simpler to handle.

If it won’t work I shall try to build and softload the ROM image. It is because I didn’t build all the RISC OS 5 components already and this will also take a while. I am also exspecting some corrections during the tests and so Bens way may be the faster one instead rebuilding a ROM every time.

 
Dec 9, 2008 10:49pm
Avatar Steve Revill (20) 542 posts

I’ll just keep plugging the softloader in the hope someone will fix it! :)

 
Dec 12, 2008 10:15pm
Avatar Adrian Lees (168) 23 posts

I think the softloader is working, though it’s still a little early to be sure. Suffice to say that I created a dummy ROM image which just contains a section of code to write a message into the NV’s screen memory, and the modified softloader can now load this, do its mungeing and run the ROM.

Now to make the HAL softload-aware…. which is prob quite a bit more work.

 
Dec 13, 2008 5:47pm
Avatar Steve Revill (20) 542 posts

[softloader] Hooray! [HAL] Ahh. Bummer.

 
Dec 15, 2008 5:06am
Avatar Adrian Lees (168) 23 posts

Brief update to say that I’ve managed to get 5.14 to boot to the desktop softloaded, though there are a number of issues. It seems to have trouble accessing the machine ID (and graphics card types?) from the flash, the network doesn’t work (for me at least) and I was unable to start NetSurf (though that may just have been because the boot sequence didn’t complete properly). Progress of a sort, anyway.

It /will/ definitely need a few small changes to the HAL source before we can softload cleanly. At the moment I’ve just bodged the softloader to apply the necessary patches to the in-memory ROM image before execution.

 
Dec 15, 2008 11:11pm
Avatar Adrian Lees (168) 23 posts

Network’s up and running. I’ve experienced a couple of unexplained machine freezes so it’s not quite happy, and I have yet to get a picture using the GeForce5 card for some reason. Have switched back to GF2 temporarily.

 
Dec 16, 2008 3:20am
Avatar Steve Revill (20) 542 posts

Great work! Thanks for the updates. For your information, Ben and I programmed the RO5.14 image into an IYONIX for the Midlands show. I’ve used that machine for various things since with no obvious problems so we can be a little confident that the freezes aren’t the result of fundamental faults with the ROM.

Note, however, that the ROM programmer does some wacky patches to the ROM image before it programs it (look inside one of your ROM updates from Castle). It might be that some of these patches are part of what fixes your GF5 issues?

 
Dec 16, 2008 12:04pm
Avatar Adrian Lees (168) 23 posts

Thanks. I knew that jwb stored info on the graphics card types somewhere, but had forgotten the details. I’ll modify the softloader accordingly, and I suspect you’re right about the GF5 problems. Not yet sure what caused the 2 freezes I’ve seen, but I did run the softloaded OS for many hours last night and actually started developing on it.

 
Dec 18, 2008 5:38pm
Avatar Adrian Lees (168) 23 posts

Didn’t help, unfortunately (and indeed my machine normal runs an unpatched ROM and starts most times out of 10). Whilst I try to work out why not, is there anyone out there with a GF5 card who’s willing to try the softloader (I can deactivate ADFS in the loaded ROM image as a safety measure, if you like) to see whether it’s a quirk of my (pre-production) IYONIX pc or a general problem that will affect all GF5 users?

 
Dec 19, 2008 9:56pm
Avatar Tank (53) 158 posts

If you get no other takers, I have an FX5500 card I can put in and try. I did buy it to use, but its fan is far to noisy for me !!

 
Dec 30, 2008 9:11am
Avatar Thomas Milius (126) 40 posts

Thanks to the hints mentioend above and an old piece of software I managed it to test my fileswitch modification.

Before fileswitch can be removed it is necassary to RMKILL Free. Afterwards the new instance can be easily loaded by a simple BASIC program.

I have modified OS_FSControl 28 in such a way that in case in Bit 15 in Mask Bits R3 is set R4 will contain Bits 32-63 of the size else the behaviour is backward compatible including the wrong counting above 32 Bit. Bit 15 in mask Bits has been declared as 64 Bit mode.

An alternative would be to leave the Bits unchanged and to introduce a new OS_FSControl SWI. Which is this preferred way?

 
Dec 31, 2008 4:32pm
Avatar Adrian Lees (168) 23 posts

By ‘new OS_FSControl SWI’ I presume you mean a new reason code (value in R0), and I’d suggest that this is the way to go. If you use the mask bit in R3 then software can’t detect whether FileSwitch supports that bit, and thus won’t know whether the count is reliable. Using a new reason code will return an error on older versions of FileSwitch and application code can thus choose whether to just use & trust OS_FSControl 28 or attempt some other recovery.

It’d be worth updating ‘Count_Code’ (s.FSCommands) and ‘Util_FilesDone’ so that *Count benefits too, although the latter is called from a couple of other places.

 
Jan 11, 2009 9:00pm
Avatar Jeffrey Lee (213) 1488 posts

Have you worked out the kinks in the softloader yet, Adrian? I’d be willing to give it a go with my GF5 if you send a copy my way.

Reply

To post replies, please first log in.

Forums → General →

Search forums

Commercial use

For commercial enquiries, please contact the owners of RISC OS, Castle Technology Ltd.

ROOL Store

The official C/C++ Development kit and more here.

Donate! Why?

Help ROOL make things happen – please consider donating!

Description

General discussions.

Voices

  • Thomas Milius (126)
  • Steve Revill (20)
  • Ben Avison (25)
  • Adrian Lees (168)
  • Tank (53)
  • Jeffrey Lee (213)

Options

  • Forums
  • Login
Site design © RISC OS Open Limited 2011 except where indicated
The RISC OS Open Beast theme is based on Beast's default layout

Valid XHTML 1.0  |  Valid CSS

Powered by Beast © 2006 Josh Goebel and Rick Olson
This site runs on Rails

Hosted by Arachsys