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.
Very cheap modern computer is capable to emulating a 28 year old cheap computer.
Slashdot: providing anti-social weirdos a soapbox, since 1997.
Kinda cool I guess, though I was playing around with Apple II emulators about 10 years ago.
Arduino for the blog cred though!
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
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; }
The 6502 in the Apple II only used the memory for 1/2 of each clock cycle and so the Woz synced the video to the cpu clock allowing the video to access the memory on the other half of the clock.
The 8-1 address reordering was done so that the video properly refreshed the dynamic ram without any additional circuitry.
Also, the clock frequency of 14.31818 mhz was a multiple of the 3.58 mhz color burst used in a NTSC color tv. This allowed 4 possible colors by setting adjacent pixels on or off at the cost of 1/2 the horizontal resolution.
I want some of whatever this guy is smoking!
Memories of programming with the 6502 instruction set are so delicious that the only comparable thing to compare it to was my first orgasm.
I actually first did it on a General Electric GEPAC computer in 1966. It had an almost identical instruction set to the 6502, but with 24 bit words. Hip programmers expressed themselves in octal in those days.
Tandy Color Computer used the opposite side of the clock signal to generate video.
One of the gentile geniuses of our time
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.
I wonder how Woz feels about this kind of development. He has a /. account so if you read this: did you ever think there would be computers powerful enough and people interested enough to implement your brainchild on a credit card sized machine with different architecture within your lifetime. What do you think of the arduino movement in comparison with the DIY computer movement from our time?
Custom electronics and digital signage for your business: www.evcircuits.com
Calling it the Apple ][ is more of a mullet than a hipster thing.
Boot one. The image on the screen was the string "][", unless you're booting a //e or //c.
That's the way Apple Computer typed the name and trademarked logo, Apple ][. Possibly the first known use of 133t-speak, and definitely pre-hipster. You are showing your lack of geek cred.
Some mornings it's hardly worth chewing through the restraints to get out of bed.
I probably can't find the quote; but I distinctly remember reading an interview with Woz, stating (among other things), paraphrasing, "If I had known how popular the Apple ][ was going to be, I would have gone ahead and included the two extra chips it would have taken to make the video memory addressed sequentially."
Instead, we had BASCALC and HBASCALC calls in the Apple Monitor ROM.
And we liked it!
What the fuck is a Apple ][?, What the fuck does ][ stand for?, Are you so fucking chic that typing 2, or II is a problem?. Fucking hipsters.
OMFG! You're kidding, right?
You must IMMEDIATELY turn in every single computing device you own.
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.
It's a 1980's hipsterism. So clearly it's someone getting too senile to use II or 2.
#naabhaprzrag, #sverubfr-000, #agi-fcbafberq, negvpyr[pynff*=' negvpyr-ary-'] { qvfcynl: abar !vzcbegnag; }