;0000
;0001 coin mask? (cf 0x001a, 0x3000, 0xc430)
;0003 global only used in jump71
+;0005 number of motors we have
;0006 slot number
;0007 06 stored into it sometimes.
;0008 used exclusively in SCI interrupt
;0026 used exclusively in SCI interrupt handler
;0029 previous key state (cf 0016)
;002c inhibits display writes?
-;0032
+;0032 to do with the beeper
;0033
;0035 only ever contains #1e
;003b commonly contains $0233
;0048 error status
;004a
;0052 win-a-snack odds (in ram)
+;0054 0..100
;0056 last known keypad row 1 state
;005b last known keypad row 0 state
-;005d
-;005e Y in location XY (row?)
-;005f X in location XY (column?)
+;005d dollars
+;005e Y in location XY (row?) cents1
+;005f X in location XY (column?) cents2
;0073
;0076-0077 word
;007f
80FF 05 . asld
jump72:
+; initial menu when door opens?
8100 F6 00 1D ... ldab 001d
8103 C4 10 .. andb #10
8105 27 3D '= beq 3d
87E8 39 9 rts
jump74:
+;motor count procedure
87E9 7F 00 05 ... clr 0005
87EC 7F 00 54 ..T clr 0054
87EF F6 00 54 ..T ldab 0054
-87F2 C1 50 .P cmpb #50
-87F4 24 2E $. bcc 2e
+87F2 C1 50 .P cmpb #50 ; 80
+87F4 24 2E $. bcc 2e ; to 8824
87F6 F6 00 54 ..T ldab 0054
87F9 4F O clra
87FA C3 B0 D3 ... addd #b0d3
8806 BD D7 A0 ... jsr d7a0 ;is_invalid_slot
8809 83 00 00 ... subd #0000
880C 26 11 &. bne 11
-880E BD D3 11 ... jsr d311 ;jump30
+880E BD D3 11 ... jsr d311 ;jump30 - test it
8811 83 00 00 ... subd #0000
8814 26 03 &. bne 03
8816 7C 00 05 |.. inc 0005
881C BD E5 71 ..q jsr e571 ;msdelay
881F 7C 00 54 |.T inc 0054
8822 20 CB . bra cb
-8824 BD 99 81 ... jsr 9981 ;jump144
+8824 BD 99 81 ... jsr 9981 ;jump144 - write "MOTORS XX" (from 0005)
8827 CC 07 D0 ... ldd #07d0
882A BD E5 71 ..q jsr e571 ;msdelay
882D 39 9 rts
899B BD D7 A0 ... jsr d7a0 ;is_invalid_slot
899E 83 00 00 ... subd #0000
89A1 26 27 &' bne 27 ; to 89ca
-89A3 BD D3 11 ... jsr d311 ;jump30
+89A3 BD D3 11 ... jsr d311 ;jump30 - test position exists
89A6 83 00 00 ... subd #0000
89A9 26 0B &. bne 0b
89AB CE 00 1F ... ldx #001f
89B4 20 0F . bra 0f
89B6 CE 00 1F ... ldx #001f
89B9 1D 00 40 .. bclr 00,x, #40
-89BC CC 2A FF .*. ldd #2aff
+89BC CC 2A FF .*. ldd #2aff ; 00101010 11111111
89BF FD 00 27 ..' std 0027
89C2 BD A3 85 ... jsr a385 ;jump40
89C5 BD 9A 47 ..G jsr 9a47 ;jump39
8C3C C4 7F .. andb #7f
8C3E 4F O clra
8C3F FD 00 46 ..F std 0046
-8C42 BD D3 11 ... jsr d311 ;jump30
+8C42 BD D3 11 ... jsr d311 ;jump30 - test position exists
8C45 83 00 00 ... subd #0000
8C48 26 12 &. bne 12
8C4A CE 00 1F ... ldx #001f
94FB 4F O clra
94FC BD FE 32 ..2 jsr fe32 ;jump25
94FF 95 19 00 00 .... ; no key
-9503 95 21 00 01 .!.. ; key 1
-9507 95 2C 00 01 .,.. ; key 2
-950B 95 30 00 01 .0.. ; key 3
+9503 95 21 00 01 .!.. ; key 1 - motor count procedure
+9507 95 2C 00 01 .,.. ; key 2 - single test vend
+950B 95 30 00 01 .0.. ; key 3 - test vend everything
950F 95 35 00 08 .5.. ; reset
9513 95 38 FF F5 .8..
9517 00 00 .. ; end of array data
9519 CC B0 A2 ... ldd #b0a2 ; "MTR FUNCT?"
951C BD C0 BA ... jsr c0ba ;display:
951F 20 1D . bra 1d
-9521 BD 87 E9 ... jsr 87e9 ;jump74
+9521 BD 87 E9 ... jsr 87e9 ;jump74 - motor count procedure
9524 CE 00 1F ... ldx #001f
9527 1C 00 02 ... bset 00,x, #02
952A 20 12 . bra 12
-952C 8D 11 .. bsr dest 11
+952C 8D 11 .. bsr dest 11 ;jump203 - test single vend
952E 20 0E . bra 0e
-9530 BD 96 88 ... jsr 9688 ;jump148
+9530 BD 96 88 ... jsr 9688 ;jump148 - test all vends
9533 20 09 . bra 09
9535 BD 85 AF ... jsr 85af ;jump14
9538 7F 00 09 ... clr 0009
953B 7F 00 0A ... clr 000a
953E 39 9 rts
-;
+
+jump203:
+; test a single vend
953F F6 00 19 ... ldab 0019
9542 2D 0A -. blt 0a
9544 F6 00 3A ..: ldab 003a
961D BD D7 A0 ... jsr d7a0 ;is_invalid_slot
9620 83 00 00 ... subd #0000
9623 26 21 &! bne 21
-9625 BD D3 11 ... jsr d311 ;jump30
+9625 BD D3 11 ... jsr d311 ;jump30 - test position exists
9628 83 00 00 ... subd #0000
962B 26 0B &. bne 0b
962D CE 00 1F ... ldx #001f
9687 39 9 rts
jump148:
+;tests all vends
9688 34 4 des
9689 F6 00 19 ... ldab 0019
968C 2C 19 ,. bge 19
968E CE 00 19 ... ldx #0019
-9691 1D 00 .. bclr add,x 00,x
-9693 80 CC .. suba #cc
-9695 B0 97 BD ... suba 97bd
-9698 C0 BA .. subb #ba
+9691 1D 00 80 .. bclr 00,x, #80
+9694 CC B0 97 ... ldd #b097 ; "TEST VEND"
+9697 BD C0 BA ... jsr c0ba ; display
969A C6 0A .. ldab #0a
969C F7 00 38 ..8 stab 0038
969F 7F 00 05 ... clr 0005
96A4 F7 00 06 ... stab 0006
96A7 F6 00 0A ... ldab 000a
96AA C1 0B .. cmpb #0b
-96AC 26 0C &. bne 0c
+96AC 26 0C &. bne 0c ; to 96ba
96AE CC 02 33 ..3 ldd #0233
96B1 FD 00 3B ..; std 003b
96B4 CE 00 1F ... ldx #001f
96B7 1C 00 02 ... bset 00,x, #02
96BA F6 00 38 ..8 ldab 0038
96BD 27 03 '. beq 03
-96BF 7E 97 6D ~.m jmp 976d ;goto17
+96BF 7E 97 6D ~.m jmp 976d ;goto17 - return
96C2 F6 00 06 ... ldab 0006
-96C5 C1 63 .c cmpb #63
+96C5 C1 63 .c cmpb #63 ; exit if >63
96C7 23 03 #. bls 03
-96C9 7E 97 6D ~.m jmp 976d ;goto17
+96C9 7E 97 6D ~.m jmp 976d ;goto17 - return
96CC F6 00 06 ... ldab 0006
96CF C1 63 .c cmpb #63
96D1 26 0F &. bne 0f
-96D3 BD 99 C3 ... jsr 99c3 ;jump143
-96D6 CC 07 D0 ... ldd #07d0
+96D3 BD 99 C3 ... jsr 99c3 ;jump143 - write "VENDS XXX" (from 0005)
+96D6 CC 07 D0 ... ldd #07d0 ; 2000
96D9 BD E5 71 ..q jsr e571 ;msdelay
96DC CE 00 1F ... ldx #001f
96DF 1C 00 02 ... bset 00,x, #02
-96E2 BD D3 11 ... jsr d311 ;jump30
+96E2 BD D3 11 ... jsr d311 ;jump30 - test position exists
96E5 83 00 00 ... subd #0000
96E8 26 0B &. bne 0b
96EA CE 00 1F ... ldx #001f
980C 98 65 ..
980E F6 0C D9 .. ldab 0cd9
9811 4F . clra
-9812 BD E7 95 ... jsr e795 ;jump54
+9812 BD E7 95 ... jsr e795 ;jump54 - number to string
9815 C6 4E .N ldab #4e
9817 F7 0B 99 ... stab 0b99
981A C6 49 .I ldab #49
9829 20 55 U bra 55
982B F6 0C DA ... ldab 0cda
982E 4F O clra
-982F BD E7 95 ... jsr e795 ;jump54
+982F BD E7 95 ... jsr e795 ;jump54 - number to string
9832 C6 44 .D ldab #44
9834 F7 0B 99 ... stab 0b99
9837 C6 49 .I ldab #49
9846 20 38 8 bra 38
9848 F6 0C DB ... ldab 0cdb
984B 4F O clra
-984C BD E7 95 ... jsr e795 ;jump54
+984C BD E7 95 ... jsr e795 ;jump54 - number to string
984F C6 51 .Q ldab #51
9851 F7 0B 99 ... stab 0b99
9854 C6 55 .U ldab #55
9863 20 1B . bra 1b
9865 F6 0C DC ... ldab 0cdc
9868 4F O clra
-9869 BD E7 95 ... jsr e795 ;jump54
+9869 BD E7 95 ... jsr e795 ;jump54 - number to string
986C C6 44 .D ldab #44 ; "D"
986E F7 0B 99 ... stab 0b99
9871 C6 4F .O ldab #4f ; "O"
98A4 39 9 rts
jump11:
+; prints contents of 0054 to display
98A5 BD BE 4B ..K jsr be4b ;displayblank
98A8 F6 00 54 ..T ldab 0054
98AB 4F O clra
-98AC BD E7 95 ... jsr e795 ;jump54
-98AF F6 00 5E ..^ ldab 005e
+98AC BD E7 95 ... jsr e795 ; slot number to digits
+98AF F6 00 5E ..^ ldab 005e
98B2 F7 0B 95 ... stab 0b95
98B5 F6 00 5F .._ ldab 005f
98B8 F7 0B 94 ... stab 0b94
-98BB BD BE 01 ... jsr be01 ;jump70
+98BB BD BE 01 ... jsr be01 ;jump70 - write to display
98BE 39 9 rts
jump146:
9980 39 9 rts
jump144:
+; writes "MOTORS XX" where XX is the slot number in 0005
9981 BD BE 4B ..K jsr be4b ;displayblank
9984 F6 00 05 ... ldab 0005
9987 4F O clra
-9988 BD E7 95 ... jsr e795 ;jump54
-998B C6 4D .M ldab #4d
+9988 BD E7 95 ... jsr e795 ;jump54 - number to string
+998B C6 4D .M ldab #4d ; "M"
998D F7 0B 99 ... stab 0b99
-9990 C6 4F .O ldab #4f
+9990 C6 4F .O ldab #4f ; "O"
9992 F7 0B 98 ... stab 0b98
-9995 C6 54 .T ldab #54
+9995 C6 54 .T ldab #54 ; "T"
9997 F7 0B 97 ... stab 0b97
-999A C6 4F .O ldab #4f
+999A C6 4F .O ldab #4f ; "O"
999C F7 0B 96 ... stab 0b96
-999F C6 52 .R ldab #52
+999F C6 52 .R ldab #52 ; "R"
99A1 F7 0B 95 ... stab 0b95
-99A4 C6 53 .S ldab #53
+99A4 C6 53 .S ldab #53 ; "S"
99A6 F7 0B 94 ... stab 0b94
-99A9 C6 20 . ldab #20
+99A9 C6 20 . ldab #20 ; " "
99AB F7 0B 93 ... stab 0b93
-99AE C6 20 . ldab #20
+99AE C6 20 . ldab #20 ; " "
99B0 F7 0B 92 ... stab 0b92
99B3 F6 00 5E ..^ ldab 005e
99B6 F7 0B 91 ... stab 0b91
99B9 F6 00 5F .._ ldab 005f
99BC F7 0B 90 ... stab 0b90
-99BF BD BE 01 ... jsr be01 ;jump70
+99BF BD BE 01 ... jsr be01 ;jump70 - display
99C2 39 9 rts
jump143:
+; writes VENDS XX where XX is contents of 0005
99C3 BD BE 4B ..K jsr be4b ;displayblank
99C6 F6 00 05 ... ldab 0005
99C9 4F O clra
-99CA BD E7 95 ... jsr e795 ;jump54
-99CD C6 56 .V ldab #56
+99CA BD E7 95 ... jsr e795 ;jump54 - number to string
+99CD C6 56 .V ldab #56 ; "V"
99CF F7 0B 99 ... stab 0b99
-99D2 C6 45 .E ldab #45
+99D2 C6 45 .E ldab #45 ; "E"
99D4 F7 0B 98 ... stab 0b98
-99D7 C6 4E .N ldab #4e
+99D7 C6 4E .N ldab #4e ; "N"
99D9 F7 0B 97 ... stab 0b97
-99DC C6 44 .D ldab #44
+99DC C6 44 .D ldab #44 ; "D"
99DE F7 0B 96 ... stab 0b96
-99E1 C6 53 .S ldab #53
+99E1 C6 53 .S ldab #53 ; "S"
99E3 F7 0B 95 ... stab 0b95
-99E6 C6 20 . ldab #20
+99E6 C6 20 . ldab #20 ; " "
99E8 F7 0B 94 ... stab 0b94
-99EB C6 20 . ldab #20
+99EB C6 20 . ldab #20 ; " "
99ED F7 0B 93 ... stab 0b93
-99F0 C6 20 . ldab #20
+99F0 C6 20 . ldab #20 ; " "
99F2 F7 0B 92 ... stab 0b92
99F5 F6 00 5E ..^ ldab 005e
99F8 F7 0B 91 ... stab 0b91
jump102:
9A05 BD BE 4B ..K jsr be4b ;displayblank
9A08 FC 00 52 ..R ldd 0052
-9A0B BD E7 45 ..E jsr e745 ;jump55
+9A0B BD E7 45 ..E jsr e745 ;jump55 - number to string
9A0E C6 4F .O ldab #4f ; "O"
9A10 F7 0B 99 ... stab 0b99
9A13 C6 44 .D ldab #44 ; "D"
9A47 BD BE 4B ..K jsr be4b ;displayblank
9A4A F6 00 06 ... ldab 0006
9A4D 4F O clra
-9A4E BD E7 95 ... jsr e795 ;jump54
+9A4E BD E7 95 ... jsr e795 ;jump54 - number to string
9A51 F6 00 5E ..^ ldab 005e
9A54 F7 0B 99 ... stab 0b99
9A57 F6 00 5F .._ ldab 005f
9A65 C4 40 .@ andb #40
9A67 27 45 'E beq 45
9A69 FC 00 27 ..' ldd 0027
-9A6C BD E7 45 ..E jsr e745 ;jump55
+9A6C BD E7 45 ..E jsr e745 ;jump55 - number to string
9A6F F6 00 5A ..Z ldab 005a
9A72 F7 0B 96 ... stab 0b96
9A75 F6 00 5D ..] ldab 005d
9A95 C6 20 . ldab #20
9A97 F7 0B 92 ... stab 0b92
9A9A FC 00 46 ..F ldd 0046
-9A9D BD E7 45 ..E jsr e745 ;jump55
+9A9D BD E7 45 ..E jsr e745 ;jump55 - number to string
9AA0 F6 00 5E ..^ ldab 005e
9AA3 F7 0B 91 ... stab 0b91
9AA6 F6 00 5F .._ ldab 005f
jump101:
9B63 BD BE 4B ..K jsr be4b ;displayblank
9B66 FC 00 0D ... ldd 000d
-9B69 BD E7 45 ..E jsr e745 ;jump55
+9B69 BD E7 45 ..E jsr e745 ;jump55 - number to string
9B6C C6 44 .D ldab #44
9B6E F7 0B 99 ... stab 0b99
9B71 C6 53 .S ldab #53
9D2A BD BE 4B ..K jsr be4b ;displayblank
9D2D F6 00 22 .." ldab 0022
9D30 4F O clra
-9D31 BD E7 95 ... jsr e795 ;jump54
+9D31 BD E7 95 ... jsr e795 ;jump54 - number to string
9D34 F6 00 5E ..^ ldab 005e
9D37 F7 0B 99 ... stab 0b99
9D3A F6 00 5F .._ ldab 005f
9D42 F7 0B 97 ... stab 0b97
9D45 F6 00 24 ..$ ldab 0024
9D48 4F O clra
-9D49 BD E7 95 ... jsr e795 ;jump54
+9D49 BD E7 95 ... jsr e795 ;jump54 - number to string
9D4C C6 50 .P ldab #50
9D4E F7 0B 96 ... stab 0b96
9D51 F6 00 5E ..^ ldab 005e
9D5F F7 0B 93 ... stab 0b93
9D62 F6 00 2A ..* ldab 002a
9D65 4F O clra
-9D66 BD E7 95 ... jsr e795 ;jump54
+9D66 BD E7 95 ... jsr e795 ;jump54 - number to string
9D69 C6 46 .F ldab #46
9D6B F7 0B 92 ... stab 0b92
9D6E F6 00 5E ..^ ldab 005e
9F34 BD A2 D4 ... jsr a2d4 ;jump79
9F37 38 8 pulx
9F38 7E A1 C4 ~.. jmp a1c4 ;goto19
-9F3B CC B2 C6 ... ldd #b2c6
+9F3B CC B2 C6 ... ldd #b2c6 ; "SALES (R) "
9F3E BD C0 BA ... jsr c0ba ;display:
9F41 7E A1 C4 ~.. jmp a1c4 ;goto19
9F44 FE 0D E9 ... ldx 0de9
9F4B BD A3 41 ..A jsr a341 ;jump77
9F4E 38 8 pulx
9F4F 7E A1 C4 ~.. jmp a1c4 ;goto19
-9F52 CC B2 D8 ... ldd #b2d8
+9F52 CC B2 D8 ... ldd #b2d8 ; "SALES (N) "
9F55 BD C0 BA ... jsr c0ba ;display:
9F58 7E A1 C4 ~.. jmp a1c4 ;goto19
9F5B FE 0D ED ... ldx 0ded
9F62 BD A3 41 ..A jsr a341 ;jump77
9F65 38 8 pulx
9F66 7E A1 C4 ~.. jmp a1c4 ;goto19
-9F69 CC B2 EA ... ldd #b2ea
+9F69 CC B2 EA ... ldd #b2ea ; "BAG TOTAL"
9F6C BD C0 BA ... jsr c0ba ;display:
9F6F 7E A1 C4 ~.. jmp a1c4 ;goto19
9F72 FE 0D F1 ... ldx 0df1
9F79 BD A3 41 ..A jsr a341 ;jump77
9F7C 38 8 pulx
9F7D 7E A1 C4 ~.. jmp a1c4 ;goto19
-9F80 CC B2 FC ... ldd #b2fc
+9F80 CC B2 FC ... ldd #b2fc ; "CASH BOX"
9F83 BD C0 BA ... jsr c0ba ;display:
9F86 7E A1 C4 ~.. jmp a1c4 ;goto19
9F89 FE 0D F9 ... ldx 0df9
9F90 BD A3 41 ..A jsr a341 ;jump77
9F93 38 8 pulx
9F94 7E A1 C4 ~.. jmp a1c4 ;goto19
-9F97 CC B3 0E ... ldd #b30e
+9F97 CC B3 0E ... ldd #b30e ; "CARD SALES"
9F9A BD C0 BA ... jsr c0ba ;display:
9F9D 7E A1 C4 ~.. jmp a1c4 ;goto19
9FA0 FE 0D FD ... ldx 0dfd
9FA7 BD A3 41 ..A jsr a341 ;jump77
9FAA 38 8 pulx
9FAB 7E A1 C4 ~.. jmp a1c4 ;goto19
-9FAE CC B3 35 ..5 ldd #b335
+9FAE CC B3 35 ..5 ldd #b335 ; "BILL TOTAL"
9FB1 BD C0 BA ... jsr c0ba ;display:
9FB4 7E A1 C4 ~.. jmp a1c4 ;goto19
9FB7 FE 0D F5 ... ldx 0df5
A086 BD A3 41 ..A jsr a341 ;jump77
A089 38 8 pulx
A08A 7E A1 C4 ~.. jmp a1c4 ;goto19
-A08D CC B3 B7 ... ldd #b3b7
+A08D CC B3 B7 ... ldd #b3b7 ; "TUBE TOTAL"
A090 BD C0 BA ... jsr c0ba ;display:
A093 7E A1 C4 ~.. jmp a1c4 ;goto19
A096 CE 00 01 ... ldx #0001
A09D BD A2 D4 ... jsr a2d4 ;jump79
A0A0 38 8 pulx
A0A1 7E A1 C4 ~.. jmp a1c4 ;goto19
-A0A4 CC B3 CE ... ldd #b3ce
+A0A4 CC B3 CE ... ldd #b3ce ; "$1 COIN"
A0A7 BD C0 BA ... jsr c0ba ;display:
A0AA 7E A1 C4 ~.. jmp a1c4 ;goto19
A0AD FE 0C E9 ... ldx 0ce9
A0B5 BD A3 1A ... jsr a31a ;jump93
A0B8 38 8 pulx
A0B9 7E A1 C4 ~.. jmp a1c4 ;goto19
-A0BC CC B3 E0 ... ldd #b3e0
+A0BC CC B3 E0 ... ldd #b3e0 ; "QUARTERS"
A0BF BD C0 BA ... jsr c0ba ;display:
A0C2 7E A1 C4 ~.. jmp a1c4 ;goto19
A0C5 FE 0C EB ... ldx 0ceb
A1B8 BD A3 41 ..A jsr a341 ;jump77
A1BB 38 8 pulx
A1BC 20 06 . bra 06
-A1BE CC B4 84 ... ldd #b484
+A1BE CC B4 84 ... ldd #b484 ; "VENDS/CODE"
A1C1 BD C0 BA ... jsr c0ba ;display:
goto19:
A1C4 F6 00 48 ..H ldab 0048
A1EF F6 00 48 ..H ldab 0048
A1F2 4F O clra
A1F3 C3 FF D2 ... addd #ffd2
-A1F6 BD E7 95 ... jsr e795 ;jump54
+A1F6 BD E7 95 ... jsr e795 ;jump54 - number to string
A1F9 F6 00 5E ..^ ldab 005e
A1FC F7 0B 99 ... stab 0b99
A1FF F6 00 5F .._ ldab 005f
A20A C3 0C C3 ... addd #0cc3
A20D 8F . xgdx
A20E EC 00 .. ldd 00,x
-A210 BD E7 45 ..E jsr e745 ;jump55
+A210 BD E7 45 ..E jsr e745 ;jump55 - number to string
A213 F6 00 57 ..W ldab 0057
A216 F7 0B 94 ... stab 0b94
A219 F6 00 5A ..Z ldab 005a
A246 F6 00 1F ... ldab 001f
A249 C4 10 .. andb #10
A24B 27 08 '. beq 08
-A24D CC AF 9A ... ldd #af9a
+A24D CC AF 9A ... ldd #af9a ; "CLR MIS Y"
A250 BD C0 BA ... jsr c0ba ;display:
A253 20 06 . bra 06
-A255 CC AF A5 ... ldd #afa5
+A255 CC AF A5 ... ldd #afa5 ; "CLR MIS N"
A258 BD C0 BA ... jsr c0ba ;display:
A25B 39 9 rts
A2D5 36 6 psha
A2D6 30 0 tsx
A2D7 EC 00 .. ldd 00,x
-A2D9 BD E7 45 ..E jsr e745 ;jump55
+A2D9 BD E7 45 ..E jsr e745 ;jump55 - number to string
A2DC F6 00 57 ..W ldab 0057
A2DF F7 0B 94 ... stab 0b94
A2E2 F6 00 5A ..Z ldab 005a
A31C 30 0 tsx
A31D E6 01 .. ldab 01,x
A31F 4F O clra
-A320 BD E7 95 ... jsr e795 ;jump54
+A320 BD E7 95 ... jsr e795 ;jump54 - number to string
A323 F6 00 5D ..] ldab 005d
A326 F7 0B 99 ... stab 0b99
A329 F6 00 5E ..^ ldab 005e
A3FA 8F . xgdx
A3FB ED 00 .. std 00,x
A3FD 20 22 " bra 22
-A3FF CC 2A FF .*. ldd #2aff
+A3FF CC 2A FF .*. ldd #2aff ; 00101010 11111111
A402 37 7 pshb
A403 36 6 psha
A404 F6 00 06 ... ldab 0006
AB88 39 9 rts
jump7:
-AB89 CC B0 8C ... ldd #b08c
+AB89 CC B0 8C ... ldd #b08c ; "NO ERRORS"
AB8C BD C0 BA ... jsr c0ba ;display:
AB8F CC 01 F4 ... ldd #01f4
AB92 BD E5 71 ..q jsr e571 ;msdelay
ABC9 83 00 00 ... subd #0000
ABCC 27 03 '. beq 03
ABCE 7E AC 7B ~.{ jmp ac7b ;goto23
-ABD1 BD D3 11 ... jsr d311 ;jump30
+ABD1 BD D3 11 ... jsr d311 ;jump30 - test position exists
ABD4 83 00 00 ... subd #0000
ABD7 27 2B '+ beq 2b
ABD9 F6 00 05 ... ldab 0005
B0C1 3F ? swi
B0C2 00 . test
-B0C3 14 00 .
-B0C5 14 C8 .
-B0C7 05 00 ..
-B0C9 05 00 .
-B0CB 02 00 .
-B0CD 02 00 .
-B0CF 01 00 .
-B0D1 01 00 .
-B0D3 01 0C .
+B0C3 14 00 . ;20
+B0C5 14 C8 . ;20
+B0C7 05 00 .. ;05
+B0C9 05 00 . ;05
+B0CB 02 00 . ;02
+B0CD 02 00 . ;02
+B0CF 01 00 . ;01
+B0D1 01 00 . ;01
+B0D3 01 0C . ;01
B0D5 17 22 .
B0D7 2E 39 ".
jump50:
+; writes a slot and price to the screen?
BE9E 37 7 pshb
BE9F 36 6 psha
BEA0 8D A9 .. bsr a9 ; to be4b - displayblank
BF70 8F . xgdx
BF71 33 3 pulb
BF72 E7 00 .. stab 00,x
-BF74 20 68 h bra 68
+BF74 20 68 h bra 68 ;goto32
+;
BF76 C1 04 .. cmpb #04
BF78 26 26 && bne 26
BF7A 30 0 tsx
goto32:
BFDE F6 0B C0 ... ldab 0bc0
BFE1 C4 01 .. andb #01
-BFE3 26 0E &. bne 0e
+BFE3 26 0E &. bne 0e ; to bff3
BFE5 F6 0B C0 ... ldab 0bc0
BFE8 C4 04 .. andb #04
-BFEA 26 07 &. bne 07
+BFEA 26 07 &. bne 07 ; to bff3
BFEC F6 0B C0 ... ldab 0bc0
BFEF C4 08 .. andb #08
-BFF1 27 15 '. beq 15
+BFF1 27 15 '. beq 15 ; to c008
BFF3 F6 00 17 ... ldab 0017
BFF6 C4 08 .. andb #08
-BFF8 26 0E &. bne 0e
+BFF8 26 0E &. bne 0e ; to c008
+; plonk a dollar sign somewhere
BFFA C6 24 .$ ldab #24 ; "$"
BFFC 37 7 pshb
BFFD 30 0 tsx
C00E C1 01 .. cmpb #01
C010 23 17 #. bls 17
C012 CE 10 28 ..( ldx #1028
-C015 1C 00 40 ... bset 00,x, #40 ; enable SCI send
+C015 1C 00 40 ... bset 00,x, #40 ; enable SPI send
C018 CE 00 01 ... ldx #0001
C01B 3C < pshx
C01C CC 00 20 .. ldd #0020
-C01F BD BD B5 ... jsr bdb5 ;jump78
+C01F BD BD B5 ... jsr bdb5 ;jump78 - send space to display
C022 38 8 pulx
-C023 CE 10 28 ..( ldx #1028 ; disable SCI send
+C023 CE 10 28 ..( ldx #1028 ; disable SPI send
C026 1D 00 40 ... bclr 00,x, #40
-C029 BD BE 10 ... jsr be10 ;jump88
+C029 BD BE 10 ... jsr be10 ;jump88 - write buffer to display
C02C 38 8 pulx
C02D 39 9 rts
C5CC CE 00 1B ... ldx #001b
C5CF 1D 00 .. bclr add,x 00,x
C5D1 20 39 9 bra 39
-;
+
jump6:
C5D3 F6 00 15 ... ldab 0015
C5D6 C4 1F .. andb #1f
C67C 39 9 rts
jump124:
+; chat to changer
C67D F6 00 30 ..0 ldab 0030
C680 26 55 &U bne 55
C682 F6 0B C0 ... ldab 0bc0
D0B5 30 0 tsx
D0B6 6C 00 l. inc 00,x
D0B8 20 DE . bra de ; to d098
-
+;
D0BA C6 05 .. ldab #05
D0BC F7 0B AA ... stab 0baa
D0BF C6 04 .. ldab #04
D103 31 1 ins
D104 39 9 rts
-jump32:
+motors_off:
; turns all motors off
D105 34 4 des
D106 CE 00 1A ... ldx #001a
D225 FC 00 44 ..D ldd 0044
D228 BD BE 9E ... jsr be9e ;jump50
D22B 38 8 pulx
-D22C BD D3 11 ... jsr d311 ;jump30
+D22C BD D3 11 ... jsr d311 ;jump30 - test position exists
D22F 83 00 00 ... subd #0000
D232 27 13 '. beq 13
D234 F6 00 06 ... ldab 0006
D245 4F O clra
D246 39 9 rts
-D247 BD D1 3D ..= jsr d13d ;jump34
+D247 BD D1 3D ..= jsr d13d ;jump34 - motor on
D24A C6 3C .< ldab #3c
D24C F7 00 2E ... stab 002e
D24F C6 41 .A ldab #41
D270 CE 00 1B ... ldx #001b
D273 1C 00 08 ... bset 00,x, #08
D276 20 0B . bra 0b
-D278 BD D1 05 ... jsr d105 ;jump32
+D278 BD D1 05 ... jsr d105 ;motors_off
D27B 8D 80 .. bsr 80 ;jump90
D27D BD D6 3C ..< jsr d63c ;jump33
D280 5F _ clrb
D292 BD D5 B0 ... jsr d5b0 ;jump31
D295 83 00 00 ... subd #0000
D298 27 46 'F beq 46 ; to d2e0
-D29A BD D1 05 ... jsr d105 ;jump32
+D29A BD D1 05 ... jsr d105 ;motors_off
D29D F6 00 2E ... ldab 002e
D2A0 C1 32 .2 cmpb #32
D2A2 22 07 ". bhi 07
D2A4 8D 6B .k bsr dest 6b
D2A6 83 00 00 ... subd #0000
D2A9 27 0C '. beq 0c
-D2AB BD D1 05 ... jsr d105 ;jump32
+D2AB BD D1 05 ... jsr d105 ;motors_off
D2AE BD D1 FD ... jsr d1fd ;jump90
D2B1 BD D6 3C ..< jsr d63c ;jump33
D2B4 5F _ clrb
D2E5 BD D5 F7 ... jsr d5f7 ;jump108
D2E8 83 00 00 ... subd #0000
D2EB 26 0C &. bne 0c
-D2ED BD D1 05 ... jsr d105 ;jump32
+D2ED BD D1 05 ... jsr d105 ;motors_off
D2F0 BD D1 FD ... jsr d1fd ;jump90
D2F3 BD D6 26 ..& jsr d626 ;jump91
D2F6 5F _ clrb
D2F9 F6 00 2E ... ldab 002e
D2FC 26 0C &. bne 0c
-D2FE BD D1 05 ... jsr d105 ;jump32
+D2FE BD D1 05 ... jsr d105 ;motors_off
D301 BD D1 FD ... jsr d1fd ;jump90
D304 BD D6 3C ..< jsr d63c ;jump33
D307 5F _ clrb
D310 39 9 rts
jump30:
-D311 BD D1 3D ..= jsr d13d ;jump34
+; tests to see if a motor exists here
+D311 BD D1 3D ..= jsr d13d ;jump34 - motor on
D314 7F 00 1C ... clr 001c
D317 7F 00 18 ... clr 0018
D31A F6 10 0A ... ldab 100a
D324 F6 00 1C ... ldab 001c
D327 C1 FF .. cmpb #ff
D329 26 07 &. bne 07
-D32B BD D1 05 ... jsr d105 ;jump32
+D32B BD D1 05 ... jsr d105 ;motors_off
D32E CC 00 01 ... ldd #0001
D331 39 9 rts
-
-D332 20 10 . bra 10
+;
+D332 20 10 . bra 10 ; to d344
D334 7C 00 18 |.. inc 0018
D337 F6 00 18 ... ldab 0018
D33A C1 08 .. cmpb #08
-D33C 26 06 &. bne 06
-D33E BD D1 05 ... jsr d105 ;jump32
+D33C 26 06 &. bne 06 ; continue
+D33E BD D1 05 ... jsr d105 ;motors_off
D341 5F _ clrb
D342 4F O clra
D343 39 9 rts
+D344 20 D4 . bra d4 ; continue
jump43:
-D344 20 D4 . bra d4 ; to d31a?
D346 3C < pshx
D347 3C < pshx
D348 3C < pshx
D3A7 C6 80 .. ldab #80
D3A9 30 0 tsx
D3AA E7 00 .. stab 00,x
-D3AC BD D1 3D ..= jsr d13d ;jump34
+D3AC BD D1 3D ..= jsr d13d ;jump34 - motor on
D3AF 5F _ clrb
D3B0 4F O clra
D3B1 30 0 tsx
D3DA 83 00 01 ... subd #0001
D3DD ED 05 .. std 05,x
D3DF 20 D8 . bra loop ;d3b9
-D3E1 BD D1 05 ... jsr d105 ;jump32 - turn motors off
+D3E1 BD D1 05 ... jsr d105 ;motors_off - turn motors off
D3E4 30 0 tsx
D3E5 EC 03 .. ldd 03,x
D3E7 2C 16 ,. bge 16
D423 F6 00 06 ... ldab 0006
D426 C1 3B .; cmpb #3b
D428 26 37 &7 bne 37
-D42A BD D1 3D ..= jsr d13d ;jump34
+D42A BD D1 3D ..= jsr d13d ;jump34 - motor on
D42D 7F 00 1C ... clr 001c
D430 7F 00 18 ... clr 0018
D433 F6 18 00 ... ldab 1800
D43D F6 00 1C ... ldab 001c
D440 C1 FF .. cmpb #ff
D442 26 08 &. bne 08
-D444 BD D1 05 ... jsr d105 ;jump32
+D444 BD D1 05 ... jsr d105 ;motors_off
D447 CC 00 01 ... ldd #0001
D44A 20 17 . bra 17
D44C 20 11 . bra 11
D451 F6 00 18 ... ldab 0018
D454 C1 08 .. cmpb #08
D456 26 07 &. bne 07
-D458 BD D1 05 ... jsr d105 ;jump32
+D458 BD D1 05 ... jsr d105 ;motors_off
D45B 5F _ clrb
D45C 4F O clra
D45D 20 04 . bra 04
D4B1 8F . xgdx
D4B2 E6 00 .. ldab 00,x
D4B4 F7 00 06 ... stab 0006
-D4B7 BD D3 11 ... jsr d311 ;jump30
+D4B7 BD D3 11 ... jsr d311 ;jump30 - test position exists
D4BA 83 00 00 ... subd #0000
D4BD 27 03 '. beq 03
D4BF 7E D5 45 ~.E jmp d545 ;goto64
D73A F3 00 3E ..> addd 003e
D73D B3 0B EF ... subd 0bef
D740 23 19 #. bls 19
-D742 CC B0 6B ..k ldd #b06b
+D742 CC B0 6B ..k ldd #b06b ; "NO CHANGE"
D745 BD C0 BA ... jsr c0ba ;display:
D748 CC 01 F4 ... ldd #01f4
D74B BD E5 71 ..q jsr e571 ;msdelay
D754 BD E5 71 ..q jsr e571 ;msdelay
D757 CC 00 01 ... ldd #0001
D75A 39 9 rts
-
+;
D75B F6 00 15 ... ldab 0015
D75E C4 04 .. andb #04
D760 27 1E '. beq 1e
D762 F6 0E 6E ..n ldab 0e6e
D765 26 19 &. bne 19
-D767 CC B0 76 ..v ldd #b076
+D767 CC B0 76 ..v ldd #b076 ; "NO FIVES"
D76A BD C0 BA ... jsr c0ba ;display:
D76D CC 01 F4 ... ldd #01f4
D770 BD E5 71 ..q jsr e571 ;msdelay
D779 BD E5 71 ..q jsr e571 ;msdelay
D77C CC 00 01 ... ldd #0001
D77F 39 9 rts
-
+;
D780 5F _ clrb
D781 4F O clra
D782 39 9 rts
D7E7 20 14 . bra 14 ; to d7fd (return 1)
D7E9 30 0 tsx
D7EA E6 00 .. ldab 00,x
-D7EC C1 0B .. cmpb #0b ; 11
+D7EC C1 0B .. cmpb #0b ; < 11
D7EE 25 06 %. bcs 06 ; return 1
D7F0 E6 00 .. ldab 00,x
-D7F2 C1 3E .> cmpb #3e ; 62
+D7F2 C1 3E .> cmpb #3e ; <= 62
D7F4 23 05 #. bls 05 ; return 0
D7F6 CC 00 01 ... ldd #0001
D7F9 20 02 . bra 02
DB43 39 9 rts
jump104:
+; say thankyou?
DB44 F6 00 2B ..+ ldab 002b
DB47 C1 00 .. cmpb #00
DB49 26 08 &. bne 08
DB51 20 1E . bra 1e
DB53 C1 01 .. cmpb #01
DB55 26 08 &. bne 08
-DB57 CC AC D4 ... ldd #acd4
+DB57 CC AC D4 ... ldd #acd4 ; "CHANGE"
DB5A BD C0 BA ... jsr c0ba ;display:
DB5D 20 12 . bra 12
DB5F C1 02 .. cmpb #02
DB9A F6 00 2B ..+ ldab 002b
DB9D C1 00 .. cmpb #00
DB9F 26 08 &. bne 08
-DBA1 CC AD 16 ... ldd #ad16
+DBA1 CC AD 16 ... ldd #ad16 ; "GRACIAS"
DBA4 BD C0 BA ... jsr c0ba ;display:
DBA7 20 1E . bra 1e
DBA9 C1 01 .. cmpb #01
DBAB 26 08 &. bne 08
-DBAD CC AD 0B ... ldd #ad0b
+DBAD CC AD 0B ... ldd #ad0b ; "DANKE"
DBB0 BD C0 BA ... jsr c0ba ;display:
DBB3 20 12 . bra 12
DBB5 C1 02 .. cmpb #02
DBB7 26 08 &. bne 08
-DBB9 CC AD 00 ... ldd #ad00
+DBB9 CC AD 00 ... ldd #ad00 ; "MERCI"
DBBC BD C0 BA ... jsr c0ba ;display:
DBBF 20 06 . bra 06
-DBC1 CC AC F5 ... ldd #acf5
+DBC1 CC AC F5 ... ldd #acf5 ; "THANKS"
DBC4 BD C0 BA ... jsr c0ba ;display:
DBC7 BD D8 D3 ... jsr d8d3 ;jump84 500ms delay
DBCA 39 9 rts
DE58 F1 0B AB ... cmpb 0bab
DE5B 26 0B &. bne 0b
DE5D CE 00 1B ... ldx #001b
-DE60 1D 00 01 ... bclr 00,x, #01 ; fixed by ./fixbset.pl - verify me
+DE60 1D 00 01 ... bclr 00,x, #01
DE63 7F 00 4F ..O clr 004f
DE66 20 3C < bra 3c
DE68 FC 00 44 ..D ldd 0044
DE96 FD 00 44 ..D std 0044
DE99 20 09 . bra 09
DE9B CE 00 1B ... ldx #001b
-DE9E 1D 00 01 ... bclr 00,x, #01 ; fixed by ./fixbset.pl - verify me
+DE9E 1D 00 01 ... bclr 00,x, #01
DEA1 7F 00 4F ..O clr 004f
goto70:
DEA4 39 9 rts
DEF7 F7 0B BC ... stab 0bbc
DEFA F6 00 15 ... ldab 0015
DEFD 2D 03 -. blt 03
-DEFF BD C6 7D ..} jsr c67d ;jump124
-DF02 BD D6 6B ..k jsr d66b ;jump107
+DEFF BD C6 7D ..} jsr c67d ;jump124 - chat to changer
+DF02 BD D6 6B ..k jsr d66b ;jump107 - chat to bill acceptor
DF05 BD DC A3 ... jsr dca3 ;jump29
DF08 20 25 % bra 25
DF0A F6 0B C0 ... ldab 0bc0
DF3D F6 00 4F ..O ldab 004f
DF40 26 06 &. bne 06
DF42 CE 00 1B ... ldx #001b
-DF45 1D 00 01 ... bclr 00,x, #01 ; fixed by ./fixbset.pl - verify me
+DF45 1D 00 01 ... bclr 00,x, #01
DF48 F6 00 25 ..% ldab 0025
DF4B 26 20 & bne 20
DF4D F6 00 1B ... ldab 001b
DF61 BD DB 44 ..D jsr db44 ;jump104
DF64 BD D6 6B ..k jsr d66b ;jump107
DF67 CE 00 1B ... ldx #001b
-DF6A 1D 00 40 ... bclr 00,x, #40 ; fixed by ./fixbset.pl - verify me
+DF6A 1D 00 40 ... bclr 00,x, #40
DF6D F6 00 2C .., ldab 002c
DF70 27 03 '. beq 03
DF72 7E E0 66 ~.f jmp e066 ;goto71
E2F9 26 0E &. bne 0e
E2FB BD DB 44 ..D jsr db44 ;jump104
E2FE CE 00 1B ... ldx #001b
-E301 1D 00 40 ... bclr 00,x, #40 ; fixed by ./fixbset.pl - verify me
+E301 1D 00 40 ... bclr 00,x, #40
E304 7F 00 25 ..% clr 0025
E307 20 1A . bra 1a
E309 7F 00 2C .., clr 002c
E450 FC 00 76 ..v ldd 0076
E453 26 06 &. bne 06
E455 CE 00 17 ... ldx #0017
-E458 1D 00 02 ... bclr 00,x, #02 ; fixed by ./fixbset.pl - verify me
+E458 1D 00 02 ... bclr 00,x, #02
E45B F6 00 17 ... ldab 0017
E45E C4 02 .. andb #02
E460 27 09 '. beq 09
E462 BD E5 D1 ... jsr e5d1 ;jump52
E465 CE 00 17 ... ldx #0017
-E468 1D 00 02 ... bclr 00,x, #02 ; fixed by ./fixbset.pl - verify me
+E468 1D 00 02 ... bclr 00,x, #02
E46B 7E E3 DE ~.. jmp e3de ;goto77
goto76:
E46E CE 00 21 ..! ldx #0021
jump12:
E5AA F6 00 33 ..3 ldab 0033
E5AD 27 0C '. beq 0c ; to e5bb
-E5AF F6 00 29 ..) ldab 0029
+E5AF F6 00 29 ..) ldab 0029 ; key state
E5B2 27 05 '. beq 05 ; to e5b9 (out)
E5B4 C6 02 .. ldab #02
E5B6 F7 00 33 ..3 stab 0033
E5D0 39 9 rts
jump52:
-E5D1 C6 0B .. ldab #0b
+E5D1 C6 0B .. ldab #0b ; 1011
E5D3 F7 00 32 ..2 stab 0032
E5D6 39 9 rts
E743 6E 00 n. jmp 00,x
jump55:
+; number to string. number is <= 99999. puts it into 0057, 005a, 005d-005f
E745 37 7 pshb
E746 36 6 psha
E747 30 0 tsx
E74D 02 . idiv
E74E 8F . xgdx
E74F CB 30 .0 addb #30
-E751 F7 00 57 ..W stab 0057
+E751 F7 00 57 ..W stab 0057 ; num/10000 => 0057
E754 30 0 tsx
E755 EC 00 .. ldd 00,x
E757 CE 27 10 .'. ldx #2710 ; 10000
E75E 02 . idiv
E75F 8F . xgdx
E760 CB 30 .0 addb #30
-E762 F7 00 5A ..Z stab 005a
+E762 F7 00 5A ..Z stab 005a ; num%10000/1000 => 005a
E765 30 0 tsx
E766 EC 00 .. ldd 00,x
E768 CE 03 E8 ... ldx #03e8
E76F 02 . idiv
E770 8F . xgdx
E771 CB 30 .0 addb #30
-E773 F7 00 5D ..] stab 005d
+E773 F7 00 5D ..] stab 005d ; num%1000/100 => 005d
E776 30 0 tsx
E777 EC 00 .. ldd 00,x
E779 CE 00 64 ..d ldx #0064
E780 02 . idiv
E781 8F . xgdx
E782 CB 30 .0 addb #30
-E784 F7 00 5E ..^ stab 005e
+E784 F7 00 5E ..^ stab 005e ; num%100/10 => 005e
E787 30 0 tsx
E788 EC 00 .. ldd 00,x
E78A CE 00 0A ... ldx #000a
E78D 02 . idiv
E78E CB 30 .0 addb #30
-E790 F7 00 5F .._ stab 005f
+E790 F7 00 5F .._ stab 005f ; num%10 => 005f
E793 38 8 pulx
E794 39 9 rts
jump54:
+; number to string. number is <= 999. puts it into 005d-005f
E795 37 7 pshb
E796 36 6 psha
E797 30 0 tsx
E798 E6 01 .. ldab 01,x
E79A 4F O clra
-E79B CE 00 64 ..d ldx #0064
+E79B CE 00 64 ..d ldx #0064 ; /100
E79E 02 . idiv
E79F 8F . xgdx
-E7A0 CB 30 .0 addb #30
+E7A0 CB 30 .0 addb #30 ; make it a digit
E7A2 F7 00 5D ..] stab 005d
E7A5 30 0 tsx
E7A6 E6 01 .. ldab 01,x
E7AE CE 00 0A ... ldx #000a
E7B1 02 . idiv
E7B2 8F . xgdx
-E7B3 CB 30 .0 addb #30
+E7B3 CB 30 .0 addb #30 ; %100 / 10 -> digit
E7B5 F7 00 5E ..^ stab 005e
E7B8 30 0 tsx
E7B9 E6 01 .. ldab 01,x
E7BC CE 00 0A ... ldx #000a
E7BF 02 . idiv
E7C0 CB 30 .0 addb #30
-E7C2 F7 00 5F .._ stab 005f
+E7C2 F7 00 5F .._ stab 005f ; %10
E7C5 38 8 pulx
E7C6 39 9 rts
jump65:
EA59 34 4 des
-
; test PE2 - remote no-sale switch.
EA5A CE 00 04 ... ldx #0004
EA5D 3C < pshx
EE02 39 9 rts
jump36:
+; writes msg to screen for 1.5s
EE03 37 7 pshb
EE04 36 6 psha
EE05 30 0 tsx
F0A5 8F . xgdx
F0A6 E6 00 .. ldab 00,x
F0A8 F7 00 06 ... stab 0006
-F0AB BD D3 11 ... jsr d311 ;jump30
+F0AB BD D3 11 ... jsr d311 ;jump30 - test position exists
F0AE 83 00 00 ... subd #0000
F0B1 27 08 '. beq 08
F0B3 CC B1 A7 ... ldd #b1a7
F0D1 8F . xgdx
F0D2 E6 00 .. ldab 00,x
F0D4 F7 00 06 ... stab 0006
-F0D7 BD D1 3D ..= jsr d13d ;jump34
+F0D7 BD D1 3D ..= jsr d13d ;jump34 - motor on
F0DA BD D5 70 ..p jsr d570 ;jump35
F0DD 83 00 00 ... subd #0000
F0E0 26 0B &. bne 0b
-F0E2 BD D1 05 ... jsr d105 ;jump32
+F0E2 BD D1 05 ... jsr d105 ;motors_off
F0E5 CC B1 B2 ... ldd #b1b2
F0E8 BD EE 03 ... jsr ee03 ;jump36
F0EB 20 08 . bra 08
-F0ED BD D1 05 ... jsr d105 ;jump32
+F0ED BD D1 05 ... jsr d105 ;motors_off
F0F0 7C 00 61 |.a inc 0061
F0F3 20 CE . bra ce
F0F5 7F 00 61 ..a clr 0061
F106 8F . xgdx
F107 E6 00 .. ldab 00,x
F109 F7 00 06 ... stab 0006
-F10C BD D1 3D ..= jsr d13d ;jump34
+F10C BD D1 3D ..= jsr d13d ;jump34 - motor on
F10F CC 00 0A ... ldd #000a
F112 BD E5 71 ..q jsr e571 ;msdelay
F115 F6 18 00 ... ldab 1800
F118 C4 40 .@ andb #40
F11A 26 0B &. bne 0b
-F11C BD D1 05 ... jsr d105 ;jump32
+F11C BD D1 05 ... jsr d105 ;motors_off
F11F CC B1 B2 ... ldd #b1b2
F122 BD EE 03 ... jsr ee03 ;jump36
F125 20 1D . bra 1d
-F127 BD D1 05 ... jsr d105 ;jump32
+F127 BD D1 05 ... jsr d105 ;motors_off
F12A CC 00 0A ... ldd #000a
F12D BD E5 71 ..q jsr e571 ;msdelay
F130 F6 18 00 ... ldab 1800
F21D 30 0 tsx
F21E E6 01 .. ldab 01,x
F220 4F O clra
-F221 BD E7 95 ... jsr e795 ;jump54
+F221 BD E7 95 ... jsr e795 ;jump54 - number to string
F224 F6 00 5D ..] ldab 005d
F227 4F O clra
F228 BD F1 5B ..[ jsr f15b ;jump53
F259 1C 00 01 ... bset 00,x, #01
F25C 30 0 tsx
F25D EC 00 .. ldd 00,x
-F25F BD E7 45 ..E jsr e745 ;jump55
+F25F BD E7 45 ..E jsr e745 ;jump55 - number to string
F262 F6 00 57 ..W ldab 0057
F265 4F O clra
F266 BD F1 5B ..[ jsr f15b ;jump53
F2B2 1C 00 01 ... bset 00,x, #01
F2B5 30 0 tsx
F2B6 EC 00 .. ldd 00,x
-F2B8 BD E7 45 ..E jsr e745 ;jump55
+F2B8 BD E7 45 ..E jsr e745 ;jump55 - number to string
F2BB F6 00 57 ..W ldab 0057
F2BE 4F O clra
F2BF BD F1 5B ..[ jsr f15b ;jump53
F77D 08 . inx
F77E 3C < pshx
F77F 20 DE . bra de ; to f75f
-
+;
F781 F6 00 32 ..2 ldab 0032
F784 27 07 '. beq 07 ; to f78d
F786 F6 00 32 ..2 ldab 0032
F789 C4 02 .. andb #02
F78B 26 08 &. bne 08 ; to f795
-
+;
F78D CE 10 00 ... ldx #1000 ; chime off
F790 1D 00 10 .. bclr 00,x, #10
F793 20 0D . bra 0d ; to f7a2
-
+;
F795 F6 00 32 ..2 ldab 0032
F798 C4 01 .. andb #01
F79A 26 06 &. bne 06 ; to f7a2
F79C CE 10 00 ... ldx #1000 ; chime on
F79F 1C 00 10 .. bset 00,x, #10
-
+;
F7A2 7C 00 4C |.L inc 004c
F7A5 F6 00 4C ..L ldab 004c
F7A8 C1 4B .K cmpb #4b
F7CA 27 03 '. beq 03
F7CC BD FE 69 ..i jsr fe69 ;inhibit interrupts
F7CF C6 40 .@ ldab #40
-F7D1 F7 10 25 ..% stab 1025
+F7D1 F7 10 25 ..% stab 1025 ; notify end of RTI period
F7D4 38 8 pulx
F7D5 3B ; rti
main:
-
+;
F7D6 7F 00 14 ... clr 0014 ;0 -> 0014
-
+;
; clears the bits of U14 flipflop
F7D9 5F _ clrb ;0 -> B
F7DA F7 38 00 .8. stab 3800 ;B -> 3800
-
+;
F7DD C6 7F .. ldab #7f ;7F -> B
F7DF F7 00 1A ... stab 001a ;B -> 001a
-
+;
; set changer outputs all on, row motors off
F7E2 C6 7F .. ldab #7f ;7F -> B
F7E4 F7 30 00 .0. stab 3000 ;
-
+;
; sets priority select bits 0-3 (elevates interrupt priority of all interrupts)
F7E7 C6 07 .. ldab #07 ;7 -> B
F7E9 F7 10 3C ..< stab 103c
-
+;
; Set PA7 output, PA3 input, RT clock rate to 314 Hz (4.9152Mhz / 2^14)
F7EC C6 81 .. ldab #81 ;81 -> B
F7EE F7 10 26 ..& stab 1026
-
+;
; clear ADC register
F7F1 5F _ clrb ;0 -> B
F7F2 F7 10 30 ..0 stab 1030
-
+;
; talk to coin mech, beep, tie clock motors & display reset high (off)
F7F5 C6 C8 .. ldab #c8 ;c8 -> B ; 11001000
F7F7 F7 10 00 ... stab 1000 ; to port A
-
+;
; sets PortD directions. XXX: Why is PD2 an output?
F7FA C6 3E .> ldab #3e ;3e -> B 00111110
F7FC F7 10 09 ... stab 1009 ; port D DDR
-
+;
; make PortD pins open-drain, set clock polarity
F7FF C6 12 .. ldab #12 ;12 -> B
F801 F7 10 28 ..( stab 1028 ; SPCR 00101000
-
+;
; initialize the display
F804 BD BE 69 ..i jsr be69 ;displayreset
-
+;
; initialize the bill validator
F807 BD EA 59 ..Y jsr ea59 ;jump65
-
+;
F80A CC 00 64 ..d ldd #0064 ; 100-unit delay
F80D BD E5 71 ..q jsr e571 ;msdelay
; lotsa text
F837 BD C0 BA ... jsr c0ba ;display:
F83A CC 00 0A ... ldd #000a
F83D BD E5 71 ..q jsr e571 ;msdelay
-
-
+;
+;
F840 7F 00 7F ... clr 007f
F843 7F 00 21 ..! clr 0021
F846 7F 00 1F ... clr 001f
F849 7F 00 1D ... clr 001d
F84C 7F 00 1B ... clr 001b
F84F 7F 00 19 ... clr 0019
-
+;
F852 F6 0B C0 ... ldab 0bc0
F855 C4 01 .. andb #01
F857 27 08 '. beq 08 ; to f861
F859 CE 0B C1 ... ldx #0bc1
-F85C 1C 00 01 ... bset 00,x, #01
+F85C 1C 00 01 ... bset 00,x, #01 ; set changer powerup fail
F85F 20 06 . bra 06 ; to f867
F861 CE 0B C1 ... ldx #0bc1
-F864 1D 00 01 ... bclr 00,x, #01
-
+F864 1D 00 01 ... bclr 00,x, #01 ; clear changer powerup fail
+;
F867 F6 0B C0 ... ldab 0bc0
F86A C4 04 .. andb #04
F86C 27 08 '. beq 08 ; to f876
F86E CE 0B C1 ... ldx #0bc1
-F871 1C 00 02 ... bset 00,x, #02
+F871 1C 00 02 ... bset 00,x, #02 ; set card powerup fail
F874 20 06 . bra 06 ; to f87c
F876 CE 0B C1 ... ldx #0bc1
-F879 1D 00 02 .. bclr 00,x, #02
+F879 1D 00 02 .. bclr 00,x, #02 ; clear card powerup fail
F87C CE 0B C1 ... ldx #0bc1
-F87F 1D 00 04 .. bclr 00,x, #04
+F87F 1D 00 04 .. bclr 00,x, #04 ; clear link powerup fail
F882 F6 0B C0 ... ldab 0bc0
F885 C4 02 .. andb #02
F887 27 2D '- beq 2d ; to f8b6
F8F9 C6 1E .. ldab #1e
F8FB F7 00 35 ..5 stab 0035
F8FE 0E . cli
-
+;
; begin of main loop
goto85:
F8FF BD E6 1B ... jsr e61b ;jump4 set 0031 to 10
-F902 BD D1 05 ... jsr d105 ;jump32 motors off
+F902 BD D1 05 ... jsr d105 ;motors_off
F905 F6 10 0A ... ldab 100a
F908 C4 08 .. andb #08 ; 24VUN line too low
F90A 27 46 'F beq 46 ; to f952
F90C F6 10 0A ... ldab 100a
F90F C4 08 .. andb #08
-F911 27 11 '. beq 11
+F911 27 11 '. beq 11 ; to f924
F913 CE 00 1A ... ldx #001a
F916 1C 00 04 .. bset 00,x, #04
F919 F6 00 1A ... ldab 001a
F91C F7 30 00 .0. stab 3000 ; changer reset
-F91F BD E6 1B ... jsr e61b ;jump4
-F922 20 E8 . bra e8
-F924 BD D0 94 ... jsr d094 ;jump66
+F91F BD E6 1B ... jsr e61b ;jump4 put #0a => 0031
+F922 20 E8 . bra e8 ; to f90c
+;
+F924 BD D0 94 ... jsr d094 ;jump66 - reset some variables to defaults?
F927 F6 0B C0 ... ldab 0bc0
F92A C4 01 .. andb #01
F92C 27 06 '. beq 06
F92E CE 0B C1 ... ldx #0bc1
-F931 1C 00 01 .. bset 00,x, #01
+F931 1C 00 01 .. bset 00,x, #01 ; set changer powerup fail
F934 F6 0B C0 ... ldab 0bc0
F937 C4 04 .. andb #04
F939 27 06 '. beq 06
F93B CE 0B C1 ... ldx #0bc1
-F93E 1C 00 02 .. bset 00,x, #02
+F93E 1C 00 02 .. bset 00,x, #02 ; set card powerup fail
F941 CE 00 1A ... ldx #001a
F944 1D 00 04 .. bclr 00,x, #04
F947 F6 00 1A ... ldab 001a
F96C 1C 00 08 .. bset 00,x, #08 ; set bill error bit
;
F96F F6 0B C1 ... ldab 0bc1
-F972 C4 07 .. andb #07
+F972 C4 07 .. andb #07 ; test for power failures
F974 27 0D '. beq 0d ; to f983
F976 F6 00 35 ..5 ldab 0035
F979 26 08 &. bne 08
FA05 F7 00 31 ..1 stab 0031
FA08 0E . cli
FA09 CC 00 FF ... ldd #00ff
-FA0C BD C7 E7 ... jsr c7e7 ;jump37
+FA0C BD C7 E7 ... jsr c7e7 ;jump37 - send #ff to coin mech
FA0F 5F _ clrb
FA10 4F O clra
FA11 FD 00 40 ..@ std 0040
FA85 26 03 &. bne 03
FA87 BD E5 AA ... jsr e5aa ;jump12
FA8A CE 00 1F ... ldx #001f
-FA8D 1C 00 .. bset add,x 00,x
-FA8F 20 F6 . bra f6
-FA91 00 . test
-FA92 12 . brset
+FA8D 1C 00 .. bset 00,x, #20
+FA8F F6 00 12 ... ldab 0012
FA93 C4 01 .. andb #01
FA95 26 33 &3 bne 33
FA97 F6 00 1D ... ldab 001d
FAA5 CE 00 1F ... ldx #001f
FAA8 1C 00 04 ... bset 00,x, #04
FAAB CE 00 1F ... ldx #001f
-FAAE 1C 00 .. bset add,x 00,x
-FAB0 80 CC .. suba #cc
-FAB2 02 . idiv
-FAB3 33 3 pulb
+FAAE 1C 00 .. bset 00,x, #80
+FAB0 CC 02 33 .. ldd #0233
FAB4 FD 00 3B ..; std 003b
FAB7 20 09 . bra 09 ; to fac2
;