trunk/src/mame/drivers/bfm_sc2.c
| r19483 | r19484 | |
| 2192 | 2192 | int sc2_find_project_string(running_machine &machine ) |
| 2193 | 2193 | { |
| 2194 | 2194 | // search for the title |
| 2195 | | const int strlength = 14; |
| 2196 | | char title_string[] = "PROJECT NUMBER"; |
| 2195 | char title_string[2][16] = { "PROJECT NUMBER", "PROJECT PR" }; |
| 2197 | 2196 | UINT8 *src = machine.root_device().memregion( "maincpu" )->base(); |
| 2198 | 2197 | int size = machine.root_device().memregion( "maincpu" )->bytes(); |
| 2199 | 2198 | |
| 2200 | | for (int i=0;i<size-strlength;i++) |
| 2199 | for (int search=0;search<2;search++) |
| 2201 | 2200 | { |
| 2202 | | int j; |
| 2203 | | int found = 1; |
| 2204 | | for (j=0;j<strlength;j+=1) |
| 2205 | | { |
| 2206 | | UINT8 rom = src[(i+j)]; |
| 2207 | | UINT8 chr = title_string[j]; |
| 2208 | 2201 | |
| 2209 | | if (rom != chr) |
| 2210 | | { |
| 2211 | | found = 0; |
| 2212 | | break; |
| 2213 | | } |
| 2214 | | } |
| 2202 | int strlength = strlen(title_string[search]); |
| 2215 | 2203 | |
| 2216 | | if (found!=0) |
| 2204 | for (int i=0;i<size-strlength;i++) |
| 2217 | 2205 | { |
| 2206 | int j; |
| 2207 | int found = 1; |
| 2208 | for (j=0;j<strlength;j+=1) |
| 2209 | { |
| 2210 | UINT8 rom = src[(i+j)]; |
| 2211 | UINT8 chr = title_string[search][j]; |
| 2218 | 2212 | |
| 2219 | | int end=0; |
| 2220 | | int count = 0; |
| 2221 | | int blankcount = 0; |
| 2222 | | printf("ID String @ %08x\n", i); |
| 2213 | if (rom != chr) |
| 2214 | { |
| 2215 | found = 0; |
| 2216 | break; |
| 2217 | } |
| 2218 | } |
| 2223 | 2219 | |
| 2224 | | while (!end) |
| 2220 | if (found!=0) |
| 2225 | 2221 | { |
| 2226 | | UINT8 rom; |
| 2227 | | int addr; |
| 2228 | 2222 | |
| 2229 | | addr = (i+count); |
| 2223 | int end=0; |
| 2224 | int count = 0; |
| 2225 | int blankcount = 0; |
| 2226 | printf("ID String @ %08x\n", i); |
| 2230 | 2227 | |
| 2231 | | if (addr<size) |
| 2228 | while (!end) |
| 2232 | 2229 | { |
| 2233 | | rom = src[addr]; |
| 2230 | UINT8 rom; |
| 2231 | int addr; |
| 2232 | |
| 2233 | addr = (i+count); |
| 2234 | |
| 2235 | if (addr<size) |
| 2236 | { |
| 2237 | rom = src[addr]; |
| 2234 | 2238 | |
| 2235 | | if ((rom>=0x20) && (rom<0x7f)) |
| 2236 | | { |
| 2237 | | printf("%c", rom); |
| 2238 | | blankcount = 0; |
| 2239 | if ((rom>=0x20) && (rom<0x7f)) |
| 2240 | { |
| 2241 | printf("%c", rom); |
| 2242 | blankcount = 0; |
| 2243 | } |
| 2244 | else |
| 2245 | { |
| 2246 | blankcount++; |
| 2247 | if (blankcount<10) printf(" "); |
| 2248 | } |
| 2249 | |
| 2250 | count++; |
| 2239 | 2251 | } |
| 2240 | 2252 | else |
| 2241 | | { |
| 2242 | | blankcount++; |
| 2243 | | if (blankcount<10) printf(" "); |
| 2244 | | } |
| 2253 | end = 1; |
| 2245 | 2254 | |
| 2246 | | count++; |
| 2255 | if (count>=0x100) |
| 2256 | end = 1; |
| 2247 | 2257 | } |
| 2248 | | else |
| 2249 | | end = 1; |
| 2258 | printf("\n"); |
| 2250 | 2259 | |
| 2251 | | if (count>=0x100) |
| 2252 | | end = 1; |
| 2260 | return 1; |
| 2253 | 2261 | } |
| 2254 | | printf("\n"); |
| 2255 | | |
| 2256 | | return 1; |
| 2257 | 2262 | } |
| 2258 | 2263 | } |
| 2259 | 2264 | |
| r19483 | r19484 | |
| 8045 | 8050 | GAME( 199?, sc2ptytm1 , sc2ptytm , scorpion2_dm01 , drwho , bfm_sc2_state, ofah , 0, "BFM", "Party Time (Bellfruit) (set 2) (Scorpion 2/3)", GAME_FLAGS) |
| 8046 | 8051 | GAME( 199?, sc2ptytm1p , sc2ptytm , scorpion2_dm01 , drwho , bfm_sc2_state, ofah , 0, "BFM", "Party Time (Bellfruit) (set 2, Protocol) (Scorpion 2/3)", GAME_FLAGS) |
| 8047 | 8052 | |
| 8048 | | GAME( 199?, sc2cops , 0 , scorpion2_dm01 , drwho , bfm_sc2_state, ofah , 0, "BFM", "Cops 'n' Robbers (Bellfruit) (set 1) (Scorpion 2/3)", GAME_FLAGS) |
| 8049 | | GAME( 199?, sc2copsp , sc2cops , scorpion2_dm01 , drwho , bfm_sc2_state, ofah , 0, "BFM", "Cops 'n' Robbers (Bellfruit) (set 1, Protocol) (Scorpion 2/3)", GAME_FLAGS) |
| 8050 | | GAME( 199?, sc2cops1p , sc2cops , scorpion2_dm01 , drwho , bfm_sc2_state, ofah , 0, "BFM", "Cops 'n' Robbers (Bellfruit) (set 2, Protocol) (Scorpion 2/3)", GAME_FLAGS) |
| 8051 | | GAME( 199?, sc2cops2 , sc2cops , scorpion2_dm01 , drwho , bfm_sc2_state, ofah , 0, "BFM", "Cops 'n' Robbers (Bellfruit) (set 3) (Scorpion 2/3)", GAME_FLAGS) |
| 8053 | // PROJECT NUMBER 6589 (6012) COPS & ROBBERS (SINGLE SITE 5P/10P/20P) GAME No 95-750-577 - 4-DEC-1995 10:52:08 |
| 8052 | 8054 | GAME( 199?, sc2cops3 , sc2cops , scorpion2_dm01 , drwho , bfm_sc2_state, ofah , 0, "BFM", "Cops 'n' Robbers (Bellfruit) (set 4) (Scorpion 2/3)", GAME_FLAGS) |
| 8055 | // PROJECT NUMBER 6589 (6012) COPS & ROBBERS (SINGLE SITE 5P/10P/20P) GAME No 95-751-577 - 4-DEC-1995 10:52:08 |
| 8053 | 8056 | GAME( 199?, sc2cops3p , sc2cops , scorpion2_dm01 , drwho , bfm_sc2_state, ofah , 0, "BFM", "Cops 'n' Robbers (Bellfruit) (set 4, Protocol) (Scorpion 2/3)", GAME_FLAGS) |
| 8057 | // PROJECT NUMBER 6589 (6012) COPS & ROBBERS (ARCADE 5P/10P/20P) GAME No 95-751-578 - 4-DEC-1995 10:53:58 |
| 8058 | GAME( 199?, sc2copsp , sc2cops , scorpion2_dm01 , drwho , bfm_sc2_state, ofah , 0, "BFM", "Cops 'n' Robbers (Bellfruit) (set 1, Protocol) (Scorpion 2/3)", GAME_FLAGS) |
| 8059 | // PROJECT NUMBER 6589 (6012) COPS & ROBBERS (IRISH ALL CASH 5P/10P/20P) GAME No 95-750-645 - 7-MAR-1996 15:07:40 |
| 8054 | 8060 | GAME( 199?, sc2cops4 , sc2cops , scorpion2_dm01 , drwho , bfm_sc2_state, ofah , 0, "BFM", "Cops 'n' Robbers (Bellfruit) (set 5) (Scorpion 2/3)", GAME_FLAGS) |
| 8061 | // PROJECT NUMBER 6589 (6012) COPS & ROBBERS (#10 ALL CASH 20P/25P) GAME No 95-750-652 - 15-MAR-1996 11:52:02 |
| 8062 | GAME( 199?, sc2cops , 0 , scorpion2_dm01 , drwho , bfm_sc2_state, ofah , 0, "BFM", "Cops 'n' Robbers (Bellfruit) (set 1) (Scorpion 2/3)", GAME_FLAGS) |
| 8063 | // PROJECT NUMBER 6589 (6012) COPS & ROBBERS (#10 ALL CASH 20P/25P) GAME No 95-751-652 - 15-MAR-1996 11:52:02 |
| 8064 | GAME( 199?, sc2cops1p , sc2cops , scorpion2_dm01 , drwho , bfm_sc2_state, ofah , 0, "BFM", "Cops 'n' Robbers (Bellfruit) (set 2, Protocol) (Scorpion 2/3)", GAME_FLAGS) |
| 8065 | |
| 8066 | // PROJECT NUMBER 6012 COPS & ROBBERS #3/#6 GAME No 95-750-044 - 29-DEC-1992 21:26:28 |
| 8055 | 8067 | GAME( 199?, sc2cops5 , sc2cops , scorpion2_dm01 , drwho , bfm_sc2_state, ofah , 0, "BFM", "Cops 'n' Robbers (Bellfruit) (set 6) (Scorpion 2/3)", GAME_FLAGS) |
| 8068 | // PROJECT NUMBER 6012 COPS AND ROBBERS S+P 10P GAME No 95-750-110 - 7-JUL-1993 10:17:18 |
| 8069 | GAME( 199?, sc2cops2 , sc2cops , scorpion2_dm01 , drwho , bfm_sc2_state, ofah , 0, "BFM", "Cops 'n' Robbers (Bellfruit) (set 3) (Scorpion 2/3)", GAME_FLAGS) |
| 8056 | 8070 | |
| 8057 | 8071 | //Shows Nudge Now animation on bootup - using right ROMS? |
| 8058 | 8072 | // PROJECT NUMBER 6622 BINGO COPS N ROBBERS #8/#10 ALL CASH GAME No 95-750-814 - 9-JUL-1996 17:08:15 |