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.

emulate.md 1.0KB

5 vuotta sitten
5 vuotta sitten
5 vuotta sitten
5 vuotta sitten
5 vuotta sitten
5 vuotta sitten
5 vuotta sitten
1234567891011121314151617181920212223242526272829303132333435
  1. # Running Collapse OS on an emulator
  2. The quickest way to give Collapse OS a whirl is to use `tools/emul` which is
  3. built around [libz80][libz80]. Everything is set up, you just have to run
  4. `make`, then `shell/shell`.
  5. To emulate something at a lower level, I recommend using Alan Cox's [RC2014
  6. emulator][rc2014-emul]. It runs Collapse OS fine but you have to write the
  7. glue code yourself. One caveat, also, is that it requires a ROM image bigger
  8. than 8K, so you have to pad the binary.
  9. A working Makefile for a project with a glue code being called `main.asm` could
  10. look like:
  11. TARGET = os.bin
  12. ZASM = ~/collapseos/tools/emul/zasm/zasm
  13. ROM = os.rom
  14. .PHONY: all
  15. all: $(ROM)
  16. $(TARGET): main.asm
  17. $(ZASM) < $< > $@
  18. $(ROM): $(TARGET)
  19. cp $< $@
  20. dd if=/dev/null of=$@ bs=1 count=1 seek=8192
  21. .PHONY: run
  22. run: $(ROM)
  23. ~/RC2014/rc2014 -r $(ROM)
  24. `CTRL+\` stops the emulation.
  25. [libz80]: https://github.com/ggambetta/libz80
  26. [rc2014-emul]: https://github.com/EtchedPixels/RC2014