Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    EmuTalk Member obsidian's Avatar
    Join Date
    May 2002
    Location
    Germany
    Posts
    8

    Cool Plugin development

    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/proce...001/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 by obsidian; June 16th, 2002 at 19:43.


    • Advertising

      advertising
      EmuTalk.net
      has no influence
      on the ads that
      are displayed
        
       

  2. #2
    Moderator Hacktarux's Avatar
    Join Date
    Nov 2001
    Location
    France
    Posts
    1,181
    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.

  3. #3
    EmuTalk Member obsidian's Avatar
    Join Date
    May 2002
    Location
    Germany
    Posts
    8

    Lightbulb 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

  4. #4
    I Am The Stig Martin's Avatar
    Join Date
    Nov 2001
    Location
    Malmö
    Posts
    3,830
    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. )


    The Emulation64 Network offers you free hosting!
    Click here for requirements and contact info.

  5. #5
    EmuTalk Member obsidian's Avatar
    Join Date
    May 2002
    Location
    Germany
    Posts
    8

    Question 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

  6. #6
    What's that...? mesman00's Avatar
    Join Date
    Nov 2001
    Location
    USA
    Posts
    1,425
    uhh??? if u meant to attach an image, its not here!
    <font color="blue">System Specs</font>
    Dual Boot:
    1. Gentoo Linux
    2. Win2k
    Athlon XP Barton 2700
    512 MB PC 2700 DDR Ram
    GF4 Ti4200 AGP 8X 64 MB
    Onboard Sound

  7. #7
    EmuTalk Member obsidian's Avatar
    Join Date
    May 2002
    Location
    Germany
    Posts
    8

    No image tonight

    Thanks for the hint...

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



    Cheers,

    Obsidian

  8. #8
    Warrior for God The Khan Artist's Avatar
    Join Date
    Mar 2002
    Location
    Purgatory
    Posts
    1,103
    --^--
    <--->
    --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.

    BTW, the hyphens are just there to make it line up.
    Last edited by The Khan Artist; June 13th, 2002 at 02:53.



  9. #9
    EmuTalk Member obsidian's Avatar
    Join Date
    May 2002
    Location
    Germany
    Posts
    8

    N64 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

  10. #10
    Moderator Hacktarux's Avatar
    Join Date
    Nov 2001
    Location
    France
    Posts
    1,181
    Thanks for your help Obsidian !

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

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •