4 ms·
Thanks for posting this! I'm the author of the project and I've seen it pop up here on HN a few times when searching but I haven't seen it make it the front pag
by polpo 3y ago
Thanks for posting this! I'm the author of the project and I've seen it pop up here on HN a few times when searching but I haven't seen it make it the front page until now.
It's been really fun pushing the limits of the RP2040 microcontroller and learning how to use its PIO capabilities has been eye opening. I've created PIO code to handle the ISA bus and interface with SPI-based PSRAM at higher speed than I could with the RP2040's built-in SPI peripheral.
- jmole 3y agoare the PIO blocks wide enough to handle an ISA bus? Or are you using a shift register or another port on the pico to interface with the bus? edit: looking at the schematic it looks like you have the address/data pins multiplexed on an 8-bit port: https://github.com/polpo/picogus/blob/main/hw/PicoGUS-schematic.pdf https://github.com/polpo/picogus/blob/main/hw/PicoGUS-schema... Curious if you did the HW design first, or SW design first, or how you came up with this particular solution.
- polpo 3y agoHardware design came first but the design did have to take into account some of the constraints of programming PIO. I had to make sure certain signals were on adjacent pins, since the range of pins you must set for in, out, set, or sideset pins in a PIO program must be contiguous. I did have to do another board spin when I realized an error I made with some of my pin orderings. I went for an 8-bit mux/demux to multiplex the 8 data pins and lower 8 bits of the address because I thought it'd be faster, but I do have to delay quite a bit in the PIO program while I wait for the mux to switch. Given the very high speed that you can feed serial data into a PIO, a couple of high speed shift registers might have worked just as well and would have saved on GPIO pins which are a very precious resource.
- ilyt 3y agoI think it is necessary purely because of relatively small amount of pins on rp2040
- npunt 3y agoThis is a really cool project! Is it possible to run a program in DOS to switch the sound card being emulated? I could see creating the ideal RX (Retro eXperience, you heard it here first) with .bat files for each different game/program with the desired sound settings.
- polpo 3y agoYes, to switch the card being emulated, you can flash new firmware images directly from DOS using the pgusinit.exe program that ships in the release package. It takes about 5 seconds to load the firmware and the new emulation is available to use right away without needing to reboot the machine. Longer-term, I'd like to have multiple cores available in one firmware image for the ability to instantly enable/disable them. All code runs from RAM instead of flash for speed, so that's a potential limitation on the number of cores that can be loaded simultaneously.
- bananaboy 3y agoThat is incredibly cool!
- Sophistifunk 3y agoFirstly: this is rad AF. Second, I'd love to see more details about putting a modern MC into an old bus in general, if you've got any pointers.
- deleted 3y ago[deleted]
- _Microft 3y agoThanks for making this!
- LaputanMachine 3y agoInteresting. What is the maximum SPI data rate you achieved with PIO?
- _Microft 3y ago"These chips have been tested as stable up to an RP2040 clock speed of 280MHz, creating an effecitve SPI clock speed of 140MHz.", [0] For SPI that should mean a data rate of 140MBit/s, right? [0] https://github.com/polpo/rp2040-psram https://github.com/polpo/rp2040-psram