------------------------------------------------------------------------------------------ Slot 2 rigging: C1/806D: AD 7B 61 LDA $617B C1/8070: C9 FF CMP #$FF C1/8072: F0 15 BEQ $8089 ;stop slot 2 rotation and exit if offset 617B value = FFh C1/8074: AD 8D 7B LDA $7B8D ;load current slot 2 value C1/8077: 20 F2 7E JSR $7EF2 ;LSR x4, ASL, load from (C2A820 + new value worked from slot 2) C1/807A: CD 7B 61 CMP $617B C1/807D: F0 0A BEQ $8089 ;compare to value at 617B, exit if equal C1/807F: AD 7D 61 LDA $617D C1/8082: F0 05 BEQ $8089 C1/8084: CE 7D 61 DEC $617D C1/8087: 80 03 BRA $808C ;exit if 617D has dropped to 0 (starts at 4), otherwise ;decrement 617D and continue rotating the slot C1/8089: EE 90 7B INC $7B90 ;Increment to stop slot 2 rotation Subroutines: C1/7EF2: 4A LSR C1/7EF3: 4A LSR C1/7EF4: 4A LSR C1/7EF5: 4A LSR C1/7EF6: 0A ASL C1/7EF7: AA TAX C1/7EF8: BF 20 A8 C2 LDA $C2A820,X C1/7EFC: 60 RTS Table of values at C2A820h - 00 00 04 00 01 00 05 00 03 00 04 00 01 00 05 00 04 00 03 00 02 00 05 00 04 00 03 00 02 00 05 00 Miscellaneous: ;Yes, slot 1 DOES affect slot 2! C1/7F47: AD 8C 7B LDA $7B8C ;Slot 1 C1/7F4A: 20 E7 7E JSR $7EE7 ;LSR x4, ASL, load from (C2A800 + new value worked from slot 1) C1/7F4D: 8D 7B 61 STA $617B C1/7EE7: 4A LSR C1/7EE8: 4A LSR C1/7EE9: 4A LSR C1/7EEA: 4A LSR C1/7EEB: 0A ASL C1/7EEC: AA TAX C1/7EED: BF 00 A8 C2 LDA $C2A800,X C1/7EF1: 60 RTS Table of values at C2A800h - 00 00 04 00 05 00 03 00 04 00 05 00 02 00 05 00 01 00 04 00 05 00 03 00 05 00 02 00 03 00 01 00 ------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------ Slot 3 rigging: C1/80A6: AD 7C 61 LDA $617C C1/80A9: C9 FF CMP #$FF C1/80AB: F0 2A BEQ $80D7 ;stop slot 3 rotation if offset 617C value = FFh C1/80AD: 29 80 AND #$80 C1/80AF: D0 15 BNE $80C6 ;Branch if bit 7 of 617C is set C1/80B1: AD 8E 7B LDA $7B8E ;load current slot 3 value C1/80B4: 20 FD 7E JSR $7EFD ;LSR x4, ASL, load from (C2A840 + new value worked from slot 3) C1/80B7: CD 7C 61 CMP $617C C1/80BA: F0 1B BEQ $80D7 ;if equal with 617C, stop slot 3 rotation C1/80BC: AD 7D 61 LDA $617D C1/80BF: F0 16 BEQ $80D7 C1/80C1: CE 7D 61 DEC $617D C1/80C4: 80 14 BRA $80DA ;exit if 617D has dropped to 0 (starts at 4), otherwise ;decrement 617D and continue rotating the slot C1/80C6: AD 8E 7B LDA $7B8E ;load current slot 3 value C1/80C9: 20 FD 7E JSR $7EFD ;LSR x4, ASL, load from (C2A840 + new value worked from slot 3) C1/80CC: 85 36 STA $36 ;store at 0036 C1/80CE: AD 7C 61 LDA $617C C1/80D1: 29 7F AND #$7F C1/80D3: C5 36 CMP $36 ;compare 617C to (C2A840 + new value worked from slot 3) C1/80D5: F0 03 BEQ $80DA ;if 617C and 0036 equal or just set the zero flag, continue rotation C1/80D7: EE 91 7B INC $7B91 ;Increment to stop slot 3 rotation C1/80DA: 60 RTS Subroutines: C1/7EFD: 4A LSR C1/7EFE: 4A LSR C1/7EFF: 4A LSR C1/7F00: 4A LSR C1/7F01: 0A ASL C1/7F02: AA TAX C1/7F03: BF 40 A8 C2 LDA $C2A840,X C1/7F07: 60 RTS Table of values at C2A840h - 00 00 01 00 03 00 04 00 02 00 05 00 04 00 03 00 01 00 05 00 04 00 03 00 02 00 05 00 04 00 05 00 Miscellaneous: ;A damn random number generator. Feh! There are 16 JSR's to here in the code. C1/185B: DA PHX C1/185C: A5 72 LDA $72 C1/185E: AA TAX C1/185F: E6 72 INC $72 C1/1861: BF 00 FD C0 LDA $C0FD00,X C1/1865: FA PLX C1/1866: 60 RTS Things that use C1/185B (if not mentioned, process adds 1): Slot command (after 1st slot value is chosen) Roulette (after target confirmation for player, must have random cursor (not used by Mimic, Rage)) Blow Fish (adds 6 to 00:0072) H-Bomb (adds 0Ch (12 dec) to 00:0072) ;check this immediately 7-Flush (adds 14h (20 dec) to 00:0072) Exploder (adds 18h (24 dec) to 00:0072) smoke entrance animation (adds 20h (32 dec) to 00:0072) Drain (adds 1Eh (30 dec) to 00:0072) Pearl (adds 12h (18 dec) to 00:0072) Flare (adds 75h (117 dec) to 00:0072) X-Zone (adds 8 to 00:0072) Meteor (adds 22h (34 dec) to 00:0072) W Wind (adds 2 to 00:0072) Rasp (adds 30h (48 dec) to 00:0072) Mute (adds 0Ah (10 dec) to 00:0072) Imp (adds 2 to 00:0072) Osmose (adds 1Eh (30 dec) to 00:0072) Cure 3 (adds 38h (56 dec) to 00:0072) Life 2 (adds 16h (22 dec) to 00:0072) Antdot (adds 18h (24 dec) to 00:0072) Regen (adds 18h (24 dec) to 00:0072) Sun Flare (adds 3Ch (60 dec) to 00:0072) Earth Wall (adds 18h (24 dec) to 00:0072) Water Edge (adds 84h (132 dec) to 00:0072) Fire Dance (adds 0Ch (12 dec) to 00:0072) Harvester (adds 0Ch (12 dec) to 00:0072) Land Slide (adds 30h (48 dec) to 00:0072) Cave In (adds 12h (18 dec) to 00:0072) Snowball (adds 12h (18 dec) to 00:0072) Whump (adds 0Ch (12 dec) to 00:0072) X-Fer (adds 3Ch (60 dec) to 00:0072) CleanSweep (maybe enemy Roulette added 2?) Imp Song (adds 6 to 00:0072) Virite (adds 9 to 00:0072) Mute (dummy enemy spell) (adds 0Ah (10 dec) to 00:0072) Net (adds 6 to 00:0072) Fire Ball (adds 12h (18 dec) to 00:0072) Atomic Ray (adds 12h (18 dec) to 00:0072) WaveCannon (adds 2 to 00:0072) Raid (adds 1Eh (30 dec) to 00:0072) TekBarrier (adds 0Ch (12 dec) to 00:0072) Love Token (adds 8 to 00:0072) S. Cross (adds 27h (39 dec) to 00:0072) Cold Dust (adds 33h to 00:0072) Tested thru Zinger. ;Where does 7E:6179's value come from? This! It's created after the player chooses a value ;for slot 1. C1/7F2F: 20 5B 18 JSR $185B C1/7F32: 8D 79 61 STA $6179 ;random number used in getting value for 617C ;7E:617C's value explained C1/7F79: AD 8C 7B LDA $7B8C ;Slot 1 C1/7F7C: 20 E7 7E JSR $7EE7 ;LSR x4, ASL, load from (C2A800 + new value worked from slot 1) C1/7F7F: 85 38 STA $38 C1/7F81: AD 8D 7B LDA $7B8D C1/7F84: 20 F2 7E JSR $7EF2 ;LSR x4, ASL, load from (C2A820 + new value worked from slot 2) C1/7F87: 85 3A STA $3A C1/7F89: C5 38 CMP $38 C1/7F8B: D0 1F BNE $7FAC ;if derived values from slot 1 and 2 subroutines do not equal, ;617C = FFh C1/7F8D: A5 38 LDA $38 ;load value given by slot 1 C1/7F8F: AA TAX C1/7F90: BF E1 7E C1 LDA $C17EE1,X ;load (C17EE1 + value given by slot 1) C1/7F94: 85 36 STA $36 C1/7F96: AD 79 61 LDA $6179 C1/7F99: 25 36 AND $36 C1/7F9B: D0 09 BNE $7FA6 ;if 6179 (random number) has at least one common set bit with ;(C17EE1 + value given by slot 1), branch C1/7F9D: A9 04 LDA #$04 C1/7F9F: 8D 7D 61 STA $617D ;617D = 04h C1/7FA2: A5 3A LDA $3A ;load value given by slot 2 and store at 617C C1/7FA4: 80 08 BRA $7FAE C1/7FA6: A5 3A LDA $3A ;load value given by slot 2, add 128, store at 617C C1/7FA8: 09 80 ORA #$80 C1/7FAA: 80 02 BRA $7FAE C1/7FAC: A9 FF LDA #$FF ;set 617C at FF, stopping slot 3 rotation immediately once checked C1/7FAE: 8D 7C 61 STA $617C Table of values at C17EE1h - 1F 03 01 01 00 00 ------------------------------------------------------------------------------------------