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

Ah… yeah… I think that was an early ad, so that was probably from before they canned the link cable.

DogP

Not that I remember… do you have a link to one that does? If you look in the graphics of Mario’s Tennis, there is 2P graphics, but I haven’t figured out a way to actually play 2P (it’s not natively supported, as there’s no 2P options w/ a link cable hooked up). The only game I know that advertised 2P was Virtual League Baseball (in a magazine ad), but I haven’t found any reason to believe that it actually made it into the release (and the box didn’t say it supported 2P).

DogP

Aww… you’re not instructing them to eat the instruction and precaution booklets before operating any more? In 10 years, there’s gonna be rumors about how a German guy mistranslated the read instruction booklet precaution, and the “misprint” boxes are gonna be highly sought after 😛 .

DogP

No… there’s no official link cable, and no official games use the link cable. I’ve used the link port in several simple homebrew games/apps/demos, and others probably have as well… hopefully the link will be used more in the future, but so far, nothing has been impressive enough for anyone to create a link cable for others to use (I just use a hacked connector with a network cable).

DogP

Cool… well written and well researched, but not without some errors. Much better than most articles that just go on about how bad it was and how you’d get a massive headache after playing it for 5 minutes 😛 .

DogP

Yeah, I had no idea the tape was messing up until I tried to play it back… but I’m too lazy to re-record everything :/ . I’ll definitely get a Wii MotionPlus once they start selling them… I believe it adds a gyro, so rotation on the horizontal axis (yaw) can be determined (a 3-axis accelerometer can only detect pitch and roll from the x,y,z readings).

I don’t know about doing i2c directly on the VB… it may be possible with some extra hardware, but it’d take some thinking. You’d need both outputs and inputs connected to the lines since you have to output data and the clock, as well as being able to read the actual value (emulating open drain). I personally don’t like i2c because there’s lots of weird stuff (open drain, start/stop/ack bits, clock stretching, typically slow clock, etc). It’s not just a simple clocked interface like SPI where there’s a master that controls the bus to talk to a slave, with dedicated Rx and Tx lines. Even if you could get the VB to do something somewhat compatible, it may not work w/ the Wii controllers, since I’ve read several posts of people trying to talk to them, and getting strange readings due to timing. I think they said the chip used can handle VCC=5V, so that would make it a little easier.

DogP

Okay… if this isn’t cool, I don’t know what is: http://www.youtube.com/watch?v=WkRTIhf2O1A 🙂 . First, it’s using the 3-axis accelerometer on the Nunchuck to compute pitch and roll, which controls the ship/plane, and up/down on the analog stick controls zoom.

The second part of the video shows the VB Controller emulation w/ the Classic Controller. You should be able to see this video better than the last, since I hooked it up to my TV adapter, which I connected to my new (old) projector (although my camera/tape seems to be glitchy). Playing a giant VB on the wall is pretty sweet 😉 .

DogP

Yes.

DogP

Not sure if anyone cares, but i played around with this a little more and have Wii accessories (Nunchuck/Classic Controller) working. I forgot about the Classic Controller, but the configuration works great for the VB. I also didn’t realize that the Nunchuck actually has a 3 axis accelerometer… it seems like any Wii game I play just has you shake the nunchuck, so I figured it had some sort of shake sensor. So, I may be able to do some cool stuff with that.

DogP

Ah… cool, thanks dasi!

DogP

Just in case anyone is interested… I added in the ability for this to do PWM to give analog control in native digital games (press the direction proportional to the analog value). I expected marginal results, and that’s pretty much what I got.

Some games work okay and give pretty good control without any major flaws (Vertical Force, Space Squash), others kinda crappy (Wario Land, Mario Clash, Mario’s Tennis)… basically the animations make it look pretty stupid as (W,M)ario rattles across the screen. Other games have bad flaws (Insmouse, Red Alarm) where the repeating analog when the joystick is only partially pressed causes multiple actions (running fast down the hall or multiple strafes)… properly used the repeat could be useful (more presses for more analog rather than more pressed time for more analog)… the analog flight control of RA isn’t that good anyway though, although the analog aiming in Insmouse is okay.

DogP

Just wanted to post this in case anyone’s interested… it’s the VB library to work w/ this hardware: http://home.comcast.net/~virtual.boy/VB/ps2_lib.c . It can also be useful as an example for doing software controller reads, which I don’t know of any others available.

DogP

BTW, I just saw something last night that I can’t believe I’ve never seen (or don’t remember seeing)… on the bottom of the VB, it says RATING: DC6V-DC13V. So, that probably is why the rechargable batteries aren’t suggested, since it’ll drop below 6V much quicker than Alkalines.

That’s also nice to know that we can use a 6V-13V DC power supply. Heh, I guess I really don’t read the fine print 😉 . I also run the VB by just powering the 5V line with regulated 5V quite often and have never had any problems. I’ve only slightly investigated whether it’d be okay long term though (i.e. won’t damage internal regulator), so I can’t say I recommend it though.

DogP

Okay… I posted the video to YouTube: http://www.youtube.com/watch?v=6cWpbAxbKDk . The video quality isn’t great, but hopefully you get the idea. The first part shows it playing Red Alarm, the second part is my homebrew app showing the rumble. The large rumble intensity is the Left Analog stick value, and the small rumble is enabled w/ start and disabled with select (the small motor is either on or off). I couldn’t get a good video of the app, so I took some still shots and put them at the end, but you have to use your imagination to be able to read it (stupid YouTube compression :P)… it basically just displays all the values related to the controller. You can download it here: http://home.comcast.net/~virtual.boy/VB/ps2_controller.VB , although it doesn’t do any good since the emus don’t support software read anyway (with a regular controller plugged in, native still gets updated).

I’m using the Parallax Propeller uC… it’s really a great chip. It can do a whole lot, and with 8 cores, I can have multiple simple “processes” running in parallel, with access to common RAM. In this application, I have one core running the PS2 controller code, one responding to the VB, and one converting the PS2 controller data to VB “native” data. There’s a pretty good community of users as well, and lots of example code.

About talking _to_ the uC… I’m doing it by sending clocks while the latch is high. The uC counts the number of clocks, which gets translated into data. It’s very inefficient, but works without causing any problems for a real VB controller, since a real controller doesn’t clock out any data until the latch goes low. I have 8 levels of intensity for the large rumble motor, and if it’s an odd number of clocks, the small motor runs. So, I have 17 clocks under the latch for full rumble with both motors.

Since the pins are software controlled, I can send data using the latch pin as a data bit and of course the clock pin as the clock… but that doesn’t work well during controller reads or for compatibilty since arbitrary latch changes would confuse when it should be clocking out data (I’m sure something could be figured out, but it’s not a simple scheme like the current). That’s how I’d do the firmware updates, custom key maps, etc. though (I could have it enable that mode by doing 30 clocks under the latch or something).

And yeah… I should add them to the Wiki… just like I should update my website… but yeah… you get the idea 😉 .

DogP

Yup… that’s how I’m doing it… the first 16 bits are emulating the VB key map for backwards compatibility, then if the system keeps clocking, the next 16 bits are the raw digital bits from the PS2 pad, then the next 32 bits are the analog sticks, then the next 96 bits are the pressure sensitive buttons. Of course it requires a software read to do that… any existing stuff that uses a hardware read will just see it as a normal VB pad.

I got some functions written last night that allow me to easily integrate this, basically as easily as vbReadPad(). Just call handle_ps2_ctrl(&controller); and it fills the controller struct with the native data (so you can do controller.native&K_STA for the standard VB stuff), along with the PS2 digital, analog, etc. There’s also a rumble value (small motor on/off and large motor speed) which you can set, and that function will control the rumble.

Anyway, I haven’t gotten a chance to get a video of it, but I’ll probably post one later tonight.

BTW, would anyone else be interested in this? I could easily make a small PCB with this and a small connector on it, which accessories could be plugged into. It’d probably involve cutting your controller cord and wiring this inline, and maybe having a small plastic box that either sits in the middle of the cord, or attaches to the end of the controller, plug end, or ferrite ring.

The parts are pretty cheap, and the PCB would be small, so it really wouldn’t cost much… I’d consider doing it just for myself, but if nobody else is willing to cut their controller cords to wire this in, I’d probably just keep my hand-made proto. It’d be really cool if we could get some homebrew going with this… IMO there’s really a lot of potential with it (new gamepads/joysticks, keyboards, mice, etc).

Key remapping could be done with this, since I’d probably make it so the entire controller is piped through the uC, selectable w/ a switch… that way it’d be really easy to connect (all VB controller pins go to uC, some I/O goes to VB pad, others go to accessories for PS2 controller, mouse, etc). Then this would give you expansion by flipping the switch, and not take anything away.

I’ve never tried connecting a PSX pad to the link port… it may be possible, I dunno. I figured there’s lots of ways to get a new controller on the VB, but I picked this one since IMO it’s only really good if it’s backward compatible w/ commercial games, and adds new functionality.

DogP

No… the VB doesn’t idle, because it doesn’t have threads. It’s just native execution of your code… no OS or anything else.

DogP

LOL! Steel Battalion VB 😛 . I actually don’t think you could do that one as easily because the xbox controllers are basically USB, and the microcontroller doesn’t support USB (so you’d need to add a USB host chip… which is doable, but I don’t have one installed). Same with a Wiimote… since it’s bluetooth, you’d need a bluetooth controller. I think the nunchuck is i2c, so that could be done natively, but meh. Dreamcast had some pretty cool controllers, and should be relatively easy to implement (Samba De Amigo VB! 😉 ).

Heh, but yeah… it should be pretty cool. I’ll probably do a mouse/keyboard for convenience, although we can already use the SNES mouse natively with just a software read (heh, this could allow a PS/2 mouse to be used on Mario Paint on the SNES too). Something I think would be REALLY sweet would be an accelerometer attached to the device, then make a good head mount, and we could have head tracking, but I still haven’t seen or thought of a good head mount (besides LCD glasses w/ emu or VB->VGA). An accelerometer could also be used on a gun controller so we could aim a gun without needing a screen to point at (just so there’s a cursor on the screen to tell us where we’re pointing).

One thing I just thought of… I could make a VB app that allowed you to configure the board for custom settings from the VB (key mappings, sensitivity, etc)… I guess even update the firmware. Now if we just didn’t have all those stupid custom connectors >_<. Anyway... I'll keep you guys updated... to start, I'll probably throw together a quick analog test for the PS2 controller with rumble tonight, then maybe a keyboard/mouse for fun. DogP

LOL, that’s hilarious… oh wait, it is??? And how is it related to PVB? Try posting a want ad here: http://www.vr32.de/modules/catads/index.php .

DogP

Yup… I doubt I’d release a game in a day unless it’s actually finished… more than likely it’d be GIAFD (Game In A Few Days), where I basically devote a whole day to coding, then tying up some loose ends over the next couple days. Unless of course there were a bunch of us doing a GIAD, then I’d release whatever I had so we can all enjoy them at once.

But no… Mario Kart is dead… I’m sick of it… heh, j/k! I’ve got a cool hardware project I’m trying to get done first, then I’ll get back to it.

DogP

Yeah… but many have not also :P.

DogP