ZX Spectrum Next 在互联网上:Xberry Pi ESP01 和 Pi Zero 升级
ZX Spectrum Next on the Internet: Xberry Pi ESP01 and Pi Zero Upgrades

原始链接: https://retrogamecoders.com/zx-spectrum-next-on-the-internet-xberry-pi-esp01-and-pi-zero-upgrades/

## ZX Spectrum Next 升级挑战 本文详细介绍了作者向其 Xberry Pi ZX Spectrum Next 添加 Pi Zero 加速器和 WiFi 的经验。尽管社区对特定板本发出了警告,但 Pi Zero 升级出乎意料地顺利。而 WiFi 设置却令人沮丧。 目标是使用现成的 ESP8266 模块添加 WiFi。尽管 YouTube 上有看似简单的教程,但由于缺乏关于固件、波特率和连接细节的清晰文档,整个过程受阻。安装“驱动程序”的尝试多次失败,ESP Updater 也未提供任何有用的反馈。 令人惊讶的是,成功的关键*不是*更新 ESP8266 固件。一个以前未刷机的模块立即工作,通过 UART 通信(提供了 16 号和 17 号引脚的代码)。即便如此,建立稳定的 WiFi 连接也需要坚持不懈。 最终,作者实现了 WiFi 连接,但建议 Pi Zero W 或 ESP32 可能会提供更简单的方案。尽管存在障碍,他们现在正享受着完全升级的 ZX Spectrum Next 体验。

黑客新闻 新 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 ZX Spectrum Next 在互联网上:Xberry Pi ESP01 和 Pi Zero 升级 (retrogamecoders.com) 61 分,ibobev 发表于 1 天前 | 隐藏 | 过去 | 收藏 | 讨论 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系方式 搜索:
相关文章

原文

Getting my ZX Spectrum Next onto Wifi and the Internet, plus Pi Zero Accelerator

I’m enjoying my Xberry Pi ZX Spectrum Next, but I have to say the ‘simple’ upgrade of getting it onto Wifi via the cheap and cheerful ESP 8266 was not fun.

While I had every intention of setting up my Speccy keyboard on the board’s matrix connector, I need to wait for a socket of the correct pitch. It turns out the Xberry Pi needs 0.2mm spacing and I have none in my parts box. Instead I figured do the other main upgrades, namely add a Pi Zero “accelerator” and the Wifi upgrade.

ZX Next Pi Zero Accelerator Upgrade

Fully expecting the Pi Zero to be the thing that caused me trouble, I was shocked that not only my soldering had gone perfectly but also the flashing of the SD card.

So many community members had advised to use a highly specific Pi Zero, I thought my spare board would be wrong. But it worked first time!

My pin header made the soldering trickier than usual, maybe it soaked a lot of heat? Just remember the header needs to go on the ‘wrong’ side and take your time.

The Pi Zero upgrade is hardly used currently but the ZX Next team keep hinting at future utility, and at least one game is in development that uses it as a kind of math coprocessor.

So after running a TZX file and some SID tunes, I moved on to the ESP figuring I would have everything done quick as a flash. Pardon the pun.

Adding Wifi to the Next

The Next can come with Wifi already installed apparently, and some Xberry bundles come with one as standard, but the chosen module is an ESP 01 / 8266 which is something I have on hand.

There’s precious little documentation for this kind of thing out there, but I did find YouTube videos that made everything look very straightforward. That should have been the first red flag!

None of them showed installing the correct ESP firmware, what baud rate the Next expects, or even attaching the ESP.

I picked out a board I was confident was working fine, attached it, successfully ran the ESP Updater.

After it confirmed the update, I tried to connect to wifi using the built-in Next menu item …. and failure.

The fact the ESP Updater did its thing suggests also the board was fine therefore I tried and failed all the many ways to get the “driver” to install.

I quickly started to hate this “Installing Driver…” message. There is no indication if anything is happening when it gets stuck there for ages, but other times it quickly quits back to the menu, again with no feedback.

Spoiler alert: Even with everything now ‘working’, it often takes a lot more attempts than you would expect.

To save anyone else the bother I went through, and potentially Future Chris, the key was to NOT update the ESP 01 firmware. Just use whatever your board came with by default. My working firmware is not even listed on the ESP Updater repo …

I rummaged around and found another ESP board that had never had its firmware flashed. Using a breadboard I confirmed it was working and responding to AT commands.

CircuitPython Code to Communicate with ESP01 via UART

import board,binascii
import adafruit_pio_uart
# Define the UART pins (example using GP16 for TX and GP17 for RX)
# The actual pins depend on your specific wiring/board configuration.
UART_TX = board.GP16
UART_RX = board.GP17
# Initialize the UART connection
# The baudrate for the ESP01 is typically 115200
uart = adafruit_pio_uart.UART(UART_TX, UART_RX, baudrate=115200)

def send(s):
    uart.write(s+'\r\n')
    print(uart.read(255).decode())
send('AT+RST')
send('AT')
send('AT+GMR')

This code allows you to hook the ESP01 up to pins 16 and 17 for UART, and 3.3v and GND.

Wifi on the ZX Spectrum Next … Finally!

Again it didn’t work on the ZX Next right away, but I persisted and finally signs of life!

Conclusion

Hope this helps someone else out there! I found it incredibly frustrating but now I am back to having fun with my ZX Next experience rather than regretting my choices.

Seems life might have been easier if a Pi Zero W was used instead of a Pi and an ESP8266, or even an ESP32, but perhaps there is a good reason they went with the little old ESP01.

联系我们 contact @ memedata.com