Apple //e
Go to file
2020-12-14 19:48:17 -08:00
.gitignore Start GIF-recording mode. 2018-08-07 23:33:14 -07:00
apple2_intbasic.rom add Apple 2 integer basic ROM (original ROMs) 2018-06-06 12:14:26 -07:00
apple2.rom
apple2e.cpp on reset turn floppy off; MAINboard resets all boards; fix #47 2020-12-14 19:48:17 -08:00
apple2e.rom
apple2font.ppm
bitmap_to_basic.py add utilities to turn bitmap to code 2018-06-06 12:15:58 -07:00
bitmap_to_c.py add utilities to turn bitmap to code 2018-06-06 12:15:58 -07:00
BURST.A add test program for #23 2018-07-20 20:31:32 -07:00
COLORBOUNCE.A on reset turn floppy off; MAINboard resets all boards; fix #47 2020-12-14 19:48:17 -08:00
COLORBOUNCESOUND.A Audio. Probably won't work properly in FAST mode. 2016-11-23 23:29:23 -08:00
cpu6502.h update formatting from Jim's aed512 version of cpu6502 2019-02-16 08:49:10 -08:00
cycles.py cycle table formatting and more data 2016-11-28 09:55:01 -08:00
d6502.c
dis6502.cpp Fix BRA imm instruction, add 0xD2 - CMP (zpg) 2018-08-10 23:25:20 -07:00
dis6502.h
diskII.c600.c6ff.bin rename disk rom file to match size 2019-02-10 23:17:24 -08:00
emulator.h
extractglyphs.cpp properly output and use checkerboard char 2016-11-19 00:57:42 -08:00
fake6502.c want BCD 2016-12-09 13:06:41 -08:00
fake6502.h Partially implement floppy disks 2016-11-27 17:10:03 -08:00
floppy_bitmap_on.txt add floppy bitmap text files 2018-06-06 12:15:01 -07:00
floppy_bitmap.txt add floppy bitmap text files 2018-06-06 12:15:01 -07:00
floppy_out.txt add floppy bitmap text files 2018-06-06 12:15:01 -07:00
FRACTAL.A HIRES fractal 2016-11-18 23:25:22 -08:00
genkeys.py
genrows.py generate HGR row interleaving 2016-11-18 23:29:57 -08:00
gif.h Start GIF-recording mode. 2018-08-07 23:33:14 -07:00
gl_utility.cpp Apply some fixes from Rocinante port 2020-12-05 17:19:21 -08:00
gl_utility.h Apply some fixes from Rocinante port 2020-12-05 17:19:21 -08:00
graph_cycles_before_new_insn.py Add counts and grapher for instruction progress 2017-01-05 15:19:40 -08:00
GRCOLORS.A Show all LORES colors 2016-11-18 23:25:48 -08:00
instructions_by_first_appearance_clock.csv Add counts and grapher for instruction progress 2017-01-05 15:19:40 -08:00
interface_text.cpp improve text-only interface 2018-06-08 10:01:03 -07:00
interface.cpp display speed 2020-12-11 22:01:21 -08:00
interface.h add clock text box 2019-02-18 08:11:22 -08:00
keyboard.cpp Allow running without TTY (e.g. in Instruments) 2016-11-20 12:27:58 -08:00
keyboard.h
Makefile move to C++17 2020-12-11 22:00:48 -08:00
Makefile.linux Add gl_utility.o to Linux build 2019-02-10 20:01:50 -08:00
notes match new name of disk rom file 2019-02-10 23:18:05 -08:00
notes.vblank separate notes on VBLANK and mode switch 2018-08-02 16:25:25 -07:00
QUADRADOODLE.A Draw lines mirrored in X and Y 2016-11-18 23:26:01 -08:00
RAINBOW.BAS Add mmphosis' RAINBOW mode change demo 2018-08-08 21:04:02 -07:00
RAY1.A fixup cut-and-paste 2016-11-22 09:53:35 -08:00
README.md add reference to shamusworld apple emulator 2020-12-12 10:16:49 -08:00
sound_digitizer.dsk my sound digitizer application disk 2016-12-07 14:41:39 -08:00
switches.txt Partially implement floppy disks 2016-11-27 17:10:03 -08:00
ui_widgets.h initial breakout of UI widget classes 2018-10-15 21:09:51 -07:00

Apple2e

Yet another Apple //e emulator.

Lode Runner

I wrote this not because the world needed another //e emulator, but because I wanted to have the fun of building a thing from scratch to run my old Apple //e software.

I wrote a little about my motivation and the process of writing this emulator on my personal web page.

There are several AppleSoft files in this project (*.A) that can be copied into the clipboard and then pasted into the emulator window with CMD-V.

Thanks to Lawrence Kesteloot for the original keyboard code, and Bart Grantham for extracting all our old floppy disk images!

Thanks to Mike Chambers (miker00lz@gmail.com) for his 6502 CPU emulator, which I used as a reference when mine hung on "PRINT 5".

Thanks to JLH, from whom I have copied the floppy nybblization code. His Apple 2 emulator, released under the GPL, is at http://shamusworld.gotdns.org/apple2/.

Requirements for building:

  • GLFW
  • libao
  • OpenGL 3.2
  • C++11
  • Builds on MacOS using "Makefile" and Linux (tested on Ubuntu only) using "Makefile.linux"

On MacOSX with MacPorts, the GLFW and libao dependency can be satisfied with glfw and libao ports. According to https://support.apple.com/en-us/HT202823, all modern Macs have OpenGL 3.2 or later. On my machine, I've been compiling with a g++ that outputs Apple LLVM version 8.0.0 (clang-800.0.42.1) for g++ -v.

Usage:

apple2e [options] ROM.8000.to.FFFF.bin

Options:

-debugger # start in the debugger
-fast     # start with CPU running as fast as it can run
-backspace-is-delete # Backspace key (Delete on Macs) should send DELETE
-diskII diskIIrom.bin {floppy1image.dsk|none} {floppy2image.dsk|none}

Examples of operation:

# Use original Apple ][ Integer BASIC ROM, no floppy controller,
# at maximum available clock rate.
apple2e -fast apple2_intbasic.rom

# Use updated Apple ][ ROM, no floppy controller, and attempt to
# run at 1.023 MHz.
apple2e -fast apple2o.rom

# Use Apple //e ROM, add diskII controller with two floppies,
# put LodeRunner.dsk in drive 1 and nothing in drive 2. Attempt
# to run at 1.023 MHz.
apple2e -diskII diskII.c600.c67f.bin LodeRunner.dsk none apple2e_a.rom

Useful debugger commands:

reset # Press CTRL-RESET
reboot # Press CTRL-OpenApple-RESET
fast # run CPU as fast as it can go
slow # Approximate CPU at 1.023 MHz
debug N # Set debug flags to N (decimal). See apple2e.cpp for flags
go # Exit debugging, free-run.
# Enter a blank line to step one instruction

When the window opens, the emulator displays a user interface panel to the right of the graphics screen. The buttons and icons are as follows:

  • RESET - simulate pressing CONTROL and RESET keys and releasing
  • REBOOT - simulate pressing CONTROL and Open-Apple and RESET keys and releasing
  • FAST - toggle between running at 1.023MHz and running the CPU as fast as possible (audio will stop in "fast" mode)
  • CAPS - toggle caps lock forcibly on or off.
  • COLOR - switch between color hi-res graphics and monochrome.
  • PAUSE - pause or resume running the CPU.
  • Floppy drive icons: Drag and drop floppy .dsk files onto a drive to "insert" the flopy disk. Click the drive icon to "eject" the floppy disk.
  • Drag a text file onto the text area to past the file as keyboard input.

If no joystick or gamepad is configured, the Apple 2 screen acts as a joystick. To configure a joystick, store the GLFW numbers of the two axes and two buttons in "joystick.ini". A very skilled practitioner may be able to print the joysticks, axes, and buttons by modifying interface.cpp.