Build Your Own Arcade Controls Forum

Main => Software Forum => Topic started by: Minwah on November 09, 2004, 07:04:17 am

Title: FAO MAME Compilers: PolePos
Post by: Minwah on November 09, 2004, 07:04:17 am
Can anyone here who has a clue about MAME source fix the Pole Position issue whereby the gear (Hi/Lo) is displayed on the screen in a 'debug' box?

Or could someone point me in the right direction...I had a poke through polepos.c and can't see what I need to change  ::)
Title: Re:FAO MAME Compilers: PolePos
Post by: 2600 on November 09, 2004, 08:33:45 am
I seem to remember you talking about this before and that it didn't do this for a previous version.  Do you remember what version that was?  If I take a look it will help me if I can compare.
Title: Re:FAO MAME Compilers: PolePos
Post by: Thenasty on November 09, 2004, 08:36:35 am
I use 59 and it does not happen in this version. I dunno when the change came in having it in the middle of the screen when shifting Low/Hi.
Title: Re:FAO MAME Compilers: PolePos
Post by: Minwah on November 09, 2004, 10:40:11 am
I seem to remember you talking about this before and that it didn't do this for a previous version.  Do you remember what version that was?  If I take a look it will help me if I can compare.

Yes you're right...but now I can't remember which version it was, but the early 0.7x springs to mind - I'll see if I can find out some more...
Title: Re:FAO MAME Compilers: PolePos
Post by: 2600 on November 09, 2004, 11:14:05 am
Don't have access to actually test this so it's up to you.  Also, standard disclaimer I'm not a mame developer, I don't know what the hell I am doing, and I'm a hardware dev and it's been a while since I've programmed anything on the software side of things.

That being said here is the first thing that jumps out at me.  It seems in that in .72 there was a dipswitch called "display shift".  
PORT_DIPNAME( 0x08, 0x08, "Display Shift" )
   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
   PORT_DIPSETTING(   0x08, DEF_STR( On ) )

I think around .79 or .80 they took this out and now it is unused.  In .83 (what I'm using), it is this:
   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )

I'd put it back in and try it.  I know they changed the input stuff in .84, but haven't had time to look at it.  Just look how they do the other dipswitches and copy that format.

Let me know if it works or if I should go back to designing hardware and stay the H#ll out of software.


Title: Re:FAO MAME Compilers: PolePos
Post by: Minwah on November 09, 2004, 11:14:42 am
Yes you're right...but now I can't remember which version it was, but the early 0.7x springs to mind - I'll see if I can find out some more...

Hmm, perhaps not that long ago...

0.87u4: Pierpaolo Prazzoli added clone Top Racer (set 2).
0.79u1: Nicola Salmoria fixed various mistakes in the Pole Position ROM loading (one missing speech ROM). Also sprite zooming should now be closer to the hardware. Correct the clock speed of the Z80 and the 2x Z8002 CPUs to 3072000 Hz and added Namco_52XX and Namco_54XX sound.


Maybe v0.80 was the first official release to have this problem...I'm having problems trying it due to rom changes...
Title: Re:FAO MAME Compilers: PolePos
Post by: Minwah on November 09, 2004, 11:19:13 am
That being said here is the first thing that jumps out at me.  It seems in that in .72 there was a dipswitch called "display shift".  

Ah, but this used to be ligitimate (or so I thought).  You used to be able to get LO or HI displayed in the bottom right corner of the screen, but by the game itself.  So it seems the dipswitch to do this was removed and they have made MAME add this OSD notification for some reason.
Title: Re:FAO MAME Compilers: PolePos
Post by: 2600 on November 09, 2004, 02:07:20 pm
I knew you were going to say OSD instead of in games.  In that case, I think I found the offending code.

/vidhrdw/polepos.c

I am pretty sure the very last if statement is the offending code.

I am pretty sure you can just take this out in .83, .88 is very similar.

   {
      int in = readinputport( 0 );
      static int lastin;

      if ((in ^ lastin) & 2)
         usrintf_showmessage((in & 2) ? "LO" : "HI");
      lastin = in;
   }
Title: Re:FAO MAME Compilers: PolePos
Post by: Minwah on November 09, 2004, 04:52:19 pm
I knew you were going to say OSD instead of in games.  In that case, I think I found the offending code.

Cool, thanks, I'll try it out tomorrow :)

I wonder why the devs put that in?  I've seen it reported a few times over a number of MAME versions and it still hasn't been removed.
Title: Re:FAO MAME Compilers: PolePos
Post by: 2600 on November 09, 2004, 05:10:16 pm
Let me know how it goes and I'll submit a patch as I want to make sure someone tests it and I don't have time.

I think, and what i am going to put in my patch, is that they just forgot an if debug.
Title: Re:FAO MAME Compilers: PolePos
Post by: Minwah on November 09, 2004, 06:24:40 pm
Let me know how it goes and I'll submit a patch as I want to make sure someone tests it and I don't have time.

I think, and what i am going to put in my patch, is that they just forgot an if debug.

No problem.  And yes I think you're right about the debug, just odd that no-one removed it yet.
Title: Re:FAO MAME Compilers: PolePos
Post by: Minwah on November 10, 2004, 06:43:22 am
Sure enough I commented out 'usrintf_showmessage((in & 2) ? "LO" : "HI");' and it works great :)

I can't figure out how to do the 'if debug' part tho  :-\
Title: Re:FAO MAME Compilers: PolePos
Post by: 2600 on November 10, 2004, 08:39:31 am
Don't know if you are the curious type, but here it is.


#ifdef MAME_DEBUG
   {
      int in = readinputport( 0 );
      static int lastin;

      if ((in ^ lastin) & polepos_gear_bit)
         usrintf_showmessage((in & polepos_gear_bit) ? "LO" : "HI");

      lastin = in;
   }
#endif
Title: Re:FAO MAME Compilers: PolePos
Post by: Minwah on November 10, 2004, 10:40:40 am
Don't know if you are the curious type, but here it is.

Yes I am, thanks :)

Actually I tried something very similar, but put the #ifdef MAME_DEBUG and #endif around the 'if ((in....' part.

It got rid of the message, but didn't turn it on with debug...
Title: Re:FAO MAME Compilers: PolePos
Post by: Minwah on November 10, 2004, 10:47:43 am
It got rid of the message, but didn't turn it on with debug...

Hmmm, I tried your code 2600, and it did the same thing.  I tried turning debug on with -debug and in mame.ini, but no go - am I misunderstanding something?
Title: Re:FAO MAME Compilers: PolePos
Post by: 2600 on November 10, 2004, 11:14:47 am
I copied it how other people used the #ifdef, which they do differently.  My understanding is that it will enable it when you compile Mame with the debugger enabled.  Did you compile mame with the debugger enabled or are you just passing the -debug command line option.

Usually, I'm a stickler for testing, but just don't have access to the files right now.  Which isn't a good excuse.

Would you mind trying it with the debugger compiled in?  Just in case, you have to uncomment the DEBUG=1 line in the make file.  It's near the top.
Title: Re:FAO MAME Compilers: PolePos
Post by: 2600 on November 10, 2004, 02:17:59 pm
Well after you had me worrying for a minute, I finally was able to test it.  It works you just need to compile the debugger in.  Oh, and you don't need to start the debugger(-debug).
Title: Re:FAO MAME Compilers: PolePos
Post by: Minwah on November 10, 2004, 03:10:31 pm
Well after you had me worrying for a minute, I finally was able to test it.  It works you just need to compile the debugger in.  Oh, and you don't need to start the debugger(-debug).

Ah that explains it, sorry I'm a bit of a MAME compiling & C newb...