We need a USB Keyboard and mouse to NeXT NON ADB hardware ia soundcard solution

Started by Rob Blessin Black Hole, November 20, 2023, 02:12:04 AM

Previous topic - Next topic

ramalhais

Just wired this thing up again and remembered i never got around to try and convert the FPGA 3.3V signals to 5V for the NeXT  :o

Don't want to get hopes up, but i think it's somewhat working. I'm receiving signals from the NeXT setting left and right keyboard LEDs ON and then OFF

esp32-next-keyboard-log.PNG

20240104_002843.jpg

Edit:
Connections: NeXT -> level shifter -> FPGA -> ESP32 (emulating NeXT Keyboard)

ramalhais

I can now send keystrokes to the NeXT and move a USB mouse and a NeXT mouse.
At the moment, keyboard is a bit unreliable, sometimes keystrokes are lost.
Mouse movement is also a bit jumpy. I need to improve the mouse event handling.

So, this is what we should be able to do:
- Soundbox replacement with USB keyboard and USB mouse and NeXT mouse (no sound/mic at the moment, but code is present in the FPGA code)
- NeXT mouse to USB mouse converter
- USB mouse to NeXT mouse converter should be possible to implement aswell by reversing the code
- USB keyboard to NeXT keyboard converter (power ON does not work unless we have external power for the ESP32 or battery)
- NeXT keyboard to USB keyboard should be possible by reversing the code

While developing this, my ESP32S3 flash got locked, so it's bricked. I'm waiting for a new one to implement the USB keyboard part. Right now, i'm sending keystrokes via the serial on the ESP32.

FPGA code for soundbox is here:
https://github.com/ramalhais/code/tree/master/fpga/next_kms

Arduino ESP32 code for keyboard/mouse is here:
https://github.com/ramalhais/code/tree/master/arduino/esp32/next-keyboard-mouse-interrupts

20240215_021659.jpg

20240215_021720.jpg

20240215_021807.jpg

ramalhais

I got a new ESP32S3 yesterday and USB keyboard is working.
Code should compile for ESP32(no USB keyboard) and ESP32S3.
Need to fix the keyboard and mouse event handling, but it basically works, even power on/off while powered from USB.
Also made a schematic and mocked up a PCB.

schematic.png

pcb.png

gtnicol

Did you get the ASIC specification document I uploaded recently? That should help to get the FPGA side working...

ramalhais

Quote from: gtnicol on February 19, 2024, 01:34:01 PMDid you get the ASIC specification document I uploaded recently? That should help to get the FPGA side working...

Yes, it was very helpful, thanks for that!
I guess that from the schematics in the document, someone with patience could be able to implement a complete copy of the ASIC using either just logic gates or implement the logic on an FPGA, assuming the schematics are correct.

gtnicol

Quote from: ramalhais on February 19, 2024, 03:55:27 PMYes, it was very helpful, thanks for that!
I guess that from the schematics in the document, someone with patience could be able to implement a complete copy of the ASIC using either just logic gates or implement the logic on an FPGA, assuming the schematics are correct.

Well, it is the official document, so I'd *hope* that it's correct!