@@ -13,6 +13,87 @@ Uses [Wren's Amazing PicoDVI](https://github.com/Wren6991/PicoDVI) library.
1313## First light
1414<img src =" docs/zxspectrum_screen_1.jpg " width =" 400 " />
1515
16+ ## Prototype
17+ <img src =" docs/pico_sorcerer_prototype_1.jpg " width =" 400 " />
18+
19+ ## Wiring
20+
21+ | | SPI0 | GPIO | Pin | SPI | MicroSD 0 | HDMI/DVI | Description |
22+ | ----- | ---- | ----- | --- | -------- | --------- | --------- | ---------------------- |
23+ | MISO | RX | 4 | 6 | DO | DO | | Master In, Slave Out |
24+ | CS0 | CSn | 5 | 7 | SS or CS | CS | | Slave (or Chip) Select |
25+ | SCK | SCK | 2 | 4 | SCLK | CLK | | SPI clock |
26+ | MOSI | TX | 3 | 5 | DI | DI | | Master Out, Slave In |
27+ | CD | | 22 | 29 | | CD | | Card Detect |
28+ | GND | | | 3 | | GND | | Ground |
29+ | 3v3 | | | 36 | | 3v3 | | 3.3 volt power |
30+ | GND | | | 18,23 | | | GND | Ground |
31+ | GP16 | | 16 | 21 | | | TX2+ | Data channel 2+ |
32+ | GP17 | | 17 | 22 | | | TX2- | Data channel 2- |
33+ | GP18 | | 18 | 24 | | | TX1+ | Data channel 1+ |
34+ | GP19 | | 19 | 25 | | | TX1- | Data channel 1- |
35+ | GP12 | | 12 | 16 | | | TX0+ | Data channel 0+ |
36+ | GP13 | | 13 | 17 | | | TX0- | Data channel 0- |
37+ | GP14 | | 14 | 19 | | | TXC+ | Clock + |
38+ | GP15 | | 15 | 20 | | | TXC- | Clock - |
39+
40+ ![ image] ( https://www.raspberrypi.org/documentation/microcontrollers/images/Pico-R3-SDK11-Pinout.svg " Pinout ")
41+
42+ ## Components
43+ <a href =" https://shop.pimoroni.com/products/raspberry-pi-pico " >
44+ <img src =" https://cdn.shopify.com/s/files/1/0174/1800/products/P1043509-smol_1024x1024.jpg " width =" 200 " />
45+ </a >
46+
47+ <a href =" https://buyzero.de/products/raspberry-pi-pico-dvi-sock-videoausgabe-fur-den-pico " >
48+ <img src =" https://cdn.shopify.com/s/files/1/1560/1473/products/Raspberry-Pi-Pico-Video-Output-DVI-Sock-topview_1200x.jpg " width =" 200 " />
49+ </a >
50+
51+ <a href =" https://thepihut.com/products/adafruit-dvi-breakout-board-for-hdmi-source-devices " >
52+ <img src =" https://cdn.shopify.com/s/files/1/0176/3274/products/67e1a982-7668-48e2-acaf-df9de6f6e6fe_600x.jpg " width =" 200 " />
53+ </a >
54+
55+ <a href =" https://thepihut.com/products/adafruit-micro-sd-spi-or-sdio-card-breakout-board-3v-only " >
56+ <img src =" https://cdn.shopify.com/s/files/1/0176/3274/products/4682-01_dcdcf68d-19aa-4deb-b758-471e8e7baf62_600x.jpg " width =" 200 " />
57+ </a >
58+
59+ ## Issues
60+ USB host mode required for keyboard input still seems to need a [ patch to the Pico SDK] ( https://github.com/raspberrypi/tinyusb/pull/7/files ) version of TinyUSB. The patch seems to work very reliably unless the keyboard is removed and reconnected, which causes the Pico to 'panic'.
61+
62+ ## Build
63+ Fistly patch up the TinyUSB library for USB host mode, as described [ here] ( https://github.com/raspberrypi/tinyusb/pull/7/files ) .
64+
65+ This code needs to be cloned into the 'apps' folder of the [ PicoDVI] ( https://github.com/Wren6991/PicoDVI ) library.
66+ ```
67+ cd PicoDVI/software/apps
68+ git@github.com:fruit-bat/pico-zxspectrum.git zxspectrum
69+ ```
70+
71+ In the 'apps' folder add the following line to CMakeLists.txt
72+ ```
73+ add_subdirectory(zxspectrum)
74+ ```
75+ In the build folder:
76+ ```
77+ cmake
78+ make -j4 ZxSpectrum
79+ cp apps/zxspectrum/ZxSpectrum.uf2 /media/pi/RPI-RP2/
80+ ```
81+
82+ ## Special keys
83+
84+ | Key | Action |
85+ | --- | ------ |
86+ | F4 | Toggle Z80 4Mhz moderator |
87+ | F11 + F12 | Reset |
88+
89+ ## Missing features
90+ * Write 'tape' format
91+ * Read/Write WAV files
92+ * Audio input
93+ * Audio Output
94+ * Centronics interface
95+ * Serial interface (Uart 0 is currently used for debug)
96+
1697# References
1798[ Wren's Amazing PicoDVI] ( https://github.com/Wren6991/PicoDVI ) <br />
1899http://www.breakintoprogram.co.uk/computers/zx-spectrum/screen-memory-layout <br />
0 commit comments