8 ms·
Surprisingly sophisticated. I didn't remember them being much more than annoying when my kids "had to have one." Hey, I recognize those opcodes. 6502 (Commodor
by jackhack 8y ago
Surprisingly sophisticated. I didn't remember them being much more than annoying when my kids "had to have one."
Hey, I recognize those opcodes. 6502 (Commodore, Apple 2, etc) Cool! I had no idea what was running these things.
Time Slice Task Master (aka "cooperative multitasking without preemption")
Interesting they set the PWM (pulse width modulation) based on battery voltage as not to stress out the motors. Cheaper than some caps & resistors for a voltage divider from a high V source, or a boost/buck controller. Still necessary for the CPU though. If I remember correctly, this thing ran off 4 1.5V cells (+6V). Yay, software!
Clever use of tilt sensor to seed the pseudo-random num generator. (page A22)
Too bad the diagnostic file isn't included (diag7.asm) per page A21.
(A33) That cycle-counting timer loop brings back memories, too -- throwing in a few NOP (no-operation) calls just to eat a cycle and get the timing right on a horizontal/vertical retrace -- while here they're doing it so the service intervals on sound & motor control come out right.
(A36) LOL @ "Rap mode"
A39 - the various sensor sequences needed to trigger the modes
I gave up at about 45 pages, but there is obviously some neat stuff here.
- cmrdporcupine 8y agoWestern Design Center still apparently sells millions of 6502 cores each year. Especially for devices like this. So it's quite possible this was properly licensed and WDC provided 6502 IP. It looks like this is basically a 6502 with no Y register and a reduced set of instructions. Some past discussion of this: http://forum.6502.org/viewtopic.php?f=1&t=2027 http://forum.6502.org/viewtopic.php?f=1&t=2027
- bsder 8y ago> It looks like this is basically a 6502 with no Y register and a reduced set of instructions. Why would you do this? It absolutely can't have made any difference to the cost of the processor in 1998.
- cmrdporcupine 8y agoWell, I'm not a hardware engineer, but... Who knows maybe the processor had been designed and produced a long time before that, and that made it super super cheap to throw on a BOM because it was technology from a few years before. Also likely to use sliiiightly less power, and be even more responsive to interrupts.
- opencl 8y agoIt absolutely did make a difference to the cost. Probably only a few cents, but definitely a difference. Die area is money. Microcontrollers are extremely cost-optimized and people will buy exactly as much capability as they need which is why you can still buy things like the PIC10F200 with 16 bytes of RAM (Furby has 128 bytes).
- bsder 8y agoRemoving Y and the instructions AND taking advantage of the size difference means you have to do new layout. The NRE to make the change is at least $100,000 (probably closer to $500,000--but I'm spitballing here). And that is up front cash. Those changes are really small. So, lets assume a penny saved. It would take you 10 million chips to make that back. The total run was 25 million? or so--and nobody expected that. If the NRE was $500K at a penny saved, you never make it back. Even at a nickel (which is probably a huge savings), again it would take a 10 million chips to make it back. Given the oddity that this is, I bet that this was a failed batch of chips that was just enough damaged to be really cheap but not so damaged as to be useless.
- cmrdporcupine 8y agoThere's no reason to assume that chip was used only in the Furby. It's likely it has been used in all sorts of toys and the like for the last two decades. And it was probably dirt cheap. And probably designed in the early 80s, hence the design decision to go with the 6502 as a base platform.
- userbinator 8y agoAnd probably designed in the early 80s I thought Sunplus was a bit newer than that (90s), but a quick search reveals that your guess was pretty close: https://www.sunplus.com/about/milestones.asp https://www.sunplus.com/about/milestones.asp Founded in 1990.
- monocasa 8y agoIt was a custom 6502 like chip, made by a third party. And they already had to have a custom mask set beyond a 6502 because it integrated a bunch of peripherals. Also, a back of the napkin look at their changes probably means it was half to two thirds the die size, so a pretty good win at those volumes. Datasheet for the chip they used: http://www.ic72.com/pdf_file/-/428557.pdf http://www.ic72.com/pdf_file/-/428557.pdf Looks like a fairly generic "sound processor" that was most likely used in tons of toys and other consumer electronics. Hell, I wouldn't be surprised if the Furby line wasn't even their biggest contract.
- scentoni 8y agohttps://en.wikipedia.org/wiki/Market_segmentation https://en.wikipedia.org/wiki/Market_segmentation A prime example is https://en.wikipedia.org/wiki/Intel_80486SX https://en.wikipedia.org/wiki/Intel_80486SX where Intel spent extra money to develop a way of damaging a 486DX so it could be sold as a 486SX at a lower price.
- grkvlt 8y agoFrom a comment below, it seems some instructions (BCD related) were patent encumbered, so removing them means less royalties per chip and possibly a big saving, especially since you probably don't need binary coded decimal in a toy like this.
- nofunsir 8y ago> Surprisingly sophisticated. I distinctly remember them being advertised as intelligent little friends who learn about you.
- pinewurst 8y agoLike Google and Facebook?
- shoo 8y agoYour own, personal, surveillance capitalism golem
- taneq 8y agoThey didn't have a network connection, did they? So they're much more your own personal surveillance golem than anything put out these days by Mattel (or anyone else selling internet-connected devices) which are all very much someone else's surveillance golem.
- EvanAnderson 8y agoThey have an IR sensor and emitter. That's a network of a fashion.
- xg15 8y agoWell yes, but it's missing the giant cloud backend that will record every interaction and the tangle of Big Data, adtech and other analytics companies on the other side.
- cafard 8y agoThe feds did ban Furbies from secure facilities.
- fredrikhl 8y ago
- russdill 8y agoA-116 Diag7.asm. Really if you got to page 45, you got through almost half. A-126 and on is just data tables.
- chocolatebunny 8y ago6502 is also what the Terminator ran. We should thank our time traveler saviors for stopping the Furby uprising from happening.
- danellis 8y agoI think we can assume that, given the complexity of a Terminator, the 6502 was just there for I/O, kind of like a BBC Micro with an ARM processor.
- mschaef 8y agoOr a Mac IIfx... "Wicked Fast".
- deleted 8y ago[deleted]
- rzzzt 8y ago"Kah bye-bye oo-bah koh-koh."
- SmellyGeekBoy 8y agoTamagotchi also ran on the 6502.
- tekromancr 8y agoIndeed! And there have been some truly heroic hacks of the little buggers! https://books.google.com/books?id=lvMxDwAAQBAJ&pg=PT248&lpg=PT248&dq=poc+or+gtfo+tamagotchi&source=bl&ots=p4pt44hnws&sig=b87IYZVIFmZnNUGUvVybkZ_NvmA&hl=en&sa=X&ved=2ahUKEwi_6PnlyvXcAhWyzlkKHQ0eC3sQ6AEwEXoECAIQAQ#v=onepage&q=poc%20or%20gtfo%20tamagotchi&f=false https://books.google.com/books?id=lvMxDwAAQBAJ&pg=PT248&lpg=...
- Trufa 8y agoHmmm, I'm alway really surprised when people comment on threads like this. How much time did you take to do this, I can read code, but I simply can't casually take a look at code like this and say, hey that's cool, hey that's interesting, I have to concentrate and go line by line, a more debugging state of mind. There are programmers that can sort of skim read code which just amazes me.
- jackhack 8y agoMaybe a few seconds per page? Truly, it's really not that much of an accomplishment -- the comments are superb. I spent 10 years writing games in 6502 assembly, so it feels pretty natural to me. Keep in mind that a lot of this kind of code follows a pattern : lots of EQU ("equates") statements that link a variable to an address like a port or a signal line. Then you'll have the setup code that gets everything into a basic state where it's ready to run the next part The big loop Here's where the action's act. Just spin in a big loop, waking up every few hundred cycles or so to check and see if a button is pressed, or the IR chip is sending a byte, or the battery is dead, etc. If you're already doing something, keep doing it until you're done. If you're done, wait around for a while or go do something else. At least, that's what I come expecting. So when I see code like this that basically fits that model, parsing it is simple. And, like I said, there are great comments. Even a couple about the round-robin service routine that made me laugh.
- Alupis 8y agoPerhaps this is a naive question, but why would something like this be written in assembler, and not C or similar? It seems assembler makes it a bit more complicated without much benefit, and surely there's a compiler for a chip as common as the 6502.
- gridspy 8y agoBecause the cheapest chips have very limited code and memory space. And back when this product was released, optimizing compilers were really poor by comparison with a human for these tasks. Today you probably wouldn't bother with assembly for all but the most timing critical parts.
- digi_owl 8y agoThe z80 is also still in use as a microcontroller of sorts.
- deleted 8y ago[deleted]