Armbook problem - no OS disk not formatted
Pages: 1 2
Anthony Vaughan Bartram (2454) 458 posts |
Hi, I’ve been porting my free Mutant Penguin game to the Armbook (full screen). Does anyone know where I can get an image from so I can restore my Armbok to life? Thanks, Tony |
Will Ling (519) 98 posts |
There is a good chance you can recover files from the card by putting it in a card reader on another riscos machine. |
Anthony Vaughan Bartram (2454) 458 posts |
Thanks Will. I think I’ve found the necessary information and am pushing cards into my ARM X6 card reader to see what I can do. As and when I get the game to work I’ll add Mutant Penguin (armbook) as a separate build in the !Store for people to play. |
Andrew Rawnsley (492) 1445 posts |
Does it have to be a separate version? I wonder if it is possible to auto-detect current resolution and scale as appropriate or something? |
Anthony Vaughan Bartram (2454) 458 posts |
Hi Andrew, It doesn’t have to be a separate build. I’ll try and roll it in to one version. Do you have a recommendation on how to ID the host machine as an Armbook? I only had to make a few changes basically:
I still have to fix the mouse pointer coordinate scaling. |
Jeff Doggett (257) 234 posts |
Don’t do that. Check for the availability of each feature separately, |
Steve Pampling (1551) 8170 posts |
Thinking on this – historically RO had limited variations of hardware but even then there was lots of reinventing the wheel with similar code in many apps/utilities. More recently the available variants have expanded. |
Rick Murray (539) 13840 posts |
Sometimes, as this example (and numerous others) demonstrate, it is necessary to identify a machine to cater for non-standard quirks of said machine. As the range of potential hardware and the level of support/features differ slightly, the need to identify particular machines particularly for programs the run outside the desktop increases. I know that ROOL (and historically the entire community) are quite against machine probing. However in the case where something that runs on other machines needs particular tweaks to run on one, it is rather necessary to be able to easily and correctly identify “the one”.
Take a look at the modules. Usually there will be a platform specific thing, often as the video driver.
This is really the sort of thing that What we need now is a simple extension to that call that can provide two integers. One giving the base platform type (as in RiscPC, emulator, Beagle, Pi…) and the second giving the platform revision. The OS knows it, the programmer should be able to access it if there is a need without buggering around poking in places applications have no right poking because the stewardship of the OS does not want “differences” to be highlighted, even when such highlighting is unavoidable. Recent valid example? Right here where looking at using the hardware random number generator in the Pi. The base address of the hardware changed. There’s no call to read this base address. There’s no call to read what sort of Pi it is. There’s only probing the CPUID and making assumptions as to which processor it is. This, to my mind, is a far greater transgression than the OS having a call to accurately return the device ID. |
Steve Pampling (1551) 8170 posts |
You’re sounding like you have half a plan already. Of course if Nemo hadn’t been prodded into taking a long walk we’d have a finished item by Monday morning, or sooner. |
Rick Murray (539) 13840 posts |
No, I don’t have a plan. But it doesn’t make sense for an extension module to provide what the OS needs to know itself. |
Jeffrey Lee (213) 6048 posts |
No. You need to identify what’s non-standard about the machine. A simple OS_CheckModeValid call is all that’s needed to check if a given screen mode is supported. It will cope with the Armbook. It will cope with any future machines that get released. It will cope with anyone using a weird monitor that doesn’t support that resolution. It will cope with RiscPC’s with under 2MB of VRAM. And when the Armbook is improved to support more screen modes, it will react to that. If you want to get more involved, OS_ScreenMode 2 can list all the modes which are supported, and your program can scan the list to look for an acceptable replacement.
The problem in that case is that there’s no call to read the base address of the RNG. The solution is to add that call, not to promote the use of code that will break if executed on the wrong machine. |
Jon Abbott (1421) 2651 posts |
The correct way to deal with that is request the OS be extended to provide the address. Developers certainly shouldn’t be hardcoding for specific machines, unless they’re developing OS drivers – that’s simple common sense. With regard to the OP, the issue is using a fixed resolution – not the hardware its running on. |
Rick Murray (539) 13840 posts |
In that case, yes. I wonder if the kernel shouldn’t have an RNG built in, a software implementation (perhaps equal to srand()?) using hardware where available.
Now, if only there was some sort of way of identifying what “the wrong machine” is… ;-) |
Anthony Vaughan Bartram (2454) 458 posts |
Thanks for all of the ideas. Thanks Jeffrey. I will use OS_CheckModeValid. Then, if I am able to determine the current resolution, I can use the code which I have written to display the game via the sprite scaling method which I am using. This has the advantage of being forward compatible to other cases where the native resolution of the game is not available. I should be able to get back to this in the evening when its dark (and I usually code). Tony. |
Sprow (202) 1158 posts |
It already does, if you type *Dump random:then SystemDevices provides random numbers all day long. The software RNG comes straight from the C standard, but could just as well be vectored out to some hardware block if a suitable HAL device existed. There’s also *Dump zero:though that’s less interesting. |
Rick Murray (539) 13840 posts |
Ah, macros for |
Anthony Vaughan Bartram (2454) 458 posts |
I’m a little bit cautious at the minute. I’ve only run Hform once before to enlarge my Raspberru Pi’s disc. Given I’m still a relative RISC OS newbie (6 years this year) I feel concerned I might somehow reformat my ARM X6 drive by mistake. 1) I launch HForm Unfortunately, I do not know which memory card number to use. If I guess incorrectly, I’m concerned I will reformat the system disc or one of the 2 SD cards installed in the ARM X6 Please would someone direct me if I should be selecting M or S and which number that I should select. Thanks, Tony |
Rick Murray (539) 13840 posts |
I think if it is a USB device, it might be ‘S’ (for SCSI)? What I’d do is shut down all applications, copy HForm to RAMdisc, then dismount and physically remove the system disc. Ditto for any other SD cards. Don’t take chances on a weird UI (yes, HForm, I’m looking at you). |
Will Ling (519) 98 posts |
Glad you saved the files |
Anthony Vaughan Bartram (2454) 458 posts |
Thanks Rick and Will. If I trash my Pi through my own finger failure, I can fix it up fairly quick. |
Mike Freestone (2564) 131 posts |
After typing the card 0-7 hform lists the size and make of the card, so unless you have them all the same it should be clear which is which… or press Esc like Will says. |
Stuart Painting (5389) 714 posts |
After running HForm, the next step is to run !A64ROM-scsi0. Two things to be aware of:
|
Alan Adams (2486) 1149 posts |
On an ARMX6 the two SD cards are SDFS devices. The main SSD is a SCSI device. Hope this helps. |
Andrew Rawnsley (492) 1445 posts |
On an ARMX6, the boot (ARMX6 OS) micro SD card slot on the motherboard is :1 The “in situ” programmer can be used to program SDFS::0 However, accessing that port on an ARMX6 can be tricky, since it is inside the case. Instead, I use the ARMX6 front card reader. This presents as SCSI::0 which is why the SCSI0 programmer exists. That’s the one I use myself. However, the “gotcha” bit is Hform, which (depending on version) lists the SSD as device 0 and the card reader as device 1. Note that this has changed in the latest version. The key is to pay close attention to the stated drive description and capacity, and make sure you press the appropriate key! If using a blank/fresh card, I just look for the message “this disc doesn’t have an existing/valid Filecore format”. That’s a sign it is probably the right card/disc :) |
Anthony Vaughan Bartram (2454) 458 posts |
Work has been very busy over the last kmonth, so I only just got back to this. Thanks for all the help and suggestions. Still not got my Armbok running as yet. I formatted the drive and I ran !A64ROM-scsi0. which reported success and now 12 MB of my SD card is used. However, there are no folders or files. Do I need to install something like Harddisk4 form ROOL? The other downloads contain tools etc, but not the standard applications. At least I didn’t find any. I think maybe I should order a spare and then use that to provide files for my mostly empty card. Then I can get on with some Armbook game porting. |
Pages: 1 2