Jump to content

Custom hardware / simpit repository. For people who take KSP a little too far.


Mulbin

Recommended Posts

2 hours ago, wile1411 said:

What would the external part to the listener be? A separate program that API can listen to?

No, all I am saying is that the code you are looking for (how to register the joystick button press) is not specific to KSP, but to your OS.

In your example script you do the same thing. "using System.IO" means you are loading the libraries from your OS that manage input and output. You detect the keypress with "Input.GetKeyDown(_keybind)", this is code relevant to your OS that works because you loaded the library.

So you are looking for the code that registers joystick presses. I think it is something like this: "Input.GetKeyDown(KeyCode.JoystickButton0)"

Link to comment
Share on other sites

2 hours ago, hugopeeters said:

No, all I am saying is that the code you are looking for (how to register the joystick button press) is not specific to KSP, but to your OS.

In your example script you do the same thing. "using System.IO" means you are loading the libraries from your OS that manage input and output. You detect the keypress with "Input.GetKeyDown(_keybind)", this is code relevant to your OS that works because you loaded the library.

So you are looking for the code that registers joystick presses. I think it is something like this: "Input.GetKeyDown(KeyCode.JoystickButton0)"

Ah - got it now. Checked the Visual Studio autocomplete and found you got it in one - Thanks! I'll go through and add checks for the joystick buttons I want and then add API actions appropriately. If I can work out how to do both GUI display and Input, I'll add that too to make life easier later.

Link to comment
Share on other sites

3 hours ago, KerBlitz Kerman said:

Would the mac be suitable for stripping or just use in a build? Also, is the keyboard a windows compatible one with some molding?

I would not be able to say, but usually used usb keyboards are like $2-3 at recycling stations, so I would not bother if it is just that you are going for. Or directly buy a keyboard IC, it goes for less than $5 and is easier to work with. I can find the specific IC you need when I get home.

Link to comment
Share on other sites

On 3/2/2018 at 8:16 PM, KerBlitz Kerman said:

Is a Mac plus for 20$ with a keyboard and mouse that doesn’t power on worth it for parts?

Not really. A computer like that is most valuable to a collector restoring a Mac Plus. The keyboard isn't even USB. USB wouldn't exist for over a decade after the Plus came out.

Link to comment
Share on other sites

6 hours ago, richfiles said:

Not really. A computer like that is most valuable to a collector restoring a Mac Plus. The keyboard isn't even USB. USB wouldn't exist for over a decade after the Plus came out.

Could I adapt the socket to a USB or maybe if I can find an adapter PS2 or is the way the keyboard 'speaks' a completely separate language?

Link to comment
Share on other sites

35 minutes ago, KerBlitz Kerman said:

Could I adapt the socket to a USB or maybe if I can find an adapter PS2 or is the way the keyboard 'speaks' a completely separate language?

The protocol is an old style serial bus that even Apple abandoned after the Mac Plus. It uses a connector similar to a landline phone. While you can build a protocol adapter of sorts if you know how to do the programing, you'd still need a Teensy 2.0, at least, and the code to read the protocol, and translate it as USB protocol. What are you wanting to do with the keyboard anyway? If you're wanting to cannibalize it for use as a KSP controller, you're probably better off buying some cheap switches or buttons off ebay that are to the style of your liking, and connecting those to an Arduino or Teensy.

There's little about the switches used by the Mac Plus keyboard either. Just cheap Mitsumi switches that don't quite have the right stem for modern key caps.

Link to comment
Share on other sites

What do I want with it? A retro keyboard of course! On a more serious note can I get some MX switches for it and then adapt the keystems or are they plain incompatible? Could you do a job with epoxy and a modern keystem plus the older one?

Could I take a 4 way joystick, cut off the handle, then put a 3d printed DPad on top and 4 tactile buttons with a nice heavy feel, wire it to a cheap keyboard controller as arrow keys for camera angle relatively easily?

Link to comment
Share on other sites

If you want to do a retro keyboard, that's cool. I'd say keep it stock in that case and use this: https://geekhack.org/index.php?topic=24965.0
I happen to be a regular over at the geekhack forums, and found this thing. Looks like it'd have you completely covered, as far as using the Mac Plus keyboard on a modern USB system.

On 3/5/2018, Joshua A.C. Newman said:

This is definitely doable in principle. You could even use a coily phone cord, since USB is also 4-conductor! Then put a USB mini on the other end — it's not that different aesthetically from the RJ-22 phone jack!

Remember, the protocol is vastly different. You can't just slap a USB connector on the end of the cord. You'll need an adapter like the one I linked.

 

Edited by richfiles
Link to comment
Share on other sites

On 3/3/2018 at 2:18 AM, Freshmeat said:

@Joshua A.C. Newman Most of the controllers are build using KSP Serial IO, which does throttle rather easily. It has a quirk with Windows 10,  but it only affects some boards - knockoffs use a different UART which fares better, IIRC. And it sends a lot of data back, which can be used for all sorts of neat stuff.

Is there a sketch (and library list) that someone's published for their controller? I'd like to explore it. I'm doing something wrong on the Arduino end, as I can't get it to register as a game controller, even though joysticks work well. (I'm using OS X.)

4 hours ago, KerBlitz Kerman said:

Could I adapt the socket to a USB or maybe if I can find an adapter PS2 or is the way the keyboard 'speaks' a completely separate language?

This is definitely doable in principle. You could even use a coily phone cord, since USB is also 4-conductor! Then put a USB mini on the other end — it's not that different aesthetically from the RJ-22 phone jack!

Link to comment
Share on other sites

44 minutes ago, richfiles said:

Remember, the protocol is vastly different. You can't just slap a USB connector on the end of the cord. You'll need an adapter like the one I linked.

Oh, yeah, I was assuming that you'd go all the way down the the resistor ladder or whatever's in there, bypassing all ICs.

(This thread has me scouring EBay for my favorite old Mac keyboards. Keyboard II or die!)

Edited by Joshua A.C. Newman
Link to comment
Share on other sites

The trick with protocol conversion is simply having a go between. You have a small board that emulates a USB HID keyboard, with he same layout as the keyboard you are using with it. That device then reads the serial protocol of the older keyboard, and sends the appropriate HID compliant keypress over USB. You don't even need to mod the original keyboard, unless you wanna hide the converter inside of it. Some people do that. Others just have a small converter box between the keyboard and the computer.

Also, most keyboards use a scanning matrix. You send a pulse down a series of rows, and then read if any columns have a signal (you can flip which is scan and which is read). The controller knows as it scans a pulse down each row, that if any column is active when read, that the key at the intersection has been pressed. A good keyboard will have diodes at every switch, so you don't generate ghosted characters when pressing combinations of keys. By rapidly scanning each row, and reading if any columns become powered, you can scan every key on the whole keyboard.

Edited by richfiles
Link to comment
Share on other sites

1 minute ago, richfiles said:

The trick with protocol conversion is simply having a go between. You have a small board that emulates a USB HID keyboard, with he same layout as the keyboard you are using with it. That device then reads the serial protocol of the older keyboard, and sends the appropriate HID compliant keypress over USB. You don't even need to mod the original keyboard, unless you wanna hide the converter inside of it. Some people do that. Others just have a small converter box between the keyboard and the computer.

That's tempting, particularly since the MacPlus used phone cords, which opens up all sorts of options. I hacked my MacLC ADB cable to use a 10m cable so I could walk around the room with the keyboard hanging from a guitar strap, using a game pad as a mouse.

Link to comment
Share on other sites

Just now, Joshua A.C. Newman said:

I hacked my MacLC ADB cable to use a 10m cable so I could walk around the room with the keyboard hanging from a guitar strap, using a game pad as a mouse.

:cool: I have visions of Harold Green now! 

Spoiler

iHdstx2.jpg

 

Link to comment
Share on other sites

Look up the Red Green Show. It's a low budget Canadian comedy (hybrid sitcom/sketch comedy) that ran from 1991 to 2006, that tends to sometimes air on PBS stations here in the US. Not sure about elsewhere. Lots of jokes about duct tape, getting old, stereotypical "guys and their outdoors fish and game lodge" stuff, run down cars, and WILDLY repurposing things (most of the time not realistically... though they did make a "hot rod" bus once...). It's kinda like Canada's version of our rednecks, but on TV! I've seen most of 'em, but I still watch it now and then. :sticktongue:

The Harold character was the stereotypical nerdy type (over the top nerd), but did actually produce the show. In the early years, that computer and switch panel actually served as the means to switch cameras and do transition effects, and was legitimately operated within the show. As the show got popular, and got better funding, they got better camera setups, but always kept that gadget in the corner as a tribute to the early seasons.

Wow... Looked it up... 15 seasons, 300 episodes. Not bad for what started as little more than a small budget comedy based on a comedian's sketches from the late 1970s and mid 80s!

The keyboard was off a TEC Mini-Tec terminal from the late 1970s. It's probably not actually doing more than serving as a few hardwired buttons for the transition effects machine. There are a few dials and switches on the longer portion of the controller. I believe those actually performed the camera selection. The keyboard was mostly for show, if it even did anything at all. He'd usually do some random clickety-clack "moves" to play up the use of the controller. For years the cast said they thought they scavenged the keyboard from a Commodore 64, but leave it to the internet to know better than the actual cast's memories! LOL :rolleyes:

 

Edited by richfiles
Link to comment
Share on other sites

13 hours ago, Joshua A.C. Newman said:

Is there a sketch (and library list) that someone's published for their controller? I'd like to explore it. I'm doing something wrong on the Arduino end, as I can't get it to register as a game controller, even though joysticks work well. (I'm using OS X.)

This is definitely doable in principle. You could even use a coily phone cord, since USB is also 4-conductor! Then put a USB mini on the other end — it's not that different aesthetically from the RJ-22 phone jack!

The demo sketch in the first post is throttle and a few warning LEDs :wink: No further libraries needed.

Edited by Freshmeat
Clarification
Link to comment
Share on other sites

  • 2 weeks later...

I got sick of repeatedly having to look for the correct link / clicking on bad links for the various hardware projects including some in people old taglines.
So I'm posting this here for future quick reference - the OP on this thread is still using the old forum links that seem to point to threads that no longer exist after one of the past forum migration / changes.

When @Mulbin returns, happy for him to take all this and put into the front page.

Hardware Project Links

@Mulbin - Link
NjVxhFim.jpg

@stibbons - Link
Tm6RDxhm.jpg

@Luis - Link
UwBSB4im.jpg

@MrOnak - Link
at2mY35m.jpg

@Krewmember - Link
iB9qZ9Tm.jpg

@cm2227 - Link
KyTd76em.jpg

@Antipaten - Link
DSC_0005%252520%2525282%252529.JPGDSC_0009%252520%2525282%252529.JPG

@7thGraal - Link
tLw8IbAm.jpg
@AmeliaEatyaheart - Link
20141122_010559.jpg
@zitronen - Link
IMG_8886s.jpg
@KK4TEE - Link
nEyCCoMm.jpg
@Peter KG6LSE - Link
11895591106_37ba3030c7_c.jpg
@NeoMorph - Link
9xgUNm0m.jpg
@ChaseHQ - Link
@T.A.P.O.R. - Link
IMG_0406.JPG
@richfiles - Link
jgs1Jowm.jpg
@mr. engino - Link
KKxxb6hm.jpg

@hugopeeters - Link
eYSQ8WGm.jpeg

@Freshmeat - Link
fkoPNZkm.jpg
@One Wheeled Panda - Link
kQc97wrm.jpg
@lawnmowerlatte - Link
@Freshmeat - Link
DSC_0004_zps3f44a78a.jpg
@Steven Marlowe - Link
IMG_3940.jpg
@JoshTheCoward - Link
YEl2Fmnm.jpg
@mountaineerman - Link
Co7MuARm.jpg
@mountaineerman  - Link
F4dErQem.jpg
@Sputnix - Link
Label-Full.png

Jeff Rogers - Link
Console Image Link 
 

 

@niko1499 - Link
GB1T1HBkCr4UMmWWAqHk63Pi2R1-GNqfJp0F5l3k
@rhcprul3 - Link
eLPb4BLm.jpg
@Apache600 - Link
mmXestdm.jpg
@KK4TEE - Link
erV7StRm.jpg
@marzubus - Link
CAqlzxZm.jpg
Joycem134 - Link
Jg1_EJqxIQ0x-EOX_TF1tpUeRBAhVOgeqfS6lFqX
@zitronen - Link
IMG_8486.JPG
@hakan - Link
alx1JZnm.jpg
@Daid - Link
No picture available
@ytmytm - Link
7284391453075626111.JPG
Makerforce - Link
GdoUa4ll.jpg
Roo - Link
11152228844_4e991d7e73.jpg
@drat1856 - Link
JPEG-2058.jpg
@ajden - Link
d1kHDv7m.jpg
@ohMorrissey - Link
MRK8gRcm.jpg
Simon Rob - Link
FYVNM4ZJDOUWM3E.jpg?auto=webp&frame=1&width=933&fit=bounds&md=f61552dc2efac0e3da292cf4edbcdf54
@JeffSergeant - Link
vZSxZ3Sm.jpg
@Kotagi - Link
NxDOIoWm.jpg
@Monsterlunch - Link
lExecazm.jpg
@KingLuxor - Link
n4TgzT5m.jpg
@Crawcik  - Link
IMG_20180311_144159.jpg
@Hacourt - Link
uIA07ztm.jpg
@Captain_Hair - Link
A6Xnvc1m.jpg
@REMD - Link
EOQSIcGm.jpg
@Hebel - Link
20170217_070229.jpg

@kl0buk - Link

No picture available

Ben Vieux - Link (French)
cockpit1-696x465.jpg
Christophe Girardot - Link (French)
500_7d19287f-5157-4ebf-ab6a-5583d109d3d1.jpg
@Francois - Link
omaq6Au.png
@tsaven - Link
0gJYfc3.jpg

CodapopKSP - Link
ZqWmNdz.jpg

vort3x32 - Link
2m8wjj6dcd741.jpg
@c4ooo - Link
IMG_6240.JPG
   
     
     
     
     

 

If I've missed any or you'd like a link removed, let me know and I'll edit the post. Also, if you want a different link / image - same deal.

Console Count: 61
Last Updated:  (updated 26-Jan-2020) - 1 new project

Edited by cyberKerb
fixing some image links
Link to comment
Share on other sites

1 minute ago, wile1411 said:

I got sick of repeatedly having to look for the correct link / clicking on bad links for the various hardware projects including some in people old taglines.

To be honest, I for one wouldn't mind seeing an active maintainer just... start a new OP. :) 

Link to comment
Share on other sites

56 minutes ago, stibbons said:

To be honest, I for one wouldn't mind seeing an active maintainer just... start a new OP. :) 

Well.. if people are fine for me to start a new thread, I can do that too... What's people feelings on a new thread (2018 edition) that references this one in the OP?

Vote here: https://strawpoll.com/3bwy1y5g

(I'll act on the results after the weekend)

 

Also to give some context: I'm sure @Mulbin will probably be back (although not 100% certain) as they have been busy with a not-so-small project they've been working on for a while: Go For Launch: Mercury 

 

 

Edited by wile1411
Link to comment
Share on other sites

Hi All!

Yes.. sorry, it's been a long while since I was active on this thread (or the entire forum!).

As mentioned above I am also the creator of another PC space simulator -  Go For Launch: Mercury , and also have a new baby! So my simpit has sadly been sitting in a box in the attic for nearly 3 years. As there is no way to sign control of the OP over it certainly would make sense to build a new thread run by an active member. I get an email whenever someone sends me a PM (which is why I happen to have turned up today!) so if a new thread is set up please let me know and I can put a "new thread" notice in the OP.

Long term I'm really not sure if/when I will pick my simpit project up again. I'm actually now more likely to make a mercury capsule simpit using my own simulator as I will be able to take this to gaming expos.

When I actaully get a bit of free time again I'll catch up on what people have been building!

 

Link to comment
Share on other sites

well, informal vote shows 8 to 1 to set up a new thread and had Mulbin reply too.  I guess I know what I'll be typing up this arvo. :)  

If you have any specific images you want me to use in the new hardware thread OP let me know. Otherwise, I'll just grab what I think its the most recent from the build threads. Can always edit it later too.

Was there any other threads that I should add to the link dump I generated in the earlier post?

Link to comment
Share on other sites

Honestly, I'm all for keeping this thing goin' forever! :wink:
I like the massive repository of information, and I still trust that Mulbin isn't going to abandon this. He just gets busy.

Might I suggest simply offering to pre-format the updates, and simply private message them over to Mulbin for a good old copy/paste into the main post? Just a thought.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...