MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Pages: 1

Trnzaddict
MAME Fan
Reged: 01/24/10
Posts: 49
Send PM


Modified machine.c in source won't compile
#334120 - 11/01/14 10:02 PM


Hi guys, a question for the devs. I modified the machine.c file to stop the "save/load state"messages. I did this because the damn deco cassette games just have too long of a boot up sequence and I saved states for all the games in the driver for my cab right after the countdown is over so they load seamlessly without the message showing up.

Now I did this trick when I compiled 148 and I had 0 problems.

I'm using the latest toolchain from 9-14. 64 bit.

I'm getting the "ünused variable ópnamed'in the cmd promt window when compiling towards the end of the process.

This is the section it can't compile. All's I did was delete the popmessages as instructed from the byoac forums.

Code:


//-------------------------------------------------
// handle_saveload - attempt to perform a save
// or load
//-------------------------------------------------

void running_machine::handle_saveload()
{
UINT32 openflags = (m_saveload_schedule == SLS_LOAD) ? OPEN_FLAG_READ : (OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
const char *opnamed = (m_saveload_schedule == SLS_LOAD) ? "loaded" : "saved";
const char *opname = (m_saveload_schedule == SLS_LOAD) ? "load" : "save";
file_error filerr = FILERR_NONE;

// if no name, bail
emu_file file(m_saveload_searchpath, openflags);
if (!m_saveload_pending_file)
goto cancel;

// if there are anonymous timers, we can't save just yet, and we can't load yet either
// because the timers might overwrite data we have loaded
if (!m_scheduler.can_save())
{
// if more than a second has passed, we're probably screwed
if ((this->time() - m_saveload_schedule_time) > attotime::from_seconds(1))
{

goto cancel;
}
return;
}

// open the file
filerr = file.open(m_saveload_pending_file);
if (filerr == FILERR_NONE)
{
// read/write the save state
save_error saverr = (m_saveload_schedule == SLS_LOAD) ? m_save.read_file(file) : m_save.write_file(file);

// handle the result
switch (saverr)
{
case STATERR_ILLEGAL_REGISTRATIONS:

break;

case STATERR_INVALID_HEADER:

break;

case STATERR_READ_ERROR:

break;

case STATERR_WRITE_ERROR:

break;

case STATERR_NONE:




break;

default:

break;
}

// close and perhaps delete the file
if (saverr != STATERR_NONE && m_saveload_schedule == SLS_SAVE)
file.remove_on_close();
}



// unschedule the operation
cancel:
m_saveload_pending_file.reset();
m_saveload_searchpath = NULL;
m_saveload_schedule = SLS_NONE;
}




Can someone tell me why the error is happening?



B2K24
MAME @ 15 kHz Sony Trinitron CRT user
Reged: 10/25/10
Posts: 2663
Send PM


Re: Modified machine.c in source won't compile new [Re: Trnzaddict]
#334124 - 11/01/14 11:00 PM


Have you not used the Fast Forward button before?



Olivier Galibert
Semi-Lurker
Reged: 09/21/03
Posts: 398
Send PM


Re: Modified machine.c in source won't compile new [Re: Trnzaddict]
#334125 - 11/01/14 11:05 PM


> Can someone tell me why the error is happening?

Yes. The opnamed variable is unused.

OG.



Trnzaddict
MAME Fan
Reged: 01/24/10
Posts: 49
Send PM


Re: Modified machine.c in source won't compile new [Re: Olivier Galibert]
#334127 - 11/01/14 11:39 PM


> > Can someone tell me why the error is happening?
>
> Yes. The opnamed variable is unused.
>
> OG.

Hi, can you tell me what part of the code to delete so the compile will finish correctly? Or it will break something?



Trnzaddict
MAME Fan
Reged: 01/24/10
Posts: 49
Send PM


Re: Modified machine.c in source won't compile new [Re: B2K24]
#334128 - 11/01/14 11:41 PM


> Have you not used the Fast Forward button before?

Yes, only when writing large nvram files when setting up MAME initially.TBH, I had a fast forward button on my cab but it was silly. I compiled 148 with the modified machine.c and had it autoload with no messages and it was much better.

For whatever reason 155 is giving headaches.



krick
Get Fuzzy
Reged: 02/09/04
Posts: 4235
Send PM


Re: Modified machine.c in source won't compile new [Re: Trnzaddict]
#334129 - 11/02/14 12:23 AM


I think you were too aggressive on the removal of the popmessages.
The compiler is complaining about the unused variable.

Try just changing the STATERR_NONE case from this...

Code:

case STATERR_NONE:
if (!(m_system.flags & GAME_SUPPORTS_SAVE))
popmessage("State successfully %s.\nWarning: Save states are not officially supported for this game.", opnamed);
else
popmessage("State successfully %s.", opnamed);
break;



...to this...

Code:

case STATERR_NONE:
break;




GroovyMAME support forum on BYOAC



MooglyGuy
Renegade MAME Dev
Reged: 09/01/05
Posts: 2260
Send PM


Re: Modified machine.c in source won't compile new [Re: Trnzaddict]
#334162 - 11/03/14 12:24 AM


> > > Can someone tell me why the error is happening?
> >
> > Yes. The opnamed variable is unused.
> >
> > OG.
>
> Hi, can you tell me what part of the code to delete so the compile will finish
> correctly? Or it will break something?

The opnamed variable is unused. I think that's a pretty clear indication of what part of the code to delete as well as whether or not it will break something.



Traso
MAME Fan
Reged: 01/15/13
Posts: 2687
Send PM


Besides..... new [Re: Trnzaddict]
#334229 - 11/05/14 01:17 AM


waiting 100 counts, even sped up, is gay....let alone iff one has an arcade cab, and either needing a dedicated button for that, or having to pull out a keyboard.

Ahhh, the days of AdvanceMAME, when it automatically sped through all that crap. WAIT. Hey, homeboy, maybe look through the ADVMAME source, and find what automagically did that?? I think I recall a similar thread, and it was a simple command. But, well, modified build is bettah. Mmh.....



Scifi frauds. SF illuminates.
_________________

Culture General Contact Unit (Eccentric)



B2K24
MAME @ 15 kHz Sony Trinitron CRT user
Reged: 10/25/10
Posts: 2663
Send PM


Re: Besides..... new [Re: Traso]
#334233 - 11/05/14 01:44 AM


Yeah...waiting a whole 4 seconds with a button held down is completely unreasonable because I need to completely min/max my cab playing time right now!

I got it! I'll take 1000X longer creating save states and play in the source with no guarantee whatsoever that it will hold up long-term several versions from now.



redk9258
Regular
Reged: 09/21/03
Posts: 3968
Loc: Troy, Illinois USA
Send PM


Re: Besides..... new [Re: Traso]
#334242 - 11/05/14 03:11 AM


> waiting 100 counts, even sped up, is gay....

No wonder all of those fags hung around cassette based games back in the day.




Trnzaddict
MAME Fan
Reged: 01/24/10
Posts: 49
Send PM


Re: Besides..... new [Re: B2K24]
#334356 - 11/07/14 01:42 AM


> Yeah...waiting a whole 4 seconds with a button held down is completely unreasonable
> because I need to completely min/max my cab playing time right now!
>
> I got it! I'll take 1000X longer creating save states and play in the source with no
> guarantee whatsoever that it will hold up long-term several versions from now.

Dude, why are you ripping me?

Spend the money and 100s of weekend hours I spent configuring my cabinet with all arcade emulators available, complete with all bells and whistles and tell me if YOU wouldn't want the most seamless experience at that point. Second, I do not have an available button to ff in my cp.

And FYI the save states took me 45 minutes literally when I made them. There are not many deco cassette games.

And lastly, I just commented out the calls for the opnames at the top of the
Section, and it compiled and works fine. Why someone couldn't just tell me that rather than let this simple question get dragged out is boggling.

You can close the thread.



B2K24
MAME @ 15 kHz Sony Trinitron CRT user
Reged: 10/25/10
Posts: 2663
Send PM


Re: Besides..... new [Re: Trnzaddict]
#334357 - 11/07/14 03:18 AM


I'm not ripping you, but I'm finding the whole thing rather humorous.

I've seen similar things posted on the HS forums where people just waste tons of time trying to get what they think is the absolute perfect cab experience.

I'm gonna assume here since you mentioned 100s of hours and all emulators available that you're working with some kind of HS Ready setup or something similar.

Now honestly, you probably have a 100% complete full romset as well as complete romsets for all those other emulators that you've spent many hours on. So what are the chances that you or someone else actually plays a Deco game out of everything available on your cab?

To save and load states you need to dedicate at least 2 buttons, so I'm finding it rather hilarious that you choose to jump through all these hoops instead of just utilizing the Fast Forward option.



krick
Get Fuzzy
Reged: 02/09/04
Posts: 4235
Send PM


Re: Besides..... new [Re: Trnzaddict]
#334358 - 11/07/14 03:24 AM


> And lastly, I just commented out the calls for the opnames at the top of the
> Section, and it compiled and works fine. Why someone couldn't just tell me that
> rather than let this simple question get dragged out is boggling.


The reason that I didn't tell you that in my reply, even though it would fix your original issue as posted, is that I think it's the wrong solution to your problem. You really only want the popup messages to go away in the case where they load and save fine (not an error). The other cases (actual errors) should be left in place so you can troubleshoot when something does go wrong.

I think the reason people are joking with you is that the error message "unused variable opnamed" is totally self-explanatory. Just find the variable "opnamed", which in your original post only appeared in one place. Since it's unused, you can just remove that line to make the compiler happy. But like I mention above, I think that's the wrong solution for what you're trying to accomplish.



GroovyMAME support forum on BYOAC



Olivier Galibert
Semi-Lurker
Reged: 09/21/03
Posts: 398
Send PM


Re: Besides..... new [Re: Trnzaddict]
#334621 - 11/24/14 07:19 PM


> Spend the money and 100s of weekend hours I spent configuring my cabinet with all
> arcade emulators available, complete with all bells and whistles and tell me if YOU
> wouldn't want the most seamless experience at that point.

Seamless my ass. The *real* arcade games did need that time to load the game. So all you're proving is that you do *not* want an arcade experience.

OG.



Trnzaddict
MAME Fan
Reged: 01/24/10
Posts: 49
Send PM


Re: Besides..... new [Re: Olivier Galibert]
#334623 - 11/24/14 09:10 PM


> > Spend the money and 100s of weekend hours I spent configuring my cabinet with all
> > arcade emulators available, complete with all bells and whistles and tell me if YOU
> > wouldn't want the most seamless experience at that point.
>
> Seamless my ass. The *real* arcade games did need that time to load the game. So all
> you're proving is that you do *not* want an arcade experience.
>
> OG.

I guess seamless is the wrong word then. After spending all the time and money, I guess I want it to run how I would like it to run. I'm not a purist in that aspect.

But FYI We get posts in the Hyperspin forums asking if there is a way to speed up or skip *insert game name here* boot up/ram check time so I'm not the only one lol.



Olivier Galibert
Semi-Lurker
Reged: 09/21/03
Posts: 398
Send PM


Re: Besides..... new [Re: Trnzaddict]
#334626 - 11/25/14 07:49 AM


> After spending all the time and money, I guess I want it to run how I would like it to run.

You did not pay for Mame, you did not pay for the games, so your (relatively muted) sense of entitlement has no reason to exist.

I'll never get why a 2-3 second success message (which may well be an error message someday, and then you'd have loved having it) is such a problem. But heh, if you want to play at quasi-random with a soldering iron in your tv because the channel number shows up when you change it, who am I to stop you. Have fun.

OG.



Anonymous
Unregistered
Send PM


Re: Besides..... *DELETED* new [Re: Olivier Galibert]
#334629 - 11/25/14 12:21 PM





Trnzaddict
MAME Fan
Reged: 01/24/10
Posts: 49
Send PM


Re: Besides..... new [Re: ]
#334632 - 11/25/14 03:29 PM


Ok, this is really getting into a direction you guys are taking it in yourselves.

A sense of entitlement to MAME?? Ok...

First off, I did not mention anything about paying for MAME. What I did pay for is the pc, the Nvidia gtx 660ti, the cabinet, a custom marquee, the control panel, the leds for the lights, the lightguns, the monitor, everything which now has a total of around 1700.00.

The time? Yes building everything, learning ledblinky, Hyperlaunch, Hyperspin, the list goes in and on.

Where is this "Muted sense of entitlement" coming from out of that?


This thread was about me changing the source code MYSELF for my own personal preference, whether you guys think it's stupid or not an it has netted me nothing but passive aggressive comments.

And Olivier, what do you think because you are a dev you can twist things around and belittle people? As a dev I would of expected a better attitude from you. Seriously.

Mods PLEASE lock the thread because people here have taken This question and blown it out of proportion. I'm not going to go back and forth. I'm talking about one thing here, and people are taking it as another.


Pages: 1

MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

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