 |
|
 |
| Parallax Forums > Public Forums > Propeller Chip > Propeller ROM source code HERE | Forum Quick Jump
|
|  Chip Gracey (Parallax) Forum Moderator

       Date Joined Aug 2004 Total Posts : 1136 | Posted 2/24/2008 4:17 PM (GMT -7) |   | | Here are all the source codes for the executable portions of the Propeller's ROM.
The booter and interpreter binaries appear scrambled when the ROM is read normally, but automatically unscramble when loading into a cog. Since Hippy succeeded in reversing the scrambling pattern in response to my challenge, I'm revealing the source codes. I hope this will yield more progress than headaches.
Note that the executable portion of the ROM ($F004-$FFFF) was pre-filled with longs randomly picked from the interpreter's scrambled binary before the actual code was laid in. This was a feeble measure to obscure the boundaries of the interpreter and booter codes. It was not much of a deterrent to Hippy, however, as I'm not even sure that he noticed.
Here is a map of the executable portion of the ROM:
$F004 - Interpreter binary (scrambled)
$F800 - Booter binary (scrambled)
$FF00 - Copyright message (ascii, 32 columns/row)
$FF70 - Runner bytecode (Spin code which builds initial stack frames for Spin processes)
Chip Gracey
Parallax, Inc. File Attachment : booter.spin 10KB (application/octet-stream) This file has been downloaded 579 time(s). File Attachment : interpreter.spin 22KB (application/octet-stream) This file has been downloaded 624 time(s). File Attachment : runner.spin 3KB (application/octet-stream) This file has been downloaded 629 time(s). | | Back to Top | | |
   |  potatohead Do NOT taunt Happy Fun Ball!

       Date Joined Sep 2006 Total Posts : 1979 | Posted 2/24/2008 4:54 PM (GMT -7) |   | | | |
 |  dartof Registered Member

       Date Joined Sep 2007 Total Posts : 5 | Posted 2/25/2008 12:11 AM (GMT -7) |   | | BRAVO! This was the missing piece that make this processor fully understandable like the CPUs of the 70's and 80's. I had put a small effort into unscrambling the code last year by programming a small disassembler with a bit unscrambler, but gave up due to shear number of permutations. Kudos to Hippy and others for the brilliant effort to get the right bit order and to Chip for sanctioning the effort. This has made my day. | | Back to Top | | |
   |  hippy Registered Member

       Date Joined Feb 2007 Total Posts : 1951 | Posted 2/25/2008 1:32 PM (GMT -7) |   | To be honest, a command line compiler suitable for porting to non-WinXP platforms would probably be more appreciated and useful than one written in Spin.
Writing a Spin compiler never required the ROM Interpreter code to be known but if that's the spur for people to embark on such a project having it is a good enough excuse. | | Back to Top | | |
 |  Phil Pilgrim (PhiPi) Registered Member

       Date Joined Feb 2006 Total Posts : 7744 | Posted 2/25/2008 2:16 PM (GMT -7) |   | Spin may be a difficult language to write a compiler in. It's not impossible, but Spin's minimal string-handling capabilities will certainly make things awkward. However, if this can be done, a nice add-on would be a multi-threaded Spin byte-code interpreter that can run on a PC. For maximum portability, it should be written in Perl, Python, or some other thread-safe, multi-platform language (i.e. not VB6). It would be slower than Propeller-based Spin, certainly, but at least the Spin-compiler-in-Spin could run on other platforms besides the Propeller.
-Phil | | Back to Top | | |
  |  Jasper_M Registered Member

       Date Joined Dec 2006 Total Posts : 224 | Posted 2/25/2008 3:11 PM (GMT -7) |   | | I've updated some info to the Propeller Wiki based on the source code. propeller.wikispaces.com/Spin+Byte+Code see if you can find any inaccuracies / something that's just plain wrong. And please do edit it, as it's not the simplest explanation of opcode structure probably. I'll keep updating the wiki on the subject as I learn. | | Back to Top | | |
     |  Phil Pilgrim (PhiPi) Registered Member

       Date Joined Feb 2006 Total Posts : 7744 | Posted 2/25/2008 6:12 PM (GMT -7) |   | dFletch,
I wouldn't worry too much about the Unicode thing. It has always seemed a rather steep price to pay just to get a few graphics widgets onscreen anyway. I'm sure most people don't care and would be fine with ASCII. When I was doing my preprocessor in Perl, all the funny characters got replaced with question marks, and I thought, "Hey, that works!"
-Phil | | Back to Top | | |
   |  hippy Registered Member

       Date Joined Feb 2007 Total Posts : 1951 | Posted 2/25/2008 7:23 PM (GMT -7) |   | @ Phil : I guess I have to now own up to still using VB3. What's amazing is that the same code which compiles under VB3 in the blink of an eye takes seconds to minutes with VB6.
I have a quite bizarre development cycle. I usually code in PowerBasic for MS-DOS as 'the lowest common denominator', and I have a home-grown program which auto-ports to VB3 ( for 16-bit ) and VB6 ( for 32-bit ). The GUI front-ends are written in native VB3 ( and again auto-ported to VB6 ) or written in native VB6 for the specific application. My program also auto-ports to Perl for platform independence but I seem to have a bug in that at present which is proving to be a pain to track down. It was working.
Theoretically it can also port to REALbasic, C# and VB.Net but I've not maintained the libraries to do that recently.
It means adopting a particular coding style but it does have the advantage that the desirability of splitting the GUI front-end from the back-end and platform specific hardware interfacing is absolutely enforced. It also means minimal maintenance when the back-end changes.
@ JT Cook : "Peanut" ? Or maybe "nut" is a pun on kernel; "Propeller Kernel" ? | | Back to Top | | |
 |  Chip Gracey (Parallax) Forum Moderator

       Date Joined Aug 2004 Total Posts : 1136 | Posted 2/25/2008 7:59 PM (GMT -7) |   |
JT Cook said...
Chip:
Looking at the source for the booter, it had the title for the micro as PNut. I remember early during the Hydra dev that Parallax was trying to deside on a name for the chip, but I was wondering how it got the name PNut?
PNut was what I called the Propeller project during development, for lack of a better name. None of us here knew what to name the chip, until the very end. This was a frustration to me, because I usually have well-formed ideas about such basic things. We held an internal naming contest, and I think it was my brother Ken that came up with "Propeller". Then, in drawing various logos containing propellers, the hat idea popped up, which made everything else make sense.
Chip Gracey
Parallax, Inc. | | Back to Top | | |
     |  hippy Registered Member

       Date Joined Feb 2007 Total Posts : 1951 | Posted 2/26/2008 5:23 AM (GMT -7) |   | Other things not in the grammar so far ...
if / if-else case return / abort quit in-built functions ( lookup, lookdown, strsize, strcomp etc ) unaries as statements ( var++ , --word[expr] ) multiple assignments ( var := var := expr, if (var:=expr) == expr ) | | Back to Top | | |
 | 36 posts in this thread. Viewing Page : 1 2 | | Forum Information | Currently it is Thursday, July 29, 2010 5:17 PM (GMT -7) There are a total of 462,440 posts in 62,066 threads. In the last 3 days there were 90 new threads and 803 reply posts. View Active Threads
| | Who's Online | This forum has 20143 registered members. Please welcome our newest member, ME01. 56 Guest(s), 9 Registered Member(s) are currently online. Details John Abshier, Rayman, BradC, prof_braino, Sapieha, Gene Bonin, laser-vector, localroger, Nick McClick |
Forum powered by dotNetBB v2.42EC SP2.02 dotNetBB © 2000-2010 |
|
|