trunk/src/mess/machine/nes_slot.c
| r20935 | r20936 | |
| 1 | 1 | #include "emu.h" |
| 2 | 2 | #include "machine/nes_slot.h" |
| 3 | #include "hashfile.h" |
| 3 | 4 | |
| 4 | | |
| 5 | 5 | #define NES_BATTERY_SIZE 0x2000 |
| 6 | 6 | |
| 7 | 7 | //************************************************************************** |
| r20935 | r20936 | |
| 268 | 268 | bool ines20 = FALSE, has_trainer = FALSE, prg16k; |
| 269 | 269 | |
| 270 | 270 | // check if the image is recognized by nes.hsi |
| 271 | | // mapinfo = hashfile_extrainfo(image); |
| 271 | mapinfo = hashfile_extrainfo(*this); |
| 272 | 272 | |
| 273 | 273 | // image_extrainfo() resets the file position back to start. |
| 274 | 274 | fseek(0, SEEK_SET); |
trunk/src/mess/machine/nes_slot.h
| r20935 | r20936 | |
| 84 | 84 | bool m_has_battery, m_has_prgram; |
| 85 | 85 | }; |
| 86 | 86 | |
| 87 | extern void nes_partialhash(hash_collection &dest, const unsigned char *data, unsigned long length, const char *functions); |
| 87 | 88 | |
| 89 | |
| 88 | 90 | // ======================> nes_cart_slot_device |
| 89 | 91 | |
| 90 | 92 | class base_nes_cart_slot_device : public device_t, |
| r20935 | r20936 | |
| 115 | 117 | virtual const char *image_interface() const { return "nes_cart"; } |
| 116 | 118 | virtual const char *file_extensions() const { return "nes,unf,unif"; } |
| 117 | 119 | virtual const option_guide *create_option_guide() const { return NULL; } |
| 120 | virtual device_image_partialhash_func get_partial_hash() const { return &nes_partialhash; } |
| 118 | 121 | |
| 119 | 122 | // slot interface overrides |
| 120 | 123 | virtual const char * get_default_card_software(const machine_config &config, emu_options &options); |