+ Reply to Thread
Page 1 of 3 123 LastLast
Results 1 to 20 of 45

Thread: Propeller ROM source code HERE

  1. #1

    Default Propeller ROM source code HERE

    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.
    Attached Files Attached Files
    Last edited by ForumTools; 09-30-2010 at 03:57 AM. Reason: Forum Migration

  2. #2

    Default

    This is amazing! Thank you Hippy!

    Are we allowed to cherry pick stuff like the math operations for use in our own projects?

    Maybe someone will start an open source spin compiler project now. If so, count me in!

    Cheers,

    --fletch

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Join us in the Un-Official Propeller IRC channel: irc.freenode.net #propeller
    Newbies, oldies, programmers, math professors, and everyone in-between welcome!
    Propeller IRC howto
    Last edited by ForumTools; 09-30-2010 at 03:57 AM. Reason: Forum Migration

  3. #3

    Default

    dfletch said...

    Are we allowed to cherry pick stuff like the math operations for use in our own projects?
    Of course you can! It's there to learn by and get utility out of.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.
    Last edited by ForumTools; 09-30-2010 at 03:57 AM. Reason: Forum Migration

  4. #4

    Default

    Chip, you are just great.

    If somebody makes a headache over this, bad on them.

    Appreciated and have a great weekend.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!

    Chat in real time with other Propellerheads on IRC #propeller @ freenode.net

    Post Edited (potatohead) : 2/25/2008 4:17:16 AM GMT
    Last edited by ForumTools; 09-30-2010 at 03:57 AM. Reason: Forum Migration

  5. #5

    Default

    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.
    Last edited by ForumTools; 09-30-2010 at 03:57 AM. Reason: Forum Migration

  6. #6

    Default

    Nice.· Maybe·somebody will write us a Spin based Spin compiler now?
    Last edited by ForumTools; 09-30-2010 at 03:57 AM. Reason: Forum Migration

  7. #7

    Default

    Rayman said...
    Nice. Maybe somebody will write us a Spin based Spin compiler now?
    If nobody else starts than I might start one in the next couple of months. I want to finish a few other things first though... If I do I will be asking for help from everyone as it will be the first compiler that I have done.
    Last edited by ForumTools; 09-30-2010 at 03:57 AM. Reason: Forum Migration

  8. #8

    Default

    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.
    Last edited by ForumTools; 09-30-2010 at 03:57 AM. Reason: Forum Migration

  9. #9

    Default

    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
    Last edited by ForumTools; 09-30-2010 at 03:57 AM. Reason: Forum Migration

  10. #10

    Default

    A Spin editor and compiler (plus PASM) running on the Propeller w/o PC would be awesome.
    As examples, I love the PC-independent nature of femtobasic...And also 8052AH-BASIC.

    That reminds me, it seems to me that ATARI 800 BASIC handled strings similarly to Spin,
    and I once wrote a compiler in it.


    Post Edited (VIRAND) : 2/25/2008 10:15:15 PM GMT
    Last edited by ForumTools; 09-30-2010 at 03:57 AM. Reason: Forum Migration

  11. #11

    Default

    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.
    Last edited by ForumTools; 09-30-2010 at 03:57 AM. Reason: Forum Migration

  12. #12

    Default

    Phil Pilgrim (PhiPi) said...
    For maximum portability, it should be written in Perl, Python, or some other thread-safe, multi-platform language (i.e. not VB6).
    But ... but ... but ... that's my favourite programming language of choice ! You are however entirely right.
    Last edited by ForumTools; 09-30-2010 at 03:57 AM. Reason: Forum Migration

  13. #13

    Default

    Somebody said...
    But ... but ... but ... that's my favourite programming language of choice !

    Maybe you can use your VB with Mono

    The Mono Project on Feb. 20 announced that it has developed a Visual Basic compiler that will enable software developers who use Microsoft Visual Basic to run their applications on any platform that supports Mono, such as Linux, without any code modifications.

    Website:
    www.linuxdevices.com/news/NS9725385854.html

    Mono Project website:
    www.mono-project.com/VisualBasic.NET_support

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Aka: CosmicBob
    Last edited by ForumTools; 09-30-2010 at 03:57 AM. Reason: Forum Migration

  14. #14

    Default

    I'm thinking of starting a C project using Bison for the parser. Lexers and parsers written in procedural code or OO always seemed very clumsy to me after learning Flex/Bison Just not 100% sure at the moment about Flex and unicode. May have to write a custom lexer instead of Flex.

    I'll keep you posted on my progress. Come to the IRC channel if you want to chat.

    Cheers,

    --fletch

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Join us in the Un-Official Propeller IRC channel: irc.freenode.net #propeller
    Newbies, oldies, programmers, math professors, and everyone in-between welcome!
    Propeller IRC howto
    Last edited by ForumTools; 09-30-2010 at 03:57 AM. Reason: Forum Migration

  15. #15

    Default

    Hippy said...
    But ... but ... but ... that's my favourite programming language of choice !
    I hear ya. I thought VB3 was the cat's meow. Then I "upgraded" to VB6 and thought, "OMG! They ruined it! It's GINORMOUS!" That's when I switched to Perl and haven't looked back. It's an acquired taste, though, and the shortest programs can produce huge executables when run through perl2exe. One reason is that, due to the eval function, the embedded interpreter has to include the compiler, too. But Perl's expressiveness (if you can read it a month down the road) and text-handling capabilities are legendary. Plus, it runs on almost any platform.

    Hippy, have I whetted your appetite any?

    -Phil
    Last edited by ForumTools; 09-30-2010 at 03:57 AM. Reason: Forum Migration

  16. #16

    Default

    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
    Last edited by ForumTools; 09-30-2010 at 03:57 AM. Reason: Forum Migration

  17. #17

    Default

    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?
    Last edited by ForumTools; 09-30-2010 at 03:57 AM. Reason: Forum Migration

  18. #18

    Default

    Good point, Phil. I'll leave unicode support for "Phase 2". Isn't that what PHB's usually say when a feature gets squeezed out due to other priorities?

    I'm thinking I'll put the parser alone in it's own shared library. It would build and return a tree and have some nice high level functions e.g. spinParseFile(...). The compiler part can then simply use the parsing library and focus on output. Other projects could then use this lib without the compiled output for other purposes (e.g. syntax highlight, auto-complete, etc.)

    Cheers,

    --fletch

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Join us in the Un-Official Propeller IRC channel: irc.freenode.net #propeller
    Newbies, oldies, programmers, math professors, and everyone in-between welcome!
    Propeller IRC howto
    Last edited by ForumTools; 09-30-2010 at 03:57 AM. Reason: Forum Migration

  19. #19

    Default

    @ 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" ?
    Last edited by ForumTools; 09-30-2010 at 03:57 AM. Reason: Forum Migration

  20. #20

    Default

    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.
    Last edited by ForumTools; 09-30-2010 at 03:58 AM. Reason: Forum Migration

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts