|
9 | 9 |
|
10 | 10 | This is an emulator for the Commander X16 computer system. It only depends on SDL2 and should compile on all modern operating systems. |
11 | 11 |
|
| 12 | +Features |
| 13 | +-------- |
| 14 | + |
| 15 | +* CPU: Full 65C02 instruction set |
| 16 | +* VERA |
| 17 | + * Mostly cycle exact emulation |
| 18 | + * Supports almost all features: |
| 19 | + * composer |
| 20 | + * two layers |
| 21 | + * sprites |
| 22 | + * VSYNC, raster, sprite IRQ |
| 23 | +* Sound |
| 24 | + * PCM |
| 25 | + * PSG |
| 26 | + * YM2151 |
| 27 | +* SD card: reading and writing (image file) |
| 28 | +* VIA |
| 29 | + * ROM/RAM banking |
| 30 | + * keyboard |
| 31 | + * mouse |
| 32 | + * gamepad |
| 33 | + |
| 34 | +Missing Features |
| 35 | +---------------- |
| 36 | + |
| 37 | +* VERA |
| 38 | + * Does not support the "CURRENT_FIELD" bit |
| 39 | + * Interlaced modes (NTSC/RGB) don't render at the full horizontal fidelity |
| 40 | +* VIA |
| 41 | + * Does not support counters/timers/IRQs |
| 42 | +* Sound |
| 43 | + * No SAA support |
| 44 | + |
| 45 | + |
12 | 46 | Binaries & Compiling |
13 | 47 | -------------------- |
14 | 48 |
|
@@ -148,21 +182,51 @@ On startup, the X16 presents direct mode of BASIC V2. You can enter BASIC statem |
148 | 182 | * The X16 does not have a `STOP + RESTORE` function. |
149 | 183 |
|
150 | 184 |
|
| 185 | +SD Card Images |
| 186 | +-------------- |
| 187 | + |
| 188 | +The command line argument `-sdcard` lets you attach an image file for the emulated SD card. Using an emulated SD card makes filesystem operations go through the X16's DOS implementation, so it supports all filesystem operations (including directory listing though `DOS"$` command channel commands using the `DOS` statement) and guarantees full compatibility with the real device. |
| 189 | + |
| 190 | +Images must be greater than 32 MB in size and contain an MBR partition table and a FAT32 filesystem. The file `sdcard.img.zip` in this repository is an empty 100 MB image in this format. |
| 191 | + |
| 192 | +On macOS, you can just double-click an image to mount it, or use the command line: |
| 193 | + |
| 194 | + # hdiutil attach sdcard.img |
| 195 | + /dev/disk2 FDisk_partition_scheme |
| 196 | + /dev/disk2s1 Windows_FAT_32 /Volumes/X16 DISK |
| 197 | + # [do something with the filesystem] |
| 198 | + # hdiutil detach /dev/disk[n] # [n] = number of device as printed above |
| 199 | + |
| 200 | +On Linux, you can use the command line: |
| 201 | + |
| 202 | + # sudo losetup -P /dev/loop21 disk.img |
| 203 | + # sudo mount /dev/loop21p1 /mnt # pick a location to mount it to, like /mnt |
| 204 | + # [do something with the filesystem] |
| 205 | + # sudo umount /mnt |
| 206 | + # sudo losetup -d /dev/loop21 |
| 207 | + |
| 208 | +On Windows, you can use the [OSFMount](https://www.osforensics.com/tools/mount-disk-images.html) tool. |
| 209 | + |
| 210 | + |
151 | 211 | Host Filesystem Interface |
152 | 212 | ------------------------- |
153 | 213 |
|
154 | | -If the system ROM contains any version of the KERNAL, the LOAD (`$FFD5`) and SAVE (`$FFD8`) KERNAL calls are intercepted by the emulator if the device is 1 (which is the default). So the BASIC statements |
| 214 | +If the system ROM contains any version of the KERNAL, and there is no SD card image attached, the LOAD (`$FFD5`) and SAVE (`$FFD8`) KERNAL calls (and BASIC statements) are intercepted by the emulator for device 8 (the default). So the BASIC statements will target the host computer's local filesystem: |
155 | 215 |
|
156 | 216 | LOAD"$ |
157 | 217 | LOAD"FOO.PRG |
158 | | - LOAD"IMAGE.PRG",1,1 |
| 218 | + LOAD"IMAGE.PRG",8,1 |
159 | 219 | SAVE"BAR.PRG |
160 | 220 |
|
161 | | -will target the host computer's local filesystem. |
| 221 | +Note that this feature is very limited! Manually reading and writing files (e.g. `OPEN` in BASIC) is not supported by the host filesystem interface. Use SD card images for this. |
| 222 | + |
| 223 | +The emulator will interpret filenames relative to the directory it was started in. On macOS, when double-clicking the executable, this is the home directory. |
162 | 224 |
|
163 | | -The emulator will interpret filenames relative to the directory it was started in. Note that on macOS, when double-clicking the executable, this is the home directory. |
| 225 | +To avoid incompatibility problems between the PETSCII and ASCII encodings, you can |
164 | 226 |
|
165 | | -To avoid incompatibility problems between the PETSCII and ASCII encodings, use lower case filenames on the host side, and unshifted filenames on the X16 side. |
| 227 | +* use lower case filenames on the host side, and unshifted filenames on the X16 side. |
| 228 | +* use `Ctrl+O` to switch to the X16 to ISO mode for ASCII compatibility. |
| 229 | +* use `Ctrl+N` to switch to the upper/lower character set for a workaround. |
166 | 230 |
|
167 | 231 |
|
168 | 232 | Dealing with BASIC Programs |
@@ -214,63 +278,53 @@ When `-debug` is selected the STP instruction (opcode $DB) will break into the d |
214 | 278 | Effectively keyboard routines only work when the debugger is running normally. Single stepping through keyboard code will not work at present. |
215 | 279 |
|
216 | 280 |
|
217 | | -Wiki |
218 | | ----- |
219 | | - |
220 | | -https://github.com/commanderx16/x16-emulator/wiki |
221 | | - |
| 281 | +Forum |
| 282 | +----- |
222 | 283 |
|
223 | | -Features |
224 | | --------- |
| 284 | +[https://www.commanderx16.com/forum/](https://www.commanderx16.com/forum/) |
225 | 285 |
|
226 | | -* CPU: Full 65C02 instruction set (improved "fake6502") |
227 | | -* VERA |
228 | | - * Mostly cycle exact emulation |
229 | | - * Supports almost all features: |
230 | | - * composer |
231 | | - * two layers |
232 | | - * sprites |
233 | | - * progressive/interlaced |
234 | | - * VSYNC and raster IRQ |
235 | | -* VIA |
236 | | - * ROM/RAM banking |
237 | | - * keyboard |
238 | | - * mouse |
239 | | - * gamepad |
240 | | - * SD card (SPI) |
241 | | -* Sound |
242 | | - * PCM |
243 | | - * PSG |
244 | | - * YM2151 |
245 | 286 |
|
246 | | -Missing Features |
247 | | ----------------- |
| 287 | +Wiki |
| 288 | +---- |
248 | 289 |
|
249 | | -* VERA |
250 | | - * Does not support the "CURRENT_FIELD" bit |
251 | | - * Does not support sprite collisions |
252 | | - * Interlaced modes (NTSC/RGB) don't render at the full horizontal fidelity |
253 | | -* VIA |
254 | | - * Does not support counters/timers/IRQs |
255 | | -* Sound |
256 | | - * No SAA support |
| 290 | +[https://github.com/commanderx16/x16-emulator/wiki](https://github.com/commanderx16/x16-emulator/wiki) |
257 | 291 |
|
258 | 292 |
|
259 | 293 | License |
260 | 294 | ------- |
261 | 295 |
|
262 | | -Copyright (c) 2019 Michael Steil <[email protected]>, [www.pagetable.com](https://www.pagetable.com/). |
| 296 | +Copyright (c) 2019 -2020 Michael Steil <[email protected]>, [www.pagetable.com](https://www.pagetable.com/), et al. |
263 | 297 | All rights reserved. License: 2-clause BSD |
264 | 298 |
|
265 | 299 |
|
266 | | -Known Issues |
267 | | ------------- |
| 300 | +Release Notes |
| 301 | +------------- |
268 | 302 |
|
269 | | -* Emulator: `LOAD"$` (and `LOAD"$",1`) will show host uppercase filenames as garbage. Use `Ctrl+N` to switch to the X16 upper/lower character set for a workaround. |
| 303 | +## Release 38 ("Kyoto") |
270 | 304 |
|
| 305 | +* CPU |
| 306 | + * added WAI, BBS, BBR, SMB, and RMB instructions [Stephen Horn] |
| 307 | +* VERA |
| 308 | + * VERA speed optimizations [Stephen Horn] |
| 309 | + * fixed raster line interrupt [Stephen Horn] |
| 310 | + * added sprite collision interrupt [Stephen Horn] |
| 311 | + * fixed sprite wrapping [Stephen Horn] |
| 312 | + * added VERA dump, fill commands to debugger [Stephen Horn] |
| 313 | + * fixed VRAM memory dump [Stephen Horn] |
| 314 | +* SD card |
| 315 | + * SD card write support |
| 316 | + * Ctrl+D/Cmd+D detaches/attaches SD card (for debugging) |
| 317 | + * improved/cleaned up SD card emulation [Frank van den Hoef] |
| 318 | + * SD card activity/error LED support |
| 319 | + * VERA-SPI: support Auto-TX mode |
| 320 | +* misc |
| 321 | + * added warp mode (Ctrl+'+'/Cmd+'+' to toggle, or `-warp`) |
| 322 | + * added '-version' shell option [Alice Trillian Osako] |
| 323 | + * new app icon [Stephen Horn] |
| 324 | + * expose 32 bit cycle counter (up to 500 sec) in emulator I/O area |
| 325 | + * zero page register display in debugger [Mike Allison] |
| 326 | + * Various WebAssembly improvements and fixes [Sebastian Voges] |
271 | 327 |
|
272 | | -Release Notes |
273 | | -------------- |
274 | 328 |
|
275 | 329 | ### Release 37 ("Geneva") |
276 | 330 |
|
|
0 commit comments