Shop OBEX P1 Docs P2 Docs Learn Events
Anyone interested in a some code to show a complete video demo in ASM? — Parallax Forums

Anyone interested in a some code to show a complete video demo in ASM?

AndreLAndreL Posts: 1,004
edited 2010-03-01 01:37 in Propeller 1
Hello, there, I am the·architect of the Hydra system, some of you may know me from the XGamestation. In any case, myself and team of insane and highly gifted demo coders are working 24/7 to create some of the most impressive demos on the· Propeller chip possible. We won't be releasing any of the source until the release of the Hydra iteself, but when released it will all be "open source" and well documented along with many API descriptions. In the meantime, I am going to put together a short video 1-2 mins that shows some the demos running, so you can all see "what to expect" from your own programming. The demo reel will show both spin and ASM programs running, so you can get an idea of what can be done. This will be posted in a week hopefully. More or less, we have achieved Nintendo level 80's game system performance on our 2nd generation games and demos, by 3rd generation using the hydra's extra 96K of eeprom storage, I expect to see even more impressive demos along the lines of Zelda like games with large colorful environments. Additionally, 3D is no problem on the PChip, although no one has done any 3D stuff yet, if I personally get a chance, I will put some 3D demos together.

Although, I rarely visit weboards, even my own [noparse]:)[/noparse], at the behest of Chip, I have been perusing this board to see what people are asking. There seems to be a lot of questions about the video hardware and what it does, how to use it, why its cool, etc. Would anyone be interested in a REALLY short program that sets up video, and does an animation on the screen? I have put together something that is just about the smallest "spin/asm" program you can make that isn't compleltely cryptic that shows a complete video driver program and I have commented the hell out of it.

If this is of something of interest, I will post it. Basically, it will just put up color bars, but that's the start of everything. Also, I will take a pic or make a small vid of the animation is makes, so you can see what it would do if you had hardware.

Lastly, just to let everyone know, the Hydra is for the most part "complete", we are just fine tunning, etc. the package comes with a lot of goodies a complete system more or less, so I will let Ken tell you about that when we are ready to release details. The final part of the package is a book I am writing on the use of the PChip/Hydra to make games, so a introductory guide to game dev with the hydra/pchip. This is the last piece of the puzzle, when this is done the system will release, so expect a late summer release of the Hydra and all the goodies; however, Parallax might allow pre-orders of the system a month or 2 before launch, who knows.

But, I can say that parallel programming is a lot of fun, and although to get high performance from the Pchip you must code in ASM, the ASM for it is VERY RISC like and high level, each instruction has conditional execution plus conditional flag and write enables, thus its like every instructions is a little chunk of C code! Very cool and allows very high level ASM programming. The cool part is that even if you dont' want to muck with ASM then you can always use another engine like ours or parallax's to do graphics etc and make calls from SPIN.

Anyway, anyone interested in some demo video code, post back, if I see interest then I will post some and a little video of it.

Andre' LaMothe
«1

Comments

  • BeanBean Posts: 8,129
    edited 2006-02-25 02:45
    Andre' I would love to see it.
    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    "SX-Video OSD module" Now available from Parallax for only·$49.95
    http://www.parallax.com/detail.asp?product_id=30015

    Product web site: www.sxvm.com

    "Ability may get you to the top, but it takes character to keep you there."
    ·
  • Tim-MTim-M Posts: 522
    edited 2006-02-25 02:53
    Andre'

    · Thanks for taking time to look in on the interests here in our group - we really appreciate the input of people like you!· Consider this another very interested vote toward your offer of a·tutorial and video·demo's.

    Tim
  • Agent CobaltAgent Cobalt Posts: 88
    edited 2006-02-25 03:11
    I would definitely be interested in seeing the demos and any information as I have a group of 6 other people besides myself waiting for the Propeller to be released so we can develop games on it. We've already got 2 ideas in the design stage and any information I can get at this point would be awesome. Thanks! smilewinkgrin.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truth can be dangerous... Trust can be deadly.
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2006-02-25 03:13
    Andre,

    "Anyone interested in a some code to show a complete video demo in ASM?"

    This kind of question might be considered an understatement. I expect you will be swamped with requests. smilewinkgrin.gif



    I for one was very impressed with the demo you provided for us on the 16th and 17th, and I know others will be equally
    pleased with what you are willing to provide to our future Propeller drivers.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2006-02-25 03:23
    Andre, thank you very much for the offer!

    I looked through the documentation you let us have at the Parallax seminar, and I must say there is A LOT in there that would be great information to teach our students (always the educational prospective for me [noparse]:)[/noparse]

    -Martin

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Martin Hebel

    Disclaimer: ANY Propeller statements made by me are subject to my inaccurate understanding of my limited time with it!
    Southern Illinois University Carbondale -Electronic Systems Technologies
    Personal Links with plenty of BASIC Stamp info
    and SelmaWare Solutions - StampPlot - Graphical Data Acquisition and Control
  • Agent CobaltAgent Cobalt Posts: 88
    edited 2006-02-25 05:22
    A little off-topic I think, but anyways, I must say I'm impressed with what I've read on the Hydra just about 5 minutes ago. A gaming system with full duplex network capabilities and that with some work could even do 3D! freaked.gif I like the size and look and can't wait to get my hands on one to mess with so great job Andre and keep up the good work!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truth can be dangerous... Trust can be deadly.
  • AndreLAndreL Posts: 1,004
    edited 2006-02-25 06:02
    Ok, cool. Let me see if I can cut this code a little more, I think I have 45 lines of ASM that do the whole graphics demo and then I will post it along with a video/screen shot of what it looks like. I am trying to keep it readable and NOT clever, I hate cryptic clever code.

    As far as the networking, its basically a twisted pair serial comm system with 4 lines, uses phone cable that have 4 conductor, two are used as signal, 2 as ground returns to reduce noise, I have tested it up to 1.5Mbit at 100 meters works fine, then at 300 meters you flip a switch "network noise filter" and it dampens the reflections, so these potentially could be networked all over the place, used as video outputs, whatever, of course, the real fun will be adding some simple Zigbee networking or simialr to the expansion slot and doing wireless networked games. I plan to develop a ton of add on cards for this one and I am sure parallax will as well.

    And in reference to the Hydra, I haven't started my shameless promoting of it yet, but I will [noparse]:)[/noparse] However, I designed it to be small, cool looking, and such that an enclosure could be made in the near future, there have been no discussions about this and I am one that never likes to get ahead of myself, right now, my goal is to SHIP. But, we definitely may create a molded enclosure for it as an add on at some point to give it a "console feel", thus I designed everything so that access would be easy to plug things into it etc. if it was enclosed, but the black PCB with chrome art and blue LEDs does look cool --

    Anyway, back to work, but I will post this stuff after the weekend --

    Andre'
  • Agent CobaltAgent Cobalt Posts: 88
    edited 2006-02-25 06:09
    Sounds cool. Like the fact that there might be addon cards as well as a molded enclosure. Can't wait to see the code and video or screenshot. roll.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truth can be dangerous... Trust can be deadly.
  • inakiinaki Posts: 262
    edited 2006-02-25 13:29
    Andr
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2006-02-25 13:40
    Quoting myself... "It makes for really boring electronics education"... though from a signal perspective and video generation it does make some really good lessons for those same students!

    -Martin

    Post Edited (Martin Hebel) : 2/25/2006 2:01:49 PM GMT
  • AndreLAndreL Posts: 1,004
    edited 2006-02-25 14:34
    The XGS is about console design, the processor is almost irrelevant, it could have been an AVR, PIC, 6502, but since I wanted the CPU to drive the video, I needed something fast that wasn't too complicated, the SX was the cheapest processor I could find with near ARM performance, but without the headache's and toolchain issues that come with ARM. The point was that every electronic system on the XGS is analyzed etc. The book that comes with it goes over all the design of it. The Hydra is about an application of the PChip, but more importantly about parallel programming and multicore thinking using game development and graphics as a platform that is interesting and gives you immediate visual feedback.

    Thus, I won't be explaining how the power supply works or the this and that, it will all be about software. As far as complexity goes, the SX is probably a more "complex" chip to work with, considering the bizarre memory mapping and paging alone is a nightmare, also although I like that it has built in debugging support, it is VERY complicated to actually get to work, so the PChip is more RISC like I would say, its a more simplified chip from a programming perspective. And the added video hardware is nice. Although, there is a lot to be said for having one large 4K word chunk of memory on the SX that can run a single ASM program, the tradeoff on the PChip is you have 8 processors that can all run 512 instructions. So they both have their pro's and con's. But, the de-coupling of seperable tasks on the PChip via multiprocessing is very nice, writing a multitasking real-time app like a game on the SX is a challenge, coordinating the video kernal and game logic in the same thread is not trivial, but with the PChip you can seperate them which is "just enough" to make it doable by mortals. The XGS is a real challenge to code for and people that master it are surely paid back 10 fold for their perserverance. I think the PChip is a lot easier to get something out of, getting high performance large apps out of it is tricky and out of the box thinking is needed for applications that are "large" like games, but small applications that do motor control, process control, DSP, etc. will be very easy to implement in 512 instructions in ASM, thus the problems that come large programs and overlays, etc. don't have to be dealt with. But, all those problems go away with a simple overlay loader which we already wrote, and or a compiler that targets directly to ASM with a built in overlay loader.

    Andre'
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2006-02-25 14:48
    Andre', one question I have is that someone else noted their is no ability to secure the memory, such as lock bits, etc. From your perspective as a developer, do you feel this will hinder its acceptance by industry where they want the code to be secure and proprietary?

    I can't imagine if much is done in Spin that the memory contents would be of much use. It's like having a BASIC Stamp and wanting to know what the program on it is.... not much there to see without knowing Parallax's interpreter, though the ASM will be fairly easy to retrieve. Would it be possible to create a Spin program to read encrypted EEPROM memory and dump it directly into the cogs to keep that code secure?

    I'm happy with open source, just curious from an industry perspective.

    -Martin

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Martin Hebel

    Disclaimer: ANY Propeller statements made by me are subject to my inaccurate understanding of my limited time with it!
    Southern Illinois University Carbondale -Electronic Systems Technologies
    Personal Links with plenty of BASIC Stamp info
    and SelmaWare Solutions - StampPlot - Graphical Data Acquisition and Control
  • AndreLAndreL Posts: 1,004
    edited 2006-02-25 16:43
    Its impossible to encrypt data on the PChip since the Pchip runs off an EEPROM, thus the EEPROM can always be invaded. The only way to run secure code is to download the program into the PChip while powered, then remove the EEPROM, this could be done electronically via a transmission system. But, there is no way to "lock" the Pchip data since there is NO PChip data, its always external and simply loaded into the RAM during boot. Thus, in an industrial sense, the option would be to either do as I said, or some modicum of protection would be to encapsulate the PChip and its behavioral EEPROM in a substrate and do not expose the SDA/SCLK pins and then this would be a bit of a problem, they would have to get into the substrate to gain access to the EEPROM at least. And at least destroy a few units until they got the pins an could read the data.

    On the positive side, all they are going to get is the binary out of it, and they could dissassemble it and then rework it, but that's about it, at least they wouldn't have to own the source, and thus they would have to "work" to understand it, which is borderline "reverse engineering" anyway, so if they work that hard to steal something then they probably could have made it anyway [noparse]:)[/noparse]

    Andre'
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2006-02-25 16:54
    I guess they could just black-box it and encapsulate the IC and EEPROM in a hard resin, lol. Not much of a heat issue that anyone has noted yet!

    Thanks Andre' !

    -Martin

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Martin Hebel

    Disclaimer: ANY Propeller statements made by me are subject to my inaccurate understanding of my limited time with it!
    Southern Illinois University Carbondale -Electronic Systems Technologies
    Personal Links with plenty of BASIC Stamp info
    and SelmaWare Solutions - StampPlot - Graphical Data Acquisition and Control
  • AndreLAndreL Posts: 1,004
    edited 2006-02-27 10:57
    I haven't used the file attach functioanality of this web board, so·I hope this works. In any case, there are two files; the source hel_gates_002.spin and a Windows Media clip of it running for a couple seconds hydra_vsu_demo_01.zip. The program is well documented and should give you a flavor of a very minimal app that generates video. If this doesn't work then their will undoubtedly be a post immediately after this with a web link.

    Andre'
  • Eric REric R Posts: 225
    edited 2006-02-27 11:20
    Thanks for posting the code. There really is going to be a learning curve for us using stamps.
  • Kaos KiddKaos Kidd Posts: 614
    edited 2006-02-27 15:48
    Ok...
    ... Just one word...
    ...WOW....

    I'm humbled. Just looking at the code...
    I sure al ALL hope there's an object in Spin where we can just set it up, and send it output...
    [noparse]:)[/noparse]
    It's either that, or I've got a REAL long road in front of me..
    Thanks for posting that code Andre', It was a real eye opener.

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

    Just tossing my two bits worth into the bit bucket
    KK
    ·
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-02-27 15:56
    Keep in mind that there is a video object that will let you use Spin code to create color text/graphics displays.· The attached image shows video using that driver, with the control of what's displayed written in Spin.

    attachment.php?attachmentid=40497

    Andre' does a lot of high-performance (way cool) stuff for gaming, so you have the opportunity to get video going in any manner you need.· Thankfully for us mortals, we have super-human programmers like Chip and Andre' to build neat, very usable, objects for the rest of us.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Kaos KiddKaos Kidd Posts: 614
    edited 2006-02-27 16:12
    Jon, was the SPIN code for that video posted someplace as well?
    or maybe even better, the spin code used to create the same demo Andre' made.
    For some reason, maybe the lack of coffee or a long LONG senior moment, I'm just not grasping it...

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

    Just tossing my two bits worth into the bit bucket
    KK
    ·
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-02-27 16:26
    No, neither the Spin (send text and graphics to display)·or Asm (video driver) code for that demo has been made available yet -- they'll come with the release.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Kaos KiddKaos Kidd Posts: 614
    edited 2006-02-27 16:35
    /me Smiles...
    No, I truly wasn't tryin to get around that whole release thinggie...
    But, now that you meationed it...

    ...Wait, you already answered it too... Ok, I'll wait...
    [noparse]:)[/noparse]

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

    Just tossing my two bits worth into the bit bucket
    KK
    ·
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-02-27 16:42
    Chip wrote those demos -- you'll have to try your sweet-talking on him, though he may want to add more features, hence holding off for the official release.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Agent CobaltAgent Cobalt Posts: 88
    edited 2006-02-27 19:03
    I just got the opportunity to see the code posted by Andre and I must say wow! I haven't touched any assembly in a long time and I think it's about time to brush up on it. Though transitioning from the basic stamp to the propeller will probably be a little harder than SX to propeller, but it's going to be well worth the work. This just makes me anticipate the release of the propeller even more. roll.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truth can be dangerous... Trust can be deadly.
  • AndreLAndreL Posts: 1,004
    edited 2006-02-27 20:18
    As Jon noted the idea is to write libaries and not worry about it. If you don't want to program in ASM then doing graphics with spin or any library will be as easy as:

    graphics.plot(x,y)

    done [noparse]:)[/noparse]

    But, if you want to do high performance graphics and games then you have to write all the graphics, sound, etc. stuff with bleeding edge game / graphics programming techniques just like any game programmer would. However, the point is that there are objects already that are included from Parallax and us that do basic graphics, etc. so you don't have to worry about it.

    Andre'
  • Agent CobaltAgent Cobalt Posts: 88
    edited 2006-02-27 20:37
    Well thing is I don't think I'll be doing basic graphics. I'm looking more along the lines of a 2D RPG in isometric or just an above view. So reading in tiles and sprites and animating I'm guessing won't be under the scope of the objects made by Parallax. burger.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truth can be dangerous... Trust can be deadly.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-02-27 20:43
    The good news for you is that Andre' and his team are doing some really amazing stuff and when the Hydra game station is released you'll have full access to that coolness.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Agent CobaltAgent Cobalt Posts: 88
    edited 2006-02-27 20:48
    Yeah. I'm looking forward to the Hydra just as much as I am the propeller. roll.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truth can be dangerous... Trust can be deadly.
  • Kaos KiddKaos Kidd Posts: 614
    edited 2006-02-28 16:27
    Ok, special hardware / connections for the video output. I think I saw a composit output on the pictured demo board. Just ground and a pin?

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

    Just tossing my two bits worth into the bit bucket
    KK
    ·
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-02-28 16:36
    For color composite video out you need three pins, three resistors, and an RCA jack:

    · A12
    [noparse][[/noparse] 1.1k ]
    *
    > composite out
    ····················· · |
    · A13
    [noparse][[/noparse] 560· ]
    *
    ······················· |
    · A14
    [noparse][[/noparse] 270· ]
    +

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • KenLemKenLem Posts: 94
    edited 2006-02-28 17:00
    What additional components are required to broadcast video?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.speechchips.com

    Speech & Video IC's for BasicStamps
Sign In or Register to comment.