Shop OBEX P1 Docs P2 Docs Learn Events
Hacking Andre's book... — Parallax Forums

Hacking Andre's book...

rjo_rjo_ Posts: 1,825
edited 2008-02-28 03:12 in Propeller 1
The number of ah-ha moments per hour in reading Andre's book is astounding... and I have been studying what is available as best I could for a while now.

I have something of a fixed schedule. Everyday I wait in my car for about a half hour for my son's bus to get home... and I sit there playing sudoku or trying to find something to read or re-read. Andre has taken care of that... actually having a book in front of me of this kind of quality is an amazingly refreshing. And please allow me to say just how charmed I was to come over to this forum


I've seen some of the really cheap shots that the book cover has taken... and I was thinking that what Andre should do is rename the book and break it up into about 5 volumes for $29.95 each and put a carbon fiber cover on it[noparse]:)[/noparse]

On the serious side, I would like to share an "ah-ha" moment with you guys. There has been this constant, almost insane conversation about the merits of using the Prop for parallel processing and the relative power of the system.

I am basically a graphics guy... but I'm not formally trained. So there is a lot that I don't know, but I've done a fair bit of my own development and this I do know... there are lots algorithms that will interest you guys that will fit quite nicely into a parallelized Prop system. I haven't put one together because up until the last week there hasn't been any way to get images into the Prop of any real quality. That has now changed.

I can tell you flat out... that it is more than possible to put a very simple prop system together that will run rings around a Mac G5 doing the same algorithm in Java.

The "ah-ha" moment came to me when I was reading Andre's explanation of the VGA signal... and it became obvious that we can use the same lines and basically the same software approach to stream data down a parallelized pipe line... which makes really advanced 3D display/analysis, basic image processing, etc. etc. within easy grasp.

Saying it and doing it are two different things... but I'll be doing it and putting it here.

Thanks Andre.

Rich

Comments

  • mparkmpark Posts: 1,305
    edited 2007-12-12 07:23
    rjo_ said...

    I can tell you flat out... that it is more than possible to put a very simple prop system together that will run rings around a Mac G5 doing the same algorithm in Java.

    The "ah-ha" moment came to me when I was reading Andre's explanation of the VGA signal... and it became obvious that we can use the same lines and basically the same software approach to stream data down a parallelized pipe line... which makes really advanced 3D display/analysis, basic image processing, etc. etc. within easy grasp.

    Saying it and doing it are two different things... but I'll be doing it and putting it here.

    Intriguing! I don't know what you're getting at, but I'll be watching this thread with bated breath.
  • BaggersBaggers Posts: 3,019
    edited 2007-12-12 12:11
    yeah rjo_ what wonderments are you cooking up for us?
  • AndreLAndreL Posts: 1,004
    edited 2007-12-29 22:28
    Thanks. The VSU is just a serial unit and can stream data. I think I alluded to the fact that it can be used for a lot of things like sound, digital video, etc. in the book. I haven't seen anyone do it yet, but I did experiments using it as a sound output for PCM, so that's another great use for it along with an SD card (which I am inches away from shipping) turns the hydra into a MP3 player with the right code.

    Andre'
  • OzStampOzStamp Posts: 377
    edited 2008-01-04 12:33
    Hi Andre.

    I have managed to work partially (1/2) thru the book and have picked up so many pointers..
    There are soo many questions asked here continously that are all answered by your master piece.
    (mainly in the Propeller Forum)
    So everybody that reads this message .. if your serious about getting to know the Propeller inside..out
    do yourself a favour and buy the book or even better the Hydra Game full kit.
    I just wish I had more time to play...

    cheers Ron Mel OZ

    Post Edited (OzStamp) : 1/4/2008 11:58:17 PM GMT
  • AndreLAndreL Posts: 1,004
    edited 2008-01-16 02:44
    Thanks man. Whenever I write a book, I always try to put a lot of tangential information that if you read the book cover to cover you will learn about the core material, but then also get a lot of little cool tricks and insights. I basically, try to be the reader when I write a book and imagine what he is thinking and I don't "cheap out" like 99% of tech authors do that are too smart for their own good. I write books to be read, not to make them hard !

    Anyway, glad you liked it [noparse]:)[/noparse]

    Andre'
  • mosquito56mosquito56 Posts: 387
    edited 2008-02-12 06:35
    · I acidentally ordered a hydra manual. Best mistake I ever made. As I think I am stuck with t.v. output, buying Andre's book was a total eye opener.

    ·· I could use a little help in the color selection area. I read the manual cover to cover but alot of the algorithems I won't need so I just glanced over them. Maybe I missed something in terms of palletes etc. A page number would be a great help.



    Nice job Andre!!!!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ······· Q. What do you get if you put a trs-80 in a steambath?

    ······· A. A propchip with an attitude
    ······· "What do you mean, it doesn't have any tubes?"
    ······· "No such thing as a dumb question" unless it's on the internet

    Technologically challenged individual, Please have pity.
  • AndreLAndreL Posts: 1,004
    edited 2008-02-12 19:37
    The color stuff is in there and you need to look at the graphics section in game programming about palette matching. But, basically, there are a number of ways to do palette matching, but first you need a palette. Getting the palette isn't easy since you can either synthesize it ot compute it. To synthesize it many people simply put up all the colors on the TV and then frame grab the images and sample the colors, this works fine then you have the palette, but of course the resulting colors depend on your TV etc. The other method is to compute them as 22.5 degree increments around the color wheel (16 colors) and then with the varying luma values, but this is a complex calculation and again will be useless since the real TV will look different. I have done both methods. I find, just put up a palette, set your TV neutral, use that as a starting point.

    Then you need to convert your art to the palette, this is rather easy, you need to convert your palette into a 256 color palette in the format your tooks likes, which many just need a list of 8 bit RGB values. Then you bring in your art and then convert using whatever algorithm to the nearest color in your target palette. Then you will quickly see what looks good and bad, and what colors to avoid.

    That's about it really.

    Andre'
  • RinksCustomsRinksCustoms Posts: 531
    edited 2008-02-26 23:45
    The book is awesome, completely covers the chip & it's capabilities/limitations. As far as the parallel pipe theory goes for Video/VGA, the VSU's can't be sync'd with any kind of reliability to my knowledge, which makes the parallel pipe theory just that. I know in the prop forum (which i've been following pretty much since day one) alot have tried, but the best any one got was the 1024 high res driver, and someone even got a 32K image from an SD card up on a big scren TV with a gradient tile effect in the background.The brick wall lies in the hardware limits, limited onboard ram, inability to sync cogs/VSU's directly.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    E3 = Thought

    http://folding.stanford.edu/·- Donating some CPU/GPU downtime just might lead to a cure for cancer! My team stats.
  • deSilvadeSilva Posts: 2,967
    edited 2008-02-27 00:23
    I have posted that 14 times already during the last 6 months smile.gif
    And this is the wrong sub-forum - Rinks, Rjo, Mpark: Please post it in the Propeller Forum!
  • potatoheadpotatohead Posts: 10,261
    edited 2008-02-27 17:19
    Mosquito,

    How you pick colors depends on the driver being used. Some apply correction to the colors, others don't. Those are raw drivers, vs the Parallax ones.

    Have you tried the palette program that comes with the Propeller tool? It will show you values that work with the Parallax drivers. Once you know the color value, then you put it in the colors array to assign it to the tile, or tiles of interest.

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

    Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
  • AndreLAndreL Posts: 1,004
    edited 2008-02-28 03:12
    Exactly, depending on what driver you use you need to display all the colors in at least 16x16 or 32x32 pixel squares, so you can "see" the colors. Also, have your TV set neutral on the tint, dark with good contrast. And try on a couple sets first.

    And thanks for the compliments on the book. That was a difficult book to write since it had to be to newbies and veterans, game programming, hardware, software, and about a chip that "barely" existed when I was writing it.

    Andre'
Sign In or Register to comment.