~ubuntu-branches/debian/sid/mame/sid

« back to all changes in this revision

Viewing changes to src/emu/diimage.h

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach, Emmanuel Kasper, Jordi Mallach
  • Date: 2012-06-05 20:02:23 UTC
  • mfrom: (0.3.1) (0.1.4)
  • Revision ID: package-import@ubuntu.com-20120605200223-gnlpogjrg6oqe9md
Tags: 0.146-1
[ Emmanuel Kasper ]
* New upstream release
* Drop patch to fix man pages section and patches to link with flac 
  and jpeg system lib: all this has been pushed upstream by Cesare Falco
* Add DM-Upload-Allowed: yes field.

[ Jordi Mallach ]
* Create a "gnu" TARGETOS stanza that defines NO_AFFINITY_NP.
* Stop setting TARGETOS to "unix" in d/rules. It should be autodetected,
  and set to the appropriate value.
* mame_manpage_section.patch: Change mame's manpage section to 6 (games),
  in the TH declaration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
    IO_MEMCARD,     /* 13 - Memory card */
70
70
    IO_CDROM,       /* 14 - optical CD-ROM disc */
71
71
        IO_MAGTAPE,     /* 15 - Magentic tape */
72
 
    IO_COUNT        /* 16 - Total Number of IO_devices for searching */
 
72
        IO_ROM,                 /* 16 - Individual ROM image - the Amstrad CPC has a few applications that were sold on 16kB ROMs */
 
73
    IO_COUNT        /* 17 - Total Number of IO_devices for searching */
73
74
};
74
75
 
75
76
enum image_error_t
108
109
 
109
110
// device image interface function types
110
111
typedef int (*device_image_load_func)(device_image_interface &image);
111
 
typedef int (*device_image_create_func)(device_image_interface &image, int format_type, option_resolution *format_options);
112
112
typedef void (*device_image_unload_func)(device_image_interface &image);
113
 
typedef void (*device_image_display_func)(device_image_interface &image);
114
113
typedef void (*device_image_partialhash_func)(hash_collection &, const unsigned char *, unsigned long, const char *);
115
 
typedef void (*device_image_get_devices_func)(device_image_interface &device);
116
 
typedef bool (*device_image_softlist_load_func)(device_image_interface &image, char *swlist, char *swname, rom_entry *start_entry);
117
114
typedef void (*device_image_display_info_func)(device_image_interface &image);
118
115
 
119
116
//**************************************************************************
128
125
#define DEVICE_IMAGE_LOAD_NAME(name)        device_load_##name
129
126
#define DEVICE_IMAGE_LOAD(name)             int DEVICE_IMAGE_LOAD_NAME(name)(device_image_interface &image)
130
127
 
131
 
#define DEVICE_IMAGE_CREATE_NAME(name)      device_create_##name
132
 
#define DEVICE_IMAGE_CREATE(name)           int DEVICE_IMAGE_CREATE_NAME(name)(device_image_interface &image, int create_format, option_resolution *create_args)
133
 
 
134
128
#define DEVICE_IMAGE_UNLOAD_NAME(name)      device_unload_##name
135
129
#define DEVICE_IMAGE_UNLOAD(name)           void DEVICE_IMAGE_UNLOAD_NAME(name)(device_image_interface &image)
136
130
 
137
 
#define DEVICE_IMAGE_DISPLAY_NAME(name)     device_image_display_func##name
138
 
#define DEVICE_IMAGE_DISPLAY(name)          void DEVICE_IMAGE_DISPLAY_NAME(name)(device_image_interface &image)
139
 
 
140
131
#define DEVICE_IMAGE_DISPLAY_INFO_NAME(name)     device_image_display_info_func##name
141
132
#define DEVICE_IMAGE_DISPLAY_INFO(name)          void DEVICE_IMAGE_DISPLAY_INFO_NAME(name)(device_image_interface &image)
142
133
 
143
 
#define DEVICE_IMAGE_GET_DEVICES_NAME(name) device_image_get_devices_##name
144
 
#define DEVICE_IMAGE_GET_DEVICES(name)      void DEVICE_IMAGE_GET_DEVICES_NAME(name)(device_image_interface &image)
145
 
 
146
 
#define DEVICE_IMAGE_SOFTLIST_LOAD_NAME(name)        device_softlist_load_##name
147
 
#define DEVICE_IMAGE_SOFTLIST_LOAD(name)             bool DEVICE_IMAGE_SOFTLIST_LOAD_NAME(name)(device_image_interface &image, char *swlist, char *swname, rom_entry *start_entry)
148
 
 
149
 
 
150
 
 
151
134
// ======================> device_image_interface
152
135
 
153
136
// class representing interface-specific live image
170
153
        virtual void call_unload() { }
171
154
        virtual void call_display() { }
172
155
        virtual void call_display_info() { }
173
 
        virtual void call_get_devices() { }
174
156
        virtual device_image_partialhash_func get_partial_hash() const { return NULL; }
175
157
        virtual iodevice_t image_type()  const = 0;
176
158
        virtual bool is_readable()  const = 0;
246
228
        image_device_format *formatlist() const { return m_formatlist; }
247
229
 
248
230
        bool load(const char *path);
 
231
        bool open_image_file(emu_options &options);
249
232
        bool finish_load();
250
233
        void unload();
251
234
        bool create(const char *path, const image_device_format *create_format, option_resolution *create_args);
253
236
        int reopen_for_write(const char *path);
254
237
 
255
238
protected:
256
 
        bool load_internal(const char *path, bool is_create, int create_format, option_resolution *create_args);
 
239
        bool load_internal(const char *path, bool is_create, int create_format, option_resolution *create_args, bool just_load);
257
240
        void determine_open_plan(int is_create, UINT32 *open_plan);
258
241
        image_error_t load_image_by_path(UINT32 open_flags, const char *path);
259
242
        void clear();
271
254
        int read_hash_config(const char *sysname);
272
255
        void run_hash(void (*partialhash)(hash_collection &, const unsigned char *, unsigned long, const char *), hash_collection &hashes, const char *types);
273
256
        void image_checkhash();
274
 
        void update_names();
 
257
        void update_names(const device_type device_type = NULL, const char *inst = NULL, const char *brief = NULL);
275
258
        // derived class overrides
276
259
 
277
260
        // configuration