Mirror of CollapseOS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 5.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. # TI-84+
  2. The TI-84+ is a machine with many advantages, one being that it's very popular.
  3. It also has a lot of flash memory and RAM.
  4. Its builtin keyboard and screen, however, are hard to use, especially the
  5. screen. With a tiny font, the best we can get is a 24x10 console.
  6. There is, however, a built-in USB controller that might prove very handy.
  7. I haven't opened one up yet, but apparently, they have limited scavenging value
  8. because its z80 CPU is packaged in a TI-specific chip. Due to its sturdy design,
  9. and its ample RAM and flash, we could imagine it becoming a valuable piece of
  10. equipment if found intact.
  11. The best pre-collapse ressource about it is
  12. [WikiTI](http://wikiti.brandonw.net/index.php).
  13. As it is now, with its tiny screen and cumbersome keyboard, Collapse OS is
  14. not really usable on the TI-84+. One could imagine a scenario where one has a
  15. terminal and uses the TI-84+ through the link for its large amount of flash and
  16. RAM. But using it standalone? Nah, not even post-collapse.
  17. Therefore, this recipe is more of a "look, I run!" demo.
  18. ## Recipe
  19. This recipe gets the Collapse OS interpreter to run on the TI-84+, using its LCD
  20. screen as output and its builtin keyboard as input.
  21. ## Gathering parts
  22. * [zasm][zasm]
  23. * A TI-84+ (TI-83+ compatibility is being worked on. See issue #41)
  24. * A USB cable
  25. * [tilp][tilp]
  26. * [mktiupgrade][mktiupgrade]
  27. ## Build the ROM
  28. Running `make` will result in `os.rom` being created.
  29. ## Emulate
  30. Collapse OS has a builtin TI-84+ emulator using XCB for display in `emul/hw/ti`.
  31. You can invoke it with `make emul`.
  32. You will start with a blank screen, it's normal, you haven't pressed the "ON"
  33. key yet. This key is mapped to tilde (~) in the emulator. Once you press it, the
  34. Collapse OS prompt will appear. See `emul/hw/ti/README.md` for details.
  35. ## Upload to the calculator
  36. ### Background notes
  37. Getting software to run on it is a bit tricky because it needs to be signed
  38. with TI-issued private keys. Those keys have long been found and are included
  39. in `keys/`. With the help of the
  40. [mktiupgrade](https://github.com/KnightOS/mktiupgrade), an upgrade file can be
  41. prepared and then sent through the USB port with the help of
  42. [tilp](http://lpg.ticalc.org/prj_tilp/).
  43. That, however, requires a modern computing environment. As of now, there is no
  44. way of installing Collapse OS on a TI-8X+ calculator from another Collapse OS
  45. system.
  46. Because it is not on the roadmap to implement complex cryptography in Collapse
  47. OS, the plan is to build a series of pre-signed bootloader images. The
  48. bootloader would then receive data through either the Link jack or the USB port
  49. and write that to flash (I haven't verified that yet, but I hope that data
  50. written to flash this way isn't verified cryptographically by the calculator).
  51. As modern computing fades away, those pre-signed binaries would become opaque,
  52. but at least, would allow bootstrapping from post-modern computers.
  53. ### Instructions
  54. **WARNING: the instructions below will wipe all the contents of your calculator,
  55. including TI-OS.**
  56. To send your ROM to the calculator, you'll need two more tools:
  57. [mktiupgrade][mktiupgrade] and [tilp][tilp].
  58. Once you have them, you need to place your calculator in "bootloader mode",
  59. that is, in a mode where it's ready to receive a new binary from its USB cable.
  60. To do that you need to:
  61. 1. Shut down the calculator by removing one of the battery.
  62. 2. Hold the DEL key
  63. 3. But the battery back.
  64. 4. A "Waiting... Please install operating system now" message will appear.
  65. Once this is done, you can plug the USB cable in your computer and run
  66. `make send`. This will create an "upgrade file" with `mktiupgrade` and then
  67. push that upgrade file with `tilp`. `tilp` will prompt you at some point.
  68. Press "1" to continue.
  69. When this is done, you can press the ON button to see Collapse OS' prompt!
  70. ## Validation errors
  71. Sometimes, when uploading an upgrade file to your calculator, you'll get a
  72. validation error. You can always try again, but in my own experience, some
  73. specific binaries will simply always be refused by the calculator. Adding
  74. random `nop` or reordering lines (when it makes sense, of course) should fix
  75. the problem.
  76. I'm not sure whether it's a bug with the calculator or with `mktiupgrade`.
  77. ## Usage
  78. The shell works like a normal BASIC shell, but with very tight screen space.
  79. When pressing a "normal" key, it spits the symbol associated to it depending
  80. on the current mode. In normal mode, it spits the digit/symbol. In Alpha mode,
  81. it spits the letter. In Alpha+2nd, it spits the uppercase letter.
  82. Special keys are Alpha and 2nd. Pressing them toggles the associated mode.
  83. Alpha and 2nd mode don't persist for more than one character. After the
  84. character is spit, mode reset to normal.
  85. Pressing 2nd then Alpha will toggle the A-Lock mode, which is a persistent mode.
  86. The A-Lock mode makes Alpha enabled all the time. While A-Lock mode is enabled,
  87. you have to enable Alpha to spit a digit/symbol.
  88. Simultaneous keypresses have undefined behavior. One of the keys will be
  89. registered as pressed. Mode key don't work by simultaneously pressing them with
  90. a "normal" key. The presses must be sequential.
  91. Keys that aren't a digit, a letter, a symbol that is part of 7-bit ASCII or one
  92. of the two mode key have no effect.
  93. [zasm]: ../../tools/emul
  94. [mktiupgrade]: https://github.com/KnightOS/mktiupgrade
  95. [tilp]: http://lpg.ticalc.org/prj_tilp/