PDA
$threadinfo[title]
-


obsidian
June 10th, 2002, 04:22
Hi all,

I wanted to create a hacked-up version of Hacktarux' input plugin that supports joysticks/pads. My main problem strangely isn't the joypad stuff, but the C code in the plugin header file :sly:

I first started by compiling Hacktarux' input plugin from source. My gcc didn't like it :( I have gcc version 2.95.4 20011002 (Debian prerelease).

The union BUTTONS contains an unnamed struct to directly set the buttons and a placeholder called Value. This doesn't work with my gcc - it issues a nice warning
Controller_#1.1.h:77: warning: unnamed struct/union that defines no instances
(which is of course correct) and then won't allow the variables inside the struct to be accessed. So I had a look around the net and saw that this violates the ANSI/ISO C standard anyway. Under http://www.gdconf.com/archives/proceedings/2001/kreimeier/
they even call it an evil MS-VC practice ;)

So, what shall we do? Isn't it better to stick with conformance and change this into a double word which is manipulated bitwise through logical AND and OR? This would ensure binary compability with the VC approach.

I didn't post this into the plugins forum because I'm not sure if I'm right or wrong.

Cheers,

Obsidian

PS: Hacktarux, keep it up! 0.04 works great.

Hacktarux
June 10th, 2002, 04:58
unnamed struct are handled correctly by gcc 2.96 and gcc 3.0. Now that you say that i remember that i had problems with that on gcc 2.95.

You can make it like you said it will work. :) You have to keep binary compatibility but of course feel free to modify the specs for your compiler.

obsidian
June 10th, 2002, 06:43
Hacktarux,

thanks for the swift answer! I tried it with gcc 3.0 and it compiled out of the box ;)

I hacked at the plugin and I can press Start in Mario64 with the joypad. The rest of the buttons has to wait till there's a graphical button configuration utility. Does anybody have a picture of a N64 pad, preferably seen straight from above? I'd include it in the config box...

G'night

Obsidian

Martin
June 10th, 2002, 06:56
Sweet to hear, obsidian! :)
I'm glad to see that there's interest for Linux emulation as well.
(going to install RedHat 7.3 whenever I've got time. :D )

obsidian
June 11th, 2002, 03:01
Hi all,

here's a preview of the ugly config dialog. Could anybody please comment on the C buttons. Are they in the right order? Or rathermore, how are they labeled on the N64?

Cheers,

Obsidian

mesman00
June 11th, 2002, 10:33
uhh??? if u meant to attach an image, its not here!

obsidian
June 11th, 2002, 17:42
Thanks for the hint...

Here it is, somehow I can't upload attachments to posts :(

http://www.blutsuppe.de/config.jpg

Cheers,

Obsidian

The Khan Artist
June 13th, 2002, 03:46
--^--
<--->
--v--


It's just arrows on the N64 pad. You could do like I did, or do something like

--CU--
CL--CR
--CD--



I guess it's up to you since you're designing it. :P

BTW, the hyphens are just there to make it line up.

obsidian
June 16th, 2002, 20:29
Hi folks,

I finished the first version. It emulates the analog minijoystick and the buttons. Tomorrow I'll buy a joypad that has an analog joystick and digital directional pad, so I can implement the second axis. Please read the README file.

You can download it here: http://www.blutsuppe.de/n64pad-0.1.tar.gz

The axes are hardcoded for now. If you have more than one, you should try both. It is hardcoded to acces /dev/js0 at the moment, too. If your joystick has another device, either change the order of module loading, or look in the source for /dev/js0

Cheers,

Obsidian

PS: Khan, thanks for the hint. It'll change in the next release :)

Hacktarux
June 16th, 2002, 20:53
Thanks for your help Obsidian !

I can't test it because i don't have a joystick here but it seems nice ! :)

obsidian
June 16th, 2002, 21:01
Well thanks for the first Linux N64 emu ;)

Hacktarux, how difficult would be writing support for sound plugins in 0.0.4? Do you have any pointers where I could gather info? What else is of interest now? Should I start to translate the error messages? My french isn't that good, but error messages shouldn't be too difficult to figure out ;)

Cheers,

Obsidian

Hacktarux
June 16th, 2002, 21:17
The specs are not hard to implement but writing the plugin itself is pretty hard. There's two possibilities : lle and hle. Both needs a great amount of work. I have already ported the lle rsp plugin made by Jabo and Zilmar but it only works in interpreter mode. I probably have to rewrite the recompiler from scratch to make it working in Linux. Hle require disassembling sound microcodes and understanding what the code do globally.

I things the best thing you can do now is to improve your plugin : multiplayer, the possibility to use the keyboard OR the joystick...

A little off topic: i will probably not be able to answer any question in the next two weeks. I have to pass exams and i don't think i will have an internet connection. :(

Muad
July 5th, 2002, 17:08
Hi all
I done the QNX port of Mupen64 004.

About the main source:
Under QNX, the sdl lib can't be linked shared. All the QNX version have the pluggins hard linked ( inside the binary ).


About the input plugin :
QNX use gcc 2.95.3 , I rewrite the input plugin using boolean operation.

About the gfx_plugin:
The standard mupen64_gfx is OK
The TR64 pluggin is really slow. The SDL version of QNX don't support OpenGL in Hardware but use an software implementation. the result is about 1 or 2 fps with my PIII 500Mhz.
After a week of test, I found a very rapide implementation of OpenGL . I made 2 new version of mupen64 with this version.

The Screenshots :


http://membres.lycos.fr/kris4leloo/images/mupen64/mupen64_tr_soft_mario64.jpg

With this version, i have about 20 pfs.
Keep in mind I don't use the mesa lib but an another ( pure software ). If your system support OpenGL ( in hardware ), it will be probably slower.

For now, there are no alpha, no blending, and the texture are buggy.

It's intereting for the system which don'y have an openGL support.

All the source is send to Hacktarux and will be released soon.

Bye

Doomulation
July 5th, 2002, 19:14
Indeed the textures are buggy, I have never seen the ground in mario to look so bad ;)
Anyway, I'm sure you can fix it up, so good luck :)

mesman00
July 6th, 2002, 12:15
qnx, never even heard of that, is it another o/s?

Muad
July 7th, 2002, 05:14
QNX is a real time os.
It's very similar to linux.
It's free for non commercial use and can be downloaded at www.qnx.com.
It can be installed on a win32 partition.( no risk to loose your data ).

For me it's the best os because it's very fast ( it's my point of view).

obsidian
July 21st, 2002, 19:53
Hi guys,

just to let you know that I haven't forgotten how to post ;)

I'm still hacking away at the next version of the PAD plugin. These joypads with two axes are mighty expensive, so I had to heap some bucks first, hehe.

I'll post a new beta soon.