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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # Z80-MBC2
  2. The [Z80-MBC2][link] combines a Z80 and an ATMEGA32A to provide a CP/m capable
  3. computing environment. It features a SD card bootloader which makes running
  4. Collapse OS on it rather simple.
  5. ## Recipe
  6. In this recipe, we're going to run Collapse OS on the Z80-MBC2, interfacing
  7. through its serial port. We're going to use the MBC's API to implement BLK on
  8. the SD card.
  9. ### Gathering parts
  10. * A Z80-MBC2 computer with its SD card module and a properly flashed "IOS" on
  11. the ATMega32A.
  12. * A FTDI-to-TTL cable to connect to the serial port.
  13. ### Building the binary
  14. Running `make` will yield `os.bin` which is what we want.
  15. ### Running on the Z80-MBC2
  16. Mount the SD card on your modern computer and copy `os.bin` as `autoboot.bin`,
  17. overwriting the binary that was previously there.
  18. We also have to copy the blkfs over. This is done by using IOS' drive system.
  19. Each `DSxNyy.DSK` file on the card is a drive, each drive has 512 track of 32
  20. sectors of 512 bytes, so one drive is plenty for our needs. Collapse OS
  21. hardcodes drive 0.
  22. Each drive is part of a set. IOS theoretically supports up to 10 sets, but the
  23. binary shipped by default only accepts 4. You have to overwrite an existing set.
  24. I used set 3. So, copy `blkfs` to file `DS3N00.DSK`. If you want, you can change
  25. the name of the set by changing the contents of `DS3NAM.DAT`.
  26. Put back the SD card in the Z80-MBC2 and power it up by connecting the FTDI
  27. adapter to it (red: VCC, black: GND, green: TX, white: RX).
  28. The FTDI adapter will show up as something like `ttyUSB0` (or `ttyU0` on
  29. OpenBSD). Connect to it with `screen` or `cu` or whatever you like. Baud rate of
  30. the Z80-MBC2 appears to be hardcoded to 115200.
  31. Then, enable IOS program selection by holding RESET and USER at the same time,
  32. wait 2 seconds, releasing RESET, wait 2 seconds, releasing USER. You should then
  33. be given a 1-8 choice.
  34. You begin by selecting the proper disk set, which is through choice 8, then you
  35. select the Autoboot binary through choice 4.
  36. You are now in Collapse OS.
  37. [link]: https://hackaday.io/project/159973-z80-mbc2-a-4-ics-homebrew-z80-computer