LinApple
LinApple emulates Apple II. It reads 7 files, none of them required: it starts games without them.
About this profile
Technical notes
SDL port of AppleWin for Linux. The SourceForge project was abandoned and its forks were gathered under the linappleii organization (README.md:202-209). Five frontends build from one core: sdl1, sdl2, sdl3, tui and headless (src/frontends/).
The ROMs the emulator runs are compiled into the binary.
scripts/generate_roms.sh turns res/roms/.rom into EmbeddedRoms.h and
EmbeddedRoms.cpp, once at configure time and again at build time
(CMakeLists.txt:295-331), each image behind an ENABLE_ROM_ macro
(scripts/). Seventeen images go through the
generator: ten system ROMs, four character generator ROMs and the three
Disk II ROMs. The mouse card, the printer card, the Super Serial Card, the
clock card and the hard disk controller carry their firmware as arrays in
their own source files (src/,
src/,
src/,
src/,
src/), and the Mockingboard
registers no ROM.
What a macro is set to decides whether a machine model runs at all.
CMakeLists.txt:59-126 leaves the Apple ][, ][+, J-Plus, //e and Enhanced //e
system ROMs ON, along with the Disk II firmware. The three clone options are
OFF: ENABLE_ROM_CLONE_BASE64A, ENABLE_ROM_CLONE_PRAVETS and
ENABLE_ROM_CLONE_TK3000E (CMakeLists.txt:97-99). Selecting one of those
machine types on a default build reaches mem_initialize with no rom_data,
which prints the model name and its cmake flag, destroys the context and
returns -1 (src/). The message offers two ways
out, and the second is a file: -R, --rom <file> loads a system ROM at
runtime (src/,188-189).
A custom ROM takes precedence over anything embedded. load_custom_rom opens
the path as given, then through Path::find_data_file, and refuses a file
below 12288 or above 65536 bytes, which stops the start
(src/,265-267). mem_initialize
accepts the buffer at exactly 16384 or 12288 bytes, or larger, taking the
trailing 16384 for the //e-class types and the trailing 12288 otherwise
(src/). No hash or name is checked: the file is
whatever the user points at.
Character generators are res/charset40*.png, converted to XPM by CMake
(CMakeLists.txt:264-293) and included at src/apple2/Video.cpp:35-39. One of
five is chosen from the machine type and the keyboard language
(src/apple2/Video.cpp:1255-1279). The status font and the splash screen are
XPM as well (src/core/Asset.cpp:15-16,57,63). The four *_Video.rom images
are compiled in, and nothing under src/ reads their symbols.
Master.dsk is inserted into slot 6 drive 1 at startup unless the command
line names a disk or the configuration autoloads one
(src/). asset_find_master_disk
resolves it through Path::find_data_file (src/core/Asset.cpp:25-39), which
walks the user data and config directories, the executable directory and its
res/ neighbours, the share and etc prefixes beside it, the compiled-in
SOURCE_RES_DIR, /usr/local/share/linapple, /usr/share/linapple, every
XDG_CONFIG_DIRS entry or /etc/xdg/linapple when that variable is unset, and
/etc/linapple (src/core/Util_Path.h:116-179). The same search serves
icon.bmp and a --rom path that does not open as given.
The debugger reads its symbol tables through system_state.program_dir,
declared at src/core/LinAppleCore.h:102 and read without ever being
assigned, so the names resolve against the working directory.
file_name_symbols lists nine tables (src/).
CmdSymbolsLoad reads a table's default file when it receives no argument
(src/). Its only caller is the LOAD
parameter of the SYM commands (src/),
and debug_initialize loads no table (src/Debugger/Debug.cpp:29-39).
ParseSymbolTable opens the file with fopen and a missing one leaves the
debugger running without its symbols (src/).
Peripheral cards are linked into the executable by default. Each card has
an ENABLE_PERIPHERAL_* option, ON (CMakeLists.txt:543). With
BUILD_SHARED_PERIPHERALS, OFF at CMakeLists.txt:45, each card that
add_peripheral does not force built-in builds as a shared object
(CMakeLists.txt:550-552,655,665-671), and peripheral_plugins_init opens
every *.so found in the plugin search paths in either build
(src/,
src/core/Util_Path.h:102-114).
linapple.conf carries preferences only (src/core/Registry.cpp, src/frontends/common/AppEnvironment.cpp). Each accessor returns a compiled-in default when a key is missing.
7 files: 0 required, 7 optional. 2 more files come with the app.
In this collection: 7 in repo and 0 missing.
Optional
Section titled “Optional”| File | Status | Hash |
|---|---|---|
APPLE2E.SYMDebugger symbol table for the main ROM
Source
|
in repo | - |
A2_BASIC.SYMDebugger symbol table for Applesoft BASIC
Source
|
in repo | - |
Base64A.romCopam Base 64A clone system ROM, supplied with --rom
Hashes, validation and source
|
in repo | MD5 352fdbcae14c |
PRAVETS82.ROMPravets 82 clone system ROM, supplied with --rom
Hashes, validation and source
|
in repo | MD5 c619b7edfcf0 |
PRAVETS8M.ROMPravets 8M clone system ROM, supplied with --rom
Hashes, validation and source
|
in repo | MD5 76c79535f7cf |
PRAVETS8C.ROMPravets 8C clone system ROM, supplied with --rom
Hashes, validation and source
|
in repo | MD5 1896d7b98dd9 |
TK3000e.romMicrodigital TK-3000 //e clone system ROM, supplied with --rom
Hashes, validation and source
|
in repo | MD5 8d84b614b545 |
Comes with the app
Section titled “Comes with the app”| File | Hash |
|---|---|
Master.dskBoot floppy inserted into slot 6 drive 1 at startup
Hashes, validation and source
|
MD5 ee44560f3403 |
icon.bmpWindow icon read from disk by the SDL frontends
Hashes and source
|
MD5 be7a389c5aa6 |
Profile data
Section titled “Profile data”Source analysis
-
embedded roms:
-
mechanism: res/roms/.rom compiled into EmbeddedRoms.cpp by scripts/generate_roms.sh at configure and build time, each behind an ENABLE_ROM_ macro
-
source ref:
CMakeLists.txt:59-126,CMakeLists.txt:295-331,scripts/generate_roms.sh:97-117 -
extraction: hashes computed from the res/roms images the generator reads
-
system roms:
- symbol: rom_apple2, machine: Apple ][, machine type: A2TYPE_APPLE2, image: res/roms/Apple2.rom, cmake option: ENABLE_ROM_APPLE2, default: yes, source ref:
src/(this build), size: 12288, md5: 3c406514b9806a7c57ee65fb0b0c39b4, sha1: 09288be705464b608ff190519ab008d3dfcd1b05apple2/ Memory.cpp:1106-1111 - symbol: rom_apple2_plus, machine: Apple ][+, machine type: A2TYPE_APPLE2PLUS, image: res/roms/Apple2_Plus.rom, cmake option: ENABLE_ROM_APPLE2PLUS, default: yes, source ref:
src/(this build), size: 12288, md5: 572b3005a4fa49bc54917b069b82c1ab, sha1: 33a24f5489ba9195b44be77d9afb2252594cb5c7apple2/ Memory.cpp:1112-1117 - symbol: rom_apple2_jplus, machine: Apple ][ J-Plus, machine type: A2TYPE_APPLE2JPLUS, image: res/roms/Apple2_JPlus.rom, cmake option: ENABLE_ROM_APPLE2_JPLUS, default: yes, source ref:
src/(this build), size: 12288, md5: f3e8237eca3809bec2a42b984a1332a8, sha1: ad200b3263d08e7235d0871c8595963a07adc905apple2/ Memory.cpp:1118-1123 - symbol: rom_apple2e, machine: Apple //e Unenhanced, machine type: A2TYPE_APPLE2E, image: res/roms/Apple2e.rom, cmake option: ENABLE_ROM_APPLE2E, default: yes, source ref:
src/(this build), size: 16384, md5: 346bc782c6a08a531c460e33bc03daf4, sha1: 61fa9254628e5bb7236fb474006116d67684d747, note: First 4 KB loaded as internal Cx ROM, remaining 12 KB at $D000apple2/ Memory.cpp:1124-1129 - symbol: rom_apple2e_enhanced, machine: Apple //e Enhanced, machine type: A2TYPE_APPLE2EENHANCED, image: res/roms/Apple2e_Enhanced.rom, cmake option: ENABLE_ROM_APPLE2ENHANCED, default: yes, source ref:
src/(this build), size: 16384, md5: 38063e08c778503fc03ecebb979769e9, sha1: b8ea90abe135a0031065e01697c4a3a20d51198b, note: First 4 KB loaded as internal Cx ROM, remaining 12 KB at $D000apple2/ Memory.cpp:1130-1135 - symbol: rom_clone_base64a, machine: Base64A, machine type: A2TYPE_CLONE_BASE64A, image: res/roms/Base64A.rom, cmake option: ENABLE_ROM_CLONE_BASE64A, default: no, source ref:
src/, note: Trailing 12288 bytes of the image are usedapple2/ Memory.cpp:1136-1142 - symbol: rom_clone_pravets82, machine: Pravets 82, machine type: A2TYPE_CLONE_PRAVETS82, image: res/roms/PRAVETS82.ROM, cmake option: ENABLE_ROM_CLONE_PRAVETS, default: no, source ref:
src/apple2/ Memory.cpp:1144-1147 - symbol: rom_clone_pravets8m, machine: Pravets 8M, machine type: A2TYPE_CLONE_PRAVETS8M, image: res/roms/PRAVETS8M.ROM, cmake option: ENABLE_ROM_CLONE_PRAVETS, default: no, source ref:
src/apple2/ Memory.cpp:1148-1151 - symbol: rom_clone_pravets8c, machine: Pravets 8C, machine type: A2TYPE_CLONE_PRAVETS8C, image: res/roms/PRAVETS8C.ROM, cmake option: ENABLE_ROM_CLONE_PRAVETS, default: no, source ref:
src/apple2/ Memory.cpp:1152-1155 - symbol: rom_clone_tk3000e, machine: TK3000 //e, machine type: A2TYPE_CLONE_TK3000E, image: res/roms/TK3000e.rom, cmake option: ENABLE_ROM_CLONE_TK3000E, default: no, source ref:
src/apple2/ Memory.cpp:1157-1162
- symbol: rom_apple2, machine: Apple ][, machine type: A2TYPE_APPLE2, image: res/roms/Apple2.rom, cmake option: ENABLE_ROM_APPLE2, default: yes, source ref:
-
video roms:
-
note: Compiled in under the macro of their machine. Nothing under src/ reads the symbols. The display uses the character_generators below.
-
images:
- symbol: rom_apple2_video, image: res/roms/Apple2_Video.rom, cmake option: ENABLE_ROM_APPLE2, default: yes, source ref:
scripts/generate_roms.sh:98(this build), size: 2048, md5: 9ac0dc8c4d0002eb45b0b84be0bde5ec, sha1: f9d312f128c9557d9d6ac03bfad6c3ddf83e5659 - symbol: rom_apple2_jplus_video, image: res/roms/Apple2_JPlus_Video.rom, cmake option: ENABLE_ROM_APPLE2_JPLUS, default: yes, source ref:
scripts/generate_roms.sh:101(this build), size: 2048, md5: 271e2c9bf928b95e7baeff391db45495, sha1: 0a382be58db5215c4a3de53b19a72fab660d5da2 - symbol: rom_apple2e_enhanced_video, image: res/roms/Apple2e_Enhanced_Video.rom, cmake option: ENABLE_ROM_APPLE2ENHANCED, default: yes, source ref:
scripts/generate_roms.sh:104(this build), size: 4096, md5: 9123fff3442c0e688cc6816be88dd4ab, sha1: b2b5d87f52693817fc747df087a4aa1ddcdb1f10 - symbol: rom_clone_base64a_german_video, image: res/roms/Base64A_German_Video.rom, cmake option: ENABLE_ROM_CLONE_BASE64A, default: no, source ref:
scripts/generate_roms.sh:108(this build), size: 4096, md5: 4b45852b369e2afd864a02d0d91f70dc, sha1: 87ca8135f7526ddf829f9c2c4f7dbe4d568818fc
- symbol: rom_apple2_video, image: res/roms/Apple2_Video.rom, cmake option: ENABLE_ROM_APPLE2, default: yes, source ref:
-
-
peripheral firmware:
- device: Disk II controller, 16 sector boot ROM, slot: 6, symbol: rom_disk2, image: res/roms/DISK2.rom, cmake option: ENABLE_ROM_DISK2, default: yes, source ref:
CMakeLists.txt:120(this build),CMakeLists.txt:122-126,scripts/generate_roms.sh:115(this build),src/(this build), size: 256, md5: 2020aa1413ff77fe29353f3ee72dc295, sha1: d4181c9f046aafc3fb326b381baac809d9e38d16apple2/ peripherals/ disk/ Disk.cpp:1129-1131 - device: Disk II controller, P6 sequencer PROM, slot: 6, symbol: rom_disk2_p6, image: res/roms/DISK2-P6.rom, cmake option: ENABLE_ROM_DISK2, default: yes, source ref:
scripts/generate_roms.sh:117(this build),src/(this build),apple2/ peripherals/ disk/ Disk.cpp:621-627 CMakeLists.txt:1041-1056(this build), size: 256, md5: 5f1be0c1cdff26f5956eef9643911886, sha1: bc39fbd5b9a8d2287ac5d0a42e639fc4d3c2f9d4, note: The controller state machine reads its opcodes from this image. A build test pins its SHA-1 and its size. Without ENABLE_ROM_DISK2 the sequencer returns a constant and the data register never moves. - device: Disk II controller, 13 sector boot ROM, symbol: rom_disk2_13sector, image: res/roms/DISK2-13sector.rom, cmake option: ENABLE_ROM_DISK2, default: yes, source ref:
scripts/generate_roms.sh:116(this build), size: 256, md5: 4f80448507cf43ab40c17ac08d89e278, sha1: afd060e6f35faf3bb0146fa889fc787adf56330a, note: Compiled in. Nothing under src/ reads the symbol - device: Super Serial Card, slot: 2, symbol: super_serial_rom, image: res/roms/SSC.rom, source ref:
src/(this build),apple2/ peripherals/ super_serial_card/ SuperSerialRom.h:8-16 src/(this build),apple2/ peripherals/ super_serial_card/ SuperSerial.cpp:356-358 CMakeLists.txt:940-944(this build), size: 2048, md5: 67c0d61ab0911183faf05270f881a97e, sha1: 6dab633470c6bc4cb3e81d09fda46597caf8ee57, note: Not generated and behind no ROM option: the card carries the 2048 bytes as an array in SuperSerialRom.h, the last page mapped at $Cn00 and the whole image at $C800. The generator does not read res/roms/SSC.rom. A build test pins its SHA-1 as the reference of that transcription. - device: Mouse interface card, slot: 4, symbol: mouse_rom, image: res/roms/MouseInterface.rom, cmake option: ENABLE_PERIPHERAL_MOUSE, default: yes, source ref:
src/(this build),apple2/ peripherals/ mouse/ MouseRom.h:8-19 src/(this build),apple2/ peripherals/ mouse/ Mouse.cpp:261-267 CMakeLists.txt:543(this build),CMakeLists.txt:666,CMakeLists.txt:987-991, size: 2048, md5: 22563ab338024dac7b03510371d49c57, sha1: 3a9d881a8a8d30f55b9719aceebbcf717f829d6f, note: Not generated and behind no ROM option: the card carries the 2048 bytes as an array in MouseRom.h and maps one 256-byte bank at $Cn00, chosen by PIA port B bits 1-3. ENABLE_PERIPHERAL_MOUSE builds the card and its firmware together. The generator does not read res/roms/MouseInterface.rom. A build test pins its SHA-1 as the reference of that transcription. - device: Parallel printer card, slot: 1, symbol: printer_rom, image: res/roms/Parallel.rom, source ref:
src/(this build),apple2/ peripherals/ printer/ Printer.cpp:30-55 src/(this build),apple2/ peripherals/ printer/ Printer.cpp:217 CMakeLists.txt:921-927(this build), size: 256, md5: 5902996f16dc78fc013f6e1db14805b3, sha1: c75c751589cbcc1ad4ab4f63676af7abadd86f5b, note: Not generated and behind no ROM option: the card carries the 256 bytes as an array in Printer.cpp. The generator does not read res/roms/Parallel.rom. A build test pins its SHA-1 as the reference of that transcription. - device: Clock card, symbol: clock_rom, source ref:
src/,apple2/ peripherals/ clock/ ClockCard.cpp:19-20 src/,apple2/ peripherals/ clock/ ClockCard.cpp:34-45 src/, note: A 256-byte page written in ClockCard.cpp that answers the ProDOS ThunderClock identification and read entry points. Each card patches its slot into the operand at $0D. No image under res/roms backs it.apple2/ peripherals/ clock/ ClockCard.cpp:174-176 - device: ProDOS block device controller, symbol: harddisk_rom, source ref:
src/,apple2/ peripherals/ harddisk/ Harddisk.cpp:73-76 src/,apple2/ peripherals/ harddisk/ Harddisk.cpp:250-275 src/, note: A 256-byte page written in Harddisk.cpp from the ProDOS 8 Technical Reference Manual, serving two volumes. Each card patches its slot page into the operand at $09. No image under res/roms backs it.apple2/ peripherals/ harddisk/ Harddisk.cpp:739-742
- device: Disk II controller, 16 sector boot ROM, slot: 6, symbol: rom_disk2, image: res/roms/DISK2.rom, cmake option: ENABLE_ROM_DISK2, default: yes, source ref:
-
character generators:
-
mechanism: PNG converted to XPM by CMake, included at
src/apple2/Video.cpp:35-39 -
selection: machine type, then keyboard language (
src/apple2/Video.cpp:1255-1279) -
accepted geometry: 128x128, or 128x256 for the Euro ROMs carrying a second language
-
images:
- filename: charset40.png, used for: Apple //e class machines, English (US), size: 2745, md5: c6029ef4d4fa272083769673bdcf2b6c, sha1: d79aa8af6446c3637401cb75ffdda92fdf7f3853
- filename: charset40_IIplus.png, used for: Apple ][, Apple ][+ and Apple ][ J-Plus, size: 1956, md5: 2104f293d5df7137fdd579ea405da847, sha1: bc9aa5cbadfcffe82b5b20ce954555b9d07fa260
- filename: charset40_british.png, used for: English (UK), size: 5300, md5: aa001ec528e3c6c472d02cbb09c5b365, sha1: ac363e069b40658f86ccd1e2d57438db732dbc84
- filename: charset40_french.png, used for: French (FR), size: 5330, md5: f163ec67c91501b604ca349afef93fc3, sha1: 5b454a2e7194863df3a997cc21e7ea6d61eb61d7
- filename: charset40_german.png, used for: German (DE), size: 5290, md5: 4d8ab9d3f15ee19d9e62c1f163df7e48, sha1: f86bd5238604247e04d616850f244b489daef18d
-
-
-
symbol tables:
-
source ref:
src/Debugger/ Debugger_Symbols.cpp:37-49 -
lookup: system_state.program_dir + filename, and system_state.program_dir is never assigned
-
loaded on command:
- APPLE2E.SYM
- A2_BASIC.SYM
- A2_ASM.SYM
- A2_USER1.SYM
- A2_USER2.SYM
- A2_SRC1.SYM
- A2_SRC2.SYM
- A2_DOS33.SYM
- A2_PRODOS.SYM
-
note: Each table is read by the LOAD parameter of its SYM command, and no table is loaded when the debugger starts. Only APPLE2E.SYM and A2_BASIC.SYM are distributed with the emulator, in res/. The user slots and the remaining tables have no shipped counterpart.
-
-
generated files:
-
written only:
- linapple.log
- Profile.txt
- Trace.txt
- AppleWin_Text40.txt
- AppleWin_Text80.txt
- Printer.txt
- save states
- FTP directory cache
-
note: Produced by the emulator, none is user-supplied. file_name_config names LinAppleDebugger.cfg and no open call takes it (
src/).Debugger/ Debugger_Cmd_Config.cpp:40
-
-
unused resources:
- filename: font.bmp, reason: shipped in res/ and named by no source file at this revision
- filename: fixedsys-excelsior-regular.ttf, reason: shipped in res/ and named by no source file at this revision
Next steps
Section titled “Next steps”- Get the files, for the setup in use
- Every system, and the files each one needs
- When a game does not start