Okay I think I have this sussed out.
The OS65D version used for AC control is a modified version that contains the embedded AC control driver in it. I find it in Fred's X10 home control disk, the OSI Dealer Demo Disk, and an 8" copy of the CA-15/CA-14 phone dialer demo I found this summer. It uses the CB1 input of the disk PIA to watch the time ticks for the realtime clock and probably calculate the timing needed to send ultrasonic BSR commands. The BASIC keyword table has been modified to remove the WAIT command and replace it with "ACTL", the hook to send X-10 commands.
The ACTL command can accept multiple comma separated decimal values to send X-10 events. 1-16 is the unit code, 65-70 are the command codes "ON", "BRIGHT", "ALL LIGHTS ON", "OFF", "DIM", and "ALL OFF" respectively.
Here is the Dealer Demo Disk code, which demonstrates the ACTL command usage:
Code: Select all
REM OSI OS65D AC BASIC 5.25" disk @ $337E
10 REM AC CONTROL PROGRAM
20 REM (WITH EMBEDDED AC CONTROL DRIVER)
30 REM SETUP VECTOR TO 'ACTL' CODE
40 POKE 548,127: POKE 549,50: REM $0224 = $7F, $32
50 REM
60 REM PRESET STATUS TO 64 CHAR DISPLAY
70 POKE249,7
80 REM
90 REM OPERATOR INTERFACE FOR AC CONTROL
95 FORI=1TO30:PRINT:NEXT
96 GOSUB400
100 INPUT "DEVICE, COMMAND NUMBER "; N, M
105 IFN=0ORM=0THEN120
110 ACTL N,M:GOTO95
120 REM
130 REM MINI LIGHT SHOW
140 NN=65: BR=66: LO=67: REM ON: BRIGHT: LIGHTS ON
150 FF=68: DI=69: AF=70: REM OFF: DIM: ALL OFF
200 ACTL 1,2,3,12
210 ACTL NN
220 ACTL 1,FF,2,FF,3,FF,12,FF
230 ACTL 12,NN,3,NN,2,NN,1,NN
240 ACTL 1,2,3,12
250 FOR I=1 TO 10
260 ACTL DI
270 NEXT I
280 ACTL AF
300 RUN"BEXEC*"
400 PRINT" DEVICES 1 , 2 , 3 OR 12"
405 PRINT:PRINT
406 PRINT" COMMANDS:":PRINT:PRINT
410 PRINT" 65 ON 66 BRIGHT"
420 PRINT" 67 ALL ON 68 OFF"
430 PRINT" 69 DIM 70 ALL OFF"
440 PRINT:PRINT:PRINT
450 PRINT" ** TYPE 0,0 FOR A SHORT LIGHT SHOW **"
455 PRINT" ** PROGRAM WILL END AFTER THE SHOW **"
460 FORI=1TO5:PRINT:NEXT
500 RETURN
So to modify Fred's Home control software (not included here), you'd need to modify the lines in the 5000's to convert from OSI's ACTL commands to a serial format compatible with your device. I think OS65D uses device #1 for serial I/O. So maybe PRINT #1, "UNIT1,ON" kind of thing?
For future reference, here are my notes on the serial word format used by the BSR X-10 ultrasonic remote. The OSI software needs to match the timing specifications to send commands to the X-10 console.
Code: Select all
BSR X-10 Ultrasonic Wireless remote protocol (Used by OSI 540 board)
Originally, a 40KHz signal was used with a push button cordless (ultrasonic) remote
The house code is set on the base so the remote can only command devices on that house code.
The ultrasonic transmission protocol sends one complete message every ~100ms.
There are 13bits in each message, each bit is 8ms long
logic 1 is 4ms of 40Khz, 4ms silence
logic 0 is 1.2ms of 40Khz, 6.8 ms silence
13bit handheld remote message definition:
SOM 5-bit binary code Inverted code EOM
|# | D4| D3| D2| D1| D0|!D4 |!D3|!D2|!D1|!D0|###|###|
SOM (start of message) = 4ms on, 4ms off (normal '1')
EOM (end of message) = 16ms "on" burst
Cordless controller push-button codes and decimal equivalents.
5-BIT BINARY CODE
UNITCODE D4 D3 D2 D1 D0 DECIMAL OSI_ACTL values
1 0 1 1 0 0 12 1
2 1 1 1 0 0 28 2
3 0 0 1 0 0 04 3
4 1 0 1 0 0 20 4
5 0 0 0 1 0 02 5
6 1 0 0 1 0 18 6
7 0 1 0 1 0 10 7
8 1 1 0 1 0 26 8
9 0 1 1 1 0 14 9
10 1 1 1 1 0 30 10
11 0 0 1 1 0 06 11
12 1 0 1 1 0 22 12
13 0 0 0 0 0 00 13
14 1 0 0 0 0 16 14
15 0 1 0 0 0 08 15
16 1 1 0 0 0 24 16
5-BIT BINARY CODE
COMMAND D4 D3 D2 D1 D0 DECIMAL OSI_ACTL values
ALL OFF 0 0 0 0 1 01 70
ALL LIGHTS ON 0 0 0 1 1 03 67
ON 0 0 1 0 1 05 65
OFF 0 0 1 1 1 07 68
DIM 0 1 0 0 1 09 69
BRIGHT 0 1 0 1 1 11 66
OSI OS65D AC Control Software command is "ACTL" it replaces the WAIT command in other BASIC versions
ACTL can take multiple arguments comma separated. Values 1-16 are device selection,
Values 65-70 are commands (see above)
Cheers,
-Mark