Apple ][+#

Apple ][+ Specifications#

Lifespan

1979-1983

Media

Cassette tape, 5.25” floppy disk (Disk II)

CPU

MOS Technology 6502 @ 1 MHz

Memory

16K-48K RAM, 12K ROM (expandable to 64K with a Language Card)

Display

40x24 text, 40x48 lo-res graphics (16 colors), 280x192 hi-res graphics (6 colors)

Sound

1-bit speaker

Input

Keyboard, paddle controllers, joystick

FozzTexx, CC BY-SA 4.0 https://creativecommons.org/licenses/by-sa/4.0, via Wikimedia Commons

History#

The Apple ][+ was introduced by Apple Computer, Inc. in June 1979 as an enhancement to the original Apple ][ model, which was released in 1977. The Apple ][ series of computers were designed primarily by Steve Wozniak and marketed by Steve Jobs. The Apple ][+ added the Applesoft BASIC programming language, which was integrated into the ROM and replaced the Integer BASIC of the original Apple ][. The Apple ][+ also featured an improved keyboard, with keys for control characters and lowercase letters.

The Apple ][+ was successful in the early years of personal computing, especially in the education market. It was eventually succeeded by the Apple //e in 1983, which replaced the discrete IC-based circuitry with a single ASIC chip.

Programming#

Applesoft BASIC was developed by Microsoft. It offered improved floating-point arithmetic and graphics commands compared to Integer BASIC. On an unexpanded Apple ][+, Integer BASIC is no longer available; it can be restored by loading it into RAM on an optional Language Card (the same card that provides the bank-switched RAM described below).

The 8bitworkshop IDE doesn’t include the original Apple ROMs, so BASIC is not available. Instead, you can program in 6502 assembler or in C with the CC65 compiler tools.

Memory Map#

Address Range

Description

$0000-$00FF

Zero page

$0100-$01FF

Stack

$0200-$02FF

Input buffer, variables

$0300-$03BF

Free space

$03C0-$03FF

DOS Vectors

$0400-$07FF

Text/Lores Page 1

$0800-$1FFF

Free space

$2000-$3FFF

Hires Page 1

$4000-$5FFF

Hires Page 2

$6000-$BFFF

Free space

$C000-$CFFF

I/O switches and slot ROM

$D000-$DFFF

ROM (or bank-switched RAM bank 1/2 with Language Card)

$E000-$FFFF

ROM (Applesoft BASIC, Monitor), or RAM with Language Card

I/O Switches and Softswitches#

The Apple ][+ uses memory-mapped I/O with “softswitches” - reading or writing (or in some cases just accessing, read or write) specific memory addresses toggles hardware features. Note that the 80-column/auxiliary-memory switches found at $C000-$C00F on the later Apple //e (80STORE, RAMRD, RAMWRT, ALTZP, SLOTC3ROM, 80COL, ALTCHARSET, INTCXROM) don’t exist on the ][+ - on this machine $C000 and $C010 are the keyboard data and strobe registers instead.

Address

Function

$C000

Keyboard data (read); bit 7 set if a key has been pressed, bits 0-6 are the ASCII code

$C010

Keyboard strobe (read or write clears the keyboard strobe / “any key down” flag)

$C020

Cassette output toggle

$C030

Speaker toggle

$C040

Utility strobe (game I/O connector)

$C050

Graphics mode

$C051

Text mode

$C052

Mixed graphics/text off

$C053

Mixed graphics/text on

$C054

Text/graphics page 1

$C055

Text/graphics page 2

$C056

Lo-res graphics

$C057

Hi-res graphics

$C058

Annunciator 0 off

$C059

Annunciator 0 on

$C05A

Annunciator 1 off

$C05B

Annunciator 1 on

$C05C

Annunciator 2 off

$C05D

Annunciator 2 on

$C05E

Annunciator 3 off

$C05F

Annunciator 3 on

$C060

Cassette input

$C061

Push button 0 (open-apple / PB0)

$C062

Push button 1 (closed-apple / PB1)

$C063

Push button 2 (PB2)

$C064

Paddle 0 analog input (PDL0)

$C065

Paddle 1 analog input (PDL1)

$C066

Paddle 2 analog input (PDL2)

$C067

Paddle 3 analog input (PDL3)

$C070

Paddle trigger (resets paddle RC timers)

$C080-$C08F

Language Card bank switching (see below)

$C0S0-$C0SF

Slot I/O (peripheral card soft switches; S = slot number 1-7)

Language Card Bank Switching ($C080-$C08F)#

A 16K Language Card in slot 0 (or the equivalent built-in RAM on later machines) adds two extra 4K RAM banks that can be swapped in under the $D000-$DFFF ROM area, plus 8K of RAM that lives under $E000-$FFFF. Access to $D000-$DFFF is controlled by bit 3 of the address (bank 1 vs. bank 2); access to $E000-$FFFF always uses the same RAM regardless of which bank is selected. The switches are accessed by reading (not writing) the following addresses; writing is enabled only after the switch has been read twice in a row:

Address

Read source ($D000-$FFFF)

Write

$C080

RAM bank 2

Write-protected

$C081

ROM

RAM bank 2 (after 2 reads)

$C082

ROM

Write-protected

$C083

RAM bank 2

RAM bank 2 (after 2 reads)

$C088

RAM bank 1

Write-protected

$C089

ROM

RAM bank 1 (after 2 reads)

$C08A

ROM

Write-protected

$C08B

RAM bank 1

RAM bank 1 (after 2 reads)

$C084-$C087 mirror $C080-$C083, and $C08C-$C08F mirror $C088-$C08B.

Typical usage:

  • To run code from language-card RAM, read $C081 (or $C089 for bank 1) twice to select ROM-read/RAM-write, copy your code/data into $D000-$FFFF, then read $C080/$C088 once to switch back to reading RAM with writes disabled.

  • DOS 3.3 and ProDOS both relocate parts of themselves into language-card RAM using this mechanism to free up main memory.

Graphics Modes#

Text Mode (40x24)#

Standard text display using the built-in character set. Characters are stored in the text page starting at $0400.

Lo-Res Graphics (40x48, 16 colors)#

Low-resolution color graphics with 16 available colors. Each byte represents two 4-bit pixels vertically stacked.

Hi-Res Graphics (280x192, 6 colors)#

High-resolution monochrome graphics with color artifacts. Uses two graphics pages at $2000 and $4000.

Development Tools#

CC65 Compiler#

C programs are compiled using the CC65 toolchain, which provides:

  • Standard C library support

  • Apple II-specific extensions

  • TGI (Tiny Graphics Interface) graphics library

  • Conio (console I/O) library

Assembly Tools#

  • DASM - Versatile macro assembler (.a, .dasm)

  • Merlin32 - Apple II-specific assembler (.lnk)

  • CA65 - CC65’s linker-aware assembler (.s, .ca65)

Memory Configuration#

Programs that use hi-res graphics should include the following:

#define CFGFILE apple2-hgr.cfg
#pragma data-name(push,"HGR")
#pragma data-name(pop)

For details and other configuration files, see the CC65 documentation.

Binary Formats#

The 8bitworkshop Apple II platform detects multiple binary formats for loading programs:

Disk Images (.dsk files)#

  • 16-sector, 35-track disk images (143,360 bytes)

  • Automatically detected and mounted as a DiskII drive in slot 6

  • Supports Apple DOS 3.3 format with multiple files

AppleSingle Format#

  • Header signature: $00 $05 $16 $00 (first 4 bytes)

  • Load address: Stored at offset $38-$39 (big-endian)

  • Header size: 58 bytes

  • Used by CC65 compiler (exehdr.s)

DOS 3.3 Binary Format#

  • 4-byte header: origin address (2 bytes, little-endian) + size (2 bytes, little-endian)

  • Automatically detected when:

    • Size matches file length minus 4 bytes

    • Origin address is less than $C000

    • Origin + size is less than $13000

    • Origin is $803 or aligned to $xx00

  • Programs load at the specified origin address in the header

Raw Binary Format#

  • Default load address: $803

  • Used when no other format is detected

Comments