Shop OBEX P1 Docs P2 Docs Learn Events
Building a game w/o HYDRA — Parallax Forums

Building a game w/o HYDRA

Dan TaylorDan Taylor Posts: 207
edited 2009-04-16 18:55 in Propeller 1
Could I possible build a simple game like the ones in the HYDRA kit with just a propeller board and the accessories kit?
Using the keyboard for keys and the Display for the computer screen?
Thanks for any help!

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dan Taylor

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-04-15 05:29
    Most of the games in the Hydra Kit only use the TV display and keyboard. The Protoboard accessory kit doesn't provide a TV output, but it's easily added by following the schematic for the Demo Board and providing the three or four resistors and RCA jack needed.

    The Hydra uses a 10MHz crystal and the PLL8X clock mode. The Demo Board uses a 5MHz crystal and the PLL16X clock mode. You just have to change two lines in the main object of the program you want to use (from _xinfreq = 10_000_000 to _xinfreq = 5_000_000 and from _clkmode = xtal1 + pll8x to _clkmode = xtal1 + pll16x).

    The keyboard in the Hydra is wired differently from the keyboard in the Protoboard and Demo Board. Just substitute the proper keyboard driver from the Propeller Tool library rather than the one that comes with the Hydra. It looks the same to the program that's using it.
  • trodosstrodoss Posts: 577
    edited 2009-04-15 14:10
    Baggers has ported some some excellent games that (with the modifications mentioned by Mike Green) work well on a ProtoBoard.· These games use TV output, so slightly different hardware (the RCA jack and the resistors mentioned).·

    JetPac

    http://forums.parallax.com/showthread.php?p=677015



    Maniac Miner

    http://forums.parallax.com/showthread.php?p=649775



    If you were wanting only to use the accessories kit parts (meaning VGA output), there is at least one game that does this:

    Progue (Rogue clone)

    http://forums.parallax.com/showthread.php?p=655083



    If you look at the "PROJECTS master list" thread, you will find quite a few projects/examples that may help you.



    If you haven't already, you might want to take a look at the Propeller Cookbook (by OldBitCollector) which has the schematicts for simple·video/audio.

    http://ucontroller.com/Propeller%20Protoboard%20Designs%20for%20the%20Beginner.pdf

    Post Edited (trodoss) : 4/15/2009 2:41:38 PM GMT
  • Dan TaylorDan Taylor Posts: 207
    edited 2009-04-15 16:11
    I opened up some of the links on your post and the links that the project uses just send me to a page with jibble and jabble.

    Like this one: http://www.jimbagley.co.uk/JetPacHybrid.binary

    I am expecting the code. Do you have to translate it or something?

    Thanks!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dan Taylor
  • OwenSOwenS Posts: 173
    edited 2009-04-15 17:10
    The .binary is the clue here - it's a compiled binary. As to whether JetPac's source is available - I do not know
  • Dan TaylorDan Taylor Posts: 207
    edited 2009-04-15 17:26
    How would I get it to propeller coding?

    Mr. Green,
    You said to substitute the proper keyboard driver from the Propeller Tool library rather than the one that comes with the Hydra. Do you mean the keyboard program? If so, the one I tried has a PUB subroutine that is not included in the propeller keyboard program. What do I do?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dan Taylor
  • trodosstrodoss Posts: 577
    edited 2009-04-15 21:34
    Dan Taylor said...
    I opened up some of the links on your post and the links that the project uses just send me to a page with jibble and jabble.

    Like this one: http://www.jimbagley.co.uk/JetPacHybrid.binary

    I am expecting the code. Do you have to translate it or something?

    Thanks!

    If you were looking for the code for JetPac, it is buried in a link to another thread, then a link to a website:
    http://www.jimbagley.co.uk/JetPacSource.zip

    It sounds like the .binary question has already been answered, however·I thought I might mention that if you have an SD card adapter and/or put an SD card adapter yourself (The Propeller Cookbook has an example of a DIY SD card adapter) you could load the .binary file onto an SD card and run the binary from PropCMD/PropDOS.· That is usually the intent when someone distributes a .binary file (without distributing the source code).

    Dan Taylor said...
    You said to substitute the proper keyboard driver from the Propeller Tool library rather than the one that comes with the Hydra. Do you mean the keyboard program? If so, the one I tried has a PUB subroutine that is not included in the propeller keyboard program. What do I do?
    What Mike was referring to was the Keyboard.spin file that exists in the \Propeller Tool v1.x directory of the install.· In order to substitute the keyboard functionality, you would find the OBJ section of the code, and change what is specified there.· If the filename is the same (Keyboard.spin -- "PS/2 Keyboard Driver"), you would just need to replace the file in the directory of the code you are compliing (assuming it is not in the default install directory of the Propeller Tool).

    Some of the code examples that you will find posted have a file named comboKeyboard.spin, which allows you to specify a starting pin in the 'start' method.· If you changed this value (13 for a Hydra, or 26 for a ProtoBoard), this would allow you to change the setting for a particular configuration.

    Some of the projects that are mentioned in the 'sticky' thread have CON sections that have particular settings specified (Hydra, Hybrid, Proto/Demo Board).· All you have to do on those is uncomment the setup you have and comment out the others and recompile.

    Post Edited (trodoss) : 4/15/2009 10:04:12 PM GMT
  • Dan TaylorDan Taylor Posts: 207
    edited 2009-04-16 01:03
    In the link you posted, the SpectrumFont.bin file is in binary as well. Do I have to buy a SD card adapter do get it to work? Or is there some other way? I would really like to not have to buy anything, If you know what I mean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dan Taylor
  • BaggersBaggers Posts: 3,019
    edited 2009-04-16 13:05
    Jetpac doesn't need SD, it's all contained in the binary [noparse];)[/noparse]

    http://www.jimbagley.co.uk/JetPacHybrid.binary

    Right click and do save as.

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



    Post Edited (Baggers) : 4/16/2009 1:13:16 PM GMT
  • trodosstrodoss Posts: 577
    edited 2009-04-16 14:29
    Dan Taylor said...
    In the link you posted, the SpectrumFont.bin file is in binary as well. Do I have to buy a SD card adapter do get it to work? Or is there some other way? I would really like to not have to buy anything, If you know what I mean.

    If you are talking about the source code, the "SpectrumFont.bin" is included when you compile in the DAT section at the bottom of JB_Spectrum_JetPac_001.spin

    Other than compiling the code, and having it download to the Propeller, there are other ways of loading binaries to RAM/EEPROM·(the SD card interface is just an alternative, by no means the *only* way).·

    If you haven't already, you might want to look at/download PropTerminal
    http://forums.parallax.com/showthread.php?p=649540

    PropTerminal can load.binary files to the Propeller, along with several other really nice features.· [noparse][[/noparse]Edit:] It can also display TV/VGA output on your computer, but be sure to read about what objects are compatable with the ones you have to use in order to view output on your PC.

    Hope that helps.

    [noparse][[/noparse]Edit:] I understand where you are coming from as far as not wanting to spend a lot of money on the effort.· If I understand correctly you have a ProtoBoard and the "Propeller Proto Board Accessory Kit."· If that is the case then you will most likely want to look at all the VGA-oriented code in either the OBEX or included with the Propeller Tool.· There are not as many examples (that I know of) for VGA games.· Definately look in the forum for anything you might be able to look at/use.

    Honestly, I have VGA output on·the Demo Board that I bought when I started coding on the prop and have barely used it (usually only when I see clever new code being posted that uses VGA).· Every Prop-based project I have built has used either serial I/O·or video output.

    If you don't mind spending a little extra on a few resistors and then either an RCA jack, or just stripping an old A/V cable down to "bare wire" and soldering a simple video output, it will allow you to see (and use) a lot of pre-existing game oriented code.

    --trodoss



    Post Edited (trodoss) : 4/16/2009 3:42:17 PM GMT
  • Dan TaylorDan Taylor Posts: 207
    edited 2009-04-16 17:33
    Yes, I was talking about the "SpectrumFont.bin". What do you mean that it·"is included when you compile in the DAT section at the bottom of JB_Spectrum_JetPac_001.spin" I am a little confused. confused.gif



    About the PropTerminal how·do you work it? When I run it it just says no·COM Port detected.·
    ·
    Sorry, I am a little slow sometimes. lol yeah.gif

    [noparse][[/noparse]Edit]: I figured it out! I know this is going to sound dumb. But... I forgot to move the files into the propeller files... tongue.gif· I got it working! Thanks tons you guys!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dan Taylor

    Post Edited (Dan Taylor) : 4/16/2009 5:45:06 PM GMT
  • BaggersBaggers Posts: 3,019
    edited 2009-04-16 18:44
    yay, well done [noparse];)[/noparse] enjoy!

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

    ·
  • trodosstrodoss Posts: 577
    edited 2009-04-16 18:55
    @Dan,
    Glad to see you were able to figure out your issue, and hopefully have at least one game working on your ProtoBoard.

    If you are looking for "future upgrades" (such as audio, gamepad, or SD support), definately look at OldBitCollector's Propeller Cookbook. There are quite a few useful schematics for building a DIY console or SBC (single board computer).
    http://ucontroller.com/Propeller%20Protoboard%20Designs%20for%20the%20Beginner.pdf
Sign In or Register to comment.