fruit-bat / pico-zxspectrum

ZX Spectrum for Raspberry Pico Pi RP2040
474 stars 52 forks source link

Pico2 RP2350 SDK2.0 TinyUSB17.0 #179

Open javavi opened 5 days ago

javavi commented 5 days ago

Now users are starting to see the new Pico2 on the RP2350 chip.

Is it possible to organize the code here so as to also get the firmware for the ZX-Spectrum emulator for the new Pico2?

fruit-bat commented 4 days ago

Yup, in theory everything should build for the 2350 already, but I am currently looking at moving some of my changes I made in TinyUSB into a separate library... which should make tracking changes to TinyUSB easier and allow version 17 to be used.

Do you think we need pre-built firmware for the RP2350? I kind of assumed until Raspberry PI promise to fix the pads (which seems unlikely as they seem to be implying it is all just fine, when clearly it is not) it was not really worth investing too much time in.

javavi commented 4 days ago

Do you think we need pre-built firmware for the RP2350?

I think that the defect of the RP2350 chip does not affect us much, but those advantages are very attractive. In the Murmulator user community, many have already purchased the new Pico2 to try. Yes, rebuilt projects on the new Pico 2 are already appearing, especially those that lacked resources, such as the Sega MegaDrive 2 emulator, etc., are winning.

javavi commented 4 days ago

VSCode extension Seamlessly switch between different versions of the Pico SDK and tools. https://marketplace.visualstudio.com/items?itemName=raspberry-pi.raspberry-pi-pico

ikjordan commented 3 days ago

I'd agree that the RP2350 pad issue should not impact this project. I think all of the keyboard code uses pull-ups, which are not impacted, rather than pull-downs? The Olimex board testing I did with the RP2350 worked fine. In theory it is possible to build one uf2 that includes code for both MCU types and the boot loader then automatically picks the right one, but I've not tried that personally.

fruit-bat commented 3 days ago

A combined binary would be nice. I'll see if I can find out how to make one.

fruit-bat commented 3 days ago

I'd agree that the RP2350 pad issue should not impact this project. I think all of the keyboard code uses pull-ups, which are not impacted, rather than pull-downs? The Olimex board testing I did with the RP2350 worked fine. In theory it is possible to build one uf2 that includes code for both MCU types and the boot loader then automatically picks the right one, but I've not tried that personally.

I've tried just concatenating the uf2 files from the RP2040 & RP2350 builds, the result of which seems to work fine on both boards!

ikjordan commented 3 days ago

That's excellent! Something else I'll be able to "borrow" from this project in the future ;-)

fruit-bat commented 3 days ago

@javavi here are some combined builds...

ZX-MURMULATOR.zip

javavi commented 3 days ago

@javavi here are some combined builds...

Yes, I work on both Pico1 and Pico2, but not all of them! ;) For example, it doesn't work ZX-MURMULATOR_VGA_PWM_AUDIO_720x576x50Hz.uf2 on Pico2, although it works on Pico1. On some firmware, when booting the Windows PC, it complains about the lack of memory, but then they work fine...

javavi commented 3 days ago

@fruit-bat How do you get such combined firmware files? Is it with the help of that extension for VSCode?

fruit-bat commented 3 days ago

How do you get such combined firmware files? Is it with the help of that extension for VSCode?

Used 'cat' command in Linux. Probably can do something similar with copy in windows.

fruit-bat commented 2 days ago

@javavi here are some combined builds...

Yes, I work on both Pico1 and Pico2, but not all of them! ;) For example, it doesn't work ZX-MURMULATOR_VGA_PWM_AUDIO_720x576x50Hz.uf2 on Pico2, although it works on Pico1. On some firmware, when booting the Windows PC, it complains about the lack of memory, but then they work fine...

Hmm, I wonder if it matters if the rp2040 binary comes first.

fruit-bat commented 2 days ago

Possible the 2350 builds don't all work! Here are just the plain 2350 builds...

ZX-MURMULATOR-2350.zip

javavi commented 2 days ago

Possible the 2350 builds don't all work! Here are just the plain 2350 builds...

So all these firmwares work on Pico 2 (RP2350) on Murmulator

fruit-bat commented 1 day ago

Thanks for testing them.... perhaps combining builds for pico 1 & pico 2 is not is not reliable.

I will keep look at improving the cmake system to make building sets of firmware easier.