src/mess/drivers/genesis.c
| r2585 | r2586 | |
| 249 | 249 | genesis_last_loaded_image_length = length; // this will be -1 for MD and SMD so can't map those roms to custom mappers (yet) |
| 250 | 250 | |
| 251 | 251 | |
| 252 | | ROM = memory_region(REGION_CPU1); /* 68000 ROM region */ |
| 252 | ROM = memory_region(REGION_CPU1); /* 68000 ROM region */ |
| 253 | 253 | |
| 254 | | for (ptr = 0; ptr < 0x502000; ptr += 2) /* mangle bytes for littleendian machines */ |
| 255 | | { |
| 254 | for (ptr = 0; ptr < 0x502000; ptr += 2) /* mangle bytes for littleendian machines */ |
| 255 | { |
| 256 | 256 | #ifdef LSB_FIRST |
| 257 | | int temp = ROM[relocate + ptr]; |
| 257 | int temp = ROM[relocate + ptr]; |
| 258 | 258 | |
| 259 | | ROM[ptr] = ROM[relocate + ptr + 1]; |
| 260 | | ROM[ptr + 1] = temp; |
| 259 | ROM[ptr] = ROM[relocate + ptr + 1]; |
| 260 | ROM[ptr + 1] = temp; |
| 261 | 261 | #else |
| 262 | | ROM[ptr] = ROM[relocate + ptr]; |
| 263 | | ROM[ptr + 1] = ROM[relocate + ptr + 1]; |
| 262 | ROM[ptr] = ROM[relocate + ptr]; |
| 263 | ROM[ptr + 1] = ROM[relocate + ptr + 1]; |
| 264 | 264 | #endif |
| 265 | } |
| 266 | memcpy(&ROM[VIRGIN_COPY_GEN],&ROM[0x000000],0x500000); // store a copy of data for MACHINE_RESET processing |
| 265 | 267 | } |
| 266 | | memcpy(&ROM[VIRGIN_COPY_GEN],&ROM[0x000000],0x500000); // store a copy of data for MACHINE_RESET processing |
| 268 | return INIT_PASS; |
| 267 | 269 | |
| 268 | | return INIT_PASS; |
| 269 | | } |
| 270 | 270 | bad: |
| 271 | 271 | return INIT_FAIL; |
| 272 | 272 | } |