Hi everyone! :)
I thought I might share my latest accomplishment with HoneyCrisp, my APPLE-1 emulator that I sorta got working today; however, that accomplishment requires a bit of technical explanation first.
What I did today was start replicating the APPLE-1’s cold-startup behavior...basically, the state of the system when it’s powered on from a complete shutdown. I’m aiming for HoneyCrisp to be as faithful to the original hardware as possible, without actually owning one (half a million dollars in the bank would help @_@).
And let me tell you, the APPLE-1’s startup behavior is unlike any computer that came after it.
Here’s how it works: the APPLE-1 (and HoneyCrisp) has a MOS 6502 CPU, 4 KB of RAM, and a 256-byte ROM containing Wozniak’s monitor program. Crucially, it has no automatic power-on reset circuit. That means when you first power it on, the CPU’s registers, the accumulator, X/Y index registers, stack pointer, flags, can hold essentially random values.
Nothing is predictable until you hit the RESET button. This is why the original manual instructs users to press RESET to get to the monitor. (see the manual here)
When you press RESET, the 6502 reads the 16-bit reset vector at memory locations $FFFC and $FFFD, which on the APPLE-1 points to $FF00, the start of Woz’s monitor code. At this point, the CPU begins executing instructions from the ROM. The monitor immediately sets up the system: it disables interrupts, clears the decimal flag, and programs the I/O interface (the PIA) to talk to the keyboard and video shift registers. Only then does the system reach a known state. It prints a prompt, (the WOZMON backlash/@) and waits for your input.
Meanwhile, the RAM and video memory are uninitialized at cold power-on. The static RAM chips can contain random bits, and the display shift registers can be in any state. The monitor doesn’t clear RAM automatically; it just starts running and waits for you to type commands or load a program.
In short: nothing works reliably until reset. lol.
That’s exactly what I wanted to capture in the latest build of HoneyCrisp.
(I should also add that the new cold-startup behavior currently works to some degree. SOFT-RESETTING the system causes the video RAM to clear to the prompt, which is inaccurate. But I'll fix that tomorrow. I'm way too tired lol)
Comments
Displaying 0 of 0 comments ( View all | Add Comment )