Hello all
Phil Hanson (2558) 75 posts |
New to forums, rasp pi, and Risc OS. I’m amazed how fast this OS is on the Pi. Linux felt so bogged down for me. Looking forward to messing around a lot more. So hello to you all. |
Chris Evans (457) 1614 posts |
Welcome to the wonderful world of RISC OS. It won’t cure all known diseases but it is fun:-) |
Phil Hanson (2558) 75 posts |
Few questions though: Best resource for learning to write for this OS? I’m looking at: Couple things. It looks like in Basic I need to hit Shift + F2 to get a "? Also when I’m going through the primer listed above, I get to: MODE 12 But I don’t see the circle. Any help would be appreciated. |
Martin Avison (27) 1494 posts |
Hi Phil and welcome.
Why do you say that? Double quotes are Shift +2 on the keyboard, not F2. How are you entering and running the small program? |
Rick Murray (539) 13840 posts |
You should press F12 for a command line, or Ctrl-F12 for a TaskWindow. The difference is that a TaskWindow can multitask but it won’t handle graphics. If you press F12 (alone) then enter:
then you’ll see it. Use MODE 27 instead of MODE 12. The difference is that MODE 12 is for old style television-type displays (the sort we used back in 1987 because you’d gasp at the price of multisync monitors). While MODE 12 will work, everything will look squished. MODE 27 is a “VGA style mode” so will draw correctly on modern hardware (your circle will be a circle, not a deflated pancake). To exit BASIC and go back to the Desktop, type in |
Rick Murray (539) 13840 posts |
Have you installed from the Noobs package or one of the SD card images? If so, you should find some useful introductory material in $.Documents.Books – a beginner’s guide to Wimp (desktop) programming, and a First Steps in Programming. Ignore the PRMs for the moment. It is pretty comprehensive information on the entire API (as it was then, refer to this site for updates) but it will frighten you if you delve in too early. There’s like five volumes of 600-odd pages each. Just know they’re there if you need them… ;-) |
John Sandgrounder (1650) 574 posts |
Hi Phil, Welcome to RISCOS. One point which might help is that some (much) of the BBC Basic docmentation was written 20+ years ago (in the days of the BBC Micro, which did not have a desktop) The Raspberry Pi now starts up wth the RISCOS desktop. If you want to run BBC Basic on its own with the commands you are trying then you neeed to get out of the desktop. Press the F12 key and then type BASIC at the * prompt which appears at the bottom of the screen. Your Mode and Circle Fill will then work as described. To return to the desktop type *QUIT followed by two touches of the Enter Key EDIT: Sorry Rick, Your answer was not there when I started typing. |
Rick Murray (539) 13840 posts |
Ah, I see. I thought with the F-key and not being able to see the circle, he meant F12. He’s probably used to an American layout keyboard with ’ and " on a key down by the Enter key. Phil – if this is what your keyboard is like, try John – that’s okay. ;-) |
Phil Hanson (2558) 75 posts |
Hmm I’m guessing the tutorials are for a old RISC compatible computer that perhaps had a different Keyboard layout? |
Phil Hanson (2558) 75 posts |
Wow, as I was trying to figure it out by myself, a lot got updated. I was using Shift+F12, I didn’t know F12 existed. I’d rather use a text editor though. Currently the Pi is far from my modem so no Internet. Will Edit or StrongEd work? Yes I’m on a Yankee keyboard. Trying *Keyboard USA from CL does nothing. However changing in !Boot got things back to my filthy American ways. I just downloaded the RiscOS .iso and burned to the SDCard on my PC. |
Phil Hanson (2558) 75 posts |
Yup, MODE 27 in CL gives me a wonderful, pixelated circle, heh. Nice. |
Chris Mahoney (1684) 2165 posts |
Another option is “MODE MODE”, which will make it stay in your native resolution. |
Rick Murray (539) 13840 posts |
Ctrl-F12. Shift-F12 just brings the iconbar to the front (and pushes it away again).
We don’t tend to advertise it much these days, as all multitasking ceases when out of the Desktop environment.
;-) That’s the only reason somebody would say “the hell are the quotes doing over there?!”.
Strange. It swapped the layout immediately for me. But never mind, you got it sorted.
Oh, yeah, if you want anti-aliasing (“smoothed” in PC parlance) you’ll need to write it yourself (or use DrawFile to render Draw objects, which is probably about as difficult). The graphics primitives are probably a port of something originally written for the BBC Master circa 1986 (maybe earlier). |
Phil Hanson (2558) 75 posts |
Cool, I’m having a blast with this OS so far. |
Phil Hanson (2558) 75 posts |
What is the Copy key? |
Chris Johnson (125) 825 posts |
Now labelled ‘End’ on modern keyboards. The ‘Copy’ key really is a hangover from the BBC micro. |
Holger Palmroth (487) 115 posts |
It’s the End key on standard keyboards. |
Chris Johnson (125) 825 posts |
Just to add – if I remember that far back – on the BBC micro the ‘Copy’ key on its keyboard did just that when editing at the command line. On any modern keyboard/machine it will not behave like this. |
Rick Murray (539) 13840 posts |
DELETE deletes |
Phil Hanson (2558) 75 posts |
Yup End does it. Heh sorry guys for the questions. |
Phil Hanson (2558) 75 posts |
So I’ve never programmed before. Seems like most people here do. Is there a forum I can ask questions in regarding that topic? Bear in mind they will be very simple ones and hopefully progress. |
Chris Evans (457) 1614 posts |
Posting in this ‘General’ forum group should be fine. |
Gulli (1646) 42 posts |
There’s also the programming forum at http://www.iconbar.com, http://iconbar.com/forums/viewforum.php?forum=programming |
GavinWraith (26) 1563 posts |
In that case, congratulations on having a shot at it. I think it is important to understand that writing and running programs is only possible after some preliminary understanding about how to get going. How steep the curve for those preliminaries rather depends on the programming language. C, for example, is notoriously difficult in this respect, and for all its advantages I would not recommend it for beginners. The great selling point for BASIC has always been that is easy to get started with. That said, BASIC was devised before the days of graphical user interfaces and a good deal of the tutorial material on it is out of date. If you have the StrongED text editor, and you know how to create, edit and save textfiles, then I would recommend trying your hand at scripting. This involves writing a program (the script), usually to manipulate text, saving it as a textfile, then dragging the icon of that textfile onto the green down-arrow of the StrongED window containing the text you want to manipulate. This is a good way to experiment because you can see immediately what your script does; it is also easier than the old commandline approach to running programs. In this approach you deal with the pair, program+text, rather than the program standing by itself. If you download http://www.wra1th.plus.com/lua/zip/rlua570_full.zip, unzip it and put !lua in !Boot.Resources then you are ready to start. |
Steve Fryatt (216) 2105 posts |
While true, we’re talking about RISC OS here. If the aim is to write software for the Wimp, BBC BASIC isn’t really a good idea because it’s very difficult to work with (BBC BASIC plus the RISC OS API is pretty bad generally). Most of the Wimp’s API involves poking data into blocks of memory, and BASIC’s lack of named structures or dynamic memory allocation1 are a real issue for that. C may be nasty for newcomers, but coupled with OSLib it’s probably the most approachable way to work with RISC OS if you don’t want to stick within the confines of what native BBC BASIC can do. 1 If you’re targetting RISC OS 5 only, then the memory allocation isn’t an issue as |