trunk/src/build/file2str.c
| r0 | r242409 | |
| 1 | /*************************************************************************** |
| 2 | |
| 3 | file2str.c |
| 4 | |
| 5 | Simple file to string converter. |
| 6 | |
| 7 | Copyright Nicola Salmoria and the MAME Team. |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | |
| 10 | ***************************************************************************/ |
| 11 | |
| 12 | #include <stdio.h> |
| 13 | #include <stdlib.h> |
| 14 | |
| 15 | |
| 16 | /*------------------------------------------------- |
| 17 | main - primary entry point |
| 18 | -------------------------------------------------*/ |
| 19 | |
| 20 | int main(int argc, char *argv[]) |
| 21 | { |
| 22 | const char *srcfile, *dstfile, *varname, *type; |
| 23 | FILE *src, *dst; |
| 24 | unsigned char *buffer; |
| 25 | int bytes, offs; |
| 26 | int terminate = 1; |
| 27 | |
| 28 | /* needs at least three arguments */ |
| 29 | if (argc < 4) |
| 30 | { |
| 31 | fprintf(stderr, |
| 32 | "Usage:\n" |
| 33 | " laytostr <source.lay> <output.h> <varname> [<type>]\n" |
| 34 | "\n" |
| 35 | "The default <type> is char, with an assumed NULL terminator\n" |
| 36 | ); |
| 37 | return 0; |
| 38 | } |
| 39 | |
| 40 | /* extract arguments */ |
| 41 | srcfile = argv[1]; |
| 42 | dstfile = argv[2]; |
| 43 | varname = argv[3]; |
| 44 | type = (argc >= 5) ? argv[4] : "char"; |
| 45 | if (argc >= 5) |
| 46 | terminate = 0; |
| 47 | |
| 48 | /* open source file */ |
| 49 | src = fopen(srcfile, "rb"); |
| 50 | if (src == NULL) |
| 51 | { |
| 52 | fprintf(stderr, "Unable to open source file '%s'\n", srcfile); |
| 53 | return 1; |
| 54 | } |
| 55 | |
| 56 | /* determine file size */ |
| 57 | fseek(src, 0, SEEK_END); |
| 58 | bytes = ftell(src); |
| 59 | fseek(src, 0, SEEK_SET); |
| 60 | |
| 61 | /* allocate memory */ |
| 62 | buffer = (unsigned char *)malloc(bytes + 1); |
| 63 | if (buffer == NULL) |
| 64 | { |
| 65 | fclose(src); |
| 66 | fprintf(stderr, "Out of memory allocating %d byte buffer\n", bytes); |
| 67 | return 1; |
| 68 | } |
| 69 | |
| 70 | /* read the source file */ |
| 71 | fread(buffer, 1, bytes, src); |
| 72 | buffer[bytes] = 0; |
| 73 | fclose(src); |
| 74 | |
| 75 | /* open dest file */ |
| 76 | dst = fopen(dstfile, "w"); |
| 77 | if (dst == NULL) |
| 78 | { |
| 79 | free(buffer); |
| 80 | fprintf(stderr, "Unable to open output file '%s'\n", dstfile); |
| 81 | return 1; |
| 82 | } |
| 83 | |
| 84 | /* write the initial header */ |
| 85 | fprintf(dst, "extern const %s %s[];\n", type, varname); |
| 86 | fprintf(dst, "const %s %s[] =\n{\n\t", type, varname); |
| 87 | |
| 88 | /* write out the data */ |
| 89 | for (offs = 0; offs < bytes + terminate; offs++) |
| 90 | { |
| 91 | fprintf(dst, "0x%02x%s", buffer[offs], (offs != bytes + terminate - 1) ? "," : ""); |
| 92 | if (offs % 16 == 15) |
| 93 | fprintf(dst, "\n\t"); |
| 94 | } |
| 95 | fprintf(dst, "\n};\n"); |
| 96 | |
| 97 | /* close the files */ |
| 98 | free(buffer); |
| 99 | fclose(dst); |
| 100 | return 0; |
| 101 | } |
trunk/src/mame/drivers/naomi.c
| r242408 | r242409 | |
| 263 | 263 | Maze of the Kings The (prototype) no cart * 21 (64Mb) present 315-6206 FRI * flash-PCB, not dumped but known to exist |
| 264 | 264 | Samba de Amigo (prototype) no cart * 21 (64Mb) present 315-6206 317-0270-COM * instead of EPROM have tiny PCB with 2 flashroms on it |
| 265 | 265 | Soul Surfer (Rev A) 840-0095C 23838C 21 (64Mb) present 315-6206 not present |
| 266 | | Star Horse (server) 840-0055C 23626 17 (64Mb) present 315-6206 not present |
| 266 | Star Horse (server) 840-0055C 23626 17 (64Mb) present 315-6206 not present requires 837-13785 ARCNET&IO BD |
| 267 | 267 | The King of Route 66 (Rev A) 840-0087C 23819A 20 (64Mb) present 315-6206 not present content is the same as regular 171-8132A cart |
| 268 | 268 | Virtua NBA (prototype) no cart * 21 (64Mb) present 315-6206 317-0271-COM * instead of EPROM have tiny PCB with 2 flashroms on it |
| 269 | 269 | Virtua Tennis / Power Smash (prototype) no cart * 21 (64Mb) present 315-6206 317-0263-COM * flash-PCB, title screen have label "SOFT R&D Dept.#3", not dumped but known to exist |
| r242408 | r242409 | |
| 517 | 517 | MushiKing - The King Of Beetle 2K5 1ST 840-0158C 24286 7 (128Mb) 315-6319A 315-6213 not present requires 610-0669 barcode reader |
| 518 | 518 | Oinori-daimyoujin Matsuri 840-0126B 24053 5 (128Mb) 315-6319A 315-6213 not present requires 837-14274 "G2 EXPANSION BD" (similar to hopper 837-14381 but with ARC NET chip) |
| 519 | 519 | Samba de Amigo Ver. 2000 840-0047C 23600 11 (128Mb) 315-6319A 315-6213 317-0295-COM |
| 520 | | Star Horse (big screens) 840-0054C 23625 4 (128Mb) 315-6319 315-6213 not present |
| 521 | | Star Horse (client) 840-0056C 23627 6 (128Mb)* 315-6319 315-6213 not present * +1 (64Mb) |
| 522 | | Star Horse Progress (Rev A) 840-0123C 24122A 7 (128Mb) 315-6319A 315-6213 not present requires an additional middle board n. 837-13785 |
| 520 | Star Horse (big screens) 840-0054C 23625 4 (128Mb) 315-6319 315-6213 not present requires 837-13785 ARCNET&IO BD |
| 521 | Star Horse (satellite) 840-0056C 23627 6 (128Mb)* 315-6319 315-6213 not present * +1 (64Mb), requires 837-13785 ARCNET&IO BD |
| 522 | Star Horse Progress (satellite) (Rev A) 840-0123C 24122A 7 (128Mb) 315-6319A 315-6213 not present requires 837-13785 ARCNET&IO BD |
| 523 | 523 | The King of Route 66 (Rev A) 840-0087C 23819A 10 (128Mb) 315-6319A 315-6213 not present |
| 524 | 524 | Virtua Striker 3 (Rev B) 840-0061C 23663B 11 (128Mb) 315-6319A 315-6213 317-0310-COM |
| 525 | 525 | Virtua Striker 3 (Rev C) 840-0061C 23663C 11 (128Mb) 315-6319A 315-6213 317-0310-COM |
| r242408 | r242409 | |
| 579 | 579 | Poka Suka Ghost 840-0170C not present 5 (512Mb) present 317-0461-COM present requires 837-14672 sensor board (SH4 based) |
| 580 | 580 | Radirgy Noa 841-0062C not present 4 (512Mb) present 317-5138-JPN present IC2# is labeled "VER.2" - IC4# is marked "8A" |
| 581 | 581 | Rythm Tengoku 841-0177C not present 4 (512Mb) present 317-0503-JPN present IC2# is labeled "VER.2" - IC4# is marked "8A" |
| 582 | Star Horse Progress Returns (satellite) 840-0186C not present 2 (512Mb) present not present present IC2# is labeled "VER.2", requires 837-13785 ARCNET&IO BD |
| 582 | 583 | Shooting Love 2007 841-0057C not present 4 (512Mb) present 317-5129-JPN present IC2# is labeled "VER.2" |
| 583 | 584 | Touch De Zunou (Rev A) 840-0166C not present 2 (512Mb) present 317-0435-JPN present IC4# is marked "18", requires 837-14672 sensor board (SH4 based) |
| 584 | 585 | |
| r242408 | r242409 | |
| 5845 | 5846 | NAOMI_DEFAULT_EEPROM |
| 5846 | 5847 | |
| 5847 | 5848 | ROM_REGION( 0x10000000, "rom_board", ROMREGION_ERASEFF) |
| 5848 | | // real encrypted ROM dump |
| 5849 | 5849 | ROM_LOAD( "fpr-24423.ic8", 0x00000000, 0x4000000, CRC(c85513ce) SHA1(88490fe64c0866059492b0c1c714b50f3f270676) ) |
| 5850 | | // decrypted version of IC8 |
| 5851 | | ROM_LOAD( "fpr-24423.ic8d", 0x00000000, 0x4000000, CRC(209a991c) SHA1(d76228a215c50ff3085708182b8e47fd2ebc6a47) ) |
| 5852 | 5850 | ROM_LOAD( "fpr-24424.ic9", 0x04000000, 0x4000000, CRC(7bba2402) SHA1(94d637969c58d5dfa3ee64bc3cfb9495dbb97511) ) |
| 5853 | 5851 | ROM_LOAD( "fpr-24425.ic10", 0x08000000, 0x4000000, CRC(6223ebac) SHA1(64c0ec61c108acbb557e7d3837f578deba832cb6) ) |
| 5854 | 5852 | ROM_LOAD( "fpr-24426.ic11", 0x0c000000, 0x4000000, CRC(c78b0981) SHA1(f889acf9065566e11ff985a3b6c4824e364d57ae) ) |
| r242408 | r242409 | |
| 5859 | 5857 | ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x04)) |
| 5860 | 5858 | ROM_END |
| 5861 | 5859 | |
| 5860 | // this is satellite unit of the main game, server/control and lagre screen units required and need to be dumped |
| 5861 | ROM_START( starhrpr ) |
| 5862 | NAOMI_BIOS |
| 5863 | NAOMI_DEFAULT_EEPROM |
| 5864 | |
| 5865 | ROM_REGION( 0x8000000, "rom_board", ROMREGION_ERASEFF) |
| 5866 | ROM_LOAD( "fpr-24489.ic8", 0x00000000, 0x4000000, CRC(156797a4) SHA1(b20da57726974c5d772885fe809c4bbf89012db6) ) |
| 5867 | ROM_LOAD( "fpr-24790.ic9", 0x04000000, 0x4000000, CRC(b6c40348) SHA1(37b5b334c24536e5b2062c233423f0e3d338e1f2) ) |
| 5868 | |
| 5869 | // PIC not populated |
| 5870 | ROM_REGION( 0x800, "pic_readout", ROMREGION_ERASE00 ) |
| 5871 | |
| 5872 | ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x02)) |
| 5873 | ROM_END |
| 5874 | |
| 5862 | 5875 | /* |
| 5863 | 5876 | |
| 5864 | 5877 | SYSTEMID: NAOMI |
| r242408 | r242409 | |
| 6528 | 6541 | ROM_LOAD( "sflash.bin", 0x000000, 0x000084, CRC(4929e940) SHA1(f8c4277ca0ae5e36b2eed033cc731b8fc4fccafc) ) |
| 6529 | 6542 | ROM_END |
| 6530 | 6543 | |
| 6544 | // this is satellite unit of the main game, server/control and lagre screen units required and need to be dumped |
| 6531 | 6545 | ROM_START( starhrsp ) |
| 6532 | 6546 | NAOMI_BIOS |
| 6533 | 6547 | NAOMI_DEFAULT_EEPROM |
| r242408 | r242409 | |
| 8964 | 8978 | /* 0052 */ GAME( 2000, derbyo2k, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Derby Owners Club 2000 (Rev A)", GAME_FLAGS ) |
| 8965 | 8979 | /* 0054 */ GAME( 2000, starhrse, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Star Horse (big screens)", GAME_FLAGS ) |
| 8966 | 8980 | /* 0055 */ GAME( 2000, starhrct, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Star Horse (server)", GAME_FLAGS ) |
| 8967 | | /* 0056 */ GAME( 2000, starhrcl, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Star Horse (client)", GAME_FLAGS ) |
| 8981 | /* 0056 */ GAME( 2000, starhrcl, naomi, naomim2, naomi, naomi_state, naomi, ROT270,"Sega", "Star Horse (satellite)", GAME_FLAGS ) |
| 8968 | 8982 | /* 0064 */ GAME( 2001, wrungp, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Wave Runner GP", GAME_FLAGS ) |
| 8969 | 8983 | /* 0068 */ GAME( 2001, crakndj2, naomi, naomim2, crackndj,naomi_state, naomi, ROT0, "Sega", "Crackin' DJ Part 2", GAME_FLAGS ) |
| 8970 | 8984 | /* 0073 */ GAME( 2001, inunoos, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Inu No Osanpo / Dog Walking (Rev A)", GAME_FLAGS ) |
| r242408 | r242409 | |
| 8973 | 8987 | /* 0088 */ GAME( 2001, derbyocw, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Derby Owners Club World Edition (JPN, USA, EXP, KOR, AUS) (Rev D)", GAME_FLAGS ) |
| 8974 | 8988 | /* 0088 */ GAME( 2001, drbyocwc, derbyocw, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Derby Owners Club World Edition (JPN, USA, EXP, KOR, AUS) (Rev C)", GAME_FLAGS ) |
| 8975 | 8989 | /* 0098 */ GAME( 2002, shootopl, naomi, naomim1, naomi, naomi_state, naomi, ROT0, "Sega", "Shootout Pool", GAME_FLAGS ) |
| 8976 | | /* 0123 */ GAME( 2003, starhrsp, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Star Horse Progress (Rev A)", GAME_FLAGS ) |
| 8990 | /* 0123 */ GAME( 2003, starhrsp, naomi, naomim2, naomi, naomi_state, naomi, ROT270,"Sega", "Star Horse Progress (satellite) (Rev A)", GAME_FLAGS ) |
| 8977 | 8991 | /* 0126 */ GAME( 2003, oinori, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Oinori-daimyoujin Matsuri", GAME_FLAGS ) |
| 8978 | 8992 | /* 0128 */ GAME( 2003, shootpl, naomi, naomim1, naomi, naomi_state, naomi, ROT0, "Sega", "Shootout Pool The Medal / Shootout Pool Prize (Rev A)", GAME_FLAGS ) |
| 8979 | 8993 | /* 0130 */ GAME( 2002, hopper, naomi, naomi, naomi, naomi_state, naomi, ROT0, "Sega", "SWP Hopper Board", GAME_FLAGS ) |
| r242408 | r242409 | |
| 8988 | 9002 | /* 0170 */ GAME( 2007, pokasuka, manicpnc, naomim4, naomi, naomi_state, naomi, ROT0, "Sega", "Pokasuka Ghost", GAME_FLAGS ) |
| 8989 | 9003 | /* 0175 */ GAME( 2007, asndynmt, naomi, naomim4, naomi, naomi_state, naomi, ROT0, "Sega", "Asian Dynamite", GAME_FLAGS ) |
| 8990 | 9004 | /* 0177 */ GAME( 2007, rhytngk, naomi, naomim4, naomi, naomi_state, naomi, ROT0, "Sega/Nintendo", "Rhythm Tengoku", GAME_FLAGS ) |
| 8991 | | // 01?? Star Horse Progress Returns |
| 9005 | /* 0186 */ GAME( 2009, starhrpr, naomi, naomim4, naomi, naomi_state, naomi, ROT270,"Sega", "Star Horse Progress Returns (satellite)", GAME_FLAGS ) |
| 8992 | 9006 | // 00xx Mayjinsen (Formation Battle in May) - prototype, never released |
| 8993 | 9007 | |
| 8994 | 9008 | /* Cartridge prototypes of games released on GD-ROM */ |