;0026 used exclusively in SCI interrupt handler
;0027 price of current item
;0029 previous key state (cf 0016)
+;002b machine language. 3 = english. 0,1,2 = german, spanish, french or something
;002c inhibits display writes?
;0032 to do with the beeper (see jump52)
;0033
;003f
;0040
;0042 current key press
+;0043 current byte being sent out serial port
;0048 error status
;004a
;0052 win-a-snack odds (in ram)
8B18 20 2D - bra 2d
8B1A FC 00 27 ..' ldd 0027
8B1D 26 0D &. bne 0d
-8B1F CC 27 10 .'. ldd #2710
+8B1F CC 27 10 .'. ldd #2710 ;10000
8B22 F0 0B AA ... subb 0baa
8B25 82 00 .. sbca #00
8B27 FD 00 27 ..' std 0027
C7BF 39 9 rts
jump49:
-; parity tester. returns 0 if good
+; parity tester. returns 1 if good
C7C0 F6 10 2F ../ ldab 102f ; sci data
C7C3 4F O clra
C7C4 8D CE .. bsr c794 ; parity test?
;
;
goto44:
-CBFF F6 0B C0 ... ldab 0bc0 ; do we have a changer?
+CBFF F6 0B C0 ... ldab 0bc0 ; do we have our changer (link master)?
CC02 C4 02 .. andb #02
-CC04 26 03 &. bne 03 ; if so, swallow & exit
+CC04 26 03 &. bne 03 ; if not, swallow & exit
CC06 7E CE 3B ~.; jmp ce3b ; goto54 - swallow a byte & exit
;
CC09 F6 10 2F ../ ldab 102f ; read SCI data
;
CC15 C6 32 .2 ldab #32 ; 50 00110010
CC17 F7 00 2F ../ stab 002f
-CC1A CE 00 1B ... ldx #001b ; say we have a link master?
+CC1A CE 00 1B ... ldx #001b ; say we have a link master packet?
CC1D 1C 00 02 ... bset 00,x, #02
CC20 F6 10 2E ... ldab 102e ; SCI status
CC23 C4 02 .. andb #02 ; test for Framing Error
-CC25 26 08 &. bne 08
+CC25 26 08 &. bne 08 ; if not, perform parity test. else to cc2f
CC27 BD C7 C0 ... jsr c7c0 ;jump49 - parity test
CC2A 83 00 00 ... subd #0000
-CC2D 26 0F &. bne 0f ; if failed, to cc3e
+CC2D 26 0F &. bne 0f ; if good, to cc3e
CC2F F6 10 2F ../ ldab 102f ; read SCI data
CC32 30 0 tsx
CC33 E7 00 .. stab 00,x
CC7E CC EE .. ; if 0017 0076+=sp<<16, else 0040+=sp<16, then same as above
CC80 CD 19 .. ; 0baa = sp, then same as above
CC82 CD 21 . ; 0baa = sp<<4, then same as above
-CC83 CD 30 !. ; 0013 = sp, then same as above
+CC83 CD 30 !. ; 0013 = sp, then same as above - location of dec point?
CC85 CD 38 0 ; read byte & #01,
;
CC88 F6 00 17 ... ldab 0017
CD94 F6 10 2F ../ ldab 102f ; read SCI data
CD97 4F O clra
CD98 BD FE 32 ..2 jsr fe32 ;jump25
-CD9B CD B1 00 31 ...1 ; 49 "1"
-CD9F CD DB 00 01 .... ; 50 "2"
-CDA3 CE 20 00 01 . .. ; 51 "3"
-CDA7 CE 28 00 05 .(.. ; 56 "8"
+CD9B CD B1 00 31 ...1 ; 49 "1" 00110001
+CD9F CD DB 00 01 .... ; 50 "2" 00110010
+CDA3 CE 20 00 01 . .. ; 51 "3" 00110011
+CDA7 CE 28 00 05 .(.. ; 56 "8" 00111000
CDAB CE 34 FF C8 .4.. ; 0
CDAF 00 00 .. ; end of array data
+;
CDB1 F6 00 21 ..! ldab 0021
CDB4 2C 08 ,. bge 08
CDB6 CC 00 80 ... ldd #0080
CDB9 BD C7 E7 ... jsr c7e7 ;jump37 - send byte to coin mech
-CDBC 20 1B . bra 1b
+CDBC 20 1B . bra 1b ; to cdd9
CDBE 5F _ clrb
CDBF 4F O clra
CDC0 BD C7 E7 ... jsr c7e7 ;jump37 - send byte to coin mech
CDD4 20 03 . bra 03
CDD6 7F 00 75 ..u clr 0075
CDD9 20 5E ^ bra 5e
+;
CDDB F6 00 1D ... ldab 001d
CDDE C4 02 .. andb #02
CDE0 27 07 '. beq 07
DB44 F6 00 2B ..+ ldab 002b
DB47 C1 00 .. cmpb #00
DB49 26 08 &. bne 08
-DB4B CC AC DF ... ldd #acdf
+DB4B CC AC DF ... ldd #acdf ; "CAMBIO"
DB4E BD C0 BA ... jsr c0ba ;display:
DB51 20 1E . bra 1e
DB53 C1 01 .. cmpb #01
DB5D 20 12 . bra 12
DB5F C1 02 .. cmpb #02
DB61 26 08 &. bne 08
-DB63 CC AC EA ... ldd #acea
+DB63 CC AC EA ... ldd #acea ; "MONNAIE"
DB66 BD C0 BA ... jsr c0ba ;display:
DB69 20 06 . bra 06
-DB6B CC AC D4 ... ldd #acd4
+DB6B CC AC D4 ... ldd #acd4 ; "CHANGE"
DB6E BD C0 BA ... jsr c0ba ;display:
+;
DB71 BD D8 D3 ... jsr d8d3 ;jump84 500ms delay
DB74 CE 00 01 ... ldx #0001
DB77 3C < pshx
E358 C4 10 .. andb #10 ; have link master price holding
E35A 26 08 &. bne 08
E35C CE 00 21 ..! ldx #0021
-E35F 1C 00 .. bset add,x 00,x
-E361 80 20 . suba #20
-E363 0B . sev
+E35F 1C 00 80 .. bset 00,x, #80
+E362 20 0B . bra 0b
E364 CE 00 21 ..! ldx #0021
-E367 1D 00 .. bclr add,x 00,x
-E369 80 C6 .. suba #c6
-E36B 05 . asld
+E367 1D 00 80 .. bclr 00,x, #80
+E369 C6 05 .. ldab #05
E36C F7 00 75 ..u stab 0075
E36F 20 57 W bra 57
E371 F6 0B C0 ... ldab 0bc0
E40B CE 00 19 ... ldx #0019
E40E 1D 00 08 ... bclr 00,x, #08
E411 CE 00 1B ... ldx #001b
-E414 1D 00 .. bclr add,x 00,x
-E416 80 CE .. suba #ce
-E418 00 . test
-E419 1D 1D 00 ... bclr 1d,x, #00
-E41C 40 @ nega
+E414 1D 00 80 .. bclr 00,x, #80
+E416 CE 00 1D .. ldx #001d
+E41A 1D 00 40 ... bclr 00,x, #40
E41D CE 00 1D ... ldx #001d
E420 1D 00 02 ... bclr 00,x, #02
E423 CE 00 1F ... ldx #001f
E426 1D 00 08 ... bclr 00,x, #08
E429 CE 00 21 ..! ldx #0021
-E42C 1D 00 .. bclr add,x 00,x
-E42E 80 39 .9 suba #39
+E42C 1D 00 80 .. bclr 00,x, #80
+E42F 39 .9 rts
+;
E430 F6 0B C0 ... ldab 0bc0
E433 C4 20 . andb #20 ; link master - price display
E435 27 34 '4 beq 34
E46B 7E E3 DE ~.. jmp e3de ;goto77
goto76:
E46E CE 00 21 ..! ldx #0021
-E471 1D 00 .. bclr add,x 00,x
-E473 80 CE .. suba #ce
-E475 00 . test
-E476 1F 1D 00 08 .... brclr 1d,x 00 08
+E471 1D 00 80 .. bclr 00,x, #80
+E474 CE 00 1F .. ldx #001f
+E477 1D 00 08 .... bclr 00,x, #08
E47A BD D2 13 ... jsr d213 ;jump45
E47D 83 00 00 ... subd #0000
E480 26 0F &. bne 0f