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


I suppose I should design the pcb for eeprom burner since anyone whi wants a zikzak will also want an eeprom burner. If we do both z80 and stm33 and possibly avr8 thats a lot of cables/programmers people would need .. Doubt i want to try and build jtag programmers on the board.


So hopefully can do just z80 (needs eeprom burner) and stm32 (can get a cheapy $10 board as programmer). Still .. Minimum kit cost adding up .. Gotta pay for all this madness :0


10 z80, 13 stm32, ps2 keyb port, joy port, rom and ram, $5 sound chip, stm programmer for say 15, eeprom burner (where zif sockets are expensive) for say 20 .. Gonna be $100 or something ..


Really should make a super cheap unit (avr8 single chip), single chip beefier (stm32 only), and zikzak (big awesome mess)


Hmm :)
 
Sometimes I fail at spec reading and sometimes those specs are paywalled so only VESA members can read them..


Took me about a week to realize why this vga didn't fly on my real monitor too well but worked on a vga->composite adaptor ..


- some monitors need hsync during vsync; many do not. I didn't realize hs and vs are independant of each other to that extent


- some need reaistors in-line with hs and vs, some you can drive direct


- some monitors will pull .77mA current on a colour pin (?!!) while others will pull .1-.3 (most mcu's can sustan .25mA and I don't want to add a line driver if I can avoid it..)


So my current all-too-simple vga code is jittery on a per poxel basis (more to the right) since my per-pixel timing is not pizel clock exact multiple; in mono you can run through SPI to get a regular timing but with parallel out no such luck


- thought the dma would be regular. Ut maybe its fetch/write/cache mucks it up just enough without a timer driver


Thats okay, can overdome all this


Firing up independant timers is impossible to sync -them-, but with stm32 you can chain timers and they also have subchannels so you can control ob and off and duty cycle etc .. Should be able to drive all sync from timers and also drive dma off timer to get solid non swervy grid (mine is sharp on vga->composite but a little shimmery on real vga especially with fast colour changes like every pixel..)


320x240 double buffered is my goal
 
Need to consider board design .. Something I've not done yet. Should I put all the mcu's to headers, then let you jumper them together? Or just put it all on board for you with headers for some useful unused pins (so you could add sdio later..)


- or make a few separate boards... Nah


- I'd like to design it so the z80 is optional in function .. Ie: have the avr8 as brain and i/o if you like, it have z80 brain; ie: z80->avr->stm .. But that might be too slow a pipe from z80 to stm .. Will work it out next week..


Soldering the smt stm32 is pretty hard, especially if first time or with crummy solder station.


Would I have to presolder each of those or let people buy extra stm chips after they smash a few with hammers?


Assuming I'd have to preflash each chip since can assume not many will have all 2-3 programmers needed.


- how much would you pay for zikzak proper?


- for zik burner for the eeprom?


Zikzak is likelyto be a $13 stm, $10 avr, $10 z80, ram and eeprom ($5 ea? Inforget), ports, misc resistors and crystals etc, another $10 say, plus board .. $15? So wild guess would put it at $70 at cost (total guess) .. With no spare parts or cables. Oh, add $5 audio chip, bought bulk from ebay while available (made in the 80s and 90s)


So about $100 or so for zikzak and zikburner at cost :/


Retail to say kickstarter wluld be like $150 then, probably way too much


(Not that I've designed for profit at all, just for kicks or it'd be way sleeker), but hey.)


An stm32 1-2 chip unit would be about half that .. $15 stm, $5 audio, ports etc; only 1 programmer cable needed. Be tempting to build that .. Sell for $59.99 as a diy console or something..
 
A zikzak 'lite' with two STM32 chips (quite powerful and fast chips from what I've read) could be an interesting machine.

Depending on my financial status, I would probably buy a kit for a zikzak or a zikzak lite.

For some of the chips packages, sockets with through-hole pins could be easier to solder.

For example, many Z80 chips comes in PLCC packages, there are cheap sockets.

EDIT : I'm still waiting for my [sMD packages]-to-DIP adapters from china, I hope they'll get there soon. I have to get used to soldering SMD chips.
 
Last edited by a moderator:
Z80 comes in DIP, so no worries there; only 5V which a trifle annoying, in this day when most chips can handle 3.3-5.x, or 1.8-7V, that sort of thing. STM32 likes 3V, and avr8's can run on damned near anything. So a voltage adjustment chip will be needed too. Anyway, no real worries..

I'm betting, if done right, an STM32 could do it all, one chip. I should be able to get my VGA pure-timer-dma code working very nicely and not eating up all the cpu time, either. With the newest F4 chips (the F4 429, say), you get a lot of RAM, a lot of flash, up to 180MHz .. probably 100 pin or 144pin though, a bit rough.The sucker has a DSP module, and an 'ART' chip which can do 2d DMA stuff for rectangle blitting etc. Crazy. So given you can run at say 180MHz, and burn up the first 100 or so doing VGA, can you do a MOD player i the remainder? Surely no problem, my crummy old school mod playe rin pure C could run on about 20MHz or thereabouts.

So I quite think an STM32F429 would be a badass little single-chip-console, with a joystick port, VGA port, programming port; the thing has a built in LCD controller too, for making mobile. Chip costs what, $13, plus the connectors and board and voltage regulator etc.. so call it $25 base cost or something, in low volume; sell 'em for $35 and call it  a day.

For zikzak, I need to consider the design.. ie:

Say its a 3 main chip, Z80 -> avr8 -> stm32 .. it sort of slows thigns down from z80 through to stm32, but provides you with the option to use the z80, or disable it and use the avr8 as brains and I/O; but maybe should design it all pipeline, so you could use z80 and avr and stm32, or just avr and stm, or just stm. That'd be neat.

I worry I'm overdoing it with chips through.. for _me_ this is really fun to have 3 different mcu families on board, but its probabyl excessive for most; multiple programmers, multiple codebases per project.. its typical for a console, but not what hacker in basement may want.

Pretty sure I could do stm as the I/O chip as well though, but until I get VGA going I don't want to bet on it. But I've seen projects where people use the stm32 as an eeprom (since it can be cheaper than one!?!), and it just bitbang pretends to be an eeprom, sitting on the bus and storing writes to its flash etc; nifty. So if VGA can burn half or 3/4 of the cpu, and the rest can still manbage I/O without glitching the VGA, I think z80 + stm32 would be a pretty swank zikzak :)

So thats my current target .. z80 + stm32f4... (plus support stuff, like voltage reg, voltage level, ram, eeprom, ports etc etc.)

But as we know, targets change.. but this is fun, and going well.

Hopefully I'll get a new VGA full-hardware-timer thing going in a few days or a week; love to get a video up of 'zikzak's gpu showing animation' :)

Given the power in these, I guess I should go for a bigger DAC .. RRRGGGBB maybe, instead of RRGGBB or RRGGBBII ... then again, the RRGGBBII (With II being 'brightness/intensity') worked pretty well. Will have to test and take screenshots of pics, see what you think..

jeff

Hell, gp32 and gp2x and such, those are basicly single chip machines these days; an stm32 f2 or f4 could do that whole thing, easy as pie. Take an afternoon to schematic that up, with the built in LCD controllers and all that.
 
Last edited by a moderator:
I can say from personal experience that the STM32F429 is indeed an awesome little bit of kit.

Not sure if you can get it in small quantities for under $20 though.
 
You can get the STM32F405RE for $11 or $13 in small quantity easily even at digikey (mouser, newark, etc), which would be the one I'd target probably - at least for zikzak; but if doing a one-chip-console then the F429 would be worth the extra bucks perhaps (for the DSP and ART chip bumf.) Really, I've done one-chip-console with a low end avr and it works fine too (very retro limitations) .. and an avr8 can be had for $5 or more, depending on the requirements. Hell, you can run Linux on these stm32 chips, pretty sick.

Tempting though :) I'm not planning on designing cases or anything, so not likely going to make a 'go' of this, but tempting to put together a few little boards and get a dozen built, for lulz. I'm going to at least get boards for zikzak and zikburner, so why not a couple other little guys... or who knows, make a crummy prototype, add some basic demos, and throw a KS up to see what happens :p Maybe I can get Craig to do the video!

jeff
 
Hot air rework station is pretty darned slick.

My first two STM32 F2's that I was soldering, and trying a couple techniques I don't usually do (and hence botched up a trifle..) -- reowkred them today, took only a couple minutes. Impossible with a solder iron, to get all 4 sides heated at same time to pull the chip without wrecking it; but with the hot air, and a cheapy $2-china sucker-pen, bit of heat, chip popped right off, good as new. Then use the suction solder station to heat up the board, suck off the solder bit, hit with solder wick and pcb adapters all clean and ready for another try.

(and now, I use solder paste .. a drop of that, smear it around, drop chip on, heat gun -> done! no fuss!)

... and more Christmas.. more samples from ST (F4 chips!), and Zilog has accepted my samplew request (took 2 weeks or so), so 11 various Z80 and PIOs coming. Totally cool. Slap them right into my prototype zikzak :)

I love these big American companies. Totally cool for us hackers. They know it works.. I'm totally in TI, ST and Zilogs pocket now :)

jeff
 
I love these big American companies. Totally cool for us hackers. They know it works.. I'm totally in TI, ST and Zilogs pocket now
I have to agree!Most of them ask for some informations about the project it'll be used for. I usually write a really vague description but I never got a negative answer from TI or Zilog (still have to try ST).

I wish the other chips-making companies were that cool, they would get their devices even more used and bought.

About zikzak, I hope you'll be able to get rid of the AVR chip (I couldn't get any sample from ATMEL and it pisses me off :D ). If the SMT32 can't support the AVR functions without impacting VGA output, I bet that replacing the AVR with a STM8S or a STM32 M0 chip could do the trick.

I'll probably order a few SMT32 and SMT8 samples and a programmer/debugger ST-LINK V2 in a few months, to understand how ARM MCU work :p

In the meanwhile, I'll stick to MSP430, Arduino (I may get rid of the bloat coming from arduino to go "bare" AVR) and my old PICs…

Oh and it's great to see that your hot air rework station and solder paste get your life easier! Makes me wish I bought one when I could afford it.
 
Last edited by a moderator:
It seems likely to just be z80+stm32 - less parts, less complexity for people to hack on, but without reducing the function, and still retro goodness. I rather like the idea of z80 and stm32 -- so the z80 can drive it all, or you can just do stm32 if you want a beefier approach and less retro. Hell, use the z80 for doing sound or something then..

Especially with the STM32 F4 at say 168Mhz (or the latest one, at 180Mhz).. thats crazy. But I'll find out, first ..

The AVRs are really good at some things; with the fact almost every opcode is a single cycle, and predictable, they can actually work pretty nice; you can just make a tight loop to spit out VGA, and .. they can't keep up, but the pixels they render and square and lined up. On the ARM chips with complex caching and pipelining etc, its much harder to get timing right, so you have to go hardcore with the peripherals and timers, and its not as efficient; but less efficient, with 8+ times the performance is something :)

Basic VGA is pretty easy to get going, but its still blurry and goofy; I know it can work solid, and can just move on.. but I think I'd liek to get a sharp high res VGA proven (and hey, its painful/fun..), before I start finalizing the design. Don't wan tot go ahead, nail things down, get boards made, and find out its just not going to work the way I want it to. So I'll spend a couple weeks banging out a cleaner tighter VGA, and then can test if the interupts can come in nicely a few ways without blowing up the display. Theres performance to spare, so generating audio right in the STM32 (and ignoring the AY-3-8910) should be doable .. run a SID emulator or whatever.. but the interupts, they're what get you. Keyboard interupts aren't as frequent (they did shoe on the avr8 generated VGA, but probably not here too much, since we'll be doing 600 or 800 60hz), but if its monitoring the z80 bus (say), or i2c, or such like that.. you have to answeer or miss the data; dont' want the z80, if we let it run at say 20MHz or something, to just blow up the VGA. Thats the test I need to do before we start nailing the pcb out and shipping it to the boardhouse.

I really like the avr's (ordered a few more, so I have 'em 'in stock' for my projects), but if I can trim a chip out, a different family chip, I'll do it.. the goal here is retro styled, but still simple and fun. If its not simple, I can just pull out the Big Crazy zikzak board; the point is to reduce, but still keep the retro flavour for fun coding, and keep complexity down so idiots like me can figure it out.

I don't sleep enough for these hard-timing games; its hard to get right. I bet its way easier if I had a few days of rest... such is life :)

I did break down and pick up an STM32F4 discovery board with a F429 on it; $27 or something, including an LCD display I'll never use, and 2 usb ports; its got all the pins broken out onto headers, has the crystal and st link v2 built in, etc. Pretty amazing for the price of the board, and it doubles as a st link v2 programmer (which alone costs like $40.) So it can program its own F4, or program other chips.. break a jumper and its a programmer, put jumper back and its a standalone board. I like to do it from scratch, its not too hard to just have a single chip on the breadboard, but I got lazy here.. plug it in, get to work. Could be an option for you.. its got the crystal on board, so you can hit it up to 180mhz right off and go, and certainly pretty cheap.

..

FWIW, I get all my gear from ebay and much of it comes from HK or China; I almost feel bad for stiffing the local shops, but there aren't many.. and the few shops around are basicly carrying stuff from China anyway, but marked up a few hundred percent. ITs hard to argue when ZIF sockets are $17ea here, or 10 for $5 on ebay :/ I got the microscope for $11 (absolutely essential for SMD work; get the Andonstar one with the nice stand .. its _all_ about the stand, and view distance, so you can solder under it while watching your 20" monitor. Beauty. I got the 858D hot air rework for what, $50 or something, not too shabby at all. The most expensive piece was splurging on the sucvtion desolder station, which is neat as heck, but not as useful as the hot air.. once you get the hot air going, it makes your life a lot easier, and its pretty cheap.) The tools don't ost too much, and the components are pretty cheap ebay wise .. thgouh quality suffers. digikey etc are beautiful, but you pay a lot for their amazing service. The free samples help a lot .. when mcu's are $8-$23ea, and you must be 4-5 of them in case you kill a couple .. it adds up.ST sent me 5 of the F4's .. the high end $23CDN ones .. free! That one package was abotu $100 or more value, and went straight into my prototypes.

You can get by 'cheaper', but by no means 'cheap'; you need a base stock of resistors (I bought a pack of 5000 from china, natch), capacitors (tantalum, electrolytic, mono...), the SMD adaptors (which are expensive, but I got them from thailand, egypt, all over), voltage regulators (use a heat gun, melt them off old boards :p ), stock of various crystals.. your basic starting lab has some costs. A good solder station is absolutely worth it.. get the Hakko 888 or 888D, beautiful. A good multimeter.. I've gotten good old stuff; I got a 20 year old MM and had it checked on a high accuracy machine, and it was still to spec.. got it cheap, and beautiful. Multiple power supply.. buy a cheapo kit and assembly yourself. I was building power sdupplies for awhile with the 7805 regulator etc, but got tired of it.. when you need 3.3V on some chips, 5V on others, and using buffers to level things.. bleh, just get your bench power supply to spit out 3V and 5V at once, call it a day. Its all about optimizing what little time you have, for me.

And now I have a _wicked_ office .. full of neat toys, mostly cheap but awesome. Think ahead.. when you get a 858D hot air station, how you going to get that 350 degree chip off the board? I tape the board down, and tweesers iwll burn your fingers! I was using an oven mitten, but its too fat-finger. Get a $2 suction cup pen from ebay.. garbage, but good enough, and disposable if you melt it. So far so good for me :) Nothing worse than buying a gadget on ebay, only to find out its runs at 220V and you run at 120V, or you need a sucker pen, or _something_, and you need to wait 6 more weeks for the next thing from China :)

Plan your lab, get it cheapo on ebay, and get hacking :)

Love them freebies :)
 
For that matter.. need to retest things that were off the table with avrs.

Consider.. if the F4 is running at least 168MHz, and say you run the z80 at 10MHz (or 1MHz...), thing how many instructions you're doing on the one before the other gets a tick; if you generate the Z80 clock from the STM32 like I was planning with the avr-vga, you can set the clock rate (or halt it altogether!) whenever you like.. dial up and down the speed, or pause the z80; Z80 has a feature where it will not lose the regisdters when halted.. it doesn't need to keep ticking to keep them refreshed. So it may well be possible to just pause the z80, read through the RAM where a framebuffer could live, and copy it into STM32 memory, and then let the z80 tick for awhile. The z80 could ju7st have a draw-list, say, and the stm32 picksd that up, and then dfoes the processing locally.. the framebuffer(s) will be in the stm32 for sure (lots of RAM), so this could work nicely. Z80 says 'sprite 1, go to (x,y)', and go on with its day.

With the avr doign vga, and avr being cpu, we just didn't have the time.. the avr-gpu would peg the RAM the whole time.

Hell, with z80 hanging off the stm32, its possible we could even have trhe stm32 _be_ the ram/rom and feed it to the z80, but surely that would get in the way of interupts.

So yeah, I need ot revisit the stm32 just using the z80 RAM chip direct; I may build it so that the z80 can talk to stm32 via bus, or via the RAM, or via OUT instruction.. may be possible to support them all, with z80 selecting which it wants at runtime.. so you coudl hack away whatever turns your crank. (Or if we went with modern z180 that can be a z80, or use new features.. it has i2c, etc, IIRC.)

Anyway, I'll get VGA working (or get sick of it and just move on ;) , and then nail down this stuff; thats the next thing, to rework that board design... nearly there!

The only thing I've not touched yet is cartridge; it shoudln't be hard to add in, but I'm still on the fence of cart vs SDIO (maybe should support both...)

-> cart is retro awesome, and neat; I coudl sell blank carts for $10 a pop or something, .. so instead of flashign your eeprom for rom, flast a cart, and plug it in to use it. neat!

    --> supporting carts does mean putting edge connecotrs on there and some transistors for switching, or MUXers, or something. More $$ cost, even for those people not using them

    --> maybe don't even need a ROM on the board at all, just always assume at least one cart is around.. then no switcher needed at all? just have a edge slot, instead of a eeprom ZIF socket?

What do you think of that? ie: Like an Atari 2600 .. entirely dead without a cart, and plug a cart to do something. (the cart being _z80 code_).

-> SD and no cart; modern, cheap, accessible and omnipresent. Everyone has an SD card, and you can stick it into a PC to write files onto. Could skip FAT even, just use a custom PC program (or dd on linux..) to write your code to it; SD is like 4 lines to support.. very easy electrically. But then it'd hang off the sTM32, and the z80 would be asking the stm for its code, which is weird. ie: Since cart is eeprom .. don't want to build a burner into board,and have SD flash to eeprom in order to run.. too gofy.)

Maybe an edge connector on zikzak is the way to go, with a cart included in every kit (and option to buy more carts.) A cart is just a ZIF socket and edge connector.

Damn, now I need to go to ebay and buy some edge connectors and matching fingerboards. I've got some 56pin arcade ones around, but I really only need .. 16pins for addressing, 8 pins for data, some control lines, and some misc; say 32 or 36 pins.

Sheeit, I guess I've convinced myself now.

Someone find a stash of Atari 2600 Combat carts, that we can use for cases :p

jeff
 
What is the male-side of that called, in ebay search terms? In arcade parliance we call them 'fingerboards', but thats arcade-specific.. the 56 pin JAMMA fingerboards, etc. But to search for a 2*16p edge card, what terms would you use?
 
but the interupts, they're what get you. Keyboard interupts aren't as frequent
In most of the consoles, they don't use interrupts for the game controllers, they just read the switches status at frequent intervals.Nintendo using simple parallel to serial chips in their joypads is a good example.

That allows to get rid of debounce circuitry. The status of the buttons is polled so frequent that it doesn't create sensible latency (even if you have surhuman reflexes) in the inputs.

I'd say that for a keyboard it's even less useful than for joypads to get it running on interrupts.

Plan your lab, get it cheapo on ebay, and get hacking
I already have a nice set of cheap tools and components from asia : digital multimeter (my old one's screen was busted and battery leaked everywhere), digital soldering station, diagonal cutting pliers, "third hand", tweezers, a few breadboards, resistors, capacitors, wires, …I also bought, long ago, two "mystery boxes" from the attic of the son of an amateur radio operator. Its content was a good (but LARGE) oscilloscope (with a cathode ray tube, so much old-school goodness :p ), quite a few used electronic parts and assemblies. But also a lot of documentation on radio emitter/receiver some dating back from the time when transistors didn't even exist :D

What is the male-side of that called, in ebay search terms? In arcade parliance we call them 'fingerboards', but thats arcade-specific.. the 56 pin JAMMA fingerboards, etc. But to search for a 2*16p edge card, what terms would you use?
I guess there exist male connectors (IIRC, there where some in an arcade PCB I've seen long ago). But most of the time, the edge of the cartridge PCB is "printed" an cut to fit the female edge connector.
 
Yep for sure, you do it on your pcb .. But for prototyping I just want the fingerboard part and solder onto it :) Can fake it by just using eeprom on board since connectoris just a funky wire .. But be cool to set some up.


An option is to just get some copper clad and home etch some strips of it, but thats pricey. Maybe I can find a perfboard with a edge card connector on the side..
 
Scrounged around my arcade stuff and found some spare bits .. Always hated these fingerboards as the spacing is off so by pin 26 its half a pin out. I got about 50 of them for free 20 years ago due to the defect. I have some good ones for mapping one edge to another but..


These ones hold the spacing well enough to pin 16. I've got about 4-5 of the 44pin edge connectors.


So I'll use one as a 2x16p or so, hack off the fingerboard end and it should do the job to fake a prototype cart when the time comes..

https://www.dropbox.com/s/7braorek1t57zy8/Photo%20Jan%2025%2C%2011%2015%2027%20AM.jpg
 
My wife is having a stroke, me getting 2-3 packages a week, but mostly free stuff.
Same here, my girlfriend just got mad because I received one more package. When I told her how much I paid for them, she calmed down :D
But she might get really mad when I'll receive the 7" 1280*800 IPS LCD panel with its controller board (HDMI, VGA, composite input and stereo jack output).

Especially if she ask me how much I paid for it.

I'd like to use it as a second display, allowing me to play modern and old consoles while she watch tv. (I'll have to hack some kind of support)

It will also be useful for a zikzak or one of those android/linux ARM boards :p

Chinese new year is slowing down my projects. But I'm not in a hurry, I'll wait :)
 
Last edited by a moderator:
Mega sweet!

Got VGA 320x240 super tight working; a one-character change to fix my timer, and its sharp as hell on a real VGA display; 320x480 with a 320x240 framebuffer in RGB8 mode.

This is a crappy dummy image, but evidence is there :) Now I need to load in an image, add some basic animations, just for fun. But I consider the VGA prototype solid.

Real test is to add in a couple extra interupts and whack them at high frequerncy just to see how much abuse it can take before futzing the image, but it seems I have plenty of cpu time to spare.

dropbox image: https://www.dropbox.com/s/8q5u3oecglvk3dp/Photo%20Jan%2029%2C%205%2029%2031%20PM.jpg

jeff
 
Last edited by a moderator:
Back
Top