a 'F3' resistant MAME binary

greenspun.com : LUSENET : MARP Editors : One Thread

Hi.

You probably saw the posting on the news page about this 'm37b2f3.exe' we've made. I've been testing it today, and it appears to NOT work for 'spectar'. If you hit 'f3' during a spectar recording, the recording that is made will NOT play back - your car does the right moves, but the level is randomised wrongly...

Anyone have any idea why?

Here's the change I made...

In cpuintrf.c, right after the line that says "reset:", insert this:


    /* reload nvram settings */
    if (Machine->drv->nvram_handler)
    {
        void *f;

f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_NVRAM,0); (*Machine->drv->nvram_handler)(f,0); if (f) osd_fclose(f); }

/* reset file recording if set */ if (options.record) { osd_fseek(options.record, sizeof(INP_HEADER), SEEK_SET); } /* reset playback if set */ else if (options.playback) { osd_fseek(options.playback, sizeof(INP_HEADER), SEEK_SET); }


Chris.

-- Anonymous, May 24, 2000

Answers

i've seen that the nvram file can be "changed" even if you are playing back a game, i think F3 must remove() the nvram file when F3 is hit for record and playback?

-- Anonymous, May 24, 2000

It is true that the .nv file is written when you quit mame, whether recording or playing back. The thing is, though, that the nvram file is only written after you press escape. It's not written when you press F3, so as long as you delete the .nv file before playback and before recording, you should be OK, nvram-wise.

Also, 'spectar' doesn't use a .nv file anyway, so I don't think that is the problem is this case...

Chris.

-- Anonymous, May 25, 2000


the only other thing is it getting a timestamp from somewhere to seed the opponent AI. someone mentioned this in another game on the regular board, where they saw a time call in the driver....

-- Anonymous, May 25, 2000

well besides time it could be getting a seed from the user input itself...

-- Anonymous, May 25, 2000

I don't think it can be anything to do with a timestamp, since the playback works if you don't hit F3 during recording... It's hitting F3 which causes the recording to fail. If it was a timestamp issue, the recording would NEVER play back.

As for the 'user input' affecting the seed, well - user input is exactly what the .inp file records. I reckon there must be something in memory which the user input from the first game affects, and which isn't reset by the code which pressing f3 causes to run... f3 is supposed to 'reset' the machine, as if it had just been switched on, but it appears that it's not quite resetting everything. I'm wondering what it's missing...

Chris.

-- Anonymous, May 25, 2000



Moderation questions? read the FAQ