Release Notes for Alcorn McBride Show Controllers: V16+ V4+ V2+ Interactivator IO64 DMX Machine If you have any questions or problems, please contact support@alcorn.com, or call 407-296-5800. Revision History Version Date Changes ---------------------------------------------------------------------------------- ; V5.51 Converted code to ASM51 assembler from X8051 assembler. ; 11/08/94 Verified that the new assembler produces exactly the same ; JSL hex files as the old assembler for all Alcorn McBride products. ; ; V5.52 Initial version of SCSI handling routines completed. ; 12/22/94 Now the CD ThinkRack is a working, shippable product. ; JRJ ; ; V5.53 Modified LCD power-on initialization routine "initlcd" to ; 1/5/95 automatically detect the presence or absence of the LCD and ; JRJ set a flag called "lcd_exists". Modified "wlcdcmd" and "wlcddat" ; to use this flag. Also removed potential endless loops from ; "wlcdcmd" and "wlcddat". Added "rlcddat". ; The changes allowed removal of the "dipsw" parameter throughout ; the firmware. ; ; V5.54 Added the "invert" parameter to reverse the sense of all discrete ; 1/30/95 inputs in software rather than by using 74HCT541s instead of 74HCT540s. ; JRJ (or 74HCT640s instead of 74HCT245s, as the case may be). ; Also added a new product, the BINLOOP, which is a compact binloop ; controller card with a new GAL and V2-like firmware that make it ; function almost exactly like the V2 INTERACTIVATOR. ; Notice that the BINLOOP is just a V2 with the input sense inverted, ; and no ability for P1.6 to alter EEPROM behavior. ; ; V5.60 Modified the firmware to accept eight bit messages as if they were ; 1/30/95 AMAX messages. This will allow regular computers to send messages ; JSL to the V16 ( or whatever ) for it to process. Any AMAX command ; can be accomplished by setting port1 - port16 to type "CUSTOM IN/OUT" and ; making sure that the data bits is 8, the parity and stop bits can ; anything. Added routine process_custom to handle these messages. ; The protocol for these messages is as follows ( in hex ) ; F5 aa rr ll m1 ... mn cc ; F5 is the start of message byte ( required ) ; aa is the destination address. If it doesn't match, the msg is ignored ; rr is the response byte. 00 is no response, 01 is respond with ACK (AA) NACK (55 ) only. ; 02 is send the entire msg back, with ACK/NACK after. ; ll is the length of command byte ( number of bytes in following commmand ) ; m1 is the first byte of the command ; mn is the last byte of the command ( m1 + ll ) bytes ; cc is the checksum of all bytes in the message except the start of message byte ( F5 ) ; ; EXAMPLE OF MSG: F5 00 01 02 18 03 1F ; ; V5.61 Added New Script Commands - Send Code Size, Online Mode, and Archive ; 2/2/95 SEND CODE SIZE ; SCA Request the number of bytes of EEPROM used to store the current valid script. ; Command: ss dd 3Dh ck ; Response: ls ms ; ls = lsb of total size of current valid script in EEPROM ; ms = msb of total size of current valid script in EEPROM ; 0 = no valid script ; STORE ARCHIVE ; Store arbitrary data in EEPROM, starting at the byte following the current valid script (if any). ; Command: ss dd 3Eh cl cm ck ; cl = byte count lsb ; cm = byte count msb ; ck = checksum, ninth bit set, eighth bit clear ; The unit places the size bytes into EEPROM immediately following the current valid script (if any), then sends its response: ; Response: ack ; The PC then sends: ; Data: d1 .. dn ; d1-dn = raw data to be stored in EEPROM ; The units stores these bytes in EEPROM, then sends its response: ; Response: ack when done, 55h if error (out of room) ; RETRIEVE ARCHIVE ; Retrieve archive data from EEPROM, starting at byte following the current valid script (if any). ; Command: ss dd 3Fh ck ; Response: cl cm d1 .. dn ; cl = byte count lsb ; cm = byte count msb ; d1-dn = raw data recoverd from EEPROM ; No checksum is sent, since the host can embed a checksum within the data if desired. ; ONLINE MODE ; Request the unit to enter or exit online mode. ; Command: ss dd 41h mm ck ; mm = 0 - exit online mode ; 1 - enter online mode as described below ; 2-ff - future ; Response: twice per second the unit transmits the following: ; ff uu 00 i1 i2 i3 i4 o1 o2 o3 o4 v1 ... v32 ; ff = start of response, (pc’s address) ; uu = unit’s address ; 00 = future ; i1-i4= map of up to 32 input bit states, msb first ; o1-o4= map of up to 32 output bit states, msb first ; v1-v32= value of 32 state variables ; ; V5.61 UPLOAD SHOW DATA ; 2/02/95 Retrieve show data from EEPROM ; JSL Command: ss dd 3Bh ck ; Response: cl cm d1 .. dn ; cl = byte count lsb ; cm = byte count msb ; d1-dn = raw data recovered from EEPROM ; No checksum is sent, since the show data has a built in checksum ; V5.62 When I added SCSI handling code to the XSERINT interrupt routine back in ; 3-8-95 revision 5.52, I also introduced a subtle bug which has just reared its ; JRJ ugly head. Within XSERINT, I added calls to READ_EEPROM. Unfortunately, ; I failed to notice that READ_EEPROM trashes bank 2 register 6. So if you ; ever got an xtrnl serial interrupt while you were using b2r6 (e.g. while ; you were in READ_EEPROM itself), the box came to its knees. In 5.62, I ; have modified READ_EEPROM so that it no longer trashes anything. ; V5.70 1. Fixed bug introduced in 5.61. All the bit-addressable bytes had been ; 3-21-95 moved up one, which pushed "indata3" from 2Fh to 30h. Unfortunately, 30h ; JRJ is not bit-addressable, so 5.61 would not even assemble for the IO64. ; I moved all these bytes back to where they were originally (eg. pre-5.61) ; because I cannot find any valid reason why they were moved in the first ; place. ; ; 2. Completely rewrote the PROCESS_MIDI routine. Now it handles NOTE ON and ; NOTE OFF events. A NOTE ON event on the MIDI channel matching the unit ; number, MYADD, will cause the corresponding output to turn on. Note #60 ; is output #1, note #61 is output #2, etc. NOTE OFF works the same way. ; All velocity information is ignored, except for NOTE ONs with a velocity ; of zero, which are treated as NOTE OFFs. ; The new code is written with a view to adding more MIDI functionality later. ; Currently, the code maintains complete running status information, as ; specified in the MIDI standard. When events come in, they are either handled, ; like NOTE ON and NOTE OFF, or recognized but ignored. In the future, more ; events can be supported simply by adding routines at the "MIDI_Data_Byte:" ; label. ; I temporarily removed the SYSEX handling just to get 5.70 out the door fast, ; but I'll add it back in 5.71. ; V5.71 Modified STORE_ARCHIVE, RETRIEVE_ARCHIVE, and UPLOAD to turn off ; 3-24-95 all interrupts ( EA ) instead of just the serial interrupt ( ES ) ; JSL to prevent unforseen problems. Also changed STORE_ARCHIVE to ; "ljmp to hinit" instead of just "return to parse" because of calling ; store_to_eeprom. I also modified STORE_ARCHIVE to call SendByte ; instead of moving sbuf, a. This prevented the processor from ; doing something with sbuf before it was known that the byte had ; finished transmitting. ; JRJ Put SYSEX handling back into the process_midi routine. ; Analyzed xtrnl serial interrupt timing on the V16 to track down a ; mysterious loss-of-bytes problem with its MIDI reception. See the ; "XSERINT" routine for detailed comments. ; ; V5.80 Fixed bug in PROCESS_ALCORN8BIT and made it much faster and efficient. ; 4-7-95 Created PROCESS_RTC to process Real Time Clock commands from an ; JSL ESE 192B Real Time Clock. I also changed the way that the input ; buffer status byte is used. INITAUXPORTS used to set bits to indicate ; if a serial port was MIDI, AMAX, CUSTOM, and whether it was capable of ; receiving incoming messages. Now, because new input protocols are being ; added, I changed this to support six bits worth of a "port type". This ; will allow for many new protocols as they come along. I also left hooks ; for PROCESS_TOUCH when we want to make a touch screen interface. I also ; got rid of the NORMLED directive because it was exactly opposite of ; the INVLED directive. I now use an ELSE directive instead. Last, but ; not least I changed the way the ACK and ERROR leds work. Now, all ; you have to do to get one of the leds to go on is to mov ackcnt, #XX or ; mov errcnt, #XX where XX is the number of frames you want the led to be ; on for. Changing this did add about 5us in the frame interrupt. ; ; V5.81 Fixed bug that caused Restart Enable and any Reset Trigger not to work. ; 5-15-95 I changed resetsequence: to call a newly rewritten ResetSeq and CheckInputs: ; JSL and CheckStateVars: to call it also. It now correctly resets the sequence in ; question and also will restart it correctly for Restart Enable. ; ; V5.82 Modified main loop and added subcalls from MainLoop ; 6-23-95 Added ninth bit protocol where the ninth bit is set on the first ; JSL byte of the message and then cleared on the remaining bytes. ; The data itself in the msg is not altered. ; ; V5.83 Modified BINLOOP address space to eliminate 2 white wires on the Binloop ; 6-23-95 controller board (they were needed to bring A[1] and A[3] to the PAL). ; JRJ The greatest impact of this change is that the UART registers are now ; spaced every 800h instead of every 8h like in all the other products. ; But by simply adding the offset to the high byte of the address instead ; of the low byte, you're in effect adding 800h instead of 8h, so it's ; an easy alteration to the code. See all the "IF ( BINLOOP )" places. ; ; There was a third white wire needed to carry the "MUTE" signal from ; pin P1.3 over to the latch for inputs 1-8. I've replaced the ; appropriate bit in INREG00 with the signal present at P1.3 whenever reading ; this bank of inputs. Now we can get rid of that wire. ; ; Last thing: I added one instruction to toggle P1.4 once per frame, just ; to make the reproducer cards happy. (On a normal binloop controller, P1.4 ; provides a "frame clock" to all the reproducer boards, which is used to ; initialize them properly at powerup.) ; ; V5.84 Replaced the write_eeprom, read_eeprom, and read_xdata routines with ; 6-29-95 streamlined, well-commented code that is functionally equivalent to the ; JRJ old code. I was just tired of dealing with the older versions. ; ; ; V5.85 Fixed a bug in store_archive that prevented storing an archive ; 8-17-95 in a V16 due to the read/write_eeprom routines are coded ; JSL differently for the V16. Also fixed a bug in uploadstuff ; that prevented a show smaller than 256 bytes from being uploaded. ; Made store_archive, retrieve_archive, downloadstuff, and ; uploadstuff routines more robust. ; ; V5.86 Added the command "SendStateVarEnhanced", opcode 14h. ; 12-4-95 Eliminated "reqidbuff", "repidbuff", "reqid", and "repid". ; JRJ Re-used the 32 bytes of external RAM that used to be occupied by these things ; for a message buffer to be used by any routine that needs it (like SendStateVarEnhanced). ; (By the way, the buffer is called "temporary_string_space") ; ; V5.87 Added the command "PutStateVar", opcode 15h. ; 12-6-95 (It uses "temporary_string_space", too) ; JRJ ; ; V5.88 Added PLL init for BINLOOP. ; 3/13/96 ; SCA ; ; V5.89 Upgraded $INCLUDE file to scsi102.asm ; 3-25-96 ; JRJ ; ; V5.90 Added the new V4+ show controller. The V4+ is a V16+ with eleven uarts removed. ; 5-1-96 (Ports 1-4 are retained, 5-15 are deleted, and 16 is permanently wired for MIDI) ; JRJ The firmware is identical to the V16, except in the external serial interrupt, where ; ports 5-15 are skipped to avoid reading bytes from non-existent uarts. ; Also cleaned up all products' LCD sign-on messages. (See 'signon1' places) ; Enhanced subroutine 'writeln2' to support the new LCD messages. ; ; V5.91 Added the new V2+ show controller. The V2+ uses exactly the same firmware as ; 5-2-96 the InterActivator, except for the product title at 'vermsg', the LCD sign-on ; JRJ message at 'signon1', and the fact that the InterActivator can pull its show ; data out of the firmware chip if P1.6 is grounded but the V2+ cannot, since P1.6 ; is the SMPTE output. ; ; V5.92 Fixed bug in Showvar command. When online_data was added, the state_vars table got ; 8-26-96 moved. The new address had a non-zero low byte. So when this byte got ascii- ; JRJ converted and written to the LCD, it caused very weird characters. ; ; V6.00 Added code to detect loss of video sync signal and display error text. ; 8-26-96 Implemented the new comnmands "StoreLCD" and "RecoverLCD". ; JRJ Enhanced subroutine 'writeln1' to support longer LCD messages. ; Started fixing major bugs in retrieve_archive and uploadstuff ; (sending wrong # of bytes; entering routine with jmp and leaving with ret). ; However, there's a strong chance that this code still needs major work. ; ; v6.01 "Fixed" the "slow v16" bug by clearing newframe earlier in mainloop. We still have the ; 10-1-96 problem that the frame tasks, particularly CheckEvents, take longer than one frame to ; JRJ execute if there are a large number of events pending. For example, running 100 'nop' ; events takes longer than one frame (standard 8031, 11.0592MHz). ; ; v6.02 Fixed a bug that caused a download or archive to NACK if the data was exactly ; 03-04-97 a multiple of 256. The code used to pre-decrement the LSB before checking to ; JSL see if it's done. I changed store_to_eeprom to check first if we're done before ; decrementing the lsb, and I changed the number of times the loop is called to ; one less than it used to. ; ; v6.03 Merged DMX code from DMX539 to support DMX Machine ; 03-06-97 Added swaptab to flip dmx input order ; SCA ; ; v6.04 Elongated the timeout time when downloading, in order to account ; 04-04-97 for slower computers using Windows 3.1 downloading. ; JSL ; ; v6.05 Added restart lockout functionality to the 'startsequence' code. This allows 'start' events ; 4-16-97 and AMAX 'start' commands to restart a running sequence just like the pushbuttons and state ; jrj variables do. ; ; v6.06 Fixed LCD display bug that corrupted any message of 63 bytes or longer. ; 4-18-97 ; jrj ; ; v6.10 Added AMInet protocol to Show Control Products to support Ethernet Machine, ; 6-4-97 and general use. ; JSL ; Support send and get messages turning back on the receive enable bit for a port if ; the port is capable of receiving unsolicited messages. The only port types that can ; not are PT_CUSTOM and PT_NINTHBIT. ; ; Support 16 bit GOTO command that will jump forward 32767 events. ; ; v6.11 jrj Start using Dmx101.asm instead of Dmx100.asm. ; 8-8-97 Dmx101 removes P2 from the timer 0 interrupt. You cannot use P2 in an interrupt routine ; because there is no way to push and pop it; the push stores the port pins, NOT the port latch! ; ; v6.20 jrj Completely rewrite the DMX ramping algorithm to use 16-bit math with remainders. ; 8-8-97 (No more rounding or truncation) ; Get rid of the DMX include file - just incorpoarte its code directly. ; ; v6.21 jrj Expand DMX Machine show memory from 24 KB maximum to 32 KB. ; 8-13-97 ; ; v6.22 jrj Add DMX ramp opcode 08h, which allows ramps up to 65535 frames long on dimmers 1-256. ; 8-13-97 (Recall opcode 07h is a ramp of 1 frame on dimmers 1-256, and opcode 09h is a ramp ; of 1-255 frames on dimmers 1-256.) ; ; v6.23 jrj Use the 16550 uart, not the 8031 processor, to time the DMX line break. ; 8-14-97 This will allow us to switch between standard 8031s and Dallas 8031s more easily. ; ; v6.24 jrj Send 512 DMX dimmers per frame instead of 256. ; 8-15-97 Toggle p1.1 in mainloop and p1.4 at newframe to help characterize the performance of the box. ; ; v6.25 Simplified AMInet protocol by making only one kind of STX and adding ; 10-23-97 a message "class" byte in every message which says what kind of ; JSL message it is. The two types currently supported are local and remote ; ; v6.26 jrj Lengthened EEwait to work properly with the Dallas 8031. We were starting to see intermittent bad results ; 11-10-97 from the findeesize routine because it was writing/reading the EEPROMs too fast. ; ; v6.27 jrj Altered AMInet protocol to allow incoming traffic on more than one AMInet port simultaneously. ; 1-28-98 ; ; v6.28 jrj Fixed OUTPORT bug in IO64 (changed bank 0 1 1 1 to bank 0 1 2 3) ; 2-3-98 ; ; v6.29 sca Added MIDI Show Control SET command ; 3-13-98 ; ; v6.30 jrj Internal serial interrupt (serint) trashes bank3reg7, which is also used by the external serial ; 4-17-98 interrupt (xserint)! Since serint can interrupt xserint, this is a problem. ; Simply push and pop b3r7 in serint to solve... ; ; v6.31 jrj Improved ESE real time clock protocol so that it will receive two different types of clock messages. ; 5-15-98 (The ESE model ES225 protocol and the ESE model ES101 protocol) ; ; v6.32 jrj Fixed AMInet "message in one port goes out all other ports" bug. AMInetBuffer was being used as a ; 6-10-98 temporary storage location to build the message for the first port, but unfortunately, this corrupted ; jsl the AMInetBuffer for all the other ports! So when it came to those ports, it would transmit garbage ; bytes left over from the first port. Defined a new temporary buffer, JimJeffBuffer, to fix. ; In the future, we should compute the message once and send it out all the ports instead of ; reconstructing the same message over and over for each port! ; ; v6.33 sca Added Break Command needed for Grass Valley Switcher in Home Improvement at Disney MGM ; 12-17-99 ; ; v6.34 jrj With P1.6 low, the InterActivator pulls its show data from EPROM instead of EEPROM. ; 03-01-00 Unfortunately, it starts the show data at 2000h, and the OS has grown way beyond that ; size. Move the show data block up to 4000h. This gives us 16kB of ROM show memory (4000h-7FFFh) ; (See read_eeprom, read_xdata) ; ; v6.35 sca added savevar and restorevar ; 03-01-00 ; ; v6.36 sca added inport ; 07-17-00 ; ; v6.37 sca added E-max protocol ; 08-01-00 corrected ESE-101 RTC protocol and added day month year to vars 26-28 ; ; v6.40 sah Added capability to send variables rather than just static data using the MessageOutVar command. ; 10-31-02 To send a variable it must be preceded with an hF3(ASCII), hF4(right justified ASCII - leading zeros), ; or hF5(binary byte) To send the actual values hF3, hF4, or hF5 they must be doubled. These changes ; required the new subroutines sendandwaitx(Op-code 26h) and sendcustomx(Op-Code 27h) along with some supporting ; subroutines for formatting. ; ; Also added new jump commands to jump up to 32768 sequences. I had to implement new Op-Codes for these ; functions to allow backward compatibility for old jump commands. Op-Codes (43h - 50h) were used. ; ; v6.41 sah Added ability to use the Programmer port in Alcorn 8-bit mode. The port still powers up in 9-bit mode by default, ; 09-12-03 but if a framing error is detected, it toggles to 8-bit mode and listens. This goes both ways. If the port is in ; 8-bit mode and gets a framing error, it switches back to 9-bit. ; ; This feature required heavy modification to the serint Subroutine along with the SendVersion Subroutine. ; ; v6.42 sah This version has a couple of modifications that are centered around some new SMPTE time code features. ; 09-12-03 ; A new alcorn command was added that allows the SMPTE Machine to send the current time via serial to the SCU. This ; time is recieved as 4 bytes representing the individual fields of HH:MM:SS.FF. It is then converted into a 24-bit number ; and stored into RAM for later use. This command uses Op-Code 60h. ; ; Two new time code modes have been implemented for sequences. This required the addition of a SMPTE Offset Time and ; an Extended Mode Byte to the Sequence Cfg. Header. The SMPTE Offset time represents the '0' time of the sequence. ; The 16-bit frame number associated with the event represents the offset to this '0' time, just like the standard mode of operation. ; ; JAM-SYNC MODE - The sequence frame counter (rather than counting up each frame) is obtained by subtracting the Seq. ; SMPTE Offest Time from the Global SMPTE time. This allows the SMPTE code to effectively advance the sequence. If the ; global SMPTE time ever skips forward beyond the 'Dropout Frames' specified in the Cfg. Header or backwards, the sequence ; will rewind to the beginning and then advance to the last event that is <= the new global time. ; ; RESET MODE - This mode behaves in the same manner as JAM-SYNC, except when the SMPTE time skips. Rather than rewinding ; and attempting to predict the new location, the sequence just resets. This is good failsafe for people who have ; conditional jumps in the sequences, or that are not expecting changes in the SMPTE time. ; ; There is a document on N:\ALCORN\SCRIPTOS\DOC that describes these features in greater detail. ; ; v6.43 jkb This version has added opcodes for dmx ramp commands using variables. Only Subroutine setup_ramp has been changed. ; 05-05-04 ; ; v6.44 sah Fixed 2 bugs: ; 05-14-04 ; 1. The portion of the AMINet processing routine that counts message length and compares that to the length within ; the message did not work correctly. This would cause certain lengthy AMINet commands to fail. ; ; 2. Some PC uarts were experiencing download failures in Alcorn 8-bit mode. This turned out to be a result of the ; ACK byte that the show controller sends upon boot. WS uses this ACK byte to determine download success. Well, ; the show controller boots up in 9-bit mode. Therefore, this ack byte was being sent as a 9-bit character. ; Some UART's could not handle this, and as a result would mis-interpret the character. This would lead WS to ; believe the download had failed. I fixed this by ACKing the download before the machine is rebooted. There is ; really no other way around this without causing the programmer port NOT bootup to 9-bit by default. Changing this ; is too risky. If this becomes an issue, we could always verify the show, and then ACK before rebooting. ; ; v6.50 sah Fixed 2 bugs: ; ; 1. The first bug involved a miscalculation whenever the set_smpte subroutine calculate absolute frames in a time ; base of 29.97. These calculations are now performed correctly by calculating absolute frames based on 30fps, ; calculating the number offrames that must be dropped, and then subtracting. ; ; 2. Versions 6.42-6.44 would always look for SMPTE Chase config bytes in the sequence header. The problem is that ; older versions of WS would not put these bytes in the sequence header. The resulting 'overlap' would sometimes ; cause sequences to enter the SMPTE Chase mode accidentally. This was corrected by monitoring a flag and the ; Dropout frame value in the script header. If both of these values are zero, then we know that an older version ; of WinScript was used to download the script. If either of these values are not zero, we know that ; the script was loaded with WinScript 3.0 Build 01 or newer. ; ; v6.51 sah Added support for the MIDI Sysex FIRE command. This MIDI show control command can now be used to start sequences 0-127. ; 12-6-04 ; ; v6.52 sah Fixed a bug that was created by version 6.41. This bug would cause the programmer port to stop transmitting ; 07-28-05 Alcorn 9-bit messages after a short period of time. It was caused by a failure to restore the Accumulator ; to a certain value. ; ; v6.53 sah Fixed a bug that was not properly disabling the 2691 transmitters after a transmission finished. This would ; 11-02-09 cause the aux UART interrupt to do extra work, and increase ;in duration. This led to a performance decrease, ; which included increasing the character spacing between other outgoing RS-232 messages.