Turning the Arduino Uno Into an Apple ][
An anonymous reader writes: To demonstrate how powerful modern computers are compared to their forebears, engineer Damian Peckett decided to approximate an Apple ][ with an Arduino Uno. In this post, he explains how he did it, from emulating the 6502 processor to reinventing how characters were displayed on the screen. "The Apple II used a novel approach for video generation, at the time most microcomputers used an interlaced frame buffer where adjacent rows were not stored sequentially in memory. This made it easier to generate interlaced video. The Apple II took this approach one step further, using an 8:1 interlacing scheme. This had the first line followed by the ninth line. This approach allowed Steve Wozniak to avoid read/write collisions with the video memory without additional circuitry. A very smart hack!" Peckett includes code implementations and circuit diagrams.
Apple II w/ 4K of memory would cost $5236.87 ($1298) in todays dollars. While this may be a lot less than a lot of computers at the time I wouldn't call it a cheap computer by any stretch of the imagination.
To be fair, he was mostly emulating a MOS 6502 that would cost about $125 in today's dollars.
Slashdot: providing anti-social weirdos a soapbox, since 1997.
The cool things are that he used a 8-bit AVR microcontroller to emulate the 6502, and that he used a USB chip on the prototyping board to create video...
Unfortunately, it runs much slower than a 1MHz 6502.
It appears that he did his own reverse-engineering of the 6502. One peculiarity that he may have missed is that it has undocumented op-codes, and those do show up in some programs.
Other people have done much more reverse engineering of the chip, down to the gate level even.
"We mustn't be caught by surprise by our own advancing technology" -- Aldous Huxley
I hate to quote the fucking article because who reads that anyway? But When the 6502 was first released it was priced at $25 USD. At the time this was unheard of, being up to six times cheaper than the nearest competitors. Some people even thought that the low price had to be some form of scam. does in fact establish that the processor was considered a cheap processor.
Slashdot: providing anti-social weirdos a soapbox, since 1997.
well, kind of.
I mean it's neat, because it's on such a crapp microcontroller.
the atmel avr used is pretty much an ancient microcontroller today. I mean, it's pretty much slower than the first pc our family had(8mhz x86 vs atmel 8mhz, or maybe 16, depends). our first pc also had a video card to take care about the graphics display and so forth...
sure, if you loaded an emulator on raspberry pi, I wouldn't give a shit or any props. but for this yes.
world was created 5 seconds before this post as it is.
most microcomputers used an interlaced frame buffer where adjacent rows were not stored sequentially in memory
First of all, I know a lot about micros from the late '70s and early '80s (I was there, maaaan!), and I can't remember a single one other than the Apple II series that didn't display rows sequentially.
This approach allowed Steve Wozniak to avoid read/write collisions with the video memory without additional circuitry.
I'm pretty sure the story I heard was that it saved one TTL chip in the counter chain to do it that way, which was just the kind of thing Woz would do.
Collisions? Exactly what kind of collisions are you talking about? IIRC, the Apple II used interleaved access, where the 6502 would access RAM on every other clock, and the video would access it in between. (This method was also used on the original Macintosh, though the 68000 sometimes needed a wait state.) But that has nothing to do with the funky row counters.
#naabhaprzrag, #sverubfr-000, #agi-fcbafberq, negvpyr[pynff*=' negvpyr-ary-'] { qvfcynl: abar !vzcbegnag; }
Well, the 6502 was the shittiest processor of it's generation (which is why the Apple dudes could afford it) so it makes sense to emulate low end with low end.
Your first PC had a CRT controller (likely a 6845 or derivative.) That's a relatively simple LSI chip. People were doing 'cheap video' with software even back in the day (i.e. Lancaster's cookbook)
There was a 6500 before the 6502 (I had one) but it used a weird technology that meant it drew almost all its power from the clock lines (two phase non-overlapping clock) and the interface voltages were also non-standard, so the 6502 was magnificently better. It was cheaper because of volume - the die size was almost exactly the same - the chip was almost exactly the same. (I think they got some major order before it was even available for general release), and there was a second source (Rockwell).
The 6800 was a superior processor if you did not have much string processing to do. The 68000 was an entirely different beast.
Sent from my ASR33 using ASCII
The Apple 2 came out in 1977. Visicalc was 1979 and didn't start development until 1978. No Apple was not building the machine around Visicalc.
> Very cheap modern computer is capable to emulating a 28 year old cheap computer.
Actually, it may contradict common sense, but you're missing part of the "history".
As technologies evolve and brands consolidate, some old ideas are lost. Things like the mentioned 8:1 interleave, floppy drive skewing schemes or they way images are generated in vector display are harder to simulate (though feasible). And even if simulated, not everyone would know how to use them. I'm particularly reminded of ATARI 2600 image generation, a nightmare if I ever saw one. It makes me value the ZX80 even more.
The video produced by the Apple II is not interlaced at all. Many video devices used to mix and overlay video in studios had trouble with this fact. True the video memory is not sequential but that's not the same thing as interlacing. Way back in 1983 I had lunch with Woz and a half dozen or so mostly game developers at the Independent Developrs conference. I asked him if he would want to change anything about the design of the II. He said he might add the two chips needed to make the video memory map sequential. Several of us including myself said that most of us would still use a lookup tables for updating video memory anyway (it was faster) and that didn't really matter much. In the end he agreed.
As far as the 6502 being the shittiest processor of it's generation I would have to disagree. True it has fewer registers and instructions (RISC?) than most even older designs like the 8080, but it did have some unique adressing modes that made it the perfect processor for the graphics the Apple did. This coupled with the fact you can use the 256 bytes of zero page much faster and much like processor registers (indexed memory referencing) made it one neat machine.
Forget the troll. I understand exactly how you felt: just like getting inside a flying saucer.
IMHO it's arguable that the 8080 was better than 6502, though. Each had their advantages.
The Z80 OTOH was clearly better than all the others. To this day I find it had an elegant design.
I disagree.
Although I absolutely love coding Assembly language on the 6502, and have written tens of thousands of lines of same; I would rather the 6809 had taken off. The design of that processor was truly forward-thinking. It was a shame that only the Radio Shack (RIP) Color Computer (CoCo) employed that CPU; because it was closer to an 8/16 bit "miniature 68k" than it was to the 6800/6801/6501/6502 designs.
Among other things, It had an A and B Accumulator, which you could concatenate into one 16 bit accumulator, a hardware 8 x 8 MUL instruction, a 16-bit X Index Register, and a USER Stack Pointer, which was PERFECT for implementing things like FORTH, or for using as an Interrupt Stack. Along with this, it had a nearly-orthagonal Instruction Set, and almost as many Addressing Modes as the 6502. And, IIRC, unlike the 8080 and especially the Z80, it was nearly as miserly with cycles-per-instruction as the 6502 (which was nearly an early RISC chip in its efficiency). In fact, it was so far advanced from anything else Motorola was making at the time, that I wondered why the 6801 core was the one that got pulled-forward into all the Mot. Microcontrollers of the 80s and 90s, instead of the 6809. It was almost like someone from outer space dropped in to Motorola, threw the 6809 designs on the table, and then beamed-out again!
This was easily the best, by far, technical article ever linked in a Slashdot submission.
I just had to express my amazement. Holy shit, such deliciously nerdy article...
"The agriculture ministry is not in charge of Gundam" - Japanese ministry official.
YES. 6809 was a truly elegant design that deserved to have far more success than it did.
Yeah, I always wondered about that. It never got transmogrified into an "HC" version, never-ever became a Microcontroller (oh, how much more fun the HC11 would have been, if it was based on a 6809 instead of a 6801?), etc. This article states incorrectly that a modified version of the 6809 forms the CPU in the HC11; but I remember from the datasheet that it was called a modified 6800 (the 6801); so?
The other possibility is that Motorola was already investing heavily into the 68k R&D, and didn't want to lose potential "sockets" to the less-expensive 6809. In fact, IIRC, the Mac was originally slated to have a 6809; but no one wanted to port QuickDraw (which was written in 68k for the Lisa) back to 6809; so they went ahead and put a 68k into the first Macs (overall, IMHO, a VERY wise decision!)...
By the way, that Wikipedia article does contain a fairly long list of products (some very successful!) that employed the 6809 or Hitachi's improved 6309 version. I remember Williams used it in their video games and electronic-ified Pinball machines, and also that the Fairlight CMI used dual out-of-phase 6809s as its main CPU(s); but I never knew that Yamaha put the 6309 into the DX-7 synth.
So, are there any Slashdotters out there that might know the inside story on why the 6809 never went further? Was it because Motorola lost its way so bad in the mid-late 90s? Was it the 68k? Or what?
The Vectrex video game system also used the 6809.
And my guess as to why Moto didn't use the 6809 as the basis of the 6811/6812 is because they wanted to use microcode, and it would have been harder because of the post-byte index modes.
And then there was the 68000... apparently the marketing guys back in the day were dead set on only selling thousands of 68000s for full-blown Unix-type systems, and against selling millions of 68000s as an embedded processor. By the time of the Macintosh/Amiga/Atari ST when they finally wised up, it was too late, the IBM PC had already happened.
My piecing together of various legends about IBM choosing the 8088 was that they were interested in the 68008, Motorola didn't want to commit to IBM's deadline, IBM said never mind, then Motorola ended up releasing it by that date after all. And that is how you lose a war that you didn't even know had started. In my opinion, the lack of a large flat address space in the leading architecture set the industry back by ten years.
#naabhaprzrag, #sverubfr-000, #agi-fcbafberq, negvpyr[pynff*=' negvpyr-ary-'] { qvfcynl: abar !vzcbegnag; }
It may be the same reason we switched from 68HC11 to PIC and IBM used the 8088 instead of the 68000; Motorola was never customer friendly except with their literature. Availability and second sources were common problems.
Another possibility is that with the release of the 68008, there was no reason to further market the 6809.