Shop OBEX P1 Docs P2 Docs Learn Events
Propeller based demo to be released at Breakpoint. - Page 6 — Parallax Forums

Propeller based demo to be released at Breakpoint.

123468

Comments

  • ShazzShazz Posts: 52
    edited 2009-04-19 18:22
    As advertised, here is my weekend-coded PASM disassembler. Java 6 JRE required.
    tmpstore.free.fr/propeller/PASMDisassembler_v0.1.zip

    Example of usage :
    java -jar "PASMDisassembler.jar" turbulence.eeprom > turbulence.asm

    If you find some issues, please tell me, I did not have time to write all JUnits to test all opcodes & conditions.
    I'll publish the sources for the curious when the last bugs will be fixed.

    As advertised, my PASM disassembler. Not fully finished (some command line options don't work as expected) but usable.

    Java Runtime 6 required. Usage example :
    Exemple of output for Linus's demo :
    Disassembling from 0x0
    Address     Cell        Data        Conditions     Opcode    Destination Source       
    --------------------------------------------------------------------------------------  
    $00000000   $00000000   $5c7c0007                  JMP                   #$00000007   
    $00000004   $00000001   $0010a66f   IF_C_AND_NZ    WRBYTE    $053        $06f         
    $00000008   $00000002   $7fcc7fc4                  LONG      $7fcc7fc4                
    $0000000c   $00000003   $7fd00018                  LONG      $7fd00018                
    $00000010   $00000004   $00027fb4                  WRBYTE    $13f        $1b4         
    $00000014   $00000005   $00000008                  WRBYTE    $000        $008         
    $00000018   $00000006   $2c353535                  LONG      $2c353535                
    $0000001c   $00000007   $a0fc060b                  MOV       $003        #$0000000b   
    $00000020   $00000008   $5cfc6830                  CALL                  #$00000030   
    $00000024   $00000009   $a0bc0a04                  MOV       $005        $004         
    $00000028   $0000000a   $5cfc5a2b                  CALL                  #$0000002b   
    $0000002c   $0000000b   $5c4c0019   IF_NC          JMP                   #$00000019   
    $00000030   $0000000c   $a0fc0608                  MOV       $003        #$00000008   
    $00000034   $0000000d   $5cfc6830                  CALL                  #$00000030   
    $00000038   $0000000e   $a0bc0c25                  MOV       $006        $025         
    $0000003c   $0000000f   $84bc0c04                  SUB       $006        $004         
    $00000040   $00000010   $a0fc0606                  MOV       $003        #$00000006   
    $00000044   $00000011   $5cfc6830                  CALL                  #$00000030   
    $00000048   $00000012   $80fc0802                  ADD       $004        #$00000002   
    $0000004c   $00000013   $00bfe006                  RDBYTE    $1f0        $006         
    $00000050   $00000014   $80fc0c01                  ADD       $006        #$00000001   
    $00000054   $00000015   $80fc4a01                  ADD       $025        #$00000001   
    $00000058   $00000016   $003fe025                  WRBYTE    $1f0        $025         
    $0000005c   $00000017   $e4fc0813                  DJNZ      $004        #$00000013   
    $00000060   $00000018   $5c7c0022                  JMP                   #$00000022   
    $00000064   $00000019   $a0fc0604                  MOV       $003        #$00000004   
    $00000068   $0000001a   $5cfc6830                  CALL                  #$00000030   
    $0000006c   $0000001b   $a0bc0c04                  MOV       $006        $004         
    $00000070   $0000001c   $80fc0c01                  ADD       $006        #$00000001   
    $00000074   $0000001d   $a0fc0608                  MOV       $003        #$00000008   
    $00000078   $0000001e   $5cfc6830                  CALL                  #$00000030   
    $0000007c   $0000001f   $80fc4a01                  ADD       $025        #$00000001   
    $00000080   $00000020   $003c0825                  WRBYTE    $004        $025         
    $00000084   $00000021   $e4fc0c1d                  DJNZ      $006        #$0000001d   
    $00000088   $00000022   $e4fc0a0a                  DJNZ      $005        #$0000000a   
    $0000008c   $00000023   $5c7c0035                  JMP                   #$00000035   
    $00000090   $00000024   $00000c24                  WRBYTE    $006        $024         
    $00000094   $00000025   $7d2800d3                  LONG      $7d2800d3                
    $00000098   $00000026   $00bc0424                  RDBYTE    $002        $024         
    $0000009c   $00000027   $58fc0500                  MOVI      $002        #$00000100   
    $000000a0   $00000028   $80fc4801                  ADD       $024        #$00000001   
    $000000a4   $00000029   $2cfc4808                  SHL       $024        #$00000008   
    $000000a8   $0000002a   $68bc4802                  OR        $024        $002         
    $000000ac   $0000002b   $623c482f                  LONG      $623c482f                
    $000000b0   $0000002c   $29d44801                  LONG      $29d44801                
    $000000b4   $0000002d   $5c540000   IF_NZ          JMP                   #$00000000   
    $000000b8   $0000002e   $5c7c0026                  JMP                   #$00000026   
    $000000bc   $0000002f   $ff000000                  NOP                                
    $000000c0   $00000030   $a0fc0800                  MOV       $004        #$00000000   
    $000000c4   $00000031   $5cfc5a2b                  CALL                  #$0000002b   
    $000000c8   $00000032   $34fc0801                  RCL       $004        #$00000001   
    $000000cc   $00000033   $e4fc0631                  DJNZ      $003        #$00000031   
    $000000d0   $00000034   $5c7c0000                  JMP                   #$00000000   
    $000000d4   $00000035   $0c7fea02                  COGINIT   $1f5                     
    
    

    Post Edited (Shazz) : 4/19/2009 6:28:02 PM GMT
  • SapiehaSapieha Posts: 2,964
    edited 2009-04-19 18:33
    Hi Shazz

    First Bytes in BIN file is HEADER.

    Adjust Disasembling to that.

    My proposo to You is to have OPTION to Disassemble ...... FROM xxxx ..... TO xxxx

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nothing is impossible, there are only different degrees of difficulty.
    For every stupid question there is at least one intelligent answer.
    Don't guess - ask instead.
    If you don't ask you won't know.
    If your gonna construct something, make it·as simple as·possible yet as versatile as posible.


    Sapieha
  • ShazzShazz Posts: 52
    edited 2009-04-19 18:38
    Sapieha said...
    Hi Shazz

    First Bytes in BIN file is HEADER.
    Adjust Disasembling to that.
    My proposo to You is to have OPTION to Disassemble ...... FROM xxxx ..... TO xxxx

    About the header... I know.... but not sure I want handle it as Linus did not follow the header specs entirely [noparse]:)[/noparse] Simply follow the first instruction and forget those useless stuff... Bah I'll add it one day.
    The from/to is already there but not well implemented, use -s 0x01C -e 0x0FF for example (but doesn't stop at the good address [noparse]:)[/noparse] )
  • jazzedjazzed Posts: 11,803
    edited 2009-04-19 19:18
    Nice effort so far. Some problems .... $2b long is the TEST instruction with the WZ flag set ... $2c is a SHR instruction.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve


    Propalyzer: Propeller PC Logic Analyzer
    http://forums.parallax.com/showthread.php?p=788230
  • ShazzShazz Posts: 52
    edited 2009-04-19 20:46
    jazzed said...
    Nice effort so far. Some problems .... $2b long is the TEST instruction with the WZ flag set ... $2c is a SHR instruction.

    Thanks Jazzed, there was a bug with the effects. fixed.
    But better to create a new thread to avoid pollute the linus demo hacking challenge ! I'll do that with the next version.
  • AleAle Posts: 2,363
    edited 2009-04-19 20:53
    Shazz:

    You can implement Hippy'S disassembler in java (it is written in some sor of BASIC) so I can use it in my pPropellerSim lol.gif or you can get some ideas from it. sourceforge.projects=ppropellersim. That one is a little dated till I upgrade it with my current dev tree (I can send it to you if you are interested).
    I posted the disassembly of one the COG'S program memory in page 4 or 5 of this thread smile.gif
  • ShazzShazz Posts: 52
    edited 2009-04-20 07:16
    Ale, I have tested Hippy's proplist but I had some issues, the turbulence EEPROM was strangely disassembled (or I think so). Then I tried your pPropellerSim and I was not able to disassemble the eeprom too (only three strange instructions at the beginning then nothing), I did not have the disassembly you have posted. So.....
    But yes if you have a version which works, please send it [noparse]:)[/noparse]
  • BEEPBEEP Posts: 58
    edited 2009-04-20 09:42
    I have made a small program to display the hidden part.

    Edit:
    A new version (test.zip) for Sapieha.

    Post Edited (BEEP) : 4/20/2009 12:56:58 PM GMT
  • SapiehaSapieha Posts: 2,964
    edited 2009-04-20 09:54
    Hi BEEP

    What port it use.
    Can You post litle help to this program

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nothing is impossible, there are only different degrees of difficulty.
    For every stupid question there is at least one intelligent answer.
    Don't guess - ask instead.
    If you don't ask you won't know.
    If your gonna construct something, make it·as simple as·possible yet as versatile as posible.


    Sapieha
  • BEEPBEEP Posts: 58
    edited 2009-04-20 10:51
    Run turbulence demo on the Propeller, click one of the buttons and the program scans port from 0 to 9.
    If the Propeller is found it will reset to run the demo or download to ram to show the
    hidden part.

    If you got an error msg you probably have a bluetooth device or something else connected
    to the USB ports. If you want I can set the port to a fixed number (send me a PM).

    Post Edited (BEEP) : 4/20/2009 11:19:10 AM GMT
  • SapiehaSapieha Posts: 2,964
    edited 2009-04-20 10:59
    Hi BEEP.

    None of my Propelers Run on Ports 1-9.
    It is my other Com systems that have them

    My Prop Ports start at 15 - > Totaly 6

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nothing is impossible, there are only different degrees of difficulty.
    For every stupid question there is at least one intelligent answer.
    Don't guess - ask instead.
    If you don't ask you won't know.
    If your gonna construct something, make it·as simple as·possible yet as versatile as posible.


    Sapieha
  • BEEPBEEP Posts: 58
    edited 2009-04-20 11:44
    I will make a version for you with more ports and you can download it later from my old post above.
    To display the hidden part you can use ViewPort (see earlier post from Shazz).
  • ShazzShazz Posts: 52
    edited 2009-04-20 11:56
    Beep, can you explain us what triggers the hidden part ? As I found it by mistake it is still a mystery for me...
  • BEEPBEEP Posts: 58
    edited 2009-04-20 13:16
    I was trying to use Parallax source code to download to the Propeller and in the first test my program trigged the hidden part so I don't have a clue what is going on under the hood.
  • ShazzShazz Posts: 52
    edited 2009-04-20 13:24
    BEEP said...
    I was trying to use Parallax source code to download to the Propeller and in the first test my program trigged the hidden part so I don't have a clue what is going on under the hood.

    hop.gifhop.gifhop.gif LOL [noparse]:)[/noparse]
    And basically from what you know, what does your exe do ?
  • KPRKPR Posts: 189
    edited 2009-04-20 16:05
    Yeah.. I just got my new test unit.. a few more days and I can play too..

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New ICON coming, gotta wait for the INK to heal, now we have colour!
  • kuronekokuroneko Posts: 3,623
    edited 2009-04-21 07:23
    Shazz said...
    Then I tried ... pPropellerSim and I was not able to disassemble the eeprom too (only three strange instructions at the beginning then nothing), I did not have the disassembly ...
    Just load the *.eeprom file as *.bin (File -> Open binary ...), in this mode it's treated as headerless PASM. But don't believe everything you see (e.g. all special registers are cleared after coginit/cognew).
  • KPRKPR Posts: 189
    edited 2009-04-28 20:24
    Any further developments here?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New ICON coming, gotta wait for the INK to heal, now we have colour!
  • ShazzShazz Posts: 52
    edited 2009-04-28 20:40
    yes wink.gif
  • KPRKPR Posts: 189
    edited 2009-04-28 20:47
    Shazz said...
    yes wink.gif

    Hahaha.. talk about dangling a carrot in front of a donkey.. eeee--awww!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New ICON coming, gotta wait for the INK to heal, now we have colour!
  • ShazzShazz Posts: 52
    edited 2009-04-29 19:28
    Kuroneko is Neo, he reads in the matrix [noparse]:)[/noparse] And I do my best to follow him ! (Yeah, I took the red pill)

    I'll try to post something this weekend wink.gif

    Follow us...
    http://tinyurl.com/68k2z
  • kuronekokuroneko Posts: 3,623
    edited 2009-05-02 12:01
    KPR said...
    How does one display the hidden part?
    For the terminally curious ...
  • Linus AkessonLinus Akesson Posts: 22
    edited 2009-05-04 15:49
    Hello again!

    It's nice to see all the progress you're making! You can be sure I'm watching this thread. =)

    Since some of you have cracked the unpacker now, I would suggest that your next step is to write a tool for unpacking data from a given offset in the eeprom file, into a new file. Do this for various offsets, then study the resulting files using hex editors, disassemblers and whatnot. Of course, it may not be entirely obvious which offsets to start unpacking from...

    By the way, a better video rip is available on the project page now (www.linusakesson.net/scene/turbulence/).
  • ShazzShazz Posts: 52
    edited 2009-05-05 06:47
    eh eh Linus so we're near of that.... currently I've got a command line depacker which as you mention take various offsets which are not obvious at all (that's my issue now, as your depacker maintains a buffer and a bit position from the previous depack, at least for the first 4 packed blocks)... So Kuroneko tries to help me to manage that [noparse]:)[/noparse]

    So I'm sure he's a little ahead of that.... and I'm sure his depacker is fully functional [noparse]:)[/noparse]

    Linus, the reversed bitstream, that was to nag us, no ? =D
  • Linus AkessonLinus Akesson Posts: 22
    edited 2009-05-05 13:32
    Shazz said...
    Linus, the reversed bitstream, that was to nag us, no ? =D

    When you think about it, data comes in through rdbyte, so it ends up in the low bits of a register. It's natural to shift them to the right, one at a time, into the carry flag. But you also want to concatenate a sequence of bits together into the low bits of another register. It's natural to shift them to the left, one at a time, from the carry flag. The bit order will be reversed, which seems counter-intuitive, but otherwise (e.g. shifting to the left both when reading and concatenating) you'd have to add at least one more instruction somewhere, in order to shift the destination register 32 - n bits. This would slow things down.

    The fact that it would nag you was a bonus. =)
  • bmb!bmb! Posts: 26
    edited 2009-05-05 15:52
    Linus, amazing demo. Had a chance to see it on real hardware last night instead of video. Very impressive! (watching a youtube video is not the same) I thought about writing a "old-school" type demo for the Prop myself but thought it might be too weak on the memory. You sir have proved me wrong! Would be interesting if a demo scene formed around the Prop... Working on firing up your demo last night brought back old "demo scene" memories. Days of watching a computer (now, just a little chip) do something you didn't even think was possible... Awesome!
  • BamseBamse Posts: 561
    edited 2009-05-05 17:28
    I'm sure we are going to see a few more demos after someone manage to reverse engineer Linus Demo... wink.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Living on the planet Earth might be expensive but it includes a free trip around the sun every year...

    Experience level:
    [noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
    [noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
    [noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
    [noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
    [noparse][[/noparse] ] I dream in SX28 assembler...

    /Bamse
  • ShazzShazz Posts: 52
    edited 2009-05-05 20:10
    So here is one result of our depacker...

    java -jar ../dist/LoaderDecrypter.jar -o hidden.eeprom -r 0x07504 -w 0x00 turbulence.eeprom
    Loading the file turbulence.eeprom
    Saving the file hidden.eeprom
    --- Depack report ---
    Read data size                   : 1681
    Written data size                : 2048
    Compression ratio                : 18.0 %
    Dictionary encoded bytes         : 935
    Reversed bitstream encoded bytes : 1113
    Last Hub Src address             : 0x07b95
    Last Hub Dst address             : 0x0800
    
    


    Turbulence hidden screen said...

    Welcome to the hidden part! You know what? It's really difficult to fill up 32 kilobytes. When you've got a really tight limit, like 4 kB, you almost immediately hit the roof, and spend most of the time trying to optimize a few bytes here and there. With a larger limit, say 64 kB, you've got plenty of room for animations, sound samples etc., so you tend to fill it up in that way. But with 32 kB, it's a real challenge. The way I work, I usually start out experimenting with a bunch of effects. Then, when inspiration strikes, I compose a piece of music, in the right mood. Once the music is finished, the duration of the demo (and, to some extent, the number of cuts) is fixed. Then I try to map the effects to the music, and hopefully the big picture emerges somehow. At that point I'll know exactly how large the demo will be. In the case of Turbulence, I think I had used about 24 kB then. By adding a few details here and there, I managed to increase the size with a few more kilobytes. Then I added the hidden part as a last measure. But I've still got plenty of space left. Oh well, I guess I'll have to give up and pad the file now. By the way, spring has just arrived in Lund, and I really shouldn't be sitting indoors typing scrolltext. Oh well, vita brevis, ars longa. It's a dirty job, but someone's gotta do it. Hmm, what else can I write about? The propeller chip is really cool! It's the renaissance of the home computer! Its architecture is very peculiar, in both good and bad ways. The limitations are just right. Indeed, the promised Propeller II seems to be a bit too high-end for my taste. High performance may be convenient, and even useful, but there's nothing like a bunch of complex limitations to get your creativity flowing. Anyway, if you're still reading this, you're obviously skilled in the art of concentration and patience. Nurture those abilities, and the world will be yours. That is all. Take care everyone, and keep on creating, inspiring and amazing each other!
  • BaggersBaggers Posts: 3,019
    edited 2009-05-05 22:34
    excellent work Shazz [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • mparkmpark Posts: 1,305
    edited 2009-05-05 23:23
    Turbulence hidden screen said...

    The propeller chip is really cool! It's the renaissance of the home computer! Its architecture is very peculiar, in both good and bad ways. The limitations are just right. Indeed, the promised Propeller II seems to be a bit too high-end for my taste. High performance may be convenient, and even useful, but there's nothing like a bunch of complex limitations to get your creativity flowing. Anyway, if you're still reading this, you're obviously skilled in the art of concentration and patience. Nurture those abilities, and the world will be yours. That is all. Take care everyone, and keep on creating, inspiring and amazing each other!

    Well said, Linus!
Sign In or Register to comment.