EremusOne / ESPectrum

A ZX spectrum 48K, 128K and Pentagon 128 emulator running on the Espressif ESP32 SoC
https://zxespectrum.speccy.org
GNU General Public License v3.0
161 stars 21 forks source link

PS/2 to Joy shematics #48

Closed soviet9922 closed 2 weeks ago

soviet9922 commented 2 months ago

Hi looked in the code and documentation but can't find a schematic on how to connect the db9 joystick ports to the ps/2 mouse port.

Where i can find it ?

Gods69 commented 2 months ago

Hi, you must use ESPjoy interface from Antonio Villena. https://antoniovillena.com/product/espjoy/ . It simulate keyboard keys press. You also need the green USB to PS/2 adapter.

Piligrim-77 commented 2 months ago

Hi. I join the question, is there an ESPjoy interface diagram somewhere? I don't have the opportunity to buy (I'm in another country), but I could assemble it myself on a breadboard.

Gods69 commented 2 months ago

https://github.com/dacarsoft/DB9_2_Keyboard/tree/DB9_2_Keyboard_ESPectrum You can use a generic ATmega 32U4 boards like Arduino Pro Micro or Arduino Leonardo. Program it with Arduino IDE using "Arduino Leonardo" as board target. And see on the .ino source code the GPIO pins to connect to the DB9 socket.

Piligrim-77 commented 2 months ago

https://github.com/dacarsoft/DB9_2_Keyboard/tree/DB9_2_Keyboard_ESPectrum You can use a generic ATmega 32U4 boards like Arduino Pro Micro or Arduino Leonardo. Program it with Arduino IDE using "Arduino Leonardo" as board target. And see on the .ino source code the GPIO pins to connect to the DB9 socket.

Ok, thank you.

Gods69 commented 2 months ago

Also You must have to use a AVR programmer because you have to program the ATmega chip by this ISP pins.

soviet9922 commented 2 months ago

From the ino file this are the pins:

Bluepill ATmega 32U4 board pinout: Arduino 2 -> DB9 pin 1: Up Arduino 3 -> DB9 pin 2: Down Arduino 4 -> DB9 pin 3: Left Arduino 5 -> DB9 pin 4: Right Arduino + -> DB9 pin 5: VCC 5V Arduino 6 -> DB9 pin 6: A / Primary fire Arduino 7 -> DB9 pin 7: Selection signal (allows more buttons) Arduino - -> DB9 pin 8: GND Arduino 8 -> DB9 pin 9: SELECT / Secondary fire

But how you connect the bluepill to the vga32 ps/2 port what pins are used ?

Gods69 commented 2 months ago

On the ATmega32U4 compatible card you use the USB socket (micro-usb ?) with a standard USB cable. On the another end you use a little green USB<->PS/2 adapter https://share.temu.com/5SZx1jz1ZpA to the PS/2 ttgo vga32 socket. You must find +5V somewhere to power the 32U4 board.

soviet9922 commented 2 months ago

On the ATmega32U4 compatible card you use the USB socket (micro-usb ?) with a standard USB cable. On the another end you use a little green USB<->PS/2 adapter https://share.temu.com/5SZx1jz1ZpA to the PS/2 ttgo vga32 socket. You must find +5V somewhere to power the 32U4 board.

Got it, going to build this thanks !.

Gods69 commented 2 months ago

OK. Good luck. Don't forget to swap (uncomment) the define lines on the source code : #define AVILLENA_BOARD //#define BLUEPILL_BOARD 71WZ-QuDE5L _AC_SL1500_

Gods69 commented 2 months ago

ISP pinouts to program the chip. (you can use a Arduino UNO as AVR programmer) d2b0b6

Gods69 commented 1 month ago

I also have this issue. I think when i have changed to the right board type on the menu the error disappear.Sorry. I'm in Portugal, i can't help until my return.Le 1 mai 2024 20:33, soviet9922 @.***> a écrit : Having some issues compiling the C:\Users\soviet\Documents\Arduino\DB9_2_Keyboard\DB9_2_Keyboard.ino:86:2: error: 'KEY_UP_ARROW' was not declared in this scope {KEY_UP_ARROW, KEY_DOWN_ARROW, KEY_LEFT_ARROW, KEY_RIGHT_ARROW, KEY_RETURN, KEY_RIGHT_ALT, KEY_ESC, KEY_F12, 'z', 'y', 'x', 'm'},

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

EremusOne commented 1 month ago

Thanks all for taking your time for finding and posting this information.

When I have the time, I wish to start a wiki and put together this info and info about many other things.

Regards! ;)

Gods69 commented 1 month ago

Program it with Arduino IDE using "Arduino Leonardo" as board target. Somes warnings but compile or use the .HEX file: DB9_2_Keyboard_ESPectrum.zip

Gods69 commented 1 month ago

ESPjoy interface from Antonio Villena: IMG_20230921_111154050 IMG_20230921_111208911