Real Input and Output on the Pi emulation
-
- Posts: 28
- Joined: 23 Sep 2024 16:11
Re: Real Input and Output on the Pi emulation
Can I propose I get the code and test it ?.
Re: Real Input and Output on the Pi emulation
Go ahead. All feedback welcome.
-
- Posts: 28
- Joined: 23 Sep 2024 16:11
Re: Real Input and Output on the Pi emulation
I have compiled the source and it seems to be working. Running a longer test now with as base my loop test program. Now out and input is tested 65536 times
. I will run further tests tomorrow. Particular exit and reentering the MEMU simulator and switching on and off the Pi-Zero.

-
- Posts: 28
- Joined: 23 Sep 2024 16:11
Re: Real Input and Output on the Pi emulation
Today ran some further tests:
- Power on Pi , start memu run loop 0-255 loop program . Result : OK
- Close memu, start memu run loop 0-255 loop program. Result : OK
- Reboot Pi, start memu run loop 0-255 loop program . Result : OK
- Close memu, Start Memu run 255 x 0-255 loop program : Result OK.
If this works with the real simulator hardware I can only test in the museum because no schematics are available from the real I/O. But for now it looks promising with the current I2C code. If the I2C does not work we perhaps to have resort to real GPIO.
- Power on Pi , start memu run loop 0-255 loop program . Result : OK
- Close memu, start memu run loop 0-255 loop program. Result : OK
- Reboot Pi, start memu run loop 0-255 loop program . Result : OK
- Close memu, Start Memu run 255 x 0-255 loop program : Result OK.
If this works with the real simulator hardware I can only test in the museum because no schematics are available from the real I/O. But for now it looks promising with the current I2C code. If the I2C does not work we perhaps to have resort to real GPIO.
Re: Real Input and Output on the Pi emulation
Thanks for the feedback.
I will still try and run my own tests over the weekend: I2C, Kernel MCP23017 driver and RPi GPIO.
I will still try and run my own tests over the weekend: I2C, Kernel MCP23017 driver and RPi GPIO.
Re: Real Input and Output on the Pi emulation
My GPIO test setup (Apologies for poor photograph, the light was not good).
So the switches on the input pins should control the LEDs on the output pins.
With this I can confirm that using I2C to control MCP23017 GPIOs from MEMU is working.
However using the kernel driver and /dev/gpiochip* is not working. Further investigation required
And my test program:
Code: Select all
10 LET PL=0
20 LET P=INP(7)
30 IF P=PL THEN GOTO 20
40 OUT 7, P
50 PRINT P
60 LET PL=P
70 GOTO 20
With this I can confirm that using I2C to control MCP23017 GPIOs from MEMU is working.
However using the kernel driver and /dev/gpiochip* is not working. Further investigation required

-
- Posts: 28
- Joined: 23 Sep 2024 16:11
Re: Real Input and Output on the Pi emulation
Hi Bill,
It is very interesting to see that it works with two languages : Assembly and BASIC. I hope you also het the GPIO working just in case.
It is very interesting to see that it works with two languages : Assembly and BASIC. I hope you also het the GPIO working just in case.
Re: Real Input and Output on the Pi emulation
The issue with the GPIO interface has now been resolved and updated version pushed to GitHub.
-
- Posts: 28
- Joined: 23 Sep 2024 16:11
Re: Real Input and Output on the Pi emulation
Sorry for the delay but I had to visit the dentists
. Ran a partial test with the 65536 test program which is in my opinion OK. To test the GPIO I must build an extra print...

-
- Posts: 28
- Joined: 23 Sep 2024 16:11