X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=ROM-2003%2Fvend.asm;h=17dbe578c962ce0b7bd03fc5283ddc1d7b771170;hb=e80241181d6b633f07e4fb464ea698dc63b383ca;hp=fb6735f42f01b6b21e1675e90a50a943b89d2712;hpb=50d80326b5ec23fe8ac5293c15b87c70d796ba88;p=uccvend-snackrom.git diff --git a/ROM-2003/vend.asm b/ROM-2003/vend.asm index fb6735f..17dbe57 100644 --- a/ROM-2003/vend.asm +++ b/ROM-2003/vend.asm @@ -15,7 +15,7 @@ ;0015 ;0016 new key state (cf 0029) ;0017 bits 5-7 used mostly -;0018 +;0018 another loop variable ;0019 error statuses: ; bit 0 - over current ; bit 1 - home sensor failure @@ -56,6 +56,7 @@ ; 005f ;0067 working space of 0bc0 ;0073 +;0075 something about link master price holding ;0076-0077 word ;007f ;00c8 @@ -9228,14 +9229,16 @@ C7C4 8D CE .. bsr c794 ; parity test? C7C6 83 00 00 ... subd #0000 C7C9 27 05 '. beq 05 C7CB F6 10 2C .., ldab 102c ; test the 9th bit -C7CE 2D 10 -. blt 10 ; to c7e0 +C7CE 2D 10 -. blt 10 ; to c7e0 - return 1 +; C7D0 F6 10 2F ../ ldab 102f ; sci data C7D3 4F O clra C7D4 8D BE .. bsr c794 ; parity test? C7D6 83 00 00 ... subd #0000 -C7D9 26 09 &. bne 09 ; to c7e4 +C7D9 26 09 &. bne 09 ; to c7e4 - return 0 C7DB F6 10 2C .., ldab 102c ; test the 9th bit C7DE 2D 04 -. blt 04 +; C7E0 CC 00 01 ... ldd #0001 ; return 1 C7E3 39 9 rts ; return 0 @@ -9752,6 +9755,18 @@ CBFC 7E CE 46 ~.F jmp ce46 ;goto47 (exit) ; ; ; +; +; +; +; +; +; +; +; +; +; +; +; goto44: CBFF F6 0B C0 ... ldab 0bc0 ; do we have our changer (link master)? CC02 C4 02 .. andb #02 @@ -9789,17 +9804,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 ; 11110000 -CC5C C1 20 . cmpb #20 ; 00100000 +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 @@ -9976,11 +9991,12 @@ 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 +CDB4 2C 08 ,. bge 08 ; something to do with link master price holding CDB6 CC 00 80 ... ldd #0080 CDB9 BD C7 E7 ... jsr c7e7 ;jump37 - send byte to coin mech -CDBC 20 1B . bra 1b ; to cdd9 +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 @@ -9993,8 +10009,9 @@ 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 @@ -10005,12 +10022,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 ; 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 @@ -10025,16 +10043,21 @@ 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 @@ -10598,7 +10621,7 @@ 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 +D2A0 C1 32 .2 cmpb #32 ; 50 D2A2 22 07 ". bhi 07 ; to d2ab D2A4 8D 6B .k bsr 6b ;jump30 - test motor overvoltage? D2A6 83 00 00 ... subd #0000 @@ -10663,13 +10686,14 @@ jump30: D311 BD D1 3D ..= jsr d13d ;jump34 - motor on D314 7F 00 1C ... clr 001c D317 7F 00 18 ... clr 0018 +; loop: D31A F6 10 0A ... ldab 100a D31D C4 02 .. andb #02 ; motor overvoltage sense D31F 27 13 '. beq 13 ; to d334 D321 7C 00 1C |.. inc 001c D324 F6 00 1C ... ldab 001c D327 C1 FF .. cmpb #ff -D329 26 07 &. bne 07 +D329 26 07 &. bne 07 ; continue D32B BD D1 05 ... jsr d105 ;motors_off D32E CC 00 01 ... ldd #0001 D331 39 9 rts @@ -12732,7 +12756,7 @@ 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 ; have link master price holding E35A 26 08 &. bne 08 @@ -12743,15 +12767,16 @@ E364 CE 00 21 ..! ldx #0021 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 ; have link master price holding -E376 27 50 'P beq 50 +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 ; have link master price holding - price display -E382 27 3E '> beq 3e +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 @@ -12776,8 +12801,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 @@ -12856,7 +12883,7 @@ 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 - "SELECT OTHER ITEM" -E48E 7E E5 5E ~.^ jmp e55e ;goto74 +E48E 7E E5 5E ~.^ jmp e55e ;goto74 - bail E491 F6 00 2B ..+ ldab 002b E494 C1 00 .. cmpb #00 E496 26 08 &. bne 08 @@ -15235,6 +15262,7 @@ F7B4 7A 00 4F z.O dec 004f ; F7B7 F6 00 25 ..% ldab 0025 F7BA 27 03 '. beq 03 +; from jump34 F7BC 7A 00 25 z.% dec 0025 ; F7BF F6 00 31 ..1 ldab 0031