log in | register | forums
Show:
Go:
Forums
Username:

Password:

User accounts
Register new account
Forgot password
Forum stats
List of members
Search the forums

Advanced search
Recent discussions
- Will we see 5.30 released at Wakefield show? (News:)
- Prizes for Wakefield Show announced (News:)
- Heretic update from R-Comp (News:)
- Wakefield Show 2024 is next Saturday (News:)
- Git client updated to 0.07 (News:2)
- Archive Edition 27:1 reviewed (News:)
- Rougol April 2024 meeting on monday is Anniversary time (News:1)
- WROCC April 2024 meeting o...changes to our phone lines (News:1)
- April developer 'fireside' chat is on saturday night (News:)
- March 2024 News Summary (News:4)
Latest postings RSS Feeds
RSS 2.0 | 1.0 | 0.9
Atom 0.3
Misc RDF | CDF
 
View on Mastodon
@www.iconbar.com@rss-parrot.net
Site Search
 
Article archives
The Icon Bar: Programming: Getting started with RISC OS programming
 
  Getting started with RISC OS programming
  ColinWard (21:57 7/12/2010)
  filecore (23:03 7/12/2010)
    andypoole (23:27 7/12/2010)
    Phlamethrower (23:53 7/12/2010)
      monkeyson2 (08:42 8/12/2010)
        sa110_mk (09:45 8/12/2010)
          filecore (10:50 8/12/2010)
            Phlamethrower (11:54 8/12/2010)
              arawnsley (12:54 9/12/2010)
                nunfetishist (13:37 9/12/2010)
                  trevj (15:25 9/12/2010)
                    nunfetishist (17:04 9/12/2010)
                  swirlythingy (17:50 9/12/2010)
                    monkeyson2 (18:03 9/12/2010)
                      swirlythingy (19:54 9/12/2010)
                        monkeyson2 (20:58 9/12/2010)
                    nunfetishist (00:42 10/12/2010)
                trevj (16:28 5/1/2011)
          trevj (11:53 10/12/2010)
    Stoppers (16:27 11/12/2010)
    ColinWard (15:46 18/12/2010)
      castlevarich (13:53 1/2/2011)
  trevj (08:37 8/12/2010)
  castlevarich (14:10 28/1/2011)
    castlevarich (12:21 29/1/2011)
  Cauchy (22:16 17/3/2011)
 
Colin Ward Message #116020, posted by ColinWard at 21:57, 7/12/2010
Member
Posts: 16
Hi all.

I've just got myself a Beagleboard and am taking my first tentative steps into RISC OS programming, having never used RISC OS before. My friend has leant me an astonishingly comprehensive set of 9 programming books that tell me everything I could ever want to know about the internals of RISC OS but that's not much use when I haven't yet even figured out how to change directories on the command line. big smile

There seems to be information around but I'd appreciate a couple of posts that could serve as a "crash course in getting started" remembering that RISC OS is quite different to an old Amiga OS/UNIX/Windows hacker like me.

ie. Is the ctrl-f12 command prompt the one you use for running gcc or is there another one? What are it's basic commands for changing directories and that kind of stuff you do when programming? What's the best text editor/IDE to use?

I believe in figuring things out for myself but sometimes when starting new at something it pays to ask the experts!
  ^[ Log in to reply ]
 
Jason Togneri Message #116021, posted by filecore at 23:03, 7/12/2010, in reply to message #116020

Posts: 3867
I haven't yet even figured out how to change directories on the command line
I don't think you can.

EDIT: apparently I'm wrong - I was contradicted by my time-travelling earlier self. It's *dir <path> - the reason it didn't click was that nobody ever uses it. This should be a MASSIVE HINT to you that RISC OS' Supervisor isn't equivalent to any other mainstream OS' CLI.

Is the ctrl-f12 command prompt the one you use for running gcc or is there another one?
Ctrl-F12 is the same as F12, except in windowed mode. Command line access in RISC OS does not get you access to the OS, in the same way as on a *nix system or even in DOS. Rather, it gets you access to the Supervisor. There's a quite sharp distinction.

What are it's basic commands for changing directories and that kind of stuff you do when programming?
See the above answer. Also see this handy list of star commands.

What's the best text editor/IDE to use?
It is... a matter of debate. Look into Zap or StrongEd, but for heaven's sake, don't ever ask that publicly on a RISC OS forum!

[Edited by filecore at 23:28, 7/12/2010]
  ^[ Log in to reply ]
 
Andrew Poole Message #116022, posted by andypoole at 23:27, 7/12/2010, in reply to message #116021
andypoole
Mouse enthusiast
Web
Twitter

Posts: 5558
Zap or StrongEd!
But which is better? wink
  ^[ Log in to reply ]
 
Jeffrey Lee Message #116023, posted by Phlamethrower at 23:53, 7/12/2010, in reply to message #116021
PhlamethrowerHot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot stuff

Posts: 15100
It's *dir <path> - the reason it didn't click was that nobody ever uses it.
I use it shock

(Although I don't use it as often now that I can use the "Set current directory" option in the RISC OS 5 filer)

This should be a MASSIVE HINT to you that RISC OS' Supervisor isn't equivalent to any other mainstream OS' CLI.
The only thing I'll warn you about with respect to this is that RISC OS has a very (very!) loose definition of what a process is. Consequently, there's no per-process current directory, or per-process environment variables - they're all global.

What's the best text editor/IDE to use?
It is... a matter of debate. Look into Zap or StrongEd, but for heaven's sake, don't ever as that publicly on a RISC OS forum!
And it's worth pointing out that Zap and StrongED are just* text editors, not full-blown IDE's. The platform used to have one or two IDEs available, but I doubt any of them are still being maintained (i.e. you've got practically no chance of getting them working on the BeagleBoard due to the new(er) CPU architecture).

Actually they are slightly more than just text editors:

* They support 'throwback' for reporting error messages in an IDE-like manner where you just click on the error to go to the right line of the offending source file
* They also provide 'task window' implementations; i.e. they're responsible for the console window that pops up when you hit Ctrl-F12


I believe in figuring things out for myself but sometimes when starting new at something it pays to ask the experts!
Here are a couple of tips for figuring things out yourself:

* Using !Help might help you learn how to interact with the desktop
* The command line has a 'help' command which, as its name implies, gives help.
* 'help <command>' will also work for any commands which are provided by modules
* For help on command line programs, you'd usually pass them the unixy '-h' or '--help' option to get help.
* But don't forget to RTFM once in a while as well smile
* Also StrongHelp is a very useful hypertext-ish manual/documentation viewer. You can download StrongHelp and a bunch of (mainly programming-oriented) manuals from here.

Of course if your beagleboard is your only RISC OS machine then you can look forward to finding that lots of software fails to run because it hasn't been updated to be ARMv7-compatible yet. Including (I believe) the latest official versions of StrongED, Zap, and StrongHelp unhappy The ROOL wiki has a software compatability list, with links to patched versions of some of the programs.
  ^[ Log in to reply ]
 
Trevor Johnson Message #116024, posted by trevj at 08:37, 8/12/2010, in reply to message #116020
Member
Posts: 660
Well, I'm not a programmer but...

In addition to everything already said, you'll probably find a few old editions of further programming books on ebay. But such books (and the ones your friend's lent you) may not give up-to-date info on all the facilities of the current version of BASIC, etc.

There are also some programming articles on the Foundation RISCWorld site. And remember you can search on the comp.sys.acorn.programmer archives too.

PS If you're using *dir <path>, note that you can reset to the root directory by using *dir $.
  ^[ Log in to reply ]
 
Phil Mellor Message #116025, posted by monkeyson2 at 08:42, 8/12/2010, in reply to message #116023
monkeyson2Please don't let them make me be a monkey butler

Posts: 12380
http://www.tofla.iconbar.com/main.htm is an archive of lots of programming tutorials from various Acorn magazines.

I'm not sure if they cover the more recent tools and libraries but they may give you an insight into how the WIMP and Sprite operations work, for example.




Also: StrongED.
  ^[ Log in to reply ]
 
Paul Stewart Message #116026, posted by sa110_mk at 09:45, 8/12/2010, in reply to message #116025
Member
Posts: 144
There are also a number of programming related links on the Drag 'n Drop site: http://www.dragdrop.co.uk/links/links-devel.asp
  ^[ Log in to reply ]
 
Jason Togneri Message #116027, posted by filecore at 10:50, 8/12/2010, in reply to message #116026

Posts: 3867
I would also suggest picking up a RISC OS User Guide and RISC OS Programmers' Guide; you can find these on eBay and places, and Acorn wrote some of the most comprehensive user manuals I've ever seen. They will give you a good, solid introduction to basic OS features and get you started. RO3 and 4 manuals are easiest to find, and to be honest not so much has been changed in later versions (inet, !Boot structure, longdirs, some other stuff) that the older books won't still be useful.

Also, remember that RO 5 and 6 are parallel developments, not sequential; they're just confusingly named. There is only one upgrade step from 4.x (to either 5 or 6, depending on which company you've gone with) and even that is not necessarily considered an 'upgrade' by many.
  ^[ Log in to reply ]
 
Jeffrey Lee Message #116028, posted by Phlamethrower at 11:54, 8/12/2010, in reply to message #116027
PhlamethrowerHot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot stuff

Posts: 15100
I would also suggest picking up a RISC OS User Guide
Probably available online somewhere if you search around a bit. There are different versions for each OS release, but I don't think it will matter much which version you get since all the basics will be the same.

RISC OS Programmers' Guide
Programmers Reference Manual, not guide. Until RISC OS Ltd's website went tits-up a couple of days ago you would have been able to download free PDF copies from here. PDF copies also come with the official C/C++ tools, and there's a seperate "manuals CD" available IIRC. But I suspect you already have a copy of the PRMs in the stack of documentation that you got from your friend.

They will give you a good, solid introduction to basic OS features and get you started. RO3 and 4 manuals are easiest to find, and to be honest not so much has been changed in later versions (inet, !Boot structure, longdirs, some other stuff) that the older books won't still be useful
Actually one of the big issues is that the stuff which has changed hasn't always been documented fully/properly. There's no set of RISC OS 5 or RISC OS 6 PRMs available; all you can go by are the RISC OS 3 PRMs, plus volume 5a (aka the stuff that changed in 3.5), plus the documentation released by Castle/ROL to detail the stuff that's changed in 5/6. So rather than looking in one place to find out how something works you've got to (potentially) look in three or four places.

A year or so ago an effort was started to produce a wiki-based RISC OS 5 PRM on the ROOL wiki. But for legal reasons we can't just copy and paste the text from the RISC OS 3 PRMs. Rewriting everything and then going through and making sure that it's all accurate for RISC OS 5 is obviously a long and arduous process, and consequently there hasn't been much/any progress over the past few months (Not to mention the fact that Textile is an absolutely terrible choice of wiki when it comes to making it easy to manage and maintain content).
  ^[ Log in to reply ]
 
Andrew Rawnsley Message #116029, posted by arawnsley at 12:54, 9/12/2010, in reply to message #116028
R-Comp chap
Posts: 594
I believe there *is* actually an OS6 manual (or at least, one that covers changes in the Window Manager from Select onwards), but it is rather pricey (but rather thick). I keep meaning to pick up a copy at the shows.

However, because of the amount of RISC OS users still running legacy OS versions, it tends to be prudent to code with RISC OS 3.6+ in mind unhappy Or RISC OS 4 at the very most.
  ^[ Log in to reply ]
 
Rob Kendrick Message #116030, posted by nunfetishist at 13:37, 9/12/2010, in reply to message #116029
nunfetishist
Today's phish is trout a la creme.

Posts: 522
However, because of the amount of RISC OS users still running legacy OS versions, it tends to be prudent to code with RISC OS 3.6+ in mind unhappy Or RISC OS 4 at the very most.
NetSurf have given up supporting anything earlier than RISC OS 4. People still running pre-4 obviously aren't interested in new software, so stuff them smile

Of course, ROL adding all these fancy APIs is a waste of time, because nobody uses them, precisely for the reasons you outline (not to mention the Iyonix and the Beagleboard can't use them, either; using them locks your software to the RiscPC.)
  ^[ Log in to reply ]
 
Trevor Johnson Message #116031, posted by trevj at 15:25, 9/12/2010, in reply to message #116030
Member
Posts: 660
...fancy APIs... using them locks your software to the RiscPC.
Or VirtualAcorn, of course.
  ^[ Log in to reply ]
 
Rob Kendrick Message #116032, posted by nunfetishist at 17:04, 9/12/2010, in reply to message #116031
nunfetishist
Today's phish is trout a la creme.

Posts: 522
...fancy APIs... using them locks your software to the RiscPC.
Or VirtualAcorn, of course.
On VirtualAcorn, you should just pack it in and use Firefox/Chrome/OpenOffice/GIMP/etc.
  ^[ Log in to reply ]
 
Martin Bazley Message #116033, posted by swirlythingy at 17:50, 9/12/2010, in reply to message #116030

Posts: 460
NetSurf have given up supporting anything earlier than RISC OS 4. People still running pre-4 obviously aren't interested in new software, so stuff them smile
In what way have you done that? Given how very few fork-agnostic features have been added to the OS since Ursula, I'd have thought it very difficult to make software physically not run on RISC OS 3.7. (It's fair to expect them to softload the nested Wimp, though.)

A good recent example is MBBack, which, the night before version 2.03's release, I finally got around to installing on my remaining computer with RISC OS 3.7. It ran like a dream, with all the backup ImageFileConvert-avoiding mechanisms for JPEGs I had put in specifically with the Iyonix in mind kicking in perfectly. The only things I did change were a few things which made the program more user-friendly to set up and experiment with the first time - which probably should have been done a long time ago.

Other, more sophisticated, software does it as well. Back before I bought Select, I was running a new version of WinEd quite happily on RISC OS 3.7. This program was described in the help file as being incompatible with versions of RISC OS prior to 4. This was true. In order to run it, I indulged in a bit of covert bedroom hacking. I opened the application directory, inspected the contents, and, like a pro, headed straight for the one bit of code which was causing an incompatibility with RISC OS 3.7. Then I fixed it, and it worked. It was a star command in the !Run file which checked if the operating system was less than 4.00, and if so, caused an error. I commented it out.

And as for the relevant example: I can confirm that, as of what now seems like quite a long time ago (but I don't suppose the RISC OS-facing end has changed much, or at all), NetSurf worked perfectly well, if sluggishly, on that very same RiscPC.
  ^[ Log in to reply ]
 
Phil Mellor Message #116034, posted by monkeyson2 at 18:03, 9/12/2010, in reply to message #116033
monkeyson2Please don't let them make me be a monkey butler

Posts: 12380
RISC OS 4 is 11 years old. I think it's an acceptable minimum specification for any application by now, and I would hate for developers to have to waste any time on further backwards compatibility when they could be working on more interesting features (and making use of recent APIs).
  ^[ Log in to reply ]
 
Martin Bazley Message #116035, posted by swirlythingy at 19:54, 9/12/2010, in reply to message #116034

Posts: 460
Indeed. But my point is, even with no time wasted on backwards compatibility at all, it's still exceedingly difficult to prevent an application from working.

RISC OS 3.1 is another matter, because of all the stuff that came in in RISC OS 3.5, like deep sprites and dynamic areas, which a lot of applications do rely on.

As for your point about recent APIs: Rob correctly pointed out that most of these only work on the ROL branch, and therefore make an application useless to Iyonix or BeagleBoard owners, which is exactly the reason nobody has ever used them. RISC OS 5 is much closer to 3.7 at a software level than its proponents like to admit. If something isn't tied to Select features, chances are it also works on 3.7.

What you appear to be proposing is that developers deliberately waste even more time on explicitly severing backwards compatibility at no benefit to the application itself - which is, as I found out with WinEd, a futile exercise.

Regardless of whether or not a program is advertised as not being suitable for RISC OS 3.7, chances are it is at least 95% suitable, if not 100%. It's very difficult indeed to write a program which, on the merits of operating system features themselves, is at best impractical to use on 3.7.
  ^[ Log in to reply ]
 
Phil Mellor Message #116036, posted by monkeyson2 at 20:58, 9/12/2010, in reply to message #116035
monkeyson2Please don't let them make me be a monkey butler

Posts: 12380
Indeed. But my point is, even with no time wasted on backwards compatibility at all, it's still exceedingly difficult to prevent an application from working.
If there's no wasted time then there isn't a problem. smile

RISC OS 3.1 is another matter, because of all the stuff that came in in RISC OS 3.5, like deep sprites and dynamic areas, which a lot of applications do rely on.

As for your point about recent APIs: Rob correctly pointed out that most of these only work on the ROL branch, and therefore make an application useless to Iyonix or BeagleBoard owners, which is exactly the reason nobody has ever used them.
Did I see a posting somewhere that RISC OS 6 Paint and Draw could be seen running on RISC OS 5? I still wonder how divergent the really useful modules are between the two forks. It's just really frustrating that all the work put into the OS on both sides can't be used effectively by the few developers we have left.

Anyway, let's not scare off the newcomer with yet another argument. smile
  ^[ Log in to reply ]
 
Rob Kendrick Message #116037, posted by nunfetishist at 00:42, 10/12/2010, in reply to message #116033
nunfetishist
Today's phish is trout a la creme.

Posts: 522
NetSurf have given up supporting anything earlier than RISC OS 4. People still running pre-4 obviously aren't interested in new software, so stuff them smile
In what way have you done that? Given how very few fork-agnostic features have been added to the OS since Ursula, I'd have thought it very difficult to make software physically not run on RISC OS 3.7. (It's fair to expect them to softload the nested Wimp, though.)
It may work. That's different to supporting it. We don't have any sensible way of testing new builds on 3.7. Thus, we don't support anything that pre-historic.
  ^[ Log in to reply ]
 
Trevor Johnson Message #116039, posted by trevj at 11:53, 10/12/2010, in reply to message #116026
Member
Posts: 660
There are also a number of programming related links on the Drag 'n Drop site: http://www.dragdrop.co.uk/links/links-devel.asp
That looks like a fairly comprehensive collection - hadn't noticed it before.
  ^[ Log in to reply ]
 
Simon Willcocks Message #116046, posted by Stoppers at 16:27, 11/12/2010, in reply to message #116021
Member
Posts: 302
Also see this handy list of star commands.
For those without JavaScript (turned on), it's here: http://www.iconbar.com/forums/viewthread.php?threadid=10981
  ^[ Log in to reply ]
 
Colin Ward Message #116068, posted by ColinWard at 15:46, 18/12/2010, in reply to message #116021
Member
Posts: 16
Well thanks to all who replied with all of these hints - more than enough to get started. I have been playing around with RPCEmu to familiarise myself with RISC OS and almost have RISC OS running on my Beagleboard. I decided that I would put off trying to program RISC OS for a while as the learning curve for setting up GCC and getting started was so steep! But I will try to get it running during the Christmas holidays as I'm no longer totally lost on RISC OS! big smile
  ^[ Log in to reply ]
 
Trevor Johnson Message #116167, posted by trevj at 16:28, 5/1/2011, in reply to message #116029
Member
Posts: 660
...Until RISC OS Ltd's website went tits-up a couple of days ago you would have been able to download free PDF copies from the here...
Well, the directory listing's now private, but they still seem to be available from Foundation Resources Area.

I believe there *is* actually an OS6 manual (or at least, one that covers changes in the Window Manager from Select onwards), but it is rather pricey (but rather thick)...
Available via the sales page (disregard the incorrect thumbnail).
  ^[ Log in to reply ]
 
Jon Robinson Message #116383, posted by castlevarich at 14:10, 28/1/2011, in reply to message #116020
Member
Posts: 55
Hi all.

I've just got myself a Beagleboard and am taking my first tentative steps into RISC OS programming, having never used RISC OS before. My friend has leant me an astonishingly comprehensive set of 9 programming books that tell me everything I could ever want to know about the internals of RISC OS but that's not much use when I haven't yet even figured out how to change directories on the command line. smile

There seems to be information around but I'd appreciate a couple of posts that could serve as a "crash course in getting started" remembering that RISC OS is quite different to an old Amiga OS/UNIX/Windows hacker like me.

ie. Is the ctrl-f12 command prompt the one you use for running gcc or is there another one? What are it's basic commands for changing directories and that kind of stuff you do when programming? What's the best text editor/IDE to use?

I believe in figuring things out for myself but sometimes when starting new at something it pays to ask the experts!
The BIG problem with RISC OS programming is learning how to interact with the WIMP.

There are some articles on WIMP programming in C at -

http://accu.informika.ru/acornsig/public/caugers/

Martin Hansen's RISC OS Code is also a good place to find BASIC programs with lots of comments in -

http://www.riscoscode.com/

Jon robinson (Leeds)

[Edited by castlevarich at 14:11, 28/1/2011]
  ^[ Log in to reply ]
 
Jon Robinson Message #116387, posted by castlevarich at 12:21, 29/1/2011, in reply to message #116383
Member
Posts: 55
The RISCOS Code web site seems to have been redesigned so that you can't get to the back issues, but Martin Hansen's email address is at the bottom of this page -

http://www.mathmagical.co.uk/Software/Software.html

If you email him and explain that you are an Amiga programmer, trying to get into RISC OS desktop programming, I'm sure he'll send you some example BASIC programs from the back issues of the webzine.

Jon Robinson (Leeds)
  ^[ Log in to reply ]
 
Jon Robinson Message #116409, posted by castlevarich at 13:53, 1/2/2011, in reply to message #116068
Member
Posts: 55
Well thanks to all who replied with all of these hints - more than enough to get started. I have been playing around with RPCEmu to familiarise myself with RISC OS and almost have RISC OS running on my Beagleboard. I decided that I would put off trying to program RISC OS for a while as the learning curve for setting up GCC and getting started was so steep! But I will try to get it running during the Christmas holidays as I'm no longer totally lost on RISC OS! smile
Colin
If you'll leave your email address on here, in a slightly disguised form so the spammer can't get it, I'll send you some simple example BASIC progs that demonstrate how to get things on the iconbar and open a window with menus, etc.

Jon Robinson (Leeds)
  ^[ Log in to reply ]
 
John O'Meara Message #116931, posted by Cauchy at 22:16, 17/3/2011, in reply to message #116020
Member
Posts: 43
Try http://acorn.chriswhy.co.uk/docs/Acorn/Manuals/Manuals.html
I think you are looking for Advanced Disc Filing System User Guide. It is old but it may be helpful.
  ^[ Log in to reply ]
 

The Icon Bar: Programming: Getting started with RISC OS programming