r7243 Tuesday 2nd February, 2010 at 20:28:57 UTC by Miodrag Milanović
Fixed cart handling, make coco cart boots again.
[src/mess]image.c mess.c

src/mess/mess.c
r7242r7243
6161
6262         if ((image_name != NULL) && (image_name[0] != '\0'))
6363         {
64            int result = INIT_FAIL;
65           
66            /* try to load this image */
67            result = image_load(image, image_name);
68
69            /* did the image load fail? */
70            if (result)
71            {
72               /* retrieve image error message */
73               const char *image_err = image_error(image);
74
75               /* unload all images */
76               image_unload_all(machine);
77
78               /* FIXME: image_name is always empty in this message because of the image_unload_all() call */
79               fatalerror_exitcode(machine, MAMERR_DEVICE, "Device %s load (%s) failed: %s\n",
80                  info.name,
81                  osd_basename((char *) image_name),
82                  image_err);
83            }
6484         }
6585         else
6686         {
r7242r7243
95115    {
96116        if (is_image_device(device))
97117      {
98         const char *image_name;
99         int result = INIT_FAIL;
100         image_device_info info;
101         
102         /* get the device info */
103         info = image_device_getinfo(machine->config, device);
104
105         /* is an image specified for this image */
106         image_name = mess_get_device_option(&info);
107
108         if ((image_name != NULL) && (image_name[0] != '\0'))
109         {
110            /* try to load this image */
111            result = image_load(device, image_name);
112
113            /* did the image load fail? */
114            if (result)
115            {
116               /* retrieve image error message */
117               const char *image_err = image_error(device);
118
119               /* unload all images */
120               image_unload_all(machine);
121
122               /* FIXME: image_name is always empty in this message because of the image_unload_all() call */
123               fatalerror_exitcode(machine, MAMERR_DEVICE, "Device %s load (%s) failed: %s\n",
124                  info.name,
125                  osd_basename((char *) image_name),
126                  image_err);
127            }
128         }
129   
130118         image_finish_load(device);
131119      }
132120   }
src/mess/image.c
r7242r7243
770770    int is_create, int create_format, option_resolution *create_args)
771771{
772772    running_machine *machine = image->machine;
773    image_error_t err;
774773    UINT32 open_plan[4];
775774    int i;
776775    image_slot_data *slot = find_image_slot(image);
r7242r7243
849848    {
850849        slot->create_format = create_format;
851850        slot->create_args = create_args;
852
853        err = (image_error_t)image_finish_load(image);
854        if (err)
855            goto done;
856851    }
857852
858853    /* success! */

Previous 509077 RevisionsNext 50


© 1998-2010 The MESS Team