hoglet67 / 6502Decoder

6502/65816/6800 Bus Protoco/Instruction Stream (for logic analysis capture files)
GNU General Public License v3.0
29 stars 9 forks source link

Sampling on the Master @ 12MHz sometimes picks wrong sample #1

Closed hoglet67 closed 7 years ago

hoglet67 commented 7 years ago

This was captured on the Master with the DIP Clip (Phi2 on Pin 39 Clk0In) running *BCDTEST (disk 259)

4473001 8b 0 0 1 0
4473002 20 0 0 1 0
4473003 00 0 0 1 1
4473004 00 0 0 1 1
4473005 00 0 0 1 1
4473006 00 1 1 1 0
3 00 0 0 1
4473007 00 1 1 1 0
4473008 20 1 1 1 0
4473009 8d 1 1 1 1
4473010 8d 1 1 1 1
4473011 8d 1 1 1 1
4473012 8d 1 0 1 0
A81F : 8D 8B 8B : STA 8B8B      A=00 X=06 Y=00 SP=EA N=0 V=0 D=0 I=0 Z=1 C=1
0 8d 1 1 1
4473013 8d 1 0 1 0
4473014 20 1 0 1 0
4473015 8c 1 0 1 1
4473016 8c 1 0 1 1
4473017 8c 1 0 1 1
4473018 8c 1 0 1 0
1 8c 1 0 1
4473019 8c 1 0 1 0
4473020 20 1 0 1 0
4473021 c2 1 0 1 1 <<<< Correct
4473022 c2 1 0 1 1 <<<< Correct
4473023 c2 1 0 1 1 <<<< Correct
4473024 8c 0 0 1 0 <<<< Missampled
2 8c 1 0 1
4473025 8c 0 0 1 0
4473026 20 0 0 1 0
4473027 00 0 0 1 1
4473028 00 0 0 1 1
4473029 00 0 0 1 1
4473030 00 1 1 1 0
3 00 0 0 1
4473031 00 1 1 1 0
4473032 20 1 1 1 0
4473033 a9 1 1 1 1
4473034 a9 1 1 1 1
4473035 a9 1 1 1 1
4473036 a9 1 0 1 0
A822 : 8D 8C 8C : STA 8C8C      A=00 X=06 Y=00 SP=EA N=0 V=0 D=0 I=0 Z=1 C=1

Note, this doesn't seem to cause any failures to be flagged, but the MSB of the address in the disassembly is incorrect.

hoglet67 commented 7 years ago

More examples, comparing two master startup traces:

101c101
< 8058 : 64 00    : STZ 00        A=00 X=0B Y=00 SP=FE N=0 V=0 D=0 I=1 Z=1 C=1
---
> 8058 : 64 40    : STZ 40        A=00 X=0B Y=00 SP=FE N=0 V=0 D=0 I=1 Z=1 C=1
356274c356274
< F608 : 8D 3C 08 : STA 083C      A=00 X=07 Y=FF SP=FC N=0 V=0 D=0 I=1 Z=1 C=1
---
> F608 : 8D 3C 38 : STA 383C      A=00 X=07 Y=FF SP=FC N=0 V=0 D=0 I=1 Z=1 C=1
356295c356295
< F635 : 8D 3F 0A : STA 0A3F      A=0E X=07 Y=00 SP=FC N=0 V=0 D=0 I=1 Z=0 C=0
---
> F635 : 8D 3F 08 : STA 083F      A=0E X=07 Y=00 SP=FC N=0 V=0 D=0 I=1 Z=0 C=0
356299c356299
< F64C : 8D 3D 3C : STA 3C3D      A=F0 X=07 Y=00 SP=FC N=0 V=0 D=0 I=1 Z=1 C=0
---
> F64C : 8D 3D 08 : STA 083D      A=F0 X=07 Y=00 SP=FC N=0 V=0 D=0 I=1 Z=1 C=0
356454c356454
< F62D : 8D 3E 3E : STA 3E3E      A=03 X=06 Y=00 SP=FB N=0 V=0 D=0 I=1 Z=0 C=0
---
> F62D : 8D 3E 08 : STA 083E      A=03 X=06 Y=00 SP=FB N=0 V=0 D=0 I=1 Z=0 C=0
357007c357007
< EC89 : 8D 82 02 : STA 0282      A=64 X=07 Y=64 SP=FC N=0 V=0 D=0 I=1 Z=0 C=0
---
> EC89 : 8D 82 82 : STA 8282      A=64 X=07 Y=64 SP=FC N=0 V=0 D=0 I=1 Z=0 C=0
363434c363434
< C7CC : 14 D0    : TRB D0        A=10 X=01 Y=0F SP=FA N=0 V=0 D=0 I=1 Z=1 C=1
---
> C7CC : 14 D0    : TRB D0        A=10 X=01 Y=0F SP=FA N=0 V=0 D=0 I=1 Z=0 C=1
367405,367407c367405,367407
< EE6F : 04 E2    : TSB E2        A=04 X=00 Y=FF SP=FB N=0 V=0 D=0 I=1 Z=0 C=0
< EE71 : 60       : RTS           A=04 X=00 Y=FF SP=FD N=0 V=0 D=0 I=1 Z=0 C=0
< EDD3 : 20 EE F1 : JSR F1EE      A=04 X=00 Y=FF SP=FB N=0 V=0 D=0 I=1 Z=0 C=0
---
> EE6F : 04 E2    : TSB E2        A=04 X=00 Y=FF SP=FB N=0 V=0 D=0 I=1 Z=1 C=0
> EE71 : 60       : RTS           A=04 X=00 Y=FF SP=FD N=0 V=0 D=0 I=1 Z=1 C=0
> EDD3 : 20 EE F1 : JSR F1EE      A=04 X=00 Y=FF SP=FB N=0 V=0 D=0 I=1 Z=1 C=0
372288c372288
< A59A : 85 DB    : STA DB        A=DB X=06 Y=FE SP=F1 N=1 V=1 D=0 I=1 Z=0 C=0
---
> A59A : 85 9B    : STA 9B        A=DB X=06 Y=FE SP=F1 N=1 V=1 D=0 I=1 Z=0 C=0
373893c373893
< 831C : 9C 57 02 : STZ 0257      A=00 X=FF Y=3D SP=FE N=0 V=0 D=0 I=1 Z=1 C=0
---
> 831C : 9C 57 42 : STZ 4257      A=00 X=FF Y=3D SP=FE N=0 V=0 D=0 I=1 Z=1 C=0
374405c374405
< C2D6 : 8D 18 03 : STA 0318      A=00 X=00 Y=0D SP=EB N=0 V=0 D=0 I=1 Z=1 C=0
---
> C2D6 : 8D 18 13 : STA 1318      A=00 X=00 Y=0D SP=EB N=0 V=0 D=0 I=1 Z=1 C=0
382656,382657c382656,382657
< E85D : 0C 34 FE : TSB FE34      A=08 X=83 Y=0F SP=E9 N=0 V=0 D=0 I=1 Z=1 C=0
< E860 : B0 07    : BCS E869      A=08 X=83 Y=0F SP=E9 N=0 V=0 D=0 I=1 Z=1 C=0
---
> E85D : 0C 34 FE : TSB FE34      A=08 X=83 Y=0F SP=E9 N=0 V=0 D=0 I=1 Z=0 C=0
> E860 : B0 07    : BCS E869      A=08 X=83 Y=0F SP=E9 N=0 V=0 D=0 I=1 Z=0 C=0
hoglet67 commented 7 years ago

Also tried using Phi2 on Pin 37 (Phi2 out), and that seems worse, but clearly this merits further investigation. You actually see flagged failures:

rep  fail master1.txt 
805C : 00 00    : BRK #00       A=00 X=82 Y=43 SP=FB N=0 V=0 D=0 I=1 Z=0 C=0 prediction failed
0000 : 00 00    : BRK #00       A=00 X=82 Y=B3 SP=F8 N=0 V=0 D=0 I=1 Z=0 C=0 prediction failed
0000 : 00 00    : BRK #00       A=00 X=85 Y=93 SP=F5 N=0 V=0 D=0 I=1 Z=0 C=0 prediction failed
000F : 00 00    : BRK #00       A=00 X=A4 Y=0F SP=F2 N=0 V=0 D=0 I=1 Z=0 C=0 prediction failed
0000 : 00 00    : BRK #00       A=00 X=AB Y=4A SP=EF N=0 V=0 D=0 I=1 Z=0 C=0 prediction failed
0000 : 00 00    : BRK #00       A=00 X=AC Y=B0 SP=EC N=0 V=0 D=0 I=1 Z=0 C=0 prediction failed
001E : 00 00    : BRK #00       A=00 X=B8 Y=F8 SP=E9 N=0 V=0 D=0 I=1 Z=0 C=0 prediction failed
000F : 00 00    : BRK #00       A=00 X=82 Y=43 SP=E6 N=0 V=0 D=0 I=1 Z=0 C=0 prediction failed
0000 : 00 00    : BRK #00       A=00 X=82 Y=B3 SP=E3 N=0 V=0 D=0 I=1 Z=0 C=0 prediction failed
0000 : 00 00    : BRK #00       A=00 X=83 Y=A8 SP=E0 N=0 V=0 D=0 I=1 Z=0 C=0 prediction failed
0000 : 00 00    : BRK #00       A=00 X=85 Y=93 SP=DD N=0 V=0 D=0 I=1 Z=0 C=0 prediction failed
0000 : 00 00    : BRK #00       A=00 X=86 Y=71 SP=DA N=0 V=0 D=0 I=1 Z=0 C=0 prediction failed
0000 : 00 00    : BRK #00       A=00 X=8F Y=3C SP=D7 N=0 V=0 D=0 I=1 Z=0 C=0 prediction failed
0000 : 00 00    : BRK #00       A=00 X=90 Y=B8 SP=D4 N=0 V=0 D=0 I=1 Z=0 C=0 prediction failed
0000 : 00 00    : BRK #00       A=00 X=9B Y=9A SP=D1 N=0 V=0 D=0 I=1 Z=0 C=0 prediction failed
0000 : 00 00    : BRK #00       A=00 X=A1 Y=E0 SP=CE N=0 V=0 D=0 I=1 Z=0 C=0 prediction failed
0000 : 00 00    : BRK #00       A=00 X=A4 Y=7C SP=CB N=0 V=0 D=0 I=1 Z=0 C=0 prediction failed
0000 : 00 00    : BRK #00       A=00 X=A9 Y=E2 SP=C8 N=0 V=0 D=0 I=1 Z=0 C=0 prediction failed
0000 : 00 00    : BRK #00       A=00 X=B7 Y=77 SP=C5 N=0 V=0 D=0 I=1 Z=0 C=0 prediction failed
0000 : 00 00    : BRK #00       A=00 X=B7 Y=D1 SP=C2 N=0 V=0 D=0 I=1 Z=0 C=0 prediction failed
0000 : 00 00    : BRK #00       A=00 X=B8 Y=29 SP=BF N=0 V=0 D=0 I=1 Z=0 C=0 prediction failed
0000 : 00 00    : BRK #00       A=00 X=B8 Y=F3 SP=BC N=0 V=0 D=0 I=1 Z=0 C=0 prediction failed
0000 : 00 00    : BRK #00       A=00 X=BB Y=FF SP=B9 N=0 V=0 D=0 I=1 Z=0 C=0 prediction failed
0000 : 00 00    : BRK #00       A=00 X=DF Y=DD SP=B6 N=0 V=0 D=0 I=1 Z=0 C=0 prediction failed
pc: prediction failed at 8091 old pc was 0035
8E7F : F0 02    : BEQ 8E83      A=0F X=18 Y=8F SP=B4 N=0 V=0 D=0 I=1 Z=0 C=0 prediction failed
F10D : 8C 54 02 : STY 0254      A=BA X=1A Y=32 SP=B2 N=1 V=0 D=0 I=1 Z=0 C=1 prediction failed
98D9 : 00 43    : BRK #43       A=02 X=14 Y=FF SP=AD N=0 V=0 D=0 I=1 Z=0 C=0 prediction failed
98D9 : 00 43    : BRK #43       A=02 X=14 Y=FF SP=AA N=0 V=0 D=0 I=1 Z=0 C=0 prediction failed
98D9 : 00 43    : BRK #43       A=02 X=15 Y=DD SP=A7 N=0 V=0 D=0 I=1 Z=0 C=0 prediction failed
E3CD : D0 E1    : BNE E3B0      A=F2 X=07 Y=08 SP=AE N=1 V=0 D=0 I=1 Z=0 C=1 prediction failed
E3CD : D0 E1    : BNE E3B0      A=12 X=07 Y=0B SP=AE N=0 V=0 D=0 I=1 Z=0 C=1 prediction failed
98C4 : 00 43    : BRK #43       A=49 X=15 Y=FF SP=A4 N=0 V=0 D=0 I=1 Z=0 C=0 prediction failed
E3CD : D0 E1    : BNE E3B0      A=00 X=07 Y=0E SP=AB N=1 V=0 D=0 I=1 Z=0 C=0 prediction failed
E840 : 48       : PHA           A=08 X=0A Y=11 SP=9F N=1 V=0 D=0 I=1 Z=0 C=1 prediction failed
E840 : 48       : PHA           A=08 X=0A Y=12 SP=9F N=1 V=0 D=0 I=1 Z=0 C=1 prediction failed
E840 : 48       : PHA           A=08 X=00 Y=13 SP=A1 N=1 V=0 D=0 I=1 Z=0 C=0 prediction failed
E840 : 48       : PHA           A=08 X=20 Y=00 SP=94 N=1 V=0 D=0 I=1 Z=0 C=1 prediction failed
E840 : 48       : PHA           A=08 X=4D Y=00 SP=94 N=1 V=0 D=0 I=1 Z=0 C=1 prediction failed
E840 : 48       : PHA           A=08 X=4D Y=00 SP=94 N=1 V=0 D=0 I=1 Z=0 C=1 prediction failed
E840 : 48       : PHA           A=08 X=0D Y=00 SP=94 N=1 V=0 D=0 I=1 Z=0 C=0 prediction failed
E840 : 48       : PHA           A=08 X=0D Y=00 SP=94 N=1 V=0 D=0 I=1 Z=0 C=0 prediction failed
98C4 : 00 43    : BRK #43       A=49 X=13 Y=0A SP=A3 N=0 V=0 D=0 I=1 Z=0 C=0 prediction failed
E840 : 48       : PHA           A=08 X=43 Y=0D SP=9E N=1 V=0 D=0 I=1 Z=0 C=1 prediction failed