Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
histcomp:apple_ii [2024-08-21 17:11] – created asdf | histcomp:apple_ii [2024-10-01 06:15] (current) – asdf | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Apple ][ ====== | ====== Apple ][ ====== | ||
+ | The bulk of this page will focus on the Enhanced IIe, both because it was the most popular of the line and because it is the model we have. | ||
+ | |||
+ | ===== Memory layout ===== | ||
+ | Despite the [[.: | ||
+ | |||
+ | * \$0000--\$00FF: | ||
+ | * \$0100--\$01FF: | ||
+ | * \$0200--\$02FF: | ||
+ | * \$0300--\$03CF: | ||
+ | * \$03D0--\$03FF: | ||
+ | * \$0400--\$07FF: | ||
+ | * \$0800--\$0BFF: | ||
+ | * \$0C00--\$1FFF: | ||
+ | * \$2000--\$3FFF: | ||
+ | * \$4000--\$5FFF: | ||
+ | * \$6000--\$BFFF: | ||
+ | * \$C000--\$C0FF: | ||
+ | * \$C100--\$C1FF: | ||
+ | * \$C200--\$C2FF: | ||
+ | * \$C300--\$C3FF: | ||
+ | * \$C400--\$C4FF: | ||
+ | * \$C500--\$C5FF: | ||
+ | * \$C600--\$C6FF: | ||
+ | * \$C700--\$C7FF: | ||
+ | |||
+ | |||
+ | ==== Zero page ==== | ||
+ | |||
+ | ==== I/O ==== | ||
+ | <table |tab_io> | ||
+ | < | ||
+ | ^ Address ^ Direction ^ Symbolic name ^ Description ^ | ||
+ | | \$C000 | W | '' | ||
+ | | | R | '' | ||
+ | | | R7 | '' | ||
+ | | \$C001 | W | '' | ||
+ | | \$C002 | W | '' | ||
+ | | \$C003 | W | '' | ||
+ | | \$C004 | W | '' | ||
+ | | \$C005 | w | '' | ||
+ | | \$C006 | W | '' | ||
+ | | \$C007 | W | '' | ||
+ | | \$C008 | W | '' | ||
+ | | \$C009 | W | '' | ||
+ | | \$C00A | W | '' | ||
+ | | \$C00B | W | '' | ||
+ | | \$C00C | W | '' | ||
+ | | \$C00D | W | '' | ||
+ | | \$C00E | W | '' | ||
+ | | \$C00F | W | '' | ||
+ | | \$C010 | R7 | '' | ||
+ | | | RW | '' | ||
+ | | \$C011 | R7 | '' | ||
+ | | \$C012 | R7 | '' | ||
+ | | \$C013 | R7 | '' | ||
+ | | \$C014 | R7 | '' | ||
+ | | \$C015 | R7 | '' | ||
+ | | \$C016 | R7 | '' | ||
+ | | \$C017 | R7 | '' | ||
+ | | \$C018 | R7 | '' | ||
+ | | \$C019 | R7 | '' | ||
+ | | \$C01A | R7 | '' | ||
+ | | \$C01B | R7 | '' | ||
+ | | \$C01C | R7 | '' | ||
+ | | \$C01D | R7 | '' | ||
+ | | \$C01E | R7 | '' | ||
+ | | \$C01F | R7 | '' | ||
+ | | \$C020 | R | '' | ||
+ | | \$C021 | | ||
+ | | \$C022 | | ||
+ | | \$C023 | | ||
+ | | \$C024 | | ||
+ | | \$C025 | | ||
+ | | \$C026 | | ||
+ | | \$C027 | | ||
+ | | \$C028 | | ||
+ | | \$C029 | | ||
+ | | \$C02A | | ||
+ | | \$C02B | | ||
+ | | \$C02C | | ||
+ | | \$C02D | | ||
+ | | \$C02E | | ||
+ | | \$C02F | | ||
+ | | \$C030 | R | '' | ||
+ | | \$C031 | | ||
+ | | \$C032 | | ||
+ | | \$C033 | | ||
+ | | \$C034 | | ||
+ | | \$C035 | | ||
+ | | \$C036 | | ||
+ | | \$C037 | | ||
+ | | \$C038 | | ||
+ | | \$C039 | | ||
+ | | \$C03A | | ||
+ | | \$C03B | | ||
+ | | \$C03C | | ||
+ | | \$C03D | | ||
+ | | \$C03E | | ||
+ | | \$C03F | | ||
+ | | \$C040 | R | '' | ||
+ | | \$C041 | | ||
+ | | \$C042 | | ||
+ | | \$C043 | | ||
+ | | \$C044 | | ||
+ | | \$C045 | | ||
+ | | \$C046 | | ||
+ | | \$C047 | | ||
+ | | \$C048 | | ||
+ | | \$C049 | | ||
+ | | \$C04A | | ||
+ | | \$C04B | | ||
+ | | \$C04C | | ||
+ | | \$C04D | | ||
+ | | \$C04E | | ||
+ | | \$C04F | | ||
+ | | \$C050 | RW | '' | ||
+ | | \$C051 | RW | '' | ||
+ | | \$C052 | RW | '' | ||
+ | | \$C053 | RW | '' | ||
+ | | \$C054 | RW | '' | ||
+ | | \$C055 | RW | '' | ||
+ | | \$C056 | RW | '' | ||
+ | | \$C057 | RW | '' | ||
+ | | \$C058 | RW | '' | ||
+ | | \$C059 | RW | '' | ||
+ | | \$C05A | RW | '' | ||
+ | | \$C05B | RW | '' | ||
+ | | \$C05C | RW | '' | ||
+ | | \$C05D | RW | '' | ||
+ | | \$C05E | RW | '' | ||
+ | | \$C05F | RW | '' | ||
+ | | \$C060 | R7 | '' | ||
+ | | \$C061 | R7 | '' | ||
+ | | \$C062 | R7 | '' | ||
+ | | \$C063 | R7 | '' | ||
+ | | \$C064 | R7 | '' | ||
+ | | \$C065 | R7 | '' | ||
+ | | \$C066 | R7 | '' | ||
+ | | \$C067 | R7 | '' | ||
+ | | \$C068 | R | '' | ||
+ | | \$C069 | | ||
+ | | \$C06A | | ||
+ | | \$C06B | | ||
+ | | \$C06C | | ||
+ | | \$C06D | | ||
+ | | \$C06E | | ||
+ | | \$C06F | | ||
+ | | \$C070 | | ||
+ | | \$C071 | | ||
+ | | \$C072 | | ||
+ | | \$C073 | | ||
+ | | \$C074 | | ||
+ | | \$C075 | | ||
+ | | \$C076 | | ||
+ | | \$C077 | | ||
+ | | \$C078 | | ||
+ | | \$C079 | | ||
+ | | \$C07A | | ||
+ | | \$C07B | | ||
+ | | \$C07C | | ||
+ | | \$C07D | | ||
+ | | \$C07E | | ||
+ | | \$C07F | | ||
+ | | \$C080 | R | '' | ||
+ | | \$C081 | RR | '' | ||
+ | | \$C082 | R | '' | ||
+ | | \$C083 | RR | '' | ||
+ | | \$C084 | | ||
+ | | \$C085 | | ||
+ | | \$C086 | | ||
+ | | \$C087 | | ||
+ | | \$C088 | R | '' | ||
+ | | \$C089 | RR | '' | ||
+ | | \$C08A | R | '' | ||
+ | | \$C08B | RR | '' | ||
+ | | \$C08C | | ||
+ | | \$C08D | | ||
+ | | \$C08E | | ||
+ | | \$C08F | | ||
+ | | \$C090--\$C09F | | | Reserved for use by slot 1 | | ||
+ | | \$C0A0--\$C0AF | | | Reserved for use by slot 2 | | ||
+ | | \$C0B0--\$C0BF | | | Reserved for use by slot 3 | | ||
+ | | \$C0C0--\$C0CF | | | Reserved for use by slot 4 | | ||
+ | | \$C0D0--\$C0DF | | | Reserved for use by slot 5 | | ||
+ | | \$C0E0--\$C0EF | | | Reserved for use by slot 6 | | ||
+ | | \$C0F0--\$C0FF | | | Reserved for use by slot 7 | | ||
+ | </ | ||
+ | |||
+ | ==== Video memory ==== | ||
+ | ==== Other locations ==== | ||
+ | To determine the exact model and version, examine \$FBB3 and \$FBC0. If \$FBB3 contains \$06, the computer is a IIe or IIc. \$FBC0 can contain the following values: [(Little1985)] | ||
+ | |||
+ | * \$EA: IIe with original ROMs | ||
+ | * \$E0: IIe with enhanced ROMs | ||
+ | * \$00: IIc | ||
+ | |||
+ | ===== Programming ===== | ||
+ | ==== Applesoft ==== | ||
+ | ==== Integer BASIC ==== | ||
+ | ==== System monitor ==== | ||
+ | <table |tab_moncmd> | ||
+ | < | ||
+ | |||
+ | </ | ||
+ | ===== Operating systems ===== | ||
+ | ==== DOS 3.3 ==== | ||
+ | ==== ProDOS 8 ==== | ||
+ | ==== CP/M ==== | ||
+ | In order to run CP/M, a Z80 soft card is required. While we do not currently possess one, it should be possible to find one online --- or we may be able to assemble our own from scratch using available schematics [(msc80scschem)]. | ||
+ | |||
+ | ===== Peripheral cards ===== | ||
+ | As with the rest of this page, we will focus on cards our machine has installed. | ||
+ | |||
+ | The Apple IIe has eight expansion slots (7 regular and 1 auxiliary). This alone is indicative of a completely different era of Apple' | ||
+ | |||
+ | ==== Apple extended 80-column card ==== | ||
+ | ==== Disk II interface ==== | ||
+ | ==== Super Serial ==== | ||
+ | ==== Applied Engineering RAMFactor | ||
+ | A RAM disk/memory expansion. ProDOS automatically registers it as a volume named ''/ | ||
+ | |||
+ | The particular revision we have contains a total of 1 MB of RAM. | ||
+ | |||
+ | ===== Sample code ===== | ||
+ | ==== Determining current execution page ==== | ||
+ | This snippet is particularly useful for writing peripheral card ROM, where the code needs to function irrespective of its installed slot. It works by calling a " | ||
+ | |||
+ | If calling from a peripheral card, the slot number can be identified by ANDing the result with 0F. | ||
+ | <code asm6502> | ||
+ | ; stores the high byte of the execution address in the A register | ||
+ | ; clobbers: A, X | ||
+ | getpage: | ||
+ | JSR $FF58 ; push the return address to the stack | ||
+ | TSX ; use stack pointer as index to stack page | ||
+ | LDA $100, | ||
+ | RTS | ||
+ | </ | ||
+ | |||
+ | ==== Writing bytes as hexadecimal ==== | ||
+ | We don't have to reinvent the wheel for this one --- the [[#system monitor]] includes a handy routine called '' | ||
+ | |||
+ | <code asm6502> | ||
+ | PRBYTE: | ||
+ | LSR A | ||
+ | LSR A | ||
+ | LSR A | ||
+ | LSR A | ||
+ | JSR PRHEXZ | ||
+ | PLA | ||
+ | PRHEX: | ||
+ | PRHEXZ: | ||
+ | CMP #$BA | ||
+ | BCC COUT ; =$FDED | ||
+ | ADC #$06 | ||
+ | COUT: JMP (CSWL) | ||
+ | </ | ||
+ | |||
+ | To make use of it from Applesoft, load the following anywhere into memory: | ||
+ | |||
+ | <code asm6502> | ||
+ | JSR $DEBE ; CHKCOM - skips comma in Applesoft parsing | ||
+ | JSR $DFE3 ; GETPNT - get pointer to variable data, put it in $83...$84 | ||
+ | LDY #$00 | ||
+ | LDA ($83), | ||
+ | JSR $FDDA ; PRBYTE | ||
+ | INY | ||
+ | LDA ($83), | ||
+ | JMP $FDDA ; PRBYTE (will RTS for us) | ||
+ | </ | ||
+ | |||
+ | Then it can be called from Applesoft like so (assuming the program was loaded at \$0300): | ||
+ | |||
+ | <code basic> | ||
+ | 10 LET X% = 69 | ||
+ | 20 CALL 768,X% | ||
+ | </ | ||
+ | |||
+ | ==== Generate the Mandelbrot set ==== | ||
+ | Useful as a benchmark. The computer must be in 80-column mode for it to display properly. | ||
+ | |||
+ | <code basic> | ||
+ | 10 FOR Y=-12 TO 12 | ||
+ | 20 FOR X=-39 TO 39 | ||
+ | 30 CA=X*0.0458 | ||
+ | 40 CB=Y*.08333 | ||
+ | 50 A=CA | ||
+ | 60 B=CB | ||
+ | 70 FOR I = 0 TO 15 | ||
+ | 80 T=A*A-B*B+CA | ||
+ | 90 B=2*A*B+CB | ||
+ | 100 A=T | ||
+ | 110 IF(A*A+B*B)> | ||
+ | 120 NEXT I | ||
+ | 130 PRINT " "; | ||
+ | 140 GOTO 210 | ||
+ | 200 IF I>9 THEN I=I+7 | ||
+ | 205 PRINT CHR$(48+I); | ||
+ | 210 NEXT X | ||
+ | 220 PRINT | ||
+ | 230 NEXT Y | ||
+ | </ | ||
===== Resources ===== | ===== Resources ===== | ||
* [[https:// | * [[https:// | ||
+ | * [[http:// | ||
+ | * [[https:// | ||
+ | |||
+ | ===== Notes ===== | ||
+ | [(Little1985>// | ||
+ | [(a2etechnotes> | ||
+ | [(a2etechrefmanual> | ||
+ | [(msc80scschem> | ||
+ | [(a2eenhpg> | ||
+ | [(Sather1985> | ||
+ | [(usingprodos> | ||
+ | [(allpinoutsa2> | ||
+ | |||
+ | ~~REFNOTES~~ |