New to RISC OS? Read this!


84 posts   Page 3 of 4   1, 2, 3, 4
by stylx » Tue Nov 06, 2012 7:49 pm
thanks Tank I give it a look
Posts: 30
Joined: Thu Oct 25, 2012 10:06 pm
by pygmy_giant » Tue Nov 06, 2012 8:39 pm
So to set GPIO 17 to read and print its value would I:

SYS "GPIO_Mode" ,17 ,0
PRINT SYS "GPIO_ReadData" ,17

?
Posts: 1569
Joined: Sun Mar 04, 2012 12:49 am
by tank » Tue Nov 06, 2012 8:43 pm
pygmy_giant wrote:So to set GPIO 17 to read and print its value would I:

SYS "GPIO_Mode" ,17 ,0
PRINT SYS "GPIO_ReadData" ,17

?


SYS "GPIO_WriteMode" ,17,0
SYS "GPIO_ReadData" ,17 TO a%
PRINT a%

You need to get the value from the SWI into a variable and then display the variable.
SWI's just give you a simple way of sending commands to various parts of the OS/hardware.
They take the values you give them (EG the 17 above) and put them into the processors registers r0,r1,r2 ETC.
Then when the SWI has done its thing, the register values are returned to variables you add after the TO in the same order r0,r1 ETC.
Some SWI's need lots of things telling to them, others need nothing.
Some SWI's return lots of things, others nothing, depending what they do.
Last edited by tank on Tue Nov 06, 2012 9:05 pm, edited 1 time in total.
Posts: 57
Joined: Thu Dec 15, 2011 5:51 pm
by stylx » Tue Nov 06, 2012 8:59 pm
tank can I use a single call to the GPIO module if I wish to use pulse width modulation?
Posts: 30
Joined: Thu Oct 25, 2012 10:06 pm
by pygmy_giant » Tue Nov 06, 2012 9:01 pm
Thanks.

SYS "GPIO_Mode" ,17,0

generates

'SWI name not known' on my machine

?!
Posts: 1569
Joined: Sun Mar 04, 2012 12:49 am
by tank » Tue Nov 06, 2012 9:03 pm
stylx wrote:tank can I use a single call to the GPIO module if I wish to use pulse width modulation?


No sorry, it only provides on/off SWI's.
You could program an on/off loop with variable delays between the on/off/on states though.
Posts: 57
Joined: Thu Dec 15, 2011 5:51 pm
by tank » Tue Nov 06, 2012 9:04 pm
pygmy_giant wrote:Thanks.

SYS "GPIO_Mode" ,17,0

generates

'SWI name not known' on my machine

?!

Sorry, dont know my own software.
SYS "GPIO_WriteMode" ,17,0

I'll edit the original post!!
Posts: 57
Joined: Thu Dec 15, 2011 5:51 pm
by pygmy_giant » Tue Nov 06, 2012 9:23 pm
Thanks - I forgive you.

You have helped me successfully test my robot's wheel encoders :D
Posts: 1569
Joined: Sun Mar 04, 2012 12:49 am
by PeterT » Thu Nov 08, 2012 9:52 am
Their are two operating systems that I remember enjoying using in the past, one was Apollo's Aegis and the other was RISC OS.

Last time I was using an Archimedes, the big argument was that it was not 'true' multitasking. It is interesting that one the arguments for RISC OS are that it uses cooperative multitasking.

RISC OS used to come with a pretty good 'C' compiler. I never used BASIC but wrote several programmes using C.

The power of Linux is that it comes with a whole range of components that can be combined in new ways using scripting, so it is quite easy to build quite complex applications using any one of a number of scripting languages. I use Javascript, PHP and Bash predominantly.
RPi running Rasbian, SheevaPlug and DreamPlug both running Debian Wheezy, 2 netbooks both running Debian Wheezy with Gnome 3.
Posts: 11
Joined: Wed Nov 07, 2012 4:47 pm
Location: Hampshire, U.K.
by microbitsuk » Fri Nov 09, 2012 9:51 am
Get nut Pi its all you will need with the addition of a free down load of fireworks.
Posts: 33
Joined: Fri Sep 09, 2011 10:04 am
Location: Perth WA
by Burngate » Sat Nov 10, 2012 6:25 pm
Not sure this is the right place, or should I have started a new thread? To late now, I'm putting it here!

Ok, it's working well - I knew it would - thanks for all the hard work!

One question:
I set up the network, and I can see all my other ShareFS drives.
I set up the RamDisc, and I can see where to share it, and Lo! I can see that on my RiscPC, etc.
But I can't share anything else! There's no menu item for sharing on any folder.
I think I saw it one time - but that was with the monitor over the other side of the room, where I couldn't really see what I was doing. now my monitor's where I can see it, it's gone!

I've done the quick 'n dirty by putting an obey file in choices.boot.predesk, and it works fine.
But it'd be nice to know what I'm doing wrong.
Wyszkowski's Second Law: Anything can be made to work if you fiddle with it long enough.
Brain surgery is easier than psychoanalysis
User avatar
Posts: 2768
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK
by RaTTuS » Mon Nov 12, 2012 4:54 pm
can we make it use the full size of the screen

i.e.
1920x1200
or even in portrait mode
1200x1920
1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX - Prosliver FTW
"That's not right, the badgers have moved the goalposts."
User avatar
Posts: 5003
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
by robopsi » Tue Nov 13, 2012 11:40 am
:idea: Now we just need someone to put the TURTLE hardware on eBay and we can get back to drawing on the floor, those were the days :ugeek:
Posts: 1
Joined: Tue Nov 13, 2012 11:37 am
by jiminhursley » Tue Nov 13, 2012 9:44 pm
Hi. I'm new to Pi and very new to RISCOS. I have Pi running Rasbian, which I started by using the preloaded SD card from Maplin. I have upgraded the software over the web, and it is running fine. Last week I downloaded RISCOS, using the instructions I found on the Pi site, and I created an SD card. I am getting some results, but not all that I expected. Any idea what I might be doing wrong?

So far:

1. From Win 7 laptop: downloaded RISCOS zip file and unzipped it to about 2GB file.
2. Downloaded Win32diskimager .exe and ran it, identifying unzipped filed as input and G: (SD card) as output.
3. Finished up with six files on zip card:
BOOTCODE.BIN
CONFIG
FIXUP.DAT
LICENCE.BROADCOM
RISCOS
START.ELF
4. Loaded SD card into slot on RASPI and powered up.
5. There was a flash of splash screen in colour, then got a panel saying: Message from desktop - Machine startup has not completed successfully: 'the disk drive is empty' - CANCEL/RETRY
6. RETRY cycles back through 5.
7. CANCEL brings up the RISCOS desktop, with four icons in the bar ar the bottom: SD card, Apps, Monitor, Raspberry symbol.
8. SD card symbol is labelled 0 and clicking tells you there's no data.
9. Apps symbol shows six application symbols, and you can invoke them: draw, text, etc.
10. Monitor symbol allows you to resize display.
11. Raspberry symbol presents: task list, dynamic areas list, system memory allocation.
12. After that I have no other tools or applications visible, and no controls that allow me to do anything, even shut down. I have to disconnect power supply to shut down.

So, I have installed and powered up a subset of RISCOS, but don't know how to make it usable. Any suggestions?

The only other information I can give you is that I have been using a large (16GB) SD card.

Thanks
Posts: 4
Joined: Tue Nov 13, 2012 1:41 pm
by Tide » Tue Nov 13, 2012 11:43 pm
Sounds like your SD card is the problem:

theom wrote:'Disk drive is empty' means that the RISC OS partition on your SD card can't be detected. This either means you didn't write the SD card right, or RISC OS doesn't like your SD card, or you have power supply problems.

To see if RISC OS can at least find your SD card, press F12 and type
*SDIODevices

and see if anything is listed.
If your SD card is OK but badly written, it should show up. If RISC OS can't talk to it at all, it'll report no cards


Discussion here
Posts: 92
Joined: Wed Sep 14, 2011 11:21 am
by jiminhursley » Wed Nov 14, 2012 11:52 am
Thanks Theom. Also, thanks to UKScone on the Error on Boot thread. Although I was getting a partial boot, it clearly was mostly a failure. UKScone's pointer to the www.sdcard.org/downloads/formatter got me the utility to fix the SD card. Only when I ran that did I realise that the card appeared to have only 32 MB, not the 16GB I paid for! The formatter fixed that when I had selected FULL format. I downloaded RISCOS onto the card, as recommended, and it now boots fully (though I still have to play with it to find out all the stuff I've got). But there are no error messages, and there seems to be lots to play with.

Thanks all! :D
Posts: 4
Joined: Tue Nov 13, 2012 1:41 pm
by Joe Schmoe » Wed Nov 14, 2012 1:44 pm
Only when I ran that did I realise that the card appeared to have only 32 MB, not the 16GB I paid for! The formatter fixed that when I had selected FULL format.


It should be pointed out, once again, that this whole "It shrunk my card! It's only 32M!" idea is completely bogus. It has nothing to do with anything in the Linux world or the Linux side of things. It is merely an artifact of Windows. Repeat: It has nothing to do with anything relevant to the Pi; it is only when you load the SD card onto a machine running that other OS that you see this effect.

A couple of other points related to this:
1) It is not necessary to reformat the card before re-writing the image to it. I've never had to do that, and I've had my share of "bad image writes". It may be necessary in some pathological cases, but it is certainly not necessary in the general case.
2) It does seem pretty common - this basic problem when writing the RISCOS image to the card. I wonder why... I also wish the error message were a bit clearer - and made it clear that this is a fatal error - it is not just a spurious thing that you can click past and get on with your work.
Never answer the question you are asked. Rather, answer the question you wish you had been asked.

- Robert S. McNamara - quoted in "Fog of War" -
Posts: 2619
Joined: Sun Jan 15, 2012 1:11 pm
by jiminhursley » Wed Nov 14, 2012 4:43 pm
Hey Joe. (I am old enough to want to sing that as I type). I agree: Linux is in no way implicated. It all happened under Windows. I don't know why, but it refused to see the whole card.
Cheers, Jim
Posts: 4
Joined: Tue Nov 13, 2012 1:41 pm
by theom » Mon Nov 19, 2012 12:20 am
Actually, you can use RISC OS without an SD card - all you need is riscos.img from the FAT partition to get you started. It's a bit like Safe Mode in Windows in that it's a bit limited, but it's generally more usable. It also boots very fast because it doesn't need to interact with the SD at all beyond loading the initial 2.2MB ROM image. You can configure your machine to not boot off SD at all (*Configure NoBoot) if you want to do things without loading the startup stuff - it'll still be useful.

So it's a bit awkward to declare this a fatal error, because it isn't. However I agree that it's not what a first-time RISC OS user expects.
Posts: 71
Joined: Wed Jun 13, 2012 2:53 pm
by Joe Schmoe » Mon Nov 19, 2012 1:29 am
Heh heh...
Never answer the question you are asked. Rather, answer the question you wish you had been asked.

- Robert S. McNamara - quoted in "Fog of War" -
Posts: 2619
Joined: Sun Jan 15, 2012 1:11 pm
by newuser3000 » Fri Jan 04, 2013 2:14 am
very new to RISCOS and have 2 questions

1. how do you shut down? I just pulled the plug which seemed to work fine, but I imagine that's not a good idea

2.is there a way to zoom in on desktop? i can barely read application names etc.

thanks
Posts: 20
Joined: Mon Dec 31, 2012 6:19 pm
by svrsig » Fri Jan 04, 2013 12:23 pm
To shut down either press CTRL-SHIFT-F12 or Select 'Shutdown' from the switcher menu (the menu obtained by pressing 'MENU' (the central mouse button) over the task manager icon (the raspberry at the right of the icon bar).

Use a different screen resolution to make text bigger.
Posts: 124
Joined: Thu Nov 03, 2011 9:45 am
by newuser3000 » Fri Jan 04, 2013 2:41 pm
how do I change screen resolution?
Posts: 20
Joined: Mon Dec 31, 2012 6:19 pm
by Burngate » Fri Jan 04, 2013 3:44 pm
newuser3000 wrote:how do I change screen resolution?

http://www.raspberrypi.org/phpBB3/viewtopic.php?f=55&t=25739
Wyszkowski's Second Law: Anything can be made to work if you fiddle with it long enough.
Brain surgery is easier than psychoanalysis
User avatar
Posts: 2768
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK
by AquaMan » Thu Feb 21, 2013 5:16 pm
jiminhursley wrote:5. There was a flash of splash screen in colour, then got a panel saying: Message from desktop - Machine startup has not completed successfully: 'the disk drive is empty' - CANCEL/RETRY


Has anyone been able to solve this problem?

I've tried multiple SD cards of varying size. I've tried writing them in different ways. I've varied the power supply.

Is it the Pi? I really don't want to have to order a new one just to see the same problem.
Posts: 12
Joined: Wed Dec 19, 2012 12:01 am