From 1280dd70385136da88e04c95f937b8aee5f55c2f Mon Sep 17 00:00:00 2001 From: Bernard Blackham Date: Sun, 3 Aug 2003 09:25:10 +0000 Subject: [PATCH] more findings --- ROM-2003/vend.asm | 46 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 11 deletions(-) diff --git a/ROM-2003/vend.asm b/ROM-2003/vend.asm index 70e215b..c87edec 100644 --- a/ROM-2003/vend.asm +++ b/ROM-2003/vend.asm @@ -32,6 +32,8 @@ ;0035 only ever contains #1e ;003b commonly contains $0233 ;003d +;003e mask for 0040? (see f996) +;003f ;0040 ;0042 current key press ;0048 error status @@ -47,6 +49,8 @@ ;0076-0077 word ;007f ;00c8 +;0800 motor information array - each is a 16-bit value +; ;08c8 array of prices of each slot?? ;0993 custom message? ;0b90 - 0b99 display buffer (backwards) @@ -67,6 +71,20 @@ ; bit5: bad sensor ; bit6: tube error ;0bc2 - 0bce SCI read into these locations +;0bd +;0bc4 array index into 0bc7 +;0bc5 +;0bc6 another array index into 0bc7 +;0bc7 word array +; +;0be1 +;0bd7 init'd to 0x01 +;0bd8 init'd to 0x04 +;0bd9 init'd to 0x02 +;0bda init'd to 0x20 +;0bdb init'd to 0x08 +;0bdc init'd to 0x10 +; ;0cbc serial number ;0ccc machine ID ;0cd9 counter of something - reset to 4 on some serial input @@ -189,7 +207,7 @@ ; PE6 ; PE5 ; PE4 -; PE3 goes high when 24VUN line is too low +; PE3 goes high when 24VUN line is *really* low (like 20V) ; PE2 remote no-sale switch (active low) ; PE1 motor overvoltage sense (active high) ; PE0 motor overcurrent sense (active low) @@ -9954,6 +9972,7 @@ CE46 31 1 ins CE47 3B ; rti jump48: +; CE48 F6 0B C4 ... ldab 0bc4 CE4B F1 0B C5 ... cmpb 0bc5 CE4E 25 53 %S bcs 53 @@ -9993,7 +10012,7 @@ CE96 C6 08 .. ldab #08 CE98 F7 0B DB ... stab 0bdb CE9B C6 10 .. ldab #10 CE9D F7 0B DC ... stab 0bdc -CEA0 7E D0 66 ~.f jmp d066 ;goto58 +CEA0 7E D0 66 ~.f jmp d066 ;goto58 - multiply CEA3 F6 0B C4 ... ldab 0bc4 CEA6 F1 0B C6 ... cmpb 0bc6 CEA9 25 53 %S bcs 53 @@ -10153,7 +10172,7 @@ D002 C6 20 . ldab #20 D004 F7 0B DB ... stab 0bdb D007 C6 08 .. ldab #08 D009 F7 0B DC ... stab 0bdc -D00C 20 58 X bra 58 +D00C 20 58 X bra 58 ;goto58 D00E F6 0B C6 ... ldab 0bc6 D011 F1 0B C5 ... cmpb 0bc5 D014 25 50 %P bcs 50 @@ -10192,7 +10211,7 @@ D059 F7 0B DA ... stab 0bda D05C C6 08 .. ldab #08 D05E F7 0B DB ... stab 0bdb D061 C6 20 . ldab #20 -D063 F7 0B DC ... stab 0bdc +D063 F7 0B DC ... stab 0bdc ;goto58 goto58: D066 F6 0B AA ... ldab 0baa D069 4F O clra @@ -10739,9 +10758,10 @@ D478 39 9 rts jump67: D479 7F 00 1C ... clr 001c +; begin loop D47C F6 00 1C ... ldab 001c -D47F C1 64 .d cmpb #64 -D481 24 1A $. bcc 1a +D47F C1 64 .d cmpb #64 ; to 100 +D481 24 1A $. bcc 1a ; to d49d D483 CC FF 7F ... ldd #ff7f D486 37 7 pshb D487 36 6 psha @@ -10755,9 +10775,9 @@ D492 A4 00 .. anda 00,x D494 E4 01 .. andb 01,x D496 ED 00 .. std 00,x D498 7C 00 1C |.. inc 001c -D49B 20 DF . bra df +D49B 20 DF . bra df ; to d47c D49D 7F 00 05 ... clr 0005 -goto65: +goto65: ; begin motor count loop D4A0 F6 00 05 ... ldab 0005 D4A3 C1 50 .P cmpb #50 ; 80 D4A5 25 03 %. bcs 03 @@ -10838,7 +10858,7 @@ D53D AA 00 .. ora 00,x D53F EA 01 .. orb 01,x D541 ED 00 .. std 00,x D543 20 15 . bra 15 -goto64: +goto64: ; mark a motor position as valid? D545 CC 7F FF ... ldd #7fff D548 37 7 pshb D549 36 6 psha @@ -10852,7 +10872,7 @@ D554 A4 00 .. anda 00,x D556 E4 01 .. andb 01,x D558 ED 00 .. std 00,x D55A 7C 00 05 |.. inc 0005 -D55D 7E D4 A0 ~.. jmp d4a0 ;goto65 +D55D 7E D4 A0 ~.. jmp d4a0 ;goto65 - loop again goto63: D560 39 9 rts @@ -15238,6 +15258,7 @@ F8FE 0E . cli ; ; begin of main loop goto85: +; test power lines F8FF BD E6 1B ... jsr e61b ;jump4 set 0031 to 10 F902 BD D1 05 ... jsr d105 ;motors_off F905 F6 10 0A ... ldab 100a @@ -15271,6 +15292,8 @@ F94A F7 30 00 .0. stab 3000 ; clear send & reset lines F94D C6 1E .. ldab #1e F94F F7 00 35 ..5 stab 0035 ; +; end of power line test +; F952 F6 0B C0 ... ldab 0bc0 F955 C4 08 .. andb #08 F957 27 16 '. beq 16 ; to f96f @@ -15285,7 +15308,7 @@ F969 CE 0B C1 ... ldx #0bc1 F96C 1C 00 08 .. bset 00,x, #08 ; set bill error bit ; F96F F6 0B C1 ... ldab 0bc1 -F972 C4 07 .. andb #07 ; test for power failures +F972 C4 07 .. andb #07 ; was there a power failure? F974 27 0D '. beq 0d ; to f983 F976 F6 00 35 ..5 ldab 0035 F979 26 08 &. bne 08 @@ -15293,6 +15316,7 @@ F97B CE 00 21 ..! ldx #0021 F97E 1C 00 20 .. bset 00,x, #20 F981 20 06 .. bra 06 ; to f989 ; +; F983 CE 00 21 ..! ldx #0021 F986 1D 00 20 .. bclr 00,x, #20 F989 BD BB 63 . jsr bb63 ;jump200 - read the keypad -- 2.20.1