VOGONS


Reply 101 of 157, by Volo

User metadata
Rank Newbie
Rank
Newbie

SITUATION REPORT
It’s been a month since I made a proper update.
The previous prototypes showed that if anything can go wrong – does. That thing even thrown me into a grave depression. At least the soldering service fella never let me down.

I’ve been playing for couple of weeks with this prototype:
f3NefQD.jpg

It seems to work! I am kind of surprised myself. Hopefully the depression is over.

Features added:
1. It fits in the bloody case!
2. You can change modes using keyboard (ScrLk: ON, Shift+(key 0-7), ScrLk: OFF).
3. You can alter default layout (START+SELECT+D-Pad, ScrLk, Set Keys, Tilde~ + SctLk).
4. Arduino Leonardo pin compatibility (the device was almost compatible from the start, had to change one pin). I won’t fuse the firmware – feel free to play with your own, though you’ll need a programmer to do it. The pins shall be as follows:
RHgnZNa.png

TO DO:
1. Change of pullup/pulldown logic really screwed the algorithms. I have to shoehorn device connection detection. Not 100% successful as of now.
2. Fuses are too easy to pop. Have to source self-healing ones somewhere.
3. When in USB mode, the thing crashes when pressing ScrLk. Dunno why. I think I’ll have re-write Scroll Lock detection from scratch.
4. No AT or PS/2 connector yet. Since nothing has changed with the pins, I hope it shall just work.
5. Acquiring a contractor to CNC the case for a budget.

P.S. Feel free to see the progression of the project when laid side-by-side:
6aP7snX.jpg

(UPD: updated pinout pic to include 100k resistors to avoid confusion)

Last edited by Volo on 2020-11-28, 19:49. Edited 1 time in total.

Feel free to join the wish list to Volo's Pad-to-PS/2 by writing me an e-mail:
3hUGsDI.png

Reply 104 of 157, by digger

User metadata
Rank Oldbie
Rank
Oldbie
Volo wrote on 2020-08-21, 11:14:

It seems to work! I am kind of surprised myself. Hopefully the depression is over.

I hope so too! 🤗 A project like this should be fun and challenging, not demotivating. And it should certainly not negatively affect your mental health.

Gradually, I'm sure you'll resolve the other remaining challenges as well. There's no reason to rush this! Allow yourself to both enjoy this and learn from it.

I admire your talent and perseverence! Think of all the enjoyment you will bring to people once this is ready. Good things take time.

Reply 105 of 157, by spark2k06

User metadata
Rank Newbie
Rank
Newbie

I already made a solution like this one called Joy2PS2 some time ago ... but maybe I didn't promote it enough:

33947051734_518f8a9cd3_z_d.jpg

https://github.com/spark2k06/zxuno/tree/master/joy2ps2

https://youtu.be/GII2eh_ROhA

https://www.youtube.com/results?search_query=joy2ps2

https://www.tindie.com/stores/spark2k06/
https://hackaday.io/spark2k06

Reply 106 of 157, by Volo

User metadata
Rank Newbie
Rank
Newbie
spark2k06 wrote on 2020-08-22, 11:45:
I already made a solution like this one called Joy2PS2 some time ago ... but maybe I didn't promote it enough: […]
Show full quote

I already made a solution like this one called Joy2PS2 some time ago ... but maybe I didn't promote it enough:

33947051734_518f8a9cd3_z_d.jpg

https://github.com/spark2k06/zxuno/tree/master/joy2ps2

https://youtu.be/GII2eh_ROhA

https://www.youtube.com/results?search_query=joy2ps2

Spark2k06, Were were you before?! Your thing is awesome! I never thought to look for a solution in ZX Spectrum scene! Why isn't it in your tindie shop? What happened to your website? Ah, the curiocity!

I've taken a bit more complex approach than you've done with your device: you are injecting key-codes into keyboard line to be heard by both host and device. I am not sure the keyboard (device) shall fully appreciate it (my keyboard is prone to freezing if it reads something weird). Furthermore I'm not sure that simultaneous use of gamepad and and keyboard shall not cause conflicts.
I pursue 100% in-spec design - hence the tedious "active pass-through" philosophy.

Couple of questions:
1. I compliment using ScanCode Sets 1 and 2. Do you need both? Hmm. Vogons visitors may need both. Something I have space for (though bye bye, any chance to fit into 16 kb chip).
2. How do you handle key release codes in ScanCodeSet 1? I seem to be too dumb to understand it from the code.
3. Do you handle typematic?
4. Do you handle additional Num Lock bytes after cursor keys as well as right Alt and Ctrl?

Can't... Stop... Feeding... Curiosity..!

Feel free to join the wish list to Volo's Pad-to-PS/2 by writing me an e-mail:
3hUGsDI.png

Reply 107 of 157, by Volo

User metadata
Rank Newbie
Rank
Newbie
spark2k06 wrote on 2020-08-22, 11:45:
I already made a solution like this one called Joy2PS2 some time ago ... but maybe I didn't promote it enough: […]
Show full quote

I already made a solution like this one called Joy2PS2 some time ago ... but maybe I didn't promote it enough:

33947051734_518f8a9cd3_z_d.jpg

https://github.com/spark2k06/zxuno/tree/master/joy2ps2

https://youtu.be/GII2eh_ROhA

https://www.youtube.com/results?search_query=joy2ps2

Please pardon my insensible curiosity: Can you pull down Device Clock signal, when sending keycodes from the gamepad?
I don't see obvious way it's done from the schematics. Must be something elegant? I had to brute-force the problem by hardware signal separation.

Feel free to join the wish list to Volo's Pad-to-PS/2 by writing me an e-mail:
3hUGsDI.png

Reply 108 of 157, by spark2k06

User metadata
Rank Newbie
Rank
Newbie
Volo post_id wrote:

Spark2k06, Where were you before?! Your thing is awesome! I never thought to look for a solution in ZX Spectrum scene! Why isn't it in your tindie shop? What happened to your website? Ah, the curiocity!

Thank you, I'm glad you like the project. The truth is that it is one of the first, and in its day I did it focused on the ZXUno, an FPGA initially designed to simulate a ZX Spectrum, correct. However, it is perfectly valid for any other PS / 2 system such as old PCs. I do not sell it in Tindie because at the moment I do not have new units, and before relaunching it I should carry out various adjustments, so to speak I have already left it a bit abandoned ... however, I am glad that it can serve as inspiration to improve your project 😉

I'll give you the new domain where you will find more detailed information about the project (also updated in the github readme file):

http://spark2k06.strangled.net/joy2ps2

It is in Spanish, you will have to translate it

Volo post_id wrote:

I've taken a bit more complex approach than you've done with your device: you are injecting key-codes into keyboard line to be heard by both host and device. I am not sure the keyboard (device) shall fully appreciate it (my keyboard is prone to freezing if it reads something weird). Furthermore I'm not sure that simultaneous use of gamepad and and keyboard shall not cause conflicts.
I pursue 100% in-spec design - hence the tedious "active pass-through" philosophy.

Well I can assure you that my approach works surprisingly well, to avoid conflicts with a keyboard connected simultaneously I adopted the simple solution of adding a diode to the shared DATA line, so that while the keyboard could output information over it, I could not receive across it. . and works!:

ACtC-3d7iJt-Hd0VsH_LoNDH16har1wJ4j0jNZID3BWHGyxOu2hZOFwN8WBsJagCr-FGtDSJteSkibzViuV4XZgM-wBGqgVy5cHIyPXYxT6vz1a_zIpahMry_rNeAWzveGEw3z0fY9IvLq409hK6_E-IFEYkdA=w1135-h851-no

Also, as you can see in this image, I added a transistor to pin D13 to establish the function of this diode only at the moment of transmission, also allowing listening to the keyboard when JOY2PS2 was not being used, this allows a lot of play ... What's more, it is even possible to connect several JOY2PS2 in cascade to be able to play several players at the same time !:

https://www.youtube.com/watch?v=FaunbXS9z4A

In this video my next idea is shown, but I have not gotten to launch it ... as PS / 2 this works very well, even connecting up to 4 players in cascade, but if I add at the end a PS / 2 to USB converter with a Teensy 3.1 and Soraer's software, even though it also works ... games that require the use of several keystrokes at the same time to make combos (such as MAME's Capitan Commando), has some lag and makes them not recognized , but I repeat, for PS / 2 it works like a charm.

Volo post_id wrote:
Couple of questions: 1. I compliment using ScanCode Sets 1 and 2. Do you need both? Hmm. Vogons visitors may need both. Somethin […]
Show full quote

Couple of questions:
1. I compliment using ScanCode Sets 1 and 2. Do you need both? Hmm. Vogons visitors may need both. Something I have space for (though bye bye, any chance to fit into 16 kb chip).
2. How do you handle key release codes in ScanCodeSet 1? I seem to be too dumb to understand it from the code.
3. Do you handle typematic?
4. Do you handle additional Num Lock bytes after cursor keys as well as right Alt and Ctrl?

Can't... Stop... Feeding... Curiosity..!

1. Yes, both may be necessary to work on very old PC systems, but I don't consider it essential in either.
2. To release the key, the scancode must be OR operation with 80h, see the following table: http://users.utcluj.ro/~baruch/sie/labor/PS2/ … Codes_Set_1.htm
3. I also messed with typematic, yes 😀
4. I would have to check the code, but yes ... it can be handled perfectly.

https://www.tindie.com/stores/spark2k06/
https://hackaday.io/spark2k06

Reply 109 of 157, by Volo

User metadata
Rank Newbie
Rank
Newbie
spark2k06 wrote on 2020-08-24, 06:09:
1. Yes, both may be necessary to work on very old PC systems, but I don't consider it essential in either. 2. To release the key […]
Show full quote

1. Yes, both may be necessary to work on very old PC systems, but I don't consider it essential in either.
2. To release the key, the scancode must be OR operation with 80h, see the following table: http://users.utcluj.ro/~baruch/sie/labor/PS2/ … Codes_Set_1.htm
3. I also messed with typematic, yes 😀
4. I would have to check the code, but yes ... it can be handled perfectly.

Thanks. Still couple off-spec features freak me out... but they should compensate each other but still - horribly off-spec:
1. Common Clock bus. When your converter sends data - the Device (keyboard) is spammed with reverse 1-bits (???). Most keyboards should (?) ignore those or unfruitful wait for Host communication(??). But if converter and keyboard bytes overlap the keyboard might do either:
- a) Send 0xFE (Resend) command.
- b) Reboot and reset LEDs and typematic states.
- c) Crash altogether.
2. The device is unable to pull down KBD-DATA' (hyphenated), while sending data - which puts Device on standby. But I have no idea how it might work with unmanaged Clock bus.
I have no idea if your converter shall be compatible with old laptops. Mine consumed a LOT of effort ensure compatibility.

I find merit in your v3 modular design. It allows to use cheapest 16kb chips (or even cram SNES controller into dirt-cheap Attiny84) and pretty hands-on servicing (buttons and stuff). Though 2 modules + case + connector should be on par or even more expensive with my design in terms of buyers' cost.

My approach is more "Apple-ish":
1. Maximum possible compatibility (no corners cut!). This shall also allow to daisy-chain the device.
2. Laptop compatibility. Use with or without keyboard (My converter undertakes Host-communication if keyboard is not connected).
3. Design and AESTHETICS. I even sourced black plastic DB-9 ports for the looks!
4. Hassle-free connection (there shall only be a single custom Mini-Din6 / Din 5 wire in whole package), both USB and PS/2 HOST connection work the same (this week I'll test WIN98 compatibility with Objective Development's PIDs);
5. Non-intrusiveness. No external buttons. You should be able to forget the device is even there.

Guys of VOGONS, If you are enthusiasts of DIY or modular design (KVM users, case builders, etc.) - I'd advice buying spark2k06's modular device. For most applications it might be a better and cheaper than dreamblaster's GAMEPADLPT.
If you are more into hassle free "100% compatibility, I don't have to touch it" solution - my device should be a better choice in the long run.
So we are not directly competing (hopefully). - it's more of an extra option for the community.

Also, guys of VOGONS, do you need Scan Code Set 1 (IBM PC XT) compatibility?
Since my firmware is already bloated to 19.5 kb - I may forgo any efforts to shove it into 16kb AVR and add a couple kb for ancient hardware (though I think that an XT with a gamepad is silly).

Feel free to join the wish list to Volo's Pad-to-PS/2 by writing me an e-mail:
3hUGsDI.png

Reply 111 of 157, by Volo

User metadata
Rank Newbie
Rank
Newbie

O000f! You would not believe how much time and effort this screenshot cost me:
4kPKPaL.png

I resorted to use of Objective Development USB VID/PID pair. Since I imitate a bog-standard USB keyboard (otherwise Win98 dislikes it) - I expect no conflicts.

Feel free to look through the USB Descriptor details:

USB Information for the device
Information for device Volo's Gamepad to PS/2 (VID=0x16C0 PID=0x27DB):

Connection Information:
------------------------------
Device current bus speed: FullSpeed
Device supports USB 1.1 specification
Device supports USB 2.0 specification
Device address: 0x0013
Current configuration value: 0x01
Number of open pipes: 1

Device Descriptor:
------------------------------
0x12 bLength
0x01 bDescriptorType
0x0200 bcdUSB
0x00 bDeviceClass
0x00 bDeviceSubClass
0x00 bDeviceProtocol
0x40 bMaxPacketSize0 (64 bytes)
0x16C0 idVendor
0x27DB idProduct
0x0100 bcdDevice
0x01 iManufacturer "Volo. [MY E-MAIL or WWW]"
0x02 iProduct "Volo's Gamepad to PS/2"
0x00 iSerialNumber
0x01 bNumConfigurations

Configuration Descriptor:
------------------------------
0x09 bLength
0x02 bDescriptorType
0x0022 wTotalLength (34 bytes)
0x01 bNumInterfaces
0x01 bConfigurationValue
0x00 iConfiguration
0xA0 bmAttributes (Bus-powered Device, Remote-Wakeup)
0xFA bMaxPower (500 mA)

Interface Descriptor:
------------------------------
0x09 bLength
0x04 bDescriptorType
0x00 bInterfaceNumber
0x00 bAlternateSetting
0x01 bNumEndPoints
0x03 bInterfaceClass (Human Interface Device Class)
0x01 bInterfaceSubClass
0x01 bInterfaceProtocol
0x00 iInterface

HID Descriptor:
------------------------------
0x09 bLength
0x21 bDescriptorType
0x0101 bcdHID
0x00 bCountryCode
0x01 bNumDescriptors
0x22 bDescriptorType (Report descriptor)
0x0045 bDescriptorLength
Show last 29 lines

Endpoint Descriptor:
------------------------------
0x07 bLength
0x05 bDescriptorType
0x81 bEndpointAddress (IN endpoint 1)
0x03 bmAttributes (Transfer: Interrupt / Synch: None / Usage: Data)
0x0040 wMaxPacketSize (1 x 64 bytes) // UPD NOW: 0x0010 wMaxPacketSize (1 x 16 bytes)
0x01 bInterval (1 frames)

Microsoft OS Descriptor is not available. Error code: 0x0000001F

String Descriptor Table
--------------------------------
Index LANGID String
0x00 0x0000 0x0409
0x01 0x0409 "Volo. [MY E-MAIL or WWW]"
0x02 0x0409 "Volo's Gamepad to PS/2"

------------------------------

Connection path for device:
xHCI-совместимый хост-контроллер USB
Root Hub
Volo's Gamepad to PS/2 (VID=0x16C0 PID=0x27DB) Port: 2

Running on: Windows 10 or greater (Build Version 18363)

Brought to you by TDD v2.15.0, Jun 8 2020, 17:18:07

P.S. I have no Idea why wMaxPacketSize is stupidly large (64 bytes). I have no more will or effort to figure it out - I'll have to resort to the 1st Rule Of Programming.

P.P.S. (two hours later) There are two versions of the 1st Rule Of Programming:
- Version 1: If It Works Don't Touch It.
- Version 2: It's Always Your Fault!

I consulted Ver.2 😉
Now wMaxPacketSize is 16 bytes

Feel free to join the wish list to Volo's Pad-to-PS/2 by writing me an e-mail:
3hUGsDI.png

Reply 112 of 157, by Volo

User metadata
Rank Newbie
Rank
Newbie

SITUATION REPORT
After sufficiently playing with USB, my thoughts are as follows:

  1. It works.
  2. The connector is a bit picky (it prefers more expensive USB cords for reliable connection).

I’m now experimenting with PS/2 setup. I came up with this:

uDidPt0.jpg

It is a hacked PS/2 extender crimped to a phone jack. Easy to make, looks professional and is quite sturdy. The connector itself has an uncanny springy feel to it (you know, phone jack dead flesh feel), but it links quite sturdily. I’ll have to find a whole bunch of black male-male MiniDIN6 cords and hack those.

I think I may provide a choice between AT-style Din5 or PS/2 MiniDIN6.

I’m glad to inform you that I’ve found a contractor, who may CNC the plastic cases on a budget! Sadly, the guy is on vacation, but I may order prototype case on 15th of September.

P.S. Still hunting for bugs. But I regret to admit that I’ve almost hunted them to extinction. I think soon I’ll be able to sell.

ajacocks wrote on 2020-08-26, 16:40:

Well, PC/XT support would be nice. I do game on several 8088 boxes.

It's not critical, of course.

- Alex

Sorry, I think I'll be unable to reliably parse all of Scan Code Set 1 to determine pressed key within the couple of milliseconds I have. Set 2 allows some cheating to arrange lookup tables, Set 1 is just a mess. And I don't have access to an XT machine to test it.

Feel free to join the wish list to Volo's Pad-to-PS/2 by writing me an e-mail:
3hUGsDI.png

Reply 114 of 157, by Volo

User metadata
Rank Newbie
Rank
Newbie
Pierre32 wrote on 2020-09-11, 22:14:

Looks like lots of great progress. Phone jack connection for that Model M vibe.

No, it's not like Model M. Don't get me started with Model M!!! Last week I had the carelessness to buy this thing for $60:
ITT098m.jpg

Pros: It is Cyrillic original (so I shall be able to use it casually);
Cons: It has no wire.

It seems that wire is a HUGE problem now. The most ironic thing that SDL connectors where made in my country... till 2017-2019.
The connector itself is made of tree parts totaling 10$ plus shipping. Wires on eBay are $30-ish.
Another ironic thing is that there is a factory in China eager to make ready-made Model M coil wires at 2$ a piece (minimum batch is 200 pieces).

Is there a place where I can get the wire retail? Or some kind of crowdfunding platform, where multiple people shall be able to invest into 200-piece batch?

Feel free to join the wish list to Volo's Pad-to-PS/2 by writing me an e-mail:
3hUGsDI.png

Reply 115 of 157, by Der Kuenringer

User metadata
Rank Newbie
Rank
Newbie
Volo wrote on 2020-09-13, 13:51:

Is there a place where I can get the wire retail? Or some kind of crowdfunding platform, where multiple people shall be able to invest into 200-piece batch?

You can get new old stock IBM replacement parts from Unicomp (https://www.pckeyboard.com/page/category/Cables). Their international shipping isn't cheap though.
Alternatively you could look around in the marketplace section of either deskthority or geekhack forums. You'll find custom made SDL to USB cables there, occasionally cheap (relatively speaking) NOS IBM parts whenever someone plundered an old warehouse, and even a Bluetooth controller conversion kit for your Model M (the latter is probably going to cost more than what you paid for your Model M).

Reply 117 of 157, by Cyberdyne

User metadata
Rank Oldbie
Rank
Oldbie

I think the realistic future is a USB Gamepad to PS/2 keyboard adapter. I have some ultra cheap SNES clone USB controllers, and they work just fine.

I am aroused about any X86 motherboard that has full functional ISA slot. I think i have problem. Not really into that original (Turbo) XT,286,386 and CGA/EGA stuff. So just a DOS nut.

Reply 118 of 157, by villeneuve

User metadata
Rank Newbie
Rank
Newbie

Good ultra cheap SNES style USB controller? Which are those? All I heard & read about those was unprecise d-pads and buttons which are wobbly and therefor are sticky in there up-and-down movement.

Reply 119 of 157, by Volo

User metadata
Rank Newbie
Rank
Newbie

SITUATION REPORT.
OOOKAY… Haven’t been to the forum for a while. Have had little time to invest in the project. Been busy at work. Had to live away from the city (1.5% of people there are active COVID cases). Bought myself a puppy. The pup, while being quite small, at the same time is somehow quite large.

Being the younger kid in the family, he’s taken all of my toys:
po2TAAw.jpg
(the fella in the photo is just 3½ months old)

The little time I had to tinker with the device I was mixing and mashing it with different PCs and keyboards. Did not try Model M yet. It might work, but I’m not sure, as it is known to deviate from PS/2 standard).

Issues found:

  1. Device stops working when 25 kilos puppy tramples on it. Sadly, issue unresolvable.
  2. Some laptops have their mouse and keyboard share the same bus. Therefore mouse may randomly highjack the keyboard PS/2 communication and hold it busy up to 12millisec... That’s like almost a frame of gameplay! The problem is that when mouse highjacked the line on the very same tick as there is keyboard input, my device failed to process the change and keyboard fell on host’s deaf ears. In laymen’s terms: when playing a game using mouse and keyboard at the same time (like DOOM) a key got stuck once in about 5 minutes! ANNOYING AS HECK! Spent two months hunting down the cause. It seems that by optimizing pin manipulation and adding some abort states, I managed to beat it. Now I am my third hour of gameplay without a hitch.
  3. I now absolutely hate DOOM! And DOOM2! And FINAL DOOM! And Heretic!.. HACX is surprisingly allright, though.
  4. Fixed hotplugging issues. Now you may mix and match gamepads on the fly. Would not recommend re-plugging the keyboard though - it works, but it’s not really designed to be hotplugged.
  5. Since I had to emulate bog-standard mid-90s USB keyboard, multimedia buttons don’t work in USB to PS/2 mode. Oh, well, had to make the sacrifice for compatibility!
  6. Had signaling issue. Resolved by updating resister values:
    RHgnZNa.png

Small quality of life improvements:

  1. When anything BUT Sega Genesis pads are connected, the device checks gamepads 4 times per frame (each 4ms). Whenever Sega Genesis pad is connected, the device slows down to 2 checks per frame (7 ms).
  2. Sega Master System pad A&B are now mapped to Genesis pad A&B (Not B&C).

Thanks for staying with me. I’m sorry, got overwhelmed by DOOM issues, as I consider DOOM essential software and am unable to sell device stopping people from playing DOOM. Fingers crossed - I hope I fixed the issue.

Have to get back to organizing case production.

Feel free to join the wish list to Volo's Pad-to-PS/2 by writing me an e-mail:
3hUGsDI.png