src/mess/machine/ataricrt.c
| r8402 | r8403 | |
| 272 | 272 | { |
| 273 | 273 | UINT8 *mem = memory_region(image.device().machine, "maincpu"); |
| 274 | 274 | int size; |
| 275 | | |
| 276 | | /* load an optional (dual) cartidge */ |
| 277 | | size = image.fread(&mem[0x4000], 0x8000); |
| 275 | if (image.software_entry() == NULL) |
| 276 | { |
| 277 | /* load an optional (dual) cartidge */ |
| 278 | size = image.fread(&mem[0x4000], 0x8000); |
| 279 | } else { |
| 280 | size = image.get_software_region_length("rom"); |
| 281 | memcpy(mem + 0x4000, image.get_software_region("rom"), size); |
| 282 | } |
| 278 | 283 | if (size<0x8000) memmove(mem+0x4000+0x8000-size, mem+0x4000, size); |
| 279 | 284 | // mirroring of smaller cartridges |
| 280 | 285 | if (size <= 0x1000) memcpy(mem+0xa000, mem+0xb000, 0x1000); |
| r8402 | r8403 | |
| 291 | 296 | } |
| 292 | 297 | } |
| 293 | 298 | logerror("%s loaded cartridge '%s' size %dK\n", |
| 294 | | image.device().machine->gamedrv->name, image.filename() , size/1024); |
| 299 | image.device().machine->gamedrv->name, image.filename() , size/1024); |
| 295 | 300 | return IMAGE_INIT_PASS; |
| 296 | 301 | } |
| 297 | 302 | |