MAMEWorld >> EmuChat
View all threads Index   Flat Mode Flat  

Bryan Ischo
MAME Fan
Reged: 03/28/10
Posts: 358
Send PM
Dev question: is ioport_group redundant?
09/30/11 11:53 PM


Hello, this is a question for MAME developers.

Some background: I have an code base that I wrote and have been maintaining for maybe a year and a half now. I call it libmame. It wraps the MAME source code with a stable, well-documented, featureful API that allows any program to run games via the MAME "engine". I use it in a frontend program that I have been developing off and on for a while now with some unique features, which I won't go into detail on right now.

One thing that has been kind of a pain for a while now is the changes to the MAME code subsystems that have been happening - basically, the C++-ification of parts of MAME. I say this is a pain, what I really mean is that it's been a pain for me; I am sure that overall it is a good thing for MAME and that there are benefactors for the changes (MAME driver developers). I mention that it is has been a pain for me mostly to try to evoke sympathy so that MAME devs take enough pity on me to answer my question here and any other questions I end up asking on this topic. With every major MAME release, for the past year or so there have been re-jiggerings of many MAME internals that require me to update my libmame code, and it's not always been obvious how to do this. So far I've done OK though, I always figure it out; but it is a pain (once again, not trying to complain).

Right now the major overhaul of the input API is giving me fits. I only ever understood just enough of the old API to utilize it for my purposes; I never felt like I had a great grasp of its overall architecture or use. Now it's been converted mostly to C++ classes and I am more lost than ever. I feel like in order to adapt libmame to use the new API, I really should understand the input architecture better. So here is my first question in that regards.

There is a class called input_type_entry; two of its constructor parameters are "group" and "player", of types ioport_group and int respectively. The player parameter is described (via the code docs of the member variable it is used for) as "player number (0 is player 1)". But ioport_group is an enumeration which already includes IPG_PLAYER1, IPG_PLAYER2, ..., IPG_PLAYER8. This seems redundant.

Am I misunderstanding something, or is either the player member variable of input_type_entry, or the IPG_PLAYER{1,...,8} enumeration values of ioport_group redundant?







Entire thread
Subject Posted by Posted on
* Dev question: is ioport_group redundant? Bryan Ischo 09/30/11 11:53 PM
. * I think this was the necessary part of your post.... mogli  10/03/11 01:41 AM
. * Re: I think this was the necessary part of your post.... Bryan Ischo  10/03/11 06:06 PM
. * Re: I think this was the necessary part of your post.... R. Belmont  10/03/11 06:33 PM
. * Re: I think this was the necessary part of your post.... Bryan Ischo  10/04/11 03:05 AM
. * Re: I think this was the necessary part of your post.... R. Belmont  10/04/11 04:28 PM
. * Re: I think this was the necessary part of your post.... Bryan Ischo  10/04/11 06:38 PM
. * Re: I think this was the necessary part of your post.... Vas Crabb  10/04/11 02:45 AM
. * Re: I think this was the necessary part of your post.... mogli  10/05/11 12:26 AM
. * Re: Dev question: is ioport_group redundant? etabeta  10/01/11 12:36 PM
. * Re: Dev question: is ioport_group redundant? R. Belmont  10/03/11 04:10 PM

Extra information Permissions
Moderator:  Robbbert, Tafoid 
0 registered and 290 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 1197