Looking for PSX controller help

Started by FoxFireX, April 13, 2005, 03:30:55 AM

Previous topic - Next topic

FoxFireX

A very brief search turned up no matches, so my apologies if this has been covered before and I just missed it.  I'm looking to try to put together a homebuilt controller for use with Beatmania style games, and it looks like this is a bit more of a reach than any of my projects to this point.  Pretty much everywhere I've looked, when people have done home-built controllers, what they really did was take an existing BM controller and put a new top on it.  I'd like to try building one, if not from scratch, at least without having to sacrifice a perfectly good BM controller in the process.

So, quick history:  My earliest controller modification experience was back in high school, when I made a couple of arcade-ish joystick controllers using the PCBs from some busted SNES controllers.  Fun times for SFII.  My most recent efforts have been in the realm of home-build Dance Dance Revolution pads, with an arcadish control box to house the non-floor buttons.  This time, I sacrificed a digital PSX controller to the project.

To the issue at hand:  What makes Beatmania different, for any who don't know, is that it not only has buttons (which I could easily hack onto a PCB) but also includes a "turntable".  The upshot of the turntable is, when you spin it one direction, it should act as though one button is being pressed; when you spin it the other direction, it should act as though a different button is being pressed.  When it isn't spinning, no buttons are being pressed.  Not quite as simple as buying an arcade button and soldering a couple of wires.

So, what I've found to this point is that I'm probably going to need an optical rotary encoder, which has two output lines that send a gray code which cycles different directions based on the direction of movement.  My first thought was to build a few logic gates and to rely on the propogation time delays to let my signal sneak through to a transistor while the rest of the system catches up.  My latest problem with that design is that I'm not sure that the logic gate cascade would take long enough for the signal to be registered by the controller's encoder.  (I don't mind reusing a regular PSX PCB for this; I just don't want to buy a Beatmania specific controller only for sacrifice.)

So, does this sound interesting to anyone out there?  Are there resources for this that I don't know about, but really should?  I'm eager to do the work, but it's been quite a while since I took a circuits class, and I was always more of a software guy than a hardware guy.  I basically need help in the form of someone pointing out components that I should investigate, how many chips can safely be added without overtaxing the power sent to the PSX controller, and what sort of safety should I put in the circuit (resistors, etc.).

Sorry to be long-winded, but I hope to at least show that I've put a thought into this, and really am looking for guidance and instruction, rather than "just buy these and hook them up like so" without an understanding of what's happening.  If someone does just want to go that route, I'd take it and be grateful, but I really want to be involved in solving the problem I've found for myself.

atom

#1
Interesting, but wouldnt it also need to tell the speed of the turning? Your best bet is to look at an existing beatmania controller and see what kind of mechanism is acting as a switch, thats the best advice I can give. As far as safety goes dont worry about the amount of ICs (chips), if your power is coming from a PSX port, then thats the power you need and shouldnt call for much else. Weak Fuses on both the ground and power lines would be great in case of shorts and soldering mistakes.
forgive my broked english, for I am an AMERICAN

FoxFireX

No, my understanding is that the speed is irrelevent.  Maybe a bit of extra description would help there.  The game is rhythm based, so you have to do certain tasks at the right moment, usually to the beat of the song being played.  Most of the events are simple key-presses; the closer to the beat you hit the key, the better your score.  

The turntable works the same way; the closer to the beat you put it into motion, the better the score.  There isn't a penalty for it continuing to move afterward, and there isn't any way of saying "turn fast" or "turn slow".  Just "turn the control at this moment".  If it was already moving, you turn it the other way, like scratching a vinyl record.  So, if you have four quick "scratches" in a row, you'd move the turntable quickly left, right, left, right, and then either stop it or just let it spin to a rest.

So, based on my understanding (which I should really verify by playing in the arcade soon!) is that all I need to represent is Button A pressed if the turntable is currently turning left, Button B pressed if the turntable is turning right, neither button pressed if the turntable is at a standstill.

Okay, venturing back into the area I'm not as familiar with, I'm guessing the circuit logic I'll need can probably be covered by the various 7400 IC's, right?  If I go that route, do I need to worry about any external resistors/capacitors/etc, apart from what is built into the chip?  My plan is to have a transistor hooked up across each of the two buttons I need to feed through this thing, and send a logical 1 to them when one should be pressed.  Does it osund like I'm on the right track?

atom

#3
I am not familiar with different IC's at all... is that the IC from the psx controller?

Correct me if I am wrong, but you are trying to take your PSX version of Beatmania and make controls for it just like at the arcade right? So how is the turntable worked on the actual psx controller? If it is through a couple buttons, you could simply do this:
forgive my broked english, for I am an AMERICAN

FoxFireX

#4
My understanding is that if you use a controller, you assign one (or maybe two - PC sims give you two) button(s) to be the turntable "scratch".  I see where you're going with that diagram, but I believe the turntable is free-floating; you can keep spinning and spinning in one direction forever if you want, the effect being that one "button" is continually held down.  (Not that you'd want to, but that's beside the point.)  I think what you've drawn up would work, but there'd be no real freedom of movement.  Kind of like the difference between the old Atari 2600 paddle controllers vs. the driving controller.

The ICs I'm looking at would be for various things like latches and flip-flops and logic gates.  I'm pondering it right now, trying to figure out how I could hook things up to do the gray code decoding, and I can now get four lines, one of which is high, so I know the current state.  I just need to figure out how to take that knowledge, store it, and use it to detect a change and trigger the right button, plus keep it held long enough to be read by the PS encoder.  I may be going about it the completely wrong way, and overengineering the problem, but it's fun. :)

EDIT: Oh, and just so I'm not putting forward any false pretenses, I don't yet have any PS versions of the game, nor have I played in the arcade yet.  I haven't laid hands on a controller, so I'm going on what I understand the controller to be like, based on other people's descriptions and my understanding from playing PC sims of the game.

atom

Yeah, you are way over engineering it. Like talking about using transistors to give a logical 1. You only need a switch to give a logical 1, the one would the the button down and the 0 up. In my diagram, if the paddle under the turn table wasnt tight with the axle it could hit the switch and the table could still turn, understand where im going with this? Is there even a psx version of the game? Would it be better to just develop this for pc by hacking up a usb controller?
forgive my broked english, for I am an AMERICAN

NFG

Buy a cheap PS controller and open it up.  Use that chip.  Total cost: $15.


FoxFireX

#7
In reverse order I already have to use a cheap PS controller for part of this.  The problem I have been looking at is going from a rotary encoder, which produces two outputs, 00, 01, 11, 10, in that order, in one direction, but in the opposite order in the other direction, and from that "pressing" one button if the table is moving one direction, "pressing" another if it's moving the other direction.  I'm not talking about replacing the actual PS encoder chip; the chips I'm thinking of would be used to convert the one type of signal to the other.

Going back to the previous post, I see what you're saying, but I'm perhaps concerned about how to actually mechanically connect the parts.  If I'm seeing what you're talking about right, there'd be basically two axles, one inside the other, such that when one is moved, it will drag the other along until it meets resistance, but will continue to move after the other has stopped.  I can sort of see a couple of ways of doing that, but I'm afraid that anything which doesn't put through noticable resistance to the controller (i.e. such that you can't obviously feel it "hit" something) is going to be too frail to last long.  Do you have any thoughts on the actual connection mechanism?

Oh, last thing, there are PSX/PS2 versions of the game, they just haven't necessarily been released in all regions.

atom

forgive my broked english, for I am an AMERICAN

FoxFireX

Heh.  Alright.  Thanks anyway, guys.  If I come up with something cool, I'll let you know.

phreak97

#10
Dont Give Up!! i know someone who has done exactly this! he has schematics for modifying a ball mouse so as to use the optical sensor for one of the axis. if you want me to, i can get detailed instructions.
i used to be right into all the music games, i built my own pop'n music controller with large arcade style microswitch buttons which even light up when pressed.. i was contemplating building a beatmania iidx controller, but ended up buying one instead.. building your own controller, bm or bm iidx, i recommend building it with the 7 key config anyway, i can even give you a complete list of what buttons on the controller go to what buttons on the pcb.

and to you people out there saying to use a paddle with buttons.. get out of here.. these music games require near 100% accurate mechanisms, with little room for error.. the difference between a hit and a miss can be as little as a few milliseconds in some cases. for this job you NEED optical sensors, even the official konami bm controllers use them.

FoxFireX

Oh, don't worry.  I wasn't planning on giving up.  Those ICs are cheap enough that I can play around with it without too much concern.  My next step was going to be tracking down an IC simulator (like SPICE, I think?) like I used back in college.  I've at least got the schematics to the point that I think I can get a signal on one wire when a left motion occurs and on a different wire when a right motion occurs, but my next trick is to figure out how to hold that signal for long enough that it will be picked up by the PS's polling cycle, but not keep it around so long that it's triggered well after the table stops moving.  Oh, and cancelling it when the other direction is triggered.

I imagine I will eventually figure it out, but if you have resources about this sort of thing you can point me to, I would be very grateful.  And yeah, it's really a IIDX controller I'm talking about building, ideally with a way to spin it around for the 2P side; I just figured I'd go with what I assumed to be more lay terms.

phreak97

ok, looks like my friend has done a complete new design, not using a mouse at all anymore, though you can probably find some of the parts in a mouse..
theres a full shematic, and pcb file, so you can go get a pcb made for yourself, then just stick the components on it. the schematic looks complicated, but if you get that pcb made up then itll be easy as hell.
to use the .pcb file, you will need ExpressPCB which can be found Here

im sorry the schematic is not in .SCH format to work with the SCH part of expresspcb, but you should be able to work with these fairly well..

PCB and schematics: Click Here

benzaldehyde

Yikes. Thanks guys. I've been wracking my brain trying to figure out how that damn turntable works. I'm going to look into getting these parts and building a circuit. phreak, have you tried this circuit yet? My first inclination as of yet would be to wire it up to a real turntable. :ph34r: That, and it would probably still not cost me half as much as importers want me to pay for a IIDX setup. Now, to work!

phreak97

#14
the iidx turntable isnt a full size turntable, you'd do better to make your own, i heard of somebody using the spindle out of an old hard drive, screwing the bottom half to the wood, and leaving one of the discs on the op half and drilling through it to screw on whatever they used for the turntable, that would provide near zero resistance.. though for iidx, you dont really want zero resistance.. so i dunno.. you wouldnt want it to keep spinning more than half to 1 second..
i have not built the circuit as i dont really have any way to get a board printed.. and i have a konami iidx controller anyway. i can guarentee it works though, i talk to the guy who made it a fair bit.. his brother is an electronic engineer or something like that.. i'd say he was the one came up with the design.

btw.. this works the same way as a mouse, in that you need a perforated wheel passing between the sensors, rip open a ball mouse, take a look, or even, take the wheel:P

the old 45rpm vinyl records look like they might be a good size, theyre a little smaller than the arcade turntable from memory (could be wrong), but bigger than the konami ps2 turntable. you will have to have something underneath for support, those records arent strong enough to do the job alone, it'd be there more to look good than anything.


Does anyone know how those sensors actually know which way the wheel is spinning?

NFG

#15
QuoteDoes anyone know how those sensors actually know which way the wheel is spinning?

Quotea rotary encoder, which produces two outputs, 00, 01, 11, 10, in that order, in one direction, but in the opposite order in the other direction,

Just like a mousewheel or spinner controller (tempest, arkanoid).  The N64 controller uses a similar mechanism, actually.  Two spiked wheels geared to the bottom of the stick.

phreak97

#16
ok, but if its a single beam betewen the two sensors, which gets cut, then let through, then cut, etc, if all it sees is on or off, how does it get what direction it is spinning? or is there a little more to it than that?
sorry, i didnt quite get what i was after from your post..

Adeptus

How does a mouse tell?
Same way I guess.

Aidan

It's known as quadrature encoding. There are two sensors that are mounted so that there is a 90degree phase difference in their output. That way, with a bit of simple electronics, you can measure both the direction and the velocity.

There's some more information here
[ Not an authoritive source of information. ]

NFG

That's a neat document, Aidan.  Thanks for the link.

phreak: basically it works by putting two sensors next to each other.  As the the arm or fin of the encoding wheel moves past the two lights they're blocked in sequence.  First the right one, then the left.  If it moves the other way, the left is blocked then the right is.  

phreak97

#20
ok, that makes sense, thanks
Adeptus: a mouse uses the same mechanism, they just put two in, one for each axis.

FoxFireX

Okay, phreak97, I've been looking over the schematic and PCB files you linked to, and I think I've finally got it figured out.  Would you mind passing along a few questions to the designer at some point?  If it's a bother, it certainly isn't necessary, but I just want to make sure I really understand what's going on before I decide to push forward on this.  If you don't mind asking, here's what I'm curious about.

The only component that isn't called out by model number is the rotary encoder.  Do you have any recommendations, or should any work?

In the schematic, it looks like one of the opamps has inputs connected, but nothing is connected to the output.  On the PCB it's not connected at all.  Is the schematic just a bit out of date?

Are the opamps there to clean the signal from the rotary encoder?  I would have assumed the encoder's outputs could have been directly connected to the D flip-flops and the AND gates, but I assume that the opamps and poteniometers were necessary to clean up those outputs?

The third opamp appears to be acting as a NOT gate; was that just easier than trying to put another chip on the board simply for a NOT?

It looks like the button triggers only fire when transitioning from 01 or 10 to the 11 state; other transitions don't appear to fire a button.  Is only triggering on one of the four transitions good enough?

Are the LED's there just to help debugging the circuit before hooking it up to the PSX?

And finally... Do you mind if we use the PCB diagram (or derivatives) to order our own boards?

I know it's a lot, and like I said, if it's a bother, don't worry about it.  I just like knowing all the details.

Thanks for the help!

phreak97

#22
the whole point of posting the pcb file WAS so you could order your own:P

i think any rotory encoder will work, but if you dont want to trust me, wait till i get the answers from my friend, he said he'll answer it all once he's free.. i kinda caught him at a bad time.

ps. if you think you know how to make it more accurate, go for it..

FoxFireX

Quotethe whole point of posting the pcb file WAS so you could order your own:P
Heh.  Fair enough.  Okay, you know what?  I'll go ahead and order some pieces and a breadboard, and just start playing with it.  That's what the point is, right?  Thanks for your help!

phreak97

no problem. but hey, if you do get it even more accurate, will you post it back here?
thanks;)

FoxFireX

Hey, absolutely.  I've ordered up a grab-bag of parts to play with, enough to try out the circuit as designed, and some other parts that I think might work out better.  I also have a lead on what may be a single chip that could cut out four of the six in that schematic, so if I get a hold of one, I'll try that as well.

In any case, once I've got a good solution, I'll try to work up the PCB so that it'll fit in that expresspcb.com's "3 for $51" prototype deal.  I know I could buy lots of homebrew stuff to etch the boards myself, but there's something really attractive about professionally printed circuitboards.

jpgranone

Hello,

OK, so I am new-be here and don't know where to go.  I am looking for the pin outs on the PS2 analog sticks.  I am working on combining the chassis of an RC controller with the PS2 controller in order to use it on my racing games.  Any help would be appreciated.

Thanks
Jeff

FoxFireX

Well, a little bit of searching turned up this link, which may or may not be what you're looking for.  It describes the pins which connect the controller to the console, and the serial data format that at least the PSX generation controllers sent.  It doesn't appear to cover PS2 specifically, and I'm not sure if the specs there are compatible with whatever games you're wanting to use this for, but it may at least be a start.

In regards to the IIDX project, I was disappointed with the last encoder I tried, so I have a couple of new ideas I'm trying out, but I've been rather hard-pressed for time.  Hopefully this week I can put a few more hours toward figuring something out.  If I get anything promising, I'll post details for anyone interested.

phreak97

jpgranone, the ps2 analogue sticks use a variable resistor for each axis, you should be able to work things out with a multimeter.

about the iidx con: *phreak97 awaits results

FoxFireX

Braaaaaains!  (Topic back from the dead. :))

I was just doing a random search, and noticed I had started this topic absolutely ages ago, and never came back to share the results.  Short version of the story:  After many long hours of experimenting, testing, tweaking, and ordering two sets of prototype boards, I finally came up with a working circuit, and successfully built a pair of fully-functional custom controllers.  If anyone's interested in how it came together, I put together a page with pictures and descriptions here.

phreak97

far out, you went all out with versatility.
one note though, theres no "i got help from other sources, thanks" or anything warm and fuzzy feeling like that:P
excellent work there though. i think a few people are making their own now, my friend bought a high quality homebrew asc not long ago. better than a real asc he claims.. id offer to take a look inside, but after my prank on his popn con (i put some somewhat distasteful images in his buttons, which im sure he doesnt know how to change), i see that as an unlikely possibility. hahaha