Portable emulator of an Apple ][+ or //e. Written in Go. Runs Total Replay.
Go to file
2024-11-04 21:49:33 +01:00
.circleci Go version 1.21 2024-08-31 17:31:16 +02:00
.github/workflows Go version 1.21 2024-08-31 17:31:16 +02:00
component Update tests for Card Cat 1.6 supporting more cards 2024-09-15 18:59:52 +02:00
configs Proconfigured model for A2Desktop 2024-11-04 21:49:33 +01:00
doc Proconfigured model for A2Desktop 2024-11-04 21:49:33 +01:00
dockerbuild Go version 1.21 2024-08-31 17:31:16 +02:00
frontend Proconfigured model for A2Desktop 2024-11-04 21:49:33 +01:00
fujinet some cleaning 2024-07-29 18:07:24 +02:00
resources Proconfigured model for A2Desktop 2024-11-04 21:49:33 +01:00
screen Softer attenuation on the NTSC filter 2024-09-09 21:40:11 +02:00
storage Proconfigured model for A2Desktop 2024-11-04 21:49:33 +01:00
woz_test_images Woz protections automatic tests 2022-02-26 00:05:09 +01:00
.gitignore Proconfigured model for A2Desktop 2024-11-04 21:49:33 +01:00
a2audit_test.go Update tests for Card Cat 1.6 supporting more cards 2024-09-15 18:59:52 +02:00
apple2.go Proconfigured model for A2Desktop 2024-11-04 21:49:33 +01:00
apple2Run.go Show speed on screen 2024-11-01 21:35:20 +01:00
apple2Tester.go Update tests for Card Cat 1.6 supporting more cards 2024-09-15 18:59:52 +02:00
boardApple2.go Support DMA requests from expansion cards 2024-09-14 22:01:53 +02:00
boardApple2e.go Support DMA requests from expansion cards 2024-09-14 22:01:53 +02:00
boardBase64a.go some cleaning 2024-07-29 18:07:24 +02:00
boardBasis108.go some cleaning 2024-07-29 18:07:24 +02:00
cardBase.go Trace slot memory access 2024-10-18 23:56:46 +02:00
cardBrainBoard2.go Remove setBase from memeryHandler, it is not needed 2024-03-04 21:36:45 +01:00
cardBrainBoard_test.go Support DMA requests from expansion cards 2024-09-14 22:01:53 +02:00
cardBrainBoard.go Remove setBase from memeryHandler, it is not needed 2024-03-04 21:36:45 +01:00
cardBuilder_test.go Explicit cards ROM layout 2024-03-24 20:15:16 +01:00
cardBuilder.go Trace slot memory access 2024-10-18 23:56:46 +02:00
cardCat_test.go Update tests for Card Cat 1.6 supporting more cards 2024-09-15 18:59:52 +02:00
cardDan2Controller_test.go Partial support for the Basis 108 clone 2024-07-28 22:37:48 +02:00
cardDan2Controller.go some cleaning 2024-07-29 18:07:24 +02:00
cardDisk2.go Support DMA requests from expansion cards 2024-09-14 22:01:53 +02:00
cardDisk2DriveStepper.go some cleaning 2024-07-29 18:07:24 +02:00
cardDisk2Sequencer.go Support DMA requests from expansion cards 2024-09-14 22:01:53 +02:00
cardDisk2SequencerDrive.go Support for 13 sectors disks 2024-07-21 21:45:04 +02:00
cardFastChip.go Better usage info 2024-02-08 22:17:14 +01:00
cardInOut.go some cleaning 2024-07-29 18:07:24 +02:00
cardLanguage.go some cleaning 2024-07-29 18:07:24 +02:00
cardLogger.go Configuration redone 2024-01-06 21:48:23 +01:00
cardMemoryExpansion.go Explicit cards ROM layout 2024-03-24 20:15:16 +01:00
cardMouse.go Proconfigured model for A2Desktop 2024-11-04 21:49:33 +01:00
cardMultiRom.go Remove setBase from memeryHandler, it is not needed 2024-03-04 21:36:45 +01:00
cardParallelPrinter.go some cleaning 2024-07-29 18:07:24 +02:00
cardProDOSRomCard3.go some cleaning 2024-07-29 18:07:24 +02:00
cardProDOSRomDrive.go some cleaning 2024-07-29 18:07:24 +02:00
cardRamWorks.go Configuration redone 2024-01-06 21:48:23 +01:00
cardRGB.go Fix for the same issue on RGB card as mamedev 10975 2023-03-10 21:10:20 +01:00
cardSaturn.go Update tests for Card Cat 1.6 supporting more cards 2024-09-15 18:59:52 +02:00
cardSmartport.go Explicit cards ROM layout 2024-03-24 20:15:16 +01:00
cardSwyft_test.go Partial support for the Basis 108 clone 2024-07-28 22:37:48 +02:00
cardSwyft.go Remove setBase from memeryHandler, it is not needed 2024-03-04 21:36:45 +01:00
cardThunderClockPlus.go Explicit cards ROM layout 2024-03-24 20:15:16 +01:00
cardVidex.go Trace BDOS calls in CP/M 2024-09-15 23:21:59 +02:00
cardVidHD.go Explicit cards ROM layout 2024-03-24 20:15:16 +01:00
cardZ80softcard_test.go Support for the Softcard Z80 card and CP/M 2024-09-15 16:56:09 +02:00
cardZ80Softcard.go Trace BDOS calls in CP/M 2024-09-15 23:21:59 +02:00
characterGenerator.go Partial support for the Basis 108 clone 2024-07-28 22:37:48 +02:00
command.go Show speed on screen 2024-11-01 21:35:20 +01:00
configuration_test.go Improve usage message and automate the inclusion in README.md 2024-02-12 20:45:52 +01:00
configuration.go Support for 13 sectors disks 2024-07-21 21:45:04 +02:00
e2e_boot_test.go Partial support for the Basis 108 clone 2024-07-28 22:37:48 +02:00
e2e_woz_test.go Support DMA requests from expansion cards 2024-09-14 22:01:53 +02:00
go.mod Show speed on screen 2024-11-01 21:35:20 +01:00
go.sum Show speed on screen 2024-11-01 21:35:20 +01:00
ioC0Page.go Explicit cards ROM layout 2024-03-24 20:15:16 +01:00
keyboard.go Fix space converted to ampersand 2024-09-14 21:56:01 +02:00
LICENSE Create LICENSE 2019-02-16 21:03:59 +01:00
memoryManager.go Trace slot memory access 2024-10-18 23:56:46 +02:00
memoryRange.go Partial support for the Basis 108 clone 2024-07-28 22:37:48 +02:00
memoryRangeBasis108.go Partial support for the Basis 108 clone 2024-07-28 22:37:48 +02:00
memoryTracer.go Trace slot memory access 2024-10-18 23:56:46 +02:00
noSlotClockDS1216.go some cleaning 2024-07-29 18:07:24 +02:00
README.md Proconfigured model for A2Desktop 2024-11-04 21:49:33 +01:00
resources.go Proconfigured model for A2Desktop 2024-11-04 21:49:33 +01:00
romX.go some cleaning 2024-07-29 18:07:24 +02:00
setup.go some cleaning 2024-07-29 18:07:24 +02:00
smartPortCall.go Rename SmartPort constants 2022-10-31 22:57:18 +01:00
smartPortFujinetClock.go Imaginary Fujinet Clock device with prodos datetime format 2022-11-14 18:47:14 +01:00
smartPortFujinetNetwork.go some cleaning 2024-07-29 18:07:24 +02:00
smartPortHardDisk.go Proconfigured model for A2Desktop 2024-11-04 21:49:33 +01:00
softVideoSwitch.go Option to force the use of the Videx 80 columns video output 2024-09-14 22:02:45 +02:00
traceApplecorn.go E2E tests working with DMA 2024-09-15 16:53:44 +02:00
traceBuilder.go CPM-65 preconfigured model and better CPM-65 BIOS and BDOS tracing 2024-10-18 23:59:51 +02:00
traceCpm65.go CPM-65 preconfigured model and better CPM-65 BIOS and BDOS tracing 2024-10-18 23:59:51 +02:00
traceCpm.go Trace BDOS calls in CP/M 2024-09-15 23:21:59 +02:00
tracePascal.go E2E tests working with DMA 2024-09-15 16:53:44 +02:00
traceProDOS.go E2E tests working with DMA 2024-09-15 16:53:44 +02:00
trackTracer.go Support for 4 disks on the command line. Support tyo trace track changes. 2023-09-25 20:55:06 +02:00
video.go Rename boards 2024-07-28 23:18:52 +02:00

izapple2 - Apple ][+, //e emulator

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

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 paged ROM
    • Basis 108 clone (partial)
  • Storage

    • 16 Sector 5 1/4 diskettes. Uncompressed or compressed witth gzip or zip. Supported formats:
    • 13 Sector 5 1/4 diskettes. Uncompressed or compressed witth gzip or zip. Supported formats:
      • NIB (read only)
      • WOZ 2.0 (read only)
    • 3.5 disks in PO or 2MG format
    • Hard disk in HDV or 2MG format with ProDOS and SmartPort support
  • Emulated extension cards:

    • DiskII controller (state machine based for WOZ files)
    • 16Kb Language Card
    • 256Kb Saturn RAM
    • Parallel Printer Interface card
    • 1Mb Memory Expansion Card (slinky)
    • RAMWorks style expansion Card (up to 16MB additional) (Apple //e only)
    • ThunderClock Plus real time clock
    • Apple //e 80 columns card with 64Kb extra RAM and optional RGB modes
    • No Slot Clock based on the DS1216
    • Videx Videoterm 80 column card with the Videx Soft Video Switch (Apple ][+ only)
    • SwyftCard (Apple //e only)
    • Brain Board
    • Brain Board II
    • MultiROM card
    • Dan ][ Controller card
    • ProDOS ROM card
    • Microsoft Z80 Softcard using the Z80 emulation from Koron
  • Useful cards not emulating a real card

    • Bootable SmartPort / ProDOS card with the following smartport devices:
      • Block device (hard disks)
      • Fujinet network device (supports only http(s) with GET and JSON)
      • Fujinet clock (not in Fujinet upstream)
    • 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
    • Mouse Card, emulates the entry points, not the softswitches.
    • Host console card. Maps the host STDIN and STDOUT to PR# and IN#
    • ROMXe, limited to font switching
  • Graphic modes:

    • Text 40 columns
    • Text 80 columns (Apple //e and Videx VideoTerm)
    • 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
    • RGB card text 40 columns with 16 colors for foreground and background (mixable)
    • RGB card mode 11, mono 560x192
    • RGB card mode 12, ntsc 160*192
    • RGB card mode 13, ntsc 140*192 (regular DHGR)
    • RGB card mode 14, mix of modes 11 and 13 on the fly
  • Displays:

    • Green monochrome monitor with half width pixel support
    • NTSC Color TV (extracting the phase from the mono signal)
    • RGB for Super High Resolution and RGB card
    • ANSI Console, avoiding the SDL2 dependency
    • Debug mode: shows four panels with actual screen, page1, page2 and extra info dependant of the video mode
  • Tracing capabilities:

    • CPU execution disassembled
    • Softswitch reads and writes
    • ProDOS MLI calls
    • Apple Pascal BIOS calls
    • SmartPort commands
    • BBC MOS calls when using Applecorn
  • Other features:

    • Sound
    • Joystick support. Up to two joysticks or four paddles
    • Mouse support. No mouse capture needed
    • Adjustable speed
    • Fast disk mode to set max speed while using the disks
    • Single file executable with embedded ROMs and DOS 3.3
    • Pause (thanks a2geek)
    • Passes the A2AUDIT 1.06 tests as II+, //e, and //e Enhanced.
    • Partial pass ot the ProcessorTests for 6502 and 65c02. Failing test 6502/v1/20_55_13; flags N anv V issues with ADC; and missing some undocumented 6502 opcodes.

By default the following configuration is launched:

  • Enhanced Apple //e with 65c02 processor
  • RAMWorks card with 80 column, RGB (with Video7 modes) and 8Gb RAM in aux slot
  • Parallel print inteface in slot 1
  • VidHD card (SHR support) in slot 2
  • FASTChip Accelerator card in slot 3
  • Mouse card in slot 4
  • SmartPort card with 1 device in slot 5 (if an image is provided with -disk35)
  • DiskII controller card in slot 6
  • SmartPort card with 1 device in slot 7 (if an image is provided with -hd)

Running the emulator

No installation required. Download the single file executable izapple2xxx_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:~$ ./izapple2sdl

DOS 3.3 started

Play games

Download a DSK or WOZ file or use an URL (Asimov is an excellent source):

casa@servidor:~$ ./izapple2sdl "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:

casa@servidor:~$ ./izapple2sdl Total\ Replay\ v4.0.hdv

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 izapple2console. It runs on the console using ANSI escape codes. Input is sent to the emulated Apple II one line at a time:

casa@servidor:~$ ./izapple2console -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:

Command line options

Usage:  izapple2 [file]
  file
    	path to image to use on the boot device
  -charrom string
    	rom file for the character generator (default "<internal>/Apple IIe Video Enhanced.bin")
  -cpu string
    	cpu type, can be '6502' or '65c02' (default "65c02")
  -forceCaps
    	force all letters to be uppercased (no need for caps lock!)
  -model string
    	set base model (default "2enh")
  -mods string
    	comma separated list of mods applied to the board, available mods are 'shift', 'four-colors
  -nsc string
    	add a DS1216 No-Slot-Clock on the main ROM (use 'main') or a slot ROM (default "main")
  -profile
    	generate profile trace to analyse with pprof
  -ramworks string
    	memory to use with RAMWorks card, max is 16384 (default "8192")
  -rgb
    	emulate the RGB modes of the 80col RGB card for DHGR
  -rom string
    	main rom file (default "<internal>/Apple2e_Enhanced.rom")
  -romx
    	emulate a RomX
  -s0 string
    	slot 0 configuration. (default "language")
  -s1 string
    	slot 1 configuration. (default "empty")
  -s2 string
    	slot 2 configuration. (default "vidhd")
  -s3 string
    	slot 3 configuration. (default "fastchip")
  -s4 string
    	slot 4 configuration. (default "empty")
  -s5 string
    	slot 5 configuration. (default "empty")
  -s6 string
    	slot 6 configuration. (default "diskii,disk1=<internal>/dos33.dsk")
  -s7 string
    	slot 7 configuration. (default "empty")
  -speed string
    	cpu speed in Mhz, can be 'ntsc', 'pal', 'full' or a decimal nunmber (default "ntsc")
  -trace string
    	trace CPU execution with one or more comma separated tracers (default "none")

The available pre-configured models are:
  2: Apple ][
  2e: Apple IIe
  2enh: Apple //e
  2plus: Apple ][+
  base64a: Base 64A
  basis108: Basis 108
  cpm: Apple ][+ with CP/M
  cpm3: Apple //e with CP/M 3.0
  cpm65: Apple //e with CPM-65
  desktop: Apple II DeskTop
  dos32: Apple ][ with 13 sectors disk adapter and DOS 3.2x
  swyft: swyft

The available cards are:
  brainboard: Firmware card. It has two ROM banks
  brainboard2: Firmware card. It has up to four ROM banks
  dan2sd: Apple II Peripheral Card that Interfaces to a ATMEGA328P for SD card storage
  diskii: Disk II interface card
  diskiiseq: Disk II interface card emulating the Woz state machine
  fastchip: Accelerator card for Apple IIe (limited support)
  fujinet: SmartPort interface card hosting the Fujinet
  inout: Card to test I/O
  language: Language card with 16 extra KB for the Apple ][ and ][+
  memexp: Memory expansion card
  mouse: Mouse card implementation, does not emulate a real card, only the firmware behaviour
  multirom: Multiple Image ROM card
  parallel: Card to dump to a file what would be printed to a parallel printer
  prodosromcard3: A bootable 4 MB ROM card by Ralle Palaveev
  prodosromdrive: A bootable 1 MB solid state disk by Terence Boldt
  saturn: RAM card with 128Kb, it's like 8 language cards
  smartport: SmartPort interface card
  softswitchlogger: Card to log softswitch accesses
  swyftcard: Card with the ROM needed to run the Swyftcard word processing system
  thunderclock: Clock card
  videx: Videx compatible 80 columns card
  vidhd: Firmware signature of the VidHD card to trick Total Replay to use the SHR mode
  z80softcard: Microsoft Z80 SoftCard to run CP/M

The available tracers are:
  cpm: Trace CPM BDOS calls
  cpm65: Trace CPM65 BDOS calls skipping terminal IO
  cpm65full: Trace CPM65 BDOS calls
  cpu: Trace CPU execution
  mli: Trace ProDOS MLI calls
  mos: Trace MOS calls with Applecorn skipping terminal IO
  mosfull: Trace MOS calls with Applecorn
  panicss: Panic on unimplemented softswitches
  ss: Trace sotfswiches calls
  ssreg: Trace sotfswiches registrations
  ucsd: Trace UCSD system calls

Building from source

Linux

Besides having a working Go installation, install the SDL2 developer files. Run:

git clone github.com/ivanizag/izapple2
cd izapple2/frontend/a2sdl
go build .

MacOS

With a working Go installation, run:

brew install SDL2
git clone github.com/ivanizag/izapple2
cd izapple2/frontend/a2sdl
go build .

Windows

On Windows, CGO needs a gcc compiler. Install mingw-w64 and the SDL2 developer files for mingw-64.

Run:

git clone github.com/ivanizag/izapple2
cd izapple2\frontend\a2sdl
go build .

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

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