Firm Zeddie

Emulator and emulator development specific topics

Firm Zeddie

Postby sirmorris on Fri Jun 13, 2008 4:03 pm

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
5 x -go-hold rings, 4 x calling birds, 3 x french hens, 2 x turtle doves and 1 x partridge (in a pear tree)
User avatar
sirmorris
 
Posts: 334
Joined: Thu May 08, 2008 4:45 pm
Location: oxon, uk

Re: Firm Zeddie

Postby Mike on Fri Jun 13, 2008 5:34 pm

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
Mike
 
Posts: 52
Joined: Sun May 11, 2008 4:38 pm

Re: Firm Zeddie

Postby sirmorris on Fri Jun 13, 2008 5:58 pm

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 :)
5 x -go-hold rings, 4 x calling birds, 3 x french hens, 2 x turtle doves and 1 x partridge (in a pear tree)
User avatar
sirmorris
 
Posts: 334
Joined: Thu May 08, 2008 4:45 pm
Location: oxon, uk

Re: Firm Zeddie

Postby Andy Rea on Sat Jun 14, 2008 7:37 am

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
3 x ZX81, 1 x TS1500, 1 x +3e, 1 x timex 2040 printer, 1 x timex 2020 cassette deck, couple of broken 48K spectrums, broken 128k(heatsink) spectrum, couple of broken +2(amstrad).
User avatar
Andy Rea
 
Posts: 57
Joined: Fri May 09, 2008 1:48 pm
Location: notts UK

Re: Firm Zeddie

Postby Andy Rea on Sun Jun 15, 2008 6:55 pm

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
3 x ZX81, 1 x TS1500, 1 x +3e, 1 x timex 2040 printer, 1 x timex 2020 cassette deck, couple of broken 48K spectrums, broken 128k(heatsink) spectrum, couple of broken +2(amstrad).
User avatar
Andy Rea
 
Posts: 57
Joined: Fri May 09, 2008 1:48 pm
Location: notts UK

Re: Firm Zeddie

Postby sirmorris on Sun Jun 15, 2008 8:47 pm

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.
5 x -go-hold rings, 4 x calling birds, 3 x french hens, 2 x turtle doves and 1 x partridge (in a pear tree)
User avatar
sirmorris
 
Posts: 334
Joined: Thu May 08, 2008 4:45 pm
Location: oxon, uk

Re: Firm Zeddie

Postby Mike on Sun Jun 15, 2008 9:02 pm

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
Mike
 
Posts: 52
Joined: Sun May 11, 2008 4:38 pm

Re: Firm Zeddie

Postby sirmorris on Sun Jun 15, 2008 10:20 pm

I know there were words on that site but I didn't understand any of 'em :?
5 x -go-hold rings, 4 x calling birds, 3 x french hens, 2 x turtle doves and 1 x partridge (in a pear tree)
User avatar
sirmorris
 
Posts: 334
Joined: Thu May 08, 2008 4:45 pm
Location: oxon, uk

Re: Firm Zeddie

Postby Andy Rea on Sun Jun 15, 2008 11:06 pm

: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
3 x ZX81, 1 x TS1500, 1 x +3e, 1 x timex 2040 printer, 1 x timex 2020 cassette deck, couple of broken 48K spectrums, broken 128k(heatsink) spectrum, couple of broken +2(amstrad).
User avatar
Andy Rea
 
Posts: 57
Joined: Fri May 09, 2008 1:48 pm
Location: notts UK

Re: Firm Zeddie

Postby Andy Rea on Sun Jul 06, 2008 12:16 am

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

Andy
3 x ZX81, 1 x TS1500, 1 x +3e, 1 x timex 2040 printer, 1 x timex 2020 cassette deck, couple of broken 48K spectrums, broken 128k(heatsink) spectrum, couple of broken +2(amstrad).
User avatar
Andy Rea
 
Posts: 57
Joined: Fri May 09, 2008 1:48 pm
Location: notts UK

Next

Return to Emulators

Who is online

Users browsing this forum: No registered users and 0 guests

cron