Zikzak - crummiest 8bit console/computer ever .. but I'm making it!


ZIFs are pricey beggars, but can get them cheap on ebay; I got a pack of 10 40pins and 5 or so 26pins for EEPROMs and such. Great to have! (especially the ones with thin center, and wide slots, so various width chips.. any other kind seems foolish)

I really like the AY-3-89xx series; amazingly easy to hook up and code.. wit hthe AY-3-8910 you can basicly ignore 60% of the pins, leave them hanging (no need to pulldown or gnd etc), and only takes a few pins to bring it up. If you need a sample code, look up the zikzak github .. probably in the zik80 folder somewhere.

Its tempting to try and build a MIDI parser, add some flashy leds, and build some sort of MIDI->AY-3-8910 synth.. but you coudl do it all better with Cubase VST plugins in software anyway, but still :)

jeff
 
Beautiful :) IS that a converted power-brick for the case? MIDI in, and both speaker and headphone jack out?

With dual AY's, .. if you're only using one, what happens? ie: do you tie the two outputs together, and some circuit to keep volume up if only 1 going, or something?

Looks great :)
 
That is a converted powerbrick. It only has MIDI in and RCA out (switchable between internal speaker and RCA.) It does have AC in with built-in transformer and automatic switch-over. 

No, it does not compensate for one one chip in use, as it would sound weird if it was constantly between 3 and 4 channels in use. So, all outputs are just tied together.

Some pics here: http://h4xxel.org/pictures/electronics/midi/
 
Hooked up an avr8 as I/O chip, driving the STM32F4 as GPU.

I'm hoping (if I use an intermediary I/O chip at all) it will be wired up as bitbang (like this experiment), i2c, serial, and direct ram.

But this experiment is to see if bitbang will work, and how well; in the end, for a quick could hours of wiring and some code, have it working at a basic level. Naturally, theres timing conflicts... so read on:

http://www.zikzak.ca/dokuwiki/doku.php?id=blog:eek:n_i_o_chip_feeding_data_to_gpu_and_collision_with_hsync

oscope picture there too, woowoo :)
 
That post probably wasn't coherent, too late at night ;)


The oscope pic shows the data clk raising to the gpu, and his blue line toggles for ackowledge the clk; you can see that it misses after approx 8clks; each clk here is for 4b basic sprite move command; so in other words 8b transmission between hsyncs during vblank at 8MHz
 
Other approach is serial, i2c, and ram bus sharing. Also note that may well end up with a much faster chip in there .. Lots of options but if we're limiting the programmers it means an stm chip so that implies like an stm32 f0 or f2 or something ..


So could do background i2c (minimal cpu hit) and high speed (80mhz+) so a lot more data than using avr8 during vblank only

Other approach is serial, i2c, and ram bus sharing. Also note that may well end up with a much faster chip in there .. Lots of options but if we're limiting the programmers it means an stm chip so that implies like an stm32 f0 or f2 or something ..


So could do background i2c (minimal cpu hit) and high speed (80mhz+) so a lot more data than using avr8 during vblank only
 
Now one of the big questions..

I had waffled before over classic Z80 versus newer Z180 (ignoring Z280 and Z380 for various random reasons.) Classic z80's main pro's are i) super retro awesomesauce, and ii) very easy to interface (40 pin DIP, low speed, well documented.) The Z180 is essentially an upgraded Z80 .. has a few more pins for memory (can address up to 1MB), and a couple built in UARTs (by another name.)

Comparing those two, it seems a path is clear -> go for Z180 DIP version, and then if needed I could knock out some Z80 to Z180 pin adaptor boards, since they're pin compatible in usage, if not actual pinout. Given that piece of insight, its not such a concern.

FWIW:

z180 -> cost about $10 on digikey (a little less, a little more, depends how fast you want, and a few other options.)

z80 -> 10MHz for $4, 20MHz for $10 give or take

So z80 and z180 are 'more or less same cost'.

Now, I've so-far ignored ez80 (which I think is the most current of the many z80 families).

They actually run up to 50MHz IIRC, and supposedly with pipelining/etc they run 4x faster per MHz than the original Z80 .. ie: a 50MHz chip is equivilent to a 200MHz Z80. Neat. They also feature i2c and other peripherals, and can handle up to 16MB of SRAM IIRC, and some models actually include flash; they actually do have the regular z80 pinout stuff as well, so can drive a bus. The main distinction is they run at 3V, like the STM32 line, which might just save on the voltage regulation. I've not looked at the datasheets yet, but may be possible to use same sort of programmer for AVR (SPI), so who knows.. could be handy. Presumably they can use flash and bus same time (though not sure how that works in the memory space.) Put a firmware on there for display routines, and then use the cart for programs.. interesting.

Reason I ignored the ez80 line though is they're all SMT.

As-is I'm looking at the STM32 SMT ICs for the GPU, which means I likely have to solder it for you guys unless you're brave; in general, it makes it hard to kit out. (What I might have to do is put a 64pin DIP socket on the board, and then have STM32->DIP adaptor boards, just so I can solder them up and test them, and then someone could plop it into their zikzak board. Suppose that could work.

ez80 should be compatible with original z80 code, still.

..

So..

Z80, or        <- classic

Z180 or        <- newer version of the classic, still DIP, but still limited (one foot in the modern era)

ez80?         <- pretty slick chip, but LQFP100 SMT package, same as the GPU

jeff
 
Well, the Z180 series seems to be a nice compromise.

You keep a backward compatibility to legacy Z80 CPU, but add some modern ease of use.

And they come in packages easier to use :p

Have you thought about using PLCC Z80 chips instead of DIP ones? The PLCC sockets with go through pins are not that hard to solder. The chips are quite smaller than DIP ones so they use less space on a PCB.

---

I still haven't fooled around with the AY-3-891X, I found some code that generate the 2MHz clock signal from an arduino. And I have to search in my stack of chips if I have the one that's used in the "demo system".

I should design a small leds matrix compatible with AS1130. I wonder if I should go for surface mounted (hard to solder) or through holes led (larger).
 
This is my AY-3-8910 test code:

https://github.com/skeezix/zikzak/blob/master/zik80/audio-gen/main.c

It references lib_ay_something which is in the same dir (just browse the GIT.)

That was avr8 -> AY chip, with a headphone jack; nothing else needed.

The wiring hookups are listed here:

https://github.com/skeezix/zikzak/blob/master/zik80/audio-gen/hookup.txt

Code:
So .. full top edge of ay-3-8912 is hooked up, buttom edge is just power and a speaker like
ay-3-8910:

bottom side:

  pin 3 -> +5V power

  pin 6 -> GND power

  pin 5 -> speaker speaker+ : analog A

  GND -> speaker speaker-

top side:

pin 28-21 (DA0->DA7) -> avr PA0-7 (top left, left to right same as ay-3-8912)

pin 20 bc1 -> avr PD0

pin 19 bc2 -> +5V (hold high, ignore it)

pin 18 bdir -> avr PD1

pin 17 A8 -> +5V (hold Address A8 high, ignore it)

pin 16 /reset -> +5V (hold high, not reset)

pin 15 clock -> OSCILATOR; currently using 2.5MHz oscilator (4 pin, not crystal)

 

Piece of cake :)
 
PLCC adaptors are hard to find, so I'd probably end up making my own. I've soldered the PLCC sockets (cheap, easy to get), but I find them a right pita.. too many pins all clumped together :)

I prefer straight up DIP over PLCC, but depends on the board layout (TBDone yet); FWIW, the ez80 isn't available in PLCC (just QFP and BGA, ugh.)

In a way, I sort of lean towards .. straight up Z80, or ez80 .. 'why mess with middle ground', but Z180 is a hell of a lot easier to solder for sure. I'll have to check datasheet.. but if ez80 i2c works well and fast, that might be handy as heck.

Problem with zilog chips though .. they strike me as very un-documented/exampled, by comparison to PIC and AVR and such where piles of examples are lieing around; the z80 stuff.. Z80 itself is well documented due to history, but when it comes to z180 and ez80 .. seems like theres only a few canonical samples and datasheets from zilog; no big popular forums for asking questions, etc.

Will have to check.

*waffles on the fence*
 
I suppose z180 is just the way to go .. At least, I have some for prototype sale. They're obsolete but still pretty available.


I suppose as for gpu idea.. Could put in a DIP socket; can aim for z180, but nothing stops anyone from socketing in a ez80 adaptor or even a 6502; other volts will be on the board.


jeff
 
I've dropped in a couple plugins for the site.. a comment plugin for the blog entries, and a captcha plugin to put up a small roadblock for the spammers.

I've set the captcha to a fairly easy text word challenge (same word every time.) If spammers find the word, I'll make it change question every hour or every day or something rather than be static, or go to image word challenges or something. Still, hopefully it'll be sufficient.

Right now, the box admins (its someone elses box this time.. usually I run my own stuff :) need to set up sendmail properly, so I've disabled self-registration for now; once they fix email, I'll turn on registration and email-confirmation.

For short term, I've enabled guest commenting on the blog posts; don't see the need to enable commenting on other pages.

Feel free to comment if you like :)

jeff
 
Looks like the eeproms in the AT28C___ line are getting harder to get. These low size and DIP eeproms are just becoming a thing of that past.

The 28C256 (32KB) are still pretty readily available in 28pin DIP. Theres some availability to the 28C512 (64KB) in 32pin .. same way of writing as for the 32KB guy, just move the GND down a few pins.

I'd originally intended for 32KB Carts (since really, we're not expecting too many peopel to go nuts here ..) but we really should allow for more 'just in case'. Theres always a possible change for rev2 if the board takes off somehow however unlikely :) , but I'd prefer to get it 'right' first thing. (It'll be easily moddable of course on board, but .. yeah.)

Now this guy looks pretty swank, and a lot cheaper too:

http://ca.mouser.com/ProductDetail/Greenliant/GLS29EE010-70-4C-PHE/?qs=bAdOcXfFoy08hG5CPsLclg%3d%3d

1Mbit (128KB), parallel bus (fast to use, not serial 1 bit at a time silliness.) $2 ea.. nice. (the 28C256's are up to abotu $10-$11 each, but were half that when I ordered some a year ago)

Writes at same voltage as read (no high voltage programmer needed to slow things down and complicate power supplies.)

Thats a 5V chip though.. perfect for where I was going before, but nowadays.. be more ideal for 3V-5V tolerence, so maybe can be hit by GPU as well, not just the Z80.

Hmm, its going to be annoying .. looks like you basicly have to go SMT to get any choice in these eeproms, yet a year ago it wasn't so bad. Things have moved quickly here..

Screw it..

I'm going to build the interface with 1MBit carts in mind (128KB), and then if theres a surface mount !Mbit SOIC in there, or a DIP 28 or DIP32, what do I care? Cart can do whatever the hell it wants.

jeff

Blogged it: http://www.zikzak.ca/dokuwiki/doku.php?id=blog:eek:n_eeproms_for_the_carts
 
Last edited by a moderator:
This is my AY-3-8910 test code:


[…]


The wiring hookups are listed here:


[…]


Piece of cake :)
II made some modifications since I own AY-3-8910A, not 8912 ;)  and since I use arduino instead of directly using AVR. Here's what I got :

Audio_bb.png

I  still haven't tried running it as I'm currently picking parts of code from various sources (including yours, of course). And it's still not finished at the moment.
 
FWIW, sending mail out of that box is a right PITA for a number of reasons, so I'm not going to bother for now..

Go ahead and use guest comments (no need to register or anything); I've set it up so it (through really annoying ways) emails me when comments or page changes occur, so I can catch spammers who may try to hit it. (Then I can change the challenge question, require registration, or whatever.) I should hack the code up some more, to prevent comments at all on posts that are more than a week old say .. since spammers love to attack and gravedig.

Anyway, comment system should work okay now, if anyone cares :)

jeff
 
The AY-3-8913 is really the way to go IMHO; 24pin is a nice small size, nearly half the size of the AY-3-8910 which has the same function (no one ever used the out-ports, right? :) .. so you can get two of them, for just a little bit more space on the board!

*mewants*

Mind you, I've got my little horde of about 5 AY-3-8912's which do me fine :)

jeff
 
ooooh snap, I went reading the ez80 .. they started showing up around 2008, so are pretty new.

_Holy crap_ are they pretty slick!

The one I was looking at .. 3.3V source, but tolerant up to 5.5V on pretty much all pins .. so easy hookup to damned near anything

- 24pin GPIO; a Z80 with gorramned GPIO's on it.. how slick is that? The GPIO pins IIRC double as UART pins and such, too

- i2c and so on

- 20 or 50MHz (though 50MHz seem to be commonly unavailable, 20MHz are cheap and available)

- built in flash (various sizes, less is cheaper)

- built in SRAM (various again) .. 0 wait state!

- handles external RAM up to 16MB

--> downside: LQFP100 package and up (ie: only SMT, whereas z180 is 64pin DIP)

I'm not sure from the quick flip through, but it might be able to just run on the internal flash (the RAM is easy, its just memory mapped so once you start running,m you could use it.) I would assume it could run without any other chips, like all the cmoon guys like PIC and avr etc. Pretty sweet!

Now, the minimum flash and ram ends up costing $5/chipm which is pretty good; the ram size is not really useful for us, but very fast. Likewise for ROMs, we want carts.. but a built in BIOS of sorts could be neat.

Its that blasted SMT barrier though; now, even if board design is for Z180, oen shoudl be able to drop in an ez80 on a DIP adaptor and work okay, I imagine. Then you'd be able to use those delicious GPIOs.

My current design is STM32 F4 on GPU duty, and some Z80 variant as brain, and possibly an I/O chipo as intermediary; if the STM32 can interleave RAM access with the z80 it'd be wicked-handy, and possibly alleviate need for an I/O chip; an ez80 has the GPIO pins and some peripherals, and higher speed, so certainly could handle a lot of I/Os.. certainly a keyboard and joystick shoudl be no problem, but it should be able to drive SD on its GPIOs, too. So in a way, the ez80+stm32 (plus cart, ram, sound chip etc of course) could be the whole board. With a z180, we very likely need the intermediate chip (an STM32 F2 say, or even another F4 for super power, if the price is right.)

The whole reason I'd been avoiding ez80 is trying ot be allergic to surface mount parts; if the whole board could be through hole, thats just peachy, right? Easy to solder for just about anyone! But now I'm pretty much married to an STM32 F4 as GPU, since its pretty awesome and affords a lot of power folks could go nuts with, and I'm also pretty sick of trying various options, and rather like the STM32 :) .. so thats one surface mount part. And again, I might just put a big-ass DIP socket on there, and then provide a 64pin QFP->DIP64 adaptor board.. so people could solder there on, or chip me a few bucksand have me solder it for them and provide the GPU-board as a plugin.

So thats 1 surface mount part.

Now, if we go straight out for a Z180 or Z80 proper in DIP, then we likely need an I/O chip; two main broad cases.. either talk i2c to the GPU if we can't swing RAM access, or if GPU and Z80 variant can share RAM, then we still need the I/O chip for doing interupty peripherals. I'm not over interested in putting in a SIO and PIO on the z80 .. fiddled around, they're pretty slick, but getting out of control. They _are_ retro as hell though :) .. so, assuning they're out, then Z80 can't really talk to peripherals at all well. Having the GPU do it is potentially too much load on the GPU depending on the peripheral type, but as I found out.. at least with my experiments so far, that GPIO activityt is screwing with the DMA and/or data bus timings for VGA and causing turds. I'd rather not have random turds flicker for a frame every time you wiggle a joystick or hit a key or the like.

So .. if I'm going to add an I/O chip, I've also tried to narrow down on programmers and chip families; also, we want a pretty fast chip. So avoiding adding an atmel or PIC in there, it'd be wisest to stick with STM chips since we've already got the TM32 on therel; the STM8's aren't beefy enough.. not enough RAM etc. So we're talking about an STM32, and then might as well just go to an F2 or F4 again, keep them similar to the GPU so everyone is familiar.. figure out out, you get the other figured out for free; they're also not too pricey and awesome as hell. So, okay..

--> we likely have 2 surface mount chips on here already, plus the Z80 or Z180.

If we're going to have two surface mount chips _anyway_ (and possibly both of them in DIP sockets, so we can go out of control in other ways..), then it becomes sensible to just use an ez80 and the GPU (and the ram/rom/etc). ie: the ez80 could replace the z80/z180 _and_ the I/O chip, since it has some peripherals, and GPIOs, and 5V tolerance.

The only real problem is the damned LQFP100 and up. LQFP64 is bad enough to solder.. 100pin is a bit of a nightmare :p   On the one hand, theres a place near me that actually sells QFP64->DIP64 adaptors, which is what I use for prototyping.. but they're $10-$15 a piece (currently $15, ouch!), though a bit cheaper if you place some tricks. Still, I'd have to make my own.. really, shoudl be able to get them for $5 a piece if I make them myself, or less. Anyway. Very few reputable places make QFP100 and up adaptors.. I've got some from Thailand, but they're these big huuge affairs, and not the best.

So, I'm still really hesitant to go to the old SMT100+ route; SMT 64pin is bad neough, but pretty managable .. I'm okay with them. Having two on the board is goofy, but okay.

Man, I really want the damned ez80 now though, but I think I'd have to have that right on the board, and I'd have to solder them for everyone, and who knows, maybe thats a real bitch. I've done it before, a couple of times, without the heat gun (it was quite awhile ago), so it can be done, but yeesh.

So..

Z180 -> STM32 F2 or F4 (64pin surface mount ) -> STM32 F4 GPU (64pin surface mount), is still top contender. But ez80 -> STM32 GPU is pretty sexy idea.

jeff
 
Google still doesn't return any hits to zikzak.ca site at all; I've submitted the page to goog, and the bot has looked at it I think; I guess they just sit on it for a few weeks, to let you stew if you're a domain camper..

.. bastards :)

jeff
 
The AY-3-8913 is really the way to go IMHO; 24pin is a nice small size, nearly half the size of the AY-3-8910 which has the same function (no one ever used the out-ports, right? :) .. so you can get two of them, for just a little bit more space on the board!

*mewants*

Mind you, I've got my little horde of about 5 AY-3-8912's which do me fine :)

jeff
Well since I own five Microchip (don't know if those are real ones :p ) AY-3-8910A, I won't buy audio chips until I fried or used them all in projects. So I'd better use them at their fullest.
Since those two ports can be used to connect eeproms, I'll simply use them that way (see page 39 of the 8910 datasheets). That could save a bunch of I/Os when using old-school, parallels eeprom.

YM285 looks nice too with its integrated PCM, but seems hard to find.
 
Last edited by a moderator:
Back
Top