Can't change keyboard layout in mode 7
Elozor Bruce (12160) 5 posts |
I am trying to make a boot-to-BASIC risc os system, and i have succeeded in booting to BASIC, but BASIC will not respect my US keyboard layout setting. |
Stuart Painting (5389) 714 posts |
It’s odd that you mention “drop into the * prompt” as BASIC allows you to enter * commands from the > prompt. However, onward… Enter 1 The command changes the alphabet as well as the keyboard layout, but that should not be a problem for the USA. |
John WILLIAMS (8368) 493 posts |
Assuming that the boot-to-BASIC scheme involves a “*BASIC” command in an Obey script, putting the “* Keyboard USA” command just before that would have the desired effect without altering the CMOS settings. If you’re using the CMOS settings themselves to boot directly into BASIC, then pre-cofiguring the CMOS for US keyboard would be sensible, leading to loading the CMOS file doing both kbd and start-up language. You don’t specify the mechanism of your approach. |
Elozor Bruce (12160) 5 posts |
I am using *configure mode 7 and *configure language 22. |
Steve Pampling (1551) 8170 posts |
Slight error in the supplied info.
Play around with the options, when you have a set that work, then use *SaveCMOS to have that as the options at boot. |
Elozor Bruce (12160) 5 posts |
I’m totally new to RISC OS, so I don’t know a lot about it. |
John Rickman (71) 646 posts |
Welcome aboard – I hope you are younger than most of us here.
just key the command followed by a filename.
The file cmos_saved will be saved in the current working directory – the root of your harddrive if you have not changed it. |
Steve Pampling (1551) 8170 posts |
That was why I pointed you at the command line help h. is short for
|
Elozor Bruce (12160) 5 posts |
Definitely! |
Elozor Bruce (12160) 5 posts |
I am not sure how *savecmos is supposed to help, |
Paul Sprangers (346) 524 posts |
That should save the file to the current directory. Open a Task window, or press F12 to leave the desktop, and type If you specify a special directory, you should type the full path, as found on the title bar if you open that directory in the filer. For example, in my setup that would be: |
Steve Pampling (1551) 8170 posts |
Do you mean you aren’t getting the same settings after a power cycle? The thing to note is that although it says SaveCMOS it isn’t actually saving the settings into a battery backed up CMOS chip – it’s exporting them to a file. If you type *CAT at the command prompt, it will “catalogue” (list) the files in your current directory and one will be the “cmos_saved” file. That’s because the command To reload those settings after another change you want to revert, or a power loss, you need to use the matching command Back in the days when a floppy disc was more than a spinal medical condition, we could save the settings out to a floppy so we could do a quicker recovery from problems like some naff program changing the settings and saving them as something we didn’t normally want. Games programmers topped the list for that.
Are you sure? list the files in those locations (use |
John WILLIAMS (8368) 493 posts |
In the olden days, the machine configuration was stored in non-volatile memory called CMOS. With the advent of the RPi, this was no longer possible. An initial fudge tacked it onto the end of the ROM image, but now it is saved as a separate file in the !Boot:Loader directory (the bit you shouldn’t tamper with) as a file called, unsurprisingly, CMOS. This is reloaded during boot. The idea is that, once you have the m/c how you want it, you save its configuration state by saving the CMOS file. The flaws in this are that this should happen automagically on shutdown anyway, and by saving a CMOS file separately you have to substitute it for the one in the bit you shouldn’t really mess with. Perhaps it isn’t working because you haven’t been shutting down properly – which of course you can’t really do from the BASIC prompt! So the idea is that you have to save a CMOS file yourself and use it to replace the existing one. An easier approach in my opinion would be to use an obeyfile in Boot:Tasks to do all the work for you in setting-up what you want from the Desktop, then auto-switching to BASIC. Noting Steve’s correction on the Country command, putting all your required OS commands in a simple Obeyfile and making the last line “BASIC” to switch to that language would get you to where you want without involving explicitly saving CMOS settings or messing where you shouldn’t. In fact, doing your keyboard and country settings at the command prompt (F12) from the desktop then shutting down properly from the “switcher” iconbar icon menu (extreme right) should make these settings stick anyway, so adding your Obeyfile to “Tasks” saying just “BASIC” as a command should work. Oh, you’ll still need to switch to MODE 7! Of course, I may be wrong, as we all reserve the right to be! |
Rick Murray (539) 13840 posts |
I’m assuming you are using a Raspberry Pi here. If not, tell us what you are using… It needs a line in the config.txt file just before loading the ROM to ensure the CMOS information is in memory so the system can see it Does the $.!Boot.Loader.CONFIG/TXT file refer to it at all? Update (at my Pi now): The last three lines of the CONFIG file should be something like: ramfsfile=CMOS ramfsaddr=0x508000 kernel=RISCOS.IMG There should be a CMOS RAM file (created using the aforementioned How did you come to set up your RISC OS machine, as I’m a little bit surprised that one of the available SD card images (either here or Direct) doesn’t have this already set up. Therefore:
If all four conditions are met, you should be good to go. |
Alan Williams (2601) 88 posts |
He might have used the PICO (not to be confused with rp2040) download that was here a while ago. I tried it at the time and had many of the same problems. It didn’t use a RISC OS file system at all and just booted to BASIC in FAT32FS. There was a updated version of BASICEdit (*armbe) kicking around at the time too which had more screen modes and went really well with this on a PI but I remember the file system must have been a bit dodgy because bits of files would get left off when you save. I was never sure if this was a bug or just a buffer flushing problem but the whole thing, while a neat idea was practically unusable. |
David Pitt (9872) 363 posts |
After a very brief session I came to the conclusion that the keyboard configuration is read at some point as !Boot runs. Booting directly into BASIC, which does not run !Boot, means that the setting is never read and the keyboard is stuck at UK. Persuade !Boot to go to BASIC rather than the Desktop and the keyboard is indeed set to USA. (That was a test here and not a realistic suggestion.) |