uController recommendation for tiny ZX80 project

For a hobby project (proof of concept that Z80 code can be recompiled into any other machine code by a smart software) I am looking for a recommendation for a microcontroller. I have worked with PICs before and even squeezed a video signal out of them, but I need a little bit more power this time:

Requirements:

- RAM 1k

- ROM 6k, better 8k (the original ROM is 4k with not a single byte left)

- Must be able to pump pixels out at about 5MHz, maybe less if using a shifting register

- small footprint. I really need only 3 io pins: IR in, video out, sync out. So ideally, an 8pin SMD case would work.

Any recomendations are appreciated.

Matt

Reply to
Matthias Melcher
Loading thread data ...

Didn't the ZX80 have some help pumping the pixels ? The 1K is the main problem in small packages.

Only part I know that has 1K RAM in So8 is the Z8F series from Zilog

- and that might appeal, because it comes with the genuine logo :)

Why such a small package the ZX80 did have a keyboard ?

Or, try the SiLabs C8051F311, in QFN28, smaller than S08. Or, if you want to load SW via USB, look at the F320 and F340 families - the latter have 48MHz variants, in TQFP32.

-jg

Reply to
Jim Granville

The ZX80 has 20 or so 74... TTL chips, Z80 CPU, RAM and ROM. That's all. It uses a simple 8bit shift register to get the video data out. With todays CPU speed, I should be able to get around the shift register as well.

The goal is to get everything into a Cinch plug and make it the smallest ZX80 ever. The keyboard is some dsettop box platic thingy that connects via infrared. SO the Cich plug would contain a crystal, MCU, battery, and infrared sensor. This would probably be the most easily lost home computer as well.

Great. I will check those out!

Thanks!

Reply to
Matthias Melcher

SiLabs parts will give you an easy way to load the code, and faster operation [USB Stick ZX80] - but the Zilog devices have IrDA support, and the logo, of course...

- you could use a Z8F + USB-Serial device, from SiLabs or FTDI ?

-jg

Reply to
Jim Granville

So do I understand you correctly - you want a platform identical to the ZX80 (from a software point of view, so memory map etc is identical) except for the cpu, and you intend to 'recompile' the ZX80 ROM to target your chosen processor???

Cool!

As an aside, I'm assuming you know all about the ZX80-in-an-FPGA?

Regards, Mark

Reply to
Mark McDougall

Correct. I will put the recompiler up on Sourceforge. The Z80 to "C" version works pretty well already, but the "C" code is awful ;-)

I read about it. Amazing! FPGA's are beyond my time limits though.

Reply to
Matthias Melcher

I use the FTDI in some other project and they work well. Not needed here though. ALl I need is IR in and Video Out. IrDA in hardware would probably be a neat thing, but the SiLabs chips do look like what I want at the right speed.

I'll post a followup as soon as I decide for a chip and a test running.

Thanks again

Matthias

Reply to
Matthias Melcher

Why don't you just write a Z80 vitural machine in C that can be ported to other platforms? It should be simple.

Reply to
KenLem

The Cypress PSoC CY8C27143-24PXI comes in an 8 Pin DIP with 16kflash

256b RAM. You can generate video using the SPI interface and irda support is supplied by an optional design module. I would say that it would be perfect except for the small RAM size.

See

formatting link
for my PSoC based video chip.

Ken

Reply to
KenLem

;-)

Sure, that's what I a doing right now. The point though is, that I want to translate (not emulate) binaries from one platform to another. This is useful because the destination platform need not be superior to the original platform that way.

I chose the ZX80 because I know the innards, it's small, and yet gets a lot done including video output in software. It also uses tons of smart Z80 tricks which is great for testing my translation process ;-)

Anyway, for reference, the project will be online on Sourceforge under the name "undo-redo" by the end of the week, assuming I get the SF ok.

Thanks for the suggestion, Matthias

Reply to
Matthias Melcher

Oh, very nice chip. I'll put that into my bookmarks. It won't work for this project though. Too little RAM and a very different screen output to what I need.

Thanks though.

Reply to
Matthias Melcher

.

I'm not sure if I can lend you my experience. I did write a Z80 emulator (interpreter) in x86 assembly. I used it to make an SMS emulator (which is working good). I am also using the same core for Sega Genesis emulation.

Is an ARM CPU out of the cards for you? That may be your best bet.

Reply to
Isaac Bosompem

Nice.

I know quite a bit about the mid range PICs, but they are not powerful enough. So now I am collecting recomendations for a different MCU. ARM seems to be powerful enough. I'll have to see if I find one that is small enough and still has 1k of RAM. Do you have a specific ARM in mind?

Reply to
Matthias Melcher

It depends on how small of a footprint you are looking for. Your original footprint requirements are fairly stringent. I don't have a particular chip in mind. I'm just saying that some of the Z80 instructions are fairly complex so you may need quite a bit of code space to code a instruction emulation routine.

The 8051 might be a good choice too, because you can use external RAM (but that may be out of your reach to)

Reply to
Isaac Bosompem

I am hoping to acheive a 1:2 size rate from the original binary to any other 8 bit assembly language. I am at 1:12 right now without optimization using a C compiler on x86.

Since I have to learn 8051 anyways, it may be a great first step.

Thanks for the help.

Matthias

Reply to
Matthias Melcher

I personally believe that you could get close to your target ratio

Also, a lot of game/application programmers in that era had the bad habit of using the Z80's undocument instructions. I havent analyzed ZX80 programs so I am not certain if they have any, but I did come across numerous SMS games that did use undocument ops, so be on the lookout when you try the programs.

Please let us know how it goes :)

-Isaac

Reply to
Isaac Bosompem

Oh yes. And self-modifying code. Yummy! The standard ROM is already pretty crazy handwritten assembly with zero(!) bytes left free. For example, they needed a lookup entry with three 0 bytes. Too expensive, so they point at an existing 'ld hl,0x0000' instruction and follow it by a 'nop' (the third 0x00). Two bytes saved!

Sure. I am happy to get so much nice feedback. All sources are available at:

formatting link

The Home Page links to a still very fresh Wiki page. The source is in the svn system and there is even a screen shot ;-) . I will try to put an executable up tomorrow.

Reply to
Matthias Melcher

I'd sugegst you work the 8051 and ARM options 'in parallel' for a while, then choose the best fit. ARM devices start at TQFP48 from Philips, and their smallest ones LPC2101 have 8KF/2KR, with 32KF/8KR as a variant.

-jg

Reply to
Jim Granville

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.