Previous 199869 Revisions Next

r20936 Monday 11th February, 2013 at 12:23:19 UTC by Miodrag Milanović
Fixed loading NES games directly (nw)
[src/mess/machine]nes_slot.c nes_slot.h

trunk/src/mess/machine/nes_slot.c
r20935r20936
11#include "emu.h"
22#include "machine/nes_slot.h"
3#include "hashfile.h"
34
4
55#define NES_BATTERY_SIZE 0x2000
66
77//**************************************************************************
r20935r20936
268268            bool ines20 = FALSE, has_trainer = FALSE, prg16k;
269269           
270270            // check if the image is recognized by nes.hsi
271//              mapinfo = hashfile_extrainfo(image);
271            mapinfo = hashfile_extrainfo(*this);
272272           
273273            // image_extrainfo() resets the file position back to start.
274274            fseek(0, SEEK_SET);
trunk/src/mess/machine/nes_slot.h
r20935r20936
8484   bool m_has_battery, m_has_prgram;
8585};
8686
87extern void nes_partialhash(hash_collection &dest, const unsigned char *data, unsigned long length, const char *functions);
8788
89
8890// ======================> nes_cart_slot_device
8991
9092class base_nes_cart_slot_device : public device_t,
r20935r20936
115117   virtual const char *image_interface() const { return "nes_cart"; }
116118   virtual const char *file_extensions() const { return "nes,unf,unif"; }
117119   virtual const option_guide *create_option_guide() const { return NULL; }
120   virtual device_image_partialhash_func get_partial_hash() const { return &nes_partialhash; }
118121   
119122   // slot interface overrides
120123   virtual const char * get_default_card_software(const machine_config &config, emu_options &options);

Previous 199869 Revisions Next


© 1997-2024 The MAME Team