Jump to content


Photo

Minor Update For Xport Emulators


  • Please log in to reply
4 replies to this topic

#1 MegausCharitas

MegausCharitas

    X-S Enthusiast

  • Members
  • 2 posts

Posted 22 December 2009 - 07:21 PM

I will be releasing the source and binaries for minor updates for some of the XPORT emulators and Zsnexbox.

The update simply allows the use of any controller in the menu screens instead of just controller one.
This is because I have found an Xbox with a dead port and needed to edit the source to be able to use
the XPORT emulators and ZsneXbox.

The emulators that I am updating are:

FCEUltrax
NeoGenesis
z26x
ZsneXbox
Maybe a couple of others if I have time, but I can't guarantee anything.

Versions are current as of this post.

I will post information on how to obtain the source and binaries when I am ready ;)

If anyone would like any nifty features/changes that they think might not be too difficult
to implement while I am at it, go ahead and let me know. I will not, however, be doing
any major modifications. That means requests for updates to the emulator cores or major
features will not be considered. I am talking strictly about bug fixes and minor features.

Thanks

#2 cbagy

cbagy

    X-S Genius

  • Last Chance
  • PipPipPipPip
  • 831 posts
  • Location:England
  • Interests:Nothing legal probably !
  • Xbox Version:v1.4
  • 360 version:none

Posted 22 December 2009 - 09:08 PM

Am i allowed to say NeoGenesis LightGun ?
Ok, didn't think so.

#3 ressurectionx

ressurectionx

    X-S Knowledgebase

  • Dev/Contributor
  • PipPipPipPipPipPipPipPip
  • 4,214 posts
  • Xbox Version:v1.0
  • 360 version:none

Posted 22 December 2009 - 11:40 PM

I think it's a great idea. Hopefully madmab sees this and puts it in his betas. The versions he's been working on are far more advanced than anything you're adding that to, although they're not publicly available now.

Nice idea,
~Rx

#4 madmab

madmab

    X-S Hacker

  • Dev/Contributor
  • PipPipPipPipPipPip
  • 2,394 posts
  • Xbox Version:unk
  • 360 version:unknown

Posted 23 December 2009 - 12:14 AM

Wow... I'm surprised he took the time to go thru all the code and create for loops to read all the ports. laugh.gif

I suppose the easiest thing to do would have been to create a macro and change everything to use that instead.

It'll be interesting to see what you came up with..

Care to elaborate..

I mostly avoided it because of what seemed like alot of time and testing involved for major code changes like that. (Major as in lots of code changes in multiple areas).


#5 MegausCharitas

MegausCharitas

    X-S Enthusiast

  • Members
  • 2 posts

Posted 24 December 2009 - 08:41 AM

Actually the details are quite simple really. All I did was add
a bit of code to the main input loop and the input related parts
of the 'common functions' for each of the emulators. The bit
of code just looks at the gamepad struct for active (plugged in)
controllers and uses the first one it finds as the primary input
for the rest of the loop/function. This means that if controllers
2 and 4 are plugged in then controller 2 is used as controller
1 and controller 4 is used as controller 2.

The controller 'mappings' are determined whenever such code
is called ie. once per loop iteration. The code is very simple
and does not cause any significant cpu load. I therefore see
no problem with this and prefer it to the other possible solution
of setting controller mappings once at runtime because it allows for
controllers to be unplugged/added for whatever reason without
restarting the program.

The dynamic controller mapping behavior is only a problem
during gameplay (imho), when things like that might cause
confusion or undesired results. I might be adding some kind
of something in there to keep controllers from being remapped
during gameplay tomorrow (if i have time) or this weekend
depending on input I receive and my thoughts on the issue.
It won't be difficult by any means to do this, I just have not
decided at the moment exactly what the desired behavior is
as I didn't consider this issue until earlier today.

Please do make comments that are thoughtful, insightful, and
constructive. Please refrain from cluttering up the board with
garbage that is irrelevant, pointless, or otherwise a waste of
your and the reader's time. I say this with the hope of preventing
such occurrences and not as a passive-aggressive jab at any
previous posts. I appreciate everyone's interest in this topic. smile.gif

Alternatively I have considered just setting the primary controller
once at runtime and adding new options to the config menu
that would allow a user to set custom mappings to be used
durring gameplay, a mapping to be used if more than one
controller is found, and an option to turn off the remapping
altogether. This obviously would require a bit more code
and I was hoping to avoid whatever work I could. I will at
the very least be adding an option to turn off the remapping
behavior for those that have 4 working ports and don't want
to deal with the wierdness.

QUOTE(madmab @ Dec 22 2009, 06:14 PM) View Post

Wow... I'm surprised he took the time to go thru all the code and create for loops to read all the ports. laugh.gif

I suppose the easiest thing to do would have been to create a macro and change everything to use that instead.



Actually I call a function that contains the loop and returns a value to be used as
the index for the gamepads array.

But yes, there is a lot of input code strewn about the project(s) in question and many changes
and checks are required to ensure correctness.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users