Mirror of CollapseOS
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

5 年前
5 年前
5 年前
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # Z80 emulation
  2. This folder contains a couple of tools running under the [libz80][libz80]
  3. emulator.
  4. ## Requirements
  5. You need `curses` to build the `forth` executable.
  6. For `sms` and `ti84` emulators, you need XCB and pkg-config.
  7. ## Build
  8. Running `make` builds all targets described below
  9. ## Vanilla Forth
  10. The `./forth` executable here works like the one in `/cvm`, except that it runs
  11. under an emulated z80 machine instead of running natively. Refer to
  12. `/cvm/README.md` for details.
  13. `./forth` doesn't try to emulate real hardware
  14. because the goal here is to facilitate "high level" development.
  15. These apps run on imaginary hardware and use many cheats to simplify I/Os.
  16. ## RC2014 emulation
  17. This emulates a RC2014 classic with 8K of ROM, 32K of RAM and an ACIA hooked to
  18. stdin/stdout.
  19. Run `./rc2014 /path/to/rom` (for example, `os.bin` from RC2014's recipe).
  20. Serial I/O is hooked to stdin/stdout. `CTRL+D` to quit.
  21. You can press `CTRL+E` to dump the whole 64K of memory into `memdump`.
  22. Options:
  23. * `-s` replaces the ACIA with a Zilog SIO.
  24. * `-e` puts a 8K AT28 EEPROM at address `0x2000`.
  25. * `-c/path/to/image` hooks up a SD card with specified contents.
  26. ## Sega Master System emulator
  27. This emulates a Sega Master system with a monochrome screen and a Genesis pad
  28. hooked to port A.
  29. Launch the emulator with `./sms /path/to/rom` (you can use the binary from the
  30. `sms` recipe.
  31. This will show a window with the screen's content on it. The mappings to the
  32. pad are:
  33. * W --> Up
  34. * A --> Left
  35. * S --> Down
  36. * D --> Right
  37. * H --> A
  38. * J --> B
  39. * K --> C
  40. * L --> Start
  41. If your ROM is configured with PS/2 keyboard input, run this emulator with the
  42. `-k` flag to replace SMS pad emulation with keyboard emulation.
  43. The `-c` option connects a SD card in the same way as the RC2014 emulator.
  44. In both cases (pad or keyboard), only port A emulation is supported.
  45. Press ESC to quit.
  46. ## TI-84
  47. This emulates a TI-84+ with its screen and keyboard. This is suitable for
  48. running the `ti84` recipe.
  49. Launch the emulator with `./ti84 /path/to/rom` (you can use the binary from the
  50. `ti84` recipe. Use the small one, not the one having been filled to 1MB).
  51. This will show a window with the LCD screen's content on it. Most applications,
  52. upon boot, halt after initialization and stay halted until the ON key is
  53. pressed. The ON key is mapped to the tilde (~) key.
  54. Press ESC to quit.
  55. As for the rest of the mappings, they map at the key level. For example, the 'Y'
  56. key maps to '1' (which yields 'y' when in alpha mode). Therefore, '1' and 'Y'
  57. map to the same calculator key. Backspace maps to DEL.
  58. Left Shift maps to 2nd. Left Ctrl maps to Alpha.
  59. [libz80]: https://github.com/ggambetta/libz80