We're using cookies to ensure you get the best experience on our website. More info
Understood
@dogpRegistered July 25, 2003Active 7 years, 4 months ago
1,461 Replies made

Guy Perfect wrote:
And even in the event they’re the same, it still saves execution on a per-instruction basis, so I really don’t see any down-sides to using them.

Exactly… I’m not saying there’s a down-side (unless it’s more difficult for you to work with because of strange byte alignment or something)… my point was just that a 16-bit transfer will (always) happen in the same amount of time as an 8-bit transfer (double the transfer rate). A 32-bit transfer is still going to require two bus accesses, though only one instruction to do it (so you save a bit, but not double like the 8 to 16). Of course this is all only partially true, since it depends on how the compiler handles it.

There are also other things that can affect speed, but without actually looking at the ASM (or writing the ASM from scratch), it’s gonna be hard to really optimize. Things like branches (3 cycles for branch taken, 1 for not… so you want to program typical case NOT to take a branch). Also for pipelining, you want to avoid hazards… and multiple consecutive loads are good, but multiple consecutive stores are bad. You can actually have your 32-bit load take only 1 cycle, but only if it’s done after an instruction that takes several cycles. But you always save a cycle for consecutive loads. And a 32-bit store only takes one cycle for the first, but then 4 cycles for the following consecutive instructions. But if you’re writing the code in C, you’re kinda at the mercy of the compiler.

IIRC, DanB (maybe?) had tried copying memory with bitstring functions, but I don’t think it was any faster. Obviously there’s no such thing as a free lunch, but there should be less instruction overhead… but IIRC, the instructions take quite a few cycles to execute than standard load/store. You might want to look into what he did though.

So basically… I’d recommend at least writing an inline ASM copy function (IIRC, I posted a general purpose memcpy type one years ago with benchmarks)… but if you really want to get every last bit out of it, you’ll want to optimize that even further for your needs (unrolling the loop, consecutively loading up multiple registers, etc.). Of course the optimization parameters depend on data size, alignment, desired code size, etc.

DogP

Guy Perfect wrote:
The instruction cache is, hands down, the best way to accelerate your code when you need to load a lot of stuff from ROM.

Yes, the cache is definitely a good way to boost your speed (not necessarily just for loading from ROM, but any high performace loop)… though it is only 1K (128 x 8 byte blocks), so you want to enable/disable it wisely. Just enabling it at boot and leaving it on isn’t likely to be very beneficial (cache contents are saved across enable/disable, so just enabling it for loops where performance matters is ideal).

And yes, even though it’s a 32-bit CPU, (I’m almost positive) the CPU is running in 16-bit bus mode to any RAM/ROM/peripherals… so 16-bit transfers are very beneficial over 8-bit transfers… but 32-bit transfers are less beneficial, since it still causes two bus transfers (though it’s handled automatically, so it’s two bus transfers, but only one 32-bit transfer instruction, rather than two 16-bit transfer instructions).

DogP

Oh, and not that anyone would actually want to do this… but connecting pins 5 and 6 on the same VB also causes the same effect as connecting 5 and 6 between both systems.

Something that’d be interesting would be to drive this with an external clock at higher/lower speeds, and essentially speed up/slow down the games (and make it narrow/wide screen :P). I dunno how far away from 50Hz this will lock, but it’d be interesting to find out (if my function generator wasn’t broken, I’d try it right now). The games might freak out if they’re constantly hitting overtime, but that’s part of the fun. 😉

DogP

Yep… that pretty much sums it up.

The COMCNT pin is open drain, which basically means either side can drive it low, but neither can drive it high (it’s internally pulled up, so if nobody is driving it low, it’s read as high). This gives a simple 1-bit bi-directional communication channel for anyone to use.

There are a lot of uses for it, but essentially it’s for any sort of “out of band” signaling. This could be used to determine who’s master/slave, tell the system that another VB has been plugged in, signal that someone is starting a game, acknowledge receipt of a message, etc. Since the regular link communication is synchronous, with a master/slave… things like that are a little bit tougher, especially before the master/slave relationship has been established (unlike an asynchronous system like RS232, where either side can independently talk at any time).

But yes… the pin isn’t needed for the standard link connection… it’s just an extra general purpose pin. They called it COMCNT, probably because they expected it to be used for controlling communications between the systems. But I’ve used it as a simple on/off to control a rumble pack (though there are much better ways to do that). It’s also convenient to use as a slave select, since the serial protocol is essentially SPI… so you could (slowly) talk to SD cards, or any of the MANY other SPI devices out there.

DogP

RunnerPack wrote:
If you want half-vias for better solder access, couldn’t you keep them far enough away from the board edge for their liking, and just cut them in half yourself when you’re cutting apart the cables? It would be a bit tougher on the cutter, wouldn’t it? I like the idea of staggering them for more support over the whole length, too.

That’s what I was initially hoping to do, but the rules say 0.2mm hole, plus 0.2mm annular ring, which makes a 0.6mm pad… meaning the vias side-by-side at the end of the cable won’t fit because they’ll be touching (that connector is 0.6mm pitch). So, basically, I’d have to stagger them, which means I can’t (easily) cut them by hand, because they won’t all be in a line.

RunnerPack wrote:
Since they’re plated through, wouldn’t whole vias still work if you tin the pads (on the display), add some flux, then heat the top of the via? I’m not sure I like the idea of wrangling thirty separate .6mm wide fingers…

Sorta… except a 0.2mm (~8 mil) hole is pretty difficult to get solder to flow through, especially with any strength/reliability. By slicing the via in half, it becomes similar to a SMD pad, and you can get a nice solder fillet on it.

And you wouldn’t have 30 fingers… just 15. 😉 Though there’s probably no reason to actually seperate the ends of the fingers, since they allow internal cutouts (so on the upper vias, I’d just slice the via and leave enough room for soldering iron access and the solder fillet).

bigmak wrote:
This is one of those topics that I will try to find in a year and never be able to track it down..any way we can copy the info and start another post under development ?

Maybe KR155E can do it and make it look nice? Otherwise I can just copy everything into a new thread with quotes from the various people.

DogP

Yeah, recycling the existing one should work… I had no problem peeling it off and re-sticking it to a destroyed cable (the adhesive tape stayed on the stiffener). I think that might be the best way to go (or just re-creating the stiffener with some other material). I tried using 3 VB cables in a stack to get an idea how stiff a triple-thick cable would be, and I think it’d still be pretty flexible, and annoying to try sticking into the socket (though I’ve noticed that lots of FPCs feel different… some are really flimsy, others are pretty stiff).

I looked more closely at the specs… the vias at the bottom of the cable will be a little bit tricky. When I quickly looked at them last time, I had seen the 0.5mm hole to hole spacing… but looking again, I see 0.2mm minimum annular ring and 0.2mm minimum hole diameter, which means the via pad has to be 0.6mm in diameter… which is the pitch of that connector.

I think they could be staggered, which would actually be nice, because it’d add support at the top and bottom of the connection to the display… but I really want the vias to be cut in half, exposing more copper to give a nice solder joint, rather than trying to get solder to flow through a 0.2mm hole. But this will require a route down every other finger, slicing into the via… but their rules say min copper to outline is 0.2mm. So if their DRC doesn’t complain about having vias cut in half, and narrow strips of material routed out, then we should be good… but if those are strict rules, I don’t think that’ll work. Looking at their example picture, it looks like they do allow copper to the edge though, which technically violates that rule.

We’ll see what they say. 🙂

DogP

There has been some talk about this recently. My best guess is that the optos are either beginning to fail, or getting dirty. I haven’t personally seen one like this, so I’ve never gotten a chance to debug the problem.

DogP

Doh… you got me excited. I read the title and thought you figured something out. 🙁

DogP

RunnerPack wrote:
Instead of printing them at home, one could have replacement cables made professionally (but you have to buy 50 at a time…):

http://imall.iteadstudio.com/open-pcb/pcb-prototyping/2layer-flexible-printed-circuits-fpc-10cm-x-10cm-max.html

Five cables fit on each of the ten “boards”. If you max them out with the 0.3 mm copper and ENIG (I don’t think black substrate is a worthwhile expense ;-)), they come to US$92 + shipping (which is a quite reasonable ~US$1.84 per). They’re double-sided, so they should be easier to solder and probably more durable (I also had the idea to add vias in the traces so the two sides can share the work; kinda like stranded wire with two strands ;-)). They don’t include a solder mask (can you even use solder mask on FPCs?) so, even with the gold plating, it would probably be a good idea to use some kind of compliant coating (packing tape? paint? PlastiDip?) to protect them.

Hmm… that’s an interesting idea. I’ve had FPCs made for work, but they were MUCH more expensive… so I kinda discounted that idea of getting them manufactured. We’d definitely want ENIG, since OSP wouldn’t be suitable for a connector. And yeah, there’s a soldermask, though it’s more like a tape kinda material. You can see it on the stock VB cables.

I could easily order my design… I’d just need to export the gerbers. Their specs are actually pretty impressive… it looks like we could add a via in every pad on the display side. If we made them identical to the stock cable, we’d need 0.1mm, but then we’d need to add a 0.2mm stiffener for the motherboard connector. If we just made the whole cable 0.3mm, I think it’d probably be stiff enough to go in/out of the connector… and I don’t think there’d be any down-side (unless it’s not stiff enough to go into the socket… then there’s no room for the stiffener).

I’ll look into this and keep you guys updated.

DogP

Yep… carefully clipping the leads should work. You should be able to pick up a fiberglass pen at Radio Shack, or an auto parts store… or probably a lot of places online. It doesn’t leave many fiberglass bits behind, but I just blow away any that do come off (the biggest thing to watch out for is getting them in your finger… they prick you for days, and it’s really annoying). Watch out though… it seems that a lot of these, including Radio Shack’s (according to the reviews), are actually nylon bristles, and don’t work well.

About soldering… I just use whatever cheap liquid flux I have laying around, and solder it similar to drag soldering any component. Kinda like this: http://www.youtube.com/watch?v=wUyetZ5RtPs . Maybe I’ll try making a video next time I fix a display.

If you pulled the cable off, it’s probably still fine, as long as you put it back on carefully. To solder, you don’t need any of the original connection… the adhesive is nice to support the cable though.

I’m out of town this week, but when I get back, I should be able to get these cables printed fairly soon. I’d really like to get the other guy’s cable finished, since I’ve had it much longer that I wanted to already.

DogP

SirGuntz wrote:
Yeah a new ribbon cable definitely looks the way to go, the only hard part would be getting the ribbon cable socket off the main board. Well, that and getting a ribbon cable I guess haha. I have no way of printing something like that, I’d have to wait for someone else to start making them. Let me know if you get that printer working again.

Yeah, I’ll get it working again (I print boards too often to give up on it)… I just haven’t had time to mess with it in the last couple weeks (I just finished this cable design a couple weeks ago). To remove the socket, I’d either use hot air, or Chip Quik… either one would make it pretty easy.

SirGuntz wrote:
I did actually try to use the original ribbon cable for the left display, it’s just I didn’t have a fiberglass pen or anything so I tried to burn away the plastic, the cable got really mangled and was hard to work with. I tried to make the best of it but I gave up after that and switched to wires, which at the end of it all, weren’t actually better than the ribbon cable… I could try the soldering method again on the other cable, but I figure the same thing will happen again. Those ribbon cables are extremely, extremely fragile, they don’t take heat very well.

Yeah, the fiberglass pen is really helpful because it exposes bare copper without any heat. I’d definitely pick one up. Without it, you need to basically burn off the coating, which as you found out, subjects the cable to a lot of heat. Once the copper is exposed, it’s just a matter of using flux and solder and quickly moving across the cable.

SirGuntz wrote:
I need to find a thinner tip for my iron some time… That’s part of my problem here. It can easily touch two traces on those ribbon cable solder pads.

You should be able to do it with just about any tip (I use a standard conical tip). Really, you just want to use flux and lightly drag a ball of solder across the contacts. There’s no need to individually solder each pin (which is one reason that soldering the cable is much easier than soldering individual wires).

DogP

DPsx7 wrote:
It’s not easy to explain but I’ve been able to play mine without any issues other than the expected blindness by bright lights once you’re finished. Ha.

And dry eyes from not blinking enough after playing SD Gundam for 5.5 hours straight. Not that I know from experience or anything. 😉

DogP

This is kinda related to something I’ve been working on for someone else here. They damaged their original cable beyond repair, so my original plan was to draw up a 1:1 exact copy of the cable, so I could print/etch it, and cut/splice it together. The 1:1 copy was very tedious to get exact, because some of the traces near the ends are curved, and the gap isn’t consistent, etc… but what I did do was make the ends and the middle exact, so you could either reproduce the entire cable, or any portion of it and splice it at any straight run of the traces. Here’s a rendering of it:

It seems like you have some pretty good soldering skills, so here’s my opinion. Rip up all the wire you soldered and pull the socket from the motherboard. Solder the replacement flat flex cable (discussed above) to both the display and motherboard. It’s MUCH easier to solder a cable with traces already perfectly aligned, than trying to solder individual wires. Then use some kapton tape, epoxy, or whatever to provide a little bit of strain relief.

The reason I suggest pulling the motherboard side socket is because my experience with flat flex cables that I’ve printed is that it’s a little bit thinner then the stock cables (and you’d need to add a stiffener to push into the socket), and the exposed copper oxidizes quickly, making poor contact (liquid tin might help that). Also, I print single sided, and if you want the contacts down for the connector, you’d need the contacts down for the display side. That makes it really easy to get solder bridges, or other inadvertent shorts.

Of course you’re gonna ask… “so how do I get one of these cables?” Well, I’d be glad to mail you one, except that I haven’t successfully printed one myself yet. The laser printer I usually print boards with hasn’t been sticking very well, and has been leaving lots of pits, so I’m guessing the last time I replaced the toner, I got the cheap stuff (well, I bought the cheapest stuff I could, so yeah). 😉 So, I gotta try another printer and see if I can get better results. I just haven’t gotten a chance to do it.

On the other display, I’d just solder it the traditional way. I doubt that the kink has broken the cable, unless you can clearly see otherwise. It’s common for the display to seem completely dead, just because of bad contact at the display.

Just curious… why didn’t you try the normal solder method on the first display?

DogP

Attachments:

Sounds like fun! I doubt I’ll have time to make a “contender”, but maybe I’ll get a chance between now and January to put something together that’s at least enjoyable.

Are ports fair game? This seems like a great opportunity to finally get a Doom or Wolfenstein 3D port on the VB. 😉

Definitely looking forward to seeing what everyone comes up with.

DogP

That looks (and sounds) REALLY good… great job! I haven’t gotten a chance to try it out yet, but I watched a video of it on Youtube:

From that video, the only things I notice is the speaker pop, and to me, it sounds too high pitched (could be the video). I have an SFII:CE arcade game in my basement, and the elephants especially sound really high. I haven’t played the PC Engine version though… so maybe they’re high pitched in that as well (or maybe I’m just imagining it).

If you’re interested in adding link cable support, I’d be glad to send you a cable.

As far as legal issues… I think you definitely picked the right company. In the past, they’ve been very lax about fangames (there are a lot of Mega Man fangames), and several have even been featured by Capcom itself (I mean even this made it to their German facebook page… cool!).

Here’s a quote from a Capcom VP (which is cool that they’re even reading and replying to fangame kinda questions), and I remember seeing something to this extent elsewhere on Capcom’s site.

From a legal standpoint, we can’t possibly sanction fan games (we run the risk of being viewed as not protecting our IP and therefore could lose the rights). Are we likely to proactively go after something, not likely. But as always, if you have to ask and we’re forced to give an answer, the answer is not likely to be what you want it to be.
———-
Christian Svensson
Corporate Officer/Senior Vice-President

(from: http://www.capcom-unity.com/ask_capcom/go/thread/view/7371/28095465/What_is_Capcoms_stand_on_fangames&post_num=13#504146063 )

DogP

Yeah, I’d just remove it and keep it flat for a while. The replacements shipped flat, so that shouldn’t be a problem.

RunnerPack wrote:
Also, the fact that you’re wearing a red shirt in that photo isn’t irony 😛 😉 It probably falls under the heading “coincidence”.

http://www.youtube.com/watch?v=32LCwZFoKio 😉

DogP

If you replace the switching DC-DC regulator with a linear regulator, be sure you heatsink it well (especially that small of a package), because it will be making a decent amount of heat. I’d guess typically around 1 – 1.5 Watts of heat. Also, if you run on batteries, your battery life will suffer.

Since that regulator is an LDO, it’d probably make sense to lower your input voltage, so it generates less heat (either replace one battery with a dummy, or use a lower voltage wall wart). If you use the standard power supply/batteries, you might as well just use a 7805.

Though if you’ve been getting 8V on the 5V rail, your electronics may be toast anyway. :/

DogP

Can you clarify what/where you’re checking?

With 6 good batteries, you should get ~9V, not 6V. Also, the 5V is regulated inside the system, so if you’re checking for 5V at the controller (unplugged from the system), you won’t get it. You should get 9V (or whatever your actual battery voltage is) at pin 6, not 5V. If your voltage is that low, I’d replace your batteries, and/or check the contacts on and in the battery box, as well as on the controller.

Do you have a game in the system? It won’t display anything without a game, though you will hear/feel a faint vibration of the mirrors moving inside (and you can see it if you look through the eyepieces… shining a flashlight in helps).

If you have it all connected, and your 5V is missing, it sounds like you have a dead regulator.

DogP

RunnerPack wrote:
Nah, I think a decade is a good run as a PVB member; RunnerPack is out! Peace!

Don’t let the door hit you on the way out! 😉

Wow, we are coming up on 10 years as PVB members… I’m one day older than you! 😛

Usually it’s not the regulars that you need to worry about never coming back. It’s usually the people that register, post a help question (like this)… we give a nice long reply, and then they never show up again… good to see you made it back. 😉

On topic though… I’d first swap batteries, if you’re running from batteries. The red light is a good sign… that’s basically saying that the voltage regulator is getting power, but if the power is marginal, it’s possible that the light could turn on, but not have enough juice to run.

I’d also verify that connector P4 is connected properly, as well as the connectors that go to the mirrors. When you power the system up, the mirrors should immediately start moving. The mirrors moving is a critical part of the system… at least some games (maybe all) won’t start until the mirrors are moving, and if they don’t move, or stop moving, the displays turn off. Which game are you testing with?

You could also simply unplug (and leave unplugged) the display cable you messed with before. It’s possible (though unlikely) that the cable is crooked or damaged, shorting something. Leaving that unplugged won’t hurt anything (don’t plug it in while powered on though).

But yes, learning how to use a multimeter is a great skill, and would be very useful in troubleshooting this. You should see if any of your friends know how (the kind of friends that install car stereos), or maybe a relative.

DogP

I had a few spare minutes tonight, so I printed the clamp. Overall, it’s functional, and close to what I wanted… though not perfect. The good news is that my display works with it… the bad news is that the display is soldered, and was already working. 😉 Attached are a bunch of pics.

Improvements that I think should be made:
-Thicker back (it flexes more than I’d like, and since there are only two corners with screws, that’s a bit of a problem). On my printer, it’s only 4 layers thick. It can’t be too thick, or the screws won’t be long enough, though an option is to recess the screw holes.
-Thinner bulge. I was hoping the bulge would have a bit of a slope to it to press evenly on the cable, but it’s too thin for that to be realistic, and right now, pretty much the entire thing is two layers thick. I think that whole section should just be one layer thick. It might even be better with no bulge, since the cable already adds thickness between the clamp and the display PCB.
-Shorter curl. It doesn’t really stress the cable, but with the IPD all the way in, the cable has a tighter angle than I’d like. It really just needs to keep the cable bent toward the motherboard, which can be done with a much shorter curl.

One suggestion for printing… I’d recommend 100% infill. I had my default of 20%, and I noticed a slight bit of sagging in the bulge, where it added one layer of infill. Most of the time that’s not a problem, but here, we want to spread the force as evenly as possible, so the surface needs to be as even as possible.

Maybe I’ll get around to modifying this some day, or if any of you do it… please post it back up.

DogP