[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Need a really good ram unit test program
- Subject: Re: Need a really good ram unit test program
- From: BLuRry <brendan.robert@gmail.com>
- Date: Wed, 25 Apr 2012 14:02:24 -0700 (PDT)
- Complaints-to: groups-abuse@google.com
- In-reply-to: <20152105.1918.1335385376444.JavaMail.geo-discussion-forums@pbvd8>
- Injection-info: glegroupsg2000goo.googlegroups.com; posting-host=70.123.154.97; posting-account=HyIOQgoAAAAfAUGOevdCSBhPYcDSPtM9
- Newsgroups: comp.sys.apple2
- Organization: http://groups.google.com
- References: <6630987.1912.1334896354022.JavaMail.geo-discussion-forums@vbhy1> <21690965.621.1335377625883.JavaMail.geo-discussion-forums@ynjb15> <20152105.1918.1335385376444.JavaMail.geo-discussion-forums@pbvd8>
- User-agent: G2/1.0
David, I think you're right. Funny enough, I did a google search for that exact instruction and found that it was a part of applesoft and the zero-page code in question was a key-in routine. I know that POP uses its own key-in routine so that would explain things quite a bit! But that does NOT explain why the language card switch was pulled, as you pointed out. Very odd! But for all I know it might not be an issue in the runtime, it could be something causing the loader code to act up and not copy the code to that spot.
Ironically, I went to reproduce this sucker and made it all the way to level 4. It may be the case that the error doesn't reproduce as readily when I have some of my cheats active, since the cheats bypass routines like the fight subroutines. I know, shame on me for cheating. Still, POP is easier to speed through if you have feather fall. :-D
I think I will try to see if I can reproduce a similar issue in Airheart since it crashes more readily. I can almost hone in on this one, but I still have no clue what is really going on just yet.
-B
On Wednesday, April 25, 2012 3:22:56 PM UTC-5, David Schmenk wrote:
> On Wednesday, April 25, 2012 11:13:45 AM UTC-7, BLuRry wrote:
> > With a few extra lines of code, I was able to log an active session of Prince of Persia and spit out the last successful 100 lines of code run before a BRK software interrupt occurred. At first, the handling of the interrupt looks OK. But it becomes very obvious right away that the RTI is not going where it is supposed to go. So either the BRK is supposed to reset softswitches or I didn't implement the RTI for BRK correctly. The last two lines BBR1 and ??? are both indicative of opcodes not supported in the 65SC02 used in a //e.
> >
> > Also, d83c: JMP $00b1 looks really suspicious too. Jordan used the aux zero page for variables, and I know that $b1 was an unlikely spot for code to exist. Did I just grab a lousy cracked copy of this game or something??
> >
> > A X Y SP Status PC Disassembly
> > 15 FF 09 01E9 N.R..I.C 59f3 : LDA $4b
> > 12 FF 09 01E9 ..R..I.C 59f5 : STA $a6
> > 12 FF 09 01E9 ..R..I.C 59f7 : LDA $63
> > 56 FF 09 01E9 ..R..I.C 59f9 : CMP #$56
> > 56 FF 09 01E9 ..R..IZC 59fb : BEQ $59df
> > 56 FF 09 01E9 ..R..IZC 59df : RTS
> > 56 FF 09 01EB ..R..IZC 226f : JSR $24d3
> > 56 FF 09 01E9 ..R..IZC 24d3 : LDA $a6
> > 12 FF 09 01E9 ..R..I.C 24d5 : BEQ $24d2
> > 12 FF 09 01E9 ..R..I.C 24d7 : CMP $cb
> > 12 FF 09 01E9 ..R..I.C 24d9 : BEQ $24d2
> > 12 FF 09 01E9 ..R..I.C 24db : LDA $a6
> > 12 FF 09 01E9 ..R..I.C 24dd : STA $cb
> > 12 FF 09 01E9 ..R..I.C 24df : CMP #$05
> > 12 FF 09 01E9 ..R..I.C 24e1 : BNE $24ed
> > 12 FF 09 01E9 ..R..I.C 24ed : LDA #$01
> > 01 FF 09 01E9 ..R..I.C 24ef : STA $a3
> > 01 FF 09 01E9 ..R..I.C 24f1 : JSR $d02a
> > 01 FF 09 01E7 ..R..I.C d02a : JMP $d174
> > 01 FF 09 01E7 ..R..I.C d174 : LDA $cb
> > 12 FF 09 01E7 ..R..I.C d176 : JSR $d150
> > 12 FF 09 01E5 ..R..I.C d150 : BEQ $d14f
> > 12 FF 09 01E5 ..R..I.C d152 : ASL_A
> > 24 FF 09 01E5 ..R..I.. d153 : ASL_A
> > 48 FF 09 01E5 ..R..I.. d154 : TAX
> > 48 48 09 01E5 ..R..I.. d155 : LDA $be9c,X
> > 0E 48 09 01E5 ..R..I.. d158 : RTS
> > 0E 48 09 01E7 ..R..I.. d179 : STA $31
> > 0E 48 09 01E7 ..R..I.. d17b : LDA $cb
> > 12 48 09 01E7 ..R..I.. d17d : JSR $d159
> > 12 48 09 01E5 ..R..I.. d159 : BEQ $d158
> > 12 48 09 01E5 ..R..I.. d15b : ASL_A
> > 24 48 09 01E5 ..R..I.. d15c : ASL_A
> > 48 48 09 01E5 ..R..I.. d15d : TAX
> > 48 48 09 01E5 ..R..I.. d15e : LDA $be9d,X
> > 00 48 09 01E5 ..R..IZ. d161 : RTS
> > 00 48 09 01E7 ..R..IZ. d180 : STA $32
> > 00 48 09 01E7 ..R..IZ. d182 : LDA $cb
> > 12 48 09 01E7 ..R..I.. d184 : JSR $d162
> > 12 48 09 01E5 ..R..I.. d162 : BEQ $d158
> > 12 48 09 01E5 ..R..I.. d164 : ASL_A
> > 24 48 09 01E5 ..R..I.. d165 : ASL_A
> > 48 48 09 01E5 ..R..I.. d166 : TAX
> > 48 48 09 01E5 ..R..I.. d167 : LDA $be9e,X
> > 0F 48 09 01E5 ..R..I.. d16a : RTS
> > 0F 48 09 01E7 ..R..I.. d187 : STA $33
> > 0F 48 09 01E7 ..R..I.. d189 : LDA $cb
> > 12 48 09 01E7 ..R..I.. d18b : JSR $d16b
> > 12 48 09 01E5 ..R..I.. d16b : BEQ $d158
> > 12 48 09 01E5 ..R..I.. d16d : ASL_A
> > 24 48 09 01E5 ..R..I.. d16e : ASL_A
> > 48 48 09 01E5 ..R..I.. d16f : TAX
> > 48 48 09 01E5 ..R..I.. d170 : LDA $be9f,X
> > 11 48 09 01E5 ..R..I.. d173 : RTS
> > 11 48 09 01E7 ..R..I.. d18e : STA $34
> > 11 48 09 01E7 ..R..I.. d190 : LDA $34
> > 11 48 09 01E7 ..R..I.. d192 : JSR $d150
> > 11 48 09 01E5 ..R..I.. d150 : BEQ $d14f
> > 11 48 09 01E5 ..R..I.. d152 : ASL_A
> > 22 48 09 01E5 ..R..I.. d153 : ASL_A
> > 44 48 09 01E5 ..R..I.. d154 : TAX
> > 44 44 09 01E5 ..R..I.. d155 : LDA $be9c,X
> > 0D 44 09 01E5 ..R..I.. d158 : RTS
> > 0D 44 09 01E7 ..R..I.. d195 : STA $35
> > 0D 44 09 01E7 ..R..I.. d197 : LDA $34
> > 11 44 09 01E7 ..R..I.. d199 : JSR $d159
> > 11 44 09 01E5 ..R..I.. d159 : BEQ $d158
> > 11 44 09 01E5 ..R..I.. d15b : ASL_A
> > 22 44 09 01E5 ..R..I.. d15c : ASL_A
> > 44 44 09 01E5 ..R..I.. d15d : TAX
> > 44 44 09 01E5 ..R..I.. d15e : LDA $be9d,X
> > 00 44 09 01E5 ..R..IZ. d161 : RTS
> > 00 44 09 01E7 ..R..IZ. d19c : STA $38
> > 00 44 09 01E7 ..R..IZ. d19e : LDA $33
> > 0F 44 09 01E7 ..R..I.. d1a0 : JSR $d150
> > 0F 44 09 01E5 ..R..I.. d150 : BEQ $d14f
> > 0F 44 09 01E5 ..R..I.. d152 : ASL_A
> > 1E 44 09 01E5 ..R..I.. d153 : ASL_A
> > 3C 44 09 01E5 ..R..I.. d154 : TAX
> > 3C 3C 09 01E5 ..R..I.. d155 : LDA $be9c,X
> > 00 3C 09 01E5 ..R..IZ. d158 : RTS
> > 00 3C 09 01E7 ..R..IZ. d1a3 : STA $36
> > 00 3C 09 01E7 ..R..IZ. d1a5 : LDA $33
> > 0F 3C 09 01E7 ..R..I.. d1a7 : JSR $d159
> > 0F 3C 09 01E5 ..R..I.. d159 : BEQ $d158
> > 0F 3C 09 01E5 ..R..I.. d15b : ASL_A
> > 1E 3C 09 01E5 ..R..I.. d15c : ASL_A
> > 3C 3C 09 01E5 ..R..I.. d15d : TAX
> > 3C 3C 09 01E5 ..R..I.. d15e : LDA $be9d,X
> > 10 3C 09 01E5 ..R..I.. d161 : RTS
> > 10 3C 09 01E7 ..R..I.. d1aa : STA $37
> > 10 3C 09 01E7 ..R..I.. d1ac : RTS
> > 10 3C 09 01E9 ..R..I.. 24f4 : JSR $d05a
> > 10 3C 09 01E7 ..R..I.. d05a : JMP $d835
> > 10 3C 09 01E7 ..R..I.. d835 : LDX #$0f
> > 10 0F 09 01E7 ..R..I.. d837 : LDA $50,X
> > FF 0F 09 01E7 N.R..I.. d839 : STA $40,X
> > FF 0F 09 01E7 N.R..I.. d83b : DEX
> > FF 0E 09 01E7 ..R..I.. d83c : JMP $00b1
> > FF 0E 09 01E7 ..R..I.. b1 : BRK #$00
> > --------------------------------------------------------
> > Interrupt generated, setting PC to (fffe) = 4f0
> > FF 0E 09 01E4 ..RB.... 4f0 : JMP $0d31
> > FF 0E 09 01E4 ..RB.... d31 : BIT $c019
> > FF 0E 09 01E4 N.RB.... d34 : STA $c079
> > FF 0E 09 01E4 N.RB.... d37 : STA $c05b
> > FF 0E 09 01E4 N.RB.... d3a : STA $c078
> > FF 0E 09 01E4 N.RB.... d3d : SEC
> > FF 0E 09 01E4 N.RB...C d3e : ROR $0d12
> > FF 0E 09 01E4 N.RB.... d41 : RTI
> > FF 0E 09 01E7 ..RB.... b3 : BRK #$0e
> > --------------------------------------------------------
> > Interrupt generated, setting PC to (fffe) = 4f0
> > FF 0E 09 01E4 ..RB.... 4f0 : JMP $0d31
> > FF 0E 09 01E4 ..RB.... d31 : BIT $c019
> > FF 0E 09 01E4 N.RB.... d34 : STA $c079
> > FF 0E 09 01E4 N.RB.... d37 : STA $c05b
> > FF 0E 09 01E4 N.RB.... d3a : STA $c078
> > FF 0E 09 01E4 N.RB.... d3d : SEC
> > FF 0E 09 01E4 N.RB...C d3e : ROR $0d12
> > FF 0E 09 01E4 N.RB.... d41 : RTI
> > FF 0E 09 01E7 ..RB.... b5 : BBR1 $00,$R
> > FF 0E 09 01E7 ..RB.... b7 : ???
>
>
> Brendan-
>
> Is there any way to disable any emulated hardware that might generate interrupts and test with that? I agree that there is probably some interrupt interaction. Can you add to your trace the internal state of your MMU soft switches? In your first trace, it looks like the carpet got pulled out from underneath the code at $D83C. I bet the instruction should have been BPL $D837.
>
> Dave...