November 01, 2024, 02:37:40 PM

News:

Be sure to checkout our Vixen interfaces in the Library forum -- if you want PC automation at near zero cost, EFX-TEK and Vixen is a great combination of tools.


Buzzy Bee Redemption Game--Prop-2 program

Started by jukingeo, April 14, 2010, 09:32:00 PM

Previous topic - Next topic

jukingeo

April 14, 2010, 09:32:00 PM Last Edit: April 15, 2010, 10:31:29 PM by jukingeo
Updated: 4-16-2010 to correct for errors in the main FOR/NEXT loop.  Also considerably increased the  65 second time limitation in the same said loop.

Hello all,

It has been a while since I posted a program here as I been on hiatus for a while, but I am back with an interesting project.  Since I am interested in coin-op games and equipment, I decided to base a redemption type game using a Basic Stamp (prop controller).  Since I have experience with coin-op machines prior, I do have many arcade game parts to work with.  The game of choice was one that I saw my kids playing at the local Chuck E. Cheese.

This is what it looks like:

http://www.weinerd.com/images/brochures/buzzybee.jpg

In a nutshell, you put a coin in the game and music starts to play as a blower fan starts up and circulates ping pong balls in a tank (much like the money machine).  The balls are painted with black and yellow strips to simulate 'bees'.  There is a funnel type 'catcher's net' that you can move it in all directions via a universal joint that has the net's handle extend out of the cabinet.   the goal is to 'catch' a bee and put it in a 'honey pot' mounted on the left rear side of the enclosure.  Each time a 'bee' is placed in a pot, a sound is made and the score counter is incremented.  The game continues until a timer shuts off the fan and the music.  Then tickets are paid out based on how high the score is.

The game cabinet does have flashing lights on it that are activated during play and also via an attract mode.

After watching/playing the game several times, I realized that this could be something that can be made utilizing a Prop-1 controller, an AP-8 and an RC-4.   Given that I don't own a Prop-1 but a Prop-2 instead, I decided to sit down and tackle the code for this game.

Now I have not tested it as of yet as I have my controllers put away, but I am going to go through my boxes and dig them out this weekend.  I figured I would post the code here in case someone might have suggestions and/or corrections as I am SURE I made some errors here.

Take a look at the code now and then come back up here.

Now I have a couple of questions.  As far as I recall I believe the largest number you can put into a variable for a Prop2 is 64k, correct?  Given my main timer loop this would mean that I really cannot create a timer loop that is more than 64 seconds long.   Now I know that I could just gang up PAUSE commands to get longer times, but this program can't have long pause commands due to the fact that it is constantly looking at the TriggerB pin for an input level of 1 to increase the score count.  So the question would be how to get around the 64k variable limitation?  While 1 min is acceptable for a timed run on this game, I DID mention that I would be interested in writing this program for a Prop-1 and I don't know what the upper number limit is on the Prop-1.  I could imagine it is much less than the 64k limit for the Prop-2.

Next questions are on the AP-8.   I am assuming that the AP-8 can play only one sample at a time. So would I be correct in saying that if a sound is playing and it receives an instruction to play another sound back, it would stop playing the first sound first, correct?

Another AP-8 question.  If you time the music perfectly from the time the song starts 'on the beat' and you end it 'on the beat' would it loop seamlessly or will there always be some kind of hiccup at the loop point?

That'll be all!

Thank You




' =========================================================================

'

'   File...... Buzzy Bee Redemption Game.BS2

'   Purpose...

'   Author.... Geo M

'   E-mail....

'   Started...

'   Updated...

'

'   {$STAMP BS2}

'   {$PBASIC 2.5}

'

' =========================================================================





' -----[ Program Description ]---------------------------------------------

' This program mimics the operation of the Buzzy Buzzy Bee redemption game.

' The Buzzy Bee game centers around catching ping pong balls that are circ-

' ulated around an enclosed tank via a fan. The ping pong balls are striped

' yellow and black to mimic 'bees'.  You catch the floating bees using a

' plastic 'net' on a long shaft that is connected via a universial joint like

' mount that has a handle on the outside of the cabinet.  The caught 'bees'

' are placed in a honey jar container that is on the left side of the play

' area.  The score is incremented for each 'bee' caught.

'

' The game is run on a timed basis which starts after a coin is inserted.

' Music plays in the background as the game is in progress. When the time

' is complete the fan shuts off, the lights turn off, and the music stops.

' Finally a ticket dispenser pays out a number of tickets based ON the

' final score. The game then enters an 'attract' mode awaiting another coin.

'

' Note: The light flash pattern is different for attract v.s. game play.



' -----[ Revision History ]------------------------------------------------





' -----[ I/O Definitions ]-------------------------------------------------



Sio             PIN     15                      ' for AP-8, no ULN or SETUP

TriggerC        PIN     14                      ' SETUP = DN-Coin Slot

TriggerB        PIN     13                      ' SETUP = DN-Score Increment



ScoreInc        PIN     8                       ' Scoreboard increment pulse

Ticket          PIN     9                       ' Ticket Dispenser

CoinIns         PIN     10                      ' Insert Coin LED (lamp)

ScoreClr        PIN     11                      ' Clears Scoreboard



' -----[ Constants ]-------------------------------------------------------



IsOn            CON     1

IsOff           CON     0



TimerMult       CON     9                      ' game timer multiplier

                                               ' 1 = 10sec, 2 = 20, etc

TickInc         CON     5                       ' Ticket point award. E.G if

                                               ' set to 5, a ticket will be

                                               ' awarded for every 5 points



T2400           CON     396

T38K4           CON     6

Open            CON     $8000



Baud            CON     Open | T38K4





' -----[ Variables ]-------------------------------------------------------



timer           VAR     Word

delay           VAR     Word

timerloop       VAR     Word



music           VAR     Nib                     ' Set AP-8 to Loop Mode

chase           VAR     Byte

score           VAR     Byte

tickout         VAR     Byte





relays          VAR     Nib                      'Light chaser/ fan control

Cablmp1        VAR     relays.BIT0             ' RC-4.K0

Cablmp2        VAR     relays.BIT1             ' RC-4.K1

Cablmp3        VAR     relays.BIT2             ' RC-4.K2

Fan            VAR     relays.BIT3             ' RC-4.K3



' -----[ Initialization ]--------------------------------------------------



Reset:

 SEROUT Sio, Baud, ["!!!!!!!!AP8", %00, "X", "!RC4", %00, "X"]



 DIRH = %00001111



 timer = (10 * TimerMult)                   'Timer multiplier

 chase = 0                                     'Set lamp chase start at 0

 score = 0



 GOSUB All_Off





' -----[ Program Code ]----------------------------------------------------



Main:

 CoinIns = IsOn                                ' Turn on Coin Insert Lamp

 TriggerC = IsOff                              ' Clear Coin Trigger



Attract:

 IF (TriggerC = IsOn) THEN Run_Game            ' while waiting for coin



 chase = chase + 1 // 5                        ' Update cabinet light chase

   LOOKUP chase, [%001, %011, %111, %110, %100], relays

   GOSUB Update_RC4

 GOTO Attract



Run_Game:

 CoinIns = IsOff                               ' Turn off Coin Insert Lamp

 PULSOUT ScoreClr, 50                          ' Clears Scoreboard

 chase = 0                                     ' resets chase lights



 music = 0                                     ' Plays Music Clip at "0"

 GOSUB Play_AP8
                        'AP-8 is set to loop mode


 Fan = IsOn                                    ' Turn On Fan

 GOSUB Update_RC4



 FOR timerloop = timer TO 0                    ' Main timer loop

   IF (TriggerB = IsOn) THEN
       GOSUB Score_Keep
       ENDIF

   chase = chase + 1 // 3                      ' Update cabinet light chase

   LOOKUP chase, [%110, %101, %011], relays

   GOSUB Update_RC4
   PAUSE 100
   
 NEXT



 Fan = IsOff                                   ' Turn Off Fan



 GOSUB Stop_AP8



 Music = 7                                     ' Change To Chime



 GOSUB Play_AP8                                ' Play chime as ticket pays out

 FOR tickout= score TO 0 STEP TickInc          ' Ticket Payout

   PULSOUT Ticket, 50

   PAUSE 1000

 NEXT

 GOSUB Stop_AP8                                ' Shut down audio



GOTO Main                                      ' Rinse & Repeat





' -----[ Subroutines ]-----------------------------------------------------



Play_AP8:

 SEROUT Sio, Baud, ["!AP8", %00, "P", music]

 RETURN





Stop_AP8:

 SEROUT Sio, Baud, ["!AP8", %00, "X"]

 RETURN





' -------------------------------------------------------------------------



Update_RC4:

 SEROUT Sio, Baud, ["!RC4", %00, "S", relays]

 RETURN



' -------------------------------------------------------------------------



All_Off:

 OUTS = $0000

 relays = %0000

 GOSUB Update_RC4

 RETURN



'--------------------------------------------------------------------------



Score_Keep:



 PULSOUT ScoreInc, 50

 score = score + 1

 RETURN





' -----[ EEPROM Data ]--------------------------------------------------

bsnut

Geo M,
I looked at your code you posted and I don't see any problems with it. What, I will do for you is see how much EEPROM space you used. Did you see how much EEPROM is used, by using the Memory map in Editor Software? The Memory map gives you some idea how much space is left in EEPROM.

As I can recall the AP8 can only play one track at a time. Also RC4 is now as updated features, you can thank the great Jon Williams for this. Are you using a older verison of the RC4? If you are not, it wouldn't be a bad idea to get a new verison of the RC4, it as the new features on it.

On a side note this is a cool idea that you are doing. This takes me back to my aumusment park days when I worked for Six Flags as the full-time electrician.
William Stefan
The Basic Stamp Nut

bsnut

April 15, 2010, 07:27:10 AM #2 Last Edit: April 15, 2010, 07:47:08 AM by bsnut
Geo,
I just download your program and noticed that you are using only 14% of the 2048 bytes in the EEPROM. That is small for the Prop2. Here's the info on the Prop2:

Processor        Parallax BASIC Stamp 2
Speed (instructions per second)        ~4000
I/O Connections        16 + Serial
RAM (variables)        26 + 6
Program Memory (bytes)        2048
Program Length (instructions)        ~500
PBASIC Commands        42
Programming Connection        Serial, 9600 baud
Windows IDE?        Yes; Parallax
Mac IDE?        Yes; 3rd party

I also found minor bug in the program with the label "Score_Keep", it should been a GOSUB after the THEN in the IF/THEN statement, that way the program will return it just below IF/THEN statement with no problems.

Here's a way to create a timer loop that is more than 64 seconds long. They are three ways and they are.

1)The DO/LOOP UNTIL for BS2 and above

timer    VAR     Word

 DO
   IF (TriggerB = IsOn) THEN GOSUB Score_Keep
   chase = chase + 1 // 3                          ' Update cabinet light chase
   LOOKUP chase, [%110, %101, %011], relays
   GOSUB Update_RC4
     PAUSE 1000                                        '1sec
     timer = timer + 1
 LOOP UNTIL (timer >= 65)                        ' test after loop statements

2)The DO/LOOP WHILE for BS2 and above

Print_Stars:
 DO WHILE (timer < 65)                           ' test before loop statements
   IF (TriggerB = IsOn) THEN GOSUB Score_Keep
   chase = chase + 1 // 3                          ' Update cabinet light chase
   LOOKUP chase, [%110, %101, %011], relays
   GOSUB Update_RC4
      PAUSE 1000                                     '1 sec
       timer = timer + 1
 LOOP

3)The FOR/NEXT for BS1 and above

I will be happy to write a new program for you for the Prop1 and the Prop2 if you want. Just remember I'm not the great JonnyMac in programing. 

William "Bsnut"
 
William Stefan
The Basic Stamp Nut

JonnyMac

As Bill pointed out, you cannot simply jump to a subroutine (code that ends with RETURN); doing so screws up the return mapping and the program will probably misbehave.  For my part, I tend to be very verbose about this stuff and use this style:

IF (TriggerB = IsOn) THEN
  GOSUB Score_Keep
ENDIF


Also, you cannot clear an input with code -- for example, this line (and those like it):

TriggerC = IsOff                              ' Clear Coin Trigger

... are bogus.  These lines are actually writing the bit to the [disabled, due to input mode] output bit of the pin.

Yes, the AP-8 will stop what's playing and start a new command.  If you can start and end a sound on quiet space the looping of the audio can be masked; it's not perfect because there is an internal 25ms delay in the ISD chip, but that's very short in human terms and may go unnoticed.
Jon McPhalen
EFX-TEK Hollywood Office

jukingeo

Quote from: bsnut on April 15, 2010, 03:44:34 AM
Geo M,
I looked at your code you posted and I don't see any problems with it. What, I will do for you is see how much EEPROM space you used. Did you see how much EEPROM is used, by using the Memory map in Editor Software? The Memory map gives you some idea how much space is left in EEPROM.

Keep in mind, I did intend this program for a Prop-1, but I don't own one as of yet.  So the question of if this thing will even fit in the Prop-1 does come to mind.   I know for sure it will fit in a Prop-2 because I have written larger programs than this before.  It is just that I am a bit 'rusty' because I been on hiatus for a while.   I put my Prop-2 rig away when I moved and I have not taken it out as of yet.   Naturally in the interim other projects came down the pike.

QuoteAs I can recall the AP8 can only play one track at a time. Also RC4 is now as updated features, you can thank the great Jon Williams for this. Are you using a older verison of the RC4? If you are not, it wouldn't be a bad idea to get a new verison of the RC4, it as the new features on it.

Yeah, I had a funny feeling that the AP-8 can only do one sample at a time as I only see it being programmed that way and there was no indication of that it could have that function in the manual.   The main reason I asked is because the (real) game has the score being registered with a sound that plays OVER the background music.   Two AP-8's most certainly work, but that is a costly approach.   I probably would just use a bell or chime to register the score. 

As for the RC-4's.  I got them on a special that Jon was running a while back, so I bought two.  They are both still working fine, so no need for me to upgrade.   However I probably will have a purchase coming down the pike soon anyway because I STILL need a Prop-1.

I have found that for most of my applications and programs that I created on the Prop-2, I could easily do it on the Prop-1 as well.  There are really only about a dozen programs (or so) that I created that do need the Prop-2.

Quote
On a side note this is a cool idea that you are doing. This takes me back to my aumusment park days when I worked for Six Flags as the full-time electrician.

This isn't the only game I had analyzed.  I have noticed many other very simple redemption games that could very much be duplicated using micro-controller technology.   I am actually going to Chuck E. Cheese with the kids tomorrow and I am going to look at other games.  Naturally I will create a program for them and post them here.

Quote from: bsnut on April 15, 2010, 07:27:10 AM
Geo,
I just download your program and noticed that you are using only 14% of the 2048 bytes in the EEPROM. That is small for the Prop2.

Ahhh, but the real question is if it will fit in a Prop1.  Technically on a Prop2 I really do not need the RC-4 considering that it has more than enough I/O pins at 16 as opposed to only 8 on the Prop-1.

QuoteI also found minor bug in the program with the label "Score_Keep", it should been a GOSUB after the THEN in the IF/THEN statement, that way the program will return it just below IF/THEN statement with no problems.

Oh, yeah.  I just noticed that I forgot to type GOSUB there.  I have to fix that.  Yeah, I knew there were going to be a couple errors here and there.

Quote
Here's a way to create a timer loop that is more than 64 seconds long. They are three ways and they are.

1)The DO/LOOP UNTIL for BS2 and above

timer    VAR     Word

  DO
    IF (TriggerB = IsOn) THEN GOSUB Score_Keep
    chase = chase + 1 // 3                          ' Update cabinet light chase
    LOOKUP chase, [%110, %101, %011], relays
    GOSUB Update_RC4
      PAUSE 1000                                        '1sec
      timer = timer + 1
  LOOP UNTIL (timer >= 65)                        ' test after loop statements

Ahhh, yes I see where you are fixing the problem via the Pause 1000, and using the (timer >= 65) to create the delay.  But there is a slight problem.   What if two balls are put in the pot at once.  A 1 second delay could be two long and the second 'bee' wouldn't be registered.    But I do see where you are coming from.  Reducing the PAUSE to 250 (250ms) and then multiplying the timer value by 4 thus creating the part to (timer >= 240 would yield the same time delay, but TriggerB is checked four times as often.   250ms should be enough.   But now the clincher is that this is for the BS2, so I would need something that is compatible.   I don't think think the BS-1 has the DO LOOP command.

Quote

2)The DO/LOOP WHILE for BS2 and above

Print_Stars:
  DO WHILE (timer < 65)                           ' test before loop statements
    IF (TriggerB = IsOn) THEN GOSUB Score_Keep
    chase = chase + 1 // 3                          ' Update cabinet light chase
    LOOKUP chase, [%110, %101, %011], relays
    GOSUB Update_RC4
       PAUSE 1000                                     '1 sec
        timer = timer + 1
  LOOP

Ok, so basically the same as the above.

Quote

3)The FOR/NEXT for BS1 and above

Yeah, this is why I went with a FOR/NEXT loop above, but then ran into the timing problem.  But you did give me an idea with the PAUSE 250ms.   I certainly could increase the time that way.

Quote

I will be happy to write a new program for you for the Prop1 and the Prop2 if you want. Just remember I'm not the great JonnyMac in programing. 
 

Well, I will see what Jon has to say when he chimes in.  I am sure he probably will find other errors in the program as well.  But I would be curious as to how you would write it up in a Prop-1 code.   So by all means take a bash at it if you like.

Thank You

Quote from: JonnyMac on April 15, 2010, 08:30:29 AM
As Bill pointed out, you cannot simply jump to a subroutine (code that ends with RETURN); doing so screws up the return mapping and the program will probably misbehave.  For my part, I tend to be very verbose about this stuff and use this style:

IF (TriggerB = IsOn) THEN
  GOSUB Score_Keep
ENDIF
 

Yeah, I forgot to add 'GOSUB'.  My memory lapsed as it has been a while since I wrote a Basic Stamp program.

Quote
Also, you cannot clear an input with code -- for example, this line (and those like it):

TriggerC = IsOff                              ' Clear Coin Trigger

... are bogus.  These lines are actually writing the bit to the [disabled, due to input mode] output bit of the pin.

Ooops!  There is another one.  That's a funny one too.  I don't know why I would think an input would 'stay on'. LOL.

Quote
Yes, the AP-8 will stop what's playing and start a new command.  If you can start and end a sound on quiet space the looping of the audio can be masked; it's not perfect because there is an internal 25ms delay in the ISD chip, but that's very short in human terms and may go unnoticed.

I thought so.  I just wasn't 100% sure if the AP-8 could play multiple samples or not.    But like I said above, I just will use a chime for registering the score and let the AP-8 loop...that is probably the best way.

Well, thanx for the input guys.  I will make those corrections and when I set up the Prop-2 this weekend I will give it a run and see if it works.  I do have the Prop Trainer so I can double check everything.

Geo

jukingeo

Ok guys, I changed the loop section in the program above like this:


  FOR timerloop = timer TO 0                    ' Main timer loop

    IF (TriggerB = IsOn) THEN
        GOSUB Score_Keep
        ENDIF

    chase = chase + 1 // 3                      ' Update cabinet light chase

    LOOKUP chase, [%110, %101, %011], relays

    GOSUB Update_RC4
    PAUSE 100
   
  NEXT

Since this program was meant for the Prop-1, I decided to stick with the FOR/NEXT loop.  However, I will put in a 100ms delay.

Instead of dealing with an 'odd' number to work with for the PAUSE, I dropped it from 250ms to 100ms.  This will allow the chase to run faster as well as check the trigger more often.  The '100' multiplier allows me to remove a couple digits from the 'timerloop' variable, keeping that well under 65k and also thereby increasing my upper limit on the time considerably.   As it is, I seriously doubt I would set the game to run more than 3 or 4 mins.

Geo

JonnyMac

That loop won't work on the Prop-1 without modification.  The Prop-2 has more advanced syntax which does make programming a bit easier, but backtracking to the Prop-1 syntax doesn't take much work.  

Two things: 1) the FOR-NEXT loop needs a negative STEP value when counting backward and, 2) There is no structure with IF-THEN, simply an implied GOTO (and you must provide the label).  This is how that loop translates to the Prop-1:

Run_Loop:
 FOR timerloop = timer TO 0 STEP -1

   IF TriggerB = IsOff THEN ELSE_01
     GOSUB Score_Keep

ELSE_01:
   chase = chase + 1 // 3
   LOOKUP chase, (%110, %101, %011), relays
   GOSUB Update_RC4
   PAUSE 100

 NEXT


You may want to look at Parallax's Propeller chip for building games. While many are creating retro video games, you could certainly use similar programming techniques (simultaneous IO and sound using multiple processors) to your physical games.  We're starting to deploy the Propeller in our own and client products and having a lot of fun with it.
Jon McPhalen
EFX-TEK Hollywood Office

jukingeo

Quote from: JonnyMac on April 16, 2010, 11:27:04 AM
That loop won't work on the Prop-1 without modification.  The Prop-2 has more advanced syntax which does make programming a bit easier, but backtracking to the Prop-1 syntax doesn't take much work.  

Yes, I am aware that quite a bit has to be done to convert it to a  Prop-1.

QuoteTwo things: 1) the FOR-NEXT loop needs a negative STEP value when counting backward and, 2) There is no structure with IF-THEN, simply an implied GOTO (and you must provide the label).  This is how that loop translates to the Prop-1:

Run_Loop:
 FOR timerloop = timer TO 0 STEP -1

   IF TriggerB = IsOff THEN ELSE_01
     GOSUB Score_Keep

ELSE_01:
   chase = chase + 1 // 3
   LOOKUP chase, (%110, %101, %011), relays
   GOSUB Update_RC4
   PAUSE 100

 NEXT



Ok, thanx for the reminders.   It came back to me too that you needed the negative value on a Prop-1

Quote
You may want to look at Parallax's Propeller chip for building games. While many are creating retro video games, you could certainly use similar programming techniques (simultaneous IO and sound using multiple processors) to your physical games.  We're starting to deploy the Propeller in our own and client products and having a lot of fun with it.

I saw that you wrote up an article this past month in regards to programming the Propeller in Basic.  So yeah, I am becoming more interested in the controller.    How do you like the Propeller in comparison to the SX?

Geo

JonnyMac

I love the SX -- in fact, I helped create SX/B to make it easier for myself and others to work with.  Still, for the ease that SX/B does provide, the SX is still a single-threaded processor and doing complex tasks like serial comms while servos are running can be difficult. 

The Propeller makes this stuff easier by allowing the programmer to farm complex tasks out to their own processor.  Timing problems go away.  Yes, it takes a bit of getting used to, but it's worth it in my opinion.  I have ported nearly everything I wrote for the SX to the Propeller in the form of object libraries which make their inclusion into future projects very simple.

And while I also helped with PropBASIC, I still think it's worth learning Spin and PASM; that's what the compiler spits out, anyway, so understanding Spin can help you troubleshoot complex programs.
Jon McPhalen
EFX-TEK Hollywood Office

jukingeo

Quote from: JonnyMac on April 16, 2010, 04:29:59 PM
I love the SX -- in fact, I helped create SX/B to make it easier for myself and others to work with.  Still, for the ease that SX/B does provide, the SX is still a single-threaded processor and doing complex tasks like serial comms while servos are running can be difficult. 

The Propeller makes this stuff easier by allowing the programmer to farm complex tasks out to their own processor.  Timing problems go away.  Yes, it takes a bit of getting used to, but it's worth it in my opinion.  I have ported nearly everything I wrote for the SX to the Propeller in the form of object libraries which make their inclusion into future projects very simple.

And while I also helped with PropBASIC, I still think it's worth learning Spin and PASM; that's what the compiler spits out, anyway, so understanding Spin can help you troubleshoot complex programs.

Hello Jon,

I was looking for a thread here that was based on the Propeller to see if there was more information posted here.  I know you like to keep things neat and tidy in these forums and don't want discussions to go too far off on a tangent.

I heard about the Propeller at about the same time when I bought my Prop-2 from you.    You helped me out considerably to get involved with micro-controller programming and introducing me to the Basic Stamp.  The Propeller was always something I kept in the back of my mind, but I always thought it was something really advanced and thus difficult to program.   But now that I read your article about PropBASIC, I am wondering if I should try it out.

Anyway, I just came back from the Parallax site and saw the Hydra video game system that you were indirectly referring to.   Let's just say I am in AWE!  Yeah, that would look like something right up my alley.

Now getting back to the Prop world...Could the Propeller be used for Haunted House Prop control?  Or is it just plain overkill?

Do you have plans to create a 'Prop'-eller controller (similar to the current Prop-1, 2 & SX controllers).

Would you know of a good link that I could check out of projects that were made/built using the Propeller?

Thanx,

Geo


JonnyMac

Could the Propeller be used for Haunted House Prop control? 

Absolutely -- and we have big plans.  I don't think the Propeller is overkill for customers using the Prop-2 and Prop-SX, especially with the programming requests that I routinely receive.  We couldn't have created the AP-16+ (as it is now) without the Propeller, and by using it our customers can actually reprogram/retask it as they desire.  A programming clip for the Propeller costs about $20, and like its BASIC Stamp cousins, the Propeller can use the programming port for debugging -- this feature was missed by SX users.

Next on our list is the FC-4 (will become the FC-4+).  In addition to the Propeller upgrade it will get an RS-485 interface for networking in more complex systems.  No delivery date is set, it's just the first in our planned upgrades. 

Yes, we might have strayed a bit off topic just a bit, but your desire to run simultaneous tasks logically lead to discussion about the Propeller.   Watch the Parallax site as they often run specials on the PPDB; it's a really great piece of gear to have for Propeller development.
Jon McPhalen
EFX-TEK Hollywood Office

jukingeo

April 16, 2010, 11:02:01 PM #11 Last Edit: April 16, 2010, 11:13:04 PM by jukingeo
Quote from: JonnyMac on April 16, 2010, 09:14:19 PM
Could the Propeller be used for Haunted House Prop control?  

Absolutely -- and we have big plans.  I don't think the Propeller is overkill for customers using the Prop-2 and Prop-SX, especially with the programming requests that I routinely receive.

Honestly I don't know exactly everything the Propeller is capable of.   I know it Parallax's current powerhouse micro-controller and it can multi-task.  But I never delved into what it could really do.   I figured I would wait because I really didn't fully ace the Basic Stamp as of yet.  BUT now that there is PropBasic.  Well, that kind of has me whistling a different tune towards the Propeller.

Quote
We couldn't have created the AP-16+ (as it is now) without the Propeller, and by using it our customers can actually reprogram/retask it as they desire.  A programming clip for the Propeller costs about $20, and like its BASIC Stamp cousins, the Propeller can use the programming port for debugging -- this feature was missed by SX users.

Ahhh, so you are releasing a new audio board.  Would I be correct in assuming that the AP-16+ CAN play more than one sample at the SAME time?

Quote
Yes, we might have strayed a bit off topic just a bit, but your desire to run simultaneous tasks logically lead to discussion about the Propeller.   Watch the Parallax site as they often run specials on the PPDB; it's a really great piece of gear to have for Propeller development.

Well, I kind of answered my own question in regards to links on video games with the Propeller.  I just was looking in the wrong section on the Parallax site.  I was looking in the 'Propeller' thread and just a few minutes ago I saw that that Hydra System has its own dedicated thread.   Thus far the stuff I am seeing there is VERY impressive (I am looking at the message board right now as I am writing this).   I definitely want to look into the Propeller in greater detail now.

Anyway, I did go with the kids to CEC today and I was taking some notes on other redemption games.   I would say about 90% of the games were so simple that they could easily be done on the Prop-1.   So I am definitely going to order one and make a whole slew of new programs for the Prop-1 now.

Edit:  Prop-1 w/RS-232 adapter ordered :).

Thank You,

Geo

JonnyMac

You would be incorrect in assuming that the AP-16+ can play two files at the same time.  We're not playing samples from an ISD chip any more, we're playing stereo, 16-bit PCM WAV files from an SD card and that takes some bandwidth (and actually used three cogs to do the work).   

Now... could setup a game to play a wave file (perhaps nice music) and superimpose beeps and boops over it with another cog -- that is quite doable.  You may be interested in an object called SIDcog that simulates the SID chip made popular by the Commodore 64 computer; many are using it for retro game sounds.  There is also a book on gaming (using the Hydra platform) that goes into a lot of detail about game audio.

Unless you actually need to play WAV files in your game, I suggest you look into the music options discussed in the Hydra book, as well as what others are doing with SIDcog.
Jon McPhalen
EFX-TEK Hollywood Office

bsnut

April 17, 2010, 03:58:22 AM #13 Last Edit: April 17, 2010, 04:57:47 AM by bsnut
Geo,

I am working on your program and should be ready  this time next week coded for a Prop1 which as Basic Stamp 1 as core processor.

One, of the cool features in the new verison of the RC4 is Zip, which allows to chase the relays on the RC4. Once you send the serial command, it zips "chases" the relays in the direction and speed you want and the other cool thing is, you can run other code, this frees the Stamp to do other tasks, such as checking switches or were you need to do timing functions. You can read about the new RC4 in a thread marked "RC4's back in stock (Jan 12, 2010)" that Jon posted.
William Stefan
The Basic Stamp Nut

jukingeo

Quote from: JonnyMac on April 16, 2010, 11:55:53 PM
You would be incorrect in assuming that the AP-16+ can play two files at the same time.  We're not playing samples from an ISD chip any more, we're playing stereo, 16-bit PCM WAV files from an SD card and that takes some bandwidth (and actually used three cogs to do the work).

Well, I decided to take a stab at it :).  But it is nice to know the AP-16+ is stereo.  That sure will come in handy for more ambient sound effects.  I been looking to get another AP-8 down the road anyway, so I probably will hold off for this one.

Quote
Now... could setup a game to play a wave file (perhaps nice music) and superimpose beeps and boops over it with another cog -- that is quite doable.

Definitely.  That is what I am after.   I the case of my bee game above, as the music plays in the background, when you make a registration on the score, the game makes like a 'buzzing-bounce' sound.  This sound does play with the music, so apparently the original game does have multi voice capabilities. 

QuoteYou may be interested in an object called SIDcog that simulates the SID chip made popular by the Commodore 64 computer; many are using it for retro game sounds.  There is also a book on gaming (using the Hydra platform) that goes into a lot of detail about game audio.

Would you happen to have more information on that book  (Title, Author) ?

Quote
Unless you actually need to play WAV files in your game, I suggest you look into the music options discussed in the Hydra book, as well as what others are doing with SIDcog.

No, WAV files are not really a necessity, but they certainly can speed things up because all you need is a sample of the sound you like and just record it into the system.   It sure would save some time over using synthesis and composing my own music.  More the likely for background music, I probably WOULD use a .wav file, but for standard game sound effects, I could probably create those on my own.

Quote from: bsnut on April 17, 2010, 03:58:22 AM
Geo,

I am working on your program and should be ready  this time next week coded for a Prop1 which as Basic Stamp 1 as core processor.

Ok, thank you.  I am actually converting the program myself as well and I sure would like to compare programs.  Last night I ordered my first Prop-1, so once I get it I can try out the program as it was intended for a Prop-1 anyway.

Quote
One, of the cool features in the new verison of the RC4 is Zip, which allows to chase the relays on the RC4. Once you send the serial command, it zips "chases" the relays in the direction and speed you want and the other cool thing is, you can run other code, this frees the Stamp to do other tasks, such as checking switches or were you need to do timing functions. You can read about the new RC4 in a thread marked "RC4's back in stock (Jan 12, 2010)" that Jon posted.

That IS very interesting.  One of the things I enjoyed doing was creating chaser type programs for the Prop-2.  But how far does the new RC-4 handle the chasing.  Is it just forward and reverse single step chasing, or can you load into it a complex chase pattern?  If it is the latter then yeah, that WOULD be a big help for projects that I would like to do pseudo-multi-tasking that involves a light chaser (and many of my programs do have that).

One of the things I was doing when learning the Prop-2 is that I asked Jon how far we could take the pseudo-multitasking capabilities of the Prop-2 and it is amazing what it can do.   But early on I did find out it's limitations when I asked about using the Prop-2 (or multiple Prop-2's) to create a pinball machine.   Sadly that project would need something that has true multi-tasking.  So I am thinking the Propeller will be necessary for that project.   After I do some more work with the Prop-1 (when I receive it), I will be heading in the direction of the Propeller.   Over in the Parallax forums I really have been seeing some crazy stuff they have been doing over there with the Propeller and the Hydra video game system.

Well, thanx guy's for the info!  I am going to check out that new RC-4 now.

Geo