Porting OpenSpin, and Proploader to RISC OS
davidsaunders
Posts: 1,559
I have successfuly compiled OpenSpin on RISC OS, I still need to test it.
I do not yet know how well it works, though it compiles, and it displays the help message. I have attached the source as modified to successfuly build openspin on RISC OS.
I am taking some time to attempt to port OpenSpin and the propeller loader to RISC OS, as I am tired of dealing with Linux (Linux is a great OS for some things, just not what I do).
I have began looking through the source, and I have a couple of questions to aid in the porting process:
1: Does anyone know where all the file IO is located (I am sure I will find it soon, though it would help)?
2: What is the minimum version of GCC for a succesful compile??
3: Are there any other simi OS-Specific things I should know of (anything that is not part of the CPP standard)?
4:What is the worste case total memory usage?
Same questions about the loader.
Once I get OpenSpin working on RISC OS:
I intend to add spin, PASM, and PropBASIC highlighting to !Zap (Programmers Text Editor), as well as implementing RISC OS ToolBox throwbacks for OpenSpin (allows the editor to identify the line of an error, and such).
Then I will make a RISC OS WIMP front end for OpenSpin.
A good syntax highlighting text editor plus good front ends for the compiler(s), assembler(s), resource editor(s), etc, make for a programming enviroment on RISC OS that is easier to use than traditional IDE's, and creats a faster development cycle.
I do not yet know how well it works, though it compiles, and it displays the help message. I have attached the source as modified to successfuly build openspin on RISC OS.
I am taking some time to attempt to port OpenSpin and the propeller loader to RISC OS, as I am tired of dealing with Linux (Linux is a great OS for some things, just not what I do).
I have began looking through the source, and I have a couple of questions to aid in the porting process:
1: Does anyone know where all the file IO is located (I am sure I will find it soon, though it would help)?
2: What is the minimum version of GCC for a succesful compile??
3: Are there any other simi OS-Specific things I should know of (anything that is not part of the CPP standard)?
4:What is the worste case total memory usage?
Same questions about the loader.
Once I get OpenSpin working on RISC OS:
I intend to add spin, PASM, and PropBASIC highlighting to !Zap (Programmers Text Editor), as well as implementing RISC OS ToolBox throwbacks for OpenSpin (allows the editor to identify the line of an error, and such).
Then I will make a RISC OS WIMP front end for OpenSpin.
A good syntax highlighting text editor plus good front ends for the compiler(s), assembler(s), resource editor(s), etc, make for a programming enviroment on RISC OS that is easier to use than traditional IDE's, and creats a faster development cycle.
Comments
Oh well I will let people know what I find on this subject.
Then I will have to find any and all fs format errors in the code. RISC OS uses the "." as a dirrectory sepperator, and one of two means of extensions, either a forward slash or putting it in a dir of the name of the extension (hence a.libopenspin instead of libopenspin.a, openspin is in the directory a).
Though I am one third of the way to a usable compile .
No they are the same size (32 bit), if you look at the C++11 standard this is a correct warning, as you are narrowing in that you loose the sign.
Yea it seems that way for sure, even Object Pascal is better suited it seems to me (heck even compiled BBC BASIC V [the version in RISC OS] seems better than modern C).
Though most things are written in either C or C++ so we often have to deal with it.
GCC uses UnixLib by default for its shared C lib. That means that the pathnames are not an issue (other than using a directory for the extension as described above), so I am happy .
So I should be able to compile the OpenSpin compiler with out having to change the source .
A few notes for those that are not familiar with RISC OS Star Commands:
1: the dirrectory sepperator is "."
2: UP is used to go up one directory (like CD .. in Unix).
3: [DIR] is used to change directories to a specified relitive path (like cd [pathname] in Unix).
4: The ~C option in COPY is used to copy with out asking confirmation.
5: the F option in COPY is used to force overwriting if there is an exesting file of the same name at the destination.
You've just made me feel really good about being too lazy to ever download RISC OS for my pi.
How so?
It is easier to learn for the first time than it is to learn CMD.exe in Windows, or sh/bash/tcsh in *NiX.
Ok so it is different than them, it is still easier overall .
Remember that the choice of dirrectory seperators ("/", "\", ":", ",", "_", etc depending on OS) is completely arbitrary, and even though the most common two today are "\" and "/", there is no standard for that, and in 1986 when RISC OS came out there was less push to use one particular seperator, so they kept the seperator used in Acorn MOS.
RISC OS has many advantages over other OSes (especialy on the RPi). Speed, I am running it on my RPi at 500MHz, and it is still faster than Linux at 1000MHz (1GHz) even for FireFox. True universal drag and drop (save a text file dirrectly to a text field in the web browser, or save a sprite file dirrectly to a conversion utility to get a different output format, of save a text file dirrectly to the compiler (bad idea though doable), etc. The ability to run a true single tasking application. And many more.
Of course the others have big advantages as well.
Here is the last command output:
And what are filesAccessed and lastfullpath supposed to be?
While I will be looking through the code to figure it out, it would speed things up if someone already knows.
I got a sucessful compile .
I have not yet attempted to compile any spin code, though we will see how that goes.
You surely know how to spit out code and get stuff done Go David Go
NOTE:
If you wish to compile it, and do so under WIMP in a task window, you will have to make sure to give it enough memory (10MB should be enough, though I give it 100MB for GCC).
To run openspin also requires a couple of MB
That way it's easy for people to find in the future. Your changes may get pulled back into the original repo if they are up to snuff. Being able to see what you have changed becomes much easier for others.
Besides, version control is a good idea anyway.
What machine are you running this on that you have to worry about the handful of megabytes it occupies?
I do not have to worry about the hand full of megabytes of memory. In RISC OS, there is a certain amount of memory initialy allocated to programs running in a TASK window, that defaults to 640KB (I do not know why it is 640KB), so it is a good idea to allocate more ram to the task window before runing. Now that will not be an issue at all once I update the build script with a WimpSlot command at the begining to give it enough RAM for its task, and write a drag and drop front end for the OpenSpin compiler thus allowing for normal RISC OS usage (rather than purely commandline).
So there is some work to be done.
As to github, I do not think there is a git client for RISC OS, so making a fork is an issue. That and using the web interface would require using a WebBrowser that supports more JS than NetSurf, and on RISC OS at the moment that would mean FireFox and FireFox is very very slow.
Though to answer your question I am running on a RaspberryPi Model B board Rev 2 (it is 3 years old, as are all my Rasperry Pi).
OpenSpin seems to be compiling SPIN source with out any trouble on RISC OS.
Now if someone would do me a favor and take the archives that I will post on this thread, extract them and put a fork on github, I would apreciate it much.
I just wish I could port PropGCC, though not having Python on my RISC OS system makes that a NO GO.
Basically most of your changes should be in a new file called osint_riscos.c
If you make a good job such changes could be pulled back to the upstream propeller-gcc.
How do I fork it on github with out using a JS complete browser, and with out having a git client???
More realistically one does not need a JS complete browser to use git. Or any browser. Just clone the repo to your machine and let it be known to the project maintainer when you have something useful to pull. All git repos are peers after all.
If your OS cannot run git then you have a problem. Either:
a) Get git running on your OS.
b) Consider it as a target machine, like an Arduino or whatever, and maintain your source code on something more suitable for that task.
As you have Raspberry Pi available that can do the job the course is clear.
In which case I am amazed.
Have you tested this loader yet?
I meant for openspin .
svn for RISC OS - http://www.cp15.org/versioncontrol/
Github page discussing svn - https://github.com/blog/1178-collaborating-on-github-with-subversion
There is a RISC OS port of git out there somewhere, it is a matter of finding it.
And just because it is 2015 does not mean I am going to fall into the trap of use the most bloated possibility, I will not contribute to the repeat of the unmaintainable that killed Multix (with good riddens).
I could use FireFox if I want to take forever to do anything, though I would rather not. Unfortunately there is not yet a port of a lean WebKit browser for RISC OS.