Shop OBEX P1 Docs P2 Docs Learn Events
Asteroid_Demo_013.spin on Prop Demo Board? — Parallax Forums

Asteroid_Demo_013.spin on Prop Demo Board?

azmax100azmax100 Posts: 173
edited 2007-07-13 02:47 in Propeller 1
Hi all

I am a self learner. Just start with the propeller few weeks. I have with me Andre's book for·the hydra and Prop demo ·board. Just started with experiment1 in the book. After changing the clkmode & xinfreq the demo upload right. I can see the graphic on my screen but I can't get the mouse to work. I know it's about different pin assign to hydra for the mouse.

Pls help me·to clear this?

I don't want to waste my money for the hydra board just for a simple problem like this.

I know theres somebody out there can help me out.


Thanks In Advance.

Comments

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2007-07-04 11:00
    Hydra's mouse and keyboard drivers use 4 pins each, while Parallax uses 2 pins each. Essentially, the Hydra was just more conservative in its approach due to its earlier development.

    So you have to sort out which configuration and associated driver you are going to use.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Everything in the world is purchased by labour; and our passions are the only causes of labor." -- David·Hume (1711-76)········
    ···················· Tropically,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2007-07-04 11:03
    The enclosed attachment should help clarify·your problem.

    I would like to say that if your are really into developing games, the Hydra with text is a good value.· Having the option to hot plug EEPROMs and being able to plug in NES controllers are quite useful.· And of course, all the example code is tested for that board.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Everything in the world is purchased by labour; and our passions are the only causes of labor." -- David·Hume (1711-76)········
    ···················· Tropically,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • ClemensClemens Posts: 236
    edited 2007-07-04 18:41
    I don't have the HYDRA CD since I wasn't originally interested in game design when I bought the propeller. (didn't even know it was powerful enough for these kind of tasks.)
    But the Asteroids Demo can be downloaded in the object exchange, so if it is the same version that you are using then here's what to do to get the·application to run on the demoboard:

    CON
    · _clkmode = xtal1 + pll8x·······
    · _xinfreq = 5_000_000 + 0000·

    tvparams
    · long··· %001_0101······ 'pins··

    · (and·if you have a··PAL TV)
    · long··· %0001·········· 'mode

    ok, you knew that already, but maybe others will apreciate it.
    To get the mouse to work, you have to use the mouse.spin, instead of the HYDRA mouse Driver:

    OBJ
    · tv··· : "tv.spin"········· ' instantiate a tv object
    · gr··· : "graphics_drv_010.spin"··· ' instantiate a graphics object
    · mouse : "mouse.spin"·· ' instantiate a mouse object

    mouse.spin expects two parameters (the two mousepins)·instead of one(the first of the four mousepins on the HYDRA), so change the mouse.start command in the PUB-section:

    PUB
    · mouse.start(24, 25)

    the mousedriver seems to be larger than the HYDRA mouse driver.
    Now I don't yet understand enough of spin and assembler to really know how to rewrite those drivers but I found, the demo works if you assign less colors:

    VAR
    · long· colors[noparse][[/noparse]12]··············· ' color look up table·

    now the mouse should work, at least it does on my poor-man's demoboard made from a propstick USB (The most beautiful yet most neglected device of the propeller family :-)).

    @All you REAL Programmers out there:
    I hope it was not too foolish, doing it that way...




    ·
  • azmax100azmax100 Posts: 173
    edited 2007-07-06 05:49
    Thanks Clemens for the guide.

    After changing the mouse object and asigned to the right input/output pin for the mouse it's work great.

    I am not·really into developing games. just to have some idea and knowledge on the graphics. That's why i did'nt purchase the hydra. The Prop Demo Board is just nice for me event with 32K eeprom at least for now.

    Thanks to all of you who have responded.
  • AndreLAndreL Posts: 1,004
    edited 2007-07-11 00:42
    Games are the key to the universe [noparse]:)[/noparse]

    Andre'
  • azmax100azmax100 Posts: 173
    edited 2007-07-13 02:47
    Hi Andre,

    Aggreed with you. I myself have been palying game since the plumber ( mario) era. After that the sega 16 bit,playstion 1 & 2 and know i have the xbox 360. Just purchase it few weeks ago. If to compare the graphics and gameplay the latest are the best with almost realistic graphic.

    I am not really into game development cause my interest are more in robotics but the documentation you've provide for the game developement are very much welcome as it can be an additional accessories for the robotic platform. Just imagine if we can show the emotion of the robot through the graphic engine or other information that can be displayed.

    Your another thread for the graphics documentation are very much welcome as a novice in this mcu world we really need all that.

    By the way· i would like to suggest you to write a book that are focus more to novice with alot more details on every section. I will definitly buy it. I know theres a lot of novice programmer out there are waiting for something like this.

    Thanks & regards

    Azmi.
Sign In or Register to comment.