SlideShare a Scribd company logo
GREEN DELICIOUS
APPLE-1 EMULATOR
Apple-1 on display at the Smithsonian by Ed Uthman / CC
Green Delicious is an Apple-1 emulator that runs on Commodore 64.
It emulates the 40x24 monochrome display, 7x8 character cells (280x192 pixels), pixel-
perfect Signetics 2513 character generator, instant 50/60 Hz hardware scrolling and an
ASCII keyboard. It mimics somewhat sufficiently the PIA interface chip functions and it's
almost as fast as the original.
Apple-1 was introduced the year I was born. This emulator was programmed 37 years later
on a Mac.
Quick Start
Run the emulator and type ‘F000R’. This executes the program at $F000, which displays a
little help text I included there for you.
Apple-1 is a simple 6502-based computer with keyboard input and slooow text output (yes,
approximately one character per frame) and uppercase characters only. There is no
backspace and it’s not possible to move the cursor back or up. And no sound, which is great!
‘F800R’ starts C’mon monitor, a machine code monitor I originally wrote for VIC 20 in
2001. With just a few modifications it worked fine on Apple-1 too.
BASIC programs are started by typing ‘E2B3R’ and then ‘RUN’.
Emulator Keys
F1 Clear the screen and return cursor to top-left corner—on Apple-1 this is a hardware
key and you can’t do the same in software. Printing 24 carriage returns effectively
clears the screen, but the cursor remains at the bottom row
F3 Cycle the display text color through a carefully crafted palette of historically relevant
greens, grays, yellow and amber
F5 Switch cursor type between the colorful apple sprite and the standard ‘@’—It does
look a bit like an apple as well, doesn’t it?
F7 Apple-1 reset: Jumps to ‘Woz Monitor’ at $FF00 and prompts a ‘’. Hold down F7
for a second to freeze the Apple-1 and enter disk options menu
Woz Monitor
Apple-1 ROM is a tiny 256-byte program, ‘Woz Monitor’, that allows inspecting memory,
writing in hex values and executing programs, and not much else. Though minimal, it’s much
less user-hostile than the physical LED-and-switch user interfaces of the time.
View memory:
0300 (Just type the address)
Hex dump:
0300.03FF
Write bytes to memory:
0300:10 12 1A 13 1B …
Run program:
0300R
C’mon Monitor
Type ‘F800R’ in Woz Monitor to launch C’mon.
Assemble:
A 0300 LDA #$10 (Enter a blank line to stop)
Write bytes to memory:
W 0300 10 20 30 …
Disassemble:
D 0300
D (continue)
Execute program:
G 0300
Hex dump:
H 0300
H
Text dump:
T 0300
T
View 6510 registers:
R
Memory Map & Useful ROM Calls
$0000-$0FFF 4K Low RAM
$1000-$3FFF Extended 12K RAM (Non-standard)
$4000-$903F Green Delicious
$C000-$C1FF Tape interface (Not implemented, at least not yet)
$D010-$D013 PIA chip registers
$E000-$EFFF 4K High RAM (Integer BASIC is loaded here)
$F000-$F3FF Help text
$F800-$FEFF C’mon monitor
$FF00-$FFFF Apple-1 ROM (‘Woz Monitor’)
JSR $FFEF Output an ASCII character
JSR $FFDC Output a byte in hex
Compatibility
All Integer BASIC programs should work fine. Most machine code programs should run fine
too, although there’s a few points to note.
Low RAM at $0002-$0FFF, High RAM at $E000-$EFFF and also Extended RAM at
$1000-$3FFF are available. Zeropage locations $00 and $01 cannot be used, because
6510 reserves them for memory configuration and I/O. If your Apple-1 program uses these
two locations you have to patch it manually. Tough luck!
PIA chip reads and writes must be patched too, but this is done automatically when loading
a new program:
LDA $D010 -> JSR $8010 (Keyboard input: Reading this also clears bit 7 of $D011)
STA $D012 -> JSR $9012 (ASCII output: Writing to the register sets bit 7 of $D012)
Also:
LDX $D010 -> JSR $8020
LDY $D010 -> JSR $8030
STX $D012 -> JSR $9022
STY $D012 -> JSR $9032
Read keyboard example (returns ASCII value of key + 128):
.1
LDA $D011 ; Bit 7 is set when there's a new keypress
BPL .1
LDA $D010 ; This becomes JSR $8010
ASCII output example (same as Apple-1 ROM at $FFEF):
.1
BIT $D012 ; Bit 7 is cleared when the video terminal is ready to take a new character
BMI .1
STA $D012 ; This becomes JSR $9012
Actually, $D012 writes don’t need to be patched if the high bit is always set. But some
programs—like the Integer BASIC—occasionally write to $D012 with bit 7 cleared.
Memory location $8C00 holds the number of patches done. Patched addresses are stored
at $8C02-$8CFF. Type ‘8C00’ or ‘8C00.8CFF’ in Woz Monitor to view this information. If
you have typed in a program in the emulator and need to apply the automatic patches there,
just type ‘8006R’. This handles the memory areas $0000-$3FFF and $E000-$EFFF.
When writing new Apple-1 programs, do not call the patched routines directly. Let Green
Delicious do the job for you, and you will have a binary that is compatible with the real thing.
If required, you can also skip the automatic PIA patching after loading a file. To do this press
Shift+Return in the disk menu (instead of Return).
Disk Contents
APPLE-1 EMULATOR Full version with Integer BASIC, help text and C’mon
APPLE-1 NO BASIC No Integer BASIC preloaded, but C’mon is there
APPLE-1 WOZ ONLY Only Apple-1 ROM: 256 bytes ‘Woz Monitor’ at $FF00
CMON.300 Relocated versions of C’mon
CMON.900
CMON.E000
CMON.E900
BASIC.E000 Integer BASIC, which you can also load separately
MASTERMIND.300 A couple of games that were sold by Apple on tape in 1977
LUNAR LANDER.300
BLACKJACK.E2B3
HAMURABI.E2B3
STARTREK.E2B3
Binary File Format
Two first bytes of standard Commodore binary files define the loading address. Green
Delicious follows this with two exceptions: Apple-1 Low RAM files ($0000-$0FFF) are
relocated to $C000-$CFFF. 16K Extended RAM programs that span $0000-$3FFF also
have the load address of $C000, but the Green Delicious loader skips to $1000 when
reaching $D000. The first 4K is moved to the right place when the emulator is resumed.
Examples:
LUNAR LANDER.300 and CMON.300 actually have load address of $C300. Start the
programs by typing ‘300R’.
BASIC.E000 loads to $E000. ‘E000R’ is BASIC cold start.
HAMURABI.E2B3 and other BASIC programs load to $0000-$0FFF. ‘E2B3R’ is BASIC
warm start.
Low RAM and High RAM programs can be also loaded to C64 memory before starting the
emulator:
LOAD"CMON.300",8,1
NEW
LOAD"APPLE-1 EMULATOR",8,1
RUN
Loading and Saving Files
Press and hold F7 for a second to freeze Apple-1 and reach the disk options menu:
Low RAM is $0000-$0FFF (4K), Extended RAM is $0000-$3FFF (16K) and High RAM is
$E000-$EFFF (4K).
Apple-1 Information
http://en.wikipedia.org/wiki/Apple_I
http://www.applefritter.com/apple1
http://www.brielcomputers.com/wordpress/?cat=17
http://commons.wikimedia.org/wiki/File:Apple_I_Computer.jpg
Credits
Apple-1 ROM (‘Woz Monitor’) and Apple Integer BASIC by Steve Wozniak in 1976
Apple-1 photo by Ed Uthman and licensed under Creative Commons
Green Delicious Emulator and C’mon monitor by Aleksi Eeben in 2001 & 2013
aleksi.eeben@gmail.com
Green delicious user guide
Green delicious user guide
0300: D8 20 8B 05 A9 03 85 FE A0 00 84 FD F0 0E 20 22
0310: 03 20 52 03 20 5E 03 A9 01 69 00 A8 20 86 06 4C
0320: 0E 03 20 4D 03 AD 11 D0 10 FB AD 10 D0 20 EF FF
0330: 29 7F C9 5F D0 06 C6 F6 10 EB 30 E6 A4 F6 10 02
0340: A9 0D 99 00 02 C9 0D F0 04 E6 F6 D0 D8 A9 00 85
0350: F6 60 84 F5 A4 F6 E6 F6 B9 00 02 A4 F5 60 A0 07
0360: D9 98 06 F0 05 88 10 F8 38 60 B9 A0 06 85 FB B9
0370: A8 06 85 FC 6C FB 00 20 46 06 B0 43 20 FA 05 90
0380: 06 20 08 06 20 22 03 A0 00 20 52 03 C9 0D D0 05
0390: 18 60 20 52 03 99 00 02 C8 C9 0D D0 F5 A0 00 AD
03A0: 00 02 D9 75 08 D0 10 AD 01 02 D9 76 08 D0 08 AD
03B0: 02 02 D9 77 08 F0 09 C8 C8 C8 C0 AB D0 E1 38 60
03C0: 84 F7 A0 0B A2 00 98 48 B9 50 09 A8 B9 68 09 C9
03D0: 30 F0 0D DD 03 02 D0 11 C9 0D F0 14 C8 E8 D0 EC
03E0: BD 03 02 C9 30 B0 F5 90 00 68 A8 88 10 D6 30 CE
03F0: 68 85 F8 A0 00 B9 47 07 C5 F7 D0 11 B9 DE 07 C5
0400: F8 F0 11 C9 04 D0 06 A5 F8 C9 09 F0 07 C8 C0 97
0410: D0 E3 F0 AA A2 00 B9 B0 06 81 FD B9 DE 07 A8 B9
0420: 20 09 C0 00 F0 2A 85 F7 A2 00 A9 24 E8 DD 02 02
0430: D0 FA C0 09 F0 20 A5 F7 C9 02 F0 09 20 96 04 B0
0440: 72 A0 02 91 FD 20 96 04 B0 69 A0 01 91 FD A5 F7
0450: 20 15 06 4C 81 03 20 96 04 B0 58 85 FA 20 96 04
0460: B0 51 38 E5 FD 85 F9 A5 FA E5 FE 85 FA 10 14 A9
0470: 81 C5 F9 B0 1A A9 FF C5 FA D0 14 A6 F9 CA CA 8A
0480: 4C 4A 04 A9 81 C5 F9 90 06 A9 00 C5 FA F0 EC A9
0490: 21 20 EF FF 38 60 BD 03 02 E8 20 77 06 B0 14 2A
04A0: 2A 2A 2A 29 F0 85 FB BD 03 02 E8 20 77 06 B0 03
04B0: 05 FB 18 60 20 46 06 A9 10 85 FA 20 05 06 A0 02
04C0: B1 FD 85 F8 88 B1 FD 85 F7 88 B1 FD D9 B0 06 F0
04D0: 0A C8 C0 97 D0 F6 A9 00 AA F0 06 BE 47 07 B9 DE
04E0: 07 85 F9 A0 03 BD 75 08 20 EF FF E8 88 D0 F6 A4
04F0: F9 F0 2A 20 41 06 B9 38 09 A8 20 86 06 A4 F9 B9
0500: 2C 09 F0 25 30 05 A5 F8 20 DC FF A5 F7 20 DC FF
0510: A4 F9 B9 44 09 F0 06 A8 20 86 06 A4 F9 B9 20 09
0520: 20 15 06 C6 FA D0 94 18 60 85 F8 A5 F7 10 02 C6
0530: F8 18 69 02 90 02 E6 F8 18 65 FD 85 F7 A5 FE 65
0540: F8 85 F8 4C 06 05 20 46 06 A9 08 85 FA 20 05 06
0550: A2 20 20 1F 06 C6 FA D0 F4 18 60 20 46 06 A9 04
0560: 85 FA 20 05 06 A0 00 98 48 B1 FD 20 DC FF 20 41
0570: 06 68 A8 C8 C0 08 D0 EF A2 08 20 1F 06 C6 FA D0
0580: E1 18 60 20 46 06 B0 5F 20 A0 05 08 8D 84 02 8E
0590: 83 02 8C 82 02 BA 8E 81 02 68 8D 80 02 D8 18 60
05A0: 6C FD 00 A0 03 20 86 06 A0 04 B9 80 02 20 DC FF
05B0: 20 41 06 88 D0 F4 AD 80 02 85 F8 A2 08 A9 00 26
05C0: F8 69 30 20 EF FF CA D0 F4 18 60 20 46 06 B0 17
05D0: A9 00 85 FC 20 FA 05 B0 0D 20 5B 06 B0 09 A4 FC
05E0: 91 FD E6 FC D0 EE 18 60 20 46 06 B0 0C 85 F7 A5
05F0: FE 85 F8 20 46 06 B0 01 18 60 20 52 03 C9 20 D0
0600: 02 18 60 38 60 20 3E 06 A5 FE 20 DC FF A5 FD 20
0610: DC FF 4C 41 06 18 65 FD 85 FD 90 02 E6 FE 60 A0
0620: 00 B1 FD C9 A0 B0 08 C9 80 B0 0F C9 20 90 0B 20
0630: EF FF C8 CA D0 EB 98 4C 15 06 A9 2E D0 F1 A9 0D
0640: 2C A9 20 4C EF FF 20 FA 05 B0 0F 20 5B 06 B0 0A
0650: 85 FE 20 5B 06 B0 03 85 FD 18 60 20 52 03 20 77
0660: 06 B0 13 2A 2A 2A 2A 29 F0 85 FB 20 52 03 20 77
0670: 06 B0 03 05 FB 18 60 A0 0F D9 B6 09 F0 05 88 10
0680: F8 38 60 98 18 60 BE 5C 09 A0 00 BD 00 09 F0 06
0690: 20 EF FF E8 D0 F5 18 60 0D 41 48 54 57 47 44 52
06A0: 59 77 5B 46 CB 83 B4 A3 05 03 05 05 05 05 04 05
06B0: 69 65 75 6D 7D 79 61 71 29 25 35 2D 3D 39 21 31
06C0: 0A 06 16 0E 1E 90 B0 F0 24 2C 30 D0 10 00 50 70
06D0: 18 D8 58 B8 C9 C5 D5 CD DD D9 C1 D1 E0 E4 EC C0
06E0: C4 CC C6 D6 CE DE CA 88 49 45 55 4D 5D 59 41 51
06F0: E6 F6 EE FE E8 C8 4C 6C 20 A9 A5 B5 AD BD B9 A1
0700: B1 A2 A6 B6 AE BE A0 A4 B4 AC BC 4A 46 56 4E 5E
0710: EA 09 05 15 0D 1D 19 01 11 48 08 68 28 2A 26 36
0720: 2E 3E 6A 66 76 6E 7E 4D 60 E9 E5 F5 ED FD F9 E1
0730: F1 38 F8 78 85 95 8D 9D 99 81 91 86 96 8E 84 94
0740: 8C AA A8 BA 8A 9A 98 03 03 03 03 03 03 03 03 06
0750: 06 06 06 06 06 06 06 09 09 09 09 09 0C 0F 12 15
0760: 15 18 1B 1E 21 24 27 2A 2D 30 33 36 36 36 36 36
0770: 36 36 36 39 39 39 3C 3C 3C 3F 3F 3F 3F 42 45 48
0780: 48 48 48 48 48 48 48 4B 4B 4B 4B 4E 51 54 54 57
0790: 5A 5A 5A 5A 5A 5A 5A 5A 5D 5D 5D 5D 5D 60 60 60
07A0: 60 60 63 63 63 63 63 66 69 69 69 69 69 69 69 69
07B0: 6C 6F 72 75 78 78 78 78 78 7B 7B 7B 7B 7B 7E 81
07C0: 84 84 84 84 84 84 84 84 87 8A 8D 90 90 90 90 90
07D0: 90 90 93 93 93 96 96 96 99 9C 9F A2 A5 A8 01 02
07E0: 03 04 05 06 07 08 01 02 03 04 05 06 07 08 00 02
07F0: 03 04 05 09 09 09 02 04 09 09 09 00 09 09 00 00
0800: 00 00 01 02 03 04 05 06 07 08 01 02 04 01 02 04
0810: 02 03 04 05 00 00 01 02 03 04 05 06 07 08 02 03
0820: 04 05 00 00 04 0A 04 01 02 03 04 05 06 07 08 01
0830: 02 0B 04 06 01 02 03 04 05 00 02 03 04 05 00 01
0840: 02 03 04 05 06 07 08 00 00 00 00 00 02 03 04 05
0850: 00 02 03 04 05 00 00 01 02 03 04 05 06 07 08 00
0860: 00 00 02 03 04 05 06 07 08 02 0B 04 02 03 04 00
0870: 00 00 00 00 00 3F 3F 3F 41 44 43 41 4E 44 41 53
0880: 4C 42 43 43 42 43 53 42 45 51 42 49 54 42 4D 49
0890: 42 4E 45 42 50 4C 42 52 4B 42 56 43 42 56 53 43
08A0: 4C 43 43 4C 44 43 4C 49 43 4C 56 43 4D 50 43 50
08B0: 58 43 50 59 44 45 43 44 45 58 44 45 59 45 4F 52
08C0: 49 4E 43 49 4E 58 49 4E 59 4A 4D 50 4A 53 52 4C
08D0: 44 41 4C 44 58 4C 44 59 4C 53 52 4E 4F 50 4F 52
08E0: 41 50 48 41 50 48 50 50 4C 41 50 4C 50 52 4F 4C
08F0: 52 4F 52 52 54 49 52 54 53 53 42 43 53 45 43 53
0900: 45 44 53 45 49 53 54 41 53 54 58 53 54 59 54 41
0910: 58 54 41 59 54 53 58 54 58 41 54 58 53 54 59 41
0920: 01 02 02 02 03 03 03 02 02 02 03 02 80 80 80 80
0930: 01 01 01 80 80 00 01 80 00 04 05 05 05 05 05 06
0940: 06 05 06 05 00 00 00 07 00 07 08 09 0A 00 0B 08
0950: 00 01 07 0C 13 1A 23 2C 35 13 3E 47 F1 C7 C6 DB
0960: CA CB CD D0 D8 D3 D7 D5 0D 20 23 24 30 30 0D 20
0970: 24 30 30 0D 20 24 30 30 2C 58 0D 20 24 30 30 30
0980: 30 0D 20 24 30 30 30 30 2C 58 0D 20 24 30 30 30
0990: 30 2C 59 0D 20 28 24 30 30 2C 58 29 0D 20 28 24
09A0: 30 30 29 2C 59 0D 20 28 24 30 30 30 30 29 0D 20
09B0: 24 30 30 2C 59 0D 30 31 32 33 34 35 36 37 38 39
09C0: 41 42 43 44 45 46 3F 0D 2E 00 23 24 00 28 24 00
09D0: 2C 58 00 2C 58 29 00 29 2C 59 00 41 43 20 58 52
09E0: 20 59 52 20 53 50 20 4E 56 2D 42 44 49 5A 43 0D
09F0: 00 0D 43 27 4D 4F 4E 20 41 50 50 4C 45 0D 2E 00
300R

More Related Content

PDF
Motorman Brake Cylinder Catalog
PDF
Motorman Brake Disk Catalog
PDF
CATALOGO ITALAMEC
PDF
Vx02 Operation Manual
PDF
KILL MD5
PDF
PDF
PDF
M61266 Datasheet PDF
Motorman Brake Cylinder Catalog
Motorman Brake Disk Catalog
CATALOGO ITALAMEC
Vx02 Operation Manual
KILL MD5
M61266 Datasheet PDF

Similar to Green delicious user guide (20)

PDF
SI47XX_Tuner (1).pdf
PDF
Apple Macbook Pro A1278 (K90i) schematic.pdf
PDF
Abusing archive file formats
RTF
Action replay codes for pokemon
PDF
Ax som-bf60x description
TXT
Ak12 upgrade
PDF
バイナリかるた(アーキテクチャかるた)
PDF
バイナリかるた(アーキテクチャかるた・完全版)
PDF
ipad-3-schematic.pdf. gbfbthrgev dvegdv fbfbfn
PDF
Wiring cp1 e_s_analogicas
PDF
Tomasulo Algorithm
PDF
Apple 1 manual & warranty 1976
DOCX
DOC
Serial number
PDF
Subscriber Identity Module
DOCX
PDF
TLP3120 PSpice Model (Free SPICE Model)
PDF
Manual descripción del producto Ricoh IM C300.pdf
PDF
Lenovo Yoga 500 14ACL LT415-AMD 14235-1 MB
PDF
ARM 64bit has come!
SI47XX_Tuner (1).pdf
Apple Macbook Pro A1278 (K90i) schematic.pdf
Abusing archive file formats
Action replay codes for pokemon
Ax som-bf60x description
Ak12 upgrade
バイナリかるた(アーキテクチャかるた)
バイナリかるた(アーキテクチャかるた・完全版)
ipad-3-schematic.pdf. gbfbthrgev dvegdv fbfbfn
Wiring cp1 e_s_analogicas
Tomasulo Algorithm
Apple 1 manual & warranty 1976
Serial number
Subscriber Identity Module
TLP3120 PSpice Model (Free SPICE Model)
Manual descripción del producto Ricoh IM C300.pdf
Lenovo Yoga 500 14ACL LT415-AMD 14235-1 MB
ARM 64bit has come!
Ad

Green delicious user guide

  • 1. GREEN DELICIOUS APPLE-1 EMULATOR Apple-1 on display at the Smithsonian by Ed Uthman / CC Green Delicious is an Apple-1 emulator that runs on Commodore 64. It emulates the 40x24 monochrome display, 7x8 character cells (280x192 pixels), pixel- perfect Signetics 2513 character generator, instant 50/60 Hz hardware scrolling and an ASCII keyboard. It mimics somewhat sufficiently the PIA interface chip functions and it's almost as fast as the original. Apple-1 was introduced the year I was born. This emulator was programmed 37 years later on a Mac.
  • 2. Quick Start Run the emulator and type ‘F000R’. This executes the program at $F000, which displays a little help text I included there for you. Apple-1 is a simple 6502-based computer with keyboard input and slooow text output (yes, approximately one character per frame) and uppercase characters only. There is no backspace and it’s not possible to move the cursor back or up. And no sound, which is great! ‘F800R’ starts C’mon monitor, a machine code monitor I originally wrote for VIC 20 in 2001. With just a few modifications it worked fine on Apple-1 too. BASIC programs are started by typing ‘E2B3R’ and then ‘RUN’. Emulator Keys F1 Clear the screen and return cursor to top-left corner—on Apple-1 this is a hardware key and you can’t do the same in software. Printing 24 carriage returns effectively clears the screen, but the cursor remains at the bottom row F3 Cycle the display text color through a carefully crafted palette of historically relevant greens, grays, yellow and amber F5 Switch cursor type between the colorful apple sprite and the standard ‘@’—It does look a bit like an apple as well, doesn’t it? F7 Apple-1 reset: Jumps to ‘Woz Monitor’ at $FF00 and prompts a ‘’. Hold down F7 for a second to freeze the Apple-1 and enter disk options menu Woz Monitor Apple-1 ROM is a tiny 256-byte program, ‘Woz Monitor’, that allows inspecting memory, writing in hex values and executing programs, and not much else. Though minimal, it’s much less user-hostile than the physical LED-and-switch user interfaces of the time. View memory: 0300 (Just type the address) Hex dump: 0300.03FF Write bytes to memory: 0300:10 12 1A 13 1B … Run program: 0300R
  • 3. C’mon Monitor Type ‘F800R’ in Woz Monitor to launch C’mon. Assemble: A 0300 LDA #$10 (Enter a blank line to stop) Write bytes to memory: W 0300 10 20 30 … Disassemble: D 0300 D (continue) Execute program: G 0300 Hex dump: H 0300 H Text dump: T 0300 T View 6510 registers: R Memory Map & Useful ROM Calls $0000-$0FFF 4K Low RAM $1000-$3FFF Extended 12K RAM (Non-standard) $4000-$903F Green Delicious $C000-$C1FF Tape interface (Not implemented, at least not yet) $D010-$D013 PIA chip registers $E000-$EFFF 4K High RAM (Integer BASIC is loaded here) $F000-$F3FF Help text $F800-$FEFF C’mon monitor $FF00-$FFFF Apple-1 ROM (‘Woz Monitor’) JSR $FFEF Output an ASCII character JSR $FFDC Output a byte in hex
  • 4. Compatibility All Integer BASIC programs should work fine. Most machine code programs should run fine too, although there’s a few points to note. Low RAM at $0002-$0FFF, High RAM at $E000-$EFFF and also Extended RAM at $1000-$3FFF are available. Zeropage locations $00 and $01 cannot be used, because 6510 reserves them for memory configuration and I/O. If your Apple-1 program uses these two locations you have to patch it manually. Tough luck! PIA chip reads and writes must be patched too, but this is done automatically when loading a new program: LDA $D010 -> JSR $8010 (Keyboard input: Reading this also clears bit 7 of $D011) STA $D012 -> JSR $9012 (ASCII output: Writing to the register sets bit 7 of $D012) Also: LDX $D010 -> JSR $8020 LDY $D010 -> JSR $8030 STX $D012 -> JSR $9022 STY $D012 -> JSR $9032 Read keyboard example (returns ASCII value of key + 128): .1 LDA $D011 ; Bit 7 is set when there's a new keypress BPL .1 LDA $D010 ; This becomes JSR $8010 ASCII output example (same as Apple-1 ROM at $FFEF): .1 BIT $D012 ; Bit 7 is cleared when the video terminal is ready to take a new character BMI .1 STA $D012 ; This becomes JSR $9012 Actually, $D012 writes don’t need to be patched if the high bit is always set. But some programs—like the Integer BASIC—occasionally write to $D012 with bit 7 cleared. Memory location $8C00 holds the number of patches done. Patched addresses are stored at $8C02-$8CFF. Type ‘8C00’ or ‘8C00.8CFF’ in Woz Monitor to view this information. If you have typed in a program in the emulator and need to apply the automatic patches there, just type ‘8006R’. This handles the memory areas $0000-$3FFF and $E000-$EFFF. When writing new Apple-1 programs, do not call the patched routines directly. Let Green Delicious do the job for you, and you will have a binary that is compatible with the real thing. If required, you can also skip the automatic PIA patching after loading a file. To do this press Shift+Return in the disk menu (instead of Return).
  • 5. Disk Contents APPLE-1 EMULATOR Full version with Integer BASIC, help text and C’mon APPLE-1 NO BASIC No Integer BASIC preloaded, but C’mon is there APPLE-1 WOZ ONLY Only Apple-1 ROM: 256 bytes ‘Woz Monitor’ at $FF00 CMON.300 Relocated versions of C’mon CMON.900 CMON.E000 CMON.E900 BASIC.E000 Integer BASIC, which you can also load separately MASTERMIND.300 A couple of games that were sold by Apple on tape in 1977 LUNAR LANDER.300 BLACKJACK.E2B3 HAMURABI.E2B3 STARTREK.E2B3 Binary File Format Two first bytes of standard Commodore binary files define the loading address. Green Delicious follows this with two exceptions: Apple-1 Low RAM files ($0000-$0FFF) are relocated to $C000-$CFFF. 16K Extended RAM programs that span $0000-$3FFF also have the load address of $C000, but the Green Delicious loader skips to $1000 when reaching $D000. The first 4K is moved to the right place when the emulator is resumed. Examples: LUNAR LANDER.300 and CMON.300 actually have load address of $C300. Start the programs by typing ‘300R’. BASIC.E000 loads to $E000. ‘E000R’ is BASIC cold start. HAMURABI.E2B3 and other BASIC programs load to $0000-$0FFF. ‘E2B3R’ is BASIC warm start. Low RAM and High RAM programs can be also loaded to C64 memory before starting the emulator: LOAD"CMON.300",8,1 NEW LOAD"APPLE-1 EMULATOR",8,1 RUN
  • 6. Loading and Saving Files Press and hold F7 for a second to freeze Apple-1 and reach the disk options menu: Low RAM is $0000-$0FFF (4K), Extended RAM is $0000-$3FFF (16K) and High RAM is $E000-$EFFF (4K). Apple-1 Information http://en.wikipedia.org/wiki/Apple_I http://www.applefritter.com/apple1 http://www.brielcomputers.com/wordpress/?cat=17 http://commons.wikimedia.org/wiki/File:Apple_I_Computer.jpg Credits Apple-1 ROM (‘Woz Monitor’) and Apple Integer BASIC by Steve Wozniak in 1976 Apple-1 photo by Ed Uthman and licensed under Creative Commons Green Delicious Emulator and C’mon monitor by Aleksi Eeben in 2001 & 2013 aleksi.eeben@gmail.com
  • 9. 0300: D8 20 8B 05 A9 03 85 FE A0 00 84 FD F0 0E 20 22 0310: 03 20 52 03 20 5E 03 A9 01 69 00 A8 20 86 06 4C 0320: 0E 03 20 4D 03 AD 11 D0 10 FB AD 10 D0 20 EF FF 0330: 29 7F C9 5F D0 06 C6 F6 10 EB 30 E6 A4 F6 10 02 0340: A9 0D 99 00 02 C9 0D F0 04 E6 F6 D0 D8 A9 00 85 0350: F6 60 84 F5 A4 F6 E6 F6 B9 00 02 A4 F5 60 A0 07 0360: D9 98 06 F0 05 88 10 F8 38 60 B9 A0 06 85 FB B9 0370: A8 06 85 FC 6C FB 00 20 46 06 B0 43 20 FA 05 90 0380: 06 20 08 06 20 22 03 A0 00 20 52 03 C9 0D D0 05 0390: 18 60 20 52 03 99 00 02 C8 C9 0D D0 F5 A0 00 AD 03A0: 00 02 D9 75 08 D0 10 AD 01 02 D9 76 08 D0 08 AD 03B0: 02 02 D9 77 08 F0 09 C8 C8 C8 C0 AB D0 E1 38 60 03C0: 84 F7 A0 0B A2 00 98 48 B9 50 09 A8 B9 68 09 C9 03D0: 30 F0 0D DD 03 02 D0 11 C9 0D F0 14 C8 E8 D0 EC 03E0: BD 03 02 C9 30 B0 F5 90 00 68 A8 88 10 D6 30 CE 03F0: 68 85 F8 A0 00 B9 47 07 C5 F7 D0 11 B9 DE 07 C5 0400: F8 F0 11 C9 04 D0 06 A5 F8 C9 09 F0 07 C8 C0 97 0410: D0 E3 F0 AA A2 00 B9 B0 06 81 FD B9 DE 07 A8 B9 0420: 20 09 C0 00 F0 2A 85 F7 A2 00 A9 24 E8 DD 02 02 0430: D0 FA C0 09 F0 20 A5 F7 C9 02 F0 09 20 96 04 B0 0440: 72 A0 02 91 FD 20 96 04 B0 69 A0 01 91 FD A5 F7 0450: 20 15 06 4C 81 03 20 96 04 B0 58 85 FA 20 96 04 0460: B0 51 38 E5 FD 85 F9 A5 FA E5 FE 85 FA 10 14 A9 0470: 81 C5 F9 B0 1A A9 FF C5 FA D0 14 A6 F9 CA CA 8A 0480: 4C 4A 04 A9 81 C5 F9 90 06 A9 00 C5 FA F0 EC A9 0490: 21 20 EF FF 38 60 BD 03 02 E8 20 77 06 B0 14 2A 04A0: 2A 2A 2A 29 F0 85 FB BD 03 02 E8 20 77 06 B0 03 04B0: 05 FB 18 60 20 46 06 A9 10 85 FA 20 05 06 A0 02 04C0: B1 FD 85 F8 88 B1 FD 85 F7 88 B1 FD D9 B0 06 F0 04D0: 0A C8 C0 97 D0 F6 A9 00 AA F0 06 BE 47 07 B9 DE 04E0: 07 85 F9 A0 03 BD 75 08 20 EF FF E8 88 D0 F6 A4 04F0: F9 F0 2A 20 41 06 B9 38 09 A8 20 86 06 A4 F9 B9 0500: 2C 09 F0 25 30 05 A5 F8 20 DC FF A5 F7 20 DC FF 0510: A4 F9 B9 44 09 F0 06 A8 20 86 06 A4 F9 B9 20 09 0520: 20 15 06 C6 FA D0 94 18 60 85 F8 A5 F7 10 02 C6 0530: F8 18 69 02 90 02 E6 F8 18 65 FD 85 F7 A5 FE 65 0540: F8 85 F8 4C 06 05 20 46 06 A9 08 85 FA 20 05 06 0550: A2 20 20 1F 06 C6 FA D0 F4 18 60 20 46 06 A9 04 0560: 85 FA 20 05 06 A0 00 98 48 B1 FD 20 DC FF 20 41 0570: 06 68 A8 C8 C0 08 D0 EF A2 08 20 1F 06 C6 FA D0 0580: E1 18 60 20 46 06 B0 5F 20 A0 05 08 8D 84 02 8E 0590: 83 02 8C 82 02 BA 8E 81 02 68 8D 80 02 D8 18 60 05A0: 6C FD 00 A0 03 20 86 06 A0 04 B9 80 02 20 DC FF 05B0: 20 41 06 88 D0 F4 AD 80 02 85 F8 A2 08 A9 00 26 05C0: F8 69 30 20 EF FF CA D0 F4 18 60 20 46 06 B0 17 05D0: A9 00 85 FC 20 FA 05 B0 0D 20 5B 06 B0 09 A4 FC 05E0: 91 FD E6 FC D0 EE 18 60 20 46 06 B0 0C 85 F7 A5 05F0: FE 85 F8 20 46 06 B0 01 18 60 20 52 03 C9 20 D0 0600: 02 18 60 38 60 20 3E 06 A5 FE 20 DC FF A5 FD 20 0610: DC FF 4C 41 06 18 65 FD 85 FD 90 02 E6 FE 60 A0 0620: 00 B1 FD C9 A0 B0 08 C9 80 B0 0F C9 20 90 0B 20 0630: EF FF C8 CA D0 EB 98 4C 15 06 A9 2E D0 F1 A9 0D 0640: 2C A9 20 4C EF FF 20 FA 05 B0 0F 20 5B 06 B0 0A 0650: 85 FE 20 5B 06 B0 03 85 FD 18 60 20 52 03 20 77 0660: 06 B0 13 2A 2A 2A 2A 29 F0 85 FB 20 52 03 20 77 0670: 06 B0 03 05 FB 18 60 A0 0F D9 B6 09 F0 05 88 10 0680: F8 38 60 98 18 60 BE 5C 09 A0 00 BD 00 09 F0 06 0690: 20 EF FF E8 D0 F5 18 60 0D 41 48 54 57 47 44 52 06A0: 59 77 5B 46 CB 83 B4 A3 05 03 05 05 05 05 04 05 06B0: 69 65 75 6D 7D 79 61 71 29 25 35 2D 3D 39 21 31 06C0: 0A 06 16 0E 1E 90 B0 F0 24 2C 30 D0 10 00 50 70 06D0: 18 D8 58 B8 C9 C5 D5 CD DD D9 C1 D1 E0 E4 EC C0 06E0: C4 CC C6 D6 CE DE CA 88 49 45 55 4D 5D 59 41 51 06F0: E6 F6 EE FE E8 C8 4C 6C 20 A9 A5 B5 AD BD B9 A1 0700: B1 A2 A6 B6 AE BE A0 A4 B4 AC BC 4A 46 56 4E 5E 0710: EA 09 05 15 0D 1D 19 01 11 48 08 68 28 2A 26 36 0720: 2E 3E 6A 66 76 6E 7E 4D 60 E9 E5 F5 ED FD F9 E1 0730: F1 38 F8 78 85 95 8D 9D 99 81 91 86 96 8E 84 94 0740: 8C AA A8 BA 8A 9A 98 03 03 03 03 03 03 03 03 06 0750: 06 06 06 06 06 06 06 09 09 09 09 09 0C 0F 12 15 0760: 15 18 1B 1E 21 24 27 2A 2D 30 33 36 36 36 36 36 0770: 36 36 36 39 39 39 3C 3C 3C 3F 3F 3F 3F 42 45 48 0780: 48 48 48 48 48 48 48 4B 4B 4B 4B 4E 51 54 54 57 0790: 5A 5A 5A 5A 5A 5A 5A 5A 5D 5D 5D 5D 5D 60 60 60 07A0: 60 60 63 63 63 63 63 66 69 69 69 69 69 69 69 69 07B0: 6C 6F 72 75 78 78 78 78 78 7B 7B 7B 7B 7B 7E 81 07C0: 84 84 84 84 84 84 84 84 87 8A 8D 90 90 90 90 90 07D0: 90 90 93 93 93 96 96 96 99 9C 9F A2 A5 A8 01 02 07E0: 03 04 05 06 07 08 01 02 03 04 05 06 07 08 00 02 07F0: 03 04 05 09 09 09 02 04 09 09 09 00 09 09 00 00 0800: 00 00 01 02 03 04 05 06 07 08 01 02 04 01 02 04 0810: 02 03 04 05 00 00 01 02 03 04 05 06 07 08 02 03 0820: 04 05 00 00 04 0A 04 01 02 03 04 05 06 07 08 01 0830: 02 0B 04 06 01 02 03 04 05 00 02 03 04 05 00 01 0840: 02 03 04 05 06 07 08 00 00 00 00 00 02 03 04 05 0850: 00 02 03 04 05 00 00 01 02 03 04 05 06 07 08 00 0860: 00 00 02 03 04 05 06 07 08 02 0B 04 02 03 04 00 0870: 00 00 00 00 00 3F 3F 3F 41 44 43 41 4E 44 41 53 0880: 4C 42 43 43 42 43 53 42 45 51 42 49 54 42 4D 49 0890: 42 4E 45 42 50 4C 42 52 4B 42 56 43 42 56 53 43 08A0: 4C 43 43 4C 44 43 4C 49 43 4C 56 43 4D 50 43 50 08B0: 58 43 50 59 44 45 43 44 45 58 44 45 59 45 4F 52 08C0: 49 4E 43 49 4E 58 49 4E 59 4A 4D 50 4A 53 52 4C 08D0: 44 41 4C 44 58 4C 44 59 4C 53 52 4E 4F 50 4F 52 08E0: 41 50 48 41 50 48 50 50 4C 41 50 4C 50 52 4F 4C 08F0: 52 4F 52 52 54 49 52 54 53 53 42 43 53 45 43 53 0900: 45 44 53 45 49 53 54 41 53 54 58 53 54 59 54 41 0910: 58 54 41 59 54 53 58 54 58 41 54 58 53 54 59 41 0920: 01 02 02 02 03 03 03 02 02 02 03 02 80 80 80 80 0930: 01 01 01 80 80 00 01 80 00 04 05 05 05 05 05 06 0940: 06 05 06 05 00 00 00 07 00 07 08 09 0A 00 0B 08 0950: 00 01 07 0C 13 1A 23 2C 35 13 3E 47 F1 C7 C6 DB 0960: CA CB CD D0 D8 D3 D7 D5 0D 20 23 24 30 30 0D 20 0970: 24 30 30 0D 20 24 30 30 2C 58 0D 20 24 30 30 30 0980: 30 0D 20 24 30 30 30 30 2C 58 0D 20 24 30 30 30 0990: 30 2C 59 0D 20 28 24 30 30 2C 58 29 0D 20 28 24 09A0: 30 30 29 2C 59 0D 20 28 24 30 30 30 30 29 0D 20 09B0: 24 30 30 2C 59 0D 30 31 32 33 34 35 36 37 38 39 09C0: 41 42 43 44 45 46 3F 0D 2E 00 23 24 00 28 24 00 09D0: 2C 58 00 2C 58 29 00 29 2C 59 00 41 43 20 58 52 09E0: 20 59 52 20 53 50 20 4E 56 2D 42 44 49 5A 43 0D 09F0: 00 0D 43 27 4D 4F 4E 20 41 50 50 4C 45 0D 2E 00 300R