Converting HYDRA specific programs to other boards
Oldbitcollector (Jeff)
Posts: 8,091
This thread is started for those that are considering buying the HYDRA or just the HYDRA book, this thread will give hints how to convert programs that are on the hydra CD and in the text to make sure they work on other propeller based boards.
Some guidelines:
If you are posting a how-to conversion of HydraCD programs, please do not post the entire .spin code as these are copyrighted works. Instead post the 2-5 lines that need to be addressed, or areas where code needs to be added.
This would be a good thread to discuss the differences in pin configuration between Hydra and other propeller products.
Thanks to Andre for encouraging this thread and discussion.
Oldbitcollector
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -Albert Einstein
Some guidelines:
If you are posting a how-to conversion of HydraCD programs, please do not post the entire .spin code as these are copyrighted works. Instead post the 2-5 lines that need to be addressed, or areas where code needs to be added.
This would be a good thread to discuss the differences in pin configuration between Hydra and other propeller products.
Thanks to Andre for encouraging this thread and discussion.
Oldbitcollector
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -Albert Einstein
Comments
(These are before the discussion of the HEL driver)
They can be altered slightly to make them run on other propeller-based boards.
Make the following changes: (Example /sources/hydra/screen_saver_10)
Near the top of the file: [noparse][[/noparse]clock settings]
Change:
to
Now, look a little further in OBJ section.
(Use the graphics.spin & tv.spin from the Propeller Library)
Change
to
Now scroll down the nealy the bottom of the file and look for this:
(Change video pins)
Change:
to
These changes can be done to several of the demos in the introduction to the "graphics" driver
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -Albert Einstein
If you want to play with the HEL_GFX_ENGINE* files, I've found the following changes get things up and running,
and makes the /sources/hydra/pacman_tile_demo* a lot more interesting. [noparse]:)[/noparse]
Open HEL_GFX_ENGINE_040 (Used in /sources/hydra/pacman_tile_demo_005)
Find in the CON section
Change it to:
Find (near the bottom) (Thank you Andre!)
Change it to:
(Proof that a million monkeys with a million propeller chips *could* write Shakespeare!)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The comments and code above are proof that a million monkeys with a million propeller chips *could* write Shakespeare!
Post Edited (Oldbitcollector) : 4/19/2007 2:31:15 AM GMT
I find the DEMO board more instructive at the moment and it is wonderful that all those
HYDRA programs can be ported over -- or at least many of them.
I have a problem with the HEL conversion listed, the suggested change of VIDEO_SETUP
to a new value has 9 bits instead of 8 -- discovered after I tried running it.· Could be
the problem???
Fred2
I've correctly the entry, and it *should* work correctly now. <fingers-crossed>
Oldbitcollector
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The comments and code above are proof that a million monkeys with a million propeller chips *could* write Shakespeare!
clean crisp multicolor sprites as well as music. I have this running using my Atari Joystick (on the VGA header) but I'm still working on cleaning up my joystick code. Anyway, here are some simple changes to get the graphics & sound up and running.
/sources/hydra/JTC_Xracer_010
Inital changes are very much like the first demo in this thread...
Change the clock settings to:
and the tvparms (pins) to (near the bottom of JTC_Xracer_010.spin)
For sound look for the following:
and change the 7 to a 10
This should get it up and on the screen. More later on controls..
Oldbitcollector
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The comments and code above are proof that a million monkeys with a million propeller chips *could* write Shakespeare!
of course but it is neat just showing the static scene!
Had to do some searching through the code, but it is a fabulous program -- could be studied
for weeks....
fred2
Andre'
One bit thing that the Hydra has over us Demo/Proto users is those nice NES ports built in.
Here's our chance to "come up to the Jones"
This file contains a drop-in snippet of code for those Hydra demos which use a PUB section
for reading the NES controls as well as a replacement gamepad_drv_001 for those that call
on it.
I've tested the snippet on the Xracer demo, the fire button alternates between START/SELECT
so it works with the button limitation. The additional gamepad_drv_001 has been tested with
the pacman tile demo and seems to work perfectly.
It's a little building, but for less than $10 worth of parts, in an hour you'll have game controls.
Let me know about bugs when you find them. [noparse]:)[/noparse]
Oldbitcollector
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The comments and code above are proof that a million monkeys with a million propeller chips *could* write Shakespeare!
Post Edited (Oldbitcollector) : 4/20/2007 5:11:27 AM GMT
/sources/hydra/RB_Tetis_010.spin
There are several things to do here, so take your time and knock them out one by one.
First as always, convert the clock settings in CON to:
Drop down to OBJ and adjust them to use the Propeller Library items, as well as Mike Green's comboKeyboard Driver.
Next dig out the key.start(3) and change it to: (It's in PUB start)
[noparse][[/noparse]Note the remerked mouse driver Hmm..]
Just when I thought I had Andre figured out on the NES controller thing,
I discover some of the code was only written for a single NES controller.
No worries, this one works fine.
Here's a replacement PUB that works well..
One more thing to change, tvparms...
Controls, joystick L/R to select level, button to start. L/R, UP=rotate, DOWN
There is keyboard and sound support, but for some reason I haven't gotten them right yet.,. more later
Oldbitcollector
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The comments and code above are proof that a million monkeys with a million propeller chips *could* write Shakespeare!
Post Edited (Oldbitcollector) : 4/20/2007 6:19:40 AM GMT
Ok, so you didn't build yourself an Atari Joystick Adapter yet.. Here's some additional code to get the keyboard working.
Look for this section:
Add the following two controls...
Right/Left Cursor = Select Level, Enter to start, SPACE to rotate.
Enjoy
Oldbitcollector
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The comments and code above are proof that a million monkeys with a million propeller chips *could* write Shakespeare!
Jim
it's sad because these source codes are really a marvel to read, but no more hardware supports that.