Portable emulator of an Apple ][+ or //e. Written in Go. Runs Total Replay.
Go to file
2020-04-04 20:13:53 +02:00
.circleci Add SDL2 build dependency in circle CI 2019-12-22 17:11:50 +01:00
apple2console Added the -traceCpu and -traceSS command line switches. 2019-09-24 23:32:03 +02:00
apple2sdl Placing screen rendering on pause as well. 2020-03-15 18:02:42 +01:00
core6502 Improve trace 2020-04-04 20:13:53 +02:00
doc Read only ProDOS hard disk support. 2019-10-02 23:39:39 +02:00
dockerbuild Use golang 1.12 docker official image for builds 2019-12-27 15:31:34 +01:00
romdumps Apple II Memory Expansion Card with up to 1024KB 2020-03-08 23:39:25 +01:00
.gitignore Initial support for the Base64A clone. Support for ROM banks 2019-06-09 17:36:29 +02:00
apple2.go Adding pause capability. 2020-03-15 18:02:42 +01:00
apple2main.go Apple II Memory Expansion Card with up to 1024KB 2020-03-08 23:39:25 +01:00
apple2Setup.go Apple II Memory Expansion Card with up to 1024KB 2020-03-08 23:39:25 +01:00
base64a.go More Apple //e softswitches 2019-11-09 18:13:19 +01:00
cardBase.go Apple II Memory Expansion Card with up to 1024KB 2020-03-08 23:39:25 +01:00
cardDisk2.go Autodetect diskette file format 2019-12-22 14:37:19 +01:00
cardFastChip.go Fastchip alternate mode 2020-04-02 21:50:01 +02:00
cardHardDisk.go Smartport support on hard drives 2020-01-12 17:14:20 +01:00
cardInOut.go Apple II Memory Expansion Card with up to 1024KB 2020-03-08 23:39:25 +01:00
cardLanguage.go Fix shadow slot 3 ROM in Apple //e 2019-11-09 18:13:19 +01:00
cardLogger.go Memory manager rewritten. Logic calculated on every access. 2019-11-09 18:13:19 +01:00
cardMemoryExpansion.go Unused softswitches on the Slinky return 255 2020-03-09 23:22:21 +01:00
cardSaturn.go Memory manager rewritten. Logic calculated on every access. 2019-11-09 18:13:19 +01:00
cardThunderClockPlus.go Nanmed sotfswitches for easier traces. 2019-11-09 18:13:19 +01:00
cardVidHD.go Partial FASTChip emulation. 2019-11-12 23:47:48 +01:00
characterGenerator.go Initial Apple 2e enhanced support 2019-11-09 18:13:19 +01:00
diskette16sector.go Autodetect diskette file format 2019-12-22 14:37:19 +01:00
diskette16sectorTimed.go Autodetect diskette file format 2019-12-22 14:37:19 +01:00
diskette.go Autodetect diskette file format 2019-12-22 14:37:19 +01:00
disketteWoz.go Autodetect diskette file format 2019-12-22 14:37:19 +01:00
fileNib.go Autodetect diskette file format 2019-12-22 14:37:19 +01:00
fileWoz.go Autodetect diskette file format 2019-12-22 14:37:19 +01:00
go.mod Use go 1.12 modules 2019-12-22 16:41:15 +01:00
go.sum Use go 1.12 modules 2019-12-22 16:41:15 +01:00
hardDisk.go Proper Go error management 2019-10-06 01:26:00 +02:00
ioC0Page.go Properly emulate no joysticks available 2019-11-20 23:28:51 +01:00
LICENSE Create LICENSE 2019-02-16 21:03:59 +01:00
memoryManager.go Fix mmu for double hires failing on Tetris 2019-11-20 22:43:37 +01:00
memoryRange.go Proper Go error management 2019-10-06 01:26:00 +02:00
microPD1990ac.go Ignore not supported calls to the ThunderClock+ card. 2019-10-02 23:03:00 +02:00
README.md Add PAUSE in doc 2020-04-02 23:05:21 +02:00
resources.go Proper Go error management 2019-10-06 01:26:00 +02:00
screen.go SuperHiRes video mode 2019-11-11 23:53:50 +01:00
screenDoubleHiRes.go Fix width of Double high res 2019-11-22 23:25:37 +01:00
screenHiRes_test.go Project reorg. Separate executables for the SDL and console versions 2019-06-01 17:11:25 +02:00
screenHiRes.go SuperHiRes video mode 2019-11-11 23:53:50 +01:00
screenLoRes.go Support double width low resolution 2019-11-09 18:13:19 +01:00
screenNtscFilter.go Support double width high resolution 2019-11-09 18:13:19 +01:00
screenSuperHiRes.go Fix the SHR pallette 2019-11-11 23:53:50 +01:00
screenText_test.go Project reorg. Separate executables for the SDL and console versions 2019-06-01 17:11:25 +02:00
screenText.go 80 columns support 2019-11-09 18:13:19 +01:00
softSwitches2.go Properly emulate no joysticks available 2019-11-20 23:28:51 +01:00
softSwitches2e.go SuperHiRes video mode 2019-11-11 23:53:50 +01:00

Apple ][+, //e emulator

Portable emulator of an Apple II+ or //e. Written in Go.

CircleCI

Features

  • Models:
    • Apple ][+ with 48Kb of base RAM
    • Apple //e with 128Kb of RAM
    • Apple //e enhanced with 128Kb of RAM
    • Base64A clone with 48Kb of base RAM and paginated ROM
  • Storage
    • 16 Sector diskettes in NIB format
    • 16 Sector diskettes in DSK format
    • 16 Sector diskettes in WOZ 1.0 or 2.0 format (read only)
    • Hard disk with ProDOS and SmartPort support
  • Emulated extension cards:
    • DiskII controller
    • 16Kb Language Card
    • 256Kb Saturn RAM
    • 1Mb Memory Expansion Card
    • ThunderClock Plus real time clock
    • Bootable hard disk card
    • Apple //e 80 columns with 64Kb extra RAM
    • VidHd, limited to the ROM signature and SHR as used by Total Replay, only for //e models with 128Kb
    • FASTChip, limited to what Total Replay needs to set and clear fast mode
  • Graphic modes:
    • Text 40 columns
    • Text 80 columns (Apple //e only)
    • Low-Resolution graphics
    • Double-Width Low-Resolution graphics (Apple //e only)
    • High-Resolution graphics
    • Double-Width High-Resolution graphics (Apple //e only)
    • Super High Resolution (VidHD only)
    • Mixed mode
  • Displays:
    • Green monochrome monitor with half width pixel support
    • NTSC Color TV (extracting the phase from the mono signal)
    • RGB for Super High Resolution
    • ANSI Console, avoiding the SDL2 dependency
  • Other features:
    • Sound
    • Joystick support. Up to two joysticks or four paddles.
    • Adjustable speed.
    • Fast disk mode to set max speed while using the disks.
    • Single file executable with embedded ROMs and DOS 3.3

Running the emulator

No installation required. Download the single file executable apple2xxx_xxx for linux or Mac, SDL2 graphics or console. Build from source to get the latest features.

Default mode

Execute without parameters to have an emulated Apple //e Enhanced with 128kb booting DOS 3.3 ready to run Applesoft:

casa@servidor:~$ ./apple2sdl

DOS 3.3 started

Play games

Download a DSK or WOZ file or use an URL (Asimov is an excellent source) with the -disk parameter:

casa@servidor:~$ ./apple2sdl -disk "https://www.apple.asimov.net/images/games/action/karateka/karateka (includes intro).dsk"

Karateka

Play the Total Replay collection

Download the excellent Total Replay compilation by a2-4am. Run it with the -hd parameter:

casa@servidor:~$ ./apple2sdl -hd "Total Replay v3.0.2mg"

Displays super hi-res box art as seen with the VidHD card.

Total Replay

Terminal mode

To run text mode right on the terminal without the SDL2 dependency, use apple2console. It runs on the console using ANSI escape codes. Input is sent to the emulated Apple II one line at a time:

casa@servidor:~$ ./apple2console -model 2plus

############################################
#                                          #
#                APPLE II                  #
#                                          #
#     DOS VERSION 3.3  SYSTEM MASTER       #
#                                          #
#                                          #
#            JANUARY 1, 1983               #
#                                          #
#                                          #
# COPYRIGHT APPLE COMPUTER,INC. 1980,1982  #
#                                          #
#                                          #
# ]10 PRINT "HELLO WORLD"                  #
#                                          #
# ]LIST                                    #
#                                          #
# 10  PRINT "HELLO WORLD"                  #
#                                          #
# ]RUN                                     #
# HELLO WORLD                              #
#                                          #
# ]_                                       #
#                                          #
#                                          #
############################################
Line: 

Keys

  • Ctrl-F1: Reset button
  • F5: Toggle speed between real and fastest
  • Ctrl-F5: Show current speed in Mhz
  • F6: Toggle between NTSC color TV and green phosphor monochrome monitor
  • F7: Save current state to disk (incomplete)
  • F8: Restore state from disk (incomplete)
  • F10: Cycle character generator codepages. Only if the character generator ROM has more than one 2Kb page.
  • F11: Toggle on and off the trace to console of the CPU execution
  • F12: Save a screen snapshot to a file snapshot.png
  • Pause: Pause the emulation

Only valid on SDL mode

Command line options

  -charRom string
        rom file for the character generator (default "<default>")
  -disk string
        file to load on the first disk drive (default "<internal>/dos33.dsk")
  -disk2Slot int
        slot for the disk driver. -1 for none. (default 6)
  -diskRom string
        rom file for the disk drive controller (default "<internal>/DISK2.rom")
  -dumpChars
        shows the character map
  -fastChipSlot int
    	slot for the FASTChip accelerator card, -1 for none (default 3)        
  -fastDisk
        set fast mode when the disks are spinning (default true)
  -hd string
        file to load on the hard disk
  -hdSlot int
        slot for the hard drive if present. -1 for none. (default -1)
  -languageCardSlot int
        slot for the 16kb language card. -1 for none
  -memoryExpSlot int
    	  slot for the Memory Expansion card with 1GB. -1 for none (default 4)
  -mhz float
        cpu speed in Mhz, use 0 for full speed. Use F5 to toggle. (default 1.0227142857142857)
  -model string
        set base model. Models available 2plus, 2e, 2enh, base64a (default "2enh")
  -mono
        emulate a green phosphor monitor instead of a NTSC color TV. Use F6 to toggle.
  -panicSS
        panic if a not implemented softswitch is used
  -profile
        generate profile trace to analyse with pprof
  -rom string
        main rom file (default "<default>")
  -saturnCardSlot int
        slot for the 256kb Saturn card. -1 for none (default -1)
  -thunderClockCardSlot int
        slot for the ThunderClock Plus card. -1 for none (default 5)
  -traceCpu
        dump to the console the CPU execution. Use F11 to toggle.
  -traceHD
        dump to the console the hd commands
  -traceSS
        dump to the console the sofswitches calls
  -vidHDSlot int
    	  slot for the VidHD card, only for //e models. -1 for none (default 2)
  -woz string
    	  show WOZ file information


Building from source

apple2console

The only dependency is having a working Go installation on any platform.

Run:

$ go get github.com/ivanizag/apple2/apple2console 
$ go build github.com/ivanizag/apple2/apple2console 

apple2sdl

Besides having a working Go installation, install the SDL2 developer files. Valid for any platform

Run:

$ go get github.com/ivanizag/apple2/apple2sdl
$ go build github.com/ivanizag/apple2/apple2sdl 

Use docker to cross compile for Linux and Windows

To create executables for Linux and Windows without installing Go, SDL2 or the Windows cross compilation toosl, run:

$ cd docker
$ ./build.sh

To run in Windows, copy the file SDL2.dll on the same folder as apple2sdl.exe. The latest SDL2.dll can be found in the Runtime binary for Windows 64-bit.