Main > Main Forum

the state of mame

<< < (76/112) > >>

sjbaines:
First, I want to say a huge thanks to the MAME team for what they have accomplished - extremely well done, very professional, and very much appreciated (especially the 'no hacks' attitude).
I'm working on my first cab now, and very much looking forward to reliving a part of my youth with it, and if it weren't for MAME, it wouldn't be happening.

I can't believe the amount of hate MAME gets from, or the attitude of, some of its users.

For those few for whom MAME is fundamentally flawed unless they can connect their authentic 720 joystick, is there anything you need that isn't on this page (2nd result from googling 'mame 720'):
http://www.jstookey.com/arcade/720/720-arcadejoy.php
Not only does the guy give very detailed information on how he did it, he even provides a pre-built modified version of MAME with the support compiled in.

If the complaint is that this isn't in core MAME, then:
1. It's already been explained multiple times why this is the case, and
2. Why does it matter whether it is in core MAME or not?

Yes, yes, 'Arcade Authenticity', 'As It Was Meant To Be Played', etc, etc, etc, etc.
But even if it was in MAME as standard, you'd still obviously need to supply and interface the controller yourself.
Since you need to go to the effort of interfacing it, why is it a big deal if applying a small MAME patch is part of the process?

That way, anyone out there who actually has one of those controllers can use it, but the overwhelming majority that don't are unaffected.

abaraba:

--- Quote from: sjbaines on January 13, 2011, 05:59:31 am ---First, I want to say a huge thanks to the MAME team for what they have accomplished - extremely well done, very professional, and very much appreciated (especially the 'no hacks' attitude).

...

--- End quote ---

I would normally agree with you, it's only this one particular case, as far as I want to care right now, where the sides are flipped around. It is exactly this "no hack" attitude we are arguing about, so I hope you will appreciate to know exactly how things are, let me show you what "hack" is:


From current MAME 141, this is only one relevant function in the whole story - atarisy2.c:

--- Code: ---static READ8_HANDLER( leta_r )
{
static const char *const letanames[] = { "LETA0", "LETA1", "LETA2", "LETA3" };
atarisy2_state *state = space->machine->driver_data<atarisy2_state>();

    if (state->pedal_count == -1)   /* 720 */
{
/* special thanks to MAME Analog+ for the mapping code */
switch (offset & 3)
{
case 0:
case 1:
{
static double last_angle;
static int rotations;

int analogx = input_port_read(space->machine, "LETA0") - 128;
int analogy = input_port_read(space->machine, "LETA1") - 128;
double angle;

/* if the joystick is centered, leave the rest of this alone */
angle = last_angle;
if (analogx < -32 || analogx > 32 || analogy < -32 || analogy > 32)
angle = atan2((double)analogx, (double)analogy) * 360 / (2 * M_PI);

/* detect when we pass the 0 point in either direction */
if (last_angle < -90 && angle > 90)
rotations--;
else if (last_angle > 90 && angle < -90)
rotations++;
last_angle = angle;

/* offset 0 returns 0xff when the controller blocks one of two gaps */
if ((offset & 3) == 0)
{
/* original controller had two gaps 10 degrees apart, each 2.5 degrees wide */
/* we fake it a little to make it possible to hit the zeroed state with a digital controller */
return (angle >= -5.0 && angle <= 5.0) ? 0xff : 0x00;
}

/* offset 1 returns dial value; 144 units = 1 full rotation */
else
{
/* take the rotations * 144 plus the current angle */
return (rotations * 144 + (int)(angle * 144.0 / 360.0)) & 0xff;
}
break;
}
case 2: return 0xff;
case 3: return 0xff;
}
}
return input_port_read(space->machine, letanames[offset & 3]);
}

--- End code ---

Note the size and comments above. That's how "hack" looks like.


Now, this below is that same function but without any hacks, and enabled for both encoder inputs so it can handle authentic controller properly. I simply just forward input further to emulated game without any fiddling with the data:


--- Code: ---static READ8_HANDLER( leta_r ){
   static const char *const letanames[] = { "LETA0", "LETA1", "LETA2", "LETA3" };
   atarisy2_state *state = space->machine->driver_data<atarisy2_state>();

if(state->pedal_count == -1)   /* 720 */
{
switch (offset & 3)
{
case 0: return input_port_read(space->machine, "LETA1") & 0xff;
case 1: return input_port_read(space->machine, "LETA0") & 0xff;
case 2: return 0xff;
case 3: return 0xff;
}
}
   return input_port_read(space->machine, letanames[offset & 3]);
}

--- End code ---

To make both of these functions exist together without interfering all we need is to find some variable to tell us which device is actually mapped, or enabled at the moment, and execute appropriate code accordingly. That's all there is to it, and it's all ready to go in mainstream MAME.

ErikRuud:

--- Quote from: sjbaines on January 13, 2011, 05:59:31 am ---For those few for whom MAME is fundamentally flawed unless they can connect their authentic 720 joystick, is there anything you need that isn't on this page (2nd result from googling 'mame 720'):
http://www.jstookey.com/arcade/720/720-arcadejoy.php
Not only does the guy give very detailed information on how he did it, he even provides a pre-built modified version of MAME with the support compiled in.

--- End quote ---

Wow!  I should have taken a better look at that page when it was mentioned earlier in this thread.  That guy has the perfect attitude.

Read the first paragraph on the home page. 

--- Quote ---5 years ago Aaron Giles created a MAME driver that enabled us all to play the actual arcade version of 720 degrees (one of my favorite arcade games) on the home computer. The only problem was that the game used a unique joystick controller which meant that playing the game with a mouse or a joystick didn't work very well. I was very disappointed then, and waited for it to be fixed... And waited... And waited... Eventually, I realized that there was no reason for me not to make it work right myself, so I created this page and got to work.
--- End quote ---

Then read the last sentence in the first paragraph again. 

--- Quote ---Eventually, I realized that there was no reason for me not to make it work right myself, so I created this page and got to work.
--- End quote ---

That is how it should be.  :applaud:

I love Tail Gunner. I was disappointed that it did not have sound. I found a site that explained how to add sound thanks to ASTGL (I can't locate his page anymore).  That gave me sound, but not the authentic sounds. Then I found Peter Hirschberg's site and he was gracious enough to send me recordings from his original Tail Gunner 2 cabinet. Now I could play Tail Gunner with the sound that I remember.  I submitted it to the MAME dev team and it became an official part of MAME.  If the MAMEDev team had rejected my change, I would have just posted what I did on my own site in case someone else wanted to use it. 

Again, that is how it should be.

BadMouth:
abaraba, don't you think you should give Paul Olson just a tiny sliver of credit for modifying that driver to begin with?

Also, be careful about jumping the gun again and making claims before it has been properly tested.

sigh, I really was trying to avoid posting on this thread....

Derrick Renaud:

--- Quote from: abaraba on January 13, 2011, 07:16:03 am ---Now, this below is that same function but without any hacks, and enabled for both encoder inputs so it can handle authentic controller properly. I simply just forward input further to emulated game without any fiddling with the data:


--- Code: ---static READ8_HANDLER( leta_r ){
   static const char *const letanames[] = { "LETA0", "LETA1", "LETA2", "LETA3" };
   atarisy2_state *state = space->machine->driver_data<atarisy2_state>();

if(state->pedal_count == -1)   /* 720 */
{
switch (offset & 3)
{
case 0: return input_port_read(space->machine, "LETA1") & 0xff;
case 1: return input_port_read(space->machine, "LETA0") & 0xff;
case 2: return 0xff;
case 3: return 0xff;
}
}
   return input_port_read(space->machine, letanames[offset & 3]);
}

--- End code ---

To make both of these functions exist together without interfering all we need is to find some variable to tell us which device is actually mapped, or enabled at the moment, and execute appropriate code accordingly. That's all there is to it, and it's all ready to go in mainstream MAME.

--- End quote ---

Really, wow.  You are as correct now as you were when you said that using a real 720 control currently works in MAME.  Do you think maybe, possibly, you might want to change the Input ports too?  But what do I know.

Nice of you all to keep disregarding facts and just spout forth your current beliefs of the second.  All the while saying people who actually work on the code know nothing.  Fascinating really.
 :laugh2:

Not to mention, you have been told over and over and over and.... that the current fake control is not going anywhere, so removing the current code does not make an acceptable solution.  Keep trying.

BTW, by changing/adding about 10 lines of code you could have both versions fake/real that exist in parallel and automatically uses whichever control you are using.  Well maybe not.  Remember I've been told I know nothing and am not a programmer.  See if all you with the real knowledge can figure out how.
:dizzy:

Note: when I say you all, I just mean the 2 or 3 vocal annoying ones.  Not everyone on this forum.  Some are quite helpfull.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version