ICE T65/Z80/6809

emulators, hardware and classic software for atom + system machines
VeryVon
Posts: 3
Joined: Thu Apr 15, 2021 4:36 pm
Contact:

Re: ICE T65/Z80/6809

Post by VeryVon »

Thanks Dave! I'm in US, just getting one board for personal use.
User avatar
hoglet
Posts: 12666
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: ICE T65/Z80/6809

Post by hoglet »

VeryVon wrote: Sat May 15, 2021 7:35 pm Thanks Dave! I'm in US, just getting one board for personal use.
Ah, OK.

JLC is very cheap (<$10) for 5 boards inc postage.

Generally it gets much more expensive if you need more than 10! (i.e. negative price breaks)

Dave
VeryVon
Posts: 3
Joined: Thu Apr 15, 2021 4:36 pm
Contact:

Re: ICE T65/Z80/6809

Post by VeryVon »

Good to know! I'll definitely order extras then.
bprosman
Posts: 484
Joined: Sun Mar 29, 2015 11:27 pm
Contact:

Re: ICE T65/Z80/6809

Post by bprosman »

I noticed the 6502 manufacturing.zip has three branches: master, dev and “hack_6502_1MHz_int_oscillator” - i’m assuming dev is the correct branch.
The Hack_6502_1MHZ_int_oscillator is a version Dave made for me (for which I am still grateful). It is/was to debug an Elector 6502 Junior computer system with a wobbly oscillator. This version doesnt require a clock as it generates its own 1MHz clock.
Xolod
Posts: 2
Joined: Tue Jun 22, 2021 8:39 am
Contact:

Re: ICE T65/Z80/6809

Post by Xolod »

Many thanks to the author for such a wonderful project!
It turned out to be very useful for investigating the operation of the Z80 board from a very rare Labtam 3000 computer from Australia.
Image
uminded
Posts: 3
Joined: Wed Jul 14, 2021 12:51 am
Contact:

Re: ICE T65/Z80/6809

Post by uminded »

Does anybody have a GODIL laying around they would sell? I found a store in Europe but they want 75 euro to ship to Canada...

I plan on making some VHDL changes to support the NSC800 system I am trying to work with.
bprosman
Posts: 484
Joined: Sun Mar 29, 2015 11:27 pm
Contact:

Re: ICE T65/Z80/6809

Post by bprosman »

Noticed that the EEpizza boards are available again.
uminded
Posts: 3
Joined: Wed Jul 14, 2021 12:51 am
Contact:

Re: ICE T65/Z80/6809

Post by uminded »

bprosman wrote: Fri Jul 16, 2021 9:05 pm Noticed that the EEpizza boards are available again.
I really like the GODIL approach, I don't have to make another board and can just go.
User avatar
hoglet
Posts: 12666
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: ICE T65/Z80/6809

Post by hoglet »

A couple of thoughts:

1. With the GODIL you need the larger XC3S500E based device for the newer versions of the ICE-Z80. Tt=he other designs will fit in either, but the Z80 is a bit bigger are the T80 core is quite large.

2. With the EEPIZZA board you would need to rework the level shifter board, as the NSC800 has a different pinout to the Z80.

3. It does look like the NSC800 bus interface is a bit different to the Z80. That part of the ICE design is quite complicated (and poorly) documented, so be warned, this won't be a trivial change!

Sorry, I only have one of the larger GODILs, and that's not even mine!

Dave
uminded
Posts: 3
Joined: Wed Jul 14, 2021 12:51 am
Contact:

Re: ICE T65/Z80/6809

Post by uminded »

The NSC800 internally is compatible with the Z80 core, the pins are muxed differently as the chip was designed to be a multi-proc master. The interrupt system is quote modified though so it will definitely be a challenge.

Currently, I am doing passive disassembly and considering a way to make an EEPROM emulator with CPU clock control as a roundabout way of processor emulation. Essentially keep the existing CPU and just make a daughter board to interpose and monitor the signals as required.
bitwiseop
Posts: 4
Joined: Fri Jul 16, 2021 9:08 pm
Contact:

Re: ICE T65/Z80/6809

Post by bitwiseop »

I'm working on reverse engineering the OS image and firmware ROM dump for the Ensoniq Mirage sampler (https://en.wikipedia.org/wiki/Ensoniq_Mirage) with the goal of extending functionality using the Expansion port to interface with a modern microcontroller. I'm not the first person to attempt to figure out the Mirage firmware, gordonjcp on GitHub was kind enough to share his efforts (https://github.com/gordonjcp/miragetools) so I'm not starting from scratch. As the Mirage uses a 6809E my plan was to use AtomBusMon to trace through the code execution while using the sampler instead of attempting a static analysis as I'm still learning 6809 assembly. I've ordered one of the eepizza boards as the GODIL40 boards are no longer available, with regards to the 6809E adapter board are the gerber files in the dev branch (https://github.com/hoglet67/AtomBusMon/ ... d/6809e/v1) good to use as is or are any modifications required? Thanks,
- David
User avatar
hoglet
Posts: 12666
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: ICE T65/Z80/6809

Post by hoglet »

bitwiseop wrote: Tue Jul 20, 2021 2:37 pm I've ordered one of the eepizza boards as the GODIL40 boards are no longer available, with regards to the 6809E adapter board are the gerber files in the dev branch (https://github.com/hoglet67/AtomBusMon/ ... d/6809e/v1) good to use as is or are any modifications required?
That's the most recent version, and should work as-is.

You can find more information here:
https://github.com/hoglet67/AtomBusMon/ ... PU-Adapter

Dave
bitwiseop
Posts: 4
Joined: Fri Jul 16, 2021 9:08 pm
Contact:

Re: ICE T65/Z80/6809

Post by bitwiseop »

Great! I put in a PCB order with Oshpark, I'll order the components while I wait for the eepizza board and PCB to arrive.
bitwiseop
Posts: 4
Joined: Fri Jul 16, 2021 9:08 pm
Contact:

Re: ICE T65/Z80/6809

Post by bitwiseop »

This project is amazing, big thanks for all the effort to everyone involved. I pulled the 'dev' github branch, fought with the Xilinx ISE 14.7 install, compiled the source, fought with getting the Xilinx USB drivers working, programmed the eepizza board, then waited for components and PCB to arrive. Got the components and 6809E adapter PCB in the mail, soldered on all the components, connected it to the eepizza board, popped it into the 6809E CPU socket and it booted the Ensoniq Mirage first go. I'm still learning 6809 assembly, but having an in-circuit emulator is going to be invaluable with debugging code.
6809E_PCB_blank.png
6809E_PCB_Top_populated.png
6809E_PCB_Bottom_populated.png
6809E_PCB_Mirage.png
6809E_Console.png
bitwiseop
Posts: 4
Joined: Fri Jul 16, 2021 9:08 pm
Contact:

Re: ICE T65/Z80/6809

Post by bitwiseop »

Made a few small changes to how the firmware code prints logging to make it easier to follow what the CPU is doing while single stepping. I'm assuming the "D" register is the Direct Page register and not the 16bit A+B combination register on the 6809 as it's an 8bit value?
6809E_Console_Debug.png
User avatar
hoglet
Posts: 12666
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: ICE T65/Z80/6809

Post by hoglet »

bitwiseop wrote: Mon Aug 09, 2021 6:28 pm I'm assuming the "D" register is the Direct Page register and not the 16bit A+B combination register on the 6809 as it's an 8bit value?
Correct.

Great to see you have this working, and diving in making changes to suit your needs.

Dave
User avatar
Tom swift
Posts: 49
Joined: Wed Jun 12, 2019 8:58 am
Contact:

Re: ICE T65/Z80/6809

Post by Tom swift »

Say... I like the snazzy register and flags view on stepping. Great stuff!

Oh, I wanted to ask about the CRC function. How is that calculated?

Thanks,
Tom
Last edited by Tom swift on Wed Aug 11, 2021 8:41 pm, edited 1 time in total.
User avatar
hoglet
Posts: 12666
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: ICE T65/Z80/6809

Post by hoglet »

Tom swift wrote: Tue Aug 10, 2021 11:26 pm Oh, I wanted ask about the CRC function. How is that calculated?
For historic reasons, it actually uses the Atom CRC, fron Chapter 13 of Atomic Theory and Practice, which is a 16-bit CRC:

Code: Select all

    1 REM CRC Signature
   10 INPUT "PROM ADDRESS", P
   20 C=0;Z=#FFFF;Y=#2D
   30 FOR Q=0 TO #FFF
   35 A=P?Q
   40 FOR B=1 TO 8
   60 C=C*2+A&1;A=A/2;IFC>Z C=C:Y;C=C&Z
   80 NEXT B; NEXT Q
  110 PRINT "SIGNATURE IS" &C'
  120 END
This is actually fairly non-standard.

I just reimplemented it in C:

Code: Select all

  for (i = start; i <= end; i++) {
    data = readMemByteInc();
    for (j = 0; j < 8; j++) {
      crc = crc << 1;
      crc = crc | (data & 1);
      data >>= 1;
      if (crc & 0x10000)
        crc = (crc ^ CRC_POLY) & 0xFFFF;
    }
  }
There is a standalone C implementation here:
https://github.com/hoglet67/AtomSoftwar ... 16/crc16.c

Dave
cyberbarter
Posts: 14
Joined: Wed Aug 18, 2021 7:42 pm
Contact:

Re: ICE T65/Z80/6809

Post by cyberbarter »

Hi there.

I have all the parts on order for the 6502 ICE. I am stuck on which Xilinx programmer to purchase.
Need help selecting the correct cables and programmer for the Xilinx XC6SLX9 Mini Board.

Unfortunately the below GitHub recommended Xilinx Programming Cable source does not ship to the USA and I can't read the model # from the ebay pictures.
Xilinx USB Platform Cable Clone (eBay seller t-mall2013, price ~£20)
https://www.ebay.co.uk/itm/Xilinx-Platf ... 1641090853

Can someone recommend an alternate source that has all the required cables, programmer and required adapters?
Does anybody know if the below ebay offering will work with the XC6SLX9?
https://www.ebay.com/itm/152202904107?h ... Sw7AFb2SnG

Any help would be most appreciated.

Thanks much.
User avatar
hoglet
Posts: 12666
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: ICE T65/Z80/6809

Post by hoglet »

cyberbarter wrote: Wed Sep 08, 2021 2:42 am Does anybody know if the below ebay offering will work with the XC6SLX9?
https://www.ebay.com/itm/152202904107?h ... Sw7AFb2SnG
According to the listing it should. But you are buying a cloned piece of hardware from China, that is being sold for <10% of the price that Xilinx would sell it for. So there is a certain element of risk involved!

It is also possible to program the FPGA board from a Raspberry Pi using OpenOCD. I wrote some notes on that here:
https://github.com/hoglet67/Beeb1MHzBus ... CD-on-a-Pi

Dave
bprosman
Posts: 484
Joined: Sun Mar 29, 2015 11:27 pm
Contact:

Re: ICE T65/Z80/6809

Post by bprosman »

Code: Select all

According to the listing it should. But you are buying a cloned piece of hardware from China, that is being sold for <10% of the price that Xilinx would sell it for. So there is a certain element of risk involved!
Until now (I have bought 2 in the past) Chinese Clones worked for me (even under Windows 10).
But a rPi could be a solution as well. I see Dave's posting using a version 1B, in Holland on "Marktplaats" (sort Dutch version of Craigslist) you can obtain those for $10..15.
User avatar
daveejhitchins
Posts: 7878
Joined: Wed Jun 13, 2012 6:23 pm
Location: Newton Aycliffe, County Durham
Contact:

Re: ICE T65/Z80/6809

Post by daveejhitchins »

cyberbarter wrote: Wed Sep 08, 2021 2:42 am Does anybody know if the below ebay offering will work with the XC6SLX9?
https://www.ebay.com/itm/152202904107?h ... Sw7AFb2SnG
I have two of these boxes - one working and one not - Still haven't opened it up to have a gander!

Dave H.
Available: ARA II : ARA III-JR/PR : ABR : AP5 : AP6 : ABE : ATI : MGC : Plus 1 Support ROM : Plus 3 2nd DA : Prime's Plus 3 ROM/RAM : Pegasus 400 : Prime's MRB : ARCIN32 : Cross-32
cyberbarter
Posts: 14
Joined: Wed Aug 18, 2021 7:42 pm
Contact:

Re: ICE T65/Z80/6809

Post by cyberbarter »

hoglet wrote: Wed Sep 08, 2021 7:28 am
cyberbarter wrote: Wed Sep 08, 2021 2:42 am Does anybody know if the below ebay offering will work with the XC6SLX9?
https://www.ebay.com/itm/152202904107?h ... Sw7AFb2SnG
According to the listing it should. But you are buying a cloned piece of hardware from China, that is being sold for <10% of the price that Xilinx would sell it for. So there is a certain element of risk involved!

It is also possible to program the FPGA board from a Raspberry Pi using OpenOCD. I wrote some notes on that here:
https://github.com/hoglet67/Beeb1MHzBus ... CD-on-a-Pi

Dave
Thanks Dave for the Raspberry Pi and OpenOCD idea. I have yet to work with a Rasberry Pi and I look forward to the challenge. This seems less risky then a China Xilinx clone and the required 8G iMPACT programming app. I can also use the Pi for other projects if needed. I have already ordered the Pi 1 B+.
cyberbarter
Posts: 14
Joined: Wed Aug 18, 2021 7:42 pm
Contact:

Re: ICE T65/Z80/6809

Post by cyberbarter »

Hi ICE Friends

Some help would be a welcomed.

I am getting errors with OpenOCD on a Raspberry Pi 1B+ when flashing new EEPIZZAs

I am hoping you can point me in the right direction. I am using a raspberry Pi 1B+ with 2020-02-13-raspbian-buster-full.img loaded. I am using recently purchased EEPIZZAs.

I’m using the examples from
https://github.com/hoglet67/Beeb1MHzBus ... CD-on-a-Pi

Example 1: Programming a .bit file into FPGA "ram" works with no issues.

Example 2: Programming a .bin file into FLASH fails on multiple EEPIZZAs on the last step.

I’m getting the known error of:
“If you get the following error, then you have a mismatch between openocd and the bscan file.
Error: Unknown flash device (ID 0x00ffffff)”

Below is the final step example output that fails with the above error.

pi@raspberrypi:~ $ sudo openocd -f local.cfg -f /usr/share/openocd/scripts/interface/raspberrypi-native.cfg -f /usr/share/openocd/scripts/cpld/xilinx-xc6s.cfg -f /usr/share/openocd/scripts/cpld/jtagspi.cfg -c "init; jtagspi_init 0 bscan_spi_xc6slx9.bit; jtagspi_program frame_buffer.bin 0; xc6s_program xc6s.tap; shutdown"

Open On-Chip Debugger 0.10.0+dev-00114-g41bcbc67d-dirty (2021-01-18-16:43)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 250 kHz

Warn : Interface already configured, ignoring
BCM2835 GPIO nums: swclk = 11, swdio = 25

Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
xc6s_print_dna
jtagspi_program
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : clock speed 250 kHz
Info : JTAG tap: xc6s.tap tap/device found: 0x24001093 (mfg: 0x049 (Xilinx), part: 0x4001, ver: 0x2)
Info : JTAG tap: xc6s.tap tap/device found: 0x24001093 (mfg: 0x049 (Xilinx), part: 0x4001, ver: 0x2)
Error: Unknown flash device (ID 0x00ffffff)

IMPORTANT DIFFERENCE. In the example script it reports a 'win w25q32fv' flash device found on the EEPIZZA.

My EEPIZZAs have a winbond 25Q32BVSIG flash device and I believe that that the combination of bscan_spi_xc6slx9.bit and the newer EEPIZZA flash device is possibly what is causing the issue.


Any ideas would be welcome.

Much thanks Cyberbarter
User avatar
hoglet
Posts: 12666
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: ICE T65/Z80/6809

Post by hoglet »

cyberbarter wrote: Tue Sep 21, 2021 5:36 am Much thanks Cyberbarter
I don't think the problem is the FLASH chip: the 25Q32BV actually has the same manufacturer/device ID as 25Q32FV (0x001640ef)

I think the problem is the version of OpenOCD you are using is a very recent "dev" version

Code: Select all

0.10.0+dev-00114-g41bcbc67d-dirty (2021-01-18-16:43)
and this version needs a different bscan file from the version I linked in the Wiki, and a different local.cfg file.

I was using an older stable version of OpenOCD:

Code: Select all

0.10.0-5
this needs a bscan flle from the "single tap" branch:
https://github.com/quartiq/bscan_spi_bi ... c6slx9.bit

The newer versions of OpenOCD need bscan flles from the "master" branch
https://github.com/quartiq/bscan_spi_bi ... c6slx9.bit

(It's a shame they don't include bscan files in the OpenOCD distribution, then you won't not get this kind of mismatch)

I think you have two options:

1. Use the same version of OpenOCD that I did.

The apt repositories still have the older stable version:

Code: Select all

$ apt-cache madison openocd
   openocd | 0.10.0+g20201014-1~bpo10+1~rpt2 | http://archive.raspberrypi.org/debian buster/main armhf Packages
   openocd |   0.10.0-5 | http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
You can switch to this version with:

Code: Select all

$ sudo apt-get install openocd=0.10.0-5
2. Use later version of OpenOCD and the bscan file from the "master" branch:
https://github.com/quartiq/bscan_spi_bi ... c6slx9.bit

I just tested this and I get further, but then I get a FLASH Write Error, or a readback failure. This was fixed by reducing the adapter clock speed from 250KHz to 200KHz.

I ended up with local.cfg containing just:

Code: Select all

adapter speed 200
Let us know how you get on.

I've amended the instructions on the Wiki to make sure the 0.10.0-5 version is used by default. I've also added some notes for using later versions:
https://github.com/hoglet67/Beeb1MHzBus ... of-openocd

I've also just added a commit to the dev branch that produces the required .bin files for Pi-based programming:
https://github.com/hoglet67/AtomBusMon/commits/dev

There is a new release containing the .bin files here:
https://github.com/hoglet67/AtomBusMon/ ... /release_5

Dave
cyberbarter
Posts: 14
Joined: Wed Aug 18, 2021 7:42 pm
Contact:

Re: ICE T65/Z80/6809

Post by cyberbarter »

Hi Dave

Thanks for your help. the Pi programming works fine.
I can program the EEPIZZA without the headaches of the Xilinx IDE/iMPACT using the binaries from your site.
No 8GByte downloads, IDE installs, compiles etc.

Here is what I did:

(1) I stayed with the newer dev branch of OpenOCD
(2) I stayed with adapter speed 250 in my local.cfg (Maybe your cable is wonky)
(3) I used the bscan file from the master branch

Next steps:

(4) Uncle Amazon just sent me a RaspberryPi 4B 8Gig. I am want to get it up and running cause the RPi 1B is Slooooooooow
(5) Get everything working on the RPi 4 using ICE T65/Z80/6809 .bit and .bin files instead of the Frame_Buffer .bit and .bin files.
(6) When the Level converters get here I will build the CPU specific level adapters starting with the ICE T65.
(7) I will have some fun testing the ICE T65 on my Apple 1 repro, Apple II+ and Commodore 1541 disk drive.
(8) Start a deep dive into FPGA development using the Xilinx 14.7 IDE and iMPACT.

If you are interested I have attached a .pdf of the Pi 1B to EEPIZZA connections. Feel free to use it if you would like.

Your efforts are very much appreciated.

Much thanks

Cyberbarter
Attachments
EEPIZZA JTAG to Raspberrypi GPIO Connections for OpenOCD programming v2.pdf
(193.99 KiB) Downloaded 49 times
Last edited by cyberbarter on Tue Sep 21, 2021 6:20 pm, edited 1 time in total.
User avatar
hoglet
Posts: 12666
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: ICE T65/Z80/6809

Post by hoglet »

cyberbarter wrote: Tue Sep 21, 2021 5:13 pm If you are interested I have attached a .pdf of the Pi 1B to EEPIZZA connections. Feel free to use it if you would like.
Thanks, I'll add a PNG version to the WIki.
cyberbarter
Posts: 14
Joined: Wed Aug 18, 2021 7:42 pm
Contact:

Re: ICE T65/Z80/6809

Post by cyberbarter »

Hi Dave

You mentioned in the thread viewtopic.php?p=251712#p251712 that you would be providing binaries.

I am looking for the individual binaries for the T65, 65c02, Z80, 6809E cores and the combined multi boot binaries as well.
I would like the required .bin and .bit files so that I can use the Raspberry Pi 1B to FLASH my EEPIZZA PCBs.

Do these .bin and .bit files exist. I have searched the github AtomBusMon tree and can not locate any of the binaries.

I would like to get the ICE devices up and running without having to compile and make binaries in the Xilinx ISE WebPack version 14.7 environment.
In other words, I am being lazy and want to start using the EEPIZZA & individual level translator boards ASAP. :wink:

Any help would be most appreciated.

Much thanks.

Cyberbarter
User avatar
hoglet
Posts: 12666
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: ICE T65/Z80/6809

Post by hoglet »

cyberbarter wrote: Sat Sep 25, 2021 3:51 am Do these .bin and .bit files exist. I have searched the github AtomBusMon tree and can not locate any of the binaries.
They are already available on the releases section of github:
https://github.com/hoglet67/AtomBusMon/releases

The file ice_20210921_1232_0994.zip contains releases for all targets.

I updated this a few days ago to include the .bin format (for Pi based programming) as well as the .mcs format (for iMPACT programming).

Dave
cyberbarter
Posts: 14
Joined: Wed Aug 18, 2021 7:42 pm
Contact:

Re: ICE T65/Z80/6809

Post by cyberbarter »

hoglet wrote: Sat Sep 25, 2021 6:53 am
cyberbarter wrote: Sat Sep 25, 2021 3:51 am Do these .bin and .bit files exist. I have searched the github AtomBusMon tree and can not locate any of the binaries.
They are already available on the releases section of github:
https://github.com/hoglet67/AtomBusMon/releases

The file ice_20210921_1232_0994.zip contains releases for all targets.

I updated this a few days ago to include the .bin format (for Pi based programming) as well as the .mcs format (for iMPACT programming).

Dave

Thank you so much for doing this kind person.

Do you take donations. I very much would like to reward you for your efforts.

Much thanks!!!!

Cyberbarter
Post Reply

Return to “acorn atom and acorn system series”