[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Ultima Weirdness
Recently, I decided to replay that old roll playing classic, Ultima on
my enhanced Apple IIe. This is the original version that was almost
totally writtten in Applesoft basic.
When I get to the part where you have to go to space and shoot 20
aliens, I have a small problem. No matter how hard I try, I can't hit
them! I must be getting old because this wasn't that hard to do
before.
Out of desperation, I decide to try it on my old Apple II+ clone.
Absolutely not problem. I can pick off those aliens like flys!
I then check out the code to see what the problem is. Since this is
in basic, I can locate the code in no time. When you fire at the
aliens, it calls a machine language routine at 29704 ($7408) and
return a value at 29701 ($7405). If that value is 255 ($FF) then you
have a hit.
Now, my knowledge of 6502 assembler stinks at best. I'm hoping that
one of you out there can tell me why this routine will not function
properly on my IIe. I personally suspect the 65c02 is the problem
here.
If anyone would like to solve the mystery (and mysteries are for PC's
and Mac's, not Apple II's), I disassembled the routine in question and
stuck it to the end of the post. If there is anymore information you
need, just let me know at percim@odyssee.net.
Thanks.....
7400- 01 C4 ORA ($C4,X)
7402- 04 ???
7403- 60 RTS
7404- 04 ???
7405- 00 BRK
7406- 00 BRK
7407- 03 ???
7408- A9 00 LDA #$00
740A- 8D 06 74 STA $7406
740D- AD A3 0B LDA $0BA3
7410- 18 CLC
7411- 6A ROR
7412- 6A ROR
7413- 6A ROR
7414- 6A ROR
7415- 8D 07 74 STA $7407
7418- A9 0B LDA #$0B
741A- ED 07 74 SBC $7407
741D- 8D 07 74 STA $7407
7420- AD 00 74 LDA $7400
7423- D0 01 BNE $7426
7425- 60 RTS
7426- AD A0 0B LDA $0BA0
7429- C9 B0 CMP #$B0
742B- F0 0B BEQ $7438
742D- C9 50 CMP #$50
742F- F0 14 BEQ $7445
7431- CD 01 74 CMP $7401
7434- 90 0F BCC $7445
7436- F0 17 BEQ $744F
7438- 18 CLC
7439- AD 01 74 LDA $7401
743C- ED 07 74 SBC $7407
743F- 8D 01 74 STA $7401
7442- 38 SEC
7443- B0 0A BCS $744F
7445- 18 CLC
7446- AD 01 74 LDA $7401
7449- 6D 07 74 ADC $7407
744C- 8D 01 74 STA $7401
744F- AD A1 0B LDA $0BA1
7452- C9 58 CMP #$58
7454- F0 0B BEQ $7461
7456- C9 28 CMP #$28
7458- F0 14 BEQ $746E
745A- CD 02 74 CMP $7402
745D- 90 0F BCC $746E
745F- F0 17 BEQ $7478
7461- 18 CLC
7462- AD 02 74 LDA $7402
7465- ED 07 74 SBC $7407
7468- 8D 02 74 STA $7402
746B- 38 SEC
746C- B0 0A BCS $7478
746E- 18 CLC
746F- AD 02 74 LDA $7402
7472- 6D 07 74 ADC $7407
7475- 8D 02 74 STA $7402
7478- C9 09 CMP #$09
747A- 90 12 BCC $748E
747C- C9 77 CMP #$77
747E- B0 0E BCS $748E
7480- AD 01 74 LDA $7401
7483- C9 09 CMP #$09
7485- 90 07 BCC $748E
7487- C9 F6 CMP #$F6
7489- B0 03 BCS $748E
748B- 38 SEC
748C- B0 1D BCS $74AB
748E- AD 03 74 LDA $7403
7491- C9 80 CMP #$80
7493- 90 0E BCC $74A3
7495- A9 00 LDA #$00
7497- 8D 03 74 STA $7403
749A- EA NOP
749B- EA NOP
749C- EA NOP
749D- EA NOP
749E- EA NOP
749F- EA NOP
74A0- 38 SEC
74A1- B0 69 BCS $750C
74A3- A9 60 LDA #$60
74A5- 8D 03 74 STA $7403
74A8- 38 SEC
74A9- B0 61 BCS $750C
74AB- AD 03 74 LDA $7403
74AE- C9 FF CMP #$FF
74B0- F0 08 BEQ $74BA
74B2- A9 C0 LDA #$C0
74B4- 8D 03 74 STA $7403
74B7- 38 SEC
74B8- B0 05 BCS $74BF
74BA- A9 FF LDA #$FF
74BC- 8D 03 74 STA $7403
74BF- AD 01 74 LDA $7401
74C2- C9 79 CMP #$79
74C4- 90 17 BCC $74DD
74C6- C9 87 CMP #$87
74C8- B0 13 BCS $74DD
74CA- AD 02 74 LDA $7402
74CD- C9 39 CMP #$39
74CF- 90 0C BCC $74DD
74D1- 47 ???
74D2- 43 ???
74D3- B0 08 BCS $74DD
74D5- A9 FF LDA #$FF
74D7- 8D 05 74 STA $7405
74DA- 38 SEC
74DB- B0 05 BCS $74E2
74DD- A9 00 LDA #$00
74DF- 8D 05 74 STA $7405
74E2- AD 01 74 LDA $7401
74E5- C9 70 CMP #$70
74E7- 90 23 BCC $750C
74E9- C9 90 CMP #$90
74EB- B0 1F BCS $750C
74ED- AD 02 74 LDA $7402
74F0- C9 30 CMP #$30
74F2- 90 18 BCC $750C
74F4- C9 50 CMP #$50
74F6- B0 14 BCS $750C
74F8- EE 04 74 INC $7404
74FB- AD 04 74 LDA $7404
74FE- C9 10 CMP #$10
7500- D0 0A BNE $750C
7502- A9 00 LDA #$00
7504- 8D 04 74 STA $7404
7507- A9 FF LDA #$FF
7509- 8D 06 74 STA $7406
750C- AD 02 74 LDA $7402
750F- 29 7F AND #$7F
7511- 8D 02 74 STA $7402
7514- AD 30 C0 LDA $C030
7517- 60 RTS
7518- 60 RTS
7519- 00 BRK
751A- 00 BRK
751B- 00 BRK
751C- 00 BRK
751D- 00 BRK
751E- 00 BRK
751F- 00 BRK
Mark R. Percival
Montr�al, Quebec
percim@odyssee.net