Apple //e
Go to file
Brad Grantham 8e656aba3b import latest 6502
https://github.com/bradgrantham/cpu6502.git
8fb6aec1a855fa940011f3a95d0455dacf5559e0
2024-07-08 07:49:11 -07:00
.gitignore add more files to ignore 2020-12-31 11:10:04 -08:00
apple2_intbasic.rom
apple2.rom
apple2e.cpp use snprintf instead of sprintf 2024-07-08 07:39:53 -07:00
apple2e.md add a little bit about the emulator 2020-12-31 11:09:48 -08:00
apple2e.rom
apple2font.ppm
bitmap_to_basic.py
bitmap_to_c.py
BURST.A
COLORBOUNCE.A
COLORBOUNCESOUND.A
cpu6502.h import latest 6502 2024-07-08 07:49:11 -07:00
cycles.py
d6502.c
dis6502.cpp use snprintf 2024-06-25 20:30:00 -07:00
dis6502.h
diskII.c600.c6ff.bin
dumpdiffs.cpp add crude tool for enormous line-by-line diffs 2020-12-31 11:07:16 -08:00
emulator.h
extractglyphs.cpp
fake6502.c
fake6502.h
floppy_bitmap_on.txt
floppy_bitmap.txt
floppy_out.txt
FRACTAL.A
generate_floppy_motor_state.cpp Add floppy stepper motor state generator 2020-12-31 11:01:56 -08:00
genkeys.py
genrows.py
gif.h
gl_utility.cpp
gl_utility.h
graph_cycles_before_new_insn.py
GRCOLORS.A
instructions_by_first_appearance_clock.csv
interface_text.cpp update to better int types 2020-12-16 23:51:18 -08:00
interface.cpp use snprintf instead of sprintf 2024-07-08 07:39:53 -07:00
interface.h implement DHGR 2021-01-02 16:25:05 -08:00
keyboard.cpp
keyboard.h
Makefile remove fake6502 from link 2020-12-27 18:17:35 -08:00
Makefile.linux
notes
notes.vblank
paddle_samsung.ini add a Samsung wireless control paddle .ini 2020-12-31 11:08:18 -08:00
QUADRADOODLE.A
RAINBOW.BAS
RAY1.A
README.md
sound_digitizer.dsk
speaker.sim add falstad.com simulation of Apple ][ speaker 2020-12-31 11:07:50 -08:00
switches.txt
test6502.cpp fix disassembly address 2020-12-31 10:58:46 -08:00
ui_widgets.h
xbox360controller.ini add an XBox 360 USB controller paddle .ini 2020-12-31 11:08:41 -08: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.