Universal PCB (eventually) thread

I would recommend you try a project box setup for both if you can’t fit the PCBs inside the case. My reasoning is this: It sounds like you’re going to be doing the work of putting the boards in a project box anyways. If you make them both project boxes connected to the UPCB 15 pin dsub, you can easily drill a little hole in the 360 project box for a Guide button switch. Trying to go the route you described will be one hell of a lot more work that you have to go through. The d-sub connectors will be a ton larger, a whole 'nother one will have to mounted on the case and wired up, and the wiring of the pads will be more work since you’d have to remove the cable, solder the cable to a 15 pin d-sub, wires the spots for the cable on the PCB to the 25 pin d-sub, etc.

As long as you put in a button on the box for guide, you would also gain all of the functionality of the guide button, such as turbo and button remapping. If you went the way you described, these options would not be available to you.

Now, if you still want to go with adding another 25 pin d-sub, the way you describe it will work, but only for one piggybacked system. Each system has two pins it communicates over: DC_1, DC_2, X360_1, and X360_2. You have to make sure those four pins are present on your 25 pin connector. When the UPCB sees a piggybacked DC cable, it will connect the DC_1 and DC_2 pins to the cable; ditto for Xbox360 and the X360 pins. There is also the XBOX_PB_SELECT and DC_PB_SELECT lines; you can skip those or keep them if you like, they would not be required. That leaves 17 pins for all of the buttons, directions, etc, and those are all shared between both of the PB connectors. All of those have to go to your box.

I’ll go with the project boxes then. You have a point that it would be a lot more effort for the gain of a single button that could be placed on the project box. Soldered together the dreamcast one last night, and it worked great except for the start button toggling rapidly; I took it out of the enclosure, checked connections, tried it again, and it worked perfectly. Put it back into the enclosure and it stopped working entirely (but only after I plug in the stick - the pad itself still works fine on its own, but when I plug in the stick it goes non-responsive). So blegh… will have to spend some more time troubleshooting tonight.

Thanks for the advice, and the quick reply! STGT '08 on the shmups forum is coming up, and I want to be set with a good working stick for it :slight_smile:

Just a reminder that if you want to preorder an assembled UPCB, today is your last day to do so, so get on it.

D-sub twister indeed. After 4 hours of testing and verifying and testing and reverifying my cables I discover that I wired my boardside DB-15 the wrong way. I think I’m going to draw a diagram displaying how to wire your DB-15 with ribbon cable and how the ribbon cable clamp makes things less straightforward than they seem.

Is this on board you built yourself? I know it sucks that the IDC numbering scheme doesn’t match the d-sub numbering scheme, but everything is straightforward as long as you keep with the schematic.

Yes. This is on the board I assembled, and this is the only solid problem I ran into. In related news, as of this writing, computer detects it fine. :smiley: I tried using my keyboard hub and that didn’t work out for some reason, but as soon as I plugged it directly into my computer it was recognized and I saw it in the joystick utility. Unfortunately the instructable stops right before you attach the ribbon cable, so I, foolishly assuming that it was left out because it was dead obvious, just went 1:1 with the ribbon cable; top row, bottom row instead of zigzag. Re-soldering DB connectors sucks (especially if you did a fantastic job the first time), but at least it wasn’t a crimp-style connector. Going to update firmware now :smiley:

There’s a 16 pin IDC->D-sub 15 cable that a lot of motherboard manufacturers included for the game ports on their motherboards, and it looks like all of them do the zigzag pattern. I pinned out the IDC connector to match that. I’ll update the instructable for that when the parts get here.
Enjoy the new stick!

Tried the CORRECT hex file this time, and no popup error, but I do get a warning: failed to program CONFIG DATA

Windows detects it ok aaaannndd…
yes, buttons work ok in Joystick utility.

Need for concern?

No need at all, that’s expected. The “failed to program CONFIG DATA” comes up on all the most recent versions.

I guess I should update that part of the Instructable as well :slight_smile:

Alright. First issue that might not be my fault. This is quite a bizarre problem. Everything works fine by itself, but if I hold 6 for a few seconds, then hold weak kick (short, I think? Windows maps it to button 8 for me) for a few seconds, then try to push med. punch (strong? button 4 in windoze) the button press and release registers WAY late, sticks, or just doesn’t register at all. In fact, it seems to happen with ALL the other buttons when right and short are held down.

EDIT: Man this is so weird. If I hold 9 and Short things work normal, if I hold 3 and Short things work normal, but if I hold 6 and Short the PCB generates lag spikes or something.

EDIT: Crap. Attempted reflash and now I’m getting Invalid handle error 6 on read. UPCB not work no more :[

First of all, check the resistances of all of the buttons to VCC. It should be the value of the resistor only, about 4.7k ohm. If any of them have significatly less, then pressing that button would cause a short between power and ground. If the resistance is way too high, then the pull up resistor isn’t doing its job, and the only thing the PIC will detect is random noise that gets on the line.

Checking the buttons would be a good idea, but the idea of the board lagging troubles me. It just can’t. The data is requested by the PC or console over USB very often, far faster than humans could detect, and the status of the buttons is checked every time its queried. The only way it to lag is if the data isn’t being sent out for a while, but eventually does send it out. That has to be a wiring problem.

If the bootloader isn’t coming up, go over the troubleshooting steps from a couple of pages back. The Neogeo test aught to fill you in on any wiring issues, or if the PIC ended up getting fried for some reason.

Boards have arrived. The parts arrived as well, but there are at least two problems with them so far; the resistors are the wrong rating, and they didn’t include the 4066N chips. Damnit. Bare PCB’s will be shipped out tomorrow for sure. I’ve got to dig around to see how many spare chips and resistors I have hanging around and get the kits and assembled boards out ASAP. I already placed an order at Digikey for parts, so worst case scenario is they’ll be here by Monday.

Tested all buttons, all check out at ~4.6k (unless this is “significantly less” I guess). Tested buttons when holding 6 and Short. Same results.

Perhaps I should have been a bit more clear with my flashing problems. The bootloader comes up (automatically now, actually): the PC and flasher program recognize the device, but at a random point during the programming I get an error:

“USB Read Failed. Failed with error 6: The handle is invalid.”

and it only gets half programmed. I know this since if I try to manually read it a few times (instead of programming it where it automatically reads it first) it will read after a few of the same errors and I get a hex dump that randomly ends in FFs depending on where the error occurred during the flash process. I’ve got a few example hexdumps for you if you want to look at em.

I’ve got XP SP3, for the record.

Okay, what the shit is going on here. Many developments in the last few hours.

  1. Regarding the flasher. My desktop seems to be having some sort of I/O problem specific to the UPCB. Everything else works fine. UPCB flashing is just a no on my computer and I wish I knew why. Tried it on my laptop and it worked no problem. Which brings me to…

  2. Regarding the button lag/wtf. Again, specific to my computer. I’ve used all sorts of joysticks before: ps2 + converters, PC joysticks, 360 controllers, 360 joysticks, old Gravis gamepads… haven’t had a problem like this with any of them. Again, I can’t seem to reproduce the anomaly on my laptop. Or any of the other computers in my household for that matter now that I try it. I realize that this may be beyond the scope of what you are willing to help with, but if you’ve got any ideas about what the hell is going on here or any suggestions as to how to fix it, please, PLEASE let me know.

Fruitless troubleshooting is one of the worst feelings in the world. Thank god it wasn’t this time.

It hasn’t been fruitless. We know:
Full USB communication is getting through occasionally (it enumerates when plugged in)
USB communication falters after a random amount of time, in both bootloader and game controller modes, and the most likely cause of that is wiring, especially at the d-sub connector. Check and redo the soldering at both d-subs.

I’ll check it again, but this doesn’t add up to me, considering it works fine on other computers.

Checked, rechecked, resoldered, checked, rechecked. Same deal :[ works fine with laptop, doesn’t play nice with desktop.

Ya didn’t mention about it working okay on a system. If you want a step to test if its a software or hardware issue on the PC side, download a Knoppix disk and try Frozen Bubble. I dont know what the buttons do, but if the program is told to use a joystick, the left and right should move the ball chucker. But if the UPCB works just fine on a PC, I don’t know what I can change.

Had a chance to test it on a PS3 today. Didn’t work at all with my button select cable. 60GB PS3, System Version 2.42. Though I don’t think this test has much validity considering the other problem we haven’t straightened out yet.

I know you’re trying to get this working, and we both know we both want this to work. To make that happen, I need you to be VERY clear and complete on what is happening, and what is happening NOW. What has previously worked and what hasn’t doesn’t concern me, because if there was a partial flash of the PIC, then noone knows how it will behave. Your ONLY concern now is to get bootloading done. I don’t care if you have cables for other systems, or other game consoles to test on; it’s all pointless if you can’t flash the board.

First off, scan the board, both sides, and post up the images. A mistake in the assembly could cause any number of problems and should be rather easy to spot. Take a scanner, lay the board down, cover the glass with a towel, and scan. Flip sides, repeat, and post up the images.

Once that’s done, find a jumper from an old hard drive or computer motherboard or expansion card. Jumper PROG and leave it there. It doesn’t leave until the board is fully flashed.

Next, for however many PC’s you have access to, plug it in with the USB cable select cord. post up how many of them saw either showed up as the ‘PIC 4550 device’ in device manager (for PC’s you’ve installed the driver on) or brought up the ‘new hardware found’ wizard. Go ahead and install the driver on the systems that bring up the wizard.

Open up device manager, and find the ‘PIC 4550 device’ entry. Leave it there. Leave the stick on the desk or the groundor where you can that is rested steady without anyone jostling the cable. Just wait a couple of minutes (120 seconds) and if the device manager entry disappears, say so. After the 120 seconds are up, keep your eye on that entry, pick up the stick, put it in your lap, and note if the entry disappears. If not, mash the stick and buttons for a while, and see if it disappears. If not, press and hold the stick in any diagonal direction, and hold down all of the buttons for a 30 seconds, and see if the entry disappears. If not, set the stick back on a level surface where it won’t move, and use the PDFSUSB program to flash it with the newest version.

If all of the PCs you have access to do NOT bring up the ‘New Hardware Found’ wizard, or do not show the device manager entry at all, say so, and I’ll post up further instructions; get the multimeter out.