ikjordan / picozx81

ZX81 emulator for Raspberry Pi Pico
GNU General Public License v2.0
42 stars 2 forks source link

SD Card don’t work on Olimex Board #32

Closed galluslongus closed 3 weeks ago

galluslongus commented 6 months ago

Hi, I bought a Olimex board and flashing went well. I do have the zx81 screen but can’t access the sd-card. I tried different ones, no success. Are there different boards outside?

ikjordan commented 6 months ago

Hi, Thanks for raising this: 1) What version and size of SD Card are you using please? 2) When you press F2 to access the SD Card, do you get the message "SD Card Not detected Press New Line to Continue"?

If you have the zx81 screen it sounds like you have a supported board. I'd suggest trying the Olimex SD Card example to see if that uf2 can read and write to the SD Card: Olimex example code Pre-built binary

galluslongus commented 6 months ago

Hi, thanks for quick replay...

im using a 16 and a 32 GB Card, formated with fat32 and also a small amount with 512 MB with fat16, no success. Yes, F2 shows the message "SD Card Not detected Press New Line to Continue". I can access al F Keys and also can typ in a Basic Program. Its all working accept the SD Card.

Thanks for the Links, ill test this out.

galluslongus commented 6 months ago

so, i checked the pre configured files. DVI shows a Picture with paralax scrolling but SD doesnt do anything. Maybe i have to order a new one just for testing.

ikjordan commented 6 months ago

You have tried several SD Cards with the Olimex demo code. Therefore I think you are entitled to return the board as defective. I do know several people with Olimex boards who have used the SD Card successfully, so it sounds like your board may have a manufacturing fault.

galluslongus commented 6 months ago

Yeah, I have probed all sd card pins and they should be fine, I don't know. I just ordered a new one, will arrive on Friday, so I need to wait. I will let you know, thanks so far...

galluslongus commented 5 months ago

IMG_7126 Heyho, Unbelievable but true, there was a little solder Bridge at the Pico Board wich shorted two Pins on the Microcontroller. I got my new ordered OLIMEX Board today and had the same behavior like with the other one, so i checkt both Bords again with probing and inspecting with a magnifying glass and by accident i saw the mistake at the Pico board. I swapped them and Hurray, i was able to see the SD-Card. So, everything works fine now...time to Build the Original Keyboard and put it all in a printed ZX80 Case. The reason why i make it. Thanks for your Support

ikjordan commented 5 months ago

Wow, I would not have suspected that - good spot! I'd be very interested to see pictures of the keyboard and ZX80 case.

galluslongus commented 5 months ago

IMG_7129 IMG_7132 IMG_7131 Here we go... The assembled one is a WILCO2009 ZX80 Clone with ZX80 and ZX81 Rom. The other one is in Progress for a second WILCO and another one will be for the PICO ZX81

I wanna go with the ZX81 to USB thing from your GitHub Page to attach the microswitch ZX81 Keyboard to the PicoZX81

ikjordan commented 5 months ago

They look excellent!

galluslongus commented 5 months ago

Thank you. Do you mind to help me by installing the ZX81 KBD to USB? I cant get it to run. A step by step Tutorial would be nice, just a short one... Im be able to install the CircuitPython on the Pico and thats it. I dont understand the following steps

What i tried: installing CircuitPython onto the pico Reboot pico Copied adafruit_matrixkeypad.mpy into Lib Folder on Pico Copied boot.py and code.py from your GitHub to the Root of the Pico Restart... My Mac and also Windwos in a VM recognizing a HID Keyboard but no input is showing up, no Key presses sowing up. Is there a point/step i am missing?

ikjordan commented 5 months ago

If the Mac and Windows VM is identifying a keyboard then it sound like the keyboard code is running correctly. Have you used the 5 and 8 way molex connectors to connect the keyboard? The output from the connectors need to be connected to the Pico GPIO pins. The 5 way connector goes to GP 0 to 4. The 8 way connector goes to GP 5 to12. You can check that there is some connection by using a male to male jumper across the connectors to short together one row and column. Can you provide a picture of the keyboard wiring please?

galluslongus commented 5 months ago

i soldered the microswitch zx81 keyboard to the pico like - 5 pins to gpio 0 to 4 and the 8 pin to gpio 5 to 12. i also tried just a wire to short row and column. and i checked different picos, hehe adafruit_matrixkeypad.mpy in lib folder and boot.py and code.py in the root folder, right?

In the MU Editor it shows an error: Datei "", Zeile 5, in ImportError: Kein Modul mit dem Namen 'adafruit_hid'

No Modul 'adafruit_hid' found

and thats Line 5: from adafruit_hid.keyboard import Keyboard

ikjordan commented 5 months ago

It looks like adafruit may have changed the link I originally gave, which makes things a bit difficult to follow.

Inside the lib directory you need to have copied the directory containing the adafruit_hid library as well as the adafruit_matrixkeypad.mpy file.

Instructions for how to get the adafruit_hid library are now here

galluslongus commented 5 months ago

I now have keys, awesome, but a wrong order. Soldering from left to right from keyboard to gpio0 to gpio12 ?

ikjordan commented 5 months ago

It's probably easier to just edit the contents of lines 14 and 15 in code.py, rather than resolder. The fix will probably be to either reverse the order of the pins in line 14, or line 15, or both :-)

galluslongus commented 5 months ago

Its working now, had to resolder some lines. But now i need to sleep, have to get up in 5 hours. I dont have time till tuesday to figure it out in the code. Ill keep you informed...

heres the right order: row_pins=(board.GP5, board.GP6, board.GP7, board.GP9, board.GP10, board.GP8, board.GP11, board.GP12),

now its 1 by 1, left to right, gpio0 to gpio12

ikjordan commented 5 months ago

I'm glad it is now working.

My apologies. I opened up my keyboard today and saw that I'd adjusted the wiring order, so that the program could use consecutive row pins. I've now rewired my keyboard to be consecutive and changed the code.py file to match the order you give above. I've also updated the Readme for the project to add the extra info we found out during this exercise:

  1. Installation of adafruit_hid library
  2. Diagram of directory structure on the Pico, showing all files required
  3. Image of case with wiring

Thanks for your help!

galluslongus commented 5 months ago

Yeah, the Readme looks good. Now, everyone should be able to install and assemble it easily. Thats a very cool project, thanks for sharing this with everyone. I will post some pictures when i finished my Pico ZX80/81. Cheers, Michael

ikjordan commented 5 months ago

If you have any more pictures, it would be great to see them :-)

galluslongus commented 5 months ago

I'll finish my zx80 this weekend and will post some more pictures.

galluslongus commented 5 months ago

IMG_7518 IMG_7522 IMG_7524 IMG_7534 IMG_7541 IMG_7542 IMG_7543 IMG_7548

galluslongus commented 5 months ago

Heres a few pictures of my ZX80/81 Clone fully working. Thank you one more time for sharing this project.

ikjordan commented 5 months ago

The build looks brilliant!

Seeing pictures like that makes doing this project even more rewarding. Thank you for posting them. Are you ok for me to add some of the pictures to this project's Readme?

galluslongus commented 5 months ago

Of course, fell free... I have some more but didn't wanted to spam them here. Feel free to ask if you want more.

The case was 3D printed and painted with filler and sanded and painted again. The buttom one looks a bit rough, but I doesn't wanted to put to much work into it but the top looks pretty smooth. I was able to check a bunch of different programs, hires and also with sound and chroma, they all working flawless and as they should. I feel like a kid on Christmas. I bought a ZX81 Kit when I was a kid, so nice memories...

ikjordan commented 5 months ago

Thanks, I'll update the Readme when I make the next release. Feel free to add more pictures here ;-) The next step in the development is to add Chroma compatible vsync sound, and an option to have realistic load and save screens, with audio. Then we can (optionally) re-create the 5 to 10 minute cassette save and load times from when we were kids!

ikjordan commented 3 months ago

I've now made the next release. This release supports ZX80 hardware more accurately. It also allows selection of the 4K or 8K ZX80 ROM. Given that you have shown images of both 4K and 8K ROM ZX80s, I hope this is useful! Of course, you can still select ZX81, if you like a steady display :-)

galluslongus commented 3 months ago

That’s awesome, I’ll try it tomorrow coz I have a couple days off. I’ll also check if I find some more interesting pictures.

ikjordan commented 2 months ago

Hi - did you find any more pictures to share, or should we close this issue? Thanks