Firm Zeddie

Emulator and emulator development specific topics
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Firm Zeddie

Post by sirmorris »

My thought train has pulled into a station long enough for me to pop into the cafe for an earl grey and a chelsea bun.

Here's today's stupid idea. What I'd like is either the ability to single-step a zeddie at single clock resolution, or something that could pretend to be a zeddie's expansion port. A hardware debugger, kind of.

Using this device I could happily tinker away with new devices without the FUD of having to be working in realtime. I realise that there are things to take into consideration when you do make something run at fullspeed, but we'll rather conveniently ignore that for now.

My device would be in 2 parts. A clock-tick-accurate software simulation of the bus activity of a zx81, and a hardware dongle that presents the appropriate signals to the outside world. Using this and a breadboard it would be easy to see what the waveforms look like off the edge connector whilst running code on the emulator.

Load a new program, push the button, watch the pretty smoke :)

I'm sure there are development systems that cost $$$$ but I'm thinking something that could be build for £10/$20.

Andy - your fireball enthusiasm for emulation and hardware might come to the fore here ;)

We could get Andrew to do the coding!

C
Mike
Posts: 52
Joined: Sun May 11, 2008 5:38 pm

Re: Firm Zeddie

Post by Mike »

I've often thought about this...

Maybe a parallel port dongle that expands into a full ZX-bus. Hardware wise, it'd be quite simple - just a few latches should do the trick. However, a lot of hardware requires a minimum clock frequency to work properly and might be problematic if severely underclocked/ frozen.

Mike
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: Firm Zeddie

Post by sirmorris »

Max 6965. I've been using a pair of these to interface an Arduino with some parallel eeprom. Feed them i2c and they give you 20 lines of IO each :)
User avatar
Andy Rea
Posts: 1606
Joined: Fri May 09, 2008 2:48 pm
Location: Planet Earth
Contact:

Re: Firm Zeddie

Post by Andy Rea »

Well Cmos Z80's can be clocked right down to Zero hertz without harm, but it does say to reduce currrent consumtion you should first put it in halt state, but hey who cares about current ! as for the ULA i don't really know what would happen with that....

so perhaps the best way to go would be with the hareware (whats that? is it anythign like RabbitWare ? Ed.) emulator how your going to get accurate Z80 timing i don't know either

ok forget a real Zeddy unless you want to fry your ULA or use a ULA Free Version !

Clock cycles emulation...rather 1/2 cycles emulation (or should that be 1/4 half of the 6.5Mhz clock?) to be able to get nearer the real timing. Well there is only a handful of fundamental sub functions that control the Z80 busses quite well documented with timing diagrams to boot so it might be possible but i doubt it would be easy to be 100% accurate.

here's another idea. since as we are going to be single stepping the Clock the TV output is going to be screwed up anyway right? So whay not use a Cmos Z80 with a basic support circuit that does the False NOP Thing so at least the ZX81 Rom would run correctly but obviously not provide a Tv output which is the hard bit of the ULA.

I Think I'm Ranting On Now.....

Andy
what's that Smell.... smells like fresh flux and solder fumes...
User avatar
Andy Rea
Posts: 1606
Joined: Fri May 09, 2008 2:48 pm
Location: Planet Earth
Contact:

Re: Firm Zeddie

Post by Andy Rea »

Okay dokeys, been thinking about this for a while and i'm ready to give it a go...

A Z80 core Function that will excute 1/2 Z80 clock cycle on each successive call and set the 'Pins' to the respective logic level at each 1/2 clock cycle.

of course Databus will have to have either an extra bit representing current direction (in/out) or separate 'in bus' to 'out bus' which can be duplexed at the hareware interface level which Sirmorris is going to do with his fangled chips hanging of the Parralell port.

if i have Global vars(struct for each pin 'mode' and 'boolean level') representing the 'Pins' you can pretty much do whatever you want with them then.

Regards Andy
what's that Smell.... smells like fresh flux and solder fumes...
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: Firm Zeddie

Post by sirmorris »

Now that's what I'm talking about :)

I was looking at the z80 docs and it all seems quite straightforward - that doesn't necessarily mean easy btw - the timing diagrams are excellent.
Mike
Posts: 52
Joined: Sun May 11, 2008 5:38 pm

Re: Firm Zeddie

Post by Mike »

If you're looking for a clock accurate emulation of the Z80 in software, maybe the best place to start would be something like the VHDL source for T80?

http://www.opencores.org/projects.cgi/web/t80/overview

Mike
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: Firm Zeddie

Post by sirmorris »

I know there were words on that site but I didn't understand any of 'em :?
User avatar
Andy Rea
Posts: 1606
Joined: Fri May 09, 2008 2:48 pm
Location: Planet Earth
Contact:

Re: Firm Zeddie

Post by Andy Rea »

:lol: me neither.

i've started but before i get into it too far since as your going to be doing the hardware side of it this is what i have for the pins

Code: Select all

struct pin
{
    bool Level; // true = high, false = low
    int mode; // 1=cpu controls state, 0 = tristate, -1 = cpu expects to read pin, -2 input (fixed (power) or CLK controled by function)
};

pin Pins[41]; // don't use Pins[0]
more modes could be added if needed.

i'm going to do a little front end showing the current state and mode of each pin, and probably the ability to break at will, ideally by logical combinations of things e.g IO activity on port XXXX causes a break, or write to mem address XXXX, ect.
Let me know what events you would like to trigger a break and i'll see what i can do.

Andy
what's that Smell.... smells like fresh flux and solder fumes...
User avatar
Andy Rea
Posts: 1606
Joined: Fri May 09, 2008 2:48 pm
Location: Planet Earth
Contact:

Re: Firm Zeddie

Post by Andy Rea »

This is much harder than i thought it would be, but just letting you know i'm still working on it.....

Andy
what's that Smell.... smells like fresh flux and solder fumes...
Post Reply