Menu

Open files while running AdvanceMAME or AdvanceMenu

Matt
2018-10-22
2018-10-27
  • Matt

    Matt - 2018-10-22

    First of all, thank you for this incredible piece of software. I've been using it for many years and couldn't be more impressed with the quality and attention to detail.
    I'm running the DOS version in an arcade cabinet. Being that DOS is the underlying OS, I can power off the system while at a command prompt with a simple on/off switch and not risk files being left open since there's no page file or anything else OS-related running in the background.

    I'm curious if AdvanceMAME or AdvanceMENU hold any files open for write access while they are running. Obviously, config changes, high score changes, etc.  can happen in both programs which are then written to disk. However, are written files held open the entire time AdvanceMAME or AdvanceMenu are running? (or just during the brief write operation?)

    Assuming I'm not in the midst of saving a config change, it seems like I should be able to simply power off the system without risking file system corruption. Is that actually the case or are any files held open for write access while the programs are running?
    Hopefully that makes sense. Any ideas?

     
  • Andrea Mazzoleni

    Hi Matt

    Both AdvanceMAME and AdvanceMENU takes special care about any change written to files.

    For example, when AdvanceMENU writes a new state, it first writes a copy, flushes the disk cache, and the rename the new copy over the old one, and flushes again the disk cache.

    This is not limited to DOS, in fact, in Linux it's something well tested that should work even better than in DOS, as I want my Raspberry to be always bootable even after a hard powerdown :)

    Ciao,
    Andrea

     

Log in to post a comment.