mirror of
https://github.com/holub/mame
synced 2025-05-21 21:29:15 +03:00
Fixed loading NES games directly (nw)
This commit is contained in:
parent
47c3ba0bf1
commit
66ac487c03
@ -1,6 +1,6 @@
|
||||
#include "emu.h"
|
||||
#include "machine/nes_slot.h"
|
||||
|
||||
#include "hashfile.h"
|
||||
|
||||
#define NES_BATTERY_SIZE 0x2000
|
||||
|
||||
@ -268,7 +268,7 @@ bool base_nes_cart_slot_device::call_load()
|
||||
bool ines20 = FALSE, has_trainer = FALSE, prg16k;
|
||||
|
||||
// check if the image is recognized by nes.hsi
|
||||
// mapinfo = hashfile_extrainfo(image);
|
||||
mapinfo = hashfile_extrainfo(*this);
|
||||
|
||||
// image_extrainfo() resets the file position back to start.
|
||||
fseek(0, SEEK_SET);
|
||||
|
@ -84,6 +84,8 @@ public:
|
||||
bool m_has_battery, m_has_prgram;
|
||||
};
|
||||
|
||||
extern void nes_partialhash(hash_collection &dest, const unsigned char *data, unsigned long length, const char *functions);
|
||||
|
||||
|
||||
// ======================> nes_cart_slot_device
|
||||
|
||||
@ -115,6 +117,7 @@ public:
|
||||
virtual const char *image_interface() const { return "nes_cart"; }
|
||||
virtual const char *file_extensions() const { return "nes,unf,unif"; }
|
||||
virtual const option_guide *create_option_guide() const { return NULL; }
|
||||
virtual device_image_partialhash_func get_partial_hash() const { return &nes_partialhash; }
|
||||
|
||||
// slot interface overrides
|
||||
virtual const char * get_default_card_software(const machine_config &config, emu_options &options);
|
||||
|
Loading…
Reference in New Issue
Block a user