New to RISC OS? Read this!


84 posts   Page 2 of 4   1, 2, 3, 4
by MegaGumbo » Mon Nov 05, 2012 8:45 pm
Call me cynical but I suspect that what you lot like most about RiscOS is simply that it's RiscOS! You were all using it in the 80s so it's great for you to see it back!


Even better: a lot of us couldn't afford one of those cool Archimedes machines back then, so finally here's our $25 chance to get a taste of what we missed. I've never used RiscOS until tonight and although I'm still a bit lost and it's very different from other OSes, memories of AmigaOS and TOS come to my mind. One very cool thing is the BASIC interpreter and the single-user CLI.

Will it be possible to control the GPIO via BASIC? I guess not, but that would be a cool feature.
Posts: 85
Joined: Mon Feb 13, 2012 4:45 pm
by pygmy_giant » Mon Nov 05, 2012 8:50 pm
I think so - you need to call SWIs (software interrupts) from within BASIC

these access the GPIO via RISCOS modules

People have already reported success using I2C this way - I expect we'll see tutorials on this in the near future
Posts: 1569
Joined: Sun Mar 04, 2012 12:49 am
by JakeGrey » Mon Nov 05, 2012 9:18 pm
Not only does it support BBC BASIC, but RiscOS is likely to be the first RPi operating system to get a working port of Oolite. (Discussion on their forums here.) The RPi is now officially on the way to being a proper BBC Micro 2.0.

Allow me to be the first to say, "Yeeehaaaw!"
Posts: 21
Joined: Sat Feb 18, 2012 8:03 pm
by pygmy_giant » Mon Nov 05, 2012 9:49 pm
Posts: 1569
Joined: Sun Mar 04, 2012 12:49 am
by wallarug » Tue Nov 06, 2012 7:32 am
Had a play with RISC OS and it is a pretty fast OS compared to others on the raspberry pi.
It will be much better in a few weeks when some tutorials have been written that enable easy access to GPIOs and Python (so that I can port all my little programs).

I have already had problems with the wireless mouse drivers (they don't seem to work) but all else seems to be good.

Does anyone know the status of wireless support using an edimax on RISC? I have not tried yet.

Also, how would you overclock the Raspberry Pi using RISC? It would be pretty cool if I could run the core at 1000MHz with some powerful RAM speed as well.

EDIT:
I think RISC OS has picked up the full 512mb ram on the raspberry pi...how do I confirm this? Is it in the tasks menu bar...That says that I have 426128K free space, leading me to think that it has detected full memory.
RPi Hardware Guide

App Store: https://itunes.apple.com/us/app/rpi-hardware-guide/id723108328?ls=1&mt=8
Play Store: https://play.google.com/store/apps/details?id=org.cmdenterprises.rpihardwareguide

http://www.youtube.com/user/CMDenterprises
User avatar
Posts: 454
Joined: Mon May 14, 2012 8:21 am
by grannyg » Tue Nov 06, 2012 9:40 am
wallarug wrote:Also, how would you overclock the Raspberry Pi using RISC? It would be pretty cool if I could run the core at 1000MHz with some powerful RAM speed as well.


You can overclock the Raspberry on RISC OS by changing the config.txt file. To access it hold down shift and double click on the !Boot folder. Then double click on the 'Loader' file. Just reboot to activate the changes.

You can add these lines to config.txt. Start with lower values otherwise you might not be able to boot. You can access the boot partition on a PC it you get problems. I think the defaults are 700, 400 and 250.

arm_freq=950
sdram_freq=550
core_freq=500
force_turbo=1
Posts: 20
Joined: Fri Nov 02, 2012 11:55 am
by itimpi » Tue Nov 06, 2012 10:46 am
wallarug wrote:Does anyone know the status of wireless support using an edimax on RISC? I have not tried yet.

I am not a RiscOS expert, but other messages suggest that RiscOS has no support for WiFi, and that if you want an Ethernet connection it needs to be wired.

I would like to be wrong on this :) If not, maybe the Pi will be the impetus to develop such support?
Posts: 1035
Joined: Sun Sep 25, 2011 11:44 am
Location: Potters Bar, United Kingdom
by NigelJK » Tue Nov 06, 2012 11:03 am
You are correct in that the USB stack does not (yet) support WiFi. Many are suggesting that you can utilise an Ethernet/WiFi adapter as the Ethernet port is supported under RiscOS.
Posts: 64
Joined: Wed Sep 05, 2012 1:44 pm
by evil twin » Tue Nov 06, 2012 12:09 pm
I've been wondering if there's a website with more detailed information on the OS, possibly with a dedicated forum (I couldn't find any) - I'd like to know if it's any use if I want to use other languages besides English, that is stuff like:
Unicode?
Proper keyboard layouts and input methods for other languages (Czech, Japanese)?
Can I use TTF or OTF fonts? Is there some kind of font management?
(I don't need - or want for that matter - the GUI interface localized, just to be able to display and type in other languages)
Also, does the PHP include a database, GD etc?
User avatar
Posts: 14
Joined: Mon Oct 10, 2011 1:20 am
by theom » Tue Nov 06, 2012 12:16 pm
Yes - see
http://www.riscosopen.org/

There's Unicode support - I think there are some Unicode fonts on the Pi - though it's variable as to which apps support it. NetSurf does, for example. There's a Japanese IME. I'm not sure what the position is with a Czech one (there's a third-party keyboard driver for an old OS - not sure if this is integrated now).

You can convert TTF and OTF fonts with a tool called TTF2F. You can install new fonts using the Configure tool.

Not sure on the situation about PHP...
Posts: 71
Joined: Wed Jun 13, 2012 2:53 pm
by stylx » Tue Nov 06, 2012 12:18 pm
Using Tanks module. if download tanks module , unzip it and then load the module with
*RMLoad GPIO
Because I only using a floppy cable and and three Leds I was prompted to use GPIO pins 7,10,22 for ease of use.Plug you leds into gpio pin and then run tanks !GPIOConfi program then hightlight the GPIO pins until they turn green then to test switch then on and the leds should come to life, now switch then off again but leave the box so it still as a green square around it then enter the program below.

REM > TEST
ON ERROR REPORT : PRINT " at line ";ERL:END
DIM light%(4)
FOR array%=0 TO 4
READ light%(array%)
DATA 7,10,22,10,7
NEXT
:
FOR x%=0 TO 10000
FOR y%=0 TO 4
LET led%= light%(y%)
PRINT led%
PROCon (led%)
PROCoff (led%)
NEXT
NEXT
:
END
:
DEFPROC (led%)
FOR x%= 0 TO 2000
SYS "GPIO_WriteData",led%,-1
NEXT
ENDPROC
:
DEFPROCoff (led%)
FOR x%= 0 to 2000
SYS "GPIO_WriteData",led%,0
NEXT
ENDPROC

run this program and the leds should flash in sequence, by changing the order in the data statement you change the order led flash.
I know this is a bit rudementary and you have to use tanks module TO initilise the leds to begin with but it works, I try to get Tank to give me a 101 on the module ,but that a no go. I looking at tank module and hope to work out how to initialise GPIO pins from Basic and maybe then I could do a lot more. But somthing tells me I got to learn machine code to make the GPIO pin do what I want then to
Posts: 30
Joined: Thu Oct 25, 2012 10:06 pm
by evil twin » Tue Nov 06, 2012 12:20 pm
theom wrote:Yes - see
http://www.riscosopen.org/

There's Unicode support - I think there are some Unicode fonts on the Pi - though it's variable as to which apps support it. NetSurf does, for example. There's a Japanese IME. I'm not sure what the position is with a Czech one (there's a third-party keyboard driver for an old OS - not sure if this is integrated now).

You can convert TTF and OTF fonts with a tool called TTF2F. You can install new fonts using the Configure tool.

Not sure on the situation about PHP...

Thanks - future looks a bit brighter now (^__^ )
User avatar
Posts: 14
Joined: Mon Oct 10, 2011 1:20 am
by stylx » Tue Nov 06, 2012 1:12 pm
Sorry I took so long but here an update
change.
DEFPROCon (led%)
FOR x%=0 TO 2000
SYS "GPIO_WriteMode",led%,-1
SYS "GPIO_WriteData",led%,-1
NEXT
ENDPROC
:
DEFPROCoff
FOR x%=0 TO 2000
SYS "GPIO_WriteMode",led%,0
SYS "GPIO_WriteData",led%,0
NEXT
ENDPROC

using this update you don't have to Use !GPIOConfi to initalise the leds . Now I just got to get a few switchs and may be I can program a very simple simon game
Posts: 30
Joined: Thu Oct 25, 2012 10:06 pm
by stylx » Tue Nov 06, 2012 1:15 pm
sorry Typo
DEFPROCoff (led%)

Not sure but there may be a problem with the wiki page on the GPIO pin lay out gpio pin 23 and 22 appear to be switch ie pin 23 is 22 and pin 22 is 23 !
Posts: 30
Joined: Thu Oct 25, 2012 10:06 pm
by pygmy_giant » Tue Nov 06, 2012 1:34 pm
I will definately try this.

Think we'll have a wait for a Python port.

Anyone got GCC working? I had a try but came a cropper.

To my mind Pyton and C(++) support are ESSENTIAL to any new OS on the PI for obvious reasons.
Posts: 1569
Joined: Sun Mar 04, 2012 12:49 am
by stylx » Tue Nov 06, 2012 1:50 pm
sorry another typo in PROCon procedure
SYS "GPIO_WriteMode",led%,1
Posts: 30
Joined: Thu Oct 25, 2012 10:06 pm
by NigelJK » Tue Nov 06, 2012 2:36 pm
If the ethos is to introduce CS to a new generation, then surely what's essential is that you have a language that allows easy access to the machine? BBCBasic more than fits the bill here, and is actually what most (UK) self taught programmers of the era learn't on at the time.
If you wanted to expose an OO language you may have a problem, but these are available on the other flavours of Distro's with a nice comparison on what 'bloat ware' does for you.
Posts: 64
Joined: Wed Sep 05, 2012 1:44 pm
by stylx » Tue Nov 06, 2012 2:47 pm
Does any one known if I need to put a resistor in line with a switch, I don't want to blow my pi up, it took nearly 19 weeks for my first one to arrive. and if so what value ?
Posts: 30
Joined: Thu Oct 25, 2012 10:06 pm
by SEDev » Tue Nov 06, 2012 3:05 pm
pygmy_giant wrote:Think we'll have a wait for a Python port.


There are two Python ports for RISC OS.

http://www.cgransden.co.uk/python27.zip

http://web.archive.org/web/200712230619 ... .acorn.de/

The first is a recent port and should be OK on the RPi. The second is an older, Python 2.4, port. It runs on the Iyonix so will probably run on the RPi in ARMv5 compatability mode.

The 2.4 port comes with a number of tools for interacting with the RISC OS GUI. The newer port is quite bare ATM but that may change in future releases.
Posts: 26
Joined: Thu Aug 02, 2012 10:55 pm
by pygmy_giant » Tue Nov 06, 2012 5:32 pm
Worth someone trying on a real Pi in real life reality.

I'm investigating GCC as I don't know python.
Posts: 1569
Joined: Sun Mar 04, 2012 12:49 am
by MegaGumbo » Tue Nov 06, 2012 5:55 pm
stylx wrote:sorry Typo
DEFPROCoff (led%)

Not sure but there may be a problem with the wiki page on the GPIO pin lay out gpio pin 23 and 22 appear to be switch ie pin 23 is 22 and pin 22 is 23 !


I think they changed the pin layout with the revision 2 Rpi models. Thank you very much for your little introduction to RiscOS and GPIO, I have just understood how to use the RMLoad command and figured out how to address the module file in the directory I placed it in (once you get it, it's easy). The !PiLed example works now, but will the module be present after a reboot?
Posts: 85
Joined: Mon Feb 13, 2012 4:45 pm
by tank » Tue Nov 06, 2012 7:09 pm
MegaGumbo wrote:The !PiLed example works now, but will the module be present after a reboot?


No, you need to load the module after every reset/boot.
This can be automated though.
If you shift double click on !Boot, double click on Choices, double click on Boot, double click on PreDesk, then copy the GPIO module there. It will then load automatically.
OR
Double click !Boot, Click Boot, Click Run, drag the module to the open window, click Set, click Set.
There are other ways, but these are the simplest.

stylx wrote:Using Tanks module. if download tanks module , unzip it and then load the module with
*RMLoad GPIO
Because I only using a floppy cable and and three Leds I was prompted to use GPIO pins 7,10,22 for ease of use.Plug you leds into gpio pin and then run tanks !GPIOConfi program then hightlight the GPIO pins until they turn green then to test switch then on and the leds should come to life, now switch then off again but leave the box so it still as a green square around it then enter the program below.

REM > TEST
ON ERROR REPORT : PRINT " at line ";ERL:END
DIM light%(4)
FOR array%=0 TO 4
READ light%(array%)
DATA 7,10,22,10,7
NEXT
:
FOR x%=0 TO 10000
FOR y%=0 TO 4
LET led%= light%(y%)
PRINT led%
PROCon (led%)
PROCoff (led%)
NEXT
NEXT
:
END
:
DEFPROC (led%)
FOR x%= 0 TO 2000
SYS "GPIO_WriteData",led%,-1
NEXT
ENDPROC
:
DEFPROCoff (led%)
FOR x%= 0 to 2000
SYS "GPIO_WriteData",led%,0
NEXT
ENDPROC

run this program and the leds should flash in sequence, by changing the order in the data statement you change the order led flash.
I know this is a bit rudementary and you have to use tanks module TO initilise the leds to begin with but it works, I try to get Tank to give me a 101 on the module ,but that a no go. I looking at tank module and hope to work out how to initialise GPIO pins from Basic and maybe then I could do a lot more. But somthing tells me I got to learn machine code to make the GPIO pin do what I want then to


Sorry I didn't get to help earlier. Up till now most people using this module have been diehard RISC OS users, who already know quite a lot about how to use modules ETC.
One question I have about your BASIC program, why to you call the "GPIO_WriteData" 2000 times in your PROC's ?
If this is just to get a delay, call the SWI first, then do the delay loop. The SWI's set the output to the requested level until you request a change.
The same with your later change, The GPIO_Mode only needs to be called once at the start of the program as it sets the mode until you change it again.
Try this instead.

REM > TEST
ON ERROR REPORT : PRINT " at line ";ERL:END
DATA 7,10,22,10,7
:
REM set pins as output (1=output 0 =input)
FOR a%=1 TO 3
READ led%
SYS "GPIO_WriteMode",led%,1
NEXT
:
REM do this forever, press escape to get out
REPEAT
RESTORE
FOR y%=1 TO 5
READ led%
REM turn it on
SYS "GPIO_WriteData",led%,1
REM delay
FOR x%= 0 TO 2000
NEXT
REM turn it off
SYS "GPIO_WriteData",led%,0
REM add another delay here to have a gap before the next LED lights
NEXT
UNTIL FALSE
:
END

(Untested but SHOULD work!!!)
Last edited by tank on Tue Nov 06, 2012 7:12 pm, edited 1 time in total.
Posts: 57
Joined: Thu Dec 15, 2011 5:51 pm
by stylx » Tue Nov 06, 2012 7:09 pm
installing module so it starts after reboot
Sawdust said:

*help RMEsure
create an obey file using the above command and save it in
!Boot:choices.boot.tasks
and it will load the module at startup

Tank wrote
or just use configure and add it to Boot,Run

I tried sawdust method and it worked not sure about tanks method but it looks easier
Posts: 30
Joined: Thu Oct 25, 2012 10:06 pm
by stylx » Tue Nov 06, 2012 7:15 pm
sorry But I,m a ex spectrum programmer and don't know alot about riscos and No one has given me any info on how to use the module, so I used it only way I knew how, not pretty but it works perhaps Tank will give us all a 101 on how to use his module.I did ask before !
Posts: 30
Joined: Thu Oct 25, 2012 10:06 pm
by tank » Tue Nov 06, 2012 7:34 pm
stylx wrote:sorry But I,m a ex spectrum programmer and don't know alot about riscos and No one has given me any info on how to use the module, so I used it only way I knew how, not pretty but it works perhaps Tank will give us all a 101 on how to use his module. please....!


You seem to have got the principle of it,
Step 1, load the module if its not already loaded (to check press control CTRL + F12 to open a task window, type "GPIOMachine", press return. If it tells you which Raspberry Pi revision board you are running on, its loaded)
Step 2, In your program set any GPIO pins you want to use as either input or output with SYS "GPIO_Mode". 1=output 0=input. Other modes can be selected but are not used by the GPIO module.
Step 3, In your program control the output of GPIOs using SYS "GPIO_WriteData". 1=on 0=off.
Step 4, In your program read the inputs of the GPIOs using SYS"GPIO_ReadData". Returns 1=high 0=low.

That's it really for simple in/out stuff. The latest download does have a !Stronghelp manual in it that may be easier to read than the SWI'sDetal file in Docs.
If anyone really wants the source to the !GPIOConfig program (assembler), to see some of the other SWI's in action, then please email me (webmaster@tankstage.co.uk). Warning its nor pretty or probably not best practice....
Posts: 57
Joined: Thu Dec 15, 2011 5:51 pm