web-a2e 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (295) hide show
  1. package/.clangd +5 -0
  2. package/.mcp.json +12 -0
  3. package/CLAUDE.md +362 -0
  4. package/CMakeLists.txt +774 -0
  5. package/LICENSE +21 -0
  6. package/README.md +392 -0
  7. package/build-wasm/generated/roms.cpp +2447 -0
  8. package/docker-compose.staging.yml +9 -0
  9. package/docs/basic-rom-disassembly.md +6663 -0
  10. package/docs/softswitch-comparison.md +273 -0
  11. package/docs/thunderclock-debug.md +89 -0
  12. package/examples/cube.bas +72 -0
  13. package/examples/hello.s +55 -0
  14. package/examples/scroll.s +140 -0
  15. package/package.json +18 -0
  16. package/public/assets/apple-logo-old.png +0 -0
  17. package/public/assets/apple-logo.png +0 -0
  18. package/public/assets/drive-closed-light-on.png +0 -0
  19. package/public/assets/drive-closed.png +0 -0
  20. package/public/assets/drive-open-light-on.png +0 -0
  21. package/public/assets/drive-open.png +0 -0
  22. package/public/audio-worklet.js +82 -0
  23. package/public/disks/Apple DOS 3.3 January 1983.dsk +0 -0
  24. package/public/disks/ProDOS 2.4.3.po +0 -0
  25. package/public/disks/h32mb.2mg +0 -0
  26. package/public/disks/library.json +26 -0
  27. package/public/docs/llms/llm-assembler.txt +90 -0
  28. package/public/docs/llms/llm-basic-program.txt +256 -0
  29. package/public/docs/llms/llm-disk-drives.txt +72 -0
  30. package/public/docs/llms/llm-file-explorer.txt +50 -0
  31. package/public/docs/llms/llm-hard-drives.txt +80 -0
  32. package/public/docs/llms/llm-main.txt +51 -0
  33. package/public/docs/llms/llm-slot-configuration.txt +66 -0
  34. package/public/icons/icon-192.svg +4 -0
  35. package/public/icons/icon-512.svg +4 -0
  36. package/public/index.html +661 -0
  37. package/public/llms.txt +49 -0
  38. package/public/manifest.json +29 -0
  39. package/public/shaders/burnin.glsl +22 -0
  40. package/public/shaders/crt.glsl +706 -0
  41. package/public/shaders/edge.glsl +109 -0
  42. package/public/shaders/vertex.glsl +8 -0
  43. package/public/sw.js +186 -0
  44. package/roms/341-0027.bin +0 -0
  45. package/roms/341-0160-A-US-UK.bin +0 -0
  46. package/roms/341-0160-A.bin +0 -0
  47. package/roms/342-0273-A-US-UK.bin +0 -0
  48. package/roms/342-0349-B-C0-FF.bin +0 -0
  49. package/roms/Apple Mouse Interface Card ROM - 342-0270-C.bin +0 -0
  50. package/roms/Thunderclock Plus ROM.bin +0 -0
  51. package/scripts/generate_roms.sh +69 -0
  52. package/src/bindings/wasm_interface.cpp +1940 -0
  53. package/src/core/assembler/assembler.cpp +1239 -0
  54. package/src/core/assembler/assembler.hpp +115 -0
  55. package/src/core/audio/audio.cpp +160 -0
  56. package/src/core/audio/audio.hpp +81 -0
  57. package/src/core/basic/basic_detokenizer.cpp +436 -0
  58. package/src/core/basic/basic_detokenizer.hpp +41 -0
  59. package/src/core/basic/basic_tokenizer.cpp +286 -0
  60. package/src/core/basic/basic_tokenizer.hpp +26 -0
  61. package/src/core/basic/basic_tokens.hpp +295 -0
  62. package/src/core/cards/disk2_card.cpp +568 -0
  63. package/src/core/cards/disk2_card.hpp +316 -0
  64. package/src/core/cards/expansion_card.hpp +185 -0
  65. package/src/core/cards/mockingboard/ay8910.cpp +616 -0
  66. package/src/core/cards/mockingboard/ay8910.hpp +159 -0
  67. package/src/core/cards/mockingboard/via6522.cpp +530 -0
  68. package/src/core/cards/mockingboard/via6522.hpp +163 -0
  69. package/src/core/cards/mockingboard_card.cpp +312 -0
  70. package/src/core/cards/mockingboard_card.hpp +159 -0
  71. package/src/core/cards/mouse_card.cpp +654 -0
  72. package/src/core/cards/mouse_card.hpp +190 -0
  73. package/src/core/cards/smartport/block_device.cpp +202 -0
  74. package/src/core/cards/smartport/block_device.hpp +60 -0
  75. package/src/core/cards/smartport/smartport_card.cpp +603 -0
  76. package/src/core/cards/smartport/smartport_card.hpp +120 -0
  77. package/src/core/cards/thunderclock_card.cpp +237 -0
  78. package/src/core/cards/thunderclock_card.hpp +122 -0
  79. package/src/core/cpu/cpu6502.cpp +1609 -0
  80. package/src/core/cpu/cpu6502.hpp +203 -0
  81. package/src/core/debug/condition_evaluator.cpp +470 -0
  82. package/src/core/debug/condition_evaluator.hpp +87 -0
  83. package/src/core/disassembler/disassembler.cpp +552 -0
  84. package/src/core/disassembler/disassembler.hpp +171 -0
  85. package/src/core/disk-image/disk_image.hpp +267 -0
  86. package/src/core/disk-image/dsk_disk_image.cpp +827 -0
  87. package/src/core/disk-image/dsk_disk_image.hpp +204 -0
  88. package/src/core/disk-image/gcr_encoding.cpp +147 -0
  89. package/src/core/disk-image/gcr_encoding.hpp +78 -0
  90. package/src/core/disk-image/woz_disk_image.cpp +1049 -0
  91. package/src/core/disk-image/woz_disk_image.hpp +343 -0
  92. package/src/core/emulator.cpp +2126 -0
  93. package/src/core/emulator.hpp +434 -0
  94. package/src/core/filesystem/dos33.cpp +178 -0
  95. package/src/core/filesystem/dos33.hpp +66 -0
  96. package/src/core/filesystem/pascal.cpp +262 -0
  97. package/src/core/filesystem/pascal.hpp +87 -0
  98. package/src/core/filesystem/prodos.cpp +369 -0
  99. package/src/core/filesystem/prodos.hpp +119 -0
  100. package/src/core/input/keyboard.cpp +227 -0
  101. package/src/core/input/keyboard.hpp +111 -0
  102. package/src/core/mmu/mmu.cpp +1387 -0
  103. package/src/core/mmu/mmu.hpp +236 -0
  104. package/src/core/types.hpp +196 -0
  105. package/src/core/video/video.cpp +680 -0
  106. package/src/core/video/video.hpp +156 -0
  107. package/src/css/assembler-editor.css +1617 -0
  108. package/src/css/base.css +470 -0
  109. package/src/css/basic-debugger.css +791 -0
  110. package/src/css/basic-editor.css +792 -0
  111. package/src/css/controls.css +783 -0
  112. package/src/css/cpu-debugger.css +1413 -0
  113. package/src/css/debug-base.css +160 -0
  114. package/src/css/debug-windows.css +6455 -0
  115. package/src/css/disk-drives.css +406 -0
  116. package/src/css/documentation.css +392 -0
  117. package/src/css/file-explorer.css +867 -0
  118. package/src/css/hard-drive.css +180 -0
  119. package/src/css/layout.css +217 -0
  120. package/src/css/memory-windows.css +798 -0
  121. package/src/css/modals.css +510 -0
  122. package/src/css/monitor.css +425 -0
  123. package/src/css/release-notes.css +101 -0
  124. package/src/css/responsive.css +400 -0
  125. package/src/css/rule-builder.css +340 -0
  126. package/src/css/save-states.css +201 -0
  127. package/src/css/settings-windows.css +1231 -0
  128. package/src/css/window-switcher.css +150 -0
  129. package/src/js/agent/agent-manager.js +643 -0
  130. package/src/js/agent/agent-tools.js +293 -0
  131. package/src/js/agent/agent-version-tools.js +131 -0
  132. package/src/js/agent/assembler-tools.js +357 -0
  133. package/src/js/agent/basic-program-tools.js +894 -0
  134. package/src/js/agent/disk-tools.js +417 -0
  135. package/src/js/agent/file-explorer-tools.js +269 -0
  136. package/src/js/agent/index.js +13 -0
  137. package/src/js/agent/main-tools.js +222 -0
  138. package/src/js/agent/slot-tools.js +303 -0
  139. package/src/js/agent/smartport-tools.js +257 -0
  140. package/src/js/agent/window-tools.js +80 -0
  141. package/src/js/audio/audio-driver.js +417 -0
  142. package/src/js/audio/audio-worklet.js +85 -0
  143. package/src/js/audio/index.js +8 -0
  144. package/src/js/config/default-layout.js +34 -0
  145. package/src/js/config/version.js +8 -0
  146. package/src/js/data/apple2-rom-routines.js +577 -0
  147. package/src/js/debug/assembler-editor-window.js +2993 -0
  148. package/src/js/debug/basic-breakpoint-manager.js +529 -0
  149. package/src/js/debug/basic-program-parser.js +436 -0
  150. package/src/js/debug/basic-program-window.js +2594 -0
  151. package/src/js/debug/basic-variable-inspector.js +447 -0
  152. package/src/js/debug/breakpoint-manager.js +472 -0
  153. package/src/js/debug/cpu-debugger-window.js +2396 -0
  154. package/src/js/debug/index.js +22 -0
  155. package/src/js/debug/label-manager.js +238 -0
  156. package/src/js/debug/memory-browser-window.js +416 -0
  157. package/src/js/debug/memory-heat-map-window.js +481 -0
  158. package/src/js/debug/memory-map-window.js +206 -0
  159. package/src/js/debug/mockingboard-window.js +882 -0
  160. package/src/js/debug/mouse-card-window.js +355 -0
  161. package/src/js/debug/rule-builder-window.js +648 -0
  162. package/src/js/debug/soft-switch-window.js +458 -0
  163. package/src/js/debug/stack-viewer-window.js +221 -0
  164. package/src/js/debug/symbols.js +416 -0
  165. package/src/js/debug/trace-panel.js +291 -0
  166. package/src/js/debug/zero-page-watch-window.js +297 -0
  167. package/src/js/disk-manager/disk-drives-window.js +212 -0
  168. package/src/js/disk-manager/disk-operations.js +284 -0
  169. package/src/js/disk-manager/disk-persistence.js +301 -0
  170. package/src/js/disk-manager/disk-surface-renderer.js +388 -0
  171. package/src/js/disk-manager/drive-sounds.js +139 -0
  172. package/src/js/disk-manager/hard-drive-manager.js +481 -0
  173. package/src/js/disk-manager/hard-drive-persistence.js +187 -0
  174. package/src/js/disk-manager/hard-drive-window.js +57 -0
  175. package/src/js/disk-manager/index.js +890 -0
  176. package/src/js/display/display-settings-window.js +383 -0
  177. package/src/js/display/index.js +10 -0
  178. package/src/js/display/screen-window.js +342 -0
  179. package/src/js/display/webgl-renderer.js +705 -0
  180. package/src/js/file-explorer/disassembler.js +574 -0
  181. package/src/js/file-explorer/dos33.js +266 -0
  182. package/src/js/file-explorer/file-viewer.js +359 -0
  183. package/src/js/file-explorer/index.js +1261 -0
  184. package/src/js/file-explorer/prodos.js +549 -0
  185. package/src/js/file-explorer/utils.js +67 -0
  186. package/src/js/help/documentation-window.js +1096 -0
  187. package/src/js/help/index.js +10 -0
  188. package/src/js/help/release-notes-window.js +85 -0
  189. package/src/js/help/release-notes.js +612 -0
  190. package/src/js/input/gamepad-handler.js +176 -0
  191. package/src/js/input/index.js +12 -0
  192. package/src/js/input/input-handler.js +396 -0
  193. package/src/js/input/joystick-window.js +404 -0
  194. package/src/js/input/mouse-handler.js +99 -0
  195. package/src/js/input/text-selection.js +462 -0
  196. package/src/js/main.js +653 -0
  197. package/src/js/state/index.js +15 -0
  198. package/src/js/state/save-states-window.js +393 -0
  199. package/src/js/state/state-manager.js +409 -0
  200. package/src/js/state/state-persistence.js +218 -0
  201. package/src/js/ui/confirm.js +43 -0
  202. package/src/js/ui/disk-drive-positioner.js +347 -0
  203. package/src/js/ui/reminder-controller.js +129 -0
  204. package/src/js/ui/slot-configuration-window.js +560 -0
  205. package/src/js/ui/theme-manager.js +61 -0
  206. package/src/js/ui/toast.js +44 -0
  207. package/src/js/ui/ui-controller.js +897 -0
  208. package/src/js/ui/window-switcher.js +275 -0
  209. package/src/js/utils/basic-autocomplete.js +832 -0
  210. package/src/js/utils/basic-highlighting.js +473 -0
  211. package/src/js/utils/basic-tokenizer.js +153 -0
  212. package/src/js/utils/basic-tokens.js +117 -0
  213. package/src/js/utils/constants.js +28 -0
  214. package/src/js/utils/indexeddb-helper.js +225 -0
  215. package/src/js/utils/merlin-editor-support.js +905 -0
  216. package/src/js/utils/merlin-highlighting.js +551 -0
  217. package/src/js/utils/storage.js +125 -0
  218. package/src/js/utils/string-utils.js +19 -0
  219. package/src/js/utils/wasm-memory.js +54 -0
  220. package/src/js/windows/base-window.js +690 -0
  221. package/src/js/windows/index.js +9 -0
  222. package/src/js/windows/window-manager.js +375 -0
  223. package/tests/catch2/catch.hpp +17976 -0
  224. package/tests/common/basic_program_builder.cpp +119 -0
  225. package/tests/common/basic_program_builder.hpp +209 -0
  226. package/tests/common/disk_image_builder.cpp +444 -0
  227. package/tests/common/disk_image_builder.hpp +141 -0
  228. package/tests/common/test_helpers.hpp +118 -0
  229. package/tests/gcr/gcr-test.cpp +142 -0
  230. package/tests/integration/check-rom.js +70 -0
  231. package/tests/integration/compare-boot.js +239 -0
  232. package/tests/integration/crash-trace.js +102 -0
  233. package/tests/integration/disk-boot-test.js +264 -0
  234. package/tests/integration/memory-crash.js +108 -0
  235. package/tests/integration/nibble-read-test.js +249 -0
  236. package/tests/integration/phase-test.js +159 -0
  237. package/tests/integration/test_emulator.cpp +291 -0
  238. package/tests/integration/test_emulator_basic.cpp +91 -0
  239. package/tests/integration/test_emulator_debug.cpp +344 -0
  240. package/tests/integration/test_emulator_disk.cpp +153 -0
  241. package/tests/integration/test_emulator_state.cpp +163 -0
  242. package/tests/klaus/6502_functional_test.bin +0 -0
  243. package/tests/klaus/65C02_extended_opcodes_test.bin +0 -0
  244. package/tests/klaus/klaus_6502_test.cpp +184 -0
  245. package/tests/klaus/klaus_65c02_test.cpp +197 -0
  246. package/tests/thunderclock/thunderclock_mmu_test.cpp +304 -0
  247. package/tests/thunderclock/thunderclock_test.cpp +550 -0
  248. package/tests/unit/test_assembler.cpp +521 -0
  249. package/tests/unit/test_audio.cpp +196 -0
  250. package/tests/unit/test_ay8910.cpp +311 -0
  251. package/tests/unit/test_basic_detokenizer.cpp +265 -0
  252. package/tests/unit/test_basic_tokenizer.cpp +382 -0
  253. package/tests/unit/test_block_device.cpp +259 -0
  254. package/tests/unit/test_condition_evaluator.cpp +219 -0
  255. package/tests/unit/test_cpu6502.cpp +1301 -0
  256. package/tests/unit/test_cpu_addressing.cpp +361 -0
  257. package/tests/unit/test_cpu_cycle_counts.cpp +409 -0
  258. package/tests/unit/test_cpu_decimal.cpp +166 -0
  259. package/tests/unit/test_cpu_interrupts.cpp +285 -0
  260. package/tests/unit/test_disassembler.cpp +323 -0
  261. package/tests/unit/test_disk2_card.cpp +330 -0
  262. package/tests/unit/test_dos33.cpp +273 -0
  263. package/tests/unit/test_dsk_disk_image.cpp +315 -0
  264. package/tests/unit/test_expansion_card.cpp +178 -0
  265. package/tests/unit/test_gcr_encoding.cpp +232 -0
  266. package/tests/unit/test_keyboard.cpp +262 -0
  267. package/tests/unit/test_mmu.cpp +555 -0
  268. package/tests/unit/test_mmu_slots.cpp +323 -0
  269. package/tests/unit/test_mockingboard.cpp +352 -0
  270. package/tests/unit/test_mouse_card.cpp +386 -0
  271. package/tests/unit/test_pascal.cpp +248 -0
  272. package/tests/unit/test_prodos.cpp +259 -0
  273. package/tests/unit/test_smartport_card.cpp +321 -0
  274. package/tests/unit/test_thunderclock.cpp +354 -0
  275. package/tests/unit/test_via6522.cpp +323 -0
  276. package/tests/unit/test_video.cpp +319 -0
  277. package/tests/unit/test_woz_disk_image.cpp +257 -0
  278. package/vite.config.js +96 -0
  279. package/wiki/AI-Agent.md +372 -0
  280. package/wiki/Architecture-Overview.md +303 -0
  281. package/wiki/Audio-System.md +449 -0
  282. package/wiki/CPU-Emulation.md +477 -0
  283. package/wiki/Debugger.md +516 -0
  284. package/wiki/Disk-Drives.md +161 -0
  285. package/wiki/Disk-System-Internals.md +547 -0
  286. package/wiki/Display-Settings.md +88 -0
  287. package/wiki/Expansion-Slots.md +187 -0
  288. package/wiki/File-Explorer.md +259 -0
  289. package/wiki/Getting-Started.md +156 -0
  290. package/wiki/Home.md +69 -0
  291. package/wiki/Input-Devices.md +183 -0
  292. package/wiki/Keyboard-Shortcuts.md +158 -0
  293. package/wiki/Memory-System.md +364 -0
  294. package/wiki/Save-States.md +172 -0
  295. package/wiki/Video-Rendering.md +658 -0
@@ -0,0 +1,187 @@
1
+ # Expansion Slots
2
+
3
+ The Apple IIe has seven expansion slots (1-7), each providing I/O space and ROM space for peripheral cards. The emulator supports a configurable set of expansion cards that can be installed in their compatible slots.
4
+
5
+ ## Table of Contents
6
+
7
+ - [Slot Map](#slot-map)
8
+ - [Configuring Slots](#configuring-slots)
9
+ - [Available Cards](#available-cards)
10
+ - [Memory Map](#memory-map)
11
+ - [Card Interface](#card-interface)
12
+
13
+ ## Slot Map
14
+
15
+ The default slot configuration matches a typical Apple IIe setup:
16
+
17
+ | Slot | Default Card | Description |
18
+ |------|-------------|-------------|
19
+ | 1 | Empty | Printer / Serial |
20
+ | 2 | Empty | Serial / Modem |
21
+ | 3 | 80-Column (Built-in) | Fixed -- cannot be changed |
22
+ | 4 | Mockingboard | Sound cards / Mouse |
23
+ | 5 | Empty | Clock / Hard drive |
24
+ | 6 | Disk II Controller | Disk drives |
25
+ | 7 | Thunderclock Plus | RAM disk / Clock |
26
+
27
+ ## Configuring Slots
28
+
29
+ Open the **Expansion Slots** window from the **System** menu to change which cards are installed in each slot.
30
+
31
+ ### How It Works
32
+
33
+ Each configurable slot has a dropdown menu listing the cards that are compatible with that slot. Select a card from the dropdown, and a warning will appear indicating that changes require a reset. Click **Apply & Reset** to apply all pending changes and restart the emulator.
34
+
35
+ ### Slot Restrictions
36
+
37
+ - **Slot 3** is fixed and always contains the built-in 80-column firmware. It cannot be changed.
38
+ - Each card type can only be installed in one slot at a time. If a card is already in use in another slot, its option will be grayed out in the dropdown.
39
+ - Not all cards are available in all slots. Each slot has a specific list of compatible cards based on Apple II conventions.
40
+
41
+ ### Compatible Cards per Slot
42
+
43
+ | Slot | Available Cards |
44
+ |------|----------------|
45
+ | 1 | Empty |
46
+ | 2 | Empty |
47
+ | 3 | 80-Column (fixed) |
48
+ | 4 | Empty, Mockingboard, Apple Mouse Card |
49
+ | 5 | Empty, Thunderclock Plus |
50
+ | 6 | Empty, Disk II Controller |
51
+ | 7 | Empty, Thunderclock Plus |
52
+
53
+ ### Persistence
54
+
55
+ Slot configuration is saved to localStorage and automatically restored when the emulator is loaded. If no saved configuration exists, the default card assignments shown in the Slot Map above are used.
56
+
57
+ ## Available Cards
58
+
59
+ ### Disk II Controller
60
+
61
+ The Disk II controller card provides access to two 5.25-inch floppy disk drives. It uses 16 soft switches in the I/O space for drive control including phase stepping, motor control, drive selection, and read/write operations.
62
+
63
+ - **Default slot:** 6
64
+ - **I/O space:** `$C0E0`-`$C0EF` (16 soft switches)
65
+ - **ROM space:** `$C600`-`$C6FF` (256-byte bootstrap ROM, P5A 341-0027)
66
+ - **Supported formats:** DSK, DO, PO, NIB, WOZ
67
+
68
+ Soft switch layout:
69
+
70
+ | Offset | Even (Off) | Odd (On) |
71
+ |--------|-----------|----------|
72
+ | $00-$01 | Phase 0 off | Phase 0 on |
73
+ | $02-$03 | Phase 1 off | Phase 1 on |
74
+ | $04-$05 | Phase 2 off | Phase 2 on |
75
+ | $06-$07 | Phase 3 off | Phase 3 on |
76
+ | $08-$09 | Motor off | Motor on |
77
+ | $0A-$0B | Drive 1 select | Drive 2 select |
78
+ | $0C-$0D | Q6L (read) | Q6H (write protect / write load) |
79
+ | $0E-$0F | Q7L (read mode) | Q7H (write mode) |
80
+
81
+ See [[Disk-Drives]] for more details on disk operation.
82
+
83
+ ### Mockingboard
84
+
85
+ The Mockingboard sound card provides stereo audio through two AY-3-8910 Programmable Sound Generator (PSG) chips, each controlled by a MOS 6522 Versatile Interface Adapter (VIA). It was the most popular sound card for the Apple II.
86
+
87
+ - **Default slot:** 4
88
+ - **ROM space:** `$C400`-`$C4FF` (VIA registers -- unusual; most cards use I/O space)
89
+ - **VIA 1:** `$C400`-`$C47F` (bit 7 = 0) -- controls left channel PSG
90
+ - **VIA 2:** `$C480`-`$C4FF` (bit 7 = 1) -- controls right channel PSG
91
+
92
+ The Mockingboard is unusual among Apple II cards in that it uses the slot ROM address space for its VIA registers instead of the I/O space, because it needs more than the 16 bytes available in the I/O range.
93
+
94
+ Each PSG provides 3 tone channels and 1 noise channel, for a total of 6 tone channels and 2 noise channels in stereo.
95
+
96
+ See [[Audio-System]] for more details on Mockingboard audio.
97
+
98
+ ### Thunderclock Plus
99
+
100
+ The Thunderclock Plus is a ProDOS-compatible real-time clock card. It provides automatic date and time stamping for ProDOS applications, eliminating manual date entry prompts and enabling proper file timestamps.
101
+
102
+ - **Compatible slots:** 5, 7
103
+ - **Default slot:** 7
104
+ - **I/O space:** Control register at `$C0n0`
105
+ - **ROM space:** `$Cn00`-`$CnFF` (256-byte ProDOS clock driver)
106
+ - **Expansion ROM:** `$C800`-`$CFFF` (utility routines)
107
+
108
+ The Thunderclock uses the host system's real date and time, so ProDOS file timestamps will reflect the actual current time.
109
+
110
+ **ProDOS detection:** ProDOS scans expansion slot ROM looking for specific signature bytes (`$08`, `$28`, `$58`, `$70` at offsets 0, 2, 4, 6). When found, ProDOS patches its clock driver to use the Thunderclock for all date/time operations.
111
+
112
+ **Hardware interface:** The card uses a serial interface based on the NEC uPD1990C clock chip. Time data is transmitted as 40 bits (10 BCD nibbles) encoding seconds, minutes, hours, day, day-of-week, and month.
113
+
114
+ ### Apple Mouse Card
115
+
116
+ The Apple Mouse Interface Card provides mouse input for Apple II software. It emulates the MC6821 PIA-based command protocol used by the original card's firmware.
117
+
118
+ - **Compatible slots:** 4 (shares with Mockingboard)
119
+ - **I/O space:** `$C0n0`-`$C0n3` (MC6821 PIA registers)
120
+ - **ROM space:** `$Cn00`-`$CnFF` (firmware)
121
+ - **Expansion ROM:** Full 2 KB ROM with page selection via Port B bits 1-3
122
+
123
+ The mouse card firmware runs as native 6502 code on the CPU. The emulator provides the hardware-side emulation of the MC6821 PIA, receiving commands from the firmware and providing mouse position and button data.
124
+
125
+ **VBL interrupt support:** When the mouse mode has bit 3 set, an IRQ is generated at the start of each vertical blanking period, allowing software to poll the mouse at a consistent 60 Hz rate.
126
+
127
+ ## Memory Map
128
+
129
+ Each expansion slot is assigned dedicated address ranges in the Apple IIe memory map:
130
+
131
+ ### I/O Space ($C080-$C0FF)
132
+
133
+ Each slot gets 16 bytes of I/O space. Software reads and writes to these addresses to communicate with the card's hardware.
134
+
135
+ | Slot | I/O Range |
136
+ |------|-----------|
137
+ | 1 | `$C090`-`$C09F` |
138
+ | 2 | `$C0A0`-`$C0AF` |
139
+ | 3 | `$C0B0`-`$C0BF` |
140
+ | 4 | `$C0C0`-`$C0CF` |
141
+ | 5 | `$C0D0`-`$C0DF` |
142
+ | 6 | `$C0E0`-`$C0EF` |
143
+ | 7 | `$C0F0`-`$C0FF` |
144
+
145
+ ### Slot ROM Space ($C100-$C7FF)
146
+
147
+ Each slot gets 256 bytes of ROM space. When the CPU reads from this range, the card in that slot provides the data. This is typically used for identification bytes, bootstrap code, or (in the Mockingboard's case) hardware register access.
148
+
149
+ | Slot | ROM Range |
150
+ |------|-----------|
151
+ | 1 | `$C100`-`$C1FF` |
152
+ | 2 | `$C200`-`$C2FF` |
153
+ | 3 | `$C300`-`$C3FF` |
154
+ | 4 | `$C400`-`$C4FF` |
155
+ | 5 | `$C500`-`$C5FF` |
156
+ | 6 | `$C600`-`$C6FF` |
157
+ | 7 | `$C700`-`$C7FF` |
158
+
159
+ ### Expansion ROM Space ($C800-$CFFF)
160
+
161
+ A shared 2 KB region that can be mapped to any card's expansion ROM. When the CPU accesses a card's slot ROM, that card's expansion ROM (if it has one) becomes active in this shared range. Cards like the Thunderclock and Mouse Card use this for additional firmware.
162
+
163
+ ### ROM Switching Soft Switches
164
+
165
+ Two soft switches control how the slot ROM area is accessed:
166
+
167
+ - **INTCXROM** (`$C006`/`$C007`) -- When set, the internal ROM is used for the entire `$C100`-`$CFFF` range instead of slot ROMs.
168
+ - **SLOTC3ROM** (`$C00A`/`$C00B`) -- When set, slot 3 uses the card's ROM instead of the built-in 80-column firmware.
169
+
170
+ ## Card Interface
171
+
172
+ All expansion cards implement the `ExpansionCard` interface, which provides the following methods:
173
+
174
+ | Method | Description |
175
+ |--------|-------------|
176
+ | `readIO(offset)` | Read from the card's I/O space (offset 0-15) |
177
+ | `writeIO(offset, value)` | Write to the card's I/O space |
178
+ | `readROM(offset)` | Read from the card's ROM space (offset 0-255) |
179
+ | `writeROM(offset, value)` | Write to the card's ROM space (unusual, used by Mockingboard) |
180
+ | `readExpansionROM(offset)` | Read from expansion ROM (offset 0-2047) |
181
+ | `reset()` | Reset the card to power-on state |
182
+ | `update(cycles)` | Update card state each CPU cycle |
183
+ | `serialize() / deserialize()` | Save and restore card state |
184
+
185
+ Cards can also generate IRQ interrupts via a callback mechanism, used by the Mockingboard's VIA timers and the Mouse Card's VBL interrupt.
186
+
187
+ See also: [[Architecture-Overview]], [[Audio-System]], [[Disk-Drives]]
@@ -0,0 +1,259 @@
1
+ # File Explorer
2
+
3
+ The File Explorer provides a built-in disk image browser that can read and display files stored on DOS 3.3 and ProDOS formatted disk images. It supports viewing Applesoft BASIC, Integer BASIC, text files, binary files (with disassembly), hex dumps, and Merlin assembler source code.
4
+
5
+ ## Table of Contents
6
+
7
+ - [Opening the File Explorer](#opening-the-file-explorer)
8
+ - [Interface Layout](#interface-layout)
9
+ - [Supported Disk Formats](#supported-disk-formats)
10
+ - [Browsing Files](#browsing-files)
11
+ - [File Types](#file-types)
12
+ - [View Modes](#view-modes)
13
+ - [BASIC Program Viewer](#basic-program-viewer)
14
+ - [Disassembler](#disassembler)
15
+ - [Hex Dump](#hex-dump)
16
+ - [Merlin Assembler Source](#merlin-assembler-source)
17
+ - [Text Files](#text-files)
18
+
19
+ ## Opening the File Explorer
20
+
21
+ Open the File Explorer from the **Tools** menu. When the window opens, it automatically reads the disk currently inserted in the selected drive.
22
+
23
+ ## Interface Layout
24
+
25
+ The File Explorer window is divided into three areas:
26
+
27
+ ### Toolbar
28
+
29
+ The toolbar at the top contains:
30
+
31
+ - **Drive selector** -- Toggle between Drive 1 and Drive 2 to browse disks in either drive
32
+ - **Refresh button** -- Re-reads the current disk catalog (useful after the emulator modifies the disk)
33
+ - **Disk info** -- Displays the disk filename and detected format (e.g. `MyDisk.dsk (DOS 3.3)` or `Utils.po (ProDOS: UTILITIES)`)
34
+
35
+ ### Catalog Panel (Left)
36
+
37
+ The left panel shows the file listing for the current disk. Each entry displays:
38
+
39
+ - **File type** -- A short type code (`A` for Applesoft, `B` for Binary, `T` for Text, etc.)
40
+ - **Filename** -- The file's name as stored on disk
41
+ - **Size** -- Sector count (DOS 3.3) or block count (ProDOS)
42
+ - **Lock indicator** -- An asterisk (`*`) appears before the type code if the file is locked
43
+
44
+ For ProDOS disks, directories are shown with a `DIR` type indicator and a trailing `/` on the name. Clicking a directory navigates into it.
45
+
46
+ ### File Viewer Panel (Right)
47
+
48
+ The right panel displays the contents of the currently selected file. The header shows the filename, file type description, and file size. View mode toggle buttons appear when applicable (e.g. Disassemble / HEX / MERLIN for binary files).
49
+
50
+ ## Supported Disk Formats
51
+
52
+ The File Explorer supports two Apple II disk operating systems:
53
+
54
+ ### DOS 3.3
55
+
56
+ Standard Apple II disk format with 35 tracks, 16 sectors per track (143,360 bytes). The explorer reads the Volume Table of Contents (VTOC) at track 17, sector 0 and follows the catalog sector chain to list all files.
57
+
58
+ **Recognized DOS 3.3 file types:**
59
+
60
+ | Type Code | Hex | Description |
61
+ |-----------|-----|-------------|
62
+ | T | $00 | Text file |
63
+ | I | $01 | Integer BASIC program |
64
+ | A | $02 | Applesoft BASIC program |
65
+ | B | $04 | Binary file |
66
+ | S | $08 | Type S |
67
+ | R | $10 | Relocatable object |
68
+ | a | $20 | Type a |
69
+ | b | $40 | Type b |
70
+
71
+ ### ProDOS
72
+
73
+ Apple's more advanced disk operating system with hierarchical directory support. The explorer reads the volume directory starting at block 2 and recursively scans all subdirectories.
74
+
75
+ **Recognized ProDOS file types:**
76
+
77
+ | Type Code | Hex | Description |
78
+ |-----------|------|-------------|
79
+ | TXT | $04 | Text file |
80
+ | BIN | $06 | Binary file |
81
+ | DIR | $0F | Directory |
82
+ | ADB | $19 | AppleWorks Database |
83
+ | AWP | $1A | AppleWorks Word Processor |
84
+ | ASP | $1B | AppleWorks Spreadsheet |
85
+ | SRC | $B0 | Source Code |
86
+ | S16 | $B3 | GS/OS Application |
87
+ | DOC | $BF | Document |
88
+ | PNT | $C0 | Packed HiRes |
89
+ | PIC | $C1 | HiRes Picture |
90
+ | SHK | $E0 | ShrinkIt Archive |
91
+ | PAS | $EF | Pascal |
92
+ | CMD | $F0 | Command |
93
+ | INT | $FA | Integer BASIC program |
94
+ | IVR | $FB | Integer BASIC Variables |
95
+ | BAS | $FC | Applesoft BASIC program |
96
+ | VAR | $FD | Applesoft Variables |
97
+ | REL | $FE | Relocatable object |
98
+ | SYS | $FF | System file |
99
+
100
+ ### ProDOS Directory Navigation
101
+
102
+ When browsing a ProDOS disk, the File Explorer provides full directory navigation:
103
+
104
+ - **Breadcrumb path bar** -- Appears when inside a subdirectory, showing the full path with clickable segments (e.g. `/UTILITIES/SYSTEM`). Click any path component to jump directly to that directory.
105
+ - **Parent directory entry** (`..`) -- Shown at the top of the file list when inside a subdirectory. Click to go up one level.
106
+ - **Directories** -- Displayed with a `DIR` type label and a trailing slash. Click to enter the directory.
107
+
108
+ Files are sorted with directories listed first, then files, both in alphabetical order.
109
+
110
+ ## File Types
111
+
112
+ The File Explorer automatically selects the appropriate viewer based on the file type:
113
+
114
+ | File Type | Viewer |
115
+ |-----------|--------|
116
+ | Applesoft BASIC | Syntax-highlighted BASIC listing with navigable line references |
117
+ | Integer BASIC | Syntax-highlighted BASIC listing with navigable line references |
118
+ | Text | Plain text display (with optional Merlin detection) |
119
+ | Binary | Disassembly view with hex and Merlin alternatives |
120
+ | System (ProDOS SYS) | Disassembly view with hex and Merlin alternatives |
121
+ | All other types | Hex dump |
122
+
123
+ ## View Modes
124
+
125
+ ### Binary File View Modes
126
+
127
+ When viewing a binary file (DOS 3.3 type `B`, ProDOS types `BIN` or `SYS`), three view mode buttons appear:
128
+
129
+ - **Disassemble** -- 65C02 disassembly with flow analysis (default)
130
+ - **HEX** -- Color-coded hex dump with ASCII sidebar
131
+ - **MERLIN** -- Merlin assembler source view (auto-selected when Merlin source is detected)
132
+
133
+ ### Text File View Modes
134
+
135
+ When viewing a text file, two view mode buttons appear:
136
+
137
+ - **TEXT** -- Plain text display (default)
138
+ - **MERLIN** -- Merlin assembler source view (auto-selected when Merlin source is detected)
139
+
140
+ ## BASIC Program Viewer
141
+
142
+ BASIC programs (Applesoft and Integer BASIC) are detokenized using the emulator's C++ BASIC detokenizer (via WASM) and then rendered with syntax highlighting.
143
+
144
+ ### Syntax Highlighting
145
+
146
+ BASIC listings use color-coded highlighting for different language elements:
147
+
148
+ - Line numbers
149
+ - Keywords (PRINT, FOR, NEXT, IF, THEN, etc.)
150
+ - Strings
151
+ - Numbers
152
+ - Operators
153
+ - Comments (REM statements)
154
+
155
+ ### Line Navigation
156
+
157
+ GOTO, GOSUB, and THEN targets are rendered as clickable references. Clicking a line number reference in a GOTO or GOSUB statement scrolls to and highlights the target line in the listing. The target line is centered in the view and highlighted for easy identification.
158
+
159
+ ## Disassembler
160
+
161
+ The disassembler provides a 65C02 disassembly view for binary and system files. It uses the emulator's C++ disassembler core with recursive-descent flow analysis to distinguish code from data.
162
+
163
+ ### Features
164
+
165
+ - **Flow analysis** -- Uses recursive descent from the entry point to trace execution paths through branches and jumps, distinguishing actual code from embedded data
166
+ - **ORG directive** -- Shows the load address at the top of the listing
167
+ - **Data gaps** -- Bytes not reached by flow analysis are displayed as `.BYTE` data directives (up to 8 bytes per line)
168
+ - **Color-coded instruction categories:**
169
+ - Jump/Branch (JMP, JSR, BNE, etc.)
170
+ - Load/Store (LDA, STA, LDX, etc.)
171
+ - Math/Logic (ADC, AND, ORA, etc.)
172
+ - Stack/Register (PHA, TAX, etc.)
173
+ - Addresses and immediates
174
+ - Data bytes
175
+
176
+ A color legend is displayed above the listing.
177
+
178
+ ### Clickable Branch Targets
179
+
180
+ Branch and jump target addresses are clickable. Clicking a target scrolls to and highlights the destination instruction. This works for both relative branches (BNE, BEQ, etc.) and absolute jumps (JMP, JSR).
181
+
182
+ ### Virtual Scrolling
183
+
184
+ For large binary files (500+ disassembled lines), the disassembler uses virtual scrolling to maintain smooth performance. Only the visible portion of the listing is rendered at any time, with a small buffer above and below the viewport.
185
+
186
+ ### Address Format
187
+
188
+ Each line shows the address, raw bytes, mnemonic, and operand:
189
+
190
+ ```
191
+ ORG $0800
192
+ 0800: A9 00 LDA #$00
193
+ 0802: 8D 00 20 STA $2000
194
+ 0805: 4C 00 08 JMP $0800
195
+ ```
196
+
197
+ DOS 3.3 binary files include a 4-byte header (2 bytes load address, 2 bytes length) that is automatically parsed to determine the base address. ProDOS binary files store the load address in the file entry's auxiliary type field.
198
+
199
+ ## Hex Dump
200
+
201
+ The hex dump view displays raw file data with color coding and an ASCII sidebar.
202
+
203
+ ### Color Coding
204
+
205
+ Bytes are color-coded by category with a legend displayed above the view:
206
+
207
+ - **Printable** -- Standard ASCII characters ($20-$7E)
208
+ - **Control** -- Control characters ($01-$1F)
209
+ - **High Bit** -- Bytes with the high bit set ($80-$FF)
210
+ - **Zero** -- Null bytes ($00)
211
+
212
+ ### Layout
213
+
214
+ Each line shows:
215
+
216
+ ```
217
+ ADDR: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX |ASCII display...|
218
+ ```
219
+
220
+ - **Address** -- 4-digit hex address
221
+ - **Hex bytes** -- Bytes displayed in groups of 8, separated by a gap
222
+ - **ASCII sidebar** -- Printable characters shown as-is (with high bit stripped), non-printable shown as dots
223
+
224
+ ### Dynamic Column Count
225
+
226
+ The hex dump automatically adjusts the number of bytes displayed per row based on the window width. Resizing the File Explorer window dynamically recalculates the optimal column count to fill the available space.
227
+
228
+ ## Merlin Assembler Source
229
+
230
+ The File Explorer can detect and display Merlin assembler source files with full syntax highlighting. Merlin was the most popular macro assembler for the Apple II.
231
+
232
+ ### Auto-Detection
233
+
234
+ When a binary or text file is selected, the explorer automatically checks whether the content looks like Merlin assembler source. If detected, the view mode automatically switches to the MERLIN view. You can manually switch between views using the toggle buttons.
235
+
236
+ ### Syntax Highlighting
237
+
238
+ Merlin source files are displayed with syntax highlighting that matches the disassembler's color scheme:
239
+
240
+ - **Jump/Branch mnemonics** -- JMP, JSR, BNE, BCC, RTS, etc.
241
+ - **Load/Store mnemonics** -- LDA, STA, LDX, STY, etc.
242
+ - **Math/Logic mnemonics** -- ADC, AND, ORA, ASL, CMP, etc.
243
+ - **Stack/Register mnemonics** -- PHA, PLA, TAX, TXA, etc.
244
+ - **Flag mnemonics** -- CLC, SEC, SEI, NOP, etc.
245
+ - **Directives** -- ORG, EQU, DS, DFB, ASC, HEX, PUT, MAC, and many more
246
+ - **Labels** -- Symbols defined at the start of lines
247
+ - **Comments** -- Text following semicolons or asterisks
248
+ - **Addresses and values** -- Hex values and numeric constants
249
+
250
+ ## Text Files
251
+
252
+ Text files are displayed with Apple II character encoding properly handled:
253
+
254
+ - High-bit stripping (Apple II text uses $80-$FF for normal characters)
255
+ - Carriage return ($0D) conversion to newlines
256
+ - Tab ($09) preservation
257
+ - Null byte ($00) filtering
258
+
259
+ See also: [[Disk-Drives]], [[Getting-Started]]
@@ -0,0 +1,156 @@
1
+ # Getting Started
2
+
3
+ This guide walks you through your first session with the Apple //e Emulator -- from opening the page to running software.
4
+
5
+ ---
6
+
7
+ ## Table of Contents
8
+
9
+ - [Requirements](#requirements)
10
+ - [Opening the Emulator](#opening-the-emulator)
11
+ - [Powering On](#powering-on)
12
+ - [The Toolbar](#the-toolbar)
13
+ - [Using the Keyboard](#using-the-keyboard)
14
+ - [Inserting a Disk](#inserting-a-disk)
15
+ - [Pasting Text](#pasting-text)
16
+ - [Copying Screen Text](#copying-screen-text)
17
+ - [Full-Page Mode](#full-page-mode)
18
+ - [Installing as a PWA](#installing-as-a-pwa)
19
+ - [Themes](#themes)
20
+ - [Getting Help](#getting-help)
21
+
22
+ ---
23
+
24
+ ## Requirements
25
+
26
+ The emulator runs in any modern browser that supports WebAssembly, WebGL, and the Web Audio API:
27
+
28
+ - Chrome / Edge (recommended)
29
+ - Firefox
30
+ - Safari
31
+
32
+ No downloads, plugins, or accounts are needed. The emulator loads entirely in the browser.
33
+
34
+ ## Opening the Emulator
35
+
36
+ Navigate to the emulator URL. A loading spinner appears while the WebAssembly core initialises. Once ready, the screen shows TV static (the "no signal" pattern), indicating the virtual Apple //e is powered off.
37
+
38
+ A floating reminder will point to the power button for first-time visitors.
39
+
40
+ ## Powering On
41
+
42
+ Click the **Power** button (the circle-with-a-line icon) in the top-left area of the toolbar. The button changes colour to indicate the machine is on, and the screen will display the Apple IIe boot sequence.
43
+
44
+ - If a **disk is inserted**, the Disk II controller will attempt to boot from it.
45
+ - If **no disk** is present, the screen shows a checksum test. A reminder will suggest pressing **Ctrl+Reset** to drop into Applesoft BASIC.
46
+
47
+ ### Reset Options
48
+
49
+ | Button | Action |
50
+ |--------|--------|
51
+ | **Ctrl+Reset** | Warm reset -- preserves memory contents, re-enters the monitor or BASIC prompt |
52
+ | **Reboot** | Cold reset -- full power-cycle restart, clears all state |
53
+
54
+ Both buttons are in the toolbar next to the power button.
55
+
56
+ ## The Toolbar
57
+
58
+ The toolbar along the top of the page provides access to all emulator functions:
59
+
60
+ | Control | Purpose |
61
+ |---------|---------|
62
+ | **Power** | Turn the emulated Apple //e on or off |
63
+ | **Ctrl+Reset** | Warm reset (preserves memory) |
64
+ | **Reboot** | Cold reset (full restart) |
65
+ | **File** | Auto-save toggle, save states manager |
66
+ | **View** | Theme selector, Disk Drives, File Explorer, Display settings, Joystick/Paddles, Expansion Slots |
67
+ | **Debug** | CPU Debugger, Soft Switches, Memory Map, Memory Browser, Heat Map, Stack Viewer, Zero Page Watch, Mockingboard, Mouse Card |
68
+ | **Dev** | Applesoft BASIC editor, 6502 Assembler |
69
+ | **Full Page** | Expand the screen to fill the browser window |
70
+ | **Sound** | Volume slider, mute toggle, drive sounds toggle |
71
+ | **Help** | Documentation (F1), Release Notes, Check for Updates |
72
+
73
+ ## Using the Keyboard
74
+
75
+ Click the emulator screen to give it keyboard focus. Once focused, key presses are sent directly to the emulated Apple //e. The C++ core translates browser key codes to Apple II key codes, handling Shift, Ctrl, and Caps Lock modifiers.
76
+
77
+ Key points:
78
+
79
+ - **Arrow keys** work as expected in software that supports them (the Apple //e has native arrow key support).
80
+ - **Backspace** sends the Apple II left-arrow (delete) key.
81
+ - **Tab** is captured by the emulator and not passed to the browser.
82
+ - **Escape** sends the Apple II ESC key.
83
+ - **Ctrl+key** combinations pass through to the emulator (e.g., Ctrl+C, Ctrl+D for DOS commands).
84
+ - **Browser shortcuts** like Ctrl+R (reload) are not intercepted and work normally.
85
+
86
+ For the full shortcut reference see [[Keyboard-Shortcuts]].
87
+
88
+ ## Inserting a Disk
89
+
90
+ 1. Open **View > Disk Drives** from the toolbar (or use the window switcher with Ctrl+\`).
91
+ 2. The Disk Drives window shows Drive 1 and Drive 2.
92
+ 3. **Drag and drop** a disk image file onto a drive slot, or click the drive's **Load** button to browse for a file.
93
+ 4. Supported formats: **DSK**, **DO**, **PO**, **NIB**, and **WOZ**.
94
+ 5. If the emulator is running, the disk will begin spinning and the Apple //e will detect it.
95
+
96
+ To boot from a newly inserted disk, press **Ctrl+Reset** or click **Reboot**.
97
+
98
+ See [[Disk-Drives]] for full details on disk management, write protection, surface visualisation, and drive sounds.
99
+
100
+ ## Pasting Text
101
+
102
+ Press **Ctrl+V** while the emulator screen has focus to paste text from the clipboard. The emulator:
103
+
104
+ 1. Reads the clipboard contents.
105
+ 2. Converts each character to its Apple II key equivalent.
106
+ 3. Feeds the characters into the emulated keyboard at 8x speed (the emulation temporarily accelerates to process paste quickly).
107
+ 4. Automatically waits for the keyboard-ready flag between characters to avoid dropped input.
108
+
109
+ This is useful for entering BASIC programs or long commands. Paste is cancelled automatically if you press Ctrl+Reset or Reboot during the operation.
110
+
111
+ ## Copying Screen Text
112
+
113
+ You can select and copy text directly from the Apple //e screen:
114
+
115
+ 1. **Click and drag** on the emulator screen to highlight text.
116
+ 2. The selection is shown as a coloured overlay.
117
+ 3. Press **Ctrl+C** (or Cmd+C on Mac) to copy the selected text to the clipboard.
118
+ 4. The selection works in both 40-column and 80-column text modes.
119
+
120
+ ## Full-Page Mode
121
+
122
+ Click the **Full Page** button (expand icon) in the toolbar to fill the entire browser window with the emulator screen. This hides the toolbar and footer for a distraction-free experience.
123
+
124
+ While in full-page mode:
125
+
126
+ - Move the mouse to the **top of the screen** to reveal a floating toolbar with Power, Ctrl+Reset, Reboot, and Exit controls.
127
+ - Press **Ctrl+Escape** to exit full-page mode and return to the normal view.
128
+
129
+ ## Installing as a PWA
130
+
131
+ The emulator can be installed as a Progressive Web App for a more native experience:
132
+
133
+ 1. Open the emulator in Chrome or Edge.
134
+ 2. Click the install icon in the browser address bar (or use the browser menu).
135
+ 3. The emulator will open in its own window without browser chrome.
136
+
137
+ The PWA manifest provides the app title "Apple //e" with appropriate icons.
138
+
139
+ ## Themes
140
+
141
+ The emulator supports three themes, selectable from **View > Theme**:
142
+
143
+ | Theme | Description |
144
+ |-------|-------------|
145
+ | **Light** | Light background with dark text for toolbar and windows |
146
+ | **Dark** | Dark background (default) suited for extended use |
147
+ | **System** | Automatically follows your operating system's light/dark preference |
148
+
149
+ The theme applies to the toolbar, all debug windows, dialogs, and settings panels. The emulator screen itself is unaffected -- it always renders authentic Apple II colours.
150
+
151
+ ## Getting Help
152
+
153
+ - Press **F1** at any time to open the built-in Documentation window.
154
+ - Open **Help > Release Notes** to see what has changed in the current version.
155
+ - Open **Help > Check for Updates** to see if a newer version is available.
156
+ - The footer bar at the bottom of the page also links to Release Notes and shows the F1 hint.
package/wiki/Home.md ADDED
@@ -0,0 +1,69 @@
1
+ # Apple //e Emulator
2
+
3
+ A cycle-accurate Apple II Enhanced emulator running entirely in the browser. Built with WebAssembly (C++ backend) and WebGL rendering, it faithfully reproduces the 1MHz 65C02 processor, 128KB memory architecture, all standard video modes, Disk II controller, expansion cards, and speaker audio -- no plugins or installs required.
4
+
5
+ ---
6
+
7
+ ## Feature Highlights
8
+
9
+ - **Cycle-accurate 65C02 CPU** at 1.023 MHz with full NMOS 6502 and 65C02 extended opcode support
10
+ - **128KB memory** (64KB main + 64KB auxiliary) with Language Card and double hi-res capability
11
+ - **All Apple IIe video modes** -- Text, Lo-Res, Hi-Res, Double Hi-Res, Double Lo-Res, and 80-column text
12
+ - **CRT shader effects** -- scanlines, phosphor glow, screen curvature, chromatic aberration, vignette, and analog noise via WebGL
13
+ - **Disk II emulation** with DSK, DO, PO, and WOZ format support and real-time surface visualization
14
+ - **Expansion card system** -- Mockingboard (dual AY-3-8910), Thunderclock Plus, Mouse Interface Card
15
+ - **Audio-driven timing** using Web Audio API at 48 kHz for accurate, drift-free emulation even when backgrounded
16
+ - **Save states** -- autosave plus five manual slots stored in IndexedDB
17
+ - **Built-in debugger suite** -- CPU debugger, memory browser, heat map, stack viewer, soft switch monitor, and more
18
+ - **Applesoft BASIC editor** and **6502 assembler** with direct memory injection
19
+ - **File Explorer** for browsing DOS 3.3 and ProDOS disk contents
20
+ - **Installable PWA** with light, dark, and system-follow themes
21
+ - **Paste support** (Ctrl+V) and full-page mode
22
+
23
+ ## Quick Start
24
+
25
+ 1. Open the emulator in a modern browser (Chrome, Firefox, Safari, or Edge).
26
+ 2. Click the **Power** button in the toolbar to turn on the Apple //e.
27
+ 3. If no disk is inserted you will see the Applesoft BASIC prompt after pressing **Ctrl+Reset**.
28
+ 4. To load software, open **View > Disk Drives**, drag a disk image onto a drive slot or click **Load** to browse.
29
+ 5. Press **F1** at any time for built-in documentation.
30
+
31
+ See [[Getting-Started]] for a full walkthrough.
32
+
33
+ ---
34
+
35
+ ## Wiki Contents
36
+
37
+ ### User Guide
38
+
39
+ | Page | Description |
40
+ | ---------------------- | ------------------------------------------------------------------------------------------ |
41
+ | [[Getting-Started]] | First-time setup, powering on, inserting disks, keyboard basics, paste, and full-page mode |
42
+ | [[Display-Settings]] | CRT effects, analog noise, image controls, colour modes, and rendering options |
43
+ | [[Disk-Drives]] | Disk formats, drive UI, surface visualization, write protection, and drive sounds |
44
+ | [[File-Explorer]] | Browsing DOS 3.3 and ProDOS disk contents, viewing files, and disassembly |
45
+ | [[Save-States]] | Autosave, manual save slots, and state management |
46
+ | [[Expansion-Slots]] | Slot configuration, Mockingboard, Thunderclock, Mouse Card |
47
+ | [[Input-Devices]] | Keyboard mapping, joystick/paddle configuration, mouse support |
48
+ | [[AI-Agent]] | LLM integration via MCP, connection status, server setup, and example prompts |
49
+ | [[Keyboard-Shortcuts]] | Complete keyboard shortcut reference |
50
+
51
+ ### Developer Guide
52
+
53
+ | Page | Description |
54
+ | ------------------------- | ------------------------------------------------------------------------ |
55
+ | [[Architecture-Overview]] | Two-layer design, audio-driven timing, WASM interface pattern |
56
+ | [[CPU-Emulation]] | 65C02 implementation, cycle accuracy, Klaus Dormann test compliance |
57
+ | [[Memory-System]] | MMU soft switches, Language Card, bank switching, auxiliary memory |
58
+ | [[Video-Rendering]] | Scanline rendering, WebGL pipeline, CRT shader architecture |
59
+ | [[Audio-System]] | Speaker toggle emulation, Mockingboard synthesis, AudioWorklet pipeline |
60
+ | [[Disk-System-Internals]] | GCR encoding, WOZ format handling, Disk II controller state machine |
61
+ | [[Debugger]] | CPU debugger, breakpoints, rule builder, memory tools, and debug windows |
62
+
63
+ ---
64
+
65
+ ## Version
66
+
67
+ Current release: **1.5.0**
68
+
69
+ Open **Help > Release Notes** inside the emulator to see what's new.