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


Wish I had the skills. I would love to get involved something like this
 
Keep an eye on this space .. if I get the firmware a bit more pollished, it'll be more accessible; ie: once I add serial flashing to one or both sides, it should be possible to reflash both firmwares (cpu and gpu), and also the cartridge .. just using a usb cable. Then I can knock out some blank carts, and away yo go coding in Z80 :p

Right now my only cart design is for a 32KB eeprom (flashable like above); the 32KB unit there is fairly available still, but pricey ($10 per chip at digikey .. AT28C256). The larger sizes are 'non-stock', so maybe they can get them, but seems like it'd be $pricey and annoying. So larger sizes might have to be eprom (not flashable withotu an extra device), which is annoying. (unless I build a special flashing device as a 'shield' to stack on top, say :p ) .. I may have to go down that road, but I'm rather thinking instead..

.. buy up a few of the 32KB eeproms (since they're so convenient, if pricey) just to have a few on tap; then add an SD card reader as an expansion (can use some of the breakout-pins already on the board, rather than add an actual SD jack right on there), and then use SD for large storage. Its on my mind a little, since I'm tempted to make a music file player, so could use storing a MB or so of tunes; likewise, some bigger graphcis could be nice.. the board is fairly flexible, so big full colour sprites could be doable, but 32KB cart is fairly limiting in that regard.

Still, even with the basic 32KB cart, you can do a fair amount; thats more space than Pacman ever had, and a lot of NES and SNES games.

So, yeah,. if I add easy flashign to the firmware, and solder it up for you, you could probably get going.

It'd be cool to make 20 or 30 boards and get them out to a few people, but I don't relish sitting down and soldering those two SMT chips per board (and how to test, without populating the rest of it .. though I'm pretty good, you can't really not-test them when hand soldering an SMT processor..) - I'm pretty anal careful about soldering right (don't want to short and kill a $20 chip, let alone the whole board and everything already populated on it going to waste) .. so probablty takes me a good 2 hours to populate most of a board. (say 30minm per each of the two SMT parts, and then just another half hour or hour for the rest of it, being careful.)  So I don't mind doing a board here or there, but doing up 10 or 20 would be a drag :)

If I did want to run a kickstarter or something, I'd have to do somethign more professional and get 50 made or something. Also, need to switch to emulated SID, or acquire a stack of AY-3-8913's which are getting hard to find. (Still about $5-$10 each on ebay, is not bad, but thats not a sustainable source.) I've got 5each of all the chips I need on tap for my own use..

If you're interested in any of this, let me know, and if your'e good for costs (like I said, I didn't work it out, but say $100 or less for a board, probabyl liek $80 or something, and thats free labor of course :) I can get the cart flashign firmware going, and settle down some of the firmware APIs. (ie: I can change anythign I want for myself, but as soon as someone else is on board, means I need to get it fairly stable, document the APIs such as they are and get it all proven.. since once its in someone elses hands, and they don't have the programmer units for easy flashing, they're not likely going to reflash the firmwares anymore.. unless I make a cart based flasher, which limits the firmware size.. but iamgein, flash the cart, reboot unit, it reflashes cpu .. lol)

jeff

As to coding for the carts.. its an eZ80, which is Z80 + some whistles, and runs faster by far. You can wrtite assembly, or you can use a few C compilers.. Zilog has a freely available IDE which is okay (Windows, runs fine in virtualbox or Wine under linux) and various open source little compilers and toolchains.

To render sprites and text, is very easy; just drop ASCII into the framebuffer, and good to go.. like in C, strcpy ( framebuffer, "Hello World" ) works. Easy stuff.

jeff
 
It's really tempting. The Z80 stuff has been around forever, and I never got around to playing with it. Might as well do it now.

There's a lot of info on programming a Z80, but my google fu let me down a bit on actually compiling firmware (I'd like be able to do it all on Linux). There's 'SDCC - Small Device C Compiler' here: http://sdcc.sourceforge.net/index.php Would that work?

I'm not too worried about the soldering and anything related to STM32 and Atmel. Buying extra hardware or compiling software to get it running on Linux is not a problem, getting a Z80 toolchain to work on Windows is probably too complicated/frustrating/cumbersome for me (involving virtual machines or Wine you mention or laptop from work and unnecessary complications and general ugliness).

I probably missed it (or forgot, sorry), but is there a PCB for the Zikburner? It might be fun to use an ATmega32 from the spare parts box for that and build it as well. Or could I use the Raspberry Pi to program the EEPROM? It could do the compiling with SDCC as well. What's the protocol (and software needed) to talk with the AVR to program the EEPROM?

It's not that I'm an open source zealot or anything (OK maybe a little), I just want it to work on Linux.

[spam]My 'ARMinARM' STM32 addon board and arm-none-eabi-gcc toolchain / support software for Raspberry Pi (and hopefully/probably for the new Hardkernel Odroid-C1) is out: http://www.onandoffables.com/ That grew out of frustration of the form factor and needing a Windows machine to program the 'Embedded Pi'.[/spam]
 
I only use Windows for gaming and only when crossover/wine fail me and I'm desparate; usually it annoys me too much to need a reboot so I just don't bother. I'm less a purist than I used to be, but Linux and FreeBSD are my preferred environments


SDCC works fine though only handles true z80 iirc; with an eZ80 you have some additional opcodes and so on.. To avoid too muh 'surface area' of learning at once I ended up with ZDS from zilog under crossover or virtualbox and talking to ethernet IsProgrammer (ie; it dhcp's and then zds talks to it over IP, instead of usb or serial programmer)


As to cart .. For the at28c256 32kb eeprom or other eeproms that take no secial programming mode/voltage you can just write to them as (sloW) ram that is persistsnt; so zik urner is not needed unless you just want a dedicated flasher


Zikburner is just a atmega644 (or similar) with a socket (i used zif) for the eeprom.. No other hardware per se; i made a generic avr8 breakout board (basicly an arduinoof my own designn since it has optional ftdi and all that) that could be used as zikburner or i could easily mKe an actual zikburner board .. Just not too necessary


If you want eeproms that take high voltage burn, or a real eprom (that needs UV erase and high voltage butn) that i've not looked into them for zik project.. Keeping surface area reduced again at the onset


So yeah SDCC would do for the cart code or even making your own firmware in z80 pure mode;a zilog programmer (or we could make our own ZDI programmer with avr8 easily) can be handy for flashing an empty eZ80; i use the stm burner for the gpu but any cheapo $10 stm bosrd has the programmer built in so thats cheap.. I could perhaps add a flasher to that from z80 side ..


So uktimately it should all work from linux and in theiry could work without additional hardware but for me right now I do use the extra just-works hardware :) i just flash the carts in zikzak itself


If you are brave enough at soldering thats fun; could give you the bom and tou order bits yourself or if tou like i could bag up some parts


If you just want a pcb i can send you one


Sorry typing on phone with chaos around so hopefully comes out right
 
The cart can be any device of course.. CRt gets 3 and 5 volt and the full address and data bus .. Which goes to both stm and ez80.. So cart could be sensors or other stuff too


I might make a cart pcb thats just a proto oard with edge conn so could hand solder any eprom or eeprm can find, or add PIA or the like
 
Thanks, that sounds reassuring. For now it doesn't bother me much that using SDCC probably means Z80-only, but I'm not entirely sure about the implications.

I'll do a little bit more research first and try to get something going (even if I couldn't test it really) and get back to you.
 
On top of many sick ideas in this thread, heres another..

A lot of expansion could be done on the main system bus via the cart .. but the current design rather wants the cart for bigger ROM storage; but over on the side is the 16bit GPIO breakout from the STM32/GPU. (Really, you can run most of the thing from the z80, or from the stm32 as brain, despite the design as ez80 as brain.. anyway); if you use the really long header pins ("stackable female" header say), then you could stack up a few zikzak boards and use them for an 8bit ez80 multi-cpu board. Imagine stacking up 8 or 16 or 64 of those puppies, with a first-8-pins as protocol (negotiate who is talking to who) and the other 8 pins as data .. it could be nearly the slowest and most useless multi-processing z80 system around :)

jeff
 
I'd be interested in it mainly for chiptune experimentation. From what I've seen it has the potential to be better suited for a purpose like that then hunting down vintage hardware for three x the price. If it's running a SID chip then it'd be awesome. Especially if I could figure how to adapt the keyboard part from a disassembled Casio keyboard I was planning on circuit bending.


Also I'd be fun to stick a tracker program on a cart.
 
Last edited by a moderator:
I need to work on a YM-3-8910 / PSG /YM2149 music player cart one of these days (which implies making an SD reader expansion for it, for mass easy storage), which was one of the things I wanted to build this for. PSG's are still available but getting harder to find (ie: ebay is only real locationm, at $5+ a pop.)

For SID, they're very expensive and hard to find, but there are SID emulators for avr chips.. so throw a $5 avr8 on there instead (or in addition to..) the pokey, and get SID sound (emulated.) Been on my mind as a rev4, but I like the PSG :)

jeff
 
I need to work on a YM-3-8910 / PSG /YM2149 music player cart one of these days (which implies making an SD reader expansion for it, for mass easy storage), which was one of the things I wanted to build this for. PSG's are still available but getting harder to find (ie: ebay is only real locationm, at $5+ a pop.)


For SID, they're very expensive and hard to find, but there are SID emulators for avr chips.. so throw a $5 avr8 on there instead (or in addition to..) the pokey, and get SID sound (emulated.) Been on my mind as a rev4, but I like the PSG :)


jeff
What ever would work best Yeah Sid chips spiked in prices from people using them to make modular synths a few years back. I don't want to think.how many cheap C64s we're gobbled up just for parts for that craze.
I like your crazy invention because it circumvents most of these absurd prices. 100 dollars isn't a lot when looking at similar machines on eBay. Prices spiked again last year, you can't touch anything working for under 200 it seems and anything under 100 is not tested so yeah your project has me interested
 
^ So what you are saying is my C64 has jumped up in price..
 
^ So what you are saying is my C64 has jumped up in price..
Everything has. The only that has dropped in price is Soviet knock off spectrums since the Ukraine has flooded the market with NOS ones.

So yeah your 64 is worth a lot more then it was last year according to eBay trends.
 
Theres the problem I'm facing now .. now that the hardware is 'working fine' (a few more tests to do, but I think its all good), it becomes either i) revise hardware some more (such as change to avr8 emulating SID, and add actual SD slot on board rather than just bodge it onto a gpio header) .. or ii) work on the software side more (which is what I've been slowly doing.)

Software-wise there are literalyl a dozen things needing doing .. such as make a useful bios menu, incuding stuff like usb/serial flashing of various components .. so not hardware needed, just a python script (say) to send your code to a cartridge over usb; stuff like SD shield and filesystem driver; finalizing cartridge layout, jump table in RAM function listing and memory map, write up more BIOS type routines, etc etc.

ie:

The way a cartridge shoudl work is .. it doesn't have its own 'draw character at screen (x,y)' function, it just has a basic bios-library it calls "draw_char (x,y,c)", which in turn just goes to memory_map [ DRAW_CHAR_FUNC_ID ](,x,y,c); so in your game/appc ode, you'd just include "zikzak_bios_lib.h" which gives you draw_char(), and that lib in turn includes say zikzak_bios.h which is a list of function IDs; then in the actual firmware, I'd build the actual bios functions, and the bootup flashed code puts together the memory_map[] array with all the func ptrs. This implies that once I send a pcb to someone, that it should be flashed and useful, and the function-id list is 'done' (or at least, the present functions are not changing their IDs anymore.) And since the cpu needs to talk to gpu, it mean the memory-map itself has to be pretty nailed down, to avoid confusion later.

So.. lots of 'nailing down things' before I'd like to send stuff out.

... unless you want to have a eZ80 flasher handy say, in which case you can just go nuts and flash update later, easy as pie.

If I'm careful, it seems likely I could make the eZ80 side self-flashable .. ie: when you go into BIOS menu, maybe copy its code into RAM and then execute from there, while in turn writing over itself and then rebooting; strikes me as usb/swerial reflashing of eZ80 should work in that sort of scenario, with the possibility of breaking things (until you use a real reflash tool.)

(It is unbrickable, per se)

...

So do I work on software for awhile, or shoudl I really work on a SID-emulating version? (the current one works fine, but its guaranteed only small scale release since the sound chip is hard and expensive to get; if we go with wemulated SID, then sound shoudl be good (not ideal?), and no components are hard to get.

Making a SID board revision probably costs me about $100, or worse case two revs.. ie: $200 :p

jeff
 
How does the sound compare. Even if the emulation has a more unique sound it'd be fitting in a way.


Edit: Damn you autocorrect you are my mortal nemesis!
 
Last edited by a moderator:
Random videos google turned up:

https://www.youtube.com/embed/25h3zTha0kk?feature=oembed

From what little I've read, it sounded like it was pretty good and accurate; not perfect, limited voice count, but say 90% as good as real thing; its been a couple years more, and I've not read up, but it sounded very good. I can look into it.

Who knows, maybe it can run off the cartrodge slot or one of the existing busses (i2c, spi, or even the gpio or whatever), without board modification .. just to experiment with; at worst, one of my inbetween pcbs woudl work to test it .. ie:before switchign to single board computer, I had designed the eZ80 side 'cpou board' and a gpu-side board, and then joined them up with ribbon cables for testing. So I've got at least 10 or 20 of each of those around, fo general projects like this :)

Just a matter of free time.

(And if folks want any of those boards, let me know. Sure, you coudl use arduino or the like just as well, but thats _Too easy_ :)

I bet SID would get some attention, but I should look around, see if there are PSG/pokey/YM2149/AY-3-8910 type fan sites. I've never really publicized zikzak too much, since its just my own little thing. But maybe people would like it..

jeff
 
Looks like the SID chip pinout itself is very similar to what I have now (different pin order of course, but more or less similar.) More address pins go in, no big deal; same address bus (though maybe could be back to real address bus instead of gpio like I had to use for pokey to work); a chipselect, a clock; a single audio out instead of 3 (it does mixing internally); so on the surface, would be pretty easy to change the board to use a real SID; now, the emulated SID tries more or less to be the same, but again different pinout, but no big deal there.

But the actual reality may be funny, hard to say; ie: the actual SID wants to have its clock come in at 1Mhz, and it only transfers data in/out when the clock is high; I didn't check the timings out, but its entirely possible that with a higher speed system clock it'd never work; with the pokey I'm using a much slower audio clock, but that drives its internal business, not when it accepts values on the data bus. So it might be that I'd have to supply a 1Mhz oscilator (fine), but that oscilator may or may not land at the right time to take values from the system bus; so it might end up being that its clock ahs tobe controlled by gpio, and its data bus be from gpio, so that it can all be done 'just so'.. but that ends up slowing down cpu processing, and becomes pretty messy (another pin to grab from somewhere); maybe even the address bus would need gpio, who knows.

So, just making a little board and wiring up gpios to a real or emulated SID woudl be easy; but integrating it _nicely_ into zikzak will take experimentation (and can't just knock out a oar dand see, since it'd cost me say $70 or so to do so.. ugh.)

On the upside, maybe easy to experiment with since zikzak is pretty open:

- could pull the pokey audio chip out of the socket (I always use sockets for valuable ICs :)

- use a cartridge pcb, and hot-glue the emulated SID onto it, 'dead bug' style (pins flattened out, or chip upside down)

- jumper from cart contacts onto the dead bug emulated SID, and also jumpers from the socket for pokey on the zikzak

   .. ie: use the pokey socket for data bus (gpio), chip select, some of that.. but get the address bus from the cart port; with luck, could use data bus from cart port (the real system data bus) instead of gpio, to try which one works.. going back to system bus would be awesome

- then use oscilator of various speeds .. might be that getting the right oscilator multiple of system bus woudl make it all just work

Also good, with the emulated SID, the code is open source; I could just tweak it to work the way I need :)

.....

So actually seems like, with some hackery, could make a test SID cart, and find out how it integrates at near $0

I really should finish up my prototypign perfboard-cart-pcb (a cart tats a blank, with solder holes all over it, maybe stick a small breadboard onto it with glue :) for these sorts of tests.

..

One more thing for the pile of experiments to try, at a very slow rate that I get time for :)

jeff
 
Free time seems like a thing of the past :/ I do get half an hour or so of dead time while my little guys are falling asleep, but can only do so much during that small interval :/ (and usually been Hearthstone, lately :eek: )

I think I'll look into SD card protocol a bit (SPI, etc), should be very easy to work with; will have to look into building a FAT filesystem API in C, with a HAL abstraction so I can do it from Z80, STM32, or avr, and use it in various projects for data logging or whatever. (Like image capture from camera, and dump to SD etc.) With a working SD and FAT, shoudl be able to read MODs or chiptunes and make a lame little music player, which could be amusing. (Also as an excuse to look into audio amplifier chips, etc.)

Zikzak playing music :)

jeff
 
I did check his site out at one point, hoping to glean some info :)

At one point a year or more back, I actually started designing around 6502, 68000, 6809, to see how different they were at that level; the 6809 is a mighty chip of course :) But in the end, none of them are all that difficult to design for, and at the most basic level are fairly comparable. I went with Z80 sort of arbitrarily and for fun, since its simple and dirty, and was so wildly successful in its day.. and is still available. (Keeps pricing down, makes it easier for others, etc.) 6502 and such, hard to get. Its why I nearly need to cut away from the sound chip I'm using, since its increasingly hard to get, and pricey as heck.

You can even run a Z80 entirely by itself, with just a couple of resistors :)

I'm pretty sure I have schems around with zik6502, zik09, zik68k and such :)

I'm not halted in this project, just suspended a bit due to RL kicking my arse good; layoffs at work again, and huge, really really huge government project on our table.. so working day and night, and doing as best I can to be a dad too :) Totally no free time again :(

Goals for the year are proceeding well though .. lose weight (I'm down 38 pounds since Oct!), read Silmarillion (just finished it); additional goals are read (some of) Nea; Stephensons more challenging stuff (The Confusion/etc), and more Zikzak.

For Zikzak I want to work on a couple 'shields' .. expansions for it; SD card reader slot shield, and maybe a solid audio amp expansion. I need to write keyboard drivers and such too, and port NuttX or Linux over now that the last revision had a pile of RAM.

Oh, and as the ROM cart chips dried up, I need to investigate compatible convenient options there too.. I sort of want to put together a half dozen carts, that I can use for various things like a music player and linux cart and such. The eeprom I use, I've got a handfull of, but they're 32KB and hard to get now. I'm thinkink I'd like to get something thats electrically wipeable without using high voltage, and a much larger size .. but prices go up very fast in that arena. Hence the investigation of SD shield/cart.

--> so given higher on board RAM (128KB-512KB in last rev), plus a cart with say 32KB of boot ROM, and an SD reader on the same cart or a shield, should be good for a lot of things.

Could also be amusing to make a ethernet or wifi expansion..

.. or another physical rev, with SD slot right on board etc :p

jeff
 
Back
Top