src/mess/machine/mbee.c
| r5954 | r5955 | |
| 240 | 240 | { |
| 241 | 241 | j = 0x8c0 + i; |
| 242 | 242 | |
| 243 | | if (image_fread(image, &data, 1) != 1) return INIT_FAIL; |
| 243 | if (image_fread(image, &data, 1) != 1) |
| 244 | { |
| 245 | image_message(image, "Unexpected EOF"); |
| 246 | return INIT_FAIL; |
| 247 | } |
| 244 | 248 | |
| 245 | 249 | if ((j < mbee_size) || (j > 0xefff)) |
| 246 | 250 | memory_write_byte(space, j, data); |
| 247 | 251 | else |
| 252 | { |
| 253 | image_message(image, "Not enough memory in this microbee"); |
| 248 | 254 | return INIT_FAIL; |
| 255 | } |
| 249 | 256 | } |
| 250 | 257 | |
| 251 | 258 | if (sw) |
| r5954 | r5955 | |
| 263 | 270 | { |
| 264 | 271 | j = 0x100 + i; |
| 265 | 272 | |
| 266 | | if (image_fread(image, &data, 1) != 1) return INIT_FAIL; |
| 273 | if (image_fread(image, &data, 1) != 1) |
| 274 | { |
| 275 | image_message(image, "Unexpected EOF"); |
| 276 | return INIT_FAIL; |
| 277 | } |
| 267 | 278 | |
| 268 | 279 | if ((j < mbee_size) || (j > 0xefff)) |
| 269 | 280 | memory_write_byte(space, j, data); |
| 270 | 281 | else |
| 282 | { |
| 283 | image_message(image, "Not enough memory in this microbee"); |
| 271 | 284 | return INIT_FAIL; |
| 285 | } |
| 272 | 286 | } |
| 273 | 287 | |
| 274 | 288 | if (sw) cpu_set_reg(cpu, REG_GENPC, 0x100); |
src/mess/machine/vtech1.c
| r5954 | r5955 | |
| 197 | 197 | char message[256]; |
| 198 | 198 | snprintf(message, ARRAY_LENGTH(message), "SNAPLOAD: %s\nInsufficient RAM - need %04X",pgmname,size); |
| 199 | 199 | image_seterror(image, IMAGE_ERROR_INVALIDIMAGE, message); |
| 200 | image_message(image, "SNAPLOAD: %s\nInsufficient RAM - need %04X",pgmname,size); |
| 200 | 201 | return INIT_FAIL; |
| 201 | 202 | } |
| 202 | 203 | |
| r5954 | r5955 | |
| 227 | 228 | |
| 228 | 229 | default: |
| 229 | 230 | image_seterror(image, IMAGE_ERROR_UNSUPPORTED, "Snapshot format not supported."); |
| 231 | image_message(image, "Snapshot format not supported."); |
| 230 | 232 | return INIT_FAIL; |
| 231 | 233 | } |
| 232 | 234 | |
src/mess/devices/z80bin.c
| r5954 | r5955 | |
| 42 | 42 | if (ch == EOF) |
| 43 | 43 | { |
| 44 | 44 | image_seterror(image, IMAGE_ERROR_INVALIDIMAGE, "Unexpected EOF while getting file name"); |
| 45 | image_message(image, " Unexpected EOF while getting file name"); |
| 45 | 46 | return INIT_FAIL; |
| 46 | 47 | } |
| 47 | 48 | |
| r5954 | r5955 | |
| 50 | 51 | if (i >= (ARRAY_LENGTH(pgmname) - 1)) |
| 51 | 52 | { |
| 52 | 53 | image_seterror(image, IMAGE_ERROR_INVALIDIMAGE, "File name too long"); |
| 54 | image_message(image, " File name too long"); |
| 53 | 55 | return INIT_FAIL; |
| 54 | 56 | } |
| 55 | 57 | |
| r5954 | r5955 | |
| 63 | 65 | if (image_fread(image, args, sizeof(args)) != sizeof(args)) |
| 64 | 66 | { |
| 65 | 67 | image_seterror(image, IMAGE_ERROR_INVALIDIMAGE, "Unexpected EOF while getting file size"); |
| 68 | image_message(image, " Unexpected EOF while getting file size"); |
| 66 | 69 | return INIT_FAIL; |
| 67 | 70 | } |
| 68 | 71 | |
| r5954 | r5955 | |
| 82 | 85 | { |
| 83 | 86 | snprintf(message, ARRAY_LENGTH(message), "%s: Unexpected EOF while writing byte to %04X", pgmname, (unsigned) j); |
| 84 | 87 | image_seterror(image, IMAGE_ERROR_INVALIDIMAGE, message); |
| 88 | image_message(image, "%s: Unexpected EOF while writing byte to %04X", pgmname, (unsigned) j); |
| 85 | 89 | return INIT_FAIL; |
| 86 | 90 | } |
| 87 | 91 | memory_write_byte(cputag_get_address_space(image->machine,"maincpu",ADDRESS_SPACE_PROGRAM), j, data); |