Previous 15994 Revisions Next

r2257 Saturday 5th April, 2008 at 00:52:22 UTC by Firewave
Removed a "Machine" from src/mess/device.c
[src/mess]device.c device.h messopts.c
[src/mess/devices]appldriv.c sonydriv.c
[src/mess/tools/messtest]testmess.c

src/mess/devices/sonydriv.c
r2256r2257
3737*********************************************************************/
3838
3939#include "driver.h"
40#include "deprecat.h"
4041#include "sonydriv.h"
4142#include "formats/ap_dsk35.h"
4243#include "flopdrv.h"
r2256r2257
121122   floppy *f;
122123
123124   f = &sony_floppy[floppy_select];
124   cur_image = image_from_devtag_and_index("sonydriv", floppy_select);
125   cur_image = image_from_devtag_and_index(Machine, "sonydriv", floppy_select);
125126
126127   track_size = floppy_get_track_size(flopimg_get_image(cur_image), f->head, floppy_drive_get_current_track(cur_image));
127128   new_data = image_realloc(cur_image, f->loadedtrack_data, track_size);
r2256r2257
145146   int len;
146147
147148   f = &sony_floppy[floppy_select];
148   cur_image = image_from_devtag_and_index("sonydriv", floppy_select);
149   cur_image = image_from_devtag_and_index(Machine, "sonydriv", floppy_select);
149150
150151   if (f->loadedtrack_dirty)
151152   {
r2256r2257
167168      return 0xFF;         /* right ??? */
168169
169170   f = &sony_floppy[sony_floppy_select];
170   cur_image = image_from_devtag_and_index("sonydriv", sony_floppy_select);
171   cur_image = image_from_devtag_and_index(Machine, "sonydriv", sony_floppy_select);
171172   if (!image_exists(cur_image))
172173      return 0xFF;
173174
r2256r2257
186187   floppy *f;
187188
188189   f = &sony_floppy[sony_floppy_select];
189   cur_image = image_from_devtag_and_index("sonydriv", sony_floppy_select);
190   cur_image = image_from_devtag_and_index(Machine, "sonydriv", sony_floppy_select);
190191   if (!image_exists(cur_image))
191192      return;
192193
r2256r2257
269270   if ((! sony_enable2()) && sony_floppy_enable)
270271   {
271272      f = &sony_floppy[sony_floppy_select];
272      cur_image = image_from_devtag_and_index("sonydriv", sony_floppy_select);
273      cur_image = image_from_devtag_and_index(Machine, "sonydriv", sony_floppy_select);
273274      if (!image_exists(cur_image))
274275         cur_image = NULL;
275276
r2256r2257
380381   if (sony_floppy_enable)
381382   {
382383      f = &sony_floppy[sony_floppy_select];
383      cur_image = image_from_devtag_and_index("sonydriv", sony_floppy_select);
384      cur_image = image_from_devtag_and_index(Machine, "sonydriv", sony_floppy_select);
384385      if (!image_exists(cur_image))
385386         cur_image = NULL;
386387
src/mess/devices/appldriv.c
r2256r2257
156156   {
157157      if (apple525_enable_mask & (1 << i))
158158      {
159         image = image_from_devtag_and_index(APPLE525TAG, i);
159         image = image_from_devtag_and_index(Machine, APPLE525TAG, i);
160160         if (image)
161161            apple525_disk_set_lines(image, lines);
162162      }
r2256r2257
227227   for (i = 0; i < count; i++)
228228   {
229229      if (apple525_enable_mask & (1 << i))
230         return image_from_devtag_and_index(APPLE525TAG, i);
230         return image_from_devtag_and_index(machine, APPLE525TAG, i);
231231   }
232232   return NULL;
233233}
r2256r2257
264264   {
265265      if (apple525_enable_mask & (1 << i))
266266      {
267         image = image_from_devtag_and_index(APPLE525TAG, i);
267         image = image_from_devtag_and_index(Machine, APPLE525TAG, i);
268268         if (image && !image_is_writable(image))
269269            result = 1;
270270      }
src/mess/tools/messtest/testmess.c
r2256r2257
680680
681681   /* look up the image slot */
682682   if (device_tag)
683      image = image_from_devtag_and_index(device_tag, device_slot);
683      image = image_from_devtag_and_index(machine, device_tag, device_slot);
684684   else
685685      image = image_from_devtype_and_index(device_type, device_slot);
686686   if (!image)
src/mess/device.c
r2256r2257
644644
645645
646646
647const device_config *image_from_devtag_and_index(const char *devtag, int id)
647const device_config *image_from_devtag_and_index(running_machine *machine, const char *devtag, int id)
648648{
649649   const device_config *image = NULL;
650650   const device_config *dev;
651651   const struct IODevice *iodev;
652652
653   for (dev = device_list_first(Machine->config->devicelist, MESS_DEVICE); dev != NULL; dev = device_list_next(dev, MESS_DEVICE))
653   for (dev = device_list_first(machine->config->devicelist, MESS_DEVICE); dev != NULL; dev = device_list_next(dev, MESS_DEVICE))
654654   {
655655      iodev = mess_device_from_core_device(dev);
656656      if ((iodev->tag != NULL) && !strcmp(iodev->tag, devtag) && (iodev->index_in_device == id))
src/mess/device.h
r2256r2257
298298/* deprecated device access functions */
299299int image_index_in_device(const device_config *device);
300300const device_config *image_from_device(const struct IODevice *iodev);
301const device_config *image_from_devtag_and_index(const char *devtag, int id);
301const device_config *image_from_devtag_and_index(running_machine *machine, const char *devtag, int id);
302302
303303/* deprecated device access functions that assume one device of any given type */
304304iodevice_t image_devtype(const device_config *device);
src/mess/messopts.c
r2256r2257
77#include "mame.h"
88#include "options.h"
99#include "driver.h"
10#include "deprecat.h"
1011#include "pool.h"
1112#include "config.h"
1213#include "xmlfile.h"
r2256r2257
217218   dev_tag = mess_device_get_info_string(devclass, MESS_DEVINFO_STR_DEV_TAG);
218219   if (dev_tag != NULL)
219220   {
220      image = image_from_devtag_and_index(dev_tag, device_index);
221      image = image_from_devtag_and_index(Machine, dev_tag, device_index);
221222   }
222223   else
223224   {

Previous 15994 Revisions Next


© 1998-2018 The MESS Team