I'm breaking this out of the Genesis regression thread, because this is a) not about genesis only, and b) there may be various different issues at play in the Genesis regression thread that may muddle things too much.
This thread will take on a single and reproducible error.
MESS crashes when loading a cartridge from ini. (Via # IMAGE DEVICES Cartridge.)
Genesis, NES, C64
Gameboy and Gameboy Color might be affected by the same issue, but since these drivers do not crash in the same way as genesis, c64 and nes do, I would like to leave them out of this thread. This is to keep focus in this thread on a single and reproducible issue, resulting in same type error. Hopefully being of benefit to MAMEdevs in squashing this nasty bug. Note that the following cartridge systems
have also been tested but they are not affected: a2600, coleco, videopac, odyssey2, g7400, sms1, snes, pce, msx2, jaguar.
Bug introduced in:
0148u1 (last official version without the issue is 0148. Some of the early SVN 0148u1 releases are also without the issue).
Windows 7 64-bit using MESS latest SVN.
5 Steps to Reproduce (NES example)
1) Delete mess.ini and delete nes.ini
2) From command shell create a new mess.ini "mess.exe -cc"
3) Open mess.ini and enable writeconfig: "writeconfig = 1"
4) Start a nes game from command shell specifying "-cart" option with either fullpath or softlistname. Example:
"mess.exe nes -cart "path to game\game.nes". The game will succesfully run.
Quit mess. A "nes.ini" will be written to your ini path. Check that the nes.ini is in the ini path and that it contains your previous specified cartridge. In my example in contains
# SLOT DEVICES
# IMAGE DEVICES
cartridge "q:\Software\nes\Roms\Akumajou Densetsu (Japan).zip\Akumajou Densetsu (Japan).nes"
5. Now to the step that produces the crash. The cartridge is specified in the ini and available in the path so we should be able to conveniently load it by starting the nes from command shell by typing:
Unfortunately this crashes the emulation. Loading a cartridge in this way for genesis and c64c makes them crash in a similar way.
Firewave has confirmed the Genesis driver crashing by following the same procedure. His analysis is the following:
base_md_cart_slot_device::get_default_card_software() is fetching the "cartridge" value from the emu_options, but it is empty for some reason, so nothing is loaded, which causes it to bail out later. So the problem seems to be in the order of things in emu_options::parse_slot_devices().
Hopefully one of the MAMEdevs is able to fix this issue.