What's new

Plugin development

obsidian

New member
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.
 
Last edited:

Hacktarux

Emulator Developer
Moderator
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.
 
OP
O

obsidian

New member
Straight thinking at late hours

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

Active member
Administrator
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 )
 
OP
O

obsidian

New member
Buttons?

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
 
OP
O

obsidian

New member
No image tonight

Thanks for the hint...

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

config.jpg


Cheers,

Obsidian
 

The Khan Artist

Warrior for God
--^--
<--->
--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.
 
Last edited:
OP
O

obsidian

New member
First version finished

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

Emulator Developer
Moderator
Thanks for your help Obsidian !

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

obsidian

New member
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

Emulator Developer
Moderator
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

New member
Plugin TR64 software

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 :


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
 
Last edited:

Doomulation

?????????????????????????
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 :)
 

Muad

New member
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).
 
OP
O

obsidian

New member
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.
 

Top