MEMU (not only) on Pico

Everything about Andy Key's great Emulator MEMU
User avatar
TheCorfiot
Posts: 15
Joined: 25 Mar 2013 01:56
Location: Wales, UK

Re: MEMU (not only) on Pico

Post by TheCorfiot »

Hi Everyone

I have followed the step by step instructions to build the pi pico memu file
I'm using a raspberry pi4 with all updates but I'm getting this error during the make process..

Would be cool to get the pico running as a memotech, can anyone pls help

Happy New year all
Attachments
20221231_204406.jpg
20221231_204406.jpg (4.33 MiB) Viewed 11312 times
Bill B
Posts: 599
Joined: 26 Jan 2014 16:31

Re: MEMU (not only) on Pico

Post by Bill B »

The problem was caused by a new release of the Pico SDK.

Earlier SDK releases have included incompatible changes to the TinyUSB API needed to drive the keyboard. My code therefore includes a check on the SDK version number.

The v1.4 SDK release does not appear to have introduced any changes in the USB API compared to v1.3, but I still needed to include a test for the new version number. I have actually switched to directly testing the TUSB version rather than the Pico SDK version.

There were also a couple of other code changes introduced for other versions of MEMU which were breaking the Pico build. I have now fixed these.

You should now be able to do:

Code: Select all

cd pico/MEMU/build-pico
git pull
make
and successfully build the MEMU.uf2 file.

I have not yet got around to testing the new build on a Pico. If you find any issues post the details here.
User avatar
TheCorfiot
Posts: 15
Joined: 25 Mar 2013 01:56
Location: Wales, UK

Re: MEMU (not only) on Pico

Post by TheCorfiot »

Bill you are awesome
Will let you know

Happy New Year
User avatar
TheCorfiot
Posts: 15
Joined: 25 Mar 2013 01:56
Location: Wales, UK

Re: MEMU (not only) on Pico

Post by TheCorfiot »

Compiled perfectly...

Pi pico boots up keyboard works too.

Question, does the sd card support fat 32 sdhc cards or just fat16 <2GB cards.

I'm using a 32GB card and when I try to select a tape file it crashes with,

Memu: not found
Terminate: Fatal: not found.

Thanks again

Do I need to apply headers and jumpers for the gpio next to the sd socket ?
Bill B
Posts: 599
Joined: 26 Jan 2014 16:31

Re: MEMU (not only) on Pico

Post by Bill B »

SDHC cards are supported.

On my VGA demo board I have installed the headers and cut the tracks joining GPIO20 to SD_DAT1 and GPIO21 to SD_DAT2. Cutting these tracks makes GPIO20 & GPIO21 available for serial I/O. See section 3.3.1 of https://datasheets.raspberrypi.com/rp20 ... rp2040.pdf.

The MEMU code uses SPI mode to access the SD card and does not use DAT1 & DAT2. I cannot remember off-hand whether MEMU makes use of serial by default. If it does and the tracks are not cut, this will probably interfere with SD card access.

I will have a look later.
Bill B
Posts: 599
Joined: 26 Jan 2014 16:31

Re: MEMU (not only) on Pico

Post by Bill B »

On investigation, I found two issues that were probably contributing to the problem with loading tape files:
  • As I rather thought, the Pico code was writing diagnostics to the serial port. I have now hopefully removed all such diagnostics from the default build.
  • The "memu.cfg" file contains path names with a prefix specifying which folder they are relative to. The Pico version of MEMU was not recognising these prefixes. Now hopefully fixed.
You will need to do another:

Code: Select all

cd pico/MEMU/build-pico
git pull
make
Again, I have not yet had time to test on a Pico.
User avatar
TheCorfiot
Posts: 15
Joined: 25 Mar 2013 01:56
Location: Wales, UK

Re: MEMU (not only) on Pico

Post by TheCorfiot »

Will recompile in the morning and let you know.

Thank you :)
User avatar
TheCorfiot
Posts: 15
Joined: 25 Mar 2013 01:56
Location: Wales, UK

Re: MEMU (not only) on Pico

Post by TheCorfiot »

Sadly it terminates with the same errors when you try to change tape or floppy.

Seems to see the sd card and read write to it as it remembers options and loads the rom files at boot.

There are some errors, not fatal, generated during the 'makes

And to keep things consistent i cut the 2 tracks and soldered in headers with jumpers to test with and without jumpers.

Thanks :)
Bill B
Posts: 599
Joined: 26 Jan 2014 16:31

Re: MEMU (not only) on Pico

Post by Bill B »

I have now done some testing on a Pico.

The issue was the path name prefix. My previous revision failed to define a necessary macro :oops:

You will need to get the latest updates and do another build.

That particular problem should now be fixed. Let me know if you find any other issues.
User avatar
TheCorfiot
Posts: 15
Joined: 25 Mar 2013 01:56
Location: Wales, UK

Re: MEMU (not only) on Pico

Post by TheCorfiot »

Thank you again..

Looking forward to really using it now :)
Post Reply