Sorry I've been a bit quiet of late. I've been a bit distracted by a couple of things that life has thrown at me recently.
Anyway, things are starting to return to normal, and this weekend I've been playing with something new. A few weeks ago I've was quite intrigued by the Acorn Atom 6502 Tracer thread. So much so, I thought I would have a go at something along these lines myself.
I had a spare GODIL, having just reconfigured my original Atom back to to using a 6847. So I thought I would try to make use of this to build an bus monitor / single stepper.
One side of this connects to the following signals on PL6/7:
The other side connects to a serial console via a 3.3V RS232 <-> USB cable.
For fun, I also wired in a HD44780 style LCD display.
Here's the results: This is a sample session over the serial console, which gives you an idea of what is possible.
Code: Select all
Atom Bus Monitor version 0.11 Compiled at 17:53:13 on Jun 7 2015 Tracing every 1 instructions while single stepping 6502 paused... 0000 >> help Atom Bus Monitor version 0.11 Compiled at 17:53:13 on Jun 7 2015 Commands: help reset interrupt address step trace blist break bclear continue >> s 10 Stepping 10 instructions FF3F FF41 FF44 FF47 FF48 FF41 FF44 FF47 FF48 FF41 >> break fe94 Setting breakpoint at FE94 0: FE94 >> c 0: FE94 6502 free running... Breakpoint hit at FE94 >> break 2800 Setting breakpoint at 2800 0: 2800 1: FE94 >> bclear 1 Removing breakpoint at FE94 0: 2800 >> c 0: 2800 6502 free running... Breakpoint hit at 2800 >> s Stepping 10 instructions 2802 2805 2807 280A 2C0E 2C0F 2C11 2C12 2C14 2C16 >> reset Resetting 6502 >> s 1 Stepping 1 instructions FF3F >> s 1 Stepping 1 instructions FF41 >> s 1 Stepping 1 instructions FF44 >> s 1 Stepping 1 instructions FF47 >> c 0: 2800 6502 free running... Interrupted at FE82 >> reset Resetting 6502 >> s1 Stepping 1 instructions FF3F >>
The FPGA really just contains two things:
- Some single stepper / break point hardware sitting on the Atom expansion bus
- An AVR8 Soft Core and a bit of firmware written in C
Everything is on github:
Here's the top level VHDL:
https://github.com/hoglet67/AtomBusMon/ ... BusMon.vhd
which is surprisingly minimal.
And here's the C code that runs on AVR8 core:
https://github.com/hoglet67/AtomBusMon/ ... omBusMon.c
What's really cool is that this is working with a real 6502 and a real Atom, and just plugs into PL6/7. No other mods are required, nor any special software on the Atom. You can be running any program on the Atom, and with the press of a switch interrupt it and start single stepping.
If it were possible to see the data bus values on PL6/7 (which would need a small mod) then we could even add op-code display functionality.
The other thing I was thinking of trying was to include a 6502 core, so that the whole thing would just plug into the 6502 socket. We could call this variant AtomICE. This also might work on the Beeb as well (if the GODIL can cope with the data bus loading)
If anyone wants to give this a try, I'm happy to help.