Sunday, 30 June 2013

About the Processor.

The processor in the Funtronics handheld is the great grandfather of this one. It is a COP410L.

There seem to be two popular 4-bit old Microcontroller families - the Texas Instruments TMS1x00 series, most famously in Simon, Merlin and the Hornby Railway system, and National Semiconductors' COP4 series - which was in Atari hardware and the Mattel sports hardware. There are a few others - the Entex Select-A-Game uses a Hitachi HD38800 processor for example, but not many I have come across. It is also in my all time favourite handheld, the utterly pointless Invisible Alien Neutraliser (IAN) which would have been the Retrochallenge if I could have come up with any use for it. (the actual use doesn't count IMO !)

This is one of the babies of the COP4 family - it has 512 bytes of ROM and 32 nibbles (e.g. 4 bit values) of data memory - about half the power of a TMS1000. It is fairly slow - about 50-60khz as a base CPU clock, but that's quite adequate for this kind of thing. 

The design is fairly similar to that of the TMS1000 at heart - there is an Accumulator, a pair of registers which address memory, a Carry / Status flag and assorted I/O ports.

The instruction set is not unusual - with one exception. The microcontroller has an instruction XAD 3,15 (which swaps A with memory bank 3, location 15 directly). This is a bit out on its own (the COP444 for example can do this with every memory location).

I think this is to deal with the major problem with the SM-510 in the Watchman - without it it would have exactly the same problem regarding indirect writes (it is very difficult to get an SM-510 to write a value stored in one location to an address stored in a second .... see the Watchman blog if you want the gory details). What this instruction does is to sort of co-opt RAM(3:15) as another internal register in the MCU (even though it isn't).

It is unusual for these processors to have logic operations - unusually the processor has an XOR instruction (which is odd really, because an XOR instruction is the same as ADD but you don't carry .....).  I think this is a hangover from the origin of these devices (most of them are converted calculator chips)

What is a Funtronics Handheld ?

Well, this is a Funtronics Handheld. Or more accurately, it is two of them side by side.

They are Mattel electronic toys from the early 1980s. There are five of them in total - these two, "Tag" and "Drag Race" (which is a competition version of the RedLight game produced for Hot Wheels) and "Tag Chat" which is a French version of Tag. The latter two just have different labels, so there are only three really.

They are all the same, with different layouts and (slightly) different circuitry in places. Primarily the buttons - the "Jacks" game has more buttons than the system has inputs (Red Light does not) so Jacks multiplexes its buttons.

The boxes contain a mixture of LEDs and Buttons in various arrangements. Inside there is a Piezo speaker and a COP410 4 Bit Microcontroller. This has 512 bytes of ROM and 32 bytes of RAM, and runs at 50,000 instructions per second. COP processors and their family members were one of the commonplace chips in these sort of toys along with Texas TMS1x00 series (Total Control 4),  the Hitachi HD44 (Select-A-Game) series and the Rockwell series (Battlestar Galactica).

My challenge for this Summer is to reproduce at least one of them electronically, then to create a new one.  This is possible because of the Patents Database, which contains all sorts of useful information about electronic gadgetry, and contains a full description of how "Jacks" and "Red Light" (specifically) actually work, complete with circuit diagrams. It doesn't contain the code though (a couple of patents do)

I like and always have liked working with limited hardware. I like the challenge of getting something worthwhile out of something which has limited power and parts.  Programming 4 bit microcontrollers is also rather fun, albeit a bit mind numbing at times (though the COP instruction set is better than the TI one, even if it does have less RAM).

Finally, here's a video of an advertisement showing one in action, sandwiched between Mr Spock advertising a Telephone and Mr Reagan advertising himself.

Picture courtesy of

The old Retrochallenge

I hate giving up.

This is actually my second, arguably third Retrochallenge Summer 2013 (the other one didn't really get started).

The first attempt was an similar kind of thing to his based around a watch. This was based around a processor called the Sharp SM-510.

I really gave it all I could. But I just couldn't code with the thing. Everything - virtually everything - required huge amounts of code simply to do the simplest task.

Not that I minded that, but it required increasingly obscure tricks just to get it to do something that was relatively simple - even on a TMS1x00 or a COP4xx it would be a lot easier.

So in the end, I decided to abandon it in favour of this challenge.

I'd like to apologise to Dale for putting up with me continually changing my mind. I really did want to do the Watch thing but it is driving me almost literally round the bend.

And so it begins.

This is my Retrochallenge for Summer 2013.

You may have noticed that it hasn't started yet. I'm sort of cheating a bit here. The reason is that I'm taking my mob to Orlando this July.

I didn't think the suggestion that "we can't go because I'm doing the Retrochallenge in July" would go down very well.

So I am going to do a fair bit of the preparation in June and do the actual challenge bit in July.

L8R : Well, that was the plan anyway. Because I faffed around deciding what the challenge was going to be, I've wasted about a fortnight. I can cannibalise some bits of the old challenge especially the assembler .... but it's now a 2 week Retrochallenge plus a bit.