Shop OBEX P1 Docs P2 Docs Learn Events
Hydra Logo: the future of realtime Propeller programming! — Parallax Forums

Hydra Logo: the future of realtime Propeller programming!

DreamwriterDreamwriter Posts: 22
edited 2007-02-26 11:13 in Propeller 1
OK, maybe that's a bit overkill [noparse]:)[/noparse] But hey, I had to announce my project to the world, now that we have a dedicated Hydra board here, and *I'm* pumped about it at least! (if you've read this on the XGamestation boards, it's the same project) You know the old Logo programming language - you may have used it in school on an Apple IIe or Atari computer. You've got a "turtle", and you can move it around with plain English commands: Forward 20, Right 90, Back 40, etc; and as it moves around it draws a picture. Well that's what I'm making for the Hydra - you just turn it on and start programming, no need for a compiler or anything. I'm also planning on making it so you can save functions you create to the Hydra's EEPROM, and then load them up again (maybe even do all that automatically for you).

I'm making two versions - version 1.0 is just me diving in and making it in SPIN, learning the Hydra specifics and figuring out what is needed. Then version 2.0 will be the real deal - full ASM, custom graphics drivers, multiple turtles each on their own COG (parallel processing Logo!), etc. As of now version 1.0 is getting close to being done (been working on this for a while now); it has the full text console, you can type in turtle commands and they are followed, drawing pictures on the screen.

There's a blog of sorts showing my progress on my Hydra website, complete with screenshots.

Comments

  • ForrestForrest Posts: 1,341
    edited 2007-01-22 11:36
    Hmm, picture links on your website are broken.
  • fred2fred2 Posts: 47
    edited 2007-01-22 12:20
    Very impressive website! Your project makes me even more excited about the HYDRA capabilities.

    Back in the dim, dark ages of home computers I wrote a memory dump in LOGO because that is
    usually the first item I write on a new machine. It is a necessity for any "hacking" (the old definition,
    not the bad one) when developing new ideas. I can't remember the machine now, but it was the
    only language available at the time and was later published in one of the then current magazines.

    I will follow your development closely since I want to do a similar project and you have made a
    significant step forward. Are you using VGA output?

    Fred2
  • Ym2413aYm2413a Posts: 630
    edited 2007-01-22 16:28
    Well this looks cool.
    I never programmed Logo before. But I know a lot of people who did.
  • fred2fred2 Posts: 47
    edited 2007-01-22 16:52
    I am assuming that the LOGO application eventually makes the HYDRA a completely independant development machine without
    PC attachment -- or at least, that is the goal? Superb!

    Is your LOGO creating program written in assembler or Spin?

    Just curious....

    Fred2
  • AndreLAndreL Posts: 1,004
    edited 2007-01-23 02:22
    Also, I am finishing up the SRAM add on board for the HYDRA which will multiply its abilties considerably for more advanced languages and applications.

    Andre'
  • Ym2413aYm2413a Posts: 630
    edited 2007-01-23 20:50
    I like this, Making a turtle move sounds like fun. ^^
  • AndreLAndreL Posts: 1,004
    edited 2007-01-24 04:21
    As long as its armed [noparse]:)[/noparse]

    Andre
  • Ym2413aYm2413a Posts: 630
    edited 2007-01-24 15:01
    AndreL said...
    As long as its armed [noparse]:)[/noparse]

    Andre

    Armed as in "SHOOT 30"?
    (lol)
  • DreamwriterDreamwriter Posts: 22
    edited 2007-01-30 08:28
    OK, an update - I just got the "Repeat" command working (had a nasty bug, took forever to figure out). You can now do:

    repeat 180[noparse][[/noparse]fd 4 rt 2]

    and get a (pretty good approximation of a) circle. Just for fun, here's a sneak peak at some SPIN code:

      case Command
        COMMAND_FD, COMMAND_FORWARD:
          eraseTurtle
          parameter1 := getIntParameter(ParameterList)
          ParameterList := secondaryReturn
          'standard geometry, x = delta * cos(angle), y = delta * sin(angle).  +90 so zero degrees points straight up.
          turtlex := turtlex + ((parameter1 * getCos(turtleangle+90)) / 65535)
          turtley := turtley + ((parameter1 * getSin(turtleangle+90)) / 65535)
          'plot the line
          gr.colorwidth(2,0)
          gr.plot(oldTurtlex, oldTurtley)
          gr.line(turtlex, turtley)      
          drawTurtle
          NewStringPosition := ParameterList       
    
    
  • AndreLAndreL Posts: 1,004
    edited 2007-02-19 21:17
    Dreamwriter, how's the logo coming, time for another release?

    Andre'
  • DreamwriterDreamwriter Posts: 22
    edited 2007-02-26 11:13
    At long last, an update! Things have been going slow between a project at work and being stuck in Hydra Logo, but I finally broke the Logo logjam (logojam?) tonight.

    Functions (user-created Commands) have been giving me lots of problems, but (just tonight) I finally got basic functions in Logo working...mostly [noparse]:)[/noparse] Right now, one or two line functions work just fine, even if one of the lines is a "repeat" command, but any more lines and it doesn't work. As well, you can call a function with the "repeat" command ("repeat 4[noparse][[/noparse]right 45 mysquarefunc]"), but doesn't work if the function is the first command in the repeat. Before tonight only single-line functions would work, they wouldn't work in repeats, and they'd only work if the function declaration was the first thing you did after starting up Hydra Logo, so it's now coming along quickly.

    Once I get these problems fixed, I need to add the ability to pass parameters into functions, add in basic arithmetic functionality, and saving functions to Eeprom, and that'll be version 1.0, to be released to the masses. Due to noticing I have more free RAM than I thought I had, I'm currently thinking of delaying the assembly version of Hydra Logo (previously 2.0), so I can make this one a lot more complete and cool: add support for the NES controllers, sprites and sounds and stuff, and make its parsing less strict (the repeat command is very strict to how it has to be setup, and you currently are limited to one command per line of text).

    Hopefully you guys will be able to enjoy my work soon!

    Another preview: here's the current command list

    ' LOGO Commands    #chars,string
    commands        byte    2,"fd"
                    byte    7,"forward"
                    byte    2,"bk"
                    byte    8,"backward"
                    byte    2,"lt"
                    byte    4,"left"
                    byte    2,"rt"
                    byte    5,"right"
                    byte    4,"home"
                    byte    6,"setpos"
                    byte    10,"hideturtle"
                    byte    2,"ht"
                    byte    10,"showturtle"
                    byte    2,"st"
                    byte    5,"penup"
                    byte    2,"pu"
                    byte    7,"pendown"
                    byte    2,"pd"
                    byte    6,"repeat"
                    byte    2,"rp"
                    byte    2,"to"
                    byte    4,"make"
                    byte    2,"mk"
                    byte    5,"shoot"
                    byte    3,"end"
    
    
Sign In or Register to comment.