Click to See Complete Forum and Search --> : An interesting problem


brkfstscone
10-12-2004, 10:43 AM
Hi.

I'm taking a programming class and we are trying to get a Java game we made working with a joystick. Now, we have an interesting problem with this. I'm not sure if we'll actually go through with this, but we were planning on taking an old arcade box w/ existing buttons and screen and attaching it to a computer inside it that runs Java. Now, this would involve taking the circuitry of the buttons and joystick and putting a game port plug on it, getting Windows to recognise our new joystick (so make our own driver) and then getting Java to interface with this driver. Now i have a very basic understanding about how hardware addressing works in PCs, with IRQ addresses for certain ranges of devices, and then a hex number (0x0000000F or whatever) for each device or resource (memory resource i believe?) that the device uses, but i don't know how to get down to that level in Java, C, or Windows, so i really have no clue where to start. If anyone here knows how windows interfaces with hardware, and how i can use that in either Java or C(++) (i'm skeptical that Java can interface w/ anything but mouse and keyboard, or if it can, that i'll be able to screw around at that level) could you tell me how you think you'd solve this problem? thanks.

anyone who helps will get credit in the program, for whatever it's worth

zackbass
10-12-2004, 03:25 PM
Is there any particular reason why you have to make your own joystick? There are a number of joystick interface libraries available for Java that can work with just about any normal joystick. Here's one (http://www.hardcode.de/jxinput/) that works with DirectX. Even if you absolutely must make your own joystick it may be easier just to build the joystick to the specifications of the generic driver or write a driver to work with DirectX. I always like to keep the bare hardware sufficiently abstracted.

brkfstscone
10-13-2004, 10:53 AM
danke