MiSTer: I want to try to use A-Z80 core as a replacement of T80 core

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, spiny, Greenious, Sorgelig, Moderator Team

hlide
Retro freak
Retro freak
Posts: 13
Joined: Sun Nov 05, 2017 8:06 pm

MiSTer: I want to try to use A-Z80 core as a replacement of T80 core

Postby hlide » Sun May 27, 2018 9:35 pm

Now that I can build the existing cores, I was trying to see if I could replace a T80 core with an A-Z80 core which is a "replica" of a genuine Z80 with accurate cycles (recreation of the circuit of a decapped Z80) as an exercise and see whether it may be worthwhile. After I was able to compile an A-Z80 demo, I decided to replace the T80 with the A-Z80 in the Aquarius core but I noticed there are some differences in the input/output pins of T80 which are not compliant with the pins of a genuine Z80 (A-Z80 being compliant). For instance, T80 has separate D bus for input and output. Signals like /halt are also missing in the T80. Would it be difficult to tweak signals so an A-Z80 can be properly connected to the Aquarius signals?

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2387
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MiSTer: I want to try to use A-Z80 core as a replacement of T80 core

Postby Sorgelig » Mon May 28, 2018 12:54 am

a-z80 is NOT a replica. It was build with help of some reverse engineering, but it's not 1:1. It has many problems with different commands not properly implemented like INIR, OTIR and some other problems. Author of A-Z80 has mo much willing to improve the core.
I've started to develop my ZX core around A-Z80 and after numerous problems i've switched to T80. Although T80 is not a replica but functional analog, today it's a closest to real Z80 implementation with all undocumented instructions correctly implemented.

T80 can be swapped to A-Z80 and vice versa. Splitting bi-directional bus in FPGA module is a common thing - it doesn't brake compatibility and simplify the code. HALT is present on T80. Timings on T80 and A-Z80 a little different. My ZX core compensates small timing deviation of T80 so the result will match real ZX Spectrum.

Good luck with experiments :)

hlide
Retro freak
Retro freak
Posts: 13
Joined: Sun Nov 05, 2017 8:06 pm

Re: MiSTer: I want to try to use A-Z80 core as a replacement of T80 core

Postby hlide » Mon May 28, 2018 9:49 am

Fine, I will drop A-Z80 as it seems you already tried to experiment with it and it sounds it was more problematic than useful in the end.

I'm thinking to start with an MZ-80 K implementation (I have this retro computer - the first I had at eleven, so quite nostalgic about it). I could find some implementations - one for MiST but apparently not fully functional and another implementation on DE1 which appears to recreate the MZ-80 series (MZ-80 K, MZ-80 C/MZ-80 A/MZ-1200 - textual screen 40x25, all monochrome and relying on MZASCII is a similar fashion than PETASCII) - and also contains some third parties extensions (80x25 extension, PCG for programmable characters, color addition, etc.). I think Aquarius seems the closest in the architecture (at least, with MZ-700 which is another implementation I'd like to do in a second step and which is retro-compatible with MZ-80 K) but I maybe need to look at ZX Spectrum. Do you think there is some simple architecture using a Z80 running at 2Mhz which is the normal frequency used by the MZ-80 series I cited above? It was a very long time I learned VHDL but I didn't have the chance to write VHDL code on an FPGA due to their prices at that time so my VHDL becomes very rusty.

I was hoping to make a "replica" of the MZ-80 K with all the IC present on the motherboard also present in the source - that explains I wanted to use A-Z80 but, well, you convinced me it was not a good move.

Thanks.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2387
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MiSTer: I want to try to use A-Z80 core as a replacement of T80 core

Postby Sorgelig » Mon May 28, 2018 10:23 am

I think MZ series aren't so sensitive to precise timings as ZX. Even in ZX core precise timings are required mostly for demos - otherwise it's hard to notice.
So, you won't see the difference between different Z80 implementations. Almost every core requiring Z80 uses T80, so it's pretty much proven implementation. So, use T80 and "your hair will be silk and healthy" :)

If there is already MZ core then i suggest to port it instead of creating from ground. Especially if you have not much experience in HDL. Take DE1 version if you think it's more advanced.

As an example of T80 usage, Aquarius looks pretty simple and can be used as an sample.


Return to “MiSTer”

Who is online

Users browsing this forum: No registered users and 2 guests