Previous 199869 Revisions Next

r21847 Thursday 14th March, 2013 at 06:44:15 UTC by Fabio Priuli
fixed header detection when loading from fullpath in snesnew. nw.
[src/mess/machine]sns_slot.c

trunk/src/mess/machine/sns_slot.c
r21846r21847
832832
833833   if (fullpath)
834834   {
835      UINT32 offset = 0;
835836      UINT32 len = core_fsize(m_file);
836837      UINT8 *ROM = global_alloc_array(UINT8, len);
837838      int type;
838839
839840      core_fread(m_file, ROM, len);
840841
841      type = get_cart_type(ROM, len);
842      offset = snes_skip_header(ROM, len);
843     
844      type = get_cart_type(ROM + offset, len - offset);
842845      slot_string = sns_get_slot(type);
843846
844847      global_free(ROM);

Previous 199869 Revisions Next


© 1997-2024 The MAME Team