November 21, 2024, 08:25:15 AM

News:

Got VSA?  Want to use your Prop-SX?  Now you can!  See the VSA section of the Library forum for Prop-SX code that works with VSA.


Converting Haunted House Program from Prop-1 to a Prop-2

Started by Spooky Dad, September 13, 2011, 09:05:42 PM

Previous topic - Next topic

Spooky Dad

I have 4 hours before I get on my flight, so here is my report on my crash course of reviewing and tweaking the program to work.  Not sure that I have spent 28 hours yet on this, but I also havn't got all of the props fully hooked up either.  When I get back in 10 days, I will advise on the final outcome.  I ran into two main issues over the weekend.

1.  The first issue is the order in which I connected all of the controllers via the serial link.  The order that finally worked without providing any missed commands was Prop-2 to RC-4 to AP-16+ to DC-16.  I had the AP-16+ last, but it was missing commands so I put it in front of the DC-16.  I am still assuming that since the RC-4 is non-powered, it must go right after the Prop-2 like the Prop-1.

2.  I am confused by how the following command works.  It seems to me that in the Audio_Wait and Check_AP16 subroutines, that if "Playing = No" would be the right selection versus "Playing = Yes", since I want the sequence of events to run for as longas the audio is running.  But I do recognize that with the code the way it currently is, the next prop is available to be tripped as soon as the sequence is through.  When I did change the code to "Playing = No", I typically got hung in the PS_4 (MIB) and PS_5 (CPT) props code.

Audio_Wait:
  DEBUG "start of audio wait", CR, LF
  DO
    PAUSE 100
    GOSUB Check_AP16
    IF (Playing = Yes) THEN EXIT
    DEBUG "in audio wait loop", CR, LF
  LOOP
  DEBUG "out of audio wait", CR, LF
  PAUSE 5000
  RETURN

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

Check_AP16:
  SEROUT Sio, Baud, ["!AP16", %00, "G"]         ' get status
  SERIN  Sio, Baud, [status]
  RETURN


JonnyMac

October 10, 2011, 11:29:38 AM #31 Last Edit: October 10, 2011, 11:32:04 AM by JonnyMac
Make sure you have the latest firmware in the AP-16+; we extended the serial buffer so that it could better ignore other commands coming down the buss.

You're right about the Playing = No being correct for that; I rewrote that from a manual loop (that used GOTO) and forgot to update that line for the new syntax.  Sorry.  You will probably have to review how that subroutine is used now.
Jon McPhalen
EFX-TEK Hollywood Office