ICE T65/Z80/6809

emulators, hardware and classic software for atom + system machines
User avatar
hoglet
Posts: 9390
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: ICE T65/Z80/6809

Post by hoglet » Sun Nov 17, 2019 12:18 pm

bprosman wrote:
Sun Nov 17, 2019 12:09 pm
What Unix/Linux version do you use yourself ?
I'm currently using Ubuntu 18.04.3 LTS

I tend to only update when there is a new LTS (long term support) version available, which is every two years in April.

Dave

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

Re: ICE T65/Z80/6809

Post by bprosman » Sun Nov 17, 2019 12:28 pm

You're a star with much better Google skills than I have =D>
I Set the Cygwin environment to Windows 7 compatibility mode and that did the trick :D :D

gob33
Posts: 69
Joined: Thu Jun 02, 2016 11:15 am
Contact:

Re: ICE T65/Z80/6809

Post by gob33 » Mon Nov 18, 2019 5:02 pm

I'm currently using Ubuntu 18.04.3 LTS
You should try MX Linux 19 which is a pleasure to use (high stability, easy learning curve, good looks).

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

Re: ICE T65/Z80/6809

Post by bprosman » Mon Nov 18, 2019 5:52 pm

Does Xilinx ISE 14.7 work with that ?

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

Re: ICE T65/Z80/6809

Post by hoglet » Mon Nov 18, 2019 7:12 pm

Back on the 6502 front....

This afternoon I attacked my Master with the Duratool desoldering station and fitted a IC socket for the G65SC12 processor:
IMG_1814.JPG
Which means I can now do this:
IMG_1815.JPG
Only it didn't work....

It turns out that the G65SC12 is a little wierd, because pin 36 is DBE (Data Bus Enable, affecting just the data bus), where as I current have pin 36 implementing BE (Bus Enable, affecting the address bus and RnW outputs as well).

And after a small change to the VHDL, it works nicely:

Code: Select all

ICE-65C02 In-Circuit Emulator version 0.981
Compiled at 17:53:39 on Nov 18 2019
8 watches/breakpoints implemented
Tracing every 1 instructions while single stepping
CPU free running...
Interrupted
07.749510 : EAC6 : B0 60    : BCS $EB28
>> m ff00
FF00 20 51 FF 20 51 FF 20 51 FF 20 51 FF 20 51 FF 20   Q. Q. Q. Q. Q. 
FF10 51 FF 20 51 FF 20 51 FF 20 51 FF 20 51 FF 20 51  Q. Q. Q. Q. Q. Q
FF20 FF 20 51 FF 20 51 FF 20 51 FF 20 51 FF 20 51 FF  . Q. Q. Q. Q. Q.
FF30 20 51 FF 20 51 FF 20 51 FF 20 51 FF 20 51 FF 20   Q. Q. Q. Q. Q. 
FF40 51 FF 20 51 FF 20 51 FF 20 51 FF 20 51 FF 20 51  Q. Q. Q. Q. Q. Q
FF50 FF 48 48 48 48 48 48 08 48 DA 5A BA A9 FF 9D 08  .HHHHHH.H.Z.....
FF60 01 A9 8C 9D 07 01 BC 0B 01 B9 9D 0D 9D 05 01 B9  ................
FF70 9E 0D 9D 06 01 A5 F4 9D 0A 01 AD 34 FE 9D 09 01  ...........4....
FF80 20 BA ED B9 9F 0D 20 92 E5 7A FA 68 40 08 48 DA   ..... ..z.h@.H.
FF90 BA BD 02 01 9D 06 01 BD 03 01 9D 07 01 FA 68 68  ..............hh
FFA0 68 20 B0 ED 68 20 92 E5 68 28 60 BC 00 FE 60 8A  h ..h ..h(`...`.
FFB0 80 22 00 4C 02 F4 36 D7 E2 4C FC F3 4C EC F3 4C  .".L..6..L..L..L
FFC0 28 EA 4C 6E F2 4C 7F F2 4C BC E7 4C 22 E8 4C 1B  (.Ln.L..L..L".L.
FFD0 FA 4C BE F9 4C B2 F9 4C B8 F9 4C E7 F9 4C 2A FA  .L..L..L..L..L*.
FFE0 6C 10 02 C9 0D D0 07 A9 0A 20 EE FF A9 0D 6C 0E  l........ ....l.
FFF0 02 6C 0C 02 6C 0A 02 6C 08 02 00 0D 64 E3 9E E5  .l..l..l....d...
>> break e364
Ex Brkpt set at E364
>> c
CPU free running...
Ex Brkpt hit at E364
Interrupted
00.000003 : E364 : A9 40    : LDA #$40
>> s 10
Stepping 10 instructions
00.000005 : E366 : 8D 00 0D : STA $0D00
00.000009 : E369 : 78       : SEI 
00.000011 : E36A : A9 53    : LDA #$53
00.000013 : E36C : 8D 8E FE : STA $FE8E
00.000018 : E36F : 20 90 E5 : JSR $E590
00.000024 : E590 : A9 0F    : LDA #$0F
00.000026 : E592 : 85 F4    : STA $F4
00.000029 : E594 : 8D 30 FE : STA $FE30
00.000033 : E597 : 60       : RTS 
00.000039 : E372 : 4C 20 80 : JMP $8020
>> test 0 7fff
Memory test: Fixed 55: passed
Memory test: Fixed AA: passed
Memory test: Fixed FF: passed
Memory test: Fixed 00: passed
Memory test: Checkerboard: passed
Memory test: Inverse checkerboard: passed
Memory test: Address pattern: passed
Memory test: Inverse address pattern: passed
Memory test: Random: passed
Memory test: Random: passed
Memory test: Random: passed
This is a good test of the recently added RDY functionality, because RDY is used on the Master to implement the 1MHz slow down.

The only strange behaviour I have noticed is very occasional screen noise. It's not that obvious, but it does suggest the timing might be off slightly. Or else the FPGA board is electrically more noisy (it uses fast-edged level shifers) than the original processor, and this is getting coupled into the video circuitry. I'm not overly concerned, as this is a debugging tool, not a production system.

I still need to decide how best to handle differences between 65C02 varients, like BE vs DBE. As there are no spare jumpers on the adapter board, I might have to make use of the extra header on the FPGA board itself.

Dave

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

Re: ICE T65/Z80/6809

Post by bprosman » Thu Nov 21, 2019 9:35 pm

Hi Dave,

What AVR package do you use under Ubuntu for building the images ?

Kind regards, Bram

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

Re: ICE T65/Z80/6809

Post by hoglet » Thu Nov 21, 2019 9:58 pm

bprosman wrote:
Thu Nov 21, 2019 9:35 pm
What AVR package do you use under Ubuntu for building the images ?
These are the packages I currently have installed:

Code: Select all

dmb@quadhog:~$ dpkg -l | grep avr
ii  avr-libc                                   1:2.0.0+Atmel3.6.0-1                        all          Standard C library for Atmel AVR development
ii  binutils-avr                               2.26.20160125+Atmel3.6.0-1                  amd64        Binary utilities supporting Atmel's AVR targets
ii  gcc-avr                                    1:5.4.0+Atmel3.6.0-1build1                  amd64        GNU C compiler (cross compiler for avr)
The version is 5.4.0:

Code: Select all

dmb@quadhog:~$ avr-gcc -v
Using built-in specs.
Reading specs from /usr/lib/gcc/avr/5.4.0/device-specs/specs-avr2
COLLECT_GCC=avr-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/avr/5.4.0/lto-wrapper
Target: avr
Configured with: ../gcc/configure -v --enable-languages=c,c++ --prefix=/usr/lib --infodir=/usr/share/info --mandir=/usr/share/man --bindir=/usr/bin --libexecdir=/usr/lib --libdir=/usr/lib --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-libssp --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=avr CFLAGS='-g -O2 -fdebug-prefix-map=/build/gcc-avr-n0nSsH/gcc-avr-5.4.0+Atmel3.6.0=. -fstack-protector-strong -Wformat ' CPPFLAGS='-Wdate-time -D_FORTIFY_SOURCE=2' CXXFLAGS='-g -O2 -fdebug-prefix-map=/build/gcc-avr-n0nSsH/gcc-avr-5.4.0+Atmel3.6.0=. -fstack-protector-strong -Wformat ' FCFLAGS='-g -O2 -fdebug-prefix-map=/build/gcc-avr-n0nSsH/gcc-avr-5.4.0+Atmel3.6.0=. -fstack-protector-strong' FFLAGS='-g -O2 -fdebug-prefix-map=/build/gcc-avr-n0nSsH/gcc-avr-5.4.0+Atmel3.6.0=. -fstack-protector-strong' GCJFLAGS='-g -O2 -fdebug-prefix-map=/build/gcc-avr-n0nSsH/gcc-avr-5.4.0+Atmel3.6.0=. -fstack-protector-strong' LDFLAGS='-Wl,-Bsymbolic-functions -Wl,-z,relro' OBJCFLAGS='-g -O2 -fdebug-prefix-map=/build/gcc-avr-n0nSsH/gcc-avr-5.4.0+Atmel3.6.0=. -fstack-protector-strong -Wformat ' OBJCXXFLAGS='-g -O2 -fdebug-prefix-map=/build/gcc-avr-n0nSsH/gcc-avr-5.4.0+Atmel3.6.0=. -fstack-protector-strong -Wformat '
Thread model: single
gcc version 5.4.0 (GCC) 
Are you having problems rebuilding?

Dave

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

Re: ICE T65/Z80/6809

Post by bprosman » Thu Nov 21, 2019 10:02 pm

It works for me on Windows 10 now with some manual interventions.
So wanted to try to setup an Ubuntu VM to make it more seamless.
But in the end I can rebuild.

Kind regards, Bram

obiwanjacobi
Posts: 37
Joined: Mon Oct 21, 2019 10:43 am
Location: Netherlands
Contact:

Re: ICE T65/Z80/6809

Post by obiwanjacobi » Fri Nov 22, 2019 6:26 am

bprosman wrote:
Thu Nov 21, 2019 10:02 pm
It works for me on Windows 10 now with some manual interventions.
So wanted to try to setup an Ubuntu VM to make it more seamless.
But in the end I can rebuild.
Perhaps a good idea to document those manual steps (in the wiki)?

Also, you might want to try the Windows Subsystem for Linux (WSL). With this you can start a Linux terminal session as if starting a Windows app. Your Windows file system is mounted inside Linux. I really like it. Also Visual Studio Code has an extension that you can use to remote into the Linux session. [2c]

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

Re: ICE T65/Z80/6809

Post by bprosman » Fri Nov 22, 2019 12:02 pm

Almost there :-)
Maybe another stupid question but how do I "Git Clone" the DEV branch as I seem to get the "production one" .

//Update: Found it -> -b dev

// All done :-)

Kind regards, Bram

janniz
Posts: 2
Joined: Sun Dec 08, 2019 9:22 am
Contact:

Re: ICE T65/Z80/6809

Post by janniz » Sun Dec 08, 2019 1:35 pm

@hoglet:
I can't sent DMs so I'm trying to contact you here in the forum...

I'm really interested in this ICE project and I think it could be really useful in the arcade pcb board repair field.

Do you have some assembled adapters ready to buy? Or, at least, raw PCBs that I can assemble myself?

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

Re: ICE T65/Z80/6809

Post by hoglet » Sun Dec 08, 2019 1:51 pm

janniz wrote:
Sun Dec 08, 2019 1:35 pm
Do you have some assembled adapters ready to buy? Or, at least, raw PCBs that I can assemble myself?
I just have the bare PCBs available.

I'll PM you my email address.

regards

Dave

JannievanZyl
Posts: 221
Joined: Sat Feb 11, 2017 8:56 pm
Location: Cape Town, South Africa
Contact:

Re: ICE T65/Z80/6809

Post by JannievanZyl » Thu Jan 02, 2020 2:17 pm

Dave, just to confirm what is needed to get going, this is my understanding of what I need;

1. Xilinx XC6SLX9 Mini Board
-- Is this still the recommended board? (I know there were a story wit level converters, etc.) - https://www.ebay.co.uk/itm/Xilinx-FPGA- ... 1640406811

2. Do I need a programming interface for the above board? (The GODIL required one) and, if so, which one?
-- Something likev this? - https://www.ebay.com/itm/Xilinx-Platfor ... 2202904107

3. Then I just need one of your adapter boards, per CPU type, right?

4. Everything else (software, etc.) is online, correct?

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

Re: ICE T65/Z80/6809

Post by hoglet » Thu Jan 02, 2020 6:55 pm

JannievanZyl wrote:
Thu Jan 02, 2020 2:17 pm
1. Xilinx XC6SLX9 Mini Board
-- Is this still the recommended board? (I know there were a story wit level converters, etc.) - https://www.ebay.co.uk/itm/Xilinx-FPGA- ... 1640406811
Yes.
JannievanZyl wrote:
Thu Jan 02, 2020 2:17 pm
2. Do I need a programming interface for the above board? (The GODIL required one) and, if so, which one?
-- Something likev this? - https://www.ebay.com/itm/Xilinx-Platfor ... 2202904107
Yes.
JannievanZyl wrote:
Thu Jan 02, 2020 2:17 pm
3. Then I just need one of your adapter boards, per CPU type, right?
Yes.
JannievanZyl wrote:
Thu Jan 02, 2020 2:17 pm
4. Everything else (software, etc.) is online, correct?
Yes.

:D

Dave

JannievanZyl
Posts: 221
Joined: Sat Feb 11, 2017 8:56 pm
Location: Cape Town, South Africa
Contact:

Re: ICE T65/Z80/6809

Post by JannievanZyl » Fri Jan 03, 2020 10:07 pm

Perfect!!

On it! :D

JannievanZyl
Posts: 221
Joined: Sat Feb 11, 2017 8:56 pm
Location: Cape Town, South Africa
Contact:

Re: ICE T65/Z80/6809

Post by JannievanZyl » Sun Jan 05, 2020 1:46 pm

Sorry Dave, one last question :)

I see the gerbers on github are v1 and are a few months old (Sep for Z80 and Oct for 6502).

These are the correct ones still, no new updates as per the development you've done since then?

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

Re: ICE T65/Z80/6809

Post by bprosman » Sun Jan 05, 2020 1:49 pm


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

Re: ICE T65/Z80/6809

Post by hoglet » Sun Jan 05, 2020 1:53 pm

JannievanZyl wrote:
Sun Jan 05, 2020 1:46 pm
These are the correct ones still, no new updates as per the development you've done since then?
As Bram says, all recent development has been in the dev branch:
https://github.com/hoglet67/AtomBusMon/tree/dev

The links on the Wiki (for the schematics, gerbers etc) should all point into the dev branch.

(If they don't let me know and I'll fix them)

Dave

JannievanZyl
Posts: 221
Joined: Sat Feb 11, 2017 8:56 pm
Location: Cape Town, South Africa
Contact:

Re: ICE T65/Z80/6809

Post by JannievanZyl » Sun Jan 05, 2020 4:42 pm

It looks like the wiki does pooint to the /dev tree.

What confused me (methinks) is that I expected a V1.1 for Z80 but it looks like only the 65c02 is on V1.1, the Z80 and 6809 are still on V1.0, correct?

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

Re: ICE T65/Z80/6809

Post by hoglet » Sun Jan 05, 2020 4:48 pm

JannievanZyl wrote:
Sun Jan 05, 2020 4:42 pm
It looks like the wiki does pooint to the /dev tree.

What confused me (methinks) is that I expected a V1.1 for Z80 but it looks like only the 65c02 is on V1.1, the Z80 and 6809 are still on V1.0, correct?
Yes, that's correct.

The V1.1 change for the 6502 was just to add pads for a few optional weak pullup resistors on some control signals.

This helps on the Beeb, for example, which lets the Rdy input (pin 2) just float.

Dave

obiwanjacobi
Posts: 37
Joined: Mon Oct 21, 2019 10:43 am
Location: Netherlands
Contact:

Re: ICE T65/Z80/6809

Post by obiwanjacobi » Thu Jan 16, 2020 7:24 am

Yeah! I finally got my Spartan6 board. Looks very nice.
I just wanted some pointers on how to get the FPGA programmed.

What I could figure out is that I need ISE 4.7 because that supports the Spartan6. I have that running on my machine now.
Then I think I need the "Impact" program to program it..? Not sure about the options I see there.
And does the Spartan6 board have an on-board programmer? Can I use the USB for data as well (besides powering the board)?
Or do I need the JTAG programmer?

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

Re: ICE T65/Z80/6809

Post by bprosman » Thu Jan 16, 2020 7:58 am

If you have the "EEPizza" board (still got one in transit myself) you need ISE 14.7 (you mentioned 4.7 but that can be a typo) , do you run it on Windows or Linux ?
And you do need a programmer like this :
https://www.ebay.com/itm/Xilinx-Platfor ... SwzbxaWMag

obiwanjacobi
Posts: 37
Joined: Mon Oct 21, 2019 10:43 am
Location: Netherlands
Contact:

Re: ICE T65/Z80/6809

Post by obiwanjacobi » Thu Jan 16, 2020 8:05 am

Right, that should be 14.7 indeed and I run on Windows (tried Linux too but that crashed) - and yes it is the EEPizza board.
I have that programmer as well - so that means the USB on the EEPizza board is for power only?

Any hints on how to use the software?

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

Re: ICE T65/Z80/6809

Post by bprosman » Thu Jan 16, 2020 8:16 am

Do you want to compile yourself or just program Dave's "images" ? , in that case you can just start "Impact".

obiwanjacobi
Posts: 37
Joined: Mon Oct 21, 2019 10:43 am
Location: Netherlands
Contact:

Re: ICE T65/Z80/6809

Post by obiwanjacobi » Thu Jan 16, 2020 8:24 am

I just want to use the images/binaries from the github release.

Changing his code and programming that comes much later :lol:

The first look at Impact was pretty .... daunting...

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

Re: ICE T65/Z80/6809

Post by hoglet » Thu Jan 16, 2020 8:35 am

obiwanjacobi wrote:
Thu Jan 16, 2020 8:05 am
Right, that should be 14.7 indeed and I run on Windows (tried Linux too but that crashed) - and yes it is the EEPizza board.
I have that programmer as well - so that means the USB on the EEPizza board is for power only?

Any hints on how to use the software?
Normally the biggest hurdle is installing the ISE software on Windows, particularly Windows 10, as this is largely unsupported by Xilinx.

Andy wrote some of the additional steps down here:
viewtopic.php?f=44&t=11373&p=239080&hil ... ll#p239080

You do need to use iMPACT, as that's the programming software. You don't need the rest of ISE.

There is a guide to using iMPACT on the Wiki, that now includes info on the EEPIZZA board (it used to be GODIL specific)
https://github.com/hoglet67/AtomBusMon/ ... -in-iMPACT

There are just three differences with the EEPIZZA board:
- you need to choose the W25Q32BV EEPROM type
- the .mcs file is ice_20191215_1612_0981/lx9_dave/icemulti/icemulti.mcs
- programming will take ~5 minutes, as this is a multi boot design so much bigger

This is contained in the release package here:
https://github.com/hoglet67/AtomBusMon/ ... /release_2

Oh, and the USB in the eepizza board is:
- for power when programming (program without the adapter board attached)
- for serial comms when using the system

Dave
Last edited by hoglet on Thu Jan 16, 2020 9:18 am, edited 1 time in total.

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

Re: ICE T65/Z80/6809

Post by bprosman » Thu Jan 16, 2020 8:57 am

Normally the biggest hurdle is installing the ISE software on Windows, particularly Windows 10, as this is largely unsupported by Xilinx.
Windows 10 , 1903 is doing a lot better.
Also with driver support.

If you want to compile your own later on let me know, I got it to work under Windows 10. It needs some slight modification of the "Make" files.

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

Re: ICE T65/Z80/6809

Post by hoglet » Thu Jan 16, 2020 9:16 am

I've done a quick pass over the programming page on the Wiki.

It now includes the information for the EEPIZZA board and has been renamed to reflect this:
https://github.com/hoglet67/AtomBusMon/ ... -in-iMPACT

obiwanjacobi
Posts: 37
Joined: Mon Oct 21, 2019 10:43 am
Location: Netherlands
Contact:

Re: ICE T65/Z80/6809

Post by obiwanjacobi » Thu Jan 16, 2020 6:35 pm

Totally worked. Thank you very much.
Had no troubles with Windows. You get a Linux VM that contains the Xilinx programs and can point to a share folder for host file transfer.

I programmed the 'Dave' board for the Z80 - figured this would be the one having gotten the adapter board from Dave...
Now it's off to build the adapter board. Lucky me - I have a Farnell account :D

Only thing is that the Serial COMs with the FPGA gives garbage at 57,600 (8N1)...
EDIT: got it on 115200 (8N1)

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

Re: ICE T65/Z80/6809

Post by bprosman » Thu Jan 16, 2020 6:43 pm

Had no troubles with Windows. You get a Linux VM that contains the Xilinx programs and can point to a share folder for host file transfer.
Actually that VM gave me issues :-) Got it "Native" working on Windows 10/1903

Post Reply

Return to “acorn atom and acorn system series”