X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=ROM-2003%2Fvend.asm;h=c65454215427f26fc5af833585775802a58b884b;hb=689bb839fdec8d8cb22d804250f259d1a9d46e3d;hp=576324f6f0c717604fd0d149778c1a10e29475d3;hpb=a3a7f30a9b201ef620462d40af092e6cb6ffbc9e;p=uccvend-snackrom.git diff --git a/ROM-2003/vend.asm b/ROM-2003/vend.asm index 576324f..c654542 100644 --- a/ROM-2003/vend.asm +++ b/ROM-2003/vend.asm @@ -1,4 +1,4 @@ -;0000 +;0000 set to 1 at the end of a keypad read and turned off at the next rti ;0001 coin mask? (cf 0x001a, 0x3000, 0xc430) ;0003 global only used in jump71 ;0005 number of motors we have @@ -8,34 +8,44 @@ ;0009 ;000a ;000c -;0012 another buffer for 1800 -;0013 +;0011 another reflection of 2000 +;0012 another buffer for 1800 - what change to give? +;0013 location of decimal point? ;0014 buffer for 3800 register ;0015 ;0016 new key state (cf 0029) ;0017 bits 5-7 used mostly ;0018 -;0019 +;0019 error statuses: +; bit 0 - over current +; bit 1 - home sensor failure +; bit 2 - check prices ;001a buffer for 3000 register - initialised to 7F ;001b bit 3 - denote motor fault? ;001c used for loop variables ;001d ;001f display related? bit 2. bit 4 denotes service mode +;0020 reflection of 2000 ;0021 lower 3 bits taken from SCI data somewhere ; bit 5 denotes machine out of order ;0023 buffer for 1800 +;0025 timer of some sort? - set to #0a and decremented by RTI ;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 ;0035 only ever contains #1e ;003b commonly contains $0233 ;003d -;003e mask for 0040? (see f996) -;003f -;0040 +;003e cash in bill acceptor? +;003f word from above +;0040 cash in european coin mech? +;0041 word from above ;0042 current key press +;0043 current byte being sent out serial port ;0048 error status ;004a ;0052 win-a-snack odds (in ram) @@ -44,7 +54,9 @@ ;005b last known keypad row 0 state ;005a - result of number to string operations (jump55) ; 005f +;0067 working space of 0bc0 ;0073 +;0075 something about link master price holding ;0076-0077 word ;007f ;00c8 @@ -60,7 +72,15 @@ ;0bbd ;0bd8 related to 0017 and 0021 (only lower 3 bits used) ;0bd9 also related -;0bc0 bit 0, 2, 1, 3 +;0bc0 machine peripheral configuration flags +; bit0: have dumb mech +; bit1: have a changer +; bit2: have card reader +; bit3: have bill validator +; bit4: link master - price holding enabled +; bit5: link master - price display enabled +; bit6: have $1 changer +; bit7: free vend ;0bc1 error status: (from jump72) ; bit0: changer powerup ; bit1: card powerup @@ -69,14 +89,33 @@ ; bit4: coin jam ; bit5: bad sensor ; bit6: tube error -;0bc2 - 0bce SCI read into these locations -;0bd +; +; SCI read buffer: +; +;0bc2 multiplied by 10^0bc3 and stored into 0baa +;0bc3 10 is raise to the power of this number shr 4, and multiplied by 0baa +;0bc4 index of something +;0bc5 index of something else +;0bc6 index of another thing +;0bc7 word number of something +;0bc8 +;0bc9 word number of something else +;0bca +;0bcb word number of another thing +;0bcc +;0bcd word number of another else +;0bce +; ;0bc4 array index into 0bc7 ;0bc5 ;0bc6 another array index into 0bc7 ;0bc7 word array ; -;0be1 +;0bdd value of coin mech quarters +;0bdf value of coin mech dimes +;0be1 value of coin mech nickels + +; ;0bd7 init'd to 0x01 ;0bd8 init'd to 0x04 ;0bd9 init'd to 0x02 @@ -86,10 +125,22 @@ ; ;0cbc serial number (string) ;0ccc machine ID (string) -;0ce7 audit number (1-bit) +;0ce7 audit number (word) +; ;0cd9 counter of something - reset to 4 on some serial input ;0cda counter of something - reset to 4 on some serial input ;0cdb also counts something - reset to 4 on some serial input + +;0ce9 value or number of $1 coins +;0ceb value or number of 20c coins +;0ced value or number of 10c coins +;0cef value or number of 5c coins + +;0cdc number of value of $1 coins +;0cdb number or value of 20c coin +;0cda number or value of 10c coins +;0cd9 number or value of 5c coins + ;0dff - 0e04 keypad buffer - most recent in 0e04 ;0e05 array index of the array to follow ;0e06 - ?? array of digits*10 @@ -103,6 +154,8 @@ +;0800 - 0x0fff memory bank 2k +; ;1800 Internal switches ; 7 changer INT' ; 6 Sold out. @@ -409,7 +462,7 @@ jump72: ; initial menu when door opens? 8100 F6 00 1D ... ldab 001d 8103 C4 10 .. andb #10 -8105 27 3D '= beq 3d +8105 27 3D '= beq 3d ; to 8144 8107 BD D6 52 ..R jsr d652 ;jump5 810A CE 00 1D ... ldx #001d 810D 1D 00 10 ... bclr 00,x, #10 @@ -431,6 +484,7 @@ jump72: 813B 7F 0E 02 ... clr 0e02 813E 7F 0E 03 ... clr 0e03 8141 7F 0E 04 ... clr 0e04 +; 8144 F6 00 42 ..B ldab 0042 8147 C1 0B .. cmpb #0b 8149 26 0F &. bne 0f @@ -916,6 +970,7 @@ jump14: 85BE 39 9 rts jump28: +; drop some change out of the changer? 85BF F6 00 12 ... ldab 0012 85C2 C4 1E .. andb #1e ; 00011110 85C4 4F O clra @@ -934,7 +989,7 @@ jump28: 85EC 7F 00 2C .., clr 002c 85EF F6 0C D9 ... ldab 0cd9 85F2 27 03 '. beq 03 -85F4 7A 0C D9 z.. dec 0cd9 +85F4 7A 0C D9 z.. dec 0cd9 ; decrement number of 5c coins 85F7 BD 97 F6 ... jsr 97f6 ;jump27 85FA CC 01 5E ..^ ldd #015e 85FD BD E5 71 ..q jsr e571 ;msdelay @@ -949,7 +1004,7 @@ jump28: 8616 7F 00 2C .., clr 002c 8619 F6 0C DA ... ldab 0cda 861C 27 03 '. beq 03 -861E 7A 0C DA z.. dec 0cda +861E 7A 0C DA z.. dec 0cda ; decrement number of 10c coins 8621 BD 97 F6 ... jsr 97f6 ;jump27 8624 CC 01 5E ..^ ldd #015e 8627 BD E5 71 ..q jsr e571 ;msdelay @@ -964,7 +1019,7 @@ jump28: 8640 7F 00 2C .., clr 002c 8643 F6 0C DB ... ldab 0cdb 8646 27 03 '. beq 03 -8648 7A 0C DB z.. dec 0cdb +8648 7A 0C DB z.. dec 0cdb ; decrement number of 20c coins 864B BD 97 F6 ... jsr 97f6 ;jump27 864E CC 01 5E ..^ ldd #015e 8651 BD E5 71 ..q jsr e571 ;msdelay @@ -979,7 +1034,7 @@ jump28: 8669 7F 00 2C .., clr 002c 866C F6 0C DC ... ldab 0cdc 866F 27 03 '. beq 03 -8671 7A 0C DC z.. dec 0cdc +8671 7A 0C DC z.. dec 0cdc ; decrement number of $1 coins 8674 BD 97 F6 ... jsr 97f6 ;jump27 8677 CC 01 5E ..^ ldd #015e 867A BD E5 71 ..q jsr e571 ;msdelay @@ -1487,7 +1542,7 @@ goto8: 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 @@ -1625,6 +1680,7 @@ goto7: 8C72 39 9 rts jump75: +;fetches a price & other info for the given slot? 8C73 F6 00 06 ... ldab 0006 8C76 4F O clra 8C77 05 . asld @@ -1652,7 +1708,7 @@ jump75: 8CA1 84 08 .. anda #08 8CA3 27 08 '. beq 08 8CA5 CE 00 19 ... ldx #0019 -8CA8 1C 00 10 ... bset 00,x, #10 +8CA8 1C 00 10 ... bset 00,x, #10 ; corresponds to whatever '*' is on price display 8CAB 20 06 . bra 06 8CAD CE 00 19 ... ldx #0019 8CB0 1D 00 10 ... bclr 00,x, #10 @@ -1840,17 +1896,20 @@ jump19: 8E5A F6 00 09 ... ldab 0009 8E5D 4F O clra 8E5E BD FE 32 ..2 jsr fe32 ;jump25 -8E61 8E 7B 00 00 .{.. ; array data for jump25 -8E65 8E 81 00 01 .... -8E69 8E 87 00 04 .... -8E6D 8F 01 00 05 .... -8E71 8F 09 00 01 .... -8E75 8F 0C FF F5 .... +8E61 8E 7B 00 00 .{.. ; no key +8E65 8E 81 00 01 .... ; key 1 - toggle? +8E69 8E 87 00 04 .... ; key 5 - save and next +8E6D 8F 01 00 05 .... ; key 0 - exit +8E71 8F 09 00 01 .... ; key reset - exit +8E75 8F 0C FF F5 .... ; default 8E79 00 00 .. ; end of array data -8E7B BD 9C 15 ... jsr 9c15 ;jump111 +; +8E7B BD 9C 15 ... jsr 9c15 ;jump111 - write the option name 8E7E 7E 8F 0C ~.. jmp 8f0c ;goto12 +; 8E81 BD A7 5F .._ jsr a75f ;jump133 8E84 7E 8F 0C ~.. jmp 8f0c ;goto12 +; 8E87 F6 00 48 ..H ldab 0048 8E8A C1 08 .. cmpb #08 8E8C 25 05 %. bcs 05 @@ -1864,12 +1923,14 @@ jump19: 8EA0 F6 00 48 ..H ldab 0048 8EA3 C1 01 .. cmpb #01 8EA5 26 0F &. bne 0f +; 8EA7 F6 00 67 ..g ldab 0067 8EAA C4 02 .. andb #02 8EAC 26 08 &. bne 08 8EAE F6 00 48 ..H ldab 0048 8EB1 CB 02 .. addb #02 8EB3 F7 00 48 ..H stab 0048 +; 8EB6 F6 00 48 ..H ldab 0048 8EB9 C1 02 .. cmpb #02 8EBB 26 0A &. bne 0a @@ -1898,8 +1959,9 @@ jump19: 8EF3 7F 00 48 ..H clr 0048 8EF6 F6 0B C0 ... ldab 0bc0 8EF9 F7 00 67 ..g stab 0067 -8EFC BD 9C 15 ... jsr 9c15 ;jump111 +8EFC BD 9C 15 ... jsr 9c15 ;jump111 - write the next option 8EFF 20 0B . bra 0b +; 8F01 BD A4 59 ..Y jsr a459 ;jump110 8F04 BD 85 AF ... jsr 85af ;jump14 8F07 20 03 . bra 03 @@ -2127,7 +2189,7 @@ jump21: 9126 7F 00 09 ... clr 0009 9129 7F 00 0A ... clr 000a 912C 39 9 rts - +; 912D F6 00 19 ... ldab 0019 9130 2C 28 ,( bge 28 9132 BD A9 CF ... jsr a9cf ;jump131 @@ -2207,10 +2269,8 @@ jump76: 91E2 7F 00 54 ..T clr 0054 91E5 7F 00 60 ..` clr 0060 91E8 CE 00 19 ... ldx #0019 -91EB 1D 00 .. bclr add,x 00,x -91ED 80 7F .. suba #7f -91EF 00 . test -91F0 36 6 psha +91EB 1D 00 80 .. bclr 00,x, #80 +91EE 7F 00 36 .. clr 0036 91F1 20 66 f bra 66 91F3 F6 00 0A ... ldab 000a 91F6 4F O clra @@ -2578,13 +2638,10 @@ jump203: 9551 CC B0 B8 ... ldd #b0b8 ; "SELECTION?" 9554 BD C0 BA ... jsr c0ba ;display: 9557 CE 00 19 ... ldx #0019 -955A 1D 00 .. bclr add,x 00,x -955C 80 CE .. suba #ce -955E 00 . test -955F 1D 1D 00 ... bclr 1d,x, #00 -9562 80 7F .. suba #7f -9564 00 . test -9565 54 T lsrb +955A 1D 00 80 .. bclr 00,x, #80 +955D CE 00 1D .. ldx #001d +9560 1D 00 80 ... bclr 00,x, #80 +9562 7F 00 54 .. clr 0054 9566 C6 32 .2 ldab #32 9568 F7 00 3A ..: stab 003a 956B F6 00 0A ... ldab 000a @@ -2640,10 +2697,8 @@ jump203: 95DF F7 00 3A ..: stab 003a 95E2 20 09 . bra 09 95E4 CE 00 19 ... ldx #0019 -95E7 1C 00 .. bset add,x 00,x -95E9 80 7F .. suba #7f -95EB 00 . test -95EC 3A : abx +95E7 1C 00 80 .. bset 00,x, #80 +95E9 7F 00 3A .. clr 003a 95ED BD BE 01 ... jsr be01 ;jump70 95F0 7C 00 54 |.T inc 0054 95F3 F6 00 54 ..T ldab 0054 @@ -2671,49 +2726,41 @@ jump203: 9623 26 21 &! bne 21 9625 BD D3 11 ... jsr d311 ;jump30 - test position exists 9628 83 00 00 ... subd #0000 -962B 26 0B &. bne 0b +962B 26 0B &. bne 0b ; to 9638 962D CE 00 1F ... ldx #001f -9630 1C 00 40 ... bset 00,x, #40 -9633 BD 8C 73 ..s jsr 8c73 ;jump75 -9636 20 06 . bra 06 +9630 1C 00 40 ... bset 00,x, #40 ; denotes an invalid slot or unmarked price? (fills display with XXX.XX) +9633 BD 8C 73 ..s jsr 8c73 ;jump75 - fetch slot info +9636 20 06 . bra 06 ; to 963e 9638 CE 00 1F ... ldx #001f 963B 1D 00 40 ... bclr 00,x, #40 963E 7F 00 2C .., clr 002c -9641 BD 9A 47 ..G jsr 9a47 ;jump39 +9641 BD 9A 47 ..G jsr 9a47 ;jump39 - display price on screen 9644 20 0C . bra 0c 9646 CE 00 1D ... ldx #001d -9649 1D 00 .. bclr add,x 00,x -964B 80 CE .. suba #ce -964D 00 . test -964E 19 . daa -964F 1C 00 .. bset add,x 00,x -9651 80 20 . suba #20 -9653 06 . tap +9649 1D 00 80 .. bclr 00,x, #80 +964C CE 00 19 .. ldx #0019 +964F 1C 00 80 .. bset 00,x, #80 +9652 20 06 . bra 06 9654 CE 00 1D ... ldx #001d -9657 1D 00 .. bclr add,x 00,x -9659 80 20 . suba #20 -; 965a goto93 -965B 2B F6 +. bmi f6 -; 965C -;goto16 -965D 00 . test -965E 1D 2C ., bclr add,x 2c,x -9660 26 BD &. bne bd -9662 D2 13 83 ... sbcb 13 -9665 00 . test -9666 00 . test +9657 1D 00 80 .. bclr 00,x, #80 +goto93: +965A 20 2B . bra 2b +goto16: +965C F6 00 1D +. ldab 001d +965F 2C 26 ., bge 26 +9661 BD D2 13 &. jsr d213 ;jump45 - vend it! +9664 83 00 00 ... subd #0000 9667 26 0F &. bne 0f 9669 CC 00 64 ..d ldd #0064 966C BD E5 71 ..q jsr e571 ;msdelay 966F BD E5 D1 ... jsr e5d1 ;jump52 - triple beep -9672 CC 03 84 ... ldd #0384 +9672 CC 03 84 ... ldd #0384 ; 900 9675 BD E5 71 ..q jsr e571 ;msdelay 9678 7F 00 2E ... clr 002e 967B CE 00 1D ... ldx #001d -967E 1D 00 .. bclr add,x 00,x -9680 80 CE .. suba #ce -9682 00 . test -9683 1F 1C 00 02 .... brclr 1c,x 00 02 +967E 1D 00 80 .. bclr 00,x, #80 +9680 CE 00 1F .. ldx #001f +9683 1C 00 02 ... bset 00,x #02 9687 39 9 rts jump148: @@ -2766,7 +2813,7 @@ jump148: 9701 C1 63 .c cmpb #63 9703 26 03 &. bne 03 9705 7F 00 2C .., clr 002c -9708 BD D2 13 ... jsr d213 ;jump45 +9708 BD D2 13 ... jsr d213 ;jump45 - vend it! 970B 83 00 00 ... subd #0000 970E 27 03 '. beq 03 9710 7C 00 05 |.. inc 0005 @@ -3128,6 +3175,7 @@ jump102: 9A46 39 9 rts jump39: +; write a slot, price, etc to screen. 9A47 BD BE 4B ..K jsr be4b ;displayblank 9A4A F6 00 06 ... ldab 0006 9A4D 4F O clra @@ -3140,7 +3188,7 @@ jump39: 9A5F F7 0B 97 ... stab 0b97 9A62 F6 00 1F ... ldab 001f 9A65 C4 40 .@ andb #40 -9A67 27 45 'E beq 45 +9A67 27 45 'E beq 45 ; to 9aae 9A69 FC 00 27 ..' ldd 0027 9A6C BD E7 45 ..E jsr e745 ;jump55 - number to string 9A6F F6 00 5A ..Z ldab 005a @@ -3154,7 +3202,7 @@ jump39: 9A87 F6 00 19 ... ldab 0019 9A8A C4 10 .. andb #10 9A8C 27 07 '. beq 07 -9A8E C6 2A .* ldab #2a +9A8E C6 2A .* ldab #2a ; '*' 9A90 F7 0B 92 ... stab 0b92 9A93 20 05 . bra 05 9A95 C6 20 . ldab #20 @@ -3165,22 +3213,24 @@ jump39: 9AA3 F7 0B 91 ... stab 0b91 9AA6 F6 00 5F .._ ldab 005f 9AA9 F7 0B 90 ... stab 0b90 -9AAC 20 1E . bra 1e -9AAE C6 58 .X ldab #58 : "X" +9AAC 20 1E . bra 1e ; to 9acc +; +9AAE C6 58 .X ldab #58 ; "X" 9AB0 F7 0B 96 ... stab 0b96 -9AB3 C6 58 .X ldab #58 : "X" +9AB3 C6 58 .X ldab #58 ; "X" 9AB5 F7 0B 95 ... stab 0b95 -9AB8 C6 58 .X ldab #58 : "X" +9AB8 C6 58 .X ldab #58 ; "X" 9ABA F7 0B 94 ... stab 0b94 -9ABD C6 58 .X ldab #58 : "X" +9ABD C6 58 .X ldab #58 ; "X" 9ABF F7 0B 93 ... stab 0b93 -9AC2 C6 58 .X ldab #58 : "X" +9AC2 C6 58 .X ldab #58 ; "X" 9AC4 F7 0B 91 ... stab 0b91 -9AC7 C6 58 .X ldab #58 : "X" +9AC7 C6 58 .X ldab #58 ; "X" 9AC9 F7 0B 90 ... stab 0b90 +; 9ACC F6 00 13 ... ldab 0013 9ACF C1 01 .. cmpb #01 -9AD1 23 4C #L bls 4c +9AD1 23 4C #L bls 4c ; to 9b1f 9AD3 F6 0B 91 ... ldab 0b91 9AD6 F7 0B 90 ... stab 0b90 9AD9 F6 0B 92 ... ldab 0b92 @@ -3194,7 +3244,7 @@ jump39: 9AF0 26 07 &. bne 07 9AF2 C6 2E .. ldab #2e ; "." 9AF4 F7 0B 94 ... stab 0b94 -9AF7 20 26 & bra 26 +9AF7 20 26 & bra 26 ; to 9b1f 9AF9 C1 04 .. cmpb #04 9AFB 26 0D &. bne 0d 9AFD F6 0B 95 ... ldab 0b95 @@ -3210,9 +3260,12 @@ jump39: 9B17 F7 0B 95 ... stab 0b95 9B1A C6 2E .. ldab #2e 9B1C F7 0B 96 ... stab 0b96 +; 9B1F F6 00 2C .., ldab 002c 9B22 26 3E &> bne 3e 9B24 BD BE 69 ..i jsr be69 ;displayreset +95EB 00 . test +95EC 3A : abx 9B27 F6 00 13 ... ldab 0013 9B2A C1 01 .. cmpb #01 9B2C 23 2C #, bls 2c @@ -3230,7 +3283,7 @@ jump39: 9B47 20 0B . bra 0b 9B49 CE 00 01 ... ldx #0001 9B4C 3C < pshx -9B4D CC 00 58 ..X ldd #0058 +9B4D CC 00 58 ..X ldd #0058 ; 'X' 9B50 BD BD B5 ... jsr bdb5 ;jump78 9B53 38 8 pulx 9B54 CE 10 28 ..( ldx #1028 @@ -3317,23 +3370,21 @@ jump111: 9C18 F6 00 48 ..H ldab 0048 9C1B 4F O clra 9C1C BD FE 16 ... jsr fe16 ;jump2 -9C1F 00 . test -9C20 00 . test -9C21 00 . test -9C22 0A . clv -9C23 9D 29 9C .). jsr 29 -9C26 3B ; rti -9C27 9C 53 9C .S. cmpx 53 -9C2A 6B k illegal -9C2B 9C 83 9C ... cmpx 83 -9C2E 9B 9C B2 ... adda 9c -9C31 9C C9 9C ... cmpx c9 -9C34 E0 9C .. subb 9c,x -9C36 F7 9D 0E ... stab 9d0e -9C39 9D 23 F6 .#. jsr 23 -9C3C 00 . test -9C3D 67 C4 g. asr c4,x -9C3F 02 . idiv +9C1F 00 00 00 0A . 0..10 +9C23 9D 29 .). ; +9C25 9C 3B ; ; +9C27 9C 53 .S. ; +9C29 9C 6B k ; +9C2B 9C 83 ... ; +9C2D 9C 9B ... ; +9C2F 9C B2 ... ; +9C31 9C C9 ... ; +9C33 9C E0 ... ; +9C35 9C F7 .. ; +9C37 9D 0E ... ; +9C39 9D 23 .#. ; +9C3B F6 00 67 . ldab 0067 +9C3D C4 02 g. andb #02 9C40 27 08 '. beq 08 9C42 CC AF 00 ... ldd #af00 ; "LNK MSTR Y" 9C45 BD C0 BA ... jsr c0ba ;display: @@ -3341,6 +3392,7 @@ jump111: 9C4A CC AF 0B ... ldd #af0b ; "LNK MSTR N" 9C4D BD C0 BA ... jsr c0ba ;display: 9C50 7E 9D 29 ~.) jmp 9d29 ;goto18 +; 9C53 F6 00 67 ..g ldab 0067 9C56 C4 10 .. andb #10 9C58 27 08 '. beq 08 @@ -3350,6 +3402,7 @@ jump111: 9C62 CC AF 4D ..M ldd #af4d ; "PRC HOLD N" 9C65 BD C0 BA ... jsr c0ba ;display: 9C68 7E 9D 29 ~.) jmp 9d29 ;goto18 +; 9C6B F6 00 67 ..g ldab 0067 9C6E C4 20 . andb #20 9C70 27 08 '. beq 08 @@ -3359,6 +3412,7 @@ jump111: 9C7A CC AF 63 ..c ldd #af63 ; "PRC DISP N" 9C7D BD C0 BA ... jsr c0ba ;display: 9C80 7E 9D 29 ~.) jmp 9d29 ;goto18 +; 9C83 F6 00 67 ..g ldab 0067 9C86 C4 01 .. andb #01 9C88 27 08 '. beq 08 @@ -3459,7 +3513,7 @@ jump89: 9D77 F7 0B 90 ... stab 0b90 9D7A BD BE 01 ... jsr be01 ;jump70 9D7D 39 9 rts - +; 9D7E BD BE 4B ..K jsr be4b ;displayblank 9D81 F6 00 60 ..` ldab 0060 9D84 4F O clra @@ -3579,6 +3633,7 @@ jump142: 9E88 39 9 rts jump100: +; print out information to display 9E89 BD BE 4B ..K jsr be4b ;displayblank 9E8C F6 00 48 ..H ldab 0048 9E8F 4F O clra @@ -3824,7 +3879,7 @@ A0CC 4F O clra A0CD BD A3 1A ... jsr a31a ;jump93 A0D0 38 8 pulx A0D1 7E A1 C4 ~.. jmp a1c4 ;goto19 -A0D4 CC B3 F2 ... ldd #b3f2 +A0D4 CC B3 F2 ... ldd #b3f2 ; "DIMES" A0D7 BD C0 BA ... jsr c0ba ;display: A0DA 7E A1 C4 ~.. jmp a1c4 ;goto19 A0DD FE 0C ED ... ldx 0ced @@ -3834,7 +3889,7 @@ A0E4 4F O clra A0E5 BD A3 1A ... jsr a31a ;jump93 A0E8 38 8 pulx A0E9 7E A1 C4 ~.. jmp a1c4 ;goto19 -A0EC CC B4 04 ... ldd #b404 +A0EC CC B4 04 ... ldd #b404 ; "NICKELS" A0EF BD C0 BA ... jsr c0ba ;display: A0F2 7E A1 C4 ~.. jmp a1c4 ;goto19 A0F5 FE 0C EF ... ldx 0cef @@ -4080,6 +4135,7 @@ A318 38 8 pulx A319 39 9 rts jump93: +; write number to display A31A 37 7 pshb A31B 36 6 psha A31C 30 0 tsx @@ -4257,6 +4313,7 @@ A455 BD A3 6C ..l jsr a36c ;jump81 A458 39 9 rts jump110: +; some sort of defaults setting loading? plays with 0067 an awful lot A459 3C < pshx A45A F6 00 67 ..g ldab 0067 A45D C4 02 .. andb #02 @@ -4638,24 +4695,23 @@ jump133: A75F F6 00 48 ..H ldab 0048 A762 4F O clra A763 BD FE 16 ... jsr fe16 ;jump2 -A766 00 . test -A767 00 . test -A768 00 . test -A769 09 . dex -A76A A7 DC .. staa dc,x -A76C A7 80 .. staa 80,x -A76E A7 87 .. staa 87,x -A770 A7 8E .. staa 8e,x -A772 A7 95 .. staa 95,x -A774 A7 9C .. staa 9c,x -A776 A7 A3 .. staa a3,x -A778 A7 AA .. staa aa,x -A77A A7 B1 .. staa b1,x -A77C A7 C4 .. staa c4,x -A77E A7 D7 .. staa d7,x +A766 00 00 00 09 . test +A76A A7 DC .. ; +A76C A7 80 .. ; +A76E A7 87 .. ; +A770 A7 8E .. ; +A772 A7 95 .. ; +A774 A7 9C .. ; +A776 A7 A3 .. ; +A778 A7 AA .. ; +A77A A7 B1 .. ; +A77C A7 C4 .. ; +A77E A7 D7 .. ; +; A780 C6 02 .. ldab #02 A782 F7 00 02 ... stab 0002 A785 20 55 U bra 55 +; A787 C6 10 .. ldab #10 A789 F7 00 02 ... stab 0002 A78C 20 4E N bra 4e @@ -4762,7 +4818,7 @@ A87B 31 1 ins A87C 31 1 ins A87D 2C 0A ,. bge 0a A87F F6 00 60 ..` ldab 0060 -A882 C1 F9 .. cmpb #f9 +A882 C1 F9 .. cmpb #f9 ; -7 A884 24 03 $. bcc 03 A886 7C 00 60 |.` inc 0060 A889 20 0A . bra 0a @@ -4776,19 +4832,19 @@ jump98: A896 F6 00 36 ..6 ldab 0036 A899 26 39 &9 bne 39 A89B F6 00 54 ..T ldab 0054 -A89E C1 27 .' cmpb #27 +A89E C1 27 .' cmpb #27 ; 39 A8A0 24 20 $ bcc 20 A8A2 7C 00 54 |.T inc 0054 A8A5 F6 00 09 ... ldab 0009 A8A8 C1 01 .. cmpb #01 A8AA 26 0C &. bne 0c A8AC F6 00 54 ..T ldab 0054 -A8AF C1 27 .' cmpb #27 +A8AF C1 27 .' cmpb #27 ; 39 A8B1 26 03 &. bne 03 A8B3 7F 00 54 ..T clr 0054 A8B6 20 0A . bra 0a A8B8 F6 00 54 ..T ldab 0054 -A8BB C1 24 .$ cmpb #24 +A8BB C1 24 .$ cmpb #24 ; 36 A8BD 26 03 &. bne 03 A8BF 7F 00 54 ..T clr 0054 A8C2 F6 00 54 ..T ldab 0054 @@ -4953,11 +5009,11 @@ AA06 F7 00 61 ..a stab 0061 AA09 39 9 rts jump130: -AA0A C6 53 .S ldab #53 +AA0A C6 53 .S ldab #53 ; 'S' AA0C F7 0C B9 ... stab 0cb9 -AA0F C6 29 .) ldab #29 +AA0F C6 29 .) ldab #29 ; ')' AA11 F7 0C BA ... stab 0cba -AA14 C6 20 . ldab #20 +AA14 C6 20 . ldab #20 ; ' ' AA16 F7 0C BB ... stab 0cbb AA19 7F 00 54 ..T clr 0054 AA1C F6 00 54 ..T ldab 0054 @@ -5148,7 +5204,7 @@ AB92 BD E5 71 ..q jsr e571 ;msdelay AB95 BD D4 79 ..y jsr d479 ;jump67 AB98 BD E8 9A ... jsr e89a ;jump68 AB9B BD E9 EA ... jsr e9ea ;jump113 -AB9E 7F 0B C1 ... clr 0bc1 +AB9E 7F 0B C1 ... clr 0bc1 ; clear all errors ABA1 39 9 rts jump8: @@ -5266,7 +5322,7 @@ AC81 F6 00 19 ... ldab 0019 AC84 C4 07 .. andb #07 AC86 26 0A &. bne 0a AC88 F6 0B C1 ... ldab 0bc1 -AC8B C4 7F .. andb #7f +AC8B C4 7F .. andb #7f ; have errors? AC8D 26 03 &. bne 03 AC8F 5F _ clrb AC90 20 02 . bra 02 @@ -7384,28 +7440,28 @@ B91C 7F 00 2C .., clr 002c B91F BD BE 01 ... jsr be01 ;jump70 write to display B922 C6 0A .. ldab #0a B924 F7 00 2C .., stab 002c -B927 7E BA 81 ~.. jmp ba81 ;goto27 +B927 7E BA 81 ~.. jmp ba81 ;goto27 - return goto25: B92A F6 0E 6D ..m ldab 0e6d B92D C1 01 .. cmpb #01 B92F 27 03 '. beq 03 -B931 7E BA 81 ~.. jmp ba81 ;goto27 +B931 7E BA 81 ~.. jmp ba81 ;goto27 - return B934 F6 0E 00 ... ldab 0e00 B937 C1 05 .. cmpb #05 B939 27 03 '. beq 03 -B93B 7E BA 81 ~.. jmp ba81 ;goto27 +B93B 7E BA 81 ~.. jmp ba81 ;goto27 - return B93E F6 0E 01 ... ldab 0e01 B941 C1 05 .. cmpb #05 B943 27 03 '. beq 03 -B945 7E BA 81 ~.. jmp ba81 ;goto27 +B945 7E BA 81 ~.. jmp ba81 ;goto27 - return B948 F6 0E 02 ... ldab 0e02 B94B C1 05 .. cmpb #05 B94D 27 03 '. beq 03 -B94F 7E BA 81 ~.. jmp ba81 ;goto27 +B94F 7E BA 81 ~.. jmp ba81 ;goto27 - return B952 F6 00 12 ... ldab 0012 B955 C4 20 . andb #20 ; test the door switch B957 26 03 &. bne 03 -B959 7E BA 81 ~.. jmp ba81 ;goto27 +B959 7E BA 81 ~.. jmp ba81 ;goto27 - return B95C F6 0E 04 ... ldab 0e04 B95F C1 05 .. cmpb #05 B961 26 79 &y bne 79 @@ -7463,22 +7519,26 @@ B9CE 7F 00 2C .., clr 002c B9D1 BD BE 01 ... jsr be01 ;jump70 - display B9D4 C6 1E .. ldab #1e B9D6 F7 00 2C .., stab 002c -B9D9 7E BA 81 ~.. jmp ba81 ;goto27 +B9D9 7E BA 81 ~.. jmp ba81 ;goto27 - return +; B9DC F6 0E 04 ... ldab 0e04 B9DF C1 01 .. cmpb #01 B9E1 27 0A '. beq 0a B9E3 F6 0E 04 ... ldab 0e04 B9E6 C1 02 .. cmpb #02 B9E8 27 03 '. beq 03 -B9EA 7E BA 81 ~.. jmp ba81 ;goto27 +B9EA 7E BA 81 ~.. jmp ba81 ;goto27 - return +; B9ED F6 0E 03 ... ldab 0e03 B9F0 C1 00 .. cmpb #00 B9F2 22 03 ". bhi 03 -B9F4 7E BA 81 ~.. jmp ba81 ;goto27 +B9F4 7E BA 81 ~.. jmp ba81 ;goto27 - return +; B9F7 F6 0E 03 ... ldab 0e03 B9FA C1 05 .. cmpb #05 B9FC 26 03 &. bne 03 -B9FE 7E BA 81 ~.. jmp ba81 ;goto27 +B9FE 7E BA 81 ~.. jmp ba81 ;goto27 - return +; BA01 F6 0E 03 ... ldab 0e03 BA04 C1 07 .. cmpb #07 BA06 24 79 $y bcc 79 @@ -7887,7 +7947,7 @@ BDB4 39 9 rts jump78: ; start/finish sending a byte to the display -; stack parameter - 0 to disable clock (finish), 1 to enable clock (start) +; stack parameter - 0 to disable display clock (for reading keypad), 1 to enable ; lower 8-bits of D - byte to write to display. ; bytes with bit 7 unset are characters (0-127) ; bytes with bit 7 set are control commands. @@ -7997,15 +8057,15 @@ BE68 39 9 rts displayreset: ; Reset the display -; Clear bit 7 of PortA - display reset +; Clear bit 7 of PortA - display reset (active low) BE69 CE 10 00 ... ldx #1000 BE6C 1D 00 80 .. bclr x,#80 BE6F BD E5 96 ... jsr e596 ;jump115 - 100ms delay -; Clear bit 7 of PortA - reset line back to high (not active) +; Clear bit 7 of PortA - reset line back to high BE72 CE 10 00 ... ldx #1000 BE75 1C 00 80 .. bset 00,x, #80 -; set clock polarity +; set SPI enable BE78 CE 10 28 ... ldx #1028 BE7B 1C 00 40 ... bset 00,x, #40 @@ -8025,7 +8085,7 @@ BE90 CC 00 E0 ... ldd #00e0 ;11100000 BE93 BD BD B5 ... jsr bdb5 ;jump78 BE96 38 8 pulx -; revert clock polarity +; revert SPI enable BE97 CE 10 28 ..( ldx #1028 BE9A 1D 00 40 ... bclr 00,x, #40 BE9D 39 9 rts @@ -8034,12 +8094,13 @@ BE9D 39 9 rts jump50: ; writes a slot and price to the screen? +; writes the slot number iff 0 pushed on to the stack BE9E 37 7 pshb BE9F 36 6 psha BEA0 8D A9 .. bsr a9 ; to be4b - displayblank BEA2 30 0 tsx BEA3 E6 05 .. ldab 05,x -BEA5 26 1B &. bne 1b +BEA5 26 1B &. bne 1b ; to bec2 BEA7 F6 00 06 ... ldab 0006 BEAA 4F O clra BEAB CE 00 0A ... ldx #000a @@ -8053,6 +8114,7 @@ BEB8 CE 00 0A ... ldx #000a BEBC 02 . idiv BEBD CB 30 .0 addb #30 BEBF F7 0B 98 ... stab 0b98 ; write slotnumber%10 +; BEC2 30 0 tsx BEC3 EC 00 .. ldd 00,x BEC5 C4 FF .. andb #ff @@ -8373,7 +8435,7 @@ C0D3 CE 00 09 ... ldx #0009 C0D6 3C < pshx C0D7 30 0 tsx C0D8 EC 02 .. ldd 02,x -C0DA BD C0 2E ... jsr c02e ;jump71 +C0DA BD C0 2E ... jsr c02e ;jump71 - display C0DD 38 8 pulx C0DE 38 8 pulx C0DF 39 9 rts @@ -8392,7 +8454,7 @@ C0F8 1D 00 20 .. bclr 00,x, #20 C0FB 5F . clrb C0FC 4F O clra C0FD 39 9 rts - +; C0FE CE 00 14 ... ldx #0014 C101 1C 00 01 ... bset 00,x, #01 C104 F6 00 14 ... ldab 0014 @@ -8401,7 +8463,7 @@ C10A F6 00 15 ... ldab 0015 C10D C4 1F .. andb #1f C10F 26 03 &. bne 03 C111 7E C3 1B ~.. jmp c31b ;goto34 -C114 C6 14 .. ldab #14 +C114 C6 14 .. ldab #14 ; 20 C116 F7 00 31 ..1 stab 0031 C119 F6 00 15 ... ldab 0015 C11C 2D 15 -. blt 15 @@ -8414,7 +8476,7 @@ C12B 1D 00 20 .. bclr 00,x, #20 C12D 5F _ clrb C12F 4F O clra C130 39 9 rts - +; C131 20 E6 . bra e6 C133 FC 00 3E ..> ldd 003e C136 F3 00 40 ..@ addd 0040 @@ -8513,7 +8575,7 @@ C1F6 A3 04 .. subd 04,x C1F8 38 8 pulx C1F9 38 8 pulx C1FA 24 11 $. bcc 11 -C1FC CE 00 C8 ... ldx #00c8 +C1FC CE 00 C8 ... ldx #00c8 ; 200 C1FF 3C < pshx C200 CC FF 38 ..8 ldd #ff38 ; -200 C203 37 7 pshb @@ -8591,7 +8653,7 @@ C28E 3C < pshx C28F FC 0C FF ... ldd 0cff C292 37 7 pshb C293 36 6 psha -C294 CE FC 18 ... ldx #fc18 +C294 CE FC 18 ... ldx #fc18 ; -1000 C297 3C < pshx C298 CC 03 E7 ... ldd #03e7 C29B 30 0 tsx @@ -8603,9 +8665,9 @@ C2A2 A3 04 .. subd 04,x C2A4 38 8 pulx C2A5 38 8 pulx C2A6 24 11 $. bcc 11 -C2A8 CE 03 E8 ... ldx #03e8 +C2A8 CE 03 E8 ... ldx #03e8 ; 1000 C2AB 3C < pshx -C2AC CC FC 18 ... ldd #fc18 +C2AC CC FC 18 ... ldd #fc18 ; -1000 C2AF 37 7 pshb C2B0 36 6 psha C2B1 CC 0C FF ... ldd #0cff @@ -8614,7 +8676,7 @@ C2B7 31 1 ins C2B8 31 1 ins C2B9 20 53 S bra 53 C2BB FC 0C E5 ... ldd 0ce5 -C2BE 83 C3 4F ..O subd #c34f +C2BE 83 C3 4F ..O subd #c34f ; 49999 C2C1 26 05 &. bne 05 C2C3 5F _ clrb C2C4 4F O clra @@ -8622,12 +8684,12 @@ C2C5 FD 0C E5 ... std 0ce5 C2C8 FE 0C E5 ... ldx 0ce5 C2CB 08 . inx C2CC FF 0C E5 ... stx 0ce5 -C2CF CE 07 D0 ... ldx #07d0 +C2CF CE 07 D0 ... ldx #07d0 ; 2000 C2D2 3C < pshx C2D3 CC 00 00 ... ldd #0000 C2D6 37 7 pshb C2D7 36 6 psha -C2D8 CC 0D 03 ... ldd #0d03 +C2D8 CC 0D 03 ... ldd #0d03 ; 3331 C2DB BD FB DF ... jsr fbdf ;jump46 C2DE 31 1 ins C2DF 31 1 ins @@ -8636,9 +8698,9 @@ C2E3 3C < pshx C2E4 FC 0D 03 ... ldd 0d03 C2E7 37 7 pshb C2E8 36 6 psha -C2E9 CE D9 30 ..0 ldx #d930 +C2E9 CE D9 30 ..0 ldx #d930 ; -9936 C2EC 3C < pshx -C2ED CC 05 F5 ... ldd #05f5 +C2ED CC 05 F5 ... ldd #05f5 ; 1525 C2F0 30 0 tsx C2F1 A3 02 .. subd 02,x C2F3 32 2 pula @@ -8648,12 +8710,12 @@ C2F7 A3 04 .. subd 04,x C2F9 38 8 pulx C2FA 38 8 pulx C2FB 24 11 $. bcc 11 -C2FD CE 26 D0 .&. ldx #26d0 +C2FD CE 26 D0 .&. ldx #26d0 ; 9936 C300 3C < pshx -C301 CC FA 0A ... ldd #fa0a +C301 CC FA 0A ... ldd #fa0a ; -1526 C304 37 7 pshb C305 36 6 psha -C306 CC 0D 03 ... ldd #0d03 +C306 CC 0D 03 ... ldd #0d03 ; 3331 C309 BD FB DF ... jsr fbdf ;jump46 C30C 31 1 ins C30D 31 1 ins @@ -8662,17 +8724,15 @@ C30E F6 00 15 ... ldab 0015 C311 2C 02 ,. bge 02 C313 20 F9 . bra f9 C315 CE 00 15 ... ldx #0015 -C318 1D 00 .. bclr add,x 00,x -C31A 1F CE 00 1D .... brclr ce,x 00 1d -;goto34 -; c31b??? -C31E 1D 00 .. bclr add,x 00,x -C320 20 CC . bra cc -C322 00 . test -C323 01 . nop +C318 1D 00 1F .. bclr 00,x, #1f +goto34: +C31B CE 00 1D ... ldx #001d +C31E 1D 00 20 .. bclr 00,x, #20 +C320 CC 00 01 . ldd #0001 C324 39 9 rts jump64: +; has a good long chat to the bill validator C325 F6 10 00 ... ldab 1000 C328 C4 01 .. andb #01 C32A 26 13 &. bne 13 @@ -8705,7 +8765,7 @@ C36F 7E C4 2F ~./ jmp c42f ;goto36 C372 CE 00 15 ... ldx #0015 C375 1C 00 80 .. bset 00,x, #80 C378 CE 0B C1 ... ldx #0bc1 -C37B 1D 00 08 .. bclr 00,x #08 +C37B 1D 00 08 .. bclr 00,x #08 ; clear bill error bit C37E F6 00 1D ... ldab 001d C381 C4 20 . andb #20 C383 27 03 '. beq 03 @@ -8795,14 +8855,15 @@ C452 F7 30 00 .0. stab 3000 ; changer outputs again C455 39 9 rts jump47: +; coin have something to do with coin counting? C456 FC 00 40 ..@ ldd 0040 C459 26 03 &. bne 03 -C45B 7E C5 C6 ~.. jmp c5c6 ;goto39 +C45B 7E C5 C6 ~.. jmp c5c6 ;goto39 - unset 0x30 in 0021 & return C45E CE 00 1A ... ldx #001a C461 1C 00 01 .. bset 00,x, #01 C464 F6 00 1A ... ldab 001a C467 F7 30 00 .0. stab 3000 ; changer accept off -C46A CC 03 E8 ... ldd #03e8 +C46A CC 03 E8 ... ldd #03e8 ; 1000 C46D BD E5 71 ..q jsr e571 ;msdelay goto42: C470 FC 00 40 ..@ ldd 0040 @@ -8912,7 +8973,7 @@ C577 5F _ clrb C578 4F O clra C579 FD 00 40 ..@ std 0040 goto41: -C57C CC 01 2C .., ldd #012c +C57C CC 01 2C .., ldd #012c ;300 ms C57F BD E5 71 ..q jsr e571 ;msdelay C582 F6 00 1B ... ldab 001b C585 C4 20 . andb #20 @@ -8921,7 +8982,7 @@ C589 CE 00 1A ... ldx #001a C58C 1D 00 01 .. bclr 00,x, #01 C58F F6 00 1A ... ldab 001a C592 F7 30 00 .0. stab 3000 ; changer accept' low -C595 CC 00 0C ... ldd #000c +C595 CC 00 0C ... ldd #000c ; 12 ms C598 BD E5 71 ..q jsr e571 ;msdelay C59B CE 00 1A ... ldx #001a C59E 1C 00 01 .. bset 00,x, #01 @@ -8929,7 +8990,7 @@ C5A1 F6 00 1A ... ldab 001a C5A4 F7 30 00 .0. stab 3000 ; changer accept' high C5A7 CC 00 23 ..# ldd #0023 C5AA BD E5 71 ..q jsr e571 ;msdelay -C5AD 7E C4 70 ~.p jmp c470 ;goto42 +C5AD 7E C4 70 ~.p jmp c470 ;goto42 - loop goto40: C5B0 F6 0B C0 ... ldab 0bc0 C5B3 C4 04 .. andb #04 @@ -8944,8 +9005,8 @@ goto39: C5C6 CE 00 21 ..! ldx #0021 C5C9 1D 00 10 ... bclr 00,x, #10 C5CC CE 00 1B ... ldx #001b -C5CF 1D 00 .. bclr add,x 00,x -C5D1 20 39 9 bra 39 +C5CF 1D 00 .. bclr 00,x, #20 +C5D2 39 . rts jump6: C5D3 F6 00 15 ... ldab 0015 @@ -9012,10 +9073,10 @@ C67C 39 9 rts jump124: ; chat to changer C67D F6 00 30 ..0 ldab 0030 -C680 26 55 &U bne 55 +C680 26 55 &U bne 55 ; to c6d7 C682 F6 0B C0 ... ldab 0bc0 -C685 C4 04 .. andb #04 -C687 26 4E &N bne 4e +C685 C4 04 .. andb #04 ; have a card reader +C687 26 4E &N bne 4e ; to c6d7 C689 C6 27 .' ldab #27 C68B F7 10 2D ..- stab 102d ; disable SCI transmission C68E C6 07 .. ldab #07 @@ -9027,15 +9088,15 @@ C69C F7 30 00 .0. stab 3000 ; keypad strobe C69F CC 00 14 ... ldd #0014 C6A2 BD E5 71 ..q jsr e571 ;msdelay C6A5 F6 0B C0 ... ldab 0bc0 -C6A8 C4 01 .. andb #01 +C6A8 C4 01 .. andb #01 ; have a dumb mech C6AA 27 06 '. beq 06 C6AC CE 0B C1 ... ldx #0bc1 -C6AF 1C 00 01 ... bset 00,x, #01 +C6AF 1C 00 01 ... bset 00,x, #01 ; set changer powerup error bit C6B2 F6 0B C0 ... ldab 0bc0 C6B5 C4 04 .. andb #04 C6B7 27 06 '. beq 06 C6B9 CE 0B C1 ... ldx #0bc1 -C6BC 1C 00 02 ... bset 00,x, #02 +C6BC 1C 00 02 ... bset 00,x, #02 ; set card powerup error bit C6BF CE 00 1A ... ldx #001a C6C2 1D 00 04 ... bclr 00,x, #04 ; keypad strobe finish C6C5 F6 00 1A ... ldab 001a @@ -9045,6 +9106,7 @@ C6CD F7 00 30 ..0 stab 0030 C6D0 C6 1E .. ldab #1e C6D2 F7 00 35 ..5 stab 0035 C6D5 20 5D ] bra 5d +; C6D7 F6 18 00 ... ldab 1800 C6DA 2D 2A -* blt 2a C6DC F6 00 07 ... ldab 0007 @@ -9160,7 +9222,7 @@ C7BE 31 1 ins 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? @@ -9187,7 +9249,7 @@ C7E6 39 9 rts jump37: C7E7 37 7 pshb C7E8 36 6 psha -C7E9 C6 32 .2 ldab #32 ; 50 +C7E9 C6 32 .2 ldab #32 ; 50 00110010 C7EB F7 00 31 ..1 stab 0031 C7EE 30 0 tsx C7EF E6 01 .. ldab 01,x @@ -9219,15 +9281,18 @@ C81B 39 9 rts sciinterrupt: C81C 34 4 des +; make sure this interrupt is valid C81D F6 0B C0 ... ldab 0bc0 -C820 C4 01 .. andb #01 -C822 26 0A &. bne 0e ; to c82e +C820 C4 01 .. andb #01 ; do we have a dumb mech? +C822 26 0A &. bne 0a ; if so, to c82e +; C824 F6 0B C0 ... ldab 0bc0 -C827 C4 04 .. andb #04 -C829 26 03 &. bne 03 ; to c82e -C82B 7E CB FF ~.. jmp cbff ;goto44 +C827 C4 04 .. andb #04 ; do we have a card reader? +C829 26 03 &. bne 03 ; if so, to c82e +C82B 7E CB FF ~.. jmp cbff ; else to goto44 +; C82E C6 96 .. ldab #96 ; 150 -C830 F7 00 30 ..0 stab 0030 +C830 F7 00 30 ..0 stab 0030 ; changer related still? C833 F6 10 2E ... ldab 102e ; SCI status C836 C4 02 .. andb #02 ; test for Framing Error C838 26 0B &. bne 0b ; if so, to c845 @@ -9272,7 +9337,8 @@ C889 1D 00 .. bclr 00,x, #20 C88C C6 04 . andb #04 C88E F7 0C DB ... stab 0cdb C891 CE 0B C1 ... ldx #0bc1 -C894 1C 00 40 ... bset 00,x, #40 ;endif +C894 1C 00 40 ... bset 00,x, #40 ; set tube error +; C897 F6 00 21 ..! ldab 0021 C89A F4 0B D8 ... andb 0bd8 C89D 27 08 '. beq 08 ; to c8a7 @@ -9288,7 +9354,7 @@ C8B1 1D 00 40 ... bclr 00,x, #40 C8B4 C6 04 .. ldab #04 C8B6 F7 0C DA ... stab 0cda C8B9 CE 0B C1 ... ldx #0bc1 -C8BC 1C 00 40 ... bset 00,x, #40 +C8BC 1C 00 40 ... bset 00,x, #40 ; set tube error ; if 0021 & 0bd9, then set bit 7 of 0017, else unset it. C8BF F6 00 21 ..! ldab 0021 C8C2 F4 0B D9 ... andb 0bd9 @@ -9306,7 +9372,7 @@ C8D9 C6 04 .. ldab #04 C8DC F7 0C D9 ... stab 0cd9 ; set tube error bit C8DF CE 0B C1 ... ldx #0bc1 -C8E2 1C 00 40 ... bset 00,x, #40 +C8E2 1C 00 40 ... bset 00,x, #40 ; set tube error bit C8E5 20 31 1 bra 31 ; to c918 ; goto46: ; pulse the send' line of the changer @@ -9350,7 +9416,7 @@ C943 25 12 %. bcs 12 ; to c957 C945 CE 00 17 ... ldx #0017 C948 1D 00 04 ... bclr 00,x, #04 C94B 7F 00 08 ... clr 0008 -C94E BD CE 48 ..H jsr ce48 ;jump48 +C94E BD CE 48 ..H jsr ce48 ;jump48 - update values? C951 7F 00 2C .., clr 002c C954 7E CA 5C ~.\ jmp ca5c ;goto50 - clean exit ; @@ -9425,9 +9491,9 @@ C9DD 20 7A z bra 7a ;goto51 - inc 0008 & clean exit C9DF F6 10 2F ../ ldab 102f ; read SCI data C9E2 F7 0B C4 ... stab 0bc4 C9E5 F6 0B C4 ... ldab 0bc4 -C9E8 C1 80 .. cmpb #80 +C9E8 C1 80 .. cmpb #80 ; if == 128 C9EA 26 05 &. bne 05 -C9EC C6 0F .. ldab #0f +C9EC C6 0F .. ldab #0f ; put 15 => 0bc4 C9EE F7 0B C4 ... stab 0bc4 C9F1 20 66 f bra 66 ;goto51 - inc 0008 & clean exit ; @@ -9497,7 +9563,7 @@ CA71 1C 00 04 ... bset 00,x, #04 CA74 C6 01 .. ldab #01 CA76 F7 00 08 ... stab 0008 CA79 CE 0B C1 ... ldx #0bc1 -CA7C 1D 00 01 ... bclr 00,x, #01 +CA7C 1D 00 01 ... bclr 00,x, #01 ; clear card powerup error bit CA7F 7E CB DA ~.. jmp cbda ;goto48 (clean exit) ; CA82 F6 10 2F ../ ldab 102f ; read SCI data @@ -9531,7 +9597,7 @@ CABA 1C 00 .. bset 00,x, #20 CABD CE 00 1B ... ldx #001b CAC0 1D 00 40 ... bclr 00,x, #40 CAC3 7F 00 25 ..% clr 0025 -CAC6 7E CB 64 ~.d jmp cb64 ;goto53 +CAC6 7E CB 64 ~.d jmp cb64 ;goto53 - cleanup & exit ; CAC9 F6 00 17 ... ldab 0017 CACC C4 08 .. andb #08 @@ -9624,38 +9690,40 @@ CB78 C4 08 .. andb #08 CB7A 27 08 '. beq 08 CB7C CE 00 21 ..! ldx #0021 CB7F 1C 00 10 ... bset 00,x, #10 -CB82 20 56 V bra 56 ; to cbda - cleanup and exit +CB82 20 56 V bra 56 ;goto48 - cleanup and exit ; CB84 F6 10 2F ../ ldab 102f ; read SCI data CB87 C4 EF .. andb #ef ; 11101111 CB89 C1 E3 .. cmpb #e3 ; 11100111 CB8B 26 08 &. bne 08 ; to cb95 CB8D CE 0B C1 ... ldx #0bc1 -CB90 1D 00 02 ... bclr 00,x, #02 -CB93 20 45 E bra 45 +CB90 1D 00 02 ... bclr 00,x, #02 ; clear card powerup error bit +CB93 20 45 E bra 45 ;goto48 - cleanup and exit ; +; this could be the coin mech powerup message? CB95 F6 10 2F ../ ldab 102f ; read SCI data CB98 C4 EF .. andb #ef ; 11101111 CB9A C1 63 .c cmpb #63 ; 01101110 CB9C 26 1C &. bne 1c ; to cbba -CB9E CE 0B C1 ... ldx #0bc1 +CB9E CE 0B C1 ... ldx #0bc1 ; clear changer powerup error bit CBA1 1D 00 01 ... bclr 00,x, #01 CBA4 F6 0B C0 ... ldab 0bc0 -CBA7 C4 01 .. andb #01 -CBA9 27 0D '. beq 0d ; to cbb8 +CBA7 C4 01 .. andb #01 ; do we have a changer? +CBA9 27 0D '. beq 0d ; to cbb8 - cleanup & exit CBAB F6 0B C0 ... ldab 0bc0 -CBAE C4 04 .. andb #04 +CBAE C4 04 .. andb #04 ; if we don't have a card reader, we don't have an error reading from it. duh. CBB0 27 06 '. beq 06 ; to cbb8 CBB2 CE 0B C1 ... ldx #0bc1 -CBB5 1D 00 02 ... bclr 00,x, #02 +CBB5 1D 00 02 ... bclr 00,x, #02 ; clear card powerup error bit CBB8 20 20 bra 20 ;goto48 - cleanup & exit ; +; the coin mech is telling us it has a bad sensor CBBA F6 10 2F ../ ldab 102f ; read SCI data CBBD C4 EF .. andb #ef ; 11101111 CBBF C1 67 .g cmpb #67 ; 01100111 CBC1 26 08 &. bne 08 ; to cbcb CBC3 CE 0B C1 ... ldx #0bc1 -CBC6 1C 00 .. bset 00,x, #20 +CBC6 1C 00 .. bset 00,x, #20 ; set bad sensor error bit CBC9 20 0F bra 0f ;goto48 - cleanup & exit ; CBCB F6 10 2F ../ ldab 102f ; read SCI data @@ -9663,7 +9731,7 @@ CBCE C4 EF .. andb #ef ; 11101111 CBD0 C1 27 .' cmpb #27 ; 00100111 CBD2 26 06 &. bne 06 ;goto48 - cleanup & exit ; -CBD4 CE 0B C1 ... ldx #0bc1 +CBD4 CE 0B C1 ... ldx #0bc1 ; set coin jam error bit CBD7 1C 00 10 ... bset 00,x, #10 goto48: ; cleanup and exit CBDA CE 00 1A ... ldx #001a @@ -9681,26 +9749,32 @@ CBF6 F7 00 26 ..& stab 0026 CBF9 7F 00 3D ..= clr 003d CBFC 7E CE 46 ~.F jmp ce46 ;goto47 (exit) ; +; +; +; +; goto44: -CBFF F6 0B C0 ... ldab 0bc0 +CBFF F6 0B C0 ... ldab 0bc0 ; do we have our changer (link master)? CC02 C4 02 .. andb #02 -CC04 26 03 &. bne 03 -CC06 7E CE 3B ~.; jmp ce3b ;goto54 - swallow 2 bytes & 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 -CC0C C4 E0 .. andb #e0 -CC0E C1 20 . cmpb #20 +CC0C C4 E0 .. andb #e0 ; 11100000 +CC0E C1 20 . cmpb #20 ; 00100000 CC10 27 03 '. beq 03 -CC12 7E CE 3B ~.; jmp ce3b ;goto54 - swallow 2 bytes & exit -CC15 C6 32 .2 ldab #32 ; 50 +CC12 7E CE 3B ~.; jmp ce3b ;goto54 - swallow a byte & exit +; +CC15 C6 32 .2 ldab #32 ; 50 00110010 CC17 F7 00 2F ../ stab 002f -CC1A CE 00 1B ... ldx #001b +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 @@ -9716,16 +9790,17 @@ CC48 4F O clra CC49 BD C7 E7 ... jsr c7e7 ;jump37 - send 0043 to coin mech - retry? CC4C 7E CE 39 ~.9 jmp ce39 ;goto55 - exit ; -CC4F F6 00 08 ... ldab 0008 +CC4F F6 00 08 ... ldab 0008 ; already in a packet? CC52 26 03 &. bne 03 CC54 7E CD 94 ~.. jmp cd94 ;goto56 +; CC57 F6 10 2F ../ ldab 102f ; read SCI data -CC5A C4 F0 .. andb #f0 -CC5C C1 20 . cmpb #20 +CC5A C4 F0 .. andb #f0 ; 11110000 +CC5C C1 20 . cmpb #20 ; 00100000 ; 4th bit clear CC5E 27 03 '. beq 03 CC60 7E CD 94 ~.. jmp cd94 ;goto56 CC63 F6 10 2F ../ ldab 102f ; read SCI data -CC66 C4 0F .. andb #0f +CC66 C4 0F .. andb #0f ; place lower nibble (data) onto stack var CC68 30 0 tsx CC69 E7 00 .. stab 00,x CC6B F6 00 08 ... ldab 0008 @@ -9739,8 +9814,8 @@ CC7C CC CA .. ; if 0017 0076+=sp<<8, else 0040+=sp<<8, then same 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 -CC85 CD 38 0 ; read byte & #01, +CC83 CD 30 !. ; 0013 = sp, then same as above - location of dec point? +CC85 CD 38 0 ; read byte & #01, - have change ; CC88 F6 00 17 ... ldab 0017 CC8B C4 01 .. andb #01 @@ -9848,6 +9923,8 @@ CD31 E6 00 .. ldab 00,x CD33 F7 00 13 ... stab 0013 CD36 20 42 B bra 42 ; to cd7a - goto57 ; +; +; coin mech has no change if bit is set (displays EXACT COINS ONLY) CD38 F6 10 2F ../ ldab 102f ; read SCI data CD3B C4 01 .. andb #01 CD3D 27 08 '. beq 08 ; to cd47 @@ -9893,17 +9970,19 @@ goto56: 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 +; +; got 00110001 - "1" 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 - exit CDBE 5F _ clrb CDBF 4F O clra CDC0 BD C7 E7 ... jsr c7e7 ;jump37 - send byte to coin mech @@ -9911,12 +9990,14 @@ CDC3 F6 00 1F ... ldab 001f CDC6 C4 08 .. andb #08 CDC8 27 0C '. beq 0c CDCA F6 0B C0 ... ldab 0bc0 -CDCD C4 10 .. andb #10 +CDCD C4 10 .. andb #10 ; have link master price holding CDCF 27 05 '. beq 05 CDD1 7C 00 75 |.u inc 0075 CDD4 20 03 . bra 03 CDD6 7F 00 75 ..u clr 0075 -CDD9 20 5E ^ bra 5e +CDD9 20 5E ^ bra 5e ; to ce39 - exit +; +; got 00110001 - "2" CDDB F6 00 1D ... ldab 001d CDDE C4 02 .. andb #02 CDE0 27 07 '. beq 07 @@ -9927,12 +10008,13 @@ CDE9 CC 00 FE ... ldd #00fe CDEC BD C7 E7 ... jsr c7e7 ;jump37 - send #fe to coin mech CDEF F6 00 1F ... ldab 001f CDF2 C4 08 .. andb #08 -CDF4 27 0A '. beq 0a +CDF4 27 0A '. beq 0a ; to ce00, to exit CDF6 F6 0B C0 ... ldab 0bc0 -CDF9 C4 10 .. andb #10 +CDF9 C4 10 .. andb #10 ; have link master price holding CDFB 27 03 '. beq 03 CDFD 7C 00 75 |.u inc 0075 -CE00 20 1C . bra 1c +CE00 20 1C . bra 1c ; to ce1e, to ce39, exit +; CE02 FC 00 44 ..D ldd 0044 CE05 37 7 pshb CE06 36 6 psha @@ -9947,25 +10029,30 @@ CE12 CE 00 19 ... ldx #0019 CE15 1D 00 08 ... bclr 00,x, #08 CE18 CE 00 1F ... ldx #001f CE1B 1C 00 08 ... bset 00,x, #08 -CE1E 20 19 . bra 19 +CE1E 20 19 . bra 19 ; to ce39, exit +; +; got 00110001 - "3" CE20 CE 00 1D ... ldx #001d CE23 1D 00 02 ... bclr 00,x, #02 CE26 20 11 . bra 11 +; +; got 00110001 - "8" CE28 C6 01 .. ldab #01 CE2A F7 00 08 ... stab 0008 CE2D 5F _ clrb CE2E 4F O clra CE2F BD C7 E7 ... jsr c7e7 ;jump37 - send byte to coin mech CE32 20 05 . bra 05 +; CE34 5F _ clrb CE35 4F O clra CE36 BD C7 E7 ... jsr c7e7 ;jump37 - send byte to coin mech goto55: CE39 20 0B . bra 0b ; to ce46 (exit) -goto54: ; just swallow two bytes? +goto54: ; just swallow a byte? CE3B F6 10 2E ... ldab 102e ; SCI Status CE3E 30 0 tsx -CE3F E7 00 .. stab 00,x +CE3F E7 00 .. stab 00,x ; store into stack variable CE41 F6 10 2F ../ ldab 102f ; read SCI data CE44 E7 00 .. stab 00,x goto47: @@ -10455,80 +10542,83 @@ D210 ED 00 .. std 00,x D212 39 9 rts jump45: +; dispense an item from slot 0006 D213 F6 00 1F ... ldab 001f D216 C4 04 .. andb #04 -D218 26 12 &. bne 12 +D218 26 12 &. bne 12 ; to d22c D21A F6 0B C0 ... ldab 0bc0 -D21D C4 10 .. andb #10 -D21F 26 0B &. bne 0b +D21D C4 10 .. andb #10 ; have link master price holding +D21F 26 0B &. bne 0b ; to d22c D221 CE 00 00 ... ldx #0000 D224 3C < pshx D225 FC 00 44 ..D ldd 0044 -D228 BD BE 9E ... jsr be9e ;jump50 +D228 BD BE 9E ... jsr be9e ;jump50 - write slot & price to screen? D22B 38 8 pulx +; D22C BD D3 11 ... jsr d311 ;jump30 - test position exists D22F 83 00 00 ... subd #0000 -D232 27 13 '. beq 13 +D232 27 13 '. beq 13 ; to d247 D234 F6 00 06 ... ldab 0006 -D237 BD D4 68 ..h jsr d468 ;jump51 +D237 BD D4 68 ..h jsr d468 ;jump51 - lookup in 0800 table & and with 8000 D23A 83 00 00 ... subd #0000 D23D 27 05 '. beq 05 -D23F 8D BC .. bsr bc ;jump90 -D241 BD D6 3C ..< jsr d63c ;jump33 +D23F 8D BC .. bsr bc ;jump90 - or entry in 0800 table of slot with #4000 +D241 BD D6 3C ..< jsr d63c ;jump33 - as above, but with #0400 D244 5F _ clrb D245 4F O clra D246 39 9 rts - +; D247 BD D1 3D ..= jsr d13d ;jump34 - motor on -D24A C6 3C .< ldab #3c +D24A C6 3C .< ldab #3c ; 60 D24C F7 00 2E ... stab 002e -D24F C6 41 .A ldab #41 +D24F C6 41 .A ldab #41 ; 65 D251 F7 00 31 ..1 stab 0031 D254 CE 00 1B ... ldx #001b D257 1D 00 08 ... bclr 00,x #08 goto59: D25A F6 00 1B ... ldab 001b D25D C4 08 .. andb #08 -D25F 26 22 &" bne 22 +D25F 26 22 &" bne 22 ; to d283 D261 F6 00 2E ... ldab 002e -D264 C1 35 .5 cmpb #35 +D264 C1 35 .5 cmpb #35 ; 53 D266 23 10 #. bls 10 -D268 BD D5 70 ..p jsr d570 ;jump35 +D268 BD D5 70 ..p jsr d570 ;jump35 - check home sensor departed D26B 83 00 00 ... subd #0000 -D26E 27 06 '. beq 06 +D26E 27 06 '. beq 06 ; to d276 D270 CE 00 1B ... ldx #001b D273 1C 00 08 ... bset 00,x, #08 -D276 20 0B . bra 0b +D276 20 0B . bra 0b ; to d283 +; something went afoul. mark the motor as bad? D278 BD D1 05 ... jsr d105 ;motors_off -D27B 8D 80 .. bsr 80 ;jump90 -D27D BD D6 3C ..< jsr d63c ;jump33 +D27B 8D 80 .. bsr 80 ;jump90 - mark motor as faulty? +D27D BD D6 3C ..< jsr d63c ;jump33 - mark motor as faulty? D280 5F _ clrb D281 4F O clra D282 39 9 rts - +; D283 F6 00 2E ... ldab 002e -D286 C1 36 .6 cmpb #36 +D286 C1 36 .6 cmpb #36 ; 54 D288 24 56 $V bcc 56 ; to d2e0 -D28A BD D5 F7 ... jsr d5f7 ;jump108 +D28A BD D5 F7 ... jsr d5f7 ;jump108 - check motor overcurrent D28D 83 00 00 ... subd #0000 D290 27 4E 'N beq 4e ; to d2e0 -D292 BD D5 B0 ... jsr d5b0 ;jump31 +D292 BD D5 B0 ... jsr d5b0 ;jump31 - check home sensor returned D295 83 00 00 ... subd #0000 D298 27 46 'F beq 46 ; to d2e0 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 +D2A2 22 07 ". bhi 07 ; to d2ab +D2A4 8D 6B .k bsr 6b ;jump30 - test motor overvoltage? D2A6 83 00 00 ... subd #0000 -D2A9 27 0C '. beq 0c +D2A9 27 0C '. beq 0c ; to d2b7 D2AB BD D1 05 ... jsr d105 ;motors_off -D2AE BD D1 FD ... jsr d1fd ;jump90 -D2B1 BD D6 3C ..< jsr d63c ;jump33 +D2AE BD D1 FD ... jsr d1fd ;jump90 - mark motor as faulty? +D2B1 BD D6 3C ..< jsr d63c ;jump33 - mark motor as faulty? D2B4 5F _ clrb D2B5 4F O clra D2B6 39 9 rts - +; D2B7 F6 00 06 ... ldab 0006 D2BA 4F O clra D2BB C3 0E 06 ... addd #0e06 @@ -10551,10 +10641,10 @@ D2D9 33 3 pulb D2DA E7 00 .. stab 00,x D2DC CC 00 01 ... ldd #0001 D2DF 39 9 rts - +; D2E0 F6 00 2E ... ldab 002e D2E3 26 14 &. bne 14 -D2E5 BD D5 F7 ... jsr d5f7 ;jump108 +D2E5 BD D5 F7 ... jsr d5f7 ;jump108 - check motor overcurrent status D2E8 83 00 00 ... subd #0000 D2EB 26 0C &. bne 0c D2ED BD D1 05 ... jsr d105 ;motors_off @@ -10563,7 +10653,7 @@ D2F3 BD D6 26 ..& jsr d626 ;jump91 D2F6 5F _ clrb D2F7 4F O clra D2F8 39 9 rts - +; D2F9 F6 00 2E ... ldab 002e D2FC 26 0C &. bne 0c D2FE BD D1 05 ... jsr d105 ;motors_off @@ -10572,8 +10662,8 @@ D304 BD D6 3C ..< jsr d63c ;jump33 D307 5F _ clrb D308 4F O clra D309 39 9 rts - -D30A 7E D2 5A ~.Z jmp d25a ;goto59 +; +D30A 7E D2 5A ~.Z jmp d25a ;goto59 - try again? D30D BD E6 1B ... jsr e61b ;jump4 D310 39 9 rts @@ -10981,15 +11071,16 @@ D5F5 4F O clra D5F6 39 9 rts jump108: +; check motor overcurrent status D5F7 C6 07 .. ldab #07 D5F9 F7 00 1C ... stab 001c D5FC 7F 00 18 ... clr 0018 ; D5FF F6 00 1C ... ldab 001c -D602 27 1E '. beq 1e ; to d620 +D602 27 1E '. beq 1e ; to d622 D604 7A 00 1C z.. dec 001c D607 F6 10 0A ... ldab 100a -D60A C4 01 .. andb #01 +D60A C4 01 .. andb #01 ; motor overcurrent sense! D60C 26 12 &. bne 12 ; to d620 D60E C6 07 .. ldab #07 D610 F7 00 1C ... stab 001c @@ -11051,13 +11142,13 @@ D66A 39 9 rts jump107: D66B F6 0B C0 ... ldab 0bc0 -D66E C4 08 .. andb #08 -D670 27 07 '. beq 07 +D66E C4 08 .. andb #08 ; we have a bill validator? +D670 27 07 '. beq 07 ; if not, to d679 D672 F6 00 7D ..} ldab 007d D675 27 02 '. beq 02 -D677 20 F9 . bra f9 +D677 20 F9 . bra f9 ; to d672 - wait for a bill? D679 F6 00 15 ... ldab 0015 -D67C 2D 77 -w blt 77 +D67C 2D 77 -w blt 77 ; return D67E FC 00 40 ..@ ldd 0040 D681 F3 00 3E ..> addd 003e D684 B3 00 0F ... subd 000f @@ -11108,6 +11199,7 @@ D6F5 39 9 rts jump106: ; puts (0cdb+0bdd)+(0cda*0bdf)+(0cd9*0be1) => 0bef +; calculates how much money we have in some coin mech. D6F6 F6 0C DB ... ldab 0cdb D6F9 4F O clra D6FA 37 7 pshb @@ -11311,7 +11403,7 @@ D85C 3C < pshx D85D FC 0D EB ... ldd 0deb D860 37 7 pshb D861 36 6 psha -D862 CE E1 00 ... ldx #e100 +D862 CE E1 00 ... ldx #e100 ; 100000000 D865 3C < pshx D866 CC 05 F5 ... ldd #05f5 D869 37 7 pshb @@ -11352,7 +11444,7 @@ D8A1 3C < pshx D8A2 FC 0D E7 ... ldd 0de7 D8A5 37 7 pshb D8A6 36 6 psha -D8A7 CE E1 00 ... ldx #e100 ; 57600 +D8A7 CE E1 00 ... ldx #e100 ; 100000000 D8AA 3C < pshx D8AB CC 05 F5 ... ldd #05f5 D8AE 37 7 pshb @@ -11370,7 +11462,7 @@ D8BE 38 8 pulx D8BF 25 11 %. bcs 11 D8C1 CE 1F 00 ... ldx #1f00 D8C4 3C < pshx -D8C5 CC FA 0A ... ldd #fa0a +D8C5 CC FA 0A ... ldd #fa0a ; -100000000 D8C8 37 7 pshb D8C9 36 6 psha D8CA CC 0D E7 ... ldd #0de7 @@ -11492,7 +11584,7 @@ D9D3 5F _ clrb D9D4 4F O clra D9D5 FD 00 4D ..M std 004d D9D8 7E DA 63 ~.c jmp da63 ;goto67 -D9DB BD D2 13 ... jsr d213 ;jump45 +D9DB BD D2 13 ... jsr d213 ;jump45 - vend it! D9DE 83 00 00 ... subd #0000 D9E1 26 0A &. bne 0a D9E3 7F 00 06 ... clr 0006 @@ -11689,7 +11781,7 @@ jump104: 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 @@ -11699,11 +11791,12 @@ DB5A BD C0 BA ... jsr c0ba ;display: 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 @@ -11871,7 +11964,7 @@ DCC8 37 7 pshb DCC9 36 6 psha DCCA CE E1 00 ... ldx #e100 DCCD 3C < pshx -DCCE CC 05 F5 ... ldd #05f5 +DCCE CC 05 F5 ... ldd #05f5 ; 100000000 DCD1 37 7 pshb DCD2 36 6 psha DCD3 30 0 tsx @@ -12023,11 +12116,11 @@ DE0F C6 14 .. ldab #14 DE11 F7 00 2C .., stab 002c DE14 39 9 rts -dump118: +jump118: DE15 F6 00 1B ... ldab 001b DE18 C4 01 .. andb #01 DE1A 26 03 &. bne 03 -DE1C 7E DE A4 ~.. jmp dea4 ;goto70 +DE1C 7E DE A4 ~.. jmp dea4 ;goto70 - return DE1F F6 00 06 ... ldab 0006 DE22 4F O clra DE23 05 . asld @@ -12038,29 +12131,31 @@ DE2A 84 08 .. anda #08 DE2C 27 76 'v beq 76 DE2E F6 00 11 ... ldab 0011 DE31 C4 08 .. andb #08 -DE33 26 33 &3 bne 33 +DE33 26 33 &3 bne 33 ; to de68 DE35 F6 00 06 ... ldab 0006 DE38 F1 0B AF ... cmpb 0baf -DE3B 27 20 ' beq 20 +DE3B 27 20 ' beq 20 ; to de5d DE3D F6 00 06 ... ldab 0006 DE40 F1 0B AE ... cmpb 0bae -DE43 27 18 '. beq 18 +DE43 27 18 '. beq 18 ; to de5d DE45 F6 00 06 ... ldab 0006 DE48 F1 0B AD ... cmpb 0bad -DE4B 27 10 '. beq 10 +DE4B 27 10 '. beq 10 ; to de5d DE4D F6 00 06 ... ldab 0006 DE50 F1 0B AC ... cmpb 0bac -DE53 27 08 '. beq 08 +DE53 27 08 '. beq 08 ; to de5d DE55 F6 00 06 ... ldab 0006 DE58 F1 0B AB ... cmpb 0bab -DE5B 26 0B &. bne 0b +DE5B 26 0B &. bne 0b ; to de68 +; DE5D CE 00 1B ... ldx #001b DE60 1D 00 01 ... bclr 00,x, #01 DE63 7F 00 4F ..O clr 004f -DE66 20 3C < bra 3c +DE66 20 3C < bra 3c ; return +; DE68 FC 00 44 ..D ldd 0044 DE6B B3 0B B7 ... subd 0bb7 -DE6E 23 2B #+ bls 2b +DE6E 23 2B #+ bls 2b ; to de99 - return DE70 FC 00 40 ..@ ldd 0040 DE73 F3 00 3E ..> addd 003e DE76 37 7 pshb @@ -12072,14 +12167,15 @@ DE81 30 0 tsx DE82 A3 00 .. subd 00,x DE84 31 1 ins DE85 31 1 ins -DE86 22 13 ". bhi 13 +DE86 22 13 ". bhi 13 ; to de9b DE88 FC 0B B7 ... ldd 0bb7 -DE8B 27 0E '. beq 0e +DE8B 27 0E '. beq 0e ; to de9b DE8D FC 00 44 ..D ldd 0044 DE90 B3 0B B7 ... subd 0bb7 DE93 F3 00 44 ..D addd 0044 DE96 FD 00 44 ..D std 0044 -DE99 20 09 . bra 09 +DE99 20 09 . bra 09 ; return +; DE9B CE 00 1B ... ldx #001b DE9E 1D 00 01 ... bclr 00,x, #01 DEA1 7F 00 4F ..O clr 004f @@ -12094,7 +12190,7 @@ DEAA 26 0D &. bne 0d DEAC CE 00 12 ... ldx #0012 DEAF 3C < pshx DEB0 CC AE 7E ..~ ldd #ae7e -DEB3 BD C0 2E ... jsr c02e ;jump71 +DEB3 BD C0 2E ... jsr c02e ;jump71 - display DEB6 38 8 pulx DEB7 20 2D - bra 2d DEB9 C1 01 .. cmpb #01 @@ -12102,7 +12198,7 @@ DEBB 26 0D &. bne 0d DEBD CE 00 0F ... ldx #000f DEC0 3C < pshx DEC1 CC AE 6D ..m ldd #ae6d ; something german -DEC4 BD C0 2E ... jsr c02e ;jump71 +DEC4 BD C0 2E ... jsr c02e ;jump71 - display DEC7 38 8 pulx DEC8 20 1C . bra 1c DECA C1 02 .. cmpb #02 @@ -12110,46 +12206,49 @@ DECC 26 0D &. bne 0d DECE CE 00 10 ... ldx #0010 DED1 3C < pshx DED2 CC AE 5B ..[ ldd #ae5b ; more german -DED5 BD C0 2E ... jsr c02e ;jump71 +DED5 BD C0 2E ... jsr c02e ;jump71 - display DED8 38 8 pulx DED9 20 0B . bra 0b DEDB CE 00 15 ... ldx #0015 DEDE 3C < pshx DEDF CC AE 44 ..D ldd #ae44 ; "MACHINE OUT OF ORDER" -DEE2 BD C0 2E ... jsr c02e ;jump71 +DEE2 BD C0 2E ... jsr c02e ;jump71 - display DEE5 38 8 pulx DEE6 39 9 rts jump116: ; revolves around coinage DEE7 F6 0B C0 ... ldab 0bc0 -DEEA C4 01 .. andb #01 -DEEC 26 07 &. bne 07 +DEEA C4 01 .. andb #01 ; have a dumb mech +DEEC 26 07 &. bne 07 ; to def5 DEEE F6 0B C0 ... ldab 0bc0 -DEF1 C4 04 .. andb #04 -DEF3 27 15 '. beq 15 +DEF1 C4 04 .. andb #04 ; have a card reader +DEF3 27 15 '. beq 15 ; if not to df0a +; have dumb mech: DEF5 C6 FF .. ldab #ff DEF7 F7 0B BC ... stab 0bbc DEFA F6 00 15 ... ldab 0015 -DEFD 2D 03 -. blt 03 +DEFD 2D 03 -. blt 03 ; to df02 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 +DF08 20 25 % bra 25 ; to df2f +; test the link master? DF0A F6 0B C0 ... ldab 0bc0 -DF0D C4 02 .. andb #02 -DF0F 27 1E '. beq 1e +DF0D C4 02 .. andb #02 ;have link master +DF0F 27 1E '. beq 1e ; to df2f DF11 F6 00 2F ../ ldab 002f -DF14 26 19 &. bne 19 +DF14 26 19 &. bne 19 ; to df2f DF16 F6 00 1B ... ldab 001b DF19 C4 02 .. andb #02 -DF1B 26 12 &. bne 12 +DF1B 26 12 &. bne 12 ; to df2f DF1D CC 00 FF ... ldd #00ff DF20 BD C7 E7 ... jsr c7e7 ;jump37 - send to serial port DF23 CE 00 1B ... ldx #001b DF26 1C 00 02 .. bset 00,x, #02 DF29 CE 0B C1 ... ldx #0bc1 -DF2C 1C 00 04 .. bset 00,x, #04 +DF2C 1C 00 04 .. bset 00,x, #04 ; set link powerup error bit +; DF2F F6 00 21 ..! ldab 0021 DF32 C4 20 . andb #20 DF34 27 07 '. beq 07 @@ -12163,28 +12262,30 @@ DF40 26 06 &. bne 06 DF42 CE 00 1B ... ldx #001b DF45 1D 00 01 ... bclr 00,x, #01 DF48 F6 00 25 ..% ldab 0025 -DF4B 26 20 & bne 20 +DF4B 26 20 & bne 20 ; to df6d DF4D F6 00 1B ... ldab 001b DF50 C4 40 .@ andb #40 DF52 27 19 '. beq 19 -DF54 BD D6 52 ..R jsr d652 ;jump5 +DF54 BD D6 52 ..R jsr d652 ;jump5 - pulse bill acceptor DF57 FC 00 40 ..@ ldd 0040 DF5A 26 05 &. bne 05 DF5C FC 00 3E ..> ldd 003e DF5F 27 03 '. beq 03 -DF61 BD DB 44 ..D jsr db44 ;jump104 -DF64 BD D6 6B ..k jsr d66b ;jump107 +DF61 BD DB 44 ..D jsr db44 ;jump104 - say thanks +DF64 BD D6 6B ..k jsr d66b ;jump107 - chat to bill validator DF67 CE 00 1B ... ldx #001b 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 DF75 F6 00 34 ..4 ldab 0034 -DF78 26 0B &. bne 0b +DF78 26 0B &. bne 0b ; to df85 DF7A BD BE 69 ..i jsr be69 ;displayreset -DF7D C6 32 .2 ldab #32 +DF7D C6 32 .2 ldab #32 ; 50 DF7F F7 00 34 ..4 stab 0034 -DF82 7E E0 63 ~.c jmp e063 ;goto72 +DF82 7E E0 63 ~.c jmp e063 ;goto72 - bail +; DF85 FC 00 40 ..@ ldd 0040 DF88 26 05 &. bne 05 DF8A FC 00 3E ..> ldd 003e @@ -12193,27 +12294,29 @@ DF8F CE 00 01 ... ldx #0001 DF92 3C < pshx DF93 FC 00 40 ..@ ldd 0040 DF96 F3 00 3E ..> addd 003e -DF99 BD BE 9E ... jsr be9e ;jump50 +DF99 BD BE 9E ... jsr be9e ;jump50 - write slot & price to screen? DF9C 38 8 pulx DF9D C6 05 .. ldab #05 DF9F F7 00 2C .., stab 002c DFA2 7E E0 63 ~.c jmp e063 ;goto72 +; DFA5 F6 0C D9 ... ldab 0cd9 DFA8 C1 04 .. cmpb #04 -DFAA 24 07 $. bcc 07 +DFAA 24 07 $. bcc 07 ; to dfb3 DFAC F6 0B C0 ... ldab 0bc0 -DFAF C4 01 .. andb #01 -DFB1 26 07 &. bne 07 +DFAF C4 01 .. andb #01 ; have a dumb mech +DFB1 26 07 &. bne 07 ; to dfba DFB3 F6 00 21 ..! ldab 0021 DFB6 C4 40 .@ andb #40 -DFB8 27 43 'C beq 43 +DFB8 27 43 'C beq 43 ; to dffd +; DFBA F6 00 2B ..+ ldab 002b DFBD C1 00 .. cmpb #00 DFBF 26 0D &. bne 0d DFC1 CE 00 19 ... ldx #0019 DFC4 3C < pshx DFC5 CC AD E7 ... ldd #ade7 ; "INTRODUZCA" -DFC8 BD C0 2E ... jsr c02e ;jump71 +DFC8 BD C0 2E ... jsr c02e ;jump71 - display DFCB 38 8 pulx DFCC 20 2D - bra 2d DFCE C1 01 .. cmpb #01 @@ -12221,7 +12324,7 @@ DFD0 26 0D &. bne 0d DFD2 CE 00 12 ... ldx #0012 DFD5 3C < pshx DFD6 CC AD D3 ... ldd #add3 ; "NICT UEBERZAHLEN" -DFD9 BD C0 2E ... jsr c02e ;jump71 +DFD9 BD C0 2E ... jsr c02e ;jump71 - display DFDC 38 8 pulx DFDD 20 1C . bra 1c DFDF C1 02 .. cmpb #02 @@ -12229,7 +12332,7 @@ DFE1 26 0D &. bne 0d DFE3 CE 00 19 ... ldx #0019 DFE6 3C < pshx DFE7 CC AD B8 ... ldd #adb8 ; "MONNAIE EXACT" -DFEA BD C0 2E ... jsr c02e ;jump71 +DFEA BD C0 2E ... jsr c02e ;jump71 - display DFED 38 8 pulx DFEE 20 0B . bra 0b DFF0 CE 00 11 ... ldx #0011 ; length of @@ -12237,12 +12340,13 @@ DFF3 3C < pshx DFF4 CC AD A5 ... ldd #ada5 ; " EXACT COINS ONLY " DFF7 BD C0 2E ... jsr c02e ;jump71 - display DFFA 38 8 pulx -DFFB 20 66 f bra 66 +DFFB 20 66 f bra 66 ;goto72 +; DFFD F6 0B C0 ... ldab 0bc0 -E000 C4 08 .. andb #08 -E002 27 52 'R beq 52 +E000 C4 08 .. andb #08 ; have link master price holding +E002 27 52 'R beq 52 ; to e056 E004 F6 0B C1 ... ldab 0bc1 -E007 C4 08 .. andb #08 +E007 C4 08 .. andb #08 ; test bill error bit E009 26 08 &. bne 08 E00B FC 0B EF ... ldd 0bef E00E 83 00 64 ..d subd #0064 @@ -12253,7 +12357,7 @@ E018 26 0D &. bne 0d E01A CE 00 12 ... ldx #0012 E01D 3C < pshx E01E CC AE 30 ..0 ldd #ae30 ; "MONEDA UNICAMENTE" -E021 BD C0 2E ... jsr c02e ;jump71 +E021 BD C0 2E ... jsr c02e ;jump71 - display E024 38 8 pulx E025 20 2D - bra 2d E027 C1 01 .. cmpb #01 @@ -12261,7 +12365,7 @@ E029 26 0D &. bne 0d E02B CE 00 0B ... ldx #000b E02E 3C < pshx E02F CC AE 23 ..# ldd #ae23 ; "NUR MUNZEN" -E032 BD C0 2E ... jsr c02e ;jump71 +E032 BD C0 2E ... jsr c02e ;jump71 - display E035 38 8 pulx E036 20 1C . bra 1c E038 C1 02 .. cmpb #02 @@ -12269,52 +12373,58 @@ E03A 26 0D &. bne 0d E03C CE 00 12 ... ldx #0012 E03F 3C < pshx E040 CC AE 0F ... ldd #ae0f ; "MONNAIES SEULEMENT" -E043 BD C0 2E ... jsr c02e ;jump71 +E043 BD C0 2E ... jsr c02e ;jump71 - display E046 38 8 pulx E047 20 0B . bra 0b E049 CE 00 0B ... ldx #000b E04C 3C < pshx E04D CC AE 02 ... ldd #ae02 ; "COINS ONLY" -E050 BD C0 2E ... jsr c02e ;jump71 +E050 BD C0 2E ... jsr c02e ;jump71 - display E053 38 8 pulx E054 20 0D . bra 0d +; E056 F6 0B BF ... ldab 0bbf E059 4F O clra E05A 37 7 pshb E05B 36 6 psha E05C CC 09 93 ... ldd #0993 ; some custom message? -E05F BD C0 2E ... jsr c02e ;jump71 +E05F BD C0 2E ... jsr c02e ;jump71 - display E062 38 8 pulx goto72: -E063 7E E5 6A ~.j jmp e56a ;goto73 +E063 7E E5 6A ~.j jmp e56a ;goto73 - bail goto71: E066 F6 00 06 ... ldab 0006 E069 26 03 &. bne 03 -E06B 7E E5 6A ~.j jmp e56a ;goto73 +E06B 7E E5 6A ~.j jmp e56a ;goto73 - bail E06E CE 00 1D ... ldx #001d E071 1C 00 40 ... bset 00,x, #40 E074 BD E7 C7 ... jsr e7c7 ;jump114 E077 F6 00 06 ... ldab 0006 E07A C1 59 .Y cmpb #59 ; 89 E07C 26 06 &. bne 06 -E07E BD DE 09 ... jsr de09 ;jump119 -E081 7E E5 5E ~.^ jmp e55e ;goto74 +E07E BD DE 09 ... jsr de09 ;jump119 - display machine id +E081 7E E5 5E ~.^ jmp e55e ;goto74 - bail +; E084 F6 00 06 ... ldab 0006 E087 BD D4 68 ..h jsr d468 ;jump51 E08A 83 00 00 ... subd #0000 -E08D 27 18 '. beq 18 +E08D 27 18 '. beq 18 ; to e097 +; E08F BD D5 61 ..a jsr d561 ;jump42 E092 83 00 00 ... subd #0000 -E095 26 10 &. bne 10 +E095 26 10 &. bne 10 ; to e0a7 +; E097 BD D3 46 ..F jsr d346 ;jump43 E09A 83 00 00 ... subd #0000 E09D 26 08 &. bne 08 E09F BD D7 83 ... jsr d783 ;jump44 E0A2 83 00 00 ... subd #0000 E0A5 27 09 '. beq 09 +; E0A7 BD E5 D1 ... jsr e5d1 ;jump52 - triple beep -E0AA BD D8 E9 ... jsr d8e9 ;jump92 -E0AD 7E E5 5E ~.^ jmp e55e ;goto74 +E0AA BD D8 E9 ... jsr d8e9 ;jump92 - "SELECT OTHER ITEM" +E0AD 7E E5 5E ~.^ jmp e55e ;goto74 - bail +; E0B0 F6 00 06 ... ldab 0006 E0B3 4F O clra E0B4 05 . asld @@ -12334,33 +12444,35 @@ E0CD C4 7F .. andb #7f E0CF 4F O clra E0D0 FD 00 4D ..M std 004d E0D3 F6 0B C0 ... ldab 0bc0 -E0D6 2C 05 ,. bge 05 +E0D6 2C 05 ,. bge 05 ; free vend E0D8 5F _ clrb E0D9 4F O clra E0DA FD 00 44 ..D std 0044 +; E0DD F6 0B C0 ... ldab 0bc0 -E0E0 C4 02 .. andb #02 +E0E0 C4 02 .. andb #02 ; have a link master! (thats us!) E0E2 26 03 &. bne 03 -E0E4 BD DE 15 ... jsr de15 ;dump118 +E0E4 BD DE 15 ... jsr de15 ;jump118 E0E7 F6 00 11 ... ldab 0011 -E0EA C4 20 . andb #20 -E0EC 26 1A &. bne 1a +E0EA C4 20 . andb #20 ; win a snack? +E0EC 26 1A &. bne 1a ;to e108 E0EE F6 0B C0 ... ldab 0bc0 -E0F1 C4 02 .. andb #02 -E0F3 26 13 &. bne 13 +E0F1 C4 02 .. andb #02 ; have a changer +E0F3 26 13 &. bne 13 ; to e108 E0F5 FC 00 40 ..@ ldd 0040 E0F8 F3 00 3E ..> addd 003e E0FB B3 00 44 ..D subd 0044 -E0FE 25 08 %. bcs 08 +E0FE 25 08 %. bcs 08 ; to e108 E100 F6 0B C0 ... ldab 0bc0 -E103 2D 03 -. blt 03 +E103 2D 03 -. blt 03 ; no free vend - to e108 E105 BD DA 64 ..d jsr da64 ;jump122 -E108 FC 00 40 ..@ ldd 0040 +; +E108 FC 00 40 ..@ ldd 0040 ; have sufficient funds? E10B F3 00 3E ..> addd 003e E10E B3 00 44 ..D subd 0044 -E111 24 50 $P bcc 50 +E111 24 50 $P bcc 50 ; to e163 E113 F6 0B C0 ... ldab 0bc0 -E116 C4 10 .. andb #10 +E116 C4 10 .. andb #10 ; have link master price holding E118 26 49 &I bne 49 E11A F6 00 2B ..+ ldab 002b E11D C1 00 .. cmpb #00 @@ -12384,57 +12496,60 @@ E147 BD D8 D3 ... jsr d8d3 ;jump84 500ms delay E14A CE 00 00 ... ldx #0000 E14D 3C < pshx E14E FC 00 44 ..D ldd 0044 -E151 BD BE 9E ... jsr be9e ;jump50 +E151 BD BE 9E ... jsr be9e ;jump50 - write price to screen E154 38 8 pulx E155 BD E5 D1 ... jsr e5d1 ;jump52 - triple beep E158 BD D8 D3 ... jsr d8d3 ;jump84 500ms delay E15B C6 0C .. ldab #0c E15D F7 00 2C .., stab 002c -E160 7E E5 5E ~.^ jmp e55e ;goto74 +E160 7E E5 5E ~.^ jmp e55e ;goto74 - return +; E163 F6 0B C0 ... ldab 0bc0 -E166 C4 01 .. andb #01 -E168 26 11 &. bne 11 +E166 C4 01 .. andb #01 ; have a dumb mech +E168 26 11 &. bne 11 ; to e17b E16A F6 0B C0 ... ldab 0bc0 -E16D C4 04 .. andb #04 -E16F 26 0A &. bne 0a +E16D C4 04 .. andb #04 ; have a card reader +E16F 26 0A &. bne 0a ; to e17b E171 F6 0B C0 ... ldab 0bc0 -E174 C4 0F .. andb #0f -E176 27 03 '. beq 03 +E174 C4 0F .. andb #0f ; have any coin input mechanism +E176 27 03 '. beq 03 ; to e17b E178 7E E3 35 ~.5 jmp e335 ;goto75 +; E17B FC 00 40 ..@ ldd 0040 E17E F3 00 3E ..> addd 003e E181 B3 00 44 ..D subd 0044 -E184 FD 10 16 ... std 1016 +E184 FD 10 16 ... std 1016 ; change required to give? E187 F6 00 15 ... ldab 0015 E18A C4 01 .. andb #01 -E18C 27 08 '. beq 08 +E18C 27 08 '. beq 08 ; to e196 E18E FC 10 16 ... ldd 1016 -E191 83 00 64 ..d subd #0064 -E194 25 3C %< bcs 3c +E191 83 00 64 ..d subd #0064 ; 100 +E194 25 3C %< bcs 3c ; to e1d2 E196 F6 00 15 ... ldab 0015 E199 C4 02 .. andb #02 -E19B 27 08 '. beq 08 +E19B 27 08 '. beq 08 ; to e1a5 E19D FC 10 16 ... ldd 1016 -E1A0 83 00 C8 ... subd #00c8 -E1A3 25 2D %- bcs 2d +E1A0 83 00 C8 ... subd #00c8 ; 200 +E1A3 25 2D %- bcs 2d ; to e1d2 E1A5 F6 00 15 ... ldab 0015 E1A8 C4 04 .. andb #04 -E1AA 27 08 '. beq 08 +E1AA 27 08 '. beq 08 ; to e1b4 E1AC FC 10 16 ... ldd 1016 -E1AF 83 01 F4 ... subd #01f4 -E1B2 25 1E %. bcs 1e +E1AF 83 01 F4 ... subd #01f4 ; 500 +E1B2 25 1E %. bcs 1e ; to e1d2 E1B4 F6 00 15 ... ldab 0015 E1B7 C4 08 .. andb #08 E1B9 27 08 '. beq 08 E1BB FC 10 16 ... ldd 1016 -E1BE 83 03 E8 ... subd #03e8 -E1C1 25 0F %. bcs 0f +E1BE 83 03 E8 ... subd #03e8 ; 1000 +E1C1 25 0F %. bcs 0f ; to e1d2 E1C3 F6 00 15 ... ldab 0015 E1C6 C4 10 .. andb #10 -E1C8 27 13 '. beq 13 +E1C8 27 13 '. beq 13 ; to e1dd E1CA FC 10 16 ... ldd 1016 -E1CD 83 07 D0 ... subd #07d0 -E1D0 24 0B $. bcc 0b +E1CD 83 07 D0 ... subd #07d0 ; 2000 +E1D0 24 0B $. bcc 0b ; to e1dd +; E1D2 BD C0 E0 ... jsr c0e0 ;jump94 E1D5 83 00 00 ... subd #0000 E1D8 26 01 &. bne 01 @@ -12447,15 +12562,15 @@ E1E0 BD D6 52 ..R jsr d652 ;jump5 E1E3 FC 00 40 ..@ ldd 0040 E1E6 B3 00 44 ..D subd 0044 E1E9 F3 00 3E ..> addd 003e -E1EC FD 00 40 ..@ std 0040 +E1EC FD 00 40 ..@ std 0040 ; credit left E1EF 5F _ clrb E1F0 4F O clra E1F1 FD 00 3E ..> std 003e E1F4 CE 00 1B ... ldx #001b E1F7 1C 00 80 .. bset 00,x, #80 -E1F9 BD D2 13 .. jsr d213 ;jump45 +E1F9 BD D2 13 .. jsr d213 ;jump45 - vend it! E1FC 83 00 00 ... subd #0000 -E200 26 12 &. bne 12 +E200 26 12 &. bne 12 ; to e214 E202 BD E5 D1 ... jsr e5d1 ;jump52 - triple beep E205 BD D8 E9 ... jsr d8e9 ;jump92 - "SELECT OTHER ITEM" E208 FC 00 40 ..@ ldd 0040 @@ -12465,7 +12580,7 @@ E211 7E E3 29 ~.) jmp e329 ;goto92 E214 BD DB CB ... jsr dbcb ;jump121 E217 F6 00 1B ... ldab 001b E21A C4 20 . andb #20 -E21C 27 45 'E beq 45 +E21C 27 45 'E beq 45 ; to e263 E21E FC 00 44 ..D ldd 0044 E221 37 7 pshb E222 36 6 psha @@ -12484,7 +12599,7 @@ E236 37 7 pshb E237 36 6 psha E238 CE E1 00 ... ldx #e100 E23B 3C < pshx -E23C CC 05 F5 ... ldd #05f5 +E23C CC 05 F5 ... ldd #05f5 ; 100000000 (with above) E23F 37 7 pshb E240 36 6 psha E241 30 0 tsx @@ -12500,15 +12615,16 @@ E24F 38 8 pulx E250 25 11 %. bcs 11 E252 CE 1F 00 ... ldx #1f00 E255 3C < pshx -E256 CC FA 0A ... ldd #fa0a +E256 CC FA 0A ... ldd #fa0a ; -100000000 (with above) E259 37 7 pshb E25A 36 6 psha E25B CC 0D FB ... ldd #0dfb -E25E BD FB DF ... jsr fbdf ;jump46 +E25E BD FB DF ... jsr fbdf ;jump46 - update accounting info? E261 31 1 ins E262 31 1 ins +; E263 F6 0B C0 ... ldab 0bc0 -E266 2C 78 ,x bge 78 +E266 2C 78 ,x bge 78 ; free vend - to e2e0 E268 F6 00 06 ... ldab 0006 E26B 4F O clra E26C 05 . asld @@ -12524,7 +12640,7 @@ E27E 83 FF FF ... subd #ffff E281 26 05 &. bne 05 E283 5F _ clrb E284 4F O clra -E285 FD 0D 0D ... std 0d0d +E285 FD 0D 0D ... std 0d0d ; update number of free vends? E288 FE 0D 0D ... ldx 0d0d E28B 08 . inx E28C FF 0D 0D ... stx 0d0d @@ -12543,7 +12659,7 @@ E2A1 5F _ clrb E2A2 37 7 pshb E2A3 36 6 psha E2A4 CC 0D 1B ... ldd #0d1b -E2A7 BD FB DF ... jsr fbdf ;jump46 +E2A7 BD FB DF ... jsr fbdf ;jump46 - update accounting info? E2AA 31 1 ins E2AB 31 1 ins E2AC FE 0D 1D ... ldx 0d1d @@ -12553,7 +12669,7 @@ E2B3 37 7 pshb E2B4 36 6 psha E2B5 CE E1 00 ... ldx #e100 E2B8 3C < pshx -E2B9 CC 05 F5 ... ldd #05f5 +E2B9 CC 05 F5 ... ldd #05f5 ; 100000000 E2BC 37 7 pshb E2BD 36 6 psha E2BE 30 0 tsx @@ -12569,50 +12685,54 @@ E2CC 38 8 pulx E2CD 25 11 %. bcs 11 E2CF CE 1F 00 ... ldx #1f00 E2D2 3C < pshx -E2D3 CC FA 0A ... ldd #fa0a +E2D3 CC FA 0A ... ldd #fa0a ; -100000000 E2D6 37 7 pshb E2D7 36 6 psha E2D8 CC 0D 1B ... ldd #0d1b -E2DB BD FB DF ... jsr fbdf ;jump46 +E2DB BD FB DF ... jsr fbdf ;jump46 - update accounting info? E2DE 31 1 ins E2DF 31 1 ins +; E2E0 F6 00 11 ... ldab 0011 -E2E3 C4 10 .. andb #10 -E2E5 26 14 &. bne 14 +E2E3 C4 10 .. andb #10 ; multi dip switch +E2E5 26 14 &. bne 14 ; to e2fb E2E7 FC 00 40 ..@ ldd 0040 -E2EA 27 0F '. beq 0f +E2EA 27 0F '. beq 0f ; to e2fb E2EC FC 00 40 ..@ ldd 0040 E2EF B3 00 50 ..P subd 0050 -E2F2 24 15 $. bcc 15 +E2F2 24 15 $. bcc 15 ; to e309 E2F4 F6 00 11 ... ldab 0011 E2F7 C4 10 .. andb #10 E2F9 26 0E &. bne 0e -E2FB BD DB 44 ..D jsr db44 ;jump104 +; +E2FB BD DB 44 ..D jsr db44 ;jump104 - say thanks E2FE CE 00 1B ... ldx #001b E301 1D 00 40 ... bclr 00,x, #40 E304 7F 00 25 ..% clr 0025 -E307 20 1A . bra 1a +E307 20 1A . bra 1a ; to e323 +; E309 7F 00 2C .., clr 002c E30C CC 01 F4 ... ldd #01f4 E30F BD E5 71 ..q jsr e571 ;msdelay -E312 BD E5 AA ... jsr e5aa ;jump12 -E315 BD D8 E9 ... jsr d8e9 ;jump92 +E312 BD E5 AA ... jsr e5aa ;jump12 - beep if keypressed? +E315 BD D8 E9 ... jsr d8e9 ;jump92 - select other item E318 CE 00 1B ... ldx #001b E31B 1C 00 40 ... bset 00,x, #40 E31E C6 0A .. ldab #0a E320 F7 00 25 ..% stab 0025 +; E323 BD D7 FF ... jsr d7ff ;jump80 E326 BD D8 40 ..@ jsr d840 ;jump105 goto92: E329 BD E8 9A ... jsr e89a ;jump68 E32C CE 0B C1 ... ldx #0bc1 -E32F 1D 00 08 ... bclr 00,x, #08 -E332 7E E5 5E ~.^ jmp e55e ;goto74 +E32F 1D 00 08 ... bclr 00,x, #08 ; clear bill error bit +E332 7E E5 5E ~.^ jmp e55e ;goto74 - bail goto75: E335 F6 0B C0 ... ldab 0bc0 -E338 C4 02 .. andb #02 +E338 C4 02 .. andb #02 ; have changer - european link master type! E33A 26 03 &. bne 03 -E33C 7E E5 5E ~.^ jmp e55e ;goto74 +E33C 7E E5 5E ~.^ jmp e55e ;goto74 - bail E33F 5F _ clrb E340 4F O clra E341 FD 00 76 ..v std 0076 @@ -12621,28 +12741,27 @@ E347 1D 00 01 ... bclr 00,x, #01 E34A CE 00 17 ... ldx #0017 E34D 1D 00 02 ... bclr 00,x, #02 E350 FC 00 44 ..D ldd 0044 -E353 26 1C &. bne 1c +E353 26 1C &. bne 1c ; to e371 E355 F6 0B C0 ... ldab 0bc0 -E358 C4 10 .. andb #10 +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 +E36F 20 57 W bra 57 ; to e3c8 +; E371 F6 0B C0 ... ldab 0bc0 -E374 C4 10 .. andb #10 -E376 27 50 'P beq 50 +E374 C4 10 .. andb #10 ; have link master price holding +E376 27 50 'P beq 50 ; to e3c8 E378 FC 00 40 ..@ ldd 0040 -E37B 26 4B &K bne 4b +E37B 26 4B &K bne 4b ; to e3c8 E37D F6 0B C0 ... ldab 0bc0 -E380 C4 20 . andb #20 -E382 27 3E '> beq 3e +E380 C4 20 . andb #20 ; have link master price holding - price display +E382 27 3E '> beq 3e ; e3c2 E384 CE 00 17 ... ldx #0017 E387 1C 00 01 ... bset 00,x, #01 E38A F6 00 2B ..+ ldab 002b @@ -12667,8 +12786,10 @@ E3B7 BD D8 D3 ... jsr d8d3 ;jump84 500ms delay E3BA CE 00 17 ... ldx #0017 E3BD 1C 00 02 ... bset 00,x, #02 E3C0 20 06 . bra 06 +; E3C2 CE 00 1F ... ldx #001f E3C5 1C 00 08 ... bset 00,x, #08 +; E3C8 CE 00 1D ... ldx #001d E3CB 1C 00 02 ... bset 00,x, #02 E3CE CE 00 19 ... ldx #0019 @@ -12699,20 +12820,19 @@ E408 1D 00 01 ... bclr 00,x, #01 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 +E433 C4 20 . andb #20 ; link master - price display E435 27 34 '4 beq 34 E437 F6 00 17 ... ldab 0017 E43A C4 01 .. andb #01 @@ -12738,18 +12858,17 @@ E468 1D 00 02 ... bclr 00,x, #02 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 -E47A BD D2 13 ... jsr d213 ;jump45 +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 - vend it! E47D 83 00 00 ... subd #0000 E480 26 0F &. bne 0f E482 CC 00 80 ... ldd #0080 E485 BD C7 E7 ... jsr c7e7 ;jump37 - send to serial port E488 BD E5 D1 ... jsr e5d1 ;jump52 - triple beep -E48B BD D8 E9 ... jsr d8e9 ;jump92 -E48E 7E E5 5E ~.^ jmp e55e ;goto74 +E48B BD D8 E9 ... jsr d8e9 ;jump92 - "SELECT OTHER ITEM" +E48E 7E E5 5E ~.^ jmp e55e ;goto74 - bail E491 F6 00 2B ..+ ldab 002b E494 C1 00 .. cmpb #00 E496 26 08 &. bne 08 @@ -12778,10 +12897,10 @@ E4CC 5F _ clrb E4CD 4F O clra E4CE BD C7 E7 ... jsr c7e7 ;jump37 - send to serial port E4D1 F6 0B C0 ... ldab 0bc0 -E4D4 2D 03 -. blt 03 -E4D6 7E E5 58 ~.X jmp e558 ;goto78 +E4D4 2D 03 -. blt 03 ; free vend +E4D6 7E E5 58 ~.X jmp e558 ;goto78 if not E4D9 F6 0B C0 ... ldab 0bc0 -E4DC C4 10 .. andb #10 +E4DC C4 10 .. andb #10 ; link master - price holding E4DE 26 78 &x bne 78 E4E0 F6 00 06 ... ldab 0006 E4E3 4F O clra @@ -12858,7 +12977,7 @@ E55E 7F 00 06 ... clr 0006 E561 7F 00 2E ... clr 002e E564 CE 00 1B ... ldx #001b E567 1D 00 80 .. bclr 00,x, #80 -;goto73 +goto73: E56A CE 00 1D ... ldx #001d E56C 1D 00 40 .. bclr 00,x, #40 E570 39 9 rts @@ -12922,7 +13041,7 @@ E5C0 FC 00 3B ..; ldd 003b E5C3 27 06 '. beq 06 ; to e5cb E5C5 CC 02 33 ..3 ldd #0233 E5C8 FD 00 3B ..; std 003b -E5CB C6 02 .. ldab #02 +E5CB C6 02 .. ldab #02 ; make a beep E5CD F7 00 33 ..3 stab 0033 E5D0 39 9 rts @@ -13365,19 +13484,23 @@ E89C FD 00 0F ... std 000f E89F CC 3F FF .?. ldd #3fff E8A2 FD 00 50 ..P std 0050 E8A5 7F 00 06 ... clr 0006 +; E8A8 F6 00 06 ... ldab 0006 -E8AB C1 64 .d cmpb #64 -E8AD 24 64 $d bcc 64 +E8AB C1 64 .d cmpb #64 ; 100 +E8AD 24 64 $d bcc 64 ; to e913 - break +; E8AF F6 00 06 ... ldab 0006 E8B2 4F O clra E8B3 CE 00 05 ... ldx #0005 E8B6 02 . idiv E8B7 5D ] tstb -E8B8 27 54 'T beq 54 +E8B8 27 54 'T beq 54 ; to e90e - continue +; E8BA F6 00 06 ... ldab 0006 E8BD BD D7 A0 ... jsr d7a0 ;is_invalid_slot E8C0 83 00 00 ... subd #0000 -E8C3 26 49 &I bne 49 +E8C3 26 49 &I bne 49 ; continue +; E8C5 F6 00 06 ... ldab 0006 E8C8 4F O clra E8C9 05 . asld @@ -13389,14 +13512,14 @@ E8D2 84 3F .? anda #3f E8D4 FD 10 16 ... std 1016 E8D7 FC 10 16 ... ldd 1016 E8DA 83 27 10 .'. subd #2710 ; 10000 -E8DD 24 2F $/ bcc 2f +E8DD 24 2F $/ bcc 2f ; to e90e - continue E8DF F6 00 06 ... ldab 0006 -E8E2 BD D4 68 ..h jsr d468 ;jump51 +E8E2 BD D4 68 ..h jsr d468 ;jump51 - test bit 6 of array[0006] at 0800 E8E5 83 00 00 ... subd #0000 -E8E8 27 24 '$ beq 24 -E8EA BD D5 61 ..a jsr d561 ;jump42 +E8E8 27 24 '$ beq 24 ; to e90e - continue +E8EA BD D5 61 ..a jsr d561 ;jump42 - test bit 7 of array[0006] at 0800 E8ED 83 00 00 ... subd #0000 -E8F0 26 1C &. bne 1c +E8F0 26 1C &. bne 1c ; to e90e - continue E8F2 FC 10 16 ... ldd 1016 E8F5 B3 00 0F ... subd 000f E8F8 23 06 #. bls 06 @@ -13407,8 +13530,10 @@ E903 B3 00 50 ..P subd 0050 E906 24 06 $. bcc 06 E908 FC 10 16 ... ldd 1016 E90B FD 00 50 ..P std 0050 +; E90E 7C 00 06 |.. inc 0006 -E911 20 95 . bra 95 +E911 20 95 . bra 95 ; to e8a8 +; E913 FC 0B B7 ... ldd 0bb7 E916 27 12 '. beq 12 E918 FC 00 0F ... ldd 000f @@ -13906,7 +14031,7 @@ ECC5 FD 0B B7 ... std 0bb7 ECC8 7F 00 06 ... clr 0006 ECCB BD A6 4E ..N jsr a64e ;jump135 ECCE C6 09 .. ldab #09 -ECD0 F7 0B C0 ... stab 0bc0 +ECD0 F7 0B C0 ... stab 0bc0 ; defaults to having a bill validator & dumb mech ECD3 7F 0E 6D ..m clr 0e6d ECD6 C6 01 .. ldab #01 ECD8 F7 0E 6E ..n stab 0e6e @@ -14747,7 +14872,7 @@ F413 38 8 pulx F414 39 9 rts jump112: -; print a report? +; print a report to printer F415 F6 0B C0 ... ldab 0bc0 F418 C4 02 .. andb #02 F41A 27 15 '. beq 15 @@ -15023,7 +15148,7 @@ F6DF BD F1 5B ..[ jsr f15b ;jump53 F6E2 F6 00 19 ... ldab 0019 F6E5 C4 40 .@ andb #40 F6E7 26 07 &. bne 07 -F6E9 FE 0C E7 ... ldx 0ce7 +F6E9 FE 0C E7 ... ldx 0ce7 ;increment the audit number? F6EC 08 . inx F6ED FF 0C E7 ... stx 0ce7 F6F0 CE 00 1D ... ldx #001d @@ -15044,10 +15169,10 @@ F717 39 9 rts rti: F718 3C < pshx -F719 F6 0B C0 ... ldab 0bc0 +F719 F6 0B C0 ... ldab 0bc0 ; if we have a bill validator F71C C4 08 .. andb #08 F71E 27 03 '. beq 03 -F720 BD C3 25 ..% jsr c325 ;jump64 +F720 BD C3 25 ..% jsr c325 ;jump64 - go query the bill validator F723 7C 00 0C |.. inc 000c F726 F6 00 0C ... ldab 000c F729 C1 02 .. cmpb #02 @@ -15246,7 +15371,7 @@ F89F C6 2E .. ldab #2e F8A1 F7 10 2D ..- stab 102d ; enable SCI transmission F8A4 C6 03 .. ldab #03 F8A6 F7 10 2B ..+ stab 102b ; set 9600 baud -F8A9 C6 46 .F ldab #46 ; 70 +F8A9 C6 46 .F ldab #46 ; 70 01000110 F8AB F7 00 2F ../ stab 002f F8AE CC 07 D0 ... ldd #07d0 F8B1 BD E5 71 ..q jsr e571 ;msdelay @@ -15318,9 +15443,12 @@ F94F F7 00 35 ..5 stab 0035 ; ; end of power line test ; +; +; chat to the bill validator if we need to +; F952 F6 0B C0 ... ldab 0bc0 F955 C4 08 .. andb #08 -F957 27 16 '. beq 16 ; to f96f +F957 27 16 '. beq 16 ; to f96f if no bill validator F959 CE 00 02 ... ldx #0002 F95C 3C < pshx F95D CC 10 00 ... ldd #1000 @@ -15354,10 +15482,11 @@ F99C 26 03 &. bne 03 F99E BD D6 F6 ... jsr d6f6 ;jump106 F9A1 F6 00 12 ... ldab 0012 F9A4 C4 20 . andb #20 ; test door switch -F9A6 27 08 '. beq 08 +F9A6 27 08 '. beq 08 ; to f9b0 F9A8 F6 00 35 ..5 ldab 0035 F9AB 26 03 &. bne 03 F9AD 7E FA 79 ~.y jmp fa79 ;goto83 +; F9B0 CE 00 1F ... ldx #001f F9B3 1D 00 04 ... bclr 00,x, #04 F9B6 CE 00 1D ... ldx #001d @@ -15365,7 +15494,7 @@ F9B9 1C 00 10 ... bset 00,x, #10 F9BC F6 00 1F ... ldab 001f F9BF C4 20 . andb #20 F9C1 26 03 &. bne 03 -F9C3 7E FA 74 ~.t jmp fa74 ;goto84 +F9C3 7E FA 74 ~.t jmp fa74 ;goto84 if 001f is clear F9C6 F6 0B C0 ... ldab 0bc0 F9C9 C4 01 .. andb #01 F9CB 27 08 '. beq 08 @@ -15388,8 +15517,9 @@ F9F6 CE 00 1B ... ldx #001b F9F9 1D 00 02 ... bclr 00,x, #02 F9FC F6 0B C0 ... ldab 0bc0 F9FF C4 02 .. andb #02 -FA01 27 27 '' beq 27 -FA03 C6 3C .< ldab #3c +FA01 27 27 '' beq 27 ; to fa2a +; +FA03 C6 3C .< ldab #3c ; 62 00111100 FA05 F7 00 31 ..1 stab 0031 FA08 0E . cli FA09 CC 00 FF ... ldd #00ff @@ -15403,9 +15533,10 @@ FA19 C6 2E .. ldab #2e FA1B F7 10 2D ..- stab 102d ; enable SCI transmission FA1E C6 03 .. ldab #03 FA20 F7 10 2B ..+ stab 102b ; 9600 baud -FA23 C6 46 .F ldab #46 ; 70 +FA23 C6 46 .F ldab #46 ; 70 01000110 FA25 F7 00 2F ../ stab 002f -FA28 20 31 1 bra 31 +FA28 20 31 1 bra 31 ; to fa5b +; FA2A CE 00 21 ..! ldx #0021 FA2D 1D 00 40 ... bclr 00,x, #40 FA30 BD D0 94 ... jsr d094 ;jump66 - init variables @@ -15423,7 +15554,8 @@ FA4F CE 00 1A ... ldx #001a FA52 1D 00 04 ... bclr 00,x, #04 FA55 F6 00 1A ... ldab 001a FA58 F7 30 00 .0. stab 3000 ; changer reset line low -FA5B BD D4 79 ..y jsr d479 ;jump67 +; +FA5B BD D4 79 ..y jsr d479 ;jump67 - query all motors? FA5E BD E8 9A ... jsr e89a ;jump68 FA61 BD BE 69 ..i jsr be69 ;displayreset FA64 7F 00 06 ... clr 0006 @@ -15447,13 +15579,13 @@ FA8A CE 00 1F ... ldx #001f FA8D 1C 00 .. bset 00,x, #20 FA8F F6 00 12 ... ldab 0012 FA93 C4 01 .. andb #01 -FA95 26 33 &3 bne 33 +FA95 26 33 &3 bne 33 ; to faca FA97 F6 00 1D ... ldab 001d FA9A C4 08 .. andb #08 FA9C 27 2A '* beq 2a ; to fac8, to fad0 FA9E F6 00 1F ... ldab 001f FAA1 C4 04 .. andb #04 -FAA3 26 14 &. bne 14 +FAA3 26 14 &. bne 14 ; to fab9 FAA5 CE 00 1F ... ldx #001f FAA8 1C 00 04 ... bset 00,x, #04 FAAB CE 00 1F ... ldx #001f @@ -15468,6 +15600,7 @@ FABF 1D 00 04 ... bclr 00,x, #04 FAC2 CE 00 1D ... ldx #001d FAC5 1D 00 08 ... bclr 00,x, #08 FAC8 20 06 . bra 06 ; to fad0 +; FACA CE 00 1D ... ldx #001d FACD 1C 00 08 ... bset 00,x, #08 FAD0 F6 00 1F ... ldab 001f @@ -15652,6 +15785,7 @@ FC23 31 1 ins FC24 39 9 rts jump85: +; long addition function? FC25 3C < pshx FC26 30 0 tsx FC27 E3 06 .. addd 06,x