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


That was sort of what I was expecting tbh ... some mod from another old gadget.

A VHS cassette would be pretty awesome I reckon.

When you get around to it :) ...I know you got more technical stuff to work on it prior to considering a case seriously. I'm interested though to see what that might be in the end
 
That was sort of what I was expecting tbh ... some mod from another old gadget.

A VHS cassette would be pretty awesome I reckon.

When you get around to it :) ...I know you got more technical stuff to work on it prior to considering a case seriously. I'm interested though to see what that might be in the end
VHS?  Psshh... Beta!  or maybe even 8-trac!  ;-)
 
My desk is a mess, but I dig it. I like to think my little office is crammed full of mad science, to inspire the kids. Arcade bits and bobs, old retro consoles in a closet, another closet full of my project gump.

As a house rule, anything electroonic that is dead or trash or unworky .. we take it apart! We fix stuff if we get time, but mostly I like to show them that shit comes apart. My oldest is 6, so I think it helps.. So now I have bits and pieces of kid toys stuffed in little bins.. you never know when you need to attach a old toy clown head onto your RC equipment, scare the hell out of someone.

Anyway, I have the small part of the desk, where I actually do my RL work; its the part I don't like much, so its squirelled into the corner; then the rest of the desk is my giant breadboard*, various components and tools. Batteries for my car/tank/thing RC experiment, bench power supply, Hakko solder station, oscilliscope, mini-TV and adaptors, so can show the VGA signal on little display on the side. As I'm, in the ounces of time I get, prototyping and testing the IO stuff right now, it means the breadboard has VGA port, joystick port, ps/2 keyboard port, and power supply regulator on it, and the PC USB reflashing stuff. Not too much really, but, hjaving a joystick I bought in 1987 sitting on my desk. .. that makes me happy :)

* When you buy little tables for kids, amny of them can come with LEgo surfaces on them; how come grownup desks dont' come with breadboard surface built in? ;)

jeff
 
I see the typical cheapo hot air rework station there; I'm seriously thinking of picking one up, but not sure I'd use it much; still, cool to have if you want to do solder-paste SMT soldering.. which I do :p I use a hot air gun instead, with a fine nozzle..... burn up half the desk though :)

..

As always, with this cheapo zikzak design, the problem is VGA; offloading all the work to the IO mcu now, and it still has to talk to VGA somehow; using i2c needs only two lines, but does 'suggest' some heavy interupt handlers for the i2c dialog. Could maybe do it without interupts, but bleh. I might use the 2 lines for i2c, and a couple other free lines, and do my own bitbanged 4-wire-interface or something.. some basic slow lame protocol, that is very lenient to timing, so the VGA coudl do it at leisure during vblank. Or maybe a better idea is a vblank pin, which I currently donm't have I think on this design (had on zikzak r3) .. then the IO coudl monitor vblank, and only raise i2c during that time frame.... hmmm, that might be best.

.. oh, if only I had more than 5 minutes at a time to think about things :)

jeff

edit: with a tight little asm loop, I was able to get the higher resolution working again, but I've not spent any time on that since about 6mo ago.. but getting 200 or 250x240 should be doable again with this.

As noted before I'm going to aim for really low quality firmware up front.. just working on getting harsware together and basic prototypes to test thingsa, and then worry about fancier software as time goes by. So basic text mode and very low res raster graphics, shitty sound up front, but working keyboard and joystick and serial/usb out and so on. But adding in nicer text modes, higher reoslution, fancier audio etc, is just a firmware update away.
 
Last edited by a moderator:
I made a 1 bit computer when I was younger. It had a switch for binary input, a button for the clock signal, and an LED for binary output. But I kinda cheated, using a 1 bit CPU from Motorola. It was neat though, it was portable and battery powered. Unfortunately I dropped it and it broke. :(
 
.... woowoo!..

I've got a ps/2 keyboard library working now, seems to work; I don't think I handle shift or caps-lock right or other special keys, but who cares.. can read most of the keyboard okay :) just need to post-process to handle shift, someday.

Joystick works as well.

If I get a moment later, or tomorrow, I'll see about writing an i2c master-side handler for the VGA generator mcu, or perhaps just bitbang something together. (i2c is a little 'heavier' than I need, since it has the concept of 'address' and two way communications; we dont' need an address and really only need one direction communications; so I can use the i2c pins for bitbangm, or later convert to actual i2c. For bitbang, just one pin for clock, and the other for data; or maybe 3 pins .. clock, data, and ackowledge. Anyway, something easy to do, so I can see this stuff in action.

Goal of the next day or two .. type on keyboard or joystick, and see it reflected on the vga screen. An 'input tester' of sorts :)

Zikzak r5:

VGA low res - proven

Joystick - proven

Keyboard - proven

Integration test - get them all together - ASAP :)

Pretty soon then it'll be hooking up the z80, RAM and ROM, and get the full circle communicating .. z80 -> IO -> VGA.

Sooooon, my pretties...

jeff

I made a 1 bit computer when I was younger. It had a switch for binary input, a button for the clock signal, and an LED for binary output. But I kinda cheated, using a 1 bit CPU from Motorola. It was neat though, it was portable and battery powered. Unfortunately I dropped it and it broke. :(
Was it programmable? (ie: ROM or flash or something?)

jeff
 
Hmm, debating IO -> VGAs comms again.

Constraints:

- lots of pins on VGA available (now that IO is doing all the funny business)

- not many pins on IO available (now that IO is doing all the funny business)

- assuming Z80 -> IO -> VGA, so we want to minimize any additional latency

  (not that since we have IO in the middle, and framebuffer or sprites possibly on either/both IO and VGA, its not as bad as you may suspect; z80 can issue command like 'move everything up' and IO and/or VGA can just do that..)

- VGA has to be non interrupt driven messaging (or at least, interrupts only occurring during vblank)

Again, this is a subsystem that can be improved enormously later, but I am going for the Cheap Fast Hack now. Limited time means cheaping everything :) Once the VGA code is written nicely and tightly, we can get much higher reoslutions, and much more flexibility in communications.

Updated schem so far:

zik80-003-schem.png

So you'll notice I moved the VGA stuff all to one side, so the other is free; theres not much free on the IO chip, but we can use the 2 i2c pins, and a cople of the ISP programmer pins IO_MISO and IO_SCK, and VBLANK. So thats 4-5 pins available on IO.

Some easy options..

- i2c as intended .. leverage some hardware in the avr mcu's, but tends to imply (but not require) interupts at haphazard times. We could probably do it without interupts, but meh.

- bitbang it out; not too bad, but at fist blush lots of twiddling pins to ACK receival of a bit or bitpair, that sort of thing; given our slow speed (currently default 8MHz on the avr, or coudl add a clock to drive it up to 16 or 20), all those twiddlings will slow us down, and also get in the way of the VGA mcu, who is busy as hell. We'd end up only getting a few bytes over per vblank or something

- SIPO shift register (serial in, parallel out); this would need 4-5 pins .. data pin to register, shift clock, store clock, and maybe a 'data is ready' to the VGA mcu; we can use a single register, or even two (chain them together for no additional pin cost.) This would get us an 8bit or 16bit parallel right into the VGA. Its still 'slow' (we have to twiddle pins on the IO chip side), but its fast on the VGA side (it can, at its leisure check and see the 'data ready' pin is high, and then just read the byte or two off the side, and thats in.

---> so the SIPO register may be the way to go; any work/twiddling is done on the IO chip side (slow, but not screwing up our VGA display) and then twiddle one pin and boom, the VGA chip gets it.

So if we use 2 registers (16 bits), we can do something like a packaged command-message:

byte 0: command (or even, if limited to 16 commands, could be 4bit command, 4bit data)

byte 1: 8bitdata

example commands:

in text mode:

cmd 10: block data receive, see data for block length (then receive 2b data blocks until count is done)

cmd 11: set cursor X, see data for X coord

cmd 12: set cursor Y, see data for Y coord

cmd 13: append character, see data for character

cmd 14: clear screen

in graphics mode:

cmd 10: as above .. receive say a sprite data, or raw (x,y) point data, or (x,y,x,y) line data...

cmd 11: clear screen

cmd 12: set colour

.. etc.

So that'd work pretty well as a protocol to VGA.

(and framebuffer woudl be on VGA, and maybe some buffering on IO. So its a serialized interface to text/vga, which is goofy, but simple.)

(for true RAM bitmapped framebuffer, you just don't get too easy an interface; go back to zikzak-r3 for that sort of thing in minimal form; if we want bitmapped RAM onto screen, its going to be adding another bigger VGA chip or designing our own discrete video card, or other various heavy options; for this low low end, minimal chip count zikzak, it seems out.)

But how fast would it be?

vsync itself is only 3-4 'lines'; 'back porch' is 23-30-odd lines. VBLANK is the combination of vsync and back porch. I forget the timings entirely and too lazy to work it out, but at 20MHz we get say 100 instructions per line (wild guess.) If we're 8mhz, .. half that.

FWIW, the 20MHz clock on the board can probably drive both mcus (no need of a second clock); worst case, we have the VGA CKOUT pin (clock-out) turned on, and drive IO; in theory having both at 20mhz should be fine, just not done yet.

So we get up to a couple thousand cycles in IO, per vblank.

cycles needed at least, per datum are..

begin loop:

  set data pin                                     1 cycle

  set registers shift high                     1 cycle

  set registers shift low                       1 cycle

  shift data over                                  1 cycle

end loop                                             1-2 cycles for the loop handling

<do the loop again, for second byte>

set registers store low                        1 cycle

set registers store high                       1 cycle

.. so about 100 cycles per 16bit at a WAG (wild ass guess)

this suggests about 40b or more sent through the pipe during vblank. Thats not too bad. I mean, for text mode its plenty. For graphics mode.. for linedraws and such, its not too bad... but raw 'heres a pile of data', its pretty crummy.

ie: Say we're doing a 40x40 low res screen, we're talking 40 VBLs to render a full screen .. ie: 2/3rds of a second just to draw a full picture. If we'r doing a high res screen, say 240x240, its many seconds to update the full screen. Poor.

Not to mention that we're talking z80 -> IO -> VGA, and the z80 is pretty damned slow (and the multi step latency etc.)

So this suggests we want a command based protocol, leveraging the mighty framebuffer on the VGA (currently a whopping 4K, but if we use a atmega1284 I've got on hand, thats 16K, which is a raw 120*120 display without any tricks at all. If we do small sprites, we could do a lot of tricks, or compress things in various ways.. or add external ram to that guy, etc and so on.)

ie: in graphics mode, we'd want to limit how much data we're sending per second, as dumb as that sounds

....

So, hmrf, maybe using a SIPO shift register or two would be a neat way to get data into VGA, easily and 'fairly quickly', without much brains on our part; but at the chipcount +1 or +2.

.... and really, it all makes me want to toss this whole thign out, and go for a real framebuffer again. It was really fun having a true framebuffer in zikzak r3 .. made coding very easy, made everything fancy and high res and fun. But pretty complex, and a nightmare pcb to design, and expensive to make :)

Going cheap and dumb and spare time sure makes things painful :)

jeff
 
I've started working seriously on something (I mix various project into one, to get motivation xD ).

Right now, the SNES joypad circuitry is linked to an arduino (via the ScrewShield I was finally able to solder since I got time, solder, flux and a serious kick in the arse from myself).

The arduino now get back the values from the "joypad" and display them as a binary and decimal number on a serial console.

It's quite a mess, but it works.

DSC_0082.jpg

I'm wondering if I'm going to keep storing the values in an unsigned int, or if I'll go with an array of booleans…

Next : getting the arduino to talk with a LED driver chip :p

EDIT :

So I've got an array of bools to manage the inputs, an emergency button and the elevator can manage one floor to attain at a time. \o/ yay

Let's find back those LED drivers!
 
Last edited by a moderator:
Screw shield.. cool idea. I've got a few screw terminal strips I use, but in the end I picked up those 'flip latch' type tgerminals.. press a button, slide the wire in, let button go to grip. Pricey little beggars. Nice little screw terminal strips like on there.. groovy :)

Nasty spaghetti you make sir! :) Almost as messy as mine :eek:

Are you saying you're going to hook up a SNES keypad to an elevator?

I mean, I was pretty plweased with myself for reading joystick and keyboard .. but jimminey, I don't shuttle equipment up and down with it. I really should drop everything and do fun stuff. I mean, go back to my robot car and add a potato gun or something. Screw this! *destroys zikzak*

jeff
 
I picked up those 'flip latch' type tgerminals.. press a button, slide the wire in, let button go to grip. Pricey little beggars
I go for the cheapest I can find, "flip latch" terminals are awesome but expensive :p I found that shield on watterott e-shop, they're not the cheapest but they were the only one to sell what I needed at the time. So I just added that nice shield to my order.

Are you saying you're going to hook up a SNES keypad to an elevator?
More or less, I'll use the circuitry you can find in a SNES joypad to spare some I/O on the arduino.Now, for 16 buttons, I only use 3 pins on the arduino, data is serialised. (in real SNES joypads, there are 4 inputs sacrificed. IIRC it's for the SNES to recognise which device you've connected to the port, joypad, mouse, …)

And if I want 16 more digital inputs, I'll just use another "joypad", the same clock & latch pin and use another pin on the arduino for separate data channel. (another solution would be to add one or more 4021 chips to the "joypad", each of those chips adding 8 inputs)

really should drop everything and do fun stuff.
Well, I only used that circuit because it was more or less ready to use in my "stock". Other options would have be to use I²C and I/O chips, but since it's almost Plug&Play I feel it's less fun :D And now that I've used SNES+ with an arduino, I'll be able to mess with the zikz80 (or with the Z80 retro computer I'll create myself) I/O chip and get it to talk with NES and/or SNES joypads ;)

Back on my spaghetti plate :

I've found my LED driver chip TLC5940, too bad it's going to use quite a few pins (5 IIRC). But again they can be daisy-chained. So once one is connected, you can add many of those. And since it's going to control 16 leds, one should be far enough.

My final aim is to have a completely modular design so that I'll be able to re-use parts of it for other things:

Code:
mother board - Arduino (don't know if I'll use the arduino and shield or going to design my own board…)
├ daughter board - SNES+
│  └ buttons/sensors sub-boards (I will probably have to use 12Volts, since wires are going to be lengthy)
│
├ daughter board LED driver
│  └ leds sub-boards
│
├ daughter board wench control (with relays able to pilot 220V and high Amp current)
?
 
Last edited by a moderator:
yeah, I started to go down the 'everything is modular' road.. bunch of IDC connectors and ribbons, and trying to 'standardize' (for myself) some of the communications, but I found that.. it'd end up taking a lot of time (for the projects I've been on), and add a lot of overhead; ie: woudl end up running 4 interconnected boards and a bunch of cablkes, or just make one smaller dedicated thing, that is more reliable.. and move on with life?

I suppose as in all things.. depends what the project is, what you want to do etc :)

The important thing is the new mantra I heard awhile back .. 'Safety.. third!'. "Safety first, well, until it gets in the way of fun.. so safety third" :)

jeff
 
I don't plan on making every of my project modular.

But having pre-made PCB ready to be wired to any µcontroller is nice for experimentation. Breadboards are a bit too cumbersome when testing complex thing.

And I want to make that elevator as modular as I can and easy to expand if needed (even if it's not really useful for my brother's house :D )

Now, the problem I'm facing is that the TLC5940 led driver needs a shitload of cables and seems pretty complex to pilot. So I won't use it, I'll swap with a Max7221 that can be used with a SPI interface.

I ordered some samples from maxim, that includes an I²C RTC too.

I would like to make a compact pcb to fit into the pandora featuring RTC, motion sensors and maybe what's needed to control a small vibration motor.
 
Last edited by a moderator:
yeah, seems like.. on a breadboard, once you get a piece working well, may be best to carve it off and perfboard it? But I rather like a big breadboard, get everything going so you can play with it.. but theres a maximum size you want to do, unless you're using the vbery beast BBs.

I have a 3-BB piece I use for day to day stuff, its really stiff so have to use needlenose to get wire sinto it.. but you can be pretty sure nothign will just pop out, either. But my Big Breadboard Monster with 10 BBs stuck together, is the cheap stuff.. think I paid about $6CDN each .. still added up when 10 of them, but theyr'e still cheapies; work werll enough, but often enough a wire will get loose. When you're dong 10 ICs on there, with bussesa all over, any one wire loose could spell diosaster, and finding errors like that is hard in a BB mess.

I'm sort of debating myself .. once I get the shift-regs and bus going between the two mcus (IO and VGA), maybe I shoudl carve them out; the z80 will talk to them via a bus anyway, so that'd be an easy opportunity to use ribbon cables, and I have some 8 and 16 pin IDC connectors, and probably 20' of various ribbon cables (and IDE and floppy cables :) to hack up. But maybe that adds complexity....

On the bright side.. I just received a vacuum desolder rework station! It wont' be somerthing I use every day, but in the end I thought screw it.. its cool to have, and makes certain things (mistake fixing) way easier. And I make too many mistakes :) I keep thinking.. for a $150 machine, I could buy a fair number of perfboards and IC sockets ... so its hard to amortize, unless you're looking over years. But I'm thinking.. if you're 4 hours into asdembling a board, and then screw a bunch of stuff up (I've been there), it might be worth it to just vacuum out a socket that was misplaced and re-place it.

Also thinking I need a little work bench; slowly dropping hints to the better half, so that she'll be more prepared when I come home witrh a heavy steal-frame bench to sidle up beside my desk :) (I have a small office in the basement, and with my bookshelves and cupboards brought in, I've got no space.. but a little 3' space beside the desk (where a perma-locked door is) could use some bench.. something to affix vice's too and bang things on; maybe make a permanent solder station there, etc, keep all that off my desk. (yeah right.)

I've rather decided my 'home office' is poorly named; what self respected madf scientist woudl have an 'office', when you can have a _lab_; no desk.. I want _bench_. Not sure what the difference in lab versus office is, beyond naming and psychology, so I've also ordered a electric microscope.. the USB kind; its 50x-500x, cost _$11_ in auction (lol!) .. normally about $50-$150 ... we'll see; a good binocular solder station costs a lot, since they're heat resistant and let you have a few inches clearance; a normal microscope has, for 500x-800x ... no clearance; like, you rest the instrument right into the slides, with oil sometimes. But with these adjustable ones.. we'll see if I can zoom out to 50x (more than enough), and hold it like a wand (steady enough?) in hand, maybe an inch or two from project.. sometimes be nice to see a trace zoomed in. I use a magnifier lamp with ring light, to get brightness in and get a peek.. but end up perched in awkward stance too often; pulling up a microscope on the big 20" monitor could be the trick. Certainly *awesome*, if not useful, but I hope its useful when inspectin gbad traces and solder joints. I mean, the kids will maybe think its neat/dorky to inspect dead bugs or something, anyway :p

Christmas is coming, I deserve a few toys too!

jeff
 
You're lucky! I'd love having enough space here to have a desk or a bench :D

Right now, I work on the living room coffee table. So I can't leave my tools and my contraptions there.

(that's probably why I want to make ready-to-use pcb to get rid of a part of the breadboards)

I discovered a dev kit for a small 1.44", 128x96 pixels, e-ink display, I'd love getting one to mess with.

Too bad they're so expensive :( (about 38€ IIRC)

Maybe as a self-gift, getting the board and some screens. :D
 
Last edited by a moderator:
I keep resisting little displays; neat.. but... I go with USB-serial, or a 'real display'; the little guys.. hard to work into the projects I do. But so so tempting!

Theres a 'junk shop' near me; fairly pricey, but a dozen long walsl of piles of electronics junk, old test equipment etc; neat place, but usually too pricey to work with. T'other day I popped by while stuck in a traffic jam, and he had a box of displays, unm,arked.. "$10 ea, with touchscreen". Curious .. were they 'text displays' (like a LCD 2 line display, but these were large.. like 4"x6" or something..); There were some controllers on the back, so with some googling I found out the displays were actually bitmap graphical displays, for UI panels on air conditions; company made kabillions of them, and had too many, so was dumping stock. Not really high resolution, somethign like 100 x 75 or something, but big and touchscreen. Sort of tempting.. but on the spot, I couldn't find out refresh rate, nor backlight info (didn't look like they had any lighting, but what do I know.) If they were backlist, could use them as test ewquipment screnes (voltage readouts or something?), or little bitmap graphic displays for a zikzak-semi-portable if refresh fast enough ...

But $10... that was damned hard to resist, but somehow I managed.

Waiting for my Picade to show up sometime, maybe January .. little arcade machine, with a VGA/HDMI big LCD panel in it; that'll be my secondary display, and take up a fair space; waiting to use that. Avoiding buying more screens till then. *tries*

jeff

edit: wow, look at this.. $35 for a VGA LCD panel with a fancy little control board on it. Neat.

http://www.ebay.ca/itm/7-inch-TFT-Car-LCD-Display-Module-w-VGA-Video-AV-Board-Optional-Touch-Panel-/291020349128?pt=LH_DefaultDomain_0&hash=item43c22a1ec8
 
Last edited by a moderator:
Back
Top