6502 Logic Analyser

Post Reply
john
Posts: 12
Joined: Fri May 18, 2012 12:30 am
Location: New Brunswick, Canada
Contact:

6502 Logic Analyser

Post by john »

While working on resurrecting my OSI C3-8P with the broken floppy disks I dreamed of having the logic analyser
I used back in the '80s. It provided data capture and disassembly of a running 6502.

With more time than money I started working on using a Teensy microcomputer as a logic analyser and now have
a working system. The Teensy runs at around 96MHz so it is able to keep up to monitoring and capturing the
address/data/control signal on my OSI 1MHz CPU. After data capture I upload the data to a linux box where
I have a disassembler that can trace the program flow. I shows the 6502 assembler interspersed with the
data reads and writes.

No fancy GUIs, all command line but it is all working amazingly well. So far it has shown me my C3 is stuck on
trying to move the floppy disk to Track zero. (more on that later)

Here is the the system wired to a 505 CPU:
osi_505_cpu.jpg
osi_505_cpu.jpg (110.34 KiB) Viewed 5677 times

And here is a sample the trace program showing CPU fetching the reset vector
and starting to execute code at 0xffa0. The reads are showing with plus signs (+) and
writes with minus signs (-).

Code: Select all

fffc+ a0 
fffd+ ff 
ffa0  d8        CLD
ffa1+ a2 
ffa1  a2 d8     LDX #$d8
ffa3  a9 d0     LDA #$d0
ffa5  85 fe     STA $fe
00fe- d0 
ffa7  a0 00     LDY #$00
ffa9  84 fd     STY $fd
00fd- 00 
ffab  a9 20     LDA #$20
ffad  91 fd     STA ($fd),Y
00fd+ 00 
00fe+ d0 
d000+ 20 
d000- 20 
ffaf  c8        INY
ffb0+ d0 
ffb0  d0 fb     BNE $fb
ffb2+ e6 
ffad  91 fd     STA ($fd),Y
00fd+ 00 
00fe+ d0 
d001+ 20 
d001- 20 
ffaf  c8        INY
ffb0+ d0 
ffb0  d0 fb     BNE $fb
ffb2+ e6 
ffad  91 fd     STA ($fd),Y
00fd+ 00 
00fe+ d0 
d002+ 20 
d002- 20 

The code is all on github and a more detailed write up on http://www.lockett.ca

Direct Link to documentation ---> http://lockett.altervista.org/logic65/logic65.html
C3A-8P 510CPU, 470Disk Controller, 527 memory (3x=48k), dual 8" floppy
Post Reply