Why mod.. when you can make?

User Tools

Site Tools


blog:winter_is_coming_.._back_to_zikzak_hacking

Winter is coming .. back to Zikzak hacking!

On 3d printing and cases..

It has been too long since I updated this blog space - about 10 months or so; i actuality, the last zikzak hackery was probably 6 or 8 months back, as I started to think about making a case for it, which led me back to the idea of a 3d printer .. and to buy one, or make one from scratch? I ended up tooling around with designing my own CNC machine (cutter) and combine it with a 3d printer (additive) - they're really the same machine design more or less, where you cut with one and draw with the other, but the same x-y-z machine, right? Well turns out with CNC you make waste, and little bits of wood or metal are flying off all over the place so you need a vacuum and a shield, and its noisey as all hell. Awesome to be sure, but just not as useful for me, right now. Also, its a lot more stress on the machine to do CNC (lateral grinding) than to just draw out a bead of plastic. Of course, drawing plastic is a whole world of pain too – thermal control is a nightmare, to heat and cool at just the right spots (cool on top, so molten plastic doesn't spooge out of your assembly; hot inside, so it flows; cool again, so that it doesn't melt all over the place and puddle, when you want it to stick; then heat underneath, so it doesn't cool _too quickly_ … ugggh). In the end, I built a incrementally better and better 3d printer, and then started merging in pieces from kits since I got less interested in designing my own printer to actually wanting it to be productive… so now I've got a beast half frankenstein thing of mine, with some really nice kit parts to make it work. So there, that was last winters project :) Then summer came.. and well, with a 3d printer, and summer, what things can you do … so I designed and flew a tricopter and quadcopter. Designed and fly RC machines is really tricky stuff.. but success! I suck as a pilot, but the blasted things work.

Did I end up with a case for zikzak? Well .. no. Not yet. But I've got a 3d printer, and learnt enough CAD that I could.. and thats a whole other exercise; the zikzak sbc rev3 pcb is a pretty nice board, but all the jacks on it are just header pins .. I figured at the time, just mount jacks on a case, and run the jumper wires to the header pins.. good to go right? Jacks take up a lot of space, and the pcb is already pretty darned tight, and you pay for every mm of size on there. Well, in practice, screwing metal jacks onto a printed plastic case is asking for cracks when those jacks are used (especially cartridge ports with a lot of stress around them.) The jacks should really be on the PCB, where you can screw them down and have a lot of solder, so they're good and sturdy, and no janky jumper wires to get loose.

On PCB change ideas

So since the PCB will want jacks right on it, I'll have to get serious on there; space is tight, so maybe some of the extra headers may have to go. ie: Theres a lot of 'BoB' (breakout) headers there that are redundant.. ie: I expose GPIO 'B' as a 8pin header on the board, in case anyone wants to use it for general expansion (such as an SD card reader..) - but GPIO B is already used for the audio, for the most part. My thought was, you might not populate the audio chip so could freely use the GPIO port, or even with audio present.. you just make sure to flag the chip as unselected and then talk to the GPIO; should be doable, though I didn't prove that much yet. Anyway, so the GPIO is a row of pins on there, and also routed to the audio chip. There are things like that scattered around the board.. the same pin offered in multiple places for convenience; also, power pins .. I traditionally put a power-in set of pins on my pcbs, and also mirror them on the other side .. so you can chain boards together easily; also, if I want to do testing, theres some handy ground and various power level pins right there, for jumping over to other test points etc. Handy… but redundant. So eliminating a lot of these extra pis is sort of a shame, but also opens up a lot more space. Also, the pcb is laid out pretty nicely, but I could cramp it up more, really jam up the video portion and get some space back.

So, can I make enough space to fit o a pile of jacks? 1-2 joystick jacks? VGA connector? headphone jack? power in barrel jack? and so on…

There are other options to change on the PCB, but the main driver is the needing to put jacks on it.

On proving the pcb..

Most or all of the stuff on the pcb has been proven at one point or another… but certainly on zikzak sbc rev3, not everything has been. ie: the ps2 keyboard code was tested on an atmel atmega chip way back i early zikzak experimental days; the schematic didn't change much ever since, but the host is now a eZ80 chip.. entirely different. It _should_ work, but _did_ it? Well, before rendering another set of changes to the PCB, I had best be sure everything _really does_ work, right? Being 'likely' versus being 'proven' is a big pile of work.

I've ordered a bunch of each needed jack from ebay.. ie: ps/2 keyboard jacks, vga jacks, etc.. the kind meant for mounting onto PCBs. I can't work on the PCB changes until I have those parts - need to measure each part, and create CAD objects for them all, so the CAD knows where the pins are and how much space I need around them, etc. It'll take 5-6 weeks or so for parts to arrive, so that buys me a couple months to work on the code, to prove everything.

Re-proving all the various parts of the board is quite a bit of work - text modes, sprite modes, resolutions, two joysticks, audio, keyboard, serial*2, ram, rom cart, vga colours, … probably others.

On new parts

Some of the parts I’ve used and have 'on tap' are end of life now. I've got a couple of each around, but not enough for 'long term' just to be safe; if a part is cheap, why worry.. just get a few. The edge connector for the cart ROM is pricey (about $4ea give or take) so I need to find a good source, but I've got a dozen of those. For each of the jacks (vga etc), I've gone and ordered 20 of each .. shoudl be enough for awhile; who knows if anyone will ever want a Zikzak, but that should allow me to make a few, anyway, and have plenty for me for pcb testing over a few more revisions. Fine. I should order some more CPUs and stuff, but that stuff is 'overnight' from the supplier.. so once all the jacks are in and the pcb changes are done, I'll see about ordering some of those..

Of interest is the general purpose microcontroller (ARM chip) I use as a GPU, has a new version available; its a pricey begger - around $20ea. The STM32F4 model is still available and great, but there is now the STM32F7. Its slightly faster, and has a bit more RAM, and some tweaks; nothing earth shattering, but all stuff I'd like… but in the end, the 100pin package is not quite drop in replacement for the STM32F4. I've still got a half dozen STM32F4's around, so I'm not going to orphan those. Thje >100pin packages are drop i same for the F7 and F4 chip, but I don't really plan on going to those larger chips (144pin and up sort of thing); just too much soldering for those, and I don't need the features per se; some tempting stuff in the larger packages, but see the Zikzak design rules.. trying to keep it simple and dumb and fun. Going to the larger chips is sort of cheating. We'll see if I can make space for them, but not likely..

The 32KB cart eeproms I use are hard to get; the larger sizes (512KB etc) are bloody impossible, anymore.. ie: very expensive now. Luckily, there are new flash type chips that have nearly the same pinouts as the old eeproms, but are way way WAY cheaper as they're used in modern equipment; so I may update the ZikCart pcb to use these guys .. and order a pile of them. A buck a chip, come on, right? And jhaving carts with a megabyte of space on them as is awesome.

A similar story for RAM; I've got 10 RAMs on tap already though and I think I can still get them, so maybe I'll get some more, just to be safe.

On productionizing..

One thing I've always ignored since Zikzak is mostly for me but.. say it goes out into the field, it'd be nice if it could be field reflashed; ie: brick safe. I've so far not written any cohesive firmware .. just a pile of test cases and little demos. But if someone else wants it, they will nearly want a standardized firmware so that a couple cart games could be made, and work across machines. But if I throw together a basic firmware, surely people may want to reflash it over time as updates happen.

So how could people reflash in the field?

(Without requiring people to buy the flashing gear; its not crazy expensive, but an extra $100 saved would be nice, right?) .. so there are a lot of options.. build a bootloader into the cpu and gpu, so that a PC could talk serial over to them and pump in some code? or make a cart that can reflash one or both of the chips? or make it so one chip can flash the other? Lots of options, but need to mull it over. For me, I can just jack in the programmer and flash away, but need to think about other people.

Also, need to work on the firmware, sample code, sample cart and mini game, etc, before I can say the project is 'done'.

… and oh yeah, make a case :)

On ps/2 keyboard proving

This post is already alarmingly long but eh.. I spent a lot of time this week working on some keyboard code and debugging it; debuggig interupt based protocols on unproven hardware is a special kind of madness, but suffice to say.. the code is now working right, and the pcb is correct after all. I was beginning to lose it, suspecting bad solder, or buggy compilers, or bad documentation, or who knows what.. but in the end, learnt some good techniques for low level debuggig, and got it workig a treat!

–> so time perhaps to make some lame little keyboard demos .. show typing with characters appearing on the glorious 8 bit screen? or maybe a lame 'piano' demo like the old 8bit machines always had in their manuals to type in in BASIC.. type a 'a' to hear an 'A' tone, etc. Hmm.

Discussion

Enter your comment. Wiki syntax is allowed:
 
/home/skeezix/public_html/zikzak.ca/zikzak.ca/dokuwiki/__data/pages/blog/winter_is_coming_.._back_to_zikzak_hacking.txt · Last modified: 2017/11/11 02:58 (external edit)