src/mess/drivers/saturn.c
| r2809 | r2810 | |
| 168 | 168 | #include "machine/scudsp.h" |
| 169 | 169 | #include "sound/scsp.h" |
| 170 | 170 | #include "devices/chd_cd.h" |
| 171 | #include "devices/cartslot.h" |
| 171 | 172 | |
| 172 | 173 | |
| 173 | 174 | extern UINT32* stv_vdp2_regs; |
| r2809 | r2810 | |
| 1950 | 1951 | AM_RANGE(0x01000000, 0x01000003) AM_WRITE(minit_w) |
| 1951 | 1952 | AM_RANGE(0x01406f40, 0x01406f43) AM_WRITE(minit_w) // prikura seems to write here .. |
| 1952 | 1953 | AM_RANGE(0x01800000, 0x01800003) AM_WRITE(sinit_w) |
| 1953 | | AM_RANGE(0x02000000, 0x04ffffff) AM_READNOP AM_WRITENOP // cartridge space |
| 1954 | AM_RANGE(0x02000000, 0x023fffff) AM_ROM AM_REGION(REGION_CPU1, 0x80000) // cartridge space |
| 1954 | 1955 | AM_RANGE(0x05800000, 0x0589ffff) AM_READWRITE(stvcd_r, stvcd_w) |
| 1955 | 1956 | /* Sound */ |
| 1956 | 1957 | AM_RANGE(0x05a00000, 0x05a7ffff) AM_READWRITE(stv_sh2_soundram_r, stv_sh2_soundram_w) |
| r2809 | r2810 | |
| 2324 | 2325 | |
| 2325 | 2326 | /* Japanese Saturn */ |
| 2326 | 2327 | ROM_START(saturnjp) |
| 2327 | | ROM_REGION( 0x080000, REGION_CPU1, 0 ) /* SH2 code */ |
| 2328 | ROM_REGION( 0x480000, REGION_CPU1, 0 ) /* SH2 code */ |
| 2328 | 2329 | ROM_SYSTEM_BIOS(0, "101", "Japan v1.01 (941228)") |
| 2329 | 2330 | ROMX_LOAD("sega_101.bin", 0x00000000, 0x00080000, CRC(224b752c) SHA1(df94c5b4d47eb3cc404d88b33a8fda237eaf4720), ROM_BIOS(1)) |
| 2330 | 2331 | ROM_SYSTEM_BIOS(1, "100", "Japan v1.00 (940921)") |
| r2809 | r2810 | |
| 2338 | 2339 | |
| 2339 | 2340 | /* Overseas Saturn */ |
| 2340 | 2341 | ROM_START(saturn) |
| 2341 | | ROM_REGION( 0x080000, REGION_CPU1, 0 ) /* SH2 code */ |
| 2342 | ROM_REGION( 0x480000, REGION_CPU1, 0 ) /* SH2 code */ |
| 2342 | 2343 | ROM_SYSTEM_BIOS(0, "101a", "Overseas v1.01a (941115)") |
| 2343 | 2344 | ROMX_LOAD("sega_101a.bin", 0x00000000, 0x00080000, CRC(4afcf0fa) SHA1(faa8ea183a6d7bbe5d4e03bb1332519800d3fbc3), ROM_BIOS(1)) |
| 2344 | 2345 | ROM_SYSTEM_BIOS(1, "100a", "Overseas v1.00a (941115)") |
| r2809 | r2810 | |
| 2351 | 2352 | ROM_END |
| 2352 | 2353 | |
| 2353 | 2354 | ROM_START(saturneu) |
| 2354 | | ROM_REGION( 0x080000, REGION_CPU1, 0 ) /* SH2 code */ |
| 2355 | ROM_REGION( 0x480000, REGION_CPU1, 0 ) /* SH2 code */ |
| 2355 | 2356 | ROM_SYSTEM_BIOS(0, "101a", "Overseas v1.01a (941115)") |
| 2356 | 2357 | ROMX_LOAD("sega_101a.bin", 0x00000000, 0x00080000, CRC(4afcf0fa) SHA1(faa8ea183a6d7bbe5d4e03bb1332519800d3fbc3), ROM_BIOS(1)) |
| 2357 | 2358 | ROM_SYSTEM_BIOS(1, "100a", "Overseas v1.00a (941115)") |
| r2809 | r2810 | |
| 2364 | 2365 | ROM_END |
| 2365 | 2366 | |
| 2366 | 2367 | ROM_START(vsaturn) |
| 2367 | | ROM_REGION( 0x080000, REGION_CPU1, 0 ) /* SH2 code */ |
| 2368 | ROM_REGION( 0x480000, REGION_CPU1, 0 ) /* SH2 code */ |
| 2368 | 2369 | ROM_LOAD("vsaturn.bin", 0x00000000, 0x00080000, CRC(e4d61811) SHA1(4154e11959f3d5639b11d7902b3a393a99fb5776)) |
| 2369 | 2370 | ROM_REGION( 0x080000, REGION_CPU2, 0 ) /* SH2 code */ |
| 2370 | 2371 | ROM_COPY( REGION_CPU1,0,0,0x080000) |
| r2809 | r2810 | |
| 2374 | 2375 | ROM_END |
| 2375 | 2376 | |
| 2376 | 2377 | ROM_START(hisaturn) |
| 2377 | | ROM_REGION( 0x080000, REGION_CPU1, 0 ) /* SH2 code */ |
| 2378 | ROM_REGION( 0x480000, REGION_CPU1, 0 ) /* SH2 code */ |
| 2378 | 2379 | ROM_LOAD("hisaturn.bin", 0x00000000, 0x00080000, CRC(721e1b60) SHA1(49d8493008fa715ca0c94d99817a5439d6f2c796)) |
| 2379 | 2380 | ROM_REGION( 0x080000, REGION_CPU2, 0 ) /* SH2 code */ |
| 2380 | 2381 | ROM_COPY( REGION_CPU1,0,0,0x080000) |
| r2809 | r2810 | |
| 2396 | 2397 | } |
| 2397 | 2398 | } |
| 2398 | 2399 | |
| 2400 | static DEVICE_IMAGE_LOAD( saturn_cart ) |
| 2401 | { |
| 2402 | UINT8 *ROM = memory_region(REGION_CPU1)+0x80000; |
| 2403 | UINT8 *tmp; |
| 2404 | int i; |
| 2405 | |
| 2406 | tmp = malloc(image_length(image)); |
| 2407 | |
| 2408 | image_fread(image, tmp, image_length(image)); |
| 2409 | |
| 2410 | // now assemble the image in memory in the right order |
| 2411 | for (i = 0; i < image_length(image); i++) |
| 2412 | { |
| 2413 | ROM[i] = tmp[BYTE4_XOR_BE(i)]; |
| 2414 | } |
| 2415 | |
| 2416 | free(tmp); |
| 2417 | |
| 2418 | return INIT_PASS; |
| 2419 | } |
| 2420 | |
| 2421 | static void saturn_cart_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 2422 | { |
| 2423 | /* cartslot */ |
| 2424 | switch(state) |
| 2425 | { |
| 2426 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 2427 | case MESS_DEVINFO_INT_COUNT: info->i = 1; break; |
| 2428 | case MESS_DEVINFO_INT_MUST_BE_LOADED: info->i = 0; break; |
| 2429 | |
| 2430 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 2431 | case MESS_DEVINFO_PTR_LOAD: info->load = device_load_saturn_cart; break; |
| 2432 | |
| 2433 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 2434 | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "bin"); break; |
| 2435 | |
| 2436 | default: cartslot_device_getinfo(devclass, state, info); break; |
| 2437 | } |
| 2438 | } |
| 2439 | |
| 2399 | 2440 | SYSTEM_CONFIG_START( saturn ) |
| 2400 | 2441 | CONFIG_DEVICE(saturn_chdcd_getinfo) |
| 2442 | CONFIG_DEVICE(saturn_cart_getinfo) |
| 2401 | 2443 | SYSTEM_CONFIG_END |
| 2402 | 2444 | |
| 2403 | 2445 | /*************************************************************************** |