My fork also includes a “cleanup” through adding a .gitignore, so it appears there is a lot of things but in the end it is not that much.
As said, I wanted to start working on adding sound, and modularizing the code a bit more. For example, my fork still compiles the hdmi code although it is not used at all with the PicoCalc.
Not sure I will have much time, but feel free to check and enhance it !
I’m getting a build error – any idea about this? I’ve got the pico-sdk directory linked to where I have mine, but I didn’t find this header file anywhere. Something is probably weird with my environment.
[ 22%] Building CXX object CMakeFiles/pico64.dir/display/hdmi_framebuffer.cpp.o
/home/cpi/picocalc/PicoCalc-MCUME-pico2/MCUME_pico2/display/hdmi_framebuffer.cpp:39:10: fatal error: hardware/structs/hstx_ctrl.h: No such file or directory
39 | #include "hardware/structs/hstx_ctrl.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Ah, thanks! The command line parameters were the issue. I usually end up putting them into the CMakeLists.txt and didn’t notice they weren’t being set. I’m using SDK 2.2.0.
The build got farther now but still failed here. I checked and my pico_sdk is clean.
/home/cpi/pico/pico-sdk/src/rp2_common/pico_stdio_usb/stdio_usb.c:306:1: error: unknown type name 'bool'
306 | bool stdio_usb_init(void) {
| ^~~~
/home/cpi/pico/pico-sdk/src/rp2_common/pico_stdio_usb/stdio_usb.c:1:1: note: 'bool' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?
+++ |+#include <stdbool.h>
1 | /**
/home/cpi/pico/pico-sdk/src/rp2_common/pico_stdio_usb/stdio_usb.c: In function 'stdio_usb_init':
/home/cpi/pico/pico-sdk/src/rp2_common/pico_stdio_usb/stdio_usb.c:307:12: error: 'false' undeclared (first use in this function)
307 | return false;
| ^~~~~
/home/cpi/pico/pico-sdk/src/rp2_common/pico_stdio_usb/stdio_usb.c:307:12: note: 'false' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?
/home/cpi/pico/pico-sdk/src/rp2_common/pico_stdio_usb/stdio_usb.c:307:12: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [CMakeFiles/pico64.dir/build.make:1200: CMakeFiles/pico64.dir/home/cpi/pico/pico-sdk/src/rp2_common/pico_stdio_usb/stdio_usb.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1910: CMakeFiles/pico64.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
EDIT:
Not sure why I had to do it since the SDK was untouched, but when I added the missing include to stdio_usb.c, that fixed the error. I also encountered a link error with tinyusb, but since it didn’t seem like it was being used for anything anyway, I just commented it out from the linker lines in the CMakeLists.txt and then I could build the project. It runs under the uf2loader. Only one prg I tried worked, but Bruce Lee seems to be full speed, at least in the attract mode. I couldn’t start the game since the function keys weren’t mapped. Pretty cool though! (Also, this only worked when typing LOAD after choosing the file at start. I originally tried LOAD"*",8,1 but that just glitched out the display.)
For the <stdbool.h> error I also got sth similar once. I looked a while but finally rm’d my build directory and started again and it worked like a charm …
And yes, the emulator itself is pretty rough, I only tested some demos and got about 80% running. That is correct you have to use LOAD, then RUN (there is no iec emulated device on the thing, the prg is pushed to memory.