| Previous | 15994 Revisions | Next |
| r1038 Wednesday 26th September, 2007 at 18:25:33 UTC by Nathan Woods |
|---|
| Updated to MAME 0.119u1 core |
| [ROOT] | makefile |
| [docs] | messnew.txt |
| [src/emu] | mame.c uimenu.c |
| [src/emu/cpu] | cpu.mak x64drc.c* x64drc.h* x86drc.c x86emit.h |
| [src/emu/cpu/dsp56k] | dsp56dsm.c dsp56ops.c |
| [src/emu/cpu/e132xs] | e132xs.c |
| [src/emu/cpu/h83002] | h83002.c |
| [src/emu/cpu/i386] | i386.c i386.h i386dasm.c |
| [src/emu/cpu/i86] | i86.c i86mem.c |
| [src/emu/cpu/i960] | i960.c |
| [src/emu/cpu/m6800] | 6800ops.c 6800tbl.c |
| [src/emu/cpu/mb86233] | mb86233.c mb86233d.c |
| [src/emu/cpu/mips] | {mdrc64.c} |
| [src/emu/cpu/nec] | nec.c |
| [src/emu/cpu/powerpc] | drc_ops.c ppc.c ppc403.c ppc602.c ppc603.c ppc_mem.c ppc_ops.c ppcdrc.c |
| [src/emu/cpu/sh4] | sh4.c |
| [src/emu/cpu/sharc] | sharcdsm.c |
| [src/emu/cpu/tms32025] | tms32025.c |
| [src/emu/cpu/tms34010] | tms34010.c |
| [src/emu/cpu/v60] | am1.c am2.c am3.c optable.c v60.c |
| [src/emu/cpu/z180] | z180.c z180op.c z180ops.h |
| [src/emu/debug] | debugvw.c |
| [src/emu/sound] | 2610intf.c scsp.c |
| [src/lib/util] | avcomp.c avcomp.h aviio.c aviio.h huffman.c huffman.h options.h pool.c pool.h |
| [src/mame] | mame.mak mamedriv.c |
| [src/mame/drivers] | 20pacgal.c 40love.c armedf.c backfire.c battlera.c bfm_sc2.c bigevglf.c bublbobl.c cliffhgr.c comebaby.c couple.c cowrace.c crgolf.c dblewing.c ddenlovr.c dunhuang.c firebeat.c funworld.c gaelco2.c galaga.c galaxian.c galpanic.c gcpinbal.c gdrawpkr.c genesis.c hng64.c hshavoc.c igs_blit.c jalmah.c jcross.c konamigx.c konamim2.c laserbat.c legionna.c lgp.c* liberate.c lockon.c m72.c mario.c mediagx.c megadriv.c megaplay.c megatech.c micro3d.c model2.c mpu4.c mw8080bw.c namcoic.c namcona1.c namcos2.c namcos21.c opwolf.c othunder.c pokechmp.c progolf.c raiden2.c royalmah.c seattle.c segae.c segae.h* segas16a.c seta2.c sfkick.c skylncr.c sprint4.c srmp5.c* srmp6.c ssv.c st0016.c stv.c stvinit.c system16.c system18.c taito_l.c taito_z.c topshoot.c trvmadns.c ttchamp.c tumbleb.c tumblep.c vegas.c videopin.c viper.c |
| [src/mame/includes] | genesis.h namcos2.h namcos21.h srmp6.h* |
| [src/mame/layout] | videopin.lay* |
| [src/mame/machine] | 53c810.c fd1094.c irem_cpu.c namcos2.c neoboot.c pc16552d.c snesdsp1.c spisprit.c |
| [src/mame/video] | afega.c deco_mlc.c funworld.c gdrawpkr.c* genesis.c hng64.c model2.c model3.c namcos21.c pacman.c segasyse.c seibuspi.c srmp6.c* taito_f3.c vooddefs.h voodoo.c voodoo.h |
| [src/osd/windows] | debugwin.c drawd3d.c input.c window.c window.h |
| [src/tools] | regrep.c |
| r1037 | r1038 | |
|---|---|---|
| 301 | 301 | |
| 302 | 302 | const UINT8 gussun_decryption_table[256] = { |
| 303 | 303 | 0xcd,xxxx,xxxx,0x36,xxxx,0x52,0xb1,0x5b, 0x68,0xcd,xxxx,xxxx,xxxx,0xa8,xxxx,xxxx, /* 00 */ |
| 304 | // !!!! ^^^^ !!!! ???? | |
| 305 | xxxx,xxxx,0x75,0x24,0x01,0x83,0x32,0xe9, xxxx,0x79,xxxx,xxxx,0x22,xxxx,0xac,xxxx, /* 10 */ | |
| 306 | // !!!! ???? ^^^^ ???? !!!! ^^^^ | |
| 307 | 0x5d,0xa5,0x01,0x51,0x0a,xxxx,xxxx,xxxx ,0xf8,0x40,0x91,0x48,0x19,0x01,0x03,0x5f, /* 20 */ | |
| 308 | // ???? !!!! ???? ^^^^ ???? ^^^^ ???? ???? ???? | |
| 309 | 0x26,xxxx,xxxx,0x8b,xxxx,0x02,xxxx,xxxx, 0x8e,0xab,xxxx,xxxx,0xbc,0xf1,0xb3,xxxx, /* 30 */ | |
| 304 | // !!!! ^^^^ !!!! !!!! | |
| 305 | xxxx,xxxx,0x75,0x24,0x09,0x83,0x32,0xe9, xxxx,0x79,xxxx,0x01,0x22,xxxx,0xac,xxxx, /* 10 */ | |
| 306 | // !!!! ???? ^^^^ ???? ???? !!!! ^^^^ | |
| 307 | 0x5d,0xa5,0x1a,0x51,0x0a,xxxx,0x19,xxxx ,0xf8,0x48,0x91,0x40,0x28,0x19,0x03,0x5f, /* 20 */ | |
| 308 | // ???? !!!! ???? ^^^^ ???? ^^^^ gggg gggg ???? | |
| 309 | 0x26,xxxx,xxxx,0x8b,0x2f,0x02,xxxx,xxxx, 0x8e,0xab,xxxx,xxxx,0xbc,0xf1,0xb3,xxxx, /* 30 */ | |
| 310 | 310 | // |
| 311 | xxxx,0xfd,0xc6,xxxx,0x8c,0x3a,0xb3,xxxx, xxxx,0x74,0x61,xxxx,0x33,xxxx,xxxx,xxxx, /* 40 */ | |
| 312 | // ???? ???? ???? !!!! | |
| 313 | xxxx,0x53,0xa0,0xc0,0xc3,0x41,0xfc,0xe7, xxxx,0x01,xxxx,0x2b,xxxx,xxxx,0xba,0x2a, /* 50 */ | |
| 314 | // !!!! ^^^^ ^^^^ ???? !!!! !!!! | |
| 315 | 0xb0,xxxx,xxxx,0xb5,xxxx,xxxx,0xcd,0x07, 0xb9,xxxx,0x48,0x46,0xf9,xxxx,xxxx,xxxx, /* 60 */ | |
| 316 | // ???? ???? ???? ^^^^ | |
| 311 | xxxx,xxxx,0xc6,xxxx,0x8c,0x3a,0x19,xxxx, xxxx,0x74,0x61,xxxx,0x33,xxxx,0x19,xxxx, /* 40 */ | |
| 312 | // ???? ???? ???? !!!! ???? | |
| 313 | xxxx,0x53,0xa0,0xc0,0xc3,0x41,0xfc,0xe7, xxxx,0x1c,0x76,0x2b,xxxx,xxxx,0xba,0x2a, /* 50 */ | |
| 314 | // !!!! ^^^^ ^^^^ ???? ???? !!!! !!!! | |
| 315 | 0xb0,xxxx,xxxx,0x7c,xxxx,xxxx,0xb5,0x07, 0xb9,xxxx,0x27,0x46,0xf9,xxxx,xxxx,xxxx, /* 60 */ | |
| 316 | // ???? !!!! ^^^^ | |
| 317 | 317 | xxxx,0xea,0x72,0x73,0xad,0xd1,0x3b,0x5e, 0xe5,0x57,xxxx,0x0d,xxxx,xxxx,xxxx,0x3c, /* 70 */ |
| 318 | // ???? ^^^^ | |
| 319 | xxxx,0x86,xxxx,xxxx,0x40,0x25,0x2d,xxxx, 0x9a,0xeb,0x04,0x0b,0xa2,0xb8,0xf6,xxxx, /* 80 */ | |
| 320 | // ???? ^^^^ !!!! !!!! | |
| 321 | xxxx,xxxx,0x9d,xxxx,0xbb,xxxx,xxxx,0xcb, 0xa9,0xcf,xxxx,0x60,0x43,0x56,xxxx,xxxx, /* 90 */ | |
| 318 | // ^^^^ | |
| 319 | xxxx,0x86,xxxx,0x19,0x28,0x25,0x2d,xxxx, 0x9a,0xeb,0x04,0x0b,0xa2,0xb8,0xf6,xxxx, /* 80 */ | |
| 320 | // ???? ???? ^^^^ !!!! !!!! | |
| 321 | xxxx,xxxx,0x9d,xxxx,0xbb,xxxx,xxxx,0xcb, 0xa9,0xcf,xxxx,0x60,0x43,0x56,xxxx,0x19, /* 90 */ | |
| 322 | 322 | // ^^^^ ^^^^ !!!! ^^^^ !!!! ???? |
| 323 | xxxx,0xa3,xxxx,xxxx,xxxx,xxxx,0xfa,0xb4, xxxx,0x81,0xe6,xxxx,0x80,0x0c,0xd4,xxxx, /* a0 */ | |
| 324 | // ???? ???? !!!! | |
| 325 | xxxx,xxxx,xxxx,xxxx,0x7d,0x3d,0x3e,xxxx, xxxx,xxxx,0x40,xxxx,xxxx,xxxx,xxxx,xxxx, /* b0 */ | |
| 326 | // ???? ^^^^ ???? | |
| 327 | xxxx,0xff,0x47,xxxx,0x55,0x1e,xxxx,0x59, 0x93,xxxx,xxxx,xxxx,0x88,0xc1,0x01,0xb2, /* c0 */ | |
| 323 | xxxx,0xa3,xxxx,xxxx,xxxx,xxxx,0xfa,0xb4, xxxx,0x81,0xe6,xxxx,0x80,0x8c,0xd4,xxxx, /* a0 */ | |
| 324 | // gggg gggg !!!! | |
| 325 | xxxx,0x19,0x19,xxxx,0x7d,0x3d,0x3e,xxxx, xxxx,xxxx,0x4b,xxxx,xxxx,xxxx,xxxx,xxxx, /* b0 */ | |
| 326 | // ???? ???? ???? ^^^^ ???? | |
| 327 | xxxx,0xff,0x47,xxxx,0x55,0x1e,xxxx,0x59, 0x93,xxxx,xxxx,xxxx,0x88,0xc1,0x11,0xb2, /* c0 */ | |
| 328 | 328 | // ^^^^ ^^^^ ^^^^ ???? |
| 329 | 329 | xxxx,0x2e,0x06,0xc7,0x05,xxxx,0x8a,0x5a, 0x58,0xbe,xxxx,xxxx,xxxx,0x1f,0x23,xxxx, /* d0 */ |
| 330 | 330 | // ^^^^ |
| 331 | 0xe8,xxxx,0x89,0xa1,0xd0,xxxx,0x | |
| 331 | 0xe8,xxxx,0x89,0xa1,0xd0,xxxx,0x19,0xe2, 0x38,0xfe,0x50,0x9c,xxxx,xxxx,xxxx,0x49, /* e0 */ | |
| 332 | 332 | // ???? ^^^^ !!!! |
| 333 | 0xfb,xxxx,0xf3,xxxx,xxxx,0x0f,xxxx,xxxx, xxxx,xxxx,0xf7,0xbd,0x39,0x | |
| 333 | 0xfb,xxxx,0xf3,xxxx,xxxx,0x0f,xxxx,xxxx, xxxx,xxxx,0xf7,0xbd,0x39,0x7d,0xbf,xxxx, /* f0 */ | |
| 334 | 334 | // !!!! !!!! ???? |
| 335 | 335 | }; |
| 336 | 336 | /* |
| 337 | 337 | missing opcode: |
| 338 | 0d -> a8? (10174 - routine from 1016e to 10176) -> probably a8 (test) | |
| 339 | 14 -> ?? | |
| 340 | 19 -> ?? (2282f - routine from 2281f to 22871) (78, 79, 7a, 7b) | |
| 341 | 22 -> ?? ( - routine from 1df1d to | |
| 342 | 26 -> ?? | |
| 343 | 29 -> ?? (1df22 - routine from 1df1d to | |
| 344 | 2b -> ?? (1d4d2 - routine from 1d4b2 to 1d4de) (40, 48 ????) | |
| 345 | 2c -> ?? (20333 - routine from 2032a to | |
| 346 | 2d -> ?? (1df1d - routine from 1df1d to | |
| 347 | 34 -> ?? | |
| 348 | 41 -> ?? | |
| 349 | 46 -> ?? (1461b | |
| 350 | 4e -> ?? (208ac - | |
| 351 | 59 -> ?? (220cf - routine from 2202f to | |
| 352 | 63 -> b5? (1df7f, 1df8c, 1df95 - routine from 1df1d to ) - two bytes | |
| 353 | 66 -> ?? (1daaf - routine from 1da61 to 1daca) - two bytes | |
| 354 | 6a -> ?? (20371 - routine from 20368 to | |
| 355 | 73 -> 73? ( | |
| 356 | 83 -> ?? ( | |
| 357 | 84 -> ?? (1d8f1 - | |
| 358 | 9f -> ?? ( | |
| 359 | ad -> ?? (1d559, 1d8d4 | |
| 360 | a7 -> b4? (2029a - routine from 20290 to | |
| 361 | b1 -> ?? | |
| 362 | b2 -> ?? (20a8c - 20acd | |
| 363 | ba -> ?? (1094d, 10b28 | |
| 364 | ce -> 01? (10236 - routine from 1017e to 10254) (01, 09, 11, 19, 21, 29, 31) | |
| 365 | e6 -> ?? (1d8f7 - | |
| 366 | fd -> ?? (1d659 - routine from 1d63c to 1d65e) | |
| 367 | 338 | |
| 339 | ***14 -> ?? (2097b - 20980 (01 09 11 31 | |
| 340 | +++19 -> 78? (2282f - routine from 2281f to 22871) (78, 79, 7a, 7b) | |
| 341 | +++1b -> 01? (1d8f9 - routine from 1d8c7 to 1d8fc) - three bytes (09,11,21,29,31 - 01,19) | |
| 342 | +++22 -> 00? (1deff - routine from 1dee8 to 1df26) (01,09,10,11,18,19,1a,1b,20,21,28,29,30,31 - 00,08,13 - 12 | |
| 343 | +++26 -> ?? (14ed_ , 198e_ | |
| 344 | *+*29 -> 48? (1df22 - routine from 1df1d to | |
| 345 | +++2d -> 1a? (1df1d - routine from 1dee8 to 1df26) (00,01,10,11,12,13,20,21,28,29,30,31 - 08,09,18,19 | |
| 346 | ---41 -> ?? | |
| 347 | ///46 -> ?? (1461b | |
| 348 | ---4e -> ?? (208ac - | |
| 349 | ///5a -> ?? (222fc - routine from 222ed to ) (7x j...) | |
| 350 | ///63 -> ?? (1df7f, 1df8c, 1df95,21f08 - routine from 1df1d to ) - two bytes j.. | |
| 351 | ---83 -> ?? ( | |
| 352 | ***84 -> 18? (1d8f1 - routine from 1d8c7 to 1d8fc) - three bytes (00,08,10,18,20,28,30) | |
| 353 | ---9f -> ?? ( | |
| 354 | ---b1 -> ?? | |
| 355 | ---b2 -> ?? (20a8c - 20acd | |
| 356 | ///b3 -> ?? (216b6 - 216cf | |
| 357 | ///ba -> ?? (1094d, 10b28 - routine from 10948 to 10b73) one byte (4b | |
| 358 | +++ce -> 21? (10236 - routine from 1017e to 10254) (01, 09, 11, 19, 21, 29, 31) | |
| 359 | ---e6 -> ?? (1d8f7 - | |
| 360 | +++fd -> 79? (1d659 - routine from 1d63c to 1d65e) (78,7a - 79,7b - 7d) | |
| 361 | ||
| 362 | rz guess: | |
| 363 | 2b -> 40 (1d4d2 1db81 1dba9 - routine from 1d4b2 to 1d4de) (ok 40,48,96) -> 40 | |
| 364 | (no 0e,16,17,27,2f,37,3f,41,42,44,45,4a,4b,4c,4d,4e,4f,54,5c,6c,6d,92,94,95,97) | |
| 365 | 2c -> 28 (20333 - routine from 2032a to 20366) | |
| 366 | 59 -> 1c (220cf - 2037f - routine from 2202f to ) 2bytes (1c, | |
| 367 | a7 -> b4 (2029a - routine from 20290 to | |
| 368 | ad -> 8c (1d559, 1d8d4 - routine from 1d547 - ; routine from 1d8b8 to 1d8fc) | |
| 369 | (00,01,08,09,0c,10,11,12,13,14,18,19,1a,1b,1c,20,21,28,29,2c,30,31,34,87,b4,b6,b7) | |
| 370 | ||
| 368 | 371 | missing V35+ core: |
| 369 | 372 | 00 -> 63 not supported (229e2 - routine from 229da to 229ec) (for now we use cd instruction + hack) |
| 370 | 373 | 0f 92 -> of 92 not supported (1011d before of STI instruction) (for now no effects) |
| r1037 | r1038 | |
| 391 | 394 | 0x21 -> a5 (used in "Service Mode" / "CHARACTER menu") |
| 392 | 395 | |
| 393 | 396 | checked against "hasamu" code: hasamu and gussun share code (i.e. you can compare gussun from 2002a and hasamu from 54a0) |
| 394 | 0x09 -> cd | |
| 397 | 0x09 -> cd | |
| 395 | 398 | 0x13 -> 24 (interrupt routine) |
| 396 | 399 | 0x1c -> 22 (interrupt routine) |
| 400 | 0x34 -> 2f (20381 - routine from 2037b to 20391) - used to handle number of lives and game over | |
| 397 | 401 | 0x4a -> 61 (interrupt routine) |
| 402 | 0x66 -> b5 (1daaf - routine from 1da61 to 1daca) - two bytes (colors effect) | |
| 403 | 0x6a -> 27 (20368 - routine from 20368 to 2037a) - used to limit the max lives number | |
| 404 | 0x73 -> 73 (1d4f7 - routine from 1d4df to 1d539) -> (no 70,71,72,74,75,76,77,78,79,7a,7b,7c,7d,7e,7f) - ok 73 | |
| 398 | 405 | 0x8c -> a2 (interrupt routine) |
| 399 | 406 | 0x8e -> f6 (interrupt routine) |
| 400 | 407 | 0x9b -> 60 (interrupt routine) |
| r1037 | r1038 | |
|---|---|---|
| 820 | 820 | mem16[0xa110/2] = 0x9750; |
| 821 | 821 | } |
| 822 | 822 | |
| 823 | #ifdef UNUSED_FUNCTION | |
| 823 | 824 | static UINT16 mv0_bank_ram[ 0x10/2 ]; |
| 824 | 825 | |
| 825 | 826 | static READ16_HANDLER( mv0_bankswitch_r ) |
| r1037 | r1038 | |
| 833 | 834 | COMBINE_DATA( &mv0_bank_ram[ offset ] ); |
| 834 | 835 | neogeo_set_main_cpu_bank_address( bankaddress ); |
| 835 | 836 | } |
| 837 | #endif | |
| 836 | 838 | |
| 837 | 839 | /* I think the code for the kof2003 bootlegs is wrong, they don't work */ |
| 838 | 840 |
| r1037 | r1038 | |
|---|---|---|
| 167 | 167 | mame_timer_adjust(duart[chip].ch[channel].tx_fifo_timer, period, (chip * 2) + channel, time_zero); |
| 168 | 168 | } |
| 169 | 169 | |
| 170 | #ifdef UNUSED_FUNCTION | |
| 170 | 171 | static UINT8 duart_pop_tx_fifo(int chip, int channel, UINT8 data) |
| 171 | 172 | { |
| 172 | 173 | return 0; |
| 173 | 174 | } |
| 175 | #endif | |
| 174 | 176 | |
| 175 | 177 | |
| 176 | 178 | static UINT8 duart_r(int chip, int reg) |
| r1037 | r1038 | |
|---|---|---|
| 68 | 68 | return r; |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | #ifdef UNUSED_FUNCTION | |
| 71 | 72 | static UINT32 sign_extend24(UINT32 val) |
| 72 | 73 | { |
| 73 | 74 | if (val & 0x00800000) |
| r1037 | r1038 | |
| 76 | 77 | val &= ~0xFF000000; |
| 77 | 78 | return val; |
| 78 | 79 | } |
| 80 | #endif | |
| 79 | 81 | |
| 80 | 82 | static void dmaop_invalid(void) |
| 81 | 83 | { |
| r1037 | r1038 | |
|---|---|---|
| 14 | 14 | #include "cpu/m6805/m6805.h" |
| 15 | 15 | #include "namcos2.h" |
| 16 | 16 | |
| 17 | extern void namcos21_kickstart(int); | |
| 18 | ||
| 17 | 19 | int namcos2_gametype; |
| 18 | 20 | |
| 19 | 21 | static unsigned mFinalLapProtCount; |
| r1037 | r1038 | |
| 66 | 68 | /* Perform basic machine initialisation */ |
| 67 | 69 | /*************************************************************/ |
| 68 | 70 | |
| 71 | #define namcos2_eeprom_size 0x2000 | |
| 72 | static UINT8 *namcos2_eeprom; | |
| 73 | ||
| 74 | static void | |
| 75 | ResetAllSubCPUs( int state ) | |
| 76 | { | |
| 77 | cpunum_set_input_line(CPU_SLAVE, INPUT_LINE_RESET, state); | |
| 78 | cpunum_set_input_line(CPU_MCU, INPUT_LINE_RESET, state); | |
| 79 | switch( namcos2_gametype ) | |
| 80 | { | |
| 81 | case NAMCOS21_SOLVALOU: | |
| 82 | case NAMCOS21_STARBLADE: | |
| 83 | case NAMCOS21_AIRCOMBAT: | |
| 84 | case NAMCOS21_CYBERSLED: | |
| 85 | cpunum_set_input_line(4,INPUT_LINE_RESET,state); /* MASTER DSP */ | |
| 86 | cpunum_set_input_line(5,INPUT_LINE_RESET,state); /* SLAVE DSP */ | |
| 87 | break; | |
| 88 | ||
| 89 | // case NAMCOS21_WINRUN91: | |
| 90 | // case NAMCOS21_DRIVERS_EYES: | |
| 91 | default: | |
| 92 | break; | |
| 93 | } | |
| 94 | } | |
| 95 | ||
| 69 | 96 | MACHINE_RESET( namcos2 ){ |
| 70 | 97 | int loop; |
| 71 | ||
| 72 | 98 | mFinalLapProtCount = 0; |
| 73 | 99 | |
| 74 | 100 | /* Initialise the bank select in the sound CPU */ |
| 75 | 101 | namcos2_sound_bankselect_w(0,0); /* Page in bank 0 */ |
| 76 | 102 | |
| 103 | cpunum_set_input_line(CPU_SOUND, INPUT_LINE_RESET, ASSERT_LINE ); | |
| 104 | ||
| 77 | 105 | /* Place CPU2 & CPU3 into the reset condition */ |
| 78 | cpunum_set_input_line(CPU_SOUND, INPUT_LINE_RESET, ASSERT_LINE); | |
| 79 | cpunum_set_input_line(CPU_SLAVE, INPUT_LINE_RESET, ASSERT_LINE); | |
| 80 | cpunum_set_input_line(CPU_MCU, INPUT_LINE_RESET, ASSERT_LINE); | |
| 106 | ResetAllSubCPUs( ASSERT_LINE ); | |
| 81 | 107 | |
| 82 | 108 | /* Initialise interrupt handlers */ |
| 83 | for(loop=0;loop<20;loop++) | |
| 109 | for(loop=0;loop<0x20;loop++) | |
| 84 | 110 | { |
| 85 | 111 | namcos2_68k_master_C148[loop]=0; |
| 86 | 112 | namcos2_68k_slave_C148[loop]=0; |
| 113 | namcos2_68k_gpu_C148[loop]=0; | |
| 87 | 114 | } |
| 88 | 115 | } |
| 89 | 116 | |
| r1037 | r1038 | |
| 91 | 118 | /* EEPROM Load/Save and read/write handling */ |
| 92 | 119 | /*************************************************************/ |
| 93 | 120 | |
| 94 | UINT16 *namcos2_eeprom; | |
| 95 | size_t namcos2_eeprom_size; | |
| 96 | ||
| 97 | 121 | NVRAM_HANDLER( namcos2 ) |
| 98 | 122 | { |
| 123 | if( !namcos2_eeprom ) | |
| 124 | { | |
| 125 | if( !namcos2_eeprom ) | |
| 126 | { | |
| 127 | namcos2_eeprom = auto_malloc(namcos2_eeprom_size); | |
| 128 | } | |
| 129 | } | |
| 99 | 130 | if( read_or_write ) |
| 100 | 131 | { |
| 101 | 132 | mame_fwrite( file, namcos2_eeprom, namcos2_eeprom_size ); |
| r1037 | r1038 | |
| 119 | 150 | } |
| 120 | 151 | |
| 121 | 152 | WRITE16_HANDLER( namcos2_68k_eeprom_w ){ |
| 122 | COMBINE_DATA( &namcos2_eeprom[offset] ); | |
| 153 | if( ACCESSING_LSB ) | |
| 154 | { | |
| 155 | namcos2_eeprom[offset] = data; | |
| 156 | } | |
| 123 | 157 | } |
| 124 | 158 | |
| 125 | 159 | READ16_HANDLER( namcos2_68k_eeprom_r ){ |
| r1037 | r1038 | |
| 411 | 445 | |
| 412 | 446 | UINT16 namcos2_68k_master_C148[0x20]; |
| 413 | 447 | UINT16 namcos2_68k_slave_C148[0x20]; |
| 448 | UINT16 namcos2_68k_gpu_C148[0x20]; | |
| 414 | 449 | |
| 415 | 450 | static UINT16 |
| 416 | 451 | ReadWriteC148( int cpu, offs_t offset, UINT16 data, int bWrite ) |
| 417 | 452 | { |
| 418 | 453 | offs_t addr = ((offset*2)+0x1c0000)&0x1fe000; |
| 419 | UINT16 *pC148Reg = (cpu==CPU_MASTER)?namcos2_68k_master_C148:namcos2_68k_slave_C148; | |
| 420 | UINT16 *pC148RegAlt = (cpu==CPU_SLAVE)?namcos2_68k_master_C148:namcos2_68k_slave_C148; | |
| 421 | UINT16 result = pC148Reg[(addr>>13)&0x1f]; | |
| 422 | int altCPU = (cpu==CPU_MASTER)?CPU_SLAVE:CPU_MASTER; | |
| 454 | UINT16 *pC148Reg = NULL; | |
| 455 | UINT16 *pC148RegAlt = NULL; | |
| 456 | UINT16 result = 0; | |
| 457 | int altCPU = 0; | |
| 423 | 458 | |
| 459 | switch( cpu ) | |
| 460 | { | |
| 461 | case CPU_MASTER: | |
| 462 | pC148Reg = namcos2_68k_master_C148; | |
| 463 | altCPU = CPU_SLAVE; | |
| 464 | pC148RegAlt = namcos2_68k_slave_C148; | |
| 465 | break; | |
| 466 | ||
| 467 | case CPU_SLAVE: | |
| 468 | pC148Reg = namcos2_68k_slave_C148; | |
| 469 | altCPU = CPU_MASTER; | |
| 470 | pC148RegAlt = namcos2_68k_master_C148; | |
| 471 | break; | |
| 472 | ||
| 473 | case CPU_GPU: | |
| 474 | pC148Reg = namcos2_68k_gpu_C148; | |
| 475 | altCPU = CPU_MASTER; | |
| 476 | pC148RegAlt = namcos2_68k_master_C148; | |
| 477 | break; | |
| 478 | } | |
| 479 | ||
| 424 | 480 | if( bWrite ) |
| 425 | 481 | { |
| 426 | 482 | pC148Reg[(addr>>13)&0x1f] = data&0x0007; |
| r1037 | r1038 | |
| 439 | 495 | |
| 440 | 496 | case 0x1d0000: |
| 441 | 497 | if( bWrite ) |
| 442 | { /* DSP "render display list now" trigger */ | |
| 443 | } | |
| 444 | cpunum_set_input_line(cpu, pC148Reg[NAMCOS2_C148_0], CLEAR_LINE); | |
| 498 | { | |
| 499 | cpunum_set_input_line(altCPU, pC148RegAlt[NAMCOS2_C148_CPUIRQ], ASSERT_LINE); | |
| 500 | } cpunum_set_input_line(cpu, pC148Reg[NAMCOS2_C148_0], CLEAR_LINE); | |
| 445 | 501 | break; |
| 446 | 502 | |
| 447 | 503 | case 0x1d2000: |
| 448 | if( bWrite ) | |
| 449 | { | |
| 450 | // mame_printf_debug( "cpu(%d) RAM[0x%06x] = 0x%x\n", cpu, addr, data ); | |
| 451 | } | |
| 452 | 504 | cpunum_set_input_line(cpu, pC148Reg[NAMCOS2_C148_1], CLEAR_LINE); |
| 453 | 505 | break; |
| 454 | 506 | |
| r1037 | r1038 | |
| 514 | 566 | /* Suspend execution */ |
| 515 | 567 | cpunum_set_input_line(CPU_SOUND, INPUT_LINE_RESET, ASSERT_LINE); |
| 516 | 568 | } |
| 569 | if( data&4 ) | |
| 570 | { | |
| 571 | namcos21_kickstart(1); | |
| 572 | } | |
| 517 | 573 | } |
| 518 | 574 | break; |
| 519 | 575 | |
| r1037 | r1038 | |
| 521 | 577 | if( cpu == CPU_MASTER ) /* ? */ |
| 522 | 578 | { |
| 523 | 579 | if( data&0x01 ) |
| 524 | { | |
| 525 | /* Resume execution */ | |
| 526 | cpunum_set_input_line(altCPU, INPUT_LINE_RESET, CLEAR_LINE); | |
| 527 | cpunum_set_input_line(CPU_MCU, INPUT_LINE_RESET, CLEAR_LINE); | |
| 580 | { /* Resume execution */ | |
| 581 | ResetAllSubCPUs( CLEAR_LINE ); | |
| 528 | 582 | /* Give the new CPU an immediate slice of the action */ |
| 529 | 583 | cpu_yield(); |
| 530 | 584 | } |
| 531 | 585 | else |
| 532 | { | |
| 533 | /* Suspend execution */ | |
| 534 | cpunum_set_input_line(altCPU, INPUT_LINE_RESET, ASSERT_LINE); | |
| 535 | cpunum_set_input_line(CPU_MCU, INPUT_LINE_RESET, ASSERT_LINE); | |
| 586 | { /* Suspend execution */ | |
| 587 | ResetAllSubCPUs( ASSERT_LINE ); | |
| 536 | 588 | } |
| 537 | 589 | } |
| 538 | 590 | break; |
| r1037 | r1038 | |
| 567 | 619 | return ReadWriteC148( CPU_SLAVE, offset, 0, 0 ); |
| 568 | 620 | } |
| 569 | 621 | |
| 622 | WRITE16_HANDLER( namcos2_68k_gpu_C148_w ) | |
| 623 | { | |
| 624 | (void)ReadWriteC148( CPU_GPU, offset, data, 1 ); | |
| 625 | } | |
| 626 | ||
| 627 | READ16_HANDLER( namcos2_68k_gpu_C148_r ) | |
| 628 | { | |
| 629 | return ReadWriteC148( CPU_GPU, offset, 0, 0 ); | |
| 630 | } | |
| 631 | ||
| 570 | 632 | static TIMER_CALLBACK( namcos2_68k_master_posirq ) |
| 571 | 633 | { |
| 572 | 634 | video_screen_update_partial(0, param); |
| 573 | 635 | cpunum_set_input_line(CPU_MASTER , namcos2_68k_master_C148[NAMCOS2_C148_POSIRQ] , ASSERT_LINE); |
| 574 | 636 | } |
| 575 | 637 | |
| 576 | static int | |
| 577 | GetPosIRQScanline( void ) | |
| 638 | static int IsSystem21( void ) | |
| 578 | 639 | { |
| 579 | 640 | switch( namcos2_gametype ) |
| 580 | 641 | { |
| 581 | case NAMCOS21_AIRCOMBAT: | |
| 582 | case NAMCOS21_STARBLADE: | |
| 583 | case NAMCOS21_CYBERSLED: | |
| 584 | case NAMCOS21_SOLVALOU: | |
| 585 | case NAMCOS21_WINRUN91: | |
| 586 | case NAMCOS21_DRIVERS_EYES: | |
| 587 | return 16; /* ? */ | |
| 588 | ||
| 589 | default: | |
| 590 | return namcos2_GetPosIrqScanline(); | |
| 642 | case NAMCOS21_AIRCOMBAT: | |
| 643 | case NAMCOS21_STARBLADE: | |
| 644 | case NAMCOS21_CYBERSLED: | |
| 645 | case NAMCOS21_SOLVALOU: | |
| 646 | case NAMCOS21_WINRUN91: | |
| 647 | case NAMCOS21_DRIVERS_EYES: | |
| 648 | return 1; | |
| 649 | default: | |
| 650 | return 0; | |
| 591 | 651 | } |
| 592 | 652 | } |
| 593 | 653 | |
| 654 | static int | |
| 655 | GetPosIRQScanline( void ) | |
| 656 | { | |
| 657 | if( IsSystem21() ) return 0; | |
| 658 | return namcos2_GetPosIrqScanline(); | |
| 659 | } | |
| 660 | ||
| 594 | 661 | INTERRUPT_GEN( namcos2_68k_master_vblank ) |
| 595 | 662 | { |
| 596 | if( namcos2_68k_master_C148[NAMCOS2_C148_POSIRQ] ) | |
| 663 | if( IsSystem21()==0 && namcos2_68k_master_C148[NAMCOS2_C148_POSIRQ] ) | |
| 597 | 664 | { |
| 598 | 665 | int scanline = GetPosIRQScanline(); |
| 599 | 666 | mame_timer_set(video_screen_get_time_until_pos(0, scanline, 0), scanline, namcos2_68k_master_posirq ); |
| r1037 | r1038 | |
| 609 | 676 | |
| 610 | 677 | INTERRUPT_GEN( namcos2_68k_slave_vblank ) |
| 611 | 678 | { |
| 612 | if( namcos2_68k_slave_C148[NAMCOS2_C148_POSIRQ] ) | |
| 679 | if( IsSystem21()==0 && namcos2_68k_slave_C148[NAMCOS2_C148_POSIRQ] ) | |
| 613 | 680 | { |
| 614 | 681 | int scanline = GetPosIRQScanline(); |
| 615 | 682 | mame_timer_set(video_screen_get_time_until_pos(0, scanline, 0), scanline, namcos2_68k_slave_posirq ); |
| r1037 | r1038 | |
| 617 | 684 | cpunum_set_input_line( CPU_SLAVE, namcos2_68k_slave_C148[NAMCOS2_C148_VBLANKIRQ], HOLD_LINE); |
| 618 | 685 | } |
| 619 | 686 | |
| 687 | static TIMER_CALLBACK( namcos2_68k_gpu_posirq ) | |
| 688 | { | |
| 689 | video_screen_update_partial(0, param); | |
| 690 | cpunum_set_input_line(CPU_GPU, namcos2_68k_gpu_C148[NAMCOS2_C148_POSIRQ] , ASSERT_LINE); | |
| 691 | } | |
| 692 | ||
| 693 | INTERRUPT_GEN( namcos2_68k_gpu_vblank ) | |
| 694 | { | |
| 695 | if( namcos2_68k_gpu_C148[NAMCOS2_C148_POSIRQ] ) | |
| 696 | { | |
| 697 | int scanline = 137;//GetPosIRQScanline(); | |
| 698 | mame_timer_set(video_screen_get_time_until_pos(0, scanline, 0), scanline, namcos2_68k_gpu_posirq ); | |
| 699 | } | |
| 700 | cpunum_set_input_line( CPU_GPU, namcos2_68k_gpu_C148[NAMCOS2_C148_VBLANKIRQ], HOLD_LINE); | |
| 701 | } | |
| 702 | ||
| 620 | 703 | /**************************************************************/ |
| 621 | 704 | /* Sound sub-system */ |
| 622 | 705 | /**************************************************************/ |
| r1037 | r1038 | |
|---|---|---|
| 40 | 40 | return res; |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | static int partial_carry_sum32(int add1,int add2,int carry_mask) | |
| 44 | { | |
| 45 | return partial_carry_sum(add1,add2,carry_mask,32); | |
| 46 | } | |
| 47 | ||
| 48 | static int partial_carry_sum24(int add1,int add2,int carry_mask) | |
| 49 | { | |
| 50 | return partial_carry_sum(add1,add2,carry_mask,24); | |
| 51 | } | |
| 52 | ||
| 53 | static int partial_carry_sum16(int add1,int add2,int carry_mask) | |
| 54 | { | |
| 55 | return partial_carry_sum(add1,add2,carry_mask,16); | |
| 56 | } | |
| 57 | ||
| 58 | static int partial_carry_sum8(int add1,int add2,int carry_mask) | |
| 59 | { | |
| 60 | return partial_carry_sum(add1,add2,carry_mask,8); | |
| 61 | } | |
| 62 | ||
| 63 | ||
| 64 | ||
| 65 | 43 | /* |
| 66 | 44 | This is the main key as written by the game. |
| 67 | 45 | There are 256 values; the one to use is key_table[(address >> 8) & 0xff]. |
| r1037 | r1038 | |
| 277 | 255 | (key( 8,addr) << 30) | |
| 278 | 256 | (key( 0,addr) << 31); |
| 279 | 257 | |
| 280 | s1 = partial_carry_sum16( s1, add1, 0x3a59 ) ^ 0x843a; | |
| 281 | s2 = partial_carry_sum32( s2, add2, 0x28d49cac ) ^ 0xc8e29f84; | |
| 258 | s1 = partial_carry_sum( s1, add1, 0x3a59, 16 ) ^ 0x843a; | |
| 259 | s2 = partial_carry_sum( s2, add2, 0x28d49cac, 32 ) ^ 0xc8e29f84; | |
| 282 | 260 | |
| 283 | 261 | |
| 284 | 262 | // reorder the bits in the order MAME expects to decode the graphics |
| r1037 | r1038 | |
|---|---|---|
| 193 | 193 | 0068 20 80 06 10 880610 altbeaj3 1988 88/06/10 |
| 194 | 194 | 0070 59 80 08 06 880806 passshtj 1988 88/08/06 |
| 195 | 195 | 0074 47 80 08 06 880806 passshta 1988 88/08/06 |
| 196 | 0071 20 80 08 09 880809 passsht 1988 88/08/09 | |
| 196 | 197 | 0079 98 80 09 05 880906 exctleag 1988 88/09/05-88/09/06 (atypical) |
| 197 | 198 | 0080 96 80 08 26 880826 passsht 1988 88/08/26 |
| 198 | 199 | 0058-02C FF 80 10 07 881007 sspirtfc 1988 88/10/07 |
| r1037 | r1038 | |
|---|---|---|
| 286 | 286 | // Input byte(20H) integer(Multiplicand) integer(Multiplier) |
| 287 | 287 | // Output integer(Product) |
| 288 | 288 | |
| 289 | #ifdef UNUSED_FUNCTION | |
| 289 | 290 | static void DSP1_Multiply1(INT16 Multiplicand, INT16 Multiplier, INT16 *Product) |
| 290 | 291 | { |
| 291 | 292 | *Product = (Multiplicand * Multiplier >> 15) + 1; |
| 292 | 293 | } |
| 294 | #endif | |
| 293 | 295 | |
| 294 | 296 | // 10H - Inverse Calculation (Bit Perfect) |
| 295 | 297 | // Input byte(10H) integer(Coefficient) integer(Exponent) |
| r1037 | r1038 | |
| 376 | 378 | // Input byte(38H) integer(X) integer(Y) integer(Z) integer(Radius) |
| 377 | 379 | // Output integer(Range) |
| 378 | 380 | |
| 381 | #ifdef UNUSED_FUNCTION | |
| 379 | 382 | static void DSP1_Range1(INT16 X, INT16 Y, INT16 Z, INT16 Radius, INT16 *Range) |
| 380 | 383 | { |
| 381 | 384 | *Range = ((X * X + Y * Y + Z * Z - Radius * Radius) >> 15) + 1; |
| 382 | 385 | } |
| 386 | #endif | |
| 383 | 387 | |
| 384 | 388 | // 28H - Vector Absolute Value Calculation (Bit Perfect) |
| 385 | 389 | // Input byte(28H) integer(X) integer(Y) integer(Z) |
| r1037 | r1038 | |
| 424 | 428 | // Input byte(1CH) integer(Az) integer(Ay) integer(Ax) integer(X) integer(Y) integer(Z) |
| 425 | 429 | // Output integer(X) integer(Y) integer(Z) |
| 426 | 430 | |
| 431 | #ifdef UNUSED_FUNCTION | |
| 427 | 432 | static void DSP1_Polar(INT16 Az, INT16 Ay, INT16 Ax, INT16 X1, INT16 Y1, INT16 Z1, INT16 *X2, INT16 *Y2, INT16 *Z2) |
| 428 | 433 | { |
| 429 | 434 | INT16 X, Y, Z; |
| r1037 | r1038 | |
| 443 | 448 | Z = (Z1 * DSP1_Cos(Ax) >> 15) - (Y1 * DSP1_Sin(Ax) >> 15); |
| 444 | 449 | *Y2 = Y; *Z2 = Z; |
| 445 | 450 | } |
| 451 | #endif | |
| 446 | 452 | |
| 447 | 453 | // 02H - Projection Parameter Setting (Bit Perfect) |
| 448 | 454 | // Input byte(02H) integer(Fx) integer(Fy) integer(Fz) integer(Lfe) integer(Les) integer(Aas) integer(Azs) |
| r1037 | r1038 | |
| 749 | 755 | |
| 750 | 756 | static INT16 MatrixC[3][3]; |
| 751 | 757 | |
| 758 | #ifdef UNUSED_FUNCTION | |
| 752 | 759 | static void DSP1_Attitude_C(INT16 M, INT16 Az, INT16 Ay, INT16 Ax) |
| 753 | 760 | { |
| 754 | 761 | INT16 SinAz = DSP1_Sin(Az); |
| r1037 | r1038 | |
| 772 | 779 | MatrixC[2][1] = ((M * CosAz >> 15) * SinAx >> 15) + (((M * SinAz >> 15) * CosAx >> 15) * SinAy >> 15); |
| 773 | 780 | MatrixC[2][2] = (M * CosAx >> 15) * CosAy >> 15; |
| 774 | 781 | } |
| 782 | #endif | |
| 775 | 783 | |
| 776 | 784 | // 0DH - Convert from Global to Object Coordinates A (Bit Perfect) |
| 777 | 785 | // Input byte(0DH) integer(X) integer(Y) integer(Z) |
| r1037 | r1038 | |
|---|---|---|
| 240 | 240 | DRIVER( scramble ) /* GX387 (c) 1981 Konami */ |
| 241 | 241 | DRIVER( scrambls ) /* GX387 (c) 1981 Stern */ |
| 242 | 242 | DRIVER( scramblb ) /* bootleg */ |
| 243 | DRIVER( scramb2 ) /* bootleg */ | |
| 243 | 244 | DRIVER( explorer ) /* bootleg */ |
| 244 | 245 | DRIVER( strfbomb ) /* bootleg */ |
| 245 | 246 | DRIVER( atlantis ) /* (c) 1981 Comsoft */ |
| r1037 | r1038 | |
| 823 | 824 | DRIVER( aircombj ) /* (c) 1992 (Japan) */ |
| 824 | 825 | DRIVER( aircombu ) /* (c) 1992 (US) */ |
| 825 | 826 | DRIVER( cybsled ) /* (c) 1993 */ |
| 827 | DRIVER( cybsledj ) /* (c) 1993 */ | |
| 826 | 828 | |
| 827 | 829 | /* Namco System 22 games */ |
| 828 | 830 | DRIVER( ridgerac ) /* (c) 1993 */ |
| r1037 | r1038 | |
| 933 | 935 | DRIVER( dkong3j ) /* (c) 1983 Nintendo */ |
| 934 | 936 | DRIVER( dkong3b ) /* bootleg */ |
| 935 | 937 | DRIVER( mario ) /* (c) 1983 Nintendo of America */ |
| 936 | DRIVER( mariojp ) /* (c) 1983 Nintendo */ | |
| 938 | DRIVER( marioo ) /* (c) 1983 Nintendo of America */ | |
| 939 | DRIVER( marioj ) /* (c) 1983 Nintendo */ | |
| 937 | 940 | DRIVER( masao ) /* bootleg */ |
| 938 | 941 | DRIVER( pestplce ) /* bootleg on donkey kong hw */ |
| 939 | 942 | DRIVER( spclforc ) /* (c) 1985 Senko Industries (Magic Eletronics Inc. licence) */ |
| r1037 | r1038 | |
| 1392 | 1395 | DRIVER( dkgensan ) /* (c) 1990 (Japan) */ |
| 1393 | 1396 | DRIVER( dkgenm72 ) /* (c) 1990 (Japan) */ |
| 1394 | 1397 | DRIVER( poundfor ) /* (c) 1990 (World) */ |
| 1398 | DRIVER( poundfoj ) /* (c) 1990 (Japan) */ | |
| 1395 | 1399 | DRIVER( poundfou ) /* (c) 1990 Irem America (US) */ |
| 1396 | 1400 | DRIVER( airduel ) /* (c) 1990 (Japan) */ |
| 1397 | 1401 | DRIVER( cosmccop ) /* (c) 1991 (World) */ |
| r1037 | r1038 | |
| 1553 | 1557 | DRIVER( fightrol ) /* (c) 1983 Taito */ |
| 1554 | 1558 | DRIVER( rollace ) /* (c) 1983 Williams */ |
| 1555 | 1559 | DRIVER( rollace2 ) /* (c) 1983 Williams */ |
| 1560 | DRIVER( lgp ) /* (c) 1983 Taito */ | |
| 1556 | 1561 | DRIVER( vsgongf ) /* (c) 1984 Kaneko */ |
| 1557 | 1562 | DRIVER( ringfgt ) /* (c) 1984 Taito */ |
| 1558 | 1563 | DRIVER( ringfgt2 ) /* (c) 1984 Taito */ |
| r1037 | r1038 | |
| 1572 | 1577 | DRIVER( buggycht ) /* A22 (c) 1984 Taito Corporation + Tefri license */ |
| 1573 | 1578 | DRIVER( ssrj ) /* A40 (c) 1985 Taito Corporation */ |
| 1574 | 1579 | DRIVER( bigevglf ) /* A67 (c) 1986 Taito America Corporation (US) */ |
| 1580 | DRIVER( bigevglj ) /* A67 (c) 1986 Taito Corporation (Japan) */ | |
| 1575 | 1581 | DRIVER( flstory ) /* A45 (c) 1985 Taito Corporation */ |
| 1576 | 1582 | DRIVER( flstoryj ) /* A45 (c) 1985 Taito Corporation (Japan) */ |
| 1577 | 1583 | DRIVER( onna34ro ) /* A52 (c) 1985 Taito Corporation (Japan) */ |
| r1037 | r1038 | |
| 1748 | 1754 | DRIVER( champwrj ) /* C01 (c) 1989 Taito Corporation (Japan) */ |
| 1749 | 1755 | DRIVER( puzznic ) /* C20 (c) 1989 Taito Corporation (Japan) */ |
| 1750 | 1756 | DRIVER( puzznicj ) /* C20 (c) 1989 Taito Corporation (Japan) */ |
| 1757 | DRIVER( puzznici ) /* C20 (c) 1989 Taito Corporation (Japan) */ | |
| 1751 | 1758 | DRIVER( horshoes ) /* C47 (c) 1990 Taito America Corporation (US) */ |
| 1752 | 1759 | DRIVER( palamed ) /* C63 (c) 1990 Taito Corporation (Japan) */ |
| 1753 | 1760 | DRIVER( cachat ) /* ??? (c) 1993 Taito Corporation (Japan) */ |
| r1037 | r1038 | |
| 1802 | 1809 | DRIVER( nightstr ) /* B91 (c) 1989 Taito America Corporation (US) */ |
| 1803 | 1810 | DRIVER( sci ) /* C09 (c) 1989 Taito Corporation Japan (World) */ |
| 1804 | 1811 | DRIVER( scia ) /* C09 (c) 1989 Taito Corporation Japan (World) */ |
| 1812 | DRIVER( scij ) /* C09 (c) 1989 Taito Corporation Japan (World) */ | |
| 1805 | 1813 | DRIVER( sciu ) /* C09 (c) 1989 Taito America Corporation (US) */ |
| 1806 | 1814 | DRIVER( bshark ) /* C34 (c) 1989 Taito America Corporation (US) */ |
| 1807 | 1815 | DRIVER( bsharkj ) /* C34 (c) 1989 Taito Corporation (Japan) */ |
| r1037 | r1038 | |
| 3341 | 3349 | DRIVER( tetris3 ) /* (c) 1988 (FD1094, decrypted) S16A */ |
| 3342 | 3350 | DRIVER( timesca1 ) /* (c) 1987 (FD1089B, decrypted) */ |
| 3343 | 3351 | DRIVER( wb31 ) /* (c) 1988 Sega / Westone (FD1094, decrypted) */ |
| 3352 | DRIVER( pshot16a ) /* (c) 1988 */ | |
| 3344 | 3353 | |
| 3345 | 3354 | /* System 16B */ |
| 3346 | 3355 | DRIVER( aceattac ) /* (c) 1988 (protected) */ |
| r1037 | r1038 | |
| 3422 | 3431 | DRIVER( fpointbl ) /* (c) 1989 (Datsu bootleg) */ |
| 3423 | 3432 | DRIVER( fpointbj ) /* (c) 1989 (Datsu bootleg, Japan) */ |
| 3424 | 3433 | DRIVER( goldnabl ) /* BOOTLEG */ |
| 3434 | DRIVER( goldnab2 ) /* BOOTLEG */ | |
| 3425 | 3435 | DRIVER( passht4b ) /* bootleg */ |
| 3426 | 3436 | DRIVER( passshtb ) /* bootleg */ |
| 3427 | 3437 | DRIVER( shinobl ) /* (c) 1987 (but bootleg) */ |
| r1037 | r1038 | |
| 3457 | 3467 | |
| 3458 | 3468 | /* System18 Bootlegs */ |
| 3459 | 3469 | DRIVER( astormbl ) /* BOOTLEG */ |
| 3470 | DRIVER( astormb2 ) /* BOOTLEG */ | |
| 3460 | 3471 | DRIVER( shdancbl ) /* BOOTLEG */ |
| 3461 | 3472 | DRIVER( mwalkbl ) /* BOOTLEG */ |
| 3462 | 3473 | |
| r1037 | r1038 | |
| 4020 | 4031 | DRIVER( prosoccr ) /* (c) 1983 */ |
| 4021 | 4032 | DRIVER( prosport ) /* (c) 1983 */ |
| 4022 | 4033 | DRIVER( boomrang ) /* (c) 1983 */ |
| 4034 | DRIVER( boomrana ) /* (c) 1983 */ | |
| 4023 | 4035 | DRIVER( kamikcab ) /* (c) 1984 */ |
| 4024 | 4036 | DRIVER( yellowcb ) /* bootleg */ |
| 4025 | 4037 | DRIVER( liberate ) /* (c) 1984 Data East Corporation */ |
| r1037 | r1038 | |
| 4067 | 4079 | DRIVER( spool3i ) /* (c) 1990 Data East Corporation + I-Vics license */ |
| 4068 | 4080 | DRIVER( battlera ) /* (c) 1988 Data East Corporation (World) */ |
| 4069 | 4081 | DRIVER( bldwolf ) /* (c) 1988 Data East USA (US) */ |
| 4082 | DRIVER( bldwolfj ) /* (c) 1988 Data East Corporation (Japan) */ | |
| 4070 | 4083 | DRIVER( actfancr ) /* (c) 1989 Data East Corporation (World) */ |
| 4071 | 4084 | DRIVER( actfanc1 ) /* (c) 1989 Data East Corporation (World) */ |
| 4072 | 4085 | DRIVER( actfancj ) /* (c) 1989 Data East Corporation (Japan) */ |
| r1037 | r1038 | |
| 6101 | 6114 | DRIVER( zeroteam ) /* (c) 1993 Seibu Kaihatsu */ |
| 6102 | 6115 | DRIVER( zeroteaa ) /* (c) 1993 Seibu Kaihatsu */ |
| 6103 | 6116 | DRIVER( zeroteab ) /* (c) 1993 Seibu Kaihatsu */ |
| 6117 | DRIVER( zerotsel ) /* (c) 1993 Seibu Kaihatsu */ | |
| 6104 | 6118 | DRIVER( nzerotea ) /* (c) 1993 Seibu Kaihatsu */ |
| 6105 | 6119 | |
| 6106 | 6120 | /* Seibu SPI System games */ |
| r1037 | r1038 | |
| 6575 | 6589 | DRIVER( myangel2 ) /* (c) 1997 Namco */ |
| 6576 | 6590 | DRIVER( pzlbowl ) /* (c) 1999 Nihon System / Moss */ |
| 6577 | 6591 | DRIVER( penbros ) /* (c) 2000 Subsino */ |
| 6592 | DRIVER( deerhunt ) /* (c) 2000 Sammy USA Corporation */ | |
| 6593 | DRIVER( deerhuna ) /* (c) 2000 Sammy USA Corporation */ | |
| 6594 | DRIVER( deerhunb ) /* (c) 2000 Sammy USA Corporation */ | |
| 6595 | DRIVER( turkhunt ) /* (c) 2001 Sammy USA Corporation */ | |
| 6596 | DRIVER( wschamp ) /* (c) 2001 Sammy USA Corporation */ | |
| 6597 | DRIVER( wschampa ) /* (c) 2001 Sammy USA Corporation */ | |
| 6598 | DRIVER( trophyh ) /* (c) 2002 Sammy USA Corporation */ | |
| 6578 | 6599 | |
| 6579 | 6600 | /* SSV System (Seta, Sammy, Visco) games */ |
| 6580 | 6601 | DRIVER( srmp4 ) /* (c) 1993 Seta */ |
| r1037 | r1038 | |
| 6909 | 6930 | DRIVER( tangtang ) /* (c) 2000 ESD */ |
| 6910 | 6931 | |
| 6911 | 6932 | /* Dyna Electronics / Dynax / Nakanihon games */ |
| 6912 | DRIVER( royalmah ) /* (c) 1982 Falcon */ | |
| 6933 | DRIVER( royalmj ) /* (c) 1982 Nichibutsu */ | |
| 6934 | DRIVER( openmj ) /* (c) 1982 Nichibutsu */ | |
| 6935 | DRIVER( royalmah ) /* Falcon bootleg */ | |
| 6913 | 6936 | DRIVER( suzume ) /* ?? (c) 1986 Dyna Electronics */ |
| 6914 | 6937 | DRIVER( hnayayoi ) /* "02" (c) 1987 Dyna Electronics */ |
| 6915 | 6938 | DRIVER( dondenmj ) /* "03" (c) 1986 Dyna Electronics */ |
| 6939 | DRIVER( ippatsu ) /* ?? (c) 1986 Dyna Electronics */ | |
| 6916 | 6940 | DRIVER( hnfubuki ) /* "06" (c) 1987 Dynax */ |
| 6917 | 6941 | DRIVER( mjdiplob ) /* "07" (c) 1987 Dynax */ |
| 6918 | 6942 | DRIVER( untoucha ) /* "08" (c) 1987 Dynax */ |
| r1037 | r1038 | |
| 6928 | 6952 | DRIVER( jantouki ) /* "27" Jantouki 1989 Dynax */ |
| 6929 | 6953 | DRIVER( mjifb ) /* "29" 1990 Dynax */ |
| 6930 | 6954 | DRIVER( cafetime ) /* 1992 Dynax */ |
| 6955 | DRIVER( cafedoll ) /* 1993 Dynax */ | |
| 6931 | 6956 | DRIVER( janptr96 ) /* 1996 Dynax */ |
| 6932 | 6957 | DRIVER( sprtmtch ) /* "31" (c) 1989 Dynax + Fabtek license */ |
| 6933 | 6958 | DRIVER( maya ) /* (c) 1994 Promat */ |
| r1037 | r1038 | |
| 6966 | 6991 | DRIVER( mjtensin ) /* "100" 1995 Dynax */ |
| 6967 | 6992 | DRIVER( nettoqc ) /* "103" (c) 1995 Nakanihon */ |
| 6968 | 6993 | DRIVER( majrjhdx ) /* "105" 1996 Dynax */ |
| 6994 | DRIVER( ddenlvrj ) /* "113" (c) 1996 Dynax */ | |
| 6969 | 6995 | DRIVER( ddenlovr ) /* "113" (c) 1996 Dynax */ |
| 6996 | DRIVER( ddenlovb ) /* bootleg */ | |
| 6970 | 6997 | DRIVER( hanakanz ) /* "507" 1996 Dynax */ |
| 6998 | DRIVER( akamaru ) /* "501" 1996 Dynax */ | |
| 6971 | 6999 | DRIVER( hkagerou ) /* "510" Hana Kagerou 1996 Nakanihon */ |
| 6972 | 7000 | DRIVER( realbrk ) /* "600" Billiard Academy Real Break 1998 (Europe)*/ |
| 6973 | 7001 | DRIVER( realbrkk ) /* "600" Billiard Academy Real Break 1998 (Korea)*/ |
| r1037 | r1038 | |
| 7469 | 7497 | DRIVER( crgolfa ) /* (c) 1984 Nasco Japan */ |
| 7470 | 7498 | DRIVER( crgolfb ) /* (c) 1984 Nasco Japan */ |
| 7471 | 7499 | DRIVER( crgolfc ) /* (c) 1984 Nasco Japan */ |
| 7500 | DRIVER( crgolfbt ) /* bootleg */ | |
| 7472 | 7501 | DRIVER( crgolfhi ) /* (c) 1984 Nasco Japan */ |
| 7473 | 7502 | DRIVER( truco ) /* (c) 198? Playtronic SRL */ |
| 7474 | 7503 | DRIVER( thedeep ) /* (c) 1987 Woodplace */ |
| r1037 | r1038 | |
| 7632 | 7661 | DRIVER( monglfir ) /* 199? bootleg */ |
| 7633 | 7662 | DRIVER( soccernw ) /* 199? bootleg */ |
| 7634 | 7663 | DRIVER( snookr10 ) /* (c) 1998 Sandiy */ |
| 7664 | DRIVER( saloon ) /* 199? unknown */ | |
| 7635 | 7665 | DRIVER( vroulet ) /* (c) 1989 World Game */ |
| 7636 | 7666 | DRIVER( rcasino ) /* (c) 1984 Dyna Electronics */ |
| 7637 | 7667 | DRIVER( cmv801 ) /* (c) 198? Corsica */ |
| r1037 | r1038 | |
|---|---|---|
| 5 | 5 | #define NAMCOS21_POLY_FRAME_WIDTH 496 |
| 6 | 6 | #define NAMCOS21_POLY_FRAME_HEIGHT 480 |
| 7 | 7 | |
| 8 | /*----------- defined in drivers/namcos21.c -----------*/ | |
| 8 | extern void namcos21_ClearPolyFrameBuffer( void ); | |
| 9 | extern void namcos21_DrawQuad( int sx[4], int sy[4], int zcode[4], int color ); | |
| 9 | 10 | |
| 10 | extern UINT16 *namcos21_dspram16; | |
| 11 | extern READ16_HANDLER(winrun_gpu_color_r); | |
| 12 | extern WRITE16_HANDLER(winrun_gpu_color_w); | |
| 11 | 13 | |
| 12 | /*----------- defined in video/namcos21.c -----------*/ | |
| 14 | extern READ16_HANDLER(winrun_gpu_videoram_r); | |
| 15 | extern WRITE16_HANDLER(winrun_gpu_videoram_w); | |
| 13 | 16 | |
| 14 | extern void namcos21_ClearPolyFrameBuffer( void ); | |
| 15 | extern void namcos21_DrawQuad( int sx[4], int sy[4], int zcode[4], int color ); | |
| 17 | extern READ16_HANDLER(winrun_gpu_register_r); | |
| 18 | extern WRITE16_HANDLER(winrun_gpu_register_w); | |
| 16 | 19 | |
| 17 | VIDEO_START( namcos21 ); | |
| 18 | VIDEO_UPDATE( namcos21_default ); | |
| 19 | VIDEO_UPDATE( namcos21_winrun ); | |
| 20 | ||
| 20 | extern VIDEO_START( namcos21 ) ; | |
| 21 | extern VIDEO_UPDATE( namcos21 ); |
| r1037 | r1038 | |
|---|---|---|
| 12 | 12 | #define CPU_SLAVE 1 |
| 13 | 13 | #define CPU_SOUND 2 |
| 14 | 14 | #define CPU_MCU 3 |
| 15 | #define CPU_GPU | |
| 15 | #define CPU_GPU 5 | |
| 16 | 16 | |
| 17 | 17 | |
| 18 | 18 | /*********************************************/ |
| r1037 | r1038 | |
| 149 | 149 | NVRAM_HANDLER( namcos2 ); |
| 150 | 150 | WRITE16_HANDLER( namcos2_68k_eeprom_w ); |
| 151 | 151 | READ16_HANDLER( namcos2_68k_eeprom_r ); |
| 152 | extern UINT16 *namcos2_eeprom; | |
| 153 | extern size_t namcos2_eeprom_size; | |
| 154 | 152 | |
| 155 | 153 | /**************************************************************/ |
| 156 | 154 | /* Shared data ROM memory handlerhandlers */ |
| r1037 | r1038 | |
| 189 | 187 | |
| 190 | 188 | extern UINT16 namcos2_68k_master_C148[]; |
| 191 | 189 | extern UINT16 namcos2_68k_slave_C148[]; |
| 190 | extern UINT16 namcos2_68k_gpu_C148[]; | |
| 192 | 191 | |
| 193 | 192 | WRITE16_HANDLER( namcos2_68k_master_C148_w ); |
| 194 | 193 | READ16_HANDLER( namcos2_68k_master_C148_r ); |
| r1037 | r1038 | |
| 198 | 197 | READ16_HANDLER( namcos2_68k_slave_C148_r ); |
| 199 | 198 | INTERRUPT_GEN( namcos2_68k_slave_vblank ); |
| 200 | 199 | |
| 200 | WRITE16_HANDLER( namcos2_68k_gpu_C148_w ); | |
| 201 | READ16_HANDLER( namcos2_68k_gpu_C148_r ); | |
| 202 | INTERRUPT_GEN( namcos2_68k_gpu_vblank ); | |
| 203 | ||
| 201 | 204 | /**************************************************************/ |
| 202 | 205 | /* MASTER CPU RAM MEMORY */ |
| 203 | 206 | /**************************************************************/ |
| r0 | r1038 | |
|---|---|---|
| 1 | ||
| 2 | ||
| 3 | ||
| 4 | /* vidhrdw/srmp6.c */ | |
| 5 | ||
| 6 | extern UINT16 *sprite_ram; // Sprite RAM 0x400000-0x47dfff | |
| 7 | extern UINT16 *dec_regs; //Graphic decode register | |
| 8 | ||
| 9 | extern UINT16 *video_regs; | |
| 10 | extern gfx_layout srmp6_layout_8x8; | |
| 11 | ||
| 12 | READ16_HANDLER( video_regs_r ); | |
| 13 | WRITE16_HANDLER( video_regs_w ); | |
| 14 | ||
| 15 | WRITE16_HANDLER( gfx_decode_w ); | |
| 16 | ||
| 17 | READ16_HANDLER( srmp6_sprite_r ); | |
| 18 | WRITE16_HANDLER( srmp6_sprite_w ); | |
| 19 | ||
| 20 | VIDEO_START(srmp6); | |
| 21 | VIDEO_UPDATE(srmp6); |
| r1037 | r1038 | |
|---|---|---|
| 33 | 33 | extern READ8_HANDLER ( genesis_z80_bank_r ); |
| 34 | 34 | extern WRITE8_HANDLER ( genesis_z80_w ); |
| 35 | 35 | extern WRITE16_HANDLER(genesis_ctrl_w); |
| 36 | extern WRITE16_HANDLER ( | |
| 36 | extern WRITE16_HANDLER ( | |
| 37 | 37 | extern READ16_HANDLER ( genesis_io_r ); |
| 38 | 38 | extern READ16_HANDLER ( genesis_68k_to_z80_r ); |
| 39 | 39 | extern INTERRUPT_GEN( genesis_vblank_interrupt ); |
| r1037 | r1038 | |
|---|---|---|
| 1189 | 1189 | $(DRIVERS)/segas16b.o $(VIDEO)/segas16b.o \ |
| 1190 | 1190 | $(DRIVERS)/segas18.o $(VIDEO)/segas18.o \ |
| 1191 | 1191 | $(DRIVERS)/segas32.o $(MACHINE)/segas32.o $(VIDEO)/segas32.o \ |
| 1192 | $(DRIVERS)/segae.o $( | |
| 1192 | $(DRIVERS)/segae.o $( | |
| 1193 | 1193 | $(DRIVERS)/segaxbd.o $(VIDEO)/segaxbd.o \ |
| 1194 | 1194 | $(DRIVERS)/segaybd.o $(VIDEO)/segaybd.o \ |
| 1195 | 1195 | $(DRIVERS)/ssf2md.o \ |
| r1037 | r1038 | |
| 1249 | 1249 | $(DRIVERS)/speglsht.o \ |
| 1250 | 1250 | $(DRIVERS)/speedatk.o $(VIDEO)/speedatk.o \ |
| 1251 | 1251 | $(DRIVERS)/srmp2.o $(VIDEO)/srmp2.o \ |
| 1252 | $(DRIVERS)/srmp6.o \ | |
| 1252 | $(DRIVERS)/srmp5.o \ | |
| 1253 | $(DRIVERS)/srmp6.o $(VIDEO)/srmp6.o \ | |
| 1253 | 1254 | $(DRIVERS)/ssv.o $(VIDEO)/ssv.o \ |
| 1254 | 1255 | $(DRIVERS)/st0016.o $(VIDEO)/st0016.o \ |
| 1255 | 1256 | |
| r1037 | r1038 | |
| 1333 | 1334 | $(DRIVERS)/halleys.o \ |
| 1334 | 1335 | $(DRIVERS)/jollyjgr.o \ |
| 1335 | 1336 | $(DRIVERS)/ksayakyu.o $(VIDEO)/ksayakyu.o \ |
| 1337 | $(DRIVERS)/lgp.o \ | |
| 1336 | 1338 | $(DRIVERS)/lkage.o $(MACHINE)/lkage.o $(VIDEO)/lkage.o \ |
| 1337 | 1339 | $(DRIVERS)/lsasquad.o $(MACHINE)/lsasquad.o $(VIDEO)/lsasquad.o \ |
| 1338 | 1340 | $(DRIVERS)/marinedt.o \ |
| r1037 | r1038 | |
| 1564 | 1566 | $(DRIVERS)/fortecar.o \ |
| 1565 | 1567 | $(DRIVERS)/freekick.o $(VIDEO)/freekick.o \ |
| 1566 | 1568 | $(DRIVERS)/funworld.o $(VIDEO)/funworld.o \ |
| 1567 | $(DRIVERS)/gdrawpkr.o \ | |
| 1569 | $(DRIVERS)/gdrawpkr.o $(VIDEO)/gdrawpkr.o \ | |
| 1568 | 1570 | $(DRIVERS)/go2000.o \ |
| 1569 | 1571 | $(DRIVERS)/good.o \ |
| 1570 | 1572 | $(DRIVERS)/gotcha.o $(VIDEO)/gotcha.o \ |
| r1037 | r1038 | |
| 1728 | 1730 | $(LAYOUT)/subroc3d.lh \ |
| 1729 | 1731 | $(LAYOUT)/buckrog.lh |
| 1730 | 1732 | |
| 1733 | $(DRIVERS)/videopin.o: $(LAYOUT)/videopin.lh | |
| 1734 | ||
| 1731 | 1735 | $(DRIVERS)/warpwarp.o: $(LAYOUT)/geebee.lh \ |
| 1732 | 1736 | $(LAYOUT)/sos.lh |
| 1733 | 1737 |
| r1037 | r1038 | |
|---|---|---|
| 33 | 33 | mlc_buffered_spriteram = auto_malloc(0x3000); |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | #ifdef UNUSED_FUNCTION | |
| 36 | 37 | static void blitRaster(mame_bitmap *bitmap, int rasterMode) |
| 37 | 38 | { |
| 38 | #if 0 | |
| 39 | 39 | int x,y; |
| 40 | 40 | for (y=0; y<256; y++) //todo |
| 41 | 41 | { |
| r1037 | r1038 | |
| 59 | 59 | // xptr+=0x10000 + (mlc_raster_table[0][y]<<5); |
| 60 | 60 | } |
| 61 | 61 | } |
| 62 | } | |
| 62 | 63 | #endif |
| 63 | } | |
| 64 | 64 | |
| 65 | 65 | static void mlc_drawgfxzoom( mame_bitmap *dest_bmp,const gfx_element *gfx, |
| 66 | 66 | UINT32 code1,UINT32 code2, UINT32 color,int flipx,int flipy,int sx,int sy, |
| r1037 | r1038 | |
|---|---|---|
| 404 | 404 | * |
| 405 | 405 | *************************************/ |
| 406 | 406 | |
| 407 | ||
| 407 | ||
| 408 | 408 | { |
| 409 | 409 | voodoo_state *v = voodoo[which]; |
| 410 | int changed = v->fbi.video_changed; | |
| 410 | 411 | int drawbuf = v->fbi.frontbuf; |
| 411 | 412 | int statskey; |
| 412 | 413 | int x, y; |
| 413 | 414 | |
| 415 | /* reset the video changed flag */ | |
| 416 | v->fbi.video_changed = FALSE; | |
| 417 | ||
| 414 | 418 | /* if we are blank, just fill with black */ |
| 415 | 419 | if (v->type <= VOODOO_2 && FBIINIT1_SOFTWARE_BLANK(v->reg[fbiInit1].u)) |
| 416 | 420 | { |
| 417 | 421 | fillbitmap(bitmap, 0, cliprect); |
| 418 | return; | |
| 422 | return changed; | |
| 419 | 423 | } |
| 420 | 424 | |
| 421 | 425 | /* if the CLUT is dirty, recompute the pens array */ |
| r1037 | r1038 | |
| 487 | 491 | |
| 488 | 492 | /* no longer dirty */ |
| 489 | 493 | v->fbi.clut_dirty = FALSE; |
| 494 | changed = TRUE; | |
| 490 | 495 | } |
| 491 | 496 | |
| 492 | 497 | /* debugging! */ |
| r1037 | r1038 | |
| 496 | 501 | /* copy from the current front buffer */ |
| 497 | 502 | for (y = cliprect->min_y; y <= cliprect->max_y; y++) |
| 498 | 503 | { |
| 499 | UINT16 *src = v->fbi.rgb[drawbuf] + y * v->fbi.rowpixels; | |
| 504 | UINT16 *src = v->fbi.rgb[drawbuf] + (y - v->fbi.yoffs) * v->fbi.rowpixels - v->fbi.xoffs; | |
| 500 | 505 | UINT32 *dst = BITMAP_ADDR32(bitmap, y, 0); |
| 501 | 506 | for (x = cliprect->min_x; x <= cliprect->max_x; x++) |
| 502 | 507 | dst[x] = v->fbi.pen[src[x]]; |
| r1037 | r1038 | |
| 518 | 523 | { |
| 519 | 524 | for (y = cliprect->min_y; y <= cliprect->max_y; y++) |
| 520 | 525 | { |
| 521 | UINT16 *src = v->fbi.aux + y * v->fbi.rowpixels; | |
| 526 | UINT16 *src = v->fbi.aux + (y - v->fbi.yoffs) * v->fbi.rowpixels - v->fbi.xoffs; | |
| 522 | 527 | UINT32 *dst = BITMAP_ADDR32(bitmap, y, 0); |
| 523 | 528 | for (x = cliprect->min_x; x <= cliprect->max_x; x++) |
| 524 | 529 | dst[x] = ((src[x] << 8) & 0xff0000) | ((src[x] >> 0) & 0xff00) | ((src[x] >> 8) & 0xff); |
| 525 | 530 | } |
| 526 | 531 | } |
| 532 | return changed; | |
| 527 | 533 | } |
| 528 | 534 | |
| 529 | 535 | |
| r1037 | r1038 | |
| 869 | 875 | |
| 870 | 876 | /* force a partial update */ |
| 871 | 877 | video_screen_update_partial(v->scrnum, video_screen_get_vpos(v->scrnum)); |
| 878 | v->fbi.video_changed = TRUE; | |
| 872 | 879 | |
| 873 | 880 | /* keep a history of swap intervals */ |
| 874 | 881 | count = v->fbi.vblank_count; |
| r1037 | r1038 | |
| 974 | 981 | |
| 975 | 982 | static void adjust_vblank_timer(voodoo_state *v) |
| 976 | 983 | { |
| 977 | mame_time vblank_period = video_screen_get_time_until_pos(v->scrnum, v->fbi. | |
| 984 | mame_time vblank_period = video_screen_get_time_until_pos(v->scrnum, v->fbi.vsyncscan, 0); | |
| 978 | 985 | |
| 979 | 986 | /* if zero, adjust to next frame, otherwise we may get stuck in an infinite loop */ |
| 980 | 987 | if (compare_mame_times(vblank_period, time_zero) == 0) |
| r1037 | r1038 | |
| 2474 | 2481 | } |
| 2475 | 2482 | break; |
| 2476 | 2483 | |
| 2477 | /* video dimensions -- Voodoo/Voodoo2 only */ | |
| 2478 | case videoDimensions: | |
| 2479 | if (v->type <= VOODOO_2 && (chips & 1)) | |
| 2480 | { | |
| 2481 | rectangle visarea; | |
| 2482 | if (data & 0x3ff) | |
| 2483 | v->fbi.width = data & 0x3ff; | |
| 2484 | if (data & 0x3ff0000) | |
| 2485 | v->fbi.height = (data >> 16) & 0x3ff; | |
| 2486 | visarea.min_x = visarea.min_y = 0; | |
| 2487 | visarea.max_x = v->fbi.width - 1; | |
| 2488 | visarea.max_y = v->fbi.height - 1; | |
| 2489 | video_screen_configure(v->scrnum, v->fbi.width, v->fbi.height, &visarea, Machine->screen[v->scrnum].refresh); | |
| 2490 | adjust_vblank_timer(v); | |
| 2491 | recompute_video_memory(v); | |
| 2492 | } | |
| 2493 | break; | |
| 2494 | ||
| 2495 | 2484 | /* vertical sync rate -- Voodoo/Voodoo2 only */ |
| 2496 | 2485 | case hSync: |
| 2497 | 2486 | case vSync: |
| 2487 | case backPorch: | |
| 2488 | case videoDimensions: | |
| 2498 | 2489 | if (v->type <= VOODOO_2 && (chips & 1)) |
| 2499 | 2490 | { |
| 2500 | 2491 | v->reg[regnum].u = data; |
| 2501 | if (v->reg[hSync].u != 0 && v->reg[vSync].u != 0) | |
| 2492 | if (v->reg[hSync].u != 0 && v->reg[vSync].u != 0 && v->reg[videoDimensions].u != 0) | |
| 2502 | 2493 | { |
| 2503 | int vtotal = (v->reg[vSync].u >> 16) + (v->reg[vSync].u & 0xffff); | |
| 2504 | subseconds_t stdperiod = HZ_TO_SUBSECONDS(15750) * vtotal, stddiff = stdperiod - Machine->screen[0].refresh; | |
| 2505 | subseconds_t medperiod = HZ_TO_SUBSECONDS(25000) * vtotal, meddiff = medperiod - Machine->screen[0].refresh; | |
| 2506 | subseconds_t vgaperiod = HZ_TO_SUBSECONDS(31500) * vtotal, vgadiff = vgaperiod - Machine->screen[0].refresh; | |
| 2507 | screen_state *state = &Machine->screen[0]; | |
| 2494 | int htotal = ((v->reg[hSync].u >> 16) & 0x3ff) + 1 + (v->reg[hSync].u & 0xff) + 1; | |
| 2495 | int vtotal = ((v->reg[vSync].u >> 16) & 0xfff) + (v->reg[vSync].u & 0xfff); | |
| 2496 | int hvis = v->reg[videoDimensions].u & 0x3ff; | |
| 2497 | int vvis = (v->reg[videoDimensions].u >> 16) & 0x3ff; | |
| 2498 | int hbp = (v->reg[backPorch].u & 0xff) + 2; | |
| 2499 | int vbp = (v->reg[backPorch].u >> 16) & 0xff; | |
| 2500 | screen_state *state = &Machine->screen[v->scrnum]; | |
| 2501 | subseconds_t stdperiod, medperiod, vgaperiod; | |
| 2502 | subseconds_t stddiff, meddiff, vgadiff; | |
| 2503 | rectangle visarea; | |
| 2508 | 2504 | |
| 2505 | /* create a new visarea */ | |
| 2506 | visarea.min_x = hbp; | |
| 2507 | visarea.max_x = hbp + hvis - 1; | |
| 2508 | visarea.min_y = vbp; | |
| 2509 | visarea.max_y = vbp + vvis - 1; | |
| 2510 | ||
| 2511 | /* keep within bounds */ | |
| 2512 | visarea.max_x = MIN(visarea.max_x, htotal - 1); | |
| 2513 | visarea.max_y = MIN(visarea.max_y, vtotal - 1); | |
| 2514 | ||
| 2515 | /* compute the new period for standard res, medium res, and VGA res */ | |
| 2516 | stdperiod = HZ_TO_SUBSECONDS(15750) * vtotal; | |
| 2517 | medperiod = HZ_TO_SUBSECONDS(25000) * vtotal; | |
| 2518 | vgaperiod = HZ_TO_SUBSECONDS(31500) * vtotal; | |
| 2519 | ||
| 2520 | /* compute a diff against the current refresh period */ | |
| 2521 | stddiff = stdperiod - state->refresh; | |
| 2509 | 2522 | if (stddiff < 0) stddiff = -stddiff; |
| 2523 | meddiff = medperiod - state->refresh; | |
| 2510 | 2524 | if (meddiff < 0) meddiff = -meddiff; |
| 2525 | vgadiff = vgaperiod - state->refresh; | |
| 2511 | 2526 | if (vgadiff < 0) vgadiff = -vgadiff; |
| 2512 | 2527 | |
| 2528 | mame_printf_debug("hSync=%08X vSync=%08X backPorch=%08X videoDimensions=%08X\n", | |
| 2529 | v->reg[hSync].u, v->reg[vSync].u, v->reg[backPorch].u, v->reg[videoDimensions].u); | |
| 2530 | mame_printf_debug("Horiz: %d-%d (%d total) Vert: %d-%d (%d total) -- ", visarea.min_x, visarea.max_x, htotal, visarea.min_y, visarea.max_y, vtotal); | |
| 2531 | ||
| 2532 | /* configure the screen based on which one matches the closest */ | |
| 2513 | 2533 | if (stddiff < meddiff && stddiff < vgadiff) |
| 2514 | video_screen_configure(v->scrnum, state->width, state->height, &state->visarea, stdperiod); | |
| 2534 | { | |
| 2535 | video_screen_configure(v->scrnum, htotal, vtotal, &visarea, stdperiod); | |
| 2536 | mame_printf_debug("Standard resolution, %f Hz\n", SUBSECONDS_TO_HZ(stdperiod)); | |
| 2537 | } | |
| 2515 | 2538 | else if (meddiff < vgadiff) |
| 2516 | video_screen_configure(v->scrnum, state->width, state->height, &state->visarea, medperiod); | |
| 2539 | { | |
| 2540 | video_screen_configure(v->scrnum, htotal, vtotal, &visarea, medperiod); | |
| 2541 | mame_printf_debug("Medium resolution, %f Hz\n", SUBSECONDS_TO_HZ(medperiod)); | |
| 2542 | } | |
| 2517 | 2543 | else |
| 2518 | video_screen_configure(v->scrnum, state->width, state->height, &state->visarea, vgaperiod); | |
| 2544 | { | |
| 2545 | video_screen_configure(v->scrnum, htotal, vtotal, &visarea, vgaperiod); | |
| 2546 | mame_printf_debug("VGA resolution, %f Hz\n", SUBSECONDS_TO_HZ(vgaperiod)); | |
| 2547 | } | |
| 2548 | ||
| 2549 | /* configure the new framebuffer info */ | |
| 2550 | v->fbi.width = hvis; | |
| 2551 | v->fbi.height = vvis; | |
| 2552 | v->fbi.xoffs = hbp; | |
| 2553 | v->fbi.yoffs = vbp; | |
| 2554 | v->fbi.vsyncscan = (v->reg[vSync].u >> 16) & 0xfff; | |
| 2555 | ||
| 2556 | /* recompute the time of VBLANK */ | |
| 2557 | adjust_vblank_timer(v); | |
| 2558 | ||
| 2559 | /* if changing dimensions, update video memory layout */ | |
| 2560 | if (regnum == videoDimensions) | |
| 2561 | recompute_video_memory(v); | |
| 2519 | 2562 | } |
| 2520 | 2563 | } |
| 2521 | 2564 | break; |
| r1037 | r1038 | |
| 2549 | 2592 | { |
| 2550 | 2593 | v->reg[regnum].u = data; |
| 2551 | 2594 | recompute_video_memory(v); |
| 2595 | v->fbi.video_changed = TRUE; | |
| 2552 | 2596 | } |
| 2553 | 2597 | break; |
| 2554 | 2598 | |
| r1037 | r1038 | |
| 2987 | 3031 | case 0: /* front buffer */ |
| 2988 | 3032 | dest = v->fbi.rgb[v->fbi.frontbuf]; |
| 2989 | 3033 | destmax = v->fbi.rgbmax[v->fbi.frontbuf]; |
| 3034 | v->fbi.video_changed = TRUE; | |
| 2990 | 3035 | break; |
| 2991 | 3036 | |
| 2992 | 3037 | case 1: /* back buffer */ |
| r1037 | r1038 | |
| 4527 | 4572 | { |
| 4528 | 4573 | case 0: /* front buffer */ |
| 4529 | 4574 | drawbuf = v->fbi.rgb[v->fbi.frontbuf]; |
| 4575 | v->fbi.video_changed = TRUE; | |
| 4530 | 4576 | break; |
| 4531 | 4577 | |
| 4532 | 4578 | case 1: /* back buffer */ |
| r1037 | r1038 | |
|---|---|---|
| 18 | 18 | }; |
| 19 | 19 | |
| 20 | 20 | void voodoo_start(int which, int scrnum, int type, int fbmem_in_mb, int tmem0_in_mb, int tmem1_in_mb); |
| 21 | ||
| 21 | ||
| 22 | 22 | void voodoo_reset(int which); |
| 23 | 23 | int voodoo_get_type(int which); |
| 24 | 24 | int voodoo_is_stalled(int which); |
| r1037 | r1038 | |
|---|---|---|
| 536 | 536 | } |
| 537 | 537 | } |
| 538 | 538 | |
| 539 | #ifdef UNUSED_FUNCTION | |
| 539 | 540 | static void set_rowscroll(tilemap *layer, int scroll, INT16* rows) |
| 540 | 541 | { |
| 541 | 542 | int i; |
| r1037 | r1038 | |
| 555 | 556 | tilemap_set_scrollx(layer, 0, x); |
| 556 | 557 | tilemap_set_scrolly(layer, 0, y); |
| 557 | 558 | } |
| 559 | #endif | |
| 558 | 560 | |
| 559 | 561 | |
| 560 | 562 | static void combine_tilemap(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, tilemap *tile, int x, int y, int opaque, INT16 *rowscroll) |
| r0 | r1038 | |
|---|---|---|
| 1 | /********************************************************************************** | |
| 2 | ||
| 3 | GAMING DRAW POKER (CEI) | |
| 4 | Driver by Roberto Fresca. | |
| 5 | ||
| 6 | Video Hardware | |
| 7 | ||
| 8 | ***********************************************************************************/ | |
| 9 | ||
| 10 | #include "driver.h" | |
| 11 | static tilemap *bg_tilemap; | |
| 12 | ||
| 13 | WRITE8_HANDLER( gdrawpkr_videoram_w ) | |
| 14 | { | |
| 15 | videoram[offset] = data; | |
| 16 | tilemap_mark_tile_dirty(bg_tilemap, offset); | |
| 17 | } | |
| 18 | ||
| 19 | WRITE8_HANDLER( gdrawpkr_colorram_w ) | |
| 20 | { | |
| 21 | colorram[offset] = data; | |
| 22 | tilemap_mark_tile_dirty(bg_tilemap, offset); | |
| 23 | } | |
| 24 | ||
| 25 | static TILE_GET_INFO( get_bg_tile_info ) | |
| 26 | { | |
| 27 | /* - bits - | |
| 28 | 7654 3210 | |
| 29 | --xx xx-- tiles color. | |
| 30 | ---- --x- tiles bank. | |
| 31 | xx-- ---x seems unused. */ | |
| 32 | ||
| 33 | int attr = colorram[tile_index]; | |
| 34 | int code = videoram[tile_index]; | |
| 35 | int bank = (attr & 0x02) >> 1; /* bit 1 switch the gfx banks */ | |
| 36 | int color = (attr & 0x3c); /* bits 2-3-4-5 for color */ | |
| 37 | ||
| 38 | if (attr == 0x3a) /* Is the palette wrong? */ | |
| 39 | color = 0x3b; /* 0x3b is the best match */ | |
| 40 | ||
| 41 | SET_TILE_INFO(bank, code, color, 0); | |
| 42 | } | |
| 43 | ||
| 44 | VIDEO_START( gdrawpkr ) | |
| 45 | { | |
| 46 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 47 | TILEMAP_TYPE_PEN, 8, 8, 32, 31); | |
| 48 | } | |
| 49 | ||
| 50 | VIDEO_UPDATE( gdrawpkr ) | |
| 51 | { | |
| 52 | tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0); | |
| 53 | return 0; | |
| 54 | } | |
| 55 | ||
| 56 | PALETTE_INIT( gdrawpkr ) | |
| 57 | { | |
| 58 | /* prom bits | |
| 59 | 7654 3210 | |
| 60 | ---- ---x red component. | |
| 61 | ---- --x- green component. | |
| 62 | ---- -x-- blue component. | |
| 63 | ---- x--- unknown, aparently unused. | |
| 64 | xxxx ---- unused. | |
| 65 | */ | |
| 66 | int i; | |
| 67 | ||
| 68 | /* 00000BGR */ | |
| 69 | if (color_prom == 0) return; | |
| 70 | ||
| 71 | for (i = 0;i < machine->drv->total_colors;i++) | |
| 72 | { | |
| 73 | int bit0, bit1, bit2, r, g, b; | |
| 74 | ||
| 75 | /* red component */ | |
| 76 | bit0 = (color_prom[i] >> 0) & 0x01; | |
| 77 | r = bit0 * 0xff; | |
| 78 | ||
| 79 | /* green component */ | |
| 80 | bit1 = (color_prom[i] >> 1) & 0x01; | |
| 81 | g = bit1 * 0xff; | |
| 82 | ||
| 83 | /* blue component */ | |
| 84 | bit2 = (color_prom[i] >> 2) & 0x01; | |
| 85 | b = bit2 * 0xff; | |
| 86 | ||
| 87 | ||
| 88 | palette_set_color(machine, i, MAKE_RGB(r, g, b)); | |
| 89 | } | |
| 90 | } |
| r1037 | r1038 | |
|---|---|---|
| 20 | 20 | float z; |
| 21 | 21 | int luminance; |
| 22 | 22 | UINT16 r, g, b; |
| 23 | UINT16 | |
| 23 | UINT16 luma_s | |
| 24 | 24 | UINT16 tex_x, tex_y, tex_width, tex_height; |
| 25 | 25 | UINT32 flags; |
| 26 | 26 | } TRIANGLE; |
| r1037 | r1038 | |
| 49 | 49 | #define TRI_FLAG_WRAP_Y 0x100 |
| 50 | 50 | |
| 51 | 51 | |
| 52 | static UINT32 geo_mode; | |
| 52 | 53 | |
| 53 | 54 | |
| 54 | ||
| 55 | 55 | static void parse_display_list(void); |
| 56 | 56 | static void render_triangles(mame_bitmap *bitmap, const rectangle *cliprect); |
| 57 | 57 | |
| r1037 | r1038 | |
| 82 | 82 | |
| 83 | 83 | static TEXTURE_PARAMETER texture_parameter[32]; |
| 84 | 84 | |
| 85 | static bitmap_t *sys24_bitmap = NULL; | |
| 86 | ||
| 87 | static void model2_exit(running_machine *machine) | |
| 88 | { | |
| 89 | if ( sys24_bitmap != NULL ) | |
| 90 | { | |
| 91 | bitmap_free( sys24_bitmap ); | |
| 92 | sys24_bitmap = NULL; | |
| 93 | } | |
| 94 | } | |
| 95 | ||
| 85 | 96 | VIDEO_START(model2) |
| 86 | 97 | { |
| 98 | int width = machine->screen[0].visarea.max_x - machine->screen[0].visarea.min_x; | |
| 99 | int height = machine->screen[0].visarea.max_y - machine->screen[0].visarea.min_y; | |
| 100 | ||
| 87 | 101 | sys24_tile_vh_start(machine, 0x3fff); |
| 88 | 102 | |
| 103 | sys24_bitmap = bitmap_alloc(width, height+4, BITMAP_FORMAT_INDEXED16); | |
| 104 | ||
| 105 | add_exit_callback(machine, model2_exit); | |
| 106 | ||
| 89 | 107 | tribuffer = auto_malloc(TRIBUFFER_SIZE * sizeof(TRIANGLE)); |
| 90 | 108 | |
| 91 | 109 | polygon_rom = (UINT32*)memory_region(REGION_USER2); |
| r1037 | r1038 | |
| 95 | 113 | texture_ram = auto_malloc(0x10000 * sizeof(UINT16)); |
| 96 | 114 | } |
| 97 | 115 | |
| 116 | static void convert_bitmap( running_machine *machine, bitmap_t *dst, bitmap_t *src, const rectangle *rect ) | |
| 117 | { | |
| 118 | int x, y; | |
| 119 | ||
| 120 | for( y = rect->min_y; y < rect->max_y; y++ ) | |
| 121 | { | |
| 122 | UINT32 *d = BITMAP_ADDR32( dst, y, 0 ); | |
| 123 | UINT16 *s = BITMAP_ADDR16( src, y, 0 ); | |
| 124 | ||
| 125 | for( x = rect->min_x; x < rect->max_x; x++ ) | |
| 126 | { | |
| 127 | if ( s[x] ) | |
| 128 | d[x] = machine->pens[s[x]]; | |
| 129 | } | |
| 130 | } | |
| 131 | } | |
| 132 | ||
| 98 | 133 | VIDEO_UPDATE(model2) |
| 99 | 134 | { |
| 100 | 135 | sys24_tile_update(machine); |
| 101 | 136 | fillbitmap(bitmap, machine->pens[0], &machine->screen[0].visarea); |
| 137 | fillbitmap(sys24_bitmap, 0, &machine->screen[0].visarea); | |
| 102 | 138 | |
| 103 | sys24_tile_draw(machine, bitmap, cliprect, 7, 0, 0); | |
| 104 | sys24_tile_draw(machine, bitmap, cliprect, 6, 0, 0); | |
| 105 | sys24_tile_draw(machine, bitmap, cliprect, 5, 0, 0); | |
| 106 | sys24_tile_draw(machine, bitmap, cliprect, 4, 0, 0); | |
| 139 | sys24_tile_draw(machine, sys24_bitmap, cliprect, 7, 0, 0); | |
| 140 | sys24_tile_draw(machine, sys24_bitmap, cliprect, 6, 0, 0); | |
| 141 | sys24_tile_draw(machine, sys24_bitmap, cliprect, 5, 0, 0); | |
| 142 | sys24_tile_draw(machine, sys24_bitmap, cliprect, 4, 0, 0); | |
| 107 | 143 | |
| 144 | convert_bitmap(machine, bitmap, sys24_bitmap, cliprect); | |
| 145 | ||
| 108 | 146 | tribuffer_pos = 0; |
| 109 | 147 | parse_display_list(); |
| 110 | 148 | render_triangles(bitmap, cliprect); |
| 111 | 149 | |
| 112 | sys24_tile_draw(machine, bitmap, cliprect, 3, 0, 0); | |
| 113 | sys24_tile_draw(machine, bitmap, cliprect, 2, 0, 0); | |
| 114 | sys24_tile_draw(machine, bitmap, cliprect, 1, 0, 0); | |
| 115 | sys24_tile_draw(machine, bitmap, cliprect, 0, 0, 0); | |
| 150 | fillbitmap(sys24_bitmap, 0, &machine->screen[0].visarea); | |
| 151 | sys24_tile_draw(machine, sys24_bitmap, cliprect, 3, 0, 0); | |
| 152 | sys24_tile_draw(machine, sys24_bitmap, cliprect, 2, 0, 0); | |
| 153 | sys24_tile_draw(machine, sys24_bitmap, cliprect, 1, 0, 0); | |
| 154 | sys24_tile_draw(machine, sys24_bitmap, cliprect, 0, 0, 0); | |
| 116 | 155 | |
| 117 | /*{ | |
| 118 | int i; | |
| 119 | FILE *file = fopen("buffer.bin", "wb"); | |
| 120 | for (i=0; i < 0x20000/4; i++) | |
| 121 | { | |
| 122 | fputc((model2_bufferram[i] >> 24) & 0xff, file); | |
| 123 | fputc((model2_bufferram[i] >> 16) & 0xff, file); | |
| 124 | fputc((model2_bufferram[i] >> 8) & 0xff, file); | |
| 125 | fputc((model2_bufferram[i] >> 0) & 0xff, file); | |
| 126 | } | |
| 127 | fclose(file); | |
| 128 | }*/ | |
| 156 | convert_bitmap(machine, bitmap, sys24_bitmap, cliprect); | |
| 157 | ||
| 129 | 158 | return 0; |
| 130 | 159 | } |
| 131 | 160 | |
| r1037 | r1038 | |
| 135 | 164 | struct poly_vertex vert[3]; |
| 136 | 165 | const struct poly_scanline_data *scans; |
| 137 | 166 | int r, g, b; |
| 138 | int luminance; | |
| 139 | UINT16 color; | |
| 167 | UINT32 luminance, tr, tg, tb, ri, gi, bi; | |
| 168 | UINT32 color, loffset; | |
| 140 | 169 | |
| 141 | // UINT16 *colortable_r = (UINT16*)&model2_colorxlat[0x0000/4]; | |
| 142 | // UINT16 *colortable_g = (UINT16*)&model2_colorxlat[0x4000/4]; | |
| 143 | // UINT16 *colortable_b = (UINT16*)&model2_colorxlat[0x8000/4]; | |
| 170 | UINT32 *colortable_r = &model2_colorxlat[0x0000/4]; | |
| 171 | UINT32 *colortable_g = &model2_colorxlat[0x4000/4]; | |
| 172 | UINT32 *colortable_b = &model2_colorxlat[0x8000/4]; | |
| 144 | 173 | |
| 145 | 174 | vert[0].x = tri->v[0].x; vert[0].y = tri->v[0].y; |
| 146 | 175 | vert[1].x = tri->v[1].x; vert[1].y = tri->v[1].y; |
| r1037 | r1038 | |
| 153 | 182 | b = tri->b; |
| 154 | 183 | luminance = tri->luminance; |
| 155 | 184 | |
| 156 | r = ((r * luminance) >> 6) & 0x1f; | |
| 157 | g = ((g * luminance) >> 6) & 0x1f; | |
| 158 | b = ((b * luminance) >> 6) & 0x1f; | |
| 159 | color = (r << 10) | (g << 5) | (b); | |
| 185 | /* apply luma to texel */ | |
| 186 | loffset = (tri->luma_select << 8) + (0x0f << 4) + ((luminance >> 4) & 0x0f); | |
| 160 | 187 | |
| 188 | luminance = model2_lumaram[loffset >> 2]; | |
| 189 | ||
| 190 | if ( loffset & 2 ) | |
| 191 | luminance >>= 16; | |
| 192 | ||
| 193 | luminance &= 0xff; | |
| 194 | ||
| 195 | ri = (r<<9) + (luminance<<1); | |
| 196 | gi = (g<<9) + (luminance<<1); | |
| 197 | bi = (b<<9) + (luminance<<1); | |
| 198 | ||
| 199 | tr = colortable_r[ri>>2]; | |
| 200 | tg = colortable_g[gi>>2]; | |
| 201 | tb = colortable_b[bi>>2]; | |
| 202 | ||
| 203 | if ( ri & 2 ) tr >>= 16; | |
| 204 | if ( gi & 2 ) tg >>= 16; | |
| 205 | if ( bi & 2 ) tb >>= 16; | |
| 206 | ||
| 207 | tr &= 0xff; | |
| 208 | tg &= 0xff; | |
| 209 | tb &= 0xff; | |
| 210 | ||
| 211 | color = (tr << 16) | (tg << 8) | (tb); | |
| 212 | ||
| 161 | 213 | if(scans) |
| 162 | 214 | { |
| 163 | 215 | for(y = scans->sy; y <= scans->ey; y++) |
| 164 | 216 | { |
| 165 | 217 | int x1, x2; |
| 166 | 218 | const struct poly_scanline *scan = &scans->scanline[y - scans->sy]; |
| 167 | UINT | |
| 219 | UINT32 *p = BITMAP_ADDR32(bitmap, y, 0); | |
| 168 | 220 | |
| 169 | 221 | x1 = scan->sx; |
| 170 | 222 | x2 = scan->ex; |
| 171 | 223 | |
| 172 | 224 | for(x = x1; x <= x2; x++) |
| 173 | 225 | { |
| 174 | /* | |
| 175 | int tr = colortable_r[(r << 8) | luminance]; | |
| 176 | int tg = colortable_g[(g << 8) | luminance]; | |
| 177 | int tb = colortable_b[(b << 8) | luminance]; | |
| 226 | if ( tri->flags & TRI_FLAG_CHECKER ) | |
| 227 | { | |
| 228 | UINT32 br, bg, bb; | |
| 178 | 229 | |
| 179 | p[x] = (((tr >> 3) << 10) & 0x7c00) | (((tg >> 3) << 5) & 0x03e0) | (((tb >> 3) << 0) & 0x001f); | |
| 180 | */ | |
| 230 | /* blend */ | |
| 231 | br = (tr + ( ( p[x] >> 16 ) & 0xff ) / 2 ); | |
| 232 | bg = (tg + ( ( p[x] >> 8 ) & 0xff ) / 2 ); | |
| 233 | bb = (tb + ( ( p[x] >> 0 ) & 0xff ) / 2 ); | |
| 181 | 234 | |
| 235 | color = (br << 16) | (bg << 8) | (bb); | |
| 236 | } | |
| 237 | ||
| 182 | 238 | p[x] = color; |
| 183 | 239 | } |
| 184 | 240 | } |
| 185 | 241 | } |
| 186 | 242 | } |
| 187 | 243 | |
| 244 | INLINE int get_texel( UINT32 base_x, UINT32 base_y, int x, int y, UINT32 *sheet ) | |
| 245 | { | |
| 246 | UINT32 baseoffs = ((base_y/2)*512)+(base_x/2); | |
| 247 | UINT32 texeloffs = ((y/2)*512)+(x/2); | |
| 248 | UINT32 offset = baseoffs + texeloffs; | |
| 249 | UINT32 texel = sheet[offset>>1]; | |
| 250 | ||
| 251 | if ( offset & 1 ) | |
| 252 | texel >>= 16; | |
| 253 | ||
| 254 | if ( (y & 1) == 0 ) | |
| 255 | texel >>= 8; | |
| 256 | ||
| 257 | if ( (x & 1) == 0 ) | |
| 258 | texel >>= 4; | |
| 259 | ||
| 260 | return (texel & 0x0f); | |
| 261 | } | |
| 262 | ||
| 188 | 263 | static void draw_textured_triangle(mame_bitmap *bitmap, const rectangle *rect, TRIANGLE *tri) |
| 189 | 264 | { |
| 190 | const int texel_x[4] = {0, 8, 4, 12}; | |
| 191 | ||
| 192 | 265 | int x, y; |
| 193 | 266 | struct poly_vertex vert[3]; |
| 194 | 267 | const struct poly_scanline_data *scans; |
| r1037 | r1038 | |
| 200 | 273 | UINT32 tex_height = 32 << tri->tex_height; |
| 201 | 274 | UINT32 tex_x_mask = tex_width - 1; |
| 202 | 275 | UINT32 tex_y_mask = tex_height - 1; |
| 203 | UINT16 *sheet = (tri->flags & TRI_FLAG_EVEN_BANK) | |
| 204 | ? ((UINT16*)model2_textureram1) : ((UINT16*)model2_textureram0); | |
| 276 | UINT32 *sheet = (tri->flags & TRI_FLAG_EVEN_BANK) ? (model2_textureram1) : (model2_textureram0); | |
| 205 | 277 | |
| 206 | //mame_printf_debug("Tex X: %d, Tex Y: %d, Tex Width: %d, Tex Height: %d\n", tex_x, tex_y, tex_width, tex_height); | |
| 207 | //mame_printf_debug("U0: %d, V0: %d, U1: %d, V1: %d, U2: %d, V2: %d\n", tri->v[0].u, tri->v[0].v, tri->v[1].u, tri->v[1].v, tri->v[2].u, tri->v[2].v); | |
| 278 | UINT32 *colortable_r = &model2_colorxlat[0x0000/4]; | |
| 279 | UINT32 *colortable_g = &model2_colorxlat[0x4000/4]; | |
| 280 | UINT32 *colortable_b = &model2_colorxlat[0x8000/4]; | |
| 208 | 281 | |
| 209 | // UINT16 *colortable_r = (UINT16*)&model2_colorxlat[0x0000/4]; | |
| 210 | // UINT16 *colortable_g = (UINT16*)&model2_colorxlat[0x4000/4]; | |
| 211 | // UINT16 *colortable_b = (UINT16*)&model2_colorxlat[0x8000/4]; | |
| 282 | // mame_printf_debug("Tex X: %d, Tex Y: %d, Tex Width: %d, Tex Height: %d - Bank = %d\n", tex_x, tex_y, tex_width, tex_height, (tri->flags & TRI_FLAG_EVEN_BANK) ? 1 : 0 ); | |
| 283 | // mame_printf_debug("U0: %d, V0: %d, U1: %d, V1: %d, U2: %d, V2: %d\n", tri->v[0].u, tri->v[0].v, tri->v[1].u, tri->v[1].v, tri->v[2].u, tri->v[2].v); | |
| 212 | 284 | |
| 213 | 285 | vert[0].x = tri->v[0].x; vert[0].y = tri->v[0].y; vert[0].p[0] = tri->v[0].u; vert[0].p[1] = tri->v[0].v; |
| 214 | 286 | vert[1].x = tri->v[1].x; vert[1].y = tri->v[1].y; vert[1].p[0] = tri->v[1].u; vert[1].p[1] = tri->v[1].v; |
| r1037 | r1038 | |
| 231 | 303 | { |
| 232 | 304 | INT64 u, v; |
| 233 | 305 | int x1, x2; |
| 306 | UINT16 loffset; | |
| 234 | 307 | const struct poly_scanline *scan = &scans->scanline[y - scans->sy]; |
| 235 | UINT | |
| 308 | UINT32 *p = BITMAP_ADDR32(bitmap, y, 0); | |
| 236 | 309 | |
| 237 | 310 | x1 = scan->sx; |
| 238 | 311 | x2 = scan->ex; |
| r1037 | r1038 | |
| 242 | 315 | |
| 243 | 316 | for(x = x1; x <= x2; x++) |
| 244 | 317 | { |
| 245 | int tr, tg, tb; | |
| 318 | UINT32 tr, tg, tb, luma, ri, gi, bi; | |
| 319 | UINT16 t; | |
| 246 | 320 | int u2 = (int)(u >> (16+3)) & tex_x_mask; |
| 247 | 321 | int v2 = (int)(v >> (16+3)) & tex_y_mask; |
| 248 | UINT16 t = sheet[(((tex_y + v2) * 1024) + (tex_x + u2)) / 4]; | |
| 249 | t = (t >> (texel_x[u2&3])) & 0xf; | |
| 250 | 322 | |
| 251 | t = ((u2 + v2) & 1) ? 0xf : 0; | |
| 323 | if ( tri->flags & TRI_FLAG_MIRROR_X ) | |
| 324 | u2 = ( tex_width - 1 ) - u2; | |
| 252 | 325 | |
| 253 | tr = ((t * r) >> 4) & 0x1f; | |
| 254 | tg = ((t * g) >> 4) & 0x1f; | |
| 255 | tb = ((t * b) >> 4) & 0x1f; | |
| 326 | if ( tri->flags & TRI_FLAG_MIRROR_Y ) | |
| 327 | v2 = ( tex_height - 1 ) - v2; | |
| 256 | 328 | |
| 257 | p[x] = (tr << 10) | (tg << 5) | (tb); | |
| 329 | t = get_texel( tex_x, tex_y, u2, v2, sheet ); | |
| 330 | ||
| 331 | if ( !(t == 0x0f && ( tri->flags & TRI_FLAG_TEXTURE_TRANS ) ) ) | |
| 332 | { | |
| 333 | loffset = (tri->luma_select << 8) + (t << 4) + ((luminance >> 4) & 0x0f); | |
| 334 | ||
| 335 | luma = model2_lumaram[loffset >> 2]; | |
| 336 | ||
| 337 | if ( loffset & 2 ) | |
| 338 | luma >>= 16; | |
| 339 | ||
| 340 | luma &= 0xff; | |
| 341 | ||
| 342 | ri = (r<<9) + (luma<<1); | |
| 343 | gi = (g<<9) + (luma<<1); | |
| 344 | bi = (b<<9) + (luma<<1); | |
| 345 | ||
| 346 | tr = colortable_r[ri>>2]; | |
| 347 | tg = colortable_g[gi>>2]; | |
| 348 | tb = colortable_b[bi>>2]; | |
| 349 | ||
| 350 | if ( ri & 2 ) tr >>= 16; | |
| 351 | if ( gi & 2 ) tg >>= 16; | |
| 352 | if ( bi & 2 ) tb >>= 16; | |
| 353 | ||
| 354 | tr &= 0xff; | |
| 355 | tg &= 0xff; | |
| 356 | tb &= 0xff; | |
| 357 | ||
| 358 | if ( tri->flags & TRI_FLAG_CHECKER ) | |
| 359 | { | |
| 360 | /* blend */ | |
| 361 | tr = ( tr + ( ( p[x] >> 16 ) & 0xff ) ) / 2; | |
| 362 | tg = ( tg + ( ( p[x] >> 8 ) & 0xff ) ) / 2; | |
| 363 | tb = ( tb + ( ( p[x] >> 0 ) & 0xff ) ) / 2; | |
| 364 | } | |
| 365 | ||
| 366 | p[x] = (tr << 16) | (tg << 8) | (tb); | |
| 367 | } | |
| 368 | ||
| 258 | 369 | u += du; |
| 259 | 370 | v += dv; |
| 260 | 371 | } |
| r1037 | r1038 | |
| 274 | 385 | |
| 275 | 386 | static void render_triangles(mame_bitmap *bitmap, const rectangle *cliprect) |
| 276 | 387 | { |
| 277 | int i; | |
| 388 | int i; | |
| 278 | 389 | |
| 279 | 390 | qsort(tribuffer, tribuffer_pos, sizeof(TRIANGLE), zsort); |
| 280 | 391 | |
| r1037 | r1038 | |
| 297 | 408 | |
| 298 | 409 | if (tribuffer[i].flags & TRI_FLAG_TEXTURE) |
| 299 | 410 | { |
| 300 | //draw_textured_triangle(bitmap, &rect, &tribuffer[i]); | |
| 301 | draw_solid_triangle(bitmap, &rect, &tribuffer[i]); | |
| 411 | draw_textured_triangle(bitmap, &rect, &tribuffer[i]); | |
| 412 | //draw_solid_triangle(bitmap, &rect, &tribuffer[i]); | |
| 302 | 413 | } |
| 303 | 414 | else |
| 304 | 415 | { |
| 305 | 416 | draw_solid_triangle(bitmap, &rect, &tribuffer[i]); |
| 306 | 417 | } |
| 307 | 418 | } |
| 419 | ||
| 420 | #if 0 | |
| 421 | { | |
| 422 | ||
| 423 | #define TEX_BASE_X 512 | |
| 424 | #define TEX_BASE_Y 640 | |
| 425 | #define TEX_WIDTH 128 | |
| 426 | #define TEX_HEIGHT 128 | |
| 427 | #define TEX_BANK 1 | |
| 428 | ||
| 429 | int x,y; | |
| 430 | ||
| 431 | for( y = 0; y < TEX_HEIGHT; y++ ) | |
| 432 | { | |
| 433 | UINT32 *y0 = BITMAP_ADDR32(bitmap, y, 0); | |
| 434 | ||
| 435 | for( x = 0; x < TEX_WIDTH; x++ ) | |
| 436 | { | |
| 437 | UINT32 lup[0x10] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, | |
| 438 | 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }; | |
| 439 | ||
| 440 | UINT32 *tb = (TEX_BANK) ? model2_textureram1 : model2_textureram0; | |
| 441 | ||
| 442 | UINT16 tv = get_texel( TEX_BASE_X, TEX_BASE_Y, x, y, tb ); | |
| 443 | ||
| 444 | if ( x >= cliprect->min_x && x < cliprect->max_x && y >= cliprect->min_y && y < cliprect->max_y ) | |
| 445 | { | |
| 446 | y0[x] = lup[tv] | ((lup[tv])<<8) | ((lup[tv])<<16); | |
| 447 | } | |
| 448 | } | |
| 449 | } | |
| 450 | } | |
| 451 | #endif | |
| 308 | 452 | } |
| 309 | 453 | |
| 310 | 454 | INLINE int is_point_inside(float x, float y, float z, PLANE cp) |
| r1037 | r1038 | |
| 377 | 521 | return clip_verts; |
| 378 | 522 | } |
| 379 | 523 | |
| 524 | INLINE void project_point( VERTEX *v ) | |
| 525 | { | |
| 526 | float ooz = 1.0f / -v->z; | |
| 527 | v->x = -((v->x * ooz) * focus_x) + (float)(window.x + (window.width / 2)); | |
| 528 | v->y = ((v->y * ooz) * focus_y) + (float)(window.y + (window.height / 2)); | |
| 529 | } | |
| 530 | ||
| 380 | 531 | static void push_triangle(TRIANGLE *tri) |
| 381 | 532 | { |
| 382 | int i | |
| 533 | int i | |
| 383 | 534 | int clipped_verts; |
| 384 | 535 | VERTEX verts[10]; |
| 385 | 536 | PLANE clip_plane = { 0.0f, 0.0f, 1.0f, -1.0f }; |
| 386 | 537 | clipped_verts = clip_polygon(tri->v, 3, clip_plane, verts); |
| 387 | 538 | |
| 539 | project_point( &verts[0] ); | |
| 540 | project_point( &verts[1] ); | |
| 388 | 541 | for (i=2; i < clipped_verts; i++) |
| 389 | 542 | { |
| 390 | 543 | TRIANGLE *dt = &tribuffer[tribuffer_pos]; |
| 391 | 544 | |
| 545 | project_point( &verts[i] ); | |
| 546 | ||
| 392 | 547 | memcpy(dt, tri, sizeof(TRIANGLE)); |
| 393 | 548 | |
| 394 | 549 | memcpy(&dt->v[0], &verts[0], sizeof(VERTEX)); |
| r1037 | r1038 | |
| 396 | 551 | memcpy(&dt->v[2], &verts[i], sizeof(VERTEX)); |
| 397 | 552 | memcpy(&dt->window, &window, sizeof(WINDOW)); |
| 398 | 553 | |
| 399 | for (j=0; j < 3; j++) | |
| 400 | { | |
| 401 | float ooz = 1.0f / -dt->v[j].z; | |
| 402 | dt->v[j].x = -((dt->v[j].x * ooz) * focus_x) + (float)(window.x + (window.width / 2)); | |
| 403 | dt->v[j].y = ((dt->v[j].y * ooz) * focus_y) + (float)(window.y + (window.height / 2)); | |
| 404 | } | |
| 405 | ||
| 406 | 554 | tribuffer_pos++; |
| 407 | 555 | if (tribuffer_pos >= TRIBUFFER_SIZE) |
| 408 | 556 | { |
| r1037 | r1038 | |
| 419 | 567 | memcpy(&dt->window, &window, sizeof(WINDOW)); |
| 420 | 568 | } |
| 421 | 569 | |
| 422 | ||
| 423 | ||
| 424 | 570 | static void draw_object(UINT32 address, UINT32 num_polys, UINT32 tex_point_addr, UINT32 tex_hdr_addr) |
| 425 | 571 | { |
| 426 | 572 | int i; |
| 427 | int end = 0; | |
| 428 | int polynum = 0; | |
| 429 | 573 | VERTEX prev_p1 = { 0 }, prev_p2 = { 0 }; |
| 430 | 574 | |
| 431 | 575 | UINT16 *thdr; |
| 432 | 576 | UINT16 *tpoint; |
| 433 | 577 | UINT32 *object; |
| 434 | UINT16 *lumatable = (UINT16*)model2_lumaram; | |
| 435 | 578 | |
| 436 | 579 | int th_addr = 0; |
| 437 | 580 | int tp_addr = 0; |
| 438 | float previous_zvalue = | |
| 581 | float previous_zvalue = -12345.0f; | |
| 439 | 582 | |
| 583 | (void)num_polys; | |
| 584 | ||
| 440 | 585 | if (address < 0x800000) |
| 441 | 586 | { |
| 442 | 587 | object = polygon_ram; |
| 443 | address = | |
| 588 | address &= 0x7fff | |
| 444 | 589 | } |
| 445 | 590 | else |
| 446 | 591 | { |
| 447 | 592 | object = polygon_rom; |
| 448 | address = | |
| 593 | address = | |
| 449 | 594 | } |
| 450 | 595 | |
| 451 | 596 | if (tex_hdr_addr < 0x800000) |
| r1037 | r1038 | |
| 456 | 601 | else |
| 457 | 602 | { |
| 458 | 603 | thdr = texture_ram; |
| 459 | th_addr = tex_hdr_addr & 0x | |
| 604 | th_addr = tex_hdr_addr & 0x | |
| 460 | 605 | } |
| 461 | 606 | |
| 462 | 607 | if (tex_point_addr < 0x800000) |
| r1037 | r1038 | |
| 467 | 612 | else |
| 468 | 613 | { |
| 469 | 614 | tpoint = texture_ram; |
| 470 | tp_addr = tex_point_addr & 0x | |
| 615 | tp_addr = tex_point_addr & 0x | |
| 471 | 616 | } |
| 472 | 617 | |
| 473 | while (!end && polynum < num_polys) | |
| 618 | prev_p1.x = u2f(object[address++]); | |
| 619 | prev_p1.y = u2f(object[address++]); | |
| 620 | prev_p1.z = u2f(object[address++]); | |
| 621 | ||
| 622 | prev_p2.x = u2f(object[address++]); | |
| 623 | prev_p2.y = u2f(object[address++]); | |
| 624 | prev_p2.z = u2f(object[address++]); | |
| 625 | ||
| 626 | while ( 1 ) | |
| 474 | 627 | { |
| 475 | 628 | TEXTURE_PARAMETER *texparam; |
| 476 | 629 | VERTEX v[4], p1, p2; |
| r1037 | r1038 | |
| 481 | 634 | UINT16 s[4], t[4]; |
| 482 | 635 | int polytype, linktype, tex_hdr_offset, zsort_type, texture_code; |
| 483 | 636 | |
| 484 | s[3] = t[3] = 0; // fix compiler "used uninitialized" warning | |
| 485 | ||
| 486 | 637 | attr = object[address++]; |
| 487 | 638 | polytype = attr & 0x3; |
| 488 | 639 | |
| 489 | if (polytype == 0) | |
| 490 | { | |
| 491 | return; | |
| 492 | } | |
| 640 | if ( polytype == 0 ) | |
| 641 | break; | |
| 493 | 642 | |
| 494 | 643 | linktype = (attr >> 8) & 0x3; |
| 495 | 644 | if (linktype != ((attr >> 23) & 0x3)) |
| 496 | 645 | { |
| 497 | 646 | //return; |
| 498 | 647 | //fatalerror("Linktype not matching, attribute = %08X at %08X\n", attr, address*4); |
| 648 | linktype = (attr >> 23) & 0x3; | |
| 499 | 649 | } |
| 500 | 650 | |
| 501 | tex_hdr_offset = (attr >> 12) & 0x1f; | |
| 502 | if (tex_hdr_offset & 0x10) tex_hdr_offset |= -16; | |
| 503 | ||
| 504 | 651 | zsort_type = (attr >> 10) & 0x3; |
| 505 | 652 | texture_code = (attr >> 12) & 0x1f; |
| 506 | 653 | |
| 507 | 654 | texparam = &texture_parameter[texture_code]; |
| 508 | 655 | |
| 509 | ||
| 510 | ||
| 511 | 656 | // load vertex data and polygon normal |
| 512 | nx = *(float*)(&object[address++]); | |
| 513 | ny = *(float*)(&object[address++]); | |
| 514 | nz = *(float*)(&object[address++]); | |
| 515 | p1.x = *(float*)(&object[address++]); | |
| 516 | p1.y = *(float*)(&object[address++]); | |
| 517 | p1.z = *(float*)(&object[address++]); | |
| 518 | p2.x = *(float*)(&object[address++]); | |
| 519 | p2.y = *(float*)(&object[address++]); | |
| 520 | p2.z = *(float*)(&object[address++]); | |
| 657 | nx = -(u2f(object[address++])); | |
| 658 | ny = -(u2f(object[address++])); | |
| 659 | nz = -(u2f(object[address++])); | |
| 660 | p1.x = u2f(object[address++]); | |
| 661 | p1.y = u2f(object[address++]); | |
| 662 | p1.z = u2f(object[address++]); | |
| 663 | p2.x = u2f(object[address++]); | |
| 664 | p2.y = u2f(object[address++]); | |
| 665 | p2.z = u2f(object[address++]); | |
| 521 | 666 | |
| 522 | 667 | |
| 523 | ||
| 524 | 668 | // load texture parameters |
| 525 | 669 | tex_header[0] = thdr[th_addr+0]; |
| 526 | 670 | tex_header[1] = thdr[th_addr+1]; |
| 527 | 671 | tex_header[2] = thdr[th_addr+2]; |
| 528 | 672 | tex_header[3] = thdr[th_addr+3]; |
| 529 | 673 | |
| 530 | if (tex_header[0] & 0x4000) | |
| 674 | color = (tex_header[3] >> 6) & 0x3ff; | |
| 675 | ||
| 676 | // lookup color in palette ram | |
| 677 | // we need the original 15 bit color, not the remapped 32 bit version | |
| 531 | 678 | { |
| 532 | color = (tex_header[3] >> 6) & 0x3ff; | |
| 533 | rgb = Machine->remapped_colortable[4096+color]; | |
| 679 | UINT32 pval = paletteram32[(0x2000/4)+(color >> 1)]; | |
| 680 | ||
| 681 | if ( color & 1 ) | |
| 682 | rgb = (pval >> 16); | |
| 683 | else | |
| 684 | rgb = pval; | |
| 534 | 685 | } |
| 535 | else | |
| 536 | { | |
| 537 | rgb = 0x7fff; | |
| 538 | } | |
| 539 | 686 | |
| 540 | | |
| 687 | | |
| 541 | 688 | |
| 689 | tex_hdr_offset = (attr >> 12) & 0x1f; | |
| 542 | 690 | |
| 691 | if (tex_hdr_offset & 0x10) | |
| 692 | tex_hdr_offset |= -16; | |
| 543 | 693 | |
| 694 | th_addr += tex_hdr_offset * 4; | |
| 695 | ||
| 544 | 696 | // load texture coordinates |
| 545 | 697 | if (polytype == 2) |
| 546 | 698 | { |
| 547 | s[0] = tpoint[tp_addr+0]; | |
| 548 | t[0] = tpoint[tp_addr+1]; | |
| 549 | s[1] = tpoint[tp_addr+2]; | |
| 550 | t[1] = tpoint[tp_addr+3]; | |
| 551 | s[2] = tpoint[tp_addr+4]; | |
| 552 | t[2] = tpoint[tp_addr+5]; | |
| 699 | t[0] = tpoint[tp_addr+0]; | |
| 700 | s[0] = tpoint[tp_addr+1]; | |
| 701 | t[1] = tpoint[tp_addr+2]; | |
| 702 | s[1] = tpoint[tp_addr+3]; | |
| 703 | t[2] = tpoint[tp_addr+4]; | |
| 704 | s[2] = tpoint[tp_addr+5]; | |
| 705 | t[3] = 0; /* unused */ | |
| 706 | s[3] = 0; /* unused */ | |
| 553 | 707 | tp_addr += 6; |
| 554 | 708 | } |
| 555 | 709 | else |
| 556 | 710 | { |
| 557 | s[0] = tpoint[tp_addr+0]; | |
| 558 | t[0] = tpoint[tp_addr+1]; | |
| 559 | s[1] = tpoint[tp_addr+2]; | |
| 560 | t[1] = tpoint[tp_addr+3]; | |
| 561 | s[2] = tpoint[tp_addr+4]; | |
| 562 | t[2] = tpoint[tp_addr+5]; | |
| 563 | s[3] = tpoint[tp_addr+6]; | |
| 564 | t[3] = tpoint[tp_addr+7]; | |
| 711 | t[0] = tpoint[tp_addr+0]; | |
| 712 | s[0] = tpoint[tp_addr+1]; | |
| 713 | t[1] = tpoint[tp_addr+2]; | |
| 714 | s[1] = tpoint[tp_addr+3]; | |
| 715 | t[2] = tpoint[tp_addr+4]; | |
| 716 | s[2] = tpoint[tp_addr+5]; | |
| 717 | t[3] = tpoint[tp_addr+6]; | |
| 718 | s[3] = tpoint[tp_addr+7]; | |
| 565 | 719 | tp_addr += 8; |
| 566 | 720 | } |
| 567 | 721 | |
| 722 | // transform and normalize the normal | |
| 723 | { | |
| 724 | float tx = (nx * matrix[0]) + (ny * matrix[3]) + (nz * matrix[6]) + (matrix[9]); | |
| 725 | float ty = (nx * matrix[1]) + (ny * matrix[4]) + (nz * matrix[7]) + (matrix[10]); | |
| 726 | float tz = (nx * matrix[2]) + (ny * matrix[5]) + (nz * matrix[8]) + (matrix[11]); | |
| 727 | float norm = sqrt( tx*tx + ty*ty + tz*tz ); | |
| 728 | if ( norm ) | |
| 729 | { | |
| 730 | tx /= norm; | |
| 731 | ty /= norm; | |
| 732 | tz /= norm; | |
| 733 | } | |
| 734 | nx = tx; | |
| 735 | ny = ty; | |
| 736 | nz = tz; | |
| 737 | } | |
| 568 | 738 | |
| 569 | ||
| 570 | 739 | // transform and push the polygon to render buffer |
| 571 | if (linktype != 0) | |
| 572 | 740 | { |
| 573 | 741 | |
| 574 | 742 | float dot, intensity; |
| 575 | 743 | float zvalue; |
| 576 | 744 | TRIANGLE tri1, tri2; |
| 577 | v[0].x = p1.x; v[0].y = p1.y; v[0].z = p1.z; v[0].u = s[0]; v[0].v = t[0]; | |
| 578 | v[1].x = p2.x; v[1].y = p2.y; v[1].z = p2.z; v[1].u = s[1]; v[1].v = t[1]; | |
| 579 | v[2].x = prev_p1.x; v[2].y = prev_p1.y; v[2].z = prev_p1.z; v[2].u = s[2]; v[2].v = t[2]; | |
| 580 | v[3].x = prev_p2.x; v[3].y = prev_p2.y; v[3].z = prev_p2.z; v[3].u = s[3]; v[3].v = t[3]; | |
| 745 | v[0].x = prev_p2.x; v[0].y = prev_p2.y; v[0].z = prev_p2.z; v[0].u = s[0]; v[0].v = t[0]; | |
| 746 | v[1].x = prev_p1.x; v[1].y = prev_p1.y; v[1].z = prev_p1.z; v[1].u = s[1]; v[1].v = t[1]; | |
| 747 | v[2].x = p1.x; v[2].y = p1.y; v[2].z = p1.z; v[2].u = s[2]; v[2].v = t[2]; | |
| 748 | v[3].x = p2.x; v[3].y = p2.y; v[3].z = p2.z; v[3].u = s[3]; v[3].v = t[3]; | |
| 581 | 749 | |
| 582 | 750 | // transform with the current matrix |
| 583 | for (i=0; i < 4; i++) | |
| 751 | for ( i = 0; i < 4; i++) | |
| 584 | 752 | { |
| 585 | 753 | float tx = (v[i].x * matrix[0]) + (v[i].y * matrix[3]) + (v[i].z * matrix[6]) + (matrix[9]); |
| 586 | 754 | float ty = (v[i].x * matrix[1]) + (v[i].y * matrix[4]) + (v[i].z * matrix[7]) + (matrix[10]); |
| r1037 | r1038 | |
| 590 | 758 | v[i].z = tz; |
| 591 | 759 | } |
| 592 | 760 | |
| 593 | dot = (-light_vector[0] * nx) + (-light_vector[1] * ny) + (-light_vector[2] * nz); | |
| 761 | dot = -( (light_vector[0] * nx) + (light_vector[1] * ny) + (light_vector[2] * nz) ); | |
| 762 | ||
| 594 | 763 | if (dot < 0.0f) |
| 595 | 764 | dot = 0.0f; |
| 596 | 765 | if (dot > 1.0f) |
| r1037 | r1038 | |
| 607 | 776 | memcpy(&tri1.v[0], &v[0], sizeof(VERTEX)); |
| 608 | 777 | memcpy(&tri1.v[1], &v[1], sizeof(VERTEX)); |
| 609 | 778 | memcpy(&tri1.v[2], &v[2], sizeof(VERTEX)); |
| 610 | memcpy(&tri2.v[0], &v[1], sizeof(VERTEX)); | |
| 611 | memcpy(&tri2.v[1], &v[2], sizeof(VERTEX)); | |
| 612 | memcpy(&tri2.v[2], &v[3], sizeof(VERTEX)); | |
| 613 | 779 | |
| 780 | memcpy(&tri2.v[0], &v[2], sizeof(VERTEX)); | |
| 781 | memcpy(&tri2.v[1], &v[3], sizeof(VERTEX)); | |
| 782 | memcpy(&tri2.v[2], &v[0], sizeof(VERTEX)); | |
| 783 | ||
| 614 | 784 | switch (zsort_type) |
| 615 | 785 | { |
| 616 | 786 | case 0: // Previous value |
| r1037 | r1038 | |
| 635 | 805 | break; |
| 636 | 806 | } |
| 637 | 807 | default: mame_printf_error("draw_object: unknown zsort mode %d!\n", zsort_type); |
| 638 | zvalue = previous_zvalue; /* complete hack */ | |
| 808 | zvalue = /* previous_zvalue */0.0; /* complete hack */ | |
| 639 | 809 | break; |
| 640 | 810 | } |
| 641 | 811 | |
| 642 | 812 | previous_zvalue = zvalue; |
| 643 | 813 | |
| 644 | tri1.flags = 0; | |
| 645 | if (tex_header[0] & 0x8000) tri1.flags |= TRI_FLAG_CHECKER; | |
| 646 | if (tex_header[0] & 0x4000) tri1.flags |= TRI_FLAG_TEXTURE; | |
| 647 | if (tex_header[0] & 0x2000) tri1.flags |= TRI_FLAG_TEXTURE_TRANS; | |
| 648 | if (tex_header[0] & 0x1000) tri1.flags |= TRI_FLAG_MICROTEX; | |
| 649 | if (tex_header[0] & 0x0200) tri1.flags |= TRI_FLAG_MIRROR_X; | |
| 650 | if (tex_header[0] & 0x0100) tri1.flags |= TRI_FLAG_MIRROR_Y; | |
| 651 | if (tex_header[0] & 0x0080) tri1.flags |= TRI_FLAG_WRAP_X; | |
| 652 | if (tex_header[0] & 0x0040) tri1.flags |= TRI_FLAG_WRAP_Y; | |
| 653 | if (tex_header[2] & 0x1000) tri1.flags |= TRI_FLAG_EVEN_BANK; | |
| 654 | tri2.flags = tri1.flags; | |
| 814 | if (linktype != 0) | |
| 815 | { | |
| 816 | tri1.flags = 0; | |
| 817 | if (tex_header[0] & 0x8000) tri1.flags |= TRI_FLAG_CHECKER; | |
| 818 | if (tex_header[0] & 0x4000) tri1.flags |= TRI_FLAG_TEXTURE; | |
| 819 | if (tex_header[0] & 0x2000) tri1.flags |= TRI_FLAG_TEXTURE_TRANS; | |
| 820 | if (tex_header[0] & 0x1000) tri1.flags |= TRI_FLAG_MICROTEX; | |
| 821 | if (tex_header[0] & 0x0200) tri1.flags |= TRI_FLAG_MIRROR_X; | |
| 822 | if (tex_header[0] & 0x0100) tri1.flags |= TRI_FLAG_MIRROR_Y; | |
| 823 | if (tex_header[0] & 0x0080) tri1.flags |= TRI_FLAG_WRAP_X; | |
| 824 | if (tex_header[0] & 0x0040) tri1.flags |= TRI_FLAG_WRAP_Y; | |
| 825 | if (tex_header[2] & 0x1000) tri1.flags |= TRI_FLAG_EVEN_BANK; | |
| 826 | tri2.flags = tri1.flags; | |
| 655 | 827 | |
| 656 | tri1.tex_x = tri2.tex_x = (tex_header[2] >> 6) & 0x3f; | |
| 657 | tri1.tex_y = tri2.tex_y = (tex_header[2] >> 0) & 0x3f; | |
| 658 | tri1.tex_width = tri2.tex_width = (tex_header[0] >> 3) & 0x7; | |
| 659 | tri1.tex_height = tri2.tex_height = (tex_header[0] >> 0) & 0x7; | |
| 660 | tri1.transfer_map = tri2.transfer_map = tex_header[1] & 0xff; | |
| 828 | tri1.tex_x = tri2.tex_x = (tex_header[2] >> 0) & 0x1f; | |
| 829 | tri1.tex_y = tri2.tex_y = (tex_header[2] >> 6) & 0x1f; | |
| 661 | 830 | |
| 662 | tri1.z = tri2.z = zvalue; | |
| 663 | tri1.r = tri2.r = (rgb >> 10) & 0x1f; | |
| 664 | tri1.g = tri2.g = (rgb >> 5) & 0x1f; | |
| 665 | tri1.b = tri2.b = (rgb >> 0) & 0x1f; | |
| 666 | tri1.luminance = tri2.luminance = lumatable[(int)(intensity)]; | |
| 831 | if ( tex_header[2] & 0x20 ) | |
| 832 | { | |
| 833 | tri1.tex_y += 0x20; | |
| 834 | tri2.tex_y += 0x20; | |
| 835 | } | |
| 667 | 836 | |
| 668 | //if (polytype == 1) | |
| 669 | { | |
| 670 | push_triangle(&tri1); | |
| 671 | push_triangle(&tri2); | |
| 837 | tri1.tex_width = tri2.tex_width = (tex_header[0] >> 0) & 0x7; | |
| 838 | tri1.tex_height = tri2.tex_height = (tex_header[0] >> 3) & 0x7; | |
| 839 | tri1.luma_select = tri2.luma_select = tex_header[1] & 0xff; | |
| 840 | ||
| 841 | tri1.z = tri2.z = zvalue; | |
| 842 | tri1.r = tri2.r = (rgb >> 0) & 0x1f; | |
| 843 | tri1.g = tri2.g = (rgb >> 5) & 0x1f; | |
| 844 | tri1.b = tri2.b = (rgb >> 10) & 0x1f; | |
| 845 | tri1.luminance = tri2.luminance = (int)intensity; | |
| 846 | ||
| 847 | if (polytype == 1) | |
| 848 | { | |
| 849 | push_triangle(&tri2); | |
| 850 | push_triangle(&tri1); | |
| 851 | } | |
| 852 | else | |
| 853 | { | |
| 854 | push_triangle(&tri1); | |
| 855 | } | |
| 672 | 856 | } |
| 673 | //else | |
| 674 | //{ | |
| 675 | // push_triangle(&tri1); | |
| 676 | //} | |
| 677 | 857 | } |
| 678 | 858 | |
| 679 | 859 | switch (linktype) |
| r1037 | r1038 | |
| 713 | 893 | |
| 714 | 894 | texture_point_address = mem[offset++]; |
| 715 | 895 | texture_header_address = mem[offset++]; |
| 716 | prev_p1.x = *(float*)(&mem[offset++]); | |
| 717 | prev_p1.y = *(float*)(&mem[offset++]); | |
| 718 | prev_p1.z = *(float*)(&mem[offset++]); | |
| 719 | prev_p2.x = *(float*)(&mem[offset++]); | |
| 720 | prev_p2.y = *(float*)(&mem[offset++]); | |
| 721 | prev_p2.z = *(float*)(&mem[offset++]); | |
| 896 | prev_p1.x = u2f(mem[offset++]); | |
| 897 | prev_p1.y = u2f(mem[offset++]); | |
| 898 | prev_p1.z = u2f(mem[offset++]); | |
| 899 | prev_p2.x = u2f(mem[offset++]); | |
| 900 | prev_p2.y = u2f(mem[offset++]); | |
| 901 | prev_p2.z = u2f(mem[offset++]); | |
| 722 | 902 | |
| 723 | 903 | while (!end) |
| 724 | 904 | { |
| r1037 | r1038 | |
| 744 | 924 | } |
| 745 | 925 | |
| 746 | 926 | luminance_data = mem[offset++]; |
| 747 | d = *(float*)(&mem[offset++]); | |
| 748 | p1.x = *(float*)(&mem[offset++]); | |
| 749 | p1.y = *(float*)(&mem[offset++]); | |
| 750 | p1.z = *(float*)(&mem[offset++]); | |
| 751 | p2.x = *(float*)(&mem[offset++]); | |
| 752 | p2.y = *(float*)(&mem[offset++]); | |
| 753 | p2.z = *(float*)(&mem[offset++]); | |
| 927 | d = u2f(mem[offset++]); | |
| 928 | p1.x = u2f(mem[offset++]); | |
| 929 | p1.y = u2f(mem[offset++]); | |
| 930 | p1.z = u2f(mem[offset++]); | |
| 931 | p2.x = u2f(mem[offset++]); | |
| 932 | p2.y = u2f(mem[offset++]); | |
| 933 | p2.z = u2f(mem[offset++]); | |
| 754 | 934 | |
| 755 | 935 | if (linktype != 0) |
| 756 | 936 | { |
| r1037 | r1038 | |
| 853 | 1033 | } |
| 854 | 1034 | case 0x01: // Object Data |
| 855 | 1035 | { |
| 856 | tex_point_addr = model2_bufferram[dlptr+0]; | |
| 857 | tex_hdr_addr = model2_bufferram[dlptr+1]; | |
| 1036 | tex_point_addr = model2_bufferram[dlptr+0] & 0xffffff; | |
| 1037 | tex_hdr_addr = model2_bufferram[dlptr+1] & 0xffffff; | |
| 858 | 1038 | address = model2_bufferram[dlptr+2]; |
| 859 | 1039 | length = model2_bufferram[dlptr+3]; |
| 860 | 1040 | |
| 861 | draw_object(address, length, tex_point_addr, tex_hdr_addr); | |
| 1041 | if ( tex_point_addr != 0 || tex_hdr_addr != 0 || address != 0 || length != 0 ) | |
| 1042 | { | |
| 1043 | draw_object(address, length, tex_point_addr, tex_hdr_addr); | |
| 1044 | } | |
| 862 | 1045 | |
| 863 | 1046 | dlptr += 4; |
| 864 | 1047 | break; |
| r1037 | r1038 | |
| 877 | 1060 | int y2 = (INT16)(model2_bufferram[dlptr+1] >> 0); |
| 878 | 1061 | |
| 879 | 1062 | window.x = x1; |
| 880 | window.y = | |
| 1063 | window.y = 0 | |
| 881 | 1064 | window.width = x2 - x1; |
| 882 | window.height = | |
| 1065 | window.height = | |
| 883 | 1066 | |
| 884 | 1067 | dlptr += 6; |
| 885 | 1068 | break; |
| r1037 | r1038 | |
| 938 | 1121 | texture_parameter[i].diffuse = (data >> 0) & 0xff; |
| 939 | 1122 | texture_parameter[i].ambient = (data >> 8) & 0xff; |
| 940 | 1123 | texture_parameter[i].reflection = (data >> 16) & 0xff; |
| 941 | texture_parameter[i].c = | |
| 1124 | texture_parameter[i].c = u2f( | |
| 942 | 1125 | } |
| 943 | 1126 | break; |
| 944 | 1127 | } |
| 945 | 1128 | case 0x07: // Operation Mode |
| 946 | 1129 | { |
| 1130 | geo_mode = model2_bufferram[dlptr]; | |
| 947 | 1131 | dlptr++; |
| 948 | 1132 | break; |
| 949 | 1133 | } |
| r1037 | r1038 | |
| 954 | 1138 | } |
| 955 | 1139 | case 0x09: // Focal Distance |
| 956 | 1140 | { |
| 957 | focus_x = *(float*)&model2_bufferram[dlptr+0]; | |
| 958 | focus_y = *(float*)&model2_bufferram[dlptr+1]; | |
| 1141 | focus_x = u2f(model2_bufferram[dlptr+0]); | |
| 1142 | focus_y = u2f(model2_bufferram[dlptr+1]); | |
| 959 | 1143 | dlptr += 2; |
| 960 | 1144 | break; |
| 961 | 1145 | } |
| 962 | 1146 | case 0x0a: // Light Source Vector |
| 963 | 1147 | { |
| 964 | light_vector[0] = *(float*)&model2_bufferram[dlptr++]; | |
| 965 | light_vector[1] = *(float*)&model2_bufferram[dlptr++]; | |
| 966 | light_vector[2] = *(float*)&model2_bufferram[dlptr++]; | |
| 1148 | float norm; | |
| 1149 | ||
| 1150 | light_vector[0] = u2f(model2_bufferram[dlptr++]); | |
| 1151 | light_vector[1] = u2f(model2_bufferram[dlptr++]); | |
| 1152 | light_vector[2] = u2f(model2_bufferram[dlptr++]); | |
| 1153 | ||
| 1154 | norm = sqrt( light_vector[0]*light_vector[0] + light_vector[1]*light_vector[1] + light_vector[2]*light_vector[2] ); | |
| 1155 | if ( norm ) | |
| 1156 | { | |
| 1157 | light_vector[0] /= norm; | |
| 1158 | light_vector[1] /= norm; | |
| 1159 | light_vector[2] /= norm; | |
| 1160 | } | |
| 1161 | ||
| 967 | 1162 | break; |
| 968 | 1163 | } |
| 969 | 1164 | case 0x0b: // Matrix |
| 970 | 1165 | { |
| 971 | matrix[ 0] = *(float*)&model2_bufferram[dlptr++]; | |
| 972 | matrix[ 1] = *(float*)&model2_bufferram[dlptr++]; | |
| 973 | matrix[ 2] = *(float*)&model2_bufferram[dlptr++]; | |
| 974 | matrix[ 3] = *(float*)&model2_bufferram[dlptr++]; | |
| 975 | matrix[ 4] = *(float*)&model2_bufferram[dlptr++]; | |
| 976 | matrix[ 5] = *(float*)&model2_bufferram[dlptr++]; | |
| 977 | matrix[ 6] = *(float*)&model2_bufferram[dlptr++]; | |
| 978 | matrix[ 7] = *(float*)&model2_bufferram[dlptr++]; | |
| 979 | matrix[ 8] = *(float*)&model2_bufferram[dlptr++]; | |
| 980 | matrix[ 9] = *(float*)&model2_bufferram[dlptr++]; | |
| 981 | matrix[10] = *(float*)&model2_bufferram[dlptr++]; | |
| 982 | matrix[11] = *(float*)&model2_bufferram[dlptr++]; | |
| 1166 | matrix[ 0] = u2f(model2_bufferram[dlptr++]); | |
| 1167 | matrix[ 1] = u2f(model2_bufferram[dlptr++]); | |
| 1168 | matrix[ 2] = u2f(model2_bufferram[dlptr++]); | |
| 1169 | matrix[ 3] = u2f(model2_bufferram[dlptr++]); | |
| 1170 | matrix[ 4] = u2f(model2_bufferram[dlptr++]); | |
| 1171 | matrix[ 5] = u2f(model2_bufferram[dlptr++]); | |
| 1172 | matrix[ 6] = u2f(model2_bufferram[dlptr++]); | |
| 1173 | matrix[ 7] = u2f(model2_bufferram[dlptr++]); | |
| 1174 | matrix[ 8] = u2f(model2_bufferram[dlptr++]); | |
| 1175 | matrix[ 9] = u2f(model2_bufferram[dlptr++]); | |
| 1176 | matrix[10] = u2f(model2_bufferram[dlptr++]); | |
| 1177 | matrix[11] = u2f(model2_bufferram[dlptr++]); | |
| 983 | 1178 | break; |
| 984 | 1179 | } |
| 985 | 1180 | case 0x0c: // Parallel Transfer Vector |
| 986 | 1181 | { |
| 987 | matrix[ 9] = *(float*)&model2_bufferram[dlptr++]; | |
| 988 | matrix[10] = *(float*)&model2_bufferram[dlptr++]; | |
| 989 | matrix[11] = *(float*)&model2_bufferram[dlptr++]; | |
| 1182 | matrix[ 9] = u2f(model2_bufferram[dlptr++]); | |
| 1183 | matrix[10] = u2f(model2_bufferram[dlptr++]); | |
| 1184 | matrix[11] = u2f(model2_bufferram[dlptr++]); | |
| 990 | 1185 | break; |
| 991 | 1186 | } |
| 992 | 1187 | case 0x0e: // TGP Test |
| r1037 | r1038 | |
|---|---|---|
| 6 | 6 | - 3d graphics are managed by DSP processors |
| 7 | 7 | |
| 8 | 8 | TODO: use fixed point arithmetic while rendering quads |
| 9 | ||
| 10 | TODO: incorporate proper per-pixel transparency, instead of overloading the zbuffer | |
| 11 | ||
| 12 | TODO: add depth cueing support (palette bank selection using most significant bits of zcode), if this | |
| 13 | is determined to be a feature of real hardware. | |
| 9 | TODO: need proper depth cueing tables | |
| 14 | 10 | */ |
| 15 | 11 | |
| 16 | 12 | #include "driver.h" |
| r1037 | r1038 | |
| 28 | 24 | static UINT16 *mpPolyFrameBufferPens2; |
| 29 | 25 | static INT16 *mpPolyFrameBufferZ2; |
| 30 | 26 | |
| 27 | static UINT16 winrun_color; | |
| 28 | static UINT16 winrun_gpu_register[0x10/2]; | |
| 29 | ||
| 30 | READ16_HANDLER(winrun_gpu_color_r) | |
| 31 | { | |
| 32 | return winrun_color; | |
| 33 | } | |
| 34 | ||
| 35 | WRITE16_HANDLER(winrun_gpu_color_w) | |
| 36 | { | |
| 37 | COMBINE_DATA( &winrun_color ); | |
| 38 | } | |
| 39 | ||
| 40 | READ16_HANDLER(winrun_gpu_register_r) | |
| 41 | { | |
| 42 | return winrun_gpu_register[offset]; | |
| 43 | } | |
| 44 | ||
| 45 | WRITE16_HANDLER(winrun_gpu_register_w) | |
| 46 | { | |
| 47 | COMBINE_DATA( &winrun_gpu_register[offset] ); | |
| 48 | } | |
| 49 | ||
| 50 | WRITE16_HANDLER( winrun_gpu_videoram_w) | |
| 51 | { | |
| 52 | int color = data>>8; | |
| 53 | int mask = data&0xff; | |
| 54 | int i; | |
| 55 | for( i=0; i<8; i++ ) | |
| 56 | { | |
| 57 | if( mask&(0x01<<i) ) | |
| 58 | { | |
| 59 | videoram[(offset+i)&0x7ffff] = color; | |
| 60 | } | |
| 61 | } | |
| 62 | } /* winrun_gpu_videoram_w */ | |
| 63 | ||
| 64 | READ16_HANDLER( winrun_gpu_videoram_r ) | |
| 65 | { | |
| 66 | return videoram[offset]<<8; | |
| 67 | } /* winrun_gpu_videoram_r */ | |
| 68 | ||
| 31 | 69 | static void |
| 32 | 70 | AllocatePolyFrameBuffer( void ) |
| 33 | 71 | { |
| 34 | 72 | mpPolyFrameBufferZ = auto_malloc( FRAMEBUFFER_SIZE_IN_BYTES ); |
| 35 | 73 | mpPolyFrameBufferPens = auto_malloc( FRAMEBUFFER_SIZE_IN_BYTES ); |
| 74 | ||
| 36 | 75 | mpPolyFrameBufferZ2 = auto_malloc( FRAMEBUFFER_SIZE_IN_BYTES ); |
| 37 | 76 | mpPolyFrameBufferPens2 = auto_malloc( FRAMEBUFFER_SIZE_IN_BYTES ); |
| 38 | 77 | |
| 39 | namcos21_ClearPolyFrameBuffer(); | |
| 40 | namcos21_ClearPolyFrameBuffer(); | |
| 78 | namcos21_ClearPolyFrameBuffer(); | |
| 79 | namcos21_ClearPolyFrameBuffer(); | |
| 41 | 80 | } /* AllocatePolyFrameBuffer */ |
| 42 | 81 | |
| 43 | 82 | void |
| r1037 | r1038 | |
| 70 | 109 | for( sy=clip->min_y; sy<=clip->max_y; sy++ ) |
| 71 | 110 | { |
| 72 | 111 | UINT16 *dest = BITMAP_ADDR16(bitmap, sy, 0); |
| 73 | const INT16 *pZ = mpPolyFrameBufferZ2 + NAMCOS21_POLY_FRAME_WIDTH*sy; | |
| 74 | const UINT16 *pPen = mpPolyFrameBufferPens2 + NAMCOS21_POLY_FRAME_WIDTH*sy; | |
| 112 | const UINT16 *pPen = mpPolyFrameBufferPens2+NAMCOS21_POLY_FRAME_WIDTH*sy; | |
| 113 | const INT16 *pZ = mpPolyFrameBufferZ2+NAMCOS21_POLY_FRAME_WIDTH*sy; | |
| 75 | 114 | int sx; |
| 76 | 115 | for( sx=clip->min_x; sx<=clip->max_x; sx++ ) |
| 77 | 116 | { |
| 78 | 117 | if( pZ[sx]!=0x7fff ) |
| 79 | { | |
| 118 | { | |
| 80 | 119 | dest[sx] = pPen[sx]; |
| 81 | 120 | } |
| 82 | 121 | } |
| r1037 | r1038 | |
| 90 | 129 | |
| 91 | 130 | VIDEO_START( namcos21 ) |
| 92 | 131 | { |
| 132 | if( namcos2_gametype == NAMCOS21_WINRUN91 ) | |
| 133 | { | |
| 134 | videoram = auto_malloc(0x80000); | |
| 135 | } | |
| 93 | 136 | AllocatePolyFrameBuffer(); |
| 94 | 137 | namco_obj_init( |
| 95 | 138 | 0, /* gfx bank */ |
| r1037 | r1038 | |
| 134 | 177 | } |
| 135 | 178 | } /* update_palette */ |
| 136 | 179 | |
| 137 | VIDEO_UPDATE( namcos21 | |
| 180 | VIDEO_UPDATE( namcos21 | |
| 138 | 181 | { |
| 139 | 182 | int pivot = 3; |
| 140 | 183 | int pri; |
| 141 | ||
| 142 | 184 | update_palette(); |
| 143 | ||
| 144 | /* paint background */ | |
| 145 | fillbitmap( bitmap, get_black_pen(machine), cliprect ); | |
| 146 | ||
| 147 | /* draw low priority 2d sprites */ | |
| 148 | for( pri=0; pri<pivot; pri++ ) | |
| 149 | { | |
| 150 | namco_obj_draw(machine, bitmap, cliprect, pri ); | |
| 185 | fillbitmap( bitmap, 0xff, cliprect ); | |
| 186 | if( namcos2_gametype != NAMCOS21_WINRUN91 ) | |
| 187 | { /* draw low priority 2d sprites */ | |
| 188 | for( pri=0; pri<pivot; pri++ ) | |
| 189 | { | |
| 190 | namco_obj_draw( machine, bitmap, cliprect, pri ); | |
| 191 | } | |
| 151 | 192 | } |
| 152 | ||
| 153 | 193 | CopyVisiblePolyFrameBuffer( bitmap, cliprect ); |
| 154 | ||
| 155 | /* draw high priority 2d sprites */ | |
| 156 | for( pri=pivot; pri<8; pri++ ) | |
| 157 | { | |
| 158 | namco_obj_draw(machine, bitmap, cliprect, pri ); | |
| 194 | if( namcos2_gametype != NAMCOS21_WINRUN91 ) | |
| 195 | { /* draw high priority 2d sprites */ | |
| 196 | for( pri=pivot; pri<8; pri++ ) | |
| 197 | { | |
| 198 | namco_obj_draw( machine, bitmap, cliprect, pri ); | |
| 199 | } | |
| 159 | 200 | } |
| 160 | return 0; | |
| 161 | } | |
| 162 | ||
| 163 | VIDEO_UPDATE( namcos21_winrun ) | |
| 164 | { | |
| 165 | /* NOT WORKING! | |
| 166 | * | |
| 167 | * videoram16 points to a framebuffer used by Winning Run '91 hardware, probably a linear | |
| 168 | * pixel map used as a predecessor to the newer hardware's sprite system. | |
| 169 | */ | |
| 170 | int sx,sy; | |
| 171 | for( sy=0; sy<512; sy++ ) | |
| 172 | { | |
| 173 | UINT16 *pDest = BITMAP_ADDR16(bitmap, sy, 0); | |
| 174 | for( sx=0; sx<512; sx++ ) | |
| 201 | else | |
| 202 | { /* winrun bitmap layer */ | |
| 203 | int dy = (INT16)winrun_gpu_register[0x2/2]; | |
| 204 | int base = 0x1000+0x100*(winrun_color&0xf); | |
| 205 | int sx,sy; | |
| 206 | for( sy=cliprect->min_y; sy<=cliprect->max_y; sy++ ) | |
| 175 | 207 | { |
| 176 | int color = 0; | |
| 177 | int offs = sy*0x400 + (sx/8)*0x10; | |
| 178 | if( videoram16[offs/2]&(1<<(sx&7)) ) | |
| 208 | const UINT8 *pSource = &videoram[((sy+dy)&0x3ff)*0x200]; | |
| 209 | UINT16 *pDest = BITMAP_ADDR16(bitmap, sy, 0); | |
| 210 | for( sx=cliprect->min_x; sx<=cliprect->max_x; sx++ ) | |
| 179 | 211 | { |
| 180 | color = 1; | |
| 212 | int pen = pSource[sx]; | |
| 213 | if( pen!=0xff ) | |
| 214 | { | |
| 215 | pDest[sx] = base|pen; | |
| 216 | } | |
| 181 | 217 | } |
| 182 | pDest[sx] = color; | |
| 183 | 218 | } |
| 184 | } | |
| 185 | namcos21_dspram16[0x100/2] = 0x0001; | |
| 219 | } /* winrun bitmap layer */ | |
| 220 | ||
| 221 | ||
| 222 | // if( input_code_pressed( KEYCODE_Q ) ) namco_obj_draw( machine, bitmap, cliprect, 0 ); // boot, mountains | |
| 223 | // if( input_code_pressed( KEYCODE_W ) ) namco_obj_draw( machine, bitmap, cliprect, 1 ); | |
| 224 | // if( input_code_pressed( KEYCODE_E ) ) namco_obj_draw( machine, bitmap, cliprect, 2 ); // hs backdrop | |
| 225 | // if( input_code_pressed( KEYCODE_R ) ) namco_obj_draw( machine, bitmap, cliprect, 3 ); // warn, starship | |
| 226 | // if( input_code_pressed( KEYCODE_T ) ) namco_obj_draw( machine, bitmap, cliprect, 4 ); | |
| 227 | // if( input_code_pressed( KEYCODE_Y ) ) namco_obj_draw( machine, bitmap, cliprect, 5 ); | |
| 228 | // if( input_code_pressed( KEYCODE_U ) ) namco_obj_draw( machine, bitmap, cliprect, 6 ); | |
| 229 | // if( input_code_pressed( KEYCODE_I ) ) namco_obj_draw( machine, bitmap, cliprect, 7 ); | |
| 230 | ||
| 186 | 231 | return 0; |
| 187 | } | |
| 232 | } /* VIDEO_UPDATE( namcos21 ) */ | |
| 188 | 233 | |
| 189 | 234 | /*********************************************************************************************/ |
| 190 | 235 | |
| r1037 | r1038 | |
| 203 | 248 | #define SWAP(A,B) { const void *temp = A; A = B; B = temp; } |
| 204 | 249 | |
| 205 | 250 | static void |
| 206 | renderscanline_flat( const edge *e1, const edge *e2, int sy, unsigned color ) | |
| 251 | renderscanline_flat( const edge *e1, const edge *e2, int sy, unsigned color, int depthcueenable ) | |
| 207 | 252 | { |
| 208 | 253 | if( e1->x > e2->x ) |
| 209 | 254 | { |
| r1037 | r1038 | |
| 213 | 258 | { |
| 214 | 259 | UINT16 *pDest = mpPolyFrameBufferPens + sy*NAMCOS21_POLY_FRAME_WIDTH; |
| 215 | 260 | INT16 *pZBuf = mpPolyFrameBufferZ + sy*NAMCOS21_POLY_FRAME_WIDTH; |
| 216 | ||
| 217 | 261 | int x0 = (int)e1->x; |
| 218 | 262 | int x1 = (int)e2->x; |
| 219 | 263 | int w = x1-x0; |
| r1037 | r1038 | |
| 238 | 282 | INT16 zz = (INT16)z; |
| 239 | 283 | if( zz<pZBuf[x] ) |
| 240 | 284 | { |
| 241 | pDest[x] = color; | |
| 285 | int pen = color; | |
| 286 | if( depthcueenable && zz>0 ) | |
| 287 | { | |
| 288 | int depth = 0; | |
| 289 | if( namcos2_gametype == NAMCOS21_WINRUN91 ) | |
| 290 | { | |
| 291 | depth = (zz>>1)&0xff00; | |
| 292 | if( depth>0x1f00 ) depth = 0x1f00; | |
| 293 | pen += depth; | |
| 294 | } | |
| 295 | else | |
| 296 | { | |
| 297 | depth = (zz>>0)&0xfe00; | |
| 298 | if( depth>0x1e00 ) depth = 0x1e00; | |
| 299 | pen -= depth; | |
| 300 | } | |
| 301 | } | |
| 302 | pDest[x] = pen; | |
| 242 | 303 | pZBuf[x] = zz; |
| 243 | 304 | } |
| 244 | 305 | z += dz; |
| r1037 | r1038 | |
| 252 | 313 | const vertex *v0, |
| 253 | 314 | const vertex *v1, |
| 254 | 315 | const vertex *v2, |
| 255 | unsigned color ) | |
| 316 | unsigned color, | |
| 317 | int depthcueenable ) | |
| 256 | 318 | { |
| 257 | 319 | int dy,ystart,yend,crop; |
| 258 | 320 | |
| r1037 | r1038 | |
| 290 | 352 | |
| 291 | 353 | e2.x = v0->x; |
| 292 | 354 | e2.z = v0->z; |
| 293 | crop = - | |
| 355 | crop = - | |
| 294 | 356 | if( crop>0 ) |
| 295 | 357 | { |
| 296 | 358 | e2.x += dx2dy*crop; |
| r1037 | r1038 | |
| 308 | 370 | dx1dy = (v1->x - v0->x)/dy; |
| 309 | 371 | dz1dy = (v1->z - v0->z)/dy; |
| 310 | 372 | |
| 311 | crop = - | |
| 373 | crop = - | |
| 312 | 374 | if( crop>0 ) |
| 313 | 375 | { |
| 314 | 376 | e1.x += dx1dy*crop; |
| r1037 | r1038 | |
| 319 | 381 | |
| 320 | 382 | for( y=ystart; y<yend; y++ ) |
| 321 | 383 | { |
| 322 | renderscanline_flat( &e1, &e2, y, color ); | |
| 384 | renderscanline_flat( &e1, &e2, y, color, depthcueenable ); | |
| 323 | 385 | |
| 324 | 386 | e2.x += dx2dy; |
| 325 | 387 | e2.z += dz2dy; |
| r1037 | r1038 | |
| 340 | 402 | dx1dy = (v2->x - v1->x)/dy; |
| 341 | 403 | dz1dy = (v2->z - v1->z)/dy; |
| 342 | 404 | |
| 343 | crop = | |
| 405 | crop = | |
| 344 | 406 | if( crop>0 ) |
| 345 | 407 | { |
| 346 | 408 | e1.x += dx1dy*crop; |
| 347 | 409 | e1.z += dz1dy*crop; |
| 348 | 410 | ystart = 0; |
| 349 | 411 | } |
| 350 | if( yend>NAMCOS21_POLY_FRAME_HEIGHT-1 ) yend = NAMCOS21_POLY_FRAME_HEIGHT-1; | |
| 351 | ||
| 412 | if( yend>NAMCOS21_POLY_FRAME_HEIGHT-1 ) | |
| 413 | { | |
| 414 | yend = NAMCOS21_POLY_FRAME_HEIGHT-1; | |
| 415 | } | |
| 352 | 416 | for( y=ystart; y<yend; y++ ) |
| 353 | 417 | { |
| 354 | renderscanline_flat( &e1, &e2, y, color ); | |
| 418 | renderscanline_flat( &e1, &e2, y, color, depthcueenable ); | |
| 355 | 419 | |
| 356 | 420 | e2.x += dx2dy; |
| 357 | 421 | e2.z += dz2dy; |
| r1037 | r1038 | |
| 367 | 431 | namcos21_DrawQuad( int sx[4], int sy[4], int zcode[4], int color ) |
| 368 | 432 | { |
| 369 | 433 | vertex a,b,c,d; |
| 370 | ||
| 371 | color &= 0x7fff; | |
| 372 | ||
| 373 | // 0x0000..0x1fff sprite palettes (0x10 sets of 0x100 colors) | |
| 374 | // 0x2000..0x3fff polygon palette bank0 (0x10 sets of 0x200 colors) | |
| 375 | // 0x4000..0x5fff polygon palette bank1 (0x10 sets of 0x200 colors) | |
| 376 | // 0x6000..0x7fff polygon palette bank2 (0x10 sets of 0x200 colors) | |
| 377 | ||
| 378 | /* map color code to hardware pen */ | |
| 379 | switch( color>>8 ) | |
| 434 | int depthcueenable = 1; | |
| 435 | /* | |
| 436 | 0x0000..0x1fff sprite palettes (0x20 sets of 0x100 colors) | |
| 437 | 0x2000..0x3fff polygon palette bank0 (0x10 sets of 0x200 colors or 0x20 sets of 0x100 colors) | |
| 438 | 0x4000..0x5fff polygon palette bank1 (0x10 sets of 0x200 colors or 0x20 sets of 0x100 colors) | |
| 439 | 0x6000..0x7fff polygon palette bank2 (0x10 sets of 0x200 colors or 0x20 sets of 0x100 colors) | |
| 440 | */ | |
| 441 | if( namcos2_gametype == NAMCOS21_WINRUN91 || | |
| 442 | namcos2_gametype == NAMCOS21_DRIVERS_EYES ) | |
| 380 | 443 | { |
| 381 | case 0: | |
| 382 | color = 0x4000 - 0x400 + (color&0xff) + 0x100; | |
| 383 | break; | |
| 384 | ||
| 385 | case 2: | |
| 386 | color = 0x4000 - 0x400 + (color&0xff) + 0x000; | |
| 387 | break; | |
| 388 | ||
| 389 | default: | |
| 390 | /* unused? */ | |
| 391 | mame_printf_debug ( "unk col=0x%04x\n", color ); | |
| 392 | break; | |
| 444 | color = 0x4000|(color&0xff); | |
| 393 | 445 | } |
| 394 | ||
| 446 | else | |
| 447 | { /* map color code to hardware pen */ | |
| 448 | int code = color>>8; | |
| 449 | if( code&0x80 ) | |
| 450 | { | |
| 451 | color = color&0xff; | |
| 452 | color = 0x3e00|color; | |
| 453 | } | |
| 454 | else | |
| 455 | { | |
| 456 | color&=0xff; | |
| 457 | color = 0x3e00|color; | |
| 458 | if( (code&0x02)==0 ) | |
| 459 | { | |
| 460 | color|=0x100; | |
| 461 | } | |
| 462 | } | |
| 463 | } | |
| 395 | 464 | a.x = sx[0]; |
| 396 | 465 | a.y = sy[0]; |
| 397 | 466 | a.z = zcode[0]; |
| r1037 | r1038 | |
| 408 | 477 | d.y = sy[3]; |
| 409 | 478 | d.z = zcode[3]; |
| 410 | 479 | |
| 411 | rendertri( &a, &b, &c, color ); | |
| 412 | rendertri( &c, &d, &a, color ); | |
| 480 | rendertri( &a, &b, &c, color, depthcueenable ); | |
| 481 | rendertri( &c, &d, &a, color, depthcueenable ); | |
| 413 | 482 | } /* namcos21_DrawQuad */ |
| r1037 | r1038 | |
|---|---|---|
| 335 | 335 | } |
| 336 | 336 | } |
| 337 | 337 | |
| 338 | #ifdef UNUSED_FUNCTION | |
| 338 | 339 | static void copy_screen(mame_bitmap *bitmap, const rectangle *cliprect) |
| 339 | 340 | { |
| 340 | 341 | int x,y; |
| r1037 | r1038 | |
| 349 | 350 | } |
| 350 | 351 | } |
| 351 | 352 | } |
| 353 | #endif | |
| 352 | 354 | |
| 353 | 355 | static int tick = 0; |
| 354 | 356 | static int debug_layer_disable = 0; |
| r1037 | r1038 | |
|---|---|---|
| 1473 | 1473 | UINT8 frontbuf; /* front buffer index */ |
| 1474 | 1474 | UINT8 backbuf; /* back buffer index */ |
| 1475 | 1475 | UINT8 swaps_pending; /* number of pending swaps */ |
| 1476 | UINT8 video_changed; /* did the frontbuffer video change? */ | |
| 1476 | 1477 | |
| 1477 | 1478 | UINT32 yorigin; /* Y origin subtract value */ |
| 1478 | 1479 | UINT32 lfb_base; /* base of LFB in memory */ |
| r1037 | r1038 | |
| 1480 | 1481 | |
| 1481 | 1482 | UINT32 width; /* width of current frame buffer */ |
| 1482 | 1483 | UINT32 height; /* height of current frame buffer */ |
| 1484 | UINT32 xoffs; /* horizontal offset (back porch) */ | |
| 1485 | UINT32 yoffs; /* vertical offset (back porch) */ | |
| 1486 | UINT32 vsyncscan; /* vertical sync scanline */ | |
| 1483 | 1487 | UINT32 rowpixels; /* pixels per row */ |
| 1484 | 1488 | UINT32 tile_width; /* width of video tiles */ |
| 1485 | 1489 | UINT32 tile_height; /* height of video tiles */ |
| r1037 | r1038 | |
|---|---|---|
| 186 | 186 | |
| 187 | 187 | VIDEO_START( twinactn ) |
| 188 | 188 | { |
| 189 | tilemap_0 = tilemap_create( get_tile_info_0, a | |
| 189 | tilemap_0 = tilemap_create( get_tile_info_0, twinactn | |
| 190 | 190 | TILEMAP_TYPE_PEN, |
| 191 | 191 | 16,16, |
| 192 | 192 | TWINACTN_TILES_PER_PAGE_X*TWINACTN_PAGES_PER_TMAP_X,TWINACTN_TILES_PER_PAGE_Y*TWINACTN_PAGES_PER_TMAP_Y); |
| r1037 | r1038 | |
|---|---|---|
| 13 | 13 | * Jolly Card (Austria), TAB-Austria, 1985. |
| 14 | 14 | * Jolly Card (Austria, encrypted), TAB-Austria, 1985. |
| 15 | 15 | * Jolly Card (Croatia), Soft Design, 1993. |
| 16 | * Jolly Card (Italia, encrypted | |
| 16 | * Jolly Card (Italia, encrypted | |
| 17 | 17 | * Jolly Card (Austria, Fun World, bootleg), Inter Games, 1995. |
| 18 | 18 | * Big Deal (Hungary, set 1), Fun World, 1990. |
| 19 | 19 | * Big Deal (Hungary, set 2), Fun World, 1990. |
| r1037 | r1038 | |
| 21 | 21 | * Cuore 1 (Italia), C.M.C., 1996. |
| 22 | 22 | * Elephant Family (Italia, new), C.M.C., 1997. |
| 23 | 23 | * Elephant Family (Italia, old), C.M.C., 1996. |
| 24 | * Pool 10 (Italia, set 1), C.M.C., 1996. | |
| 25 | * Pool 10 (Italia, set 2), C.M.C., 1996. | |
| 26 | * Tortuga Family (Italia), C.M.C., 1997. | |
| 24 | 27 | * Royal Card (Austria, set 1), TAB-Austria, 1991. |
| 25 | 28 | * Royal Card (Austria, set 2), TAB-Austria, 1991. |
| 26 | 29 | * Royal Card (Slovakia, encrypted), Evona Electronic, 1991. |
| 27 | 30 | * Magic Card II (Bulgaria, bootleg), Impera, 1996. |
| 28 | 31 | * Joker Card (Ver.A267BC, encrypted), Vesely Svet, 1993. |
| 32 | * Mongolfier New (Italia), bootleg, 199?. | |
| 33 | * Soccer New (Italia), bootleg, 199?. | |
| 34 | * Snooker 10 (Ver 1.11), Sandiy, 1998. | |
| 35 | * Saloon (France, encrypted), unknown, 199?. | |
| 29 | 36 | |
| 30 | 37 | |
| 31 | 38 | ***********************************************************************************/ |
| r1037 | r1038 | |
|---|---|---|
| 25 | 25 | |
| 26 | 26 | static void matmul4( float *product, const float *a, const float *b ) ; |
| 27 | 27 | static void vecmatmul4( float *product, const float *a, const float *b) ; |
| 28 | static float vecDotProduct( const float *a, const float *b) ; | |
| 29 | static void normalize(float* x) ; | |
| 28 | //static float vecDotProduct( const float *a, const float *b) ; | |
| 29 | //static void normalize(float* x) ; | |
| 30 | 30 | |
| 31 | 31 | // 3d helpers |
| 32 | 32 | static float uToF(UINT16 input) ; |
| 33 | 33 | static void SetIdentity(float *matrix) ; |
| 34 | 34 | |
| 35 | 35 | |
| 36 | static void plot(INT32 x, INT32 y, INT32 color, mame_bitmap *bitmap) ; | |
| 37 | static void drawline2d(INT32 x0, INT32 y0, INT32 x1, INT32 y1, INT32 color, mame_bitmap *bitmap) ; | |
| 36 | //static void plot(INT32 x, INT32 y, INT32 color, mame_bitmap *bitmap) ; | |
| 37 | //static void drawline2d(INT32 x0, INT32 y0, INT32 x1, INT32 y1, INT32 color, mame_bitmap *bitmap) ; | |
| 38 | 38 | |
| 39 | 39 | static float *depthBuffer ; |
| 40 | 40 | static struct polygon *polys ; |
| r1037 | r1038 | |
| 356 | 356 | |
| 357 | 357 | static void PerformFrustumClip(struct polygon *p) ; |
| 358 | 358 | |
| 359 | static void DrawWireframe(struct polygon *p, mame_bitmap *bitmap) ; | |
| 359 | //static void DrawWireframe(struct polygon *p, mame_bitmap *bitmap) ; | |
| 360 | 360 | static void DrawShaded(running_machine *machine, struct polygon *p, mame_bitmap *bitmap) ; |
| 361 | 361 | |
| 362 | 362 | |
| r1037 | r1038 | |
| 1349 | 1349 | product[3] = bi0 * a[3] + bi1 * a[7] + bi2 * a[11] + bi3 * a[15]; |
| 1350 | 1350 | } |
| 1351 | 1351 | |
| 1352 | #ifdef UNUSED_FUNCTION | |
| 1352 | 1353 | static float vecDotProduct( const float *a, const float *b) |
| 1353 | 1354 | { |
| 1354 | 1355 | return ((a[0]*b[0]) + (a[1]*b[1]) + (a[2]*b[2])) ; |
| 1355 | 1356 | } |
| 1357 | #endif | |
| 1356 | 1358 | |
| 1357 | 1359 | static void SetIdentity(float *matrix) |
| 1358 | 1360 | { |
| r1037 | r1038 | |
| 1382 | 1384 | return retVal ; |
| 1383 | 1385 | } |
| 1384 | 1386 | |
| 1387 | #ifdef UNUSED_FUNCTION | |
| 1385 | 1388 | static void normalize(float* x) |
| 1386 | 1389 | { |
| 1387 | 1390 | double l2 = (x[0]*x[0]) + (x[1]*x[1]) + (x[2]*x[2]); |
| r1037 | r1038 | |
| 1391 | 1394 | x[1] = (float)(x[1] / l) ; |
| 1392 | 1395 | x[2] = (float)(x[2] / l) ; |
| 1393 | 1396 | } |
| 1397 | #endif | |
| 1394 | 1398 | |
| 1395 | 1399 | |
| 1396 | 1400 | |
| r1037 | r1038 | |
| 1564 | 1568 | // wireframe rendering // |
| 1565 | 1569 | ///////////////////////// |
| 1566 | 1570 | |
| 1571 | #ifdef UNUSED_FUNCTION | |
| 1567 | 1572 | static void plot(INT32 x, INT32 y, INT32 color, mame_bitmap *bitmap) |
| 1568 | 1573 | { |
| 1569 | 1574 | *BITMAP_ADDR32(bitmap, y, x) = MAKE_ARGB((UINT8)255, (UINT8)color, (UINT8)color, (UINT8)color) ; |
| r1037 | r1038 | |
| 1647 | 1652 | } |
| 1648 | 1653 | */ |
| 1649 | 1654 | } |
| 1655 | #endif | |
| 1650 | 1656 | |
| 1651 | 1657 | |
| 1652 | 1658 | /////////////////////// |
| r1037 | r1038 | |
|---|---|---|
| 207 | 207 | #include "taito_f3.h" |
| 208 | 208 | #include "ui.h" |
| 209 | 209 | |
| 210 | #define VERBOSE 0 | |
| 210 | 211 | #define DARIUSG_KLUDGE |
| 211 | 212 | //#define DEBUG_F3 1 |
| 212 | 213 | |
| r1037 | r1038 | |
| 3314 | 3315 | /* Draw final framebuffer */ |
| 3315 | 3316 | scanline_draw(machine, bitmap,cliprect); |
| 3316 | 3317 | |
| 3317 | // print_debug_info(bitmap); | |
| 3318 | if (VERBOSE) | |
| 3319 | print_debug_info(bitmap); | |
| 3318 | 3320 | return 0; |
| 3319 | 3321 | } |
| r1037 | r1038 | |
|---|---|---|
| 3 | 3 | ******************************************************************************** |
| 4 | 4 | driver by David Haywood |
| 5 | 5 | |
| 6 | s | |
| 6 | this | |
| 7 | 7 | |
| 8 | todo: | |
| 9 | ||
| 10 | clean up megatech code, covert to rgb_direct? might be needed for megatech | |
| 11 | some megatech games are also sms based so we'll need a way of supporting that | |
| 12 | for now support has been quickly added while the menu system is worked out | |
| 13 | megaplay has an sms vdp too | |
| 14 | ||
| 15 | 8 | *******************************************************************************/ |
| 16 | 9 | |
| 17 | 10 | #include "driver.h" |
| r1037 | r1038 | |
| 37 | 30 | |
| 38 | 31 | static int palette_base; // needed for megatech for now.. |
| 39 | 32 | |
| 40 | /*- in (drivers/segasyse.c) -*/ | |
| 33 | UINT8 segae_vintpending; | |
| 34 | UINT8 segae_hintpending; | |
| 41 | 35 | |
| 42 | extern UINT8 segae_vintpending; | |
| 43 | extern UINT8 segae_hintpending; | |
| 44 | ||
| 45 | 36 | /*-- Prototypes --*/ |
| 46 | 37 | |
| 47 | 38 | static void vdp_start(running_machine *machine, UINT8 chip ); |
| r1037 | r1038 | |
| 61 | 52 | vhstart, vhstop and vhrefresh functions |
| 62 | 53 | *******************************************************************************/ |
| 63 | 54 | |
| 64 | VIDEO_START( segae ) | |
| 65 | { | |
| 66 | UINT8 temp; | |
| 67 | ||
| 68 | palette_base = 0; | |
| 69 | ||
| 70 | for (temp=0;temp<CHIPS;temp++) | |
| 71 | vdp_start(machine, temp); | |
| 72 | ||
| 73 | cache_bitmap = auto_malloc( (16+256+16) * 192); /* 16 pixels either side to simplify drawing */ | |
| 74 | memset(cache_bitmap, 0, (16+256+16) * 192); | |
| 75 | } | |
| 76 | ||
| 77 | VIDEO_UPDATE( segae ) | |
| 78 | { | |
| 79 | int i; | |
| 80 | ||
| 81 | /*- Draw from cache_bitmap to screen -*/ | |
| 82 | ||
| 83 | for (i = 0;i < 192;i++) | |
| 84 | draw_scanline8(bitmap,0,i,256,&cache_bitmap[i * (16+256+16) +16],&machine->pens[palette_base],15); | |
| 85 | return 0; | |
| 86 | } | |
| 87 | ||
| 88 | /* these are used by megatech */ | |
| 89 | ||
| 90 | 55 | /* starts vdp for bios screen only */ |
| 91 | void mega | |
| 56 | void megaplay_start_video_normal(running_machine *machine) | |
| 92 | 57 | { |
| 93 | 58 | palette_base = 0x40; |
| 94 | 59 | |
| r1037 | r1038 | |
| 97 | 62 | cache_bitmap = auto_malloc( (16+256+16) * 192); /* 16 pixels either side to simplify drawing */ |
| 98 | 63 | } |
| 99 | 64 | |
| 100 | void megatech_update_video_normal(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect ) | |
| 101 | { | |
| 102 | int maxy = (cliprect->max_y > 192-1) ? 192-1 : cliprect->max_y; | |
| 103 | int i; | |
| 104 | ||
| 105 | /*- Draw from cache_bitmap to screen -*/ | |
| 106 | ||
| 107 | for (i = cliprect->min_y; i <= maxy;i++) | |
| 108 | segae_drawscanline(i,0,0); | |
| 109 | ||
| 110 | for (i = cliprect->min_y; i <= maxy;i++) | |
| 111 | draw_scanline8(bitmap,0,i,256,&cache_bitmap[i * (16+256+16) +16],&machine->pens[palette_base],-1); | |
| 112 | } | |
| 113 | ||
| 114 | 65 | void megaplay_update_video_normal(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect ) |
| 115 | 66 | { |
| 116 | 67 | int miny = (cliprect->min_y < 16) ? 16 : cliprect->min_y; |
| r1037 | r1038 | |
|---|---|---|
| 247 | 247 | spriteram[offs] & 1,spriteram[offs] & 2, |
| 248 | 248 | sx,sy, |
| 249 | 249 | &spriteclip,TRANSPARENCY_PENS, |
| 250 | colortable_get_transpen_mask(pacman_colortable, machine->gfx[1], color, 0)); | |
| 250 | colortable_get_transpen_mask(pacman_colortable, machine->gfx[1], color & 0x3f, 0)); | |
| 251 | 251 | |
| 252 | 252 | /* also plot the sprite with wraparound (tunnel in Crush Roller) */ |
| 253 | 253 | drawgfx(bitmap,machine->gfx[1], |
| r1037 | r1038 | |
| 256 | 256 | spriteram[offs] & 1,spriteram[offs] & 2, |
| 257 | 257 | sx - 256,sy, |
| 258 | 258 | &spriteclip,TRANSPARENCY_PENS, |
| 259 | colortable_get_transpen_mask(pacman_colortable, machine->gfx[1], color, 0)); | |
| 259 | colortable_get_transpen_mask(pacman_colortable, machine->gfx[1], color & 0x3f, 0)); | |
| 260 | 260 | } |
| 261 | 261 | /* In the Pac Man based games (NOT Pengo) the first two sprites must be offset */ |
| 262 | 262 | /* one pixel to the left to get a more correct placement */ |
| r1037 | r1038 | |
| 275 | 275 | spriteram[offs] & 1,spriteram[offs] & 2, |
| 276 | 276 | sx,sy + xoffsethack, |
| 277 | 277 | &spriteclip,TRANSPARENCY_PENS, |
| 278 | colortable_get_transpen_mask(pacman_colortable, machine->gfx[1], color, 0)); | |
| 278 | colortable_get_transpen_mask(pacman_colortable, machine->gfx[1], color & 0x3f, 0)); | |
| 279 | 279 | |
| 280 | 280 | /* also plot the sprite with wraparound (tunnel in Crush Roller) */ |
| 281 | 281 | drawgfx(bitmap,machine->gfx[1], |
| r1037 | r1038 | |
| 284 | 284 | spriteram[offs] & 2,spriteram[offs] & 1, |
| 285 | 285 | sx - 256,sy + xoffsethack, |
| 286 | 286 | &spriteclip,TRANSPARENCY_PENS, |
| 287 | colortable_get_transpen_mask(pacman_colortable, machine->gfx[1], color, 0)); | |
| 287 | colortable_get_transpen_mask(pacman_colortable, machine->gfx[1], color & 0x3f, 0)); | |
| 288 | 288 | } |
| 289 | 289 | } |
| 290 | 290 | |
| r1037 | r1038 | |
| 570 | 570 | |
| 571 | 571 | WRITE8_HANDLER( jrpacman_videoram_w ) |
| 572 | 572 | { |
| 573 | if (videoram[offset] != data) | |
| 574 | { | |
| 575 | videoram[offset] = data; | |
| 576 | jrpacman_mark_tile_dirty(offset); | |
| 577 | } | |
| 573 | videoram[offset] = data; | |
| 574 | jrpacman_mark_tile_dirty(offset); | |
| 578 | 575 | } |
| 579 | 576 | |
| 580 | 577 | WRITE8_HANDLER( jrpacman_charbank_w ) |
| r0 | r1038 | |
|---|---|---|
| 1 | /* | |
| 2 | Super Real Mahjong P6 (JPN Ver.) | |
| 3 | (c)1996 Seta | |
| 4 | ||
| 5 | WIP driver by Sebastien Volpe | |
| 6 | ||
| 7 | according prg ROM (offset $0fff80): | |
| 8 | ||
| 9 | S12 SYSTEM | |
| 10 | SUPER REAL MAJAN P6 | |
| 11 | SETA CO.,LTD | |
| 12 | 19960410 | |
| 13 | V1.00 | |
| 14 | ||
| 15 | TODO: | |
| 16 | - gfx decoding / emulation | |
| 17 | - sound emulation (appears to be really close to st0016) | |
| 18 | ||
| 19 | Are there other games on this 'System S12' hardware ??? | |
| 20 | ||
| 21 | ---------------- dump infos ---------------- | |
| 22 | ||
| 23 | [Jun/15/2000] | |
| 24 | ||
| 25 | Super Real Mahjong P6 (JPN Ver.) | |
| 26 | (c)1996 Seta | |
| 27 | ||
| 28 | SX011 | |
| 29 | E47-REV01B | |
| 30 | ||
| 31 | CPU: 68000-16 | |
| 32 | Sound: NiLe | |
| 33 | OSC: 16.0000MHz | |
| 34 | 42.9545MHz | |
| 35 | 56.0000MHz | |
| 36 | ||
| 37 | Chips: ST-0026 NiLe (video, sound) | |
| 38 | ST-0017 | |
| 39 | ||
| 40 | ||
| 41 | SX011-01.22 chr, samples (?) | |
| 42 | SX011-02.21 | |
| 43 | SX011-03.20 | |
| 44 | SX011-04.19 | |
| 45 | SX011-05.18 | |
| 46 | SX011-06.17 | |
| 47 | SX011-07.16 | |
| 48 | SX011-08.15 | |
| 49 | ||
| 50 | SX011-09.10 68000 data | |
| 51 | ||
| 52 | SX011-10.4 68000 prg. | |
| 53 | SX011-11.5 | |
| 54 | ||
| 55 | ||
| 56 | Dumped 06/15/2000 | |
| 57 | */ | |
| 58 | ||
| 59 | #include "driver.h" | |
| 60 | #include "srmp6.h" | |
| 61 | ||
| 62 | /*************************************************************************** | |
| 63 | vidhrdw - VERY preliminary | |
| 64 | ***************************************************************************/ | |
| 65 | ||
| 66 | /* sprite RAM format: 8 words, 1st word = 0x8000 means end of list | |
| 67 | ||
| 68 | Offset: Format: Value: | |
| 69 | ||
| 70 | 0000.w | |
| 71 | f--- ---- ---- ---- End of list | |
| 72 | -??? ???? ???? ???- | |
| 73 | ---- ---- ---- ---0 Sprite visible? | |
| 74 | ||
| 75 | 0002.w Code | |
| 76 | 0004.w X Position | |
| 77 | 0006.w Y Position | |
| 78 | ||
| 79 | 0008.w attributes/color? | |
| 80 | 000a.w attributes/color? | |
| 81 | ||
| 82 | 000c.l used ? | |
| 83 | ||
| 84 | cpu #0 (PC=00011B2A): unmapped program memory word write to 00400490 = 0001 & FFFF - sprite visible ? | |
| 85 | cpu #0 (PC=00011B2E): unmapped program memory word write to 00400492 = 0233 & FFFF - code | |
| 86 | cpu #0 (PC=00011B32): unmapped program memory word write to 00400494 = 00D8 & FFFF - x | |
| 87 | cpu #0 (PC=00011B36): unmapped program memory word write to 00400496 = 0080 & FFFF - y | |
| 88 | cpu #0 (PC=00011B3A): unmapped program memory word write to 00400498 = E000 & FFFF - attributes/color? | |
| 89 | cpu #0 (PC=00011B3E): unmapped program memory word write to 0040049A = 0000 & FFFF - attributes/color? | |
| 90 | cpu #0 (PC=00011B40): unmapped program memory word write to 0040049C = 0000 & FFFF -\ | |
| 91 | cpu #0 (PC=00011B40): unmapped program memory word write to 0040049E = 0000 & FFFF -/ used ? | |
| 92 | ||
| 93 | cpu #0 (PC=00011B4E): unmapped program memory word write to 004004B0 = 8000 & FFFF - end of list | |
| 94 | */ | |
| 95 | ||
| 96 | /* tile RAM format: where's color ? | |
| 97 | ||
| 98 | cpu #0 (PC=000118E8): unmapped program memory word write to 00412002 = 0005 & FFFF - kind of init, interleaved with 'meaningful' words | |
| 99 | cpu #0 (PC=000118EE): unmapped program memory word write to 00412008 = 0000 & FFFF | |
| 100 | cpu #0 (PC=000118F4): unmapped program memory word write to 0041200A = 0000 & FFFF | |
| 101 | ... | |
| 102 | cpu #0 (PC=000118E8): unmapped program memory word write to 00416EB2 = 0005 & FFFF | |
| 103 | cpu #0 (PC=000118EE): unmapped program memory word write to 00416EB8 = 0000 & FFFF | |
| 104 | cpu #0 (PC=000118F4): unmapped program memory word write to 00416EBA = 0000 & FFFF | |
| 105 | ||
| 106 | ||
| 107 | cpu #0 (PC=0001170A): unmapped program memory word write to 00412000 = 4004 & FFFF | |
| 108 | cpu #0 (PC=00011712): unmapped program memory word write to 00412004 = 0000 & FFFF | |
| 109 | cpu #0 (PC=0001171A): unmapped program memory word write to 00412006 = 0000 & FFFF | |
| 110 | ... | |
| 111 | cpu #0 (PC=0001170A): unmapped program memory word write to 004133A0 = 4004 & FFFF - tile code [*] | |
| 112 | cpu #0 (PC=00011712): unmapped program memory word write to 004133A4 = 0140 & FFFF - x (00..140, step 16d) -> res = 320d | |
| 113 | cpu #0 (PC=0001171A): unmapped program memory word write to 004133A6 = 00E0 & FFFF - y (00..F0, step 16d) -> res = 240d | |
| 114 | ||
| 115 | [*] tile code is 'incremented by 4', suggesting there are 4 8x8 tiles arranged to make a 16x16 one ??? | |
| 116 | */ | |
| 117 | ||
| 118 | UINT16 *sprite_ram; // Sprite RAM 0x400000-0x47dfff | |
| 119 | UINT16 *sprite_ram_old; // Sprite RAM(previous frame) | |
| 120 | UINT16 *dec_regs; //graphics decode register | |
| 121 | UINT16 *video_regs, *sound_regs; | |
| 122 | ||
| 123 | int brightness; //fade in/out | |
| 124 | ||
| 125 | /*************************************************************************** | |
| 126 | Graphics definitions | |
| 127 | ***************************************************************************/ | |
| 128 | ||
| 129 | gfx_layout srmp6_layout_8x8 = | |
| 130 | { | |
| 131 | 8,8, | |
| 132 | 0x8000 / 4, | |
| 133 | 8, | |
| 134 | { STEP8(0,1)}, | |
| 135 | { STEP8(0,8)}, | |
| 136 | { STEP8(0,8*8)}, | |
| 137 | 8*8*8 | |
| 138 | }; | |
| 139 | ||
| 140 | //fade in/out | |
| 141 | void update_palette(void) | |
| 142 | { | |
| 143 | char r, g ,b; | |
| 144 | int brg = brightness - 0x60; | |
| 145 | int i; | |
| 146 | ||
| 147 | for(i = 0; i < 0x800; i++) | |
| 148 | { | |
| 149 | r = paletteram16[i] >> 0 & 0x1F; | |
| 150 | g = paletteram16[i] >> 5 & 0x1F; | |
| 151 | b = paletteram16[i] >> 10 & 0x1F; | |
| 152 | ||
| 153 | if(brg < 0) { | |
| 154 | r += (r * brg) >> 5; | |
| 155 | if(r < 0) r = 0; | |
| 156 | g += (g * brg) >> 5; | |
| 157 | if(g < 0) g = 0; | |
| 158 | b += (b * brg) >> 5; | |
| 159 | if(b < 0) b = 0; | |
| 160 | } | |
| 161 | else if(brg > 0) { | |
| 162 | r += ((0x1F - r) * brg) >> 5; | |
| 163 | if(r > 0x1F) r = 0x1F; | |
| 164 | g += ((0x1F - g) * brg) >> 5; | |
| 165 | if(g > 0x1F) g = 0x1F; | |
| 166 | b += ((0x1F - b) * brg) >> 5; | |
| 167 | if(b > 0x1F) b = 0x1F; | |
| 168 | } | |
| 169 | palette_set_color(Machine, i, MAKE_RGB(r << 3, g << 3, b << 3)); | |
| 170 | } | |
| 171 | } | |
| 172 | ||
| 173 | VIDEO_START(srmp6) | |
| 174 | { | |
| 175 | int i; | |
| 176 | ||
| 177 | sprite_ram_old = auto_malloc(0x7E000); | |
| 178 | memset(sprite_ram_old, 0x00, 0x7E000); | |
| 179 | ||
| 180 | brightness = 0x60; | |
| 181 | ||
| 182 | for(i=0;i<4;i++) | |
| 183 | { | |
| 184 | if(Machine->gfx[i]) | |
| 185 | freegfx(Machine->gfx[i]); | |
| 186 | Machine->gfx[i] = allocgfx(&srmp6_layout_8x8); | |
| 187 | if (!Machine->gfx[i]) | |
| 188 | return; | |
| 189 | decodegfx(Machine->gfx[i], memory_region(REGION_GFX1) + (i << 19), 0, Machine->gfx[i]->total_elements); | |
| 190 | Machine->gfx[i]->color_base = 0; | |
| 191 | Machine->gfx[i]->total_colors = 0x800; | |
| 192 | } | |
| 193 | } | |
| 194 | ||
| 195 | VIDEO_UPDATE(srmp6) | |
| 196 | { | |
| 197 | int trans = TRANSPARENCY_PEN; | |
| 198 | UINT16 *sprite_list = sprite_ram_old; | |
| 199 | UINT16 *finish = sprite_list+0x1000; | |
| 200 | ||
| 201 | fillbitmap(bitmap, get_black_pen(machine), cliprect); | |
| 202 | ||
| 203 | // parse sprite list | |
| 204 | while( sprite_list < finish && sprite_list[0] != 0x8000) | |
| 205 | { | |
| 206 | UINT16 *char_list = sprite_ram_old + sprite_list[1] * 0x8; | |
| 207 | short char_count = sprite_list[0]; | |
| 208 | short xpos = sprite_list[2]; | |
| 209 | short ypos = sprite_list[3]; | |
| 210 | int color = sprite_list[4]&0x07; | |
| 211 | ||
| 212 | if((sprite_list[5] & 0x700) == 0x700) | |
| 213 | { | |
| 214 | trans = TRANSPARENCY_ALPHA; | |
| 215 | alpha_set_level((sprite_list[5] & 0x1F) << 3); | |
| 216 | } | |
| 217 | else | |
| 218 | { | |
| 219 | trans = TRANSPARENCY_PEN; | |
| 220 | alpha_set_level(255); | |
| 221 | } | |
| 222 | ||
| 223 | while(char_count > 0) | |
| 224 | { | |
| 225 | int char_code, size_x, size_y, ax, ay; | |
| 226 | int x_offset, y_offset, flipx, flipy; | |
| 227 | ||
| 228 | char_code = char_list[0]; | |
| 229 | size_x = 1 << (char_list[1] & 0x03); | |
| 230 | size_y = 1 << (char_list[1] >> 2 & 0x03); | |
| 231 | flipx = (char_list[1] >> 8) & 1; | |
| 232 | flipy = (char_list[1] >> 9) & 1; | |
| 233 | ||
| 234 | x_offset = char_list[2]; | |
| 235 | y_offset = char_list[3]-size_y*8; | |
| 236 | for(ax=0;ax<size_x;ax++) { | |
| 237 | for(ay=0;ay<size_y;ay++) { | |
| 238 | int bx,by; | |
| 239 | ||
| 240 | if(!flipx) | |
| 241 | bx = xpos + ax*8 + x_offset; | |
| 242 | else | |
| 243 | bx = xpos + (size_x-ax-1)*8 + x_offset; | |
| 244 | if(!flipy) | |
| 245 | by = ypos + ay*8 + y_offset; | |
| 246 | else | |
| 247 | by = ypos + (size_y-ay-1)*8 + y_offset; | |
| 248 | ||
| 249 | drawgfx( | |
| 250 | bitmap, | |
| 251 | Machine->gfx[char_code >> 13], | |
| 252 | char_code & 0x1fff, | |
| 253 | color, | |
| 254 | flipx,flipy, | |
| 255 | bx,by, | |
| 256 | cliprect, | |
| 257 | trans,0 | |
| 258 | ); | |
| 259 | char_code++; | |
| 260 | } | |
| 261 | } | |
| 262 | char_list += 8; | |
| 263 | char_count--; | |
| 264 | } | |
| 265 | sprite_list += 0x8; | |
| 266 | } | |
| 267 | ||
| 268 | memcpy(sprite_ram_old, sprite_ram, 0x7E000); | |
| 269 | return 0; | |
| 270 | } | |
| 271 | ||
| 272 | WRITE16_HANDLER( video_regs_w ) | |
| 273 | { | |
| 274 | switch(offset) | |
| 275 | { | |
| 276 | case 0x5e/2: // bank switch, used by ROM check | |
| 277 | logerror("Bankswitch %02X\n", data&0x0f); | |
| 278 | memory_set_bankptr(1,(UINT16 *)(memory_region(REGION_USER2) + (data & 0x0f)*0x200000)); | |
| 279 | break; | |
| 280 | ||
| 281 | ||
| 282 | // set by IT4 | |
| 283 | case 0x5c/2: // either 0x40 explicitely in many places, or according $2083b0 (IT4) | |
| 284 | //fade in/out (0x40(dark)-0x60(normal)-0x7e?(bright) reset by 0x00? | |
| 285 | data = (!data)?0x60:(data == 0x5e)?0x60:data; | |
| 286 | if(brightness != data) { | |
| 287 | brightness = data; | |
| 288 | update_palette(); | |
| 289 | } | |
| 290 | break; | |
| 291 | /* unknown registers - there are others */ | |
| 292 | ||
| 293 | // set by IT4 (jsr $b3c), according flip screen dsw | |
| 294 | case 0x48/2: // 0 / 0xb0 if flipscreen | |
| 295 | case 0x52/2: // 0 / 0x2ef if flipscreen | |
| 296 | case 0x54/2: // 0x152 / 0x15e if flipscreen | |
| 297 | ||
| 298 | // set by IT4 ($82e-$846) | |
| 299 | case 0x56/2: // written 8,9,8,9 successively | |
| 300 | break; | |
| 301 | case 0x5a/2: | |
| 302 | // graphics decode register write enable/disable flag? | |
| 303 | /* disable by 0x00, enable by 0x01 */ | |
| 304 | /* the game program writes 0x02 to 0x4c000c */ | |
| 305 | /* to disable register write while decoding*/ | |
| 306 | /* currently it's meaningless as we decode frame by frame */ | |
| 307 | video_regs[0x0c/2] = data <<1; | |
| 308 | break; | |
| 309 | default: | |
| 310 | // logerror("video_regs_w (PC=%06X): %04x = %04x & %04x\n", activecpu_get_previouspc(), offset*2, data, mem_mask); | |
| 311 | break; | |
| 312 | } | |
| 313 | COMBINE_DATA(&video_regs[offset]); | |
| 314 | } | |
| 315 | ||
| 316 | READ16_HANDLER( video_regs_r ) | |
| 317 | { | |
| 318 | return video_regs[offset]; | |
| 319 | } | |
| 320 | ||
| 321 | //decode the graphic data | |
| 322 | void decode_gfx( UINT32 table_address, UINT32 data_address, UINT32 gfx_size, UINT32 mem_offset) | |
| 323 | { | |
| 324 | UINT8 *src = memory_region(REGION_USER3) , *dst = memory_region(REGION_GFX1) + mem_offset; | |
| 325 | UINT16 *table = (UINT16 *)(src + table_address); | |
| 326 | UINT8 *data = src + data_address; | |
| 327 | UINT8 *end = dst + gfx_size; | |
| 328 | ||
| 329 | UINT8 loop_count, block_size, block_count, block[0x10]; | |
| 330 | UINT32 pal, prev_pal=~0, table_flag, pal_flag=0; | |
| 331 | ||
| 332 | while(1) | |
| 333 | { | |
| 334 | block_size=0; | |
| 335 | ||
| 336 | table_flag = *(data++) | 0x100; | |
| 337 | while(!(table_flag & 0x10000)) { | |
| 338 | if(table_flag & 0x80) { | |
| 339 | *((UINT16 *)&block[block_size]) = table[*(data++)]; | |
| 340 | block_size+=2; | |
| 341 | } | |
| 342 | else { | |
| 343 | block[block_size++]= *(data++); | |
| 344 | } | |
| 345 | table_flag<<=1; | |
| 346 | } | |
| 347 | ||
| 348 | block_count = 0; | |
| 349 | while(block_count != block_size) { | |
| 350 | pal = block[block_count++]; | |
| 351 | if(pal_flag) { | |
| 352 | loop_count = pal + 1; | |
| 353 | pal = prev_pal; | |
| 354 | while(loop_count) { | |
| 355 | *(dst++) = pal; loop_count--; | |
| 356 | if(dst == end) return; | |
| 357 | } | |
| 358 | pal_flag = 0; | |
| 359 | } | |
| 360 | else { | |
| 361 | *(dst++) = pal; | |
| 362 | if(dst == end) return; | |
| 363 | if(pal == prev_pal) { | |
| 364 | if(block_count < block_size) { | |
| 365 | loop_count = block[block_count++] + 1; | |
| 366 | while(loop_count) { | |
| 367 | *(dst++) = pal; loop_count--; | |
| 368 | if(dst == end) return; | |
| 369 | } | |
| 370 | } | |
| 371 | else | |
| 372 | pal_flag=1; | |
| 373 | } | |
| 374 | prev_pal = pal; | |
| 375 | } | |
| 376 | } | |
| 377 | } | |
| 378 | } | |
| 379 | ||
| 380 | WRITE16_HANDLER( gfx_decode_w ) | |
| 381 | { | |
| 382 | int i; | |
| 383 | int table_address, table_size, data_address, gfx_size, page_index; | |
| 384 | COMBINE_DATA(&dec_regs[offset]); | |
| 385 | ||
| 386 | // check if write protection of graphic decode memory is disabled | |
| 387 | if(offset == 0x0d && video_regs[0x5a/2] == 0x0001) { | |
| 388 | table_size = dec_regs[0] + 1; | |
| 389 | table_address = ((dec_regs[5] << 16) | dec_regs[4]) << 1; | |
| 390 | gfx_size = (((dec_regs[7] & 3) << 16) | (dec_regs[6]+1)) << 2; | |
| 391 | page_index = dec_regs[9] >> 1; | |
| 392 | data_address = ((dec_regs[11] << 16) | dec_regs[10]) << 1; | |
| 393 | ||
| 394 | if(( table_address >= 0xc00000 && table_address < 0x2000000) && | |
| 395 | ( data_address >= 0xc00000 && data_address < 0x2000000) && | |
| 396 | ( table_size > 0x000000 && table_size < 0x81)) | |
| 397 | { | |
| 398 | /* | |
| 399 | logerror("number of word table?@?@?@?@?@?@%08X\n", table_size); | |
| 400 | logerror("word table address?@?@?@%08X\n", table_address); | |
| 401 | logerror("decode data size?@?@?@?@%08X\n", gfx_size); | |
| 402 | logerror("decode page index?@%08X\n", page_index); | |
| 403 | logerror("decode data address?@?@?@%08X\n\n", data_address); | |
| 404 | */ | |
| 405 | decode_gfx( table_address - 0xc00000, data_address - 0xc00000, gfx_size, page_index << 19); | |
| 406 | ||
| 407 | for(i=0; gfx_size >= 0; gfx_size -= 0x80000, i++) | |
| 408 | { | |
| 409 | freegfx(Machine->gfx[page_index+i]); | |
| 410 | Machine->gfx[page_index+i] = allocgfx(&srmp6_layout_8x8); | |
| 411 | if (!Machine->gfx[page_index+i]) | |
| 412 | return; | |
| 413 | decodegfx(Machine->gfx[page_index+i], memory_region(REGION_GFX1) + ((page_index+i) << 19), 0, Machine->gfx[page_index+i]->total_elements); | |
| 414 | Machine->gfx[page_index+i]->color_base = 0; | |
| 415 | Machine->gfx[page_index+i]->total_colors = 0x800; | |
| 416 | } | |
| 417 | } | |
| 418 | } | |
| 419 | } | |
| 420 | ||
| 421 | READ16_HANDLER( srmp6_sprite_r ) | |
| 422 | { | |
| 423 | return sprite_ram[offset]; | |
| 424 | } | |
| 425 | ||
| 426 | WRITE16_HANDLER( srmp6_sprite_w ) | |
| 427 | { | |
| 428 | COMBINE_DATA(&sprite_ram[offset]); | |
| 429 | } | |
| 430 | ||
| 431 | WRITE16_HANDLER(paletteram_w) | |
| 432 | { | |
| 433 | char r, g, b; | |
| 434 | int brg = brightness - 0x60; | |
| 435 | ||
| 436 | paletteram16_xBBBBBGGGGGRRRRR_word_w(offset, data, mem_mask); | |
| 437 | ||
| 438 | if(brg) | |
| 439 | { | |
| 440 | r = data >> 0 & 0x1F; | |
| 441 | g = data >> 5 & 0x1F; | |
| 442 | b = data >> 10 & 0x1F; | |
| 443 | ||
| 444 | if(brg < 0) { | |
| 445 | r += (r * brg) >> 5; | |
| 446 | if(r < 0) r = 0; | |
| 447 | g += (g * brg) >> 5; | |
| 448 | if(g < 0) g = 0; | |
| 449 | b += (b * brg) >> 5; | |
| 450 | if(b < 0) b = 0; | |
| 451 | } | |
| 452 | else if(brg > 0) { | |
| 453 | r += ((0x1F - r) * brg) >> 5; | |
| 454 | if(r > 0x1F) r = 0x1F; | |
| 455 | g += ((0x1F - g) * brg) >> 5; | |
| 456 | if(g > 0x1F) g = 0x1F; | |
| 457 | b += ((0x1F - b) * brg) >> 5; | |
| 458 | if(b > 0x1F) b = 0x1F; | |
| 459 | } | |
| 460 | ||
| 461 | palette_set_color(Machine, offset, MAKE_RGB(r << 3, g << 3, b << 3)); | |
| 462 | } | |
| 463 | } | |
| 464 |
| r1037 | r1038 | |
|---|---|---|
| 11 | 11 | #include "genesis.h" |
| 12 | 12 | |
| 13 | 13 | /* in video/segasyse.c */ |
| 14 | void megatech_start_video_normal(running_machine *machine); | |
| 15 | void megatech_update_video_normal(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect ); | |
| 14 | void megaplay_start_video_normal(running_machine *machine); | |
| 16 | 15 | void megaplay_update_video_normal(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect ); |
| 17 | 16 | |
| 18 | 17 | int genesis_screen_number; |
| r1037 | r1038 | |
| 219 | 218 | } |
| 220 | 219 | |
| 221 | 220 | |
| 222 | VIDEO_START( megatech ) | |
| 223 | { | |
| 224 | start_genesis_vdp(1); | |
| 225 | 221 | |
| 226 | megatech_start_video_normal(machine); | |
| 227 | } | |
| 228 | 222 | |
| 229 | 223 | |
| 230 | VIDEO_START( megaplay ) | |
| 231 | { | |
| 232 | start_genesis_vdp(0); | |
| 233 | 224 | |
| 234 | megatech_start_video_normal(machine); | |
| 235 | } | |
| 236 | ||
| 237 | ||
| 238 | 225 | void start_system18_vdp(void) |
| 239 | 226 | { |
| 240 | 227 | start_genesis_vdp(0); |
| r1037 | r1038 | |
| 290 | 277 | } |
| 291 | 278 | |
| 292 | 279 | |
| 293 | VIDEO_UPDATE( megatech ) | |
| 294 | { | |
| 295 | int y; | |
| 296 | 280 | |
| 297 | if (screen ==1) | |
| 298 | { | |
| 299 | /* generate the final screen */ | |
| 300 | for (y = 0; y <= cliprect->max_y; y++) | |
| 301 | drawline(BITMAP_ADDR16(bitmap, y, 0), y, 0); | |
| 302 | } | |
| 303 | else if (screen==0) | |
| 304 | { | |
| 305 | megatech_update_video_normal(machine, bitmap, cliprect); | |
| 306 | } | |
| 307 | return 0; | |
| 308 | } | |
| 309 | 281 | |
| 310 | 282 | /* megaplay, draws either Genesis or SMS (single screen display) */ |
| 311 | 283 | |
| r1037 | r1038 | |
| 1137 | 1109 | ******************************************************************************/ |
| 1138 | 1110 | |
| 1139 | 1111 | /* draw a non-horizontally-flipped section of a sprite */ |
| 1140 | INLINE void draw8pixs(UINT16 *bmap, int patno, int priority, int colbase, int patline) | |
| 1112 | INLINE void draw8pixs(UINT16 *bmap, int sxpos, int patno, int priority, int colbase, int patline) | |
| 1141 | 1113 | { |
| 1142 | 1114 | UINT32 tile = *(UINT32 *)&VDP_VRAM_BYTE(patno * 32 + 4 * patline); |
| 1143 | 1115 | int col; |
| r1037 | r1038 | |
| 1149 | 1121 | /* non-transparent */ |
| 1150 | 1122 | if ((colbase & 0x30) != 0x30 || !(genesis_vdp_regs[12] & 0x08)) |
| 1151 | 1123 | { |
| 1152 | col = EXTRACT_PIXEL(tile, 0); if (col) bmap[0] = colbase + col; | |
| 1153 | col = EXTRACT_PIXEL(tile, 1); if (col) bmap[1] = colbase + col; | |
| 1154 | col = EXTRACT_PIXEL(tile, 2); if (col) bmap[2] = colbase + col; | |
| 1155 | col = EXTRACT_PIXEL(tile, 3); if (col) bmap[3] = colbase + col; | |
| 1156 | col = EXTRACT_PIXEL(tile, 4); if (col) bmap[4] = colbase + col; | |
| 1157 | col = EXTRACT_PIXEL(tile, 5); if (col) bmap[5] = colbase + col; | |
| 1158 | col = EXTRACT_PIXEL(tile, 6); if (col) bmap[6] = colbase + col; | |
| 1159 | col = EXTRACT_PIXEL(tile, 7); if (col) bmap[7] = colbase + col; | |
| 1124 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 0); if (col) bmap[sxpos] = colbase + col; } sxpos++; | |
| 1125 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 1); if (col) bmap[sxpos] = colbase + col; } sxpos++; | |
| 1126 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 2); if (col) bmap[sxpos] = colbase + col; } sxpos++; | |
| 1127 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 3); if (col) bmap[sxpos] = colbase + col; } sxpos++; | |
| 1128 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 4); if (col) bmap[sxpos] = colbase + col; } sxpos++; | |
| 1129 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 5); if (col) bmap[sxpos] = colbase + col; } sxpos++; | |
| 1130 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 6); if (col) bmap[sxpos] = colbase + col; } sxpos++; | |
| 1131 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 7); if (col) bmap[sxpos] = colbase + col; } sxpos++; | |
| 1160 | 1132 | } |
| 1161 | 1133 | |
| 1162 | 1134 | /* transparent */ |
| 1163 | 1135 | else |
| 1164 | 1136 | { |
| 1165 | col = EXTRACT_PIXEL(tile, 0); | |
| 1166 | if (col) | |
| 1167 | { | |
| 1168 | if (col < 0x0e) bmap[0] = colbase + col; | |
| 1169 | else bmap[0] = transparent_lookup[((col & 1) << 11) | (bmap[0] & 0x7ff)]; | |
| 1170 | } | |
| 1171 | col = EXTRACT_PIXEL(tile, 1); | |
| 1172 | if (col) | |
| 1173 | { | |
| 1174 | if (col < 0x0e) bmap[1] = colbase + col; | |
| 1175 | else bmap[1] = transparent_lookup[((col & 1) << 11) | (bmap[1] & 0x7ff)]; | |
| 1176 | } | |
| 1177 | col = EXTRACT_PIXEL(tile, 2); | |
| 1178 | if (col) | |
| 1179 | { | |
| 1180 | if (col < 0x0e) bmap[2] = colbase + col; | |
| 1181 | else bmap[2] = transparent_lookup[((col & 1) << 11) | (bmap[2] & 0x7ff)]; | |
| 1182 | } | |
| 1183 | col = EXTRACT_PIXEL(tile, 3); | |
| 1184 | if (col) | |
| 1185 | { | |
| 1186 | if (col < 0x0e) bmap[3] = colbase + col; | |
| 1187 | else bmap[3] = transparent_lookup[((col & 1) << 11) | (bmap[3] & 0x7ff)]; | |
| 1188 | } | |
| 1189 | col = EXTRACT_PIXEL(tile, 4); | |
| 1190 | if (col) | |
| 1191 | { | |
| 1192 | if (col < 0x0e) bmap[4] = colbase + col; | |
| 1193 | else bmap[4] = transparent_lookup[((col & 1) << 11) | (bmap[4] & 0x7ff)]; | |
| 1194 | } | |
| 1195 | col = EXTRACT_PIXEL(tile, 5); | |
| 1196 | if (col) | |
| 1197 | { | |
| 1198 | if (col < 0x0e) bmap[5] = colbase + col; | |
| 1199 | else bmap[5] = transparent_lookup[((col & 1) << 11) | (bmap[5] & 0x7ff)]; | |
| 1200 | } | |
| 1201 | col = EXTRACT_PIXEL(tile, 6); | |
| 1202 | if (col) | |
| 1203 | { | |
| 1204 | if (col < 0x0e) bmap[6] = colbase + col; | |
| 1205 | else bmap[6] = transparent_lookup[((col & 1) << 11) | (bmap[6] & 0x7ff)]; | |
| 1206 | } | |
| 1207 | col = EXTRACT_PIXEL(tile, 7); | |
| 1208 | if (col) | |
| 1209 | { | |
| 1210 | if (col < 0x0e) bmap[7] = colbase + col; | |
| 1211 | else bmap[7] = transparent_lookup[((col & 1) << 11) | (bmap[7] & 0x7ff)]; | |
| 1212 | } | |
| 1137 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 0); if (col) { if (col < 0x0e) bmap[sxpos] = colbase + col; else bmap[sxpos] = transparent_lookup[((col & 1) << 11) | (bmap[sxpos] & 0x7ff)]; }} sxpos++; | |
| 1138 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 1); if (col) { if (col < 0x0e) bmap[sxpos] = colbase + col; else bmap[sxpos] = transparent_lookup[((col & 1) << 11) | (bmap[sxpos] & 0x7ff)]; }} sxpos++; | |
| 1139 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 2); if (col) { if (col < 0x0e) bmap[sxpos] = colbase + col; else bmap[sxpos] = transparent_lookup[((col & 1) << 11) | (bmap[sxpos] & 0x7ff)]; }} sxpos++; | |
| 1140 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 3); if (col) { if (col < 0x0e) bmap[sxpos] = colbase + col; else bmap[sxpos] = transparent_lookup[((col & 1) << 11) | (bmap[sxpos] & 0x7ff)]; }} sxpos++; | |
| 1141 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 4); if (col) { if (col < 0x0e) bmap[sxpos] = colbase + col; else bmap[sxpos] = transparent_lookup[((col & 1) << 11) | (bmap[sxpos] & 0x7ff)]; }} sxpos++; | |
| 1142 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 5); if (col) { if (col < 0x0e) bmap[sxpos] = colbase + col; else bmap[sxpos] = transparent_lookup[((col & 1) << 11) | (bmap[sxpos] & 0x7ff)]; }} sxpos++; | |
| 1143 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 6); if (col) { if (col < 0x0e) bmap[sxpos] = colbase + col; else bmap[sxpos] = transparent_lookup[((col & 1) << 11) | (bmap[sxpos] & 0x7ff)]; }} sxpos++; | |
| 1144 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 7); if (col) { if (col < 0x0e) bmap[sxpos] = colbase + col; else bmap[sxpos] = transparent_lookup[((col & 1) << 11) | (bmap[sxpos] & 0x7ff)]; }} sxpos++; | |
| 1213 | 1145 | } |
| 1214 | 1146 | } |
| 1215 | 1147 | |
| 1216 | 1148 | |
| 1217 | 1149 | /* draw a horizontally-flipped section of a sprite */ |
| 1218 | INLINE void draw8pixs_hflip(UINT16 *bmap, int patno, int priority, int colbase, int patline) | |
| 1150 | INLINE void draw8pixs_hflip(UINT16 *bmap, int sxpos, int patno, int priority, int colbase, int patline) | |
| 1219 | 1151 | { |
| 1220 | 1152 | UINT32 tile = *(UINT32 *)&VDP_VRAM_BYTE(patno * 32 + 4 * patline); |
| 1221 | 1153 | int col; |
| r1037 | r1038 | |
| 1227 | 1159 | /* non-transparent */ |
| 1228 | 1160 | if ((colbase & 0x30) != 0x30 || !(genesis_vdp_regs[12] & 0x08)) |
| 1229 | 1161 | { |
| 1230 | col = EXTRACT_PIXEL(tile, 7); if (col) bmap[0] = colbase + col; | |
| 1231 | col = EXTRACT_PIXEL(tile, 6); if (col) bmap[1] = colbase + col; | |
| 1232 | col = EXTRACT_PIXEL(tile, 5); if (col) bmap[2] = colbase + col; | |
| 1233 | col = EXTRACT_PIXEL(tile, 4); if (col) bmap[3] = colbase + col; | |
| 1234 | col = EXTRACT_PIXEL(tile, 3); if (col) bmap[4] = colbase + col; | |
| 1235 | col = EXTRACT_PIXEL(tile, 2); if (col) bmap[5] = colbase + col; | |
| 1236 | col = EXTRACT_PIXEL(tile, 1); if (col) bmap[6] = colbase + col; | |
| 1237 | col = EXTRACT_PIXEL(tile, 0); if (col) bmap[7] = colbase + col; | |
| 1162 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 7); if (col) bmap[sxpos] = colbase + col; } sxpos++; | |
| 1163 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 6); if (col) bmap[sxpos] = colbase + col; } sxpos++; | |
| 1164 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 5); if (col) bmap[sxpos] = colbase + col; } sxpos++; | |
| 1165 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 4); if (col) bmap[sxpos] = colbase + col; } sxpos++; | |
| 1166 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 3); if (col) bmap[sxpos] = colbase + col; } sxpos++; | |
| 1167 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 2); if (col) bmap[sxpos] = colbase + col; } sxpos++; | |
| 1168 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 1); if (col) bmap[sxpos] = colbase + col; } sxpos++; | |
| 1169 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 0); if (col) bmap[sxpos] = colbase + col; } sxpos++; | |
| 1238 | 1170 | } |
| 1239 | 1171 | |
| 1240 | 1172 | /* transparent */ |
| 1241 | 1173 | else |
| 1242 | 1174 | { |
| 1243 | col = EXTRACT_PIXEL(tile, 7); | |
| 1244 | if (col) | |
| 1245 | { | |
| 1246 | if (col < 0x0e) bmap[0] = colbase + col; | |
| 1247 | else bmap[0] = transparent_lookup[((col & 1) << 11) | (bmap[0] & 0x7ff)]; | |
| 1248 | } | |
| 1249 | col = EXTRACT_PIXEL(tile, 6); | |
| 1250 | if (col) | |
| 1251 | { | |
| 1252 | if (col < 0x0e) bmap[1] = colbase + col; | |
| 1253 | else bmap[1] = transparent_lookup[((col & 1) << 11) | (bmap[1] & 0x7ff)]; | |
| 1254 | } | |
| 1255 | col = EXTRACT_PIXEL(tile, 5); | |
| 1256 | if (col) | |
| 1257 | { | |
| 1258 | if (col < 0x0e) bmap[2] = colbase + col; | |
| 1259 | else bmap[2] = transparent_lookup[((col & 1) << 11) | (bmap[2] & 0x7ff)]; | |
| 1260 | } | |
| 1261 | col = EXTRACT_PIXEL(tile, 4); | |
| 1262 | if (col) | |
| 1263 | { | |
| 1264 | if (col < 0x0e) bmap[3] = colbase + col; | |
| 1265 | else bmap[3] = transparent_lookup[((col & 1) << 11) | (bmap[3] & 0x7ff)]; | |
| 1266 | } | |
| 1267 | col = EXTRACT_PIXEL(tile, 3); | |
| 1268 | if (col) | |
| 1269 | { | |
| 1270 | if (col < 0x0e) bmap[4] = colbase + col; | |
| 1271 | else bmap[4] = transparent_lookup[((col & 1) << 11) | (bmap[4] & 0x7ff)]; | |
| 1272 | } | |
| 1273 | col = EXTRACT_PIXEL(tile, 2); | |
| 1274 | if (col) | |
| 1275 | { | |
| 1276 | if (col < 0x0e) bmap[5] = colbase + col; | |
| 1277 | else bmap[5] = transparent_lookup[((col & 1) << 11) | (bmap[5] & 0x7ff)]; | |
| 1278 | } | |
| 1279 | col = EXTRACT_PIXEL(tile, 1); | |
| 1280 | if (col) | |
| 1281 | { | |
| 1282 | if (col < 0x0e) bmap[6] = colbase + col; | |
| 1283 | else bmap[6] = transparent_lookup[((col & 1) << 11) | (bmap[6] & 0x7ff)]; | |
| 1284 | } | |
| 1285 | col = EXTRACT_PIXEL(tile, 0); | |
| 1286 | if (col) | |
| 1287 | { | |
| 1288 | if (col < 0x0e) bmap[7] = colbase + col; | |
| 1289 | else bmap[7] = transparent_lookup[((col & 1) << 11) | (bmap[7] & 0x7ff)]; | |
| 1290 | } | |
| 1175 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 7); if (col) { if (col < 0x0e) bmap[sxpos] = colbase + col; else bmap[sxpos] = transparent_lookup[((col & 1) << 11) | (bmap[sxpos] & 0x7ff)]; }} sxpos++; | |
| 1176 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 6); if (col) { if (col < 0x0e) bmap[sxpos] = colbase + col; else bmap[sxpos] = transparent_lookup[((col & 1) << 11) | (bmap[sxpos] & 0x7ff)]; }} sxpos++; | |
| 1177 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 5); if (col) { if (col < 0x0e) bmap[sxpos] = colbase + col; else bmap[sxpos] = transparent_lookup[((col & 1) << 11) | (bmap[sxpos] & 0x7ff)]; }} sxpos++; | |
| 1178 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 4); if (col) { if (col < 0x0e) bmap[sxpos] = colbase + col; else bmap[sxpos] = transparent_lookup[((col & 1) << 11) | (bmap[sxpos] & 0x7ff)]; }} sxpos++; | |
| 1179 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 3); if (col) { if (col < 0x0e) bmap[sxpos] = colbase + col; else bmap[sxpos] = transparent_lookup[((col & 1) << 11) | (bmap[sxpos] & 0x7ff)]; }} sxpos++; | |
| 1180 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 2); if (col) { if (col < 0x0e) bmap[sxpos] = colbase + col; else bmap[sxpos] = transparent_lookup[((col & 1) << 11) | (bmap[sxpos] & 0x7ff)]; }} sxpos++; | |
| 1181 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 1); if (col) { if (col < 0x0e) bmap[sxpos] = colbase + col; else bmap[sxpos] = transparent_lookup[((col & 1) << 11) | (bmap[sxpos] & 0x7ff)]; }} sxpos++; | |
| 1182 | if (sxpos>=0 && sxpos<BITMAP_WIDTH) { col = EXTRACT_PIXEL(tile, 0); if (col) { if (col < 0x0e) bmap[sxpos] = colbase + col; else bmap[sxpos] = transparent_lookup[((col & 1) << 11) | (bmap[sxpos] & 0x7ff)]; }} sxpos++; | |
| 1291 | 1183 | } |
| 1292 | 1184 | } |
| 1293 | 1185 | |
| r1037 | r1038 | |
| 1320 | 1212 | spriteheight >>= 3; |
| 1321 | 1213 | |
| 1322 | 1214 | /* switch off the flip mode */ |
| 1323 | bmap += spritexpos; | |
| 1324 | 1215 | switch (patflip) |
| 1325 | 1216 | { |
| 1326 | 1217 | case 0x00: /* No Flip */ |
| 1327 | for (x = 0; x < spritewidth; x++ | |
| 1218 | for (x = 0; x < spritewidth; x++ | |
| 1328 | 1219 | { |
| 1329 | 1220 | if (spritexpos >= -7 && spritexpos < BITMAP_WIDTH) |
| 1330 | draw8pixs(bmap, patno, priority, colbase, patline); | |
| 1221 | draw8pixs(bmap, spritexpos, patno, priority, colbase, patline); | |
| 1331 | 1222 | spritexpos += 8; |
| 1332 | 1223 | patno += spriteheight; |
| 1333 | 1224 | } |
| r1037 | r1038 | |
| 1335 | 1226 | |
| 1336 | 1227 | case 0x01: /* Horizontal Flip */ |
| 1337 | 1228 | patno += spriteheight * (spritewidth - 1); |
| 1338 | for (x = 0; x < spritewidth; x++ | |
| 1229 | for (x = 0; x < spritewidth; x++ | |
| 1339 | 1230 | { |
| 1340 | 1231 | if (spritexpos >= -7 && spritexpos < BITMAP_WIDTH) |
| 1341 | draw8pixs_hflip(bmap, patno, priority, colbase, patline); | |
| 1232 | draw8pixs_hflip(bmap, spritexpos, patno, priority, colbase, patline); | |
| 1342 | 1233 | spritexpos += 8; |
| 1343 | 1234 | patno -= spriteheight; |
| 1344 | 1235 | } |
| r1037 | r1038 | |
| 1346 | 1237 | |
| 1347 | 1238 | case 0x02: /* Vertical Flip */ |
| 1348 | 1239 | patline = 8 * spriteheight - patline - 1; |
| 1349 | for (x = 0; x < spritewidth; x++ | |
| 1240 | for (x = 0; x < spritewidth; x++ | |
| 1350 | 1241 | { |
| 1351 | 1242 | if (spritexpos >= -7 && spritexpos < BITMAP_WIDTH) |
| 1352 | draw8pixs(bmap, patno, priority, colbase, patline); | |
| 1243 | draw8pixs(bmap, spritexpos, patno, priority, colbase, patline); | |
| 1353 | 1244 | spritexpos += 8; |
| 1354 | 1245 | patno += spriteheight; |
| 1355 | 1246 | } |
| r1037 | r1038 | |
| 1358 | 1249 | case 0x03: /* Both Flip */ |
| 1359 | 1250 | patno += spriteheight * (spritewidth - 1); |
| 1360 | 1251 | patline = 8 * spriteheight - patline - 1; |
| 1361 | for (x = 0; x < spritewidth; x++ | |
| 1252 | for (x = 0; x < spritewidth; x++ | |
| 1362 | 1253 | { |
| 1363 | 1254 | if (spritexpos >= -7 && spritexpos < BITMAP_WIDTH) |
| 1364 | draw8pixs_hflip(bmap, patno, priority, colbase, patline); | |
| 1255 | draw8pixs_hflip(bmap, spritexpos, patno, priority, colbase, patline); | |
| 1365 | 1256 | spritexpos += 8; |
| 1366 | 1257 | patno -= spriteheight; |
| 1367 | 1258 | } |
| r0 | r1038 | |
|---|---|---|
| 1 | <mamelayout version="2"> | |
| 2 | <element name="lamp" defstate="0"> | |
| 3 | <disk state="1"> | |
| 4 | <color red="1.0" green="0.125" blue="0.125" /> | |
| 5 | </disk> | |
| 6 | </element> | |
| 7 | <view name="LEDs"> | |
| 8 | <screen index="0"> | |
| 9 | <bounds x="0" y="0" width="300" height="400" /> | |
| 10 | </screen> | |
| 11 | <backdrop name="LED01" element="lamp"> | |
| 12 | <bounds x="34" y="36" width="7" height="7" /> | |
| 13 | </backdrop> | |
| 14 | <backdrop name="LED02" element="lamp"> | |
| 15 | <bounds x="15" y="43" width="7" height="7" /> | |
| 16 | </backdrop> | |
| 17 | <backdrop name="LED03" element="lamp"> | |
| 18 | <bounds x="12" y="65" width="7" height="7" /> | |
| 19 | </backdrop> | |
| 20 | <backdrop name="LED04" element="lamp"> | |
| 21 | <bounds x="50" y="73" width="7" height="7" /> | |
| 22 | </backdrop> | |
| 23 | <backdrop name="LED05" element="lamp"> | |
| 24 | <bounds x="103" y="48" width="7" height="7" /> | |
| 25 | </backdrop> | |
| 26 | <backdrop name="LED06" element="lamp"> | |
| 27 | <bounds x="131" y="33" width="7" height="7" /> | |
| 28 | </backdrop> | |
| 29 | <backdrop name="LED07" element="lamp"> | |
| 30 | <bounds x="158" y="47" width="7" height="7" /> | |
| 31 | </backdrop> | |
| 32 | <backdrop name="LED08" element="lamp"> | |
| 33 | <bounds x="222" y="102" width="7" height="7" /> | |
| 34 | </backdrop> | |
| 35 | <backdrop name="LED09" element="lamp"> | |
| 36 | <bounds x="18" y="117" width="7" height="7" /> | |
| 37 | </backdrop> | |
| 38 | <backdrop name="LED10" element="lamp"> | |
| 39 | <bounds x="7" y="140" width="7" height="7" /> | |
| 40 | </backdrop> | |
| 41 | <backdrop name="LED11" element="lamp"> | |
| 42 | <bounds x="21" y="163" width="7" height="7" /> | |
| 43 | </backdrop> | |
| 44 | <backdrop name="LED12" element="lamp"> | |
| 45 | <bounds x="126" y="132" width="7" height="7" /> | |
| 46 | </backdrop> | |
| 47 | <backdrop name="LED13" element="lamp"> | |
| 48 | <bounds x="190" y="133" width="7" height="7" /> | |
| 49 | </backdrop> | |
| 50 | <backdrop name="LED14" element="lamp"> | |
| 51 | <bounds x="8" y="252" width="7" height="7" /> | |
| 52 | </backdrop> | |
| 53 | <backdrop name="LED15" element="lamp"> | |
| 54 | <bounds x="38" y="251" width="7" height="7" /> | |
| 55 | </backdrop> | |
| 56 | <backdrop name="LED16" element="lamp"> | |
| 57 | <bounds x="67" y="229" width="7" height="7" /> | |
| 58 | </backdrop> | |
| 59 | <backdrop name="LED17" element="lamp"> | |
| 60 | <bounds x="125" y="246" width="7" height="7" /> | |
| 61 | </backdrop> | |
| 62 | <backdrop name="LED18" element="lamp"> | |
| 63 | <bounds x="125" y="256" width="7" height="7" /> | |
| 64 | </backdrop> | |
| 65 | <backdrop name="LED19" element="lamp"> | |
| 66 | <bounds x="125" y="265" width="7" height="7" /> | |
| 67 | </backdrop> | |
| 68 | <backdrop name="LED20" element="lamp"> | |
| 69 | <bounds x="125" y="275" width="7" height="7" /> | |
| 70 | </backdrop> | |
| 71 | <backdrop name="LED21" element="lamp"> | |
| 72 | <bounds x="125" y="285" width="7" height="7" /> | |
| 73 | </backdrop> | |
| 74 | <backdrop name="LED22" element="lamp"> | |
| 75 | <bounds x="125" y="295" width="7" height="7" /> | |
| 76 | </backdrop> | |
| 77 | <backdrop name="LED23" element="lamp"> | |
| 78 | <bounds x="125" y="304" width="7" height="7" /> | |
| 79 | </backdrop> | |
| 80 | <backdrop name="LED24" element="lamp"> | |
| 81 | <bounds x="125" y="314" width="7" height="7" /> | |
| 82 | </backdrop> | |
| 83 | <backdrop name="LED25" element="lamp"> | |
| 84 | <bounds x="125" y="324" width="7" height="7" /> | |
| 85 | </backdrop> | |
| 86 | <backdrop name="LED26" element="lamp"> | |
| 87 | <bounds x="125" y="334" width="7" height="7" /> | |
| 88 | </backdrop> | |
| 89 | <backdrop name="LED27" element="lamp"> | |
| 90 | <bounds x="186" y="229" width="7" height="7" /> | |
| 91 | </backdrop> | |
| 92 | <backdrop name="LED28" element="lamp"> | |
| 93 | <bounds x="197" y="288" width="7" height="7" /> | |
| 94 | </backdrop> | |
| 95 | <backdrop name="LED29" element="lamp"> | |
| 96 | <bounds x="141" y="366" width="7" height="7" /> | |
| 97 | </backdrop> | |
| 98 | </view> | |
| 99 | </mamelayout> |
| r1037 | r1038 | |
|---|---|---|
| 1011 | 1011 | |
| 1012 | 1012 | ROM_REGION( 0x0100, REGION_PROMS, 0 ) |
| 1013 | 1013 | ROM_LOAD( "a71-25.41", 0x0000, 0x0100, CRC(2d0f8545) SHA1(089c31e2f614145ef2743164f7b52ae35bc06808) ) /* video timing */ |
| 1014 | ||
| 1015 | /* Located on CPU/Sound Board */ | |
| 1016 | ROM_REGION( 0x0003, REGION_PLDS, ROMREGION_DISPOSE ) | |
| 1017 | ROM_LOAD( "pal16l8.bin", 0x0000, 0x0001, NO_DUMP ) /* Located at IC49 */ | |
| 1018 | ROM_LOAD( "pal16l8.bin", 0x0000, 0x0001, NO_DUMP ) /* Located at IC43 */ | |
| 1019 | ROM_LOAD( "pal16r4.bin", 0x0000, 0x0001, NO_DUMP ) /* Located at IC12 */ | |
| 1014 | 1020 | ROM_END |
| 1015 | 1021 | |
| 1016 | 1022 | /* |
| r1037 | r1038 | |
| 1054 | 1060 | |
| 1055 | 1061 | ROM_REGION( 0x0100, REGION_PROMS, 0 ) |
| 1056 | 1062 | ROM_LOAD( "a71-25.41", 0x0000, 0x0100, CRC(2d0f8545) SHA1(089c31e2f614145ef2743164f7b52ae35bc06808) ) /* video timing */ |
| 1063 | ||
| 1064 | /* Located on CPU/Sound Board */ | |
| 1065 | ROM_REGION( 0x0003, REGION_PLDS, ROMREGION_DISPOSE ) | |
| 1066 | ROM_LOAD( "pal16l8.bin", 0x0000, 0x0001, NO_DUMP ) /* Located at IC49 */ | |
| 1067 | ROM_LOAD( "pal16l8.bin", 0x0000, 0x0001, NO_DUMP ) /* Located at IC43 */ | |
| 1068 | ROM_LOAD( "pal16r4.bin", 0x0000, 0x0001, NO_DUMP ) /* Located at IC12 */ | |
| 1057 | 1069 | ROM_END |
| 1058 | 1070 | |
| 1059 | 1071 | /* |
| r1037 | r1038 | |
| 1097 | 1109 | |
| 1098 | 1110 | ROM_REGION( 0x0100, REGION_PROMS, 0 ) |
| 1099 | 1111 | ROM_LOAD( "a71-25.41", 0x0000, 0x0100, CRC(2d0f8545) SHA1(089c31e2f614145ef2743164f7b52ae35bc06808) ) /* video timing */ |
| 1112 | ||
| 1113 | /* Located on CPU/Sound Board */ | |
| 1114 | ROM_REGION( 0x0003, REGION_PLDS, ROMREGION_DISPOSE ) | |
| 1115 | ROM_LOAD( "pal16l8.bin", 0x0000, 0x0001, NO_DUMP ) /* Located at IC49 */ | |
| 1116 | ROM_LOAD( "pal16l8.bin", 0x0000, 0x0001, NO_DUMP ) /* Located at IC43 */ | |
| 1117 | ROM_LOAD( "pal16r4.bin", 0x0000, 0x0001, NO_DUMP ) /* Located at IC12 */ | |
| 1100 | 1118 | ROM_END |
| 1101 | 1119 | |
| 1102 | 1120 | /* |
| r1037 | r1038 | |
| 1140 | 1158 | |
| 1141 | 1159 | ROM_REGION( 0x0100, REGION_PROMS, 0 ) |
| 1142 | 1160 | ROM_LOAD( "a71-25.41", 0x0000, 0x0100, CRC(2d0f8545) SHA1(089c31e2f614145ef2743164f7b52ae35bc06808) ) /* video timing */ |
| 1161 | ||
| 1162 | /* Located on CPU/Sound Board */ | |
| 1163 | ROM_REGION( 0x0003, REGION_PLDS, ROMREGION_DISPOSE ) | |
| 1164 | ROM_LOAD( "pal16l8.bin", 0x0000, 0x0001, NO_DUMP ) /* Located at IC49 */ | |
| 1165 | ROM_LOAD( "pal16l8.bin", 0x0000, 0x0001, NO_DUMP ) /* Located at IC43 */ | |
| 1166 | ROM_LOAD( "pal16r4.bin", 0x0000, 0x0001, NO_DUMP ) /* Located at IC12 */ | |
| 1143 | 1167 | ROM_END |
| 1144 | 1168 | |
| 1145 | 1169 | ROM_START( boblbobl ) |
| r0 | r1038 | |
|---|---|---|
| 1 | /* | |
| 2 | Taito Laser Grand Prix laserdisc hardware | |
| 3 | Driver by Andrew Gardner with help from Daphne Source | |
| 4 | ||
| 5 | Notes: | |
| 6 | Engrish abounds. | |
| 7 | ||
| 8 | Todo: | |
| 9 | Sound. | |
| 10 | Figure out palette. | |
| 11 | Figure out when NMI fires & hook it up. | |
| 12 | Convert to tilemaps - hook up control_ram properly. | |
| 13 | Plenty of missing writes. | |
| 14 | Figure out inputs: | |
| 15 | High score reset switch. | |
| 16 | Score display + time display + today's ranking (on LED panel). | |
| 17 | 1 wheel + "pulse cam" (analog) | |
| 18 | 1 accelerator pedal = pot (analog) | |
| 19 | 1 break pedal = switch | |
| 20 | 1 shifter (two settings - two switches) | |
| 21 | "VR-1" pot that says it "adjusts the video synchronisation" | |
| 22 | ||
| 23 | Dumping Notes: | |
| 24 | Dumped by italiandoh on January, 27th, 2005. | |
| 25 | ||
| 26 | CPU PCB | J10 00041B, K10 00202B, M4200366B | |
| 27 | 1 x Z80-A CPU | |
| 28 | 1 x 8 MHz xtal | |
| 29 | 2 x 6116 | |
| 30 | 4 x 2114-2 | |
| 31 | 2 x RCA CDP1855CDX 201 | |
| 32 | 3 x 8 dip switches bank | |
| 33 | 1 x 1 kohm trimmer | |
| 34 | ||
| 35 | Chip Label | |
| 36 | 2764 A02_01, A02_02, A02_03, A02_04, A02_41 | |
| 37 | 2732 A02_05 | |
| 38 | 27128 A02_06, A02_07, A02_08, A02_09, A02_10, A02_11, A02_12, A02_13, A02_14, A02_15, A02_16, A02_17 | |
| 39 | 82S129 A02_31, A02_33, A02_34, A02_32 | |
| 40 | ||
| 41 | -------------------------------- | |
| 42 | ||
| 43 | OBJ PCB | J10 00042B, K10 00203B | |
| 44 | 10 x TMS4416-15NL | |
| 45 | 1 x 20 MHz xtal | |
| 46 | ||
| 47 | Chip Label | |
| 48 | 2764 A02_18 | |
| 49 | 27128 A02_19, A02_20, A02_21, A02_22, A02_23, A02_24, A02_25, A02_26, A02_27, A02_28 | |
| 50 | 82S123 A02_37 | |
| 51 | 82S129 A02_35, A02_36, A02_38, A02_39, A02_40 | |
| 52 | ||
| 53 | -------------------------------- | |
| 54 | ||
| 55 | SOUND PCB | J20 00002B, K20 00032B | |
| 56 | 1 x Z80-A CPU | |
| 57 | 1 x 6 MHx xtal | |
| 58 | 2 x 2114-2 | |
| 59 | 3 x GI SOUND AY-3-8910 | |
| 60 | ||
| 61 | Chip Label | |
| 62 | 2764 A02_29, A02_30 | |
| 63 | */ | |
| 64 | ||
| 65 | ||
| 66 | #include "driver.h" | |
| 67 | #include "render.h" | |
| 68 | #include "machine/laserdsc.h" | |
| 69 | ||
| 70 | /* From italiandoh's notes */ | |
| 71 | #define CPU_PCB_CLOCK (8000000) | |
| 72 | #define SOUND_PCB_CLOCK (6000000) | |
| 73 | ||
| 74 | /* Misc variables */ | |
| 75 | static laserdisc_info *discinfo; | |
| 76 | ||
| 77 | static UINT8 *tile_ram; | |
| 78 | static UINT8 *tile_control_ram; | |
| 79 | ||
| 80 | ||
| 81 | /* VIDEO GOODS */ | |
| 82 | VIDEO_UPDATE( lgp ) | |
| 83 | { | |
| 84 | int charx, chary; | |
| 85 | ||
| 86 | /* clear */ | |
| 87 | fillbitmap(bitmap, 0, cliprect); | |
| 88 | ||
| 89 | /* display disc information */ | |
| 90 | if (discinfo != NULL) | |
| 91 | popmessage("%s", laserdisc_describe_state(discinfo)); | |
| 92 | ||
| 93 | /* Draw tiles */ | |
| 94 | for (charx = 0; charx < 32; charx++) | |
| 95 | { | |
| 96 | for (chary = 0; chary < 32; chary++) | |
| 97 | { | |
| 98 | int current_screen_character = (chary*32) + charx; | |
| 99 | ||
| 100 | /* Somewhere there's a flag that offsets the tilemap by 0x100*x */ | |
| 101 | /* Palette is likely set somewhere as well (tile_control_ram?) */ | |
| 102 | drawgfx(bitmap, machine->gfx[0], | |
| 103 | tile_ram[current_screen_character], | |
| 104 | 0, | |
| 105 | 0, 0, charx*8, chary*8, cliprect, TRANSPARENCY_PEN, 0); | |
| 106 | } | |
| 107 | } | |
| 108 | ||
| 109 | return 0; | |
| 110 | } | |
| 111 | ||
| 112 | ||
| 113 | /* MEMORY HANDLERS */ | |
| 114 | /* Main Z80 R/W */ | |
| 115 | READ8_HANDLER(ldp_read) | |
| 116 | { | |
| 117 | return laserdisc_data_r(discinfo); | |
| 118 | } | |
| 119 | ||
| 120 | WRITE8_HANDLER(ldp_write) | |
| 121 | { | |
| 122 | laserdisc_data_w(discinfo,data); | |
| 123 | } | |
| 124 | ||
| 125 | ||
| 126 | /* Sound Z80 R/W */ | |
| 127 | ||
| 128 | ||
| 129 | /* PROGRAM MAPS */ | |
| 130 | static ADDRESS_MAP_START( main_program_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 131 | AM_RANGE(0x0000,0x7fff) AM_ROM | |
| 132 | AM_RANGE(0xe000,0xe3ff) AM_RAM AM_BASE(&tile_ram) | |
| 133 | AM_RANGE(0xe400,0xe7ff) AM_RAM AM_BASE(&tile_control_ram) | |
| 134 | ||
| 135 | // AM_RANGE(0xef00,0xef00) AM_READ_PORT("IN_TEST") | |
| 136 | AM_RANGE(0xef80,0xef80) AM_READWRITE(ldp_read,ldp_write) | |
| 137 | AM_RANGE(0xefb8,0xefb8) AM_READ(ldp_read) /* Likely not right, calms it down though */ | |
| 138 | AM_RANGE(0xefc0,0xefc0) AM_READ_PORT("DSWA") /* Not tested */ | |
| 139 | AM_RANGE(0xefc8,0xefc8) AM_READ_PORT("DSWB") | |
| 140 | AM_RANGE(0xefd0,0xefd0) AM_READ_PORT("DSWC") | |
| 141 | AM_RANGE(0xefd8,0xefd8) AM_READ_PORT("IN0") | |
| 142 | AM_RANGE(0xefe0,0xefe0) AM_READ_PORT("IN1") | |
| 143 | AM_RANGE(0xf000,0xffff) AM_RAM | |
| 144 | ADDRESS_MAP_END | |
| 145 | ||
| 146 | static ADDRESS_MAP_START( sound_program_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 147 | AM_RANGE(0x0000,0x3fff) AM_ROM | |
| 148 | AM_RANGE(0x8000,0x83ff) AM_RAM | |
| 149 | AM_RANGE(0x8400,0x8407) AM_RAM /* Needs handler! Communications? */ | |
| 150 | AM_RANGE(0x8800,0x8803) AM_RAM /* Needs handler! Communications? */ | |
| 151 | ADDRESS_MAP_END | |
| 152 | ||
| 153 | ||
| 154 | /* IO MAPS */ | |
| 155 | static ADDRESS_MAP_START( main_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 156 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) | |
| 157 | // AM_RANGE(0xfd,0xfd) AM_READ_PORT("IN_TEST") | |
| 158 | // AM_RANGE(0xfe,0xfe) AM_READ_PORT("IN_TEST") | |
| 159 | ADDRESS_MAP_END | |
| 160 | ||
| 161 | static ADDRESS_MAP_START( sound_io_map, ADDRESS_SPACE_IO, 8 ) | |
| 162 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) | |
| 163 | ADDRESS_MAP_END | |
| 164 | ||
| 165 | ||
| 166 | /* PORTS */ | |
| 167 | /* (DIPLOCATION diplay inverted) */ | |
| 168 | INPUT_PORTS_START( lgp ) | |
| 169 | PORT_START_TAG("DSWA") | |
| 170 | PORT_DIPNAME( 0x03, 0x03, "1st Round" ) PORT_DIPLOCATION("SWA:2,1") | |
| 171 | PORT_DIPSETTING( 0x03, "68 Seconds" ) | |
| 172 | PORT_DIPSETTING( 0x02, "66 Seconds" ) | |
| 173 | PORT_DIPSETTING( 0x01, "64 Seconds" ) | |
| 174 | PORT_DIPSETTING( 0x00, "62 Seconds" ) | |
| 175 | PORT_DIPNAME( 0x0c, 0x0c, "2nd Round" ) PORT_DIPLOCATION("SWA:4,3") | |
| 176 | PORT_DIPSETTING( 0x0c, "62 Seconds" ) | |
| 177 | PORT_DIPSETTING( 0x08, "60 Seconds" ) | |
| 178 | PORT_DIPSETTING( 0x04, "58 Seconds" ) | |
| 179 | PORT_DIPSETTING( 0x00, "56 Seconds" ) | |
| 180 | PORT_DIPNAME( 0x30, 0x30, "3rd & 4th Rounds" ) PORT_DIPLOCATION("SWA:6,5") | |
| 181 | PORT_DIPSETTING( 0x30, "60 Seconds" ) | |
| 182 | PORT_DIPSETTING( 0x20, "58 Seconds" ) | |
| 183 | PORT_DIPSETTING( 0x10, "56 Seconds" ) | |
| 184 | PORT_DIPSETTING( 0x00, "54 Seconds" ) | |
| 185 | PORT_DIPNAME( 0xc0, 0xc0, "Spark Race" ) PORT_DIPLOCATION("SWA:8,7") | |
| 186 | PORT_DIPSETTING( 0xc0, "44 Seconds" ) | |
| 187 | PORT_DIPSETTING( 0x80, "42 Seconds" ) | |
| 188 | PORT_DIPSETTING( 0x40, "40 Seconds" ) | |
| 189 | PORT_DIPSETTING( 0x00, "38 Seconds" ) | |
| 190 | ||
| 191 | PORT_START_TAG("DSWB") | |
| 192 | PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SWB:4,3,2,1") | |
| 193 | PORT_DIPSETTING( 0x00, DEF_STR( 9C_1C ) ) | |
| 194 | PORT_DIPSETTING( 0x01, DEF_STR( 8C_1C ) ) | |
| 195 | PORT_DIPSETTING( 0x02, DEF_STR( 7C_1C ) ) | |
| 196 | PORT_DIPSETTING( 0x03, DEF_STR( 6C_1C ) ) | |
| 197 | PORT_DIPSETTING( 0x04, DEF_STR( 5C_1C ) ) | |
| 198 | PORT_DIPSETTING( 0x05, DEF_STR( 4C_1C ) ) | |
| 199 | PORT_DIPSETTING( 0x06, DEF_STR( 3C_1C ) ) | |
| 200 | PORT_DIPSETTING( 0x07, DEF_STR( 2C_1C ) ) | |
| 201 | PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) | |
| 202 | PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) | |
| 203 | PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) | |
| 204 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) | |
| 205 | PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) | |
| 206 | PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) | |
| 207 | PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) | |
| 208 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_8C ) ) | |
| 209 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SWB:8,7,6,5") | |
| 210 | PORT_DIPSETTING( 0x00, DEF_STR( 9C_1C ) ) | |
| 211 | PORT_DIPSETTING( 0x10, DEF_STR( 8C_1C ) ) | |
| 212 | PORT_DIPSETTING( 0x20, DEF_STR( 7C_1C ) ) | |
| 213 | PORT_DIPSETTING( 0x30, DEF_STR( 6C_1C ) ) | |
| 214 | PORT_DIPSETTING( 0x40, DEF_STR( 5C_1C ) ) | |
| 215 | PORT_DIPSETTING( 0x50, DEF_STR( 4C_1C ) ) | |
| 216 | PORT_DIPSETTING( 0x60, DEF_STR( 3C_1C ) ) | |
| 217 | PORT_DIPSETTING( 0x70, DEF_STR( 2C_1C ) ) | |
| 218 | PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) | |
| 219 | PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) | |
| 220 | PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) | |
| 221 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) | |
| 222 | PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) | |
| 223 | PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) | |
| 224 | PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) | |
| 225 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_8C ) ) | |
| 226 | ||
| 227 | PORT_START_TAG("DSWC") | |
| 228 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SWC:1") | |
| 229 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 230 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 231 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SWC:2") | |
| 232 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 233 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 234 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SWC:3") | |
| 235 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 236 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) | |
| 237 | PORT_DIPNAME( 0x08, 0x00, "Coinage Display" ) PORT_DIPLOCATION("SWC:4") | |
| 238 | PORT_DIPSETTING( 0x00, "With" ) | |
| 239 | PORT_DIPSETTING( 0x08, "Without" ) | |
| 240 | PORT_DIPNAME( 0x10, 0x00, "Year Display" ) PORT_DIPLOCATION("SWC:5") | |
| 241 | PORT_DIPSETTING( 0x00, "With" ) | |
| 242 | PORT_DIPSETTING( 0x10, "Without" ) | |
| 243 | PORT_DIPNAME( 0x20, 0x00, "Hit Detection" ) PORT_DIPLOCATION("SWC:6") | |
| 244 | PORT_DIPSETTING( 0x00, "Normal Game" ) | |
| 245 | PORT_DIPSETTING( 0x20, "No Hit" ) | |
| 246 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SWC:7") | |
| 247 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 248 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 249 | PORT_DIPNAME( 0x80, 0x00, "Coin Slot" ) PORT_DIPLOCATION("SWC:8") | |
| 250 | PORT_DIPSETTING( 0x00, "1-Way" ) | |
| 251 | PORT_DIPSETTING( 0x80, "2-Ways" ) | |
| 252 | ||
| 253 | ||
| 254 | PORT_START_TAG("IN0") | |
| 255 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE ) /* Manual says service switch simply increases credit count. */ | |
| 256 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_TILT ) | |
| 257 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 258 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 259 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 260 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 261 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 262 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 263 | ||
| 264 | PORT_START_TAG("IN1") | |
| 265 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 266 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) | |
| 267 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 268 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) | |
| 269 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON3 ) | |
| 270 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON4 ) | |
| 271 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON5 ) | |
| 272 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON6 ) | |
| 273 | ||
| 274 | /* | |
| 275 | PORT_START_TAG("IN_TEST") | |
| 276 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 277 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) | |
| 278 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) | |
| 279 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) | |
| 280 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON5 ) | |
| 281 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON6 ) | |
| 282 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON7 ) | |
| 283 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON8 ) | |
| 284 | */ | |
| 285 | INPUT_PORTS_END | |
| 286 | ||
| 287 | static const gfx_layout lgp_gfx_layout = | |
| 288 | { | |
| 289 | 8,8, | |
| 290 | 0x4000/8, | |
| 291 | 4, | |
| 292 | { 0, 0x4000*8, 0x8000*8, 0xc000*8 }, | |
| 293 | { 0,1,2,3,4,5,6,7 }, | |
| 294 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, | |
| 295 | 8*8 | |
| 296 | }; | |
| 297 | ||
| 298 | /* Silly, but it's here to show off the oddball a02_18 */ | |
| 299 | static const gfx_layout lgp_gfx_layout_16x32 = | |
| 300 | { | |
| 301 | 16,32, | |
| 302 | 0x2000/0x200, | |
| 303 | 8, | |
| 304 | { 0,1,2,3,4,5,6,7 }, | |
| 305 | { 0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8,8*8,9*8,10*8,11*8,12*8,13*8,14*8,15*8 }, | |
| 306 | { 0*128, 1*128, 2*128, 3*128, 4*128, 5*128, 6*128, 7*128, | |
| 307 | 8*128, 9*128,10*128,11*128,12*128,13*128,14*128,15*128, | |
| 308 | 16*128,17*128,18*128,19*128,20*128,21*128,22*128,23*128, | |
| 309 | 24*128,25*128,26*128,27*128,28*128,29*128,30*128,31*128}, | |
| 310 | 32*128 | |
| 311 | }; | |
| 312 | ||
| 313 | static const gfx_decode gfxdecodeinfo[] = | |
| 314 | { | |
| 315 | { REGION_GFX1, 0, &lgp_gfx_layout, 0x0, 0x100 }, | |
| 316 | { REGION_GFX4, 0, &lgp_gfx_layout_16x32, 0x0, 0x100}, | |
| 317 | { -1 } | |
| 318 | }; | |
| 319 | ||
| 320 | static MACHINE_START( lgp ) | |
| 321 | { | |
| 322 | discinfo = laserdisc_init(LASERDISC_TYPE_LDV1000, get_disk_handle(0), 0); | |
| 323 | return; | |
| 324 | } | |
| 325 | ||
| 326 | static TIMER_CALLBACK( irq_stop ) | |
| 327 | { | |
| 328 | cpunum_set_input_line(0, 0, CLEAR_LINE); | |
| 329 | } | |
| 330 | ||
| 331 | static INTERRUPT_GEN( vblank_callback_lgp ) | |
| 332 | { | |
| 333 | // NMI | |
| 334 | //cpunum_set_input_line(0, INPUT_LINE_NMI, PULSE_LINE); | |
| 335 | ||
| 336 | // IRQ | |
| 337 | cpunum_set_input_line(0, 0, ASSERT_LINE); | |
| 338 | mame_timer_set(MAME_TIME_IN_USEC(50), 0, irq_stop); | |
| 339 | ||
| 340 | laserdisc_vsync(discinfo); | |
| 341 | } | |
| 342 | ||
| 343 | ||
| 344 | /* DRIVER */ | |
| 345 | static MACHINE_DRIVER_START( lgp ) | |
| 346 | /* main cpu */ | |
| 347 | MDRV_CPU_ADD(Z80, CPU_PCB_CLOCK) | |
| 348 | MDRV_CPU_PROGRAM_MAP(main_program_map,0) | |
| 349 | MDRV_CPU_IO_MAP(main_io_map,0) | |
| 350 | MDRV_CPU_VBLANK_INT(vblank_callback_lgp, 1) | |
| 351 | ||
| 352 | /* sound cpu */ | |
| 353 | MDRV_CPU_ADD(Z80, SOUND_PCB_CLOCK) | |
| 354 | MDRV_CPU_PROGRAM_MAP(sound_program_map,0) | |
| 355 | MDRV_CPU_IO_MAP(sound_io_map,0) | |
| 356 | ||
| 357 | ||
| 358 | MDRV_MACHINE_START(lgp) | |
| 359 | ||
| 360 | /* video */ | |
| 361 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) | |
| 362 | ||
| 363 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) | |
| 364 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 365 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION) | |
| 366 | MDRV_SCREEN_SIZE(32*8, 32*8) | |
| 367 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1) | |
| 368 | ||
| 369 | MDRV_PALETTE_LENGTH(256) | |
| 370 | /* MDRV_PALETTE_INIT(lgp) */ | |
| 371 | ||
| 372 | MDRV_GFXDECODE(gfxdecodeinfo) | |
| 373 | MDRV_VIDEO_UPDATE(lgp) | |
| 374 | ||
| 375 | /* sound */ | |
| 376 | MACHINE_DRIVER_END | |
| 377 | ||
| 378 | ||
| 379 | ROM_START( lgp ) | |
| 380 | /* CPU PCB */ | |
| 381 | /* Main program */ | |
| 382 | ROM_REGION( 0x8000, REGION_CPU1, 0 ) | |
| 383 | ROM_LOAD( "a02_01.63", 0x0000, 0x2000, CRC(088ca6e1) SHA1(b3f0869b0c333d991363ac46a1c53daa3f6c85e9) ) | |
| 384 | ROM_LOAD( "a02_02.62", 0x2000, 0x2000, CRC(8e1be578) SHA1(cfad7cb72c7d13b2b614680bccc6f807521f3bf4) ) | |
| 385 | ROM_LOAD( "a02_03.61", 0x4000, 0x2000, CRC(4978953a) SHA1(eec6596430238ffffb0d173852bdd7f11c60e9b2) ) | |
| 386 | ROM_LOAD( "a02_04.60", 0x6000, 0x2000, CRC(903d0ae2) SHA1(bd04182dd77eb5a4ef28d7127f631689b6695e17) ) | |
| 387 | ||
| 388 | /* Tiles */ | |
| 389 | ROM_REGION( 0x10000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 390 | ROM_LOAD( "a02_14.13", 0x0000, 0x4000, CRC(28996b3c) SHA1(664aa4d2582784bb7c56cfb8883294578fe18dd9) ) | |
| 391 | ROM_LOAD( "a02_15.12", 0x4000, 0x4000, CRC(6b7abbb2) SHA1(890777d99b646147359d09e42692a272e570113c) ) | |
| 392 | ROM_LOAD( "a02_16.11", 0x8000, 0x4000, CRC(aad4fb3c) SHA1(2cd4a331a8e0f010d60b594655361776fa24255f) ) | |
| 393 | ROM_LOAD( "a02_17.10", 0xc000, 0x4000, CRC(db8b9723) SHA1(1319a3f35dffdcf65fe7496cfabaf5787989d0bc) ) | |
| 394 | ||
| 395 | /* ??? */ | |
| 396 | ROM_REGION( 0x10000, REGION_GFX2, 0 ) | |
| 397 | ROM_LOAD( "a02_06.53", 0x0000, 0x4000, CRC(c724f96c) SHA1(6531bd57c87118479700e5f8708060deb6b21d91) ) | |
| 398 | ROM_LOAD( "a02_07.52", 0x4000, 0x4000, CRC(4b81eb3b) SHA1(76f5c0b2b4d450fd633199ac4aba66ed5a8a530b) ) | |
| 399 | ROM_LOAD( "a02_08.51", 0x8000, 0x4000, CRC(deb7e494) SHA1(cc5b2f9c622ec3b599fe6752233d44a820951a98) ) | |
| 400 | ROM_LOAD( "a02_09.50", 0xc000, 0x4000, CRC(6d077a30) SHA1(00888e0f54a5b4d647921caf37f7b3e4a7934a1f) ) | |
| 401 | ||
| 402 | /* ??? */ | |
| 403 | ROM_REGION( 0x10000, REGION_GFX3, 0 ) | |
| 404 | ROM_LOAD( "a02_10.49", 0x0000, 0x4000, CRC(56bbe961) SHA1(97ebaeb3bc3948724e19a7279e13314a3470e5ef) ) | |
| 405 | ROM_LOAD( "a02_11.48", 0x4000, 0x4000, CRC(5d0aebb2) SHA1(4cdfb82fa459c9d168a79b5a643fdde45906872b) ) | |
| 406 | ROM_LOAD( "a02_12.47", 0x8000, 0x4000, CRC(1b7c578c) SHA1(6bf2d6e908176e5ef83649b34df9976a55319176) ) | |
| 407 | ROM_LOAD( "a02_13.46", 0xc000, 0x4000, CRC(d7fccfb1) SHA1(9b8a2813b98eb00c2adc347a902a40e7a462070d) ) | |
| 408 | ||
| 409 | /* Lame lookup table? */ | |
| 410 | ROM_REGION( 0x1000, REGION_USER1, 0 ) | |
| 411 | ROM_LOAD( "a02_05.54", 0x0000, 0x1000, CRC(f5e06a8b) SHA1(d2659bc185ecb66f9ac8e015a60259efd13ba84a) ) | |
| 412 | ||
| 413 | /* Color ROMs? */ | |
| 414 | ROM_REGION( 0x400, REGION_USER2, 0 ) | |
| 415 | ROM_LOAD( "a02_31.106", 0x000, 0x100, CRC(ff586bfd) SHA1(61631bae9ba87f2ced142fb8907b313e5424374f) ) | |
| 416 | ROM_LOAD( "a02_32.111", 0x100, 0x100, CRC(8e00230e) SHA1(5dc1d01c0c3e34cdfcde81227c48a7293115d257) ) | |
| 417 | ROM_LOAD( "a02_33.116", 0x200, 0x100, CRC(507fb884) SHA1(7bae761d69dfb035b71b4650f226df4b3d0df67d) ) | |
| 418 | ROM_LOAD( "a02_34.122", 0x300, 0x100, CRC(fb2e6898) SHA1(a78e45b015edbe91912f8bf915761daf683126a7) ) | |
| 419 | ||
| 420 | /* Nearly-unused ROM */ | |
| 421 | ROM_REGION( 0x2000, REGION_USER3, 0 ) | |
| 422 | ROM_LOAD( "a02_41.59", 0x0000, 0x2000, CRC(2c55a3c0) SHA1(7e25217ed8e65549eb0043a5d2dc83e0ffea1177) ) | |
| 423 | ||
| 424 | ||
| 425 | /* SOUND PCB */ | |
| 426 | /* Sound CPU - on Sound PCB */ | |
| 427 | ROM_REGION( 0x4000, REGION_CPU2, 0 ) | |
| 428 | ROM_LOAD( "a02_29.ic11", 0x0000, 0x2000, CRC(c44026db) SHA1(93a6e8f272ca826c05a7be59e14a1a0c848fbaa0) ) | |
| 429 | ROM_LOAD( "a02_30.ic17", 0x2000, 0x2000, CRC(8c324556) SHA1(9e1f6f00d4023d9cfd414d3cc02af55be49dde2c) ) /* Sound data? */ | |
| 430 | ||
| 431 | ||
| 432 | /* OBJ PCB */ | |
| 433 | /* Zig-Zag bitmaps? */ | |
| 434 | ROM_REGION( 0x2000, REGION_GFX4, ROMREGION_DISPOSE ) | |
| 435 | ROM_LOAD( "a02_18.143", 0x0000, 0x2000, CRC(1b4e1980) SHA1(9dffb6a047427290ad63e3d7df7c5942c2b2dfc1) ) | |
| 436 | ||
| 437 | /* Misc bitmaps? */ | |
| 438 | ROM_REGION( 0x28000, REGION_GFX5, 0 ) | |
| 439 | ROM_LOAD( "a02_19.140", 0x00000, 0x4000, CRC(eedd3167) SHA1(a17976425b2e208485bcb189ef2e69dd709a9957) ) | |
| 440 | ROM_LOAD( "a02_20.139", 0x04000, 0x4000, CRC(5182f87b) SHA1(13d466c18fe5cc5da8e931130ee7defd3a9ebf12) ) | |
| 441 | ROM_LOAD( "a02_21.138", 0x08000, 0x4000, CRC(ca16a6e3) SHA1(a82396ea51fa6a320e501d86a23e1e1ebe8d29d5) ) | |
| 442 | ROM_LOAD( "a02_22.137", 0x0c000, 0x4000, CRC(479b3d95) SHA1(b082d4a5e11040daa1f1a687233776fe95a2c77d) ) | |
| 443 | ROM_LOAD( "a02_23.136", 0x10000, 0x4000, CRC(59ee0aa6) SHA1(cac307ef417d97f13ba3051d886eadf5ea10fb0d) ) | |
| 444 | ROM_LOAD( "a02_24.118", 0x14000, 0x4000, CRC(04564330) SHA1(579a0e964fd4ca83f05bd20534fa6f1a91b9c355) ) | |
| 445 | ROM_LOAD( "a02_25.117", 0x18000, 0x4000, CRC(57c2377a) SHA1(70442b4811fa319cb97fb9d8f35ebc5603cf4942) ) | |
| 446 | ROM_LOAD( "a02_26.116", 0x1c000, 0x4000, CRC(e2dc72fc) SHA1(4168f8df8124d9c83bec0abf72955df76c000ed8) ) | |
| 447 | ROM_LOAD( "a02_27.115", 0x20000, 0x4000, CRC(9a9e6b3f) SHA1(c9a1a24d7a93929379a0c5d4d2f5df1da0136348) ) | |
| 448 | ROM_LOAD( "a02_28.114", 0x24000, 0x4000, CRC(cd69ed20) SHA1(d60782637085491527814889856eb3553950ab55) ) | |
| 449 | ||
| 450 | /* Small ROM dumping ground - color? */ | |
| 451 | ROM_REGION( 0x520, REGION_USER4, 0 ) | |
| 452 | ROM_LOAD( "a02_35.23", 0x00000, 0x100, CRC(7b9d44f1) SHA1(bbd7c35a03ca6de116a01f6dcfa2ecd13a7ddb53) ) | |
| 453 | ROM_LOAD( "a02_36.24", 0x00100, 0x100, CRC(169c4216) SHA1(23921e9ef61a68fdd8afceb3b95bbac48190cf1a) ) | |
| 454 | ROM_LOAD( "a02_37.43", 0x00200, 0x20, CRC(925ba961) SHA1(6715d80f2346374a0e880cf44cadc36e4a5316ed) ) | |
| 455 | ROM_LOAD( "a02_38.44", 0x00220, 0x100, CRC(6f37212a) SHA1(32b891dc9b97637620b2f1f9d9d76509c333cb2d) ) | |
| 456 | ROM_LOAD( "a02_39.109", 0x00320, 0x100, CRC(88363809) SHA1(b22a7bd8ce6b28bf7cfa64c3a08e4cf7f9b4cd20) ) | |
| 457 | ROM_LOAD( "a02_40.110", 0x00420, 0x100, CRC(fdfc7aac) SHA1(2413f7f9ad11c91d2adc0aab37bf70ff5c68ab6f) ) | |
| 458 | ROM_END | |
| 459 | ||
| 460 | ||
| 461 | static DRIVER_INIT( lgp ) | |
| 462 | { | |
| 463 | } | |
| 464 | ||
| 465 | /* YEAR NAME PARENT MACHINE INPUT INIT MONITOR COMPANY FULLNAME FLAGS) */ | |
| 466 | GAME( 1983, lgp, 0, lgp, lgp, lgp, ROT0, "Taito", "Laser Grand Prix", GAME_NOT_WORKING|GAME_NO_SOUND) |
| r1037 | r1038 | |
|---|---|---|
| 208 | 208 | discrete_sound_w(CLIFF_ENABLE_SND_2, (sound>>1)&1); |
| 209 | 209 | } |
| 210 | 210 | |
| 211 | #ifdef UNUSED_FUNCTION | |
| 211 | 212 | static WRITE8_HANDLER( cliff_irqack_w ) |
| 212 | 213 | { |
| 213 | 214 | phillips_code = 0; |
| 214 | 215 | } |
| 216 | #endif | |
| 215 | 217 | |
| 216 | 218 | static WRITE8_HANDLER( cliff_ldwire_w ) |
| 217 | 219 | { |
| r1037 | r1038 | |
|---|---|---|
| 327 | 327 | ADDRESS_MAP_END |
| 328 | 328 | |
| 329 | 329 | |
| 330 | #ifdef UNUSED_FUNCTION | |
| 330 | 331 | static WRITE8_HANDLER( YM2151_w ) |
| 331 | 332 | { |
| 332 | 333 | switch (offset) { |
| r1037 | r1038 | |
| 338 | 339 | break; |
| 339 | 340 | } |
| 340 | 341 | } |
| 342 | #endif | |
| 341 | 343 | |
| 342 | 344 | |
| 343 | 345 | static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| r1037 | r1038 | |
|---|---|---|
| 447 | 447 | } |
| 448 | 448 | } |
| 449 | 449 | |
| 450 | #ifdef UNUSED_FUNCTION | |
| 450 | 451 | static WRITE32_HANDLER(bios_ram_w) |
| 451 | 452 | { |
| 452 | 453 | |
| 453 | 454 | } |
| 455 | #endif | |
| 454 | 456 | |
| 455 | 457 | static UINT8 mediagx_config_reg_r(void) |
| 456 | 458 | { |
| r1037 | r1038 | |
|---|---|---|
| 521 | 521 | |
| 522 | 522 | /////////////////////////////////////////////////////////////////////////// |
| 523 | 523 | |
| 524 | #ifdef UNUSED_FUNCTION | |
| 524 | 525 | static WRITE8_HANDLER( reel12_w ) |
| 525 | 526 | { |
| 526 | 527 | reel12_latch = data; |
| r1037 | r1038 | |
| 533 | 534 | if ( Stepper_optic_state(1) ) optic_pattern |= 0x02; |
| 534 | 535 | else optic_pattern &= ~0x02; |
| 535 | 536 | } |
| 537 | #endif | |
| 536 | 538 | |
| 537 | 539 | /////////////////////////////////////////////////////////////////////////// |
| 538 | 540 | |
| r1037 | r1038 | |
| 792 | 794 | |
| 793 | 795 | /////////////////////////////////////////////////////////////////////////// |
| 794 | 796 | |
| 797 | #ifdef UNUSED_FUNCTION | |
| 795 | 798 | static READ8_HANDLER( vfd_status_r ) |
| 796 | 799 | { |
| 797 | 800 | // b7 = NEC busy |
| r1037 | r1038 | |
| 804 | 807 | |
| 805 | 808 | return result; |
| 806 | 809 | } |
| 810 | #endif | |
| 807 | 811 | |
| 808 | 812 | /////////////////////////////////////////////////////////////////////////// |
| 809 | 813 | |
| r1037 | r1038 | |
| 945 | 949 | |
| 946 | 950 | /////////////////////////////////////////////////////////////////////////// |
| 947 | 951 | |
| 952 | #ifdef UNUSED_FUNCTION | |
| 948 | 953 | static READ8_HANDLER( direct_input_r ) |
| 949 | 954 | { |
| 950 | 955 | return 0; |
| 951 | 956 | } |
| 957 | #endif | |
| 952 | 958 | |
| 953 | 959 | /////////////////////////////////////////////////////////////////////////// |
| 954 | 960 |
| r1037 | r1038 | |
|---|---|---|
| 28 | 28 | P0-136A ; KL (Namco) 1997 Kosodate Quiz My Angel 2 Namco |
| 29 | 29 | P0-142A 1999 Puzzle De Bowling Nihon System / Moss |
| 30 | 30 | P0-142A + extra parts 2000 Penguin Brothers Subsino |
| 31 | B0-003B 2000 Deer Hunting USA Sammy | |
| 32 | B0-003B 2001 Turkey Hunting USA Sammy | |
| 33 | B0-003B? 2001 Wing Shooting Championship Sammy | |
| 34 | B0-003B? 2002 Trophy Hunting - Bear & Moose Sammy | |
| 31 | 35 | ------------------------------------------------------------------------------------------- |
| 32 | 36 | |
| 33 | 37 | TODO: |
| r1037 | r1038 | |
| 64 | 68 | and ignore the individual color codes in the tiles data. Zooming is also |
| 65 | 69 | used briefly in pengbros. |
| 66 | 70 | |
| 71 | deerhunt,wschamp: | |
| 72 | - offset tilemap sprite during demo | |
| 73 | ||
| 74 | trophyh: | |
| 75 | - mame hangs for around 15 seconds every now and then, at scene changes. | |
| 76 | This is probably due to a couple of frames with an odd or corrupt sprites list, | |
| 77 | taking a long time to render. | |
| 78 | ||
| 67 | 79 | ***************************************************************************/ |
| 68 | 80 | |
| 69 | 81 | /*************************************************************************** |
| r1037 | r1038 | |
| 165 | 177 | |
| 166 | 178 | ***************************************************************************/ |
| 167 | 179 | |
| 180 | /*************************************************************************** | |
| 181 | ||
| 182 | Sammy USA Outdoor Shooting Series PCB | |
| 183 | ||
| 184 | Deer Hunting USA (c) 2000 Sammy USA | |
| 185 | Turkey Hunting USA (c) 2001 Sammy USA | |
| 186 | ||
| 187 | Wing Shooting Championship (c) 2001 Sammy USA* | |
| 188 | Trophy Hunting - Bear & Moose (c) 2002 Sammy USA* | |
| 189 | ||
| 190 | * Slightly different PCB then listed below. Two Player input / connection ports | |
| 191 | ||
| 192 | CPU: Toshiba TMP68301AF-16 (100 Pin PQFP) | |
| 193 | Video: NEC DX-101 (240 Pin PQFP) | |
| 194 | NEC DX-102 (52 Pin PQFP x3) | |
| 195 | Sound: X1-010 (Mitsubishi M60016 Gate Array, 80 Pin PQFP) | |
| 196 | EEPROM: 93LC46BX (1K Low-power 64 x 16-bit organization serial EEPROM) | |
| 197 | OSC: 50MHz & 28MHz | |
| 198 | Other: 8 Position Dipswitch x 2 | |
| 199 | Lattice ispLSI2032 | |
| 200 | Lattice isp1016E | |
| 201 | ||
| 202 | PCB Number: B0-003B | |
| 203 | +-----------------------------------------------------------+ | |
| 204 | | VOL +------+ | | |
| 205 | | |X1-010| M1 | | |
| 206 | | +---+ +---+ |M60016| | | |
| 207 | | | | | | M M |CALRUA| +---+ | | |
| 208 | +-+ | U | | U | 2 1 +------+ | | | | |
| 209 | | | 0 | | 0 | | | | | |
| 210 | +-+ | 7 | | 6 | M M | U | | | |
| 211 | | | | | | 2 1 | 1 | | | |
| 212 | | +---+ +---+ | 8 | | | |
| 213 | | Lattice | | | | |
| 214 | | D +---+ C ispLSI2032 | | | | |
| 215 | | S |DX | N BAT1 +-------+ +---+ | | |
| 216 | | W |102| 5 |Toshiba| D | | |
| 217 | | 1 +---+ | TMP | S EEPROM C | | |
| 218 | | C | 68301 | W N | | |
| 219 | | N Lattice +-------+ 2 2 | | |
| 220 | | 6 isp1016E | | |
| 221 | | +----------+ 50MHz | | |
| 222 | | +---+ | | | | |
| 223 | | |DX | SW1 | NEC | M M | | |
| 224 | | |102| | DX-101 | 3 3 | | |
| 225 | | +---+ M M | | | | |
| 226 | | 1 1 | | | | |
| 227 | | +----------+ | | |
| 228 | | | | |
| 229 | | +---+ +---++---++---+ | | |
| 230 | | | | | || || | | | |
| 231 | | +---+ 28MHz | | | || || | | | |
| 232 | +-+ |DX | | U | | U || U || U | | | |
| 233 | | |102| | 4 | | 4 || 3 || 3 | | | |
| 234 | +-+ +---+ | 0 | | 1 || 8 || 9 | | | |
| 235 | | | | | || || | | | |
| 236 | | | | | || || | | | |
| 237 | | +---+ +---++---++---+ | | |
| 238 | +-----------------------------------------------------------+ | |
| 239 | ||
| 240 | Ram M1 are Toshiba TC55257DFL-70L | |
| 241 | Ram M2 are NEC D43001GU-70L | |
| 242 | Ram M3 are ISSI IS62C1024L-70Q | |
| 243 | ||
| 244 | U06 Program rom ST27C801 (even) | |
| 245 | U07 Program rom ST27C801 (odd) | |
| 246 | ||
| 247 | U18 Mask rom (Samples 23C32000 32Mbit (read as 27C322)) | |
| 248 | ||
| 249 | U38 - U40 Mask roms (Graphics 23c64020 64Mbit) - 23C64020 read as 27C322 with pin11 +5v & 27C322 with pin11 GND | |
| 250 | ||
| 251 | ***************************************************************************/ | |
| 252 | ||
| 168 | 253 | #include "driver.h" |
| 169 | 254 | #include "machine/tmp68301.h" |
| 170 | 255 | #include "machine/eeprom.h" |
| r1037 | r1038 | |
| 522 | 607 | ADDRESS_MAP_END |
| 523 | 608 | |
| 524 | 609 | |
| 610 | /*************************************************************************** | |
| 611 | Sammy Outdoor Shooting | |
| 612 | ***************************************************************************/ | |
| 525 | 613 | |
| 614 | static READ16_HANDLER( samshoot_lightgun1_r ) | |
| 615 | { | |
| 616 | // popmessage("%02x %02x",readinputport(3),readinputport(2)); | |
| 617 | return (readinputport(2) << 8) | readinputport(3); | |
| 618 | } | |
| 619 | static READ16_HANDLER( samshoot_lightgun2_r ) | |
| 620 | { | |
| 621 | return (readinputport(4) << 8) | readinputport(5); | |
| 622 | } | |
| 623 | ||
| 624 | static WRITE16_HANDLER( samshoot_coin_w ) | |
| 625 | { | |
| 626 | if (ACCESSING_LSB) | |
| 627 | { | |
| 628 | coin_counter_w(0, data & 0x10); | |
| 629 | coin_counter_w(1, data & 0x20); | |
| 630 | // Are these connected? They are set in I/O test | |
| 631 | coin_lockout_w(0,~data & 0x40); | |
| 632 | coin_lockout_w(1,~data & 0x80); | |
| 633 | } | |
| 634 | // popmessage("%04x",data); | |
| 635 | } | |
| 636 | ||
| 637 | static ADDRESS_MAP_START( samshoot_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 638 | AM_RANGE( 0x000000, 0x1fffff ) AM_ROM | |
| 639 | AM_RANGE( 0x200000, 0x20ffff ) AM_RAM | |
| 640 | AM_RANGE( 0x300000, 0x30ffff ) AM_RAM AM_BASE(&generic_nvram16) AM_SIZE(&generic_nvram_size) | |
| 641 | ||
| 642 | AM_RANGE( 0x400000, 0x400001 ) AM_READ( input_port_0_word_r ) // DSW 1 | |
| 643 | AM_RANGE( 0x400002, 0x400003 ) AM_READ( input_port_9_word_r ) // Buttons | |
| 644 | ||
| 645 | AM_RANGE( 0x400300, 0x40030f ) AM_WRITE( seta2_sound_bank_w ) // Samples Banks | |
| 646 | ||
| 647 | AM_RANGE( 0x500000, 0x500001 ) AM_READ( samshoot_lightgun1_r ) // P1 | |
| 648 | AM_RANGE( 0x580000, 0x580001 ) AM_READ( samshoot_lightgun2_r ) // P2 | |
| 649 | ||
| 650 | AM_RANGE( 0x700000, 0x700001 ) AM_READ( input_port_6_word_r ) // Trigger | |
| 651 | AM_RANGE( 0x700002, 0x700003 ) AM_READ( input_port_7_word_r ) // Pump | |
| 652 | AM_RANGE( 0x700004, 0x700005 ) AM_READWRITE( input_port_8_word_r, samshoot_coin_w ) // Coins | |
| 653 | AM_RANGE( 0x700006, 0x700007 ) AM_READ( watchdog_reset16_r ) // Watchdog? | |
| 654 | ||
| 655 | AM_RANGE( 0x800000, 0x83ffff ) AM_RAM AM_BASE(&spriteram16) AM_SIZE(&spriteram_size) // Sprites | |
| 656 | AM_RANGE( 0x840000, 0x84ffff ) AM_READWRITE(MRA16_RAM, paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16) // Palette | |
| 657 | AM_RANGE( 0x860000, 0x86003f ) AM_WRITE(seta2_vregs_w) AM_BASE(&seta2_vregs) // Video Registers | |
| 658 | ||
| 659 | AM_RANGE( 0x900000, 0x903fff ) AM_READWRITE( seta_sound_word_r, seta_sound_word_w ) // Sound | |
| 660 | ||
| 661 | AM_RANGE( 0xfffd0a, 0xfffd0b ) AM_READ( input_port_1_word_r ) // parallel data register (DSW 2) | |
| 662 | AM_RANGE( 0xfffc00, 0xffffff ) AM_READWRITE( MRA16_RAM, tmp68301_regs_w) AM_BASE(&tmp68301_regs ) // TMP68301 Registers | |
| 663 | ADDRESS_MAP_END | |
| 664 | ||
| 665 | ||
| 666 | ||
| 526 | 667 | /*************************************************************************** |
| 527 | 668 | |
| 528 | 669 | Input Ports |
| r1037 | r1038 | |
| 1259 | 1400 | |
| 1260 | 1401 | |
| 1261 | 1402 | /*************************************************************************** |
| 1403 | Sammy Outdoor Shooting | |
| 1404 | ***************************************************************************/ | |
| 1262 | 1405 | |
| 1406 | INPUT_PORTS_START( deerhunt ) | |
| 1407 | PORT_START_TAG("DSW1") // IN0 - $400000.w | |
| 1408 | PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3") | |
| 1409 | PORT_DIPSETTING( 0x0005, DEF_STR( 4C_1C ) ) | |
| 1410 | PORT_DIPSETTING( 0x0006, DEF_STR( 2C_1C ) ) | |
| 1411 | PORT_DIPSETTING( 0x0007, DEF_STR( 1C_1C ) ) | |
| 1412 | PORT_DIPSETTING( 0x0004, DEF_STR( 1C_2C ) ) | |
| 1413 | PORT_DIPSETTING( 0x0003, DEF_STR( 1C_3C ) ) | |
| 1414 | PORT_DIPSETTING( 0x0002, DEF_STR( 1C_4C ) ) | |
| 1415 | PORT_DIPSETTING( 0x0001, DEF_STR( 1C_5C ) ) | |
| 1416 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) | |
| 1417 | PORT_DIPNAME( 0x0038, 0x0038, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:4,5,6") | |
| 1418 | PORT_DIPSETTING( 0x0028, DEF_STR( 4C_1C ) ) | |
| 1419 | PORT_DIPSETTING( 0x0030, DEF_STR( 2C_1C ) ) | |
| 1420 | PORT_DIPSETTING( 0x0038, DEF_STR( 1C_1C ) ) | |
| 1421 | PORT_DIPSETTING( 0x0020, DEF_STR( 1C_2C ) ) | |
| 1422 | PORT_DIPSETTING( 0x0018, DEF_STR( 1C_3C ) ) | |
| 1423 | PORT_DIPSETTING( 0x0010, DEF_STR( 1C_4C ) ) | |
| 1424 | PORT_DIPSETTING( 0x0008, DEF_STR( 1C_5C ) ) | |
| 1425 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) | |
| 1426 | PORT_DIPNAME( 0x0040, 0x0040, "Discount To Continue" ) PORT_DIPLOCATION("SW1:7") | |
| 1427 | PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) | |
| 1428 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 1429 | PORT_SERVICE_DIPLOC( 0x0080, IP_ACTIVE_LOW, "SW1:8" ) | |
| 1430 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1263 | 1431 | |
| 1432 | PORT_START_TAG("DSW2") // IN1 - fffd0a.w | |
| 1433 | PORT_DIPNAME( 0x0001, 0x0001, "Vert. Flip Screen" ) PORT_DIPLOCATION("SW2:1") | |
| 1434 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) | |
| 1435 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 1436 | PORT_DIPNAME( 0x0002, 0x0002, "Horiz. Flip Screen" ) PORT_DIPLOCATION("SW2:2") | |
| 1437 | PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) | |
| 1438 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 1439 | PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:3") | |
| 1440 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) | |
| 1441 | PORT_DIPSETTING( 0x0004, DEF_STR( On ) ) | |
| 1442 | PORT_DIPNAME( 0x0018, 0x0018, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:4,5") | |
| 1443 | PORT_DIPSETTING( 0x0010, DEF_STR( Easy ) ) | |
| 1444 | PORT_DIPSETTING( 0x0018, DEF_STR( Normal ) ) | |
| 1445 | PORT_DIPSETTING( 0x0008, DEF_STR( Hard ) ) | |
| 1446 | PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) ) | |
| 1447 | PORT_DIPNAME( 0x0020, 0x0020, "Blood Color" ) PORT_DIPLOCATION("SW2:6") | |
| 1448 | PORT_DIPSETTING( 0x0020, "Red" ) | |
| 1449 | PORT_DIPSETTING( 0x0000, "Yellow" ) | |
| 1450 | PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:7") | |
| 1451 | PORT_DIPSETTING( 0x0040, "3" ) | |
| 1452 | PORT_DIPSETTING( 0x0000, "4" ) | |
| 1453 | PORT_DIPNAME( 0x0080, 0x0080, "Gun Type" ) PORT_DIPLOCATION("SW2:8") | |
| 1454 | PORT_DIPSETTING( 0x0080, "Pump Action" ) | |
| 1455 | PORT_DIPSETTING( 0x0000, "Hand Gun" ) | |
| 1456 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1457 | ||
| 1458 | PORT_START_TAG("GUN1Y") // IN2 - $500000.b | |
| 1459 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1, 0, 0) PORT_MINMAX(0x08,0xf8) PORT_SENSITIVITY(35) PORT_KEYDELTA(10) PORT_PLAYER(1) | |
| 1460 | ||
| 1461 | PORT_START_TAG("GUN1X") // IN3 - $500001.b | |
| 1462 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1, 0, 0) PORT_MINMAX(0x25,0xc5) PORT_SENSITIVITY(35) PORT_KEYDELTA(10) PORT_PLAYER(1) | |
| 1463 | ||
| 1464 | PORT_START_TAG("GUN2Y") // IN4 - $580000.b | |
| 1465 | PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNKNOWN ) // P2 gun, read but not used | |
| 1466 | ||
| 1467 | PORT_START_TAG("GUN2X") // IN5 - $580001.b | |
| 1468 | PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNKNOWN ) // P2 gun, read but not used | |
| 1469 | ||
| 1470 | PORT_START_TAG("TRIGGER") // IN6 - $700000 | |
| 1471 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SPECIAL ) // trigger | |
| 1472 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1473 | PORT_BIT( 0xff3f, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1474 | ||
| 1475 | PORT_START_TAG("PUMP") // IN7 - $700003.b | |
| 1476 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SPECIAL ) // pump | |
| 1477 | PORT_BIT( 0xffbf, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1478 | ||
| 1479 | PORT_START_TAG("COIN") // IN8 - $700005.b | |
| 1480 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 1481 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 1482 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1483 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SERVICE2 ) | |
| 1484 | PORT_BIT( 0xfff0, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1485 | ||
| 1486 | PORT_START_TAG("BUTTONS") // IN9 - $400002 | |
| 1487 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 ) // trigger | |
| 1488 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 ) // pump | |
| 1489 | PORT_BIT( 0xfffc, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1490 | INPUT_PORTS_END | |
| 1491 | ||
| 1492 | ||
| 1493 | INPUT_PORTS_START( turkhunt ) | |
| 1494 | PORT_INCLUDE(deerhunt) | |
| 1495 | ||
| 1496 | PORT_MODIFY("DSW2") // IN1 - fffd0a.w | |
| 1497 | PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:7") | |
| 1498 | PORT_DIPSETTING( 0x0040, "2" ) | |
| 1499 | PORT_DIPSETTING( 0x0000, "3" ) | |
| 1500 | INPUT_PORTS_END | |
| 1501 | ||
| 1502 | ||
| 1503 | INPUT_PORTS_START( wschamp ) | |
| 1504 | PORT_INCLUDE(deerhunt) | |
| 1505 | ||
| 1506 | PORT_MODIFY("DSW1") // IN0 - $400000.w | |
| 1507 | PORT_DIPNAME( 0x000f, 0x000f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3,4") | |
| 1508 | PORT_DIPSETTING( 0x0009, "4 Coins Start, 4 Coins Continue" ) | |
| 1509 | PORT_DIPSETTING( 0x0008, "4 Coins Start, 3 Coins Continue" ) | |
| 1510 | PORT_DIPSETTING( 0x0007, "4 Coins Start, 2 Coins Continue" ) | |
| 1511 | PORT_DIPSETTING( 0x0006, "4 Coins Start, 1 Coin Continue" ) | |
| 1512 | PORT_DIPSETTING( 0x000c, "3 Coins Start, 3 Coins Continue" ) | |
| 1513 | PORT_DIPSETTING( 0x000b, "3 Coins Start, 2 Coins Continue" ) | |
| 1514 | PORT_DIPSETTING( 0x000a, "3 Coins Start, 1 Coin Continue" ) | |
| 1515 | PORT_DIPSETTING( 0x000e, "2 Coins Start, 2 Coins Continue" ) | |
| 1516 | PORT_DIPSETTING( 0x000d, "2 Coins Start, 1 Coin Continue" ) | |
| 1517 | PORT_DIPSETTING( 0x000f, "1 Coin Start, 1 Coin Continue" ) | |
| 1518 | PORT_DIPSETTING( 0x0005, "1 Coin 2 Credits, 1 Credit Start & Continue" ) | |
| 1519 | PORT_DIPSETTING( 0x0004, "1 Coin 3 Credits, 1 Credit Start & Continue" ) | |
| 1520 | PORT_DIPSETTING( 0x0003, "1 Coin 4 Credits, 1 Credit Start & Continue" ) | |
| 1521 | PORT_DIPSETTING( 0x0002, "1 Coin 5 Credits, 1 Credit Start & Continue" ) | |
| 1522 | PORT_DIPSETTING( 0x0001, "1 Coin 6 Credits, 1 Credit Start & Continue" ) | |
| 1523 | PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) ) | |
| 1524 | PORT_DIPUNUSED_DIPLOC( 0x0010, 0x0010, "SW1:5" ) | |
| 1525 | PORT_DIPUNUSED_DIPLOC( 0x0020, 0x0020, "SW1:6" ) | |
| 1526 | PORT_DIPUNUSED_DIPLOC( 0x0040, 0x0040, "SW1:7" ) | |
| 1527 | PORT_SERVICE_DIPLOC( 0x0080, IP_ACTIVE_LOW, "SW1:8" ) | |
| 1528 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1529 | ||
| 1530 | PORT_MODIFY("DSW2") // IN1 - fffd0a.w | |
| 1531 | PORT_DIPUNUSED_DIPLOC( 0x0020, 0x0020, "SW2:6" ) | |
| 1532 | PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:7") | |
| 1533 | PORT_DIPSETTING( 0x0040, "2" ) | |
| 1534 | PORT_DIPSETTING( 0x0000, "3" ) | |
| 1535 | ||
| 1536 | PORT_MODIFY("GUN2Y") // IN4 - $580000.b | |
| 1537 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1, 0, 0) PORT_MINMAX(0x08,0xf8) PORT_SENSITIVITY(35) PORT_KEYDELTA(10) PORT_PLAYER(2) | |
| 1538 | ||
| 1539 | PORT_MODIFY("GUN2X") // IN5 - $580001.b | |
| 1540 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1, 0, 0) PORT_MINMAX(0x25,0xc5) PORT_SENSITIVITY(35) PORT_KEYDELTA(10) PORT_PLAYER(2) | |
| 1541 | ||
| 1542 | PORT_MODIFY("TRIGGER") // IN6 - $700000 | |
| 1543 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SPECIAL ) // trigger P2 | |
| 1544 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SPECIAL ) // trigger P1 | |
| 1545 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1546 | PORT_BIT( 0xff1f, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1547 | ||
| 1548 | PORT_MODIFY("PUMP") // IN7 - $700003.b | |
| 1549 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SPECIAL ) // pump P2 | |
| 1550 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SPECIAL ) // pump P1 | |
| 1551 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) | |
| 1552 | PORT_BIT( 0xff1f, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1553 | ||
| 1554 | PORT_MODIFY("COIN") // IN8 - $700005.b | |
| 1555 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 1556 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 1557 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1558 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SERVICE2 ) | |
| 1559 | PORT_BIT( 0xfff0, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1560 | ||
| 1561 | PORT_MODIFY("BUTTONS") // IN9 - $400002 | |
| 1562 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 ) // trigger P1 | |
| 1563 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 ) // pump P1 | |
| 1564 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) // trigger P2 | |
| 1565 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) // pump P2 | |
| 1566 | PORT_BIT( 0xffcc, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1567 | INPUT_PORTS_END | |
| 1568 | ||
| 1569 | INPUT_PORTS_START( trophyh ) | |
| 1570 | PORT_INCLUDE(wschamp) | |
| 1571 | ||
| 1572 | PORT_MODIFY("DSW2") // IN1 - fffd0a.w | |
| 1573 | PORT_DIPNAME( 0x0020, 0x0020, "Blood Color" ) PORT_DIPLOCATION("SW2:6") /* WSChamp doesn't use Blood Color, so add it back in */ | |
| 1574 | PORT_DIPSETTING( 0x0020, "Red" ) | |
| 1575 | PORT_DIPSETTING( 0x0000, "Yellow" ) | |
| 1576 | INPUT_PORTS_END | |
| 1577 | ||
| 1578 | ||
| 1579 | /*************************************************************************** | |
| 1580 | ||
| 1581 | ||
| 1264 | 1582 | Graphics Layouts |
| 1265 | 1583 | |
| 1266 | 1584 | |
| r1037 | r1038 | |
| 1372 | 1690 | } |
| 1373 | 1691 | } |
| 1374 | 1692 | |
| 1693 | static INTERRUPT_GEN( samshoot_interrupt ) | |
| 1694 | { | |
| 1695 | switch ( cpu_getiloops() ) | |
| 1696 | { | |
| 1697 | case 0: | |
| 1698 | tmp68301_external_interrupt_0(); // vblank | |
| 1699 | break; | |
| 1700 | case 1: | |
| 1701 | tmp68301_external_interrupt_2(); // to do: hook up x1-10 interrupts | |
| 1702 | break; | |
| 1703 | } | |
| 1704 | } | |
| 1705 | ||
| 1375 | 1706 | static struct x1_010_interface x1_010_sound_intf = |
| 1376 | 1707 | { |
| 1377 | 1708 | 0x0000, /* address */ |
| r1037 | r1038 | |
| 1487 | 1818 | MDRV_SCREEN_VISIBLE_AREA(0, 0x140-1, 0x80, 0x160-1) |
| 1488 | 1819 | MACHINE_DRIVER_END |
| 1489 | 1820 | |
| 1821 | static MACHINE_DRIVER_START( samshoot ) | |
| 1490 | 1822 | |
| 1823 | /* basic machine hardware */ | |
| 1824 | MDRV_IMPORT_FROM(mj4simai) | |
| 1825 | MDRV_CPU_MODIFY("main") | |
| 1826 | MDRV_CPU_PROGRAM_MAP(samshoot_map,0) | |
| 1827 | MDRV_CPU_VBLANK_INT(samshoot_interrupt,2) | |
| 1828 | ||
| 1829 | MDRV_NVRAM_HANDLER(generic_0fill) | |
| 1830 | ||
| 1831 | /* video hardware */ | |
| 1832 | MDRV_SCREEN_VISIBLE_AREA(0x40, 0x180-1, 0x40, 0x130-1) | |
| 1833 | MACHINE_DRIVER_END | |
| 1834 | ||
| 1835 | ||
| 1491 | 1836 | /*************************************************************************** |
| 1492 | 1837 | |
| 1493 | 1838 | ROMs Loading |
| r1037 | r1038 | |
| 1645 | 1990 | ROM_LOAD( "u18.bin", 0x100000, 0x200000, CRC(de4e65e2) SHA1(82d4e590c714b3e9bf0ffaf1500deb24fd315595) ) |
| 1646 | 1991 | ROM_END |
| 1647 | 1992 | |
| 1648 | GAME( 1994, gundamex, 0, gundamex, gundamex, 0, ROT0, "Banpresto", "Mobile Suit Gundam EX Revue", 0 ) | |
| 1649 | GAME( 1995, grdians, 0, grdians, grdians, 0, ROT0, "Banpresto", "Guardians / Denjin Makai II", GAME_NO_COCKTAIL | GAME_IMPERFECT_GRAPHICS ) // Displays (c) Winky Soft at game's end. | |
| 1650 | GAME( 1996, mj4simai, 0, mj4simai, mj4simai, 0, ROT0, "Maboroshi Ware", "Wakakusamonogatari Mahjong Yonshimai (Japan)", GAME_NO_COCKTAIL ) | |
| 1651 | GAME( 1996, myangel, 0, myangel, myangel, 0, ROT0, "Namco", "Kosodate Quiz My Angel (Japan)", GAME_NO_COCKTAIL | GAME_IMPERFECT_GRAPHICS ) | |
| 1652 | GAME( 1997, myangel2, 0, myangel2, myangel2, 0, ROT0, "Namco", "Kosodate Quiz My Angel 2 (Japan)", GAME_NO_COCKTAIL | GAME_IMPERFECT_GRAPHICS ) | |
| 1653 | GAME( 1999, pzlbowl, 0, pzlbowl, pzlbowl, 0, ROT0, "Nihon System / Moss", "Puzzle De Bowling (Japan)", GAME_NO_COCKTAIL ) | |
| 1654 | GAME( 2000, penbros, 0, penbros, penbros, 0, ROT0, "Subsino", "Penguin Brothers (Japan)", GAME_NO_COCKTAIL ) | |
| 1993 | ROM_START( deerhunt ) /* Deer Hunting USA V4.3 (11/1/2000) */ | |
| 1994 | ROM_REGION( 0x200000, REGION_CPU1, 0 ) /* TMP68301 Code */ | |
| 1995 | ROM_LOAD16_BYTE( "as0906e01-v4_3.u06", 0x000000, 0x100000, CRC(20c81f17) SHA1(d41d93d6ee88738cec55f7bf3ce6be1dbec68e09) ) | |
| 1996 | ROM_LOAD16_BYTE( "as0907e01-v4_3.u07", 0x000001, 0x100000, CRC(1731aa2a) SHA1(cffae7a99a7f960a62ef0c4454884df17a93c1a6) ) | |
| 1655 | 1997 | |
| 1998 | ROM_REGION( 0x2000000, REGION_GFX1, ROMREGION_DISPOSE ) /* Sprites */ | |
| 1999 | ROM_LOAD( "as0901m01.u38", 0x0000000, 0x800000, CRC(1d6acf8f) SHA1(6f61fe21bebb7c87e8e6c3ef3ba73b8cf327dde9) ) | |
| 2000 | ROM_LOAD( "as0902m01.u39", 0x0800000, 0x800000, CRC(c7ca2128) SHA1(86be3a3ec2f86f61acfa3d4d261faea3c27dc378) ) | |
| 2001 | ROM_LOAD( "as0903m01.u40", 0x1000000, 0x800000, CRC(e8ef81b3) SHA1(97666942ca6cca5b8ea6451314a2aaabad9e06ba) ) | |
| 2002 | ROM_LOAD( "as0904m01.u41", 0x1800000, 0x800000, CRC(d0f97fdc) SHA1(776c9d42d03a9f61155521212305e1ed696eaf47) ) | |
| 2003 | ||
| 2004 | ROM_REGION( 0x500000, REGION_SOUND1, 0 ) /* Samples */ | |
| 2005 | /* Leave 1MB empty (addressable by the chip) */ | |
| 2006 | ROM_LOAD( "as0905m01.u18", 0x100000, 0x400000, CRC(8d8165bb) SHA1(aca7051613d260734ee787b4c3db552c336bd600) ) | |
| 2007 | ROM_END | |
| 2008 | ||
| 2009 | ROM_START( deerhuna ) /* Deer Hunting USA V4.2 (xx/x/2000) */ | |
| 2010 | ROM_REGION( 0x200000, REGION_CPU1, 0 ) /* TMP68301 Code */ | |
| 2011 | ROM_LOAD16_BYTE( "as0906e01-v4_2.u06", 0x000000, 0x100000, CRC(bb3af36f) SHA1(f04071347e8ad361bf666fcb6c0136e522f19d47) ) | |
| 2012 | ROM_LOAD16_BYTE( "as0907e01-v4_2.u07", 0x000001, 0x100000, CRC(83f02117) SHA1(70fc2291bc93af3902aae88688be6a8078f7a07e) ) | |
| 2013 | ||
| 2014 | ROM_REGION( 0x2000000, REGION_GFX1, ROMREGION_DISPOSE ) /* Sprites */ | |
| 2015 | ROM_LOAD( "as0901m01.u38", 0x0000000, 0x800000, CRC(1d6acf8f) SHA1(6f61fe21bebb7c87e8e6c3ef3ba73b8cf327dde9) ) | |
| 2016 | ROM_LOAD( "as0902m01.u39", 0x0800000, 0x800000, CRC(c7ca2128) SHA1(86be3a3ec2f86f61acfa3d4d261faea3c27dc378) ) | |
| 2017 | ROM_LOAD( "as0903m01.u40", 0x1000000, 0x800000, CRC(e8ef81b3) SHA1(97666942ca6cca5b8ea6451314a2aaabad9e06ba) ) | |
| 2018 | ROM_LOAD( "as0904m01.u41", 0x1800000, 0x800000, CRC(d0f97fdc) SHA1(776c9d42d03a9f61155521212305e1ed696eaf47) ) | |
| 2019 | ||
| 2020 | ROM_REGION( 0x500000, REGION_SOUND1, 0 ) /* Samples */ | |
| 2021 | /* Leave 1MB empty (addressable by the chip) */ | |
| 2022 | ROM_LOAD( "as0905m01.u18", 0x100000, 0x400000, CRC(8d8165bb) SHA1(aca7051613d260734ee787b4c3db552c336bd600) ) | |
| 2023 | ROM_END | |
| 2024 | ||
| 2025 | ROM_START( deerhunb ) /* Deer Hunting USA V4.0 (6/15/2000) */ | |
| 2026 | ROM_REGION( 0x200000, REGION_CPU1, 0 ) /* TMP68301 Code */ | |
| 2027 | ROM_LOAD16_BYTE( "as0906e01-v4.u06", 0x000000, 0x100000, CRC(07d9b64a) SHA1(f9aac644aab920bbac84b14836ee589ccd51f6db) ) | |
| 2028 | ROM_LOAD16_BYTE( "as0907e01-v4.u07", 0x000001, 0x100000, CRC(19973d08) SHA1(da1cc02ce480a62ccaf94d0af1246a340f054b43) ) | |
| 2029 | ||
| 2030 | ROM_REGION( 0x2000000, REGION_GFX1, ROMREGION_DISPOSE ) /* Sprites */ | |
| 2031 | ROM_LOAD( "as0901m01.u38", 0x0000000, 0x800000, CRC(1d6acf8f) SHA1(6f61fe21bebb7c87e8e6c3ef3ba73b8cf327dde9) ) | |
| 2032 | ROM_LOAD( "as0902m01.u39", 0x0800000, 0x800000, CRC(c7ca2128) SHA1(86be3a3ec2f86f61acfa3d4d261faea3c27dc378) ) | |
| 2033 | ROM_LOAD( "as0903m01.u40", 0x1000000, 0x800000, CRC(e8ef81b3) SHA1(97666942ca6cca5b8ea6451314a2aaabad9e06ba) ) | |
| 2034 | ROM_LOAD( "as0904m01.u41", 0x1800000, 0x800000, CRC(d0f97fdc) SHA1(776c9d42d03a9f61155521212305e1ed696eaf47) ) | |
| 2035 | ||
| 2036 | ROM_REGION( 0x500000, REGION_SOUND1, 0 ) /* Samples */ | |
| 2037 | /* Leave 1MB empty (addressable by the chip) */ | |
| 2038 | ROM_LOAD( "as0905m01.u18", 0x100000, 0x400000, CRC(8d8165bb) SHA1(aca7051613d260734ee787b4c3db552c336bd600) ) | |
| 2039 | ROM_END | |
| 2040 | ||
| 2041 | ROM_START( turkhunt ) /* V1.0 is currently the only known version */ | |
| 2042 | ROM_REGION( 0x200000, REGION_CPU1, 0 ) /* TMP68301 Code */ | |
| 2043 | ROM_LOAD16_BYTE( "asx906e01.u06", 0x000000, 0x100000, CRC(c96266e1) SHA1(0ca462b3b0f27198e36384eee6ea5c5d4e7e1293) ) | |
| 2044 | ROM_LOAD16_BYTE( "asx907e01.u07", 0x000001, 0x100000, CRC(7c67b502) SHA1(6a0e8883a115dac4095d86897e7eca2a007a1c71) ) | |
| 2045 | ||
| 2046 | ROM_REGION( 0x2000000, REGION_GFX1, ROMREGION_DISPOSE ) /* Sprites */ | |
| 2047 | ROM_LOAD( "asx901m01.u38", 0x0000000, 0x800000, BAD_DUMP CRC(23125c93) SHA1(c8735ac43bc67c52cb78ad5bca74fa2082dda040) ) | |
| 2048 | ROM_LOAD( "asx902m01.u39", 0x0800000, 0x800000, BAD_DUMP CRC(6e7330dd) SHA1(4a8590e9b8fe4767f7a25760bfe499792948a7ae) ) | |
| 2049 | ROM_LOAD( "asx903m01.u40", 0x1000000, 0x800000, BAD_DUMP CRC(5f86c322) SHA1(5a72adb99eea176199f172384cb051e2b045ab94) ) | |
| 2050 | ROM_LOAD( "asx904m01.u41", 0x1800000, 0x800000, BAD_DUMP CRC(6177f644) SHA1(120fe32518d133f03176db68f18c8175c1a81b27) ) | |
| 2051 | ||
| 2052 | ROM_REGION( 0x500000, REGION_SOUND1, 0 ) /* Samples */ | |
| 2053 | /* Leave 1MB empty (addressable by the chip) */ | |
| 2054 | ROM_LOAD( "asx905m01.u18", 0x100000, 0x400000, CRC(8d9dd9a9) SHA1(1fc2f3688d2c24c720dca7357bca6bf5f4016c53) ) | |
| 2055 | ROM_END | |
| 2056 | ||
| 2057 | ROM_START( wschamp ) /* V2.0 */ | |
| 2058 | ROM_REGION( 0x200000, REGION_CPU1, 0 ) /* TMP68301 Code */ | |
| 2059 | ROM_LOAD16_BYTE( "as1006e02.u06", 0x000000, 0x100000, CRC(0ad01677) SHA1(63e09b9f7cc8b781af1756f86caa0cc0962ae584) ) | |
| 2060 | ROM_LOAD16_BYTE( "as1007e02.u07", 0x000001, 0x100000, CRC(572624f0) SHA1(0c2f67daa22f4edd66a2be990dc6cd999faff0fa) ) | |
| 2061 | ||
| 2062 | ROM_REGION( 0x2000000, REGION_GFX1, ROMREGION_DISPOSE ) /* Sprites */ | |
| 2063 | ROM_LOAD( "as1001m01.u38", 0x0000000, 0x800000, CRC(92595579) SHA1(75a7131aedb18b7103677340c3cca7c91aaca2bf) ) | |
| 2064 | ROM_LOAD( "as1002m01.u39", 0x0800000, 0x800000, CRC(16c2bb08) SHA1(63926464c8bd8db7d05905a953765e645942beb4) ) | |
| 2065 | ROM_LOAD( "as1003m01.u40", 0x1000000, 0x800000, CRC(89618858) SHA1(a8bd07f233482e8f5a256af7ff9577648eb58ef4) ) | |
| 2066 | ROM_LOAD( "as1004m01.u41", 0x1800000, 0x800000, CRC(500c0909) SHA1(73ff27d46b9285f34a50a81c21c54437f21e1939) ) | |
| 2067 | ||
| 2068 | ROM_REGION( 0x500000, REGION_SOUND1, 0 ) /* Samples */ | |
| 2069 | /* Leave 1MB empty (addressable by the chip) */ | |
| 2070 | ROM_LOAD( "as1005m01.u18", 0x100000, 0x400000, CRC(e4b137b8) SHA1(4d8d15073c51f7d383282cc5755ae5b2eab6226c) ) | |
| 2071 | ROM_END | |
| 2072 | ||
| 2073 | ROM_START( wschampa ) /* V1.01 */ | |
| 2074 | ROM_REGION( 0x200000, REGION_CPU1, 0 ) /* TMP68301 Code */ | |
| 2075 | ROM_LOAD16_BYTE( "as1006e01.u06", 0x000000, 0x100000, CRC(d3d3b2b5) SHA1(2d036d795b40a4ed78bb9f7751f875cfc76276a9) ) | |
| 2076 | ROM_LOAD16_BYTE( "as1007e01.u07", 0x000001, 0x100000, CRC(78ede6d9) SHA1(e6d10f52cd4c6bf97288df44911f23bb64fc012c) ) | |
| 2077 | ||
| 2078 | ROM_REGION( 0x2000000, REGION_GFX1, ROMREGION_DISPOSE ) /* Sprites */ | |
| 2079 | ROM_LOAD( "as1001m01.u38", 0x0000000, 0x800000, CRC(92595579) SHA1(75a7131aedb18b7103677340c3cca7c91aaca2bf) ) | |
| 2080 | ROM_LOAD( "as1002m01.u39", 0x0800000, 0x800000, CRC(16c2bb08) SHA1(63926464c8bd8db7d05905a953765e645942beb4) ) | |
| 2081 | ROM_LOAD( "as1003m01.u40", 0x1000000, 0x800000, CRC(89618858) SHA1(a8bd07f233482e8f5a256af7ff9577648eb58ef4) ) | |
| 2082 | ROM_LOAD( "as1004m01.u41", 0x1800000, 0x800000, CRC(500c0909) SHA1(73ff27d46b9285f34a50a81c21c54437f21e1939) ) | |
| 2083 | ||
| 2084 | ROM_REGION( 0x500000, REGION_SOUND1, 0 ) /* Samples */ | |
| 2085 | /* Leave 1MB empty (addressable by the chip) */ | |
| 2086 | ROM_LOAD( "as1005m01.u18", 0x100000, 0x400000, CRC(e4b137b8) SHA1(4d8d15073c51f7d383282cc5755ae5b2eab6226c) ) | |
| 2087 | ROM_END | |
| 2088 | ||
| 2089 | ROM_START( trophyh ) /* V1.0 is currently the only known version */ | |
| 2090 | ROM_REGION( 0x200000, REGION_CPU1, 0 ) /* TMP68301 Code */ | |
| 2091 | ROM_LOAD16_BYTE( "as1106e01.u06", 0x000000, 0x100000, CRC(b4950882) SHA1(2749f7ffc5b543c9f39815f0913a1d1e385b63f4) ) | |
| 2092 | ROM_LOAD16_BYTE( "as1107e01.u07", 0x000001, 0x100000, CRC(19ee67cb) SHA1(e75ce66d3ff5aad46ba997c09d6514260e617f55) ) | |
| 2093 | ||
| 2094 | ROM_REGION( 0x2000000, REGION_GFX1, ROMREGION_DISPOSE ) /* Sprites */ | |
| 2095 | ROM_LOAD( "as1101m01.u38", 0x0000000, 0x800000, CRC(855ed675) SHA1(84ce229a9feb6331413253a5aed10b362e8102e5) ) | |
| 2096 | ROM_LOAD( "as1102m01.u39", 0x0800000, 0x800000, CRC(d186d271) SHA1(3c54438b35adfab8be91df0a633270d6db49beef) ) | |
| 2097 | ROM_LOAD( "as1103m01.u40", 0x1000000, 0x800000, CRC(adf8a54e) SHA1(bb28bf219d18082246f7964851a5c49b9c0ba7f5) ) | |
| 2098 | ROM_LOAD( "as1104m01.u41", 0x1800000, 0x800000, CRC(387882e9) SHA1(0fdd0c77dabd1066c6f3bd64e357236a76f524ab) ) | |
| 2099 | ||
| 2100 | ROM_REGION( 0x500000, REGION_SOUND1, 0 ) /* Samples */ | |
| 2101 | /* Leave 1MB empty (addressable by the chip) */ | |
| 2102 | ROM_LOAD( "as1105m01.u18", 0x100000, 0x400000, CRC(633d0df8) SHA1(3401c424f5c207ef438a9269e0c0e7d482771fed) ) | |
| 2103 | ROM_END | |
| 2104 | ||
| 2105 | GAME( 1994, gundamex, 0, gundamex, gundamex, 0, ROT0, "Banpresto", "Mobile Suit Gundam EX Revue", 0 ) | |
| 2106 | GAME( 1995, grdians, 0, grdians, grdians, 0, ROT0, "Banpresto", "Guardians / Denjin Makai II", GAME_NO_COCKTAIL | GAME_IMPERFECT_GRAPHICS ) // Displays (c) Winky Soft at game's end. | |
| 2107 | GAME( 1996, mj4simai, 0, mj4simai, mj4simai, 0, ROT0, "Maboroshi Ware", "Wakakusamonogatari Mahjong Yonshimai (Japan)", GAME_NO_COCKTAIL ) | |
| 2108 | GAME( 1996, myangel, 0, myangel, myangel, 0, ROT0, "Namco", "Kosodate Quiz My Angel (Japan)", GAME_NO_COCKTAIL | GAME_IMPERFECT_GRAPHICS ) | |
| 2109 | GAME( 1997, myangel2, 0, myangel2, myangel2, 0, ROT0, "Namco", "Kosodate Quiz My Angel 2 (Japan)", GAME_NO_COCKTAIL | GAME_IMPERFECT_GRAPHICS ) | |
| 2110 | GAME( 1999, pzlbowl, 0, pzlbowl, pzlbowl, 0, ROT0, "Nihon System / Moss", "Puzzle De Bowling (Japan)", GAME_NO_COCKTAIL ) | |
| 2111 | GAME( 2000, penbros, 0, penbros, penbros, 0, ROT0, "Subsino", "Penguin Brothers (Japan)", GAME_NO_COCKTAIL ) | |
| 2112 | GAME( 2000, deerhunt, 0, samshoot, deerhunt, 0, ROT0, "Sammy USA Corporation", "Deer Hunting USA V4.3", GAME_NO_COCKTAIL | GAME_IMPERFECT_GRAPHICS ) | |
| 2113 | GAME( 2000, deerhuna, deerhunt, samshoot, deerhunt, 0, ROT0, "Sammy USA Corporation", "Deer Hunting USA V4.2", GAME_NO_COCKTAIL | GAME_IMPERFECT_GRAPHICS ) | |
| 2114 | GAME( 2000, deerhunb, deerhunt, samshoot, deerhunt, 0, ROT0, "Sammy USA Corporation", "Deer Hunting USA V4.0", GAME_NO_COCKTAIL | GAME_IMPERFECT_GRAPHICS ) | |
| 2115 | GAME( 2001, turkhunt, 0, samshoot, turkhunt, 0, ROT0, "Sammy USA Corporation", "Turkey Hunting USA V1.0", GAME_NO_COCKTAIL | GAME_IMPERFECT_GRAPHICS ) | |
| 2116 | GAME( 2001, wschamp, 0, samshoot, wschamp, 0, ROT0, "Sammy USA Corporation", "Wing Shooting Championship V2.0", GAME_IMPERFECT_GRAPHICS ) | |
| 2117 | GAME( 2001, wschampa, wschamp, samshoot, wschamp, 0, ROT0, "Sammy USA Corporation", "Wing Shooting Championship V1.01", GAME_IMPERFECT_GRAPHICS ) | |
| 2118 | GAME( 2002, trophyh, 0, samshoot, trophyh, 0, ROT0, "Sammy USA Corporation", "Trophy Hunting - Bear & Moose V1.0", 0 ) |
| r1037 | r1038 | |
|---|---|---|
| 95 | 95 | //mame_timer* vblankirq_off_timer; |
| 96 | 96 | |
| 97 | 97 | |
| 98 | #ifdef UNUSED_FUNCTION | |
| 98 | 99 | /* taken from segaic16.c */ |
| 99 | 100 | /* doesn't seem to meet my needs, not used */ |
| 100 | 101 | static UINT16 read_next_instruction(void) |
| r1037 | r1038 | |
| 120 | 121 | recurse = 0; |
| 121 | 122 | return result; |
| 122 | 123 | } |
| 124 | #endif | |
| 123 | 125 | |
| 124 | 126 | |
| 125 | 127 | |
| r1037 | r1038 | |
| 4548 | 4550 | MDRV_CPU_PROGRAM_MAP(z80_readmem,z80_writemem) |
| 4549 | 4551 | /* IRQ handled via the timers */ |
| 4550 | 4552 | |
| 4551 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 4552 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION) // Vblank handled manually. | |
| 4553 | 4553 | MDRV_MACHINE_RESET(megadriv) |
| 4554 | 4554 | |
| 4555 | 4555 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| 4556 | ||
| 4557 | MDRV_SCREEN_ADD("megadriv", 0x000) | |
| 4556 | 4558 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB15) |
| 4557 | ||
| 4559 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 4560 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION) // Vblank handled manually. | |
| 4558 | 4561 | MDRV_SCREEN_SIZE(64*8, 64*8) |
| 4559 | 4562 | MDRV_SCREEN_VISIBLE_AREA(0, 32*8-1, 0, 28*8-1) |
| 4560 | 4563 |
| r1037 | r1038 | |
|---|---|---|
| 512 | 512 | static VIDEO_START( vegas_voodoo2 ) |
| 513 | 513 | { |
| 514 | 514 | voodoo_start(0, 0, VOODOO_2, 2, 4, 4); |
| 515 | ||
| 516 | 515 | voodoo_set_vblank_callback(0, vblank_assert); |
| 517 | 516 | } |
| 518 | 517 | |
| r1037 | r1038 | |
| 520 | 519 | static VIDEO_START( vegas_voodoo_banshee ) |
| 521 | 520 | { |
| 522 | 521 | voodoo_start(0, 0, VOODOO_BANSHEE, 16, 16, 0); |
| 523 | ||
| 524 | 522 | voodoo_set_vblank_callback(0, vblank_assert); |
| 525 | 523 | } |
| 526 | 524 | |
| r1037 | r1038 | |
| 528 | 526 | static VIDEO_START( vegas_voodoo3 ) |
| 529 | 527 | { |
| 530 | 528 | voodoo_start(0, 0, VOODOO_3, 16, 16, 16); |
| 531 | ||
| 532 | 529 | voodoo_set_vblank_callback(0, vblank_assert); |
| 533 | 530 | } |
| 534 | 531 | |
| 535 | 532 | |
| 536 | 533 | static VIDEO_UPDATE( vegas ) |
| 537 | 534 | { |
| 538 | voodoo_update(0, bitmap, cliprect); | |
| 539 | return 0; | |
| 535 | return voodoo_update(0, bitmap, cliprect) ? 0 : UPDATE_HAS_NOT_CHANGED; | |
| 540 | 536 | } |
| 541 | 537 | |
| 542 | 538 |
| r1037 | r1038 | |
|---|---|---|
| 181 | 181 | } |
| 182 | 182 | } |
| 183 | 183 | |
| 184 | #ifdef UNUSED_FUNCTION | |
| 184 | 185 | static WRITE16_HANDLER( galpania_misc_w ) |
| 185 | 186 | { |
| 186 | 187 | if (ACCESSING_LSB) |
| r1037 | r1038 | |
| 190 | 191 | |
| 191 | 192 | // other bits unknown ! |
| 192 | 193 | } |
| 194 | #endif | |
| 193 | 195 | |
| 194 | 196 | static WRITE16_HANDLER( galpanic_coin_w ) |
| 195 | 197 | { |
| r1037 | r1038 | |
|---|---|---|
| 45 | 45 | return 0; |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | #ifdef UNUSED_FUNCTION | |
| 48 | 49 | static WRITE8_HANDLER( cowrace_soundlatch_w ) |
| 49 | 50 | { |
| 50 | 51 | soundlatch_w(0, data); |
| 51 | 52 | cpunum_set_input_line(1, INPUT_LINE_NMI, PULSE_LINE); |
| 52 | 53 | } |
| 54 | #endif | |
| 53 | 55 | |
| 54 | 56 | static READ8_HANDLER( ret_ff ) |
| 55 | 57 | { |
| r1037 | r1038 | |
|---|---|---|
| 601 | 601 | } |
| 602 | 602 | } /* simulate_mcu */ |
| 603 | 603 | |
| 604 | #ifdef UNUSED_FUNCTION | |
| 604 | 605 | static READ16_HANDLER( namcona1_mcu_r ) |
| 605 | 606 | { |
| 606 | 607 | return mcu_ram[offset]; |
| 607 | 608 | } |
| 609 | #endif | |
| 608 | 610 | |
| 609 | 611 | static WRITE16_HANDLER( namcona1_mcu_w ) |
| 610 | 612 | { |
| r1037 | r1038 | |
|---|---|---|
| 231 | 231 | soundlatch_w(0,((data & 0x7f) << 1) | 1); |
| 232 | 232 | } |
| 233 | 233 | |
| 234 | #ifdef UNUSED_FUNCTION | |
| 234 | 235 | static WRITE16_HANDLER( legion_command_c ) |
| 235 | 236 | { |
| 236 | 237 | COMBINE_DATA(&legion_cmd[offset]); |
| 237 | 238 | //logerror("Legion CMD %04x=%04x", offset, data); |
| 238 | 239 | } |
| 240 | #endif | |
| 239 | 241 | |
| 240 | 242 | |
| 241 | 243 |
| r1037 | r1038 | |
|---|---|---|
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | |
| 195 | #ifdef UNUSED_FUNCTION | |
| 195 | 196 | static WRITE8_HANDLER( sprint4_lockout_w ) |
| 196 | 197 | { |
| 197 | 198 | coin_lockout_global_w(~offset & 1); |
| 198 | 199 | } |
| 200 | #endif | |
| 199 | 201 | |
| 200 | 202 | |
| 201 | 203 | static WRITE8_HANDLER( sprint4_screech_1_w ) |
| r1037 | r1038 | |
|---|---|---|
| 23 | 23 | 94 Rong Rong Z80 YM2413 + M6295 NAKANIHON NL-002 |
| 24 | 24 | 95 Mahjong Dai Chuuka Ken D11107218L1 Z80 AY8910 + YM2413 + M6295 70C160F009 |
| 25 | 25 | 95 Nettoh Quiz Champion 68000 AY8910 + YM2413 + M6295 |
| 26 | 96 Don Den Lover Vol 1 D11309208L1 68000 AY8910 + YM2413 + M6295 NAKANIHON NL-005 | |
| 26 | 95 Don Den Lover Vol 1 (J) D1120901L8 68000 YMZ284 + YM2413 + M6295 NAKANIHON NL-005 | |
| 27 | 96 Don Den Lover Vol 1 (HK) D11309208L1 68000 YMZ284 + YM2413 + M6295 NAKANIHON NL-005 | |
| 28 | 96 Panel & Variety Akamaru 68000 YMZ284 + YM2413 + M6295 NAKANIHON NL-005 | |
| 27 | 29 | 96 Hana Kanzashi Z80 YM2413 + M6295 70C160F011? |
| 28 | 30 | 97 Hana Kagerou Z80 YM2413 + M6295 70C160F011 |
| 29 | 31 | 98 Mahjong Chuukanejyo D11107218L1 Z80 AY8910 + YM2413 + M6295 70C160F009 |
| r1037 | r1038 | |
| 79 | 81 | |
| 80 | 82 | - quiz365 protection |
| 81 | 83 | |
| 84 | - ddenlvrj, akamaru: the elapsed time text in the "game information" screen | |
| 85 | is all wrong (RTC/interrupts related). | |
| 86 | ||
| 82 | 87 | - NVRAM |
| 83 | 88 | |
| 84 | 89 | ***************************************************************************/ |
| r1037 | r1038 | |
| 281 | 286 | |
| 282 | 287 | INLINE int fetch_bit(UINT8 *src_data,int src_len,int *bit_addr) |
| 283 | 288 | { |
| 284 | int baddr = | |
| 289 | int baddr = | |
| 285 | 290 | |
| 291 | *bit_addr = ((*bit_addr) + 1) & 0x7ffffff; | |
| 292 | ||
| 286 | 293 | if (baddr/8 >= src_len) |
| 287 | 294 | { |
| 288 | 295 | #ifdef MAME_DEBUG |
| r1037 | r1038 | |
| 328 | 335 | { |
| 329 | 336 | UINT8 *src_data = memory_region(REGION_GFX1); |
| 330 | 337 | int src_len = memory_region_length(REGION_GFX1); |
| 331 | int bit_addr = src * 8; /* convert to bit address */ | |
| 338 | int bit_addr = (src & 0xffffff) * 8; /* convert to bit address */ | |
| 332 | 339 | int pen_size, arg_size, cmd; |
| 333 | 340 | int x; |
| 334 | 341 | int xinc = (dynax_blit_flip & 1) ? -1 : 1; |
| r1037 | r1038 | |
| 399 | 406 | log_draw_error(src,cmd); |
| 400 | 407 | // fall through |
| 401 | 408 | case 7: // STOP |
| 402 | return (bit_addr + 7) / 8; | |
| 409 | return ((bit_addr + 7) / 8) & 0xffffff; | |
| 403 | 410 | } |
| 404 | 411 | } |
| 405 | 412 | } |
| r1037 | r1038 | |
| 638 | 645 | |
| 639 | 646 | INLINE void log_blit(int data) |
| 640 | 647 | { |
| 648 | #if 1 | |
| 641 | 649 | logerror("%06x: blit src %06x x %03x y %03x flags %02x layer %02x pen %02x penmode %02x w %03x h %03x linelen %03x clip: ctrl %x xy %03x %03x wh %03x %03x\n", |
| 642 | 650 | activecpu_get_pc(), |
| 643 | 651 | dynax_blit_address,dynax_blit_x,dynax_blit_y,data, |
| 644 | 652 | dynax_dest_layer,dynax_blit_pen,dynax_blit_pen_mode,dynax_rect_width,dynax_rect_height,dynax_line_length, |
| 645 | 653 | dynax_clip_ctrl,dynax_clip_x,dynax_clip_y, dynax_clip_width,dynax_clip_height ); |
| 654 | #endif | |
| 646 | 655 | } |
| 647 | 656 | |
| 648 | 657 | static void blitter_w(int blitter, offs_t offset,UINT8 data,int irq_vector) |
| r1037 | r1038 | |
| 708 | 717 | break; |
| 709 | 718 | |
| 710 | 719 | case 0x0d: |
| 711 | dynax_blit_address = (dynax_blit_address & | |
| 720 | dynax_blit_address = (dynax_blit_address & | |
| 712 | 721 | break; |
| 713 | 722 | case 0x0e: |
| 714 | dynax_blit_address = (dynax_blit_address & | |
| 723 | dynax_blit_address = (dynax_blit_address & | |
| 715 | 724 | break; |
| 716 | 725 | case 0x0f: |
| 717 | dynax_blit_address = (dynax_blit_address & | |
| 726 | dynax_blit_address = (dynax_blit_address & | |
| 718 | 727 | break; |
| 719 | 728 | |
| 720 | 729 | case 0x14: |
| r1037 | r1038 | |
| 873 | 882 | break; |
| 874 | 883 | |
| 875 | 884 | case 0x0d: |
| 876 | dynax_blit_address = (dynax_blit_address & | |
| 885 | dynax_blit_address = (dynax_blit_address & | |
| 877 | 886 | break; |
| 878 | 887 | case 0x0e: |
| 879 | dynax_blit_address = (dynax_blit_address & | |
| 888 | dynax_blit_address = (dynax_blit_address & | |
| 880 | 889 | break; |
| 881 | 890 | case 0x0f: |
| 882 | dynax_blit_address = (dynax_blit_address & | |
| 891 | dynax_blit_address = (dynax_blit_address & | |
| 883 | 892 | break; |
| 884 | 893 | |
| 885 | 894 | case 0x14: |
| r1037 | r1038 | |
| 1027 | 1036 | break; |
| 1028 | 1037 | |
| 1029 | 1038 | case 0x34: |
| 1030 | dynax_blit_address = (dynax_blit_address & | |
| 1039 | dynax_blit_address = (dynax_blit_address & | |
| 1031 | 1040 | break; |
| 1032 | 1041 | case 0x38: |
| 1033 | dynax_blit_address = (dynax_blit_address & | |
| 1042 | dynax_blit_address = (dynax_blit_address & | |
| 1034 | 1043 | break; |
| 1035 | 1044 | case 0x3c: |
| 1036 | dynax_blit_address = (dynax_blit_address & | |
| 1045 | dynax_blit_address = (dynax_blit_address & | |
| 1037 | 1046 | break; |
| 1038 | 1047 | |
| 1039 | 1048 | case 0x50: |
| r1037 | r1038 | |
| 1195 | 1204 | static READ8_HANDLER( rongrong_gfxrom_r ) |
| 1196 | 1205 | { |
| 1197 | 1206 | UINT8 *rom = memory_region( REGION_GFX1 ); |
| 1198 | size_t size | |
| 1207 | size_t size | |
| 1199 | 1208 | int address = dynax_blit_address; |
| 1200 | 1209 | |
| 1201 | 1210 | if (address >= size) |
| r1037 | r1038 | |
| 1204 | 1213 | address %= size; |
| 1205 | 1214 | } |
| 1206 | 1215 | |
| 1207 | dynax_blit_address+ | |
| 1216 | dynax_blit_address = (dynax_blit_address + 1) & 0xffffff; | |
| 1208 | 1217 | |
| 1209 | 1218 | return rom[address]; |
| 1210 | 1219 | } |
| r1037 | r1038 | |
| 1671 | 1680 | ADDRESS_MAP_END |
| 1672 | 1681 | |
| 1673 | 1682 | |
| 1683 | static UINT16 *ddenlvrj_dsw_sel; | |
| 1684 | ||
| 1685 | static READ16_HANDLER( ddenlvrj_dsw_r ) | |
| 1686 | { | |
| 1687 | UINT16 dsw = 0; | |
| 1688 | if ((~*ddenlvrj_dsw_sel) & 0x01) dsw |= readinputport(3); // dsw 1 | |
| 1689 | if ((~*ddenlvrj_dsw_sel) & 0x02) dsw |= readinputport(4); // dsw 2 | |
| 1690 | if ((~*ddenlvrj_dsw_sel) & 0x04) dsw |= readinputport(5); // ? | |
| 1691 | return dsw; | |
| 1692 | } | |
| 1693 | ||
| 1694 | static WRITE16_HANDLER( ddenlvrj_coincounter_w ) | |
| 1695 | { | |
| 1696 | if (ACCESSING_LSB) | |
| 1697 | { | |
| 1698 | coin_counter_w(0, data & 0x01); | |
| 1699 | coin_counter_w(1, data & 0x04); | |
| 1700 | // data & 0x80 ? | |
| 1701 | } | |
| 1702 | } | |
| 1703 | ||
| 1704 | static READ16_HANDLER( ddenlvrj_blitter_r ) | |
| 1705 | { | |
| 1706 | return readinputport(2) | (dynax_blitter_irq_flag ? 0x60 : 0x00 ); // bit 4 = 1 -> blitter busy | |
| 1707 | } | |
| 1708 | ||
| 1709 | static ADDRESS_MAP_START( ddenlvrj_readmem, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1710 | AM_RANGE(0x000000, 0x07ffff) AM_READ(MRA16_ROM ) // ROM | |
| 1711 | AM_RANGE(0x300070, 0x300071) AM_READ(unk16_r ) // ? must be 78 on startup (not necessary in ddlover) | |
| 1712 | AM_RANGE(0x300086, 0x300087) AM_READ(ddenlovr_gfxrom_r ) // Video Chip | |
| 1713 | AM_RANGE(0x300100, 0x30011f) AM_READ(msm6242_lsb_r ) // 6242RTC | |
| 1714 | AM_RANGE(0x300180, 0x300181) AM_READ(input_port_0_word_r ) // P1 | |
| 1715 | AM_RANGE(0x300182, 0x300183) AM_READ(input_port_1_word_r ) // P2 | |
| 1716 | AM_RANGE(0x300184, 0x300185) AM_READ(ddenlvrj_blitter_r ) // Coins + ? | |
| 1717 | AM_RANGE(0x300186, 0x300187) AM_READ(ddenlvrj_dsw_r ) // DSW | |
| 1718 | AM_RANGE(0x300240, 0x300241) AM_READ(OKIM6295_status_0_lsb_r ) // Sound | |
| 1719 | AM_RANGE(0xff0000, 0xffffff) AM_READ(MRA16_RAM ) // RAM | |
| 1720 | ADDRESS_MAP_END | |
| 1721 | ||
| 1722 | static ADDRESS_MAP_START( ddenlvrj_writemem, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1723 | AM_RANGE(0x000000, 0x07ffff) AM_WRITE(MWA16_ROM ) // ROM | |
| 1724 | AM_RANGE(0x200000, 0x2003ff) AM_WRITE(ddenlovr_palette_w ) // Palette | |
| 1725 | // AM_RANGE(0x201000, 0x2017ff) AM_WRITE(MWA16_RAM ) // ? B0 on startup, then 00 | |
| 1726 | AM_RANGE(0x300040, 0x300047) AM_WRITE(ddenlovr_palette_base_w ) | |
| 1727 | AM_RANGE(0x300048, 0x30004f) AM_WRITE(ddenlovr_palette_mask_w ) | |
| 1728 | AM_RANGE(0x300050, 0x300057) AM_WRITE(ddenlovr_transparency_pen_w ) | |
| 1729 | AM_RANGE(0x300058, 0x30005f) AM_WRITE(ddenlovr_transparency_mask_w ) | |
| 1730 | AM_RANGE(0x300068, 0x300069) AM_WRITE(ddenlovr_bgcolor_w ) | |
| 1731 | AM_RANGE(0x30006a, 0x30006b) AM_WRITE(ddenlovr_priority_w ) | |
| 1732 | AM_RANGE(0x30006c, 0x30006d) AM_WRITE(ddenlovr_layer_enable_w ) | |
| 1733 | AM_RANGE(0x300080, 0x300083) AM_WRITE(ddenlovr_blitter_w ) | |
| 1734 | AM_RANGE(0x3000c0, 0x3000c1) AM_WRITE(YM2413_register_port_0_lsb_w ) | |
| 1735 | AM_RANGE(0x3000c2, 0x3000c3) AM_WRITE(YM2413_data_port_0_lsb_w ) | |
| 1736 | AM_RANGE(0x300100, 0x30011f) AM_WRITE(msm6242_lsb_w ) // 6242RTC | |
| 1737 | AM_RANGE(0x300140, 0x300141) AM_WRITE(AY8910_control_port_0_lsb_w ) | |
| 1738 | AM_RANGE(0x300142, 0x300143) AM_WRITE(AY8910_write_port_0_lsb_w ) | |
| 1739 | AM_RANGE(0x300188, 0x300189) AM_WRITE(ddenlvrj_coincounter_w ) // Coin Counters | |
| 1740 | AM_RANGE(0x30018a, 0x30018b) AM_WRITE(MWA16_RAM ) AM_BASE( &ddenlvrj_dsw_sel ) // DSW select | |
| 1741 | AM_RANGE(0x30018c, 0x30018d) AM_WRITE(ddenlovr_oki_bank_w ) | |
| 1742 | AM_RANGE(0x3001ca, 0x3001cb) AM_WRITE(ddenlovr_blitter_irq_ack_w ) // Blitter irq acknowledge | |
| 1743 | AM_RANGE(0x300240, 0x300241) AM_WRITE(OKIM6295_data_0_lsb_w ) | |
| 1744 | AM_RANGE(0xff0000, 0xffffff) AM_WRITE(MWA16_RAM ) // RAM | |
| 1745 | ADDRESS_MAP_END | |
| 1746 | ||
| 1747 | ||
| 1674 | 1748 | static ADDRESS_MAP_START( ddenlovr_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 1675 | 1749 | AM_RANGE(0x000000, 0x07ffff) AM_READ(MRA16_ROM ) // ROM |
| 1676 | 1750 | AM_RANGE(0xe00086, 0xe00087) AM_READ(ddenlovr_gfxrom_r ) // Video Chip |
| r1037 | r1038 | |
| 2306 | 2380 | romdata[0] = rom[address + 0]; |
| 2307 | 2381 | romdata[1] = rom[address + 1]; |
| 2308 | 2382 | |
| 2309 | dynax_blit_address+ | |
| 2383 | dynax_blit_address = (dynax_blit_address + 1) & 0xffffff; | |
| 2310 | 2384 | |
| 2311 | 2385 | return romdata[0]; |
| 2312 | 2386 | } |
| r1037 | r1038 | |
| 2947 | 3021 | ADDRESS_MAP_END |
| 2948 | 3022 | |
| 2949 | 3023 | |
| 3024 | /*************************************************************************** | |
| 3025 | Panel & Variety Akamaru Q Jousyou Dont-R | |
| 3026 | ***************************************************************************/ | |
| 2950 | 3027 | |
| 3028 | static UINT16 akamaru_protection1; | |
| 3029 | static READ16_HANDLER( akamaru_protection1_r ) | |
| 3030 | { | |
| 3031 | return (akamaru_protection1 & 0x0008) ? 0x0001 : 0x0000; | |
| 3032 | } | |
| 3033 | static WRITE16_HANDLER( akamaru_protection1_w ) | |
| 3034 | { | |
| 3035 | int bank; | |
| 3036 | COMBINE_DATA( &akamaru_protection1 ); | |
| 3037 | // BCD number? | |
| 3038 | bank = (((akamaru_protection1>>4)&0xf)%10) * 10 + ((akamaru_protection1&0xf)%10); | |
| 3039 | OKIM6295_set_bank_base(0, bank * 0x40000); | |
| 2951 | 3040 | |
| 3041 | // popmessage("bank $%0x (%d)",akamaru_protection1, bank); | |
| 3042 | } | |
| 3043 | ||
| 3044 | ||
| 3045 | static UINT16 *akamaru_protection2; | |
| 3046 | static READ16_HANDLER( akamaru_protection2_r ) | |
| 3047 | { | |
| 3048 | return 0x55; | |
| 3049 | } | |
| 3050 | ||
| 3051 | static UINT16 *akamaru_dsw_sel; | |
| 3052 | static READ16_HANDLER( akamaru_dsw_r ) | |
| 3053 | { | |
| 3054 | UINT16 dsw = 0; | |
| 3055 | if (akamaru_dsw_sel[1] == 0xff) dsw |= readinputport(3); | |
| 3056 | if (akamaru_dsw_sel[0] == 0xff) dsw |= readinputport(4); | |
| 3057 | return dsw; | |
| 3058 | } | |
| 3059 | ||
| 3060 | static READ16_HANDLER( akamaru_blitter_r ) | |
| 3061 | { | |
| 3062 | return dynax_blitter_irq_flag << 6; // bit 7 = 1 -> blitter busy | |
| 3063 | } | |
| 3064 | ||
| 3065 | static READ16_HANDLER( akamaru_e0010d_r ) | |
| 3066 | { | |
| 3067 | return 0xffff; // read but not used, it seems | |
| 3068 | } | |
| 3069 | ||
| 3070 | static ADDRESS_MAP_START( akamaru_readmem, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 3071 | AM_RANGE(0x000000, 0x1fffff) AM_READ(MRA16_ROM ) // ROM | |
| 3072 | AM_RANGE(0x624680, 0x624681) AM_READ(akamaru_protection1_r ) | |
| 3073 | AM_RANGE(0xe00086, 0xe00087) AM_READ(ddenlovr_gfxrom_r ) // Video Chip | |
| 3074 | AM_RANGE(0xe00070, 0xe00071) AM_READ(unk16_r ) // ? must be 78 on startup (not necessary in ddlover) | |
| 3075 | AM_RANGE(0xe00100, 0xe00101) AM_READ(input_port_0_word_r ) // P1? | |
| 3076 | AM_RANGE(0xe00102, 0xe00103) AM_READ(input_port_1_word_r ) // P2? | |
| 3077 | AM_RANGE(0xe00104, 0xe00105) AM_READ(input_port_2_word_r ) // Coins | |
| 3078 | AM_RANGE(0xe00106, 0xe00107) AM_READ(akamaru_protection2_r ) | |
| 3079 | AM_RANGE(0xe0010c, 0xe0010d) AM_READ(akamaru_e0010d_r ) | |
| 3080 | AM_RANGE(0xe00200, 0xe00201) AM_READ(akamaru_dsw_r ) // DSW | |
| 3081 | AM_RANGE(0xe00204, 0xe00205) AM_READ(akamaru_blitter_r ) // Blitter Busy & IRQ | |
| 3082 | AM_RANGE(0xe00500, 0xe0051f) AM_READ(msm6242_lsb_r ) // 6242RTC | |
| 3083 | AM_RANGE(0xe00604, 0xe00605) AM_READ(AY8910_read_port_0_lsb_r ) | |
| 3084 | AM_RANGE(0xe00700, 0xe00701) AM_READ(OKIM6295_status_0_lsb_r ) // Sound | |
| 3085 | AM_RANGE(0xff0000, 0xffffff) AM_READ(MRA16_RAM ) // RAM | |
| 3086 | ADDRESS_MAP_END | |
| 3087 | ||
| 3088 | static ADDRESS_MAP_START( akamaru_writemem, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 3089 | AM_RANGE(0x000000, 0x1fffff) AM_WRITE(MWA16_ROM ) // ROM | |
| 3090 | AM_RANGE(0x213570, 0x213571) AM_WRITE(akamaru_protection1_w ) // OKI bank | |
| 3091 | AM_RANGE(0xd00000, 0xd003ff) AM_WRITE(ddenlovr_palette_w ) // Palette | |
| 3092 | // AM_RANGE(0xd01000, 0xd017ff) AM_WRITE(MWA16_RAM ) // 0 | |
| 3093 | AM_RANGE(0xe00040, 0xe00047) AM_WRITE(ddenlovr_palette_base_w ) | |
| 3094 | AM_RANGE(0xe00048, 0xe0004f) AM_WRITE(ddenlovr_palette_mask_w ) | |
| 3095 | AM_RANGE(0xe00050, 0xe00057) AM_WRITE(ddenlovr_transparency_pen_w ) | |
| 3096 | AM_RANGE(0xe00058, 0xe0005f) AM_WRITE(ddenlovr_transparency_mask_w ) | |
| 3097 | AM_RANGE(0xe00068, 0xe00069) AM_WRITE(ddenlovr_bgcolor_w ) | |
| 3098 | AM_RANGE(0xe0006a, 0xe0006b) AM_WRITE(ddenlovr_priority_w ) | |
| 3099 | AM_RANGE(0xe0006c, 0xe0006d) AM_WRITE(ddenlovr_layer_enable_w ) | |
| 3100 | AM_RANGE(0xe00080, 0xe00083) AM_WRITE(ddenlovr_blitter_w ) | |
| 3101 | AM_RANGE(0xe00108, 0xe0010b) AM_WRITE(MWA16_RAM ) AM_BASE( &akamaru_protection2 ) | |
| 3102 | AM_RANGE(0xe00302, 0xe00303) AM_WRITE(ddenlovr_blitter_irq_ack_w ) // Blitter irq acknowledge | |
| 3103 | AM_RANGE(0xe00304, 0xe00307) AM_WRITE(MWA16_RAM ) AM_BASE( &akamaru_dsw_sel ) // DSW select | |
| 3104 | AM_RANGE(0xe00308, 0xe00309) AM_WRITE(ddenlovr_coincounter_0_w ) // Coin Counters | |
| 3105 | AM_RANGE(0xe0030c, 0xe0030d) AM_WRITE(ddenlovr_coincounter_1_w ) // | |
| 3106 | AM_RANGE(0xe00400, 0xe00401) AM_WRITE(YM2413_register_port_0_lsb_w ) | |
| 3107 | AM_RANGE(0xe00402, 0xe00403) AM_WRITE(YM2413_data_port_0_lsb_w ) | |
| 3108 | AM_RANGE(0xe00500, 0xe0051f) AM_WRITE(msm6242_lsb_w ) // 6242RTC | |
| 3109 | AM_RANGE(0xe00600, 0xe00601) AM_WRITE(AY8910_control_port_0_lsb_w ) | |
| 3110 | AM_RANGE(0xe00602, 0xe00603) AM_WRITE(AY8910_write_port_0_lsb_w ) | |
| 3111 | AM_RANGE(0xe00700, 0xe00701) AM_WRITE(OKIM6295_data_0_lsb_w ) | |
| 3112 | AM_RANGE(0xff0000, 0xffffff) AM_WRITE(MWA16_RAM ) // RAM | |
| 3113 | ADDRESS_MAP_END | |
| 3114 | ||
| 3115 | ||
| 3116 | INPUT_PORTS_START( ddenlvrj ) | |
| 3117 | PORT_START // IN0 - Player 1 | |
| 3118 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) | |
| 3119 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) | |
| 3120 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) | |
| 3121 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) | |
| 3122 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) | |
| 3123 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 3124 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 3125 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 3126 | ||
| 3127 | PORT_START // IN1 - Player 2 | |
| 3128 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START2 ) | |
| 3129 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) | |
| 3130 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) | |
| 3131 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) | |
| 3132 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) | |
| 3133 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 3134 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 3135 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 3136 | ||
| 3137 | PORT_START // IN2 - Coins + ? | |
| 3138 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 3139 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 3140 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 3141 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) /* Test */ | |
| 3142 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) // blitter busy flag | |
| 3143 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) // blitter irq flag? | |
| 3144 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) // RTC | |
| 3145 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) | |
| 3146 | ||
| 3147 | PORT_START // IN3 - DSW1 | |
| 3148 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) | |
| 3149 | PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) | |
| 3150 | PORT_DIPSETTING( 0x01, DEF_STR( 2C_1C ) ) | |
| 3151 | PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) | |
| 3152 | PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) | |
| 3153 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) ) | |
| 3154 | PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) | |
| 3155 | PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) | |
| 3156 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) ) | |
| 3157 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) ) | |
| 3158 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Demo_Sounds ) ) | |
| 3159 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 3160 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) | |
| 3161 | PORT_DIPNAME( 0x20, 0x20, "Helps" ) | |
| 3162 | PORT_DIPSETTING( 0x20, "1" ) | |
| 3163 | PORT_DIPSETTING( 0x00, "2" ) | |
| 3164 | PORT_DIPNAME( 0x40, 0x40, "Unknown 1-6" ) | |
| 3165 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 3166 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 3167 | PORT_DIPNAME( 0x80, 0x80, "Unknown 1-7" ) | |
| 3168 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 3169 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 3170 | ||
| 3171 | PORT_START // IN4 - DSW2 | |
| 3172 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Difficulty ) ) | |
| 3173 | PORT_DIPSETTING( 0x06, "1 (Easy)" ) | |
| 3174 | PORT_DIPSETTING( 0x05, "2" ) | |
| 3175 | PORT_DIPSETTING( 0x04, "3" ) | |
| 3176 | PORT_DIPSETTING( 0x07, "4 (Normal)" ) | |
| 3177 | PORT_DIPSETTING( 0x03, "5" ) | |
| 3178 | PORT_DIPSETTING( 0x02, "6" ) | |
| 3179 | PORT_DIPSETTING( 0x01, "7" ) | |
| 3180 | PORT_DIPSETTING( 0x00, "8 (Hard)" ) | |
| 3181 | PORT_DIPNAME( 0x18, 0x18, "Timer Speed" ) | |
| 3182 | PORT_DIPSETTING( 0x10, "Slow" ) | |
| 3183 | PORT_DIPSETTING( 0x18, DEF_STR( Normal ) ) | |
| 3184 | PORT_DIPSETTING( 0x08, "Fast" ) | |
| 3185 | PORT_DIPSETTING( 0x00, "Fastest" ) | |
| 3186 | PORT_DIPNAME( 0x20, 0x20, "Unknown 2-5" ) | |
| 3187 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 3188 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 3189 | PORT_DIPNAME( 0x40, 0x40, "Unknown 2-6" ) | |
| 3190 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 3191 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 3192 | PORT_DIPNAME( 0x80, 0x80, "Unknown 2-7" ) | |
| 3193 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 3194 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 3195 | ||
| 3196 | PORT_START // IN5 - DSW1 & 2 top bits | |
| 3197 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) | |
| 3198 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 3199 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 3200 | PORT_SERVICE( 0x02, IP_ACTIVE_LOW ) | |
| 3201 | PORT_DIPNAME( 0x04, 0x04, "Unknown 2-8" ) | |
| 3202 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 3203 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 3204 | PORT_DIPNAME( 0x08, 0x08, "Unknown 2-9" ) | |
| 3205 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 3206 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 3207 | PORT_DIPNAME( 0x10, 0x10, "Unknown 3-4" ) | |
| 3208 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 3209 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 3210 | PORT_DIPNAME( 0x20, 0x20, "Unknown 3-5" ) | |
| 3211 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 3212 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 3213 | PORT_DIPNAME( 0x40, 0x40, "Unknown 3-6" ) | |
| 3214 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 3215 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 3216 | PORT_DIPNAME( 0x80, 0x00, "Force Test Mode?" ) // shows all dsw's as off | |
| 3217 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) | |
| 3218 | PORT_DIPSETTING( 0x80, DEF_STR( Yes ) ) | |
| 3219 | INPUT_PORTS_END | |
| 3220 | ||
| 3221 | ||
| 2952 | 3222 | INPUT_PORTS_START( ddenlovr ) |
| 2953 | 3223 | PORT_START // IN0 - Player 1 |
| 2954 | 3224 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) |
| r1037 | r1038 | |
| 2958 | 3228 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) |
| 2959 | 3229 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 2960 | 3230 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 2961 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_ | |
| 3231 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_ | |
| 2962 | 3232 | |
| 2963 | 3233 | PORT_START // IN1 - Player 2 |
| 2964 | 3234 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START2 ) |
| r1037 | r1038 | |
| 2968 | 3238 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) |
| 2969 | 3239 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 2970 | 3240 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 2971 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_ | |
| 3241 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_ | |
| 2972 | 3242 | |
| 2973 | 3243 | PORT_START // IN2 - Coins + ? |
| 2974 | 3244 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r1037 | r1038 | |
| 2980 | 3250 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) // blitter irq flag |
| 2981 | 3251 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) // blitter busy flag |
| 2982 | 3252 | |
| 2983 | /* one of the dips selects the nudity level */ | |
| 2984 | 3253 | PORT_START // IN3 - DSW |
| 2985 | 3254 | PORT_SERVICE( 0x01, IP_ACTIVE_LOW ) |
| 2986 | 3255 | PORT_DIPNAME( 0x02, 0x02, "Unknown 1-1" ) |
| r1037 | r1038 | |
| 2995 | 3264 | PORT_DIPNAME( 0x10, 0x10, "Unknown 1-4" ) |
| 2996 | 3265 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) |
| 2997 | 3266 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2998 | PORT_DIPNAME( 0x20, 0x20, "Unknown 1-5*" ) | |
| 2999 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 3000 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 3001 | PORT_DIPNAME( 0x40, 0x40, "Unknown 1-6*" ) // 6&7 | |
| 3002 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 3003 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 3004 | PORT_DIPNAME( 0x80, 0x80, "Unknown 1-7*" ) | |
| 3005 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 3006 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 3267 | PORT_DIPNAME( 0x20, 0x20, "Comments / Help" ) | |
| 3268 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) | |
| 3269 | PORT_DIPSETTING( 0x20, DEF_STR( Yes ) ) | |
| 3270 | PORT_DIPNAME( 0xc0, 0xc0, "Show Girl" ) | |
| 3271 | PORT_DIPSETTING( 0x80, DEF_STR( No ) ) | |
| 3272 | PORT_DIPSETTING( 0x40, "Yes, Clothed" ) | |
| 3273 | PORT_DIPSETTING( 0xc0, "Yes, Bikini" ) | |
| 3274 | PORT_DIPSETTING( 0x00, "Yes, Topless" ) | |
| 3007 | 3275 | INPUT_PORTS_END |
| 3008 | 3276 | |
| 3009 | 3277 | |
| r1037 | r1038 | |
| 5374 | 5642 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 5375 | 5643 | INPUT_PORTS_END |
| 5376 | 5644 | |
| 5645 | INPUT_PORTS_START( akamaru ) | |
| 5646 | PORT_START // IN0 - Player 1 | |
| 5647 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) | |
| 5648 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) | |
| 5649 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) | |
| 5650 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) | |
| 5651 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) | |
| 5652 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 5653 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 5654 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 5377 | 5655 | |
| 5656 | PORT_START // IN1 - Player 2 | |
| 5657 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START2 ) | |
| 5658 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) | |
| 5659 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) | |
| 5660 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) | |
| 5661 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) | |
| 5662 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 5663 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 5664 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 5665 | ||
| 5666 | PORT_START // IN2 - Coins + ? | |
| 5667 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 5668 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 5669 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 5670 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) /* Test */ | |
| 5671 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 5672 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SPECIAL ) | |
| 5673 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) // blitter irq flag | |
| 5674 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) // blitter busy flag | |
| 5675 | ||
| 5676 | PORT_START // IN3 - DSW1 | |
| 5677 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) | |
| 5678 | PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) | |
| 5679 | PORT_DIPSETTING( 0x01, DEF_STR( 2C_1C ) ) | |
| 5680 | PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) | |
| 5681 | PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) | |
| 5682 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) ) | |
| 5683 | PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) | |
| 5684 | PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) | |
| 5685 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) ) | |
| 5686 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) ) | |
| 5687 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Demo_Sounds ) ) | |
| 5688 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 5689 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) | |
| 5690 | PORT_DIPNAME( 0x20, 0x20, "Unknown 1-5" ) | |
| 5691 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 5692 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 5693 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) ) | |
| 5694 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 5695 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 5696 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) | |
| 5697 | ||
| 5698 | PORT_START // IN4 - DSW2 | |
| 5699 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) | |
| 5700 | PORT_DIPSETTING( 0x02, DEF_STR( Easy ) ) | |
| 5701 | PORT_DIPSETTING( 0x03, DEF_STR( Normal ) ) | |
| 5702 | PORT_DIPSETTING( 0x01, DEF_STR( Hard ) ) | |
| 5703 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) | |
| 5704 | PORT_DIPNAME( 0x04, 0x04, "Unknown 2-2" ) | |
| 5705 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 5706 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 5707 | PORT_DIPNAME( 0x08, 0x08, "Unknown 2-3" ) | |
| 5708 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 5709 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 5710 | PORT_DIPNAME( 0x10, 0x10, "Unknown 2-4" ) | |
| 5711 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 5712 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 5713 | PORT_DIPNAME( 0x20, 0x20, "Unknown 2-5" ) | |
| 5714 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 5715 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 5716 | PORT_DIPNAME( 0x40, 0x40, "Unknown 2-6" ) | |
| 5717 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 5718 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 5719 | PORT_DIPNAME( 0x80, 0x80, "Unknown 2-7" ) | |
| 5720 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 5721 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 5722 | INPUT_PORTS_END | |
| 5723 | ||
| 5724 | ||
| 5378 | 5725 | /*************************************************************************** |
| 5379 | 5726 | Don Den Lover Vol.1 |
| 5380 | 5727 | ***************************************************************************/ |
| r1037 | r1038 | |
| 5414 | 5761 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) |
| 5415 | 5762 | MACHINE_DRIVER_END |
| 5416 | 5763 | |
| 5764 | static MACHINE_DRIVER_START( ddenlvrj ) | |
| 5765 | ||
| 5766 | /* basic machine hardware */ | |
| 5767 | MDRV_IMPORT_FROM(ddenlovr) | |
| 5768 | MDRV_CPU_MODIFY("main") | |
| 5769 | MDRV_CPU_PROGRAM_MAP(ddenlvrj_readmem,ddenlvrj_writemem) | |
| 5770 | MACHINE_DRIVER_END | |
| 5771 | ||
| 5772 | static MACHINE_DRIVER_START( akamaru ) | |
| 5773 | ||
| 5774 | /* basic machine hardware */ | |
| 5775 | MDRV_IMPORT_FROM(ddenlovr) | |
| 5776 | MDRV_CPU_MODIFY("main") | |
| 5777 | MDRV_CPU_PROGRAM_MAP(akamaru_readmem,akamaru_writemem) | |
| 5778 | MACHINE_DRIVER_END | |
| 5779 | ||
| 5780 | ||
| 5417 | 5781 | static struct AY8910interface quiz365_ay8910_interface = |
| 5418 | 5782 | { |
| 5419 | 5783 | quiz365_input_r, |
| r1037 | r1038 | |
| 6145 | 6509 | |
| 6146 | 6510 | /*************************************************************************** |
| 6147 | 6511 | |
| 6512 | Don Den Lover Vol.1 -Shiro Kuro Tsukeyo!- | |
| 6513 | (c)1995 Dynax | |
| 6514 | D1120901L8 | |
| 6515 | ||
| 6516 | CPU: 68000(surface scratched) | |
| 6517 | Sound: YM2413(OPLL) | |
| 6518 | YMZ284-D(AY-3-8910 without I/O ports) | |
| 6519 | M6295 | |
| 6520 | OSC: 2x ?MHz (surface-scratched) | |
| 6521 | Video: HD46505SP-2(HD68B45SP) | |
| 6522 | Others: Battery, RTC 62421B | |
| 6523 | All custom chips, PALs, GALs are surface-scratched. | |
| 6524 | ||
| 6525 | ROMs: | |
| 6526 | 1121.2N [e2b8359e] \ | |
| 6527 | 1122.2M [e8619d66] -- Samples | |
| 6528 | ||
| 6529 | 1123.2H [d41cbed0] \ | |
| 6530 | 1124.2D [6a9ec557] -- Programs | |
| 6531 | ||
| 6532 | 1125.2B [0181f53c] \ | |
| 6533 | 1126.2A [17ff2df4] | | |
| 6534 | 1127.3D [9c136914] |- Blitter data | |
| 6535 | 1128.3C [757c9941] | | |
| 6536 | 1129.3B [957bc57e] / | |
| 6537 | ||
| 6538 | ***************************************************************************/ | |
| 6539 | ||
| 6540 | ROM_START( ddenlvrj ) | |
| 6541 | ROM_REGION( 0x080000, REGION_CPU1, 0 ) /* 68000 Code */ | |
| 6542 | ROM_LOAD16_BYTE( "1124.2d", 0x000000, 0x040000, CRC(6a9ec557) SHA1(e1512601910a9d06e16a20e10ab7acc96a0819bd) ) | |
| 6543 | ROM_LOAD16_BYTE( "1123.2h", 0x000001, 0x040000, CRC(d41cbed0) SHA1(5c80f6a6cf15518120f664a0446355e80eeb2a0f) ) | |
| 6544 | ||
| 6545 | ROM_REGION( 0xe80000, REGION_GFX1, 0 ) /* blitter data */ | |
| 6546 | /* 000000-bfffff empty */ | |
| 6547 | ROM_LOAD( "1125.2b", 0xc00000, 0x080000, CRC(0181f53c) SHA1(64a6a2f00f81f7181700b83912033a6ee8bbf73a) ) | |
| 6548 | ROM_LOAD( "1126.2a", 0xc80000, 0x080000, CRC(17ff2df4) SHA1(7b6723e0a0f471698735a31aa19dc4ebabe35e8c) ) | |
| 6549 | ROM_LOAD( "1127.3d", 0xd00000, 0x080000, CRC(9c136914) SHA1(ff1f9a90814523cafdaa2ed36926482b1078aa89) ) | |
| 6550 | ROM_LOAD( "1128.3c", 0xd80000, 0x080000, CRC(757c9941) SHA1(31206112d4b20369b6584cae75dbe3b3e0ca9825) ) | |
| 6551 | ROM_LOAD( "1129.3b", 0xe00000, 0x080000, CRC(957bc57e) SHA1(801f5cc4e9da8b46dcd9488741585a5c8c88b51a) ) | |
| 6552 | ||
| 6553 | ROM_REGION( 0x200000, REGION_SOUND1, 0 ) /* Samples */ | |
| 6554 | ROM_LOAD( "1122.2m", 0x080000, 0x080000, CRC(e8619d66) SHA1(b40db5db1bd0a12cd66eb5192e53ddc5b85bd1cf) ) // bank 4, 5 | |
| 6555 | ROM_LOAD( "1121.2n", 0x100000, 0x080000, CRC(e2b8359e) SHA1(d882635370405610a1707d9e39a0d8e025ad6e22) ) // bank 2, 3 | |
| 6556 | ROM_END | |
| 6557 | ||
| 6558 | ||
| 6559 | /*************************************************************************** | |
| 6560 | ||
| 6148 | 6561 | Don Den Lover Vol 1 |
| 6149 | 6562 | (C) Dynax Inc 1995 |
| 6150 | 6563 | |
| r1037 | r1038 | |
| 6181 | 6594 | ROM_LOAD( "1132h.1e", 0x100000, 0x080000, CRC(2de6363d) SHA1(2000328e41bc0261f19e02323434e9dfdc61013a) ) // bank 4, 5 |
| 6182 | 6595 | ROM_END |
| 6183 | 6596 | |
| 6597 | /* Korean bootleg board */ | |
| 6598 | ROM_START( ddenlovb ) | |
| 6599 | ROM_REGION( 0x080000, REGION_CPU1, 0 ) /* 68000 Code */ | |
| 6600 | ROM_LOAD16_BYTE( "rom2", 0x000000, 0x040000, CRC(cabdf78f) SHA1(789d4754c7b84964ee317b8a618f26a417f50bcc) ) | |
| 6601 | ROM_LOAD16_BYTE( "rom3", 0x000001, 0x040000, CRC(36f8d05e) SHA1(78f75175541ebf377f5375ea30d80ea91f380971) ) | |
| 6184 | 6602 | |
| 6603 | ROM_REGION( 0x480000, REGION_GFX1, 0 ) /* blitter data */ | |
| 6604 | ROM_LOAD( "rom4", 0x000000, 0x080000, CRC(ee143d8e) SHA1(61a36c64d450209071e996b418adf416dfa68fd9) ) | |
| 6605 | ROM_LOAD( "rom5", 0x080000, 0x080000, CRC(58a662be) SHA1(3e2fc167bdee74ebfa63c3b1b0d822e3d898c30c) ) | |
| 6606 | ROM_LOAD( "rom6", 0x100000, 0x080000, CRC(f96e0708) SHA1(e910970a4203b9b1943c853e3d869dd43cdfbc2d) ) | |
| 6607 | ROM_LOAD( "rom7", 0x180000, 0x080000, CRC(b47e27ec) SHA1(5a36e68eb7c868ce8ca9d11bd9bcaa7f101ee64f) ) | |
| 6608 | ROM_LOAD( "rom8", 0x200000, 0x080000, CRC(7c7beef6) SHA1(f8631aaec7cc01cc6478f3fc95fdac51c5b5d226) ) | |
| 6609 | ||
| 6610 | ROM_REGION( 0x200000, REGION_SOUND1, 0 ) /* Samples */ | |
| 6611 | ROM_LOAD( "rom1", 0x100000, 0x080000, CRC(ba4723e8) SHA1(fd32b33bd43773fed083990b59a3994f4a631b04) ) | |
| 6612 | ROM_END | |
| 6613 | ||
| 6185 | 6614 | static DRIVER_INIT( rongrong ) |
| 6186 | 6615 | { |
| 6187 | 6616 | /* Rong Rong seems to have a protection that works this way: |
| r1037 | r1038 | |
| 6820 | 7249 | ROM_LOAD( "1.1e", 0x00000, 0x20000, CRC(09b7a9b2) SHA1(64d9ccbb726bb6c5b362afc92bca2e3db87fd454) ) |
| 6821 | 7250 | ROM_END |
| 6822 | 7251 | |
| 6823 | GAME( 1992, mmpanic, 0, mmpanic, mmpanic, 0, ROT0, "Nakanihon + East Technology (Taito license)", "Monkey Mole Panic (USA)", GAME_NO_COCKTAIL ) | |
| 6824 | GAME( 1993, funkyfig, 0, funkyfig, funkyfig, 0, ROT0, "Nakanihon + East Technology (Taito license)", "The First Funky Fighter", GAME_NO_COCKTAIL | GAME_IMPERFECT_GRAPHICS ) // scrolling, priority? | |
| 6825 | GAME( 1993, quizchq, 0, quizchq, quizchq, 0, ROT0, "Nakanihon", "Quiz Channel Question (Ver 1.00) (Japan)", GAME_NO_COCKTAIL | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) | |
| 6826 | GAME( 1993, quizchql, quizchq, quizchq, quizchq, 0, ROT0, "Nakanihon (Laxan license)", "Quiz Channel Question (Ver 1.23) (Taiwan?)", GAME_NO_COCKTAIL | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) | |
| 6827 | GAME( 1993, animaljr, 0, mmpanic, animaljr, 0, ROT0, "Nakanihon + East Technology (Taito license)", "Animalandia Jr.", GAME_NO_COCKTAIL | GAME_IMPERFECT_SOUND ) | |
| 6828 | GAME( 1994, hginga, 0, hginga, hginga, 0, ROT0, "Dynax", "Hanafuda Hana Ginga", GAME_NO_COCKTAIL ) | |
| 6829 | GAME( 1994, mjmyster, 0, mjmyster, mjmyster, 0, ROT0, "Dynax", "Mahjong The Mysterious World", GAME_NO_COCKTAIL ) | |
| 6830 | GAME( 1994, mjmywrld, mjmyster,mjmywrld, mjmyster, 0, ROT0, "Dynax", "Mahjong The Mysterious World (set 2)", GAME_NO_COCKTAIL ) | |
| 6831 | GAME( 1994, mjmyornt, 0, mjmyornt, mjmyornt, 0, ROT0, "Dynax", "Mahjong The Mysterious Orient", GAME_NO_COCKTAIL ) | |
| 6832 | GAME( 1994, mjmyuniv, 0, mjmyuniv, mjmyster, 0, ROT0, "Dynax", "Mahjong The Mysterious Universe", GAME_NO_COCKTAIL ) | |
| 6833 | GAME( 1994, quiz365, 0, quiz365, quiz365, 0, ROT0, "Nakanihon", "Quiz 365 (Japan)", GAME_NO_COCKTAIL | GAME_IMPERFECT_GRAPHICS | GAME_UNEMULATED_PROTECTION ) | |
| 6834 | GAME( 1994, quiz365t, quiz365, quiz365, quiz365, 0, ROT0, "Nakanihon + Taito", "Quiz 365 (Hong Kong & Taiwan)", GAME_NO_COCKTAIL | GAME_IMPERFECT_GRAPHICS | GAME_UNEMULATED_PROTECTION ) | |
| 6835 | GAME( 1994, rongrong, 0, rongrong, rongrong, rongrong, ROT0, "Nakanihon", "Rong Rong (Europe)", GAME_NO_COCKTAIL | GAME_IMPERFECT_COLORS ) | |
| 6836 | GAME( 1994, rongrngg, rongrong,rongrong, rongrong, rongrong, ROT0, "Nakanihon", "Rong Rong (Germany)", GAME_NO_COCKTAIL | GAME_IMPERFECT_COLORS ) | |
| 6837 | GAME( 1995, mjdchuka, 0, mjchuuka, mjchuuka, 0, ROT0, "Dynax", "Mahjong The Dai Chuuka Ken (China, v. D111)",GAME_NO_COCKTAIL ) | |
| 6838 | GAME( 1995, nettoqc, 0, nettoqc, nettoqc, 0, ROT0, "Nakanihon", "Nettoh Quiz Champion (Japan)", GAME_NO_COCKTAIL | GAME_IMPERFECT_COLORS ) | |
| 6839 | GAME( 1996, ddenlovr, 0, ddenlovr, ddenlovr, 0, ROT0, "Dynax", "Don Den Lover Vol. 1 (Hong Kong)", GAME_NO_COCKTAIL ) | |
| 6840 | GAME( 1996, hanakanz, 0, hanakanz, hanakanz, 0, ROT0, "Dynax", "Hana Kanzashi (Japan)", GAME_NO_COCKTAIL ) | |
| 6841 | GAME( 1997, hkagerou, 0, hkagerou, hkagerou, 0, ROT0, "Nakanihon + Dynax", "Hana Kagerou [BET] (Japan)", GAME_NO_COCKTAIL ) | |
| 6842 | GAME( 1998, mjchuuka, 0, mjchuuka, mjchuuka, 0, ROT0, "Dynax", "Mahjong Chuukanejyo (China)", GAME_NO_COCKTAIL ) | |
| 6843 | GAME( 1998, mjreach1, 0, mjreach1, mjreach1, 0, ROT0, "Nihon System", "Mahjong Reach Ippatsu (Japan)", GAME_NO_COCKTAIL ) | |
| 7252 | /*************************************************************************** | |
| 7253 | ||
| 7254 | Panel & Variety Akamaru Q Jousyou Dont-R | |
| 7255 | (c)1996 Dynax (distributed by B&F) | |
| 7256 | ||
| 7257 | CPU: TMP68HC000N-12 | |
| 7258 | Sound: YM2413, YMZ284-D, M6295 (VRx2, 1 for BGM, 1 for Voice) | |
| 7259 | OSC: 24.00000MHz (near CPU), 28.63636MHz (near sound section) | |
| 7260 | RTC: 62421B | |
| 7261 | Custom: NAKANIHON NL-005 | |
| 7262 | PLD: Actel A1010B (printed NM500) | |
| 7263 | ||
| 7264 | ROMs (on subboard): | |
| 7265 | 50101.1H (TMS 27C040) | |
| 7266 | 50102.1G (TMS 27C040) | |
| 7267 | 50103.1F (TMS 27C040) | |
| 7268 | 50104.1E (TMS 27C040) | |
| 7269 | 50105.1D (TMS 27C040) | |
| 7270 | 50106.1C (TMS 27C040) | |
| 7271 | 50107.1B (TMS 27C040) | |
| 7272 | 50108.1A (TMS 27C040) | |
| 7273 | 50109.2H (TC538000) | |
| 7274 | 50110.3H (TC538000) | |
| 7275 | 50111.4H (TMS 27C040) | |
| 7276 | 50112.2D (TC538000) | |
| 7277 | 50113.3D (TMS 27C040) | |
| 7278 | 50114.4D (TMS 27C040) | |
| 7279 | ||
| 7280 | ***************************************************************************/ | |
| 7281 | ||
| 7282 | ROM_START( akamaru ) | |
| 7283 | ROM_REGION( 0x200000, REGION_CPU1, 0 ) /* 68000 Code */ | |
| 7284 | ROM_LOAD16_BYTE( "50107.1b", 0x000000, 0x080000, CRC(8364d627) SHA1(ed445561b3a35e6445d1074000621554a6f26fc4) ) | |
| 7285 | ROM_LOAD16_BYTE( "50105.1d", 0x000001, 0x080000, CRC(42ff4bec) SHA1(4bab20706542056d39dfcd91314523bf0f7fff07) ) | |
| 7286 | ROM_LOAD16_BYTE( "50108.1a", 0x100000, 0x080000, CRC(1520ecad) SHA1(eaf44511148252eac0c7a7aab9bd689f87e5a40f) ) | |
| 7287 | ROM_LOAD16_BYTE( "50106.1c", 0x100001, 0x080000, CRC(8e081747) SHA1(ef7fb469455671ca7982c2455e8cb113c2750e30) ) | |
| 7288 | ||
| 7289 | ROM_REGION( 0x480000, REGION_GFX1, 0 ) /* blitter data */ | |
| 7290 | ROM_LOAD( "50109.2h", 0x000000, 0x100000, CRC(cdff154d) SHA1(d9cdf159cd55fef0dd1abe07c2f19f05f63b2d1e) ) | |
| 7291 | ROM_LOAD( "50112.2d", 0x100000, 0x100000, CRC(7fdd9853) SHA1(d4ada01fa49b2932d02df5eb3d3e7eaad535df0b) ) | |
| 7292 | ROM_LOAD( "50110.3h", 0x200000, 0x100000, CRC(06ca4d87) SHA1(c80708df3613d36950ba5cc98d36336533ee7699) ) | |
| 7293 | ROM_LOAD( "50113.3d", 0x300000, 0x080000, CRC(c9a571cd) SHA1(6493d458a8adc0774d6c0ff67ba272a8f6e9ce07) ) | |
| 7294 | ROM_LOAD( "50111.4h", 0x380000, 0x080000, CRC(b2de7a3c) SHA1(12b3e59f09dbad35a7a98e55ba64041cdb341488) ) | |
| 7295 | ROM_LOAD( "50114.4d", 0x400000, 0x080000, CRC(2af39dfd) SHA1(61cfced3807a80be3233d1df3eedad25b796a9cf) ) | |
| 7296 | ||
| 7297 | ROM_REGION( 0x300000, REGION_SOUND1, 0 ) /* Samples */ | |
| 7298 | // bank 0, 1 | |
| 7299 | ROM_LOAD( "50101.1h", 0x080000, 0x080000, CRC(6bef6cab) SHA1(bd1c7e06ac4fc9de368ad90f0a9fc602024eda35) ) // bank 2, 3 | |
| 7300 | ROM_LOAD( "50102.1g", 0x100000, 0x080000, CRC(056ac348) SHA1(26c34692dc858928268299743857c69e00eb969d) ) // bank 4, 5 | |
| 7301 | // bank 6, 7 | |
| 7302 | ROM_LOAD( "50104.1e", 0x200000, 0x080000, CRC(790f18c1) SHA1(72c1c6f711267e1b57dedad04bac44e3e0829725) ) // bank 8, 9 | |
| 7303 | ROM_LOAD( "50103.1f", 0x280000, 0x080000, CRC(aff3a753) SHA1(1ee4464107531d90a1decb85c5a0fb937dd6706b) ) // bank 10, 11 | |
| 7304 | ROM_END | |
| 7305 | ||
| 7306 | ||
| 7307 | GAME( 1992, mmpanic, 0, mmpanic, mmpanic, 0, ROT0, "Nakanihon + East Technology (Taito license)", "Monkey Mole Panic (USA)", GAME_NO_COCKTAIL ) | |
| 7308 | GAME( 1993, funkyfig, 0, funkyfig, funkyfig, 0, ROT0, "Nakanihon + East Technology (Taito license)", "The First Funky Fighter", GAME_NO_COCKTAIL | GAME_IMPERFECT_GRAPHICS ) // scrolling, priority? | |
| 7309 | GAME( 1993, quizchq, 0, quizchq, quizchq, 0, ROT0, "Nakanihon", "Quiz Channel Question (Ver 1.00) (Japan)", GAME_NO_COCKTAIL | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) | |
| 7310 | GAME( 1993, quizchql, quizchq, quizchq, quizchq, 0, ROT0, "Nakanihon (Laxan license)", "Quiz Channel Question (Ver 1.23) (Taiwan?)", GAME_NO_COCKTAIL | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) | |
| 7311 | GAME( 1993, animaljr, 0, mmpanic, animaljr, 0, ROT0, "Nakanihon + East Technology (Taito license)", "Animalandia Jr.", GAME_NO_COCKTAIL | GAME_IMPERFECT_SOUND ) | |
| 7312 | GAME( 1994, hginga, 0, hginga, hginga, 0, ROT0, "Dynax", "Hanafuda Hana Ginga", GAME_NO_COCKTAIL ) | |
| 7313 | GAME( 1994, mjmyster, 0, mjmyster, mjmyster, 0, ROT0, "Dynax", "Mahjong The Mysterious World", GAME_NO_COCKTAIL ) | |
| 7314 | GAME( 1994, mjmywrld, mjmyster, mjmywrld, mjmyster, 0, ROT0, "Dynax", "Mahjong The Mysterious World (set 2)", GAME_NO_COCKTAIL ) | |
| 7315 | GAME( 1994, mjmyornt, 0, mjmyornt, mjmyornt, 0, ROT0, "Dynax", "Mahjong The Mysterious Orient", GAME_NO_COCKTAIL ) | |
| 7316 | GAME( 1994, mjmyuniv, 0, mjmyuniv, mjmyster, 0, ROT0, "Dynax", "Mahjong The Mysterious Universe", GAME_NO_COCKTAIL ) | |
| 7317 | GAME( 1994, quiz365, 0, quiz365, quiz365, 0, ROT0, "Nakanihon", "Quiz 365 (Japan)", GAME_NO_COCKTAIL | GAME_IMPERFECT_GRAPHICS | GAME_UNEMULATED_PROTECTION ) | |
| 7318 | GAME( 1994, quiz365t, quiz365, quiz365, quiz365, 0, ROT0, "Nakanihon + Taito", "Quiz 365 (Hong Kong & Taiwan)", GAME_NO_COCKTAIL | GAME_IMPERFECT_GRAPHICS | GAME_UNEMULATED_PROTECTION ) | |
| 7319 | GAME( 1994, rongrong, 0, rongrong, rongrong, rongrong, ROT0, "Nakanihon", "Rong Rong (Europe)", GAME_NO_COCKTAIL | GAME_IMPERFECT_COLORS ) | |
| 7320 | GAME( 1994, rongrngg, rongrong, rongrong, rongrong, rongrong, ROT0, "Nakanihon", "Rong Rong (Germany)", GAME_NO_COCKTAIL | GAME_IMPERFECT_COLORS ) | |
| 7321 | GAME( 1995, mjdchuka, 0, mjchuuka, mjchuuka, 0, ROT0, "Dynax", "Mahjong The Dai Chuuka Ken (China, v. D111)", GAME_NO_COCKTAIL ) | |
| 7322 | GAME( 1995, nettoqc, 0, nettoqc, nettoqc, 0, ROT0, "Nakanihon", "Nettoh Quiz Champion (Japan)", GAME_NO_COCKTAIL | GAME_IMPERFECT_COLORS ) | |
| 7323 | GAME( 1995, ddenlvrj, 0, ddenlvrj, ddenlvrj, 0, ROT0, "Dynax", "Don Den Lover Vol. 1 - Shiro Kuro Tsukeyo! (Japan)", GAME_NO_COCKTAIL ) | |
| 7324 | GAME( 1996, ddenlovr, ddenlvrj, ddenlovr, ddenlovr, 0, ROT0, "Dynax", "Don Den Lover Vol. 1 (Hong Kong)", GAME_NO_COCKTAIL ) | |
| 7325 | GAME( 1996, ddenlovb, ddenlvrj, ddenlovr, ddenlovr, 0, ROT0, "[Dynax] (bootleg)", "Don Den Lover Vol. 1 (Korea, bootleg)", GAME_NO_COCKTAIL ) | |
| 7326 | GAME( 1996, hanakanz, 0, hanakanz, hanakanz, 0, ROT0, "Dynax", "Hana Kanzashi (Japan)", GAME_NO_COCKTAIL ) | |
| 7327 | GAME( 1996, akamaru, 0, akamaru, akamaru, 0, ROT0, "Dynax (Nakanihon licence)", "Panel & Variety Akamaru Q Jousyou Dont-R", GAME_NO_COCKTAIL ) | |
| 7328 | GAME( 1997, hkagerou, 0, hkagerou, hkagerou, 0, ROT0, "Nakanihon + Dynax", "Hana Kagerou [BET] (Japan)", GAME_NO_COCKTAIL ) | |
| 7329 | GAME( 1998, mjchuuka, 0, mjchuuka, mjchuuka, 0, ROT0, "Dynax", "Mahjong Chuukanejyo (China)", GAME_NO_COCKTAIL ) | |
| 7330 | GAME( 1998, mjreach1, 0, mjreach1, mjreach1, 0, ROT0, "Nihon System", "Mahjong Reach Ippatsu (Japan)", GAME_NO_COCKTAIL ) |
| r1037 | r1038 | |
|---|---|---|
| 2714 | 2714 | return 0; |
| 2715 | 2715 | } |
| 2716 | 2716 | |
| 2717 | #ifdef UNUSED_FUNCTION | |
| 2717 | 2718 | static WRITE8_HANDLER( dealem_pal_w ) |
| 2718 | 2719 | { |
| 2719 | 2720 | switch (data) |
| r1037 | r1038 | |
| 2725 | 2726 | } |
| 2726 | 2727 | } |
| 2727 | 2728 | } |
| 2729 | #endif | |
| 2728 | 2730 | |
| 2729 | 2731 | static ADDRESS_MAP_START( dealem_memmap, ADDRESS_SPACE_PROGRAM, 8 ) |
| 2730 | 2732 |
| r1037 | r1038 | |
|---|---|---|
| 94 | 94 | return 0xff; |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | #ifdef UNUSED_FUNCTION | |
| 97 | 98 | static READ8_HANDLER( ret_00 ) |
| 98 | 99 | { |
| 99 | 100 | return 0x00; |
| 100 | 101 | } |
| 102 | #endif | |
| 101 | 103 | |
| 102 | 104 | static UINT8 skylncr_nmi_enable; |
| 103 | 105 |
| r1037 | r1038 | |
|---|---|---|
| 24 | 24 | TODO: |
| 25 | 25 | - Starfield. |
| 26 | 26 | |
| 27 | - Sound seems to be AWOL in Galaga? | |
| 28 | ||
| 29 | 27 | - Convert to tilemaps & optimize video rendering, I was just too lazy to do it for now. |
| 30 | 28 | |
| 31 | 29 | - Check the ASCI interface, there probably is fully working debug code. |
| r1037 | r1038 | |
| 144 | 142 | |
| 145 | 143 | static ADDRESS_MAP_START( 20pacgal_port, ADDRESS_SPACE_IO, 8 ) |
| 146 | 144 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) |
| 147 | AM_RANGE(0x | |
| 145 | AM_RANGE(0x00, 0x3f) AM_NOP /* Z180 internal registers */ | |
| 148 | 146 | AM_RANGE(0x40, 0x7f) AM_NOP /* Z180 internal registers */ |
| 149 | 147 | AM_RANGE(0x80, 0x80) AM_READ(input_port_0_r) |
| 150 | 148 | AM_RANGE(0x81, 0x81) AM_READ(input_port_1_r) |
| r1037 | r1038 | |
| 228 | 226 | { -1 } |
| 229 | 227 | }; |
| 230 | 228 | |
| 231 | ||
| 232 | ||
| 233 | INTERRUPT_GEN(_20pacgal_kludge) | |
| 234 | { | |
| 235 | cpunum_set_input_line( 0, Z180_INT_PRT0, PULSE_LINE ); | |
| 236 | } | |
| 237 | ||
| 238 | ||
| 239 | 229 | static struct namco_interface namco_interface = |
| 240 | 230 | { |
| 241 | 231 | 3, /* number of voices */ |
| r1037 | r1038 | |
| 249 | 239 | MDRV_CPU_PROGRAM_MAP(20pacgal_map,0) |
| 250 | 240 | MDRV_CPU_IO_MAP(20pacgal_port,0) |
| 251 | 241 | MDRV_CPU_VBLANK_INT(irq0_line_assert,1) |
| 252 | MDRV_CPU_PERIODIC_INT(_20pacgal_kludge, 8000) /* 8000 Hz??? */ | |
| 253 | 242 | |
| 254 | 243 | MDRV_SCREEN_REFRESH_RATE(60) |
| 255 | 244 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION) |
| r1037 | r1038 | |
|---|---|---|
| 2473 | 2473 | ROM_LOAD( "fpointbj_gal20v8.bin", 0x0400, 0x019d, NO_DUMP ) /* Protected */ |
| 2474 | 2474 | ROM_END |
| 2475 | 2475 | |
| 2476 | /* This is a frankenset, it has original and bootleg roms of different sizes and names mixed together, it's | |
| 2477 | highly unlikely that the original bootleg PCB was like this */ | |
| 2476 | 2478 | ROM_START( goldnabl ) |
| 2477 | 2479 | ROM_REGION( 0x0c0000, REGION_CPU1, 0 ) /* 68000 code */ |
| 2478 | 2480 | // protected code |
| r1037 | r1038 | |
| 2512 | 2514 | ROM_LOAD( "mpr12384.a11", 0x10000, 0x20000, CRC(6218d8e7) SHA1(5a745c750efb4a61716f99befb7ed14cc84e9973) ) |
| 2513 | 2515 | ROM_END |
| 2514 | 2516 | |
| 2517 | /* Golden Axe (bootleg) made in Italy? | |
| 2518 | PCB: GENSYS-1/I | |
| 2519 | ||
| 2520 | CPUs | |
| 2521 | ||
| 2522 | 1x SCN68000CAN64-KGQ7551-8931KE (main - upper board)(IC40) | |
| 2523 | 1x oscillator 20.000MHz (upper board - near main CPU)(XL2) | |
| 2524 | 1x STZ8400BB1-Z80BCPU-28911 (sound - upper board)(IC44) | |
| 2525 | 2x YAMAHA YM2203C (sound - upper board)IC27, IC28) | |
| 2526 | 1x OKI M5205 (sound - upper board)(IC16) | |
| 2527 | 2x YAMAHA Y3014B (DAC - sound - upper board)(IC19, IC20) | |
| 2528 | 1x crystal resonator CSB398P (upper board - near sound CPUs)(XL1) | |
| 2529 | 1x oscillator 24MHz (lower board near connectors to upper board)(XL1) | |
| 2530 | ||
| 2531 | ROMs | |
| 2532 | 8x TMS27C512-20JL (from 1 to 8 - upper board) (CPU) | |
| 2533 | 26x ST M27512FI (from 9 to 34 - upper board) (Sound + Tilemap) | |
| 2534 | 6x ST M27512FI (from 35 to 40 - lower board) (Sprites) | |
| 2535 | ||
| 2536 | */ | |
| 2537 | ||
| 2538 | ||
| 2539 | ROM_START( goldnab2 ) | |
| 2540 | ROM_REGION( 0x0c0000, REGION_CPU1, 0 ) /* 68000 code */ | |
| 2541 | ROM_LOAD16_BYTE( "ic39.1", 0x00000, 0x10000, CRC(71489c9a) SHA1(ec25463a2c63027d2635f0e27f5a971d68938fe3) ) | |
| 2542 | ROM_LOAD16_BYTE( "ic53.5", 0x00001, 0x10000, CRC(7a98512d) SHA1(f022a047d23051211e2de761b6c2289438b8f3cc) ) | |
| 2543 | ROM_LOAD16_BYTE( "ic38.2", 0x20000, 0x10000, CRC(8c8c95b1) SHA1(2b3897b8af587e6397dca0f3409a803432be07aa) ) | |
| 2544 | ROM_LOAD16_BYTE( "ic52.6", 0x20001, 0x10000, CRC(4f58f15b) SHA1(4dcd7e8cfd8fe5fe9f9259abf53fd0d4c64b5abd) ) | |
| 2545 | /* emtpy 0x40000 - 0x80000 */ | |
| 2546 | ROM_LOAD16_BYTE( "ic37.3", 0x80000, 0x10000, CRC(056879fd) SHA1(fc0a910c1dc4cf535ad589f482f57379798b5524) ) | |
| 2547 | ROM_LOAD16_BYTE( "ic51.7", 0x80001, 0x10000, CRC(8c77d958) SHA1(f7c5abfec2a9d1724c83b1de2cd994bb4c42857c) ) | |
| 2548 | ROM_LOAD16_BYTE( "ic36.4", 0xa0000, 0x10000, CRC(b69ab892) SHA1(9b426058a80abb8dd3d6c0c55574fdc841889a72) ) | |
| 2549 | ROM_LOAD16_BYTE( "ic50.8", 0xa0001, 0x10000, CRC(3cf2f725) SHA1(1f620fcebe8533cba50736ae1d97c095abf1bc25) ) | |
| 2550 | ||
| 2551 | ROM_REGION( 0x60000, REGION_GFX1, ROMREGION_DISPOSE | ROMREGION_INVERT ) /* tiles */ | |
| 2552 | ROM_LOAD( "ic4.35", 0x00000, 0x10000, CRC(84587263) SHA1(3a88c8578a477a487a0a214a367042b9739f39eb) ) | |
| 2553 | ROM_LOAD( "ic18.38", 0x10000, 0x10000, CRC(63d72388) SHA1(ba0a582b1daf3a1e316237efbad17fcc0381643f) ) | |
| 2554 | ROM_LOAD( "ic3.36", 0x20000, 0x10000, CRC(f8b6ae4f) SHA1(55132c98955107e4b247992f7917a6ce588460a7) ) | |
| 2555 | ROM_LOAD( "ic17.39", 0x30000, 0x10000, CRC(e29baf4f) SHA1(3761cb2217599fe3f2f860f9395930b96ec52f47) ) | |
| 2556 | ROM_LOAD( "ic2.37", 0x40000, 0x10000, CRC(22f0667e) SHA1(2d11b2ce105a3db9c914942cace85aff17deded9) ) | |
| 2557 | ROM_LOAD( "ic16.40", 0x50000, 0x10000, CRC(afb1a7e4) SHA1(726fded9db72a881128b43f449d2baf450131f63) ) | |
| 2558 | ||
| 2559 | ROM_REGION( 0x1c0000, REGION_GFX2, 0 ) /* sprites */ | |
| 2560 | ROM_LOAD16_BYTE( "ic73.34", 0x000001, 0x10000, CRC(28ba70c8) SHA1(a6f33e1404928b6d1006943494646d6cfbd60a4b) ) // mpr12378.b1 [1/4] IDENTICAL | |
| 2561 | ROM_LOAD16_BYTE( "ic74.33", 0x020001, 0x10000, CRC(2ed96a26) SHA1(edcf915243e6f92d31cdfc53965438f6b6bff51d) ) // mpr12378.b1 [2/4] IDENTICAL | |
| 2562 | ROM_LOAD16_BYTE( "ic79.28", 0x100001, 0x10000, CRC(84dccc5b) SHA1(10263d98d663f1170c3203066f391075a1d64ff5) ) // mpr12378.b1 [3/4] IDENTICAL | |
| 2563 | ROM_LOAD16_BYTE( "ic80.27", 0x120001, 0x10000, CRC(3d41b995) SHA1(913d2a0c9a2ac6d36589966d7eb5537120ea6ff0) ) // mpr12378.b1 [4/4] IDENTICAL | |
| 2564 | ROM_LOAD16_BYTE( "ic58.22", 0x000000, 0x10000, CRC(ede51fe0) SHA1(c05a2b51095a322bac5a67ee8886aecc186cbdfe) ) // mpr12379.b4 [1/4] IDENTICAL | |
| 2565 | ROM_LOAD16_BYTE( "ic59.21", 0x020000, 0x10000, CRC(30989141) SHA1(f6e7ae258deedec11b1f80c19575c884aac26c56) ) // mpr12379.b4 [2/4] IDENTICAL | |
| 2566 | ROM_LOAD16_BYTE( "ic64.16", 0x100000, 0x10000, CRC(38e4c92a) SHA1(8b8a596da0726bc02c412a68e5163770fe3e62e4) ) // mpr12379.b4 [3/4] IDENTICAL | |
| 2567 | ROM_LOAD16_BYTE( "ic65.15", 0x120000, 0x10000, CRC(9fb1f9b6) SHA1(a193ff48f2bfbb4afbc322ae33cdf360afcb681e) ) // mpr12379.b4 [4/4] IDENTICAL | |
| 2568 | ROM_LOAD16_BYTE( "ic75.32", 0x040001, 0x10000, CRC(101d2fff) SHA1(1de1390c5f55f192491053c8aac31be3389aab2b) ) // mpr12380.b2 [1/4] IDENTICAL | |
| 2569 | ROM_LOAD16_BYTE( "ic76.31", 0x060001, 0x10000, CRC(677e64a6) SHA1(e3d0d31097017c6cb1a7f41292783f18ce13b41c) ) // mpr12380.b2 [2/4] IDENTICAL | |
| 2570 | ROM_LOAD16_BYTE( "ic81.26", 0x140001, 0x10000, CRC(a34e84d1) SHA1(5aa8836ef1bdf97e399899c911967840e9873bfb) ) // mpr12380.b2 [3/4] 99.992371% | |
| 2571 | ROM_LOAD16_BYTE( "ic82.25", 0x160001, 0x10000, CRC(ad1c1c90) SHA1(155f17593cfab1a117bb755b1edd0c473d455f91) ) // mpr12380.b2 [4/4] IDENTICAL | |
| 2572 | ROM_LOAD16_BYTE( "ic60.20", 0x040000, 0x10000, CRC(5853000d) SHA1(db7adf1de74c66f667ea7ccc41702576de081ff5) ) // mpr12381.b5 [1/4] IDENTICAL | |
| 2573 | ROM_LOAD16_BYTE( "ic61.19", 0x060000, 0x10000, CRC(697b3276) SHA1(a8aeb2cfaca9368d5bfa14a67de36dbadd4a0585) ) // mpr12381.b5 [2/4] IDENTICAL | |
| 2574 | ROM_LOAD16_BYTE( "ic66.14", 0x140000, 0x10000, CRC(753b01e8) SHA1(0180cf893d63e60e14e2fb0f5836b302f08f0228) ) // mpr12381.b5 [3/4] IDENTICAL | |
| 2575 | ROM_LOAD16_BYTE( "ic67.13", 0x160000, 0x10000, CRC(5dd6d8db) SHA1(270886aebf4549c5cf456b1e90927b759a53e2e1) ) // mpr12381.b5 [4/4] IDENTICAL | |
| 2576 | ROM_LOAD16_BYTE( "ic77.30", 0x080001, 0x10000, CRC(a9519afe) SHA1(0550f596ef080db25241d88242d57edb3c7fb685) ) // mpr12382.b3 [1/4] IDENTICAL | |
| 2577 | ROM_LOAD16_BYTE( "ic78.29", 0x0a0001, 0x10000, CRC(74df9232) SHA1(61286c83eb6f31983c0ed24ca2151c58a95238f1) ) // mpr12382.b3 [2/4] IDENTICAL | |
| 2578 | ROM_LOAD16_BYTE( "ic83.24", 0x180001, 0x10000, CRC(a8c8c784) SHA1(8e998019b4dbf509179d41eb2b446647db3d00a6) ) // mpr12382.b3 [3/4] IDENTICAL | |
| 2579 | ROM_LOAD16_BYTE( "ic84.23", 0x1a0001, 0x10000, CRC(cc3a922c) SHA1(3c96459d95961d463909b6b0e8c77916c3a018e3) ) // mpr12382.b3 [4/4] IDENTICAL | |
| 2580 | ROM_LOAD16_BYTE( "ic62.18", 0x080000, 0x10000, CRC(ac6ad195) SHA1(3c3fe38047698e28cae9193438fe0b85941476c5) ) // mpr12383.b6 [1/4] IDENTICAL | |
| 2581 | ROM_LOAD16_BYTE( "ic63.17", 0x0a0000, 0x10000, CRC(03a905c4) SHA1(c526a744021a392c860ded37afd54a78e9f47778) ) // mpr12383.b6 [2/4] IDENTICAL | |
| 2582 | ROM_LOAD16_BYTE( "ic68.12", 0x180000, 0x10000, CRC(cba013c7) SHA1(a0658aaf7893bc9fb8f0435cab9f77ceb1fb4e1d) ) // mpr12383.b6 [3/4] IDENTICAL | |
| 2583 | ROM_LOAD16_BYTE( "ic69.11", 0x1a0000, 0x10000, CRC(bea4d237) SHA1(46e51e89b4ee1e2701da1004758d7da547a2e4c2) ) // mpr12383.b6 [4/4] IDENTICAL | |
| 2584 | ||
| 2585 | ROM_REGION( 0x20000, REGION_CPU2, 0 ) /* sound CPU + samples */ | |
| 2586 | ROM_LOAD( "ic45.10", 0x00000, 0x10000, CRC(804dfba8) SHA1(650ca61f78eb4d0aa256b554fb1570330166cc24) ) | |
| 2587 | ROM_LOAD( "ic46.9", 0x10000, 0x10000, CRC(634dd54e) SHA1(ac4ab0ad9c1ac634ff4dfb83232b0fa5cfb26fdd) ) | |
| 2588 | ROM_END | |
| 2589 | ||
| 2590 | ||
| 2515 | 2591 | // pre16 |
| 2516 | 2592 | ROM_START( mjleague ) |
| 2517 | 2593 | ROM_REGION( 0x030000, REGION_CPU1, 0 ) /* 68000 code */ |
| r1037 | r1038 | |
| 2744 | 2820 | GAME( 1989, fpointbl, fpoint, fpointbl, fpoint, fpointbl, ROT0, "bootleg", "Flash Point (World, bootleg)", 0 ) |
| 2745 | 2821 | GAME( 1989, fpointbj, fpoint, fpointbl, fpointbj, fpointbl, ROT0, "bootleg", "Flash Point (Japan, bootleg)", 0 ) |
| 2746 | 2822 | |
| 2747 | GAME( 1989, goldnabl, goldnaxe, goldnaxe, goldnaxe, goldnabl, ROT0, "bootleg", "Golden Axe (bootleg)", GAME_NOT_WORKING ) | |
| 2823 | GAME( 1989, goldnabl, goldnaxe, goldnaxe, goldnaxe, goldnabl, ROT0, "bootleg", "Golden Axe (bootleg, encrypted)", GAME_NOT_WORKING ) | |
| 2824 | GAME( 1989, goldnab2, goldnaxe, goldnaxe, goldnaxe, goldnabl, ROT0, "bootleg", "Golden Axe (bootleg)", GAME_NOT_WORKING ) | |
| 2748 | 2825 | |
| 2749 | 2826 | GAME( 1988, passshtb, passsht, passsht, passsht, passsht, ROT270, "bootleg", "Passing Shot (2 Players) (bootleg)", GAME_IMPERFECT_SOUND ) |
| 2750 | 2827 | GAME( 1988, passht4b, passsht, passht4b, passht4b, passht4b, ROT270, "bootleg", "Passing Shot (4 Players) (bootleg)", GAME_IMPERFECT_GRAPHICS | GAME_NO_SOUND | GAME_NOT_WORKING ) |
| r1037 | r1038 | |
|---|---|---|
| 47 | 47 | |
| 48 | 48 | VIDEO_UPDATE(viper) |
| 49 | 49 | { |
| 50 | voodoo_update(0, bitmap, cliprect); | |
| 51 | return 0; | |
| 50 | return voodoo_update(0, bitmap, cliprect) ? 0 : UPDATE_HAS_NOT_CHANGED; | |
| 52 | 51 | } |
| 53 | 52 | |
| 54 | 53 |
| r1037 | r1038 | |
|---|---|---|
| 2754 | 2754 | #define INVAD2CT_COIN_INPUT_PORT_TAG ("COIN") |
| 2755 | 2755 | |
| 2756 | 2756 | |
| 2757 | #ifdef UNUSED_FUNCTION | |
| 2757 | 2758 | static UINT32 invad2ct_coin_input_r(void *param) |
| 2758 | 2759 | { |
| 2759 | 2760 | UINT32 ret = readinputportbytag(INVAD2CT_COIN_INPUT_PORT_TAG); |
| r1037 | r1038 | |
| 2762 | 2763 | |
| 2763 | 2764 | return ret; |
| 2764 | 2765 | } |
| 2766 | #endif | |
| 2765 | 2767 | |
| 2766 | 2768 | |
| 2767 | 2769 | static ADDRESS_MAP_START( invad2ct_io_map, ADDRESS_SPACE_IO, 8 ) |
| r1037 | r1038 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | |
| 4 | 4 | GAMING DRAW POKER (CEI) |
| 5 | ||
| 6 | 5 | Driver by Roberto Fresca. |
| 7 | Based on a preliminary work of Curt Coder. | |
| 8 | 6 | |
| 9 | 7 | |
| 10 | 8 | --- Technical Notes --- |
| r1037 | r1038 | |
| 59 | 57 | |
| 60 | 58 | Flyer: http://www.arcadeflyers.com/?page=thumbs&db=videodb&id=4542 |
| 61 | 59 | |
| 62 | The code never write to offsets 0x840/0x841, so I assume that the AY8912 is connected to PIAs output. | |
| 60 | The AY8912 is mapped to 0x840/0x841 but the game lacks of credits and bet sounds. | |
| 61 | The rest of sounds are ok. Maybe the missing ones are generated by discrete circuitry. | |
| 62 | ||
| 63 | 63 | Inputs are multiplexed and selected through PIA1, portB. |
| 64 | ||
| 64 | 65 | There aren't meter and stats modes. Only for amusement, so... no payout. |
| 65 | 66 | To clear credits press F2. |
| 66 | 67 | To enter to TEST MODE press F2 twice. Press "Hold 1" + "Hold 2" + "Hold 3" to exit. |
| r1037 | r1038 | |
| 138 | 139 | $0841 - $0841 AY-8912 (W) ; Write. |
| 139 | 140 | $0880 - $0880 CRTC6845 (A) ; MC6845 adressing. |
| 140 | 141 | $0881 - $0881 CRTC6845 (R/W) ; MC6845 Read/Write. |
| 141 | $08C4 - $08C7 PIA0 ; I/O Ports 0 & 1. | |
| 142 | $08C8 - $08CB PIA1 ; I/O Ports 2 & 3. | |
| 142 | $08C4 - $08C7 PIA0 ; I/O Ports 0, 1, 2, 3. | |
| 143 | $08C8 - $08CB PIA1 ; I/O Port 4. | |
| 143 | 144 | |
| 144 | 145 | $1000 - $13FF VideoRAM |
| 145 | 146 | $1400 - $17FF ColorRAM |
| 146 | 147 | |
| 147 | $D800 - $FFFF ROM | |
| 148 | $D800 - $FFFF ROM (gdrawpkr) | |
| 148 | 149 | |
| 150 | ----- | |
| 149 | 151 | |
| 152 | $2000 - $3FFF ROM (elgrande) | |
| 153 | $F800 - $FFFF ROM (elgrande) | |
| 150 | 154 | |
| 155 | ||
| 156 | ||
| 151 | 157 | *** MC6545 Initialization *** |
| 152 | 158 | |
| 153 | 159 | ---------------------------------------------------------------------------------------------------------------------- |
| r1037 | r1038 | |
| 157 | 163 | |
| 158 | 164 | |
| 159 | 165 | |
| 160 | *** MC6545 conditional change for elgrande if 0x8c4 (PIA) has bit7 activated *** | |
| 166 | *** MC6545 conditional change for elgrande if 0x8c4 (PIA0) has bit7 activated *** | |
| 161 | 167 | |
| 162 | 168 | --------------------------------------------------------- |
| 163 | 169 | register: R00 R01 R02 R03 R04 R05 R06 R07 |
| r1037 | r1038 | |
| 169 | 175 | *********************************************************************************** |
| 170 | 176 | |
| 171 | 177 | |
| 178 | UPDATES | |
| 179 | ------- | |
| 180 | ||
| 181 | ||
| 182 | [2007-09-15] | |
| 183 | ||
| 184 | - Added sound support to "El Grande - 5 Card Draw". | |
| 185 | - All crystals documented via #defines. | |
| 186 | - All CPU and sound clocks derived from #defined crystal values. | |
| 187 | - Splitted the driver to driver/video. | |
| 188 | - Some minor input cleanups. | |
| 189 | - Updated technical notes. | |
| 190 | ||
| 191 | ||
| 172 | 192 | [2007-08-13] |
| 173 | 193 | |
| 174 | 194 | - Added "El Grande - 5 Card Draw" (new). |
| r1037 | r1038 | |
| 206 | 226 | |
| 207 | 227 | TODO: |
| 208 | 228 | |
| 209 | - Add sound support to elgrande. | |
| 210 | 229 | - Fix lamps. |
| 211 | - Clean up the driver. | |
| 212 | 230 | |
| 213 | 231 | |
| 214 | 232 | ***********************************************************************************/ |
| 215 | 233 | |
| 216 | 234 | |
| 235 | #define MASTER_CLOCK 10000000 | |
| 236 | ||
| 217 | 237 | #include "driver.h" |
| 218 | 238 | #include "sound/ay8910.h" |
| 219 | 239 | #include "video/crtc6845.h" |
| 220 | 240 | #include "machine/6821pia.h" |
| 221 | 241 | |
| 222 | static tilemap *bg_tilemap; | |
| 242 | /* from video */ | |
| 243 | extern WRITE8_HANDLER( gdrawpkr_videoram_w ); | |
| 244 | extern WRITE8_HANDLER( gdrawpkr_colorram_w ); | |
| 245 | extern PALETTE_INIT( gdrawpkr ); | |
| 246 | extern VIDEO_START( gdrawpkr ); | |
| 247 | extern VIDEO_UPDATE( gdrawpkr ); | |
| 223 | 248 | |
| 224 | 249 | |
| 225 | 250 | /************************* |
| 226 | * Video Hardware * | |
| 227 | *************************/ | |
| 228 | ||
| 229 | WRITE8_HANDLER( gdrawpkr_videoram_w ) | |
| 230 | { | |
| 231 | videoram[offset] = data; | |
| 232 | tilemap_mark_tile_dirty(bg_tilemap, offset); | |
| 233 | } | |
| 234 | ||
| 235 | WRITE8_HANDLER( gdrawpkr_colorram_w ) | |
| 236 | { | |
| 237 | colorram[offset] = data; | |
| 238 | tilemap_mark_tile_dirty(bg_tilemap, offset); | |
| 239 | } | |
| 240 | ||
| 241 | static TILE_GET_INFO( get_bg_tile_info ) | |
| 242 | { | |
| 243 | /* - bits - | |
| 244 | 7654 3210 | |
| 245 | --xx xx-- tiles color. | |
| 246 | ---- --x- tiles bank. | |
| 247 | xx-- ---x seems unused. */ | |
| 248 | ||
| 249 | int attr = colorram[tile_index]; | |
| 250 | int code = videoram[tile_index]; | |
| 251 | int bank = (attr & 0x02) >> 1; /* bit 1 switch the gfx banks */ | |
| 252 | int color = (attr & 0x3c); /* bits 2-3-4-5 for color */ | |
| 253 | ||
| 254 | if (attr == 0x3a) /* Is the palette wrong? */ | |
| 255 | color = 0x3b; /* 0x3b is the best match */ | |
| 256 | ||
| 257 | SET_TILE_INFO(bank, code, color, 0); | |
| 258 | } | |
| 259 | ||
| 260 | VIDEO_START( gdrawpkr ) | |
| 261 | { | |
| 262 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, | |
| 263 | TILEMAP_TYPE_PEN, 8, 8, 32, 31); | |
| 264 | } | |
| 265 | ||
| 266 | VIDEO_UPDATE( gdrawpkr ) | |
| 267 | { | |
| 268 | tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0); | |
| 269 | return 0; | |
| 270 | } | |
| 271 | ||
| 272 | PALETTE_INIT( gdrawpkr ) | |
| 273 | { | |
| 274 | /* prom bits | |
| 275 | 7654 3210 | |
| 276 | ---- ---x red component. | |
| 277 | ---- --x- green component. | |
| 278 | ---- -x-- blue component. | |
| 279 | ---- x--- unknown, aparently unused. | |
| 280 | xxxx ---- unused. | |
| 281 | */ | |
| 282 | int i; | |
| 283 | ||
| 284 | /* 00000BGR */ | |
| 285 | if (color_prom == 0) return; | |
| 286 | ||
| 287 | for (i = 0;i < machine->drv->total_colors;i++) | |
| 288 | { | |
| 289 | int bit0, bit1, bit2, r, g, b; | |
| 290 | ||
| 291 | /* red component */ | |
| 292 | bit0 = (color_prom[i] >> 0) & 0x01; | |
| 293 | r = bit0 * 0xff; | |
| 294 | ||
| 295 | /* green component */ | |
| 296 | bit1 = (color_prom[i] >> 1) & 0x01; | |
| 297 | g = bit1 * 0xff; | |
| 298 | ||
| 299 | /* blue component */ | |
| 300 | bit2 = (color_prom[i] >> 2) & 0x01; | |
| 301 | b = bit2 * 0xff; | |
| 302 | ||
| 303 | ||
| 304 | palette_set_color(machine, i, MAKE_RGB(r, g, b)); | |
| 305 | } | |
| 306 | } | |
| 307 | ||
| 308 | ||
| 309 | /************************* | |
| 310 | 251 | * Memory map information * |
| 311 | 252 | *************************/ |
| 312 | 253 | |
| r1037 | r1038 | |
| 325 | 266 | |
| 326 | 267 | static ADDRESS_MAP_START( elgrande_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 327 | 268 | AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) |
| 269 | AM_RANGE(0x0840, 0x0840) AM_WRITE(AY8910_control_port_0_w) | |
| 270 | AM_RANGE(0x0841, 0x0841) AM_WRITE(AY8910_write_port_0_w) | |
| 328 | 271 | AM_RANGE(0x0880, 0x0880) AM_WRITE(crtc6845_address_w) |
| 329 | 272 | AM_RANGE(0x0881, 0x0881) AM_READWRITE(crtc6845_register_r, crtc6845_register_w) |
| 330 | 273 | AM_RANGE(0x08c4, 0x08c7) AM_READWRITE(pia_0_r, pia_0_w) |
| r1037 | r1038 | |
| 346 | 289 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Manual Collect") PORT_CODE(KEYCODE_7) |
| 347 | 290 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Double Up") PORT_CODE(KEYCODE_3) |
| 348 | 291 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Deal/Draw") PORT_CODE(KEYCODE_2) |
| 349 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Cancel Discards") PORT_CODE(KEYCODE_N) | |
| 350 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Stand") PORT_CODE(KEYCODE_E) | |
| 292 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Cancel Discards") PORT_CODE(KEYCODE_N) | |
| 293 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON13 ) PORT_NAME("Stand") PORT_CODE(KEYCODE_E) | |
| 351 | 294 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 352 | 295 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 353 | 296 | |
| r1037 | r1038 | |
| 416 | 359 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 417 | 360 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Double Up") PORT_CODE(KEYCODE_3) |
| 418 | 361 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Deal/Draw") PORT_CODE(KEYCODE_2) |
| 419 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_ | |
| 362 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Cancel Holds") PORT_CODE(KEYCODE_N) | |
| 420 | 363 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 421 | 364 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 422 | 365 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r1037 | r1038 | |
| 446 | 389 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Bet") PORT_CODE(KEYCODE_1) |
| 447 | 390 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Take") PORT_CODE(KEYCODE_4) |
| 448 | 391 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("Odd") PORT_CODE(KEYCODE_A) |
| 449 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_ | |
| 392 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("Even") PORT_CODE(KEYCODE_S) | |
| 450 | 393 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 451 | 394 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 452 | 395 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r1037 | r1038 | |
| 621 | 564 | |
| 622 | 565 | static MACHINE_DRIVER_START( gdrawpkr ) |
| 623 | 566 | // basic machine hardware |
| 624 | MDRV_CPU_ADD_TAG("main", M6502, | |
| 567 | MDRV_CPU_ADD_TAG("main", M6502, MASTER_CLOCK/12) /* guessing... */ | |
| 625 | 568 | MDRV_CPU_PROGRAM_MAP(gdrawpkr_map, 0) |
| 626 | 569 | MDRV_CPU_VBLANK_INT(irq0_line_hold, 1) |
| 627 | 570 | |
| r1037 | r1038 | |
| 646 | 589 | |
| 647 | 590 | // sound hardware |
| 648 | 591 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 649 | MDRV_SOUND_ADD(AY891 | |
| 592 | MDRV_SOUND_ADD(AY8912, MASTER_CLOCK/12) /* guessing again... */ | |
| 650 | 593 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
| 651 | 594 | |
| 652 | 595 | MACHINE_DRIVER_END |
| r1037 | r1038 | |
| 756 | 699 | |
| 757 | 700 | /* YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS */ |
| 758 | 701 | GAME( 1981, gdrawpkr, 0, gdrawpkr, gdrawpkr, gdrawpkr, ROT0, "Cal Omega / Casino Electronics Inc.", "Gaming Draw Poker", 0 ) |
| 759 | GAME( 1982, elgrande, 0, elgrande, elgrande, elgrande, ROT0, "Tuni Electro Service / E.T. Marketing", "El Grande - 5 Card Draw (New)", | |
| 702 | GAME( 1982, elgrande, 0, elgrande, elgrande, elgrande, ROT0, "Tuni Electro Service / E.T. Marketing", "El Grande - 5 Card Draw (New)", 0 |
| r1037 | r1038 | |
|---|---|---|
| 619 | 619 | ADDRESS_MAP_END |
| 620 | 620 | |
| 621 | 621 | |
| 622 | ||
| 623 | READ8_HANDLER( scramb2_protection_r ) { return 0x25; } | |
| 624 | READ8_HANDLER( scramb2_port0_r ) { return (readinputport(0)>>offset)&0x1; } | |
| 625 | READ8_HANDLER( scramb2_port1_r ) { return (readinputport(1)>>offset)&0x1; } | |
| 626 | READ8_HANDLER( scramb2_port2_r ) { return (readinputport(2)>>offset)&0x1; } | |
| 627 | ||
| 628 | static ADDRESS_MAP_START( scramb2_readmem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 629 | AM_RANGE(0x0000, 0x3fff) AM_READ(MRA8_ROM) | |
| 630 | AM_RANGE(0x4000, 0x4bff) AM_READ(MRA8_RAM) | |
| 631 | AM_RANGE(0x5000, 0x50ff) AM_READ(MRA8_RAM) | |
| 632 | AM_RANGE(0x5800, 0x5fff) AM_READ(scramb2_protection_r) // must return 0x25 | |
| 633 | AM_RANGE(0x6000, 0x6007) AM_READ(scramb2_port0_r) // reads from 8 addresses, 1 bit per address | |
| 634 | AM_RANGE(0x6800, 0x6807) AM_READ(scramb2_port1_r) // reads from 8 addresses, 1 bit per address | |
| 635 | AM_RANGE(0x7000, 0x7007) AM_READ(watchdog_reset_r) | |
| 636 | AM_RANGE(0x7800, 0x7807) AM_READ(scramb2_port2_r) // reads from 8 addresses, 1 bit per address | |
| 637 | ADDRESS_MAP_END | |
| 638 | ||
| 639 | static ADDRESS_MAP_START( scramb2_writemem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 640 | AM_RANGE(0x0000, 0x3fff) AM_WRITE(MWA8_ROM) | |
| 641 | AM_RANGE(0x4000, 0x47ff) AM_WRITE(MWA8_RAM) | |
| 642 | AM_RANGE(0x4800, 0x4bff) AM_WRITE(galaxian_videoram_w) AM_BASE(&galaxian_videoram) | |
| 643 | AM_RANGE(0x4c00, 0x4fff) AM_WRITE(galaxian_videoram_w) // mirror | |
| 644 | AM_RANGE(0x5000, 0x503f) AM_WRITE(galaxian_attributesram_w) AM_BASE(&galaxian_attributesram) | |
| 645 | AM_RANGE(0x5040, 0x505f) AM_WRITE(MWA8_RAM) AM_BASE(&galaxian_spriteram) AM_SIZE(&galaxian_spriteram_size) | |
| 646 | AM_RANGE(0x5060, 0x507f) AM_WRITE(MWA8_RAM) AM_BASE(&galaxian_bulletsram) AM_SIZE(&galaxian_bulletsram_size) | |
| 647 | AM_RANGE(0x5080, 0x50ff) AM_WRITE(MWA8_RAM) | |
| 648 | AM_RANGE(0x6801, 0x6801) AM_WRITE(galaxian_nmi_enable_w) | |
| 649 | AM_RANGE(0x6802, 0x6802) AM_WRITE(galaxian_coin_counter_w) | |
| 650 | AM_RANGE(0x6804, 0x6804) AM_WRITE(galaxian_stars_enable_w) | |
| 651 | AM_RANGE(0x6806, 0x6806) AM_WRITE(galaxian_flip_screen_x_w) | |
| 652 | AM_RANGE(0x6807, 0x6807) AM_WRITE(galaxian_flip_screen_y_w) | |
| 653 | AM_RANGE(0x7006, 0x7006) AM_WRITE(MWA8_NOP) | |
| 654 | AM_RANGE(0x7007, 0x7007) AM_WRITE(MWA8_NOP) | |
| 655 | AM_RANGE(0x7800, 0x7800) AM_WRITE(galaxian_pitch_w) | |
| 656 | ADDRESS_MAP_END | |
| 657 | ||
| 658 | ||
| 659 | ||
| 622 | 660 | static ADDRESS_MAP_START( jumpbug_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 623 | 661 | AM_RANGE(0x0000, 0x3fff) AM_READ(MRA8_ROM) |
| 624 | 662 | AM_RANGE(0x4000, 0x4bff) AM_READ(MRA8_RAM) |
| r1037 | r1038 | |
| 1958 | 1996 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 1959 | 1997 | INPUT_PORTS_END |
| 1960 | 1998 | |
| 1999 | ||
| 2000 | /* the cocktail controls only seem to be used in upright mode, is the flip flag wrong for this bootleg? */ | |
| 2001 | INPUT_PORTS_START( scramb2 ) | |
| 2002 | PORT_START_TAG("IN0") | |
| 2003 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL | |
| 2004 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) | |
| 2005 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 2006 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 2007 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY | |
| 2008 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 2009 | PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) ) | |
| 2010 | PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) | |
| 2011 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 2012 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 2013 | ||
| 2014 | PORT_START_TAG("IN1") | |
| 2015 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) | |
| 2016 | PORT_DIPSETTING( 0x00, "3" ) | |
| 2017 | PORT_DIPSETTING( 0x01, "4" ) | |
| 2018 | PORT_DIPSETTING( 0x02, "5" ) | |
| 2019 | PORT_DIPSETTING( 0x03, "255 (Cheat)") | |
| 2020 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL | |
| 2021 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL | |
| 2022 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL | |
| 2023 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL | |
| 2024 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 ) | |
| 2025 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) | |
| 2026 | ||
| 2027 | PORT_START_TAG("IN2") | |
| 2028 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL | |
| 2029 | PORT_DIPNAME( 0x06, 0x00, DEF_STR( Coinage ) ) | |
| 2030 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 2031 | PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) | |
| 2032 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_3C ) ) | |
| 2033 | PORT_DIPSETTING( 0x06, DEF_STR( 1C_4C ) ) | |
| 2034 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Cabinet ) ) | |
| 2035 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 2036 | PORT_DIPSETTING( 0x08, DEF_STR( Cocktail ) ) | |
| 2037 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 2038 | PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) ) | |
| 2039 | PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) | |
| 2040 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 2041 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 2042 | PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) | |
| 2043 | PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) | |
| 2044 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 2045 | INPUT_PORTS_END | |
| 2046 | ||
| 2047 | ||
| 1961 | 2048 | INPUT_PORTS_START( jumpbug ) |
| 1962 | 2049 | PORT_START_TAG("IN0") |
| 1963 | 2050 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| r1037 | r1038 | |
| 3933 | 4020 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY |
| 3934 | 4021 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY |
| 3935 | 4022 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY |
| 3936 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_ | |
| 4023 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSE | |
| 3937 | 4024 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 3938 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_ | |
| 4025 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY | |
| 3939 | 4026 | |
| 3940 | 4027 | PORT_START_TAG("IN1") |
| 3941 | 4028 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) // button 1 and start 1 |
| r1037 | r1038 | |
| 4363 | 4450 | MDRV_VIDEO_START(scramble) |
| 4364 | 4451 | MACHINE_DRIVER_END |
| 4365 | 4452 | |
| 4453 | static MACHINE_DRIVER_START( scramb2 ) | |
| 4366 | 4454 | |
| 4455 | /* basic machine hardware */ | |
| 4456 | MDRV_IMPORT_FROM(galaxian) | |
| 4457 | MDRV_CPU_MODIFY("main") | |
| 4458 | MDRV_CPU_PROGRAM_MAP(scramb2_readmem,scramb2_writemem) | |
| 4459 | ||
| 4460 | /* video hardware */ | |
| 4461 | MDRV_PALETTE_LENGTH(32+2+64+1) /* 32 for the characters, 2 for the bullets, 64 for the stars, 1 for background */ | |
| 4462 | ||
| 4463 | MDRV_PALETTE_INIT(scramble) | |
| 4464 | MDRV_VIDEO_START(scramble) | |
| 4465 | MACHINE_DRIVER_END | |
| 4466 | ||
| 4467 | ||
| 4468 | ||
| 4367 | 4469 | static MACHINE_DRIVER_START( zigzag ) |
| 4368 | 4470 | |
| 4369 | 4471 | /* basic machine hardware */ |
| r1037 | r1038 | |
| 5509 | 5611 | ROM_LOAD( "82s123.6e", 0x0000, 0x0020, CRC(4e3caeab) SHA1(a25083c3e36d28afdefe4af6e6d4f3155e303625) ) |
| 5510 | 5612 | ROM_END |
| 5511 | 5613 | |
| 5614 | ||
| 5615 | ROM_START( scramb2 ) | |
| 5616 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 5617 | ROM_LOAD( "r1.7f1", 0x0000, 0x0800, CRC(4a43148c) SHA1(ea27fd3acf661101296a58a7a50fb8e4d5292760) ) | |
| 5618 | ROM_LOAD( "r1.7f2", 0x0800, 0x0800, CRC(215a3b86) SHA1(bfddfea9f74064123629d89556240c7a59f7bea2) ) | |
| 5619 | ROM_LOAD( "r2.7h1", 0x1000, 0x0800, CRC(28779444) SHA1(0abd3a89c8cdd5af2ac06afd38bcd2dcd6010bee) ) | |
| 5620 | ROM_LOAD( "r2.7h2", 0x1800, 0x0800, CRC(5b4b300b) SHA1(6d69dbdab66bc8f4a16c3d9d3b4581799e4bbfab) ) | |
| 5621 | ROM_LOAD( "r3.7k1", 0x2000, 0x0800, CRC(b478aa53) SHA1(68cf134482092534ef0a3ceee3aa842f86660065) ) | |
| 5622 | ROM_LOAD( "r3.7k2", 0x2800, 0x0800, CRC(c33f072e) SHA1(28d61e35f3d5c971e070d7e0cc20b831fe8d52c5) ) | |
| 5623 | ROM_LOAD( "r4.7l1", 0x3000, 0x0800, CRC(88ac07a0) SHA1(c57061db5984b472039356bf84a050b5b66e3813) ) | |
| 5624 | ROM_LOAD( "r4.7l2", 0x3800, 0x0800, CRC(321fd003) SHA1(61f33c2709913da4cb20f311501df707d755917e) ) | |
| 5625 | /* Also exists in the following Rom config */ | |
| 5626 | // ROM_LOAD( "r1.7f", 0x0000, 0x1000, CRC(75208a74) SHA1(e77afe4b906d08d6763f31dd70d7cb772be97102) ) | |
| 5627 | // ROM_LOAD( "r2.7h", 0x1000, 0x1000, CRC(f2179cf5) SHA1(5c38aa9bd1d5ebdccf16d2e50acc56f0b3f042d0) ) | |
| 5628 | // ROM_LOAD( "r3.7k", 0x2000, 0x1000, CRC(941c804e) SHA1(f1eedf719a234cf98071e6a46120765e231f0730) ) | |
| 5629 | // ROM_LOAD( "r4.7l", 0x3000, 0x1000, CRC(f1506edc) SHA1(66689bb3d7570848e4d020a5f44d6de03b4bff99) ) | |
| 5630 | ||
| 5631 | ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 5632 | ROM_LOAD( "r6.1j", 0x0000, 0x0800, CRC(4708845b) SHA1(a8b1ad19a95a9d35050a2ab7194cc96fc5afcdc9) ) | |
| 5633 | ROM_LOAD( "r5.1l", 0x0800, 0x0800, CRC(11fd2887) SHA1(69844e48bb4d372cac7ae83c953df573c7ecbb7f) ) | |
| 5634 | ||
| 5635 | ROM_REGION( 0x0020, REGION_PROMS, 0 ) | |
| 5636 | ROM_LOAD( "82s123.6e", 0x0000, 0x0020, CRC(4e3caeab) SHA1(a25083c3e36d28afdefe4af6e6d4f3155e303625) ) | |
| 5637 | ROM_END | |
| 5638 | ||
| 5639 | ||
| 5512 | 5640 | ROM_START( jumpbug ) |
| 5513 | 5641 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 5514 | 5642 | ROM_LOAD( "jb1", 0x0000, 0x1000, CRC(415aa1b7) SHA1(4f9edd7e9720acf085dd8910849c2f2fac5cb547) ) |
| r1037 | r1038 | |
| 6887 | 7015 | GAME( 1982, zigzag, 0, zigzag, zigzag, zigzag, ROT90, "LAX", "Zig Zag (Galaxian hardware, set 1)", GAME_SUPPORTS_SAVE ) |
| 6888 | 7016 | GAME( 1982, zigzag2, zigzag, zigzag, zigzag, zigzag, ROT90, "LAX", "Zig Zag (Galaxian hardware, set 2)", GAME_SUPPORTS_SAVE ) |
| 6889 | 7017 | GAME( 1981, scramblb, scramble, scramblb, scramblb, 0, ROT90, "bootleg", "Scramble (Galaxian hardware)", GAME_SUPPORTS_SAVE ) |
| 7018 | GAME( 1981, scramb2, scramble, scramb2, scramb2, 0, ROT90, "bootleg", "Scramble (bootleg)", GAME_SUPPORTS_SAVE ) | |
| 6890 | 7019 | GAME( 1981, jumpbug, 0, jumpbug, jumpbug, 0, ROT90, "Rock-ola", "Jump Bug", GAME_SUPPORTS_SAVE ) |
| 6891 | 7020 | GAME( 1981, jumpbugb, jumpbug, jumpbug, jumpbug, 0, ROT90, "bootleg", "Jump Bug (bootleg)", GAME_SUPPORTS_SAVE ) |
| 6892 | 7021 | GAME( 1983, levers, 0, jumpbug, levers, 0, ROT90, "Rock-ola", "Levers", GAME_SUPPORTS_SAVE ) |
| r1037 | r1038 | |
| 6949 | 7078 | GAME( 19??, chewing, 0, galaxian, luctoday, 0, ROT90, "unknown", "Chewing Gum", GAME_SUPPORTS_SAVE ) |
| 6950 | 7079 | GAME( 1982, catacomb, 0, galaxian, catacomb, 0, ROT90, "MTM Games", "Catacomb", GAME_WRONG_COLORS | GAME_SUPPORTS_SAVE ) |
| 6951 | 7080 | GAME( 1981, ckongg, 0, ckongg, ckongg, 0, ROT90, "bootleg", "Crazy Kong (bootleg on Galaxian hardware, set 1)", GAME_SUPPORTS_SAVE ) |
| 6952 | GAME( 1981, kkgalax, ckongg, kkgalax, kkgalax, 0, ROT90, "bootleg", "Crazy Kong (bootleg on Galaxian hardware, set 2)", GAME_NO_SOUND | GAME_SUPPORTS_SAVE ) | |
| 7081 | GAME( 1981, kkgalax, ckongg, kkgalax, kkgalax, 0, ROT90, "bootleg", "Crazy Kong (bootleg on Galaxian hardware, set 2)", GAME_NO_SOUND | GAME_SUPPORTS_SAVE ) // set was marked as 'King Kong on Galaxian' | |
| 6953 | 7082 | GAME( 19??, porter, 0, mooncrst, porter, 0, ROT90, "[Nova Games Ltd.] (bootleg)", "Port Man (bootleg on Moon Cresta hardware)", GAME_IMPERFECT_GRAPHICS ) // missing GFX bank switch! |
| r1037 | r1038 | |
|---|---|---|
| 29 | 29 | AM_RANGE(0x0000, 0x7fff) AM_WRITE(MWA8_ROM) |
| 30 | 30 | ADDRESS_MAP_END |
| 31 | 31 | |
| 32 | #ifdef UNUSED_FUNCTION | |
| 32 | 33 | static ADDRESS_MAP_START( readmem2, ADDRESS_SPACE_PROGRAM, 8 ) |
| 33 | 34 | AM_RANGE(0x0000, 0x7fff) AM_READ(MRA8_ROM) |
| 34 | 35 | ADDRESS_MAP_END |
| r1037 | r1038 | |
| 36 | 37 | static ADDRESS_MAP_START( writemem2, ADDRESS_SPACE_PROGRAM, 8 ) |
| 37 | 38 | AM_RANGE(0x0000, 0x7fff) AM_WRITE(MWA8_ROM) |
| 38 | 39 | ADDRESS_MAP_END |
| 40 | #endif | |
| 39 | 41 | |
| 40 | 42 | INPUT_PORTS_START( sfkick ) |
| 41 | 43 | PORT_START |
| r1037 | r1038 | |
|---|---|---|
| 170 | 170 | |
| 171 | 171 | if (copro_fifoout_num == 0) |
| 172 | 172 | { |
| 173 | / | |
| 173 | /* Reading from empty FIFO causes the i960 to enter wait state */ | |
| 174 | 174 | i960_stall(); |
| 175 | ||
| 176 | /* spin the main cpu and let the TGP catch up */ | |
| 177 | cpu_spinuntil_time(MAME_TIME_IN_USEC(100)); | |
| 178 | ||
| 175 | 179 | return 0; |
| 176 | 180 | } |
| 177 | 181 | |
| r1037 | r1038 | |
| 739 | 743 | return geo_read_start_address; |
| 740 | 744 | } |
| 741 | 745 | |
| 742 | fatalerror("geo_r: %08X, %08X\n", address, mem_mask); | |
| 746 | // fatalerror("geo_r: %08X, %08X\n", address, mem_mask); | |
| 747 | mame_printf_debug("geo_r: PC:%08x - %08X\n", safe_activecpu_get_pc(), address); | |
| 748 | ||
| 749 | return 0; | |
| 743 | 750 | } |
| 744 | 751 | |
| 745 | 752 | static WRITE32_HANDLER( geo_w ) |
| r1037 | r1038 | |
| 1149 | 1156 | } |
| 1150 | 1157 | } |
| 1151 | 1158 | |
| 1159 | #ifdef UNUSED_FUNCTION | |
| 1152 | 1160 | static WRITE32_HANDLER( copro_w ) |
| 1153 | 1161 | { |
| 1154 | 1162 | int address = offset * 4; |
| r1037 | r1038 | |
| 1166 | 1174 | |
| 1167 | 1175 | //mame_printf_debug("COPRO: %08X = %08X\n", offset, data); |
| 1168 | 1176 | } |
| 1177 | #endif | |
| 1169 | 1178 | |
| 1170 | 1179 | static WRITE32_HANDLER(mode_w) |
| 1171 | 1180 | { |
| 1172 | 1181 | mame_printf_debug("Mode = %08X\n", data); |
| 1173 | 1182 | } |
| 1174 | 1183 | |
| 1184 | static WRITE32_HANDLER(model2o_tex_w0) | |
| 1185 | { | |
| 1186 | if ( (offset & 1) == 0 ) | |
| 1187 | { | |
| 1188 | model2_textureram0[offset>>1] &= 0xffff0000; | |
| 1189 | model2_textureram0[offset>>1] |= data & 0xffff; | |
| 1190 | } | |
| 1191 | else | |
| 1192 | { | |
| 1193 | model2_textureram0[offset>>1] &= 0x0000ffff; | |
| 1194 | model2_textureram0[offset>>1] |= (data & 0xffff) << 16; | |
| 1195 | } | |
| 1196 | } | |
| 1197 | ||
| 1198 | static WRITE32_HANDLER(model2o_tex_w1) | |
| 1199 | { | |
| 1200 | if ( (offset & 1) == 0 ) | |
| 1201 | { | |
| 1202 | model2_textureram1[offset>>1] &= 0xffff0000; | |
| 1203 | model2_textureram1[offset>>1] |= data & 0xffff; | |
| 1204 | } | |
| 1205 | else | |
| 1206 | { | |
| 1207 | model2_textureram1[offset>>1] &= 0x0000ffff; | |
| 1208 | model2_textureram1[offset>>1] |= (data & 0xffff) << 16; | |
| 1209 | } | |
| 1210 | } | |
| 1211 | ||
| 1212 | static WRITE32_HANDLER(model2o_luma_w) | |
| 1213 | { | |
| 1214 | if ( (offset & 1) == 0 ) | |
| 1215 | { | |
| 1216 | model2_lumaram[offset>>1] &= 0xffff0000; | |
| 1217 | model2_lumaram[offset>>1] |= data & 0xffff; | |
| 1218 | } | |
| 1219 | else | |
| 1220 | { | |
| 1221 | model2_lumaram[offset>>1] &= 0x0000ffff; | |
| 1222 | model2_lumaram[offset>>1] |= (data & 0xffff) << 16; | |
| 1223 | } | |
| 1224 | } | |
| 1225 | ||
| 1175 | 1226 | /* common map for all Model 2 versions */ |
| 1176 | 1227 | static ADDRESS_MAP_START( model2_base_mem, ADDRESS_SPACE_PROGRAM, 32 ) |
| 1177 | 1228 | AM_RANGE(0x00000000, 0x001fffff) AM_ROM AM_WRITENOP |
| r1037 | r1038 | |
| 1215 | 1266 | |
| 1216 | 1267 | AM_RANGE(0x10000000, 0x101fffff) AM_WRITE(mode_w) |
| 1217 | 1268 | |
| 1218 | AM_RANGE(0x11000000, 0x111fffff) AM_RAM AM_BASE(&model2_textureram0) // texture RAM 0 (2b/2c) | |
| 1219 | AM_RANGE(0x11200000, 0x113fffff) AM_RAM AM_BASE(&model2_textureram1) // texture RAM 1 (2b/2c) | |
| 1220 | AM_RANGE(0x11400000, 0x1140ffff) AM_RAM AM_BASE(&model2_lumaram) // polygon "luma" RAM (2b/2c) | |
| 1221 | ||
| 1222 | 1269 | AM_RANGE(0x11600000, 0x1167ffff) AM_RAM AM_SHARE(1) // framebuffer (last bronx) |
| 1223 | 1270 | AM_RANGE(0x11680000, 0x116fffff) AM_RAM AM_SHARE(1) // FB mirror |
| 1224 | ||
| 1225 | AM_RANGE(0x12000000, 0x12ffffff) AM_WRITENOP // texture RAM for model 2/2a? | |
| 1226 | 1271 | ADDRESS_MAP_END |
| 1227 | 1272 | |
| 1228 | 1273 | /* original Model 2 overrides */ |
| r1037 | r1038 | |
| 1240 | 1285 | AM_RANGE(0x00980008, 0x0098000b) AM_WRITE( geo_ctl1_w ) |
| 1241 | 1286 | AM_RANGE(0x009c0000, 0x009cffff) AM_READWRITE( model2_serial_r, model2o_serial_w ) |
| 1242 | 1287 | |
| 1288 | AM_RANGE(0x12000000, 0x121fffff) AM_READWRITE(MRA32_RAM, model2o_tex_w0) AM_MIRROR(0x200000) AM_BASE(&model2_textureram0) // texture RAM 0 | |
| 1289 | AM_RANGE(0x12400000, 0x125fffff) AM_READWRITE(MRA32_RAM, model2o_tex_w1) AM_MIRROR(0x200000) AM_BASE(&model2_textureram1) // texture RAM 1 | |
| 1290 | AM_RANGE(0x12800000, 0x1281ffff) AM_READWRITE(MRA32_RAM, model2o_luma_w) AM_BASE(&model2_lumaram) // polygon "luma" RAM | |
| 1291 | ||
| 1243 | 1292 | AM_RANGE(0x01c00000, 0x01c00007) AM_READ(analog_r) |
| 1244 | 1293 | AM_RANGE(0x01c00010, 0x01c00013) AM_READ(ctrl10_r) |
| 1245 | 1294 | AM_RANGE(0x01c00014, 0x01c00017) AM_READ(ctrl14_r) |
| r1037 | r1038 | |
| 1263 | 1312 | AM_RANGE(0x00980008, 0x0098000b) AM_WRITE( geo_ctl1_w ) |
| 1264 | 1313 | AM_RANGE(0x009c0000, 0x009cffff) AM_READWRITE( model2_serial_r, model2_serial_w ) |
| 1265 | 1314 | |
| 1315 | AM_RANGE(0x12000000, 0x121fffff) AM_READWRITE(MRA32_RAM, model2o_tex_w0) AM_MIRROR(0x200000) AM_BASE(&model2_textureram0) // texture RAM 0 | |
| 1316 | AM_RANGE(0x12400000, 0x125fffff) AM_READWRITE(MRA32_RAM, model2o_tex_w1) AM_MIRROR(0x200000) AM_BASE(&model2_textureram1) // texture RAM 1 | |
| 1317 | AM_RANGE(0x12800000, 0x1281ffff) AM_READWRITE(MRA32_RAM, model2o_luma_w) AM_BASE(&model2_lumaram) // polygon "luma" RAM | |
| 1318 | ||
| 1266 | 1319 | AM_RANGE(0x01c00000, 0x01c00003) AM_READWRITE(ctrl0_r, ctrl0_w) |
| 1267 | 1320 | AM_RANGE(0x01c00004, 0x01c00007) AM_READ(ctrl1_r) |
| 1268 | 1321 | AM_RANGE(0x01c00010, 0x01c00013) AM_READ(ctrl10_r) |
| r1037 | r1038 | |
| 1292 | 1345 | |
| 1293 | 1346 | AM_RANGE(0x009c0000, 0x009cffff) AM_READWRITE( model2_serial_r, model2_serial_w ) |
| 1294 | 1347 | |
| 1348 | AM_RANGE(0x11000000, 0x111fffff) AM_RAM AM_BASE(&model2_textureram0) // texture RAM 0 (2b/2c) | |
| 1349 | AM_RANGE(0x11200000, 0x113fffff) AM_RAM AM_BASE(&model2_textureram1) // texture RAM 1 (2b/2c) | |
| 1350 | AM_RANGE(0x11400000, 0x1140ffff) AM_RAM AM_BASE(&model2_lumaram) // polygon "luma" RAM (2b/2c) | |
| 1351 | ||
| 1352 | ||
| 1295 | 1353 | AM_RANGE(0x01c00000, 0x01c00003) AM_READWRITE(ctrl0_r, ctrl0_w) |
| 1296 | 1354 | AM_RANGE(0x01c00004, 0x01c00007) AM_READ(ctrl1_r) |
| 1297 | 1355 | AM_RANGE(0x01c00010, 0x01c00013) AM_READ(ctrl10_r) |
| r1037 | r1038 | |
| 1312 | 1370 | AM_RANGE(0x00980008, 0x0098000b) AM_WRITE( geo_ctl1_w ) |
| 1313 | 1371 | AM_RANGE(0x009c0000, 0x009cffff) AM_READWRITE( model2_serial_r, model2_serial_w ) |
| 1314 | 1372 | |
| 1373 | AM_RANGE(0x11000000, 0x111fffff) AM_RAM AM_BASE(&model2_textureram0) // texture RAM 0 (2b/2c) | |
| 1374 | AM_RANGE(0x11200000, 0x113fffff) AM_RAM AM_BASE(&model2_textureram1) // texture RAM 1 (2b/2c) | |
| 1375 | AM_RANGE(0x11400000, 0x1140ffff) AM_RAM AM_BASE(&model2_lumaram) // polygon "luma" RAM (2b/2c) | |
| 1376 | ||
| 1315 | 1377 | AM_RANGE(0x01c00000, 0x01c00003) AM_READWRITE(ctrl0_r, ctrl0_w) |
| 1316 | 1378 | AM_RANGE(0x01c00004, 0x01c00007) AM_READ(ctrl1_r) |
| 1317 | 1379 | AM_RANGE(0x01c00010, 0x01c00013) AM_READ(ctrl10_r) |
| r1037 | r1038 | |
| 1677 | 1739 | #endif |
| 1678 | 1740 | |
| 1679 | 1741 | /*****************************************************************************/ |
| 1680 | / | |
| 1742 | /* TGP memory maps */ | |
| 1681 | 1743 | |
| 1744 | static READ32_HANDLER(copro_tgp_buffer_r) | |
| 1745 | { | |
| 1746 | return model2_bufferram[offset & 0x7fff]; | |
| 1747 | } | |
| 1748 | ||
| 1749 | static WRITE32_HANDLER(copro_tgp_buffer_w) | |
| 1750 | { | |
| 1751 | model2_bufferram[offset&0x7fff] = data; | |
| 1752 | } | |
| 1753 | ||
| 1682 | 1754 | static ADDRESS_MAP_START( copro_tgp_map, ADDRESS_SPACE_PROGRAM, 32 ) |
| 1683 | 1755 | AM_RANGE(0x00000000, 0x00007fff) AM_RAM AM_BASE(&tgp_program) |
| 1756 | AM_RANGE(0x00400000, 0x00407fff) AM_READWRITE(copro_tgp_buffer_r, copro_tgp_buffer_w) | |
| 1684 | 1757 | AM_RANGE(0xff800000, 0xff9fffff) AM_ROM AM_REGION(REGION_CPU3, 0) |
| 1685 | 1758 | ADDRESS_MAP_END |
| 1686 | 1759 | |
| r1037 | r1038 | |
| 1714 | 1787 | MDRV_NVRAM_HANDLER( model2 ) |
| 1715 | 1788 | |
| 1716 | 1789 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_UPDATE_AFTER_VBLANK ) |
| 1717 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB | |
| 1790 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) | |
| 1718 | 1791 | MDRV_SCREEN_SIZE(62*8, 48*8) |
| 1719 | 1792 | MDRV_SCREEN_VISIBLE_AREA(0*8, 62*8-1, 0*8, 48*8-1) |
| 1720 | 1793 | MDRV_PALETTE_LENGTH(8192) |
| r1037 | r1038 | |
| 1759 | 1832 | MDRV_NVRAM_HANDLER( model2 ) |
| 1760 | 1833 | |
| 1761 | 1834 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_UPDATE_AFTER_VBLANK ) |
| 1762 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB | |
| 1835 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) | |
| 1763 | 1836 | MDRV_SCREEN_SIZE(62*8, 48*8) |
| 1764 | 1837 | MDRV_SCREEN_VISIBLE_AREA(0*8, 62*8-1, 0*8, 48*8-1) |
| 1765 | 1838 | MDRV_PALETTE_LENGTH(8192) |
| r1037 | r1038 | |
| 1807 | 1880 | MDRV_NVRAM_HANDLER( model2 ) |
| 1808 | 1881 | |
| 1809 | 1882 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_UPDATE_AFTER_VBLANK ) |
| 1810 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB | |
| 1883 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) | |
| 1811 | 1884 | MDRV_SCREEN_SIZE(62*8, 48*8) |
| 1812 | 1885 | MDRV_SCREEN_VISIBLE_AREA(0*8, 62*8-1, 0*8, 48*8-1) |
| 1813 | 1886 | MDRV_PALETTE_LENGTH(8192) |
| r1037 | r1038 | |
| 1839 | 1912 | MDRV_NVRAM_HANDLER( model2 ) |
| 1840 | 1913 | |
| 1841 | 1914 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_UPDATE_AFTER_VBLANK ) |
| 1842 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB | |
| 1915 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) | |
| 1843 | 1916 | MDRV_SCREEN_SIZE(62*8, 48*8) |
| 1844 | 1917 | MDRV_SCREEN_VISIBLE_AREA(0*8, 62*8-1, 0*8, 48*8-1) |
| 1845 | 1918 | |
| r1037 | r1038 | |
| 2173 | 2246 | |
| 2174 | 2247 | ROM_REGION( 0x2000000, REGION_USER2, 0 ) // Models |
| 2175 | 2248 | ROM_LOAD32_WORD( "mpr-17748.bin", 0x000000, 0x200000, CRC(3148a2b2) SHA1(283cc49bfb6c6381a7ead9273fd097dca5b981b6) ) |
| 2176 | ROM_LOAD32_WORD( "mpr-17749.bin", 0x000002, 0x200000, CRC(0838d184) SHA1(704175c8b29e4c989afcb7be42e7e0e096740eaf) ) | |
| 2177 | ROM_LOAD32_WORD( "mpr-17750.bin", 0x400000, 0x200000, CRC(232aec29) SHA1(4d470e71df61298282c356814e2d151fda323fb6) ) | |
| 2249 | ROM_LOAD32_WORD( "mpr-17750.bin", 0x000002, 0x200000, CRC(232aec29) SHA1(4d470e71df61298282c356814e2d151fda323fb6) ) | |
| 2250 | ROM_LOAD32_WORD( "mpr-17749.bin", 0x400000, 0x200000, CRC(0838d184) SHA1(704175c8b29e4c989afcb7be42e7e0e096740eaf) ) | |
| 2178 | 2251 | ROM_LOAD32_WORD( "mpr-17751.bin", 0x400002, 0x200000, CRC(ed87ac62) SHA1(601542149d33ca52a47536b4b0af47bf1fd87eb2) ) |
| 2179 | 2252 | |
| 2180 | 2253 | ROM_REGION( 0x1000000, REGION_USER3, 0 ) // Textures |
| 2181 | ROM_LOAD32_WORD( "mpr-17752.bin", 0x000000, 0x200000, CRC(d6aa86ce) SHA1(1d342f87d1af1e5438d1ae818b1b14268e765897) ) | |
| 2182 | ROM_LOAD32_WORD( "mpr-17753.bin", 0x000002, 0x200000, CRC(6db0eb36) SHA1(dd5fd3c9592360d3e95623ac2491e6faabe9dbcb) ) | |
| 2254 | ROM_LOAD32_WORD( "mpr-17753.bin", 0x000000, 0x200000, CRC(6db0eb36) SHA1(dd5fd3c9592360d3e95623ac2491e6faabe9dbcb) ) | |
| 2255 | ROM_LOAD32_WORD( "mpr-17752.bin", 0x000002, 0x200000, CRC(d6aa86ce) SHA1(1d342f87d1af1e5438d1ae818b1b14268e765897) ) | |
| 2183 | 2256 | |
| 2257 | ||
| 2184 | 2258 | ROM_REGION( 0x20000, REGION_CPU5, 0) // Communication program |
| 2185 | 2259 | ROM_LOAD( "epr-16726.bin", 0x000000, 0x020000, CRC(c179b8c7) SHA1(86d3e65c77fb53b1d380b629348f4ab5b3d39228) ) |
| 2186 | 2260 | |
| r1037 | r1038 | |
| 3500 | 3574 | ROM_LOAD32_WORD("mpr-16537.ic28", 0x000000, 0x200000, CRC(36b7c35a) SHA1(b32fd1d3fc8983fb5f2a7b236b665a8c9b52769f) ) |
| 3501 | 3575 | ROM_LOAD32_WORD("mpr-16536.ic29", 0x000002, 0x200000, CRC(6d6afed9) SHA1(2018468d7d849854b3d0cfbcd217317e2fc93555) ) |
| 3502 | 3576 | |
| 3503 | ROM_REGION( 0x1000000, REGION_USER2, 0 ) // Models | |
| 3577 | ROM_REGION32_LE( 0x1000000, REGION_USER2, 0 ) // Models | |
| 3504 | 3578 | ROM_LOAD32_WORD("mpr-16523.ic16", 0x000000, 0x200000, CRC(2f484d42) SHA1(0b83a3fc92b7d913a14cfb01d688c63555c17c41) ) |
| 3505 | 3579 | ROM_LOAD32_WORD("mpr-16518.ic20", 0x000002, 0x200000, CRC(df683bf7) SHA1(16afe5029591f3536b5b75d9cf50a34d0ea72c3d) ) |
| 3506 | 3580 | ROM_LOAD32_WORD("mpr-16524.ic17", 0x400000, 0x200000, CRC(34658bd7) SHA1(71b47626ffe5b26d1140afe1b830a9a2be86c88f) ) |
| r1037 | r1038 | |
| 3510 | 3584 | ROM_LOAD32_WORD("mpr-16772.ic19", 0xc00000, 0x200000, CRC(770ed912) SHA1(1789f35dd403f73f8be18495a0fe4ad1e6841417) ) |
| 3511 | 3585 | ROM_LOAD32_WORD("mpr-16771.ic23", 0xc00002, 0x200000, CRC(a2205124) SHA1(257a3675e4ef6adbf61285a5daa5954223c28cb2) ) |
| 3512 | 3586 | |
| 3513 | ROM_REGION( 0x1000000, REGION_USER3, 0 ) // Textures | |
| 3514 | ROM_LOAD32_WORD("mpr-16521.24", 0x000000, 0x200000, CRC(af1934fb) SHA1(a6a21a23cd34d0de6d3e6a5c3c2687f905d0dc2a) ) | |
| 3515 | ROM_LOAD32_WORD("mpr-16522.25", 0x000002, 0x200000, CRC(55d39a57) SHA1(abf7b0fc0f111f90da42463d600db9fa32e95efe) ) | |
| 3516 | ROM_LOAD32_WORD("mpr-16769.26", 0x400000, 0x200000, CRC(e57429e9) SHA1(8c712ab09e61ef510741a55f29b3c4e497471372) ) | |
| 3517 | ROM_LOAD32_WORD("mpr-16770.27", 0x400002, 0x200000, CRC(f9fa7bfb) SHA1(8aa933b74d4e05dc49987238705e50b00e5dae73) ) | |
| 3587 | ROM_REGION16_LE( 0x1000000, REGION_USER3, 0 ) // Textures | |
| 3588 | ROM_LOAD32_WORD("mpr-16522.25", 0x000000, 0x200000, CRC(55d39a57) SHA1(abf7b0fc0f111f90da42463d600db9fa32e95efe) ) | |
| 3589 | ROM_LOAD32_WORD("mpr-16521.24", 0x000002, 0x200000, CRC(af1934fb) SHA1(a6a21a23cd34d0de6d3e6a5c3c2687f905d0dc2a) ) | |
| 3590 | ROM_LOAD32_WORD("mpr-16770.27", 0x800000, 0x200000, CRC(f9fa7bfb) SHA1(8aa933b74d4e05dc49987238705e50b00e5dae73) ) | |
| 3591 | ROM_LOAD32_WORD("mpr-16769.26", 0x800002, 0x200000, CRC(e57429e9) SHA1(8c712ab09e61ef510741a55f29b3c4e497471372) ) | |
| 3518 | 3592 | |
| 3519 | 3593 | ROM_REGION( 0x20000, REGION_CPU4, 0) // Communication program |
| 3520 | 3594 | ROM_LOAD( "epr-16726.bin", 0x000000, 0x020000, CRC(c179b8c7) SHA1(86d3e65c77fb53b1d380b629348f4ab5b3d39228) ) |
| r1037 | r1038 | |
| 3574 | 3648 | ROM_LOAD32_WORD("mpr-16771.ic23", 0xc00002, 0x200000, CRC(a2205124) SHA1(257a3675e4ef6adbf61285a5daa5954223c28cb2) ) |
| 3575 | 3649 | |
| 3576 | 3650 | ROM_REGION( 0x1000000, REGION_USER3, 0 ) // Textures |
| 3577 | ROM_LOAD32_WORD("mpr-16521.24", 0x000000, 0x200000, CRC(af1934fb) SHA1(a6a21a23cd34d0de6d3e6a5c3c2687f905d0dc2a) ) | |
| 3578 | ROM_LOAD32_WORD("mpr-16522.25", 0x000002, 0x200000, CRC(55d39a57) SHA1(abf7b0fc0f111f90da42463d600db9fa32e95efe) ) | |
| 3579 | ROM_LOAD32_WORD("mpr-16769.26", 0x400000, 0x200000, CRC(e57429e9) SHA1(8c712ab09e61ef510741a55f29b3c4e497471372) ) | |
| 3580 | ROM_LOAD32_WORD("mpr-16770.27", 0x400002, 0x200000, CRC(f9fa7bfb) SHA1(8aa933b74d4e05dc49987238705e50b00e5dae73) ) | |
| 3651 | ROM_LOAD32_WORD("mpr-16522.25", 0x000000, 0x200000, CRC(55d39a57) SHA1(abf7b0fc0f111f90da42463d600db9fa32e95efe) ) | |
| 3652 | ROM_LOAD32_WORD("mpr-16521.24", 0x000002, 0x200000, CRC(af1934fb) SHA1(a6a21a23cd34d0de6d3e6a5c3c2687f905d0dc2a) ) | |
| 3653 | ROM_LOAD32_WORD("mpr-16770.27", 0x800000, 0x200000, CRC(f9fa7bfb) SHA1(8aa933b74d4e05dc49987238705e50b00e5dae73) ) | |
| 3654 | ROM_LOAD32_WORD("mpr-16769.26", 0x800002, 0x200000, CRC(e57429e9) SHA1(8c712ab09e61ef510741a55f29b3c4e497471372) ) | |
| 3581 | 3655 | |
| 3582 | 3656 | ROM_REGION( 0x20000, REGION_CPU4, 0) // Communication program |
| 3583 | 3657 | ROM_LOAD( "epr-16726.bin", 0x000000, 0x020000, CRC(c179b8c7) SHA1(86d3e65c77fb53b1d380b629348f4ab5b3d39228) ) |
| r1037 | r1038 | |
| 3635 | 3709 | ROM_LOAD32_WORD("mpr-16771.ic23", 0xc00002, 0x200000, CRC(a2205124) SHA1(257a3675e4ef6adbf61285a5daa5954223c28cb2) ) |
| 3636 | 3710 | |
| 3637 | 3711 | ROM_REGION( 0x1000000, REGION_USER3, 0 ) // Textures |
| 3638 | ROM_LOAD32_WORD("mpr-16521.24", 0x000000, 0x200000, CRC(af1934fb) SHA1(a6a21a23cd34d0de6d3e6a5c3c2687f905d0dc2a) ) | |
| 3639 | ROM_LOAD32_WORD("mpr-16522.25", 0x000002, 0x200000, CRC(55d39a57) SHA1(abf7b0fc0f111f90da42463d600db9fa32e95efe) ) | |
| 3640 | ROM_LOAD32_WORD("mpr-16769.26", 0x400000, 0x200000, CRC(e57429e9) SHA1(8c712ab09e61ef510741a55f29b3c4e497471372) ) | |
| 3641 | ROM_LOAD32_WORD("mpr-16770.27", 0x400002, 0x200000, CRC(f9fa7bfb) SHA1(8aa933b74d4e05dc49987238705e50b00e5dae73) ) | |
| 3712 | ROM_LOAD32_WORD("mpr-16522.25", 0x000000, 0x200000, CRC(55d39a57) SHA1(abf7b0fc0f111f90da42463d600db9fa32e95efe) ) | |
| 3713 | ROM_LOAD32_WORD("mpr-16521.24", 0x000002, 0x200000, CRC(af1934fb) SHA1(a6a21a23cd34d0de6d3e6a5c3c2687f905d0dc2a) ) | |
| 3714 | ROM_LOAD32_WORD("mpr-16770.27", 0x800000, 0x200000, CRC(f9fa7bfb) SHA1(8aa933b74d4e05dc49987238705e50b00e5dae73) ) | |
| 3715 | ROM_LOAD32_WORD("mpr-16769.26", 0x800002, 0x200000, CRC(e57429e9) SHA1(8c712ab09e61ef510741a55f29b3c4e497471372) ) | |
| 3642 | 3716 | |
| 3643 | 3717 | ROM_REGION( 0x20000, REGION_CPU4, 0) // Communication program |
| 3644 | 3718 | ROM_LOAD( "epr-16726.bin", 0x000000, 0x020000, CRC(c179b8c7) SHA1(86d3e65c77fb53b1d380b629348f4ab5b3d39228) ) |
| r1037 | r1038 | |
| 3697 | 3771 | ROM_LOAD32_WORD("mpr-16771.ic23", 0xc00002, 0x200000, CRC(a2205124) SHA1(257a3675e4ef6adbf61285a5daa5954223c28cb2) ) |
| 3698 | 3772 | |
| 3699 | 3773 | ROM_REGION( 0x1000000, REGION_USER3, 0 ) // Textures |
| 3700 | ROM_LOAD32_WORD("mpr-16521.24", 0x000000, 0x200000, CRC(af1934fb) SHA1(a6a21a23cd34d0de6d3e6a5c3c2687f905d0dc2a) ) | |
| 3701 | ROM_LOAD32_WORD("mpr-16522.25", 0x000002, 0x200000, CRC(55d39a57) SHA1(abf7b0fc0f111f90da42463d600db9fa32e95efe) ) | |
| 3702 | ROM_LOAD32_WORD("mpr-16769.26", 0x400000, 0x200000, CRC(e57429e9) SHA1(8c712ab09e61ef510741a55f29b3c4e497471372) ) | |
| 3703 | ROM_LOAD32_WORD("mpr-16770.27", 0x400002, 0x200000, CRC(f9fa7bfb) SHA1(8aa933b74d4e05dc49987238705e50b00e5dae73) ) | |
| 3774 | ROM_LOAD32_WORD("mpr-16522.25", 0x000000, 0x200000, CRC(55d39a57) SHA1(abf7b0fc0f111f90da42463d600db9fa32e95efe) ) | |
| 3775 | ROM_LOAD32_WORD("mpr-16521.24", 0x000002, 0x200000, CRC(af1934fb) SHA1(a6a21a23cd34d0de6d3e6a5c3c2687f905d0dc2a) ) | |
| 3776 | ROM_LOAD32_WORD("mpr-16770.27", 0x800000, 0x200000, CRC(f9fa7bfb) SHA1(8aa933b74d4e05dc49987238705e50b00e5dae73) ) | |
| 3777 | ROM_LOAD32_WORD("mpr-16769.26", 0x800002, 0x200000, CRC(e57429e9) SHA1(8c712ab09e61ef510741a55f29b3c4e497471372) ) | |
| 3704 | 3778 | |
| 3705 | 3779 | ROM_REGION( 0x20000, REGION_CPU4, 0) // Communication program |
| 3706 | 3780 | ROM_LOAD( "epr-16726.bin", 0x000000, 0x020000, CRC(c179b8c7) SHA1(86d3e65c77fb53b1d380b629348f4ab5b3d39228) ) |
| r1037 | r1038 | |
| 3745 | 3819 | ROM_LOAD32_WORD( "mpr-17156.020", 0x000002, 0x200000, CRC(c4f4aabf) SHA1(8814cd329609cc8a188fedd770230bb9a5d00361) ) |
| 3746 | 3820 | |
| 3747 | 3821 | ROM_REGION( 0x1000000, REGION_USER3, 0 ) // Textures |
| 3748 | ROM_LOAD32_WORD( "mpr-17157.024", 0x000000, 0x200000, CRC(cf31e33d) SHA1(0cb62d4f28b5ad8a7e4c82b0ca8aea3037b05455) ) | |
| 3749 | ROM_LOAD32_WORD( "mpr-17158.025", 0x000002, 0x200000, CRC(1108d1ec) SHA1(e95d4166bd4b26c5f21b85821b410f53045f4309) ) | |
| 3822 | ROM_LOAD32_WORD( "mpr-17158.025", 0x000000, 0x200000, CRC(1108d1ec) SHA1(e95d4166bd4b26c5f21b85821b410f53045f4309) ) | |
| 3823 | ROM_LOAD32_WORD( "mpr-17157.024", 0x000002, 0x200000, CRC(cf31e33d) SHA1(0cb62d4f28b5ad8a7e4c82b0ca8aea3037b05455) ) | |
| 3750 | 3824 | |
| 3751 | 3825 | ROM_REGION( 0x20000, REGION_CPU5, 0) // Communication program |
| 3752 | 3826 | ROM_LOAD32_WORD( "epr-17181.006", 0x000000, 0x010000, CRC(1add2b82) SHA1(81892251d466f630a96af25bde652c20e47d7ede) ) |
| r1037 | r1038 | |
| 3787 | 3861 | |
| 3788 | 3862 | ROM_REGION( 0x1000000, REGION_USER2, 0 ) // Models |
| 3789 | 3863 | ROM_LOAD32_WORD("mpr-16968.16", 0x000000, 0x200000, CRC(4a16f465) SHA1(411214ed65ce966040d4299b50bfaa40f7f5f266) ) |
| 3790 | ROM_LOAD32_WORD("mpr-1696 | |
| 3864 | ROM_LOAD32_WORD("mpr-16964.21", 0x000002, 0x200000, CRC(d4a769b6) SHA1(845c34f | |
| 3791 | 3865 | ROM_LOAD32_WORD("mpr-16969.17", 0x400000, 0x200000, CRC(887380ac) SHA1(03a9f601764d06cb0b2daaadf4f8433f327abd4a) ) |
| 3792 | ROM_LOAD32_WORD("mpr-1696 | |
| 3866 | ROM_LOAD32_WORD("mpr-16965.20", 0x400002, 0x200000, CRC(9ba7645f) SHA1( | |
| 3793 | 3867 | |
| 3794 | 3868 | ROM_REGION( 0x1000000, REGION_USER3, 0 ) // Textures |
| 3795 | ROM_LOAD32_WORD("mpr-16966.24", 0x000000, 0x200000, CRC(7484efe9) SHA1(33e72139ad6c2990428e3fa041dbcdf39aca1c7a) ) | |
| 3796 | ROM_LOAD32_WORD("mpr-16967.25", 0x000002, 0x200000, CRC(b8b84c9d) SHA1(00ef320988609e98c8af383b68d845e3be8d0a03) ) | |
| 3869 | ROM_LOAD32_WORD("mpr-16967.25", 0x000000, 0x200000, CRC(b8b84c9d) SHA1(00ef320988609e98c8af383b68d845e3be8d0a03) ) | |
| 3870 | ROM_LOAD32_WORD("mpr-16966.24", 0x000002, 0x200000, CRC(7484efe9) SHA1(33e72139ad6c2990428e3fa041dbcdf39aca1c7a) ) | |
| 3797 | 3871 | |
| 3798 | 3872 | ROM_REGION( 0x20000, REGION_CPU5, ROMREGION_ERASE00 ) // Communication program |
| 3799 | 3873 | |
| r1037 | r1038 | |
| 3841 | 3915 | ROM[0x700/4] = 0x08000004; |
| 3842 | 3916 | } |
| 3843 | 3917 | |
| 3844 | static DRIVER_INIT( daytona ) | |
| 3845 | { | |
| 3846 | UINT32 *ROM = (UINT32 *)memory_region(REGION_CPU1); | |
| 3847 | ||
| 3848 | // kill TGP busywait | |
| 3849 | ROM[0x11c7c/4] = 0x08000004; | |
| 3850 | } | |
| 3851 | ||
| 3852 | 3918 | static DRIVER_INIT( daytonam ) |
| 3853 | 3919 | { |
| 3854 | 3920 | memory_install_read32_handler(0, ADDRESS_SPACE_PROGRAM, 0x240000, 0x24ffff, 0, 0, maxx_r ); |
| r1037 | r1038 | |
| 3879 | 3945 | } |
| 3880 | 3946 | |
| 3881 | 3947 | // Model 2 (TGPs, Model 1 sound board) |
| 3882 | GAME( 1993, daytona, 0, model2o, daytona, daytona, ROT0, "Sega", "Daytona USA (Japan)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) | |
| 3883 | GAME( 1993, daytonas, daytona, model2o, daytona, daytona, ROT0, "Sega", "Daytona USA (With Saturn Adverts)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) | |
| 3948 | GAME( 1993, daytona, 0, model2o, daytona, 0, ROT0, "Sega", "Daytona USA (Japan)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) | |
| 3949 | GAME( 1993, daytonas, daytona, model2o, daytona, 0, ROT0, "Sega", "Daytona USA (With Saturn Adverts)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) | |
| 3884 | 3950 | GAME( 1993, daytonat, daytona, model2o, daytona, 0, ROT0, "Sega", "Daytona USA (Japan, Turbo hack)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) |
| 3885 | 3951 | GAME( 1993, daytonam, daytona, model2o, daytona, daytonam, ROT0, "Sega", "Daytona USA (Japan, To The MAXX)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) |
| 3886 | 3952 | GAME( 1994, desert, 0, model2o, desert, 0, ROT0, "Sega/Martin Marietta", "Desert Tank", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) |
| r1037 | r1038 | |
|---|---|---|
| 826 | 826 | logerror("w1x %05x, %04x & %04x (%05x)\n", offset*2+0x10000, data, mem_mask ^ 0xffff, activecpu_get_pc()); |
| 827 | 827 | } |
| 828 | 828 | |
| 829 | #ifdef UNUSED_FUNCTION | |
| 829 | 830 | static void r2_dt(UINT16 sc, UINT16 cc, UINT16 ent, UINT16 tm, UINT16 x, UINT16 y) |
| 830 | 831 | { |
| 831 | 832 | int bank = mainram[0x704/2]; |
| r1037 | r1038 | |
| 884 | 885 | cc, v1, v2); |
| 885 | 886 | // cpu_setbank(2, memory_region(REGION_USER1)+0x20000*bank); |
| 886 | 887 | } |
| 888 | #endif | |
| 887 | 889 | |
| 888 | 890 | static MACHINE_RESET(raiden2) |
| 889 | 891 | { |
| r1037 | r1038 | |
| 1850 | 1852 | ROM_LOAD32_BYTE("2.6l", 0x000001, 0x40000, CRC(54f3d359) SHA1(869744185746d55c60d2f48eabe384a8499e00fd) ) |
| 1851 | 1853 | ROM_LOAD32_BYTE("4.5l", 0x000003, 0x40000, CRC(a017b8d0) SHA1(4a93ff1ab18f4b61c7ef580995f64840c19ce6b9) ) |
| 1852 | 1854 | |
| 1855 | ROM_REGION( 0x40000, REGION_USER2, 0 ) /* COPDX */ | |
| 1856 | ROM_LOAD( "copx-d2", 0x00000, 0x40000, CRC(a6732ff9) SHA1(c4856ec77869d9098da24b1bb3d7d58bb74b4cda) ) | |
| 1857 | ||
| 1853 | 1858 | ROM_REGION( 0x20000, REGION_CPU2, 0 ) /* 64k code for sound Z80 */ |
| 1854 | 1859 | ROM_LOAD( "sound", 0x000000, 0x10000, CRC(7ec1fbc3) SHA1(48299d6530f641b18764cc49e283c347d0918a47) ) // 5.5c |
| 1855 | 1860 | |
| r1037 | r1038 | |
| 1858 | 1863 | ROM_LOAD16_BYTE( "8.5r", 0x000001, 0x010000, CRC(68f7dddc) SHA1(6938fa974c6ef028751982fdabd6a3820b0d30a8) ) |
| 1859 | 1864 | |
| 1860 | 1865 | ROM_REGION( 0x400000, REGION_GFX2, ROMREGION_DISPOSE ) /* background gfx */ |
| 1861 | /* not dumped for this set */ | |
| 1862 | // ROM_LOAD( "back-1", 0x000000, 0x100000, CRC(8b7f9219) SHA1(3412b6f8a4fe245e521ddcf185a53f2f4520eb57) ) | |
| 1863 | // ROM_LOAD( "back-2", 0x100000, 0x080000, CRC(ce61c952) SHA1(52a843c8ba428b121fab933dd3b313b2894d80ac) ) | |
| 1866 | ROM_LOAD( "back-1", 0x000000, 0x100000, CRC(8b7f9219) SHA1(3412b6f8a4fe245e521ddcf185a53f2f4520eb57) ) | |
| 1867 | ROM_LOAD( "back-2", 0x100000, 0x080000, CRC(ce61c952) SHA1(52a843c8ba428b121fab933dd3b313b2894d80ac) ) | |
| 1864 | 1868 | |
| 1865 | 1869 | ROM_REGION( 0x800000, REGION_GFX3, ROMREGION_DISPOSE ) /* sprite gfx (encrypted) (diff encrypt to raiden2? ) */ |
| 1866 | /* not dumped for this set */ | |
| 1867 | // ROM_LOAD32_WORD( "obj-1", 0x000000, 0x200000, CRC(45be8029) SHA1(adc164f9dede9a86b96a4d709e9cba7d2ad0e564) ) | |
| 1868 | // ROM_LOAD32_WORD( "obj-2", 0x000002, 0x200000, CRC(cb61c19d) SHA1(151a2ce9c32f3321a974819e9b165dddc31c8153) ) | |
| 1870 | ROM_LOAD32_WORD( "obj-1", 0x000000, 0x200000, CRC(45be8029) SHA1(adc164f9dede9a86b96a4d709e9cba7d2ad0e564) ) | |
| 1871 | ROM_LOAD32_WORD( "obj-2", 0x000002, 0x200000, CRC(cb61c19d) SHA1(151a2ce9c32f3321a974819e9b165dddc31c8153) ) | |
| 1869 | 1872 | |
| 1870 | 1873 | ROM_REGION( 0x100000, REGION_SOUND1, 0 ) /* ADPCM samples */ |
| 1871 | ROM_LOAD( "pcm", 0x00000, 0x40000, CRC(48be32b1) SHA1(969d2191a3c46871ee8bf93088b3cecce3eccf0c) ) // 6.4a | |
| 1874 | ROM_LOAD( "6.pcm", 0x00000, 0x40000, CRC(48be32b1) SHA1(969d2191a3c46871ee8bf93088b3cecce3eccf0c) ) // 6.4a | |
| 1872 | 1875 | ROM_END |
| 1873 | 1876 | |
| 1874 | 1877 | ROM_START( zeroteaa ) |
| r1037 | r1038 | |
| 1878 | 1881 | ROM_LOAD32_BYTE("2.bin", 0x000001, 0x40000, CRC(0580b7e8) SHA1(d4416264aa5acdaa781ebcf51f128b3e665cc903) ) |
| 1879 | 1882 | ROM_LOAD32_BYTE("4.bin", 0x000003, 0x40000, CRC(cc666385) SHA1(23a8878315b6009dcc1f27e49572e5be29f6a1a6) ) |
| 1880 | 1883 | |
| 1884 | ROM_REGION( 0x40000, REGION_USER2, 0 ) /* COPDX */ | |
| 1885 | ROM_LOAD( "copx-d2", 0x00000, 0x40000, CRC(a6732ff9) SHA1(c4856ec77869d9098da24b1bb3d7d58bb74b4cda) ) | |
| 1886 | ||
| 1881 | 1887 | ROM_REGION( 0x20000, REGION_CPU2, 0 ) /* 64k code for sound Z80 */ |
| 1882 | 1888 | ROM_LOAD( "5.bin", 0x000000, 0x10000, CRC(efc484ca) SHA1(c34b8e3e7f4c2967bc6414348993478ed637d338) ) |
| 1883 | 1889 | |
| r1037 | r1038 | |
| 1886 | 1892 | ROM_LOAD16_BYTE( "8.bin", 0x000001, 0x010000, CRC(a0b2a09a) SHA1(9b1f6c732000b84b1ad635f332ebead5d65cc491) ) |
| 1887 | 1893 | |
| 1888 | 1894 | ROM_REGION( 0x400000, REGION_GFX2, ROMREGION_DISPOSE ) /* background gfx */ |
| 1889 | /* not dumped for this set */ | |
| 1890 | // ROM_LOAD( "back-1", 0x000000, 0x100000, CRC(8b7f9219) SHA1(3412b6f8a4fe245e521ddcf185a53f2f4520eb57) ) | |
| 1891 | // ROM_LOAD( "back-2", 0x100000, 0x080000, CRC(ce61c952) SHA1(52a843c8ba428b121fab933dd3b313b2894d80ac) ) | |
| 1895 | ROM_LOAD( "back-1", 0x000000, 0x100000, CRC(8b7f9219) SHA1(3412b6f8a4fe245e521ddcf185a53f2f4520eb57) ) | |
| 1896 | ROM_LOAD( "back-2", 0x100000, 0x080000, CRC(ce61c952) SHA1(52a843c8ba428b121fab933dd3b313b2894d80ac) ) | |
| 1892 | 1897 | |
| 1893 | 1898 | ROM_REGION( 0x800000, REGION_GFX3, ROMREGION_DISPOSE ) /* sprite gfx (encrypted) (diff encrypt to raiden2? ) */ |
| 1894 | /* not dumped for this set */ | |
| 1895 | // ROM_LOAD32_WORD( "obj-1", 0x000000, 0x200000, CRC(45be8029) SHA1(adc164f9dede9a86b96a4d709e9cba7d2ad0e564) ) | |
| 1896 | // ROM_LOAD32_WORD( "obj-2", 0x000002, 0x200000, CRC(cb61c19d) SHA1(151a2ce9c32f3321a974819e9b165dddc31c8153) ) | |
| 1899 | ROM_LOAD32_WORD( "obj-1", 0x000000, 0x200000, CRC(45be8029) SHA1(adc164f9dede9a86b96a4d709e9cba7d2ad0e564) ) | |
| 1900 | ROM_LOAD32_WORD( "obj-2", 0x000002, 0x200000, CRC(cb61c19d) SHA1(151a2ce9c32f3321a974819e9b165dddc31c8153) ) | |
| 1897 | 1901 | |
| 1898 | 1902 | ROM_REGION( 0x100000, REGION_SOUND1, 0 ) /* ADPCM samples */ |
| 1899 | ROM_LOAD( "pcm", 0x00000, 0x40000, CRC(48be32b1) SHA1(969d2191a3c46871ee8bf93088b3cecce3eccf0c) ) // 6.bin | |
| 1903 | ROM_LOAD( "6.pcm", 0x00000, 0x40000, CRC(48be32b1) SHA1(969d2191a3c46871ee8bf93088b3cecce3eccf0c) ) // 6.bin | |
| 1900 | 1904 | ROM_END |
| 1901 | 1905 | |
| 1906 | ROM_START( zerotsel ) | |
| 1907 | ROM_REGION( 0x200000, REGION_USER1, 0 ) /* v30 main cpu */ | |
| 1908 | ROM_LOAD32_BYTE("1_sel.bin", 0x000000, 0x40000, CRC(d99d6273) SHA1(21dccd5d71c720b8364406835812b3c9defaff6c) ) | |
| 1909 | ROM_LOAD32_BYTE("3_sel.bin", 0x000002, 0x40000, CRC(0a9fe0b1) SHA1(3588fe19788f77d07e9b5ab8182b94362ffd0024) ) | |
| 1910 | ROM_LOAD32_BYTE("2_sel.bin", 0x000001, 0x40000, CRC(4e114e74) SHA1(fcccbb68c6b7ffe8d109ed3a1ec9120d338398f9) ) | |
| 1911 | ROM_LOAD32_BYTE("4_sel.bin", 0x000003, 0x40000, CRC(0df8ba94) SHA1(e07dce6cf3c3cfe1ea3b7f01e18833c1da5ed1dc) ) | |
| 1912 | ||
| 1913 | ROM_REGION( 0x40000, REGION_USER2, 0 ) /* COPDX */ | |
| 1914 | ROM_LOAD( "copx-d2", 0x00000, 0x40000, CRC(a6732ff9) SHA1(c4856ec77869d9098da24b1bb3d7d58bb74b4cda) ) | |
| 1915 | ||
| 1916 | ROM_REGION( 0x20000, REGION_CPU2, 0 ) /* 64k code for sound Z80 */ | |
| 1917 | ROM_LOAD( "5_sel.bin", 0x000000, 0x10000, CRC(ed91046c) SHA1(de815c999aeeb814d3f091d5a9ac34ea9a388ddb) ) | |
| 1918 | ||
| 1919 | ROM_REGION( 0x020000, REGION_GFX1, ROMREGION_DISPOSE ) /* chars */ | |
| 1920 | ROM_LOAD16_BYTE( "7.5s", 0x000000, 0x010000, CRC(9f6aa0f0) SHA1(1caad7092c07723d12a07aa363ae2aa69cb6be0d) ) | |
| 1921 | ROM_LOAD16_BYTE( "8.5r", 0x000001, 0x010000, CRC(68f7dddc) SHA1(6938fa974c6ef028751982fdabd6a3820b0d30a8) ) | |
| 1922 | ||
| 1923 | ROM_REGION( 0x400000, REGION_GFX2, ROMREGION_DISPOSE ) /* background gfx */ | |
| 1924 | ROM_LOAD( "back-1", 0x000000, 0x100000, CRC(8b7f9219) SHA1(3412b6f8a4fe245e521ddcf185a53f2f4520eb57) ) | |
| 1925 | ROM_LOAD( "back-2", 0x100000, 0x080000, CRC(ce61c952) SHA1(52a843c8ba428b121fab933dd3b313b2894d80ac) ) | |
| 1926 | ||
| 1927 | ROM_REGION( 0x800000, REGION_GFX3, ROMREGION_DISPOSE ) /* sprite gfx (encrypted) (diff encrypt to raiden2? ) */ | |
| 1928 | ROM_LOAD32_WORD( "obj-1", 0x000000, 0x200000, CRC(45be8029) SHA1(adc164f9dede9a86b96a4d709e9cba7d2ad0e564) ) | |
| 1929 | ROM_LOAD32_WORD( "obj-2", 0x000002, 0x200000, CRC(cb61c19d) SHA1(151a2ce9c32f3321a974819e9b165dddc31c8153) ) | |
| 1930 | ||
| 1931 | ROM_REGION( 0x100000, REGION_SOUND1, 0 ) /* ADPCM samples */ | |
| 1932 | ROM_LOAD( "6.pcm", 0x00000, 0x40000, CRC(48be32b1) SHA1(969d2191a3c46871ee8bf93088b3cecce3eccf0c) ) // 6.bin | |
| 1933 | ROM_END | |
| 1934 | ||
| 1902 | 1935 | /* set contained only program roms, was marked as 'non-encrytped' but program isn't encrypted anyway?! */ |
| 1903 | 1936 | ROM_START( zeroteab ) |
| 1904 | 1937 | ROM_REGION( 0x200000, REGION_USER1, 0 ) /* v30 main cpu */ |
| r1037 | r1038 | |
| 1907 | 1940 | ROM_LOAD32_BYTE("z2", 0x000001, 0x40000, CRC(21d68f62) SHA1(8aa85b38e8f36057ef6c7dce5a2878958ce93ce8) ) |
| 1908 | 1941 | ROM_LOAD32_BYTE("z4", 0x000003, 0x40000, CRC(ce8fe6c2) SHA1(69627867c7866e43e771ab85014553117044d18d) ) |
| 1909 | 1942 | |
| 1943 | ROM_REGION( 0x40000, REGION_USER2, 0 ) /* COPDX */ | |
| 1944 | ROM_LOAD( "copx-d2", 0x00000, 0x40000, CRC(a6732ff9) SHA1(c4856ec77869d9098da24b1bb3d7d58bb74b4cda) ) | |
| 1945 | ||
| 1910 | 1946 | ROM_REGION( 0x20000, REGION_CPU2, 0 ) /* 64k code for sound Z80 */ |
| 1911 | 1947 | ROM_LOAD( "sound", 0x000000, 0x10000, CRC(7ec1fbc3) SHA1(48299d6530f641b18764cc49e283c347d0918a47) ) // 5.5c |
| 1912 | 1948 | |
| r1037 | r1038 | |
| 1915 | 1951 | ROM_LOAD16_BYTE( "8.5r", 0x000001, 0x010000, CRC(68f7dddc) SHA1(6938fa974c6ef028751982fdabd6a3820b0d30a8) ) |
| 1916 | 1952 | |
| 1917 | 1953 | ROM_REGION( 0x400000, REGION_GFX2, ROMREGION_DISPOSE ) /* background gfx */ |
| 1918 | /* not dumped for this set */ | |
| 1919 | // ROM_LOAD( "back-1", 0x000000, 0x100000, CRC(8b7f9219) SHA1(3412b6f8a4fe245e521ddcf185a53f2f4520eb57) ) | |
| 1920 | // ROM_LOAD( "back-2", 0x100000, 0x080000, CRC(ce61c952) SHA1(52a843c8ba428b121fab933dd3b313b2894d80ac) ) | |
| 1954 | ROM_LOAD( "back-1", 0x000000, 0x100000, CRC(8b7f9219) SHA1(3412b6f8a4fe245e521ddcf185a53f2f4520eb57) ) | |
| 1955 | ROM_LOAD( "back-2", 0x100000, 0x080000, CRC(ce61c952) SHA1(52a843c8ba428b121fab933dd3b313b2894d80ac) ) | |
| 1921 | 1956 | |
| 1922 | 1957 | ROM_REGION( 0x800000, REGION_GFX3, ROMREGION_DISPOSE ) /* sprite gfx (encrypted) (diff encrypt to raiden2? ) */ |
| 1923 | /* not dumped for this set */ | |
| 1924 | // ROM_LOAD32_WORD( "obj-1", 0x000000, 0x200000, CRC(45be8029) SHA1(adc164f9dede9a86b96a4d709e9cba7d2ad0e564) ) | |
| 1925 | // ROM_LOAD32_WORD( "obj-2", 0x000002, 0x200000, CRC(cb61c19d) SHA1(151a2ce9c32f3321a974819e9b165dddc31c8153) ) | |
| 1958 | ROM_LOAD32_WORD( "obj-1", 0x000000, 0x200000, CRC(45be8029) SHA1(adc164f9dede9a86b96a4d709e9cba7d2ad0e564) ) | |
| 1959 | ROM_LOAD32_WORD( "obj-2", 0x000002, 0x200000, CRC(cb61c19d) SHA1(151a2ce9c32f3321a974819e9b165dddc31c8153) ) | |
| 1926 | 1960 | |
| 1927 | 1961 | ROM_REGION( 0x100000, REGION_SOUND1, 0 ) /* ADPCM samples */ |
| 1928 | ROM_LOAD( "pcm", 0x00000, 0x40000, CRC(48be32b1) SHA1(969d2191a3c46871ee8bf93088b3cecce3eccf0c) ) // 6.4a | |
| 1962 | ROM_LOAD( "6.pcm", 0x00000, 0x40000, CRC(48be32b1) SHA1(969d2191a3c46871ee8bf93088b3cecce3eccf0c) ) // 6.4a | |
| 1929 | 1963 | ROM_END |
| 1930 | 1964 | |
| 1965 | /* Different hardware, COP-D3? */ | |
| 1931 | 1966 | ROM_START( nzerotea ) |
| 1932 | 1967 | ROM_REGION( 0x200000, REGION_USER1, 0 ) /* v30 main cpu */ |
| 1933 | 1968 | ROM_LOAD16_BYTE("prg1", 0x000000, 0x80000, CRC(3c7d9410) SHA1(25f2121b6c2be73f11263934266901ed5d64d2ee) ) |
| r1037 | r1038 | |
| 1949 | 1984 | ROM_LOAD32_WORD( "obj-2", 0x000002, 0x200000, CRC(cb61c19d) SHA1(151a2ce9c32f3321a974819e9b165dddc31c8153) ) |
| 1950 | 1985 | |
| 1951 | 1986 | ROM_REGION( 0x100000, REGION_SOUND1, 0 ) /* ADPCM samples */ |
| 1952 | ROM_LOAD( "pcm", 0x00000, 0x40000, CRC(48be32b1) SHA1(969d2191a3c46871ee8bf93088b3cecce3eccf0c) ) | |
| 1987 | ROM_LOAD( "6.pcm", 0x00000, 0x40000, CRC(48be32b1) SHA1(969d2191a3c46871ee8bf93088b3cecce3eccf0c) ) | |
| 1953 | 1988 | ROM_END |
| 1954 | 1989 | |
| 1955 | 1990 | /* INIT */ |
| r1037 | r1038 | |
| 2267 | 2302 | GAME( 1993, zeroteam, 0, raiden2, raiden2, raiden2, ROT0, "Seibu Kaihatsu", "Zero Team (set 1)", GAME_NOT_WORKING|GAME_NO_SOUND) |
| 2268 | 2303 | GAME( 1993, zeroteaa, zeroteam,raiden2, raiden2, raiden2, ROT0, "Seibu Kaihatsu", "Zero Team (set 2)", GAME_NOT_WORKING|GAME_NO_SOUND) |
| 2269 | 2304 | GAME( 1993, zeroteab, zeroteam,raiden2, raiden2, raiden2, ROT0, "Seibu Kaihatsu", "Zero Team (set 3)", GAME_NOT_WORKING|GAME_NO_SOUND) |
| 2305 | GAME( 1993, zerotsel, zeroteam,raiden2, raiden2, raiden2, ROT0, "Seibu Kaihatsu", "Zero Team Selection", GAME_NOT_WORKING|GAME_NO_SOUND) | |
| 2270 | 2306 | GAME( 1993, nzerotea, zeroteam,raiden2, raiden2, raiden2, ROT0, "Seibu Kaihatsu", "New Zero Team", GAME_NOT_WORKING|GAME_NO_SOUND) |
| 2271 | 2307 |
| r1037 | r1038 | |
|---|---|---|
| 1375 | 1375 | ROM_LOAD( "epr13078.bin", 0xb0000, 0x40000, CRC(15684dc5) SHA1(595051006de24f791dae937584e502ff2fa31d9c) ) |
| 1376 | 1376 | ROM_END |
| 1377 | 1377 | |
| 1378 | /* | |
| 1379 | ||
| 1380 | CPUs: | |
| 1381 | on main board: | |
| 1382 | ||
| 1383 | 1x MC68000P10 (main) | |
| 1384 | 1x Z8400BB1-Z80BCPU (sound) | |
| 1385 | 1x OKI M6295 (sound) | |
| 1386 | 1x oscillator 24.000MHz (close to main) | |
| 1387 | 1x oscillator 8.000MHz (close to sound) | |
| 1388 | ||
| 1389 | ROMs | |
| 1390 | on main board: | |
| 1391 | ||
| 1392 | 9x M27C512 (1,2,3,4,5,6,7,8,10) | |
| 1393 | 1x TMS27C256 (9) | |
| 1394 | 21x NM27C010Q (11-31) | |
| 1395 | ||
| 1396 | ---------------------- | |
| 1397 | ||
| 1398 | on roms board: | |
| 1399 | 6x NM27C010Q (32-37) | |
| 1400 | 2x N82S123N | |
| 1401 | ||
| 1402 | */ | |
| 1403 | ||
| 1404 | ROM_START( astormb2 ) | |
| 1405 | ROM_REGION( 0x080000, REGION_CPU1, 0 ) /* 68000 code */ | |
| 1406 | ROM_LOAD16_BYTE( "1.a4", 0x000000, 0x10000, CRC(cca0d0af) SHA1(26fdbbeb8444d05f0ca2056a7c7fb81b0f1f2b5a) ) | |
| 1407 | ROM_LOAD16_BYTE( "2.a3", 0x020000, 0x10000, CRC(f95eb883) SHA1(b25d9c0fd46a534e7612f4a3ffa708b73654ae2b) ) | |
| 1408 | ROM_LOAD16_BYTE( "3.a2", 0x040000, 0x10000, CRC(4206ecd4) SHA1(45c65d7727cfaf215a7081159f6931185e92b39a) ) // epr13182.bin [3/4] IDENTICAL | |
| 1409 | ROM_LOAD16_BYTE( "4.a1", 0x060000, 0x10000, CRC(23247c95) SHA1(e4d78c453d2cb77946dd1b5266de823968eade77) ) // epr13182.bin [4/4] 98.648071% | |
| 1410 | ROM_LOAD16_BYTE( "5.a9", 0x000001, 0x10000, CRC(6143039e) SHA1(8a5143c1e2c637149e988c423fa30b31e29a1193) ) | |
| 1411 | ROM_LOAD16_BYTE( "6.a8", 0x020001, 0x10000, CRC(0fd17bec) SHA1(e9a5dd93394fdf1561a925e4111dfce51b717b14) ) | |
| 1412 | ROM_LOAD16_BYTE( "7.a7", 0x040001, 0x10000, CRC(c901e228) SHA1(f459ba819a4e5f5174ff1b3957fb648c93beed53) ) // epr13181.bin [3/4] IDENTICAL | |
| 1413 | ROM_LOAD16_BYTE( "8.a6", 0x060001, 0x10000, CRC(bfb9d607) SHA1(8c3e10c1397fa0807d8df4715c9eb1945c774924) ) // epr13181.bin [4/4] 98.587036% | |
| 1414 | ||
| 1415 | ROM_REGION( 0xc0000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */ | |
| 1416 | ROM_LOAD( "32.01", 0x00000, 0x20000, CRC(d2aeb4ab) SHA1(9338ec5dc48f5d2b20511628a281236fe4646ef4) ) // epr13073.bin [1/2] IDENTICAL | |
| 1417 | ROM_LOAD( "33.011", 0x20000, 0x20000, CRC(2193f0ae) SHA1(84070f74693699c1ffc1a47517a97b5d058d08ec) ) // epr13073.bin [2/2] IDENTICAL | |
| 1418 | ROM_LOAD( "34.02", 0x40000, 0x20000, CRC(849aa725) SHA1(0f949dfe8a6c5796edc86a05339da80a158a95ae) ) // epr13074.bin [1/2] IDENTICAL | |
| 1419 | ROM_LOAD( "35.021", 0x60000, 0x20000, CRC(3f190347) SHA1(131953ccefb95eeef1ea90499ce521c3749f95c1) ) // epr13074.bin [2/2] IDENTICAL | |
| 1420 | ROM_LOAD( "36.03", 0x80000, 0x20000, CRC(c0f9628d) SHA1(aeacf5e409adfa0b9c28c90d4e89eb1f56cd5f4d) ) // epr13075.bin [1/2] IDENTICAL | |
| 1421 | ROM_LOAD( "37.031", 0xa0000, 0x20000, CRC(95af904e) SHA1(6574fa874c355c368109b417aab7d0b05c9d215d) ) // epr13075.bin [2/2] IDENTICAL | |
| 1422 | ||
| 1423 | ROM_REGION( 0x200000, REGION_GFX2, 0 ) /* sprites */ | |
| 1424 | ROM_LOAD16_BYTE( "17.042", 0x000001, 0x20000, CRC(db08beb5) SHA1(c154d22c69b77637d6a9d0f2bffcfb47e6901ec8) ) // mpr13082.bin [1/2] IDENTICAL | |
| 1425 | ROM_LOAD16_BYTE( "16.043", 0x040001, 0x20000, CRC(41f78977) SHA1(9cf9fcf96722d148c4b2cf7aa33425b6efcd0379) ) // mpr13082.bin [2/2] IDENTICAL | |
| 1426 | ROM_LOAD16_BYTE( "29.012", 0x000000, 0x20000, CRC(22acf675) SHA1(80fd0d96017bf36d964a79f7e13e73fee7ed370a) ) // mpr13089.bin [1/2] 99.941254% | |
| 1427 | ROM_LOAD16_BYTE( "28.013", 0x040000, 0x20000, CRC(32b37a3a) SHA1(70f268aa99a17739fd9d832b5f1d9e37247747e6) ) // mpr13089.bin [2/2] IDENTICAL | |
| 1428 | ROM_LOAD16_BYTE( "19.040", 0x080001, 0x20000, CRC(10c359ac) SHA1(9087cb824242ce5fc8eba45b61cca8b329c576e5) ) // mpr13081.bin [1/2] IDENTICAL | |
| 1429 | ROM_LOAD16_BYTE( "18.041", 0x0c0001, 0x20000, CRC(47146c1d) SHA1(cd5d92136f86128a9f304c4f8850f1efd652dd5c) ) // mpr13081.bin [2/2] IDENTICAL | |
| 1430 | ROM_LOAD16_BYTE( "31.010", 0x080000, 0x20000, CRC(e88fc39c) SHA1(f19c55c49771625a76e65b639a3b23969db8031d) ) // mpr13088.bin [1/2] IDENTICAL | |
| 1431 | ROM_LOAD16_BYTE( "30.011", 0x0c0000, 0x20000, CRC(6fe7e2a2) SHA1(94e5852377f72fd00daae302db4a5f93301213e4) ) // mpr13088.bin [2/2] IDENTICAL | |
| 1432 | ROM_LOAD16_BYTE( "21.032", 0x100001, 0x20000, CRC(c9e5a258) SHA1(809a3a3f88efe9c7a9dd9f6439ccb48fffb84df0) ) // mpr13080.bin [1/2] IDENTICAL | |
| 1433 | ROM_LOAD16_BYTE( "20.033", 0x140001, 0x20000, CRC(ddf8d00e) SHA1(0a9031063921bb03e7fd57eea369a1ddcfa85431) ) // mpr13080.bin [2/2] IDENTICAL | |
| 1434 | ROM_LOAD16_BYTE( "25.022", 0x100000, 0x20000, CRC(af8f3700) SHA1(3787f732eee5c6c9b6550bd4ce5387aff2c4072e) ) // mpr13087.bin [1/2] IDENTICAL | |
| 1435 | ROM_LOAD16_BYTE( "24.023", 0x140000, 0x20000, CRC(a092ecb6) SHA1(d7cc85eaea70c7947c497bc1d9743ab12a6fb43e) ) // mpr13087.bin [2/2] IDENTICAL | |
| 1436 | ROM_LOAD16_BYTE( "23.030", 0x180001, 0x20000, CRC(adc1b625) SHA1(496a1e92a833dbde37a0426165ff4250848b6ef4) ) // epr13079.bin [1/2] IDENTICAL | |
| 1437 | ROM_LOAD16_BYTE( "22.031", 0x1c0001, 0x20000, CRC(27c27f38) SHA1(439502250da4e376d2aa4bd9122455c6991e334d) ) // epr13079.bin [2/2] IDENTICAL | |
| 1438 | ROM_LOAD16_BYTE( "27.020", 0x180000, 0x20000, CRC(6c5312aa) SHA1(94b74c78f318fcc1881a2926cebc98033a7e535d) ) // epr13086.bin [1/2] IDENTICAL | |
| 1439 | ROM_LOAD16_BYTE( "26.021", 0x1c0000, 0x20000, CRC(c67fc986) SHA1(5fac826f9dde45201e3b93582dbe29c584a10229) ) // epr13086.bin [2/2] 99.987030% | |
| 1440 | ||
| 1441 | /* Sound HW is very different to the originals */ | |
| 1442 | ROM_REGION( 0x210000, REGION_CPU2, ROMREGION_ERASEFF ) /* Z80 sound CPU */ | |
| 1443 | ROM_LOAD( "9.a5", 0x10000, 0x08000, CRC(0a4638e9) SHA1(0470e03a194464ff53c7583637193b585f5fd79f) ) | |
| 1444 | ||
| 1445 | ROM_REGION( 0x40000, REGION_SOUND1, ROMREGION_ERASEFF ) /* Oki6295 Samples - fixed? samples */ | |
| 1446 | ROM_LOAD( "11.a10", 0x00000, 0x20000, CRC(7e0f752c) SHA1(a4070c3fa4848b5be223f9b927de4b6926dbb4e6) ) // contains sample table | |
| 1447 | ROM_LOAD( "10.a11", 0x20000, 0x10000, CRC(722e5969) SHA1(9cf891c6533b2e2a5c4741aa4e405038a7bf4e97) ) | |
| 1448 | /* 0x30000- 0x3ffff banked? (guess) */ | |
| 1449 | ||
| 1450 | ROM_REGION( 0xc0000, REGION_SOUND2, ROMREGION_ERASEFF ) /* Oki6295 Samples - banked? samples*/ | |
| 1451 | ROM_LOAD( "12.a15", 0x00000, 0x20000, CRC(cb4517db) SHA1(4c93376c2b3e70001bbc283d4485bb55514f6ef9) ) | |
| 1452 | ROM_LOAD( "13.a14", 0x20000, 0x20000, CRC(c60d6f18) SHA1(c9610729f19ae8414efd785948a1e6fb079bfe8d) ) | |
| 1453 | ROM_LOAD( "14.a13", 0x40000, 0x20000, CRC(07e6b3a5) SHA1(32da2a9aeb840b76e6f0117ac342ff5d612762b4) ) | |
| 1454 | ROM_LOAD( "15.a12", 0x60000, 0x20000, CRC(dffde929) SHA1(037b32470747d155385e532ee574b1234b3c2b26) ) | |
| 1455 | ||
| 1456 | ROM_REGION( 0x0120, REGION_PROMS, 0 ) | |
| 1457 | ROM_LOAD( "n82s129n.129", 0x0000, 0x0100, CRC(a7c22d96) SHA1(160deae8053b09c09328325246598b3518c7e20b) ) | |
| 1458 | ROM_LOAD( "n82s123n.123", 0x0100, 0x0020, CRC(58bcf8bd) SHA1(e4d3d179b08c0f3424a6bec0f15058fb1b56f8d8) ) | |
| 1459 | ROM_END | |
| 1460 | ||
| 1461 | ||
| 1378 | 1462 | ROM_START( mwalkbl ) |
| 1379 | 1463 | ROM_REGION( 0x080000, REGION_CPU1, 0 ) /* 68000 code */ |
| 1380 | 1464 | ROM_LOAD16_BYTE( "mwalkbl.01", 0x000000, 0x10000, CRC(f49cdb16) SHA1(34b7e98d31c3b9db2f0f055d7b249b0e5e5cb746) ) |
| r1037 | r1038 | |
| 1489 | 1573 | |
| 1490 | 1574 | /*****************************************************************************/ |
| 1491 | 1575 | |
| 1492 | GAME( 1990, astormbl, astorm, astormbl, astormbl, astormbl, ROT0, "bootleg", "Alien Storm (bootleg)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) | |
| 1576 | GAME( 1990, astormbl, astorm, astormbl, astormbl, astormbl, ROT0, "bootleg", "Alien Storm (bootleg, set 1)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) | |
| 1577 | GAME( 1990, astormb2, astorm, astormbl, astormbl, astormbl, ROT0, "bootleg", "Alien Storm (bootleg, set 2)", GAME_IMPERFECT_GRAPHICS | GAME_NO_SOUND ) | |
| 1493 | 1578 | |
| 1494 | 1579 | GAME( 1990, mwalkbl, mwalk, mwalkbl, mwalkbl, mwalkbl, ROT0, "bootleg", "Michael Jackson's Moonwalker (bootleg)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 1495 | 1580 |
| r1037 | r1038 | |
|---|---|---|
| 1 | 1 | /** |
| 2 | 2 | Namco System 21 |
| 3 | 3 | |
| 4 | There are at least three hardware variations, all of which are based on | |
| 5 | Namco System2: | |
| 4 | todo: | |
| 5 | - confirm that halt dsp works | |
| 6 | - fix machine/namcos2 to halt only relevant cpu subsets | |
| 7 | - manual "kickstart" needed (press "N" any time after title screen) | |
| 6 | 8 | |
| 7 | 1. Winning Run was a mass-produced prototype; it uses 3 68k CPUs; all others use 2 68k CPUs. | |
| 9 | Winning Run | |
| 10 | polygon glitches/flicker | |
| 11 | missing posirq handling | |
| 8 | 12 | |
| 9 | 2. Cyber Sled uses 4xTMS320C25 | |
| 13 | Air Combat | |
| 14 | timing innacuracies cause DSP to lock up in-game | |
| 10 | 15 | |
| 11 | 3. Starblade uses 5xTMS320C20 | |
| 16 | Starblade | |
| 17 | high score colors wrong | |
| 12 | 18 | |
| 19 | Cybersled | |
| 20 | occasional transparent floor due to z-buffer overloading | |
| 21 | ||
| 22 | Solvaou | |
| 23 | sprite mixing wrong; needs to use zbuffer | |
| 24 | ||
| 25 | Driver's Eyes | |
| 26 | not yet working | |
| 27 | ||
| 28 | Questions? pstroffo@yahoo.com (Phil Stroffolino) | |
| 29 | ||
| 30 | There are at least four hardware variations, all of which are based on Namco System2: | |
| 31 | ||
| 32 | | Winning Run | Driver's Eyes | Starblade | Cyber Sled | |
| 33 | --------------------------+-------------+---------------+-----------+------------ | |
| 34 | GPU+bitmap layer | yes | no | no | no | |
| 35 | Namco System NB1 Sprites | no | yes | yes | yes | |
| 36 | Number of DSPs | 1 | 1 | 5 | 4 | |
| 37 | ||
| 13 | 38 | The main 68k CPUs populate a chunk of shared RAM with an display list describing a scene to be rendered. |
| 14 | 39 | The main CPUs also specify attributes for a master camera which provides additional global transformations. |
| 15 | 40 | The display list contains references to specific 3d objects and their position/orientation in 3d space. |
| 16 | 41 | |
| 17 | 42 | The master DSP parses the display list and applies high level geometry, emitting matrices and object |
| 18 | references. | |
| 43 | references. Object references are expanded into meshes (decoded from point ROMs) and passed to the slave | |
| 44 | DSP, interleaved with local transforms. | |
| 19 | 45 | |
| 20 | An intermediate device (*) expands object references to the primitive data from point ROMs interleaved with | |
| 21 | local transforms, making this data available as input to the slave DSP. | |
| 46 | A collection of slave DSPs transforms, projects, and clips each primitive's vertices. Each slave DSP outputs | |
| 47 | a stream of quad descriptors. | |
| 22 | 48 | |
| 23 | The slave DSP applies the view transform to each primitive's vertices, projection, and clipping, | |
| 24 | and outputs quad descriptors. Each quad has a reference color (shared across vertices), | |
| 25 | and for each vertex the tuple: (screenx,screeny,z-code). The z-code scalar accounts for depth bias. | |
| 26 | A zbuffer is used while rendering quads. | |
| 49 | Each quad has a reference color (shared across vertices), and for each vertex the tuple: (screenx,screeny,z-code). | |
| 50 | The z-code scalar accounts for depth bias. A zbuffer is used while rendering quads, and depth cueing is used to | |
| 51 | shade pixels according to their depth. | |
| 27 | 52 | |
| 28 | 53 | --------------------------------------------------------------------------- |
| 29 | 54 | |
| 30 | 55 | STATUS: |
| 31 | Starblade: | |
| 32 | missing background objects on stage#1 (starships) | |
| 33 | - missing 'upload' data (dsp to 68k)?; check for unmapped ram use? | |
| 34 | - find object code for starship (compare to PSX port) | |
| 35 | ||
| 36 | 56 | Solvaou: |
| 37 | no polys; why? | |
| 38 | ||
| 39 | CyberSled: | |
| 40 | graphics cropped | |
| 41 | three uploads? | |
| 42 | ||
| 43 | 57 | Air Combat: |
| 44 | | |
| 58 | no polys | |
| 45 | 59 | |
| 46 | 60 | Winning Run |
| 47 | ? | |
| 61 | Winning Run 91 | |
| 62 | working | |
| 63 | - some minor polygon glitches | |
| 64 | - posirq handling broken | |
| 48 | 65 | |
| 49 | Winning Run 92 | |
| 50 | ? | |
| 51 | ||
| 52 | 66 | Driver's Eyes |
| 53 | | |
| 67 | crashes | |
| 54 | 68 | |
| 55 | TODO: | |
| 69 | TODO: (*) | |
| 56 | 70 | |
| 57 | TODO: Fix emulation to support other games (likely caused by dspram16_r hacks). | |
| 58 | ||
| 59 | TODO: Determine purpose of additional (unemulated) DSPs. I believe they are additional slave DSPs that | |
| 60 | run in parallel, but it is difficult to know for sure without having access to the DSP bios code. | |
| 61 | The single slave DSP isn't powerful enough to update the polygon layer at 60fps. | |
| 62 | ||
| 63 | TODO: (*) Extract master DSP's BIOS (via trojan if possible). | |
| 64 | Certain tasks currently implemented in C (see TransferDspData) are quite likely done explicitly | |
| 65 | by the master DSP. | |
| 66 | ||
| 67 | TODO: Determine how "point ram" (tested by main 68k cpu on boot) is actually used. | |
| 68 | ||
| 69 | 71 | TODO: namcoic.c: in StarBlade, the sprite list is stored at a different location during startup tests. |
| 70 | | |
| 72 | W | |
| 71 | 73 | |
| 72 | TODO: Starblade has some missing background graphics (i.e. the spaceport runway at | |
| 73 | beginning of stage#1, various large startship cruisers drifting in space, etc. | |
| 74 | Even with (mostly complete) DSP emulation, it is a complete mystery why this isn't working. | |
| 75 | The main CPU doesn't write descriptors for these objects in its display list, nor does it | |
| 76 | write any obvious "high level commands" to control background graphics sequencing. | |
| 77 | ||
| 78 | TODO: CyberSled appears to use the "POSIRQ" feature seen in various Namco System 2 games for | |
| 79 | split screen effects. This IRQ is triggered at a designated scanline. Confirm that this | |
| 80 | works as expected. | |
| 81 | ||
| 82 | 74 | TODO: Map lamps/vibration outputs as used by StarBlade (and possibly other titles). |
| 83 | 75 | These likely involve the MCU. |
| 84 | 76 | |
| 85 | 77 | --------------------------------------------------------------------------- |
| 86 | 78 | |
| 87 | 79 | DSP RAM is shared with the 68000 CPUs and master DSP. |
| 88 | Th | |
| 80 | The | |
| 89 | 81 | |
| 90 | 0x200000..0x2000ff populated with ASCII Text during self-tests: | |
| 91 | ROM: | |
| 92 | RAM: | |
| 93 | PTR: | |
| 94 | SMU: | |
| 95 | IDC: | |
| 96 | CPU:ABORT | |
| 97 | DSP: | |
| 98 | CRC:OK from cpu | |
| 99 | CRC: from dsp | |
| 100 | ID: | |
| 101 | B-M: P-M: S-M: SET UP | |
| 82 | 0x200000: ROM: | |
| 83 | 0x200010: RAM: | |
| 84 | 0x200020: PTR: | |
| 85 | 0x200024: <checksum> | |
| 86 | 0x200028: <checksum> | |
| 87 | 0x200030: SMU: // "NO RESPONS" (DSP) | |
| 88 | 0x200040: IDC: // "NO RESPONS" (DSP) | |
| 89 | 0x200050: CPU: BOOTING..COMPLETE | |
| 90 | 0x200060: DSP: | |
| 91 | 0x200070: CRC: OK from cpu | |
| 92 | 0x200080: CRC: from dsp | |
| 93 | 0x200090: ID: | |
| 94 | 0x2000a0: B-M: | |
| 95 | 0x2000b0: P-M: | |
| 96 | 0x2000c0: S-M: | |
| 97 | 0x200100 status: 2=upload needed, 4=error (abort) | |
| 98 | 0x200102 status | |
| 99 | 0x200104 0x0002 | |
| 100 | 0x200106 addr written by main cpu | |
| 101 | 0x20010a point rom checksum (starblade expects 0xed53) | |
| 102 | 0x20010c point rom checksum (starblade expects 0xd5df) | |
| 103 | 0x20010e 1 : upload-code-to-dsp request trigger | |
| 104 | 0x200110 status | |
| 105 | 0x200112 status | |
| 106 | 0x200114 master dsp code size | |
| 107 | 0x200116 slave dsp code size | |
| 108 | 0x200120 upload source1 addr hi | |
| 109 | 0x200122 upload source1 addr lo | |
| 110 | 0x200124 upload source2 addr hi | |
| 111 | 0x200126 upload source2 addr lo | |
| 112 | 0x200200 enable | |
| 113 | 0x200202 status | |
| 114 | 0x200206 work page select | |
| 115 | 0x200208 0xa2c2 (air combat) | |
| 116 | 0x208000..0x2080ff camera attributes for page#0 | |
| 117 | 0x208200..0x208fff 3d object attribute display list for page#0 | |
| 118 | 0x20c000..0x20c0ff camera attributes for page#1 | |
| 119 | 0x20c200..0x20cfff 3d object attribute display list for page#1 | |
| 102 | 120 | |
| 103 | 0x200100 status: 2=upload needed, 4=error (abort) | |
| 104 | 0x200102 status | |
| 105 | 0x200104 0x0002 | |
| 106 | 0x200106 addr written by main cpu | |
| 107 | 0x20010a checksum (starblade expects 0xed53) | |
| 108 | 0x20010c checksum (starblade expects 0xd5df) | |
| 109 | 0x20010e 1 : upload-code-to-dsp request trigger | |
| 110 | 0x200110 status | |
| 111 | 0x200112 status | |
| 112 | 0x200114 master dsp code size | |
| 113 | 0x200116 slave dsp code size | |
| 114 | 0x200120 upload source1 addr hi | |
| 115 | 0x200122 upload source1 addr lo | |
| 116 | 0x200124 upload source2 addr hi | |
| 117 | 0x200126 upload source2 addr lo | |
| 121 | Starblade Cybersled AirCombat22 Solvalou | |
| 122 | [400]:= 00 0000 00 0000 00 0000 00 0000 | |
| 123 | [402]:= 00 0011 00 0011 00 0011 00 0011 | |
| 124 | [404]:= 00 0000 00 0000 00 0000 00 0000 | |
| 125 | [406]:= 00 0000 00 0000 00 0000 00 0000 | |
| 126 | [408]:= 10 1002 10 1000 10 1000 10 1000 | |
| 127 | [40a]:= 02 0000 00 0000 00 0000 00 ffff | |
| 128 | [40c]:= 00 1040 00 023a 00 1000 ff ffff | |
| 129 | [40e]:= 00 0000 00 0000 00 0000 ff ffff | |
| 130 | [410]:= 10 1034 02 0258 10 1000 ff ffff | |
| 131 | [412]:= 40 0000 3a 0000 00 0000 ff ffff | |
| 132 | [414]:= 00 1030 00 027a 00 1000 ff ffff | |
| 133 | [416]:= 00 0000 00 0000 00 0000 ff ffff | |
| 134 | [418]:= 10 1030 02 02a2 10 1000 ff ffff | |
| 135 | [41a]:= 34 0000 58 0000 00 0000 ff ffff | |
| 136 | [41c]:= 00 1030 00 02c2 00 1000 ff ffff | |
| 137 | [41e]:= 00 0000 00 0000 00 0000 ff ffff | |
| 138 | [420]:= 10 1030 02 02e6 10 1000 ff ffff | |
| 118 | 139 | |
| 119 | 0x200200 enable | |
| 120 | 0x200202 status | |
| 121 | 0x200206 work page select | |
| 122 | ||
| 123 | 0x208000..0x2080ff camera attributes for page#0 | |
| 124 | 0x208200..0x208fff 3d object attribute display list for page#0 | |
| 125 | ||
| 126 | 0x20c000..0x20c0ff camera attributes for page#1 | |
| 127 | 0x20c200..0x20cfff 3d object attribute display list for page#1 | |
| 128 | ||
| 129 | 140 | --------------------------------------------------------------------------- |
| 130 | 141 | |
| 131 | 142 | Thanks to Aaron Giles for originally making sense of the Point ROM data. |
| 132 | 143 | |
| 133 | 144 | Point data in ROMS (signed 24 bit words) encodes the 3d primitives. |
| 134 | 145 | |
| 135 | The first part of the Point ROMs is an address table. The first entry serves | |
| 136 | a special (unknown) purpose. | |
| 146 | The first part of the Point ROMs is an address table. | |
| 137 | 147 | |
| 138 | 148 | Given an object index, this table provides an address into the second part of |
| 139 | 149 | the ROM. |
| r1037 | r1038 | |
| 148 | 158 | The rest of the data in each entry is organized as follows: |
| 149 | 159 | |
| 150 | 160 | length (1 word) |
| 151 | u | |
| 161 | qu | |
| 152 | 162 | vertex count (1 word) - the number of vertices encoded |
| 153 | 163 | unknown value (1 word) - almost always 0; depth bias |
| 154 | 164 | vertex list (n x 3 words) |
| 155 | 165 | quad count (1 word) - the number of quads to draw |
| 156 | quad primitives (n x 5 words) - | |
| 166 | quad primitives (n x 5 words) - | |
| 157 | 167 | |
| 158 | 168 | ----------------------------------------------------------------------- |
| 159 | 169 | Board 1 : DSP Board - 1st PCB. (Uppermost) |
| r1037 | r1038 | |
| 286 | 296 | #include "sound/c140.h" |
| 287 | 297 | #include "namcos21.h" |
| 288 | 298 | |
| 289 | static UINT16 *master_dsp_rom; | |
| 290 | static UINT16 *master_dsp_ram; | |
| 291 | static UINT16 *slave_dsp_rom; | |
| 292 | static UINT16 *slave_dsp_ram; | |
| 293 | ||
| 299 | #define PTRAM_SIZE 0x20000 | |
| 300 | #define CPU_DSP_MASTER_REGION REGION_CPU5 | |
| 294 | 301 | #define CPU_DSP_SLAVE_REGION REGION_CPU6 |
| 295 | 302 | |
| 303 | static UINT16 *winrun_dspbios; | |
| 304 | static UINT16 *winrun_dspcomram; | |
| 305 | #define WINRUN_MAX_POLY_PARAM (1+256*3) | |
| 306 | static UINT16 winrun_poly_buf[WINRUN_MAX_POLY_PARAM]; | |
| 307 | static int winrun_poly_index; | |
| 308 | static UINT32 winrun_pointrom_addr; | |
| 309 | static UINT16 *winrun_polydata; | |
| 310 | static int winrun_dsp_alive; | |
| 311 | static UINT16 *winrun_gpucomram; | |
| 312 | static UINT16 winrun_dspcomram_control[8]; | |
| 313 | static UINT16 namcos21_video_enable; | |
| 314 | ||
| 315 | static UINT8 *pointram; | |
| 316 | static int pointram_idx; | |
| 317 | ||
| 318 | UINT16 *namcos21_dspram16; | |
| 319 | UINT16 *namcos21_spritepos; | |
| 320 | ||
| 321 | /* private data */ | |
| 322 | static UINT16 *mpDataROM; | |
| 323 | static UINT16 *mpSharedRAM1; | |
| 324 | static UINT8 *mpDualPortRAM; | |
| 325 | static UINT16 pointram_control; | |
| 326 | ||
| 327 | ||
| 328 | ||
| 296 | 329 | #define DSP_BUF_MAX (4096*8) |
| 297 | 330 | static struct |
| 298 | 331 | { |
| 299 | 332 | unsigned masterSourceAddr; |
| 300 | 333 | UINT16 slaveInputBuffer[DSP_BUF_MAX]; |
| 301 | size_t slaveInputSize; | |
| 302 | unsigned slaveSourceAddr; | |
| 303 | ||
| 334 | unsigned slaveBytesAvailable; | |
| 335 | unsigned slaveBytesAdvertised; | |
| 336 | unsigned slaveInputStart; | |
| 304 | 337 | UINT16 slaveOutputBuffer[DSP_BUF_MAX]; |
| 305 | 338 | unsigned slaveOutputSize; |
| 306 | ||
| 307 | 339 | UINT16 masterDirectDrawBuffer[256]; |
| 308 | 340 | unsigned masterDirectDrawSize; |
| 341 | int masterFinished; | |
| 342 | int slaveActive; | |
| 309 | 343 | } *mpDspState; |
| 310 | 344 | |
| 311 | /*static*/ void | |
| 312 | UpdatePolyFrameBufferAndResetDSPs( void ) | |
| 345 | static INT32 | |
| 346 | ReadPointROMData( unsigned offset ) | |
| 313 | 347 | { |
| 314 | memset( mpDspState, 0, sizeof(*mpDspState) ); | |
| 315 | cpunum_set_input_line(4, INPUT_LINE_RESET, PULSE_LINE); /* DSP: master */ | |
| 316 | cpunum_set_input_line(5, INPUT_LINE_RESET, PULSE_LINE); /* DSP: slave */ | |
| 317 | namcos21_ClearPolyFrameBuffer(); | |
| 348 | const INT32 *pPointData = (INT32 *)memory_region( REGION_USER2 ); | |
| 349 | INT32 result = pPointData[offset]; | |
| 350 | return result; | |
| 318 | 351 | } |
| 319 | 352 | |
| 320 | /* globals (shared by videohrdw/namcos21.c) */ | |
| 321 | UINT16 *namcos21_dspram16; | |
| 322 | UINT16 *namcos21_spritepos; | |
| 353 | static READ16_HANDLER(namcos21_video_enable_r) | |
| 354 | { | |
| 355 | return namcos21_video_enable; | |
| 356 | } | |
| 323 | 357 | |
| 324 | /* private data */ | |
| 325 | static UINT16 *mpDataROM; | |
| 326 | static UINT16 *mpSharedRAM1; | |
| 327 | static UINT8 *mpDualPortRAM; | |
| 328 | static UINT16 namcos21_dsp_control[1]; | |
| 358 | static WRITE16_HANDLER(namcos21_video_enable_w) | |
| 359 | { | |
| 360 | COMBINE_DATA( &namcos21_video_enable ); /* 0x40 = enable */ | |
| 361 | if( namcos21_video_enable!=0 && namcos21_video_enable!=0x40 ) | |
| 362 | { | |
| 363 | printf( "unexpected namcos21_video_enable_w=0x%x\n", namcos21_video_enable ); | |
| 364 | } | |
| 365 | } | |
| 329 | 366 | |
| 330 | /* memory handlers for shared DSP RAM (used to pass 3d parameters) */ | |
| 331 | 367 | |
| 332 | static READ16_HANDLER( uploadhack_r ) | |
| 333 | { /* used for memory reads from fake adddress 0xfffffe */ | |
| 334 | return 0; | |
| 368 | /***********************************************************/ | |
| 369 | static WRITE16_HANDLER(dspcuskey_w) | |
| 370 | { /* TODO: proper cuskey emulation */ | |
| 335 | 371 | } |
| 336 | 372 | |
| 337 | ||
| 373 | st | |
| 338 | 374 | { |
| 339 | master_dsp_rom[1] = 0x0100; | |
| 340 | slave_dsp_rom[1] = 0x0100; | |
| 341 | } | |
| 342 | ||
| 343 | static READ16_HANDLER( dspram16_r ) | |
| 344 | { | |
| 345 | if( namcos21_dspram16[0] == 0x524f ) // "RO"(M) | |
| 346 | { /* the check above is done so we don't interfere with the DSPRAM test */ | |
| 347 | namcos21_dspram16[0x100/2] = 2; /* status to fake working DSP */ | |
| 348 | namcos21_dspram16[0x102/2] = 2; /* status to fake working DSP */ | |
| 349 | namcos21_dspram16[0x110/2] = 2; /* status to fake working DSP */ | |
| 350 | namcos21_dspram16[0x112/2] = 0; /* status to fake working DSP */ | |
| 351 | ||
| 352 | if( namcos2_gametype == NAMCOS21_SOLVALOU ) | |
| 375 | UINT16 result = 0; | |
| 376 | if( namcos2_gametype == NAMCOS21_SOLVALOU ) | |
| 377 | { | |
| 378 | switch( activecpu_get_pc() ) | |
| 353 | 379 | { |
| 354 | if( input_code_pressed(KEYCODE_A) ) namcos21_dspram16[0x94] = 0; // solvalou patch | |
| 380 | case 0x805e: result = 0x0000; break; | |
| 381 | case 0x805f: result = 0xfeba; break; | |
| 382 | case 0x8067: result = 0xffff; break; | |
| 383 | case 0x806e: result = 0x0145; break; | |
| 384 | default: | |
| 385 | printf( "unk cuskey_r; pc=0x%x\n", activecpu_get_pc() ); | |
| 386 | break; | |
| 355 | 387 | } |
| 356 | ||
| 357 | /* The DSPs provide the 68k CPUs with a list of memory chunks to copy. | |
| 358 | * This is done at boot time, and doesn't appear to actually do anything | |
| 359 | * important. For now, we pass artifically constructed parameters that | |
| 360 | * cause no memory copies to take place. | |
| 361 | */ | |
| 362 | namcos21_dspram16[0x120/2] = 0xfffffe>>16; | |
| 363 | namcos21_dspram16[0x122/2] = 0xfffffe&0xffff; | |
| 364 | namcos21_dspram16[0x124/2] = 0xfffffe>>16; | |
| 365 | namcos21_dspram16[0x126/2] = 0xfffffe&0xffff; | |
| 366 | ||
| 367 | if( namcos21_dspram16[0x128/2] == 1 ) | |
| 368 | { /* ??? */ | |
| 369 | namcos21_dspram16[0x102/2] = 1; | |
| 370 | // namcos21_dspram16[0x128/2] = 0; /* ? */ | |
| 371 | } | |
| 372 | ||
| 373 | switch( offset ) | |
| 388 | } | |
| 389 | else if( namcos2_gametype == NAMCOS21_CYBERSLED ) | |
| 390 | { | |
| 391 | switch( activecpu_get_pc() ) | |
| 374 | 392 | { |
| 375 | case 0x010a/2: | |
| 376 | case 0x010c/2: | |
| 377 | logerror( "crc read: %d:0x%08x\n", cpu_getactivecpu(), activecpu_get_pc() ); | |
| 378 | break; | |
| 393 | case 0x8061: result = 0xfe95; break; | |
| 394 | case 0x8069: result = 0xffff; break; | |
| 395 | case 0x8070: result = 0x016A; break; | |
| 379 | 396 | default: |
| 380 | 397 | break; |
| 381 | 398 | } |
| 382 | ||
| 383 | /* The 68k CPUs perform some sort of checksum on the DSPs. The expected values are game-specific. */ | |
| 384 | switch( namcos2_gametype ) | |
| 399 | } | |
| 400 | else if( namcos2_gametype == NAMCOS21_AIRCOMBAT ) | |
| 401 | { | |
| 402 | switch( activecpu_get_pc() ) | |
| 385 | 403 | { |
| 386 | case NAMCOS21_CYBERSLED: | |
| 387 | namcos21_dspram16[0x10a/2] = 0x4f4b; | |
| 388 | namcos21_dspram16[0x10c/2] = 0x759c; | |
| 389 | break; | |
| 390 | ||
| 391 | case NAMCOS21_STARBLADE: | |
| 392 | namcos21_dspram16[0x10a/2] = 0xed53; | |
| 393 | namcos21_dspram16[0x10c/2] = 0xd5df; | |
| 394 | break; | |
| 395 | ||
| 396 | case NAMCOS21_SOLVALOU: | |
| 397 | namcos21_dspram16[0x10a/2] = 0x05b2; | |
| 398 | namcos21_dspram16[0x10c/2] = 0x606e; | |
| 399 | break; | |
| 400 | ||
| 401 | case NAMCOS21_AIRCOMBAT: | |
| 402 | break; | |
| 403 | ||
| 404 | case 0x8062: result = 0xfeb9; break; | |
| 405 | case 0x806a: result = 0xffff; break; | |
| 406 | case 0x8071: result = 0x0146; break; | |
| 404 | 407 | default: |
| 405 | /* TODO: add 'checksum' values for other games */ | |
| 406 | 408 | break; |
| 407 | 409 | } |
| 410 | } | |
| 411 | return result; | |
| 412 | } | |
| 408 | 413 | |
| 409 | if( namcos21_dspram16[0x10e/2] == 0x0001 ) | |
| 414 | static void | |
| 415 | TransmitWordToSlave( UINT16 data ) | |
| 416 | { | |
| 417 | unsigned offs = mpDspState->slaveInputStart+mpDspState->slaveBytesAvailable++; | |
| 418 | mpDspState->slaveInputBuffer[offs%DSP_BUF_MAX] = data; | |
| 419 | logerror( "+%04x(#%04x)\n", data, mpDspState->slaveBytesAvailable ); | |
| 420 | //printf( "+%04x(#%04x)\n", data, mpDspState->slaveBytesAvailable ); | |
| 421 | mpDspState->slaveActive = 1; | |
| 422 | if( mpDspState->slaveBytesAvailable >= DSP_BUF_MAX ) | |
| 423 | { | |
| 424 | printf( "IDC overflow\n" ); | |
| 425 | exit(1); | |
| 426 | } | |
| 427 | } /* TransmitWordToSlave */ | |
| 428 | ||
| 429 | static void | |
| 430 | TransferDspData( void ) | |
| 431 | { | |
| 432 | UINT16 addr = mpDspState->masterSourceAddr; | |
| 433 | int mode = addr&0x8000; | |
| 434 | addr&=0x7fff; | |
| 435 | if( addr ) | |
| 436 | { | |
| 437 | for(;;) | |
| 410 | 438 | { |
| 411 | 439 | int i; |
| 412 | unsigned len; | |
| 413 | static int count; | |
| 414 | ||
| 415 | /* This signals that a large chunk of code/data has been written by the main CPU. | |
| 416 | * The 68k CPU waits for this flag to be cleared. | |
| 417 | */ | |
| 418 | logerror( "%d:0x%x upload %d\n", | |
| 419 | cpu_getactivecpu(), | |
| 420 | activecpu_get_pc(), | |
| 421 | count++ ); | |
| 422 | ||
| 423 | namcos21_dspram16[0x10e/2] = 0; /* ack */ | |
| 424 | ||
| 425 | /* upload to master dsp */ | |
| 426 | len = namcos21_dspram16[0x114/2]; | |
| 427 | if( len ) | |
| 440 | UINT16 old = addr; | |
| 441 | UINT16 code = namcos21_dspram16[addr++]; | |
| 442 | if( code == 0xffff ) | |
| 428 | 443 | { |
| 429 | logerror( "upload master\n" ); | |
| 430 | for( i=0; i<len; i++ ) | |
| 444 | if( mode ) | |
| 431 | 445 | { |
| 432 | master_dsp_ram[i] = namcos21_dspram16[0x2000/2+i]; | |
| 446 | addr = namcos21_dspram16[addr]; | |
| 447 | mpDspState->masterSourceAddr = addr; | |
| 448 | logerror( "LOOP:0x%04x\n", addr ); | |
| 449 | addr&=0x7fff; | |
| 450 | if( old==addr ) | |
| 451 | { | |
| 452 | return; | |
| 453 | } | |
| 433 | 454 | } |
| 434 | master_dsp_rom[1] = 0x0100; | |
| 455 | else | |
| 456 | { | |
| 457 | mpDspState->masterSourceAddr = 0; | |
| 458 | return; | |
| 459 | } | |
| 435 | 460 | } |
| 436 | ||
| 437 | /* upload to slave dsp(s) */ | |
| 438 | len = namcos21_dspram16[0x116/2]; | |
| 439 | if( len ) | |
| 461 | else if( mode==0 ) | |
| 462 | { /* direct data transfer */ | |
| 463 | logerror( "DATA TFR(0x%x)\n", code ); | |
| 464 | TransmitWordToSlave( code ); | |
| 465 | for( i=0; i<code; i++ ) | |
| 466 | { | |
| 467 | UINT16 data = namcos21_dspram16[addr++]; | |
| 468 | TransmitWordToSlave( data ); | |
| 469 | } | |
| 470 | } | |
| 471 | else if( code==0x18 || code==0x1a ) | |
| 440 | 472 | { |
| 441 | logerror( "upload slave\n" ); | |
| 442 | for( i=0; i<len; i++ ) | |
| 473 | logerror( "HEADER TFR(0x%x)\n", code ); | |
| 474 | TransmitWordToSlave( code+1 ); | |
| 475 | for( i=0; i<code; i++ ) | |
| 443 | 476 | { |
| 444 | slave_dsp_ram[i] = namcos21_dspram16[0xa000/2+i]; | |
| 477 | UINT16 data = namcos21_dspram16[addr++]; | |
| 478 | TransmitWordToSlave( data ); | |
| 445 | 479 | } |
| 446 | slave_dsp_rom[1] = 0x0100; | |
| 447 | 480 | } |
| 481 | else | |
| 482 | { | |
| 483 | INT32 masterAddr = ReadPointROMData(code); | |
| 484 | logerror( "OBJ TFR(0x%x)\n", code ); | |
| 485 | { | |
| 486 | UINT16 len = namcos21_dspram16[addr++]; | |
| 487 | for(;;) | |
| 488 | { | |
| 489 | int subAddr = ReadPointROMData(masterAddr++); | |
| 490 | if( subAddr==0xffffff ) | |
| 491 | { | |
| 492 | break; | |
| 493 | } | |
| 494 | else | |
| 495 | { | |
| 496 | int primWords = (UINT16)ReadPointROMData(subAddr++); | |
| 497 | if( primWords>2 ) | |
| 498 | { | |
| 499 | TransmitWordToSlave( 0 ); /* pad1 */ | |
| 500 | TransmitWordToSlave( len+1 ); | |
| 501 | for( i=0; i<len; i++ ) | |
| 502 | { /* transform */ | |
| 503 | TransmitWordToSlave( namcos21_dspram16[addr+i] ); | |
| 504 | } | |
| 505 | TransmitWordToSlave( 0 ); /* pad2 */ | |
| 506 | TransmitWordToSlave( primWords+1 ); | |
| 507 | for( i=0; i<primWords; i++ ) | |
| 508 | { | |
| 509 | TransmitWordToSlave( (UINT16)ReadPointROMData(subAddr+i) ); | |
| 510 | } | |
| 511 | } | |
| 512 | else | |
| 513 | { | |
| 514 | logerror( "TFR NOP?\n" ); | |
| 515 | } | |
| 516 | } | |
| 517 | } /* for(;;) */ | |
| 518 | addr+=len; | |
| 519 | } | |
| 520 | } | |
| 521 | } /* for(;;) */ | |
| 522 | } | |
| 523 | } /* TransferDspData */ | |
| 524 | ||
| 525 | static int mbNeedsKickstart; | |
| 526 | ||
| 527 | void | |
| 528 | namcos21_kickstart( int internal ) | |
| 529 | { | |
| 530 | if( internal ) | |
| 531 | { | |
| 532 | if( mbNeedsKickstart==0 ) return; | |
| 533 | mbNeedsKickstart--; | |
| 534 | if( mbNeedsKickstart ) return; | |
| 535 | printf("KICK\n" ); | |
| 536 | } | |
| 537 | namcos21_ClearPolyFrameBuffer(); | |
| 538 | mpDspState->masterSourceAddr = 0; | |
| 539 | mpDspState->slaveOutputSize = 0; | |
| 540 | mpDspState->masterFinished = 0; | |
| 541 | mpDspState->slaveActive = 0; | |
| 542 | cpunum_set_input_line(4, 0, HOLD_LINE); /* DSP: master */ | |
| 543 | cpunum_set_input_line(5, INPUT_LINE_RESET, PULSE_LINE); /* DSP: slave */ | |
| 544 | } | |
| 545 | ||
| 546 | static UINT16 | |
| 547 | ReadWordFromSlaveInput( void ) | |
| 548 | { | |
| 549 | UINT16 data = 0; | |
| 550 | if( mpDspState->slaveBytesAvailable>0 ) | |
| 551 | { | |
| 552 | data = mpDspState->slaveInputBuffer[mpDspState->slaveInputStart++]; | |
| 553 | mpDspState->slaveInputStart %= DSP_BUF_MAX; | |
| 554 | mpDspState->slaveBytesAvailable--; | |
| 555 | if( mpDspState->slaveBytesAdvertised>0 ) | |
| 556 | { | |
| 557 | mpDspState->slaveBytesAdvertised--; | |
| 448 | 558 | } |
| 559 | logerror( "-%04x(0x%04x) %x\n", data, mpDspState->slaveBytesAvailable, activecpu_get_pc() ); | |
| 449 | 560 | } |
| 561 | return data; | |
| 562 | } /* ReadWordFromSlaveInput */ | |
| 563 | ||
| 564 | static size_t | |
| 565 | GetInputBytesAdvertisedForSlave( void ) | |
| 566 | { | |
| 567 | if( mpDspState->slaveBytesAdvertised < mpDspState->slaveBytesAvailable ) | |
| 568 | { | |
| 569 | mpDspState->slaveBytesAdvertised++; | |
| 570 | } | |
| 571 | else if( mpDspState->slaveActive && mpDspState->masterFinished && mpDspState->masterSourceAddr ) | |
| 572 | { | |
| 573 | namcos21_kickstart(0); | |
| 574 | } | |
| 575 | return mpDspState->slaveBytesAdvertised; | |
| 576 | } /* GetInputBytesAdvertisedForSlave */ | |
| 577 | ||
| 578 | static READ16_HANDLER( dspram16_r ) | |
| 579 | { | |
| 450 | 580 | return namcos21_dspram16[offset]; |
| 451 | } | |
| 581 | } /* dspram16_r */ | |
| 452 | 582 | |
| 453 | 583 | static WRITE16_HANDLER( dspram16_w ) |
| 454 | 584 | { |
| 455 | 585 | COMBINE_DATA( &namcos21_dspram16[offset] ); |
| 456 | if( offset == 0x103 ) | |
| 586 | ||
| 587 | if( namcos2_gametype != NAMCOS21_WINRUN91 ) | |
| 457 | 588 | { |
| 458 | cpu_yield(); /* hack; synchronization for solvalou */ | |
| 589 | if( mpDspState->masterSourceAddr && | |
| 590 | offset == 1+(mpDspState->masterSourceAddr&0x7fff) ) | |
| 591 | { | |
| 592 | logerror( "IDC-CONTINUE\n" ); | |
| 593 | TransferDspData(); | |
| 594 | } | |
| 595 | else if( namcos2_gametype == NAMCOS21_SOLVALOU && | |
| 596 | offset == 0x103 && | |
| 597 | cpu_getactivecpu()==0 ) | |
| 598 | { /* hack; synchronization for solvalou */ | |
| 599 | cpu_yield(); | |
| 600 | } | |
| 459 | 601 | } |
| 460 | 602 | } /* dspram16_w */ |
| 461 | 603 | |
| 462 | 604 | /************************************************************************************/ |
| 463 | 605 | |
| 464 | static | |
| 606 | static | |
| 465 | 607 | InitDSP( void ) |
| 466 | 608 | { |
| 467 | UINT16 *pMem; | |
| 468 | UINT16 pc, loop; | |
| 609 | UINT16 *pMem = (UINT16 *)memory_region(CPU_DSP_MASTER_REGION); | |
| 610 | /** | |
| 611 | * DSP BIOS tests "CPU ID" on startup | |
| 612 | * "JAPAN (C)1990 NAMCO LTD. by H.F " | |
| 613 | */ | |
| 614 | memcpy( &pMem[0xbff0], &pMem[0x0008], 0x20 ); | |
| 615 | pMem[0x8000] = 0xFF80; | |
| 616 | pMem[0x8001] = 0x0000; | |
| 469 | 617 | |
| 618 | mpDspState = auto_malloc( sizeof(*mpDspState) ); | |
| 470 | 619 | memset( mpDspState, 0, sizeof(*mpDspState) ); |
| 471 | 620 | |
| 472 | pMem = master_dsp_rom; | |
| 473 | pc = 0; | |
| 474 | pMem[pc++] = 0xff80; /* b */ | |
| 475 | pMem[pc++] = 0; /* 0x0100; */ | |
| 476 | pc = 2; /* IRQ0 */ | |
| 477 | pMem[pc++] = 0xCE26; /* ret */ | |
| 478 | pc = 4; /* IRQ1 */ | |
| 479 | pMem[pc++] = 0xCE26; /* ret */ | |
| 480 | pc = 6; /* IRQ2 */ | |
| 481 | pMem[pc++] = 0xCE26; /* ret */ | |
| 482 | pc = 0x18; /* timer IRQ */ | |
| 483 | pMem[pc++] = 0xCE26; /* ret */ | |
| 484 | pc = 0x1a; /* serial receive IRQ */ | |
| 485 | pMem[pc++] = 0xCE26; /* ret */ | |
| 486 | pc = 0x1b; /* serial send IRQ */ | |
| 487 | pMem[pc++] = 0xCE26; /* ret */ | |
| 488 | pc = 0x100; | |
| 489 | pMem[pc] = 0xc804;pc++; /* ldpk 004h */ | |
| 490 | pMem[pc] = 0xca00;pc++; /* zac */ | |
| 491 | pMem[pc] = 0x6000;pc++; /* sacl $00,0 */ | |
| 492 | pMem[pc] = 0xca01;pc++; /* lack 01h */ | |
| 493 | pMem[pc] = 0x6001;pc++; /* sacl $01,0 */ | |
| 494 | loop = pc; | |
| 495 | pMem[pc++] = 0xfe80; /* call */ | |
| 496 | pMem[pc++] = 0x8002; | |
| 497 | pMem[pc++] = 0xff80; /* b */ | |
| 498 | pMem[pc++] = loop; | |
| 499 | ||
| 500 | pMem = slave_dsp_rom; | |
| 501 | pc = 0; | |
| 502 | pMem[pc++] = 0xff80; /* b */ | |
| 503 | pMem[pc++] = 0; | |
| 504 | pMem[pc++] = 0xff80; /* b */ | |
| 505 | pMem[pc++] = 0; /* 0x0100; */ | |
| 506 | pc = 2; /* IRQ0 */ | |
| 507 | pMem[pc++] = 0xCE26; /* ret */ | |
| 508 | pc = 4; /* IRQ1 */ | |
| 509 | pMem[pc++] = 0xCE26; /* ret */ | |
| 510 | pc = 6; /* IRQ2 */ | |
| 511 | pMem[pc++] = 0xCE26; /* ret */ | |
| 512 | pc = 0x18; /* timer IRQ */ | |
| 513 | pMem[pc++] = 0xCE26; /* ret */ | |
| 514 | pc = 0x1a; /* serial receive IRQ */ | |
| 515 | pMem[pc++] = 0xCE26; /* ret */ | |
| 516 | pc = 0x1b; /* serial send IRQ */ | |
| 517 | pMem[pc++] = 0xCE26; /* ret */ | |
| 518 | pc = 0x100; | |
| 519 | pMem[pc] = 0xc804;pc++; /* ldpk 004h */ | |
| 520 | pMem[pc] = 0xca00;pc++; /* zac */ | |
| 521 | pMem[pc] = 0x6000;pc++; /* sacl $00,0 */ | |
| 522 | pMem[pc] = 0xca01;pc++; /* lack 01h */ | |
| 523 | pMem[pc] = 0x6001;pc++; /* sacl $01,0 */ | |
| 524 | loop = pc; | |
| 525 | pMem[pc++] = 0xfe80; /* call */ | |
| 526 | pMem[pc++] = 0x8010; | |
| 527 | pMem[pc++] = 0xff80; /* b */ | |
| 528 | pMem[pc++] = loop; | |
| 621 | return 0; | |
| 529 | 622 | } |
| 530 | 623 | |
| 531 | 624 | /***********************************************************/ |
| 532 | 625 | |
| 626 | static UINT32 pointrom_idx; | |
| 627 | ||
| 628 | static UINT8 mPointRomMSB; | |
| 629 | static int mbPointRomDataAvailable; | |
| 630 | ||
| 631 | static READ16_HANDLER( dsp_port0_r ) | |
| 632 | { | |
| 633 | INT32 data = ReadPointROMData(pointrom_idx++); | |
| 634 | mPointRomMSB = (UINT8)(data>>16); | |
| 635 | mbPointRomDataAvailable = 1; | |
| 636 | return (UINT16)data; | |
| 637 | } /* dsp_port0_r */ | |
| 638 | ||
| 639 | static WRITE16_HANDLER( dsp_port0_w ) | |
| 640 | { /* unused? */ | |
| 641 | logerror( "PTRAM_LO(0x%04x)\n", data ); | |
| 642 | } /* dsp_port0_w */ | |
| 643 | ||
| 533 | 644 | static READ16_HANDLER( dsp_port1_r ) |
| 534 | { /* PDP status */ | |
| 535 | return 0x8000; | |
| 536 | } | |
| 645 | { | |
| 646 | if( mbPointRomDataAvailable ) | |
| 647 | { | |
| 648 | mbPointRomDataAvailable = 0; | |
| 649 | return mPointRomMSB; | |
| 650 | } | |
| 651 | return 0x8000; /* IDC ack? */ | |
| 652 | } /* dsp_port1_r */ | |
| 653 | ||
| 654 | static WRITE16_HANDLER( dsp_port1_w ) | |
| 655 | { /* unused? */ | |
| 656 | logerror( "PTRAM_HI(0x%04x)\n", data ); | |
| 657 | } /* dsp_port1_w */ | |
| 658 | ||
| 537 | 659 | static READ16_HANDLER( dsp_port2_r ) |
| 538 | { /* | |
| 660 | { /* IDC TRANSMIT ENABLE? */ | |
| 539 | 661 | return 0; |
| 540 | } | |
| 662 | } /* dsp_port2_r */ | |
| 541 | 663 | |
| 542 | 664 | static WRITE16_HANDLER( dsp_port2_w ) |
| 543 | { /* PDP addr set */ | |
| 665 | { | |
| 666 | logerror( "IDC ADDR INIT(0x%04x)\n", data ); | |
| 544 | 667 | mpDspState->masterSourceAddr = data; |
| 545 | logerror( "port2_w(PDP ADDR): 0x%04x\n", data ); | |
| 546 | } | |
| 547 | static READ16_HANDLER( dsp_port3_r ) | |
| 548 | { /* trigger; XF-related? */ | |
| 549 | logerror( "port3_r(PDP trigger)\n" ); | |
| 668 | TransferDspData(); | |
| 669 | } /* dsp_port2_w */ | |
| 670 | ||
| 671 | static READ16_HANDLER( dsp_port3_idc_rcv_enable_r ) | |
| 672 | { /* IDC RECEIVE ENABLE? */ | |
| 550 | 673 | return 0; |
| 551 | } | |
| 674 | } /* dsp_port3_idc_rcv_enable_r */ | |
| 675 | ||
| 676 | static WRITE16_HANDLER( dsp_port3_w ) | |
| 677 | { /* same address space as pointram? */ | |
| 678 | pointrom_idx<<=16; | |
| 679 | pointrom_idx|=data; | |
| 680 | } /* dsp_port3_w */ | |
| 681 | ||
| 552 | 682 | static WRITE16_HANDLER( dsp_port4_w ) |
| 553 | { /* PDP mode */ | |
| 554 | logerror( "port4_w(0x%04x)\n", data ); | |
| 555 | } | |
| 683 | { /* receives $0B<<4 prior to IDC setup */ | |
| 684 | } /* dsp_port4_w */ | |
| 685 | ||
| 556 | 686 | static READ16_HANDLER( dsp_port8_r ) |
| 557 | { /* slave status? */ | |
| 558 | return 0x0001; | |
| 559 | } | |
| 687 | { /* SMU status */ | |
| 688 | return 1; | |
| 689 | } /* dsp_port8_r */ | |
| 690 | ||
| 691 | int namcos21_irq_enable; | |
| 692 | ||
| 693 | static WRITE16_HANDLER( dsp_port8_w ) | |
| 694 | { /* IRQ-enable? */ | |
| 695 | logerror( "port8_w(%d)\n", data ); | |
| 696 | if( data ) | |
| 697 | { | |
| 698 | mpDspState->masterFinished = 1; | |
| 699 | } | |
| 700 | namcos21_irq_enable = data; | |
| 701 | } /* dsp_port8_w */ | |
| 702 | ||
| 560 | 703 | static READ16_HANDLER( dsp_port9_r ) |
| 561 | { /* unk status; pre-transmit */ | |
| 562 | return 0x0000; | |
| 563 | } | |
| 704 | { /* render-device-busy; used for direct-draw */ | |
| 705 | return 0; | |
| 706 | } /* dsp_port9_r */ | |
| 707 | ||
| 708 | static READ16_HANDLER(dsp_porta_r) | |
| 709 | { /* config */ | |
| 710 | return 0; | |
| 711 | } /* dsp_porta_r */ | |
| 712 | ||
| 564 | 713 | static WRITE16_HANDLER(dsp_porta_w) |
| 565 | { /* unk enable; 0 or 1 */ | |
| 566 | logerror( "porta_w(0x%04x)\n", data ); | |
| 567 | } | |
| 714 | { | |
| 715 | /* boot: 1 */ | |
| 716 | /* IRQ0 end: 0 */ | |
| 717 | /* INT2 begin: 1 */ | |
| 718 | /* direct-draw begin: 0 */ | |
| 719 | /* INT1 begin: 1 */ | |
| 720 | // logerror( "dsp_porta_w(0x%04x)\n", data ); | |
| 721 | } /* dsp_porta_w */ | |
| 722 | ||
| 723 | static READ16_HANDLER(dsp_portb_r) | |
| 724 | { /* config */ | |
| 725 | return 1; | |
| 726 | } /* dsp_portb_r */ | |
| 727 | ||
| 568 | 728 | static WRITE16_HANDLER(dsp_portb_w) |
| 569 | { | |
| 570 | logerror( "portb_w(0x%04x)\n", data ); | |
| 571 | if( data!=1 ) | |
| 729 | { /* render-device trigger */ | |
| 730 | if( data==0 ) | |
| 572 | 731 | { /* only 0->1 transition triggers */ |
| 573 | 732 | return; |
| 574 | 733 | } |
| r1037 | r1038 | |
| 582 | 741 | sx[i] = NAMCOS21_POLY_FRAME_WIDTH/2 + (INT16)mpDspState->masterDirectDrawBuffer[i*3+1]; |
| 583 | 742 | sy[i] = NAMCOS21_POLY_FRAME_HEIGHT/2 + (INT16)mpDspState->masterDirectDrawBuffer[i*3+2]; |
| 584 | 743 | zcode[i] = mpDspState->masterDirectDrawBuffer[i*3+3]; |
| 585 | logerror( "#%d:{%4d,%4d,0x%04x},color=0x%x\n", i,sx[i],sy[i],zcode[i],color ); | |
| 586 | 744 | } |
| 587 | 745 | if( color&0x8000 ) |
| 588 | 746 | { |
| r1037 | r1038 | |
| 590 | 748 | } |
| 591 | 749 | else |
| 592 | 750 | { |
| 593 | | |
| 751 | p | |
| 594 | 752 | } |
| 595 | 753 | } |
| 754 | else if( mpDspState->masterDirectDrawSize ) | |
| 755 | { | |
| 756 | printf( "unexpected masterDirectDrawSize=%d!\n",mpDspState->masterDirectDrawSize ); | |
| 757 | } | |
| 596 | 758 | mpDspState->masterDirectDrawSize = 0; |
| 597 | } | |
| 759 | } /* dsp_portb_w */ | |
| 760 | ||
| 598 | 761 | static WRITE16_HANDLER(dsp_portc_w) |
| 599 | 762 | { /* enqueue data for direct-drawn poly */ |
| 600 | logerror( "portc_w(0x%04x)\n", data ); | |
| 601 | 763 | if( mpDspState->masterDirectDrawSize < DSP_BUF_MAX ) |
| 602 | 764 | { |
| 603 | 765 | mpDspState->masterDirectDrawBuffer[mpDspState->masterDirectDrawSize++] = data; |
| 604 | 766 | } |
| 605 | 767 | else |
| 606 | 768 | { |
| 607 | | |
| 769 | p | |
| 608 | 770 | } |
| 609 | 771 | } /* dsp_portc_w */ |
| 610 | 772 | |
| 773 | static READ16_HANDLER( dsp_portf_r ) | |
| 774 | { /* informs BIOS that this is Master DSP */ | |
| 775 | return 0; | |
| 776 | } /* dsp_portf_r */ | |
| 611 | 777 | |
| 612 | /***********************************************************/ | |
| 613 | ||
| 614 | static UINT16 mCusKeyState; | |
| 615 | ||
| 616 | static WRITE16_HANDLER(dspcuskey_w) | |
| 778 | static WRITE16_HANDLER( dsp_xf_w ) | |
| 617 | 779 | { |
| 618 | logerror( "0x%08x:cuskey_w(%d)\n", activecpu_get_pc(), data ); | |
| 619 | ||
| 620 | if( namcos2_gametype == NAMCOS21_SOLVALOU ) | |
| 621 | { | |
| 622 | if( data == 0x8000 ) | |
| 623 | { | |
| 624 | mCusKeyState = 0xffff; | |
| 625 | } | |
| 626 | else if( data == 0x0000 ) | |
| 627 | { | |
| 628 | mCusKeyState = 0x0145; | |
| 629 | } | |
| 630 | } | |
| 780 | logerror("xf(%d)\n",data); | |
| 631 | 781 | } |
| 632 | static READ16_HANDLER(dspcuskey_r) | |
| 633 | { | |
| 634 | UINT16 result = 0; | |
| 635 | 782 | |
| 636 | if( namcos2_gametype == NAMCOS21_SOLVALOU ) | |
| 637 | { | |
| 638 | switch( offset ) | |
| 639 | { | |
| 640 | case 0: | |
| 641 | result = mCusKeyState; | |
| 642 | break; | |
| 643 | case 2: | |
| 644 | mCusKeyState = 0xfeba; | |
| 645 | break; | |
| 646 | } | |
| 647 | } | |
| 648 | logerror( "0x%08x:cuskey_r()==0x%04x\n", activecpu_get_pc(), result ); | |
| 649 | return result; | |
| 650 | } | |
| 651 | ||
| 652 | 783 | static ADDRESS_MAP_START( master_dsp_program, ADDRESS_SPACE_PROGRAM, 16 ) |
| 653 | AM_RANGE(0x0000, 0x01ff) AM_READ(MRA16_ROM) AM_BASE(&master_dsp_rom) /* internal ROM */ | |
| 654 | AM_RANGE(0x8000, 0x8fff) AM_READ(MRA16_ROM) AM_BASE(&master_dsp_ram) /* uploaded code */ | |
| 784 | AM_RANGE(0x0000, 0x0fff) AM_READ(MRA16_ROM) /* BIOS */ | |
| 785 | AM_RANGE(0x8000, 0xbfff) AM_READ(MRA16_RAM) AM_WRITE(MWA16_RAM) | |
| 655 | 786 | ADDRESS_MAP_END |
| 656 | 787 | |
| 657 | 788 | static ADDRESS_MAP_START( master_dsp_data, ADDRESS_SPACE_DATA, 16 ) |
| r1037 | r1038 | |
| 660 | 791 | ADDRESS_MAP_END |
| 661 | 792 | |
| 662 | 793 | static ADDRESS_MAP_START( master_dsp_io, ADDRESS_SPACE_IO, 16 ) |
| 663 | AM_RANGE(0x01,0x01) AM_READ(dsp_port1_r) | |
| 794 | AM_RANGE(0x00,0x00) AM_READ(dsp_port0_r) AM_WRITE(dsp_port0_w) | |
| 795 | AM_RANGE(0x01,0x01 )AM_READ(dsp_port1_r) AM_WRITE(dsp_port1_w) | |
| 664 | 796 | AM_RANGE(0x02,0x02) AM_READ(dsp_port2_r) AM_WRITE(dsp_port2_w) |
| 665 | AM_RANGE(0x03,0x03) AM_READ(dsp_port3_r) | |
| 797 | AM_RANGE(0x03,0x03) AM_READ(dsp_port3_idc_rcv_enable_r) AM_WRITE(dsp_port3_w) | |
| 666 | 798 | AM_RANGE(0x04,0x04) AM_WRITE(dsp_port4_w) |
| 667 | AM_RANGE(0x08,0x08) AM_READ(dsp_port8_r) | |
| 799 | AM_RANGE(0x08,0x08) AM_READ(dsp_port8_r) AM_WRITE(dsp_port8_w) | |
| 668 | 800 | AM_RANGE(0x09,0x09) AM_READ(dsp_port9_r) |
| 669 | AM_RANGE(0x0a,0x0a) AM_WRITE(dsp_porta_w) | |
| 670 | AM_RANGE(0x0b,0x0b) AM_WRITE(dsp_portb_w) | |
| 801 | AM_RANGE(0x0a,0x0a) AM_READ(dsp_porta_r) AM_WRITE(dsp_porta_w) | |
| 802 | AM_RANGE(0x0b,0x0b) AM_READ(dsp_portb_r) AM_WRITE(dsp_portb_w) | |
| 671 | 803 | AM_RANGE(0x0c,0x0c) AM_WRITE(dsp_portc_w) |
| 804 | AM_RANGE(0x0f,0x0f) AM_READ(dsp_portf_r) | |
| 672 | 805 | AM_RANGE(TMS32025_HOLD, TMS32025_HOLD) AM_READ( MRA16_NOP ) |
| 673 | 806 | AM_RANGE(TMS32025_HOLDA, TMS32025_HOLDA) AM_WRITE( MWA16_NOP ) |
| 674 | AM_RANGE(TMS32025_XF, TMS32025_XF) AM_WRITE( | |
| 807 | AM_RANGE(TMS32025_XF, TMS32025_XF) AM_WRITE( dsp | |
| 675 | 808 | ADDRESS_MAP_END |
| 676 | 809 | |
| 677 | 810 | /************************************************************************************/ |
| 678 | 811 | |
| 679 | 812 | static void |
| 680 | TransmitWordToSlave( UINT16 data ) | |
| 681 | { | |
| 682 | if( mpDspState->slaveInputSize < DSP_BUF_MAX ) | |
| 683 | { | |
| 684 | mpDspState->slaveInputBuffer[mpDspState->slaveInputSize++] = data; | |
| 685 | } | |
| 686 | else | |
| 687 | { | |
| 688 | logerror( "slave input buffer overflow\n" ); | |
| 689 | } | |
| 690 | } | |
| 691 | ||
| 692 | /** | |
| 693 | * On real hardware, the behavior below is almost certainly implemented | |
| 694 | * in DSP bios code, triggered from timer interrupts. | |
| 695 | */ | |
| 696 | static void | |
| 697 | TransferDspData( void ) | |
| 698 | { | |
| 699 | if( mpDspState->masterSourceAddr >= 0x8000 && | |
| 700 | mpDspState->masterSourceAddr && | |
| 701 | mpDspState->slaveSourceAddr >= mpDspState->slaveInputSize ) | |
| 702 | { | |
| 703 | const INT32 *pPointData = (INT32 *)memory_region( REGION_USER2 ); | |
| 704 | const UINT16 *pSource = &namcos21_dspram16[mpDspState->masterSourceAddr - 0x8000]; | |
| 705 | ||
| 706 | mpDspState->slaveInputSize = 0; | |
| 707 | mpDspState->slaveSourceAddr = 0; | |
| 708 | ||
| 709 | for(;;) | |
| 710 | { | |
| 711 | int i; | |
| 712 | UINT16 code = *pSource++; | |
| 713 | if( code == 0xffff ) | |
| 714 | { | |
| 715 | UINT16 addr = *pSource++; | |
| 716 | mpDspState->masterSourceAddr = addr; | |
| 717 | return; | |
| 718 | } | |
| 719 | else if( code == 1 ) | |
| 720 | { | |
| 721 | logerror( "PDP NOP?\n" ); | |
| 722 | pSource += code; | |
| 723 | } | |
| 724 | else if( code == 0x18 ) | |
| 725 | { | |
| 726 | TransmitWordToSlave( code ); | |
| 727 | for( i=0; i<code; i++ ) | |
| 728 | { | |
| 729 | TransmitWordToSlave( pSource[i] ); | |
| 730 | } | |
| 731 | pSource += code; | |
| 732 | } | |
| 733 | else | |
| 734 | { | |
| 735 | UINT16 len = *pSource++; | |
| 736 | INT32 masterAddr = pPointData[code]; | |
| 737 | for(;;) | |
| 738 | { | |
| 739 | INT32 subAddr = pPointData[masterAddr++]; | |
| 740 | if( subAddr==0xffffff ) | |
| 741 | { | |
| 742 | break; | |
| 743 | } | |
| 744 | else | |
| 745 | { | |
| 746 | int primWords = (UINT16)(pPointData[subAddr++]); | |
| 747 | TransmitWordToSlave( len ); | |
| 748 | ||
| 749 | for( i=0; i<len; i++ ) | |
| 750 | { | |
| 751 | TransmitWordToSlave( pSource[i] ); | |
| 752 | } | |
| 753 | ||
| 754 | TransmitWordToSlave( primWords ); | |
| 755 | for( i=0; i<primWords; i++ ) | |
| 756 | { | |
| 757 | TransmitWordToSlave( (UINT16)pPointData[subAddr+i] ); | |
| 758 | } | |
| 759 | } | |
| 760 | } /* for(;;) */ | |
| 761 | pSource += len; | |
| 762 | } /* if( code ... ) */ | |
| 763 | } /* for(;;) */ | |
| 764 | } | |
| 765 | } /* TransferDspData */ | |
| 766 | ||
| 767 | static const INT32 * | |
| 768 | FindPrimitiveDataBySurfaceID( int surfID ) | |
| 769 | { | |
| 770 | const INT32 *pPointData = (INT32 *)memory_region( REGION_USER2 ); | |
| 771 | INT32 last = pPointData[0]; | |
| 772 | int i; | |
| 773 | for( i=1; i<last; i++ ) | |
| 774 | { | |
| 775 | INT32 masterAddr = pPointData[i]; | |
| 776 | for(;;) | |
| 777 | { | |
| 778 | INT32 subAddr = pPointData[masterAddr++]; | |
| 779 | if( subAddr == 0xffffff ) | |
| 780 | { | |
| 781 | break; | |
| 782 | } | |
| 783 | else | |
| 784 | { | |
| 785 | UINT16 len = pPointData[subAddr+0]; | |
| 786 | if( len>2 ) | |
| 787 | { | |
| 788 | int id = pPointData[subAddr+1]; | |
| 789 | UINT16 vertexCount = pPointData[subAddr+2]; | |
| 790 | if( id == surfID ) | |
| 791 | { | |
| 792 | unsigned offs = subAddr + 4 + vertexCount*3; | |
| 793 | return &pPointData[offs]; | |
| 794 | } | |
| 795 | } | |
| 796 | } | |
| 797 | } | |
| 798 | } | |
| 799 | return NULL; | |
| 800 | } /* FindPrimitiveDataBySurfaceID */ | |
| 801 | ||
| 802 | static void | |
| 803 | 813 | RenderSlaveOutput( UINT16 data ) |
| 804 | 814 | { |
| 805 | 815 | if( mpDspState->slaveOutputSize >= 4096 ) |
| 806 | 816 | { |
| 807 | logerror( "FATAL ERROR: SLAVE OVERFLOW\n" ); | |
| 817 | printf( "FATAL ERROR: SLAVE OVERFLOW (0x%x)\n",mpDspState->slaveOutputBuffer[0] ); | |
| 818 | exit(1); | |
| 808 | 819 | return; |
| 809 | 820 | } |
| 821 | ||
| 822 | /* append word to slave output buffer */ | |
| 810 | 823 | mpDspState->slaveOutputBuffer[mpDspState->slaveOutputSize++] = data; |
| 811 | ||
| 824 | ||
| 812 | 825 | { |
| 813 | 826 | UINT16 *pSource = mpDspState->slaveOutputBuffer; |
| 814 | 827 | UINT16 count = *pSource++; |
| 815 | 828 | if( count && mpDspState->slaveOutputSize > count ) |
| 816 | 829 | { |
| 817 | UINT16 surfaceID = *pSource++; | |
| 818 | UINT16 *pVertexList = pSource; | |
| 830 | UINT16 color = *pSource++; | |
| 819 | 831 | int sx[4], sy[4],zcode[4]; |
| 820 | 832 | int j; |
| 821 | if( | |
| 833 | if( | |
| 822 | 834 | { |
| 835 | if( count!=13 ) printf( "?!direct-draw(%d)\n", count ); | |
| 823 | 836 | for( j=0; j<4; j++ ) |
| 824 | 837 | { |
| 825 | sx[j] = NAMCOS21_POLY_FRAME_WIDTH/2 + (INT16)pVertexList[3*j+0]; | |
| 826 | sy[j] = NAMCOS21_POLY_FRAME_HEIGHT/2 + (INT16)pVertexList[3*j+1]; | |
| 827 | zcode[j] = pVertexList[3*j+3]; | |
| 838 | sx[j] = NAMCOS21_POLY_FRAME_WIDTH/2 + (INT16)pSource[3*j+0]; | |
| 839 | sy[j] = NAMCOS21_POLY_FRAME_HEIGHT/2 + (INT16)pSource[3*j+1]; | |
| 840 | zcode[j] = pSource[3*j+2]; | |
| 828 | 841 | } |
| 829 | namcos21_DrawQuad( sx, sy, zcode, | |
| 842 | namcos21_DrawQuad( sx, sy, zcode, | |
| 830 | 843 | } |
| 831 | else | |
| 844 | else | |
| 832 | 845 | { |
| 833 | const INT32 *pSurf = FindPrimitiveDataBySurfaceID( surfaceID ); | |
| 834 | if( pSurf ) | |
| 846 | int quad_idx = color*6; | |
| 847 | for(;;) | |
| 835 | 848 | { |
| 836 | UINT16 surfCount = *pSurf++; | |
| 837 | while( surfCount-- ) | |
| 849 | UINT8 code = pointram[quad_idx++]; | |
| 850 | color = pointram[quad_idx++]|(code<<8); | |
| 851 | for( j=0; j<4; j++ ) | |
| 838 | 852 | { |
| 839 | UINT16 color; | |
| 840 | for( j=0; j<4; j++ ) | |
| 841 | { | |
| 842 | UINT16 vi = *pSurf++; | |
| 843 | sx[j] = NAMCOS21_POLY_FRAME_WIDTH/2 + (INT16)pVertexList[3*vi+0]; | |
| 844 | sy[j] = NAMCOS21_POLY_FRAME_HEIGHT/2 + (INT16)pVertexList[3*vi+1]; | |
| 845 | zcode[j] = pVertexList[3*vi+2]; | |
| 846 | } | |
| 847 | color = *pSurf++; | |
| 848 | namcos21_DrawQuad( sx, sy, zcode, color ); | |
| 849 | } /* while( surfCount) */ | |
| 850 | } /* if( pSurf ) */ | |
| 851 | } /* if( surfaceID ) */ | |
| 853 | UINT8 vi = pointram[quad_idx++]; | |
| 854 | sx[j] = NAMCOS21_POLY_FRAME_WIDTH/2 + (INT16)pSource[vi*3+0]; | |
| 855 | sy[j] = NAMCOS21_POLY_FRAME_HEIGHT/2 + (INT16)pSource[vi*3+1]; | |
| 856 | zcode[j] = pSource[vi*3+2]; | |
| 857 | } | |
| 858 | namcos21_DrawQuad( sx, sy, zcode, color&0x7fff ); | |
| 859 | if( code&0x80 ) | |
| 860 | { /* end-of-quadlist marker */ | |
| 861 | break; | |
| 862 | } | |
| 863 | } | |
| 864 | } | |
| 852 | 865 | mpDspState->slaveOutputSize = 0; |
| 853 | 866 | } |
| 867 | else if( count==0 ) | |
| 868 | { | |
| 869 | printf( "RenderSlaveOutput\n" ); | |
| 870 | exit(1); | |
| 871 | } | |
| 854 | 872 | } |
| 855 | 873 | } /* RenderSlaveOutput */ |
| 856 | 874 | |
| 857 | static size_t | |
| 858 | GetInputBytesAvailableForSlave( void ) | |
| 875 | static READ16_HANDLER(slave_port0_r) | |
| 859 | 876 | { |
| 860 | return mpDspState->slaveInputSize - mpDspState->slaveSourceAddr; | |
| 861 | } /* GetInputBytesAvailableForSlave */ | |
| 877 | return ReadWordFromSlaveInput(); | |
| 878 | } /* slave_port0_r */ | |
| 862 | 879 | |
| 880 | static WRITE16_HANDLER(slave_port0_w) | |
| 881 | { | |
| 882 | RenderSlaveOutput( data ); | |
| 883 | } | |
| 884 | ||
| 863 | 885 | static READ16_HANDLER(slave_port2_r) |
| 864 | 886 | { |
| 865 | UINT16 result; | |
| 866 | TransferDspData(); | |
| 867 | result = GetInputBytesAvailableForSlave(); | |
| 868 | if( result ) | |
| 869 | { | |
| 870 | logerror( "%x : slave port2_r : 0x%04x\n", activecpu_get_pc(), result ); | |
| 871 | } | |
| 872 | return result; | |
| 887 | return GetInputBytesAdvertisedForSlave(); | |
| 873 | 888 | } /* slave_port2_r */ |
| 874 | 889 | |
| 875 | static READ16_HANDLER(slave_port0_r) | |
| 876 | { /* read data */ | |
| 877 | UINT16 result; | |
| 878 | TransferDspData(); | |
| 879 | if( GetInputBytesAvailableForSlave()>0 ) | |
| 880 | { /* data is available */ | |
| 881 | result = mpDspState->slaveInputBuffer[mpDspState->slaveSourceAddr++]; | |
| 882 | } | |
| 883 | else | |
| 884 | { | |
| 885 | result =0; | |
| 886 | } | |
| 887 | logerror( "%x : slave port0_r : 0x%04x\n", activecpu_get_pc(), result ); | |
| 888 | return result; | |
| 889 | } /* slave_port0_r */ | |
| 890 | ||
| 891 | 890 | static READ16_HANDLER(slave_port3_r) |
| 892 | { /* number of bytes in output buffer (slave blocks if too large) */ | |
| 893 | UINT16 result = 0; | |
| 894 | return result; | |
| 891 | { /* render-device queue size */ | |
| 892 | /* up to 0x1fe bytes? | |
| 893 | * slave blocks until free space exists | |
| 894 | */ | |
| 895 | return 0; | |
| 895 | 896 | } |
| 896 | 897 | |
| 897 | static WRITE16_HANDLER(slave_port0_w) | |
| 898 | { | |
| 899 | logerror( "%x : slave port0_w : 0x%04x\n", activecpu_get_pc(), data ); | |
| 900 | RenderSlaveOutput( data ); | |
| 901 | } | |
| 902 | ||
| 903 | 898 | static WRITE16_HANDLER(slave_port3_w) |
| 904 | { /* ack? */ | |
| 905 | logerror( "%x : slave port3_w : 0x%04x\n", activecpu_get_pc(), data ); | |
| 899 | { /* 0=busy, 1=ready? */ | |
| 906 | 900 | } /* slave_port3_w */ |
| 907 | 901 | |
| 908 | 902 | static WRITE16_HANDLER( slave_XF_output_w ) |
| 909 | 903 | { |
| 910 | /* Trigger update of framebuffer and reset slave/master. | |
| 911 | * This is probably NOT how real hardware works. | |
| 912 | */ | |
| 913 | if( data==0 ) | |
| 914 | { | |
| 915 | UpdatePolyFrameBufferAndResetDSPs(); | |
| 916 | } | |
| 904 | logerror( "0x%x:slaveXF(%d)\n", activecpu_get_pc(), data ); | |
| 917 | 905 | } /* slave_XF_output_w */ |
| 918 | 906 | |
| 907 | static READ16_HANDLER( slave_portf_r ) | |
| 908 | { /* informs BIOS that this is Slave DSP */ | |
| 909 | return 1; | |
| 910 | } | |
| 911 | ||
| 919 | 912 | static ADDRESS_MAP_START( slave_dsp_program, ADDRESS_SPACE_PROGRAM, 16 ) |
| 920 | AM_RANGE(0x0000, 0x01ff) AM_READ(MRA16_ROM) AM_BASE(&slave_dsp_rom) /* internal ROM */ | |
| 921 | AM_RANGE(0x8000, 0x8fff) AM_READ(MRA16_ROM) AM_BASE(&slave_dsp_ram) /* uploaded code */ | |
| 913 | AM_RANGE(0x0000, 0x0fff) AM_READ(MRA16_ROM) /* BIOS */ | |
| 914 | AM_RANGE(0x8000, 0x8fff) AM_READ(MRA16_RAM) AM_WRITE(MWA16_RAM) | |
| 922 | 915 | ADDRESS_MAP_END |
| 923 | 916 | |
| 924 | 917 | static ADDRESS_MAP_START( slave_dsp_data, ADDRESS_SPACE_DATA, 16 ) |
| 918 | /* no external data memory */ | |
| 925 | 919 | ADDRESS_MAP_END |
| 926 | 920 | |
| 927 | 921 | static ADDRESS_MAP_START( slave_dsp_io, ADDRESS_SPACE_IO, 16 ) |
| 928 | 922 | AM_RANGE(0x00,0x00) AM_READ(slave_port0_r) AM_WRITE(slave_port0_w) |
| 929 | 923 | AM_RANGE(0x02,0x02) AM_READ(slave_port2_r) |
| 930 | 924 | AM_RANGE(0x03,0x03) AM_READ(slave_port3_r) AM_WRITE(slave_port3_w) |
| 925 | AM_RANGE(0x0f,0x0f) AM_READ(slave_portf_r) | |
| 931 | 926 | AM_RANGE(TMS32025_HOLD, TMS32025_HOLD) AM_READ(MRA16_NOP) |
| 932 | 927 | AM_RANGE(TMS32025_HOLDA, TMS32025_HOLDA) AM_WRITE(MWA16_NOP) |
| 933 | 928 | AM_RANGE(TMS32025_XF, TMS32025_XF) AM_WRITE(slave_XF_output_w) |
| r1037 | r1038 | |
| 935 | 930 | |
| 936 | 931 | /************************************************************************************/ |
| 937 | 932 | |
| 938 | static WRITE16_HANDLER( namcos21_dsp_control_w ) | |
| 939 | { /* serial output; used to pump bits and possibly to trigger IRQs on master DSP */ | |
| 940 | static int code; | |
| 941 | static int prev; | |
| 942 | int cur; | |
| 943 | COMBINE_DATA( &namcos21_dsp_control[offset] ); | |
| 944 | cur = namcos21_dsp_control[offset]; | |
| 945 | if( (prev^cur)&4 ) | |
| 933 | /** | |
| 934 | * 801f->800f : prepare for master access to point ram | |
| 935 | * 801f : done | |
| 936 | * | |
| 937 | * #bits data line | |
| 938 | * 8 1a0 4 | |
| 939 | * 7 0f8 4 | |
| 940 | * 7 0ff 4 | |
| 941 | * 1 001 4 | |
| 942 | * 7 00a 2 | |
| 943 | * a 0fe 8 | |
| 944 | * | |
| 945 | * line #bits data | |
| 946 | * 0003 000A 000004FE | |
| 947 | * 0001 0007 0000000A | |
| 948 | * 0002 001A 03FFF1A0 | |
| 949 | */ | |
| 950 | static WRITE16_HANDLER( pointram_control_w ) | |
| 951 | { | |
| 952 | // UINT16 prev = pointram_control; | |
| 953 | COMBINE_DATA( &pointram_control ); | |
| 954 | ||
| 955 | /* pointram_control&0x20 : bank for depthcue data */ | |
| 956 | /* | |
| 957 | logerror( "dsp_control_w:%x:%x[%x]:=%04x ", | |
| 958 | cpu_getactivecpu(), | |
| 959 | activecpu_get_pc(), | |
| 960 | offset, | |
| 961 | pointram_control ); | |
| 962 | ||
| 963 | UINT16 delta = (prev^pointram_control)&pointram_control; | |
| 964 | if( delta&0x10 ) | |
| 965 | { | |
| 966 | logerror( " [reset]" ); | |
| 967 | } | |
| 968 | if( delta&2 ) | |
| 969 | { | |
| 970 | logerror( " send(A)%x", pointram_control&1 ); | |
| 971 | } | |
| 972 | if( delta&4 ) | |
| 973 | { | |
| 974 | logerror( " send(B)%x", pointram_control&1 ); | |
| 975 | } | |
| 976 | if( delta&8 ) | |
| 977 | { | |
| 978 | logerror( " send(C)%x", pointram_control&1 ); | |
| 979 | } | |
| 980 | logerror( "\n" ); | |
| 981 | */ | |
| 982 | pointram_idx = 0; /* HACK */ | |
| 983 | } /* pointram_control_w */ | |
| 984 | ||
| 985 | static READ16_HANDLER( pointram_data_r ) | |
| 986 | { | |
| 987 | return pointram[pointram_idx]; | |
| 988 | } /* pointram_data_r */ | |
| 989 | ||
| 990 | static WRITE16_HANDLER( pointram_data_w ) | |
| 991 | { | |
| 992 | if( ACCESSING_LSB ) | |
| 946 | 993 | { |
| 947 | code<<=1; | |
| 948 | code |= cur&1; | |
| 949 | code &= 0x1ff; | |
| 994 | // if( (pointram_idx%6)==0 ) logerror("\n" ); | |
| 995 | // logerror( " %02x", data ); | |
| 996 | pointram[pointram_idx++] = data; | |
| 997 | pointram_idx &= (PTRAM_SIZE-1); | |
| 950 | 998 | } |
| 951 | } | |
| 999 | } /* pointram_data_w */ | |
| 952 | 1000 | |
| 953 | static READ16_HANDLER( namcos21_dsp_control_r ) | |
| 954 | { | |
| 955 | /* logerror( "dsp control_r%x:%x[%x]==%04x\n", | |
| 956 | cpu_getactivecpu(), | |
| 957 | activecpu_get_pc(), | |
| 958 | offset, | |
| 959 | namcos21_dsp_control[offset] ); */ | |
| 960 | return namcos21_dsp_control[offset]; | |
| 961 | } | |
| 1001 | static UINT8 namcos21_depthcue[2][0x400]; /* 0x800 nybbles */ | |
| 962 | 1002 | |
| 963 | #define PTRAM_SIZE 0x20000 | |
| 964 | static UINT8 *ptram; | |
| 965 | static UINT32 ptram_addr; | |
| 966 | ||
| 967 | static WRITE16_HANDLER( namcos21_dsp_data_w ) | |
| 1003 | static READ16_HANDLER( namcos21_depthcue_r ) | |
| 968 | 1004 | { |
| 969 | ptram[ptram_addr++] = data; | |
| 970 | ptram_addr &= (PTRAM_SIZE-1); | |
| 1005 | int bank = (pointram_control&0x20)?1:0; | |
| 1006 | return namcos21_depthcue[bank][offset]; | |
| 971 | 1007 | } |
| 972 | ||
| 973 | static READ16_HANDLER( namcos21_dsp_data_r ) | |
| 1008 | static WRITE16_HANDLER( namcos21_depthcue_w ) | |
| 974 | 1009 | { |
| 975 | /* logerror( "dsp data_r%x:%x[%x]==%04x\n", | |
| 976 | cpu_getactivecpu(), | |
| 977 | activecpu_get_pc(), | |
| 978 | offset, | |
| 979 | ptram[ptram_addr] ); */ | |
| 980 | return ptram[ptram_addr]; | |
| 1010 | if( ACCESSING_LSB ) | |
| 1011 | { | |
| 1012 | int bank = (pointram_control&0x20)?1:0; | |
| 1013 | namcos21_depthcue[bank][offset] = data; | |
| 1014 | // if( (offset&0xf)==0 ) logerror( "\n depthcue: " ); | |
| 1015 | // logerror( " %02x", data ); | |
| 1016 | } | |
| 981 | 1017 | } |
| 982 | 1018 | |
| 983 | 1019 | /* dual port ram memory handlers */ |
| r1037 | r1038 | |
| 1019 | 1055 | |
| 1020 | 1056 | /* some games have read-only areas where more ROMs are mapped */ |
| 1021 | 1057 | |
| 1022 | static READ16_HANDLER( data_r ) | |
| 1058 | static READ16_HANDLER( datarom_r ) | |
| 1023 | 1059 | { |
| 1024 | 1060 | return mpDataROM[offset]; |
| 1025 | 1061 | } |
| r1037 | r1038 | |
| 1049 | 1085 | static READ16_HANDLER( NAMCO_C139_SCI_register_r ){ return 0; } |
| 1050 | 1086 | /******************************************************************************/ |
| 1051 | 1087 | |
| 1052 | static WRITE16_HANDLER( unk_48000X_w ) | |
| 1053 | { | |
| 1054 | /* 0x400 bytes - gamma table? */ | |
| 1055 | } | |
| 1056 | static UINT16 namcos21_unk_reg; | |
| 1057 | WRITE16_HANDLER( namcos21_unk_reg_w ) | |
| 1058 | { | |
| 1059 | /* 0x40 or 0x00 */ | |
| 1060 | COMBINE_DATA( &namcos21_unk_reg ); | |
| 1061 | } | |
| 1062 | static READ16_HANDLER( namcos21_unk_reg_r ) | |
| 1063 | { | |
| 1064 | /* 0x40 or 0x00 */ | |
| 1065 | return namcos21_unk_reg; | |
| 1066 | } | |
| 1067 | ||
| 1068 | 1088 | /*************************************************************/ |
| 1069 | 1089 | /* MASTER 68000 CPU Memory declarations */ |
| 1070 | 1090 | /*************************************************************/ |
| 1071 | 1091 | static ADDRESS_MAP_START( namcos21_68k_master, ADDRESS_SPACE_PROGRAM, 16 ) |
| 1072 | 1092 | AM_RANGE(0x000000, 0x0fffff) AM_READ(MRA16_ROM) AM_WRITE(MWA16_ROM) |
| 1073 | 1093 | AM_RANGE(0x100000, 0x10ffff) AM_READ(MRA16_RAM) AM_WRITE(MWA16_RAM) /* private work RAM */ |
| 1074 | AM_RANGE(0x180000, 0x183fff) AM_READ(NAMCOS2_68K_EEPROM_R) AM_WRITE(NAMCOS2_68K_EEPROM_W) AM_BASE(&namcos2_eeprom) AM_SIZE(&namcos2_eeprom_size) | |
| 1094 | AM_RANGE(0x180000, 0x183fff) AM_READ(NAMCOS2_68K_EEPROM_R) AM_WRITE(NAMCOS2_68K_EEPROM_W)// AM_BASE(&namcos2_eeprom) AM_SIZE(&namcos2_eeprom_size) | |
| 1075 | 1095 | AM_RANGE(0x1c0000, 0x1fffff) AM_READ(namcos2_68k_master_C148_r) AM_WRITE(namcos2_68k_master_C148_w) |
| 1076 | 1096 | ADDRESS_MAP_END |
| 1077 | 1097 | |
| 1078 | 1098 | static ADDRESS_MAP_START( namcos21_68k_slave, ADDRESS_SPACE_PROGRAM, 16 ) |
| 1079 | AM_RANGE(0x000000, 0x0 | |
| 1099 | AM_RANGE(0x000000, 0x07ffff) AM_READ(MRA16_ROM) AM_WRITE(MWA16_ROM) | |
| 1080 | 1100 | AM_RANGE(0x100000, 0x13ffff) AM_READ(MRA16_RAM) AM_WRITE(MWA16_RAM) /* private work RAM */ |
| 1081 | 1101 | AM_RANGE(0x1c0000, 0x1fffff) AM_READ(namcos2_68k_slave_C148_r) AM_WRITE(namcos2_68k_slave_C148_w) |
| 1082 | 1102 | ADDRESS_MAP_END |
| r1037 | r1038 | |
| 1084 | 1104 | static ADDRESS_MAP_START( namcos21_68k_common, ADDRESS_SPACE_PROGRAM, 16 ) |
| 1085 | 1105 | AM_RANGE(0x200000, 0x20ffff) AM_READ(dspram16_r) AM_WRITE(dspram16_w) AM_BASE(&namcos21_dspram16) |
| 1086 | 1106 | AM_RANGE(0x280000, 0x280001) AM_WRITE(MWA16_NOP) /* written once on startup */ |
| 1087 | AM_RANGE(0x400000, 0x400001) AM_READ(namcos21_dsp_control_r) AM_WRITE(namcos21_dsp_control_w) | |
| 1088 | AM_RANGE(0x440000, 0x440001) AM_READ(namcos21_dsp_data_r) AM_WRITE(namcos21_dsp_data_w) | |
| 1089 | // AM_RANGE(0x440002, 0x44ffff) AM_WRITE(MWA16_NOP) /* (?) aircombj */ | |
| 1090 | // AM_RANGE(0x480000, 0x4807ff) AM_WRITE(unk_48000X_w) | |
| 1107 | AM_RANGE(0x400000, 0x400001) AM_WRITE(pointram_control_w) | |
| 1108 | AM_RANGE(0x440000, 0x440001) AM_READ(pointram_data_r) AM_WRITE(pointram_data_w) | |
| 1109 | AM_RANGE(0x440002, 0x47ffff) AM_WRITE(MWA16_NOP) /* (?) Air Combat */ | |
| 1110 | AM_RANGE(0x480000, 0x4807ff) AM_WRITE(namcos21_depthcue_w) AM_READ(namcos21_depthcue_r) /* Air Combat */ | |
| 1091 | 1111 | AM_RANGE(0x700000, 0x71ffff) AM_READ(namco_obj16_r) AM_WRITE(namco_obj16_w) |
| 1092 | 1112 | AM_RANGE(0x720000, 0x720007) AM_READ(namco_spritepos16_r) AM_WRITE(namco_spritepos16_w) |
| 1093 | 1113 | AM_RANGE(0x740000, 0x75ffff) AM_READ(paletteram16_r ) AM_WRITE(paletteram16_w) AM_BASE(&paletteram16) |
| 1094 | AM_RANGE(0x760000, 0x760001) AM_READ(namcos21_unk_reg_r) AM_WRITE(namcos21_unk_reg_w) | |
| 1095 | AM_RANGE(0x800000, 0x8fffff) AM_READ(data_r) | |
| 1114 | AM_RANGE(0x760000, 0x760001) AM_READ(namcos21_video_enable_r) AM_WRITE(namcos21_video_enable_w) | |
| 1115 | AM_RANGE(0x800000, 0x8fffff) AM_READ(datarom_r) | |
| 1096 | 1116 | AM_RANGE(0x900000, 0x90ffff) AM_READ(shareram1_r) AM_WRITE(shareram1_w) AM_BASE(&mpSharedRAM1) |
| 1097 | 1117 | AM_RANGE(0xa00000, 0xa00fff) AM_READ(namcos2_68k_dualportram_word_r) AM_WRITE(namcos2_68k_dualportram_word_w) |
| 1098 | 1118 | AM_RANGE(0xb00000, 0xb03fff) AM_READ(NAMCO_C139_SCI_buffer_r) AM_WRITE(NAMCO_C139_SCI_buffer_w) |
| 1099 | 1119 | AM_RANGE(0xb80000, 0xb8000f) AM_READ(NAMCO_C139_SCI_register_r) AM_WRITE(NAMCO_C139_SCI_register_w) |
| 1100 | 1120 | AM_RANGE(0xc00000, 0xcfffff) AM_READ(data2_r) /* Cyber Sled */ |
| 1101 | 1121 | AM_RANGE(0xd00000, 0xdfffff) AM_READ(data2_r) |
| 1102 | AM_RANGE(0xfffffe, 0xffffff) AM_READ(uploadhack_r) | |
| 1103 | 1122 | ADDRESS_MAP_END |
| 1104 | 1123 | |
| 1105 | 1124 | /************************************************************* |
| 1106 | * Winning Run is prototype "System21" hardware that shares | |
| 1107 | * very little with the final design. | |
| 1125 | * Winning Run is prototype "System21" hardware. | |
| 1108 | 1126 | *************************************************************/ |
| 1127 | static READ16_HANDLER( winrun_dspcomram_r ) | |
| 1128 | { | |
| 1129 | int bank = 1-(winrun_dspcomram_control[0x4/2]&1); | |
| 1130 | UINT16 *mem = &winrun_dspcomram[0x1000*bank]; | |
| 1131 | return mem[offset]; | |
| 1132 | } | |
| 1133 | static WRITE16_HANDLER( winrun_dspcomram_w ) | |
| 1134 | { | |
| 1135 | int bank = 1-(winrun_dspcomram_control[0x4/2]&1); | |
| 1136 | UINT16 *mem = &winrun_dspcomram[0x1000*bank]; | |
| 1137 | COMBINE_DATA( &mem[offset] ); | |
| 1138 | } | |
| 1109 | 1139 | |
| 1110 | /* TBA: add support for more than two CPUs to C148 emulation */ | |
| 1111 | static UINT16 gpu_vblank_irq_level; | |
| 1112 | ||
| 1113 | static READ16_HANDLER( gpu_c148_r ) | |
| 1140 | static READ16_HANDLER( winrun_cuskey_r ) | |
| 1114 | 1141 | { |
| 1115 | offs_t addr = ((offset*2)+0x1c0000)&0x1fe000; | |
| 1116 | switch( addr ) | |
| 1142 | int pc = activecpu_get_pc(); | |
| 1143 | switch( pc ) | |
| 1117 | 1144 | { |
| 1145 | case 0x0064: /* winrun91 */ | |
| 1146 | return 0xFEBB; | |
| 1147 | case 0x006c: /* winrun91 */ | |
| 1148 | return 0xFFFF; | |
| 1149 | case 0x0073: /* winrun91 */ | |
| 1150 | return 0x0144; | |
| 1151 | ||
| 1152 | case 0x0075: /* winrun */ | |
| 1153 | return 0x24; | |
| 1154 | ||
| 1118 | 1155 | default: |
| 1119 | 1156 | break; |
| 1120 | 1157 | } |
| 1121 | 1158 | return 0; |
| 1159 | } /* winrun_cuskey_r */ | |
| 1160 | ||
| 1161 | static WRITE16_HANDLER( winrun_cuskey_w ) | |
| 1162 | { | |
| 1163 | } /* winrun_cuskey_w */ | |
| 1164 | ||
| 1165 | static void | |
| 1166 | winrun_flushpoly( void ) | |
| 1167 | { | |
| 1168 | if( winrun_poly_index>0 ) | |
| 1169 | { | |
| 1170 | const UINT16 *pSource = winrun_poly_buf; | |
| 1171 | UINT16 color; | |
| 1172 | int sx[4], sy[4], zcode[4]; | |
| 1173 | int j; | |
| 1174 | color = *pSource++; | |
| 1175 | if( color&0x8000 ) | |
| 1176 | { /* direct-draw */ | |
| 1177 | for( j=0; j<4; j++ ) | |
| 1178 | { | |
| 1179 | sx[j] = NAMCOS21_POLY_FRAME_WIDTH/2 + (INT16)*pSource++; | |
| 1180 | sy[j] = NAMCOS21_POLY_FRAME_HEIGHT/2 + (INT16)*pSource++; | |
| 1181 | zcode[j] = *pSource++; | |
| 1182 | } | |
| 1183 | namcos21_DrawQuad( sx, sy, zcode, color&0x7fff ); | |
| 1184 | } | |
| 1185 | else | |
| 1186 | { | |
| 1187 | int quad_idx = color*6; | |
| 1188 | for(;;) | |
| 1189 | { | |
| 1190 | UINT8 code = pointram[quad_idx++]; | |
| 1191 | color = pointram[quad_idx++]; | |
| 1192 | for( j=0; j<4; j++ ) | |
| 1193 | { | |
| 1194 | UINT8 vi = pointram[quad_idx++]; | |
| 1195 | sx[j] = NAMCOS21_POLY_FRAME_WIDTH/2 + (INT16)pSource[vi*3+0]; | |
| 1196 | sy[j] = NAMCOS21_POLY_FRAME_HEIGHT/2 + (INT16)pSource[vi*3+1]; | |
| 1197 | zcode[j] = pSource[vi*3+2]; | |
| 1198 | } | |
| 1199 | namcos21_DrawQuad( sx, sy, zcode, color&0x7fff ); | |
| 1200 | if( code&0x80 ) | |
| 1201 | { /* end-of-quadlist marker */ | |
| 1202 | break; | |
| 1203 | } | |
| 1204 | } | |
| 1205 | } | |
| 1206 | winrun_poly_index = 0; | |
| 1207 | } | |
| 1208 | } /* winrun_flushpoly */ | |
| 1209 | ||
| 1210 | static READ16_HANDLER( winrun_poly_reset_r ) | |
| 1211 | { | |
| 1212 | winrun_flushpoly(); | |
| 1213 | return 0; | |
| 1122 | 1214 | } |
| 1123 | 1215 | |
| 1124 | static WRITE16_HANDLER( | |
| 1216 | static WRITE16_HANDLER( winrun_dsp_render_w ) | |
| 1125 | 1217 | { |
| 1126 | offs_t addr = ((offset*2)+0x1c0000)&0x1fe000; | |
| 1127 | switch( addr ) | |
| 1218 | if( winrun_poly_index<WINRUN_MAX_POLY_PARAM ) | |
| 1128 | 1219 | { |
| 1129 | case 0x1ca000: | |
| 1130 | /* NAMCOS2_C148_POSIRQ level?*/ | |
| 1131 | break; | |
| 1220 | winrun_poly_buf[winrun_poly_index++] = data; | |
| 1221 | } | |
| 1222 | else | |
| 1223 | { | |
| 1224 | printf( "WINRUN_POLY_OVERFLOW\n" ); | |
| 1225 | } | |
| 1226 | } /* winrun_dsp_render_w */ | |
| 1132 | 1227 | |
| 1133 | case 0x1ce000: | |
| 1134 | COMBINE_DATA( &gpu_vblank_irq_level ); | |
| 1135 | break; | |
| 1228 | static WRITE16_HANDLER( winrun_dsp_pointrom_addr_w ) | |
| 1229 | { | |
| 1230 | if( offset==0 ) | |
| 1231 | { /* port 8 */ | |
| 1232 | winrun_pointrom_addr = data; | |
| 1233 | } | |
| 1234 | else | |
| 1235 | { /* port 9 */ | |
| 1236 | winrun_pointrom_addr |= (data<<16); | |
| 1237 | } | |
| 1238 | } | |
| 1136 | 1239 | |
| 1137 | case 0x1e2000: | |
| 1138 | break; | |
| 1240 | static READ16_HANDLER( winrun_dsp_pointrom_data_r ) | |
| 1241 | { | |
| 1242 | UINT16 *ptrom = (UINT16 *)memory_region(REGION_USER2); | |
| 1243 | return ptrom[winrun_pointrom_addr++]; | |
| 1244 | } /* winrun_dsp_pointrom_data_r */ | |
| 1139 | 1245 | |
| 1140 | default: | |
| 1141 | break; | |
| 1246 | static WRITE16_HANDLER( winrun_dsp_complete_w ) | |
| 1247 | { | |
| 1248 | if( data ) | |
| 1249 | { | |
| 1250 | winrun_flushpoly(); | |
| 1251 | cpunum_set_input_line(4, INPUT_LINE_RESET, PULSE_LINE); | |
| 1252 | namcos21_ClearPolyFrameBuffer(); | |
| 1142 | 1253 | } |
| 1143 | 1254 | } |
| 1144 | 1255 | |
| 1145 | static | |
| 1256 | static | |
| 1146 | 1257 | { |
| 1147 | | |
| 1258 | r | |
| 1148 | 1259 | } |
| 1149 | 1260 | |
| 1261 | static ADDRESS_MAP_START( winrun_dsp_program, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1262 | AM_RANGE(0x0000, 0x0fff) AM_READ(MRA16_ROM) | |
| 1263 | ADDRESS_MAP_END | |
| 1264 | ||
| 1265 | static ADDRESS_MAP_START( winrun_dsp_data, ADDRESS_SPACE_DATA, 16 ) | |
| 1266 | AM_RANGE( 0x2000, 0x200f ) AM_READ(winrun_cuskey_r) AM_WRITE(winrun_cuskey_w) | |
| 1267 | AM_RANGE( 0x4000, 0x4fff ) AM_READ(winrun_dspcomram_r) AM_WRITE(winrun_dspcomram_w) | |
| 1268 | AM_RANGE( 0x8000, 0xffff ) AM_READ(winrun_table_r ) | |
| 1269 | ADDRESS_MAP_END | |
| 1270 | ||
| 1271 | static ADDRESS_MAP_START( winrun_dsp_io, ADDRESS_SPACE_IO, 16 ) | |
| 1272 | AM_RANGE(0x08,0x09) AM_WRITE(winrun_dsp_pointrom_addr_w) AM_READ(winrun_dsp_pointrom_data_r) | |
| 1273 | AM_RANGE(0x0a,0x0a) AM_WRITE(winrun_dsp_render_w) | |
| 1274 | AM_RANGE(0x0b,0x0b) AM_WRITE(MWA16_NOP) | |
| 1275 | AM_RANGE(0x0c,0x0c) AM_WRITE(winrun_dsp_complete_w) | |
| 1276 | AM_RANGE(TMS32025_BIO, TMS32025_BIO) AM_READ( winrun_poly_reset_r ) | |
| 1277 | AM_RANGE(TMS32025_HOLD, TMS32025_HOLD) AM_READ( MRA16_NOP ) | |
| 1278 | AM_RANGE(TMS32025_HOLDA, TMS32025_HOLDA) AM_WRITE( MWA16_NOP ) | |
| 1279 | AM_RANGE(TMS32025_XF, TMS32025_XF) AM_WRITE( MWA16_NOP ) | |
| 1280 | ADDRESS_MAP_END | |
| 1281 | ||
| 1150 | 1282 | static READ16_HANDLER( gpu_data_r ) |
| 1151 | 1283 | { |
| 1152 | 1284 | const UINT16 *pSrc = (UINT16 *)memory_region( REGION_USER3 ); |
| 1153 | 1285 | return pSrc[offset]; |
| 1154 | 1286 | } |
| 1155 | 1287 | |
| 1156 | static ADDRESS_MAP_START( readmem_gpu_winrun, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1157 | AM_RANGE(0x000000, 0x07ffff) AM_READ(MRA16_ROM) | |
| 1158 | AM_RANGE(0x100000, 0x100001) AM_READ(MRA16_RAM) /* shareram? */ | |
| 1159 | AM_RANGE(0x180000, 0x19ffff) AM_READ(MRA16_RAM) /* private work RAM */ | |
| 1160 | AM_RANGE(0x1c0000, 0x1fffff) AM_READ(gpu_c148_r) | |
| 1161 | AM_RANGE(0x200000, 0x20ffff) AM_READ(MRA16_RAM) | |
| 1162 | AM_RANGE(00400000, 0x40ffff) AM_READ(MRA16_RAM) | |
| 1163 | AM_RANGE(0x410000, 0x41ffff) AM_READ(MRA16_RAM) | |
| 1164 | AM_RANGE(0x600000, 0x6fffff) AM_READ(gpu_data_r) | |
| 1165 | AM_RANGE(0xc00000, 0xcfffff) AM_READ(MRA16_RAM) /* frame buffer */ | |
| 1166 | AM_RANGE(0xd00000, 0xd0000f) AM_READ(MRA16_RAM) /* ? */ | |
| 1167 | ADDRESS_MAP_END | |
| 1288 | static READ16_HANDLER( winrun_gpucomram_r ) | |
| 1289 | { | |
| 1290 | return winrun_gpucomram[offset]; | |
| 1291 | } | |
| 1292 | static WRITE16_HANDLER( winrun_gpucomram_w ) | |
| 1293 | { | |
| 1294 | COMBINE_DATA( &winrun_gpucomram[offset] ); | |
| 1295 | } | |
| 1168 | 1296 | |
| 1169 | static ADDRESS_MAP_START( writemem_gpu_winrun, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1170 | AM_RANGE(0x000000, 0x07ffff) AM_WRITE(MWA16_ROM) | |
| 1171 | AM_RANGE(0x100000, 0x100001) AM_WRITE(MWA16_RAM) /* shareram? */ | |
| 1172 | AM_RANGE(0x180000, 0x19ffff) AM_WRITE(MWA16_RAM) /* private work RAM */ | |
| 1173 | AM_RANGE(0x1c0000, 0x1fffff) AM_WRITE(gpu_c148_w) | |
| 1174 | AM_RANGE(0x200000, 0x20ffff) AM_WRITE(MWA16_RAM) AM_BASE(&namcos21_dspram16) | |
| 1175 | AM_RANGE(00400000, 0x40ffff) AM_WRITE(MWA16_RAM) | |
| 1176 | AM_RANGE(0x410000, 0x41ffff) AM_WRITE(MWA16_RAM) | |
| 1177 | AM_RANGE(0xc00000, 0xcfffff) AM_WRITE(MWA16_RAM) AM_BASE(&videoram16) | |
| 1178 | AM_RANGE(0xd00000, 0xd0000f) AM_WRITE(MWA16_RAM) /* ? */ | |
| 1179 | AM_RANGE(0xe0000c, 0xe0000d) AM_WRITE(MWA16_NOP) /* ? */ | |
| 1180 | ADDRESS_MAP_END | |
| 1297 | static WRITE16_HANDLER( winrun_dspbios_w ) | |
| 1298 | { | |
| 1299 | COMBINE_DATA( &winrun_dspbios[offset] ); | |
| 1300 | if( offset==0xfff ) | |
| 1301 | { | |
| 1302 | UINT16 *mem = (UINT16 *)memory_region(REGION_CPU5); | |
| 1303 | memcpy( mem, winrun_dspbios, 0x2000 ); | |
| 1304 | winrun_dsp_alive = 1; | |
| 1305 | } | |
| 1306 | } /* winrun_dspbios_w */ | |
| 1181 | 1307 | |
| 1182 | static ADDRESS_MAP_START( readmem_master_winrun, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1183 | AM_RANGE(0x000000, 0x03ffff) AM_READ(MRA16_ROM) | |
| 1184 | AM_RANGE(0x100000, 0x10ffff) AM_READ(MRA16_RAM) /* private work RAM */ | |
| 1185 | AM_RANGE(0x180000, 0x183fff) AM_READ(NAMCOS2_68K_EEPROM_R) | |
| 1186 | AM_RANGE(0x1c0000, 0x1fffff) AM_READ(namcos2_68k_master_C148_r) | |
| 1187 | AM_RANGE(0x250000, 0x25ffff) AM_READ(MRA16_RAM) // sinetable? | |
| 1188 | AM_RANGE(0x280000, 0x281fff) AM_READ(dspram16_r) | |
| 1189 | AM_RANGE(0x380000, 0x38000f) AM_READ(MRA16_RAM) | |
| 1190 | AM_RANGE(0x3c0000, 0x3c0fff) AM_READ(MRA16_RAM) | |
| 1191 | AM_RANGE(0x400000, 0x400001) AM_READ(namcos21_dsp_control_r) | |
| 1192 | AM_RANGE(0x440000, 0x440001) AM_READ(namcos21_dsp_data_r) | |
| 1193 | AM_RANGE(0x600000, 0x600fff) AM_READ(MRA16_RAM) | |
| 1194 | AM_RANGE(0x700000, 0x700001) AM_READ(MRA16_RAM) | |
| 1195 | AM_RANGE(0x800000, 0x87ffff) AM_READ(data_r) | |
| 1196 | AM_RANGE(0x900000, 0x90ffff) AM_READ(shareram1_r) | |
| 1197 | AM_RANGE(0xa00000, 0xa00fff) AM_READ(namcos2_68k_dualportram_word_r) | |
| 1198 | AM_RANGE(0xb00000, 0xb03fff) AM_READ(NAMCO_C139_SCI_buffer_r) | |
| 1199 | AM_RANGE(0xb80000, 0xb8000f) AM_READ(NAMCO_C139_SCI_register_r) | |
| 1200 | ADDRESS_MAP_END | |
| 1308 | //380000 : read : dsp status? 1 = busy | |
| 1309 | //380000 : write(0x01) - done before dsp comram init | |
| 1310 | //380004 : dspcomram bank, as seen by 68k | |
| 1311 | //380008 : read : state? | |
| 1201 | 1312 | |
| 1202 | static ADDRESS_MAP_START( writemem_master_winrun, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1203 | AM_RANGE(0x000000, 0x03ffff) AM_WRITE(MWA16_ROM) | |
| 1204 | AM_RANGE(0x100000, 0x10ffff) AM_WRITE(MWA16_RAM) /* private work RAM */ | |
| 1205 | AM_RANGE(0x180000, 0x183fff) AM_WRITE(NAMCOS2_68K_EEPROM_W) AM_BASE(&namcos2_eeprom) AM_SIZE(&namcos2_eeprom_size) | |
| 1206 | AM_RANGE(0x1c0000, 0x1fffff) AM_WRITE(namcos2_68k_master_C148_w) | |
| 1207 | AM_RANGE(0x250000, 0x25ffff) AM_WRITE(MWA16_RAM) | |
| 1208 | AM_RANGE(0x280000, 0x281fff) AM_WRITE(dspram16_w) | |
| 1209 | AM_RANGE(0x380000, 0x38000f) AM_WRITE(MWA16_RAM) | |
| 1210 | AM_RANGE(0x3c0000, 0x3c0fff) AM_WRITE(MWA16_RAM) | |
| 1211 | AM_RANGE(0x400000, 0x400001) AM_WRITE(namcos21_dsp_control_w) | |
| 1212 | AM_RANGE(0x440000, 0x440001) AM_WRITE(namcos21_dsp_data_w) | |
| 1213 | // AM_RANGE(0x600000, 0x600fff) AM_WRITE(MWA16_RAM) | |
| 1214 | AM_RANGE(0x700000, 0x700001) AM_WRITE(MWA16_RAM) | |
| 1215 | AM_RANGE(0x900000, 0x90ffff) AM_WRITE(shareram1_w) AM_BASE(&mpSharedRAM1) | |
| 1216 | AM_RANGE(0xa00000, 0xa00fff) AM_WRITE(namcos2_68k_dualportram_word_w) | |
| 1217 | AM_RANGE(0xb00000, 0xb03fff) AM_WRITE(NAMCO_C139_SCI_buffer_w) | |
| 1218 | AM_RANGE(0xb80000, 0xb8000f) AM_WRITE(NAMCO_C139_SCI_register_w) | |
| 1313 | static READ16_HANDLER( winrun_68k_dspcomram_r ) | |
| 1314 | { | |
| 1315 | int bank = winrun_dspcomram_control[0x4/2]&1; | |
| 1316 | UINT16 *mem = &winrun_dspcomram[0x1000*bank]; | |
| 1317 | return mem[offset]; | |
| 1318 | } | |
| 1319 | ||
| 1320 | static WRITE16_HANDLER( winrun_68k_dspcomram_w ) | |
| 1321 | { | |
| 1322 | int bank = winrun_dspcomram_control[0x4/2]&1; | |
| 1323 | UINT16 *mem = &winrun_dspcomram[0x1000*bank]; | |
| 1324 | COMBINE_DATA( &mem[offset] ); | |
| 1325 | } | |
| 1326 | ||
| 1327 | static READ16_HANDLER( winrun_dspcomram_control_r ) | |
| 1328 | { | |
| 1329 | return winrun_dspcomram_control[offset]; | |
| 1330 | } | |
| 1331 | ||
| 1332 | static WRITE16_HANDLER( winrun_dspcomram_control_w ) | |
| 1333 | { | |
| 1334 | COMBINE_DATA( &winrun_dspcomram_control[offset] ); | |
| 1335 | } | |
| 1336 | ||
| 1337 | static ADDRESS_MAP_START( am_master_winrun, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1338 | AM_RANGE(0x000000, 0x03ffff) AM_READ(MRA16_ROM) AM_WRITE(MWA16_ROM) | |
| 1339 | AM_RANGE(0x100000, 0x10ffff) AM_READ(MRA16_RAM) AM_WRITE(MWA16_RAM) /* work RAM */ | |
| 1340 | AM_RANGE(0x180000, 0x183fff) AM_READ(NAMCOS2_68K_EEPROM_R) AM_WRITE(NAMCOS2_68K_EEPROM_W)// AM_BASE(&namcos2_eeprom) AM_SIZE(&namcos2_eeprom_size) | |
| 1341 | AM_RANGE(0x1c0000, 0x1fffff) AM_READ(namcos2_68k_master_C148_r) AM_WRITE(namcos2_68k_master_C148_w) | |
| 1342 | AM_RANGE(0x250000, 0x25ffff) AM_READ(MRA16_RAM) AM_WRITE(MWA16_RAM) AM_BASE( &winrun_polydata ) | |
| 1343 | AM_RANGE(0x260000, 0x26ffff) AM_READ(MRA16_RAM) AM_WRITE(MWA16_RAM) /* unused? */ | |
| 1344 | AM_RANGE(0x280000, 0x281fff) AM_WRITE(winrun_dspbios_w) AM_BASE(&winrun_dspbios) | |
| 1345 | AM_RANGE(0x380000, 0x38000f) AM_READ(winrun_dspcomram_control_r) AM_WRITE(winrun_dspcomram_control_w) | |
| 1346 | AM_RANGE(0x3c0000, 0x3c1fff) AM_READ(winrun_68k_dspcomram_r) AM_WRITE(winrun_68k_dspcomram_w) | |
| 1347 | AM_RANGE(0x400000, 0x400001) AM_WRITE(pointram_control_w) | |
| 1348 | AM_RANGE(0x440000, 0x440001) AM_READ(pointram_data_r) AM_WRITE(pointram_data_w) | |
| 1349 | AM_RANGE(0x600000, 0x60ffff) AM_READ(winrun_gpucomram_r) AM_WRITE(winrun_gpucomram_w) | |
| 1350 | AM_RANGE(0x800000, 0x87ffff) AM_READ(datarom_r) | |
| 1351 | AM_RANGE(0x900000, 0x90ffff) AM_READ(shareram1_r) AM_WRITE(shareram1_w) AM_BASE(&mpSharedRAM1) | |
| 1352 | AM_RANGE(0xa00000, 0xa00fff) AM_READ(namcos2_68k_dualportram_word_r) AM_WRITE(namcos2_68k_dualportram_word_w) | |
| 1353 | AM_RANGE(0xb00000, 0xb03fff) AM_READ(NAMCO_C139_SCI_buffer_r) AM_WRITE(NAMCO_C139_SCI_buffer_w) | |
| 1354 | AM_RANGE(0xb80000, 0xb8000f) AM_READ(NAMCO_C139_SCI_register_r) AM_WRITE(NAMCO_C139_SCI_register_w) | |
| 1219 | 1355 | ADDRESS_MAP_END |
| 1220 | 1356 | |
| 1221 | static ADDRESS_MAP_START( readmem_slave_winrun, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1222 | AM_RANGE(0x000000, 0x03ffff) AM_READ(MRA16_ROM) | |
| 1223 | AM_RANGE(0x100000, 0x13ffff) AM_READ(MRA16_RAM) | |
| 1224 | AM_RANGE(0x1c0000, 0x1fffff) AM_READ(namcos2_68k_slave_C148_r) | |
| 1225 | AM_RANGE(0x280000, 0x281fff) AM_READ(dspram16_r) | |
| 1226 | AM_RANGE(0x400000, 0x400001) AM_READ(namcos21_dsp_control_r) | |
| 1227 | AM_RANGE(0x440000, 0x440001) AM_READ(namcos21_dsp_data_r) | |
| 1228 | // AM_RANGE(0x600000, 0x600fff) AM_READ(MRA16_RAM) | |
| 1229 | AM_RANGE(0x800000, 0x87ffff) AM_READ(data_r) | |
| 1230 | AM_RANGE(0x900000, 0x90ffff) AM_READ(shareram1_r) | |
| 1231 | AM_RANGE(0xa00000, 0xa00fff) AM_READ(namcos2_68k_dualportram_word_r) | |
| 1232 | AM_RANGE(0xb00000, 0xb03fff) AM_READ(NAMCO_C139_SCI_buffer_r) | |
| 1233 | AM_RANGE(0xb80000, 0xb8000f) AM_READ(NAMCO_C139_SCI_register_r) | |
| 1357 | static ADDRESS_MAP_START( am_slave_winrun, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1358 | AM_RANGE(0x000000, 0x03ffff) AM_READ(MRA16_ROM) AM_WRITE(MWA16_ROM) | |
| 1359 | AM_RANGE(0x100000, 0x13ffff) AM_READ(MRA16_RAM) AM_WRITE(MWA16_RAM) | |
| 1360 | AM_RANGE(0x1c0000, 0x1fffff) AM_READ(namcos2_68k_slave_C148_r) AM_WRITE(namcos2_68k_slave_C148_w) | |
| 1361 | AM_RANGE(0x600000, 0x60ffff) AM_READ(winrun_gpucomram_r) AM_WRITE(winrun_gpucomram_w) | |
| 1362 | AM_RANGE(0x800000, 0x87ffff) AM_READ(datarom_r) | |
| 1363 | AM_RANGE(0x900000, 0x90ffff) AM_READ(shareram1_r) AM_WRITE(shareram1_w) | |
| 1364 | AM_RANGE(0xa00000, 0xa00fff) AM_READ(namcos2_68k_dualportram_word_r) AM_WRITE(namcos2_68k_dualportram_word_w) | |
| 1365 | AM_RANGE(0xb00000, 0xb03fff) AM_READ(NAMCO_C139_SCI_buffer_r) AM_WRITE(NAMCO_C139_SCI_buffer_w) | |
| 1366 | AM_RANGE(0xb80000, 0xb8000f) AM_READ(NAMCO_C139_SCI_register_r) AM_WRITE(NAMCO_C139_SCI_register_w) | |
| 1234 | 1367 | ADDRESS_MAP_END |
| 1235 | 1368 | |
| 1236 | static ADDRESS_MAP_START( writemem_slave_winrun, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1237 | AM_RANGE(0x100000, 0x13ffff) AM_WRITE(MWA16_RAM) | |
| 1238 | AM_RANGE(0x1c0000, 0x1fffff) AM_WRITE(namcos2_68k_slave_C148_w) | |
| 1239 | AM_RANGE(0x280000, 0x281fff) AM_WRITE(dspram16_w) | |
| 1240 | AM_RANGE(0x400000, 0x400001) AM_WRITE(namcos21_dsp_control_w) | |
| 1241 | AM_RANGE(0x440000, 0x440001) AM_WRITE(namcos21_dsp_data_w) | |
| 1242 | // AM_RANGE(0x600000, 0x600fff) AM_WRITE(MWA16_RAM) | |
| 1243 | AM_RANGE(0x900000, 0x90ffff) AM_WRITE(shareram1_w) | |
| 1244 | AM_RANGE(0xa00000, 0xa00fff) AM_WRITE(namcos2_68k_dualportram_word_w) | |
| 1245 | AM_RANGE(0xb00000, 0xb03fff) AM_WRITE(NAMCO_C139_SCI_buffer_w) | |
| 1246 | AM_RANGE(0xb80000, 0xb8000f) AM_WRITE(NAMCO_C139_SCI_register_w) | |
| 1369 | static ADDRESS_MAP_START( am_gpu_winrun, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1370 | AM_RANGE(0x000000, 0x07ffff) AM_READ(MRA16_ROM) AM_WRITE(MWA16_ROM) | |
| 1371 | AM_RANGE(0x100000, 0x100001) AM_READ(winrun_gpu_color_r) AM_WRITE(winrun_gpu_color_w) /* ? */ | |
| 1372 | AM_RANGE(0x180000, 0x19ffff) AM_READ(MRA16_RAM) AM_WRITE(MWA16_RAM) /* work RAM */ | |
| 1373 | AM_RANGE(0x1c0000, 0x1fffff) AM_READ(namcos2_68k_gpu_C148_r) AM_WRITE(namcos2_68k_gpu_C148_w) | |
| 1374 | AM_RANGE(0x200000, 0x20ffff) AM_READ(MRA16_RAM) AM_WRITE(MWA16_RAM) AM_BASE( &winrun_gpucomram ) | |
| 1375 | AM_RANGE(0x400000, 0x41ffff) AM_READ(paletteram16_r) AM_WRITE(paletteram16_w) AM_BASE( &paletteram16 ) | |
| 1376 | AM_RANGE(0x600000, 0x6fffff) AM_READ(gpu_data_r) | |
| 1377 | AM_RANGE(0xc00000, 0xcfffff) AM_READ(winrun_gpu_videoram_r) AM_WRITE(winrun_gpu_videoram_w) | |
| 1378 | AM_RANGE(0xd00000, 0xd0000f) AM_READ(winrun_gpu_register_r) AM_WRITE(winrun_gpu_register_w) | |
| 1379 | // AM_RANGE(0xe0000c, 0xe0000d) POSIRQ | |
| 1247 | 1380 | ADDRESS_MAP_END |
| 1248 | 1381 | |
| 1249 | 1382 | /*************************************************************/ |
| r1037 | r1038 | |
| 1261 | 1394 | ADDRESS_MAP_END |
| 1262 | 1395 | |
| 1263 | 1396 | static ADDRESS_MAP_START( writemem_sound, ADDRESS_SPACE_PROGRAM, 8 ) |
| 1397 | AM_RANGE(0x3000, 0x3003) AM_WRITE(MWA8_NOP) /* ? */ | |
| 1264 | 1398 | AM_RANGE(0x0000, 0x3fff) AM_WRITE(MWA8_ROM) |
| 1265 | 1399 | AM_RANGE(0x4000, 0x4000) AM_WRITE(YM2151_register_port_0_w) |
| 1266 | 1400 | AM_RANGE(0x4001, 0x4001) AM_WRITE(YM2151_data_port_0_w) |
| r1037 | r1038 | |
| 1310 | 1444 | AM_RANGE(0x8000, 0xffff) AM_WRITE(MWA8_ROM) |
| 1311 | 1445 | ADDRESS_MAP_END |
| 1312 | 1446 | |
| 1447 | //////////////////////////////////////////////////////////////////////////////// | |
| 1448 | //////////////////////////////////////////////////////////////////////////////// | |
| 1449 | //////////////////////////////////////////////////////////////////////////////// | |
| 1450 | //////////////////////////////////////////////////////////////////////////////// | |
| 1451 | ||
| 1452 | static ADDRESS_MAP_START( driveyes_68k_master, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1453 | AM_RANGE(0x000000, 0x03ffff) AM_READ(MRA16_ROM) AM_WRITE(MWA16_ROM) | |
| 1454 | AM_RANGE(0x100000, 0x10ffff) AM_READ(MRA16_RAM) AM_WRITE(MWA16_RAM) /* private work RAM */ | |
| 1455 | AM_RANGE(0x180000, 0x183fff) AM_READ(NAMCOS2_68K_EEPROM_R) AM_WRITE(NAMCOS2_68K_EEPROM_W)// AM_BASE(&namcos2_eeprom) AM_SIZE(&namcos2_eeprom_size) | |
| 1456 | AM_RANGE(0x1c0000, 0x1fffff) AM_READ(namcos2_68k_master_C148_r) AM_WRITE(namcos2_68k_master_C148_w) | |
| 1457 | ADDRESS_MAP_END | |
| 1458 | ||
| 1459 | static ADDRESS_MAP_START( driveyes_68k_slave, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1460 | AM_RANGE(0x000000, 0x03ffff) AM_READ(MRA16_ROM) AM_WRITE(MWA16_ROM) | |
| 1461 | AM_RANGE(0x100000, 0x10ffff) AM_READ(MRA16_RAM) AM_WRITE(MWA16_RAM) /* private work RAM */ | |
| 1462 | AM_RANGE(0x1c0000, 0x1fffff) AM_READ(namcos2_68k_slave_C148_r) AM_WRITE(namcos2_68k_slave_C148_w) | |
| 1463 | ADDRESS_MAP_END | |
| 1464 | ||
| 1465 | static ADDRESS_MAP_START( driveyes_68k_common, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1466 | AM_RANGE(0x250000, 0x25ffff) AM_READ(MRA16_RAM) AM_WRITE(MWA16_RAM) AM_BASE( &winrun_polydata ) | |
| 1467 | AM_RANGE(0x280000, 0x281fff) AM_WRITE(winrun_dspbios_w) AM_BASE(&winrun_dspbios) | |
| 1468 | AM_RANGE(0x380000, 0x38000f) AM_READ(winrun_dspcomram_control_r) AM_WRITE(winrun_dspcomram_control_w) | |
| 1469 | AM_RANGE(0x3c0000, 0x3c1fff) AM_READ(winrun_68k_dspcomram_r) AM_WRITE(winrun_68k_dspcomram_w) | |
| 1470 | AM_RANGE(0x400000, 0x400001) AM_WRITE(pointram_control_w) | |
| 1471 | AM_RANGE(0x440000, 0x440001) AM_READ(pointram_data_r) AM_WRITE(pointram_data_w) | |
| 1472 | AM_RANGE(0x700000, 0x71ffff) AM_READ(namco_obj16_r) AM_WRITE(namco_obj16_w) | |
| 1473 | AM_RANGE(0x720000, 0x720007) AM_READ(namco_spritepos16_r) AM_WRITE(namco_spritepos16_w) | |
| 1474 | AM_RANGE(0x740000, 0x75ffff) AM_READ(paletteram16_r ) AM_WRITE(paletteram16_w) AM_BASE(&paletteram16) | |
| 1475 | AM_RANGE(0x760000, 0x760001) AM_READ(namcos21_video_enable_r) AM_WRITE(namcos21_video_enable_w) | |
| 1476 | AM_RANGE(0x800000, 0x8fffff) AM_READ(datarom_r) | |
| 1477 | AM_RANGE(0x900000, 0x90ffff) AM_READ(shareram1_r) AM_WRITE(shareram1_w) AM_BASE(&mpSharedRAM1) | |
| 1478 | AM_RANGE(0xa00000, 0xa00fff) AM_READ(namcos2_68k_dualportram_word_r) AM_WRITE(namcos2_68k_dualportram_word_w) | |
| 1479 | AM_RANGE(0xb00000, 0xb03fff) AM_READ(NAMCO_C139_SCI_buffer_r) AM_WRITE(NAMCO_C139_SCI_buffer_w) | |
| 1480 | AM_RANGE(0xb80000, 0xb8000f) AM_READ(NAMCO_C139_SCI_register_r) AM_WRITE(NAMCO_C139_SCI_register_w) | |
| 1481 | ADDRESS_MAP_END | |
| 1482 | ||
| 1313 | 1483 | static const gfx_layout tile_layout = |
| 1314 | 1484 | { |
| 1315 | 1485 | 16,16, |
| r1037 | r1038 | |
| 1351 | 1521 | REGION_SOUND1 |
| 1352 | 1522 | }; |
| 1353 | 1523 | |
| 1354 | static MACHINE_RESET( namcos21 ) | |
| 1355 | { | |
| 1356 | InitDSP(); | |
| 1357 | machine_reset_namcos2(machine); | |
| 1358 | } | |
| 1359 | ||
| 1360 | 1524 | static MACHINE_DRIVER_START( s21base ) |
| 1361 | 1525 | MDRV_CPU_ADD(M68000,12288000) /* Master */ |
| 1362 | 1526 | MDRV_CPU_PROGRAM_MAP(namcos21_68k_master, namcos21_68k_common) |
| r1037 | r1038 | |
| 1380 | 1544 | MDRV_CPU_DATA_MAP(master_dsp_data,0) |
| 1381 | 1545 | MDRV_CPU_IO_MAP(master_dsp_io,0) |
| 1382 | 1546 | |
| 1383 | MDRV_CPU_ADD(TMS32025,24000000) /* 24 MHz?; overclocked */ | |
| 1547 | MDRV_CPU_ADD(TMS32025,24000000*4) /* 24 MHz?; overclocked */ | |
| 1384 | 1548 | MDRV_CPU_PROGRAM_MAP(slave_dsp_program,0) |
| 1385 | 1549 | MDRV_CPU_DATA_MAP(slave_dsp_data,0) |
| 1386 | 1550 | MDRV_CPU_IO_MAP(slave_dsp_io,0) |
| 1387 | 1551 | |
| 1388 | 1552 | MDRV_SCREEN_REFRESH_RATE(60) |
| 1389 | 1553 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_REAL_60HZ_VBLANK_DURATION) |
| 1390 | MDRV_INTERLEAVE( | |
| 1554 | MDRV_INTERLEAVE(20 | |
| 1391 | 1555 | |
| 1392 | MDRV_MACHINE_RESET(namcos2 | |
| 1556 | MDRV_MACHINE_RESET(namcos2 | |
| 1393 | 1557 | MDRV_NVRAM_HANDLER(namcos2) |
| 1394 | 1558 | |
| 1395 | 1559 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| r1037 | r1038 | |
| 1401 | 1565 | MDRV_PALETTE_LENGTH(NAMCOS21_NUM_COLORS) |
| 1402 | 1566 | |
| 1403 | 1567 | MDRV_VIDEO_START(namcos21) |
| 1404 | MDRV_VIDEO_UPDATE(namcos21 | |
| 1568 | MDRV_VIDEO_UPDATE(namcos21 | |
| 1405 | 1569 | MACHINE_DRIVER_END |
| 1406 | 1570 | |
| 1407 | 1571 | static MACHINE_DRIVER_START( poly_c140_typeA ) |
| r1037 | r1038 | |
| 1434 | 1598 | MDRV_SOUND_ROUTE(1, "right", 0.30) |
| 1435 | 1599 | MACHINE_DRIVER_END |
| 1436 | 1600 | |
| 1601 | static MACHINE_DRIVER_START( driveyes ) | |
| 1602 | MDRV_CPU_ADD(M68000,12288000) /* Master */ | |
| 1603 | MDRV_CPU_PROGRAM_MAP(driveyes_68k_master, driveyes_68k_common) | |
| 1604 | MDRV_CPU_VBLANK_INT(namcos2_68k_master_vblank,1) | |
| 1605 | ||
| 1606 | MDRV_CPU_ADD(M68000,12288000) /* Slave */ | |
| 1607 | MDRV_CPU_PROGRAM_MAP(driveyes_68k_slave, driveyes_68k_common) | |
| 1608 | MDRV_CPU_VBLANK_INT(namcos2_68k_slave_vblank,1) | |
| 1609 | ||
| 1610 | MDRV_CPU_ADD(M6809,3072000) /* Sound */ | |
| 1611 | MDRV_CPU_PROGRAM_MAP(readmem_sound,writemem_sound) | |
| 1612 | MDRV_CPU_VBLANK_INT(irq0_line_hold,2) | |
| 1613 | MDRV_CPU_PERIODIC_INT(irq1_line_hold,120) | |
| 1614 | ||
| 1615 | MDRV_CPU_ADD(HD63705,2048000) /* IO */ | |
| 1616 | MDRV_CPU_PROGRAM_MAP(readmem_mcu,writemem_mcu) | |
| 1617 | MDRV_CPU_VBLANK_INT(irq0_line_hold,1) | |
| 1618 | ||
| 1619 | MDRV_CPU_ADD(TMS32025,24000000*2) /* 24 MHz? overclocked */ | |
| 1620 | MDRV_CPU_PROGRAM_MAP(winrun_dsp_program,0) | |
| 1621 | MDRV_CPU_DATA_MAP(winrun_dsp_data,0) | |
| 1622 | MDRV_CPU_IO_MAP(winrun_dsp_io,0) | |
| 1623 | ||
| 1624 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 1625 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_REAL_60HZ_VBLANK_DURATION) | |
| 1626 | MDRV_INTERLEAVE(100) /* 100 CPU slices per frame */ | |
| 1627 | ||
| 1628 | MDRV_MACHINE_RESET(namcos2) | |
| 1629 | MDRV_NVRAM_HANDLER(namcos2) | |
| 1630 | ||
| 1631 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) | |
| 1632 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 1633 | MDRV_SCREEN_SIZE(NAMCOS21_POLY_FRAME_WIDTH,NAMCOS21_POLY_FRAME_HEIGHT) | |
| 1634 | MDRV_SCREEN_VISIBLE_AREA(0,495,0,479) | |
| 1635 | ||
| 1636 | MDRV_GFXDECODE(gfxdecodeinfo) | |
| 1637 | MDRV_PALETTE_LENGTH(NAMCOS21_NUM_COLORS) | |
| 1638 | ||
| 1639 | MDRV_VIDEO_START(namcos21) | |
| 1640 | MDRV_VIDEO_UPDATE(namcos21) | |
| 1641 | ||
| 1642 | MDRV_SPEAKER_STANDARD_STEREO("left", "right") | |
| 1643 | ||
| 1644 | MDRV_SOUND_ADD(C140, 8000000/374) | |
| 1645 | MDRV_SOUND_CONFIG(C140_interface_typeA) | |
| 1646 | MDRV_SOUND_ROUTE(0, "left", 0.50) | |
| 1647 | MDRV_SOUND_ROUTE(1, "right", 0.50) | |
| 1648 | ||
| 1649 | MDRV_SOUND_ADD(YM2151, 3579580) | |
| 1650 | MDRV_SOUND_ROUTE(0, "left", 0.30) | |
| 1651 | MDRV_SOUND_ROUTE(1, "right", 0.30) | |
| 1652 | MACHINE_DRIVER_END | |
| 1653 | ||
| 1437 | 1654 | static MACHINE_DRIVER_START( winrun_c140_typeB ) |
| 1438 | 1655 | MDRV_CPU_ADD(M68000,12288000) /* Master */ |
| 1439 | MDRV_CPU_PROGRAM_MAP( | |
| 1656 | MDRV_CPU_PROGRAM_MAP( | |
| 1440 | 1657 | MDRV_CPU_VBLANK_INT(namcos2_68k_master_vblank,1) |
| 1441 | 1658 | |
| 1442 | 1659 | MDRV_CPU_ADD(M68000,12288000) /* Slave */ |
| 1443 | MDRV_CPU_PROGRAM_MAP( | |
| 1660 | MDRV_CPU_PROGRAM_MAP( | |
| 1444 | 1661 | MDRV_CPU_VBLANK_INT(namcos2_68k_slave_vblank,1) |
| 1445 | 1662 | |
| 1446 | 1663 | MDRV_CPU_ADD(M6809,3072000) /* Sound */ |
| r1037 | r1038 | |
| 1452 | 1669 | MDRV_CPU_PROGRAM_MAP(readmem_mcu,writemem_mcu) |
| 1453 | 1670 | MDRV_CPU_VBLANK_INT(irq0_line_hold,1) |
| 1454 | 1671 | |
| 1672 | MDRV_CPU_ADD(TMS32025,24000000) /* 24 MHz? overclocked */ | |
| 1673 | MDRV_CPU_PROGRAM_MAP(winrun_dsp_program,0) | |
| 1674 | MDRV_CPU_DATA_MAP(winrun_dsp_data,0) | |
| 1675 | MDRV_CPU_IO_MAP(winrun_dsp_io,0) | |
| 1676 | ||
| 1455 | 1677 | MDRV_CPU_ADD(M68000,12288000) /* graphics coprocessor */ |
| 1456 | MDRV_CPU_PROGRAM_MAP(readmem_gpu_winrun,writemem_gpu_winrun) | |
| 1457 | MDRV_CPU_VBLANK_INT(namcos2_gpu_vblank,1) | |
| 1678 | MDRV_CPU_PROGRAM_MAP(am_gpu_winrun,0) | |
| 1679 | MDRV_CPU_VBLANK_INT(namcos2_68k_gpu_vblank,1) | |
| 1458 | 1680 | |
| 1459 | 1681 | MDRV_SCREEN_REFRESH_RATE(60) |
| 1460 | 1682 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_REAL_60HZ_VBLANK_DURATION) |
| r1037 | r1038 | |
| 1465 | 1687 | |
| 1466 | 1688 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| 1467 | 1689 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 1468 | MDRV_SCREEN_SIZE(512,512) | |
| 1469 | MDRV_SCREEN_VISIBLE_AREA(0,511,0,511) | |
| 1690 | MDRV_SCREEN_SIZE(NAMCOS21_POLY_FRAME_WIDTH,NAMCOS21_POLY_FRAME_HEIGHT) | |
| 1691 | MDRV_SCREEN_VISIBLE_AREA(0,495,0,479) | |
| 1470 | 1692 | |
| 1471 | 1693 | MDRV_PALETTE_LENGTH(NAMCOS21_NUM_COLORS) |
| 1694 | MDRV_COLORTABLE_LENGTH(NAMCOS21_NUM_COLORS) | |
| 1472 | 1695 | |
| 1473 | 1696 | MDRV_VIDEO_START(namcos21) |
| 1474 | MDRV_VIDEO_UPDATE(namcos21 | |
| 1697 | MDRV_VIDEO_UPDATE(namcos21 | |
| 1475 | 1698 | |
| 1476 | 1699 | MDRV_SPEAKER_STANDARD_STEREO("left", "right") |
| 1477 | 1700 | |
| r1037 | r1038 | |
| 1490 | 1713 | ROM_LOAD16_BYTE( "ac2-mpr-u.3j", 0x000000, 0x80000, CRC(a7133f85) SHA1(9f1c99dd503f1fc81096170fd272e33ae8a7de2f) ) |
| 1491 | 1714 | ROM_LOAD16_BYTE( "ac2-mpr-l.1j", 0x000001, 0x80000, CRC(520a52e6) SHA1(74306e02abfe08aa1afbf325b74dbc0840c3ad3a) ) |
| 1492 | 1715 | |
| 1493 | ROM_REGION( 0x | |
| 1716 | ROM_REGION( 0x8 | |
| 1494 | 1717 | ROM_LOAD16_BYTE( "ac2-spr-u.6c", 0x000000, 0x20000, CRC(42aca956) SHA1(10ea2400bb4d5b2d805e2de43ca0e0f54597f660) ) |
| 1495 | 1718 | ROM_LOAD16_BYTE( "ac2-spr-l.4c", 0x000001, 0x20000, CRC(3e15fa19) SHA1(65dbb33ab6b3c06c793613348ebb7b110b8bba0d) ) |
| 1496 | 1719 | |
| 1497 | 1720 | ROM_REGION( 0x030000, REGION_CPU3, 0 ) /* Sound */ |
| 1498 | ROM_LOAD( "ac1-snd0.8j", 0x00c000, 0x004000, CRC(5c1fb84b) SHA1(20e4d81289dbe58ffcfc947251a6ff1cc1e36436) ) | |
| 1499 | ROM_CONTINUE( 0x010000, 0x01c000 ) | |
| 1500 | ROM_RELOAD( 0x010000, 0x020000 ) | |
| 1721 | ROM_LOAD( "ac1-snd0.8j", 0x00c000, 0x004000, CRC(5c1fb84b) SHA1(20e4d81289dbe58ffcfc947251a6ff1cc1e36436) ) | |
| 1722 | ROM_CONTINUE( 0x010000, 0x01c000 ) | |
| 1723 | ROM_RELOAD( 0x010000, 0x020000 ) | |
| 1501 | 1724 | |
| 1502 | 1725 | ROM_REGION( 0x010000, REGION_CPU4, 0 ) /* I/O MCU */ |
| 1503 | 1726 | ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) |
| 1504 | 1727 | ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) |
| 1505 | 1728 | |
| 1506 | ROM_REGION( 0x12000, REGION_CPU5, ROMREGION_ERASE00 ) | |
| 1507 | ROM_REGION( 0x12000, REGION_CPU6, ROMREGION_ERASE00 ) | |
| 1729 | ROM_REGION( 0x20000, REGION_CPU5, 0 ) /* Master DSP */ | |
| 1730 | ROM_LOAD( "c67.bin", 0, 0x2000, CRC(6bd8988e) SHA1(c9ec18d5f88d53976b94444eedc64d5568155958) ) | |
| 1731 | ROM_REGION( 0x20000, REGION_CPU6, 0 ) /* Slave DSP */ | |
| 1732 | ROM_LOAD( "c67.bin", 0, 0x2000, CRC(6bd8988e) SHA1(c9ec18d5f88d53976b94444eedc64d5568155958) ) | |
| 1508 | 1733 | |
| 1509 | 1734 | ROM_REGION( 0x400000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 1510 | 1735 | ROM_LOAD( "ac2-obj0.5s", 0x000000, 0x80000, CRC(8327ff22) SHA1(16f6022dedb7a74590898bc8ed3e8a97993c4635) ) |
| r1037 | r1038 | |
| 1517 | 1742 | ROM_LOAD( "ac2-obj7.2x", 0x380000, 0x80000, CRC(d561fbe3) SHA1(a23976e10bddf74d4a6b292f044dfd0affbab101) ) |
| 1518 | 1743 | |
| 1519 | 1744 | ROM_REGION16_BE( 0x200000, REGION_USER1, 0 ) /* collision */ |
| 1520 | ROM_LOAD16_BYTE( "ac1-data-u.3a", 0x000000, 0x80000, CRC(82320c71) SHA1(2be98d46853febb46e1cc728af2735c0e00ce303) ) | |
| 1521 | ROM_LOAD16_BYTE( "ac1-data-l.1a", 0x000001, 0x80000, CRC(fd7947d3) SHA1(2696eeae37de6d256e626cc3f3cea7b0f6eff60e) ) | |
| 1522 | ROM_LOAD16_BYTE( "ac2-edata-1u.3c", 0x100000, 0x80000, CRC(40c07095) SHA1(5d9beaf5bc411ac66785d70980977b08446f46e3) ) | |
| 1523 | ROM_LOAD16_BYTE( "ac1-edata-1l.1c", 0x100001, 0x80000, CRC(a87087dd) SHA1(cd9b83a8f07886ab44e4ded68002b44338777e8c) ) | |
| 1745 | ROM_LOAD16_BYTE( "ac1-data-u.3a", 0x000000, 0x80000, CRC(82320c71) SHA1(2be98d46853febb46e1cc728af2735c0e00ce303) ) | |
| 1746 | ROM_LOAD16_BYTE( "ac1-data-l.1a", 0x000001, 0x80000, CRC(fd7947d3) SHA1(2696eeae37de6d256e626cc3f3cea7b0f6eff60e) ) | |
| 1747 | ROM_LOAD16_BYTE( "ac2-edata1-u.3c", 0x100000, 0x80000, CRC(40c07095) SHA1(5d9beaf5bc411ac66785d70980977b08446f46e3) ) | |
| 1748 | ROM_LOAD16_BYTE( "ac1-edata1-l.1c", 0x100001, 0x80000, CRC(a87087dd) SHA1(cd9b83a8f07886ab44e4ded68002b44338777e8c) ) | |
| 1524 | 1749 | |
| 1525 | 1750 | ROM_REGION32_BE( 0x400000, REGION_USER2, ROMREGION_ERASE ) /* 24bit signed point data */ |
| 1526 | ROM_LOAD32_BYTE( "ac1-poih.2f", 0x000001, 0x80000, CRC(573bbc3b) SHA1(371be12b915db6872049f18980c1b55544cfc445) ) /* most significant */ | |
| 1527 | ROM_LOAD32_BYTE( "ac1-poil-u.2k", 0x000002, 0x80000, CRC(d99084b9) SHA1(c604d60a2162af7610e5ff7c1aa4195f7df82efe) ) | |
| 1528 | ROM_LOAD32_BYTE( "ac1-poil-l.2n", 0x000003, 0x80000, CRC(abb32307) SHA1(8e936ba99479215dd33a951d81ec2b04020dfd62) ) /* least significant */ | |
| 1751 | ROM_LOAD32_BYTE( "ac1-poi-h.2f", 0x000001, 0x80000, CRC(573bbc3b) SHA1(371be12b915db6872049f18980c1b55544cfc445) ) /* most significant */ | |
| 1752 | ROM_LOAD32_BYTE( "ac1-poi-lu.2k", 0x000002, 0x80000, CRC(d99084b9) SHA1(c604d60a2162af7610e5ff7c1aa4195f7df82efe) ) | |
| 1753 | ROM_LOAD32_BYTE( "ac1-poi-ll.2n", 0x000003, 0x80000, CRC(abb32307) SHA1(8e936ba99479215dd33a951d81ec2b04020dfd62) ) /* least significant */ | |
| 1529 | 1754 | |
| 1755 | ||
| 1530 | 1756 | ROM_REGION( 0x200000, REGION_SOUND1, 0 ) /* sound samples */ |
| 1531 | 1757 | ROM_LOAD("ac1-voi0.12b",0x000000,0x80000,CRC(f427b119) SHA1(bd45bbe41c8be26d6c997fcdc226d080b416a2cf) ) |
| 1532 | 1758 | ROM_LOAD("ac1-voi1.12c",0x080000,0x80000,CRC(c9490667) SHA1(4b6fbe635c32469870a8e6f82742be6a9d4918c9) ) |
| r1037 | r1038 | |
| 1544 | 1770 | ROM_LOAD16_BYTE( "ac1-mpr-u.3j", 0x000000, 0x80000, CRC(a4dec813) SHA1(2ee8b3492d30db4c841f695151880925a5e205e0) ) |
| 1545 | 1771 | ROM_LOAD16_BYTE( "ac1-mpr-l.1j", 0x000001, 0x80000, CRC(8577b6a2) SHA1(32194e392fbd051754be88eb8c90688c65c65d85) ) |
| 1546 | 1772 | |
| 1547 | ROM_REGION( 0x | |
| 1773 | ROM_REGION( 0x | |
| 1548 | 1774 | ROM_LOAD16_BYTE( "ac1-spr-u.6c", 0x000000, 0x20000, CRC(5810e219) SHA1(c312ffd8324670897871b12d521779570dc0f580) ) |
| 1549 | 1775 | ROM_LOAD16_BYTE( "ac1-spr-l.4c", 0x000001, 0x20000, CRC(175a7d6c) SHA1(9e31dde6646cd9b6dcdbdb3f2326177508559e56) ) |
| 1550 | 1776 | |
| 1551 | 1777 | ROM_REGION( 0x030000, REGION_CPU3, 0 ) /* Sound */ |
| 1552 | ROM_LOAD( "ac1-snd0.8j", 0x00c000, 0x004000, CRC(5c1fb84b) SHA1(20e4d81289dbe58ffcfc947251a6ff1cc1e36436) ) | |
| 1553 | ROM_CONTINUE( 0x010000, 0x01c000 ) | |
| 1554 | ROM_RELOAD( 0x010000, 0x020000 ) | |
| 1778 | ROM_LOAD( "ac1-snd0.8j", 0x00c000, 0x004000, CRC(5c1fb84b) SHA1(20e4d81289dbe58ffcfc947251a6ff1cc1e36436) ) | |
| 1779 | ROM_CONTINUE( 0x010000, 0x01c000 ) | |
| 1780 | ROM_RELOAD( 0x010000, 0x020000 ) | |
| 1555 | 1781 | |
| 1556 | 1782 | ROM_REGION( 0x010000, REGION_CPU4, 0 ) /* I/O MCU */ |
| 1557 | 1783 | ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) |
| 1558 | 1784 | ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) |
| 1559 | 1785 | |
| 1560 | ROM_REGION( 0x12000, REGION_CPU5, ROMREGION_ERASE00 ) | |
| 1561 | ROM_REGION( 0x12000, REGION_CPU6, ROMREGION_ERASE00 ) | |
| 1786 | ROM_REGION( 0x20000, REGION_CPU5, 0 ) /* Master DSP */ | |
| 1787 | ROM_LOAD( "c67.bin", 0, 0x2000, CRC(6bd8988e) SHA1(c9ec18d5f88d53976b94444eedc64d5568155958) ) | |
| 1788 | ROM_REGION( 0x20000, REGION_CPU6, 0 ) /* Slave DSP */ | |
| 1789 | ROM_LOAD( "c67.bin", 0, 0x2000, CRC(6bd8988e) SHA1(c9ec18d5f88d53976b94444eedc64d5568155958) ) | |
| 1562 | 1790 | |
| 1563 | 1791 | ROM_REGION( 0x400000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 1564 | 1792 | ROM_LOAD( "ac1-obj0.5s", 0x000000, 0x80000, CRC(d2310c6a) SHA1(9bb8fdfc2c232574777248f4959975f9a20e3105) ) |
| r1037 | r1038 | |
| 1573 | 1801 | ROM_REGION16_BE( 0x200000, REGION_USER1, 0 ) |
| 1574 | 1802 | ROM_LOAD16_BYTE( "ac1-data-u.3a", 0x000000, 0x80000, CRC(82320c71) SHA1(2be98d46853febb46e1cc728af2735c0e00ce303) ) |
| 1575 | 1803 | ROM_LOAD16_BYTE( "ac1-data-l.1a", 0x000001, 0x80000, CRC(fd7947d3) SHA1(2696eeae37de6d256e626cc3f3cea7b0f6eff60e) ) |
| 1576 | ROM_LOAD16_BYTE( "ac1-edata-1u.3c", 0x100000, 0x80000, CRC(a9547509) SHA1(1bc663cec03b60ad968896bbc2546f02efda135e) ) | |
| 1577 | ROM_LOAD16_BYTE( "ac1-edata-1l.1c", 0x100001, 0x80000, CRC(a87087dd) SHA1(cd9b83a8f07886ab44e4ded68002b44338777e8c) ) | |
| 1804 | ROM_LOAD16_BYTE( "ac1-edata1-u.3c", 0x100000, 0x80000, CRC(a9547509) SHA1(1bc663cec03b60ad968896bbc2546f02efda135e) ) | |
| 1805 | ROM_LOAD16_BYTE( "ac1-edata1-l.1c", 0x100001, 0x80000, CRC(a87087dd) SHA1(cd9b83a8f07886ab44e4ded68002b44338777e8c) ) | |
| 1578 | 1806 | |
| 1579 | 1807 | ROM_REGION32_BE( 0x400000, REGION_USER2, ROMREGION_ERASE ) /* 24bit signed point data */ |
| 1580 | ROM_LOAD32_BYTE( "ac1-poih.2f", 0x000001, 0x80000, CRC(573bbc3b) SHA1(371be12b915db6872049f18980c1b55544cfc445) ) /* most significant */ | |
| 1581 | ROM_LOAD32_BYTE( "ac1-poil-u.2k", 0x000002, 0x80000, CRC(d99084b9) SHA1(c604d60a2162af7610e5ff7c1aa4195f7df82efe) ) | |
| 1582 | ROM_LOAD32_BYTE( "ac1-poil-l.2n", 0x000003, 0x80000, CRC(abb32307) SHA1(8e936ba99479215dd33a951d81ec2b04020dfd62) ) /* least significant */ | |
| 1808 | ROM_LOAD32_BYTE( "ac1-poi-h.2f", 0x000001, 0x80000, CRC(573bbc3b) SHA1(371be12b915db6872049f18980c1b55544cfc445) ) /* most significant */ | |
| 1809 | ROM_LOAD32_BYTE( "ac1-poi-lu.2k", 0x000002, 0x80000, CRC(d99084b9) SHA1(c604d60a2162af7610e5ff7c1aa4195f7df82efe) ) | |
| 1810 | ROM_LOAD32_BYTE( "ac1-poi-ll.2n", 0x000003, 0x80000, CRC(abb32307) SHA1(8e936ba99479215dd33a951d81ec2b04020dfd62) ) /* least significant */ | |
| 1583 | 1811 | |
| 1584 | 1812 | ROM_REGION( 0x200000, REGION_SOUND1, 0 ) /* sound samples */ |
| 1585 | 1813 | ROM_LOAD("ac1-voi0.12b",0x000000,0x80000,CRC(f427b119) SHA1(bd45bbe41c8be26d6c997fcdc226d080b416a2cf) ) |
| r1037 | r1038 | |
| 1595 | 1823 | |
| 1596 | 1824 | ROM_START( cybsled ) |
| 1597 | 1825 | ROM_REGION( 0x100000, REGION_CPU1, 0 ) /* Master */ |
| 1826 | ROM_LOAD16_BYTE( "cy2-mpr-u.3j", 0x000000, 0x80000, CRC(b35a72bc) SHA1(d9bc5b8f0bc30510fca8fc57eeb67e5ca0e4c67f) ) | |
| 1827 | ROM_LOAD16_BYTE( "cy2-mpr-l.1j", 0x000001, 0x80000, CRC(c4a25919) SHA1(52f6947102001376e37730ace16283141b13fee7) ) | |
| 1828 | ||
| 1829 | ROM_REGION( 0x100000, REGION_CPU2, 0 ) /* Slave */ | |
| 1830 | ROM_LOAD16_BYTE( "cy2-spr-u.6c", 0x000000, 0x80000, CRC(575a422d) SHA1(cad97742da1e2baf47ac110fadef5544b3a30cc7) ) | |
| 1831 | ROM_LOAD16_BYTE( "cy2-spr-l.4c", 0x000001, 0x80000, CRC(4066291a) SHA1(6ebbc11a68f66ec1e6d2e6ee857e8c599691e289) ) | |
| 1832 | ||
| 1833 | ROM_REGION( 0x030000, REGION_CPU3, 0 ) /* Sound */ | |
| 1834 | ROM_LOAD( "cy1-snd0.8j", 0x00c000, 0x004000, CRC(3dddf83b) SHA1(e16119cbef176b6f8f8ace773fcbc201e987823f) ) | |
| 1835 | ROM_CONTINUE( 0x010000, 0x01c000 ) | |
| 1836 | ROM_RELOAD( 0x010000, 0x020000 ) | |
| 1837 | ||
| 1838 | ROM_REGION( 0x010000, REGION_CPU4, 0 ) /* I/O MCU */ | |
| 1839 | ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) | |
| 1840 | ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) | |
| 1841 | ||
| 1842 | ROM_REGION( 0x20000, REGION_CPU5, 0 ) /* Master DSP */ | |
| 1843 | ROM_LOAD( "c67.bin", 0, 0x2000, CRC(6bd8988e) SHA1(c9ec18d5f88d53976b94444eedc64d5568155958) ) | |
| 1844 | ROM_REGION( 0x20000, REGION_CPU6, 0 ) /* Slave DSP */ | |
| 1845 | ROM_LOAD( "c67.bin", 0, 0x2000, CRC(6bd8988e) SHA1(c9ec18d5f88d53976b94444eedc64d5568155958) ) | |
| 1846 | ||
| 1847 | ROM_REGION( 0x400000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1848 | ROM_LOAD( "cy1-obj0.5s", 0x000000, 0x80000, CRC(5ae542d5) SHA1(99b1a3ed476da4a97cb864538909d7b831f0fd3b) ) | |
| 1849 | ROM_LOAD( "cy1-obj4.4s", 0x080000, 0x80000, CRC(57904076) SHA1(b1dc0d99543bc4b9584b37ffc12c6ebc59e30e3b) ) | |
| 1850 | ROM_LOAD( "cy1-obj1.5x", 0x100000, 0x80000, CRC(4aae3eff) SHA1(c80240bd2f4228a0261a14adb6b10560b31b5aa0) ) | |
| 1851 | ROM_LOAD( "cy1-obj5.4x", 0x180000, 0x80000, CRC(0e11ca47) SHA1(076a9a4cfddbee2d8aaa06110333090d8fdbefeb) ) | |
| 1852 | ROM_LOAD( "cy1-obj2.3s", 0x200000, 0x80000, CRC(d64ec4c3) SHA1(0bed1cafc21ed8cef3850fb81e30076977086eb0) ) | |
| 1853 | ROM_LOAD( "cy1-obj6.2s", 0x280000, 0x80000, CRC(7748b485) SHA1(adb4da419a6cdbefd0fef182d866a3479be379af) ) | |
| 1854 | ROM_LOAD( "cy1-obj3.3x", 0x300000, 0x80000, CRC(3d1f7168) SHA1(392dddcc79fe61dcc6514a91ac27b5e36825d8b7) ) | |
| 1855 | ROM_LOAD( "cy1-obj7.2x", 0x380000, 0x80000, CRC(b6eb6ad2) SHA1(85a660c5e44012491be7d4e783cce6ba12c135cb) ) | |
| 1856 | ||
| 1857 | ROM_REGION16_BE( 0x200000, REGION_USER1, 0 ) /* 68k */ | |
| 1858 | ROM_LOAD16_BYTE( "cy1-data-u.3a", 0x000000, 0x80000, CRC(570da15d) SHA1(9ebe756f10756c079a92fb522332e9e52ff715c3) ) | |
| 1859 | ROM_LOAD16_BYTE( "cy1-data-l.1a", 0x000001, 0x80000, CRC(9cf96f9e) SHA1(91783f48b93e03c778c6641ca8fb419c13b0d3c5) ) | |
| 1860 | ROM_LOAD16_BYTE( "cy1-edata0-u.3b", 0x100000, 0x80000, CRC(77452533) SHA1(48fc199bcc1beb23c714eebd9b09b153c980170b) ) | |
| 1861 | ROM_LOAD16_BYTE( "cy1-edata0-l.1b", 0x100001, 0x80000, CRC(e812e290) SHA1(719e0a026ae8ef63d0d0269b67669ea9b4d950dd) ) | |
| 1862 | ||
| 1863 | ROM_REGION32_BE( 0x400000, REGION_USER2, ROMREGION_ERASE ) /* 24bit signed point data */ | |
| 1864 | ROM_LOAD32_BYTE( "cy1-poi-h1.2f", 0x000001, 0x80000, CRC(eaf8bac3) SHA1(7a2caf6672af158b4a23ce4626342d1f17d1a4e4) ) /* most significant */ | |
| 1865 | ROM_LOAD32_BYTE( "cy1-poi-lu1.2k", 0x000002, 0x80000, CRC(c544a8dc) SHA1(4cce5f2ab3519b4aa7edbdd15b2d79a7fdcade3c) ) | |
| 1866 | ROM_LOAD32_BYTE( "cy1-poi-ll1.2n", 0x000003, 0x80000, CRC(30acb99b) SHA1(a28dcb3e5405f166644f6353a903c1143ee268f1) ) /* least significant */ | |
| 1867 | ROM_LOAD32_BYTE( "cy1-poi-h2.2j", 0x200001, 0x80000, CRC(4079f342) SHA1(fa36aed1abbda54a42f29b183007474580870319) ) | |
| 1868 | ROM_LOAD32_BYTE( "cy1-poi-lu2.2l", 0x200002, 0x80000, CRC(61d816d4) SHA1(7991957b910d32530151abc7f469fcf1de62d8f3) ) | |
| 1869 | ROM_LOAD32_BYTE( "cy1-poi-ll2.2p", 0x200003, 0x80000, CRC(faf09158) SHA1(b56ebed6012362b1d599c396a43e90a1e4d9dc38) ) | |
| 1870 | ||
| 1871 | ROM_REGION( 0x200000, REGION_SOUND1, 0 ) /* sound samples */ | |
| 1872 | ROM_LOAD("cy1-voi0.12b",0x000000,0x80000,CRC(99d7ce46) SHA1(b75f4055c3ce847daabfacda22df14e3f80c4fb9) ) | |
| 1873 | ROM_LOAD("cy1-voi1.12c",0x080000,0x80000,CRC(2b335f06) SHA1(2b2cd407c34388b56496f84a414daa153780b098) ) | |
| 1874 | ROM_LOAD("cy1-voi2.12d",0x100000,0x80000,CRC(10cd15f0) SHA1(9b721654ed97a13287373c1b2854ac9aeddc271f) ) | |
| 1875 | ROM_LOAD("cy1-voi3.12e",0x180000,0x80000,CRC(c902b4a4) SHA1(816357ec1a02a7ebf817ac1182e9c50ce5ca71f6) ) | |
| 1876 | ROM_END | |
| 1877 | ||
| 1878 | ROM_START( cybsledj ) | |
| 1879 | ROM_REGION( 0x100000, REGION_CPU1, 0 ) /* Master */ | |
| 1598 | 1880 | ROM_LOAD16_BYTE( "cy1-mpr-u.3j", 0x000000, 0x80000, CRC(cc5a2e83) SHA1(b794051b2c351e9ca43351603845e4e563f6740f) ) |
| 1599 | 1881 | ROM_LOAD16_BYTE( "cy1-mpr-l.1j", 0x000001, 0x80000, CRC(f7ee8b48) SHA1(6d36eb3dba9cf7f5f5e1a26c156e77a2dad3f257) ) |
| 1600 | 1882 | |
| r1037 | r1038 | |
| 1603 | 1885 | ROM_LOAD16_BYTE( "cy1-spr-l.4c", 0x000001, 0x80000, CRC(437029de) SHA1(3d275a2b0ce6909e77e657c371bd22597ea9d398) ) |
| 1604 | 1886 | |
| 1605 | 1887 | ROM_REGION( 0x030000, REGION_CPU3, 0 ) /* Sound */ |
| 1606 | ROM_LOAD( "cy1-snd0.8j", 0x00c000, 0x004000, CRC(3dddf83b) SHA1(e16119cbef176b6f8f8ace773fcbc201e987823f) ) | |
| 1607 | ROM_CONTINUE( 0x010000, 0x01c000 ) | |
| 1608 | ROM_RELOAD( 0x010000, 0x020000 ) | |
| 1888 | ROM_LOAD( "cy1-snd0.8j", 0x00c000, 0x004000, CRC(3dddf83b) SHA1(e16119cbef176b6f8f8ace773fcbc201e987823f) ) | |
| 1889 | ROM_CONTINUE( 0x010000, 0x01c000 ) | |
| 1890 | ROM_RELOAD( 0x010000, 0x020000 ) | |
| 1609 | 1891 | |
| 1610 | 1892 | ROM_REGION( 0x010000, REGION_CPU4, 0 ) /* I/O MCU */ |
| 1611 | 1893 | ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) |
| 1612 | 1894 | ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) |
| 1613 | 1895 | |
| 1614 | ROM_REGION( 0x12000, REGION_CPU5, ROMREGION_ERASE00 ) | |
| 1615 | ROM_REGION( 0x12000, REGION_CPU6, ROMREGION_ERASE00 ) | |
| 1896 | ROM_REGION( 0x20000, REGION_CPU5, 0 ) /* Master DSP */ | |
| 1897 | ROM_LOAD( "c67.bin", 0, 0x2000, CRC(6bd8988e) SHA1(c9ec18d5f88d53976b94444eedc64d5568155958) ) | |
| 1898 | ROM_REGION( 0x20000, REGION_CPU6, 0 ) /* Slave DSP */ | |
| 1899 | ROM_LOAD( "c67.bin", 0, 0x2000, CRC(6bd8988e) SHA1(c9ec18d5f88d53976b94444eedc64d5568155958) ) | |
| 1616 | 1900 | |
| 1617 | 1901 | ROM_REGION( 0x400000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 1618 | 1902 | ROM_LOAD( "cy1-obj0.5s", 0x000000, 0x80000, CRC(5ae542d5) SHA1(99b1a3ed476da4a97cb864538909d7b831f0fd3b) ) |
| r1037 | r1038 | |
| 1624 | 1908 | ROM_LOAD( "cy1-obj3.3x", 0x300000, 0x80000, CRC(3d1f7168) SHA1(392dddcc79fe61dcc6514a91ac27b5e36825d8b7) ) |
| 1625 | 1909 | ROM_LOAD( "cy1-obj7.2x", 0x380000, 0x80000, CRC(b6eb6ad2) SHA1(85a660c5e44012491be7d4e783cce6ba12c135cb) ) |
| 1626 | 1910 | |
| 1627 | ROM_REGION16_BE( 0x200000, REGION_USER1, 0 ) | |
| 1911 | ROM_REGION16_BE( 0x200000, REGION_USER1, 0 ) /* 68k */ | |
| 1628 | 1912 | ROM_LOAD16_BYTE( "cy1-data-u.3a", 0x000000, 0x80000, CRC(570da15d) SHA1(9ebe756f10756c079a92fb522332e9e52ff715c3) ) |
| 1629 | 1913 | ROM_LOAD16_BYTE( "cy1-data-l.1a", 0x000001, 0x80000, CRC(9cf96f9e) SHA1(91783f48b93e03c778c6641ca8fb419c13b0d3c5) ) |
| 1630 | 1914 | ROM_LOAD16_BYTE( "cy1-edata0-u.3b", 0x100000, 0x80000, CRC(77452533) SHA1(48fc199bcc1beb23c714eebd9b09b153c980170b) ) |
| 1631 | 1915 | ROM_LOAD16_BYTE( "cy1-edata0-l.1b", 0x100001, 0x80000, CRC(e812e290) SHA1(719e0a026ae8ef63d0d0269b67669ea9b4d950dd) ) |
| 1632 | 1916 | |
| 1633 | 1917 | ROM_REGION32_BE( 0x400000, REGION_USER2, ROMREGION_ERASE ) /* 24bit signed point data */ |
| 1634 | ROM_LOAD32_BYTE( "cy1-poih-1.2f", 0x000001, 0x80000, CRC(eaf8bac3) SHA1(7a2caf6672af158b4a23ce4626342d1f17d1a4e4) ) /* most significant */ | |
| 1635 | ROM_LOAD32_BYTE( "cy1-poil-u1.2k", 0x000002, 0x80000, CRC(c544a8dc) SHA1(4cce5f2ab3519b4aa7edbdd15b2d79a7fdcade3c) ) | |
| 1636 | ROM_LOAD32_BYTE( "cy1-poil-l1.2n", 0x000003, 0x80000, CRC(30acb99b) SHA1(a28dcb3e5405f166644f6353a903c1143ee268f1) ) /* least significant */ | |
| 1637 | ROM_LOAD32_BYTE( "cy1-poih-2.2j", 0x200001, 0x80000, CRC(4079f342) SHA1(fa36aed1abbda54a42f29b183007474580870319) ) | |
| 1638 | ROM_LOAD32_BYTE( "cy1-poil-u2.2l", 0x200002, 0x80000, CRC(61d816d4) SHA1(7991957b910d32530151abc7f469fcf1de62d8f3) ) | |
| 1639 | ROM_LOAD32_BYTE( "cy1-poil-l2.2p", 0x200003, 0x80000, CRC(faf09158) SHA1(b56ebed6012362b1d599c396a43e90a1e4d9dc38) ) | |
| 1918 | ROM_LOAD32_BYTE( "cy1-poi-h1.2f", 0x000001, 0x80000, CRC(eaf8bac3) SHA1(7a2caf6672af158b4a23ce4626342d1f17d1a4e4) ) /* most significant */ | |
| 1919 | ROM_LOAD32_BYTE( "cy1-poi-lu1.2k", 0x000002, 0x80000, CRC(c544a8dc) SHA1(4cce5f2ab3519b4aa7edbdd15b2d79a7fdcade3c) ) | |
| 1920 | ROM_LOAD32_BYTE( "cy1-poi-ll1.2n", 0x000003, 0x80000, CRC(30acb99b) SHA1(a28dcb3e5405f166644f6353a903c1143ee268f1) ) /* least significant */ | |
| 1921 | ROM_LOAD32_BYTE( "cy1-poi-h2.2j", 0x200001, 0x80000, CRC(4079f342) SHA1(fa36aed1abbda54a42f29b183007474580870319) ) | |
| 1922 | ROM_LOAD32_BYTE( "cy1-poi-lu2.2l", 0x200002, 0x80000, CRC(61d816d4) SHA1(7991957b910d32530151abc7f469fcf1de62d8f3) ) | |
| 1923 | ROM_LOAD32_BYTE( "cy1-poi-ll2.2p", 0x200003, 0x80000, CRC(faf09158) SHA1(b56ebed6012362b1d599c396a43e90a1e4d9dc38) ) | |
| 1640 | 1924 | |
| 1641 | 1925 | ROM_REGION( 0x200000, REGION_SOUND1, 0 ) /* sound samples */ |
| 1642 | 1926 | ROM_LOAD("cy1-voi0.12b",0x000000,0x80000,CRC(99d7ce46) SHA1(b75f4055c3ce847daabfacda22df14e3f80c4fb9) ) |
| r1037 | r1038 | |
| 1646 | 1930 | ROM_END |
| 1647 | 1931 | |
| 1648 | 1932 | ROM_START( driveyes ) |
| 1649 | ROM_REGION( 0x100000, REGION_CPU1, 0 ) /* 68k code */ | |
| 1650 | ROM_LOAD16_BYTE( "de2_mpub.3j", 0x000000, 0x20000, CRC(f9c86fb5) SHA1(b48d16e8f26e7a2cfecb30285b517c42e5585ac7) ) | |
| 1651 | ROM_LOAD16_BYTE( "de2_mplb.1j", 0x000001, 0x20000, CRC(11d8587a) SHA1(ecb1e8fe2ba56b6f6a71a5552d5663b597165786) ) | |
| 1933 | ROM_REGION( 0x40000, REGION_CPU1, 0 ) /* C68C - 68k code */ | |
| 1934 | ROM_LOAD16_BYTE( "de2-mp-ub.3j", 0x000000, 0x20000, CRC(f9c86fb5) SHA1(b48d16e8f26e7a2cfecb30285b517c42e5585ac7) ) | |
| 1935 | ROM_LOAD16_BYTE( "de2-mp-lb.1j", 0x000001, 0x20000, CRC(11d8587a) SHA1(ecb1e8fe2ba56b6f6a71a5552d5663b597165786) ) | |
| 1652 | 1936 | |
| 1653 | ROM_REGION( 0x100000, REGION_CPU2, 0 ) /* 68k code */ | |
| 1654 | ROM_LOAD16_BYTE( "de1_spub.6c", 0x000000, 0x20000, CRC(231b144f) SHA1(42518614cb083455dc5fec71e699403907ca784b) ) | |
| 1655 | ROM_LOAD16_BYTE( "de1_splb.4c", 0x000001, 0x20000, CRC(50cb9f59) SHA1(aec7fa080854f0297d9e90e3aaeb0f332fd579bd) ) | |
| 1937 | ROM_REGION( 0x40000, REGION_CPU2, 0 ) /* C68 - 68k code */ | |
| 1938 | ROM_LOAD16_BYTE( "de1-sp-ub.6c", 0x000000, 0x20000, CRC(231b144f) SHA1(42518614cb083455dc5fec71e699403907ca784b) ) | |
| 1939 | ROM_LOAD16_BYTE( "de1-sp-lb.4c", 0x000001, 0x20000, CRC(50cb9f59) SHA1(aec7fa080854f0297d9e90e3aaeb0f332fd579bd) ) | |
| 1656 | 1940 | |
| 1657 | 1941 | ROM_REGION( 0x30000, REGION_CPU3, 0 ) /* Sound */ |
| 1658 | 1942 | /* |
| r1037 | r1038 | |
| 1661 | 1945 | Only "Set2" has voice roms present/dumped? |
| 1662 | 1946 | We load the "r" set, then load set2's sound CPU code over it to keep the "r" rom in the set |
| 1663 | 1947 | */ |
| 1664 | ROM_LOAD( "de1 | |
| 1948 | ROM_LOAD( "de1-snd0r.8j", 0x00c000, 0x004000, CRC(7bbeda42) SHA1(fe840cc9069758928492bbeec79acded18daafd9) ) /* Sets 1 & 3 */ | |
| 1665 | 1949 | ROM_CONTINUE( 0x010000, 0x01c000 ) |
| 1666 | 1950 | ROM_RELOAD( 0x010000, 0x020000 ) |
| 1667 | ROM_LOAD( "de1 | |
| 1951 | ROM_LOAD( "de1-snd0.8j", 0x00c000, 0x004000, CRC(5474f203) SHA1(e0ae2f6978deb0c934d9311a334a6e36bb402aee) ) /* Set 2 */ | |
| 1668 | 1952 | ROM_CONTINUE( 0x010000, 0x01c000 ) |
| 1669 | 1953 | ROM_RELOAD( 0x010000, 0x020000 ) |
| 1670 | 1954 | |
| r1037 | r1038 | |
| 1672 | 1956 | ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) |
| 1673 | 1957 | ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) |
| 1674 | 1958 | |
| 1675 | ROM_REGION( 0x12000, REGION_CPU5, ROMREGION_ERASE00 ) | |
| 1676 | ROM_REGION( 0x12000, REGION_CPU6, ROMREGION_ERASE00 ) | |
| 1959 | ROM_REGION( 0x20000, REGION_CPU5, 0 ) /* C67 - DSP */ | |
| 1677 | 1960 | |
| 1678 | 1961 | ROM_REGION( 0x200000, REGION_GFX1, ROMREGION_DISPOSE ) /* sprites */ |
| 1679 | ROM_LOAD( "de1_obj0.5s", 0x000000, 0x40000, CRC(7438bd53) SHA1(7619c4b56d5c466e845eb45e6157dcaf2a03ad94) ) | |
| 1680 | ROM_LOAD( "de1_obj1.5x", 0x040000, 0x40000, CRC(45f2334e) SHA1(95f277a4e43d6662ae44d6b69a57f65c72978319) ) | |
| 1681 | ROM_LOAD( "de1_obj2.3s", 0x080000, 0x40000, CRC(8f1a542c) SHA1(2cb59713607d8929815a9b28bf2a384b6a6c9db8) ) | |
| 1682 | ROM_LOAD( "de1_obj3.3x", 0x0c0000, 0x40000, CRC(fc94544c) SHA1(6297445c64784ee253716f6438d98e5fcd4e7520) ) | |
| 1683 | ROM_LOAD( "de1_obj4.4s", 0x100000, 0x40000, CRC(335f0ea4) SHA1(9ec065d99ad0874b262b372334179a7e7612558e) ) | |
| 1684 | ROM_LOAD( "de1_obj5.4x", 0x140000, 0x40000, CRC(9e22999c) SHA1(02624186c359b5e2c96cd3f0e2cb1598ea36dff7) ) | |
| 1685 | ROM_LOAD( "de1_obj6.2s", 0x180000, 0x40000, CRC(346df4d5) SHA1(edbadb9db93b7f5a3b064c7f6acb77001cdacce2) ) | |
| 1686 | ROM_LOAD( "de1_obj7.2x", 0x1c0000, 0x40000, CRC(9ce325d7) SHA1(de4d788bec14842507ed405244974b4fd4f07515) ) | |
| 1962 | ROM_LOAD( "de1-obj0.5s", 0x000000, 0x40000, CRC(7438bd53) SHA1(7619c4b56d5c466e845eb45e6157dcaf2a03ad94) ) | |
| 1963 | ROM_LOAD( "de1-obj4.4s", 0x040000, 0x40000, CRC(335f0ea4) SHA1(9ec065d99ad0874b262b372334179a7e7612558e) ) | |
| 1964 | ROM_LOAD( "de1-obj1.5x", 0x080000, 0x40000, CRC(45f2334e) SHA1(95f277a4e43d6662ae44d6b69a57f65c72978319) ) | |
| 1965 | ROM_LOAD( "de1-obj5.4x", 0x0c0000, 0x40000, CRC(9e22999c) SHA1(02624186c359b5e2c96cd3f0e2cb1598ea36dff7) ) | |
| 1966 | ROM_LOAD( "de1-obj2.3s", 0x100000, 0x40000, CRC(8f1a542c) SHA1(2cb59713607d8929815a9b28bf2a384b6a6c9db8) ) | |
| 1967 | ROM_LOAD( "de1-obj6.2s", 0x140000, 0x40000, CRC(346df4d5) SHA1(edbadb9db93b7f5a3b064c7f6acb77001cdacce2) ) | |
| 1968 | ROM_LOAD( "de1-obj3.3x", 0x180000, 0x40000, CRC(fc94544c) SHA1(6297445c64784ee253716f6438d98e5fcd4e7520) ) | |
| 1969 | ROM_LOAD( "de1-obj7.2x", 0x1c0000, 0x40000, CRC(9ce325d7) SHA1(de4d788bec14842507ed405244974b4fd4f07515) ) | |
| 1687 | 1970 | |
| 1688 | ROM_REGION16_BE( 0x100000, REGION_USER1, 0 ) | |
| 1689 | ROM_LOAD16_BYTE( "de1_du.3a", 0x00001, 0x80000, CRC(fe65d2ab) SHA1(dbe962dda7efa60357fa3a684a265aaad49df5b5) ) | |
| 1690 | ROM_LOAD16_BYTE( "de1_dl.1a", 0x00000, 0x80000, CRC(9bb37aca) SHA1(7f5dffc95cadcf12f53ff7944920afc25ed3cf68) ) | |
| 1971 | ROM_REGION16_BE( 0x100000, REGION_USER1, 0 ) /* 68k */ | |
| 1972 | ROM_LOAD16_BYTE( "de1-data-u.3a", 0x00000, 0x80000, CRC(fe65d2ab) SHA1(dbe962dda7efa60357fa3a684a265aaad49df5b5) ) | |
| 1973 | ROM_LOAD16_BYTE( "de1-data-l.1a", 0x00001, 0x80000, CRC(9bb37aca) SHA1(7f5dffc95cadcf12f53ff7944920afc25ed3cf68) ) | |
| 1691 | 1974 | |
| 1692 | 1975 | ROM_REGION16_BE( 0xc0000, REGION_USER2, 0 ) /* 3d objects */ |
| 1693 | ROM_LOAD16_BYTE( "de1pt0ub.8j", 0x00000, 0x20000, CRC(3b6b746d) SHA1(40c992ef4cf5187b30aba42c5fe7ce0f8f02bee0) ) | |
| 1694 | ROM_LOAD16_BYTE( "de1pt0lb.8d", 0x00001, 0x20000, CRC(9c5c477e) SHA1(c8ae8a663227d636d35bd5f432d23f05d6695942) ) | |
| 1695 | ROM_LOAD16_BYTE( "de1pt1u.8l", 0x40000, 0x20000, CRC(23bc72a1) SHA1(083e2955ae2f88d1ad461517b47054d64375b46e) ) | |
| 1696 | ROM_LOAD16_BYTE( "de1pt1l.8e", 0x40001, 0x20000, CRC(a05ee081) SHA1(1be4c61ad716abb809856e04d4bb450943706a55) ) | |
| 1697 | ROM_LOAD16_BYTE( "de1pt2u.5n", 0x80000, 0x20000, CRC(10e83d81) SHA1(446fedc3b1e258a39fb9467e5327c9f9a9f1ac3f) ) | |
| 1698 | ROM_LOAD16_BYTE( "de1pt2l.7n", 0x80001, 0x20000, CRC(3339a976) SHA1(c9eb9c04f7b3f2a85e5ab64ffb2fe4fcfb6c494b) ) | |
| 1976 | ROM_LOAD16_BYTE( "de1-pt0-ub.8j", 0x00000, 0x20000, CRC(3b6b746d) SHA1(40c992ef4cf5187b30aba42c5fe7ce0f8f02bee0) ) | |
| 1977 | ROM_LOAD16_BYTE( "de1-pt0-lb.8d", 0x00001, 0x20000, CRC(9c5c477e) SHA1(c8ae8a663227d636d35bd5f432d23f05d6695942) ) | |
| 1978 | ROM_LOAD16_BYTE( "de1-pt1-u.8l", 0x40000, 0x20000, CRC(23bc72a1) SHA1(083e2955ae2f88d1ad461517b47054d64375b46e) ) | |
| 1979 | ROM_LOAD16_BYTE( "de1-pt1-l.8e", 0x40001, 0x20000, CRC(a05ee081) SHA1(1be4c61ad716abb809856e04d4bb450943706a55) ) | |
| 1980 | ROM_LOAD16_BYTE( "de1-pt2-u.5n", 0x80000, 0x20000, CRC(10e83d81) SHA1(446fedc3b1e258a39fb9467e5327c9f9a9f1ac3f) ) | |
| 1981 | ROM_LOAD16_BYTE( "de1-pt2-l.7n", 0x80001, 0x20000, CRC(3339a976) SHA1(c9eb9c04f7b3f2a85e5ab64ffb2fe4fcfb6c494b) ) | |
| 1699 | 1982 | |
| 1700 | 1983 | ROM_REGION( 0x100000, REGION_SOUND1, 0 ) /* sound samples */ |
| 1701 | ROM_LOAD("de1_voi0.12b", 0x00000, 0x40000, CRC(fc44adbd) SHA1(4268bb1f025e47a94212351d1c1cfd0e5029221f) ) | |
| 1702 | ROM_LOAD("de1_voi1.12c", 0x40000, 0x40000, CRC(a71dc55a) SHA1(5e746184db9144ab4e3a97b20195b92b0f56c8cc) ) | |
| 1703 | ROM_LOAD("de1_voi2.12d", 0x80000, 0x40000, CRC(4d32879a) SHA1(eae65f4b98cee9efe4e5dad7298c3717cfb1e6bf) ) | |
| 1704 | ROM_LOAD("de1_voi3.12e", 0xc0000, 0x40000, CRC(e4832d18) SHA1(0460c79d3942aab89a765b0bd8bbddaf19a6d682) ) | |
| 1984 | ROM_LOAD("de1-voi0.12b", 0x00000, 0x40000, CRC(fc44adbd) SHA1(4268bb1f025e47a94212351d1c1cfd0e5029221f) ) | |
| 1985 | ROM_LOAD("de1-voi1.12c", 0x40000, 0x40000, CRC(a71dc55a) SHA1(5e746184db9144ab4e3a97b20195b92b0f56c8cc) ) | |
| 1986 | ROM_LOAD("de1-voi2.12d", 0x80000, 0x40000, CRC(4d32879a) SHA1(eae65f4b98cee9efe4e5dad7298c3717cfb1e6bf) ) | |
| 1987 | ROM_LOAD("de1-voi3.12e", 0xc0000, 0x40000, CRC(e4832d18) SHA1(0460c79d3942aab89a765b0bd8bbddaf19a6d682) ) | |
| 1705 | 1988 | ROM_END |
| 1706 | 1989 | |
| 1707 | 1990 | ROM_START( starblad ) |
| 1708 | 1991 | ROM_REGION( 0x100000, REGION_CPU1, 0 ) /* Master */ |
| 1709 | ROM_LOAD16_BYTE( "st1_mpu.bin", 0x000000, 0x80000, CRC(483a311c) SHA1(dd9416b8d4b0f8b361630e312eac71c113064eae) ) | |
| 1710 | ROM_LOAD16_BYTE( "st1_mpl.bin", 0x000001, 0x80000, CRC(0a4dd661) SHA1(fc2b71a255a8613693c4d1c79ddd57a6d396165a) ) | |
| 1992 | ROM_LOAD16_BYTE( "st1-mp-u.bin", 0x000000, 0x80000, CRC(483a311c) SHA1(dd9416b8d4b0f8b361630e312eac71c113064eae) ) | |
| 1993 | ROM_LOAD16_BYTE( "st1-mp-l.bin", 0x000001, 0x80000, CRC(0a4dd661) SHA1(fc2b71a255a8613693c4d1c79ddd57a6d396165a) ) | |
| 1711 | 1994 | |
| 1712 | ROM_REGION( 0x100000, REGION_CPU2, 0 ) /* Slave */ | |
| 1713 | ROM_LOAD16_BYTE( "st1_spu.bin", 0x000000, 0x40000, CRC(9f9a55db) SHA1(72bf5d6908cc57cc490fa2292b4993d796b2974d) ) | |
| 1714 | ROM_LOAD16_BYTE( "st1_spl.bin", 0x000001, 0x40000, CRC(acbe39c7) SHA1(ca48b7ea619b1caaf590eed33001826ce7ef36d8) ) | |
| 1995 | ROM_REGION( 0x080000, REGION_CPU2, 0 ) /* Slave */ | |
| 1996 | ROM_LOAD16_BYTE( "st1-sp-u.bin", 0x000000, 0x40000, CRC(9f9a55db) SHA1(72bf5d6908cc57cc490fa2292b4993d796b2974d) ) | |
| 1997 | ROM_LOAD16_BYTE( "st1-sp-l.bin", 0x000001, 0x40000, CRC(acbe39c7) SHA1(ca48b7ea619b1caaf590eed33001826ce7ef36d8) ) | |
| 1715 | 1998 | |
| 1716 | 1999 | ROM_REGION( 0x030000, REGION_CPU3, 0 ) /* Sound */ |
| 1717 | ROM_LOAD( "st1snd0.bin", 0x00c000, 0x004000, CRC(c0e934a3) SHA1(678ed6705c6f494d7ecb801a4ef1b123b80979a5) ) | |
| 1718 | ROM_CONTINUE( 0x010000, 0x01c000 ) | |
| 1719 | ROM_RELOAD( 0x010000, 0x020000 ) | |
| 2000 | ROM_LOAD( "st1-snd0.bin", 0x00c000, 0x004000, CRC(c0e934a3) SHA1(678ed6705c6f494d7ecb801a4ef1b123b80979a5) ) | |
| 2001 | ROM_CONTINUE( 0x010000, 0x01c000 ) | |
| 2002 | ROM_RELOAD( 0x010000, 0x020000 ) | |
| 1720 | 2003 | |
| 1721 | 2004 | ROM_REGION( 0x010000, REGION_CPU4, 0 ) /* I/O MCU */ |
| 1722 | 2005 | ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) |
| 1723 | 2006 | ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) |
| 1724 | 2007 | |
| 1725 | ROM_REGION( 0x12000, REGION_CPU5, ROMREGION_ERASE00 ) | |
| 1726 | ROM_REGION( 0x12000, REGION_CPU6, ROMREGION_ERASE00 ) | |
| 2008 | ROM_REGION( 0x20000, REGION_CPU5, 0 ) /* Master DSP */ | |
| 2009 | ROM_LOAD( "c67.bin", 0, 0x2000, CRC(6bd8988e) SHA1(c9ec18d5f88d53976b94444eedc64d5568155958) ) | |
| 2010 | ROM_REGION( 0x20000, REGION_CPU6, 0 ) /* Slave DSP */ | |
| 2011 | ROM_LOAD( "c67.bin", 0, 0x2000, CRC(6bd8988e) SHA1(c9ec18d5f88d53976b94444eedc64d5568155958) ) | |
| 1727 | 2012 | |
| 1728 | 2013 | ROM_REGION( 0x200000, REGION_GFX1, ROMREGION_DISPOSE ) /* sprites */ |
| 1729 | ROM_LOAD( "st1obj0.bin", 0x000000, 0x80000, CRC(5d42c71e) SHA1(f1aa2bb31bbbcdcac8e94334b1c78238cac1a0e7) ) | |
| 1730 | ROM_LOAD( "st1obj1.bin", 0x080000, 0x80000, CRC(c98011ad) SHA1(bc34c21428e0ef5887051c0eb0fdef5397823a82) ) | |
| 1731 | ROM_LOAD( "st1obj2.bin", 0x100000, 0x80000, CRC(6cf5b608) SHA1(c8537fbe97677c4c8a365b1cf86c4645db7a7d6b) ) | |
| 1732 | ROM_LOAD( "st1obj3.bin", 0x180000, 0x80000, CRC(cdc195bb) SHA1(91443917a6982c286b6f15381d441d061aefb138) ) | |
| 2014 | ROM_LOAD( "st1-obj0.bin", 0x000000, 0x80000, CRC(5d42c71e) SHA1(f1aa2bb31bbbcdcac8e94334b1c78238cac1a0e7) ) | |
| 2015 | ROM_LOAD( "st1-obj1.bin", 0x080000, 0x80000, CRC(c98011ad) SHA1(bc34c21428e0ef5887051c0eb0fdef5397823a82) ) | |
| 2016 | ROM_LOAD( "st1-obj2.bin", 0x100000, 0x80000, CRC(6cf5b608) SHA1(c8537fbe97677c4c8a365b1cf86c4645db7a7d6b) ) | |
| 2017 | ROM_LOAD( "st1-obj3.bin", 0x180000, 0x80000, CRC(cdc195bb) SHA1(91443917a6982c286b6f15381d441d061aefb138) ) | |
| 1733 | 2018 | |
| 1734 | ROM_REGION16_BE( 0x100000, REGION_USER1, 0 ) | |
| 1735 | ROM_LOAD16_BYTE( "st1_du.bin", 0x000000, 0x20000, CRC(2433e911) SHA1(95f5f00d3bacda4996e055a443311fb9f9a5fe2f) ) | |
| 1736 | ROM_LOAD16_BYTE( "st1_dl.bin", 0x000001, 0x20000, CRC(4a2cc252) SHA1(d9da9992bac878f8a1f5e84cc3c6d457b4705e8f) ) | |
| 2019 | ROM_REGION16_BE( 0x40000, REGION_USER1, 0 ) | |
| 2020 | ROM_LOAD16_BYTE( "st1-data-u.bin", 0x000000, 0x20000, CRC(2433e911) SHA1(95f5f00d3bacda4996e055a443311fb9f9a5fe2f) ) | |
| 2021 | ROM_LOAD16_BYTE( "st1-data-l.bin", 0x000001, 0x20000, CRC(4a2cc252) SHA1(d9da9992bac878f8a1f5e84cc3c6d457b4705e8f) ) | |
| 1737 | 2022 | |
| 1738 | 2023 | ROM_REGION32_BE( 0x400000, REGION_USER2, ROMREGION_ERASE ) /* 24bit signed point data */ |
| 1739 | ROM_LOAD32_BYTE( "st1pt0h.bin", 0x000001, 0x80000, CRC(84eb355f) SHA1(89a248b8be2e0afcee29ba4c4c9cca65d5fb246a) ) | |
| 1740 | ROM_LOAD32_BYTE( "st1pt0u.bin", 0x000002, 0x80000, CRC(1956cd0a) SHA1(7d21b3a59f742694de472c545a1f30c3d92e3390) ) | |
| 1741 | ROM_LOAD32_BYTE( "st1pt0l.bin", 0x000003, 0x80000, CRC(ff577049) SHA1(1e1595174094e88d5788753d05ce296c1f7eca75) ) | |
| 2024 | ROM_LOAD32_BYTE( "st1-pt0-h.bin", 0x000001, 0x80000, CRC(84eb355f) SHA1(89a248b8be2e0afcee29ba4c4c9cca65d5fb246a) ) | |
| 2025 | ROM_LOAD32_BYTE( "st1-pt0-u.bin", 0x000002, 0x80000, CRC(1956cd0a) SHA1(7d21b3a59f742694de472c545a1f30c3d92e3390) ) | |
| 2026 | ROM_LOAD32_BYTE( "st1-pt0-l.bin", 0x000003, 0x80000, CRC(ff577049) SHA1(1e1595174094e88d5788753d05ce296c1f7eca75) ) | |
| 2027 | ROM_LOAD32_BYTE( "st1-pt1-h.bin", 0x200001, 0x80000, CRC(96b1bd7d) SHA1(55da7896dda2aa4c35501a55c8605a065b02aa17) ) | |
| 2028 | ROM_LOAD32_BYTE( "st1-pt1-u.bin", 0x200002, 0x80000, CRC(ecf21047) SHA1(ddb13f5a2e7d192f0662fa420b49f89e1e991e66) ) | |
| 2029 | ROM_LOAD32_BYTE( "st1-pt1-l.bin", 0x200003, 0x80000, CRC(01cb0407) SHA1(4b58860bbc353de8b4b8e83d12b919d9386846e8) ) | |
| 1742 | 2030 | |
| 1743 | ROM_LOAD32_BYTE( "st1pt1h.bin", 0x200001, 0x80000, CRC(96b1bd7d) SHA1(55da7896dda2aa4c35501a55c8605a065b02aa17) ) // bad? | |
| 1744 | ROM_LOAD32_BYTE( "st1pt1u.bin", 0x200002, 0x80000, CRC(ecf21047) SHA1(ddb13f5a2e7d192f0662fa420b49f89e1e991e66) ) | |
| 1745 | ROM_LOAD32_BYTE( "st1pt1l.bin", 0x200003, 0x80000, CRC(01cb0407) SHA1(4b58860bbc353de8b4b8e83d12b919d9386846e8) ) | |
| 1746 | ||
| 1747 | 2031 | ROM_REGION( 0x200000, REGION_SOUND1, 0 ) /* sound samples */ |
| 1748 | ROM_LOAD("st1voi0.bin",0x000000,0x80000,CRC(5b3d43a9) SHA1(cdc04f19dc91dca9fa88ba0c2fca72aa195a3694) ) | |
| 1749 | ROM_LOAD("st1voi1.bin",0x080000,0x80000,CRC(413e6181) SHA1(e827ec11f5755606affd2635718512aeac9354da) ) | |
| 1750 | ROM_LOAD("st1voi2.bin",0x100000,0x80000,CRC(067d0720) SHA1(a853b2d43027a46c5e707fc677afdaae00f450c7) ) | |
| 1751 | ROM_LOAD("st1voi3.bin",0x180000,0x80000,CRC(8b5aa45f) SHA1(e1214e639200758ad2045bde0368a2d500c1b84a) ) | |
| 2032 | ROM_LOAD("st1-voi0.bin",0x000000,0x80000,CRC(5b3d43a9) SHA1(cdc04f19dc91dca9fa88ba0c2fca72aa195a3694) ) | |
| 2033 | ROM_LOAD("st1-voi1.bin",0x080000,0x80000,CRC(413e6181) SHA1(e827ec11f5755606affd2635718512aeac9354da) ) | |
| 2034 | ROM_LOAD("st1-voi2.bin",0x100000,0x80000,CRC(067d0720) SHA1(a853b2d43027a46c5e707fc677afdaae00f450c7) ) | |
| 2035 | ROM_LOAD("st1-voi3.bin",0x180000,0x80000,CRC(8b5aa45f) SHA1(e1214e639200758ad2045bde0368a2d500c1b84a) ) | |
| 1752 | 2036 | ROM_END |
| 1753 | 2037 | |
| 1754 | 2038 | ROM_START( solvalou ) |
| 1755 | 2039 | ROM_REGION( 0x100000, REGION_CPU1, 0 ) /* Master */ |
| 1756 | ROM_LOAD16_BYTE( "sv1mpu.bin", 0x000000, 0x20000, CRC(b6f92762) SHA1(d177328b3da2ab0580e101478142bc8c373d6140) ) | |
| 1757 | ROM_LOAD16_BYTE( "sv1mpl.bin", 0x000001, 0x20000, CRC(28c54c42) SHA1(32fcca2eb4bb8ba8c2587b03d3cf59f072f7fac5) ) | |
| 2040 | ROM_LOAD16_BYTE( "sv1-mp-u.bin", 0x000000, 0x20000, CRC(b6f92762) SHA1(d177328b3da2ab0580e101478142bc8c373d6140) ) | |
| 2041 | ROM_LOAD16_BYTE( "sv1-mp-l.bin", 0x000001, 0x20000, CRC(28c54c42) SHA1(32fcca2eb4bb8ba8c2587b03d3cf59f072f7fac5) ) | |
| 1758 | 2042 | |
| 1759 | ROM_REGION( 0x100000, REGION_CPU2, 0 ) /* Slave */ | |
| 1760 | ROM_LOAD16_BYTE( "sv1spu.bin", 0x000000, 0x20000, CRC(ebd4bf82) SHA1(67946360d680a675abcb3c131bac0502b2455573) ) | |
| 1761 | ROM_LOAD16_BYTE( "sv1spl.bin", 0x000001, 0x20000, CRC(7acab679) SHA1(764297c9601be99dbbffb75bbc6fe4a40ea38529) ) | |
| 2043 | ROM_REGION( 0x80000, REGION_CPU2, 0 ) /* Slave */ | |
| 2044 | ROM_LOAD16_BYTE( "sv1-sp-u.bin", 0x000000, 0x20000, CRC(ebd4bf82) SHA1(67946360d680a675abcb3c131bac0502b2455573) ) | |
| 2045 | ROM_LOAD16_BYTE( "sv1-sp-l.bin", 0x000001, 0x20000, CRC(7acab679) SHA1(764297c9601be99dbbffb75bbc6fe4a40ea38529) ) | |
| 1762 | 2046 | |
| 1763 | 2047 | ROM_REGION( 0x030000, REGION_CPU3, 0 ) /* Sound */ |
| 1764 | ROM_LOAD( "sv1snd0.bin", 0x00c000, 0x004000, CRC(5e007864) SHA1(94da2d51544c6127056beaa251353038646da15f) ) | |
| 1765 | ROM_CONTINUE( 0x010000, 0x01c000 ) | |
| 1766 | ROM_RELOAD( 0x010000, 0x020000 ) | |
| 2048 | ROM_LOAD( "sv1-snd0.bin", 0x00c000, 0x004000, CRC(5e007864) SHA1(94da2d51544c6127056beaa251353038646da15f) ) | |
| 2049 | ROM_CONTINUE( 0x010000, 0x01c000 ) | |
| 2050 | ROM_RELOAD( 0x010000, 0x020000 ) | |
| 1767 | 2051 | |
| 1768 | 2052 | ROM_REGION( 0x010000, REGION_CPU4, 0 ) /* I/O MCU */ |
| 1769 | 2053 | ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) |
| 1770 | 2054 | ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) |
| 1771 | 2055 | |
| 1772 | ROM_REGION( 0x12000, REGION_CPU5, ROMREGION_ERASE00 ) | |
| 1773 | ROM_REGION( 0x12000, REGION_CPU6, ROMREGION_ERASE00 ) | |
| 2056 | ROM_REGION( 0x20000, REGION_CPU5, 0 ) /* Master DSP */ | |
| 2057 | ROM_LOAD( "c67.bin", 0, 0x2000, CRC(6bd8988e) SHA1(c9ec18d5f88d53976b94444eedc64d5568155958) ) | |
| 2058 | ROM_REGION( 0x20000, REGION_CPU6, 0 ) /* Slave DSP */ | |
| 2059 | ROM_LOAD( "c67.bin", 0, 0x2000, CRC(6bd8988e) SHA1(c9ec18d5f88d53976b94444eedc64d5568155958) ) | |
| 1774 | 2060 | |
| 1775 | 2061 | ROM_REGION( 0x400000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 1776 | ROM_LOAD( "sv1obj0.bin", 0x000000, 0x80000, CRC(773798bb) SHA1(51ab76c95030bab834f1a74ae677b2f0afc18c52) ) | |
| 1777 | ROM_LOAD( "sv1obj4.bin", 0x080000, 0x80000, CRC(33a008a7) SHA1(4959a0ac24ad64f1367e2d8d63d39a0273c60f3e) ) | |
| 1778 | ROM_LOAD( "sv1obj1.bin", 0x100000, 0x80000, CRC(a36d9e79) SHA1(928d9995e97ee7509e23e6cc64f5e7bfb5c02d42) ) | |
| 1779 | ROM_LOAD( "sv1obj5.bin", 0x180000, 0x80000, CRC(31551245) SHA1(385452ea4830c466263ad5241313ac850dfef756) ) | |
| 1780 | ROM_LOAD( "sv1obj2.bin", 0x200000, 0x80000, CRC(c8672b8a) SHA1(8da037b27d2c2b178aab202781f162371458f788) ) | |
| 1781 | ROM_LOAD( "sv1obj6.bin", 0x280000, 0x80000, CRC(fe319530) SHA1(8f7e46c8f0b86c7515f6d763b795ce07d11c77bc) ) | |
| 1782 | ROM_LOAD( "sv1obj3.bin", 0x300000, 0x80000, CRC(293ef1c5) SHA1(f677883bfec16bbaeb0a01ac565d0e6cac679174) ) | |
| 1783 | ROM_LOAD( "sv1obj7.bin", 0x380000, 0x80000, CRC(95ed6dcb) SHA1(931706ce3fea630823ce0c79febec5eec0cc623d) ) | |
| 2062 | ROM_LOAD( "sv1-obj0.bin", 0x000000, 0x80000, CRC(773798bb) SHA1(51ab76c95030bab834f1a74ae677b2f0afc18c52) ) | |
| 2063 | ROM_LOAD( "sv1-obj4.bin", 0x080000, 0x80000, CRC(33a008a7) SHA1(4959a0ac24ad64f1367e2d8d63d39a0273c60f3e) ) | |
| 2064 | ROM_LOAD( "sv1-obj1.bin", 0x100000, 0x80000, CRC(a36d9e79) SHA1(928d9995e97ee7509e23e6cc64f5e7bfb5c02d42) ) | |
| 2065 | ROM_LOAD( "sv1-obj5.bin", 0x180000, 0x80000, CRC(31551245) SHA1(385452ea4830c466263ad5241313ac850dfef756) ) | |
| 2066 | ROM_LOAD( "sv1-obj2.bin", 0x200000, 0x80000, CRC(c8672b8a) SHA1(8da037b27d2c2b178aab202781f162371458f788) ) | |
| 2067 | ROM_LOAD( "sv1-obj6.bin", 0x280000, 0x80000, CRC(fe319530) SHA1(8f7e46c8f0b86c7515f6d763b795ce07d11c77bc) ) | |
| 2068 | ROM_LOAD( "sv1-obj3.bin", 0x300000, 0x80000, CRC(293ef1c5) SHA1(f677883bfec16bbaeb0a01ac565d0e6cac679174) ) | |
| 2069 | ROM_LOAD( "sv1-obj7.bin", 0x380000, 0x80000, CRC(95ed6dcb) SHA1(931706ce3fea630823ce0c79febec5eec0cc623d) ) | |
| 1784 | 2070 | |
| 1785 | 2071 | ROM_REGION16_BE( 0x100000, REGION_USER1, 0 ) |
| 1786 | ROM_LOAD16_BYTE( "sv1du.bin", 0x000000, 0x80000, CRC(2e561996) SHA1(982158481e5649f21d5c2816fdc80cb725ed1419) ) | |
| 1787 | ROM_LOAD16_BYTE( "sv1dl.bin", 0x000001, 0x80000, CRC(495fb8dd) SHA1(813d1da4109652008d72b3bdb03032efc5c0c2d5) ) | |
| 2072 | ROM_LOAD16_BYTE( "sv1-data-u.bin", 0x000000, 0x80000, CRC(2e561996) SHA1(982158481e5649f21d5c2816fdc80cb725ed1419) ) | |
| 2073 | ROM_LOAD16_BYTE( "sv1-data-l.bin", 0x000001, 0x80000, CRC(495fb8dd) SHA1(813d1da4109652008d72b3bdb03032efc5c0c2d5) ) | |
| 1788 | 2074 | |
| 1789 | 2075 | ROM_REGION32_BE( 0x400000, REGION_USER2, ROMREGION_ERASE ) /* 24bit signed point data */ |
| 1790 | ROM_LOAD32_BYTE( "sv1pt0h.bin", 0x000001, 0x80000, CRC(3be21115) SHA1(c9f30353c1216f64199f87cd34e787efd728e739) ) /* most significant */ | |
| 1791 | ROM_LOAD32_BYTE( "sv1pt0u.bin", 0x000002, 0x80000, CRC(4aacfc42) SHA1(f0e179e057183b41744ca429764f44306f0ce9bf) ) | |
| 1792 | ROM_LOAD32_BYTE( "sv1pt0l.bin", 0x000003, 0x80000, CRC(6a4dddff) SHA1(9ed182d21d328c6a684ee6658a9dfcf3f3dd8646) ) /* least significant */ | |
| 2076 | ROM_LOAD32_BYTE( "sv1-pt0-h.bin", 0x000001, 0x80000, CRC(3be21115) SHA1(c9f30353c1216f64199f87cd34e787efd728e739) ) /* most significant */ | |
| 2077 | ROM_LOAD32_BYTE( "sv1-pt0-u.bin", 0x000002, 0x80000, CRC(4aacfc42) SHA1(f0e179e057183b41744ca429764f44306f0ce9bf) ) | |
| 2078 | ROM_LOAD32_BYTE( "sv1-pt0-l.bin", 0x000003, 0x80000, CRC(6a4dddff) SHA1(9ed182d21d328c6a684ee6658a9dfcf3f3dd8646) ) /* least significant */ | |
| 1793 | 2079 | |
| 1794 | 2080 | ROM_REGION( 0x200000, REGION_SOUND1, 0 ) /* sound samples */ |
| 1795 | ROM_LOAD("sv1voi0.bin",0x000000,0x80000,CRC(7f61bbcf) SHA1(b3b7e66e24d9cb16ebd139237c1e51f5d60c1585) ) | |
| 1796 | ROM_LOAD("sv1voi1.bin",0x080000,0x80000,CRC(c732e66c) SHA1(14e75dd9bea4055f85eb2bcbf69cf6695a3f7ec4) ) | |
| 1797 | ROM_LOAD("sv1voi2.bin",0x100000,0x80000,CRC(51076298) SHA1(ec52c9ae3029118f3ea3732948d6de28f5fba561) ) | |
| 1798 | ROM_LOAD("sv1voi3.bin",0x180000,0x80000,CRC(33085ff3) SHA1(0a30b91618c250a5e7bd896a8ceeb3d16da178a9) ) | |
| 2081 | ROM_LOAD("sv1-voi0.bin",0x000000,0x80000,CRC(7f61bbcf) SHA1(b3b7e66e24d9cb16ebd139237c1e51f5d60c1585) ) | |
| 2082 | ROM_LOAD("sv1-voi1.bin",0x080000,0x80000,CRC(c732e66c) SHA1(14e75dd9bea4055f85eb2bcbf69cf6695a3f7ec4) ) | |
| 2083 | ROM_LOAD("sv1-voi2.bin",0x100000,0x80000,CRC(51076298) SHA1(ec52c9ae3029118f3ea3732948d6de28f5fba561) ) | |
| 2084 | ROM_LOAD("sv1-voi3.bin",0x180000,0x80000,CRC(33085ff3) SHA1(0a30b91618c250a5e7bd896a8ceeb3d16da178a9) ) | |
| 1799 | 2085 | ROM_END |
| 1800 | 2086 | |
| 1801 | 2087 | ROM_START( winrun ) |
| 1802 | ROM_REGION( 0x100000, REGION_CPU1, 0 ) /* 68k code */ | |
| 1803 | ROM_LOAD16_BYTE( "sg1mpub.3k", 0x000000, 0x20000, CRC(7f9b855a) SHA1(6d39a3a9959dbcd0047dbaab0fcd68adc81f5508) ) | |
| 1804 | ROM_LOAD16_BYTE( "sg1mplb.1k", 0x000001, 0x20000, CRC(a45e8543) SHA1(f9e583a988e4661026ee7873a48d078225778df3) ) | |
| 2088 | ROM_REGION( 0x40000, REGION_CPU1, 0 ) /* 68k code */ | |
| 2089 | ROM_LOAD16_BYTE( "sg1-mp-ub.3k", 0x000000, 0x20000, CRC(7f9b855a) SHA1(6d39a3a9959dbcd0047dbaab0fcd68adc81f5508) ) | |
| 2090 | ROM_LOAD16_BYTE( "sg1-mp-lb.1k", 0x000001, 0x20000, CRC(a45e8543) SHA1(f9e583a988e4661026ee7873a48d078225778df3) ) | |
| 1805 | 2091 | |
| 1806 | 2092 | ROM_REGION( 0x40000, REGION_CPU2, 0 ) /* 68k code */ |
| 1807 | ROM_LOAD16_BYTE( "sg1spu.6b", 0x000000, 0x20000, CRC(7c9c3a3f) SHA1(cacb45c9111ac66c6e60b7a0cacd8bf47fd00752) ) | |
| 1808 | ROM_LOAD16_BYTE( "sg1spl.4b", 0x000001, 0x20000, CRC(5068fc5d) SHA1(7f6e80f74985959509d824318a4a7ff2b11953da) ) | |
| 2093 | ROM_LOAD16_BYTE( "sg1-sp-u.6b", 0x000000, 0x20000, CRC(7c9c3a3f) SHA1(cacb45c9111ac66c6e60b7a0cacd8bf47fd00752) ) | |
| 2094 | ROM_LOAD16_BYTE( "sg1-sp-l.4b", 0x000001, 0x20000, CRC(5068fc5d) SHA1(7f6e80f74985959509d824318a4a7ff2b11953da) ) | |
| 1809 | 2095 | |
| 1810 | 2096 | ROM_REGION( 0x30000, REGION_CPU3, 0 ) /* Sound */ |
| 1811 | ROM_LOAD( "sg1snd0.7c", 0x00c000, 0x004000, CRC(de04b794) SHA1(191f4d79ac2375d7060f3d83ec753185e92f28ea) ) | |
| 1812 | ROM_CONTINUE( 0x010000, 0x01c000 ) | |
| 1813 | ROM_RELOAD( 0x010000, 0x020000 ) | |
| 2097 | ROM_LOAD( "sg1-snd0.7c", 0x00c000, 0x004000, CRC(de04b794) SHA1(191f4d79ac2375d7060f3d83ec753185e92f28ea) ) | |
| 2098 | ROM_CONTINUE( 0x010000, 0x01c000 ) | |
| 2099 | ROM_RELOAD( 0x010000, 0x020000 ) | |
| 1814 | 2100 | |
| 1815 | 2101 | ROM_REGION( 0x10000, REGION_CPU4, 0 ) /* I/O MCU */ |
| 1816 | 2102 | ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) |
| 1817 | 2103 | ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) |
| 1818 | 2104 | |
| 1819 | ROM_REGION( 0x80000, REGION_CPU5, 0 ) /* 68k code */ | |
| 1820 | ROM_LOAD16_BYTE( "sg1gp0u.1j", 0x00000, 0x20000, CRC(475da78a) SHA1(6e69bcc6caf2e3cd28fed75796c8992e754f9323) ) | |
| 1821 | ROM_LOAD16_BYTE( "sg1gp0l.3j", 0x00001, 0x20000, CRC(580479bf) SHA1(ba682190cba0d3cdc49aa4937c898ba7ed2a25f5) ) | |
| 1822 | ROM_LOAD16_BYTE( "sg1gp1u.1l", 0x40000, 0x20000, CRC(f5f2e927) SHA1(ebf709f16f01f1a634de9121454537cda74e891b) ) | |
| 1823 | ROM_LOAD16_BYTE( "sg1gp1l.3l", 0x40001, 0x20000, CRC(17ed90a5) SHA1(386bdcb11dcbe400f5be1fe4a7418158b46e50ef) ) | |
| 2105 | ROM_REGION( 0x20000, REGION_CPU5, 0 ) /* DSP */ | |
| 1824 | 2106 | |
| 1825 | ROM_REGION16_BE( 0x80000, REGION_USER1, 0 ) | |
| 1826 | ROM_LOAD16_BYTE( "sg1d0u.3a", 0x00001, 0x20000, CRC(1dde2ac2) SHA1(2d20a434561c04e48b52a2137a8c9047e17c1013) ) | |
| 1827 | ROM_LOAD16_BYTE( "sg1d0l.1a", 0x00000, 0x20000, CRC(2afeb77e) SHA1(ac1552f6e2788158d3477b6a0981d001d6cbdf13) ) | |
| 1828 | ROM_LOAD16_BYTE( "sg1d1u.3b", 0x40001, 0x20000, CRC(5664b09e) SHA1(10c1c29614eee2cffcfd69085f0450d81ba2e25f) ) | |
| 1829 | ROM_LOAD16_BYTE( "sg1d1l.1b", 0x40000, 0x20000, CRC(2dbc7de4) SHA1(824304c95942c7296f8e8dcf8ee7e22bf56154b1) ) | |
| 2107 | ROM_REGION( 0x80000, REGION_CPU6, 0 ) /* 68k code */ | |
| 2108 | ROM_LOAD16_BYTE( "sg1-gp0-u.1j", 0x00000, 0x20000, CRC(475da78a) SHA1(6e69bcc6caf2e3cd28fed75796c8992e754f9323) ) | |
| 2109 | ROM_LOAD16_BYTE( "sg1-gp0-l.3j", 0x00001, 0x20000, CRC(580479bf) SHA1(ba682190cba0d3cdc49aa4937c898ba7ed2a25f5) ) | |
| 2110 | ROM_LOAD16_BYTE( "sg1-gp1-u.1l", 0x40000, 0x20000, CRC(f5f2e927) SHA1(ebf709f16f01f1a634de9121454537cda74e891b) ) | |
| 2111 | ROM_LOAD16_BYTE( "sg1-gp1-l.3l", 0x40001, 0x20000, CRC(17ed90a5) SHA1(386bdcb11dcbe400f5be1fe4a7418158b46e50ef) ) | |
| 1830 | 2112 | |
| 2113 | ROM_REGION16_BE( 0x80000, REGION_USER1, 0 ) /* 68k */ | |
| 2114 | ROM_LOAD16_BYTE( "sg1-data0-u.3a", 0x00000, 0x20000, CRC(1dde2ac2) SHA1(2d20a434561c04e48b52a2137a8c9047e17c1013) ) | |
| 2115 | ROM_LOAD16_BYTE( "sg1-data0-l.1a", 0x00001, 0x20000, CRC(2afeb77e) SHA1(ac1552f6e2788158d3477b6a0981d001d6cbdf13) ) | |
| 2116 | ROM_LOAD16_BYTE( "sg1-data1-u.3b", 0x40000, 0x20000, CRC(5664b09e) SHA1(10c1c29614eee2cffcfd69085f0450d81ba2e25f) ) | |
| 2117 | ROM_LOAD16_BYTE( "sg1-data1-l.1b", 0x40001, 0x20000, CRC(2dbc7de4) SHA1(824304c95942c7296f8e8dcf8ee7e22bf56154b1) ) | |
| 2118 | ||
| 1831 | 2119 | ROM_REGION16_BE( 0x80000, REGION_USER2, 0 ) /* 3d objects */ |
| 1832 | ROM_LOAD16_BYTE( "sg1pt0u.8j", 0x00001, 0x20000, CRC(160c3634) SHA1(485d20d6cc459f17d77682201dee07bdf76bf343) ) | |
| 1833 | ROM_LOAD16_BYTE( "sg1pt0l.8d", 0x00000, 0x20000, CRC(b5a665bf) SHA1(5af6ec492f31395c0492e14590b025b120067b8d) ) | |
| 1834 | ROM_LOAD16_BYTE( "sg1pt1u.8l", 0x40001, 0x20000, CRC(b63d3006) SHA1(78e78619766b0fd91b1e830cfb066495d6773981) ) | |
| 1835 | ROM_LOAD16_BYTE( "sg1pt1l.8e", 0x40000, 0x20000, CRC(6385e325) SHA1(d50bceb2e9c0d0a38d7b0f918f99c482649e260d) ) | |
| 2120 | ROM_LOAD16_BYTE( "sg1-pt0-u.8j", 0x00000, 0x20000, CRC(160c3634) SHA1(485d20d6cc459f17d77682201dee07bdf76bf343) ) | |
| 2121 | ROM_LOAD16_BYTE( "sg1-pt0-l.8d", 0x00001, 0x20000, CRC(b5a665bf) SHA1(5af6ec492f31395c0492e14590b025b120067b8d) ) | |
| 2122 | ROM_LOAD16_BYTE( "sg1-pt1-u.8l", 0x40000, 0x20000, CRC(b63d3006) SHA1(78e78619766b0fd91b1e830cfb066495d6773981) ) | |
| 2123 | ROM_LOAD16_BYTE( "sg1-pt1-l.8e", 0x40001, 0x20000, CRC(6385e325) SHA1(d50bceb2e9c0d0a38d7b0f918f99c482649e260d) ) | |
| 1836 | 2124 | |
| 1837 | 2125 | ROM_REGION16_BE( 0x100000, REGION_USER3, 0 ) /* bitmapped graphics */ |
| 1838 | ROM_LOAD16_BYTE( "sg1gd0u.1p", 0x00001, 0x40000, CRC(7838fcde) SHA1(45e31269eed1999b73c41c2f5d2c5bfbbdaf23df) ) | |
| 1839 | ROM_LOAD16_BYTE( "sg1gd0l.3p", 0x00000, 0x40000, CRC(4bd02b9a) SHA1(b2fdfd1c1325864aaad87f5358ab9bbdd79ff6ae) ) | |
| 1840 | ROM_LOAD16_BYTE( "sg1gd1u.1s", 0x80001, 0x40000, CRC(271db29b) SHA1(8b35fcf273b9aec28d4c606c41c0626dded697e1) ) | |
| 1841 | ROM_LOAD16_BYTE( "sg1gd1l.3s", 0x80000, 0x40000, CRC(a6c4da96) SHA1(377dbf21a1bede01de16708c96c112abab4417ce) ) | |
| 2126 | ROM_LOAD16_BYTE( "sg1-gd0-u.1p", 0x00000, 0x40000, CRC(7838fcde) SHA1(45e31269eed1999b73c41c2f5d2c5bfbbdaf23df) ) | |
| 2127 | ROM_LOAD16_BYTE( "sg1-gd0-l.3p", 0x00001, 0x40000, CRC(4bd02b9a) SHA1(b2fdfd1c1325864aaad87f5358ab9bbdd79ff6ae) ) | |
| 2128 | ROM_LOAD16_BYTE( "sg1-gd1-u.1s", 0x80000, 0x40000, CRC(271db29b) SHA1(8b35fcf273b9aec28d4c606c41c0626dded697e1) ) | |
| 2129 | ROM_LOAD16_BYTE( "sg1-gd1-l.3s", 0x80001, 0x40000, CRC(a6c4da96) SHA1(377dbf21a1bede01de16708c96c112abab4417ce) ) | |
| 1842 | 2130 | |
| 1843 | 2131 | ROM_REGION( 0x200000, REGION_SOUND1, 0 ) /* sound samples */ |
| 1844 | ROM_LOAD("sgvoi-1.11c",0x000000,0x80000,CRC(7dcccb31) SHA1(4441b37691434b13eae5dee2d04dc12a56b04d2a) ) | |
| 1845 | ROM_LOAD("sgboi-3.11e",0x080000,0x80000,CRC(a198141c) SHA1(b4ca352e6aedd9d7a7e5e39e840f1d3a7145900e) ) | |
| 2132 | ROM_LOAD("sg-voi-1.11c",0x000000,0x80000,CRC(7dcccb31) SHA1(4441b37691434b13eae5dee2d04dc12a56b04d2a) ) | |
| 2133 | ROM_LOAD("sg-voi-3.11e",0x080000,0x80000,CRC(a198141c) SHA1(b4ca352e6aedd9d7a7e5e39e840f1d3a7145900e) ) | |
| 1846 | 2134 | ROM_END |
| 1847 | 2135 | |
| 1848 | 2136 | ROM_START( winrun91 ) |
| 1849 | ROM_REGION( 0x | |
| 2137 | ROM_REGION( 0x4 | |
| 1850 | 2138 | ROM_LOAD16_BYTE( "mpu.3k", 0x000000, 0x20000, CRC(80a0e5be) SHA1(6613b95e164c2032ea9043e4161130c6b3262492) ) |
| 1851 | 2139 | ROM_LOAD16_BYTE( "mpl.1k", 0x000001, 0x20000, CRC(942172d8) SHA1(21d8dfd2165b5ceb0399fdb53d9d0f51f1255803) ) |
| 1852 | 2140 | |
| r1037 | r1038 | |
| 1855 | 2143 | ROM_LOAD16_BYTE( "spl.4b", 0x000001, 0x20000, CRC(288799e2) SHA1(2c4bf0cf9c71458fff4dd77e426a76685d9e1bab) ) |
| 1856 | 2144 | |
| 1857 | 2145 | ROM_REGION( 0x30000, REGION_CPU3, 0 ) /* Sound */ |
| 1858 | ROM_LOAD( "snd0.7c", 0x00c000, 0x004000, CRC(6a321e1e) SHA1(b2e77cac4ed7609593fa5a462c9d78526451e477) ) | |
| 1859 | ROM_CONTINUE( 0x010000, 0x01c000 ) | |
| 1860 | ROM_RELOAD( 0x010000, 0x020000 ) | |
| 2146 | ROM_LOAD( "snd0.7c", 0x00c000, 0x004000, CRC(6a321e1e) SHA1(b2e77cac4ed7609593fa5a462c9d78526451e477) ) | |
| 2147 | ROM_CONTINUE( 0x010000, 0x01c000 ) | |
| 2148 | ROM_RELOAD( 0x010000, 0x020000 ) | |
| 1861 | 2149 | |
| 1862 | 2150 | ROM_REGION( 0x10000, REGION_CPU4, 0 ) /* I/O MCU */ |
| 1863 | 2151 | ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) |
| 1864 | 2152 | ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) |
| 1865 | 2153 | |
| 1866 | ROM_REGION( 0x80000, REGION_CPU5, 0 ) /* 68k code */ | |
| 2154 | ROM_REGION( 0x20000, REGION_CPU5, 0 ) /* DSP */ | |
| 2155 | ||
| 2156 | ROM_REGION( 0x80000, REGION_CPU6, 0 ) /* 68k code */ | |
| 1867 | 2157 | ROM_LOAD16_BYTE( "gp0u.1j", 0x00000, 0x20000, CRC(f5469a29) SHA1(38b6ea1fbe482b69fbb0e2f44f44a0ca2a49f6bc) ) |
| 1868 | 2158 | ROM_LOAD16_BYTE( "gp0l.3j", 0x00001, 0x20000, CRC(5c18f596) SHA1(215cbda62254e31b4ff6431623384df1639bfdb7) ) |
| 1869 | 2159 | ROM_LOAD16_BYTE( "gp1u.1l", 0x40000, 0x20000, CRC(146ab6b8) SHA1(aefb89585bf311f8d33f18298fea326ef1f19f1e) ) |
| 1870 | 2160 | ROM_LOAD16_BYTE( "gp1l.3l", 0x40001, 0x20000, CRC(96c2463c) SHA1(e43db580e7b454af04c22e894108fbb56da0eeb5) ) |
| 1871 | 2161 | |
| 1872 | 2162 | ROM_REGION16_BE( 0x80000, REGION_USER1, 0 ) |
| 1873 | ROM_LOAD16_BYTE( "d0u.3a", 0x00001, 0x20000, CRC(dcb27da5) SHA1(ecd72397d10313fe8dcb8589bdc5d88d4298b26c) ) | |
| 1874 | ROM_LOAD16_BYTE( "d0l.1a", 0x00000, 0x20000, CRC(f692a8f3) SHA1(4c29f60400b18d9ef0425de149618da6cf762ca4) ) | |
| 1875 | ROM_LOAD16_BYTE( "d1u.3b", 0x40001, 0x20000, CRC(ac2afd1b) SHA1(510eb41931164b086c85ba0a86d6f10b88f5e534) ) | |
| 1876 | ROM_LOAD16_BYTE( "d1l.1b", 0x40000, 0x20000, CRC(ebb51af1) SHA1(87b7b64ee662bf652add1e1199e42391d0e2f7e8) ) | |
| 2163 | ROM_LOAD16_BYTE( "d0u.3a", 0x00000, 0x20000, CRC(dcb27da5) SHA1(ecd72397d10313fe8dcb8589bdc5d88d4298b26c) ) | |
| 2164 | ROM_LOAD16_BYTE( "d0l.1a", 0x00001, 0x20000, CRC(f692a8f3) SHA1(4c29f60400b18d9ef0425de149618da6cf762ca4) ) | |
| 2165 | ROM_LOAD16_BYTE( "d1u.3b", 0x40000, 0x20000, CRC(ac2afd1b) SHA1(510eb41931164b086c85ba0a86d6f10b88f5e534) ) | |
| 2166 | ROM_LOAD16_BYTE( "d1l.1b", 0x40001, 0x20000, CRC(ebb51af1) SHA1(87b7b64ee662bf652add1e1199e42391d0e2f7e8) ) | |
| 1877 | 2167 | |
| 1878 | ROM_REGION16_BE( 0x80000, REGION_USER2, 0 ) /* 3d objects */ | |
| 1879 | ROM_LOAD16_BYTE( "pt0u.8j", 0x00001, 0x20000, CRC(abf512a6) SHA1(e86288039d6c4dedfa95b11cb7e4b87637f90c09) ) | |
| 1880 | ROM_LOAD16_BYTE( "pt0l.8d", 0x00000, 0x20000, CRC(ac8d468c) SHA1(d1b457a19a5d3259d0caf933f42b3a02b485867b) ) | |
| 1881 | ROM_LOAD16_BYTE( "pt1u.8l", 0x40001, 0x20000, CRC(7e5dab74) SHA1(5bde219d5b4305d38d17b494b2e759f05d05329f) ) | |
| 1882 | ROM_LOAD16_BYTE( "pt1l.8e", 0x40000, 0x20000, CRC(38a54ec5) SHA1(5c6017c98cae674868153ff2d64532027cf0ab83) ) | |
| 2168 | ROM_REGION16_BE( 0x80000, REGION_USER2, 0 ) /* winrun91 - 3d objects */ | |
| 2169 | ROM_LOAD16_BYTE( "pt0u.8j", 0x00000, 0x20000, CRC(abf512a6) SHA1(e86288039d6c4dedfa95b11cb7e4b87637f90c09) ) | |
| 2170 | ROM_LOAD16_BYTE( "pt0l.8d", 0x00001, 0x20000, CRC(ac8d468c) SHA1(d1b457a19a5d3259d0caf933f42b3a02b485867b) ) | |
| 2171 | ROM_LOAD16_BYTE( "pt1u.8l", 0x40000, 0x20000, CRC(7e5dab74) SHA1(5bde219d5b4305d38d17b494b2e759f05d05329f) ) | |
| 2172 | ROM_LOAD16_BYTE( "pt1l.8e", 0x40001, 0x20000, CRC(38a54ec5) SHA1(5c6017c98cae674868153ff2d64532027cf0ab83) ) | |
| 1883 | 2173 | |
| 1884 | 2174 | ROM_REGION16_BE( 0x100000, REGION_USER3, 0 ) /* bitmapped graphics */ |
| 1885 | ROM_LOAD16_BYTE( "gd0u.1p", 0x00001, 0x40000, CRC(33f5a19b) SHA1(b1dbd242168007f80e13e11c78b34abc1668883e) ) | |
| 1886 | ROM_LOAD16_BYTE( "gd0l.3p", 0x00000, 0x40000, CRC(9a29500e) SHA1(c605f86b138e0a4c3163ffd967482e298a15fbe7) ) | |
| 1887 | ROM_LOAD16_BYTE( "gd1u.1s", 0x80001, 0x40000, CRC(17e5a61c) SHA1(272ebd7daa56847f1887809535362331b5465dec) ) | |
| 1888 | ROM_LOAD16_BYTE( "gd1l.3s", 0x80000, 0x40000, CRC(64df59a2) SHA1(1e9d0945b94780bb0be16803e767466d2cda07e8) ) | |
| 2175 | ROM_LOAD16_BYTE( "gd0u.1p", 0x00000, 0x40000, CRC(33f5a19b) SHA1(b1dbd242168007f80e13e11c78b34abc1668883e) ) | |
| 2176 | ROM_LOAD16_BYTE( "gd0l.3p", 0x00001, 0x40000, CRC(9a29500e) SHA1(c605f86b138e0a4c3163ffd967482e298a15fbe7) ) | |
| 2177 | ROM_LOAD16_BYTE( "gd1u.1s", 0x80000, 0x40000, CRC(17e5a61c) SHA1(272ebd7daa56847f1887809535362331b5465dec) ) | |
| 2178 | ROM_LOAD16_BYTE( "gd1l.3s", 0x80001, 0x40000, CRC(64df59a2) SHA1(1e9d0945b94780bb0be16803e767466d2cda07e8) ) | |
| 1889 | 2179 | |
| 1890 | 2180 | ROM_REGION( 0x200000, REGION_SOUND1, 0 ) /* sound samples */ |
| 1891 | 2181 | ROM_LOAD("avo1.11c",0x000000,0x80000,CRC(9fb33af3) SHA1(666630a8e5766ca4c3275961963c3e713dfdda2d) ) |
| r1037 | r1038 | |
| 1895 | 2185 | static void namcos21_init( int game_type ) |
| 1896 | 2186 | { |
| 1897 | 2187 | namcos2_gametype = game_type; |
| 1898 | ptram = auto_malloc(PTRAM_SIZE); | |
| 2188 | pointram = auto_malloc(PTRAM_SIZE); | |
| 1899 | 2189 | mpDataROM = (UINT16 *)memory_region( REGION_USER1 ); |
| 1900 | mpDspState = auto_malloc( sizeof(*mpDspState) ); | |
| 2190 | InitDSP(); | |
| 2191 | mbNeedsKickstart = 20; | |
| 1901 | 2192 | } /* namcos21_init */ |
| 1902 | 2193 | |
| 1903 | 2194 | static DRIVER_INIT( winrun ) |
| 1904 | 2195 | { |
| 1905 | /* don't use the generic namcos21_init; hardware is different */ | |
| 2196 | UINT16 *pMem = (UINT16 *)memory_region(REGION_CPU5); | |
| 2197 | int pc = 0; | |
| 2198 | pMem[pc++] = 0xff80; /* b */ | |
| 2199 | pMem[pc++] = 0; | |
| 2200 | ||
| 2201 | winrun_dspcomram = auto_malloc(sizeof(UINT16)*0x1000*2); | |
| 2202 | ||
| 1906 | 2203 | namcos2_gametype = NAMCOS21_WINRUN91; |
| 1907 | ptram = auto_malloc(PTRAM_SIZE); | |
| 1908 | 2204 | mpDataROM = (UINT16 *)memory_region( REGION_USER1 ); |
| 2205 | pointram = auto_malloc(PTRAM_SIZE); | |
| 2206 | pointram_idx = 0; | |
| 2207 | mbNeedsKickstart = 0; | |
| 1909 | 2208 | } |
| 1910 | 2209 | |
| 1911 | 2210 | static DRIVER_INIT( aircombt ) |
| 1912 | 2211 | { |
| 1913 | #if 0 | |
| 1914 | /* replace first four tests of aircombj to reveal special "hidden" tests */ | |
| 1915 | UINT16 *pMem = (UINT16 *)memory_region( REGION_CPU1 ); | |
| 1916 | pMem[0x2a32/2] = 0x90; | |
| 1917 | pMem[0x2a34/2] = 0x94; | |
| 1918 | pMem[0x2a36/2] = 0x88; | |
| 1919 | pMem[0x2a38/2] = 0x8c; | |
| 1920 | #endif | |
| 1921 | ||
| 1922 | 2212 | namcos21_init( NAMCOS21_AIRCOMBAT ); |
| 1923 | 2213 | } |
| 1924 | 2214 | |
| r1037 | r1038 | |
| 1935 | 2225 | |
| 1936 | 2226 | DRIVER_INIT( solvalou ) |
| 1937 | 2227 | { |
| 2228 | UINT16 *mem = (UINT16 *)memory_region(REGION_CPU1); | |
| 2229 | mem[0x20ce4/2+1] = 0x0000; // $200128 | |
| 2230 | mem[0x20cf4/2+0] = 0x4e71; // 2nd ptr_booting | |
| 2231 | mem[0x20cf4/2+1] = 0x4e71; | |
| 2232 | mem[0x20cf4/2+2] = 0x4e71; | |
| 2233 | ||
| 1938 | 2234 | namcos21_init( NAMCOS21_SOLVALOU ); |
| 1939 | 2235 | } |
| 1940 | 2236 | |
| 1941 | 2237 | DRIVER_INIT( driveyes ) |
| 1942 | 2238 | { |
| 1943 | namcos21_init( NAMCOS21_DRIVERS_EYES ); | |
| 2239 | UINT16 *pMem = (UINT16 *)memory_region(REGION_CPU5); | |
| 2240 | int pc = 0; | |
| 2241 | pMem[pc++] = 0xff80; /* b */ | |
| 2242 | pMem[pc++] = 0; | |
| 2243 | winrun_dspcomram = auto_malloc(sizeof(UINT16)*0x1000*2); | |
| 2244 | namcos2_gametype = NAMCOS21_DRIVERS_EYES; | |
| 2245 | mpDataROM = (UINT16 *)memory_region( REGION_USER1 ); | |
| 2246 | pointram = auto_malloc(PTRAM_SIZE); | |
| 2247 | pointram_idx = 0; | |
| 2248 | mbNeedsKickstart = 0; | |
| 1944 | 2249 | } |
| 1945 | 2250 | |
| 1946 | 2251 | /*************************************************************/ |
| r1037 | r1038 | |
| 2026 | 2331 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2027 | 2332 | INPUT_PORTS_END |
| 2028 | 2333 | |
| 2334 | /* "SCI - ? */ | |
| 2335 | static INPUT_PORTS_START( winrun ) | |
| 2336 | PORT_START /* 63B05Z0 - PORT B */ | |
| 2337 | PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2338 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) /* ? */ | |
| 2339 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) /* ? */ | |
| 2340 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) /* ? */ | |
| 2341 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) /* ? */ | |
| 2342 | ||
| 2343 | PORT_START /* 63B05Z0 - PORT C & SCI */ | |
| 2344 | /* $a00004? */ | |
| 2345 | PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2346 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 2347 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 2348 | PORT_DIPNAME( 0x40, 0x40, "Test Switch") | |
| 2349 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 2350 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2351 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) // advances through tests | |
| 2352 | ||
| 2353 | PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 0 */ | |
| 2354 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2355 | ||
| 2356 | PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 1 */ | |
| 2357 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(15) PORT_KEYDELTA(10) /* gas */ | |
| 2358 | PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 2 */ | |
| 2359 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(15) PORT_KEYDELTA(10) /* steering */ | |
| 2360 | PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 3 */ | |
| 2361 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Z ) PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(15) PORT_KEYDELTA(10) /* break */ | |
| 2362 | PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 4 */ | |
| 2363 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2364 | PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 5 */ | |
| 2365 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2366 | PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 6 */ | |
| 2367 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2368 | PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 7 */ | |
| 2369 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2370 | ||
| 2371 | PORT_START /* 63B05Z0 - PORT H */ | |
| 2372 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2373 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2374 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2375 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) /* shift down */ | |
| 2376 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2377 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) /* shift up */ | |
| 2378 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2379 | ||
| 2380 | PORT_START /* 63B05Z0 - $2000 DIP SW */ | |
| 2381 | /* $a00026.l */ | |
| 2382 | PORT_DIPNAME( 0x01, 0x01, "DIP1 (Test Mode)") | |
| 2383 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 2384 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2385 | PORT_DIPNAME( 0x02, 0x02, "DIP2") | |
| 2386 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 2387 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2388 | PORT_DIPNAME( 0x04, 0x04, "DIP3") | |
| 2389 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) | |
| 2390 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2391 | PORT_DIPNAME( 0x08, 0x08, "DIP4") | |
| 2392 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 2393 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2394 | PORT_DIPNAME( 0x10, 0x10, "DIP5") | |
| 2395 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 2396 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2397 | PORT_DIPNAME( 0x20, 0x20, "DIP6") | |
| 2398 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 2399 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2400 | PORT_DIPNAME( 0x40, 0x40, "DIP7") | |
| 2401 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 2402 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2403 | PORT_DIPNAME( 0x80, 0x80, "DIP8") | |
| 2404 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 2405 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2406 | ||
| 2407 | PORT_START /* 63B05Z0 - $3000 */ | |
| 2408 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2409 | PORT_START /* 63B05Z0 - $3001 */ | |
| 2410 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2411 | PORT_START /* 63B05Z0 - $3002 */ | |
| 2412 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2413 | PORT_START /* 63B05Z0 - $3003 */ | |
| 2414 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2415 | INPUT_PORTS_END | |
| 2416 | ||
| 2029 | 2417 | static INPUT_PORTS_START( cybsled ) |
| 2030 | 2418 | PORT_START /* 63B05Z0 - PORT B */ |
| 2031 | 2419 | PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r1037 | r1038 | |
| 2042 | 2430 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 2043 | 2431 | |
| 2044 | 2432 | PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 0 */ |
| 2045 | PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2) /* right joystick: vertical */ | |
| 2433 | PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_Y ) PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2) /* right joystick: vertical */ | |
| 2046 | 2434 | PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 1 */ |
| 2047 | PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1) /* left joystick: vertical */ | |
| 2435 | PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_Y ) PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1) /* left joystick: vertical */ | |
| 2048 | 2436 | PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 2 */ |
| 2049 | PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2) /* right joystick: horizontal */ | |
| 2437 | PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_X ) PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(2) /* right joystick: horizontal */ | |
| 2050 | 2438 | PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 3 */ |
| 2051 | PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1) /* left joystick: horizontal */ | |
| 2439 | PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_X ) PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(1) /* left joystick: horizontal */ | |
| 2052 | 2440 | PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 4 */ |
| 2053 | 2441 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2054 | 2442 | PORT_START /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 5 */ |
| r1037 | r1038 | |
| 2122 | 2510 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2123 | 2511 | |
| 2124 | 2512 | PORT_START /* IN#3: 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 1 */ |
| 2125 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) | |
| 2513 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) | |
| 2126 | 2514 | |
| 2127 | 2515 | PORT_START /* IN#4: 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 2 */ |
| 2128 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) | |
| 2516 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) | |
| 2129 | 2517 | |
| 2130 | 2518 | PORT_START /* IN#5: 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 3 */ |
| 2131 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_PLAYER(2) | |
| 2519 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_PLAYER(2) | |
| 2132 | 2520 | |
| 2133 | 2521 | PORT_START /* IN#6: 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 4 */ |
| 2134 | 2522 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r1037 | r1038 | |
| 2184 | 2572 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2185 | 2573 | INPUT_PORTS_END |
| 2186 | 2574 | |
| 2187 | /* YEAR, NAME, PARENT, MACHINE, INPUT, INIT, MONITOR, COMPANY, FULLNAME, FLAGS */ | |
| 2188 | GAME( 1992, aircombj, 0, poly_c140_typeB, aircombt, aircombt, ROT0, "Namco", "Air Combat (Japan)", GAME_NOT_WORKING ) /* mostly working */ | |
| 2189 | GAME( 1992, aircombu, aircombj,poly_c140_typeB, aircombt, aircombt, ROT0, "Namco", "Air Combat (US)", GAME_NOT_WORKING ) /* mostly working */ | |
| 2190 | GAME( 1993, cybsled, 0, poly_c140_typeA, cybsled, cybsled, ROT0, "Namco", "Cyber Sled", GAME_NOT_WORKING ) /* mostly working */ | |
| 2191 | GAME( 1987, driveyes, 0, poly_c140_typeA, s21default, driveyes, ROT0, "Namco", "Driver's Eyes", GAME_NOT_WORKING ) | |
| 2575 | /* YEAR, NAME, PARENT, MACHINE, INPUT, INIT, MONITOR, COMPANY, FULLNAME, FLAGS */ | |
| 2576 | GAME( 1992, aircombj, 0, poly_c140_typeB, aircombt, aircombt, ROT0, "Namco", "Air Combat (Japan)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) | |
| 2577 | GAME( 1992, aircombu, aircombj,poly_c140_typeB, aircombt, aircombt, ROT0, "Namco", "Air Combat (US)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) | |
| 2578 | GAME( 1993, cybsled, 0, poly_c140_typeA, cybsled, cybsled, ROT0, "Namco", "Cyber Sled (US)", GAME_IMPERFECT_GRAPHICS ) | |
| 2579 | GAME( 1993, cybsledj, cybsled, poly_c140_typeA, cybsled, cybsled, ROT0, "Namco", "Cyber Sled (Japan)", GAME_IMPERFECT_GRAPHICS ) | |
| 2192 | 2580 | /* 1992, ShimDrive */ |
| 2193 | GAME( 1991, solvalou, 0, poly_c140_typeA, s21default, solvalou, ROT0, "Namco", "Solvalou (Japan)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) /* working and playable */ | |
| 2194 | GAME( 1991, starblad, 0, poly_c140_typeA, s21default, starblad, ROT0, "Namco", "Starblade", GAME_IMPERFECT_GRAPHICS ) /* working and playable */ | |
| 2195 | GAME( 1988, winrun, 0, winrun_c140_typeB, s21default, winrun, ROT0, "Namco", "Winning Run", GAME_NOT_WORKING ) | |
| 2196 | /* 1989, Winning Run Suzuka Grand Prix */ | |
| 2197 | GAME( 1991, winrun91, 0, winrun_c140_typeB, s21default, winrun, ROT0, "Namco", "Winning Run 91", GAME_NOT_WORKING ) /* not working */ | |
| 2581 | GAME( 1991, solvalou, 0, poly_c140_typeA, s21default, solvalou, ROT0, "Namco", "Solvalou (Japan)", GAME_IMPERFECT_GRAPHICS ) | |
| 2582 | GAME( 1991, starblad, 0, poly_c140_typeA, s21default, starblad, ROT0, "Namco", "Starblade", GAME_IMPERFECT_GRAPHICS ) | |
| 2583 | GAME( 1991, winrun91, 0, winrun_c140_typeB, winrun, winrun, ROT0, "Namco", "Winning Run 91", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) | |
| 2584 | GAME( 1989, winrun, 0, winrun_c140_typeB, winrun, winrun, ROT0, "Namco", "Winning Run Suzuka Grand Prix", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) | |
| 2585 | /* 1988, Winning Run */ | |
| 2586 | GAME( 1987, driveyes, 0, driveyes, winrun, driveyes, ROT0, "Namco", "Driver's Eyes", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) |
| r1037 | r1038 | |
|---|---|---|
| 5 | 5 | |
| 6 | 6 | Todo: |
| 7 | 7 | - find NMI source, and NMI enable/disable (timer ? video hw ?) |
| 8 | ||
| 9 | Not working games : | |
| 10 | - Super Real Mahjong P5 | |
| 11 | 8 | */ |
| 12 | 9 | |
| 13 | 10 | #include "driver.h" |
| 14 | 11 | #include "cpu/z80/z80.h" |
| 15 | #include "cpu/mips/r3000.h" | |
| 16 | 12 | #include "sound/st0016.h" |
| 17 | 13 | #include "st0016.h" |
| 18 | 14 | |
| r1037 | r1038 | |
| 91 | 87 | |
| 92 | 88 | /************************************* |
| 93 | 89 | * |
| 94 | * Machine's structure ST0016 + R3000 | |
| 95 | * | |
| 96 | *************************************/ | |
| 97 | ||
| 98 | static struct r3000_config config = | |
| 99 | { | |
| 100 | 0, /* 1 if we have an FPU, 0 otherwise */ | |
| 101 | 4096, /* code cache size */ | |
| 102 | 4096 /* data cache size */ | |
| 103 | }; | |
| 104 | ||
| 105 | static ADDRESS_MAP_START( srmp5_mem, ADDRESS_SPACE_PROGRAM, 32 ) | |
| 106 | AM_RANGE(0x00000000, 0x001fffff) AM_RAM | |
| 107 | AM_RANGE(0x002f0000, 0x002f7fff) AM_RAM | |
| 108 | AM_RANGE(0x01000000, 0x01000003) AM_WRITE(MWA32_RAM) | |
| 109 | AM_RANGE(0x01800000, 0x01800003) AM_WRITE(MWA32_RAM) | |
| 110 | AM_RANGE(0x01800004, 0x01800007) AM_READ(MRA32_RAM) | |
| 111 | AM_RANGE(0x01800008, 0x0180000b) AM_READ(MRA32_RAM) | |
| 112 | AM_RANGE(0x0180000c, 0x0180000f) AM_WRITE(MWA32_RAM) | |
| 113 | AM_RANGE(0x01800014, 0x01800017) AM_READ(MRA32_RAM) | |
| 114 | AM_RANGE(0x0180001c, 0x0180001f) AM_WRITE(MWA32_RAM) | |
| 115 | AM_RANGE(0x01800200, 0x01800203) AM_WRITE(MWA32_RAM) | |
| 116 | AM_RANGE(0x01802000, 0x01802003) AM_WRITE(MWA32_RAM) | |
| 117 | AM_RANGE(0x01802004, 0x01802007) AM_WRITE(MWA32_RAM) | |
| 118 | AM_RANGE(0x01802008, 0x0180200b) AM_READ(MRA32_RAM) | |
| 119 | AM_RANGE(0x01a00200, 0x01a00223) AM_READ(MRA32_RAM) | |
| 120 | AM_RANGE(0x01c00000, 0x01c00003) AM_READ(MRA32_RAM) | |
| 121 | AM_RANGE(0x0a000000, 0x0a00ffff) AM_RAM | |
| 122 | AM_RANGE(0x0a100000, 0x0a105fff) AM_RAM | |
| 123 | AM_RANGE(0x0a180000, 0x0a1801ff) AM_RAM | |
| 124 | AM_RANGE(0x0a200000, 0x0a3fffff) AM_RAM | |
| 125 | AM_RANGE(0x1eff0000, 0x1eff0013) AM_WRITE(MWA32_RAM) | |
| 126 | AM_RANGE(0x1fc00000, 0x1fdfffff) AM_READ(MRA32_ROM) AM_WRITE(MWA32_ROM) AM_REGION(REGION_USER1, 0) | |
| 127 | ADDRESS_MAP_END | |
| 128 | ||
| 129 | /************************************* | |
| 130 | * | |
| 131 | 90 | * Machine's structure ST0016 + V810 |
| 132 | 91 | * |
| 133 | 92 | *************************************/ |
| r1037 | r1038 | |
| 429 | 388 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 430 | 389 | INPUT_PORTS_END |
| 431 | 390 | |
| 432 | INPUT_PORTS_START( srmp5 ) | |
| 433 | PORT_START_TAG("IN0") | |
| 434 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 435 | ||
| 436 | PORT_START_TAG("IN1") | |
| 437 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 438 | ||
| 439 | PORT_START_TAG("IN2") | |
| 440 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 441 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 442 | PORT_SERVICE( 0x04, IP_ACTIVE_LOW) | |
| 443 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 444 | ||
| 445 | PORT_START_TAG("IN3") | |
| 446 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 447 | ||
| 448 | PORT_START_TAG("IN4") | |
| 449 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 450 | ||
| 451 | PORT_START_TAG("IN5") | |
| 452 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 453 | INPUT_PORTS_END | |
| 454 | ||
| 455 | 391 | static const gfx_decode gfxdecodeinfo[] = |
| 456 | 392 | { |
| 457 | 393 | // { 0, 0, &charlayout, 0, 16*4 }, |
| r1037 | r1038 | |
| 518 | 454 | MDRV_INTERLEAVE(1) |
| 519 | 455 | MACHINE_DRIVER_END |
| 520 | 456 | |
| 521 | static MACHINE_DRIVER_START( srmp5 ) | |
| 522 | MDRV_IMPORT_FROM(st0016) | |
| 523 | MDRV_CPU_ADD(R3000LE, 16000000) | |
| 524 | MDRV_CPU_CONFIG(config) | |
| 525 | MDRV_CPU_PROGRAM_MAP(srmp5_mem,0) | |
| 526 | MACHINE_DRIVER_END | |
| 527 | ||
| 528 | 457 | /************************************* |
| 529 | 458 | * |
| 530 | 459 | * ROM definition(s) |
| r1037 | r1038 | |
| 612 | 541 | ROM_COPY( REGION_CPU1, 0x10000, 0x00000, 0x08000 ) |
| 613 | 542 | ROM_END |
| 614 | 543 | |
| 615 | /* | |
| 616 | Super Real Mahjong P5 | |
| 617 | (c)199x SETA | |
| 618 | 544 | |
| 619 | CPU : R3560(custom?) | |
| 620 | SOUND : TC6210AF(custom?) | |
| 621 | OSC. : 50.0000MHz 42.9545MHz | |
| 622 | ||
| 623 | SX008-01.BIN ; CHR ROM | |
| 624 | SX008-02.BIN ; | | |
| 625 | SX008-03.BIN ; | | |
| 626 | SX008-04.BIN ; | | |
| 627 | SX008-05.BIN ; | | |
| 628 | SX008-06.BIN ; | | |
| 629 | SX008-07.BIN ; / | |
| 630 | SX008-08.BIN ; SOUND DATA | |
| 631 | SX008-09.BIN ; / | |
| 632 | SX008-11.BIN ; MAIN PRG | |
| 633 | SX008-12.BIN ; | | |
| 634 | SX008-13.BIN ; | | |
| 635 | SX008-14.BIN ; / | |
| 636 | ||
| 637 | */ | |
| 638 | ||
| 639 | ROM_START( srmp5 ) | |
| 640 | ROM_REGION( 0x210000, REGION_CPU1, 0 ) | |
| 641 | ROM_LOAD( "sx008-08.bin", 0x10000, 0x200000, CRC(d4ac54f4) SHA1(c3dc76cd71485796a0b6a960294ea96eae8c946e) ) | |
| 642 | ROM_COPY( REGION_CPU1, 0x10000, 0x00000, 0x08000 ) | |
| 643 | ||
| 644 | ROM_REGION32_BE( 0x200000, REGION_USER1, 0 ) | |
| 645 | ROM_LOAD32_BYTE( "sx008-14.bin", 0x00000, 0x80000, CRC(b5c55120) SHA1(0a41351c9563b2c6a00709189a917757bd6e0a24) ) | |
| 646 | ROM_LOAD32_BYTE( "sx008-13.bin", 0x00001, 0x80000, CRC(0af475e8) SHA1(24cddffa0f8c81832ae8870823d772e3b7493194) ) | |
| 647 | ROM_LOAD32_BYTE( "sx008-12.bin", 0x00002, 0x80000, CRC(43e9bb98) SHA1(e46dd98d2e1babfa12ddf2fa9b31377e8691d3a1) ) | |
| 648 | ROM_LOAD32_BYTE( "sx008-11.bin", 0x00003, 0x80000, CRC(ca15ff45) SHA1(5ee610e0bb835568c36898210a6f8394902d5b54) ) | |
| 649 | ||
| 650 | ROM_REGION( 0x200000*8, REGION_USER2,0) /* gfx ? */ | |
| 651 | ROM_LOAD( "sx008-01.bin", 0x000000, 0x200000, CRC(82dabf48) SHA1(c53e9ed0056c431eab13ab362936c25d3cc5abba) ) | |
| 652 | ROM_LOAD( "sx008-02.bin", 0x200000, 0x200000, CRC(cfd2be0f) SHA1(a21f2928e08047c97443123aceba7ff4e95c6d3d) ) | |
| 653 | ROM_LOAD( "sx008-03.bin", 0x400000, 0x200000, CRC(d7323b10) SHA1(94ecc17b6b8b071cf2c61bbef4aec2c6c7693c62) ) | |
| 654 | ROM_LOAD( "sx008-04.bin", 0x600000, 0x200000, CRC(b10d3067) SHA1(21c36307780d4f38ec54d87cd222d65e4f8c00a5) ) | |
| 655 | ROM_LOAD( "sx008-05.bin", 0x800000, 0x200000, CRC(0ff5e6f5) SHA1(ab7d021757f341d28db6d7d009c20ec9d7bd83c1) ) | |
| 656 | ROM_LOAD( "sx008-06.bin", 0xa00000, 0x200000, CRC(ba6fd7c4) SHA1(f086195c5c647e07e77ce2a23e94d28e6ad9ff4f) ) | |
| 657 | ROM_LOAD( "sx008-07.bin", 0xc00000, 0x200000, CRC(3564485d) SHA1(12464de4e2b6c4df1595183996d1987f0ecffb01) ) | |
| 658 | ROM_LOAD( "sx008-09.bin", 0xe00000, 0x200000, CRC(5a3e6560) SHA1(92ea398f3c5e3035869f0ca5dfe7b05c90095318) ) | |
| 659 | ROM_END | |
| 660 | ||
| 661 | 545 | /* |
| 662 | 546 | Mayjinsen (JPN Ver.) |
| 663 | 547 | (c)1994 Seta |
| r1037 | r1038 | |
| 753 | 637 | st0016_game=1; |
| 754 | 638 | } |
| 755 | 639 | |
| 756 | static DRIVER_INIT(srmp5) | |
| 757 | { | |
| 758 | st0016_game=2; | |
| 759 | } | |
| 760 | ||
| 761 | 640 | static DRIVER_INIT(mayjinsn) |
| 762 | 641 | { |
| 763 | 642 | st0016_game=4|0x80; |
| r1037 | r1038 | |
| 781 | 660 | GAME( 1994, mayjisn2, 0, mayjinsn, mayjisn2, mayjisn2, ROT0, "Seta", "Mayjinsen 2", 0) |
| 782 | 661 | GAME( 1995, koikois, 0, st0016, koikois, renju, ROT0, "Visco", "Koi Koi Shimasho", GAME_IMPERFECT_GRAPHICS) |
| 783 | 662 | /* Not working */ |
| 784 | GAME( 199?, srmp5, 0, srmp5, srmp5, srmp5, ROT0, "Seta", "Super Real Mahjong P5",GAME_NOT_WORKING) | |
| 785 | 663 | GAME( 1994, mayjinsn, 0, mayjinsn, st0016, mayjinsn, ROT0, "Seta", "Mayjinsen",GAME_IMPERFECT_GRAPHICS|GAME_NOT_WORKING) |
| r1037 | r1038 | |
|---|---|---|
| 86 | 86 | tilemap_mark_tile_dirty(bg_tilemap,offset); |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | #ifdef UNUSED_FUNCTION | |
| 89 | 90 | static READ8_HANDLER( dummy_inputs_r ) |
| 90 | 91 | { |
| 91 | 92 | logerror("Read %02x @ %06x\n",offset,activecpu_get_pc()); |
| 92 | 93 | return 0xff; |
| 93 | 94 | } |
| 95 | #endif | |
| 94 | 96 | |
| 95 | 97 | /*static UINT8 unk_data; |
| 96 | 98 |
| r1037 | r1038 | |
|---|---|---|
| 503 | 503 | |
| 504 | 504 | static VIDEO_UPDATE( seattle ) |
| 505 | 505 | { |
| 506 | voodoo_update(0, bitmap, cliprect); | |
| 507 | return 0; | |
| 506 | return voodoo_update(0, bitmap, cliprect) ? 0 : UPDATE_HAS_NOT_CHANGED; | |
| 508 | 507 | } |
| 509 | 508 | |
| 510 | 509 |
| r1037 | r1038 | |
|---|---|---|
| 52 | 52 | ----------------------------------------------------------------------------------- |
| 53 | 53 | |
| 54 | 54 | (1) Uses ST-0009 & ST-0020 & Light Gun |
| 55 | (2) Uses NEC V810 CPU as sub cpu | |
| 55 | (2) Uses NEC V810 CPU as sub cpu for the AI (basically the same as the majinsen games on st0016) | |
| 56 | 56 | |
| 57 | 57 | SSV Hardware Overview |
| 58 | 58 | Sammy/Seta/Visco, 1993-2001 |
| r1037 | r1038 | |
| 403 | 403 | |
| 404 | 404 | ***************************************************************************/ |
| 405 | 405 | |
| 406 | #ifdef UNUSED_FUNCTION | |
| 406 | 407 | static READ16_HANDLER( fake_r ) { return ssv_scroll[offset]; } |
| 408 | #endif | |
| 407 | 409 | |
| 408 | 410 | #define SSV_READMEM( _ROM ) \ |
| 409 | 411 | AM_RANGE(0x000000, 0x00ffff) AM_READ(MRA16_RAM ) /* RAM */ \ |
| r1037 | r1038 | |
| 969 | 971 | Joryuu Syougi Kyoushitsu |
| 970 | 972 | ***************************************************************************/ |
| 971 | 973 | |
| 972 | static ADDRESS_MAP_START( jsk_mem,ADDRESS_SPACE_PROGRAM, 32 ) | |
| 974 | /* from st0016.c */ | |
| 975 | ||
| 976 | static UINT32 latches[8]; | |
| 977 | ||
| 978 | static READ32_HANDLER(latch32_r) | |
| 979 | { | |
| 980 | if(!offset) | |
| 981 | latches[2]&=~2; | |
| 982 | return latches[offset]; | |
| 983 | } | |
| 984 | ||
| 985 | static WRITE32_HANDLER(latch32_w) | |
| 986 | { | |
| 987 | if(!offset) | |
| 988 | latches[2]|=1; | |
| 989 | COMBINE_DATA(&latches[offset]); | |
| 990 | timer_call_after_resynch(0, NULL); | |
| 991 | } | |
| 992 | ||
| 993 | static READ16_HANDLER(latch16_r) | |
| 994 | { | |
| 995 | if(!offset) | |
| 996 | latches[2]&=~1; | |
| 997 | return latches[offset]; | |
| 998 | } | |
| 999 | ||
| 1000 | static WRITE16_HANDLER(latch16_w) | |
| 1001 | { | |
| 1002 | if(!offset) | |
| 1003 | latches[2]|=2; | |
| 1004 | latches[offset]=data; | |
| 1005 | timer_call_after_resynch(0, NULL); | |
| 1006 | } | |
| 1007 | ||
| 1008 | static ADDRESS_MAP_START( jsk_readmem, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1009 | AM_RANGE(0x050000, 0x05ffff) AM_READ(ssv_mainram_r ) // RAM Mirror? | |
| 1010 | AM_RANGE(0x400000, 0x47ffff) AM_READ(MRA16_RAM ) // RAM? | |
| 1011 | AM_RANGE(0x900000, 0x900007) AM_READ(latch16_r) | |
| 1012 | SSV_READMEM( 0xf00000 ) | |
| 1013 | ADDRESS_MAP_END | |
| 1014 | static ADDRESS_MAP_START( jsk_writemem, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1015 | AM_RANGE(0x050000, 0x05ffff) AM_WRITE(ssv_mainram_w ) // RAM Mirror? | |
| 1016 | AM_RANGE(0x210000, 0x210001) AM_WRITE(watchdog_reset16_w ) // Watchdog | |
| 1017 | AM_RANGE(0x400000, 0x47ffff) AM_WRITE(MWA16_RAM ) // RAM? | |
| 1018 | AM_RANGE(0x900000, 0x900007) AM_WRITE(latch16_w) | |
| 1019 | SSV_WRITEMEM | |
| 1020 | ADDRESS_MAP_END | |
| 1021 | ||
| 1022 | ||
| 1023 | static ADDRESS_MAP_START( jsk_v810_mem,ADDRESS_SPACE_PROGRAM, 32 ) | |
| 973 | 1024 | AM_RANGE(0x00000000, 0x0001ffff) AM_RAM |
| 974 | 1025 | AM_RANGE(0x80000000, 0x8001ffff) AM_RAM |
| 975 | 1026 | AM_RANGE(0xc0000000, 0xc001ffff) AM_RAM |
| 976 | AM_RANGE(0x40000000, 0x4000000f) AM_NOP // I/O | |
| 977 | AM_RANGE(0xfff80000, 0xffffffff) AM_READ(MRA32_BANK2) | |
| 1027 | AM_RANGE(0x40000000, 0x4000000f) AM_READ(latch32_r) AM_WRITE(latch32_w) | |
| 1028 | AM_RANGE(0xfff80000, 0xffffffff) AM_ROM AM_REGION(REGION_CPU2, 0) | |
| 978 | 1029 | ADDRESS_MAP_END |
| 979 | 1030 | |
| 1031 | ||
| 980 | 1032 | /*************************************************************************** |
| 981 | 1033 | Eagle Shot Golf |
| 982 | 1034 | ***************************************************************************/ |
| r1037 | r1038 | |
| 1765 | 1817 | |
| 1766 | 1818 | |
| 1767 | 1819 | /*************************************************************************** |
| 1820 | Joryuu Syougi Kyoushitsu | |
| 1821 | ***************************************************************************/ | |
| 1822 | ||
| 1823 | INPUT_PORTS_START( jsk ) | |
| 1824 | PORT_START // IN0 - $210002 | |
| 1825 | PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coinage ) ) | |
| 1826 | PORT_DIPSETTING( 0x0000, DEF_STR( 5C_1C ) ) | |
| 1827 | PORT_DIPSETTING( 0x0001, DEF_STR( 4C_1C ) ) | |
| 1828 | PORT_DIPSETTING( 0x0002, DEF_STR( 3C_1C ) ) | |
| 1829 | PORT_DIPSETTING( 0x0003, DEF_STR( 2C_1C ) ) | |
| 1830 | PORT_DIPSETTING( 0x0007, DEF_STR( 1C_1C ) ) | |
| 1831 | PORT_DIPSETTING( 0x0006, DEF_STR( 1C_2C ) ) | |
| 1832 | PORT_DIPSETTING( 0x0005, DEF_STR( 1C_3C ) ) | |
| 1833 | PORT_DIPSETTING( 0x0004, DEF_STR( 1C_4C ) ) | |
| 1834 | PORT_SERVICE( 0x0008, IP_ACTIVE_LOW ) | |
| 1835 | PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Flip_Screen ) ) | |
| 1836 | PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) | |
| 1837 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 1838 | PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Demo_Sounds ) ) | |
| 1839 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) | |
| 1840 | PORT_DIPSETTING( 0x0020, DEF_STR( On ) ) | |
| 1841 | PORT_DIPNAME( 0x00c0, 0x00c0, "Minutes" ) | |
| 1842 | PORT_DIPSETTING( 0x0080, "3" ) | |
| 1843 | PORT_DIPSETTING( 0x00c0, "4" ) | |
| 1844 | PORT_DIPSETTING( 0x0040, "5" ) | |
| 1845 | PORT_DIPSETTING( 0x0000, "6" ) | |
| 1846 | ||
| 1847 | PORT_START // IN1 - $210004 | |
| 1848 | PORT_DIPNAME( 0x0007, 0x0007, "Difficulty A" ) // 8 fixed levels | |
| 1849 | PORT_DIPSETTING( 0x0000, "1 (Novice)" ) | |
| 1850 | PORT_DIPSETTING( 0x0001, "2" ) | |
| 1851 | PORT_DIPSETTING( 0x0002, "3" ) | |
| 1852 | PORT_DIPSETTING( 0x0003, "4" ) | |
| 1853 | PORT_DIPSETTING( 0x0007, "5 (Medium)" ) | |
| 1854 | PORT_DIPSETTING( 0x0006, "6" ) | |
| 1855 | PORT_DIPSETTING( 0x0005, "7" ) | |
| 1856 | PORT_DIPSETTING( 0x0004, "8 (expert)" ) | |
| 1857 | PORT_DIPNAME( 0x0008, 0x0008, "Difficulty Switch" ) | |
| 1858 | PORT_DIPSETTING( 0x0008, "A (8 Levels)" ) | |
| 1859 | PORT_DIPSETTING( 0x0000, "B (4 Levels)" ) | |
| 1860 | PORT_DIPNAME( 0x0030, 0x0030, "Difficulty B" ) // 4 levels, and player can select 3 levels during game | |
| 1861 | PORT_DIPSETTING( 0x0020, DEF_STR( Easy ) ) | |
| 1862 | PORT_DIPSETTING( 0x0030, DEF_STR( Normal ) ) | |
| 1863 | PORT_DIPSETTING( 0x0010, DEF_STR( Hard ) ) | |
| 1864 | PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) ) | |
| 1865 | PORT_DIPNAME( 0x0040, 0x0040, "Campaign" ) | |
| 1866 | PORT_DIPSETTING( 0x0040, "Available" ) | |
| 1867 | PORT_DIPSETTING( 0x0000, "Finished" ) | |
| 1868 | PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) | |
| 1869 | PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) | |
| 1870 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 1871 | ||
| 1872 | PORT_START // IN2 - $210008 | |
| 1873 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1874 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1875 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON2 ) | |
| 1876 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 1877 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) | |
| 1878 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) | |
| 1879 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) | |
| 1880 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) | |
| 1881 | ||
| 1882 | PORT_START // IN3 - $21000a | |
| 1883 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START2 ) // start1+start2 enter sound test in service mode | |
| 1884 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1885 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1886 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1887 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1888 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1889 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1890 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1891 | ||
| 1892 | PORT_START // IN4 - $21000c | |
| 1893 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(10) | |
| 1894 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1895 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1896 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1897 | PORT_BIT( 0x00f0, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1898 | INPUT_PORTS_END | |
| 1899 | ||
| 1900 | ||
| 1901 | /*************************************************************************** | |
| 1768 | 1902 | Keith & Lucy |
| 1769 | 1903 | ***************************************************************************/ |
| 1770 | 1904 | |
| r1037 | r1038 | |
| 3365 | 3499 | DRIVER_INIT( vasara ) { init_ssv(); |
| 3366 | 3500 | ssv_sprites_offsx = +0; ssv_sprites_offsy = +0xf0; |
| 3367 | 3501 | ssv_tilemap_offsx = +0; ssv_tilemap_offsy = -0xf8; } |
| 3368 | DRIVER_INIT( jsk ) { memory_set_bankptr(2, memory_region(REGION_USER2)); | |
| 3369 | init_ssv(); | |
| 3370 | ssv_sprites_offsx = +0; ssv_sprites_offsy = +0xe8; | |
| 3371 | ssv_tilemap_offsx = +0; ssv_tilemap_offsy = -0xf0; } | |
| 3502 | DRIVER_INIT( jsk ) { init_ssv(); | |
| 3503 | ssv_sprites_offsx = -8; ssv_sprites_offsy = +0xf5; | |
| 3504 | ssv_tilemap_offsx = 0; ssv_tilemap_offsy = -0xf4; } | |
| 3372 | 3505 | |
| 3373 | 3506 | |
| 3374 | 3507 | static MACHINE_DRIVER_START( ssv ) |
| r1037 | r1038 | |
| 3637 | 3770 | /* basic machine hardware */ |
| 3638 | 3771 | MDRV_IMPORT_FROM(ssv) |
| 3639 | 3772 | MDRV_CPU_MODIFY("main") |
| 3640 | MDRV_CPU_PROGRAM_MAP(j | |
| 3773 | MDRV_CPU_PROGRAM_MAP(j | |
| 3641 | 3774 | |
| 3642 | 3775 | MDRV_CPU_ADD(V810,25000000) |
| 3643 | MDRV_CPU_PROGRAM_MAP(jsk_mem, 0) | |
| 3776 | MDRV_CPU_PROGRAM_MAP(jsk_v810_mem, 0) | |
| 3644 | 3777 | |
| 3645 | 3778 | /* video hardware */ |
| 3646 | 3779 | MDRV_SCREEN_VISIBLE_AREA(0, 0x150-1, 0, 0xf0-1) |
| r1037 | r1038 | |
| 4083 | 4216 | |
| 4084 | 4217 | /*************************************************************************** |
| 4085 | 4218 | |
| 4086 | Joryuu Syougi Kyoushitsu | |
| 4087 | ||
| 4219 | Joryuu Syougi Kyoushitsu | |
| 4088 | 4220 | (c)1997 Visco, System SSV ROM board |
| 4089 | 4221 | |
| 4090 | 4222 | CPU : NEC JAPAN D70732GD-25 (C)NEC1991 V810 9651MK007 |
| r1037 | r1038 | |
| 4094 | 4226 | JSK-U4 .BIN [ec22fb41] - (27c1001) |
| 4095 | 4227 | JSK-U24.BIN [1fa6e156] | |
| 4096 | 4228 | JSK-U38.BIN [8e5c0de3] | |
| 4097 | JSK-U52.BIN [1 | |
| 4229 | JSK-U52.BIN [b11ae | |
| 4098 | 4230 | |
| 4099 | JSK-U71.BIN [b529f331] - (27c1001) | |
| 4100 | JSK-U72.BIN [41ed8a9f] / | |
| 4231 | JSK-U71.BIN [f6774fba] - (27c040) | |
| 4232 | JSK-U72.BIN [db6b2554] / | |
| 4101 | 4233 | |
| 4102 | 4234 | JSK-S0.U65 [8d1a9aeb] - (16M mask) |
| 4103 | 4235 | |
| r1037 | r1038 | |
| 4110 | 4242 | U53.BIN [--------] - GAL16V8B |
| 4111 | 4243 | U70.BIN [--------] / |
| 4112 | 4244 | |
| 4245 | dumped by sayu | |
| 4246 | ||
| 4247 | Note, in the old bad dump u52 had a few different bytes: | |
| 4248 | ||
| 4249 | ROM_LOAD32_BYTE( "jsk-u52.bin", 0x00000, 0x20000, CRC(19cc585f) SHA1(b53138e93d40c0cf03aee838d7653f5665d9cf35) ) | |
| 4250 | ||
| 4251 | addr old this | |
| 4252 | 1FF8F: FF 00 | |
| 4253 | 1FF97: FF 00 | |
| 4254 | 1FFB7: FF 00 | |
| 4255 | 1FFCF: FF 00 | |
| 4256 | 1FFD7: FF 00 | |
| 4257 | 1FFF7: FF 00 | |
| 4258 | ||
| 4113 | 4259 | ***************************************************************************/ |
| 4114 | 4260 | |
| 4115 | 4261 | ROM_START( jsk ) |
| 4116 | ROM_REGION16_LE( 0x400000, REGION_USER1, 0 ) | |
| 4117 | ROM_LOAD16_WORD( "jsk-main.bin", 0x000000, 0x100000, NO_DUMP ) // missing ? | |
| 4262 | ROM_REGION16_LE( 0x100000, REGION_USER1, 0 ) | |
| 4263 | ROM_LOAD16_BYTE( "jsk-u72.bin", 0x00000, 0x80000, CRC(db6b2554) SHA1(c4c6617461e1d3f8660a2b97fd2c38ef245f0d4a) ) | |
| 4264 | ROM_LOAD16_BYTE( "jsk-u71.bin", 0x00001, 0x80000, CRC(f6774fba) SHA1(3a74e5091d9d72e4f92c7c637cfe5c0dcc60bbe1) ) | |
| 4118 | 4265 | |
| 4119 | ROM_LOAD16_BYTE( "jsk-u72.bin", 0x80000, 0x20000, CRC(41ed8a9f) SHA1(a81efc91fbf1abc70ed64f4fa9b828a8b6f554ec) ) | |
| 4120 | ROM_LOAD16_BYTE( "jsk-u71.bin", 0x80001, 0x20000, CRC(b529f331) SHA1(be6259f5c3a6106280a4b519f83ee008d761be4e) ) | |
| 4266 | ROM_REGION( 0x20000*4, REGION_CPU2, 0 ) | |
| 4267 | ROM_LOAD32_BYTE( "jsk-u52.bin", 0x00000, 0x20000, CRC(b11aef0c) SHA1(37c0fedd6454a05b647513600f1b0998c572c7a5) ) | |
| 4268 | ROM_LOAD32_BYTE( "jsk-u38.bin", 0x00001, 0x20000, CRC(8e5c0de3) SHA1(54c5dfd858086b0eb7ffa82c19fb1dfd7752d50e) ) | |
| 4269 | ROM_LOAD32_BYTE( "jsk-u24.bin", 0x00002, 0x20000, CRC(1fa6e156) SHA1(4daedf660d89c185c945d4a526312f6528fe7b17) ) | |
| 4270 | ROM_LOAD32_BYTE( "jsk-u4.bin", 0x00003, 0x20000, CRC(ec22fb41) SHA1(c0d6b0a92075214a91da78be52d273771cb9f646) ) | |
| 4121 | 4271 | |
| 4122 | 4272 | ROM_REGION( 0x1000000, REGION_GFX1, ROMREGION_DISPOSE ) /* Sprites */ |
| 4123 | ROM_LOAD( "jsk-a0.bin", 0x0000000, 0x200000, CRC(4bac3196) SHA1(e9530278f60e789074411c6b2f20695c3af87b87) ) | |
| 4124 | ROM_LOAD( "jsk-b0.bin", 0x0400000, 0x200000, CRC(40664e5a) SHA1(ba0c24f727d502688a37ed67dad0e3aaad33afc4) ) | |
| 4125 | ROM_LOAD( "jsk-c0.bin", 0x0800000, 0x200000, CRC(2a230e64) SHA1(2af8144b84703f896971a2819d7b7a1f662cec92) ) | |
| 4126 | ROM_LOAD( "jsk-d0.bin", 0x0c00000, 0x200000, CRC(911e53a6) SHA1(9657180b4371172babcb21ad93c6253ac5d58f86) ) | |
| 4273 | ROM_LOAD( "jsk-a0.bin", 0x0000000, 0x400000, CRC(18981a19) SHA1(b4bf93f38099963350b9e5e64890ce7adc1bc983) ) | |
| 4274 | ROM_LOAD( "jsk-b0.bin", 0x0400000, 0x400000, CRC(f6df0ff9) SHA1(d7736e4ae6e099aef320a59668d7f17590c346b9) ) | |
| 4275 | ROM_LOAD( "jsk-c0.bin", 0x0800000, 0x400000, CRC(b8282939) SHA1(d041fb013e5011bf6b9d9bc2c816b2f3969723b7) ) | |
| 4276 | ROM_LOAD( "jsk-d0.bin", 0x0c00000, 0x400000, CRC(fc733e0c) SHA1(951060f6600b8b677ad2f41f59071c375ea9d4cf) ) | |
| 4127 | 4277 | |
| 4128 | ROM_REGION16_BE( 0x400000, REGION_SOUND1, ROMREGION_ERASE | |
| 4278 | ROM_REGION16_BE( 0x400000, REGION_SOUND1, ROMREGION_ERASE | |
| 4129 | 4279 | ROM_LOAD16_BYTE( "jsk-s0.u65", 0x000000, 0x200000, CRC(8d1a9aeb) SHA1(37316bd3e8cbe2a84239e1a11a56d4fe4723ae1a) ) |
| 4130 | 4280 | |
| 4131 | 4281 | ROM_REGION16_BE( 0x400000, REGION_SOUND2, 0 ) /* Samples */ |
| r1037 | r1038 | |
| 4136 | 4286 | |
| 4137 | 4287 | ROM_REGION16_BE( 0x400000, REGION_SOUND4, 0 ) /* Samples */ |
| 4138 | 4288 | ROM_COPY( REGION_SOUND1, 0x000000, 0x000000, 0x400000 ) |
| 4139 | ||
| 4140 | ROM_REGION32_LE( 0x20000*4, REGION_USER2, 0 ) | |
| 4141 | ROM_LOAD32_BYTE( "jsk-u4.bin", 0x00003, 0x20000, CRC(ec22fb41) SHA1(c0d6b0a92075214a91da78be52d273771cb9f646) ) | |
| 4142 | ROM_LOAD32_BYTE( "jsk-u24.bin", 0x00002, 0x20000, CRC(1fa6e156) SHA1(4daedf660d89c185c945d4a526312f6528fe7b17) ) | |
| 4143 | ROM_LOAD32_BYTE( "jsk-u38.bin", 0x00001, 0x20000, CRC(8e5c0de3) SHA1(54c5dfd858086b0eb7ffa82c19fb1dfd7752d50e) ) | |
| 4144 | ROM_LOAD32_BYTE( "jsk-u52.bin", 0x00000, 0x20000, CRC(19cc585f) SHA1(b53138e93d40c0cf03aee838d7653f5665d9cf35) ) | |
| 4145 | 4289 | ROM_END |
| 4146 | 4290 | |
| 4147 | 4291 | |
| r1037 | r1038 | |
| 5256 | 5400 | GAME( 1996?, meosism, 0, meosism, meosism, meosism, ROT0, "Sammy", "Meosis Magic (Japan)", GAME_NO_COCKTAIL ) |
| 5257 | 5401 | GAME( 1996, stmblade, 0, stmblade, stmblade, stmblade, ROT270, "Visco", "Storm Blade (US)", GAME_NO_COCKTAIL | GAME_IMPERFECT_GRAPHICS ) |
| 5258 | 5402 | GAME( 1997, hypreac2, 0, hypreac2, hypreac2, hypreac2, ROT0, "Sammy", "Mahjong Hyper Reaction 2 (Japan)", GAME_NO_COCKTAIL ) |
| 5403 | GAME( 1997, jsk, 0, jsk, jsk, jsk, ROT0, "Visco", "Joryuu Syougi Kyoushitsu (Japan)", GAME_NO_COCKTAIL ) | |
| 5259 | 5404 | GAME( 1997, koikois2, 0, janjans1, koikois2, janjans1, ROT0, "Visco", "Koi Koi Shimasho 2 - Super Real Hanafuda (Japan)", GAME_NO_COCKTAIL ) |
| 5260 | 5405 | GAME( 1997, mslider, 0, mslider, mslider, mslider, ROT0, "Visco / Datt Japan", "Monster Slider (Japan)", GAME_NO_COCKTAIL ) |
| 5261 | 5406 | GAME( 1997, srmp7, 0, srmp7, srmp7, srmp7, ROT0, "Seta", "Super Real Mahjong P7 (Japan)", GAME_NO_COCKTAIL | GAME_IMPERFECT_SOUND ) |
| r1037 | r1038 | |
| 5267 | 5412 | GAME( 2000, vasara, 0, ryorioh, vasara, vasara, ROT270, "Visco", "Vasara", GAME_NO_COCKTAIL ) |
| 5268 | 5413 | GAME( 2001, vasara2, 0, ryorioh, vasara2, vasara, ROT270, "Visco", "Vasara 2 (set 1)", GAME_NO_COCKTAIL ) |
| 5269 | 5414 | GAME( 2001, vasara2a, vasara2, ryorioh, vasara2, vasara, ROT270, "Visco", "Vasara 2 (set 2)", GAME_NO_COCKTAIL ) |
| 5270 | ||
| 5271 | ||
| 5272 | // Games not working properly: | |
| 5273 | ||
| 5274 | ||
| 5275 | // Games not working at all: | |
| 5276 | ||
| 5277 | GAME( 1997, jsk, 0, jsk, janjans1, jsk, ROT0, "Visco", "Joryuu Syougi Kyoushitsu (Japan)", GAME_NO_COCKTAIL | GAME_NOT_WORKING ) |
| r1037 | r1038 | |
|---|---|---|
| 109 | 109 | AM_RANGE(0x200000, 0x2023ff) AM_WRITE(MWA16_RAM) // tested |
| 110 | 110 | AM_RANGE(0xa10000, 0xa1001f) AM_WRITE(genesis_io_w) AM_BASE(&genesis_io_ram) /* Genesis Input */ |
| 111 | 111 | AM_RANGE(0xa11000, 0xa11203) AM_WRITE(genesis_ctrl_w) |
| 112 | AM_RANGE(0xa00000, 0xa0ffff) AM_WRITE( | |
| 112 | AM_RANGE(0xa00000, 0xa0ffff) AM_WRITE( | |
| 113 | 113 | AM_RANGE(0xc00000, 0xc0001f) AM_WRITE(genesis_vdp_w) /* VDP Access */ |
| 114 | 114 | AM_RANGE(0xfe0000, 0xfeffff) AM_WRITE(MWA16_BANK4) |
| 115 | 115 | AM_RANGE(0xff0000, 0xffffff) AM_WRITE(MWA16_RAM) AM_BASE(&genesis_68k_ram)/* Main Ram */ |
| r1037 | r1038 | |
|---|---|---|
| 46 | 46 | - Notice screen only if region = 0x0001 |
| 47 | 47 | - When "Language" Dip Switch is set to Japanese, you can also select your starting level; |
| 48 | 48 | however, only the 4 first levels are available ! Correct behaviour ? |
| 49 | - There's code at 0x00e090 that tests contents of 0x03ffb2.w : | |
| 50 | if it is 0x0000, the highscore isn't displayed, but value = 0x00ff | |
| 49 | 51 | |
| 52 | 2) 'opwolfa' | |
| 50 | 53 | |
| 51 | 2) 'opwolfb' | |
| 54 | - Region stored at 0x03fffe.w | |
| 55 | - Sets : | |
| 56 | * 'opwolfa' : region = 0x0003 | |
| 57 | - There is only ONE byte of difference at 0x03fff5.b with 'opwolf' | |
| 58 | but its effect is unknown as this adress doesn't seem to be read ! | |
| 52 | 59 | |
| 60 | 3) 'opwolfb' | |
| 61 | ||
| 53 | 62 | - Region stored at 0x03fffe.w |
| 54 | 63 | - Sets : |
| 55 | 64 | * 'opwolfb' : region = 0x0003 |
| r1037 | r1038 | |
|---|---|---|
| 232 | 232 | u = 0; |
| 233 | 233 | for (i=0; i < width; i++) |
| 234 | 234 | { |
| 235 | UINT16 pix = vr[(index + (u >> 6)) ^ 1]; | |
| 235 | UINT16 pix = vr[((index + (u >> 6)) ^ 1) & 0xffffff]; | |
| 236 | 236 | |
| 237 | 237 | if (alpha_enable) |
| 238 | 238 | { |
| r1037 | r1038 | |
| 473 | 473 | |
| 474 | 474 | fillbitmap(bitmap, 0, cliprect); |
| 475 | 475 | |
| 476 | if ( | |
| 476 | if (mame_stricmp(machine->gamedrv->name, "popn7") == 0) | |
| 477 | 477 | { |
| 478 | gcu_exec_display_list(chip, bitmap, cliprect, 0x8000); | |
| 479 | gcu_exec_display_list(chip, bitmap, cliprect, 0x0000); | |
| 480 | gcu_exec_display_list(chip, bitmap, cliprect, 0x10000); | |
| 478 | gcu_exec_display_list(chip, bitmap, cliprect, 0x1f80000); | |
| 481 | 479 | } |
| 482 | else | |
| 480 | else | |
| 483 | 481 | { |
| 484 | gcu_exec_display_list(chip, bitmap, cliprect, 0x200000); | |
| 482 | if (layer >= 2) | |
| 483 | { | |
| 484 | gcu_exec_display_list(chip, bitmap, cliprect, 0x8000); | |
| 485 | gcu_exec_display_list(chip, bitmap, cliprect, 0x0000); | |
| 486 | gcu_exec_display_list(chip, bitmap, cliprect, 0x10000); | |
| 487 | } | |
| 488 | else if (layer == 0) | |
| 489 | { | |
| 490 | gcu_exec_display_list(chip, bitmap, cliprect, 0x200000); | |
| 485 | 491 | |
| 486 | //gcu_exec_display_list(chip, bitmap, cliprect, 0x186040); | |
| 487 | } | |
| 488 | else if (layer == 1) | |
| 489 | { | |
| 490 | gcu_exec_display_list(chip, bitmap, cliprect, 0x1d0800); | |
| 492 | //gcu_exec_display_list(chip, bitmap, cliprect, 0x186040); | |
| 493 | } | |
| 494 | else if (layer == 1) | |
| 495 | { | |
| 496 | gcu_exec_display_list(chip, bitmap, cliprect, 0x1d0800); | |
| 491 | 497 | |
| 492 | gcu_exec_display_list(chip, bitmap, cliprect, 0x1a9440); | |
| 493 | ||
| 494 | gcu_exec_display_list(chip, bitmap, cliprect, 0x1f80000); | |
| 498 | gcu_exec_display_list(chip, bitmap, cliprect, 0x1a9440); | |
| 499 | } | |
| 495 | 500 | } |
| 496 | 501 | |
| 497 | 502 | tick++; |
| r1037 | r1038 | |
| 1670 | 1675 | |
| 1671 | 1676 | /*****************************************************************************/ |
| 1672 | 1677 | |
| 1678 | static UINT8 spu_shared_ram[0x400]; | |
| 1679 | ||
| 1680 | static READ32_HANDLER(ppc_spu_share_r) | |
| 1681 | { | |
| 1682 | UINT32 r = 0; | |
| 1683 | ||
| 1684 | if (!(mem_mask & 0xff000000)) | |
| 1685 | { | |
| 1686 | r |= spu_shared_ram[(offset * 4) + 0] << 24; | |
| 1687 | } | |
| 1688 | if (!(mem_mask & 0x00ff0000)) | |
| 1689 | { | |
| 1690 | r |= spu_shared_ram[(offset * 4) + 1] << 16; | |
| 1691 | } | |
| 1692 | if (!(mem_mask & 0x0000ff0000)) | |
| 1693 | { | |
| 1694 | r |= spu_shared_ram[(offset * 4) + 2] << 8; | |
| 1695 | } | |
| 1696 | if (!(mem_mask & 0xff000000)) | |
| 1697 | { | |
| 1698 | r |= spu_shared_ram[(offset * 4) + 3] << 0; | |
| 1699 | } | |
| 1700 | ||
| 1701 | return r; | |
| 1702 | } | |
| 1703 | ||
| 1704 | static WRITE32_HANDLER(ppc_spu_share_w) | |
| 1705 | { | |
| 1706 | if (!(mem_mask & 0xff000000)) | |
| 1707 | { | |
| 1708 | spu_shared_ram[(offset * 4) + 0] = (data >> 24) & 0xff; | |
| 1709 | } | |
| 1710 | if (!(mem_mask & 0x00ff0000)) | |
| 1711 | { | |
| 1712 | spu_shared_ram[(offset * 4) + 1] = (data >> 16) & 0xff; | |
| 1713 | } | |
| 1714 | if (!(mem_mask & 0x0000ff00)) | |
| 1715 | { | |
| 1716 | spu_shared_ram[(offset * 4) + 2] = (data >> 8) & 0xff; | |
| 1717 | } | |
| 1718 | if (!(mem_mask & 0x000000ff)) | |
| 1719 | { | |
| 1720 | spu_shared_ram[(offset * 4) + 3] = (data >> 0) & 0xff; | |
| 1721 | } | |
| 1722 | } | |
| 1723 | ||
| 1724 | #ifdef UNUSED_FUNCTION | |
| 1725 | static READ16_HANDLER(m68k_spu_share_r) | |
| 1726 | { | |
| 1727 | return spu_shared_ram[offset] << 8; | |
| 1728 | } | |
| 1729 | ||
| 1730 | static WRITE16_HANDLER(m68k_spu_share_w) | |
| 1731 | { | |
| 1732 | spu_shared_ram[offset] = (data >> 8) & 0xff; | |
| 1733 | } | |
| 1734 | #endif | |
| 1735 | ||
| 1736 | static READ16_HANDLER(spu_unk_r) | |
| 1737 | { | |
| 1738 | return 0xffff; | |
| 1739 | } | |
| 1740 | ||
| 1741 | /*****************************************************************************/ | |
| 1742 | ||
| 1673 | 1743 | static ADDRESS_MAP_START( firebeat_map, ADDRESS_SPACE_PROGRAM, 32 ) |
| 1674 | 1744 | AM_RANGE(0x70000000, 0x70000fff) AM_READWRITE(midi_uart_r, midi_uart_w) |
| 1675 | 1745 | AM_RANGE(0x70006000, 0x70006003) AM_WRITE(extend_board_irq_w) |
| 1676 | 1746 | AM_RANGE(0x70008000, 0x7000800f) AM_READ(keyboard_wheel_r) |
| 1677 | 1747 | AM_RANGE(0x7000a000, 0x7000a003) AM_READ(extend_board_irq_r) |
| 1678 | AM_RANGE(0x74000000, 0x740003ff) AM_RA | |
| 1748 | AM_RANGE(0x74000000, 0x740003ff) AM_READWRITE(ppc_spu_share_r, ppc_spu_share_w) // SPU shared RAM | |
| 1679 | 1749 | AM_RANGE(0x7d000200, 0x7d00021f) AM_READ(cabinet_r) |
| 1680 | 1750 | AM_RANGE(0x7d000340, 0x7d000347) AM_READ(sensor_r) |
| 1681 | 1751 | AM_RANGE(0x7d000400, 0x7d000403) AM_READWRITE(sound_r, sound_w) |
| r1037 | r1038 | |
| 1692 | 1762 | AM_RANGE(0xfff80000, 0xffffffff) AM_ROM AM_REGION(REGION_USER1, 0) /* System BIOS */ |
| 1693 | 1763 | ADDRESS_MAP_END |
| 1694 | 1764 | |
| 1765 | static ADDRESS_MAP_START( spu_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 1766 | AM_RANGE(0x000000, 0x07ffff) AM_ROM | |
| 1767 | AM_RANGE(0x100000, 0x13ffff) AM_RAM | |
| 1768 | AM_RANGE(0x340000, 0x34000f) AM_READ(spu_unk_r) | |
| 1769 | ADDRESS_MAP_END | |
| 1770 | ||
| 1695 | 1771 | /*****************************************************************************/ |
| 1696 | 1772 | |
| 1697 | 1773 | static READ8_HANDLER( soundram_r ) |
| r1037 | r1038 | |
| 1996 | 2072 | MDRV_SOUND_ROUTE(1, "right", 1.0) |
| 1997 | 2073 | MACHINE_DRIVER_END |
| 1998 | 2074 | |
| 2075 | static MACHINE_DRIVER_START(firebeat_spu) | |
| 2076 | ||
| 2077 | MDRV_IMPORT_FROM(firebeat) | |
| 2078 | ||
| 2079 | MDRV_CPU_ADD(M68000, 16000000) | |
| 2080 | MDRV_CPU_PROGRAM_MAP(spu_map, 0) | |
| 2081 | ||
| 2082 | MACHINE_DRIVER_END | |
| 2083 | ||
| 1999 | 2084 | /*****************************************************************************/ |
| 2000 | 2085 | /* Security dongle is a Dallas DS1411 RS232 Adapter with a DS1991 Multikey iButton */ |
| 2001 | 2086 | |
| r1037 | r1038 | |
| 2224 | 2309 | /*****************************************************************************/ |
| 2225 | 2310 | |
| 2226 | 2311 | ROM_START( ppp ) |
| 2227 | // TODO: ParaParaParadise should use GQ977 BIOS | |
| 2228 | 2312 | ROM_REGION32_BE(0x80000, REGION_USER1, 0) |
| 2229 | ROM_LOAD16_WORD_SWAP("97 | |
| 2313 | ROM_LOAD16_WORD_SWAP("977jaa03.e21", 0x00000, 0x80000, CRC(7b8 | |
| 2230 | 2314 | |
| 2231 | 2315 | ROM_REGION(0x400000, REGION_SOUND1, ROMREGION_ERASE00) |
| 2232 | 2316 | |
| r1037 | r1038 | |
| 2282 | 2366 | ROM_END |
| 2283 | 2367 | |
| 2284 | 2368 | ROM_START( popn7 ) |
| 2285 | // TODO: incorrect bios (should be a02jaa03) | |
| 2286 | 2369 | ROM_REGION32_BE(0x80000, REGION_USER1, 0) |
| 2287 | ROM_LOAD16_WORD_SWAP(" | |
| 2370 | ROM_LOAD16_WORD_SWAP(" | |
| 2288 | 2371 | |
| 2289 | 2372 | ROM_REGION(0x400000, REGION_SOUND1, ROMREGION_ERASE00) |
| 2290 | 2373 | |
| 2291 | 2374 | ROM_REGION(0xc0, REGION_USER2, ROMREGION_ERASE00) // Security dongle |
| 2292 | 2375 | ROM_LOAD("gcb00-ja", 0x00, 0xc0, BAD_DUMP CRC(cc28625a) SHA1(e7de79ae72fdbd22328c9de74dfa17b5e6ae43b6)) |
| 2293 | 2376 | |
| 2377 | ROM_REGION(0x80000, REGION_CPU2, 0) // SPU 68K program | |
| 2378 | ROM_LOAD16_WORD_SWAP("a02jaa04.3q", 0x00000, 0x80000, CRC(8c6000dd) SHA1(94ab2a66879839411eac6c673b25143d15836683)) | |
| 2379 | ||
| 2294 | 2380 | DISK_REGION( REGION_DISKS ) |
| 2295 | 2381 | DISK_IMAGE_READONLY( "b00jab01", 0, SHA1(7462586f67b5c3b015ac581ad0afc089fcd6f537) MD5(af9a249b23783d53ff27ea7dc7e6735c) ) |
| 2296 | 2382 | DISK_IMAGE_READONLY( "b00jaa02", 1, SHA1(fea9439f14304d865830fb34f8781346d95a1df7) MD5(cf4c4f7c2321fcca6d86e8c144261752) ) |
| 2297 | 2383 | ROM_END |
| 2298 | 2384 | |
| 2299 | 2385 | ROM_START( ppd ) |
| 2300 | // TODO: incorrect bios (should be 977jaa03) | |
| 2301 | 2386 | ROM_REGION32_BE(0x80000, REGION_USER1, 0) |
| 2302 | ROM_LOAD16_WORD_SWAP("97 | |
| 2387 | ROM_LOAD16_WORD_SWAP("977jaa03.e21", 0x00000, 0x80000, CRC(7b8 | |
| 2303 | 2388 | |
| 2304 | 2389 | ROM_REGION(0x400000, REGION_SOUND1, ROMREGION_ERASE00) |
| 2305 | 2390 | |
| r1037 | r1038 | |
| 2312 | 2397 | ROM_END |
| 2313 | 2398 | |
| 2314 | 2399 | ROM_START( ppp11 ) |
| 2315 | // TODO: incorrect bios (should be 977jaa03) | |
| 2316 | 2400 | ROM_REGION32_BE(0x80000, REGION_USER1, 0) |
| 2317 | ROM_LOAD16_WORD_SWAP("97 | |
| 2401 | ROM_LOAD16_WORD_SWAP("977jaa03.e21", 0x00000, 0x80000, CRC(7b8 | |
| 2318 | 2402 | |
| 2319 | 2403 | ROM_REGION(0x400000, REGION_SOUND1, ROMREGION_ERASE00) |
| 2320 | 2404 | |
| r1037 | r1038 | |
| 2328 | 2412 | |
| 2329 | 2413 | /*****************************************************************************/ |
| 2330 | 2414 | |
| 2331 | GAME( 2000, ppp, 0, firebeat, ppp, ppp, ROT0, "Konami", "ParaParaParadise", GAME_NOT_WORKING); | |
| 2332 | GAME( 2000, ppd, 0, firebeat, ppp, ppd, ROT0, "Konami", "ParaParaDancing", GAME_NOT_WORKING); | |
| 2333 | GAME( 2000, ppp11, 0, firebeat, ppp, ppp, ROT0, "Konami", "ParaParaParadise v1.1", GAME_NOT_WORKING); | |
| 2334 | GAMEL(2000, kbm, 0, firebeat2, kbm, kbm, ROT270, "Konami", "Keyboardmania", GAME_NOT_WORKING, layout_firebeat); | |
| 2335 | GAMEL(2000, kbm2nd, 0, firebeat2, kbm, kbm, ROT270, "Konami", "Keyboardmania 2nd Mix", GAME_NOT_WORKING, layout_firebeat); | |
| 2336 | GAMEL(2001, kbm3rd, 0, firebeat2, kbm, kbm, ROT270, "Konami", "Keyboardmania 3rd Mix", GAME_NOT_WORKING, layout_firebeat); | |
| 2337 | GAME( 2001, popn7, 0, firebeat, popn, ppp, ROT0, "Konami", "Pop n' Music 7", GAME_NOT_WORKING); | |
| 2415 | GAME( 2000, ppp, 0, firebeat, ppp, ppp, ROT0, "Konami", "ParaParaParadise", GAME_NOT_WORKING); | |
| 2416 | GAME( 2000, ppd, 0, firebeat, ppp, ppd, ROT0, "Konami", "ParaParaDancing", GAME_NOT_WORKING); | |
| 2417 | GAME( 2000, ppp11, 0, firebeat, ppp, ppp, ROT0, "Konami", "ParaParaParadise v1.1", GAME_NOT_WORKING); | |
| 2418 | GAMEL(2000, kbm, 0, firebeat2, kbm, kbm, ROT270, "Konami", "Keyboardmania", GAME_NOT_WORKING, layout_firebeat); | |
| 2419 | GAMEL(2000, kbm2nd, 0, firebeat2, kbm, kbm, ROT270, "Konami", "Keyboardmania 2nd Mix", GAME_NOT_WORKING, layout_firebeat); | |
| 2420 | GAMEL(2001, kbm3rd, 0, firebeat2, kbm, kbm, ROT270, "Konami", "Keyboardmania 3rd Mix", GAME_NOT_WORKING, layout_firebeat); | |
| 2421 | GAME( 2001, popn7, 0, firebeat_spu, popn, ppp, ROT0, "Konami", "Pop n' Music 7", GAME_NOT_WORKING); |
| r1037 | r1038 | |
|---|---|---|
| 269 | 269 | PORT_DIPSETTING( 0x08, "2" ) |
| 270 | 270 | PORT_DIPSETTING( 0x04, "1" ) |
| 271 | 271 | PORT_DIPSETTING( 0x00, "4" ) |
| 272 | PORT_DIPNAME( 0x10, 0x00, "Title" ) | |
| 272 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Language ) ) /* Also changes the copyright on the title screen */ | |
| 273 | PORT_DIPSETTING( 0x00, DEF_STR( English ) ) /* (c) 1986 Taito America Corp. */ | |
| 274 | PORT_DIPSETTING( 0x10, DEF_STR( Japanese ) ) /* (c) Taito Corporation 1986 */ | |
| 275 | PORT_DIPNAME( 0xe0, 0xa0, "Full game price (credits)" ) | |
| 276 | PORT_DIPSETTING( 0xe0, "3" ) | |
| 277 | PORT_DIPSETTING( 0xc0, "4" ) | |
| 278 | PORT_DIPSETTING( 0xa0, "5" ) | |
| 279 | PORT_DIPSETTING( 0x80, "6" ) | |
| 280 | PORT_DIPSETTING( 0x60, "7" ) | |
| 281 | PORT_DIPSETTING( 0x40, "8" ) | |
| 282 | PORT_DIPSETTING( 0x20, "9" ) | |
| 283 | PORT_DIPSETTING( 0x00, "10" ) | |
| 284 | ||
| 285 | PORT_START /* TRACKBALL X - port 02 on sub cpu */ | |
| 286 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) | |
| 287 | ||
| 288 | PORT_START /* TRACKBALL Y - port 03 on sub cpu */ | |
| 289 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_REVERSE | |
| 290 | INPUT_PORTS_END | |
| 291 | ||
| 292 | INPUT_PORTS_START( bigevglj ) | |
| 293 | ||
| 294 | PORT_START /* port 00 on sub cpu */ | |
| 295 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 ) | |
| 296 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN4 ) | |
| 297 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 298 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 299 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) | |
| 300 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) | |
| 301 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_TILT ) | |
| 302 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 303 | ||
| 304 | PORT_START /* port 04 on sub cpu - bit 0 and bit 1 are coin inputs */ | |
| 305 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 306 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) | |
| 307 | ||
| 308 | PORT_START /* port 05 on sub cpu */ | |
| 309 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 310 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 311 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) | |
| 312 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) | |
| 313 | PORT_DIPSETTING( 0x02, DEF_STR( Off )) | |
| 314 | PORT_DIPSETTING( 0x00, DEF_STR( On )) | |
| 315 | PORT_SERVICE( 0x04, IP_ACTIVE_LOW ) | |
| 316 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) | |
| 317 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 318 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 319 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_A ) ) | |
| 320 | PORT_DIPSETTING( 0x50, DEF_STR( 2C_1C ) ) | |
| 321 | PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) | |
| 322 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) | |
| 323 | PORT_DIPSETTING( 0xa0, DEF_STR( 1C_2C ) ) | |
| 324 | ||
| 325 | PORT_START /* port 06 on sub cpu */ | |
| 326 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) | |
| 327 | PORT_DIPSETTING( 0x01, DEF_STR( Easy ) ) | |
| 328 | PORT_DIPSETTING( 0x03, DEF_STR( Normal ) ) | |
| 329 | PORT_DIPSETTING( 0x02, DEF_STR( Hard ) ) | |
| 330 | PORT_DIPSETTING( 0x00, "Difficult" ) | |
| 331 | PORT_DIPNAME( 0x0c, 0x0c, "Holes" ) | |
| 332 | PORT_DIPSETTING( 0x0c, "3" ) | |
| 333 | PORT_DIPSETTING( 0x08, "2" ) | |
| 334 | PORT_DIPSETTING( 0x04, "1" ) | |
| 335 | PORT_DIPSETTING( 0x00, "4" ) | |
| 336 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Language ) ) /* Doesn't change the title screen copyright like the US set */ | |
| 273 | 337 | PORT_DIPSETTING( 0x00, DEF_STR( English ) ) |
| 274 | 338 | PORT_DIPSETTING( 0x10, DEF_STR( Japanese ) ) |
| 275 | 339 | PORT_DIPNAME( 0xe0, 0xa0, "Full game price (credits)" ) |
| r1037 | r1038 | |
| 550 | 614 | ROM_LOAD( "a67-15", 0x18000, 0x8000, CRC(1d261428) SHA1(0f3e6d83a8a462436fa414de4e1e4306db869d3e)) |
| 551 | 615 | ROM_END |
| 552 | 616 | |
| 553 | GAME( 1986, bigevglf, 0, bigevglf, bigevglf, 0, ROT270, "Taito America Corporation", "Big Event Golf", 0) | |
| 617 | ROM_START( bigevglj ) | |
| 618 | ROM_REGION( 0x90000, REGION_CPU1, 0 ) | |
| 619 | ROM_LOAD( "a67-02-2.10", 0x00000, 0x8000, CRC(b3edbb78) SHA1(7873b1a94cca830f1d1c143376cb49f6e48dbf0b)) | |
| 620 | ROM_LOAD( "a67-01-2.9", 0x08000, 0x4000, CRC(7788b5d0) SHA1(f331138352c4d7b4566d342047785ed97e7b5990)) | |
| 621 | ROM_LOAD( "a67-03", 0x10000, 0x8000, CRC(695b3396) SHA1(2a3738e6bc492a4c68d2e15a2e474f7654aeb94d)) | |
| 622 | ROM_LOAD( "a67-04", 0x18000, 0x8000, CRC(b8941902) SHA1(a03e432cbd8ea1df7223ea99ff1db220a57fc698)) | |
| 623 | ROM_LOAD( "a67-05", 0x20000, 0x8000, CRC(681f5f4f) SHA1(2a5d8eeaf6ac697d5d4ee15164b6c4b1b81d7a29)) | |
| 624 | ROM_LOAD( "a67-06", 0x28000, 0x8000, CRC(026f6fe5) SHA1(923b7d8363e587ef20b6518bee968d378166c76b)) | |
| 625 | ROM_LOAD( "a67-07", 0x30000, 0x8000, CRC(27706bed) SHA1(da702c5a098eb106332996ec5d0e2c014782031e)) | |
| 626 | ROM_LOAD( "a67-08", 0x38000, 0x8000, CRC(e922023a) SHA1(ea4c4b5e2f82ab20afb15f115e8cbc66d8471927)) | |
| 627 | ROM_LOAD( "a67-09", 0x40000, 0x8000, CRC(a9d4263e) SHA1(8c3f2d541583e8e4b22e0beabcd04c5765508535)) | |
| 628 | ROM_LOAD( "a67-10", 0x48000, 0x8000, CRC(7c35f4a3) SHA1(de60dc991c67fb7d48314bc8b2c1a27ad040bf1e)) | |
| 629 | ||
| 630 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) | |
| 631 | ROM_LOAD( "a67-11", 0x00000, 0x4000, CRC(a2660d20) SHA1(3d8b670c071862d677d4e30655dcb6b8d830648a)) | |
| 632 | ||
| 633 | ROM_REGION( 0x10000, REGION_CPU3, 0 ) | |
| 634 | ROM_LOAD( "a67-16", 0x0000, 0x4000, CRC(5fb6d22e) SHA1(1701aa94b7f524187fd7213a94535bed3e8b6cc9)) | |
| 635 | ROM_LOAD( "a67-17", 0x4000, 0x4000, CRC(9f57deae) SHA1(dbdb3d77c3de0113ef6671aec854e4e44ee162ef)) | |
| 636 | ROM_LOAD( "a67-18", 0x8000, 0x4000, CRC(40d54fed) SHA1(bfa0922809bffafec15d3ef59ac8b8ad653860a1)) | |
| 637 | ||
| 638 | ROM_REGION( 0x0800, REGION_CPU4, 0 ) | |
| 639 | ROM_LOAD( "a67_19-1", 0x0000, 0x0800, CRC(25691658) SHA1(aabf47abac43abe2ffed18ead1cb94e587149e6e)) | |
| 640 | ||
| 641 | ROM_REGION( 0x20000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 642 | ROM_LOAD( "a67-12", 0x00000, 0x8000, CRC(980cc3c5) SHA1(c35c20cfff0b5cfd5b95742333ae20a2c93371b5)) | |
| 643 | ROM_LOAD( "a67-13", 0x08000, 0x8000, CRC(ad6e04af) SHA1(4680d789cf53c4808105ad4f3c70aedb6d8bcf36)) | |
| 644 | ROM_LOAD( "a67-14", 0x10000, 0x8000, CRC(d6708cce) SHA1(5b48f9dff2a3e28242dc2004469dc2ac2b5d0321)) | |
| 645 | ROM_LOAD( "a67-15", 0x18000, 0x8000, CRC(1d261428) SHA1(0f3e6d83a8a462436fa414de4e1e4306db869d3e)) | |
| 646 | ROM_END | |
| 647 | ||
| 648 | GAME( 1986, bigevglf, 0, bigevglf, bigevglf, 0, ROT270, "Taito America Corporation", "Big Event Golf (US)", 0) | |
| 649 | GAME( 1986, bigevglj, bigevglf, bigevglf, bigevglj, 0, ROT270, "Taito Corporation", "Big Event Golf (Japan)", 0) |
| r1037 | r1038 | |
|---|---|---|
| 383 | 383 | } |
| 384 | 384 | |
| 385 | 385 | |
| 386 | #ifdef UNUSED_FUNCTION | |
| 386 | 387 | static WRITE8_HANDLER( dunhuang_82_w ) |
| 387 | 388 | { |
| 388 | 389 | // popmessage("82 = %02x",dunhuang_82); |
| 389 | 390 | } |
| 391 | #endif | |
| 390 | 392 | |
| 391 | 393 | static ADDRESS_MAP_START( dunhuang_io_map, ADDRESS_SPACE_IO, 8 ) |
| 392 | 394 | AM_RANGE( 0x0000, 0x0000 ) AM_WRITE( dunhuang_pos_x_w ) |
| r1037 | r1038 | |
|---|---|---|
| 715 | 715 | ROM_LOAD( "82s123.5l", 0, 32, CRC(a71e19ff) SHA1(fc7bf69f7971bf763aeeb1d9eb0861470acbf5d8) ) |
| 716 | 716 | ROM_END |
| 717 | 717 | |
| 718 | ROM_START( boomrana ) | |
| 719 | ROM_REGION(0x10000, REGION_CPU1, 0) | |
| 720 | ROM_LOAD( "bp12-2", 0x8000, 0x2000, CRC(87fc2f0b) SHA1(a5142cb3ee2c85906df2b5eccf7495486b162ae2) ) | |
| 721 | ROM_RELOAD( 0x0000, 0x2000 ) | |
| 722 | ROM_LOAD( "bp13-2", 0xa000, 0x2000, CRC(8e864764) SHA1(8faea69cb087b19de77589ea24d6f99ca0237deb) ) | |
| 723 | ROM_RELOAD( 0x2000, 0x2000 ) | |
| 724 | ROM_LOAD( "bp14-", 0x0c000, 0x2000, CRC(0a64018a) SHA1(318124619440af5b19bd4dc74ab3075ea03a6833) ) | |
| 725 | ROM_LOAD( "bp15-", 0x0e000, 0x2000, CRC(d23a5c31) SHA1(e61fee651ee80b03bf5813ec0cebb022bd0285bf) ) | |
| 726 | ||
| 727 | ||
| 728 | ROM_REGION(0x10000, REGION_CPU2, 0) /* same content, alt layout */ | |
| 729 | ROM_LOAD( "bp11-", 0x0c000, 0x2000, CRC(bbafe1ff) SHA1(c786465d714d576d5bbbfea588d34850a317dd9d) ) | |
| 730 | ROM_RELOAD(0xe000,0x2000) | |
| 731 | ||
| 732 | ROM_REGION(0xc000, REGION_GFX1, ROMREGION_DISPOSE ) /* same content, alt rom layout */ | |
| 733 | ROM_LOAD( "bp03-", 0x00000, 0x2000, CRC(33565e00) SHA1(5ddf179d222db7b3ad965ede2f25590d93dfdbf7) ) | |
| 734 | ROM_LOAD( "bp04-", 0x02000, 0x2000, CRC(ab3ccae2) SHA1(d81d3bf38d8b9b05792c0b74e2573c23c01eef4a) ) | |
| 735 | ROM_LOAD( "bp05-", 0x04000, 0x2000, CRC(8a8d25fa) SHA1(af9ae6a53f5ae2c97c8632e30d63830a82b3a2fd) ) | |
| 736 | ROM_LOAD( "bp06-", 0x06000, 0x2000, CRC(aa64bacd) SHA1(6a5e58abcd3753f9766376b31b4d2098a172dc8d) ) | |
| 737 | ROM_LOAD( "bp07-", 0x08000, 0x2000, CRC(6c7370aa) SHA1(e2c874a7f9205b6af9cd3336239839f659b93dae) ) | |
| 738 | ROM_LOAD( "bp08-", 0x0a000, 0x2000, CRC(348bd0cc) SHA1(a99aa9bf8c707b2f2a9539a118b0b74e20e1e923) ) | |
| 739 | ||
| 740 | ROM_REGION( 0x8000, REGION_GFX2, ROMREGION_DISPOSE ) /* same content, alt rom layout */ | |
| 741 | ROM_LOAD( "bp01-", 0x00000, 0x2000, CRC(b4000aff) SHA1(7706ddd4ab3ef07df0e4f41635725781f8b0c386) ) | |
| 742 | ROM_LOAD( "bp02-", 0x02000, 0x2000, CRC(90044512) SHA1(4c0fd9c95796e4281ec2de8639990717f8216bec) ) | |
| 743 | ROM_LOAD( "bp00-", 0x04000, 0x2000, CRC(e33564e5) SHA1(69563fea82716b440dbc2b5912078c70727aa560) ) | |
| 744 | ||
| 745 | ROM_REGION(0x04000, REGION_USER1, 0 ) /* same content, alt rom layout */ | |
| 746 | ROM_LOAD( "bp10-", 0x00000, 0x2000, CRC(cb3b0f60) SHA1(0fe8e11b1e24db7881a9f00cb700495e1e0daf84) ) | |
| 747 | ROM_LOAD( "bp09-", 0x02000, 0x2000, CRC(a64ac71d) SHA1(0e6525aa037a11f83ca7e23572b488c6f8ddab63) ) | |
| 748 | ||
| 749 | ROM_REGION( 32, REGION_PROMS, 0 ) | |
| 750 | ROM_LOAD( "ap-16.5l", 0, 32, CRC(a71e19ff) SHA1(fc7bf69f7971bf763aeeb1d9eb0861470acbf5d8) ) | |
| 751 | ROM_END | |
| 752 | ||
| 718 | 753 | ROM_START( kamikcab ) |
| 719 | 754 | ROM_REGION(0x10000, REGION_CPU1, 0) |
| 720 | 755 | ROM_LOAD( "bp11", 0x0c000, 0x4000, CRC(a69e5580) SHA1(554e45a3f5a91864b62a2439c2277cd18dbe45a7) ) |
| r1037 | r1038 | |
| 923 | 958 | |
| 924 | 959 | GAME( 1983, prosoccr, 0, prosoccr, liberate, prosport, ROT270, "Data East Corporation", "Pro Soccer", GAME_NOT_WORKING ) |
| 925 | 960 | GAME( 1983, prosport, 0, prosport, liberate, prosport, ROT270, "Data East Corporation", "Prosport", GAME_NOT_WORKING ) |
| 926 | GAME( 1983, boomrang, 0, boomrang, boomrang, prosport, ROT270, "Data East Corporation", "Boomer Rang'r / Genesis", 0 ) | |
| 961 | GAME( 1983, boomrang, 0, boomrang, boomrang, prosport, ROT270, "Data East Corporation", "Boomer Rang'r / Genesis (set 1)", 0 ) | |
| 962 | GAME( 1983, boomrana, boomrang, boomrang, boomrang, prosport, ROT270, "Data East Corporation", "Boomer Rang'r / Genesis (set 2)", 0 ) | |
| 927 | 963 | GAME( 1984, kamikcab, 0, boomrang, kamikcab, prosport, ROT270, "Data East Corporation", "Kamikaze Cabbie", 0 ) |
| 928 | 964 | GAME( 1984, yellowcb, kamikcab, boomrang, yellowcb, yellowcb, ROT270, "bootleg", "Yellow Cab (bootleg)", 0 ) |
| 929 | 965 | GAME( 1984, liberate, 0, liberate, liberate, liberate, ROT270, "Data East Corporation", "Liberation", 0 ) |
| r1037 | r1038 | |
|---|---|---|
| 118 | 118 | // 0x80 = MPX P 1/2 |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | #ifdef UNUSED_FUNCTION | |
| 121 | 122 | static WRITE8_HANDLER( laserbat_cntmov_w ) |
| 122 | 123 | { |
| 123 | 124 | // 0x01 = AB MOVE |
| r1037 | r1038 | |
| 129 | 130 | // 0x40 = SHPB |
| 130 | 131 | // 0x80 = SHPC |
| 131 | 132 | } |
| 133 | #endif | |
| 132 | 134 | |
| 133 | 135 | /* |
| 134 | 136 |
| r1037 | r1038 | |
|---|---|---|
| 192 | 192 | }; |
| 193 | 193 | |
| 194 | 194 | |
| 195 | #ifdef UNUSED_FUNCTION | |
| 195 | 196 | static INTERRUPT_GEN( progolf_interrupt ) |
| 196 | 197 | { |
| 197 | 198 | //if (readinputport(2) & 0xc0) |
| 198 | 199 | cpunum_set_input_line(0, /*0*/INPUT_LINE_NMI, /*HOLD_LINE*/PULSE_LINE); |
| 199 | 200 | } |
| 201 | #endif | |
| 200 | 202 | |
| 201 | 203 | static MACHINE_DRIVER_START( progolf ) |
| 202 | 204 | /* basic machine hardware */ |
| r1037 | r1038 | |
|---|---|---|
| 2085 | 2085 | extern WRITE32_HANDLER ( stv_vdp1_framebuffer1_w ); |
| 2086 | 2086 | extern READ32_HANDLER ( stv_vdp1_framebuffer1_r ); |
| 2087 | 2087 | |
| 2088 | #ifdef UNUSED_FUNCTION | |
| 2088 | 2089 | static READ32_HANDLER( stv_sh2_random_r ) |
| 2089 | 2090 | { |
| 2090 | 2091 | return 0xffffffff; |
| 2091 | 2092 | } |
| 2093 | #endif | |
| 2092 | 2094 | |
| 2093 | 2095 | static ADDRESS_MAP_START( stv_mem, ADDRESS_SPACE_PROGRAM, 32 ) |
| 2094 | 2096 | AM_RANGE(0x00000000, 0x0007ffff) AM_ROM // bios |
| r1037 | r1038 | |
| 2484 | 2486 | //minit_w(offset,data,mem_mask); |
| 2485 | 2487 | } |
| 2486 | 2488 | |
| 2487 | #ifdef | |
| 2489 | #ifdef UNUSE | |
| 2488 | 2490 | static void print_game_info(void); |
| 2489 | 2491 | #endif |
| 2490 | 2492 | |
| r1037 | r1038 | |
| 2537 | 2539 | for(dst_i=0;dst_i<0x100;dst_i++) \ |
| 2538 | 2540 | STR[dst_i] = 0x00; |
| 2539 | 2541 | |
| 2540 | #ifdef | |
| 2542 | #ifdef UNUSE | |
| 2541 | 2543 | static void print_game_info(void) |
| 2542 | 2544 | { |
| 2543 | 2545 | UINT8 *ROM = memory_region(REGION_USER1); |
| r1037 | r1038 | |
|---|---|---|
| 1 | 1 | /* Sega MegaTech */ |
| 2 | 2 | /* |
| 3 | ||
| 4 | changelog: | |
| 5 | ||
| 6 | 22 Sept 2007 - Started updating this to use the new Megadrive code, | |
| 7 | The Megadrive games currently run with the new code | |
| 8 | but the SMS based games still aren't hooked up (they | |
| 9 | use the Megadrive Z80 as the main CPU, and the VDP | |
| 10 | in compatibility mode) | |
| 11 | ||
| 12 | Controls for the menu haven't been hooked back up | |
| 13 | and the games run without any menu interaction at the | |
| 14 | moment. | |
| 15 | ||
| 16 | ||
| 17 | ||
| 18 | ||
| 3 | 19 | todo: cleanup, fix so that everything works properly |
| 4 | rewrite genesis emulation (so that it works perfectly with every genesis game) | |
| 5 | games are marked as NOT WORKING due to a) bad genesis emulation, b) incorrect behavior at time out | |
| 6 | or c) they're sms based games which aren't yet supported | |
| 20 | games are marked as NOT WORKING due to | |
| 21 | a) incorrect behavior at time out | |
| 22 | b) they're sms based games which aren't yet supported | |
| 7 | 23 | |
| 8 | 24 | |
| 9 | 25 | About MegaTech: |
| r1037 | r1038 | |
| 61 | 77 | #include "driver.h" |
| 62 | 78 | #include "genesis.h" |
| 63 | 79 | #include "rendlay.h" |
| 80 | #include "megadriv.h" | |
| 81 | #include "segae.h" | |
| 64 | 82 | |
| 65 | 83 | /* Megatech BIOS specific */ |
| 66 | 84 | static UINT32 bios_port_ctrl; |
| r1037 | r1038 | |
| 69 | 87 | #define MASTER_CLOCK 53693100 |
| 70 | 88 | |
| 71 | 89 | |
| 90 | /* not currently used */ | |
| 72 | 91 | INPUT_PORTS_START( megatech ) /* Genesis Input Ports */ |
| 73 | PORT_START | |
| 74 | 92 | |
| 75 | ||
| 76 | PORT_START /* Player 1 Controls - part 2 */ | |
| 77 | // PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) | |
| 78 | // PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) | |
| 79 | // PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) | |
| 80 | // PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) | |
| 81 | // PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) | |
| 82 | // PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) | |
| 83 | // PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 84 | // PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 85 | ||
| 86 | PORT_START /* Player 1 Controls - part 1 */ | |
| 87 | // PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 88 | // PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) | |
| 89 | ||
| 90 | ||
| 91 | PORT_START /* Player 2 Controls - part 2 */ | |
| 92 | // PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) | |
| 93 | // PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) | |
| 94 | // PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) | |
| 95 | // PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) | |
| 96 | // PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 97 | // PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 98 | // PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 99 | // PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 100 | ||
| 101 | PORT_START /* Player 2 Controls - part 1 */ | |
| 102 | // PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 103 | // PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) PORT_PLAYER(2) | |
| 104 | ||
| 105 | PORT_START /* Temp - Fake dipswitch to turn on / off sms vdp display */ | |
| 106 | // PORT_DIPNAME( 0x01, 0x01, "SMS VDP Display (fake)" ) | |
| 107 | // PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 108 | // PORT_DIPSETTING( 0x01, DEF_STR( On ) ) | |
| 109 | ||
| 110 | PORT_START | |
| 93 | PORT_START // port 6 | |
| 111 | 94 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Select") PORT_CODE(KEYCODE_0) |
| 112 | 95 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6800 bit 1") PORT_CODE(KEYCODE_Y) |
| 113 | 96 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6800 bit 2") PORT_CODE(KEYCODE_U) |
| r1037 | r1038 | |
| 117 | 100 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6800 bit 6") PORT_CODE(KEYCODE_O) |
| 118 | 101 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test mode") PORT_CODE(KEYCODE_F2) |
| 119 | 102 | |
| 120 | PORT_START | |
| 103 | PORT_START // port 7 | |
| 121 | 104 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) // a few coin inputs here |
| 122 | 105 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 123 | 106 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 124 | 107 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN4 ) |
| 125 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Service coin") PORT_CODE(KEYCODE_9) | |
| 126 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME("Enter") PORT_CODE(KEYCODE_MINUS) | |
| 108 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Service coin") PORT_CODE(KEYCODE_9) | |
| 109 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME("Enter") PORT_CODE(KEYCODE_MINUS) | |
| 127 | 110 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 ) |
| 128 | 111 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 129 | 112 | |
| 130 | PORT_START | |
| 113 | PORT_START // port 8 | |
| 131 | 114 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(2) |
| 132 | 115 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(2) |
| 133 | 116 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| r1037 | r1038 | |
| 273 | 256 | ADDRESS_MAP_END |
| 274 | 257 | |
| 275 | 258 | |
| 276 | /* basically from src/drivers/segasyse.c */ | |
| 277 | UINT8 segae_vdp_ctrl_r ( UINT8 chip ); | |
| 278 | UINT8 segae_vdp_data_r ( UINT8 chip ); | |
| 279 | void segae_vdp_ctrl_w ( UINT8 chip, UINT8 data ); | |
| 280 | void segae_vdp_data_w ( UINT8 chip, UINT8 data ); | |
| 281 | ||
| 282 | READ8_HANDLER (megatech_bios_port_be_bf_r) | |
| 283 | { | |
| 284 | UINT8 temp = 0; | |
| 285 | ||
| 286 | switch (offset) | |
| 287 | { | |
| 288 | case 0: /* port 0xbe, VDP 1 DATA Read */ | |
| 289 | temp = segae_vdp_data_r(0); break ; | |
| 290 | case 1: /* port 0xbf, VDP 1 CTRL Read */ | |
| 291 | temp = segae_vdp_ctrl_r(0); break ; | |
| 292 | } | |
| 293 | return temp; | |
| 294 | } | |
| 295 | ||
| 296 | WRITE8_HANDLER (megatech_bios_port_be_bf_w) | |
| 297 | { | |
| 298 | switch (offset) | |
| 299 | { | |
| 300 | case 0: /* port 0xbe, VDP 1 DATA Write */ | |
| 301 | segae_vdp_data_w(0, data); break; | |
| 302 | case 1: /* port 0xbf, VDP 1 CTRL Write */ | |
| 303 | segae_vdp_ctrl_w(0, data); break; | |
| 304 | } | |
| 305 | } | |
| 306 | ||
| 307 | 259 | static WRITE8_HANDLER (megatech_bios_port_ctrl_w) |
| 308 | 260 | { |
| 309 | 261 | bios_port_ctrl = data; |
| r1037 | r1038 | |
| 331 | 283 | } |
| 332 | 284 | |
| 333 | 285 | |
| 286 | ||
| 334 | 287 | static ADDRESS_MAP_START( megatech_bios_portmap, ADDRESS_SPACE_IO, 8 ) |
| 335 | 288 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) |
| 336 | 289 | AM_RANGE(0x3f, 0x3f) AM_WRITE(megatech_bios_port_ctrl_w) |
| 337 | AM_RANGE(0x7f, 0x7f) AM_WRITE(megatech_bios_port_7f_w) | |
| 338 | AM_RANGE(0xbe, 0xbf) AM_WRITE(megatech_bios_port_be_bf_w) /* VDP */ | |
| 290 | ||
| 291 | AM_RANGE(0x7f, 0x7f) AM_READWRITE(sms_vcounter_r, megatech_bios_port_7f_w) | |
| 292 | AM_RANGE(0xbe, 0xbe) AM_READWRITE(sms_vdp_data_r, sms_vdp_data_w) | |
| 293 | AM_RANGE(0xbf, 0xbf) AM_READWRITE(sms_vdp_ctrl_r, sms_vdp_ctrl_w) | |
| 294 | ||
| 339 | 295 | AM_RANGE(0xdc, 0xdc) AM_READ(megatech_bios_port_dc_r) // player inputs |
| 340 | 296 | AM_RANGE(0xdd, 0xdd) AM_READ(megatech_bios_port_dd_r) // other player 2 inputs |
| 341 | AM_RANGE(0xbe, 0xbf) AM_READ(megatech_bios_port_be_bf_r) /* VDP */ | |
| 342 | 297 | ADDRESS_MAP_END |
| 343 | 298 | |
| 344 | 299 | |
| 345 | 300 | |
| 346 | static UINT8 hintcount; /* line interrupt counter, decreased each scanline */ | |
| 347 | extern UINT8 segae_vintpending; | |
| 348 | extern UINT8 segae_hintpending; | |
| 349 | extern UINT8 *segae_vdp_regs[]; /* pointer to vdp's registers */ | |
| 301 | /* in video/segasyse.c */ | |
| 302 | //void megatech_start_video_normal(running_machine *machine); | |
| 303 | //void megatech_update_video_normal(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect ); | |
| 304 | //void megaplay_update_video_normal(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect ); | |
| 350 | 305 | |
| 351 | // Interrupt handler - from drivers/segasyse.c | |
| 352 | INTERRUPT_GEN (megatech_irq) | |
| 353 | { | |
| 354 | int sline; | |
| 355 | sline = 261 - cpu_getiloops(); | |
| 306 | /* give us access to the megadriv start and update functions so that we can call them */ | |
| 307 | extern UINT32 video_update_megadriv(running_machine *machine, int screen, mame_bitmap *bitmap, const rectangle *cliprect); | |
| 308 | extern void video_start_megadriv(running_machine *machine); | |
| 309 | extern void video_eof_megadriv(running_machine *machine); | |
| 310 | extern void machine_reset_megadriv(running_machine *machine); | |
| 356 | 311 | |
| 357 | if (sline ==0) { | |
| 358 | hintcount = segae_vdp_regs[0][10]; | |
| 359 | } | |
| 312 | /* in drivers/segae.c */ | |
| 313 | extern UINT32 video_update_megatech_bios(running_machine *machine, int screen, mame_bitmap *bitmap, const rectangle *cliprect); | |
| 314 | extern void video_eof_megatech_bios(running_machine *machine); | |
| 315 | extern void machine_reset_megatech_bios(running_machine *machine); | |
| 316 | extern void driver_init_megatech_bios(running_machine *machine); | |
| 360 | 317 | |
| 361 | if (sline <= 192) { | |
| 318 | DRIVER_INIT(mtnew) | |
| 319 | { | |
| 320 | driver_init_megadriv(Machine); | |
| 321 | driver_init_megatech_bios(Machine); | |
| 322 | } | |
| 362 | 323 | |
| 363 | // if (sline != 192) segae_drawscanline(sline,1,1); | |
| 324 | VIDEO_START(mtnew) | |
| 325 | { | |
| 326 | video_start_megadriv(Machine); | |
| 327 | } | |
| 364 | 328 | |
| 365 | if (sline == 192) | |
| 366 | segae_vintpending = 1; | |
| 329 | VIDEO_UPDATE(mtnew) | |
| 330 | { | |
| 331 | if (screen ==0) video_update_megadriv(Machine,0,bitmap,cliprect); | |
| 332 | if (screen ==1) video_update_megatech_bios(Machine, 1, bitmap,cliprect); | |
| 333 | return 0; | |
| 334 | } | |
| 367 | 335 | |
| 368 | if (hintcount == 0) { | |
| 369 | hintcount = segae_vdp_regs[0][10]; | |
| 370 | segae_hintpending = 1; | |
| 336 | VIDEO_EOF(mtnew) | |
| 337 | { | |
| 338 | video_eof_megadriv(Machine); | |
| 339 | video_eof_megatech_bios(Machine); | |
| 340 | } | |
| 371 | 341 | |
| 372 | if ((segae_vdp_regs[0][0] & 0x10)) { | |
| 373 | cpunum_set_input_line(2, 0, HOLD_LINE); | |
| 374 | return; | |
| 375 | } | |
| 376 | ||
| 377 | } else { | |
| 378 | hintcount--; | |
| 379 | } | |
| 380 | } | |
| 381 | ||
| 382 | if (sline > 192) { | |
| 383 | hintcount = segae_vdp_regs[0][10]; | |
| 384 | ||
| 385 | if ( (sline<0xe0) && (segae_vintpending) ) { | |
| 386 | cpunum_set_input_line(2, 0, HOLD_LINE); | |
| 387 | } | |
| 388 | } | |
| 389 | ||
| 342 | MACHINE_RESET(mtnew) | |
| 343 | { | |
| 344 | machine_reset_megadriv(Machine); | |
| 345 | machine_reset_megatech_bios(Machine); | |
| 390 | 346 | } |
| 391 | 347 | |
| 392 | static ADDRESS_MAP_START( genesis_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 393 | AM_RANGE(0x000000, 0x3fffff) AM_ROM /* Cartridge Program Rom */ | |
| 394 | AM_RANGE(0xa10000, 0xa1001f) AM_READWRITE(genesis_io_r, genesis_io_w) AM_BASE(&genesis_io_ram) /* Genesis Input */ | |
| 395 | AM_RANGE(0xa11000, 0xa11203) AM_WRITE(genesis_ctrl_w) | |
| 396 | AM_RANGE(0xa00000, 0xa0ffff) AM_READWRITE(genesis_68k_to_z80_r, megaplay_68k_to_z80_w) | |
| 397 | AM_RANGE(0xc00000, 0xc0001f) AM_READWRITE(genesis_vdp_r, genesis_vdp_w) /* VDP Access */ | |
| 398 | AM_RANGE(0xe00000, 0xe0ffff) AM_MIRROR(0x1f0000) AM_RAM AM_BASE(&generic_nvram16) AM_SIZE(&generic_nvram_size) | |
| 399 | ADDRESS_MAP_END | |
| 400 | ||
| 401 | ||
| 402 | static ADDRESS_MAP_START( genesis_z80_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 403 | AM_RANGE(0x0000, 0x1fff) AM_MIRROR(0x2000) AM_RAM AM_BASE(&genesis_z80_ram) | |
| 404 | AM_RANGE(0x4000, 0x7fff) AM_READWRITE(genesis_z80_r, genesis_z80_w) | |
| 405 | AM_RANGE(0x8000, 0xffff) AM_READ(genesis_z80_bank_r) | |
| 406 | ADDRESS_MAP_END | |
| 407 | ||
| 408 | ||
| 409 | static MACHINE_DRIVER_START( genesis_base ) | |
| 410 | /*basic machine hardware */ | |
| 411 | MDRV_CPU_ADD_TAG("main", M68000, MASTER_CLOCK / 7) | |
| 412 | MDRV_CPU_PROGRAM_MAP(genesis_map, 0) | |
| 413 | MDRV_CPU_VBLANK_INT(genesis_vblank_interrupt,1) | |
| 414 | ||
| 415 | MDRV_CPU_ADD_TAG("sound", Z80, MASTER_CLOCK / 15) | |
| 416 | MDRV_CPU_PROGRAM_MAP(genesis_z80_map, 0) | |
| 417 | MDRV_CPU_VBLANK_INT(irq0_line_hold, 1) /* from vdp at scanline 0xe0 */ | |
| 418 | ||
| 419 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 420 | ||
| 421 | MDRV_INTERLEAVE(100) | |
| 422 | ||
| 423 | MDRV_MACHINE_START(genesis) | |
| 424 | MDRV_MACHINE_RESET(genesis) | |
| 425 | ||
| 426 | /* video hardware */ | |
| 427 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS) | |
| 428 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 429 | MDRV_SCREEN_SIZE(342,262) | |
| 430 | MDRV_SCREEN_VISIBLE_AREA(0, 319, 0, 223) | |
| 431 | MDRV_PALETTE_LENGTH(64) | |
| 432 | ||
| 433 | MDRV_VIDEO_START(genesis) | |
| 434 | MDRV_VIDEO_UPDATE(genesis) | |
| 435 | ||
| 436 | /* sound hardware */ | |
| 437 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 438 | ||
| 439 | MDRV_SOUND_ADD(YM3438, MASTER_CLOCK/7) | |
| 440 | MDRV_SOUND_ROUTE(0, "mono", 0.50) | |
| 441 | MDRV_SOUND_ROUTE(1, "mono", 0.50) | |
| 442 | MACHINE_DRIVER_END | |
| 443 | ||
| 444 | ||
| 445 | 348 | static MACHINE_DRIVER_START( megatech ) |
| 446 | 349 | |
| 447 | 350 | /* basic machine hardware */ |
| 448 | MDRV_IMPORT_FROM( | |
| 351 | MDRV_IMPORT_FROM(m | |
| 449 | 352 | |
| 353 | /* Megatech has an extra SMS based bios *and* an additional screen */ | |
| 450 | 354 | MDRV_CPU_ADD_TAG("megatech_bios", Z80, MASTER_CLOCK / 15) /* ?? */ |
| 451 | 355 | MDRV_CPU_PROGRAM_MAP(megatech_bios_map, 0) |
| 452 | 356 | MDRV_CPU_IO_MAP(megatech_bios_portmap,0) |
| 453 | MDRV_CPU_VBLANK_INT(megatech_irq, 262) | |
| 454 | 357 | |
| 455 | MDRV_MACHINE_START(genesis) | |
| 456 | MDRV_MACHINE_RESET(genesis) | |
| 358 | MDRV_MACHINE_RESET(mtnew) | |
| 457 | 359 | |
| 458 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS) | |
| 459 | MDRV_PALETTE_LENGTH(64+32) /* +32 for megatech bios vdp part */ | |
| 360 | MDRV_VIDEO_START(mtnew) | |
| 361 | MDRV_VIDEO_UPDATE(mtnew) | |
| 362 | MDRV_VIDEO_EOF(mtnew) | |
| 460 | 363 | |
| 461 | MDRV_VIDEO_START(megatech) | |
| 462 | MDRV_VIDEO_UPDATE(megatech) | |
| 463 | 364 | MDRV_DEFAULT_LAYOUT(layout_dualhovu) |
| 464 | 365 | |
| 465 | MDRV_SCREEN_ADD("top", 0x000) | |
| 466 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 366 | MDRV_SCREEN_ADD("menu", 0x000) | |
| 367 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB15) | |
| 467 | 368 | MDRV_SCREEN_REFRESH_RATE(60) |
| 468 | 369 | MDRV_SCREEN_SIZE(342,262) |
| 469 | MDRV_SCREEN_VISIBLE_AREA(0, 256-1, 0, | |
| 370 | MDRV_SCREEN_VISIBLE_AREA(0, 256-1, 0, | |
| 470 | 371 | |
| 471 | MDRV_SCREEN_ADD("bottom", 0x000) | |
| 472 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 473 | MDRV_SCREEN_REFRESH_RATE(30) | |
| 474 | MDRV_SCREEN_SIZE(342,262) | |
| 475 | MDRV_SCREEN_VISIBLE_AREA(0, 320-1, 0, 224-1) | |
| 476 | ||
| 477 | ||
| 478 | ||
| 479 | 372 | /* sound hardware */ |
| 480 | 373 | MDRV_SOUND_ADD(SN76496, MASTER_CLOCK/15) |
| 481 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) | |
| 482 | ||
| 483 | MDRV_SOUND_ADD(SN76496, MASTER_CLOCK/15) | |
| 484 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) | |
| 374 | MDRV_SOUND_ROUTE(0, "left", 0.50) | |
| 375 | MDRV_SOUND_ROUTE(1, "right", 0.50) | |
| 485 | 376 | MACHINE_DRIVER_END |
| 486 | 377 | |
| 487 | 378 | |
| r1037 | r1038 | |
| 949 | 840 | |
| 950 | 841 | |
| 951 | 842 | /* nn */ /* nn is part of the instruction rom name, should there be a game for each number? */ |
| 952 | /* -- */ GAME( 1989, megatech, 0, megatech, megatech, 0, ROT0, "Sega", "Mega-Tech BIOS", GAME_IS_BIOS_ROOT ) | |
| 953 | /* 01 */ GAME( 1988, mt_beast, megatech, megatech, megatech, 0, ROT0, "Sega", "Altered Beast (Mega-Tech)", GAME_NOT_WORKING ) | |
| 954 | /* 02 */ GAME( 1988, mt_shar2, megatech, megatech, megatech, 0, ROT0, "Sega", "Space Harrier II (Mega-Tech)", GAME_NOT_WORKING ) | |
| 955 | /* 03 */ GAME( 1988, mt_stbld, megatech, megatech, megatech, 0, ROT0, "Sega", "Super Thunder Blade (Mega-Tech)", GAME_NOT_WORKING ) | |
| 956 | /* 04 */ GAME( 19??, mt_ggolf, megatech, megatech, megatech, 0, ROT0, "Sega", "Great Golf (Mega-Tech)", GAME_NOT_WORKING ) /* sms! also bad */ | |
| 957 | /* 05 */ GAME( 19??, mt_gsocr, megatech, megatech, megatech, 0, ROT0, "Sega", "Great Soccer (Mega-Tech)", GAME_NOT_WORKING ) /* sms! also bad */ | |
| 958 | /* 06 */ GAME( 1989, mt_orun, megatech, megatech, megatech, 0, ROT0, "Sega", "Out Run (Mega-Tech)", GAME_NOT_WORKING ) /* sms! */ | |
| 959 | /* 07 */ GAME( 19??, mt_asyn, megatech, megatech, megatech, 0, ROT0, "Sega", "Alien Syndrome (Mega-Tech)", GAME_NOT_WORKING ) /* sms! */ | |
| 960 | /* 08 */ GAME( 19??, mt_shnbi, megatech, megatech, megatech, 0, ROT0, "Sega", "Shinobi (Mega-Tech)", GAME_NOT_WORKING) /* sms */ | |
| 843 | /* -- */ GAME( 1989, megatech, 0, megatech, megadriv, mtnew, ROT0, "Sega", "Mega-Tech BIOS", GAME_IS_BIOS_ROOT ) | |
| 844 | /* 01 */ GAME( 1988, mt_beast, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Altered Beast (Mega-Tech)", GAME_NOT_WORKING ) | |
| 845 | /* 02 */ GAME( 1988, mt_shar2, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Space Harrier II (Mega-Tech)", GAME_NOT_WORKING ) | |
| 846 | /* 03 */ GAME( 1988, mt_stbld, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Super Thunder Blade (Mega-Tech)", GAME_NOT_WORKING ) | |
| 847 | /* 04 */ GAME( 19??, mt_ggolf, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Great Golf (Mega-Tech, SMS based)", GAME_NOT_WORKING ) /* sms! also bad */ | |
| 848 | /* 05 */ GAME( 19??, mt_gsocr, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Great Soccer (Mega-Tech, SMS based)", GAME_NOT_WORKING ) /* sms! also bad */ | |
| 849 | /* 06 */ GAME( 1989, mt_orun, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Out Run (Mega-Tech, SMS based)", GAME_NOT_WORKING ) /* sms! */ | |
| 850 | /* 07 */ GAME( 19??, mt_asyn, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Alien Syndrome (Mega-Tech, SMS based)", GAME_NOT_WORKING ) /* sms! */ | |
| 851 | /* 08 */ GAME( 19??, mt_shnbi, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Shinobi (Mega-Tech, SMS based)", GAME_NOT_WORKING) /* sms */ | |
| 961 | 852 | /* 09 */ // unknown |
| 962 | /* 10 */ GAME( 19??, mt_aftrb, megatech, megatech, megatech, 0, ROT0, "Sega", "After Burner (Mega-Tech)", GAME_NOT_WORKING) /* sms */ | |
| 963 | /* 11 */ GAME( 1989, mt_tfor2, megatech, megatech, megatech, 0, ROT0, "Tecno Soft / Sega", "Thunder Force II MD (Mega-Tech)", GAME_NOT_WORKING ) | |
| 853 | /* 10 */ GAME( 19??, mt_aftrb, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "After Burner (Mega-Tech, SMS based)", GAME_NOT_WORKING) /* sms */ | |
| 854 | /* 11 */ GAME( 1989, mt_tfor2, megatech, megatech, megadriv, mtnew, ROT0, "Tecno Soft / Sega", "Thunder Force II MD (Mega-Tech)", GAME_NOT_WORKING ) | |
| 964 | 855 | /* 12 */ // unknown |
| 965 | /* 13 */ GAME( 19??, mt_astro, megatech, megatech, megate | |
| 856 | /* 13 */ GAME( 19??, mt_astro, megatech, megatech, megadriv, mtnew | |
| 966 | 857 | /* 14 */ // unknown |
| 967 | 858 | /* 15 */ // unknown |
| 968 | 859 | /* 16 */ // unknown |
| 969 | 860 | /* 17 */ // unknown |
| 970 | 861 | /* 18 */ // unknown |
| 971 | 862 | /* 19 */ // unknown |
| 972 | /* 20 */ GAME( 1989, mt_lastb, megatech, megatech, megatech, 0, ROT0, "Sega", "Last Battle (Mega-Tech)", GAME_NOT_WORKING ) | |
| 973 | /* 21 */ GAME( 1989, mt_wcsoc, megatech, megatech, megatech, 0, ROT0, "Sega", "World Championship Soccer (Mega-Tech)", GAME_NOT_WORKING ) | |
| 974 | /* 22 */ GAME( 19??, mt_tetri, megatech, megatech, megatech, 0, ROT0, "Sega", "Tetris (Mega-Tech)", GAME_NOT_WORKING ) | |
| 975 | /* 23 */ GAME( 1989, mt_gng, megatech, megatech, megatech, 0, ROT0, "Capcom / Sega", "Ghouls'n Ghosts (Mega-Tech)", GAME_NOT_WORKING ) | |
| 976 | /* 24 */ GAME( 1989, mt_shang, megatech, megatech, megatech, 0, ROT0, "Sega", "Super Hang-On (Mega-Tech)", GAME_NOT_WORKING ) | |
| 977 | /* 25 */ GAME( 1989, mt_gaxe, megatech, megatech, megatech, 0, ROT0, "Sega", "Golden Axe (Mega-Tech)", GAME_NOT_WORKING ) | |
| 978 | /* 26 */ GAME( 1989, mt_fwrld, megatech, megatech, megatech, 0, ROT0, "Sega", "Forgotten Worlds (Mega-Tech)", GAME_NOT_WORKING ) | |
| 979 | /* 27 */ GAME( 1989, mt_mystd, megatech, megatech, megatech, 0, ROT0, "Sega", "Mystic Defender (Mega-Tech)", GAME_NOT_WORKING ) | |
| 980 | /* 28 */ GAME( 1989, mt_revsh, megatech, megatech, megatech, 0, ROT0, "Sega", "The Revenge of Shinobi (Mega-Tech)", GAME_NOT_WORKING ) | |
| 981 | /* 29 */ GAME( 19??, mt_parlg, megatech, megatech, megatech, 0, ROT0, "Sega", "Parlour Games (Mega-Tech)", GAME_NOT_WORKING ) /* sms! */ | |
| 863 | /* 20 */ GAME( 1989, mt_lastb, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Last Battle (Mega-Tech)", GAME_NOT_WORKING ) | |
| 864 | /* 21 */ GAME( 1989, mt_wcsoc, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "World Championship Soccer (Mega-Tech)", GAME_NOT_WORKING ) | |
| 865 | /* 22 */ GAME( 19??, mt_tetri, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Tetris (Mega-Tech)", GAME_NOT_WORKING ) | |
| 866 | /* 23 */ GAME( 1989, mt_gng, megatech, megatech, megadriv, mtnew, ROT0, "Capcom / Sega", "Ghouls'n Ghosts (Mega-Tech)", GAME_NOT_WORKING ) | |
| 867 | /* 24 */ GAME( 1989, mt_shang, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Super Hang-On (Mega-Tech)", GAME_NOT_WORKING ) | |
| 868 | /* 25 */ GAME( 1989, mt_gaxe, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Golden Axe (Mega-Tech)", GAME_NOT_WORKING ) | |
| 869 | /* 26 */ GAME( 1989, mt_fwrld, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Forgotten Worlds (Mega-Tech)", GAME_NOT_WORKING ) | |
| 870 | /* 27 */ GAME( 1989, mt_mystd, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Mystic Defender (Mega-Tech)", GAME_NOT_WORKING ) | |
| 871 | /* 28 */ GAME( 1989, mt_revsh, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "The Revenge of Shinobi (Mega-Tech)", GAME_NOT_WORKING ) | |
| 872 | /* 29 */ GAME( 19??, mt_parlg, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Parlour Games (Mega-Tech, SMS based)", GAME_NOT_WORKING ) /* sms! */ | |
| 982 | 873 | /* 30 */ // unknown |
| 983 | /* 31 */ GAME( 1989, mt_tgolf, megatech, megatech, megatech, 0, ROT0, "Sega", "Arnold Palmer Tournament Golf (Mega-Tech)", GAME_NOT_WORKING ) | |
| 984 | /* 32 */ GAME( 1989, mt_srbb, megatech, megatech, megatech, 0, ROT0, "Sega", "Super Real Basketball (Mega-Tech)", GAME_NOT_WORKING ) | |
| 874 | /* 31 */ GAME( 1989, mt_tgolf, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Arnold Palmer Tournament Golf (Mega-Tech)", GAME_NOT_WORKING ) | |
| 875 | /* 32 */ GAME( 1989, mt_srbb, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Super Real Basketball (Mega-Tech)", GAME_NOT_WORKING ) | |
| 985 | 876 | /* 33 */ // unknown |
| 986 | 877 | /* 34 */ // unknown |
| 987 | /* 35 */ GAME( 1989, mt_tlbba, megatech, megatech, megatech, 0, ROT0, "Sega", "Tommy Lasorda Baseball (Mega-Tech)", GAME_NOT_WORKING ) | |
| 988 | /* 36 */ GAME( 1990, mt_cols, megatech, megatech, megatech, 0, ROT0, "Sega", "Columns (Mega-Tech)", GAME_NOT_WORKING ) | |
| 878 | /* 35 */ GAME( 1989, mt_tlbba, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Tommy Lasorda Baseball (Mega-Tech)", GAME_NOT_WORKING ) | |
| 879 | /* 36 */ GAME( 1990, mt_cols, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Columns (Mega-Tech)", GAME_NOT_WORKING ) | |
| 989 | 880 | /* 37 */ // unknown |
| 990 | /* 38 */ GAME( 1990, mt_eswat, megatech, megatech, megatech, 0, ROT0, "Sega", "Cyber Police ESWAT: Enhanced Special Weapons and Tactics (Mega-Tech)", GAME_NOT_WORKING ) | |
| 991 | /* 39 */ GAME( 1990, mt_smgp, megatech, megatech, megatech, 0, ROT0, "Sega", "Super Monaco GP (Mega-Tech)", GAME_NOT_WORKING ) | |
| 992 | /* 40 */ GAME( 1990, mt_mwalk, megatech, megatech, megatech, 0, ROT0, "Sega", "Moonwalker (Mega-Tech)", GAME_NOT_WORKING ) | |
| 993 | /* 41 */ GAME( 1990, mt_crack, megatech, megatech, megatech, 0, ROT0, "Sega", "Crack Down (Mega-Tech)", GAME_NOT_WORKING ) | |
| 881 | /* 38 */ GAME( 1990, mt_eswat, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Cyber Police ESWAT: Enhanced Special Weapons and Tactics (Mega-Tech)", GAME_NOT_WORKING ) | |
| 882 | /* 39 */ GAME( 1990, mt_smgp, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Super Monaco GP (Mega-Tech)", GAME_NOT_WORKING ) | |
| 883 | /* 40 */ GAME( 1990, mt_mwalk, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Moonwalker (Mega-Tech)", GAME_NOT_WORKING ) | |
| 884 | /* 41 */ GAME( 1990, mt_crack, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Crack Down (Mega-Tech)", GAME_NOT_WORKING ) | |
| 994 | 885 | /* 42 */ // unknown |
| 995 | 886 | /* 43 */ // unknown |
| 996 | /* 44 */ GAME( 1990, mt_arrow, megatech, megatech, mega | |
| 887 | /* 44 */ GAME( 1990, mt_arrow, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Arrow Flash (Mega-Tech)", GAME_NOT_WORKING ) | |
| 997 | 888 | /* 45 */ // unknown |
| 998 | 889 | /* 46 */ // unknown |
| 999 | /* 47 */ GAME( 1990, mt_astrm, megatech, megatech, mega | |
| 890 | /* 47 */ GAME( 1990, mt_astrm, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Alien Storm (Mega-Tech", GAME_NOT_WORKING ) | |
| 1000 | 891 | /* 48 */ // unknown |
| 1001 | /* 49 */ GAME( 1991, mt_bbros, megatech, megatech, mega | |
| 892 | /* 49 */ GAME( 1991, mt_bbros, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Bonanza Bros. (Mega-Tech)", GAME_NOT_WORKING ) | |
| 1002 | 893 | /* 50 */ // unknown |
| 1003 | 894 | /* 51 */ // unknown |
| 1004 | /* 52 */ GAME( 1991, mt_sonic, megatech, megatech, megatech, 0, ROT0, "Sega", "Sonic The Hedgehog (Mega-Tech, set 1)", GAME_NOT_WORKING ) | |
| 1005 | /* */ GAME( 1991, mt_sonia, mt_sonic, megatech, megatech, 0, ROT0, "Sega", "Sonic The Hedgehog (Mega-Tech, set 2)", GAME_NOT_WORKING ) | |
| 1006 | /* 53 */ GAME( 1990, mt_fshrk, megatech, megatech, megatech, 0, ROT0, "Toaplan / Sega", "Fire Shark (Mega-Tech)", GAME_NOT_WORKING ) | |
| 895 | /* 52 */ GAME( 1991, mt_sonic, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Sonic The Hedgehog (Mega-Tech, set 1)", GAME_NOT_WORKING ) | |
| 896 | /* */ GAME( 1991, mt_sonia, mt_sonic, megatech, megadriv, mtnew, ROT0, "Sega", "Sonic The Hedgehog (Mega-Tech, set 2)", GAME_NOT_WORKING ) | |
| 897 | /* 53 */ GAME( 1990, mt_fshrk, megatech, megatech, megadriv, mtnew, ROT0, "Toaplan / Sega", "Fire Shark (Mega-Tech)", GAME_NOT_WORKING ) | |
| 1007 | 898 | /* 54 */ // unknown |
| 1008 | 899 | /* 55 */ // unknown |
| 1009 | 900 | /* 56 */ // unknown |
| 1010 | /* 57 */ GAME( 1991, mt_gaxe2, megatech, megatech, megatech, 0, ROT0, "Sega", "Golden Axe II (Mega-Tech)", GAME_NOT_WORKING ) | |
| 1011 | /* 58 */ GAME( 1991, mt_stf, megatech, megatech, megatech, 0, ROT0, "Sega", "Joe Montana II: Sports Talk Football (Mega-Tech)", GAME_NOT_WORKING ) | |
| 1012 | /* 59 */ GAME( 1991, mt_mlh, megatech, megatech, megatech, 0, ROT0, "Sega", "Mario Lemieux Hockey (Mega-Tech)", GAME_NOT_WORKING ) | |
| 1013 | /* 60 */ GAME( 1992, mt_kcham, megatech, megatech, megatech, 0, ROT0, "Sega", "Kid Chameleon (Mega-Tech)", GAME_NOT_WORKING ) | |
| 901 | /* 57 */ GAME( 1991, mt_gaxe2, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Golden Axe II (Mega-Tech)", GAME_NOT_WORKING ) | |
| 902 | /* 58 */ GAME( 1991, mt_stf, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Joe Montana II: Sports Talk Football (Mega-Tech)", GAME_NOT_WORKING ) | |
| 903 | /* 59 */ GAME( 1991, mt_mlh, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Mario Lemieux Hockey (Mega-Tech)", GAME_NOT_WORKING ) | |
| 904 | /* 60 */ GAME( 1992, mt_kcham, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Kid Chameleon (Mega-Tech)", GAME_NOT_WORKING ) | |
| 1014 | 905 | /* 61 */ // unknown |
| 1015 | /* 62 */ GAME( 1992, mt_soni2, megatech, megatech, mega | |
| 906 | /* 62 */ GAME( 1992, mt_soni2, megatech, megatech, megadriv, mtnew, ROT0, "Sega", "Sonic The Hedgehog 2 (Mega-Tech)", GAME_NOT_WORKING ) | |
| 1016 | 907 | /* |
| 1017 | 908 | Known to Exist, but nn number currently not known: |
| 1018 | 909 | Wrestle War |
| r1037 | r1038 | |
|---|---|---|
| 1176 | 1176 | } |
| 1177 | 1177 | } |
| 1178 | 1178 | |
| 1179 | #ifdef UNUSED_FUNCTION | |
| 1179 | 1180 | static WRITE16_HANDLER( vbowl_unk_w ) |
| 1180 | 1181 | { |
| 1181 | 1182 | } |
| 1183 | #endif | |
| 1182 | 1184 | |
| 1183 | 1185 | static READ16_HANDLER( vbowl_unk_r ) |
| 1184 | 1186 | { |
| r1037 | r1038 | |
|---|---|---|
| 49 | 49 | cpunum_set_input_line(0,1,HOLD_LINE); |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | #ifdef UNUSED_FUNCTION | |
| 52 | 53 | static TIMER_CALLBACK( gcpinbal_interrupt3 ) |
| 53 | 54 | { |
| 54 | 55 | // IRQ3 is from the M6585 |
| r1037 | r1038 | |
| 57 | 58 | cpunum_set_input_line(0,3,HOLD_LINE); |
| 58 | 59 | } |
| 59 | 60 | } |
| 61 | #endif | |
| 60 | 62 | |
| 61 | 63 | static INTERRUPT_GEN( gcpinbal_interrupt ) |
| 62 | 64 | { |
| r1037 | r1038 | |
|---|---|---|
| 314 | 314 | |
| 315 | 315 | /******************************************************************************/ |
| 316 | 316 | |
| 317 | ROM_START( battlera ) | |
| 318 | ROM_REGION( 0x100000, REGION_CPU1, 0 ) /* Main cpu code */ | |
| 319 | ROM_LOAD( "00_e1.bin", 0x00000, 0x10000, CRC(aa1cbe69) SHA1(982530f3202bc7b8d94d2b818873b71f02c0e8de) ) /* ET00 */ | |
| 320 | ROM_LOAD( "es01.rom", 0x10000, 0x10000, CRC(9fea3189) SHA1(0692df6df533dfe55f61df8aa0c5c11944ba3ae3) ) /* ET01 */ | |
| 321 | ROM_LOAD( "02_e4.bin", 0x20000, 0x10000, CRC(cd72f580) SHA1(43b476c8f554348b02aa9558c0773f47cdb47fe0) ) /* ET02, etc */ | |
| 322 | /* Rom sockets 0x30000 - 0x70000 are unused */ | |
| 323 | ROM_LOAD( "es05.rom", 0x80000, 0x10000, CRC(551fa331) SHA1(a70c627c572ba1b8029f61eae6eaad9825c56339) ) | |
| 324 | ROM_LOAD( "es06.rom", 0x90000, 0x10000, CRC(ab91aac8) SHA1(81d820c8b70281a4a52f7ec75a3c54377011d9d9) ) | |
| 325 | ROM_LOAD( "es07.rom", 0xa0000, 0x10000, CRC(8d15a3d0) SHA1(afae081ee5e0de359cae6a7ea8401237c5ab7095) ) | |
| 326 | ROM_LOAD( "es08.rom", 0xb0000, 0x10000, CRC(38f06039) SHA1(cc394f161b2c4423cd2da763701ceaad7d27f741) ) | |
| 327 | ROM_LOAD( "es09.rom", 0xc0000, 0x10000, CRC(b718c47d) SHA1(1d5b2ec819b0848e5b883373887445a63ebddb06) ) | |
| 328 | ROM_LOAD( "es10-1.rom",0xd0000, 0x10000, CRC(d3cddc02) SHA1(d212127a9d7aff384171d79c563f1516c0bd46ae) ) | |
| 329 | /* Rom sockets 0xe0000 - 0x100000 are unused */ | |
| 330 | ||
| 331 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* Sound CPU */ | |
| 332 | ROM_LOAD( "es11.rom", 0x00000, 0x10000, CRC(f5b29c9c) SHA1(44dcdf96f8deb9a29aa9d94a8b9cf91a0ed808d4) ) | |
| 333 | ROM_END | |
| 334 | ||
| 317 | 335 | ROM_START( bldwolf ) |
| 318 | 336 | ROM_REGION( 0x100000, REGION_CPU1, 0 ) /* Main cpu code */ |
| 319 | 337 | ROM_LOAD( "es00-1.rom", 0x00000, 0x10000, CRC(ff4aa252) SHA1(3c190e49020bb6923abb3f3c2632d3c86443c292) ) |
| r1037 | r1038 | |
| 332 | 350 | ROM_LOAD( "es11.rom", 0x00000, 0x10000, CRC(f5b29c9c) SHA1(44dcdf96f8deb9a29aa9d94a8b9cf91a0ed808d4) ) |
| 333 | 351 | ROM_END |
| 334 | 352 | |
| 335 | ROM_START( batt | |
| 353 | ROM_START( bldwolfj ) /* note, rom codes are ER not ES even if the content of some roms is identical */ | |
| 336 | 354 | ROM_REGION( 0x100000, REGION_CPU1, 0 ) /* Main cpu code */ |
| 337 | ROM_LOAD( "00_e1.bin", 0x00000, 0x10000, CRC(aa1cbe69) SHA1(982530f3202bc7b8d94d2b818873b71f02c0e8de) ) /* ET00 */ | |
| 338 | ROM_LOAD( "es01.rom", 0x10000, 0x10000, CRC(9fea3189) SHA1(0692df6df533dfe55f61df8aa0c5c11944ba3ae3) ) /* ET01 */ | |
| 339 | ROM_LOAD( "02_e4.bin", 0x20000, 0x10000, CRC(cd72f580) SHA1(43b476c8f554348b02aa9558c0773f47cdb47fe0) ) /* ET02, etc */ | |
| 355 | ROM_LOAD( "er00-.0-0", 0x00000, 0x10000, CRC(3819a14e) SHA1(0222051e0b5ec87a18f2e6e9155034f91898c14f) ) | |
| 356 | ROM_LOAD( "er01-.0-1", 0x10000, 0x10000, CRC(763cf206) SHA1(0f1c0f80a6aaad0c987c2ba3fdd01db1f5ceb7e6) ) | |
| 357 | ROM_LOAD( "er02-.0-2", 0x20000, 0x10000, CRC(bcad8a0f) SHA1(e7c69d2c894eaedd10ce02f6bceaa43bb060afb9) ) | |
| 340 | 358 | /* Rom sockets 0x30000 - 0x70000 are unused */ |
| 341 | ROM_LOAD( "es05.rom", 0x80000, 0x10000, CRC(551fa331) SHA1(a70c627c572ba1b8029f61eae6eaad9825c56339) ) | |
| 342 | ROM_LOAD( "es06.rom", 0x90000, 0x10000, CRC(ab91aac8) SHA1(81d820c8b70281a4a52f7ec75a3c54377011d9d9) ) | |
| 343 | ROM_LOAD( "es07.rom", 0xa0000, 0x10000, CRC(8d15a3d0) SHA1(afae081ee5e0de359cae6a7ea8401237c5ab7095) ) | |
| 344 | ROM_LOAD( "es08.rom", 0xb0000, 0x10000, CRC(38f06039) SHA1(cc394f161b2c4423cd2da763701ceaad7d27f741) ) | |
| 345 | ROM_LOAD( "es09.rom", 0xc0000, 0x10000, CRC(b718c47d) SHA1(1d5b2ec819b0848e5b883373887445a63ebddb06) ) | |
| 346 | ROM_LOAD( "es10-1.rom",0xd0000, 0x10000, CRC(d3cddc02) SHA1(d212127a9d7aff384171d79c563f1516c0bd46ae) ) | |
| 359 | ROM_LOAD( "er05-.1-0", 0x80000, 0x10000, CRC(551fa331) SHA1(a70c627c572ba1b8029f61eae6eaad9825c56339) ) | |
| 360 | ROM_LOAD( "er06-.1-1", 0x90000, 0x10000, CRC(ab91aac8) SHA1(81d820c8b70281a4a52f7ec75a3c54377011d9d9) ) | |
| 361 | ROM_LOAD( "er07-.1-2", 0xa0000, 0x10000, CRC(8d15a3d0) SHA1(afae081ee5e0de359cae6a7ea8401237c5ab7095) ) | |
| 362 | ROM_LOAD( "er08-.1-3", 0xb0000, 0x10000, CRC(38f06039) SHA1(cc394f161b2c4423cd2da763701ceaad7d27f741) ) | |
| 363 | ROM_LOAD( "er09-.1-4", 0xc0000, 0x10000, CRC(b718c47d) SHA1(1d5b2ec819b0848e5b883373887445a63ebddb06) ) | |
| 364 | ROM_LOAD( "er10-.1-5", 0xd0000, 0x10000, CRC(d3cddc02) SHA1(d212127a9d7aff384171d79c563f1516c0bd46ae) ) | |
| 347 | 365 | /* Rom sockets 0xe0000 - 0x100000 are unused */ |
| 348 | 366 | |
| 349 | 367 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* Sound CPU */ |
| 350 | ROM_LOAD( "e | |
| 368 | ROM_LOAD( "er11-.tpg", 0x00000, 0x10000, CRC(f5b29c9c) SHA1(44dcdf96f8deb9a29aa9d94a8b9cf91a0ed808d4) ) | |
| 351 | 369 | ROM_END |
| 352 | 370 | |
| 371 | ||
| 372 | ||
| 353 | 373 | /******************************************************************************/ |
| 354 | 374 | |
| 355 | 375 | GAME( 1988, battlera, 0, battlera, battlera, 0, ROT0, "Data East Corporation", "Battle Rangers (World)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 356 | 376 | GAME( 1988, bldwolf, battlera, battlera, battlera, 0, ROT0, "Data East USA", "Bloody Wolf (US)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 377 | GAME( 1988, bldwolfj, battlera, battlera, battlera, 0, ROT0, "Data East Corporation", "Narazumono Sentai Bloody Wolf (Japan)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| r1037 | r1038 | |
|---|---|---|
| 254 | 254 | extern UINT8 *fortyl_video_ctrl; |
| 255 | 255 | extern int fortyl_pix_color[4]; |
| 256 | 256 | |
| 257 | static UINT8 *undoukai_ram; | |
| 257 | 258 | |
| 258 | 259 | static int sound_nmi_enable,pending_nmi; |
| 259 | 260 | |
| r1037 | r1038 | |
| 432 | 433 | |
| 433 | 434 | static WRITE8_HANDLER( undoukai_mcu_w ) |
| 434 | 435 | { |
| 435 | UINT8 *RAM = memory_region(REGION_CPU1); | |
| 436 | UINT16 ram_adr = RAM[0xa1b5]*0x100 + RAM[0xa1b4]; | |
| 436 | int ram_adr = undoukai_ram[0x1b5]*0x100 + undoukai_ram[0x1b4]; | |
| 437 | 437 | |
| 438 | 438 | int d; |
| 439 | 439 | int i; |
| r1037 | r1038 | |
| 489 | 489 | break; |
| 490 | 490 | |
| 491 | 491 | |
| 492 | ||
| 493 | 492 | case 0x01: |
| 494 | 493 | mcu_out[0][0] = (mcu_in[0][0] ^ (mcu_in[0][0] >> 4)) & 0x0f; |
| 495 | 494 | break; |
| r1037 | r1038 | |
| 574 | 573 | break; |
| 575 | 574 | |
| 576 | 575 | case 0x0e: |
| 577 | mcu_out[1][0] = RAM[ram_adr]; | |
| 578 | mcu_out[1][1] = RAM[ram_adr+1]; | |
| 579 | mcu_out[1][2] = RAM[ram_adr+2] & 0x0f; | |
| 576 | ||
| 577 | if(ram_adr >= 0xa000 && ram_adr < 0xa800) | |
| 578 | { | |
| 579 | ram_adr = ram_adr - 0xa000; | |
| 580 | mcu_out[1][0] = undoukai_ram[ram_adr]; | |
| 581 | mcu_out[1][1] = undoukai_ram[ram_adr+1]; | |
| 582 | mcu_out[1][2] = undoukai_ram[ram_adr+2] & 0x0f; | |
| 583 | } | |
| 580 | 584 | break; |
| 581 | 585 | |
| 582 | ||
| 583 | 586 | default: |
| 584 | 587 | from_mcu = 0x5d; |
| 585 | 588 | |
| r1037 | r1038 | |
| 667 | 670 | |
| 668 | 671 | /***************************************************************************/ |
| 669 | 672 | |
| 670 | static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 671 | ||
| 672 | AM_RANGE(0x0000, 0x7fff) AM_READ(MRA8_ROM) | |
| 673 | AM_RANGE(0x8000, 0x87ff) AM_READ(MRA8_RAM) /* M5517P on main board */ | |
| 674 | AM_RANGE(0xa000, 0xbfff) AM_READ(MRA8_BANK1) | |
| 675 | ||
| 676 | AM_RANGE(0x9000, 0x97ff) AM_READ(fortyl_bg_videoram_r) /* #1 M5517P on video board */ | |
| 677 | AM_RANGE(0x9800, 0x983f) AM_READ(MRA8_RAM) /* video control area */ | |
| 678 | AM_RANGE(0x9840, 0x987f) AM_READ(MRA8_RAM) /* sprites part 1 */ | |
| 679 | AM_RANGE(0x9880, 0x98bf) AM_READ(fortyl_bg_colorram_r) /* background attributes */ | |
| 680 | AM_RANGE(0x98c0, 0x98ff) AM_READ(MRA8_RAM) /* sprites part 2 */ | |
| 681 | ||
| 682 | AM_RANGE(0xc000, 0xffff) AM_READ(fortyl_pixram_r) | |
| 683 | ||
| 684 | ||
| 685 | AM_RANGE(0x8800, 0x8800) AM_READ(fortyl_mcu_r) | |
| 686 | AM_RANGE(0x8801, 0x8801) AM_READ(fortyl_mcu_status_r) | |
| 687 | ||
| 688 | //AM_RANGE(0x8802, 0x8802) AM_READ(pix1_r) // this one is here just for debugging | |
| 689 | AM_RANGE(0x8803, 0x8803) AM_READ(pix2_r) // and this one _is_ used. | |
| 690 | ||
| 691 | AM_RANGE(0x8804, 0x8804) AM_READ(from_snd_r) | |
| 692 | AM_RANGE(0x8805, 0x8805) AM_READ(snd_flag_r) | |
| 693 | AM_RANGE(0x8807, 0x8807) AM_READ(MRA8_NOP) /* unknown */ | |
| 694 | ||
| 673 | static ADDRESS_MAP_START( 40love_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 674 | AM_RANGE(0x0000, 0x7fff) AM_ROM | |
| 675 | AM_RANGE(0x8000, 0x87ff) AM_RAM /* M5517P on main board */ | |
| 676 | AM_RANGE(0x8800, 0x8800) AM_READWRITE(fortyl_mcu_r, fortyl_mcu_w) | |
| 677 | AM_RANGE(0x8801, 0x8801) AM_READWRITE(fortyl_mcu_status_r, pix1_w) //pixel layer related | |
| 678 | AM_RANGE(0x8802, 0x8802) AM_WRITE(bank_select_w) | |
| 679 | AM_RANGE(0x8803, 0x8803) AM_READWRITE(pix2_r, pix2_w) //pixel layer related | |
| 680 | AM_RANGE(0x8804, 0x8804) AM_READWRITE(from_snd_r, sound_command_w) | |
| 681 | AM_RANGE(0x8805, 0x8805) AM_READ(snd_flag_r) AM_WRITENOP /*sound_reset*/ //???? | |
| 682 | AM_RANGE(0x8807, 0x8807) AM_READNOP /* unknown */ | |
| 695 | 683 | AM_RANGE(0x8808, 0x8808) AM_READ(input_port_2_r) |
| 696 | 684 | AM_RANGE(0x8809, 0x8809) AM_READ(input_port_4_r) |
| 697 | 685 | AM_RANGE(0x880a, 0x880a) AM_READ(input_port_3_r) |
| 698 | 686 | AM_RANGE(0x880b, 0x880b) AM_READ(input_port_5_r) |
| 699 | AM_RANGE(0x880c, 0x880c) AM_READ(input_port_0_r) | |
| 700 | AM_RANGE(0x880d, 0x880d) AM_READ(input_port_1_r) | |
| 687 | AM_RANGE(0x880c, 0x880c) AM_READWRITE(input_port_0_r,fortyl_pixram_sel_w) /* pixram bank select */ | |
| 688 | AM_RANGE(0x880d, 0x880d) AM_READ(input_port_1_r) AM_WRITENOP /* unknown */ | |
| 689 | AM_RANGE(0xa000, 0xbfff) AM_ROMBANK(1) | |
| 690 | AM_RANGE(0x9000, 0x97ff) AM_READWRITE(fortyl_bg_videoram_r, fortyl_bg_videoram_w) AM_BASE(&videoram) /* #1 M5517P on video board */ | |
| 691 | AM_RANGE(0x9800, 0x983f) AM_RAM AM_BASE(&fortyl_video_ctrl) /* video control area */ | |
| 692 | AM_RANGE(0x9840, 0x987f) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprites part 1 */ | |
| 693 | AM_RANGE(0x9880, 0x98bf) AM_READWRITE(fortyl_bg_colorram_r, fortyl_bg_colorram_w) AM_BASE(&colorram) /* background attributes (2 bytes per line) */ | |
| 694 | AM_RANGE(0x98c0, 0x98ff) AM_RAM AM_BASE(&spriteram_2) AM_SIZE(&spriteram_2_size)/* sprites part 2 */ | |
| 695 | AM_RANGE(0xc000, 0xffff) AM_READWRITE(fortyl_pixram_r, fortyl_pixram_w) /* banked pixel layer */ | |
| 701 | 696 | ADDRESS_MAP_END |
| 702 | 697 | |
| 703 | static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 704 | AM_RANGE(0x0000, 0x7fff) AM_WRITE(MWA8_ROM) | |
| 705 | AM_RANGE(0x8000, 0x87ff) AM_WRITE(MWA8_RAM) /* M5517P on main board */ | |
| 706 | AM_RANGE(0xa000, 0xbfff) AM_WRITE(MWA8_ROM) | |
| 707 | ||
| 708 | AM_RANGE(0x9000, 0x97ff) AM_WRITE(fortyl_bg_videoram_w) AM_BASE(&videoram) /* #1 M5517P on video board */ | |
| 709 | AM_RANGE(0x9800, 0x983f) AM_WRITE(MWA8_RAM) AM_BASE(&fortyl_video_ctrl) /* video control area */ | |
| 710 | AM_RANGE(0x9840, 0x987f) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprites part 1 */ | |
| 711 | AM_RANGE(0x9880, 0x98bf) AM_WRITE(fortyl_bg_colorram_w) AM_BASE(&colorram) /* background attributes (2 bytes per line) */ | |
| 712 | AM_RANGE(0x98c0, 0x98ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram_2) AM_SIZE(&spriteram_2_size)/* sprites part 2 */ | |
| 713 | ||
| 714 | AM_RANGE(0xc000, 0xffff) AM_WRITE(fortyl_pixram_w) /* banked pixel layer */ | |
| 715 | ||
| 716 | ||
| 717 | AM_RANGE(0x8800, 0x8800) AM_WRITE(fortyl_mcu_w) | |
| 718 | AM_RANGE(0x8801, 0x8801) AM_WRITE(pix1_w) //pixel layer related | |
| 719 | AM_RANGE(0x8802, 0x8802) AM_WRITE(bank_select_w) | |
| 720 | AM_RANGE(0x8803, 0x8803) AM_WRITE(pix2_w) //pixel layer related | |
| 721 | AM_RANGE(0x8804, 0x8804) AM_WRITE(sound_command_w) | |
| 722 | // AM_RANGE(0x8805, 0x8805) AM_WRITE(MWA8_NOP /*sound_reset*/) //???? | |
| 723 | AM_RANGE(0x880c, 0x880c) AM_WRITE(fortyl_pixram_sel_w) /* pixram bank select */ | |
| 724 | AM_RANGE(0x880d, 0x880d) AM_WRITE(MWA8_NOP) /* unknown */ | |
| 725 | ||
| 726 | ADDRESS_MAP_END | |
| 727 | ||
| 728 | static ADDRESS_MAP_START( undoukai_readmem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 729 | ||
| 730 | AM_RANGE(0x0000, 0x7fff) AM_READ(MRA8_ROM) | |
| 731 | AM_RANGE(0x8000, 0x9fff) AM_READ(MRA8_BANK1) | |
| 732 | AM_RANGE(0xa000, 0xa7ff) AM_READ(MRA8_RAM) /* M5517P on main board */ | |
| 733 | ||
| 734 | AM_RANGE(0xb000, 0xb7ff) AM_READ(fortyl_bg_videoram_r) /* #1 M5517P on video board */ | |
| 735 | AM_RANGE(0xb800, 0xb83f) AM_READ(MRA8_RAM) /* video control area */ | |
| 736 | AM_RANGE(0xb840, 0xb87f) AM_READ(MRA8_RAM) /* sprites part 1 */ | |
| 737 | AM_RANGE(0xb880, 0xb8bf) AM_READ(fortyl_bg_colorram_r) /* background attributes */ | |
| 738 | AM_RANGE(0xb8c0, 0xb8ff) AM_READ(MRA8_RAM) /* sprites part 2 */ | |
| 739 | ||
| 740 | AM_RANGE(0xc000, 0xffff) AM_READ(fortyl_pixram_r) | |
| 741 | ||
| 742 | ||
| 743 | AM_RANGE(0xa800, 0xa800) AM_READ(undoukai_mcu_r) | |
| 744 | AM_RANGE(0xa801, 0xa801) AM_READ(undoukai_mcu_status_r) | |
| 745 | ||
| 746 | //AM_RANGE(0xa802, 0xa802) AM_READ(pix1_r) // this one is here just for debugging | |
| 747 | AM_RANGE(0xa803, 0xa803) AM_READ(pix2_r) // and this one _is_ used. | |
| 748 | ||
| 749 | AM_RANGE(0xa804, 0xa804) AM_READ(from_snd_r) | |
| 750 | AM_RANGE(0xa805, 0xa805) AM_READ(snd_flag_r) | |
| 751 | AM_RANGE(0xa807, 0xa807) AM_READ(MRA8_NOP) /* unknown */ | |
| 752 | ||
| 698 | static ADDRESS_MAP_START( undoukai_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 699 | AM_RANGE(0x0000, 0x7fff) AM_ROM | |
| 700 | AM_RANGE(0x8000, 0x9fff) AM_ROMBANK(1) | |
| 701 | AM_RANGE(0xa000, 0xa7ff) AM_RAM AM_BASE(&undoukai_ram) /* M5517P on main board */ | |
| 702 | AM_RANGE(0xa800, 0xa800) AM_READWRITE(undoukai_mcu_r, undoukai_mcu_w) | |
| 703 | AM_RANGE(0xa801, 0xa801) AM_READWRITE(undoukai_mcu_status_r, pix1_w) //pixel layer related | |
| 704 | AM_RANGE(0xa802, 0xa802) AM_WRITE(bank_select_w) | |
| 705 | AM_RANGE(0xa803, 0xa803) AM_READWRITE(pix2_r, pix2_w) //pixel layer related | |
| 706 | AM_RANGE(0xa804, 0xa804) AM_READWRITE(from_snd_r, sound_command_w) | |
| 707 | AM_RANGE(0xa805, 0xa805) AM_READ(snd_flag_r) AM_WRITENOP /*sound_reset*/ //???? | |
| 708 | AM_RANGE(0xa807, 0xa807) AM_READNOP AM_WRITENOP /* unknown */ | |
| 753 | 709 | AM_RANGE(0xa808, 0xa808) AM_READ(input_port_2_r) |
| 754 | 710 | AM_RANGE(0xa809, 0xa809) AM_READ(input_port_4_r) |
| 755 | 711 | AM_RANGE(0xa80a, 0xa80a) AM_READ(input_port_3_r) |
| 756 | 712 | AM_RANGE(0xa80b, 0xa80b) AM_READ(input_port_5_r) |
| 757 | AM_RANGE(0xa80c, 0xa80c) AM_READ(input_port_0_r) | |
| 758 | AM_RANGE(0xa80d, 0xa80d) AM_READ(input_port_1_r) | |
| 713 | AM_RANGE(0xa80c, 0xa80c) AM_READWRITE(input_port_0_r, fortyl_pixram_sel_w) /* pixram bank select */ | |
| 714 | AM_RANGE(0xa80d, 0xa80d) AM_READ(input_port_1_r) AM_WRITENOP /* unknown */ | |
| 715 | AM_RANGE(0xb000, 0xb7ff) AM_READWRITE(fortyl_bg_videoram_r, fortyl_bg_videoram_w) AM_BASE(&videoram) /* #1 M5517P on video board */ | |
| 716 | AM_RANGE(0xb800, 0xb83f) AM_RAM AM_BASE(&fortyl_video_ctrl) /* video control area */ | |
| 717 | AM_RANGE(0xb840, 0xb87f) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprites part 1 */ | |
| 718 | AM_RANGE(0xb880, 0xb8bf) AM_READWRITE(fortyl_bg_colorram_r, fortyl_bg_colorram_w) AM_BASE(&colorram) /* background attributes (2 bytes per line) */ | |
| 719 | AM_RANGE(0xb8e0, 0xb8ff) AM_RAM AM_BASE(&spriteram_2) AM_SIZE(&spriteram_2_size) /* sprites part 2 */ | |
| 720 | AM_RANGE(0xc000, 0xffff) AM_READWRITE(fortyl_pixram_r, fortyl_pixram_w) | |
| 759 | 721 | ADDRESS_MAP_END |
| 760 | 722 | |
| 761 | static ADDRESS_MAP_START( undoukai_writemem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 762 | AM_RANGE(0x0000, 0x7fff) AM_WRITE(MWA8_ROM) | |
| 763 | AM_RANGE(0x8000, 0x9fff) AM_WRITE(MWA8_ROM) | |
| 764 | AM_RANGE(0xa000, 0xa7ff) AM_WRITE(MWA8_RAM) /* M5517P on main board */ | |
| 765 | 723 | |
| 766 | AM_RANGE(0xa800, 0xa800) AM_WRITE(undoukai_mcu_w) | |
| 767 | AM_RANGE(0xa801, 0xa801) AM_WRITE(pix1_w) //pixel layer related | |
| 768 | AM_RANGE(0xa802, 0xa802) AM_WRITE(bank_select_w) | |
| 769 | AM_RANGE(0xa803, 0xa803) AM_WRITE(pix2_w) //pixel layer related | |
| 770 | AM_RANGE(0xa804, 0xa804) AM_WRITE(sound_command_w) | |
| 771 | AM_RANGE(0xa805, 0xa805) AM_WRITE(MWA8_NOP) /*sound_reset*/ //???? | |
| 772 | AM_RANGE(0xa807, 0xa807) AM_WRITE(MWA8_NOP) /* unknown */ | |
| 773 | AM_RANGE(0xa80c, 0xa80c) AM_WRITE(fortyl_pixram_sel_w) /* pixram bank select */ | |
| 774 | AM_RANGE(0xa80d, 0xa80d) AM_WRITE(MWA8_NOP) /* unknown */ | |
| 775 | ||
| 776 | AM_RANGE(0xb000, 0xb7ff) AM_WRITE(fortyl_bg_videoram_w) AM_BASE(&videoram) /* #1 M5517P on video board */ | |
| 777 | AM_RANGE(0xb800, 0xb83f) AM_WRITE(MWA8_RAM) AM_BASE(&fortyl_video_ctrl) /* video control area */ | |
| 778 | AM_RANGE(0xb840, 0xb87f) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprites part 1 */ | |
| 779 | AM_RANGE(0xb880, 0xb8bf) AM_WRITE(fortyl_bg_colorram_w) AM_BASE(&colorram) /* background attributes (2 bytes per line) */ | |
| 780 | AM_RANGE(0xb8e0, 0xb8ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram_2) AM_SIZE(&spriteram_2_size)/* sprites part 2 */ | |
| 781 | ||
| 782 | AM_RANGE(0xc000, 0xffff) AM_WRITE(fortyl_pixram_w) | |
| 783 | ADDRESS_MAP_END | |
| 784 | ||
| 785 | ||
| 786 | static ADDRESS_MAP_START( readmem_sound, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 787 | AM_RANGE(0x0000, 0xbfff) AM_READ(MRA8_ROM) | |
| 788 | AM_RANGE(0xc000, 0xc7ff) AM_READ(MRA8_RAM) | |
| 789 | AM_RANGE(0xd800, 0xd800) AM_READ(soundlatch_r) | |
| 790 | AM_RANGE(0xda00, 0xda00) AM_READ(MRA8_NOP) /* unknown */ | |
| 791 | AM_RANGE(0xde00, 0xde00) AM_READ(MRA8_NOP) /* unknown */ | |
| 792 | AM_RANGE(0xe000, 0xefff) AM_READ(MRA8_ROM) /* space for diagnostics ROM */ | |
| 793 | ADDRESS_MAP_END | |
| 794 | ||
| 795 | 724 | static int vol_ctrl[16]; |
| 796 | 725 | |
| 797 | 726 | static MACHINE_RESET( ta7630 ) |
| r1037 | r1038 | |
| 856 | 785 | // popmessage("SND3 0=%02x 1=%02x 2=%02x 3=%02x", snd_ctrl0, snd_ctrl1, snd_ctrl2, snd_ctrl3); |
| 857 | 786 | } |
| 858 | 787 | |
| 859 | static ADDRESS_MAP_START( writemem_sound, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 860 | AM_RANGE(0x0000, 0xbfff) AM_WRITE(MWA8_ROM) | |
| 861 | AM_RANGE(0xc000, 0xc7ff) AM_WRITE(MWA8_RAM) | |
| 788 | static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 789 | AM_RANGE(0x0000, 0xbfff) AM_ROM | |
| 790 | AM_RANGE(0xc000, 0xc7ff) AM_RAM | |
| 862 | 791 | AM_RANGE(0xc800, 0xc800) AM_WRITE(AY8910_control_port_0_w) |
| 863 | 792 | AM_RANGE(0xc801, 0xc801) AM_WRITE(AY8910_write_port_0_w) |
| 864 | 793 | AM_RANGE(0xca00, 0xca0d) AM_WRITE(MSM5232_0_w) |
| 865 | 794 | AM_RANGE(0xcc00, 0xcc00) AM_WRITE(sound_control_0_w) |
| 866 | 795 | AM_RANGE(0xce00, 0xce00) AM_WRITE(sound_control_1_w) |
| 867 | AM_RANGE(0xd800, 0xd800) AM_WRITE(to_main_w) | |
| 868 | AM_RANGE(0xda00, 0xda00) AM_WRITE(nmi_enable_w) | |
| 796 | AM_RANGE(0xd800, 0xd800) AM_READWRITE(soundlatch_r, to_main_w) | |
| 797 | AM_RANGE(0xda00, 0xda00) AM_READNOP AM_WRITE(nmi_enable_w) /* unknown read */ | |
| 869 | 798 | AM_RANGE(0xdc00, 0xdc00) AM_WRITE(nmi_disable_w) |
| 870 | AM_RANGE(0xde00, 0xde00) AM_WRITE(DAC_0_signed_data_w) /* signed 8-bit DAC */ | |
| 871 | AM_RANGE(0xe000, 0xefff) AM_WRITE(MWA8_ROM) | |
| 799 | AM_RANGE(0xde00, 0xde00) AM_READNOP AM_WRITE(DAC_0_signed_data_w) /* signed 8-bit DAC - unknown read */ | |
| 800 | AM_RANGE(0xe000, 0xefff) AM_ROM /* space for diagnostics ROM */ | |
| 872 | 801 | ADDRESS_MAP_END |
| 873 | 802 | |
| 874 | ||
| 875 | static ADDRESS_MAP_START( mcu_readmem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 803 | static ADDRESS_MAP_START( mcu_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 876 | 804 | ADDRESS_MAP_FLAGS( AMEF_ABITS(11) ) |
| 877 | AM_RANGE(0x0000, 0x0000) AM_READ(buggychl_68705_portA_r) | |
| 878 | AM_RANGE(0x0001, 0x0001) AM_READ(buggychl_68705_portB_r) | |
| 879 | AM_RANGE(0x0002, 0x0002) AM_READ(buggychl_68705_portC_r) | |
| 880 | AM_RANGE(0x0010, 0x007f) AM_READ(MRA8_RAM) | |
| 881 | AM_RANGE(0x0080, 0x07ff) AM_READ(MRA8_ROM) | |
| 882 | ADDRESS_MAP_END | |
| 883 | ||
| 884 | static ADDRESS_MAP_START( mcu_writemem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 885 | ADDRESS_MAP_FLAGS( AMEF_ABITS(11) ) | |
| 886 | AM_RANGE(0x0000, 0x0000) AM_WRITE(buggychl_68705_portA_w) | |
| 887 | AM_RANGE(0x0001, 0x0001) AM_WRITE(buggychl_68705_portB_w) | |
| 888 | AM_RANGE(0x0002, 0x0002) AM_WRITE(buggychl_68705_portC_w) | |
| 805 | AM_RANGE(0x0000, 0x0000) AM_READWRITE(buggychl_68705_portA_r, buggychl_68705_portA_w) | |
| 806 | AM_RANGE(0x0001, 0x0001) AM_READWRITE(buggychl_68705_portB_r, buggychl_68705_portB_w) | |
| 807 | AM_RANGE(0x0002, 0x0002) AM_READWRITE(buggychl_68705_portC_r, buggychl_68705_portC_w) | |
| 889 | 808 | AM_RANGE(0x0004, 0x0004) AM_WRITE(buggychl_68705_ddrA_w) |
| 890 | 809 | AM_RANGE(0x0005, 0x0005) AM_WRITE(buggychl_68705_ddrB_w) |
| 891 | 810 | AM_RANGE(0x0006, 0x0006) AM_WRITE(buggychl_68705_ddrC_w) |
| 892 | AM_RANGE(0x0010, 0x007f) AM_WRITE(MWA8_RAM) | |
| 893 | AM_RANGE(0x0080, 0x07ff) AM_WRITE(MWA8_ROM) | |
| 811 | AM_RANGE(0x0010, 0x007f) AM_RAM | |
| 812 | AM_RANGE(0x0080, 0x07ff) AM_ROM | |
| 894 | 813 | ADDRESS_MAP_END |
| 895 | 814 | |
| 896 | 815 | |
| r1037 | r1038 | |
| 1180 | 1099 | |
| 1181 | 1100 | /* basic machine hardware */ |
| 1182 | 1101 | MDRV_CPU_ADD(Z80,8000000/2) /* OK */ |
| 1183 | MDRV_CPU_PROGRAM_MAP( | |
| 1102 | MDRV_CPU_PROGRAM_MAP(40love_ | |
| 1184 | 1103 | MDRV_CPU_VBLANK_INT(irq0_line_hold,1) |
| 1185 | 1104 | |
| 1186 | 1105 | MDRV_CPU_ADD(Z80,8000000/2) |
| 1187 | 1106 | /* audio CPU */ /* OK */ |
| 1188 | MDRV_CPU_PROGRAM_MAP( | |
| 1107 | MDRV_CPU_PROGRAM_MAP( | |
| 1189 | 1108 | MDRV_CPU_VBLANK_INT(irq0_line_hold,2) /* source/number of IRQs is unknown */ |
| 1190 | 1109 | |
| 1191 | 1110 | MDRV_CPU_ADD(M68705,18432000/6/M68705_CLOCK_DIVIDER) /* OK */ |
| 1192 | MDRV_CPU_PROGRAM_MAP(mcu_ | |
| 1111 | MDRV_CPU_PROGRAM_MAP(mcu_ | |
| 1193 | 1112 | |
| 1194 | 1113 | MDRV_SCREEN_REFRESH_RATE(60) |
| 1195 | 1114 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_REAL_60HZ_VBLANK_DURATION) |
| r1037 | r1038 | |
| 1227 | 1146 | |
| 1228 | 1147 | /* basic machine hardware */ |
| 1229 | 1148 | MDRV_CPU_ADD(Z80,8000000/2) |
| 1230 | MDRV_CPU_PROGRAM_MAP(undoukai_ | |
| 1149 | MDRV_CPU_PROGRAM_MAP(undoukai_ | |
| 1231 | 1150 | MDRV_CPU_VBLANK_INT(irq0_line_hold,1) |
| 1232 | 1151 | |
| 1233 | 1152 | MDRV_CPU_ADD(Z80,8000000/2) |
| 1234 | 1153 | /* audio CPU */ |
| 1235 | MDRV_CPU_PROGRAM_MAP( | |
| 1154 | MDRV_CPU_PROGRAM_MAP( | |
| 1236 | 1155 | MDRV_CPU_VBLANK_INT(irq0_line_hold,2) /* source/number of IRQs is unknown */ |
| 1237 | 1156 | |
| 1238 | 1157 | // MDRV_CPU_ADD(M68705,18432000/6/M68705_CLOCK_DIVIDER) |
| 1239 | // MDRV_CPU_PROGRAM_MAP(mcu_ | |
| 1158 | // MDRV_CPU_PROGRAM_MAP(mcu_ | |
| 1240 | 1159 | |
| 1241 | 1160 | MDRV_SCREEN_REFRESH_RATE(60) |
| 1242 | 1161 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_REAL_60HZ_VBLANK_DURATION) |
| r1037 | r1038 | |
|---|---|---|
| 3144 | 3144 | GAME( 1982, digdugat, digdug, digdug, digdug, 0, ROT90, "[Namco] (Atari license)", "Dig Dug (Atari, rev 2)", GAME_SUPPORTS_SAVE ) |
| 3145 | 3145 | GAME( 1982, digduga1, digdug, digdug, digdug, 0, ROT90, "[Namco] (Atari license)", "Dig Dug (Atari, rev 1)", GAME_SUPPORTS_SAVE ) |
| 3146 | 3146 | GAME( 1982, dzigzag, digdug, dzigzag, digdug, 0, ROT90, "bootleg", "Zig Zag (Dig Dug hardware)", GAME_SUPPORTS_SAVE ) |
| 3147 | GAME( 1982, digsid, digdug, digdug, digdug, 0, ROT90, "bootleg", "Dig Dug (Sidam | |
| 3147 | GAME( 1982, digsid, digdug, digdug, digdug, 0, ROT90, "bootleg", "Dig Dug (Sidam |
| r1037 | r1038 | |
|---|---|---|
| 175 | 175 | - Notice screen only if region = 0x0001 |
| 176 | 176 | - According to the manual, DSWB bit 6 determines continue pricing : |
| 177 | 177 | |
| 178 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Continue_Price ) ) | |
| 179 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_1C ) ) | |
| 180 | PORT_DIPSETTING( 0x00, "Same as Start" ) | |
| 178 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Continue_Price ) ) | |
| 179 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 180 | PORT_DIPSETTING( 0x40, "Same as Start" ) | |
| 181 | 181 | |
| 182 | 182 | However, many conditions are required to make it work due to code at 0x00e0c4 : |
| 183 | 183 | * region must not be 0x0001 |
| r1037 | r1038 | |
| 186 | 186 | This is why this Dip Switch has NO effect in the following sets : |
| 187 | 187 | * 'othunder' : coinage can't be 2C_1C for the 2 slots (coin B) |
| 188 | 188 | * 'othundrj' : region = 0x0001 |
| 189 | - DSWB bit 7 ("Language") affects parts of the texts (not the ones in "demo mode") | |
| 190 | but the voices are always in English regardless of the region ! | |
| 189 | 191 | |
| 190 | 192 | |
| 191 | 193 | 2) 'othundu' |
| r1037 | r1038 | |
| 575 | 577 | PORT_DIPSETTING( 0x30, "40" ) |
| 576 | 578 | PORT_DIPSETTING( 0x20, "50" ) |
| 577 | 579 | PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW ) /* see notes */ |
| 578 | PORT_DIPUNUSED( 0x80, IP_ACTIVE_LOW ) | |
| 580 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Language ) ) | |
| 581 | PORT_DIPSETTING( 0x00, DEF_STR( English ) ) | |
| 582 | PORT_DIPSETTING( 0x80, DEF_STR( Japanese ) ) | |
| 579 | 583 | |
| 580 | 584 | PORT_START_TAG("IN0") |
| 581 | 585 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r1037 | r1038 | |
| 635 | 639 | PORT_INCLUDE( othundrj ) |
| 636 | 640 | |
| 637 | 641 | PORT_MODIFY( "DSWB" ) |
| 638 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Continue_Price ) ) /* see notes */ | |
| 639 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_1C ) ) | |
| 640 | PORT_DIPSETTING( 0x00, "Same as Start" ) | |
| 642 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Continue_Price ) ) /* see notes */ | |
| 643 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) | |
| 644 | PORT_DIPSETTING( 0x40, "Same as Start" ) | |
| 641 | 645 | INPUT_PORTS_END |
| 642 | 646 | |
| 643 | 647 |
| r1037 | r1038 | |
|---|---|---|
| 39 | 39 | |
| 40 | 40 | static int sound_cpu_busy=0; |
| 41 | 41 | |
| 42 | #ifdef UNUSED_FUNCTION | |
| 42 | 43 | UINT8 *jcr_sharedram; |
| 43 | 44 | static READ8_HANDLER(sharedram_r){ return jcr_sharedram[offset];} |
| 44 | 45 | static WRITE8_HANDLER(sharedram_w){ jcr_sharedram[offset]=data;} |
| 46 | #endif | |
| 45 | 47 | |
| 46 | 48 | static struct namco_interface snkwave_interface = |
| 47 | 49 | { |
| r1037 | r1038 | |
|---|---|---|
| 56 | 56 | |
| 57 | 57 | /******************************************************************************/ |
| 58 | 58 | |
| 59 | #ifdef UNUSED_FUNCTION | |
| 59 | 60 | static WRITE16_HANDLER( tumblep_oki_w ) |
| 60 | 61 | { |
| 61 | 62 | OKIM6295_data_0_w(0,data&0xff); |
| r1037 | r1038 | |
| 66 | 67 | { |
| 67 | 68 | return ~0; |
| 68 | 69 | } |
| 70 | #endif | |
| 69 | 71 | |
| 70 | 72 | static WRITE16_HANDLER( tumblep_sound_w ) |
| 71 | 73 | { |
| r1037 | r1038 | |
| 73 | 75 | cpunum_set_input_line(1,0,HOLD_LINE); |
| 74 | 76 | } |
| 75 | 77 | |
| 78 | #ifdef UNUSED_FUNCTION | |
| 76 | 79 | static WRITE16_HANDLER( jumppop_sound_w ) |
| 77 | 80 | { |
| 78 | 81 | soundlatch_w(0,data & 0xff); |
| 79 | 82 | cpunum_set_input_line( 1, 0, ASSERT_LINE ); |
| 80 | 83 | } |
| 84 | #endif | |
| 81 | 85 | |
| 82 | 86 | /******************************************************************************/ |
| 83 | 87 |
| r1037 | r1038 | |
|---|---|---|
| 453 | 453 | } |
| 454 | 454 | } |
| 455 | 455 | |
| 456 | #ifdef UNUSED_FUNCTION | |
| 456 | 457 | static WRITE16_HANDLER( jalmah_reg_w ) |
| 457 | 458 | { |
| 458 | 459 | COMBINE_DATA(&jm_regs[offset]); |
| 459 | 460 | } |
| 461 | #endif | |
| 460 | 462 | |
| 461 | 463 | static WRITE16_HANDLER( jalmah_scroll_w ) |
| 462 | 464 | { |
| r1037 | r1038 | |
|---|---|---|
| 600 | 600 | static ADDRESS_MAP_START( master_default_am, ADDRESS_SPACE_PROGRAM, 16 ) |
| 601 | 601 | AM_RANGE(0x000000, 0x03ffff) AM_READ(MRA16_ROM) AM_WRITE(MWA16_ROM) |
| 602 | 602 | AM_RANGE(0x100000, 0x10ffff) AM_READ(NAMCOS2_68K_MASTER_RAM_R) AM_WRITE(NAMCOS2_68K_MASTER_RAM_W) |
| 603 | AM_RANGE(0x180000, 0x183fff) AM_READ(NAMCOS2_68K_EEPROM_R) AM_WRITE(NAMCOS2_68K_EEPROM_W) | |
| 603 | AM_RANGE(0x180000, 0x183fff) AM_READ(NAMCOS2_68K_EEPROM_R) AM_WRITE(NAMCOS2_68K_EEPROM_W) | |
| 604 | 604 | AM_RANGE(0x1c0000, 0x1fffff) AM_READ(namcos2_68k_master_C148_r) AM_WRITE(namcos2_68k_master_C148_w) |
| 605 | 605 | ADDRESS_MAP_END |
| 606 | 606 | |
| r1037 | r1038 | |
| 618 | 618 | static ADDRESS_MAP_START( master_finallap_am, ADDRESS_SPACE_PROGRAM, 16 ) |
| 619 | 619 | AM_RANGE(0x000000, 0x03ffff) AM_READ(MRA16_ROM) AM_WRITE(MWA16_ROM) |
| 620 | 620 | AM_RANGE(0x100000, 0x10ffff) AM_READ(NAMCOS2_68K_MASTER_RAM_R) AM_WRITE(NAMCOS2_68K_MASTER_RAM_W) |
| 621 | AM_RANGE(0x180000, 0x183fff) AM_READ(NAMCOS2_68K_EEPROM_R) AM_WRITE(NAMCOS2_68K_EEPROM_W) | |
| 621 | AM_RANGE(0x180000, 0x183fff) AM_READ(NAMCOS2_68K_EEPROM_R) AM_WRITE(NAMCOS2_68K_EEPROM_W) | |
| 622 | 622 | AM_RANGE(0x1c0000, 0x1fffff) AM_READ(namcos2_68k_master_C148_r) AM_WRITE(namcos2_68k_master_C148_w) |
| 623 | 623 | ADDRESS_MAP_END |
| 624 | 624 | |
| r1037 | r1038 | |
| 640 | 640 | static ADDRESS_MAP_START( master_sgunner_am, ADDRESS_SPACE_PROGRAM, 16 ) |
| 641 | 641 | AM_RANGE(0x000000, 0x03ffff) AM_READ(MRA16_ROM) AM_WRITE(MWA16_ROM) |
| 642 | 642 | AM_RANGE(0x100000, 0x10ffff) AM_READ(NAMCOS2_68K_MASTER_RAM_R) AM_WRITE(NAMCOS2_68K_MASTER_RAM_W) |
| 643 | AM_RANGE(0x180000, 0x183fff) AM_READ(NAMCOS2_68K_EEPROM_R) AM_WRITE(NAMCOS2_68K_EEPROM_W) | |
| 643 | AM_RANGE(0x180000, 0x183fff) AM_READ(NAMCOS2_68K_EEPROM_R) AM_WRITE(NAMCOS2_68K_EEPROM_W) | |
| 644 | 644 | AM_RANGE(0x1c0000, 0x1fffff) AM_READ(namcos2_68k_master_C148_r) AM_WRITE(namcos2_68k_master_C148_w) |
| 645 | 645 | ADDRESS_MAP_END |
| 646 | 646 | |
| r1037 | r1038 | |
| 663 | 663 | static ADDRESS_MAP_START( master_metlhawk_am, ADDRESS_SPACE_PROGRAM, 16 ) |
| 664 | 664 | AM_RANGE(0x000000, 0x03ffff) AM_READ(MRA16_ROM) AM_WRITE(MWA16_ROM) |
| 665 | 665 | AM_RANGE(0x100000, 0x10ffff) AM_READ(NAMCOS2_68K_MASTER_RAM_R) AM_WRITE(NAMCOS2_68K_MASTER_RAM_W) |
| 666 | AM_RANGE(0x180000, 0x183fff) AM_READ(NAMCOS2_68K_EEPROM_R) AM_WRITE(NAMCOS2_68K_EEPROM_W) | |
| 666 | AM_RANGE(0x180000, 0x183fff) AM_READ(NAMCOS2_68K_EEPROM_R) AM_WRITE(NAMCOS2_68K_EEPROM_W) | |
| 667 | 667 | AM_RANGE(0x1c0000, 0x1fffff) AM_READ(namcos2_68k_master_C148_r) AM_WRITE(namcos2_68k_master_C148_w) |
| 668 | 668 | ADDRESS_MAP_END |
| 669 | 669 | |
| r1037 | r1038 | |
| 691 | 691 | static ADDRESS_MAP_START( master_luckywld_am, ADDRESS_SPACE_PROGRAM, 16 ) |
| 692 | 692 | AM_RANGE(0x000000, 0x03ffff) AM_READ(MRA16_ROM) AM_WRITE(MWA16_ROM) |
| 693 | 693 | AM_RANGE(0x100000, 0x10ffff) AM_READ(NAMCOS2_68K_MASTER_RAM_R) AM_WRITE(NAMCOS2_68K_MASTER_RAM_W) |
| 694 | AM_RANGE(0x180000, 0x183fff) AM_READ(NAMCOS2_68K_EEPROM_R) AM_WRITE(NAMCOS2_68K_EEPROM_W) | |
| 694 | AM_RANGE(0x180000, 0x183fff) AM_READ(NAMCOS2_68K_EEPROM_R) AM_WRITE(NAMCOS2_68K_EEPROM_W) | |
| 695 | 695 | AM_RANGE(0x1c0000, 0x1fffff) AM_READ(namcos2_68k_master_C148_r) AM_WRITE(namcos2_68k_master_C148_w) |
| 696 | 696 | ADDRESS_MAP_END |
| 697 | 697 |
| r1037 | r1038 | |
|---|---|---|
| 214 | 214 | AM_RANGE(0x200000, 0x2023ff) AM_WRITE(MWA16_RAM) // tested |
| 215 | 215 | AM_RANGE(0xa10000, 0xa1001f) AM_WRITE(genesis_io_w) AM_BASE(&genesis_io_ram) /* Genesis Input */ |
| 216 | 216 | AM_RANGE(0xa11000, 0xa11203) AM_WRITE(genesis_ctrl_w) |
| 217 | AM_RANGE(0xa00000, 0xa0ffff) AM_WRITE( | |
| 217 | AM_RANGE(0xa00000, 0xa0ffff) AM_WRITE( | |
| 218 | 218 | AM_RANGE(0xc00000, 0xc0001f) AM_WRITE(genesis_vdp_w) /* VDP Access */ |
| 219 | 219 | AM_RANGE(0xfe0000, 0xfeffff) AM_WRITE(MWA16_BANK4) |
| 220 | 220 | AM_RANGE(0xff0000, 0xffffff) AM_WRITE(MWA16_RAM) AM_BASE(&genesis_68k_ram)/* Main Ram */ |
| r1037 | r1038 | |
|---|---|---|
| 1 | /* Sega MegaPlay | |
| 1 | /* Sega MegaPlay | |
| 2 | 2 | |
| 3 | changelog: | |
| 4 | ||
| 5 | 22 Sept 2007 - Started updating this to use the new Megadrive code, | |
| 6 | fixing issues with Mazin Wars + Grand Slam. | |
| 7 | However I'm still not convinced that the handling of | |
| 8 | the Megaplay side of things is correct at all, and | |
| 9 | we're still hanging off the old SMS vdp code and | |
| 10 | IO code. | |
| 11 | ||
| 12 | */ | |
| 13 | ||
| 3 | 14 | /* |
| 4 | 15 | |
| 5 | todo: cleanup, fix so that everything works properly | |
| 6 | rewrite genesis emulation (so that it works perfectly with every genesis game) | |
| 7 | ||
| 8 | 16 | About MegaPlay: |
| 9 | 17 | |
| 10 | 18 | Megaplay games are specially designed Genesis games, produced for arcade use. |
| 11 | 19 | |
| 12 | 20 | The code of these games has significant modifications when compared to the Genesis |
| 13 | releases and in many cases the games are cut-down versions of the games released for | |
| 14 | the home system. For example, Sonic has less zones, and no special stages, thus making | |
| 15 | it impossible to get all the chaos emeralds. Zones also have a strict timer. | |
| 21 | releases and in many cases the games are cut-down versions of the games that were | |
| 22 | released for the home system. For example, Sonic has less zones, and no special | |
| 23 | stages, thus making it impossible to get all the chaos emeralds. Zones also have a | |
| 24 | strict timer. | |
| 16 | 25 | |
| 17 | 26 | Coins buy you credits on Megaplay games, meaning if you lose all your lives the game is |
| 18 | 27 | over, like a regular Arcade game. |
| r1037 | r1038 | |
| 32 | 41 | |
| 33 | 42 | #include "driver.h" |
| 34 | 43 | #include "genesis.h" |
| 44 | #include "megadriv.h" | |
| 35 | 45 | |
| 36 | 46 | #define MASTER_CLOCK 53693100 |
| 37 | 47 | |
| r1037 | r1038 | |
| 50 | 60 | static UINT8 bios_6403; |
| 51 | 61 | static UINT8 bios_6404; |
| 52 | 62 | static UINT8* ic3_ram; |
| 53 | //static UINT8 ic36_ram[0x4000]; | |
| 54 | static UINT8 ic37_ram[0x8000]; | |
| 63 | ||
| 64 | static UINT8* ic37_ram; | |
| 55 | 65 | UINT16 *ic36_ram; |
| 56 | 66 | |
| 57 | static UINT | |
| 67 | //static UINT8 | |
| 58 | 68 | |
| 59 | 69 | |
| 60 | static MACHINE_RESET( megaplay ) | |
| 70 | static UINT8 hintcount; /* line interrupt counter, decreased each scanline */ | |
| 71 | extern UINT8 segae_vintpending; | |
| 72 | extern UINT8 segae_hintpending; | |
| 73 | extern UINT8 *segae_vdp_regs[]; /* pointer to vdp's registers */ | |
| 74 | ||
| 75 | // Interrupt handler - from drivers/segasyse.c | |
| 76 | INTERRUPT_GEN (megaplay_bios_irq) | |
| 61 | 77 | { |
| 62 | // UINT8* ram = memory_region(REGION_CPU3); | |
| 78 | int sline; | |
| 79 | sline = 261 - cpu_getiloops(); | |
| 63 | 80 | |
| 64 | /* mirroring of ram etc. */ | |
| 65 | memory_set_bankptr(1, &genesis_z80_ram[0]); | |
| 66 | memory_set_bankptr(2, &ic36_ram[0]); | |
| 67 | memory_set_bankptr(3, &genesis_68k_ram[0]); | |
| 81 | if (sline ==0) { | |
| 82 | hintcount = segae_vdp_regs[0][10]; | |
| 83 | } | |
| 68 | 84 | |
| 69 | machine_reset_genesis(machine); | |
| 85 | if (sline <= 192) { | |
| 86 | ||
| 87 | // if (sline != 192) segae_drawscanline(sline,1,1); | |
| 88 | ||
| 89 | if (sline == 192) | |
| 90 | segae_vintpending = 1; | |
| 91 | ||
| 92 | if (hintcount == 0) { | |
| 93 | hintcount = segae_vdp_regs[0][10]; | |
| 94 | segae_hintpending = 1; | |
| 95 | ||
| 96 | if ((segae_vdp_regs[0][0] & 0x10)) { | |
| 97 | cpunum_set_input_line(2, 0, HOLD_LINE); | |
| 98 | return; | |
| 99 | } | |
| 100 | ||
| 101 | } else { | |
| 102 | hintcount--; | |
| 103 | } | |
| 104 | } | |
| 105 | ||
| 106 | if (sline > 192) { | |
| 107 | hintcount = segae_vdp_regs[0][10]; | |
| 108 | ||
| 109 | if ( (sline<0xe0) && (segae_vintpending) ) { | |
| 110 | cpunum_set_input_line(2, 0, HOLD_LINE); | |
| 111 | } | |
| 112 | } | |
| 113 | ||
| 70 | 114 | } |
| 71 | 115 | |
| 72 | 116 | |
| 117 | static UINT32 readpos = 1; // serial bank selection position (9-bit) | |
| 118 | ||
| 73 | 119 | #define MEGAPLAY_TEST \ |
| 74 | 120 | PORT_START \ |
| 75 | 121 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Select") PORT_CODE(KEYCODE_0) \ |
| r1037 | r1038 | |
| 538 | 584 | } |
| 539 | 585 | } |
| 540 | 586 | |
| 541 | ||
| 542 | static ADDRESS_MAP_START( megaplay_genesis_readmem, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 543 | AM_RANGE(0x000000, 0x3fffff) AM_READ(MRA16_ROM) /* Cartridge Program Rom */ | |
| 544 | AM_RANGE(0xa10000, 0xa1001f) AM_READ(megaplay_genesis_io_r) /* Genesis Input */ | |
| 545 | AM_RANGE(0xa11000, 0xa11203) AM_READ(genesis_ctrl_r) | |
| 546 | AM_RANGE(0xa00000, 0xa0ffff) AM_READ(megaplay_68k_to_z80_r) AM_BASE(&ic36_ram) | |
| 547 | AM_RANGE(0xc00000, 0xc0001f) AM_READ(genesis_vdp_r) /* VDP Access */ | |
| 548 | AM_RANGE(0xfe0000, 0xfeffff) AM_READ(MRA16_BANK3) /* Main Ram */ | |
| 549 | AM_RANGE(0xff0000, 0xffffff) AM_READ(MRA16_RAM) /* Main Ram */ | |
| 550 | ADDRESS_MAP_END | |
| 551 | ||
| 552 | static ADDRESS_MAP_START( genesis_writemem, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 553 | AM_RANGE(0x000000, 0x3fffff) AM_WRITE(MWA16_ROM) /* Cartridge Program Rom */ | |
| 554 | AM_RANGE(0xa10000, 0xa1001f) AM_WRITE(genesis_io_w) AM_BASE(&genesis_io_ram) /* Genesis Input */ | |
| 555 | AM_RANGE(0xa11000, 0xa11203) AM_WRITE(genesis_ctrl_w) | |
| 556 | AM_RANGE(0xa00000, 0xa0ffff) AM_WRITE(megaplay_68k_to_z80_w) | |
| 557 | AM_RANGE(0xc00000, 0xc0001f) AM_WRITE(genesis_vdp_w) /* VDP Access */ | |
| 558 | AM_RANGE(0xfe0000, 0xfeffff) AM_WRITE(MWA16_BANK3) /* Main Ram */ | |
| 559 | AM_RANGE(0xff0000, 0xffffff) AM_WRITE(MWA16_RAM) AM_BASE(&genesis_68k_ram)/* Main Ram */ | |
| 560 | ADDRESS_MAP_END | |
| 561 | ||
| 562 | static ADDRESS_MAP_START( megaplay_z80_readmem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 563 | AM_RANGE(0x0000, 0x1fff) AM_READ(MRA8_BANK1) | |
| 564 | AM_RANGE(0x2000, 0x3fff) AM_READ(MRA8_BANK2) | |
| 565 | AM_RANGE(0x4000, 0x7fff) AM_READ(genesis_z80_r) | |
| 566 | AM_RANGE(0x8000, 0xffff) AM_READ(genesis_z80_bank_r) | |
| 567 | ADDRESS_MAP_END | |
| 568 | ||
| 569 | static ADDRESS_MAP_START( megaplay_z80_writemem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 570 | AM_RANGE(0x0000, 0x1fff) AM_WRITE(MWA8_BANK1) AM_BASE(&genesis_z80_ram) | |
| 571 | AM_RANGE(0x2000, 0x3fff) AM_WRITE(MWA8_BANK2) | |
| 572 | AM_RANGE(0x4000, 0x7fff) AM_WRITE(genesis_z80_w) | |
| 573 | // AM_RANGE(0x8000, 0xffff) AM_WRITE(genesis_z80_bank_w) | |
| 574 | ADDRESS_MAP_END | |
| 575 | ||
| 576 | ||
| 577 | ||
| 578 | ||
| 579 | 587 | static ADDRESS_MAP_START( megaplay_bios_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 580 | 588 | AM_RANGE(0x0000, 0x3fff) AM_READ(MRA8_ROM) |
| 581 | 589 | AM_RANGE(0x4000, 0x4fff) AM_READ(MRA8_RAM) |
| r1037 | r1038 | |
| 610 | 618 | AM_RANGE(0x8000, 0xffff) AM_WRITE(bank_w) |
| 611 | 619 | ADDRESS_MAP_END |
| 612 | 620 | |
| 621 | /* basically from src/drivers/segasyse.c */ | |
| 622 | UINT8 segae_vdp_ctrl_r ( UINT8 chip ); | |
| 623 | UINT8 segae_vdp_data_r ( UINT8 chip ); | |
| 624 | void segae_vdp_ctrl_w ( UINT8 chip, UINT8 data ); | |
| 625 | void segae_vdp_data_w ( UINT8 chip, UINT8 data ); | |
| 626 | ||
| 627 | READ8_HANDLER (megaplay_bios_port_be_bf_r) | |
| 628 | { | |
| 629 | UINT8 temp = 0; | |
| 630 | ||
| 631 | switch (offset) | |
| 632 | { | |
| 633 | case 0: /* port 0xbe, VDP 1 DATA Read */ | |
| 634 | temp = segae_vdp_data_r(0); break ; | |
| 635 | case 1: /* port 0xbf, VDP 1 CTRL Read */ | |
| 636 | temp = segae_vdp_ctrl_r(0); break ; | |
| 637 | } | |
| 638 | return temp; | |
| 639 | } | |
| 640 | ||
| 641 | WRITE8_HANDLER (megaplay_bios_port_be_bf_w) | |
| 642 | { | |
| 643 | switch (offset) | |
| 644 | { | |
| 645 | case 0: /* port 0xbe, VDP 1 DATA Write */ | |
| 646 | segae_vdp_data_w(0, data); break; | |
| 647 | case 1: /* port 0xbf, VDP 1 CTRL Write */ | |
| 648 | segae_vdp_ctrl_w(0, data); break; | |
| 649 | } | |
| 650 | } | |
| 651 | ||
| 613 | 652 | static ADDRESS_MAP_START( megaplay_bios_readport, ADDRESS_SPACE_IO, 8 ) |
| 614 | 653 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) |
| 615 | 654 | // AM_RANGE(0xdc, 0xdc) AM_READ(megatech_bios_port_dc_r) // player inputs |
| 616 | 655 | // AM_RANGE(0xdd, 0xdd) AM_READ(megatech_bios_port_dd_r) // other player 2 inputs |
| 617 | AM_RANGE(0xbe, 0xbf) AM_READ(mega | |
| 656 | AM_RANGE(0xbe, 0xbf) AM_READ(megaplay_bios_port_be_bf_r) /* VDP */ | |
| 618 | 657 | ADDRESS_MAP_END |
| 619 | 658 | |
| 620 | 659 | static ADDRESS_MAP_START( megaplay_bios_writeport, ADDRESS_SPACE_IO, 8 ) |
| 621 | 660 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) |
| 622 | 661 | // AM_RANGE(0x3f, 0x3f) AM_WRITE(megatech_bios_port_ctrl_w) |
| 623 | 662 | AM_RANGE(0x7f, 0x7f) AM_WRITE(SN76496_1_w) /* SN76489 */ |
| 624 | AM_RANGE(0xbe, 0xbf) AM_WRITE(mega | |
| 663 | AM_RANGE(0xbe, 0xbf) AM_WRITE(megaplay_bios_port_be_bf_w) /* VDP */ | |
| 625 | 664 | ADDRESS_MAP_END |
| 626 | 665 | |
| 627 | 666 | |
| 628 | static MACHINE_DRIVER_START( megaplay ) | |
| 667 | /* in video/segasyse.c */ | |
| 668 | void megaplay_start_video_normal(running_machine *machine); | |
| 669 | void megaplay_update_video_normal(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect ); | |
| 629 | 670 | |
| 630 | /* basic machine hardware */ | |
| 631 | MDRV_CPU_ADD_TAG("main", M68000, MASTER_CLOCK / 7) | |
| 632 | MDRV_CPU_PROGRAM_MAP(megaplay_genesis_readmem, genesis_writemem) | |
| 633 | MDRV_CPU_VBLANK_INT(genesis_vblank_interrupt,1) | |
| 671 | /* give us access to the megadriv start and update functions so that we can call them */ | |
| 672 | extern UINT32 video_update_megadriv(running_machine *machine, int screen, mame_bitmap *bitmap, const rectangle *cliprect); | |
| 673 | extern void video_start_megadriv(running_machine *machine); | |
| 634 | 674 | |
| 635 | MDRV_CPU_ADD_TAG("sound", Z80, MASTER_CLOCK / 15) | |
| 636 | MDRV_CPU_PROGRAM_MAP(megaplay_z80_readmem, megaplay_z80_writemem) | |
| 637 | MDRV_CPU_VBLANK_INT(irq0_line_hold, 1) /* from vdp at scanline 0xe0 */ | |
| 675 | VIDEO_START(megplay) | |
| 676 | { | |
| 677 | //printf("megplay vs\n"); | |
| 678 | video_start_megadriv(Machine); | |
| 679 | megaplay_start_video_normal(Machine); | |
| 680 | } | |
| 638 | 681 | |
| 639 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 682 | VIDEO_UPDATE(megplay) | |
| 683 | { | |
| 684 | //printf("megplay vu\n"); | |
| 685 | video_update_megadriv(Machine,0,bitmap,cliprect); | |
| 686 | megaplay_update_video_normal(Machine, bitmap,cliprect); | |
| 687 | return 0; | |
| 688 | } | |
| 640 | 689 | |
| 641 | MDRV_INTERLEAVE(100) | |
| 642 | 690 | |
| 643 | /* video hardware */ | |
| 644 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS) | |
| 645 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 646 | MDRV_SCREEN_SIZE(342,262) | |
| 647 | MDRV_SCREEN_VISIBLE_AREA(0, 319, 0, 223) | |
| 648 | MDRV_PALETTE_LENGTH(64+32) /* +32 for megaplay bios vdp part */ | |
| 691 | //extern VIDEO_EOF(megadriv); | |
| 649 | 692 | |
| 650 | /* sound hardware */ | |
| 651 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 693 | static MACHINE_DRIVER_START( mpnew ) | |
| 652 | 694 | |
| 653 | MDRV_SOUND_ADD(YM3438, MASTER_CLOCK/7) | |
| 654 | MDRV_SOUND_ROUTE(0, "mono", 0.50) | |
| 655 | MDRV_SOUND_ROUTE(1, "mono", 0.50) | |
| 695 | /* basic machine hardware */ | |
| 696 | MDRV_IMPORT_FROM(megadriv) | |
| 656 | 697 | |
| 657 | // MDRV_CPU_PROGRAM_MAP(megaplay_genesis_readmem, genesis_writemem) | |
| 658 | ||
| 659 | MDRV_VIDEO_START(megaplay) | |
| 660 | MDRV_VIDEO_UPDATE(megaplay) | |
| 661 | MDRV_MACHINE_RESET(megaplay) | |
| 662 | ||
| 698 | /* The Megaplay has an extra BIOS cpu which drives an SMS VDP | |
| 699 | which includes an SN76496 for sound */ | |
| 663 | 700 | MDRV_CPU_ADD_TAG("megaplay_bios", Z80, MASTER_CLOCK / 15) /* ?? */ |
| 664 | 701 | MDRV_CPU_PROGRAM_MAP(megaplay_bios_readmem, megaplay_bios_writemem) |
| 665 | 702 | MDRV_CPU_IO_MAP(megaplay_bios_readport,megaplay_bios_writeport) |
| 703 | MDRV_CPU_VBLANK_INT(megaplay_bios_irq, 262) | |
| 666 | 704 | |
| 667 | MDRV_SOUND_ADD(SN76496, MASTER_CLOCK/15) | |
| 668 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) | |
| 705 | MDRV_INTERLEAVE(100) | |
| 669 | 706 | |
| 670 | 707 | MDRV_SOUND_ADD(SN76496, MASTER_CLOCK/15) |
| 671 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) | |
| 708 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "left", 0.25) /* 3.58 MHz */ | |
| 709 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "right",0.25) /* 3.58 MHz */ | |
| 672 | 710 | |
| 673 | MDRV_CPU_VBLANK_INT(megatech_irq, 262) | |
| 711 | /* New update functions to handle the extra layer */ | |
| 712 | MDRV_VIDEO_START(megplay) | |
| 713 | MDRV_VIDEO_UPDATE(megplay) | |
| 674 | 714 | MACHINE_DRIVER_END |
| 675 | 715 | |
| 676 | 716 | |
| r1037 | r1038 | |
| 812 | 852 | ROM_END |
| 813 | 853 | |
| 814 | 854 | |
| 815 | ||
| 816 | ||
| 817 | static DRIVER_INIT (megaplay) | |
| 855 | void megplay_stat(void) | |
| 818 | 856 | { |
| 819 | 857 | UINT8 *src = memory_region(REGION_CPU3); |
| 820 | 858 | UINT8 *instruction_rom = memory_region(REGION_USER1); |
| 821 | 859 | UINT8 *game_rom = memory_region(REGION_CPU1); |
| 822 | 860 | int offs; |
| 823 | 861 | |
| 862 | ||
| 824 | 863 | memmove(src+0x10000,src+0x8000,0x18000); // move bios.. |
| 825 | 864 | |
| 826 | 865 | /* copy game instruction rom to main map.. maybe this should just be accessed |
| r1037 | r1038 | |
| 837 | 876 | } |
| 838 | 877 | } |
| 839 | 878 | |
| 879 | /* Old code, todo, update the new code instead */ | |
| 880 | static READ16_HANDLER ( OLD_megaplay_genesis_io_r ) | |
| 881 | { | |
| 882 | /* 8-bit only, data is mirrored in both halves */ | |
| 883 | ||
| 884 | UINT8 return_value = 0; | |
| 885 | ||
| 886 | switch (offset) | |
| 887 | { | |
| 888 | case 0: | |
| 889 | /* Charles MacDonald ( http://cgfm2.emuviews.com/ ) | |
| 890 | D7 : Console is 1= Export (USA, Europe, etc.) 0= Domestic (Japan) | |
| 891 | D6 : Video type is 1= PAL, 0= NTSC | |
| 892 | D5 : Sega CD unit is 1= not present, 0= connected. | |
| 893 | D4 : Unused (always returns zero) | |
| 894 | D3 : Bit 3 of version number | |
| 895 | D2 : Bit 2 of version number | |
| 896 | D1 : Bit 1 of version number | |
| 897 | D0 : Bit 0 of version number | |
| 898 | */ | |
| 899 | return_value = 0x80; /* ? megatech is usa? */ | |
| 900 | break; | |
| 901 | ||
| 902 | case 1: /* port A data (joypad 1) */ | |
| 903 | ||
| 904 | if (genesis_io_ram[offset] & 0x40) | |
| 905 | return_value = readinputport(1) & (genesis_io_ram[4]^0xff); | |
| 906 | else | |
| 907 | { | |
| 908 | return_value = readinputport(2) & (genesis_io_ram[4]^0xff); | |
| 909 | return_value |= readinputport(1) & 0x03; | |
| 910 | } | |
| 911 | return_value = (genesis_io_ram[offset] & 0x80) | return_value; | |
| 912 | // logerror ("reading joypad 1 , type %02x %02x\n",genesis_io_ram[offset] & 0xb0, return_value &0x7f); | |
| 913 | break; | |
| 914 | ||
| 915 | case 2: /* port B data (joypad 2) */ | |
| 916 | ||
| 917 | if (genesis_io_ram[offset] & 0x40) | |
| 918 | return_value = readinputport(3) & (genesis_io_ram[5]^0xff); | |
| 919 | else | |
| 920 | { | |
| 921 | return_value = readinputport(4) & (genesis_io_ram[5]^0xff); | |
| 922 | return_value |= readinputport(3) & 0x03; | |
| 923 | } | |
| 924 | return_value = (genesis_io_ram[offset] & 0x80) | return_value; | |
| 925 | // logerror ("reading joypad 2 , type %02x %02x\n",genesis_io_ram[offset] & 0xb0, return_value &0x7f); | |
| 926 | break; | |
| 927 | ||
| 928 | // case 3: /* port C data */ | |
| 929 | // return_value = bios_6402 << 3; | |
| 930 | // break; | |
| 931 | ||
| 932 | default: | |
| 933 | return_value = genesis_io_ram[offset]; | |
| 934 | ||
| 935 | } | |
| 936 | return return_value | return_value << 8; | |
| 937 | } | |
| 938 | ||
| 939 | static WRITE16_HANDLER ( OLD_megaplay_genesis_io_w ) | |
| 940 | { | |
| 941 | // logerror ("write io offset :%02x data %04x PC: 0x%06x\n",offset,data,activecpu_get_previouspc()); | |
| 942 | ||
| 943 | switch (offset) | |
| 944 | { | |
| 945 | case 0x00: | |
| 946 | /*??*/ | |
| 947 | break; | |
| 948 | ||
| 949 | case 0x01:/* port A data */ | |
| 950 | genesis_io_ram[offset] = (data & (genesis_io_ram[0x04])) | (genesis_io_ram[offset] & ~(genesis_io_ram[0x04])); | |
| 951 | break; | |
| 952 | ||
| 953 | case 0x02: /* port B data */ | |
| 954 | genesis_io_ram[offset] = (data & (genesis_io_ram[0x05])) | (genesis_io_ram[offset] & ~(genesis_io_ram[0x05])); | |
| 955 | break; | |
| 956 | ||
| 957 | case 0x03: /* port C data */ | |
| 958 | genesis_io_ram[offset] = (data & (genesis_io_ram[0x06])) | (genesis_io_ram[offset] & ~(genesis_io_ram[0x06])); | |
| 959 | bios_6204 = data & 0x07; | |
| 960 | break; | |
| 961 | ||
| 962 | case 0x04: /* port A control */ | |
| 963 | genesis_io_ram[offset] = data; | |
| 964 | break; | |
| 965 | ||
| 966 | case 0x05: /* port B control */ | |
| 967 | genesis_io_ram[offset] = data; | |
| 968 | break; | |
| 969 | ||
| 970 | case 0x06: /* port C control */ | |
| 971 | genesis_io_ram[offset] = data; | |
| 972 | break; | |
| 973 | ||
| 974 | case 0x07: /* port A TxData */ | |
| 975 | genesis_io_ram[offset] = data; | |
| 976 | break; | |
| 977 | ||
| 978 | default: | |
| 979 | genesis_io_ram[offset] = data; | |
| 980 | } | |
| 981 | } | |
| 982 | ||
| 983 | ||
| 984 | READ16_HANDLER( megadriv_68k_read_z80_extra_ram ) | |
| 985 | { | |
| 986 | return ic36_ram[(offset<<1)^1] | (ic36_ram[(offset<<1)]<<8); | |
| 987 | } | |
| 988 | ||
| 989 | WRITE16_HANDLER( megadriv_68k_write_z80_extra_ram ) | |
| 990 | { | |
| 991 | if (!ACCESSING_LSB) // byte (MSB) access | |
| 992 | { | |
| 993 | ic36_ram[(offset<<1)] = (data & 0xff00) >> 8; | |
| 994 | } | |
| 995 | else if (!ACCESSING_MSB) | |
| 996 | { | |
| 997 | ic36_ram[(offset<<1)^1] = (data & 0x00ff); | |
| 998 | } | |
| 999 | else // for WORD access only the MSB is used, LSB is ignored | |
| 1000 | { | |
| 1001 | ic36_ram[(offset<<1)] = (data & 0xff00) >> 8; | |
| 1002 | } | |
| 1003 | } | |
| 1004 | ||
| 1005 | ||
| 1006 | static DRIVER_INIT (megaplay) | |
| 1007 | { | |
| 1008 | /* to support the old code.. */ | |
| 1009 | ic36_ram = auto_malloc(0x10000); | |
| 1010 | ic37_ram = auto_malloc(0x10000); | |
| 1011 | genesis_io_ram = auto_malloc(0x20); | |
| 1012 | ||
| 1013 | driver_init_megadrij(machine); | |
| 1014 | megplay_stat(); | |
| 1015 | ||
| 1016 | /* for now ... */ | |
| 1017 | memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0xa10000, 0xa1001f, 0, 0, OLD_megaplay_genesis_io_r); | |
| 1018 | memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0xa10000, 0xa1001f, 0, 0, OLD_megaplay_genesis_io_w); | |
| 1019 | ||
| 1020 | /* megaplay has ram shared with the bios cpu here */ | |
| 1021 | memory_install_read8_handler(1, ADDRESS_SPACE_PROGRAM, 0x2000, 0x3fff, 0, 0, MRA8_BANK7); | |
| 1022 | memory_install_write8_handler(1, ADDRESS_SPACE_PROGRAM, 0x2000, 0x3fff, 0, 0, MWA8_BANK7); | |
| 1023 | memory_set_bankptr(7, &ic36_ram[0]); | |
| 1024 | ||
| 1025 | /* instead of a RAM mirror the 68k sees the extra ram of the 2nd z80 too */ | |
| 1026 | memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0xa02000, 0xa03fff, 0, 0, megadriv_68k_read_z80_extra_ram); | |
| 1027 | memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0xa02000, 0xa03fff, 0, 0, megadriv_68k_write_z80_extra_ram); | |
| 1028 | } | |
| 1029 | ||
| 840 | 1030 | /* |
| 841 | 1031 | Sega Mega Play Cartridges |
| 842 | 1032 | ------------------------- |
| r1037 | r1038 | |
| 865 | 1055 | |
| 866 | 1056 | */ |
| 867 | 1057 | |
| 868 | /* -- */ GAMEB( 1993, megaplay, 0, megaplay, megaplay, megaplay, megaplay, ROT0, "Sega", "Mega Play BIOS", GAME_IS_BIOS_ROOT ) | |
| 869 | /* 01 */ GAMEB( 1993, mp_sonic, megaplay, megaplay, megaplay, mp_sonic, megaplay, ROT0, "Sega", "Sonic The Hedgehog (Mega Play)" , 0 ) | |
| 870 | /* 02 */ GAMEB( 1993, mp_gaxe2, megaplay, megaplay, megaplay, mp_gaxe2, megaplay, ROT0, "Sega", "Golden Axe II (Mega Play)" , 0 ) | |
| 871 | /* 03 */ GAMEB( 1993, mp_gslam, megaplay, megaplay, megaplay, mp_gslam, megaplay, ROT0, "Sega", "Grand Slam (Mega Play)",GAME_NOT_WORKING ) | |
| 872 | /* 04 */ GAMEB( 1993, mp_twc, megaplay, megaplay, megaplay, mp_twc, megaplay, ROT0, "Sega", "Tecmo World Cup (Mega Play)" , 0 ) | |
| 873 | /* 05 */ GAMEB( 1993, mp_sor2, megaplay, megaplay, megaplay, mp_sor2, megaplay, ROT0, "Sega", "Streets of Rage II (Mega Play)" , 0 ) | |
| 874 | /* 06 */ GAMEB( 1993, mp_bio, megaplay, megaplay, megaplay, mp_bio, megaplay, ROT0, "Sega", "Bio-hazard Battle (Mega Play)" , 0 ) | |
| 875 | /* 07 */ GAMEB( 1993, mp_soni2, megaplay, megaplay, megaplay, mp_soni2, megaplay, ROT0, "Sega", "Sonic The Hedgehog 2 (Mega Play)" , 0 ) | |
| 1058 | /* -- */ GAMEB( 1993, megaplay, 0, megaplay, mpnew, megaplay, megaplay, ROT0, "Sega", "Mega Play BIOS", GAME_IS_BIOS_ROOT ) | |
| 1059 | /* 01 */ GAMEB( 1993, mp_sonic, megaplay, megaplay, mpnew, mp_sonic, megaplay, ROT0, "Sega", "Sonic The Hedgehog (Mega Play)" , 0 ) | |
| 1060 | /* 02 */ GAMEB( 1993, mp_gaxe2, megaplay, megaplay, mpnew, mp_gaxe2, megaplay, ROT0, "Sega", "Golden Axe II (Mega Play)" , 0 ) | |
| 1061 | /* 03 */ GAMEB( 1993, mp_gslam, megaplay, megaplay, mpnew, mp_gslam, megaplay, ROT0, "Sega", "Grand Slam (Mega Play)",0 ) | |
| 1062 | /* 04 */ GAMEB( 1993, mp_twc, megaplay, megaplay, mpnew, mp_twc, megaplay, ROT0, "Sega", "Tecmo World Cup (Mega Play)" , 0 ) | |
| 1063 | /* 05 */ GAMEB( 1993, mp_sor2, megaplay, megaplay, mpnew, mp_sor2, megaplay, ROT0, "Sega", "Streets of Rage II (Mega Play)" , 0 ) | |
| 1064 | /* 06 */ GAMEB( 1993, mp_bio, megaplay, megaplay, mpnew, mp_bio, megaplay, ROT0, "Sega", "Bio-hazard Battle (Mega Play)" , 0 ) | |
| 1065 | /* 07 */ GAMEB( 1993, mp_soni2, megaplay, megaplay, mpnew, mp_soni2, megaplay, ROT0, "Sega", "Sonic The Hedgehog 2 (Mega Play)" , 0 ) | |
| 876 | 1066 | /* 08 */ |
| 877 | 1067 | /* 09 */ |
| 878 | 1068 | /* 10 */ |
| 879 | /* 11 */ GAMEB( 1993, mp_mazin, | |
| 1069 | /* 11 */ GAMEB( 1993, mp_mazin, | |
| 880 | 1070 | |
| 881 | /* ?? */ GAMEB( 1993, mp_col3, | |
| 1071 | /* ?? */ GAMEB( 1993, mp_col3, | |
| 882 | 1072 | |
| 883 | 1073 | |
| 884 | 1074 | /* Also known to exist: |
| r1037 | r1038 | |
|---|---|---|
| 3014 | 3014 | |
| 3015 | 3015 | ROM_START( poundfor ) |
| 3016 | 3016 | ROM_REGION( 0x100000, REGION_CPU1, 0 ) |
| 3017 | ROM_LOAD16_BYTE( "ppa-h0-b.bin", 0x00001, 0x20000, CRC(50d4a2d8) SHA1(7fd62c6613cb58b512c6c3670fa66a5b9906e6a1) ) | |
| 3018 | ROM_LOAD16_BYTE( "ppa-l0-b.bin", 0x00000, 0x20000, CRC(bd997942) SHA1(da484afe3b79e09e323c768a0b2165e6283971a7) ) | |
| 3017 | ROM_LOAD16_BYTE( "ppa-h0-b.9e", 0x00001, 0x20000, CRC(50d4a2d8) SHA1(7fd62c6613cb58b512c6c3670fa66a5b9906e6a1) ) | |
| 3018 | ROM_LOAD16_BYTE( "ppa-l0-b.9d", 0x00000, 0x20000, CRC(bd997942) SHA1(da484afe3b79e09e323c768a0b2165e6283971a7) ) | |
| 3019 | 3019 | ROM_LOAD16_BYTE( "ppa-h1.9f", 0x40001, 0x20000, CRC(f6c82f48) SHA1(b38a2f9f0f6439b2cf453fec87ca11d959777ee6) ) |
| 3020 | 3020 | ROM_RELOAD( 0xc0001, 0x20000 ) |
| 3021 | 3021 | ROM_LOAD16_BYTE( "ppa-l1.9c", 0x40000, 0x20000, CRC(5b07b087) SHA1(04a2403eb8c443cb92b880edc612542acdbcafa4) ) |
| r1037 | r1038 | |
| 3040 | 3040 | ROM_LOAD( "ppa-v0.bin", 0x00000, 0x40000, CRC(03321664) SHA1(51f2b2b712385c1cd55fd069829efac01838d603) ) |
| 3041 | 3041 | ROM_END |
| 3042 | 3042 | |
| 3043 | ROM_START( poundfoj ) | |
| 3044 | ROM_REGION( 0x100000, REGION_CPU1, 0 ) | |
| 3045 | ROM_LOAD16_BYTE( "ppa-h0-.9e", 0x00001, 0x20000, CRC(f0165e3b) SHA1(a0482b34c0d05d8f48d1b16f2bc2d5d9ec465dc8) ) | |
| 3046 | ROM_LOAD16_BYTE( "ppa-l0-.9d", 0x00000, 0x20000, CRC(f954f99f) SHA1(6e7a9718dc63e595403bfc0f1ceae4a71dc75133) ) | |
| 3047 | ROM_LOAD16_BYTE( "ppa-h1.9f", 0x40001, 0x20000, CRC(f6c82f48) SHA1(b38a2f9f0f6439b2cf453fec87ca11d959777ee6) ) | |
| 3048 | ROM_RELOAD( 0xc0001, 0x20000 ) | |
| 3049 | ROM_LOAD16_BYTE( "ppa-l1.9c", 0x40000, 0x20000, CRC(5b07b087) SHA1(04a2403eb8c443cb92b880edc612542acdbcafa4) ) | |
| 3050 | ROM_RELOAD( 0xc0000, 0x20000 ) | |
| 3051 | ||
| 3052 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) | |
| 3053 | ROM_LOAD( "ppa-sp.4j", 0x0000, 0x10000, CRC(3f458a5b) SHA1(d73740b2a548bf8a895909da0841f18d9ed32668) ) | |
| 3054 | ||
| 3055 | ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 3056 | ROM_LOAD( "ppb-n0.bin", 0x00000, 0x40000, CRC(951a41f8) SHA1(59b64f63ea2452c2b42ff7ebf1ff6fc4e7879ce3) ) /* sprites */ | |
| 3057 | ROM_LOAD( "ppb-n1.bin", 0x40000, 0x40000, CRC(c609b7f2) SHA1(1da3550c7e4d2a26d75d143934680d9177ba5c35) ) | |
| 3058 | ROM_LOAD( "ppb-n2.bin", 0x80000, 0x40000, CRC(318c0b5f) SHA1(1d4cd17dc2f8fc4e523eaf679f21d83e1bfade4e) ) | |
| 3059 | ROM_LOAD( "ppb-n3.bin", 0xc0000, 0x40000, CRC(93dc9490) SHA1(3df4d57a7bf19443f5aa6a416bcee968f81d9059) ) | |
| 3060 | ||
| 3061 | ROM_REGION( 0x080000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 3062 | ROM_LOAD( "ppa-g00.bin", 0x00000, 0x20000, CRC(8a88a174) SHA1(d360b9014aec31960538ee488894496248a820dc) ) /* tiles */ | |
| 3063 | ROM_LOAD( "ppa-g10.bin", 0x20000, 0x20000, CRC(e48a66ac) SHA1(49b33db6a922d6f1d1417e28714a67431b7c0217) ) | |
| 3064 | ROM_LOAD( "ppa-g20.bin", 0x40000, 0x20000, CRC(12b93e79) SHA1(f3d2b76a30874827c8998c1d13a55a3990b699b7) ) | |
| 3065 | ROM_LOAD( "ppa-g30.bin", 0x60000, 0x20000, CRC(faa39aee) SHA1(9cc1a468b304437766c04189054d3b8f7ff1f958) ) | |
| 3066 | ||
| 3067 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* samples */ | |
| 3068 | ROM_LOAD( "ppa-v0.bin", 0x00000, 0x40000, CRC(03321664) SHA1(51f2b2b712385c1cd55fd069829efac01838d603) ) | |
| 3069 | ROM_END | |
| 3070 | ||
| 3043 | 3071 | ROM_START( poundfou ) |
| 3044 | 3072 | ROM_REGION( 0x100000, REGION_CPU1, 0 ) |
| 3045 | 3073 | ROM_LOAD16_BYTE( "ppa-ho-a.9e", 0x00001, 0x20000, CRC(ff4c83a4) SHA1(1b7791c784bf7c4774e3200b76d65ab0bf0ff93b) ) |
| r1037 | r1038 | |
| 3212 | 3240 | GAME( 1990, dkgensan, hharry, hharryu, hharry, 0, ROT0, "Irem", "Daiku no Gensan (Japan)", GAME_NO_COCKTAIL ) |
| 3213 | 3241 | GAME( 1990, dkgenm72, hharry, dkgenm72, hharry, dkgenm72, ROT0, "Irem", "Daiku no Gensan (Japan, M72)", GAME_NO_COCKTAIL ) |
| 3214 | 3242 | GAME( 1990, poundfor, 0, poundfor, poundfor, 0, ROT270, "Irem", "Pound for Pound (World)", GAME_NO_COCKTAIL ) |
| 3243 | GAME( 1990, poundfoj, poundfor, poundfor, poundfor, 0, ROT270, "Irem", "Pound for Pound (Japan)", GAME_NO_COCKTAIL ) | |
| 3215 | 3244 | GAME( 1990, poundfou, poundfor, poundfor, poundfor, 0, ROT270, "Irem America", "Pound for Pound (US)", GAME_NO_COCKTAIL ) |
| 3216 | 3245 | GAME( 1990, airduel, 0, m72, airduel, airduel, ROT270, "Irem", "Air Duel (Japan)", 0 ) |
| 3217 | 3246 | GAME( 1991, cosmccop, 0, kengo, gallop, 0, ROT0, "Irem", "Cosmic Cop (World)", GAME_NO_COCKTAIL ) |
| r1037 | r1038 | |
|---|---|---|
| 85 | 85 | } |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | #ifdef UNUSED_FUNCTION | |
| 88 | 89 | static WRITE8_HANDLER( pokechmp_sound_bank_w ) |
| 89 | 90 | { |
| 90 | 91 | memory_set_bank(3, (data >> 2) & 1); |
| 91 | 92 | } |
| 93 | #endif | |
| 92 | 94 | |
| 93 | 95 | static WRITE8_HANDLER( pokechmp_sound_w ) |
| 94 | 96 | { |
| r1037 | r1038 | |
|---|---|---|
| 411 | 411 | * |
| 412 | 412 | *************************************/ |
| 413 | 413 | |
| 414 | ROM_START( crgolf ) // 834-5419-0 | |
| 414 | ROM_START( crgolf ) // 834-5419-04 | |
| 415 | 415 | ROM_REGION( 0x30000, REGION_CPU1, 0 ) |
| 416 | ROM_LOAD( "crwnc1.1c", 0x00000, 0x2000, CRC(3246e405) SHA1(f6018029317ac96df5866ca6a2bb2135edbd7e77) ) | |
| 417 | ROM_LOAD( "crwna1.1a", 0x02000, 0x2000, CRC(b9a936e2) SHA1(cebf67d9c42627fbb39648674012a6cf8cb287b5) ) | |
| 418 | ROM_LOAD( "epr5880.6b", 0x10000, 0x2000, CRC(4d6d8dad) SHA1(1530f81ad0097eadc75884ff8690b60b85ae451b) ) | |
| 419 | ROM_LOAD( "epr5885.5e", 0x1e000, 0x2000, CRC(fac6d56c) SHA1(67dc1918d5ab2443e967359e51d49dd134cdf25d) ) | |
| 420 | ROM_LOAD( "epr5881.6f", 0x20000, 0x2000, CRC(dd48dc1f) SHA1(d4560a88d872bd5f401344e3adb25f8486caca11) ) | |
| 421 | ROM_LOAD( "epr5886.5f", 0x22000, 0x2000, CRC(a09b27b8) SHA1(8b2d8322b633f6c7174bdb1fff0f6cef2d5a86de) ) | |
| 422 | ROM_LOAD( "epr5882.6h", 0x24000, 0x2000, CRC(fb86a168) SHA1(a679c9f50ac952da6c65f6593dce805023b8fc45) ) | |
| 423 | ROM_LOAD( "epr5887.5h", 0x26000, 0x2000, CRC(981f03ef) SHA1(42f686b970902bc42ac0f81bd2fc93dbdf766b1a) ) | |
| 424 | ROM_LOAD( "epr5883.6j", 0x28000, 0x2000, CRC(e64125ff) SHA1(ae2014d1039f4ed02c55053519bdeddd2f60a77a) ) | |
| 425 | ROM_LOAD( "epr5888.5j", 0x2a000, 0x2000, CRC(efc0e15a) SHA1(ba5772830f921004a2d9c90f557c04c799c755b9) ) | |
| 426 | ROM_LOAD( "epr5884.6k", 0x2c000, 0x2000, CRC(eb455966) SHA1(14278b598ac1d4007d5357cb40899c92a052417f) ) | |
| 427 | ROM_LOAD( "epr5889.5k", 0x2e000, 0x2000, CRC(88357391) SHA1(afdb5ed6555adf60bd64808413fc72fa5c67b6ec) ) | |
| 428 | ||
| 429 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) | |
| 430 | ROM_LOAD( "epr6198.1f", 0x0000, 0x2000, CRC(388c33d6) SHA1(42fd19c4b4ec7538d6c437552efb258bf2dcebc0) ) | |
| 431 | ROM_LOAD( "epr5892.1e", 0x2000, 0x2000, CRC(608dc2e2) SHA1(d906537cffd3e055f52f37a0490b3bb63107b2f9) ) | |
| 432 | ROM_LOAD( "epr5891a.1d", 0x4000, 0x2000, CRC(f353b585) SHA1(f09dcd0240131f872ceef5ddc9c89ab2fc92d117) ) | |
| 433 | ROM_LOAD( "epr5890a.1c", 0x6000, 0x2000, CRC(b737c2e8) SHA1(8596abbdff74300230b5ec5bf8acfe222eb3414f) ) | |
| 434 | ||
| 435 | ROM_REGION( 0x0020, REGION_PROMS, 0 ) | |
| 436 | ROM_LOAD( "pr5877.1s", 0x0000, 0x0020, CRC(f880b95d) SHA1(5ad0ee39e2b9befaf3895ec635d5865b7b1e562b) ) | |
| 437 | ||
| 438 | ROM_REGION( 0x0200, REGION_PLDS, ROMREGION_DISPOSE ) | |
| 439 | ROM_LOAD( "pal16l8.3e", 0x0000, 0x0104, NO_DUMP ) /* PAL is read protected */ | |
| 440 | ROM_END | |
| 441 | ||
| 442 | ROM_START( crgolfa ) // 834-5419-03 | |
| 443 | ROM_REGION( 0x30000, REGION_CPU1, 0 ) | |
| 416 | 444 | ROM_LOAD( "epr6143.1c", 0x00000, 0x2000, CRC(4b301360) SHA1(2a7dd4876f4448b4b59b6dd02e55eb2d0126b777) ) |
| 417 | 445 | ROM_LOAD( "epr6142.1a", 0x02000, 0x2000, CRC(8fc5e67f) SHA1(6563db94c55cfc7d2270daccaab57fc7b422b9f9) ) |
| 418 | 446 | ROM_LOAD( "epr5880.6b", 0x10000, 0x2000, CRC(4d6d8dad) SHA1(1530f81ad0097eadc75884ff8690b60b85ae451b) ) |
| r1037 | r1038 | |
| 440 | 468 | ROM_END |
| 441 | 469 | |
| 442 | 470 | |
| 443 | ROM_START( crgolf | |
| 471 | ROM_START( crgolfb ) | |
| 444 | 472 | ROM_REGION( 0x30000, REGION_CPU1, 0 ) |
| 445 | 473 | ROM_LOAD( "epr5879b.1c", 0x00000, 0x2000, CRC(927be359) SHA1(d534f7e3ef4ced8eea882ae2b8425df4c5842833) ) |
| 446 | 474 | ROM_LOAD( "epr5878.1a", 0x02000, 0x2000, CRC(65fd0fa0) SHA1(de95ff95c9f981cd9eadf8b028ee5373bc69007b) ) |
| r1037 | r1038 | |
| 466 | 494 | ROM_END |
| 467 | 495 | |
| 468 | 496 | |
| 469 | ROM_START( crgolfb ) | |
| 470 | ROM_REGION( 0x30000, REGION_CPU1, 0 ) | |
| 471 | ROM_LOAD( "epr5879b.1c", 0x00000, 0x2000, CRC(927be359) SHA1(d534f7e3ef4ced8eea882ae2b8425df4c5842833) ) | |
| 472 | ROM_LOAD( "epr5878.1a", 0x02000, 0x2000, CRC(65fd0fa0) SHA1(de95ff95c9f981cd9eadf8b028ee5373bc69007b) ) | |
| 473 | ROM_LOAD( "cg.1", 0x10000, 0x2000, CRC(ad7d537a) SHA1(deff74074a8b16ea91a0fa72d97ec36336c87b97) ) | |
| 474 | ROM_LOAD( "cg.6", 0x1e000, 0x2000, CRC(fac6d56c) SHA1(67dc1918d5ab2443e967359e51d49dd134cdf25d) ) | |
| 475 | ROM_LOAD( "cg.2", 0x20000, 0x2000, CRC(dd48dc1f) SHA1(d4560a88d872bd5f401344e3adb25f8486caca11) ) | |
| 476 | ROM_LOAD( "cg.7", 0x22000, 0x2000, CRC(a09b27b8) SHA1(8b2d8322b633f6c7174bdb1fff0f6cef2d5a86de) ) | |
| 477 | ROM_LOAD( "cg.3", 0x24000, 0x2000, CRC(fb86a168) SHA1(a679c9f50ac952da6c65f6593dce805023b8fc45) ) | |
| 478 | ROM_LOAD( "cg.8", 0x26000, 0x2000, CRC(981f03ef) SHA1(42f686b970902bc42ac0f81bd2fc93dbdf766b1a) ) | |
| 479 | ROM_LOAD( "cg.4", 0x28000, 0x2000, CRC(e64125ff) SHA1(ae2014d1039f4ed02c55053519bdeddd2f60a77a) ) | |
| 480 | ROM_LOAD( "cg.9", 0x2a000, 0x2000, CRC(efc0e15a) SHA1(ba5772830f921004a2d9c90f557c04c799c755b9) ) | |
| 481 | ROM_LOAD( "cg.5", 0x2c000, 0x2000, CRC(eb455966) SHA1(14278b598ac1d4007d5357cb40899c92a052417f) ) | |
| 482 | ROM_LOAD( "cg.10", 0x2e000, 0x2000, CRC(88357391) SHA1(afdb5ed6555adf60bd64808413fc72fa5c67b6ec) ) | |
| 483 | ||
| 484 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) | |
| 485 | ROM_LOAD( "cg.14", 0x0000, 0x1000, CRC(07156cd9) SHA1(8907cf9228d6de117b24969d4e039cee330f9b1e) ) | |
| 486 | ROM_LOAD( "cg.13", 0x2000, 0x2000, CRC(608dc2e2) SHA1(d906537cffd3e055f52f37a0490b3bb63107b2f9) ) | |
| 487 | ROM_LOAD( "cg.12", 0x4000, 0x2000, CRC(f353b585) SHA1(f09dcd0240131f872ceef5ddc9c89ab2fc92d117) ) | |
| 488 | ROM_LOAD( "cg.11", 0x6000, 0x2000, CRC(b737c2e8) SHA1(8596abbdff74300230b5ec5bf8acfe222eb3414f) ) | |
| 489 | ||
| 490 | ROM_REGION( 0x0020, REGION_PROMS, 0 ) | |
| 491 | ROM_LOAD( "pr5877.1s", 0x0000, 0x0020, CRC(f880b95d) SHA1(5ad0ee39e2b9befaf3895ec635d5865b7b1e562b) ) | |
| 492 | ROM_END | |
| 493 | ||
| 494 | ||
| 495 | 497 | ROM_START( crgolfc ) |
| 496 | 498 | ROM_REGION( 0x30000, REGION_CPU1, 0 ) |
| 497 | 499 | ROM_LOAD( "15.1a", 0x00000, 0x2000, CRC(e6194356) SHA1(78eec53a0658b552e6a8af109d9c9754e4ddadcb) ) |
| r1037 | r1038 | |
| 518 | 520 | ROM_END |
| 519 | 521 | |
| 520 | 522 | |
| 523 | ROM_START( crgolfbt ) | |
| 524 | ROM_REGION( 0x30000, REGION_CPU1, 0 ) | |
| 525 | ROM_LOAD( "epr5879b.1c", 0x00000, 0x2000, CRC(927be359) SHA1(d534f7e3ef4ced8eea882ae2b8425df4c5842833) ) | |
| 526 | ROM_LOAD( "epr5878.1a", 0x02000, 0x2000, CRC(65fd0fa0) SHA1(de95ff95c9f981cd9eadf8b028ee5373bc69007b) ) | |
| 527 | ROM_LOAD( "cg.1", 0x10000, 0x2000, CRC(ad7d537a) SHA1(deff74074a8b16ea91a0fa72d97ec36336c87b97) ) | |
| 528 | ROM_LOAD( "epr5885.5e", 0x1e000, 0x2000, CRC(fac6d56c) SHA1(67dc1918d5ab2443e967359e51d49dd134cdf25d) ) // cg.6 | |
| 529 | ROM_LOAD( "epr5881.6f", 0x20000, 0x2000, CRC(dd48dc1f) SHA1(d4560a88d872bd5f401344e3adb25f8486caca11) ) // cg.2 | |
| 530 | ROM_LOAD( "epr5886.5f", 0x22000, 0x2000, CRC(a09b27b8) SHA1(8b2d8322b633f6c7174bdb1fff0f6cef2d5a86de) ) // cg.7 | |
| 531 | ROM_LOAD( "epr5882.6h", 0x24000, 0x2000, CRC(fb86a168) SHA1(a679c9f50ac952da6c65f6593dce805023b8fc45) ) // cg.3 | |
| 532 | ROM_LOAD( "epr5887.5h", 0x26000, 0x2000, CRC(981f03ef) SHA1(42f686b970902bc42ac0f81bd2fc93dbdf766b1a) ) // cg.8 | |
| 533 | ROM_LOAD( "epr5883.6j", 0x28000, 0x2000, CRC(e64125ff) SHA1(ae2014d1039f4ed02c55053519bdeddd2f60a77a) ) // cg.4 | |
| 534 | ROM_LOAD( "epr5888.5j", 0x2a000, 0x2000, CRC(efc0e15a) SHA1(ba5772830f921004a2d9c90f557c04c799c755b9) ) // cg.9 | |
| 535 | ROM_LOAD( "epr5884.6k", 0x2c000, 0x2000, CRC(eb455966) SHA1(14278b598ac1d4007d5357cb40899c92a052417f) ) // cg.5 | |
| 536 | ROM_LOAD( "epr5889.5k", 0x2e000, 0x2000, CRC(88357391) SHA1(afdb5ed6555adf60bd64808413fc72fa5c67b6ec) ) // cg.10 | |
| 537 | ||
| 538 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) | |
| 539 | ROM_LOAD( "cg.14", 0x0000, 0x1000, CRC(07156cd9) SHA1(8907cf9228d6de117b24969d4e039cee330f9b1e) ) | |
| 540 | ROM_LOAD( "epr5892.1e", 0x2000, 0x2000, CRC(608dc2e2) SHA1(d906537cffd3e055f52f37a0490b3bb63107b2f9) ) // cg.13 | |
| 541 | ROM_LOAD( "epr5891a.1d", 0x4000, 0x2000, CRC(f353b585) SHA1(f09dcd0240131f872ceef5ddc9c89ab2fc92d117) ) // cg.12 | |
| 542 | ROM_LOAD( "epr5890a.1c", 0x6000, 0x2000, CRC(b737c2e8) SHA1(8596abbdff74300230b5ec5bf8acfe222eb3414f) ) // cg.11 | |
| 543 | ||
| 544 | ROM_REGION( 0x0020, REGION_PROMS, 0 ) | |
| 545 | ROM_LOAD( "pr5877.1s", 0x0000, 0x0020, CRC(f880b95d) SHA1(5ad0ee39e2b9befaf3895ec635d5865b7b1e562b) ) | |
| 546 | ROM_END | |
| 547 | ||
| 548 | ||
| 521 | 549 | ROM_START( crgolfhi ) |
| 522 | 550 | ROM_REGION( 0x30000, REGION_CPU1, 0 ) |
| 523 | 551 | ROM_LOAD( "cpu.c1", 0x00000, 0x2000, CRC(8b101085) SHA1(a59c369be3e7e645d8b20032998a778a2056b7d7) ) |
| r1037 | r1038 | |
| 571 | 599 | * |
| 572 | 600 | *************************************/ |
| 573 | 601 | |
| 574 | GAME( 1984, crgolf, 0, crgolf, crgolf, 0, ROT0, "Nasco Japan", "Crowns Golf (set 1)" , GAME_SUPPORTS_SAVE ) // 834-5419-03 | |
| 575 | GAME( 1984, crgolfa, crgolf, crgolf, crgolf, 0, ROT0, "Nasco Japan", "Crowns Golf (set 2)", GAME_SUPPORTS_SAVE ) | |
| 602 | GAME( 1984, crgolf, 0, crgolf, crgolf, 0, ROT0, "Nasco Japan", "Crowns Golf (834-5419-04)", GAME_SUPPORTS_SAVE ) | |
| 603 | GAME( 1984, crgolfa, crgolf, crgolf, crgolf, 0, ROT0, "Nasco Japan", "Crowns Golf (834-5419-03)", GAME_SUPPORTS_SAVE ) | |
| 604 | GAME( 1984, crgolfb, crgolf, crgolf, crgolf, 0, ROT0, "Nasco Japan", "Crowns Golf (set 3)", GAME_SUPPORTS_SAVE ) | |
| 576 | 605 | GAME( 1984, crgolfc, crgolf, crgolf, crgolf, 0, ROT0, "Nasco Japan", "Champion Golf", GAME_SUPPORTS_SAVE ) |
| 577 | GAME( 1984, crgolfb, | |
| 606 | GAME( 1984, crgolfbt, | |
| 578 | 607 | GAME( 1985, crgolfhi, 0, crgolfhi, crgolf, crgolfhi, ROT0, "Nasco Japan", "Crowns Golf in Hawaii" , GAME_SUPPORTS_SAVE ) |
| r1037 | r1038 | |
|---|---|---|
| 4 | 4 | -- this is a modified version of the sms.c from HazeMD |
| 5 | 5 | it really needs some improvements |
| 6 | 6 | |
| 7 | ||
| 8 | Sega System 'E' is a piece of hardware used for a couple of Arcade Games | |
| 9 | produced by Sega in the Mid 80's, its roughly based on their Sega Master System | |
| 10 | home console unit, using the same '315-5124' VDP (actually in this case 2 of | |
| 11 | them) | |
| 12 | ||
| 13 | An interesting feature of the system is that the CPU is contained on the ROM | |
| 14 | board, the MAIN System E board contains the Graphics processor, this opens the | |
| 15 | possibility for using processors other than the Standard Z80 to run the main | |
| 16 | game code on; several games have an encrypted Z80 module instead. | |
| 17 | ||
| 18 | Also interesting is each VDP has double the Video RAM found on the SMS console | |
| 19 | this is banked through Port Writes, the System also allows for the Video RAM | |
| 20 | to be written directly, bypassing the usual procedure of writing to it via the | |
| 21 | '315-5124' data port, it can not however be read directly, the same area used | |
| 22 | for writing is used to access banked ROMs when reading | |
| 23 | ||
| 24 | Pretty much everything on this hardware is done through port accesses, the | |
| 25 | main memory map consists of simply ROM, BANKED ROM / BANKED RAM, RAM | |
| 26 | ||
| 27 | ******************************************************************************** | |
| 28 | ||
| 29 | ROMs + CPU Board (32kb ROMs) | |
| 30 | ||
| 31 | IC 07 (Good) IC 05 (Good) | |
| 32 | IC 04 (Good) IC 03 (Good) | |
| 33 | IC 02 (Good) | |
| 34 | ||
| 35 | (834-5803) MAIN Board (8kb RAMs) | |
| 36 | ||
| 37 | IC 49 (Good) IC 55 (Good) System RAM (0xc000 - 0xffff) | |
| 38 | IC 03 (Good) IC 07 (Good) Front Layer VRAM (Bank 1) Port F7 -0------ | |
| 39 | IC 04 (Good) IC 08 (Good) Front Layer VRAM (Bank 2) Port F7 -1------ | |
| 40 | IC 01 (Good) IC 05 (Good) Back Layer VRAM (Bank 1) Port F7 0------- | |
| 41 | IC 02 (Good) IC 06 (Good) Back Layer VRAM (Bank 2) Port F7 1------- | |
| 42 | (or at least this is how it appears from HangOnJr's RAMs Test) | |
| 43 | ||
| 44 | 2x (315-5124)'s here too, these are the VDP chips | |
| 45 | ||
| 46 | PORTS (to be completed) | |
| 47 | ||
| 48 | 0xba - 0xbb r/w Back Layer VDP | |
| 49 | 0xbe - 0xbf r/w Front Layer VDP | |
| 50 | ||
| 51 | 0xf7 w/o Banking Controls | |
| 52 | ||
| 53 | 0xe0 r/o Inputs (Coins, Start Btns) | |
| 54 | 0xe1 r/o Controls (Transformer) | |
| 55 | ||
| 56 | 0xf2 - 0xf3 r/o Dipswitches | |
| 57 | ||
| 58 | 0xf8 r/o Analog Input (Hang On Jr) | |
| 59 | ||
| 60 | 0x7e r/o V Counter (vertical beam pos in scanlines) | |
| 61 | 0x7f r/o H Counter (horizontal beam pos in 'pixel clock cycles') | |
| 62 | ||
| 63 | ******************************************************************************** | |
| 64 | ||
| 65 | Sega System E Hardware Overview | |
| 66 | Sega, 1985-1988 | |
| 67 | ||
| 68 | This PCB is essentially a Sega Master System home console unit, but using | |
| 69 | two '315-5124' VDPs and extra RAM. | |
| 70 | The CPU is located on a plug-in board that also holds all of the EPROMs. | |
| 71 | ||
| 72 | The games that run on this hardware include.... | |
| 73 | Hang-On Jr. 1985 | |
| 74 | Transformer/Astro Flash 1986 | |
| 75 | Riddle of Pythagoras 1986 | |
| 76 | Opa Opa 1987 | |
| 77 | Fantasy Zone 2 1988 | |
| 78 | Tetris 1988 | |
| 79 | ||
| 80 | PCB Layout | |
| 81 | ---------- | |
| 82 | 834-5803 (C)Sega 1985 | |
| 83 | |-----------------------------------------------------| | |
| 84 | | D4168 D4168 D4168 D4168 | | |
| 85 | | | | |
| 86 | | D4168 D4168 D4168 D4168 | | |
| 87 | | | | |
| 88 | | | | |
| 89 | | SW1 | | |
| 90 | |CN1 | | |
| 91 | | SW2 | | |
| 92 | | | | |
| 93 | | LED |---| |---| | | |
| 94 | | | 3 | | 3 | | | |
| 95 | | | 1 | | 1 | | | |
| 96 | | | 5 | | 5 | | | |
| 97 | | | | | | | | CN3| | |
| 98 | | | 5 | | 5 | 8255 | | |
| 99 | |CN4 | 1 | | 1 | | | |
| 100 | | | 2 | | 2 | | | |
| 101 | | | 4 | | 4 | | | |
| 102 | | |---| |---| | | |
| 103 | | |--------ROM-BOARD-(above)---------| | | |
| 104 | | | | | | |
| 105 | | |CN2 10.7386MHz | | | |
| 106 | | | D4168 | | | |
| 107 | | VOL | D4168 | | | |
| 108 | | LA4460 |----------------------------------| | | |
| 109 | |-----------------------------------------------------| | |
| 110 | Notes: | |
| 111 | 315-5124 VDP clock - 10.7386MHz | |
| 112 | SN76496 clock - 3.579533MHz [10.7386/3] | |
| 113 | D4168 - 8k x8 SRAM | |
| 114 | VSync - 60Hz | |
| 115 | HSync - 15.58kHz | |
| 116 | CN1 - Connector used for standard controls | |
| 117 | CN2 - connector for CPU/ROM PCB | |
| 118 | CN3 - Connector used for special controls (via a small plug-in interface PCB) | |
| 119 | CN4 - Connector for power | |
| 120 | ||
| 121 | ROM Daughterboard | |
| 122 | ----------------- | |
| 123 | 834-6592-01 | |
| 124 | |--------------------------------------------| | |
| 125 | | | | |
| 126 | | |---| | | |
| 127 | |C | | IC6 | | |
| 128 | |N |Z80| | | |
| 129 | |2 | | | | |
| 130 | | | | IC2 IC3 IC4 IC5 IC7| | |
| 131 | | |---| | | |
| 132 | | IC1 PAD1 PAD2 PAD3 PAD4| | |
| 133 | |--------------------------------------------| | |
| 134 | Notes: | |
| 135 | IC1: Z80 clock - 5.3693MHz [10.7386/2] | |
| 136 | On some games this is replaced with a NEC MC-8123 Encrypted CPU Module. | |
| 137 | The clock speed is the same. The MC-8123 contains a Z80 core, plus a RAM chip | |
| 138 | and battery. When the battery dies, the program can no longer be decrypted | |
| 139 | and the PCB does not boot up at all. The battery can not be changed because the | |
| 140 | MC-8123 is sealed, so there is no way to access it. | |
| 141 | ||
| 142 | IC2 - IC5: 27C256 EPROM (DIP28) | |
| 143 | ||
| 144 | IC6: 74LS139 | |
| 145 | ||
| 146 | IC7: 27C256 EPROM (DIP28) | |
| 147 | ||
| 148 | PAD1-4: These are jumper pads used to configure the ROM board for use with the | |
| 149 | Z80 or with the MC8123 CPU. | |
| 150 | PAD1 - Ties Z80 pin 24 (WAIT) to pin1 of the EPROMs at IC2, 3, 4 & 5 | |
| 151 | PAD2 - Ties CN2 pin B21 to pin1 of the EPROMs at IC2, 3, 4 & 5 | |
| 152 | PAD3 - Ties CN2 pin B21 to pin 2 of the 74LS139 @ IC6 | |
| 153 | PAD4 - Ties Z80 pin 24 (WAIT) to pin 2 of the 74LS139 @ IC6 | |
| 154 | ||
| 155 | The pads are configured like this..... (U=Upper, L=Lower) | |
| 156 | ||
| 157 | |----| |----| | |
| 158 | |IC6 | |IC7 | | |
| 159 | | 12|------|22 | | |
| 160 | | | | | | |
| 161 | IC2 IC3 IC4 IC5 | 1|------|27 | | |
| 162 | PIN1 PIN1 PIN1 PIN1 | 2|--| | | | |
| 163 | O-----O--+---O------O |----| | |----| | |
| 164 | | | | |
| 165 | | |----| | | |
| 166 | O--+----O | O |---O | |
| 167 | CN2 Z80 PAD1U PAD2U | PAD3U | PAD4U | |
| 168 | B21 PIN24 PAD1L PAD2L | PAD3L | PAD4L | |
| 169 | O O--4.7k--O O----| O----| O | |
| 170 | | | | | | |
| 171 | | |-------|------------------| | |
| 172 | | | | |
| 173 | |------------------------| | |
| 174 | ||
| 175 | When using a regular Z80B (and thus, unencrypted code): | |
| 176 | PAD1 - Open | |
| 177 | PAD2 - Open | |
| 178 | PAD3 - Shorted | |
| 179 | PAD4 - Open | |
| 180 | ||
| 181 | When using an encrypted CPU module (MC-8123): | |
| 182 | PAD1 - Open | |
| 183 | PAD2 - Shorted | |
| 184 | PAD3 - Open | |
| 185 | PAD4 - Open | |
| 186 | Additionally, a wire must be tied from CN2 pin B22 to the side | |
| 187 | of PAD3 nearest IC6 (i.e. PAD3U). | |
| 188 | ||
| 189 | ROMs: | |
| 190 | ----- | |
| 191 | ||
| 192 | Game IC2 IC3 IC4 IC5 IC7 | |
| 193 | --------------------------------------------------------------------------------- | |
| 194 | Hang-On Jr. EPR-? EPR-? EPR-? EPR-? EPR-? Hello, Sega Part Numbers....!? | |
| 195 | Transformer EPR-7350 EPR-? EPR-7348 EPR-7347 EPR-? Ditto | |
| 196 | /Astro Flash EPR-7350 EPR-7349 EPR-7348 EPR-7347 EPR-7723 | |
| 197 | Riddle of Pythagoras EPR-10422 EPR-10423 EPR-10424 EPR-10425 EPR-10426 | |
| 198 | Opa Opa EPR-11220 EPR-11221 EPR-11222 EPR-11223 EPR-11224 | |
| 199 | Fantasy Zone 2 EPR-11412 EPR-11413 EPR-11414 EPR-11415 EPR-11416 | |
| 200 | Tetris - - EPR-12211 EPR-12212 EPR-12213 | |
| 201 | ||
| 202 | A System E PCB can run all of the games simply by swapping the EPROMs plus CPU. | |
| 203 | Well, in theory anyway. To run the not-encrypted games, just swap EPROMs and they will work. | |
| 204 | ||
| 205 | To run the encrypted games, use a double sized EPROM in IC7 (i.e. a 27C512) | |
| 206 | and program the decrypted opcodes to the lower half and the decrypted data to the upper half, | |
| 207 | then connect the highest address pin of the EPROM (A15 pin 1) to the M1 pin on the Z80. | |
| 208 | This method has been tested and does not actually work. An update on this may follow.... | |
| 209 | ||
| 210 | ||
| 211 | System E PCB Pinout | |
| 212 | ------------------- | |
| 213 | ||
| 214 | CN1 | |
| 215 | --- | |
| 216 | ||
| 217 | +12V 1A 1B Coin switch 1 | |
| 218 | Coin switch 2 2A 2B Test switch | |
| 219 | Service switch 3A 3B | |
| 220 | 4A 4B 1P start | |
| 221 | 2P start 5A 5B 1P up | |
| 222 | 1P down 6A 6B 1P left | |
| 223 | 1P right 7A 7B 1P button 1 | |
| 224 | 1P button 2 8A 8B | |
| 225 | 9A 9B 2P up | |
| 226 | 2P down 10A 10B 2P left | |
| 227 | 2P RIGHT 11A 11B 2P button 1 | |
| 228 | 2P button 2 12A 12B | |
| 229 | 13A 13B Video RED | |
| 230 | 14A 14B Video GREEN | |
| 231 | 15A 15B Video BLUE | |
| 232 | 16A 16B Video SYNC | |
| 233 | 17A 17B | |
| 234 | 18A 18B | |
| 235 | Speaker [+] 19A 19B | |
| 236 | Speaker [-] 20A 20B | |
| 237 | Coin counter GND 21A 21B | |
| 238 | GND 22A 22B Coin counter 1 | |
| 239 | 23A 23B Coin counter 2 | |
| 240 | 24A 24B | |
| 241 | 25A 25B | |
| 242 | CN4 | |
| 243 | --- | |
| 244 | ||
| 245 | +5V 1A 1B +5V | |
| 246 | +5V 2A 2B +5V | |
| 247 | 3A 3B | |
| 248 | GND 4A 4B GND | |
| 249 | GND 5A 5B GND | |
| 250 | +12V 6A 6B +12V | |
| 251 | +12V 7A 7B +12V | |
| 252 | GND 8A 8B GND | |
| 253 | ||
| 254 | ||
| 255 | Game Notes: | |
| 256 | Riddle of Pythagoras is interesting, it looks like Sega might have planned it | |
| 257 | as a two player game, there is prelimiary code for 2 player support which | |
| 258 | never gets executed, see code around 0x0E95. Theres also quite a bit of | |
| 259 | pointless code here and there. Some Interesting Memory Locations | |
| 260 | ||
| 261 | C000 : level - value (00-0x32) | |
| 262 | C001 : level - display (00-0x50, BCD coded) | |
| 263 | C003 : credits (00-0x99, BCD coded) | |
| 264 | C005 : DSWA put here (coinage, left and right nibbles for left and right slot | |
| 265 | - freeplay when 0x0f or 0xf0) | |
| 266 | C006 : DSWB put here | |
| 267 | bits 0 and 1 : lives ("02", "03", "04", "98") | |
| 268 | bit 3 : difficulty | |
| 269 | bits 5 and 6 : bonus lives ("50K, 100K, 200K, 500K", "100K, 200K, 500K", "100K, | |
| 270 | 200K, 500K, 99999999", "none") | |
| 271 | C009 : lives (for player 1) | |
| 272 | C00A : lives (for player 2) | |
| 273 | C00B : bonus lives counter | |
| 274 | ||
| 275 | E20B-E20E : score (00000000-0x99999999, BCD coded) | |
| 276 | E215-E218 : hi-score (00000000-0x99999999, BCD coded) | |
| 277 | ||
| 278 | E543 : bit 0 : ON = player 1 one still has lives | |
| 279 | bit 1 : ON = player 2 one still has lives | |
| 280 | bit 2 : ON = player 1 is the current player - OFF = player 2 is the | |
| 281 | current player | |
| 282 | ||
| 283 | E572 : table with L. slot infos (5 bytes wide) | |
| 284 | E577 : table with R. slot infos (5 bytes wide) | |
| 285 | ||
| 7 | 286 | Known issues: |
| 8 | 287 | |
| 9 | 288 | sometimes hangonjr has corrupt gfx when you start a game, I don't know why |
| r1037 | r1038 | |
| 32 | 311 | /* All Accesses to VRAM go through here for safety */ |
| 33 | 312 | #define SMS_VDP_VRAM(address) chip->vram[(address)&0x3fff] |
| 34 | 313 | |
| 314 | #ifdef UNUSED_FUNCTION | |
| 35 | 315 | static ADDRESS_MAP_START( sms_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 36 | 316 | // AM_RANGE(0x0000 , 0xbfff) AM_READ(MRA8_ROM) |
| 37 | 317 | // AM_RANGE(0xc000 , 0xdfff) AM_READ(MRA8_RAM) AM_MIRROR(0x2000) |
| r1037 | r1038 | |
| 41 | 321 | // AM_RANGE(0x0000 , 0xbfff) AM_WRITE(MWA8_ROM) |
| 42 | 322 | // AM_RANGE(0xc000 , 0xdfff) AM_WRITE(MWA8_RAM) AM_MIRROR(0x2000) |
| 43 | 323 | ADDRESS_MAP_END |
| 324 | #endif | |
| 44 | 325 | |
| 45 | 326 | /* we have to fill in the ROM addresses for systeme due to the encrypted games */ |
| 46 | 327 | static ADDRESS_MAP_START( systeme_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| r1037 | r1038 | |
| 308 | 589 | return 0; |
| 309 | 590 | } |
| 310 | 591 | |
| 592 | int sms_vdp_cpu2_irq_callback(int status) | |
| 593 | { | |
| 594 | if (status==1) | |
| 595 | { | |
| 596 | cpunum_set_input_line(2,0,HOLD_LINE); | |
| 597 | } | |
| 598 | else | |
| 599 | { | |
| 600 | cpunum_set_input_line(2,0,CLEAR_LINE); | |
| 601 | } | |
| 311 | 602 | |
| 603 | return 0; | |
| 604 | } | |
| 312 | 605 | |
| 313 | 606 | |
| 607 | ||
| 608 | ||
| 314 | 609 | struct sms_vdp |
| 315 | 610 | { |
| 316 | 611 | UINT8 chip_id; |
| r1037 | r1038 | |
| 422 | 717 | } |
| 423 | 718 | |
| 424 | 719 | |
| 720 | #ifdef UNUSED_FUNCTION | |
| 425 | 721 | static READ8_HANDLER( z80_unmapped_r ) |
| 426 | 722 | { |
| 427 | 723 | printf("unmapped z80 read %04x\n",offset); |
| r1037 | r1038 | |
| 432 | 728 | { |
| 433 | 729 | printf("unmapped z80 write %04x\n",offset); |
| 434 | 730 | } |
| 731 | #endif | |
| 435 | 732 | |
| 436 | 733 | static UINT8 vcounter_r(struct sms_vdp *chip) |
| 437 | 734 | { |
| r1037 | r1038 | |
| 1017 | 1314 | } |
| 1018 | 1315 | } |
| 1019 | 1316 | |
| 1317 | #ifdef UNUSED_FUNCTION | |
| 1020 | 1318 | static void show_tiles(struct sms_vdp* chip) |
| 1021 | 1319 | { |
| 1022 | 1320 | int x,y,xx,yy; |
| r1037 | r1038 | |
| 1052 | 1350 | } |
| 1053 | 1351 | } |
| 1054 | 1352 | } |
| 1353 | #endif | |
| 1055 | 1354 | |
| 1056 | 1355 | /* |
| 1057 | 1356 | Register $00 - Mode Control No. 1 |
| r1037 | r1038 | |
| 1606 | 1905 | mame_timer_adjust_ptr(vdp2->sms_scanline_timer, time_zero, time_zero); |
| 1607 | 1906 | } |
| 1608 | 1907 | |
| 1908 | MACHINE_RESET(megatech_bios) | |
| 1909 | { | |
| 1910 | mame_timer_adjust_ptr(vdp1->sms_scanline_timer, time_zero, time_zero); | |
| 1911 | } | |
| 1912 | ||
| 1609 | 1913 | VIDEO_EOF(systeme) |
| 1610 | 1914 | { |
| 1611 | 1915 | end_of_frame(vdp1); |
| 1612 | 1916 | end_of_frame(vdp2); |
| 1613 | 1917 | } |
| 1614 | 1918 | |
| 1919 | VIDEO_EOF(megatech_bios) | |
| 1920 | { | |
| 1921 | end_of_frame(vdp1); | |
| 1922 | } | |
| 1923 | ||
| 1924 | ||
| 1925 | VIDEO_UPDATE(megatech_bios) | |
| 1926 | { | |
| 1927 | int x,y; | |
| 1928 | ||
| 1929 | for (y=0;y<224;y++) | |
| 1930 | { | |
| 1931 | UINT16* lineptr = BITMAP_ADDR16(bitmap, y, 0); | |
| 1932 | UINT16* srcptr = BITMAP_ADDR16(vdp1->r_bitmap, y, 0); | |
| 1933 | ||
| 1934 | for (x=0;x<256;x++) | |
| 1935 | { | |
| 1936 | lineptr[x]=srcptr[x]&0x7fff; | |
| 1937 | } | |
| 1938 | } | |
| 1939 | ||
| 1940 | return 0; | |
| 1941 | } | |
| 1942 | ||
| 1615 | 1943 | VIDEO_UPDATE(systeme) |
| 1616 | 1944 | { |
| 1617 | 1945 | // show_tiles(); |
| r1037 | r1038 | |
| 1833 | 2161 | } |
| 1834 | 2162 | |
| 1835 | 2163 | |
| 2164 | DRIVER_INIT( megatech_bios ) | |
| 2165 | { | |
| 2166 | // init_systeme_map(); | |
| 2167 | ||
| 2168 | vdp1 = start_vdp(machine, SMS2_VDP); | |
| 2169 | vdp1->set_irq = sms_vdp_cpu2_irq_callback; | |
| 2170 | vdp1->is_pal = 0; | |
| 2171 | vdp1->sms_total_scanlines = 262; | |
| 2172 | vdp1->sms_framerate = 60; | |
| 2173 | vdp1->chip_id = 1; | |
| 2174 | ||
| 2175 | vdp1_vram_bank0 = vdp1->vram; | |
| 2176 | vdp1_vram_bank1 = auto_malloc(0x4000); | |
| 2177 | } | |
| 2178 | ||
| 1836 | 2179 | static DRIVER_INIT( segasyse ) |
| 1837 | 2180 | { |
| 1838 | 2181 | init_systeme_map(); |
| r0 | r1038 | |
|---|---|---|
| 1 | /* System E stuff */ | |
| 2 | ||
| 3 | #include "driver.h" | |
| 4 | ||
| 5 | extern VIDEO_UPDATE(megatech_bios); | |
| 6 | extern DRIVER_INIT( megatech_bios ); | |
| 7 | extern MACHINE_RESET(megatech_bios); | |
| 8 | extern VIDEO_EOF(megatech_bios); | |
| 9 | ||
| 10 | extern READ8_HANDLER( sms_vcounter_r ); | |
| 11 | extern READ8_HANDLER( sms_vdp_data_r ); | |
| 12 | extern WRITE8_HANDLER( sms_vdp_data_w ); | |
| 13 | extern READ8_HANDLER( sms_vdp_ctrl_r ); | |
| 14 | extern WRITE8_HANDLER( sms_vdp_ctrl_w ); |
| r1037 | r1038 | |
|---|---|---|
| 360 | 360 | program_write_word(work_ram+0x4,y_data); |
| 361 | 361 | } |
| 362 | 362 | |
| 363 | #ifdef UNUSED_FUNCTION | |
| 363 | 364 | static void protection_move2_jsr(void) |
| 364 | 365 | { |
| 365 | 366 | // static UINT32 move_data; |
| 366 | 367 | // popmessage("%08x %08x %08x %08x",ram_addr[0],ram_addr[1],rom_addr[0],rom_addr[1]); |
| 367 | 368 | } |
| 369 | #endif | |
| 368 | 370 | |
| 369 | 371 | static UINT16 hit_check; |
| 370 | 372 | |
| r1037 | r1038 | |
| 477 | 479 | program_write_word(ram_addr[0]+0x36,res); |
| 478 | 480 | } |
| 479 | 481 | |
| 482 | #ifdef UNUSED_FUNCTION | |
| 480 | 483 | /*"To point" movement protection*/ |
| 481 | 484 | static void move3x_prot_jsr(void) |
| 482 | 485 | { |
| r1037 | r1038 | |
| 505 | 508 | program_write_word(ram_addr[0]+0x36,-0x80);/*enable command*/ |
| 506 | 509 | program_write_word(ram_addr[0]+0x10,y_dis); |
| 507 | 510 | } |
| 511 | #endif | |
| 508 | 512 | |
| 509 | 513 | |
| 510 | 514 | static READ16_HANDLER( mcu_r ) |
| r1037 | r1038 | |
|---|---|---|
| 32 | 32 | * Mongolfier New (Italia), bootleg, 199?. |
| 33 | 33 | * Soccer New (Italia), bootleg, 199?. |
| 34 | 34 | * Snooker 10 (Ver 1.11), Sandiy, 1998. |
| 35 | * Saloon (France, encrypted), unknown, 199?. | |
| 35 | 36 | |
| 36 | 37 | |
| 37 | 38 | *********************************************************************************** |
| r1037 | r1038 | |
| 188 | 189 | about it and start to implement the missing pieces for an accurate emulation. |
| 189 | 190 | |
| 190 | 191 | |
| 192 | - Saloon | |
| 191 | 193 | |
| 194 | This game is totally encrypted. No PIAs to drive I/O. The PCB has printed "LEOPARDO 5", so we | |
| 195 | can expect a game called the same way to appear. | |
| 196 | ||
| 197 | This game should be moved to a new driver in a near future, as soon as we know a bit more about it. | |
| 198 | ||
| 199 | ||
| 200 | ||
| 192 | 201 | *********************************************************************************** |
| 193 | 202 | |
| 194 | 203 | |
| r1037 | r1038 | |
| 222 | 231 | ---------------------------------------------------------------------------------------------------------------------- |
| 223 | 232 | register: 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 |
| 224 | 233 | ---------------------------------------------------------------------------------------------------------------------- |
| 225 | jollycrd: 0x7C 0x60 0x65 0x08 0x1E 0x08 0x1D 0x1D 0x00 0x07 0x01 0x01 0x00 0x00 #$00 #$00 #$00 #$00. | |
| 226 | jolycdae: 0x7C 0x60 0x65 0x08 0x1E 0x08 0x1D 0x1D 0x00 0x07 0x01 0x01 0x00 0x00 #$00 #$00 #$00 #$00. | |
| 227 | jolycdcr: 0x7C 0x60 0x65 0x08 0x1E 0x08 0x1D 0x1D 0x00 0x07 0x01 0x01 0x00 0x00 #$00 #$00 #$00 #$00. | |
| 228 | jolycdit: 0x7C 0x60 0x65 0x08 0x1E 0x08 0x1D 0x1D 0x00 0x07 0x01 0x01 0x00 0x00 #$00 #$00 #$00 #$00. | |
| 229 | jolycdab: 0x7C 0x60 0x65 0x08 0x1E 0x08 0x1D 0x1D 0x00 0x07 0x01 0x01 0x00 0x00 #$00 #$00 #$00 #$00. | |
| 234 | jollycrd: 0x7C 0x60 0x65 0x08 0x1E 0x08 0x1D 0x1D 0x00 0x07 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00. | |
| 235 | jolycdae: 0x7C 0x60 0x65 0x08 0x1E 0x08 0x1D 0x1D 0x00 0x07 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00. | |
| 236 | jolycdcr: 0x7C 0x60 0x65 0x08 0x1E 0x08 0x1D 0x1D 0x00 0x07 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00. | |
| 237 | jolycdit: 0x7C 0x60 0x65 0x08 0x1E 0x08 0x1D 0x1D 0x00 0x07 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00. | |
| 238 | jolycdab: 0x7C 0x60 0x65 0x08 0x1E 0x08 0x1D 0x1D 0x00 0x07 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00. | |
| 230 | 239 | |
| 231 | bigdeal: 0x7C 0x60 0x65 0x08 0x1E 0x08 0x1D 0x1D 0x00 0x07 0x01 0x01 0x00 0x00 | |
| 240 | bigdeal: 0x7C 0x60 0x65 0x08 0x1E 0x08 0x1D 0x1D 0x00 0x07 0x01 0x01 0x00 0x00 | |
| 232 | 241 | |
| 233 | cuoreuno: 0x7C 0x60 0x65 0x08 0x1E 0x08 0x1D 0x1D 0x00 0x07 0x01 0x01 0x00 0x00 #$00 #$00 #$00 #$00. | |
| 234 | elephfam: 0x7C 0x60 0x65 0x08 0x1E 0x08 0x1D 0x1D 0x00 0x07 0x01 0x01 0x00 0x00 #$00 #$00 #$00 #$00. | |
| 235 | pool10: 0x7C 0x60 0x65 0x08 0x1E 0x08 0x1D 0x1D 0x00 0x07 0x01 0x01 0x00 0x00 #$00 #$00 #$00 #$00. | |
| 236 | tortufam: 0x7C 0x60 0x65 0x08 0x1E 0x08 0x1D 0x1D 0x00 0x07 0x01 0x01 0x00 0x00 #$00 #$00 #$00 #$00. | |
| 242 | cuoreuno: 0x7C 0x60 0x65 0x08 0x1E 0x08 0x1D 0x1D 0x00 0x07 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00. | |
| 243 | elephfam: 0x7C 0x60 0x65 0x08 0x1E 0x08 0x1D 0x1D 0x00 0x07 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00. | |
| 244 | pool10: 0x7C 0x60 0x65 0x08 0x1E 0x08 0x1D 0x1D 0x00 0x07 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00. | |
| 245 | tortufam: 0x7C 0x60 0x65 0x08 0x1E 0x08 0x1D 0x1D 0x00 0x07 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00. | |
| 237 | 246 | |
| 238 | royalcrd: 0x7C 0x60 0x65 0xA8 0x1E 0x08 0x1D 0x1C 0x00 0x07 0x01 0x01 0x00 0x00 #$00 #$00 #$00 #$00. | |
| 239 | magiccrd: 0x7B 0x70 0x66 0xA8 0x24 0x08 0x22 0x22 0x00 0x07 0x01 0x01 0x00 0x00 #$00 #$00 #$00 #$00. | |
| 247 | royalcrd: 0x7C 0x60 0x65 0xA8 0x1E 0x08 0x1D 0x1C 0x00 0x07 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00. | |
| 248 | magiccrd: 0x7B 0x70 0x66 0xA8 0x24 0x08 0x22 0x22 0x00 0x07 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00. | |
| 240 | 249 | |
| 241 | monglfir: 0x7C 0x60 0x65 0xA8 0x1E 0x08 0x1D 0x1C 0x00 0x07 0x01 0x01 0x00 0x00 #$00 #$00 #$00 #$00. | |
| 242 | soccernw: 0x7C 0x60 0x65 0xA8 0x1E 0x08 0x1D 0x1C 0x00 0x07 0x01 0x01 0x00 0x00 #$00 #$00 #$00 #$00. | |
| 250 | monglfir: 0x7C 0x60 0x65 0xA8 0x1E 0x08 0x1D 0x1C 0x00 0x07 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00. | |
| 251 | soccernw: 0x7C 0x60 0x65 0xA8 0x1E 0x08 0x1D 0x1C 0x00 0x07 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00. | |
| 243 | 252 | |
| 244 | 253 | |
| 245 | 254 | *********************************************************************************** |
| r1037 | r1038 | |
| 324 | 333 | RAM: - 1x 6116 |
| 325 | 334 | - 1x KM6264AL-10 |
| 326 | 335 | |
| 327 | - 1x Crystal : 16.000 M | |
| 336 | - 1x Crystal : 16.000 MHz | |
| 328 | 337 | |
| 329 | 338 | |
| 330 | 339 | Jolly Card (other) |
| r1037 | r1038 | |
| 338 | 347 | RAM: - 1x NVram DS1220Y (instead of 6116) |
| 339 | 348 | - 1x KM6264AL-10 |
| 340 | 349 | |
| 341 | - 1x Crystal : 16.000 M | |
| 350 | - 1x Crystal : 16.000 MHz | |
| 342 | 351 | |
| 343 | 352 | |
| 344 | 353 | Jolly Card (Italia) |
| r1037 | r1038 | |
| 367 | 376 | - 1x MC6845P |
| 368 | 377 | - 1x YM2149F |
| 369 | 378 | - 2x MC6821P |
| 370 | - 1x Crystal 16.000 | |
| 379 | - 1x Crystal 16.000 MHz | |
| 371 | 380 | |
| 372 | 381 | |
| 373 | 382 | Magic Card II (Bulgaria, bootleg) |
| r1037 | r1038 | |
| 377 | 386 | - 1x MC6845P |
| 378 | 387 | - 1x YM2149F |
| 379 | 388 | - 2x MC6821P |
| 380 | - 1x Crystal 16.000 | |
| 389 | - 1x Crystal 16.000 MHz | |
| 381 | 390 | |
| 382 | 391 | |
| 383 | 392 | Cuore Uno (Italia) |
| r1037 | r1038 | |
| 387 | 396 | - 1x MC68B45P (CRT controller) |
| 388 | 397 | - 2x MC68B21CP (Peripheral Interface Adapter) |
| 389 | 398 | - 1x unknown (95101) DIP40 mil600 |
| 390 | - 1x oscillator 16.000000MHz | |
| 399 | - 1x oscillator 16.000000 MHz | |
| 391 | 400 | - ROMs 1x TMS27C512 |
| 392 | 401 | 2x TMS27C256 |
| 393 | 402 | - 1x PROM AM27S29 |
| r1037 | r1038 | |
| 406 | 415 | - 1x MC68B45P (CRT controller) |
| 407 | 416 | - 2x EF6821P (Peripheral Interface Adapter) |
| 408 | 417 | - 1x unknown (95101) DIP40 mil600 |
| 409 | - 1x oscillator 16.000MHz | |
| 418 | - 1x oscillator 16.000 MHz | |
| 410 | 419 | - ROMs 2x M27C256 |
| 411 | 420 | 1x TMS27C256 |
| 412 | 421 | - 1x PROM AM27S29 |
| r1037 | r1038 | |
| 423 | 432 | |
| 424 | 433 | - 1x R65C02P2 (main) |
| 425 | 434 | - 1x YM2149F (sound) |
| 426 | - 1x HD46505 (CR | |
| 435 | - 1x HD46505 (CRT controller) | |
| 427 | 436 | - 2x EF6821P (Peripheral Interface Adapter) |
| 428 | - 1x oscillator 16.000000MHz | |
| 437 | - 1x oscillator 16.000000 MHz | |
| 429 | 438 | |
| 430 | 439 | - 2x M27256 (pool,1) |
| 431 | 440 | - 1x D27256 (2) |
| r1037 | r1038 | |
| 444 | 453 | |
| 445 | 454 | - 1x G65SC02P2 (main) |
| 446 | 455 | - 1x 95101 (sound) |
| 447 | - 1x MC68B45P (CR | |
| 456 | - 1x MC68B45P (CRT controller) | |
| 448 | 457 | - 2x MC68B21CP (Peripheral Interface Adapter) |
| 449 | - 1x oscillator 16.000000MHz | |
| 458 | - 1x oscillator 16.000000 MHz | |
| 450 | 459 | |
| 451 | 460 | - 3x TMS27C256 |
| 452 | 461 | - 1x PROM AM27S29PC |
| r1037 | r1038 | |
| 489 | 498 | - CPU 1x R65C02P2 (main) |
| 490 | 499 | - 1x MC68B45P (CRT controller) |
| 491 | 500 | - 2x MC68B21CP (Peripheral Interface Adapter) |
| 492 | - 1x oscillator 16.000MHz | |
| 501 | - 1x oscillator 16.000 MHz | |
| 493 | 502 | - 3x ROMs TMS 27C512 |
| 494 | 503 | - 1x PALCE16V8H |
| 495 | 504 | - 1x prom AM27S29APC |
| r1037 | r1038 | |
| 509 | 518 | |
| 510 | 519 | - 1x YM2149 |
| 511 | 520 | |
| 512 | - 1x HD6845 (CRT | |
| 521 | - 1x HD6845 (CRT controller) | |
| 513 | 522 | - 1x MC68A21P (PIA) |
| 514 | 523 | - 1x 40 pin IC with surface scratched (PIA) |
| 515 | 524 | - 1x 8 DIP Switches |
| r1037 | r1038 | |
| 529 | 538 | - 1x G65SC02P2 (main) |
| 530 | 539 | - 1x KC89C72 (sound) |
| 531 | 540 | - 1x TDA2003 (sound) |
| 532 | - 1x MC68B45P (CR | |
| 541 | - 1x MC68B45P (CRT controller) | |
| 533 | 542 | - 2x EF6821P (Peripheral Interface Adapter) |
| 534 | - 1x TSC87C52-16CB (PLCC44)(Programmable 8bit Microcontroller | |
| 543 | - 1x TSC87C52-16CB (PLCC44)(Programmable 8bit Microcontroller, now dumped) | |
| 535 | 544 | - 1x M48Z08-100PC1 (Zero Power RAM - Lithium Battery) |
| 536 | - 1x oscillator 16.0000MHz | |
| 545 | - 1x oscillator 16.0000 MHz | |
| 537 | 546 | |
| 538 | 547 | - 3x M27C512 |
| 539 | 548 | - 1x PROM AM27S29PC |
| r1037 | r1038 | |
| 552 | 561 | - 1x G65SC02P2 (main) |
| 553 | 562 | - 1x KC89C72 (sound) |
| 554 | 563 | - 1x TDA2003 (sound) |
| 555 | - 1x MC68B45P (CR | |
| 564 | - 1x MC68B45P (CRT controller) | |
| 556 | 565 | - 1x EF68B21P (Peripheral Interface Adapter) |
| 557 | 566 | - 1x EF6821P (Peripheral Interface Adapter) |
| 558 | - 1x TSC87C52-16CB (PLCC44)(Programmable 8bit Microcontroller | |
| 567 | - 1x TSC87C52-16CB (PLCC44)(Programmable 8bit Microcontroller, now dumped) | |
| 559 | 568 | - 1x M48Z08-100PC1 (Zero Power RAM - Lithium Battery) |
| 560 | 569 | - 1x oscillator 16.0000MHz |
| 561 | 570 | |
| r1037 | r1038 | |
| 591 | 600 | - 1x battery |
| 592 | 601 | |
| 593 | 602 | |
| 603 | Saloon (France, encrypted) | |
| 604 | -------------------------- | |
| 594 | 605 | |
| 606 | - 1x 65SC02 (main) | |
| 607 | - 1x 8948? (sound) | |
| 608 | - 1x MC6845P (CRT controller) | |
| 609 | - 1x oscillator 16.000000 MHz | |
| 610 | ||
| 611 | - 2x M27C512 | |
| 612 | - 1x M27C256B | |
| 613 | - 1x PROM N82S147N | |
| 614 | - 1x GAL16V8-25LNC (read protected) | |
| 615 | - 1x GAL18CV8-25 (read protected) | |
| 616 | ||
| 617 | - 1x HY6264ALP-12 | |
| 618 | - 1x UM6116K-3L | |
| 619 | ||
| 620 | - 1x JAMMA edge connector | |
| 621 | - 1x trimmer (volume?) | |
| 622 | - 1x LM380N (amplifier) | |
| 623 | - 1x ULN2803A (8 Darlington arrays) | |
| 624 | - 1x battery | |
| 625 | - 1x test button | |
| 626 | - 1x indicator LED | |
| 627 | - NO DIP switches | |
| 628 | ||
| 629 | Board has printed "LEOPARDO 5" | |
| 630 | ||
| 631 | ||
| 632 | ||
| 595 | 633 | *********************************************************************************** |
| 596 | 634 | |
| 597 | 635 | |
| r1037 | r1038 | |
| 694 | 732 | Proper colors decoded. |
| 695 | 733 | - Updated technical notes. |
| 696 | 734 | |
| 735 | 2007/09/21 | |
| 736 | - Added new game: Saloon (France, encrypted). Preliminary. | |
| 737 | - Updated technical notes. | |
| 697 | 738 | |
| 739 | ||
| 740 | ||
| 698 | 741 | *** TO DO *** |
| 699 | 742 | |
| 700 | 743 | - Fix the last 2 GFX planes in magiccrd. |
| 701 | - Figure out the royalcdc | |
| 744 | - Figure out the royalcdc, | |
| 702 | 745 | - Analyze the unknown writes to $2000/$4000 in some games. |
| 703 | 746 | - Check for the reads to the ay8910 output ports in some games. |
| 704 | 747 | - Figure out the MCU in monglfir and soccernw. |
| r1037 | r1038 | |
| 1821 | 1864 | ROM_LOAD( "5.u27", 0x0000, 0x8000, CRC(f3d7d640) SHA1(f78060f4603e316fa3c2ec4ba6d7edf261cf6d8a) ) |
| 1822 | 1865 | ROM_END |
| 1823 | 1866 | |
| 1867 | ROM_START( saloon ) | |
| 1868 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 1869 | ROM_LOAD( "1s.bin", 0x8000, 0x8000, CRC(66938330) SHA1(09118d607eff7121472db7d2cc24079e063dc7cf) ) | |
| 1824 | 1870 | |
| 1871 | ROM_REGION( 0x10000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1872 | ROM_LOAD( "2s.bin", 0x0000, 0x8000, CRC(39a792d5) SHA1(45c956a4a33587238a24eed602039115db1bb4b6) ) | |
| 1873 | ROM_LOAD( "3s.bin", 0x8000, 0x8000, CRC(babc0964) SHA1(f084465cc34ea7ac19091d3e75ef7d55c48273ae) ) | |
| 1874 | ||
| 1875 | /* looks strange */ | |
| 1876 | ROM_REGION( 0x0200, REGION_PROMS, 0 ) | |
| 1877 | ROM_LOAD( "82s147_saloon.bin", 0x0000, 0x0200, CRC(f424ccc1) SHA1(6df1215f58cca786e9f0ea4bf35407cf7fe21d83) ) | |
| 1878 | ROM_END | |
| 1879 | ||
| 1880 | ||
| 1825 | 1881 | /************************** |
| 1826 | 1882 | * Driver Initialization * |
| 1827 | 1883 | **************************/ |
| r1037 | r1038 | |
| 1976 | 2032 | GAME( 199?, monglfir, 0, royalmcu, royalcrd, funworld, ROT0, "bootleg", "Mongolfier New (Italia)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) |
| 1977 | 2033 | GAME( 199?, soccernw, 0, royalcrd, royalcrd, soccernw, ROT0, "bootleg", "Soccer New (Italia)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) |
| 1978 | 2034 | GAME( 1998, snookr10, 0, snookr10, snookr10, 0, ROT0, "Sandiy", "Snooker 10 (Ver 1.11)", GAME_NO_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) |
| 2035 | GAME( 198?, saloon, 0, funworld, funworld, funworld, ROT0, "Unknown", "Saloon (France, encrypted)", GAME_NO_SOUND | GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) |
| r1037 | r1038 | |
|---|---|---|
| 201 | 201 | AM_RANGE(0x00, 0x00) AM_WRITE(MWA8_NOP) /* unknown... is this a trigger? */ |
| 202 | 202 | ADDRESS_MAP_END |
| 203 | 203 | |
| 204 | ||
| 204 | 205 | static ADDRESS_MAP_START( readmem_sound, ADDRESS_SPACE_PROGRAM, 8 ) |
| 205 | 206 | AM_RANGE(0x0000, 0x0fff) AM_READ(MRA8_ROM) |
| 206 | 207 | ADDRESS_MAP_END |
| 208 | ||
| 207 | 209 | static ADDRESS_MAP_START( writemem_sound, ADDRESS_SPACE_PROGRAM, 8 ) |
| 208 | 210 | AM_RANGE(0x0000, 0x0fff) AM_WRITE(MWA8_ROM) |
| 209 | 211 | ADDRESS_MAP_END |
| 212 | ||
| 210 | 213 | static ADDRESS_MAP_START( readport_sound, ADDRESS_SPACE_IO, 8 ) |
| 211 | 214 | AM_RANGE(0x00, 0xff) AM_READ(mario_sh_tune_r) |
| 212 | 215 | AM_RANGE(I8039_p1, I8039_p1) AM_READ(mario_sh_p1_r) |
| r1037 | r1038 | |
| 214 | 217 | AM_RANGE(I8039_t0, I8039_t0) AM_READ(mario_sh_t0_r) |
| 215 | 218 | AM_RANGE(I8039_t1, I8039_t1) AM_READ(mario_sh_t1_r) |
| 216 | 219 | ADDRESS_MAP_END |
| 220 | ||
| 217 | 221 | static ADDRESS_MAP_START( writeport_sound, ADDRESS_SPACE_IO, 8 ) |
| 218 | 222 | AM_RANGE(0x00, 0xff) AM_WRITE(mario_sh_sound_w) |
| 219 | 223 | AM_RANGE(I8039_p1, I8039_p1) AM_WRITE(mario_sh_p1_w) |
| r1037 | r1038 | |
| 223 | 227 | |
| 224 | 228 | |
| 225 | 229 | INPUT_PORTS_START( mario ) |
| 226 | PORT_START /* IN0 */ | |
| 227 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY | |
| 228 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY | |
| 230 | PORT_START_TAG("IN0") | |
| 231 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1) | |
| 232 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1) | |
| 229 | 233 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 230 | 234 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 231 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 235 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 232 | 236 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 ) |
| 233 | 237 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 ) |
| 234 | PORT_ | |
| 238 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_HIGH | |
| 235 | 239 | |
| 236 | PORT_START | |
| 240 | PORT_START_TAG(" | |
| 237 | 241 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2) |
| 238 | 242 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2) |
| 239 | 243 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 240 | 244 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 241 | 245 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 242 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 ) | |
| 243 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 246 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 247 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN2 ) /* doesn't work in game, but does in service mode */ | |
| 244 | 248 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 245 | 249 | |
| 246 | PORT_START /* DSW0 */ | |
| 247 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2") | |
| 250 | PORT_START_TAG("DSW") | |
| 251 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2") | |
| 248 | 252 | PORT_DIPSETTING( 0x00, "3" ) |
| 249 | 253 | PORT_DIPSETTING( 0x01, "4" ) |
| 250 | 254 | PORT_DIPSETTING( 0x02, "5" ) |
| 251 | 255 | PORT_DIPSETTING( 0x03, "6" ) |
| 252 | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coinage ) ) | |
| 256 | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:3,4") | |
| 253 | 257 | PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) |
| 254 | 258 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 255 | 259 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) ) |
| 256 | 260 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_3C ) ) |
| 257 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:5,6") | |
| 258 | PORT_DIPSETTING( 0x00, "20000" ) | |
| 259 | PORT_DIPSETTING( 0x10, "30000" ) | |
| 260 | PORT_DIPSETTING( 0x20, "40000" ) | |
| 261 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:5,6") | |
| 262 | PORT_DIPSETTING( 0x00, "20k only" ) | |
| 263 | PORT_DIPSETTING( 0x10, "30k only" ) | |
| 264 | PORT_DIPSETTING( 0x20, "40k only" ) | |
| 261 | 265 | PORT_DIPSETTING( 0x30, DEF_STR( None ) ) |
| 262 | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Difficulty ) ) | |
| 266 | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:7,8") | |
| 263 | 267 | PORT_DIPSETTING( 0x00, DEF_STR( Easy ) ) |
| 264 | 268 | PORT_DIPSETTING( 0x80, DEF_STR( Medium ) ) |
| 265 | 269 | PORT_DIPSETTING( 0x40, DEF_STR( Hard ) ) |
| 266 | 270 | PORT_DIPSETTING( 0xc0, DEF_STR( Hardest ) ) |
| 267 | 271 | INPUT_PORTS_END |
| 268 | 272 | |
| 269 | INPUT_PORTS_START( mariojp ) | |
| 270 | PORT_START /* IN0 */ | |
| 271 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY | |
| 272 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY | |
| 273 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 274 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 275 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) | |
| 276 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 ) | |
| 277 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 ) | |
| 278 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME( DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2) | |
| 273 | INPUT_PORTS_START( marioo ) | |
| 274 | PORT_INCLUDE( mario ) | |
| 279 | 275 | |
| 280 | PORT_START /* IN1 */ | |
| 281 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2) | |
| 282 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2) | |
| 283 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 284 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 285 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 286 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 287 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN2 ) /* doesn't work in game, but does in service mode */ | |
| 288 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) | |
| 276 | PORT_MODIFY( "IN1" ) | |
| 277 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 ) | |
| 278 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 279 | INPUT_PORTS_END | |
| 289 | 280 | |
| 290 | PORT_START /* DSW0 */ | |
| 291 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) | |
| 281 | INPUT_PORTS_START( marioj ) | |
| 282 | PORT_INCLUDE( mario ) | |
| 283 | ||
| 284 | PORT_MODIFY( "DSW" ) | |
| 285 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2") | |
| 292 | 286 | PORT_DIPSETTING( 0x00, "3" ) |
| 293 | 287 | PORT_DIPSETTING( 0x01, "4" ) |
| 294 | 288 | PORT_DIPSETTING( 0x02, "5" ) |
| 295 | 289 | PORT_DIPSETTING( 0x03, "6" ) |
| 296 | PORT_DIPNAME( 0x1c, 0x00, DEF_STR( Coinage ) ) | |
| 290 | PORT_DIPNAME( 0x1c, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:3,4,5") | |
| 297 | 291 | PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) ) |
| 298 | 292 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) |
| 299 | 293 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| r1037 | r1038 | |
| 302 | 296 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) |
| 303 | 297 | PORT_DIPSETTING( 0x14, DEF_STR( 1C_5C ) ) |
| 304 | 298 | PORT_DIPSETTING( 0x1c, DEF_STR( 1C_6C ) ) |
| 305 | PORT_DIPNAME( 0x20, 0x20, "2 Players Game" ) | |
| 299 | PORT_DIPNAME( 0x20, 0x20, "2 Players Game" ) PORT_DIPLOCATION("SW1:6") | |
| 306 | 300 | PORT_DIPSETTING( 0x00, "1 Credit" ) |
| 307 | 301 | PORT_DIPSETTING( 0x20, "2 Credits" ) |
| 308 | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Bonus_Life ) ) | |
| 309 | PORT_DIPSETTING( 0x00, "20000" ) | |
| 310 | PORT_DIPSETTING( 0x40, "30000" ) | |
| 311 | PORT_DIPSETTING( 0x80, "40000" ) | |
| 302 | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:7,8") | |
| 303 | PORT_DIPSETTING( 0x00, "20k 50k 30k+" ) | |
| 304 | PORT_DIPSETTING( 0x40, "30k 60k 30k+" ) | |
| 305 | PORT_DIPSETTING( 0x80, "40k 70k 30k+" ) | |
| 312 | 306 | PORT_DIPSETTING( 0xc0, DEF_STR( None ) ) |
| 313 | 307 | INPUT_PORTS_END |
| 314 | 308 | |
| 309 | INPUT_PORTS_START( masao ) | |
| 310 | PORT_INCLUDE( marioo ) | |
| 315 | 311 | |
| 312 | PORT_MODIFY( "DSW" ) | |
| 313 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:5,6") | |
| 314 | PORT_DIPSETTING( 0x00, "20k 40k 20k+" ) | |
| 315 | PORT_DIPSETTING( 0x10, "30k 50k 20k+" ) | |
| 316 | PORT_DIPSETTING( 0x20, "40k 60k 20k+" ) | |
| 317 | PORT_DIPSETTING( 0x30, DEF_STR( None ) ) | |
| 318 | INPUT_PORTS_END | |
| 316 | 319 | |
| 320 | ||
| 321 | ||
| 317 | 322 | static const gfx_layout charlayout = |
| 318 | 323 | { |
| 319 | 324 | 8,8, /* 8*8 characters */ |
| r1037 | r1038 | |
| 482 | 487 | |
| 483 | 488 | ROM_START( mario ) |
| 484 | 489 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 490 | ROM_LOAD( "tma1-c.7f_e-1", 0x0000, 0x2000, CRC(c0c6e014) SHA1(36a04f9ca1c2a583477cb8a6f2ef94e044e08296) ) | |
| 491 | ROM_LOAD( "tma1-c.7e_e-b", 0x2000, 0x2000, CRC(b09ab857) SHA1(35b91cd1c4c3dd2d543a1ea8ff7b951715727792) ) | |
| 492 | ROM_LOAD( "tma1-c.7d_e-1", 0x4000, 0x2000, CRC(dcceb6c1) SHA1(b19804e69ce2c98cf276c6055c3a250316b96b45) ) | |
| 493 | ROM_LOAD( "tma1-c.7c_e-3", 0xf000, 0x1000, CRC(0d31bd1c) SHA1(a2e238470ba2ea3c81225fec687f61f047c68c59) ) | |
| 494 | ||
| 495 | ROM_REGION( 0x1000, REGION_CPU2, 0 ) /* sound */ | |
| 496 | ROM_LOAD( "tma1c-a.6k", 0x0000, 0x1000, CRC(06b9ff85) SHA1(111a29bcb9cda0d935675fa26eca6b099a88427f) ) | |
| 497 | ||
| 498 | ROM_REGION( 0x2000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 499 | ROM_LOAD( "mario.3f", 0x0000, 0x1000, CRC(28b0c42c) SHA1(46749568aff88a28c3b6a1ac423abd1b90742a4d) ) | |
| 500 | ROM_LOAD( "mario.3j", 0x1000, 0x1000, CRC(0c8cc04d) SHA1(15fae47d701dc1ef15c943cee6aa991776ecffdf) ) | |
| 501 | ||
| 502 | ROM_REGION( 0x6000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 503 | ROM_LOAD( "tma1-v.7m", 0x0000, 0x1000, CRC(d01c0e2c) SHA1(cd6cc9d69c36db15543601f5da2abf109cde43c9) ) | |
| 504 | ROM_LOAD( "mario.7n", 0x1000, 0x1000, CRC(4f3a1f47) SHA1(0747d693b9482f6dd28b0bc484fd1d3e29d35654) ) | |
| 505 | ROM_LOAD( "mario.7p", 0x2000, 0x1000, CRC(56be6ccd) SHA1(15a6e16c189d45f72761ebcbe9db5001bdecd659) ) | |
| 506 | ROM_LOAD( "tma1-v.7s", 0x3000, 0x1000, CRC(ff856e6f) SHA1(2bc9ff18bb1842e8de2bc61ac828f1b175290bed) ) | |
| 507 | ROM_LOAD( "mario.7t", 0x4000, 0x1000, CRC(641f0008) SHA1(589fe108c7c11278fd897f2ded8f0498bc149cfd) ) | |
| 508 | ROM_LOAD( "tma1-v.7u", 0x5000, 0x1000, CRC(d2dbeb75) SHA1(676cf3e15252cd0d9e926ca15c3aa0caa39be269) ) | |
| 509 | ||
| 510 | ROM_REGION( 0x0200, REGION_PROMS, 0 ) | |
| 511 | ROM_LOAD( "mario.4p", 0x0000, 0x0200, CRC(afc9bd41) SHA1(90b739c4c7f24a88b6ac5ca29b06c032906a2801) ) | |
| 512 | ROM_END | |
| 513 | ||
| 514 | ROM_START( marioo ) | |
| 515 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 485 | 516 | ROM_LOAD( "mario.7f", 0x0000, 0x2000, CRC(c0c6e014) SHA1(36a04f9ca1c2a583477cb8a6f2ef94e044e08296) ) |
| 486 | 517 | ROM_LOAD( "mario.7e", 0x2000, 0x2000, CRC(116b3856) SHA1(e372f846d0e5a2b9b47ebd0330293fcc8a12363f) ) |
| 487 | 518 | ROM_LOAD( "mario.7d", 0x4000, 0x2000, CRC(dcceb6c1) SHA1(b19804e69ce2c98cf276c6055c3a250316b96b45) ) |
| r1037 | r1038 | |
| 506 | 537 | ROM_LOAD( "mario.4p", 0x0000, 0x0200, CRC(afc9bd41) SHA1(90b739c4c7f24a88b6ac5ca29b06c032906a2801) ) |
| 507 | 538 | ROM_END |
| 508 | 539 | |
| 509 | ROM_START( marioj | |
| 540 | ROM_START( marioj | |
| 510 | 541 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 511 | 542 | ROM_LOAD( "tma1c-a1.7f", 0x0000, 0x2000, CRC(b64b6330) SHA1(f7084251ac325bbfa3fb804da16a50622e1fd213) ) |
| 512 | 543 | ROM_LOAD( "tma1c-a2.7e", 0x2000, 0x2000, CRC(290c4977) SHA1(5af266be0ddc883c6548c90e4a9084024a1e91a0) ) |
| r1037 | r1038 | |
| 560 | 591 | |
| 561 | 592 | |
| 562 | 593 | |
| 563 | GAME( 1983, mario, 0, mario, mario, 0, ROT180, "Nintendo of America", "Mario Bros. (US)", GAME_SUPPORTS_SAVE ) | |
| 564 | GAME( 1983, mariojp, mario, mario, mariojp, 0, ROT180, "Nintendo", "Mario Bros. (Japan)", GAME_SUPPORTS_SAVE ) | |
| 565 | GAME( 1983, masao, mario, masao, mario, 0, ROT180, "bootleg", "Masao", GAME_SUPPORTS_SAVE ) | |
| 594 | GAME( 1983, mario, 0, mario, mario, 0, ROT180, "Nintendo of America", "Mario Bros. (US, set 1)", GAME_SUPPORTS_SAVE ) | |
| 595 | GAME( 1983, marioo, mario, mario, marioo, 0, ROT180, "Nintendo of America", "Mario Bros. (US, set 2)", GAME_SUPPORTS_SAVE ) | |
| 596 | GAME( 1983, marioj, mario, mario, marioj, 0, ROT180, "Nintendo", "Mario Bros. (Japan)", GAME_SUPPORTS_SAVE ) | |
| 597 | GAME( 1983, masao, mario, masao, masao, 0, ROT180, "bootleg", "Masao", GAME_SUPPORTS_SAVE ) |
| r1037 | r1038 | |
|---|---|---|
| 12 | 12 | |
| 13 | 13 | #include "driver.h" |
| 14 | 14 | #include "videopin.h" |
| 15 | #include "videopin.lh" | |
| 15 | 16 | #include "sound/discrete.h" |
| 16 | 17 | |
| 17 | 18 | static mame_time time_pushed; |
| r1037 | r1038 | |
| 414 | 415 | * |
| 415 | 416 | *************************************/ |
| 416 | 417 | |
| 417 | GAME( 1979, videopin, 0, videopin, videopin, 0, ROT270, "Atari", "Video Pinball", 0 ) | |
| 418 | GAMEL( 1979, videopin, 0, videopin, videopin, 0, ROT270, "Atari", "Video Pinball", 0, layout_videopin ) |
| r1037 | r1038 | |
|---|---|---|
| 335 | 335 | return ~0; |
| 336 | 336 | } |
| 337 | 337 | |
| 338 | #ifdef UNUSED_FUNCTION | |
| 338 | 339 | static WRITE16_HANDLER( tumblepb_sound_w ) |
| 339 | 340 | { |
| 340 | 341 | soundlatch_w(0,data & 0xff); |
| 341 | 342 | cpunum_set_input_line(1,0,HOLD_LINE); |
| 342 | 343 | } |
| 344 | #endif | |
| 343 | 345 | |
| 344 | 346 | static WRITE16_HANDLER( jumppop_sound_w ) |
| 345 | 347 | { |
| r1037 | r1038 | |
| 830 | 832 | |
| 831 | 833 | /******************************************************************************/ |
| 832 | 834 | |
| 835 | #ifdef UNUSED_FUNCTION | |
| 833 | 836 | static WRITE8_HANDLER( YM2151_w ) |
| 834 | 837 | { |
| 835 | 838 | switch (offset) { |
| r1037 | r1038 | |
| 841 | 844 | break; |
| 842 | 845 | } |
| 843 | 846 | } |
| 847 | #endif | |
| 844 | 848 | |
| 845 | 849 | WRITE16_HANDLER( semicom_soundcmd_w ) |
| 846 | 850 | { |
| r1037 | r1038 | |
|---|---|---|
| 410 | 410 | m68901_int_gen(TMRA); // Fire an interrupt. |
| 411 | 411 | } |
| 412 | 412 | |
| 413 | #ifdef UNUSED_FUNCTION | |
| 413 | 414 | static TIMER_CALLBACK( timerb_int ) |
| 414 | 415 | { |
| 415 | 416 | mame_timer_set(scale_up_mame_time(MAME_TIME_IN_HZ(M68901_CLK), ((m68901_base[0x10]>>8) & 0xff) * 200),0,timera_int); |
| r1037 | r1038 | |
| 421 | 422 | mame_timer_set(scale_up_mame_time(MAME_TIME_IN_HZ(M68901_CLK), ((m68901_base[0x11]>>8) & 0xff) * 200),0,timera_int); |
| 422 | 423 | m68901_int_gen(TMRC); // Fire an interrupt. |
| 423 | 424 | } |
| 425 | #endif | |
| 424 | 426 | |
| 425 | 427 | static TIMER_CALLBACK( timerd_int ) |
| 426 | 428 | { |
| r1037 | r1038 | |
| 674 | 676 | |
| 675 | 677 | } |
| 676 | 678 | |
| 679 | #ifdef UNUSED_FUNCTION | |
| 677 | 680 | static WRITE32_HANDLER( am_uart_w ) |
| 678 | 681 | { |
| 679 | 682 | mame_printf_debug("%c",data); |
| r1037 | r1038 | |
| 699 | 702 | { |
| 700 | 703 | popmessage("TMS Write to 2600000: %x",data); |
| 701 | 704 | } |
| 705 | #endif | |
| 702 | 706 | |
| 703 | 707 | |
| 704 | 708 | static READ16_HANDLER( tms_host_r ) |
| r1037 | r1038 | |
| 711 | 715 | tms34010_host_w(1, offset, data); |
| 712 | 716 | } |
| 713 | 717 | |
| 718 | #ifdef UNUSED_FUNCTION | |
| 714 | 719 | static WRITE16_HANDLER( reset_slave ) |
| 715 | 720 | { |
| 716 | 721 | if(data & 0x0020) |
| r1037 | r1038 | |
| 724 | 729 | logerror("TMS Reset\n"); |
| 725 | 730 | } |
| 726 | 731 | } |
| 732 | #endif | |
| 727 | 733 | |
| 728 | 734 | |
| 729 | 735 |
| r1037 | r1038 | |
|---|---|---|
| 1959 | 1959 | |
| 1960 | 1960 | |
| 1961 | 1961 | INPUT_PORTS_START( contcirc ) |
| 1962 | PORT_START /* DSW A */ | |
| 1962 | PORT_START_TAG("DSW1") /* DSW A */ | |
| 1963 | 1963 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) ) |
| 1964 | 1964 | PORT_DIPSETTING( 0x01, DEF_STR( Upright ) ) |
| 1965 | 1965 | PORT_DIPSETTING( 0x00, "Cockpit" ) // analogue accelerator pedal |
| r1037 | r1038 | |
| 1972 | 1972 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 1973 | 1973 | TAITO_Z_COINAGE_WORLD_8 |
| 1974 | 1974 | |
| 1975 | PORT_START /* DSW B */ | |
| 1975 | PORT_START_TAG("DSW2") /* DSW B */ | |
| 1976 | 1976 | PORT_DIPNAME( 0x03, 0x03, "Difficulty 1 (time/speed)" ) |
| 1977 | 1977 | PORT_DIPSETTING( 0x02, DEF_STR( Easy ) ) |
| 1978 | 1978 | PORT_DIPSETTING( 0x03, DEF_STR( Normal ) ) |
| r1037 | r1038 | |
| 2030 | 2030 | INPUT_PORTS_END |
| 2031 | 2031 | |
| 2032 | 2032 | INPUT_PORTS_START( contcrcu ) |
| 2033 | PORT_START /* DSW A */ | |
| 2034 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) ) | |
| 2035 | PORT_DIPSETTING( 0x01, DEF_STR( Upright ) ) | |
| 2036 | PORT_DIPSETTING( 0x00, "Cockpit" ) // analogue accelerator pedal | |
| 2037 | PORT_DIPNAME( 0x02, 0x02, "Discounted continues" ) | |
| 2038 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 2039 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) | |
| 2040 | PORT_SERVICE( 0x04, IP_ACTIVE_LOW ) | |
| 2041 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) | |
| 2042 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 2043 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 2044 | TAITO_Z_COINAGE_JAPAN_8 // confirmed | |
| 2033 | PORT_INCLUDE(contcirc) | |
| 2045 | 2034 | |
| 2046 | PORT_START /* DSW B */ | |
| 2047 | PORT_DIPNAME( 0x03, 0x03, "Difficulty 1 (time/speed)" ) | |
| 2048 | PORT_DIPSETTING( 0x02, DEF_STR( Easy ) ) | |
| 2049 | PORT_DIPSETTING( 0x03, DEF_STR( Normal ) ) | |
| 2050 | PORT_DIPSETTING( 0x01, DEF_STR( Hard ) ) | |
| 2051 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) | |
| 2052 | PORT_DIPNAME( 0x0c, 0x0c, "Difficulty 2 (other cars)" ) | |
| 2053 | PORT_DIPSETTING( 0x08, DEF_STR( Easy ) ) | |
| 2054 | PORT_DIPSETTING( 0x0c, DEF_STR( Normal ) ) | |
| 2055 | PORT_DIPSETTING( 0x04, DEF_STR( Hard ) ) | |
| 2056 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) | |
| 2057 | PORT_DIPNAME( 0x10, 0x10, "Steering wheel" ) //not sure what effect this has | |
| 2058 | PORT_DIPSETTING( 0x10, "Free" ) | |
| 2059 | PORT_DIPSETTING( 0x00, "Locked" ) | |
| 2060 | PORT_DIPNAME( 0x20, 0x00, "Enable 3d alternate frames" ) | |
| 2061 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 2062 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) | |
| 2063 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) ) //acc. to manual | |
| 2064 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 2065 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2066 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) ) //acc. to manual | |
| 2067 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 2068 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2069 | ||
| 2070 | PORT_START /* IN0 */ | |
| 2071 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2072 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2073 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) | |
| 2074 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 2075 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 2076 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_PLAYER(1) /* 3 for accel [7 levels] */ | |
| 2077 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_PLAYER(1) | |
| 2078 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) /* main accel key */ | |
| 2079 | ||
| 2080 | PORT_START /* IN1: b3 not mapped: standardized on holding b4=lo gear */ | |
| 2081 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2082 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2083 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) | |
| 2084 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) | |
| 2085 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_PLAYER(1) /* gear shift lo/hi */ | |
| 2086 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_PLAYER(1) /* 3 for brake [7 levels] */ | |
| 2087 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_PLAYER(1) | |
| 2088 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) /* main brake key */ | |
| 2089 | ||
| 2090 | PORT_START /* IN2, unused */ | |
| 2091 | ||
| 2092 | PORT_START /* IN3, "handle" i.e. steering */ | |
| 2093 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(15) PORT_REVERSE PORT_PLAYER(1) | |
| 2094 | ||
| 2095 | PORT_START /* IN4, fake allowing digital steer */ | |
| 2096 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1) | |
| 2097 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1) | |
| 2098 | PORT_DIPNAME( 0x10, 0x00, "Steering type" ) | |
| 2099 | PORT_DIPSETTING( 0x10, "Digital" ) | |
| 2100 | PORT_DIPSETTING( 0x00, "Analogue" ) | |
| 2035 | PORT_MODIFY("DSW1") | |
| 2036 | TAITO_Z_COINAGE_JAPAN_8 // confirmed | |
| 2101 | 2037 | INPUT_PORTS_END |
| 2102 | 2038 | |
| 2103 | 2039 | INPUT_PORTS_START( chasehq ) // IN3-6 perhaps used with cockpit setup? // |
| 2104 | PORT_START /* DSW A */ | |
| 2040 | PORT_START_TAG("DSW1") /* DSW A */ | |
| 2105 | 2041 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Cabinet ) ) /* US Manual states DIPS 1 & 2 "MUST REMAIN OFF" */ |
| 2106 | 2042 | PORT_DIPSETTING( 0x03, "Upright / Steering Lock" ) |
| 2107 | 2043 | PORT_DIPSETTING( 0x02, "Upright / No Steering Lock" ) |
| r1037 | r1038 | |
| 2113 | 2049 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 2114 | 2050 | TAITO_Z_COINAGE_WORLD_8 |
| 2115 | 2051 | |
| 2116 | PORT_START /* DSW B */ | |
| 2052 | PORT_START_TAG("DSW2") /* DSW B */ | |
| 2117 | 2053 | TAITO_Z_DIFFICULTY_8 |
| 2118 | 2054 | PORT_DIPNAME( 0x0c, 0x0c, "Timer Setting" ) |
| 2119 | 2055 | PORT_DIPSETTING( 0x08, "70 Seconds" ) |
| r1037 | r1038 | |
| 2206 | 2142 | PORT_DIPSETTING( 0x00, "Analogue" ) |
| 2207 | 2143 | INPUT_PORTS_END |
| 2208 | 2144 | |
| 2209 | INPUT_PORTS_START( chasehqj ) // IN3-6 perhaps used with cockpit setup? // | |
| 2210 | PORT_START /* DSW A */ | |
| 2211 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Cabinet ) ) | |
| 2212 | PORT_DIPSETTING( 0x03, "Upright / Steering Lock" ) | |
| 2213 | PORT_DIPSETTING( 0x02, "Upright / No Steering Lock" ) | |
| 2214 | PORT_DIPSETTING( 0x01, "Full Throttle Convert, Cockpit" ) | |
| 2215 | PORT_DIPSETTING( 0x00, "Full Throttle Convert, Deluxe" ) | |
| 2216 | PORT_SERVICE( 0x04, IP_ACTIVE_LOW ) | |
| 2217 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) | |
| 2218 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 2219 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 2220 | TAITO_Z_COINAGE_JAPAN_8 | |
| 2145 | INPUT_PORTS_START( chasehqj ) | |
| 2146 | PORT_INCLUDE(chasehq) | |
| 2221 | 2147 | |
| 2222 | PORT_START /* DSW B */ | |
| 2223 | TAITO_Z_DIFFICULTY_8 | |
| 2224 | PORT_DIPNAME( 0x0c, 0x0c, "Timer Setting" ) | |
| 2225 | PORT_DIPSETTING( 0x08, "70 Seconds" ) | |
| 2226 | PORT_DIPSETTING( 0x04, "65 Seconds" ) | |
| 2227 | PORT_DIPSETTING( 0x0c, "60 Seconds" ) | |
| 2228 | PORT_DIPSETTING( 0x00, "55 Seconds" ) | |
| 2229 | PORT_DIPNAME( 0x10, 0x10, "Turbos Stocked" ) | |
| 2230 | PORT_DIPSETTING( 0x10, "3" ) | |
| 2231 | PORT_DIPSETTING( 0x00, "5" ) | |
| 2232 | PORT_DIPNAME( 0x20, 0x20, "Discounted Continue Play" ) /* Full coin price to start, 1 coin to continue */ | |
| 2233 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 2234 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2235 | PORT_DIPNAME( 0x40, 0x40, "Damage Cleared at Continue" ) | |
| 2236 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 2237 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 2238 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Allow_Continue ) ) | |
| 2239 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 2240 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) | |
| 2241 | ||
| 2242 | PORT_START /* IN0 */ | |
| 2243 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2244 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2245 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 2246 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN2 ) | |
| 2247 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 2248 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) /* brake */ | |
| 2249 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2250 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2251 | ||
| 2252 | PORT_START /* IN1 */ | |
| 2253 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) /* turbo */ | |
| 2254 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_TILT ) | |
| 2255 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2256 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) | |
| 2257 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_PLAYER(1) /* gear */ | |
| 2258 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) /* accel */ | |
| 2259 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2260 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2261 | ||
| 2262 | PORT_START /* IN2, unused */ | |
| 2263 | ||
| 2264 | PORT_START /* IN3, ??? */ | |
| 2265 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2266 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2267 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2268 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2269 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2270 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2271 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2272 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2273 | ||
| 2274 | PORT_START /* IN4, ??? */ | |
| 2275 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2276 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2277 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2278 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2279 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2280 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2281 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2282 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2283 | ||
| 2284 | PORT_START /* IN5, ??? */ | |
| 2285 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2286 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2287 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2288 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2289 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2290 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2291 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2292 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2293 | ||
| 2294 | PORT_START /* IN6, ??? */ | |
| 2295 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2296 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2297 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2298 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2299 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2300 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2301 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2302 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2303 | ||
| 2304 | PORT_START /* IN7, steering */ | |
| 2305 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(15) PORT_PLAYER(1) | |
| 2306 | ||
| 2307 | PORT_START /* IN8, fake allowing digital steer */ | |
| 2308 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1) | |
| 2309 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1) | |
| 2310 | PORT_DIPNAME( 0x10, 0x00, "Steering type" ) | |
| 2311 | PORT_DIPSETTING( 0x10, "Digital" ) | |
| 2312 | PORT_DIPSETTING( 0x00, "Analogue" ) | |
| 2148 | PORT_MODIFY("DSW1") | |
| 2149 | TAITO_Z_COINAGE_JAPAN_8 | |
| 2313 | 2150 | INPUT_PORTS_END |
| 2314 | 2151 | |
| 2315 | 2152 | INPUT_PORTS_START( enforce ) |
| r1037 | r1038 | |
| 2369 | 2206 | INPUT_PORTS_END |
| 2370 | 2207 | |
| 2371 | 2208 | INPUT_PORTS_START( bshark ) |
| 2372 | PORT_START /* DSW A */ | |
| 2209 | PORT_START_TAG("DSW1") /* DSW A */ | |
| 2373 | 2210 | PORT_DIPNAME( 0x01, 0x01, "Mirror screen" ) // manual says first two must be off |
| 2374 | 2211 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 2375 | 2212 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r1037 | r1038 | |
| 2382 | 2219 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 2383 | 2220 | TAITO_Z_COINAGE_US_8 |
| 2384 | 2221 | |
| 2385 | PORT_START /* DSW B */ | |
| 2222 | PORT_START_TAG("DSW2") /* DSW B */ | |
| 2386 | 2223 | TAITO_Z_DIFFICULTY_8 |
| 2387 | 2224 | PORT_DIPNAME( 0x0c, 0x04, "Speed of Sight" ) |
| 2388 | 2225 | PORT_DIPSETTING( 0x0c, "Slow" ) |
| r1037 | r1038 | |
| 2438 | 2275 | INPUT_PORTS_END |
| 2439 | 2276 | |
| 2440 | 2277 | INPUT_PORTS_START( bsharkj ) |
| 2441 | PORT_START /* DSW A */ | |
| 2442 | PORT_DIPNAME( 0x01, 0x01, "Mirror screen" ) | |
| 2443 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 2444 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2445 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) | |
| 2446 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 2447 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2448 | PORT_SERVICE( 0x04, IP_ACTIVE_LOW ) | |
| 2449 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) | |
| 2450 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 2451 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 2452 | TAITO_Z_COINAGE_JAPAN_8 | |
| 2278 | PORT_INCLUDE(bshark) | |
| 2453 | 2279 | |
| 2454 | PORT_START /* DSW B */ | |
| 2455 | TAITO_Z_DIFFICULTY_8 | |
| 2456 | PORT_DIPNAME( 0x0c, 0x04, "Speed of Sight" ) | |
| 2457 | PORT_DIPSETTING( 0x0c, "Slow" ) | |
| 2458 | PORT_DIPSETTING( 0x08, DEF_STR( Medium ) ) | |
| 2459 | PORT_DIPSETTING( 0x04, "Fast" ) | |
| 2460 | PORT_DIPSETTING( 0x00, "Fastest" ) | |
| 2461 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) | |
| 2462 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 2463 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2464 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) | |
| 2465 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 2466 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2467 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 2468 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 2469 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2470 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 2471 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 2472 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2473 | ||
| 2474 | PORT_START /* IN0 */ | |
| 2475 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 2476 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 2477 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 2478 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_TILT ) | |
| 2479 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2480 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2481 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2482 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2483 | ||
| 2484 | PORT_START /* IN1, unused */ | |
| 2485 | ||
| 2486 | PORT_START /* IN2, b2-5 affect sound num in service mode but otherwise useless (?) */ | |
| 2487 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) | |
| 2488 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) | |
| 2489 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 2490 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) | |
| 2491 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) | |
| 2492 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) | |
| 2493 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) /* "Fire" */ | |
| 2494 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) /* same as "Fire" */ | |
| 2495 | ||
| 2496 | PORT_START /* values chosen to match allowed crosshair area */ | |
| 2497 | PORT_BIT( 0xff, 0x00, IPT_AD_STICK_X ) PORT_MINMAX(0xcc,0x35) PORT_SENSITIVITY(20) PORT_KEYDELTA(4) PORT_REVERSE PORT_PLAYER(1) | |
| 2498 | ||
| 2499 | PORT_START /* "X adjust" */ | |
| 2500 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2501 | ||
| 2502 | PORT_START /* values chosen to match allowed crosshair area */ | |
| 2503 | PORT_BIT( 0xff, 0x00, IPT_AD_STICK_Y ) PORT_MINMAX(0xd5,0x32) PORT_SENSITIVITY(20) PORT_KEYDELTA(4) PORT_PLAYER(1) | |
| 2504 | ||
| 2505 | PORT_START /* "Y adjust" */ | |
| 2506 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2280 | PORT_MODIFY("DSW1") | |
| 2281 | TAITO_Z_COINAGE_JAPAN_8 | |
| 2507 | 2282 | INPUT_PORTS_END |
| 2508 | 2283 | |
| 2509 | 2284 | INPUT_PORTS_START( sci ) |
| 2510 | PORT_START /* DSW A */ | |
| 2285 | PORT_START_TAG("DSW1") /* DSW A */ | |
| 2511 | 2286 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) |
| 2512 | 2287 | PORT_DIPSETTING( 0x01, "Cockpit" ) |
| 2513 | 2288 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| r1037 | r1038 | |
| 2520 | 2295 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 2521 | 2296 | TAITO_Z_COINAGE_WORLD_8 |
| 2522 | 2297 | |
| 2523 | PORT_START /* DSW B */ | |
| 2298 | PORT_START_TAG("DSW2") /* DSW B */ | |
| 2524 | 2299 | TAITO_Z_DIFFICULTY_8 |
| 2525 | 2300 | PORT_DIPNAME( 0x0c, 0x0c, "Timer Setting" ) |
| 2526 | 2301 | PORT_DIPSETTING( 0x08, "70 Seconds" ) |
| r1037 | r1038 | |
| 2574 | 2349 | INPUT_PORTS_END |
| 2575 | 2350 | |
| 2576 | 2351 | INPUT_PORTS_START( sciu ) |
| 2577 | PORT_START /* DSW A */ | |
| 2578 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) | |
| 2579 | PORT_DIPSETTING( 0x01, "Cockpit" ) | |
| 2580 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 2581 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unused ) ) /* Manual states "MUST REMAIN OFF" */ | |
| 2582 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 2583 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2584 | PORT_SERVICE( 0x04, IP_ACTIVE_LOW ) | |
| 2585 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) | |
| 2586 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 2587 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 2352 | PORT_INCLUDE(sci) | |
| 2353 | ||
| 2354 | PORT_MODIFY("DSW1") | |
| 2588 | 2355 | TAITO_Z_COINAGE_US_8 |
| 2356 | INPUT_PORTS_END | |
| 2589 | 2357 | |
| 2590 | PORT_START /* DSW B */ | |
| 2591 | TAITO_Z_DIFFICULTY_8 | |
| 2592 | PORT_DIPNAME( 0x0c, 0x0c, "Timer Setting" ) | |
| 2593 | PORT_DIPSETTING( 0x08, "70 Seconds" ) | |
| 2594 | PORT_DIPSETTING( 0x04, "65 Seconds" ) | |
| 2595 | PORT_DIPSETTING( 0x0c, "60 Seconds" ) | |
| 2596 | PORT_DIPSETTING( 0x00, "55 Seconds" ) | |
| 2597 | PORT_DIPNAME( 0x10, 0x10, "Turbos Stocked" ) | |
| 2598 | PORT_DIPSETTING( 0x10, "3" ) | |
| 2599 | PORT_DIPSETTING( 0x00, "5" ) | |
| 2600 | PORT_DIPNAME( 0x20, 0x20, "Steering Radius" ) | |
| 2601 | PORT_DIPSETTING( 0x00, "270 Degree" ) | |
| 2602 | PORT_DIPSETTING( 0x20, "360 Degree" ) | |
| 2603 | PORT_DIPNAME( 0x40, 0x40, "Damage Cleared at Continue" ) | |
| 2604 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 2605 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 2606 | PORT_DIPNAME( 0x80, 0x80, "Siren Volume" ) | |
| 2607 | PORT_DIPSETTING( 0x80, DEF_STR( Normal ) ) | |
| 2608 | PORT_DIPSETTING( 0x00, DEF_STR( Low ) ) | |
| 2358 | INPUT_PORTS_START( scij ) | |
| 2359 | PORT_INCLUDE(sci) | |
| 2609 | 2360 | |
| 2610 | PORT_START /* IN0 */ | |
| 2611 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2612 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) /* fire */ | |
| 2613 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 2614 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 2615 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 2616 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) /* brake */ | |
| 2617 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2618 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2619 | ||
| 2620 | PORT_START /* IN1 */ | |
| 2621 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) /* turbo */ | |
| 2622 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_TILT ) | |
| 2623 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) /* "center" */ | |
| 2624 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) | |
| 2625 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_PLAYER(1) /* gear */ | |
| 2626 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) /* accel */ | |
| 2627 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2628 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2629 | ||
| 2630 | PORT_START /* IN2, unused */ | |
| 2631 | ||
| 2632 | PORT_START /* IN3, steering */ | |
| 2633 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(15) PORT_PLAYER(1) | |
| 2634 | ||
| 2635 | PORT_START /* IN4, fake allowing digital steer */ | |
| 2636 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1) | |
| 2637 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1) | |
| 2638 | PORT_DIPNAME( 0x10, 0x00, "Steering type" ) | |
| 2639 | PORT_DIPSETTING( 0x10, "Digital" ) | |
| 2640 | PORT_DIPSETTING( 0x00, "Analogue" ) | |
| 2361 | PORT_MODIFY("DSW1") | |
| 2362 | TAITO_Z_COINAGE_JAPAN_8 | |
| 2641 | 2363 | INPUT_PORTS_END |
| 2642 | 2364 | |
| 2643 | 2365 | INPUT_PORTS_START( nightstr ) |
| r1037 | r1038 | |
| 2709 | 2431 | INPUT_PORTS_END |
| 2710 | 2432 | |
| 2711 | 2433 | INPUT_PORTS_START( aquajack ) |
| 2712 | PORT_START /* DSW A */ | |
| 2434 | PORT_START_TAG("DSW1") /* DSW A */ | |
| 2713 | 2435 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) |
| 2714 | 2436 | PORT_DIPSETTING( 0x80, "Cockpit" ) |
| 2715 | 2437 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| r1037 | r1038 | |
| 2731 | 2453 | PORT_DIPSETTING( 0x02, DEF_STR( 1C_4C ) ) /* 2 Coins to Continue */ |
| 2732 | 2454 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) /* 3 Coins to Continue */ |
| 2733 | 2455 | |
| 2734 | PORT_START /* DSW B */ | |
| 2456 | PORT_START_TAG("DSW2") /* DSW B */ | |
| 2735 | 2457 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) ) |
| 2736 | 2458 | PORT_DIPSETTING( 0x40, DEF_STR( Easy ) ) |
| 2737 | 2459 | PORT_DIPSETTING( 0xc0, DEF_STR( Normal ) ) |
| r1037 | r1038 | |
| 2779 | 2501 | INPUT_PORTS_END |
| 2780 | 2502 | |
| 2781 | 2503 | INPUT_PORTS_START( aquajckj ) |
| 2782 | PORT_START /* DSW A */ | |
| 2783 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) | |
| 2784 | PORT_DIPSETTING( 0x80, "Cockpit" ) | |
| 2785 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) | |
| 2786 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 2787 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 2788 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2789 | PORT_SERVICE( 0x20, IP_ACTIVE_LOW ) | |
| 2790 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Demo_Sounds ) ) | |
| 2791 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 2792 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) | |
| 2504 | PORT_INCLUDE(aquajack) | |
| 2505 | ||
| 2506 | PORT_MODIFY("DSW1") | |
| 2793 | 2507 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_A ) ) |
| 2794 | 2508 | PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) |
| 2795 | 2509 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) ) |
| r1037 | r1038 | |
| 2800 | 2514 | PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) |
| 2801 | 2515 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) |
| 2802 | 2516 | PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) ) |
| 2803 | ||
| 2804 | PORT_START /* DSW B */ | |
| 2805 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) ) | |
| 2806 | PORT_DIPSETTING( 0x40, DEF_STR( Easy ) ) | |
| 2807 | PORT_DIPSETTING( 0xc0, DEF_STR( Normal ) ) | |
| 2808 | PORT_DIPSETTING( 0x80, DEF_STR( Hard ) ) | |
| 2809 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) | |
| 2810 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) | |
| 2811 | PORT_DIPSETTING( 0x00, "30k" ) | |
| 2812 | PORT_DIPSETTING( 0x30, "50k" ) | |
| 2813 | PORT_DIPSETTING( 0x10, "80k" ) | |
| 2814 | PORT_DIPSETTING( 0x20, "100k" ) | |
| 2815 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) | |
| 2816 | PORT_DIPSETTING( 0x08, "1" ) | |
| 2817 | PORT_DIPSETTING( 0x04, "2" ) | |
| 2818 | PORT_DIPSETTING( 0x0c, "3" ) | |
| 2819 | PORT_DIPSETTING( 0x00, "5" ) | |
| 2820 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unused ) ) /* Dips 7 & 8 shown as "Do Not Touch" in manual */ | |
| 2821 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 2822 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2823 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) | |
| 2824 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 2825 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2826 | ||
| 2827 | PORT_START /* IN0 */ | |
| 2828 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2829 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) | |
| 2830 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 2831 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 2832 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 2833 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_TILT ) | |
| 2834 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2835 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2836 | ||
| 2837 | PORT_START /* IN1 */ | |
| 2838 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) | |
| 2839 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) | |
| 2840 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) | |
| 2841 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) | |
| 2842 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) | |
| 2843 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) | |
| 2844 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) | |
| 2845 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 2846 | ||
| 2847 | PORT_START /* IN2, what is it ??? */ | |
| 2848 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_PLAYER(1) | |
| 2849 | 2517 | INPUT_PORTS_END |
| 2850 | 2518 | |
| 2851 | 2519 | INPUT_PORTS_START( spacegun ) |
| r1037 | r1038 | |
| 2919 | 2587 | INPUT_PORTS_END |
| 2920 | 2588 | |
| 2921 | 2589 | INPUT_PORTS_START( dblaxle ) |
| 2922 | PORT_START /* DSW A */ | |
| 2590 | PORT_START_TAG("DSW1") /* DSW A */ | |
| 2923 | 2591 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) |
| 2924 | 2592 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 2925 | 2593 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r1037 | r1038 | |
| 2932 | 2600 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 2933 | 2601 | TAITO_Z_COINAGE_US_8 |
| 2934 | 2602 | |
| 2935 | PORT_START /* DSW B */ | |
| 2603 | PORT_START_TAG("DSW2") /* DSW B */ | |
| 2936 | 2604 | TAITO_Z_DIFFICULTY_8 |
| 2937 | 2605 | PORT_DIPNAME( 0x04, 0x00, "Multi-machine hookup ?" ) // doesn't boot if on |
| 2938 | 2606 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| r1037 | r1038 | |
| 2987 | 2655 | INPUT_PORTS_END |
| 2988 | 2656 | |
| 2989 | 2657 | INPUT_PORTS_START( pwheelsj ) |
| 2990 | PORT_START /* DSW A */ | |
| 2991 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) | |
| 2992 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 2993 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2994 | PORT_DIPNAME( 0x02, 0x02, "Gear shift" ) | |
| 2995 | PORT_DIPSETTING( 0x02, DEF_STR( Normal ) ) | |
| 2996 | PORT_DIPSETTING( 0x00, "Inverted" ) | |
| 2997 | PORT_SERVICE( 0x04, IP_ACTIVE_LOW ) | |
| 2998 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) | |
| 2999 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 3000 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 3001 | TAITO_Z_COINAGE_JAPAN_8 | |
| 2658 | PORT_INCLUDE(dblaxle) | |
| 3002 | 2659 | |
| 3003 | PORT_START /* DSW B */ | |
| 3004 | TAITO_Z_DIFFICULTY_8 | |
| 3005 | PORT_DIPNAME( 0x04, 0x00, "Multi-machine hookup ?" ) // doesn't boot if on | |
| 3006 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 3007 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) | |
| 3008 | PORT_DIPNAME( 0x08, 0x08, "Player Truck" ) | |
| 3009 | PORT_DIPSETTING( 0x08, "Red" ) | |
| 3010 | PORT_DIPSETTING( 0x00, "Blue" ) | |
| 3011 | PORT_DIPNAME( 0x10, 0x10, "Back button" ) | |
| 3012 | PORT_DIPSETTING( 0x10, DEF_STR( Normal ) ) | |
| 3013 | PORT_DIPSETTING( 0x00, "Inverted" ) | |
| 3014 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) // causes "Root CPU Error" on "Icy Road" (Tourniquet) | |
| 3015 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 3016 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 3017 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 3018 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 3019 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 3020 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) | |
| 3021 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 3022 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 3023 | ||
| 3024 | PORT_START /* IN0 */ | |
| 3025 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 3026 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) /* shift */ | |
| 3027 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 3028 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 3029 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 3030 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) /* brake */ | |
| 3031 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 3032 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) /* "back" */ | |
| 3033 | ||
| 3034 | PORT_START /* IN1 */ | |
| 3035 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) /* nitro */ | |
| 3036 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_TILT ) | |
| 3037 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) /* "center" */ | |
| 3038 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) | |
| 3039 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 3040 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) /* accel */ | |
| 3041 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 3042 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 3043 | ||
| 3044 | PORT_START /* IN2, unused */ | |
| 3045 | ||
| 3046 | PORT_START /* IN3, steering */ | |
| 3047 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(40) PORT_KEYDELTA(10) PORT_PLAYER(1) | |
| 3048 | ||
| 3049 | PORT_START /* IN4, fake allowing digital steer */ | |
| 3050 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1) | |
| 3051 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1) | |
| 3052 | PORT_DIPNAME( 0x10, 0x00, "Steering type" ) | |
| 3053 | PORT_DIPSETTING( 0x10, "Digital" ) | |
| 3054 | PORT_DIPSETTING( 0x00, "Analogue" ) | |
| 2660 | PORT_MODIFY("DSW1") | |
| 2661 | TAITO_Z_COINAGE_JAPAN_8 | |
| 3055 | 2662 | INPUT_PORTS_END |
| 3056 | 2663 | |
| 3057 | 2664 | |
| r1037 | r1038 | |
| 4091 | 3698 | |
| 4092 | 3699 | ROM_START( sci ) |
| 4093 | 3700 | ROM_REGION( 0x80000, REGION_CPU1, 0 ) /* 512K for 68000 code (CPU A) */ |
| 4094 | ROM_LOAD16_BYTE( "c09-37.rom", 0x00000, 0x20000, CRC(0fecea17) SHA1(0ad4454eee6646b0f978b1ba83206d64c1f6d081) ) | |
| 4095 | ROM_LOAD16_BYTE( "c09-40.rom", 0x00001, 0x20000, CRC(e46ebd9b) SHA1(52b0c1f95e8a664076d8fbc0f6204ca55893e281) ) | |
| 4096 | ROM_LOAD16_BYTE( "c09-38.rom", 0x40000, 0x20000, CRC(f4404f87) SHA1(8f051f1ffbf323cb3d613bc22afa53676590f29c) ) | |
| 4097 | ROM_LOAD16_BYTE( "c09-41.rom", 0x40001, 0x20000, CRC(de87bcb9) SHA1(b5537a25871ea90294f3b6f0b6386a883cfdf991) ) | |
| 3701 | ROM_LOAD16_BYTE( "c09-37.37", 0x00000, 0x20000, CRC(0fecea17) SHA1(0ad4454eee6646b0f978b1ba83206d64c1f6d081) ) | |
| 3702 | ROM_LOAD16_BYTE( "c09-38.40", 0x00001, 0x20000, CRC(e46ebd9b) SHA1(52b0c1f95e8a664076d8fbc0f6204ca55893e281) ) | |
| 3703 | ROM_LOAD16_BYTE( "c09-42.38", 0x40000, 0x20000, CRC(f4404f87) SHA1(8f051f1ffbf323cb3d613bc22afa53676590f29c) ) | |
| 3704 | ROM_LOAD16_BYTE( "c09-39.41", 0x40001, 0x20000, CRC(de87bcb9) SHA1(b5537a25871ea90294f3b6f0b6386a883cfdf991) ) | |
| 4098 | 3705 | |
| 4099 | 3706 | ROM_REGION( 0x20000, REGION_CPU3, 0 ) /* 128K for 68000 code (CPU B) */ |
| 4100 | ROM_LOAD16_BYTE( "c09-33.rom", 0x00000, 0x10000, CRC(cf4e6c5b) SHA1(8d6720b605b8e0c7f0473ba452c79bf5efc2615d) ) | |
| 4101 | ROM_LOAD16_BYTE( "c09-32.rom", 0x00001, 0x10000, CRC(a4713719) SHA1(b1110e397d3407ec63975cdd92a23cbb16348200) ) | |
| 3707 | ROM_LOAD16_BYTE( "c09-33.6", 0x00000, 0x10000, CRC(cf4e6c5b) SHA1(8d6720b605b8e0c7f0473ba452c79bf5efc2615d) ) /* Actual label is "C09 33*" */ | |
| 3708 | ROM_LOAD16_BYTE( "c09-32.5", 0x00001, 0x10000, CRC(a4713719) SHA1(b1110e397d3407ec63975cdd92a23cbb16348200) ) /* Actual label is "C09 32*" */ | |
| 4102 | 3709 | |
| 4103 | 3710 | ROM_REGION( 0x2c000, REGION_CPU2, 0 ) /* Z80 sound cpu */ |
| 4104 | ROM_LOAD( "c09-34.rom", 0x00000, 0x04000, CRC(a21b3151) SHA1(f59c7b1ba5edf97d72670ee194ce9fdc5c5b9a58) ) | |
| 4105 | ROM_CONTINUE( 0x10000, 0x1c000 ) /* banked stuff */ | |
| 3711 | ROM_LOAD( "c09-34.31", 0x00000, 0x04000, CRC(a21b3151) SHA1(f59c7b1ba5edf97d72670ee194ce9fdc5c5b9a58) ) | |
| 3712 | ROM_CONTINUE( 0x10000, 0x1c000 ) /* banked stuff */ | |
| 4106 | 3713 | |
| 4107 | 3714 | ROM_REGION( 0x80000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 4108 | ROM_LOAD( "c09-05. | |
| 3715 | ROM_LOAD( "c09-05.16 | |
| 4109 | 3716 | |
| 4110 | 3717 | ROM_REGION( 0x200000, REGION_GFX2, ROMREGION_DISPOSE ) |
| 4111 | ROM_LOAD32_BYTE( "c09-04.rom", 0x000000, 0x080000, CRC(2cbb3c9b) SHA1(9e3d95f76f5f5d385b6a9516af781aefef1eb0ca) ) /* OBJ 16x8 */ | |
| 4112 | ROM_LOAD32_BYTE( "c09-02.rom", 0x000001, 0x080000, CRC(a83a0389) SHA1(932788b5b5f01326d0fbb2b9fdb94a8c7c004db3) ) | |
| 4113 | ROM_LOAD32_BYTE( "c09-03.rom", 0x000002, 0x080000, CRC(a31d0e80) SHA1(dfeff1b89dd7b3f19b26e77f2d66f6448cb00553) ) | |
| 4114 | ROM_LOAD32_BYTE( "c09-01.rom", 0x000003, 0x080000, CRC(64bfea10) SHA1(15ea43092027b1717d0f24fbe6ac2cdf11a7ddc6) ) | |
| 3718 | ROM_LOAD32_BYTE( "c09-04.52", 0x000000, 0x080000, CRC(2cbb3c9b) SHA1(9e3d95f76f5f5d385b6a9516af781aefef1eb0ca) ) /* OBJ 16x8 */ | |
| 3719 | ROM_LOAD32_BYTE( "c09-02.53", 0x000001, 0x080000, CRC(a83a0389) SHA1(932788b5b5f01326d0fbb2b9fdb94a8c7c004db3) ) | |
| 3720 | ROM_LOAD32_BYTE( "c09-03.54", 0x000002, 0x080000, CRC(a31d0e80) SHA1(dfeff1b89dd7b3f19b26e77f2d66f6448cb00553) ) | |
| 3721 | ROM_LOAD32_BYTE( "c09-01.55", 0x000003, 0x080000, CRC(64bfea10) SHA1(15ea43092027b1717d0f24fbe6ac2cdf11a7ddc6) ) | |
| 4115 | 3722 | |
| 4116 | 3723 | ROM_REGION( 0x80000, REGION_GFX3, 0 ) /* don't dispose */ |
| 4117 | ROM_LOAD( "c09-07. | |
| 3724 | ROM_LOAD( "c09-07.15 | |
| 4118 | 3725 | |
| 4119 | 3726 | ROM_REGION16_LE( 0x80000, REGION_USER1, 0 ) |
| 4120 | ROM_LOAD16_WORD( "c09-06. | |
| 3727 | ROM_LOAD16_WORD( "c09-06.37 | |
| 4121 | 3728 | |
| 4122 | 3729 | ROM_REGION( 0x180000, REGION_SOUND1, 0 ) /* ADPCM samples */ |
| 4123 | ROM_LOAD( "c09-14.rom", 0x000000, 0x080000, CRC(ad78bf46) SHA1(4020744bbdc4b9ec3dee1a9d7b5ffa8def43d7b2) ) | |
| 4124 | ROM_LOAD( "c09-13.rom", 0x080000, 0x080000, CRC(d57c41d3) SHA1(3375a1fc6389840544b9fdb96b2fafbc8e3276e2) ) | |
| 4125 | ROM_LOAD( "c09-12.rom", 0x100000, 0x080000, CRC(56c99fa5) SHA1(3f9a6bc89d847cc4c99d35f98157ea3f187c0f98) ) | |
| 3730 | ROM_LOAD( "c09-14.42", 0x000000, 0x080000, CRC(ad78bf46) SHA1(4020744bbdc4b9ec3dee1a9d7b5ffa8def43d7b2) ) | |
| 3731 | ROM_LOAD( "c09-13.43", 0x080000, 0x080000, CRC(d57c41d3) SHA1(3375a1fc6389840544b9fdb96b2fafbc8e3276e2) ) | |
| 3732 | ROM_LOAD( "c09-12.44", 0x100000, 0x080000, CRC(56c99fa5) SHA1(3f9a6bc89d847cc4c99d35f98157ea3f187c0f98) ) | |
| 4126 | 3733 | |
| 4127 | 3734 | ROM_REGION( 0x80000, REGION_SOUND2, 0 ) /* Delta-T samples */ |
| 4128 | ROM_LOAD( "c09-15. | |
| 3735 | ROM_LOAD( "c09-15.29 | |
| 4129 | 3736 | |
| 4130 | 3737 | ROM_REGION( 0x10000, REGION_USER2, 0 ) /* unused ROMs */ |
| 4131 | ROM_LOAD( "c09-16.rom", 0x00000, 0x10000, CRC(7245a6f6) SHA1(5bdde4e3bcde8c59dc84478c3cc079d7ef8ee9c5) ) | |
| 4132 | ROM_LOAD( "c09-20.rom", 0x00000, 0x00100, CRC(cd8ffd80) SHA1(133bcd291a3751bce5293cb6b685f87258e8db19) ) // road/sprite priority and palette select | |
| 4133 | ROM_LOAD( "c09-23.rom", 0x00000, 0x00100, CRC(fbf81f30) SHA1(c868452c334792345dcced075f6df69cff9e31ca) ) // road A/B internal priority | |
| 4134 | // ROM_LOAD( "c09-21.rom", 0x00000, 0x00???, NO_DUMP ) /* pals (Guru dump) */ | |
| 4135 | // ROM_LOAD( "c09-22.rom", 0x00000, 0x00???, NO_DUMP ) | |
| 4136 | // ROM_LOAD( "c09-24.rom", 0x00000, 0x00???, NO_DUMP ) | |
| 4137 | // ROM_LOAD( "c09-25.rom", 0x00000, 0x00???, NO_DUMP ) | |
| 4138 | // ROM_LOAD( "c09-26.rom", 0x00000, 0x00???, NO_DUMP ) | |
| 3738 | ROM_LOAD( "c09-16.17", 0x00000, 0x10000, CRC(7245a6f6) SHA1(5bdde4e3bcde8c59dc84478c3cc079d7ef8ee9c5) ) | |
| 3739 | ROM_LOAD( "c09-20.71", 0x00000, 0x00100, CRC(cd8ffd80) SHA1(133bcd291a3751bce5293cb6b685f87258e8db19) ) // road/sprite priority and palette select | |
| 3740 | ROM_LOAD( "c09-23.14", 0x00000, 0x00100, CRC(fbf81f30) SHA1(c868452c334792345dcced075f6df69cff9e31ca) ) // road A/B internal priority | |
| 3741 | // ROM_LOAD( "c09-21.2", 0x00000, 0x00???, NO_DUMP ) /* pals (Guru dump) */ | |
| 3742 | // ROM_LOAD( "c09-22.3", 0x00000, 0x00???, NO_DUMP ) | |
| 3743 | // ROM_LOAD( "c09-24.22", 0x00000, 0x00???, NO_DUMP ) | |
| 3744 | // ROM_LOAD( "c09-25.25", 0x00000, 0x00???, NO_DUMP ) | |
| 3745 | // ROM_LOAD( "c09-26.26", 0x00000, 0x00???, NO_DUMP ) | |
| 4139 | 3746 | ROM_END |
| 4140 | 3747 | |
| 4141 | 3748 | ROM_START( scia ) |
| 4142 | 3749 | ROM_REGION( 0x80000, REGION_CPU1, 0 ) /* 512K for 68000 code (CPU A) */ |
| 4143 | ROM_LOAD16_BYTE( "c09-28.bin", 0x00000, 0x20000, CRC(630dbaad) SHA1(090f6a97007ac04f64d92ae5823b7254152144af) ) | |
| 4144 | ROM_LOAD16_BYTE( "c09-30.bin", 0x00001, 0x20000, CRC(68b1a97d) SHA1(c377f7880154b38fe25dc0ec420ca0cd7228fbad) ) | |
| 4145 | ROM_LOAD16_BYTE( "c09-36.bin", 0x40000, 0x20000, CRC(59e47cba) SHA1(313302bc62ff02b437b1091d394d2010ce66c7e7) ) | |
| 4146 | ROM_LOAD16_BYTE( "c09-31.bin", 0x40001, 0x20000, CRC(962b1fbf) SHA1(62181a289dfc6d1da674ba4bcbefeb16a67a55e3) ) | |
| 3750 | ROM_LOAD16_BYTE( "c09-28.43", 0x00000, 0x20000, CRC(630dbaad) SHA1(090f6a97007ac04f64d92ae5823b7254152144af) ) | |
| 3751 | ROM_LOAD16_BYTE( "c09-30.40", 0x00001, 0x20000, CRC(68b1a97d) SHA1(c377f7880154b38fe25dc0ec420ca0cd7228fbad) ) | |
| 3752 | ROM_LOAD16_BYTE( "c09-36.38", 0x40000, 0x20000, CRC(59e47cba) SHA1(313302bc62ff02b437b1091d394d2010ce66c7e7) ) | |
| 3753 | ROM_LOAD16_BYTE( "c09-31.41", 0x40001, 0x20000, CRC(962b1fbf) SHA1(62181a289dfc6d1da674ba4bcbefeb16a67a55e3) ) | |
| 4147 | 3754 | |
| 4148 | 3755 | ROM_REGION( 0x20000, REGION_CPU3, 0 ) /* 128K for 68000 code (CPU B) */ |
| 4149 | ROM_LOAD16_BYTE( "c09-33.rom", 0x00000, 0x10000, CRC(cf4e6c5b) SHA1(8d6720b605b8e0c7f0473ba452c79bf5efc2615d) ) | |
| 4150 | ROM_LOAD16_BYTE( "c09-32.rom", 0x00001, 0x10000, CRC(a4713719) SHA1(b1110e397d3407ec63975cdd92a23cbb16348200) ) | |
| 3756 | ROM_LOAD16_BYTE( "c09-33.6", 0x00000, 0x10000, CRC(cf4e6c5b) SHA1(8d6720b605b8e0c7f0473ba452c79bf5efc2615d) ) /* Actual label is "C09 33*" */ | |
| 3757 | ROM_LOAD16_BYTE( "c09-32.5", 0x00001, 0x10000, CRC(a4713719) SHA1(b1110e397d3407ec63975cdd92a23cbb16348200) ) /* Actual label is "C09 32*" */ | |
| 4151 | 3758 | |
| 4152 | 3759 | ROM_REGION( 0x2c000, REGION_CPU2, 0 ) /* Z80 sound cpu */ |
| 4153 | ROM_LOAD( "c09-34.rom", 0x00000, 0x04000, CRC(a21b3151) SHA1(f59c7b1ba5edf97d72670ee194ce9fdc5c5b9a58) ) | |
| 4154 | ROM_CONTINUE( 0x10000, 0x1c000 ) /* banked stuff */ | |
| 3760 | ROM_LOAD( "c09-34.31", 0x00000, 0x04000, CRC(a21b3151) SHA1(f59c7b1ba5edf97d72670ee194ce9fdc5c5b9a58) ) | |
| 3761 | ROM_CONTINUE( 0x10000, 0x1c000 ) /* banked stuff */ | |
| 4155 | 3762 | |
| 4156 | 3763 | ROM_REGION( 0x80000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 4157 | ROM_LOAD( "c09-05. | |
| 3764 | ROM_LOAD( "c09-05.16 | |
| 4158 | 3765 | |
| 4159 | 3766 | ROM_REGION( 0x200000, REGION_GFX2, ROMREGION_DISPOSE ) |
| 4160 | ROM_LOAD32_BYTE( "c09-04.rom", 0x000000, 0x080000, CRC(2cbb3c9b) SHA1(9e3d95f76f5f5d385b6a9516af781aefef1eb0ca) ) /* OBJ 16x8 */ | |
| 4161 | ROM_LOAD32_BYTE( "c09-02.rom", 0x000001, 0x080000, CRC(a83a0389) SHA1(932788b5b5f01326d0fbb2b9fdb94a8c7c004db3) ) | |
| 4162 | ROM_LOAD32_BYTE( "c09-03.rom", 0x000002, 0x080000, CRC(a31d0e80) SHA1(dfeff1b89dd7b3f19b26e77f2d66f6448cb00553) ) | |
| 4163 | ROM_LOAD32_BYTE( "c09-01.rom", 0x000003, 0x080000, CRC(64bfea10) SHA1(15ea43092027b1717d0f24fbe6ac2cdf11a7ddc6) ) | |
| 3767 | ROM_LOAD32_BYTE( "c09-04.52", 0x000000, 0x080000, CRC(2cbb3c9b) SHA1(9e3d95f76f5f5d385b6a9516af781aefef1eb0ca) ) /* OBJ 16x8 */ | |
| 3768 | ROM_LOAD32_BYTE( "c09-02.53", 0x000001, 0x080000, CRC(a83a0389) SHA1(932788b5b5f01326d0fbb2b9fdb94a8c7c004db3) ) | |
| 3769 | ROM_LOAD32_BYTE( "c09-03.54", 0x000002, 0x080000, CRC(a31d0e80) SHA1(dfeff1b89dd7b3f19b26e77f2d66f6448cb00553) ) | |
| 3770 | ROM_LOAD32_BYTE( "c09-01.55", 0x000003, 0x080000, CRC(64bfea10) SHA1(15ea43092027b1717d0f24fbe6ac2cdf11a7ddc6) ) | |
| 4164 | 3771 | |
| 4165 | 3772 | ROM_REGION( 0x80000, REGION_GFX3, 0 ) /* don't dispose */ |
| 4166 | ROM_LOAD( "c09-07. | |
| 3773 | ROM_LOAD( "c09-07.15 | |
| 4167 | 3774 | |
| 4168 | 3775 | ROM_REGION16_LE( 0x80000, REGION_USER1, 0 ) |
| 4169 | ROM_LOAD16_WORD( "c09-06. | |
| 3776 | ROM_LOAD16_WORD( "c09-06.37 | |
| 4170 | 3777 | |
| 4171 | 3778 | ROM_REGION( 0x180000, REGION_SOUND1, 0 ) /* ADPCM samples */ |
| 4172 | ROM_LOAD( "c09-14.rom", 0x000000, 0x080000, CRC(ad78bf46) SHA1(4020744bbdc4b9ec3dee1a9d7b5ffa8def43d7b2) ) | |
| 4173 | ROM_LOAD( "c09-13.rom", 0x080000, 0x080000, CRC(d57c41d3) SHA1(3375a1fc6389840544b9fdb96b2fafbc8e3276e2) ) | |
| 4174 | ROM_LOAD( "c09-12.rom", 0x100000, 0x080000, CRC(56c99fa5) SHA1(3f9a6bc89d847cc4c99d35f98157ea3f187c0f98) ) | |
| 3779 | ROM_LOAD( "c09-14.42", 0x000000, 0x080000, CRC(ad78bf46) SHA1(4020744bbdc4b9ec3dee1a9d7b5ffa8def43d7b2) ) | |
| 3780 | ROM_LOAD( "c09-13.43", 0x080000, 0x080000, CRC(d57c41d3) SHA1(3375a1fc6389840544b9fdb96b2fafbc8e3276e2) ) | |
| 3781 | ROM_LOAD( "c09-12.44", 0x100000, 0x080000, CRC(56c99fa5) SHA1(3f9a6bc89d847cc4c99d35f98157ea3f187c0f98) ) | |
| 4175 | 3782 | |
| 4176 | 3783 | ROM_REGION( 0x80000, REGION_SOUND2, 0 ) /* Delta-T samples */ |
| 4177 | ROM_LOAD( "c09-15. | |
| 3784 | ROM_LOAD( "c09-15.29 | |
| 4178 | 3785 | |
| 4179 | 3786 | ROM_REGION( 0x10000, REGION_USER2, 0 ) /* unused ROMs */ |
| 4180 | ROM_LOAD( "c09-16.rom", 0x00000, 0x10000, CRC(7245a6f6) SHA1(5bdde4e3bcde8c59dc84478c3cc079d7ef8ee9c5) ) | |
| 4181 | ROM_LOAD( "c09-20.rom", 0x00000, 0x00100, CRC(cd8ffd80) SHA1(133bcd291a3751bce5293cb6b685f87258e8db19) ) // road/sprite priority and palette select | |
| 4182 | ROM_LOAD( "c09-23.rom", 0x00000, 0x00100, CRC(fbf81f30) SHA1(c868452c334792345dcced075f6df69cff9e31ca) ) // road A/B internal priority | |
| 3787 | ROM_LOAD( "c09-16.17", 0x00000, 0x10000, CRC(7245a6f6) SHA1(5bdde4e3bcde8c59dc84478c3cc079d7ef8ee9c5) ) | |
| 3788 | ROM_LOAD( "c09-20.71", 0x00000, 0x00100, CRC(cd8ffd80) SHA1(133bcd291a3751bce5293cb6b685f87258e8db19) ) // road/sprite priority and palette select | |
| 3789 | ROM_LOAD( "c09-23.14", 0x00000, 0x00100, CRC(fbf81f30) SHA1(c868452c334792345dcced075f6df69cff9e31ca) ) // road A/B internal priority | |
| 4183 | 3790 | ROM_END |
| 4184 | 3791 | |
| 3792 | ROM_START( scij ) | |
| 3793 | ROM_REGION( 0x80000, REGION_CPU1, 0 ) /* 512K for 68000 code (CPU A) */ | |
| 3794 | ROM_LOAD16_BYTE( "c09-37.43", 0x00000, 0x20000, CRC(0fecea17) SHA1(0ad4454eee6646b0f978b1ba83206d64c1f6d081) ) | |
| 3795 | ROM_LOAD16_BYTE( "c09-38.40", 0x00001, 0x20000, CRC(e46ebd9b) SHA1(52b0c1f95e8a664076d8fbc0f6204ca55893e281) ) | |
| 3796 | ROM_LOAD16_BYTE( "c09-40.38", 0x40000, 0x20000, CRC(1a4e2eab) SHA1(7c95ba516d164b7b4e6eaf80e3dacf7c35d8123d) ) | |
| 3797 | ROM_LOAD16_BYTE( "c09-39.41", 0x40001, 0x20000, CRC(de87bcb9) SHA1(b5537a25871ea90294f3b6f0b6386a883cfdf991) ) | |
| 3798 | ||
| 3799 | ROM_REGION( 0x20000, REGION_CPU3, 0 ) /* 128K for 68000 code (CPU B) */ | |
| 3800 | ROM_LOAD16_BYTE( "c09-33.6", 0x00000, 0x10000, CRC(cf4e6c5b) SHA1(8d6720b605b8e0c7f0473ba452c79bf5efc2615d) ) /* Actual label is "C09 33*" */ | |
| 3801 | ROM_LOAD16_BYTE( "c09-32.5", 0x00001, 0x10000, CRC(a4713719) SHA1(b1110e397d3407ec63975cdd92a23cbb16348200) ) /* Actual label is "C09 32*" */ | |
| 3802 | ||
| 3803 | ROM_REGION( 0x2c000, REGION_CPU2, 0 ) /* Z80 sound cpu */ | |
| 3804 | ROM_LOAD( "c09-27.31", 0x00000, 0x04000, CRC(cd161dca) SHA1(2e0632f290f8efae5e479c67ca8808a90e0f4afd) ) | |
| 3805 | ROM_CONTINUE( 0x10000, 0x1c000 ) /* banked stuff */ | |
| 3806 | ||
| 3807 | ROM_REGION( 0x80000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 3808 | ROM_LOAD( "c09-05.16", 0x00000, 0x80000, CRC(890b38f0) SHA1(b478c96214ce027926346a4653250c8ee8a98bdc) ) /* SCR 8x8 */ | |
| 3809 | ||
| 3810 | ROM_REGION( 0x200000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 3811 | ROM_LOAD32_BYTE( "c09-04.52", 0x000000, 0x080000, CRC(2cbb3c9b) SHA1(9e3d95f76f5f5d385b6a9516af781aefef1eb0ca) ) /* OBJ 16x8 */ | |
| 3812 | ROM_LOAD32_BYTE( "c09-02.53", 0x000001, 0x080000, CRC(a83a0389) SHA1(932788b5b5f01326d0fbb2b9fdb94a8c7c004db3) ) | |
| 3813 | ROM_LOAD32_BYTE( "c09-03.54", 0x000002, 0x080000, CRC(a31d0e80) SHA1(dfeff1b89dd7b3f19b26e77f2d66f6448cb00553) ) | |
| 3814 | ROM_LOAD32_BYTE( "c09-01.55", 0x000003, 0x080000, CRC(64bfea10) SHA1(15ea43092027b1717d0f24fbe6ac2cdf11a7ddc6) ) | |
| 3815 | ||
| 3816 | ROM_REGION( 0x80000, REGION_GFX3, 0 ) /* don't dispose */ | |
| 3817 | ROM_LOAD( "c09-07.15", 0x00000, 0x80000, CRC(963bc82b) SHA1(e3558aecd1b82ddbf10ab2b71843a3664705f1f1) ) /* ROD, road lines */ | |
| 3818 | ||
| 3819 | ROM_REGION16_LE( 0x80000, REGION_USER1, 0 ) | |
| 3820 | ROM_LOAD16_WORD( "c09-06.37", 0x00000, 0x80000, CRC(12df6d7b) SHA1(8ce742eb3f7eb6283b5ca32bb520d1cc7684d515) ) /* STY spritemap */ | |
| 3821 | ||
| 3822 | ROM_REGION( 0x180000, REGION_SOUND1, 0 ) /* ADPCM samples */ | |
| 3823 | ROM_LOAD( "c09-10.42", 0x000000, 0x080000, CRC(ad78bf46) SHA1(4020744bbdc4b9ec3dee1a9d7b5ffa8def43d7b2) ) | |
| 3824 | ROM_LOAD( "c09-09.43", 0x080000, 0x080000, CRC(6a655c00) SHA1(5ae1ee422226e386550b69a1f35668c10d3bdcc2) ) | |
| 3825 | ROM_LOAD( "c09-08.44", 0x100000, 0x080000, CRC(7ddfc316) SHA1(47f0ed8eecd4719b4c5cb8762ee6b8bb01686812) ) | |
| 3826 | ||
| 3827 | ROM_REGION( 0x80000, REGION_SOUND2, 0 ) /* Delta-T samples */ | |
| 3828 | ROM_LOAD( "c09-11.29", 0x00000, 0x80000, CRC(6b1a11e1) SHA1(4304d029ecf91fa5b779057f195f75ebdd0a7c1c) ) | |
| 3829 | ||
| 3830 | ROM_REGION( 0x10000, REGION_USER2, 0 ) /* unused ROMs */ | |
| 3831 | ROM_LOAD( "c09-16.17", 0x00000, 0x10000, CRC(7245a6f6) SHA1(5bdde4e3bcde8c59dc84478c3cc079d7ef8ee9c5) ) | |
| 3832 | ROM_LOAD( "c09-20.71", 0x00000, 0x00100, CRC(cd8ffd80) SHA1(133bcd291a3751bce5293cb6b685f87258e8db19) ) // road/sprite priority and palette select | |
| 3833 | ROM_LOAD( "c09-23.14", 0x00000, 0x00100, CRC(fbf81f30) SHA1(c868452c334792345dcced075f6df69cff9e31ca) ) // road A/B internal priority | |
| 3834 | ROM_END | |
| 3835 | ||
| 4185 | 3836 | ROM_START( sciu ) |
| 4186 | 3837 | ROM_REGION( 0x80000, REGION_CPU1, 0 ) /* 512K for 68000 code (CPU A) */ |
| 4187 | ROM_LOAD16_BYTE( "c09-43.3 | |
| 3838 | ROM_LOAD16_BYTE( "c09-43.43 | |
| 4188 | 3839 | ROM_LOAD16_BYTE( "c09-44.40", 0x00001, 0x20000, CRC(7524338a) SHA1(f4e68a4d09f843f4697b4b4a4e94b5759a14fd01) ) |
| 4189 | 3840 | ROM_LOAD16_BYTE( "c09-41.38", 0x40000, 0x20000, CRC(83477f11) SHA1(f6dba2137a182dae215cf212bf85f4528e3d006d) ) |
| 4190 | ROM_LOAD16_BYTE( "c09-41 | |
| 3841 | ROM_LOAD16_BYTE( "c09-39.41 | |
| 4191 | 3842 | |
| 4192 | 3843 | ROM_REGION( 0x20000, REGION_CPU3, 0 ) /* 128K for 68000 code (CPU B) */ |
| 4193 | ROM_LOAD16_BYTE( "c09-33.rom", 0x00000, 0x10000, CRC(cf4e6c5b) SHA1(8d6720b605b8e0c7f0473ba452c79bf5efc2615d) ) | |
| 4194 | ROM_LOAD16_BYTE( "c09-32.rom", 0x00001, 0x10000, CRC(a4713719) SHA1(b1110e397d3407ec63975cdd92a23cbb16348200) ) | |
| 3844 | ROM_LOAD16_BYTE( "c09-33.6", 0x00000, 0x10000, CRC(cf4e6c5b) SHA1(8d6720b605b8e0c7f0473ba452c79bf5efc2615d) ) /* Actual label is "C09 33*" */ | |
| 3845 | ROM_LOAD16_BYTE( "c09-32.5", 0x00001, 0x10000, CRC(a4713719) SHA1(b1110e397d3407ec63975cdd92a23cbb16348200) ) /* Actual label is "C09 32*" */ | |
| 4195 | 3846 | |
| 4196 | 3847 | ROM_REGION( 0x2c000, REGION_CPU2, 0 ) /* Z80 sound cpu */ |
| 4197 | ROM_LOAD( "c09-34.rom", 0x00000, 0x04000, CRC(a21b3151) SHA1(f59c7b1ba5edf97d72670ee194ce9fdc5c5b9a58) ) | |
| 4198 | ROM_CONTINUE( 0x10000, 0x1c000 ) /* banked stuff */ | |
| 3848 | ROM_LOAD( "c09-34.31", 0x00000, 0x04000, CRC(a21b3151) SHA1(f59c7b1ba5edf97d72670ee194ce9fdc5c5b9a58) ) | |
| 3849 | ROM_CONTINUE( 0x10000, 0x1c000 ) /* banked stuff */ | |
| 4199 | 3850 | |
| 4200 | 3851 | ROM_REGION( 0x80000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 4201 | ROM_LOAD( "c09-05. | |
| 3852 | ROM_LOAD( "c09-05.16 | |
| 4202 | 3853 | |
| 4203 | 3854 | ROM_REGION( 0x200000, REGION_GFX2, ROMREGION_DISPOSE ) |
| 4204 | ROM_LOAD32_BYTE( "c09-04.rom", 0x000000, 0x080000, CRC(2cbb3c9b) SHA1(9e3d95f76f5f5d385b6a9516af781aefef1eb0ca) ) /* OBJ 16x8 */ | |
| 4205 | ROM_LOAD32_BYTE( "c09-02.rom", 0x000001, 0x080000, CRC(a83a0389) SHA1(932788b5b5f01326d0fbb2b9fdb94a8c7c004db3) ) | |
| 4206 | ROM_LOAD32_BYTE( "c09-03.rom", 0x000002, 0x080000, CRC(a31d0e80) SHA1(dfeff1b89dd7b3f19b26e77f2d66f6448cb00553) ) | |
| 4207 | ROM_LOAD32_BYTE( "c09-01.rom", 0x000003, 0x080000, CRC(64bfea10) SHA1(15ea43092027b1717d0f24fbe6ac2cdf11a7ddc6) ) | |
| 3855 | ROM_LOAD32_BYTE( "c09-04.52", 0x000000, 0x080000, CRC(2cbb3c9b) SHA1(9e3d95f76f5f5d385b6a9516af781aefef1eb0ca) ) /* OBJ 16x8 */ | |
| 3856 | ROM_LOAD32_BYTE( "c09-02.53", 0x000001, 0x080000, CRC(a83a0389) SHA1(932788b5b5f01326d0fbb2b9fdb94a8c7c004db3) ) | |
| 3857 | ROM_LOAD32_BYTE( "c09-03.54", 0x000002, 0x080000, CRC(a31d0e80) SHA1(dfeff1b89dd7b3f19b26e77f2d66f6448cb00553) ) | |
| 3858 | ROM_LOAD32_BYTE( "c09-01.55", 0x000003, 0x080000, CRC(64bfea10) SHA1(15ea43092027b1717d0f24fbe6ac2cdf11a7ddc6) ) | |
| 4208 | 3859 | |
| 4209 | 3860 | ROM_REGION( 0x80000, REGION_GFX3, 0 ) /* don't dispose */ |
| 4210 | ROM_LOAD( "c09-07. | |
| 3861 | ROM_LOAD( "c09-07.15 | |
| 4211 | 3862 | |
| 4212 | 3863 | ROM_REGION16_LE( 0x80000, REGION_USER1, 0 ) |
| 4213 | ROM_LOAD16_WORD( "c09-06. | |
| 3864 | ROM_LOAD16_WORD( "c09-06.37 | |
| 4214 | 3865 | |
| 4215 | 3866 | ROM_REGION( 0x180000, REGION_SOUND1, 0 ) /* ADPCM samples */ |
| 4216 | ROM_LOAD( "c09-14.rom", 0x000000, 0x080000, CRC(ad78bf46) SHA1(4020744bbdc4b9ec3dee1a9d7b5ffa8def43d7b2) ) | |
| 4217 | ROM_LOAD( "c09-13.rom", 0x080000, 0x080000, CRC(d57c41d3) SHA1(3375a1fc6389840544b9fdb96b2fafbc8e3276e2) ) | |
| 4218 | ROM_LOAD( "c09-12.rom", 0x100000, 0x080000, CRC(56c99fa5) SHA1(3f9a6bc89d847cc4c99d35f98157ea3f187c0f98) ) | |
| 3867 | ROM_LOAD( "c09-14.42", 0x000000, 0x080000, CRC(ad78bf46) SHA1(4020744bbdc4b9ec3dee1a9d7b5ffa8def43d7b2) ) | |
| 3868 | ROM_LOAD( "c09-13.43", 0x080000, 0x080000, CRC(d57c41d3) SHA1(3375a1fc6389840544b9fdb96b2fafbc8e3276e2) ) | |
| 3869 | ROM_LOAD( "c09-12.44", 0x100000, 0x080000, CRC(56c99fa5) SHA1(3f9a6bc89d847cc4c99d35f98157ea3f187c0f98) ) | |
| 4219 | 3870 | |
| 4220 | 3871 | ROM_REGION( 0x80000, REGION_SOUND2, 0 ) /* Delta-T samples */ |
| 4221 | ROM_LOAD( "c09-15. | |
| 3872 | ROM_LOAD( "c09-15.29 | |
| 4222 | 3873 | |
| 4223 | 3874 | ROM_REGION( 0x10000, REGION_USER2, 0 ) /* unused ROMs */ |
| 4224 | ROM_LOAD( "c09-16.rom", 0x00000, 0x10000, CRC(7245a6f6) SHA1(5bdde4e3bcde8c59dc84478c3cc079d7ef8ee9c5) ) | |
| 4225 | ROM_LOAD( "c09-20.rom", 0x00000, 0x00100, CRC(cd8ffd80) SHA1(133bcd291a3751bce5293cb6b685f87258e8db19) ) // road/sprite priority and palette select | |
| 4226 | ROM_LOAD( "c09-23.rom", 0x00000, 0x00100, CRC(fbf81f30) SHA1(c868452c334792345dcced075f6df69cff9e31ca) ) // road A/B internal priority | |
| 3875 | ROM_LOAD( "c09-16.17", 0x00000, 0x10000, CRC(7245a6f6) SHA1(5bdde4e3bcde8c59dc84478c3cc079d7ef8ee9c5) ) | |
| 3876 | ROM_LOAD( "c09-20.71", 0x00000, 0x00100, CRC(cd8ffd80) SHA1(133bcd291a3751bce5293cb6b685f87258e8db19) ) // road/sprite priority and palette select | |
| 3877 | ROM_LOAD( "c09-23.14", 0x00000, 0x00100, CRC(fbf81f30) SHA1(c868452c334792345dcced075f6df69cff9e31ca) ) // road A/B internal priority | |
| 4227 | 3878 | ROM_END |
| 4228 | 3879 | |
| 4229 | 3880 | ROM_START( nightstr ) |
| r1037 | r1038 | |
| 4569 | 4220 | GAME( 1989, bsharkj, bshark, bshark, bsharkj, bshark, ORIENTATION_FLIP_X, "Taito Corporation", "Battle Shark (Japan)", GAME_IMPERFECT_GRAPHICS ) |
| 4570 | 4221 | GAME( 1989, sci, 0, sci, sci, taitoz, ROT0, "Taito Corporation Japan", "Special Criminal Investigation (World set 1)", GAME_IMPERFECT_GRAPHICS ) |
| 4571 | 4222 | GAME( 1989, scia, sci, sci, sci, taitoz, ROT0, "Taito Corporation Japan", "Special Criminal Investigation (World set 2)", GAME_IMPERFECT_GRAPHICS ) |
| 4223 | GAME( 1989, scij, sci, sci, scij, taitoz, ROT0, "Taito Corporation", "Special Criminal Investigation (Japan)", GAME_IMPERFECT_GRAPHICS ) | |
| 4572 | 4224 | GAME( 1989, sciu, sci, sci, sciu, taitoz, ROT0, "Taito America Corporation", "Special Criminal Investigation (US)", GAME_IMPERFECT_GRAPHICS ) |
| 4573 | 4225 | GAME( 1989, nightstr, 0, nightstr, nightstr, taitoz, ROT0, "Taito America Corporation", "Night Striker (US)", GAME_IMPERFECT_GRAPHICS ) |
| 4574 | 4226 | GAME( 1990, aquajack, 0, aquajack, aquajack, taitoz, ROT0, "Taito Corporation Japan", "Aqua Jack (World)", GAME_IMPERFECT_GRAPHICS ) |
| r1037 | r1038 | |
|---|---|---|
| 413 | 413 | } |
| 414 | 414 | |
| 415 | 415 | |
| 416 | #ifdef UNUSED_FUNCTION | |
| 416 | 417 | /* Allow /CUDISP to interrupt main CPU */ |
| 417 | 418 | static WRITE8_HANDLER(sound_atten) |
| 418 | 419 | { |
| 419 | 420 | mame_printf_debug("%x\n",data); |
| 420 | 421 | } |
| 422 | #endif | |
| 421 | 423 | |
| 422 | 424 | /* Allow /CUDISP to interrupt main CPU */ |
| 423 | 425 | static WRITE16_HANDLER(inten_w) |
| r1037 | r1038 | |
|---|---|---|
| 740 | 740 | xscroll = (INT16)mSpritePos[1]; |
| 741 | 741 | yscroll = (INT16)mSpritePos[0]; |
| 742 | 742 | |
| 743 | xscroll &= 0x | |
| 743 | xscroll &= 0x3ff; if( xscroll & 0x200 ) xscroll |= ~0x3ff; | |
| 744 | 744 | yscroll &= 0x1ff; if( yscroll & 0x100 ) yscroll |= ~0x1ff; |
| 745 | 745 | |
| 746 | 746 | if( bitmap->width > 384 ) |
| 747 | 747 | { /* Medium Resolution: System21 adjust */ |
| 748 | if( yscroll<0 ) | |
| 749 | { /* solvalou */ | |
| 750 | yscroll += 0x20; | |
| 751 | } | |
| 748 | 752 | yscroll += 0x10; |
| 749 | 753 | } |
| 750 | 754 | else |
| r1037 | r1038 | |
|---|---|---|
| 19 | 19 | SDI (C) Sega 1987 |
| 20 | 20 | Shinobi (C) Sega 1987 |
| 21 | 21 | Tetris (C) Sega 1988 |
| 22 | Passing Shot (C) Sega 1988 | |
| 22 | 23 | |
| 23 | 24 | PCB Layout |
| 24 | 25 | ---------- |
| r1037 | r1038 | |
| 679 | 680 | return standard_io_r(offset, mem_mask); |
| 680 | 681 | } |
| 681 | 682 | |
| 683 | /************************************* | |
| 684 | * | |
| 685 | * Passing Shot custom I/O | |
| 686 | * | |
| 687 | *************************************/ | |
| 682 | 688 | |
| 689 | static READ16_HANDLER( pshot16a_custom_io_r ) | |
| 690 | { | |
| 691 | static int read_port = 0; | |
| 683 | 692 | |
| 693 | switch (offset & (0x3000/2)) | |
| 694 | { | |
| 695 | case 0x1000/2: | |
| 696 | switch (offset & 3) | |
| 697 | { | |
| 698 | case 0: | |
| 699 | read_port = 0; | |
| 700 | break; | |
| 701 | ||
| 702 | case 1: | |
| 703 | switch ((read_port++)&3) | |
| 704 | { | |
| 705 | case 0: return readinputportbytag("P1"); | |
| 706 | case 1: return readinputportbytag("P2"); | |
| 707 | case 2: return readinputportbytag("P3"); | |
| 708 | case 3: return readinputportbytag("P4"); | |
| 709 | } | |
| 710 | ||
| 711 | break; | |
| 712 | } | |
| 713 | break; | |
| 714 | } | |
| 715 | return standard_io_r(offset, mem_mask); | |
| 716 | } | |
| 717 | ||
| 684 | 718 | /************************************* |
| 685 | 719 | * |
| 686 | 720 | * SDI custom I/O |
| r1037 | r1038 | |
| 1280 | 1314 | INPUT_PORTS_END |
| 1281 | 1315 | |
| 1282 | 1316 | |
| 1317 | static INPUT_PORTS_START( pshot16a ) | |
| 1318 | PORT_INCLUDE( system16a_generic ) | |
| 1319 | ||
| 1320 | PORT_MODIFY("SERVICE") | |
| 1321 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START3 ) | |
| 1322 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 ) | |
| 1323 | ||
| 1324 | PORT_MODIFY("P1") | |
| 1325 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 1326 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 1327 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY | |
| 1328 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 1329 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 1330 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) | |
| 1331 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) | |
| 1332 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) | |
| 1333 | ||
| 1334 | PORT_MODIFY("P2") | |
| 1335 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) | |
| 1336 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) | |
| 1337 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) | |
| 1338 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) | |
| 1339 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 1340 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 1341 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) | |
| 1342 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) | |
| 1343 | ||
| 1344 | PORT_START_TAG("P3") | |
| 1345 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) | |
| 1346 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) | |
| 1347 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) | |
| 1348 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) | |
| 1349 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) | |
| 1350 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) | |
| 1351 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) | |
| 1352 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(3) | |
| 1353 | ||
| 1354 | PORT_START_TAG("P4") | |
| 1355 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4) | |
| 1356 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4) | |
| 1357 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4) | |
| 1358 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4) | |
| 1359 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) | |
| 1360 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) | |
| 1361 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4) | |
| 1362 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(4) | |
| 1363 | ||
| 1364 | PORT_MODIFY("DSW") | |
| 1365 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:1") | |
| 1366 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 1367 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 1368 | PORT_DIPNAME( 0x0e, 0x00, "Initial Point" ) PORT_DIPLOCATION("SWB:2,3,4") | |
| 1369 | PORT_DIPSETTING( 0x06, "2000" ) | |
| 1370 | PORT_DIPSETTING( 0x0a, "3000" ) | |
| 1371 | PORT_DIPSETTING( 0x0c, "4000" ) | |
| 1372 | PORT_DIPSETTING( 0x0e, "5000" ) | |
| 1373 | PORT_DIPSETTING( 0x08, "6000" ) | |
| 1374 | PORT_DIPSETTING( 0x04, "7000" ) | |
| 1375 | PORT_DIPSETTING( 0x02, "8000" ) | |
| 1376 | PORT_DIPSETTING( 0x00, "9000" ) | |
| 1377 | PORT_DIPNAME( 0x30, 0x30, "Point Table" ) PORT_DIPLOCATION("SWB:5,6") | |
| 1378 | PORT_DIPSETTING( 0x20, DEF_STR( Easy ) ) | |
| 1379 | PORT_DIPSETTING( 0x30, DEF_STR( Normal ) ) | |
| 1380 | PORT_DIPSETTING( 0x10, DEF_STR( Hard ) ) | |
| 1381 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) | |
| 1382 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:7,8") | |
| 1383 | PORT_DIPSETTING( 0x80, DEF_STR( Easy ) ) | |
| 1384 | PORT_DIPSETTING( 0xc0, DEF_STR( Normal ) ) | |
| 1385 | PORT_DIPSETTING( 0x40, DEF_STR( Hard ) ) | |
| 1386 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) | |
| 1387 | INPUT_PORTS_END | |
| 1388 | ||
| 1389 | ||
| 1283 | 1390 | static INPUT_PORTS_START( quartet ) |
| 1284 | 1391 | PORT_INCLUDE( system16a_generic ) |
| 1285 | 1392 | |
| r1037 | r1038 | |
| 2221 | 2328 | /************************************************************************************************************************** |
| 2222 | 2329 | ************************************************************************************************************************** |
| 2223 | 2330 | ************************************************************************************************************************** |
| 2331 | Passing Shot (Japan, 4 Players), Sega System 16A | |
| 2332 | CPU: FD1094 (317-0071) | |
| 2333 | */ | |
| 2334 | ||
| 2335 | ROM_START( pshot16a ) | |
| 2336 | ROM_REGION( 0x40000, REGION_CPU1, 0 ) /* 68000 code */ | |
| 2337 | ROM_LOAD16_BYTE( "epr11833.43", 0x000000, 0x10000, CRC(5eb1405c) SHA1(0a68d3fcc074475d38f999c93082d4a9dff0f19a) ) | |
| 2338 | ROM_LOAD16_BYTE( "epr11832.26", 0x000001, 0x10000, CRC(718a3fe4) SHA1(bd6844c53ce3b64b113795360175df92d095b467) ) | |
| 2339 | ||
| 2340 | ROM_REGION( 0x2000, REGION_USER1, 0 ) /* decryption key */ | |
| 2341 | ROM_LOAD( "317-0071.key", 0x0000, 0x2000, CRC(c69949ec) SHA1(1c63f42404ee1d8333e734e892b1c4cac0cb440e) ) | |
| 2342 | ||
| 2343 | ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */ | |
| 2344 | ROM_LOAD( "epr11834.95", 0x00000, 0x10000, CRC(df4e18ab) SHA1(ac9b424eded18f128e6cc743bbddf9afd869c8c4) ) | |
| 2345 | ROM_LOAD( "epr11835.94", 0x10000, 0x10000, CRC(6a07acc0) SHA1(218071612ee6fa89b16a47a77325a962ba38926d) ) | |
| 2346 | ROM_LOAD( "epr11836.93", 0x20000, 0x10000, CRC(93c74928) SHA1(43ea7855d5d4dcc4921b3a7b814acc75c5cfde15) ) | |
| 2347 | ||
| 2348 | ROM_REGION16_BE( 0x080000, REGION_GFX2, 0 ) /* sprites */ | |
| 2349 | ROM_LOAD16_BYTE( "epr11842.10", 0x00001, 0x08000, CRC(b6e94727) SHA1(0838e034f1f10d9cd1312c8c94b5c57387c0c271) ) | |
| 2350 | ROM_CONTINUE( 0x40001, 0x08000 ) | |
| 2351 | ROM_LOAD16_BYTE( "epr11845.11", 0x00000, 0x08000, CRC(17e8d5d5) SHA1(ac1074b0a705be13c6e3391441e6cfec1d2b3f8a) ) | |
| 2352 | ROM_CONTINUE( 0x40000, 0x08000 ) | |
| 2353 | ROM_LOAD16_BYTE( "epr11843.17", 0x10001, 0x08000, CRC(3e670098) SHA1(2cfc83f4294be30cd868738886ac546bd8489962) ) | |
| 2354 | ROM_CONTINUE( 0x50001, 0x08000 ) | |
| 2355 | ROM_LOAD16_BYTE( "epr11846.18", 0x10000, 0x08000, CRC(50eb71cc) SHA1(463b4917ca19c7f4ad2c2845caa104d5e4a2dda3) ) | |
| 2356 | ROM_CONTINUE( 0x50000, 0x08000 ) | |
| 2357 | ROM_LOAD16_BYTE( "epr11844.23", 0x20001, 0x08000, CRC(05733ca8) SHA1(1dbc7c99450ebe6a9fd8c0244fd3cb38b74984ef) ) | |
| 2358 | ROM_CONTINUE( 0x60001, 0x08000 ) | |
| 2359 | ROM_LOAD16_BYTE( "epr11847.24", 0x20000, 0x08000, CRC(81e49697) SHA1(a70fa409e3555ad6c8f28930a7026fdf2deb8c65) ) | |
| 2360 | ROM_CONTINUE( 0x60000, 0x08000 ) | |
| 2361 | ||
| 2362 | ROM_REGION( 0x20000, REGION_CPU2, 0 ) /* sound CPU */ | |
| 2363 | ROM_LOAD( "epr11837.12", 0x0000, 0x8000, CRC(74d11552) SHA1(5a0f0c3fb858ed2bad8002fce4e29d730f102bcd) ) | |
| 2364 | ||
| 2365 | ROM_REGION( 0x1000, REGION_CPU3, 0 ) /* 4k for 7751 onboard ROM */ | |
| 2366 | ROM_LOAD( "7751.bin", 0x0000, 0x0400, CRC(6a9534fc) SHA1(67ad94674db5c2aab75785668f610f6f4eccd158) ) /* 7751 - U34 */ | |
| 2367 | ||
| 2368 | ROM_REGION( 0x20000, REGION_SOUND1, 0 ) /* 7751 sound data */ | |
| 2369 | ROM_LOAD( "epr11838.1", 0x00000, 0x8000, CRC(a465cd69) SHA1(25da3809824fb3df1f93bbfa88355a7c50e44211) ) | |
| 2370 | ROM_LOAD( "epr11839.2", 0x08000, 0x8000, CRC(99de6197) SHA1(f7de6a34fa185754c12276a94b1513234d352f3f) ) | |
| 2371 | ROM_LOAD( "epr11840.4", 0x10000, 0x8000, CRC(9854e8b3) SHA1(bc9d8a17ff96cf03f9a955223c11d9f1fb0309c5) ) | |
| 2372 | ROM_LOAD( "epr11841.5", 0x18000, 0x8000, CRC(1e89877e) SHA1(bbceb4f3cafae40d1e256f4336d3ee0bcdf8d077) ) | |
| 2373 | ROM_END | |
| 2374 | ||
| 2375 | ||
| 2376 | /************************************************************************************************************************** | |
| 2377 | ************************************************************************************************************************** | |
| 2378 | ************************************************************************************************************************** | |
| 2224 | 2379 | Quartet, pre-System 16 |
| 2225 | 2380 | CPU: 68000 |
| 2226 | 2381 | i8751 315-5194 |
| r1037 | r1038 | |
| 2871 | 3026 | custom_io_r = mjleague_custom_io_r; |
| 2872 | 3027 | } |
| 2873 | 3028 | |
| 3029 | static DRIVER_INIT( pshot16a ) | |
| 3030 | { | |
| 3031 | system16a_generic_init(machine); | |
| 3032 | custom_io_r = pshot16a_custom_io_r; | |
| 3033 | } | |
| 2874 | 3034 | |
| 2875 | 3035 | static DRIVER_INIT( quartet ) |
| 2876 | 3036 | { |
| r1037 | r1038 | |
| 2931 | 3091 | GAME( 1986, alexkid1, alexkidd, system16a, alexkidd, alexkid1, ROT0, "Sega", "Alex Kidd: The Lost Stars (set 1, FD1089A 317-unknown)", 0 ) |
| 2932 | 3092 | GAME( 1986, fantzone, 0, system16a_no7751, fantzone, generic_16a, ROT0, "Sega", "Fantasy Zone (set 2, unprotected)", 0 ) |
| 2933 | 3093 | GAME( 1986, fantzon1, fantzone, system16a_no7751, fantzone, generic_16a, ROT0, "Sega", "Fantasy Zone (set 1, unprotected)", 0 ) |
| 3094 | GAME( 1988, pshot16a, passsht, system16a, pshot16a, pshot16a, ROT270, "Sega", "Passing Shot (Japan, 4 Players, System 16A, FD1094 317-0071)", 0 ) | |
| 2934 | 3095 | GAME( 1987, sdi, 0, system16a_no7751, sdi, sdi, ROT0, "Sega", "SDI - Strategic Defense Initiative (Europe, System 16A, FD1089B 317-0027)", 0 ) |
| 2935 | 3096 | GAME( 1987, shinobi, 0, system16a, shinobi, generic_16a, ROT0, "Sega", "Shinobi (set 5, System 16A, unprotected)", 0 ) |
| 2936 | 3097 | GAME( 1987, shinobi1, shinobi, system16a, shinobi, generic_16a, ROT0, "Sega", "Shinobi (set 1, System 16A, FD1094 317-0050)", 0 ) |
| r1037 | r1038 | |
|---|---|---|
| 586 | 586 | memory_install_read32_handler \ |
| 587 | 587 | (0, ADDRESS_SPACE_PROGRAM, (BASE+START)&~3, (BASE+END)|3, 0, 0, waitskip_r);} |
| 588 | 588 | |
| 589 | static int suspension_active, resume_trigger; | |
| 590 | #ifdef UNUSED_FUNCTION | |
| 589 | 591 | static struct { UINT32 offs, pc, mask, data; } waitskip; |
| 590 | static int suspension_active, resume_trigger; | |
| 591 | 592 | |
| 592 | 593 | static READ32_HANDLER(waitskip_r) |
| 593 | 594 | { |
| r1037 | r1038 | |
| 602 | 603 | |
| 603 | 604 | return(data); |
| 604 | 605 | } |
| 606 | #endif | |
| 605 | 607 | |
| 606 | 608 | |
| 607 | 609 | static READ32_HANDLER( ccu_r ) |
| r1037 | r1038 | |
|---|---|---|
| 620 | 620 | return stv_workram_h[0x0033762/4]; |
| 621 | 621 | } |
| 622 | 622 | |
| 623 | #ifdef UNUSED_FUNCTION | |
| 623 | 624 | static READ32_HANDLER( bakubaku_hangskip_r ) |
| 624 | 625 | { |
| 625 | 626 | if (activecpu_get_pc()==0x060335e4) stv_workram_h[0x0335e6/4] = 0x32300909; |
| 626 | 627 | |
| 627 | 628 | return stv_workram_h[0x033660/4]; |
| 628 | 629 | } |
| 630 | #endif | |
| 629 | 631 | |
| 630 | 632 | DRIVER_INIT(bakubaku) |
| 631 | 633 | { |
| r1037 | r1038 | |
|---|---|---|
| 87 | 87 | COMBINE_DATA(&paloff); |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | #ifdef UNUSED_FUNCTION | |
| 90 | 91 | static WRITE16_HANDLER( pcup_prgbank_w ) |
| 91 | 92 | { |
| 92 | 93 | int bank; |
| r1037 | r1038 | |
| 98 | 99 | memory_set_bankptr(2,&ROM1[0x80000*(bank)]); |
| 99 | 100 | } |
| 100 | 101 | } |
| 102 | #endif | |
| 101 | 103 | |
| 102 | 104 | static WRITE16_HANDLER( paldat_w ) |
| 103 | 105 | { |
| r1037 | r1038 | |
| 109 | 111 | return 0xffff;// mame_rand(Machine); |
| 110 | 112 | } |
| 111 | 113 | |
| 114 | #ifdef UNUSED_FUNCTION | |
| 112 | 115 | static READ16_HANDLER( peno_rand2 ) |
| 113 | 116 | { |
| 114 | 117 | return mame_rand(Machine); |
| 115 | 118 | } |
| 119 | #endif | |
| 116 | 120 | |
| 117 | 121 | static ADDRESS_MAP_START( ttchamp_map, ADDRESS_SPACE_PROGRAM, 16 ) |
| 118 | 122 | AM_RANGE(0x00000, 0x0ffff) AM_RAM |
| r1037 | r1038 | |
|---|---|---|
| 710 | 710 | return hng_cart[offset]; |
| 711 | 711 | } |
| 712 | 712 | |
| 713 | #ifdef UNUSED_FUNCTION | |
| 713 | 714 | static READ32_HANDLER( no_machine_error ) |
| 714 | 715 | { |
| 715 | 716 | return no_machine_error_code; |
| 716 | 717 | } |
| 718 | #endif | |
| 717 | 719 | |
| 718 | 720 | WRITE32_HANDLER( hng64_dualport_w ) |
| 719 | 721 | { |
| r1037 | r1038 | |
|---|---|---|
| 2788 | 2788 | PCB number info: |
| 2789 | 2789 | K1100439A FLIPULL |
| 2790 | 2790 | K1100441A PLOTTING |
| 2791 | | |
| 2791 | K1100466A (US Plotting PCB ID#?) | |
| 2792 | 2792 | |
| 2793 | 2793 | +--------------------------+ |
| 2794 | 2794 | _| PAL 4 4 4 4 | |
| r1037 | r1038 | |
| 2894 | 2894 | ROM_LOAD( "u09.rom", 0x20000, 0x20000, CRC(3c115f8b) SHA1(8d518be01b7c4d6d993d5d9b62aab719a5c8baca) ) |
| 2895 | 2895 | ROM_END |
| 2896 | 2896 | |
| 2897 | ROM_START( puzznici ) | |
| 2898 | ROM_REGION( 0x30000, REGION_CPU1, 0 ) | |
| 2899 | ROM_LOAD( "1.bin", 0x00000, 0x20000, CRC(4612f5e0) SHA1(dc07a365414666568537d31ef01b58f2362cadaf) ) | |
| 2900 | ROM_RELOAD( 0x10000, 0x20000 ) | |
| 2901 | ||
| 2902 | ROM_REGION( 0x0800, REGION_CPU2, 0 ) /* 2k for the microcontroller */ | |
| 2903 | ROM_LOAD( "mc68705p", 0x0000, 0x0800, NO_DUMP ) | |
| 2904 | ||
| 2905 | ROM_REGION( 0x40000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 2906 | ROM_LOAD( "u10.rom", 0x00000, 0x20000, CRC(4264056c) SHA1(d2d8a170ae0f361093a5384935238605a59e5938) ) | |
| 2907 | ROM_LOAD( "3.bin", 0x20000, 0x20000, CRC(2bf5232a) SHA1(a8fc06bb8bae2ca6bd21e3a96c9ed38bb356d5d7) ) | |
| 2908 | ROM_END | |
| 2909 | ||
| 2897 | 2910 | ROM_START( horshoes ) |
| 2898 | 2911 | ROM_REGION( 0x30000, REGION_CPU1, 0 ) |
| 2899 | 2912 | ROM_LOAD( "c47.03", 0x00000, 0x20000, CRC(37e15b20) SHA1(85baa0ee553e4c9fed38294ba8912f18f519e62f) ) |
| r1037 | r1038 | |
| 3046 | 3059 | GAME( 1989, flipull, plotting, plotting, plotting, 0, ROT0, "Taito Corporation", "Flipull (Japan)", 0 ) |
| 3047 | 3060 | GAME( 1989, puzznic, 0, puzznic, puzznic, 0, ROT0, "Taito Corporation Japan", "Puzznic (World)", 0 ) |
| 3048 | 3061 | GAME( 1989, puzznicj, puzznic, puzznic, puzznic, 0, ROT0, "Taito Corporation", "Puzznic (Japan)", 0 ) |
| 3062 | GAME( 1989, puzznici, puzznic, puzznic, puzznic, 0, ROT0, "Taito Corporation", "Puzznic (Italy)", 0 ) | |
| 3049 | 3063 | GAME( 1990, horshoes, 0, horshoes, horshoes, 0, ROT270, "Taito America Corporation", "American Horseshoes (US)", 0 ) |
| 3050 | 3064 | GAME( 1990, palamed, 0, palamed, palamed, 0, ROT0, "Taito Corporation", "Palamedes (Japan)", 0 ) |
| 3051 | 3065 | GAME( 1993, cachat, 0, cachat, cachat, 0, ROT0, "Taito Corporation", "Cachat (Japan)", 0 ) |
| r0 | r1038 | |
|---|---|---|
| 1 | /* | |
| 2 | ||
| 3 | Super Real Mahjong P5 | |
| 4 | (c)1994 SETA | |
| 5 | ||
| 6 | preliminary driver by Tomasz Slanina | |
| 7 | ||
| 8 | ||
| 9 | -- | |
| 10 | ||
| 11 | CPU : R3560 (IDT MIPS R3000 derivative) | |
| 12 | SOUND : TC6210AF (ST-0016) | |
| 13 | OSC. : 50.0000MHz 42.9545MHz | |
| 14 | ||
| 15 | SX008-01.BIN ; CHR ROM | |
| 16 | SX008-02.BIN ; | | |
| 17 | SX008-03.BIN ; | | |
| 18 | SX008-04.BIN ; | | |
| 19 | SX008-05.BIN ; | | |
| 20 | SX008-06.BIN ; | | |
| 21 | SX008-07.BIN ; / | |
| 22 | SX008-08.BIN ; SOUND DATA | |
| 23 | SX008-09.BIN ; / | |
| 24 | SX008-11.BIN ; MAIN PRG | |
| 25 | SX008-12.BIN ; | | |
| 26 | SX008-13.BIN ; | | |
| 27 | SX008-14.BIN ; / | |
| 28 | ||
| 29 | */ | |
| 30 | ||
| 31 | #include "driver.h" | |
| 32 | #include "cpu/mips/r3000.h" | |
| 33 | #include "sound/st0016.h" | |
| 34 | #include "st0016.h" | |
| 35 | ||
| 36 | extern UINT8 *st0016_charram; | |
| 37 | static UINT32 databank; | |
| 38 | ||
| 39 | static UINT16 *tileram; | |
| 40 | static UINT16 *sprram; | |
| 41 | ||
| 42 | #define SPRITE_GLOBAL_X 0 | |
| 43 | #define SPRITE_GLOBAL_Y 1 | |
| 44 | #define SUBLIST_OFFSET 2 | |
| 45 | #define SUBLIST_LENGTH 3 | |
| 46 | ||
| 47 | #define SUBLIST_OFFSET_SHIFT 3 | |
| 48 | #define SPRITE_LIST_END_MARKER 0x8000 | |
| 49 | ||
| 50 | #define SPRITE_TILE 0 | |
| 51 | #define SPRITE_PALETTE 1 | |
| 52 | #define SPRITE_LOCAL_X 2 | |
| 53 | #define SPRITE_LOCAL_Y 3 | |
| 54 | #define SPRITE_SIZE 4 | |
| 55 | ||
| 56 | #define SPRITE_SUBLIST_ENTRY_LENGTH 8 | |
| 57 | #define SPRITE_LIST_ENTRY_LENGTH 4 | |
| 58 | ||
| 59 | #define SPRITE_DATA_GRANULARITY 0x80 | |
| 60 | ||
| 61 | ||
| 62 | VIDEO_UPDATE( srmp5 ) | |
| 63 | { | |
| 64 | // sprite/tile flipping is not implemented | |
| 65 | int x,y,address,xs,ys,height,width,xw,yw,sprite,xb,yb,sizex,sizey; | |
| 66 | UINT16 *sprite_list=sprram; | |
| 67 | UINT16 *sprite_list_end=&sprram[0x1000]; //guess | |
| 68 | UINT8 *pixels=(UINT8 *)tileram; | |
| 69 | ||
| 70 | fillbitmap(bitmap,0,&machine->screen[0].visarea); | |
| 71 | ||
| 72 | while((sprite_list[SUBLIST_OFFSET]&SPRITE_LIST_END_MARKER)==0 && sprite_list<sprite_list_end) | |
| 73 | { | |
| 74 | UINT16 *sprite_sublist=&sprram[sprite_list[SUBLIST_OFFSET]<<SUBLIST_OFFSET_SHIFT]; | |
| 75 | UINT16 sublist_length=sprite_list[SUBLIST_LENGTH]; | |
| 76 | INT16 global_x,global_y; | |
| 77 | ||
| 78 | if(0!=sprite_list[SUBLIST_OFFSET]) | |
| 79 | { | |
| 80 | global_x=(INT16)sprite_list[SPRITE_GLOBAL_X]; | |
| 81 | global_y=(INT16)sprite_list[SPRITE_GLOBAL_Y]; | |
| 82 | while(sublist_length) | |
| 83 | { | |
| 84 | sprite=sprite_sublist[SPRITE_TILE]; | |
| 85 | x=(INT16)sprite_sublist[SPRITE_LOCAL_X]+global_x; | |
| 86 | y=(INT16)sprite_sublist[SPRITE_LOCAL_Y]+global_y; | |
| 87 | width=(sprite_sublist[SPRITE_SIZE]>>4)&0xf; | |
| 88 | height=(sprite_sublist[SPRITE_SIZE]>>12)&0xf; | |
| 89 | ||
| 90 | sizex=(sprite_sublist[SPRITE_SIZE]>>0)&0xf; | |
| 91 | sizey=(sprite_sublist[SPRITE_SIZE]>>8)&0xf; | |
| 92 | ||
| 93 | address=sprite*SPRITE_DATA_GRANULARITY; | |
| 94 | for(xw=0;xw<=width;xw++) | |
| 95 | for(yw=0;yw<=height;yw++) | |
| 96 | { | |
| 97 | xb=x+xw*(sizex+1); | |
| 98 | yb=y+yw*(sizey+1); | |
| 99 | for(ys=0;ys<=sizey;ys++) | |
| 100 | { | |
| 101 | for(xs=0;xs<=sizex;xs++) | |
| 102 | { | |
| 103 | UINT32 pen=pixels[address&(0x100000-1)]; | |
| 104 | ||
| 105 | if(pen) | |
| 106 | { | |
| 107 | if(xb+xs<=machine->screen[0].visarea.max_x && xb+xs>=machine->screen[0].visarea.min_x && yb+ys<=machine->screen[0].visarea.max_y && yb+ys>=machine->screen[0].visarea.min_y ) | |
| 108 | { | |
| 109 | UINT32 pixdata=paletteram32[pen+((sprite_sublist[SPRITE_PALETTE]&0xff)<<8)]; | |
| 110 | *BITMAP_ADDR32(bitmap, yb+ys, xb+xs) = ((pixdata&0x7c00)>>7) | ((pixdata&0x3e0)<<6) | ((pixdata&0x1f)<<19); | |
| 111 | } | |
| 112 | } | |
| 113 | ++address; | |
| 114 | } | |
| 115 | } | |
| 116 | ||
| 117 | } | |
| 118 | sprite_sublist+=SPRITE_SUBLIST_ENTRY_LENGTH; | |
| 119 | --sublist_length; | |
| 120 | } | |
| 121 | } | |
| 122 | sprite_list+=SPRITE_LIST_ENTRY_LENGTH; | |
| 123 | } | |
| 124 | ||
| 125 | return 0; | |
| 126 | } | |
| 127 | ||
| 128 | static WRITE32_HANDLER(bank_w) | |
| 129 | { | |
| 130 | COMBINE_DATA(&databank); | |
| 131 | } | |
| 132 | ||
| 133 | static READ32_HANDLER(tileram_r) | |
| 134 | { | |
| 135 | return videoram32[offset]; | |
| 136 | } | |
| 137 | ||
| 138 | static WRITE32_HANDLER(tileram_w) | |
| 139 | { | |
| 140 | COMBINE_DATA(&videoram32[offset]); | |
| 141 | tileram[offset]=videoram32[offset]&0xffff; | |
| 142 | } | |
| 143 | ||
| 144 | static READ32_HANDLER(spr_r) | |
| 145 | { | |
| 146 | return spriteram32[offset]; | |
| 147 | } | |
| 148 | ||
| 149 | static WRITE32_HANDLER(spr_w) | |
| 150 | { | |
| 151 | COMBINE_DATA(&spriteram32[offset]); | |
| 152 | sprram[offset]=spriteram32[offset]; | |
| 153 | } | |
| 154 | ||
| 155 | static READ32_HANDLER(data_r) | |
| 156 | { | |
| 157 | UINT32 data; | |
| 158 | data=((databank>>4)&0xf)*0x100000; //guess | |
| 159 | data=memory_region(REGION_USER2)[data+offset*2]+memory_region(REGION_USER2)[data+offset*2+1]*256; | |
| 160 | return data|(data<<16); | |
| 161 | } | |
| 162 | ||
| 163 | static ADDRESS_MAP_START( srmp5_mem, ADDRESS_SPACE_PROGRAM, 32 ) | |
| 164 | AM_RANGE(0x00000000, 0x000fffff) AM_RAM //maybe 0 - 2fffff ? | |
| 165 | AM_RANGE(0x002f0000, 0x002f7fff) AM_RAM | |
| 166 | AM_RANGE(0x01000000, 0x01000003) AM_WRITE(MWA32_RAM) // 0xaa .. watchdog ? | |
| 167 | AM_RANGE(0x01800004, 0x01800007) AM_READ(input_port_0_dword_r) | |
| 168 | AM_RANGE(0x01800008, 0x0180000b) AM_READ(input_port_1_dword_r) | |
| 169 | AM_RANGE(0x0180000c, 0x0180000f) AM_WRITE(bank_w) | |
| 170 | AM_RANGE(0x01800010, 0x01800013) AM_READ(input_port_2_dword_r) //multiplexed controls (selected by writes to 1c) | |
| 171 | AM_RANGE(0x01800014, 0x01800017) AM_READ(input_port_3_dword_r) | |
| 172 | AM_RANGE(0x0180001c, 0x0180001f) AM_WRITE(MWA32_RAM)//c1 c2 c4 c8 => mahjong inputs (at $10) - bits 0-3 | |
| 173 | AM_RANGE(0x01800200, 0x0180020f) AM_RAM //sound related ? only few writes after boot | |
| 174 | AM_RANGE(0x01a00000, 0x01bfffff) AM_READ(data_r) | |
| 175 | ||
| 176 | AM_RANGE(0x0a000000, 0x0a0fffff) AM_READWRITE(spr_r, spr_w) AM_BASE(&spriteram32) | |
| 177 | AM_RANGE(0x0a100000, 0x0a1fffff) AM_RAM AM_BASE(&paletteram32) | |
| 178 | AM_RANGE(0x0a200000, 0x0a3fffff) AM_READWRITE(tileram_r, tileram_w) AM_BASE(&videoram32) | |
| 179 | ||
| 180 | AM_RANGE(0x1eff0000, 0x1eff001f) AM_WRITE(MWA32_RAM) | |
| 181 | AM_RANGE(0x1eff003c, 0x1eff003f) AM_READNOP | |
| 182 | AM_RANGE(0x1fc00000, 0x1fdfffff) AM_READ(MRA32_ROM) AM_WRITE(MWA32_ROM) AM_REGION(REGION_USER1, 0) | |
| 183 | AM_RANGE(0x2fc00000, 0x2fdfffff) AM_READ(MRA32_ROM) AM_WRITE(MWA32_ROM) AM_REGION(REGION_USER1, 0) | |
| 184 | ADDRESS_MAP_END | |
| 185 | ||
| 186 | static ADDRESS_MAP_START( st0016_mem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 187 | AM_RANGE(0x0000, 0x7fff) AM_ROM | |
| 188 | AM_RANGE(0x8000, 0xbfff) AM_ROMBANK(1) | |
| 189 | AM_RANGE(0xc000, 0xcfff) AM_READ(st0016_sprite_ram_r) AM_WRITE(st0016_sprite_ram_w) | |
| 190 | AM_RANGE(0xd000, 0xdfff) AM_READ(st0016_sprite2_ram_r) AM_WRITE(st0016_sprite2_ram_w) | |
| 191 | AM_RANGE(0xe000, 0xe7ff) AM_RAM | |
| 192 | AM_RANGE(0xe800, 0xe87f) AM_RAM | |
| 193 | AM_RANGE(0xe900, 0xe9ff) AM_RAM AM_WRITE(st0016_snd_w) AM_BASE(&st0016_sound_regs) | |
| 194 | AM_RANGE(0xea00, 0xebff) AM_READ(st0016_palette_ram_r) AM_WRITE(st0016_palette_ram_w) | |
| 195 | AM_RANGE(0xec00, 0xec1f) AM_READ(st0016_character_ram_r) AM_WRITE(st0016_character_ram_w) | |
| 196 | AM_RANGE(0xf000, 0xffff) AM_RAM | |
| 197 | ADDRESS_MAP_END | |
| 198 | ||
| 199 | READ8_HANDLER(st0016_dma_r); | |
| 200 | ||
| 201 | static ADDRESS_MAP_START( st0016_io, ADDRESS_SPACE_IO, 8 ) | |
| 202 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) | |
| 203 | AM_RANGE(0x00, 0xbf) AM_READ(st0016_vregs_r) AM_WRITE(st0016_vregs_w) | |
| 204 | AM_RANGE(0xc0, 0xc3) AM_NOP // data from other cpu ? | |
| 205 | AM_RANGE(0xe0, 0xe0) AM_WRITENOP | |
| 206 | AM_RANGE(0xe1, 0xe1) AM_WRITE(st0016_rom_bank_w) | |
| 207 | AM_RANGE(0xe2, 0xe2) AM_WRITE(st0016_sprite_bank_w) | |
| 208 | AM_RANGE(0xe3, 0xe4) AM_WRITE(st0016_character_bank_w) | |
| 209 | AM_RANGE(0xe5, 0xe5) AM_WRITE(st0016_palette_bank_w) | |
| 210 | AM_RANGE(0xe6, 0xe6) AM_WRITENOP | |
| 211 | AM_RANGE(0xe7, 0xe7) AM_WRITENOP | |
| 212 | AM_RANGE(0xf0, 0xf0) AM_READ(st0016_dma_r) | |
| 213 | ADDRESS_MAP_END | |
| 214 | ||
| 215 | ||
| 216 | static struct r3000_config config = | |
| 217 | { | |
| 218 | 1, /* 1 if we have an FPU, 0 otherwise */ | |
| 219 | 4096, /* code cache size */ | |
| 220 | 4096 /* data cache size */ | |
| 221 | }; | |
| 222 | ||
| 223 | INPUT_PORTS_START( srmp5 ) | |
| 224 | PORT_START | |
| 225 | PORT_DIPNAME( 0x0001, 0x0001, "0-0" ) | |
| 226 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) | |
| 227 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 228 | PORT_DIPNAME( 0x0002, 0x0002, "0-1" ) | |
| 229 | PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) | |
| 230 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 231 | PORT_DIPNAME( 0x0004, 0x0004, "0-2" ) | |
| 232 | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) | |
| 233 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 234 | PORT_DIPNAME( 0x0008, 0x0008, "0-3" ) | |
| 235 | PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) | |
| 236 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 237 | PORT_DIPNAME( 0x0010, 0x0010, "0-4" ) | |
| 238 | PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) | |
| 239 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 240 | PORT_DIPNAME( 0x0020, 0x0020, "0-5" ) | |
| 241 | PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) | |
| 242 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 243 | PORT_DIPNAME( 0x0040, 0x0040, "0-6" ) | |
| 244 | PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) | |
| 245 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 246 | PORT_DIPNAME( 0x0080, 0x0080, "0-7" ) | |
| 247 | PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) | |
| 248 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 249 | PORT_DIPNAME( 0x0100, 0x0100, "0-8" ) | |
| 250 | PORT_DIPSETTING( 0x0100, DEF_STR( Off ) ) | |
| 251 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 252 | PORT_DIPNAME( 0x0200, 0x0200, "0-9" ) | |
| 253 | PORT_DIPSETTING( 0x0200, DEF_STR( Off ) ) | |
| 254 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 255 | PORT_DIPNAME( 0x0400, 0x0400, "0-a" ) | |
| 256 | PORT_DIPSETTING( 0x0400, DEF_STR( Off ) ) | |
| 257 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 258 | PORT_DIPNAME( 0x0800, 0x0800, "0-b" ) | |
| 259 | PORT_DIPSETTING( 0x0800, DEF_STR( Off ) ) | |
| 260 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 261 | PORT_DIPNAME( 0x1000, 0x1000, "0-c" ) | |
| 262 | PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) | |
| 263 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 264 | PORT_DIPNAME( 0x2000, 0x2000, "0-d" ) | |
| 265 | PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) | |
| 266 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 267 | PORT_DIPNAME( 0x4000, 0x4000, "0-e" ) | |
| 268 | PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) | |
| 269 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 270 | PORT_DIPNAME( 0x8000, 0x8000, "0-f" ) | |
| 271 | PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) | |
| 272 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 273 | PORT_DIPNAME( 0x00010000, 0x00010000, "0-10" ) | |
| 274 | PORT_DIPSETTING( 0x00010000, DEF_STR( Off ) ) | |
| 275 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 276 | PORT_DIPNAME( 0x00020000, 0x00020000, "0-11" ) | |
| 277 | PORT_DIPSETTING( 0x00020000, DEF_STR( Off ) ) | |
| 278 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 279 | PORT_DIPNAME( 0x00040000, 0x00040000, "0-12" ) | |
| 280 | PORT_DIPSETTING( 0x00040000, DEF_STR( Off ) ) | |
| 281 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 282 | PORT_DIPNAME( 0x00080000, 0x00080000, "0-13" ) | |
| 283 | PORT_DIPSETTING( 0x00080000, DEF_STR( Off ) ) | |
| 284 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 285 | PORT_DIPNAME( 0x00100000, 0x00100000, "0-14" ) | |
| 286 | PORT_DIPSETTING( 0x00100000, DEF_STR( Off ) ) | |
| 287 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 288 | PORT_DIPNAME( 0x00200000, 0x00200000, "0-15" ) | |
| 289 | PORT_DIPSETTING( 0x00200000, DEF_STR( Off ) ) | |
| 290 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 291 | PORT_DIPNAME( 0x00400000, 0x00400000, "0-16" ) | |
| 292 | PORT_DIPSETTING( 0x00400000, DEF_STR( Off ) ) | |
| 293 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 294 | PORT_DIPNAME( 0x00800000, 0x00800000, "0-17" ) | |
| 295 | PORT_DIPSETTING( 0x00800000, DEF_STR( Off ) ) | |
| 296 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 297 | PORT_DIPNAME( 0x01000000, 0x01000000, "0-18" ) | |
| 298 | PORT_DIPSETTING( 0x01000000, DEF_STR( Off ) ) | |
| 299 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 300 | PORT_DIPNAME( 0x02000000, 0x02000000, "0-19" ) | |
| 301 | PORT_DIPSETTING( 0x02000000, DEF_STR( Off ) ) | |
| 302 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 303 | PORT_DIPNAME( 0x04000000, 0x04000000, "0-1a" ) | |
| 304 | PORT_DIPSETTING( 0x04000000, DEF_STR( Off ) ) | |
| 305 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 306 | PORT_DIPNAME( 0x08000000, 0x08000000, "0-1b" ) | |
| 307 | PORT_DIPSETTING( 0x08000000, DEF_STR( Off ) ) | |
| 308 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 309 | PORT_DIPNAME( 0x10000000, 0x10000000, "0-1c" ) | |
| 310 | PORT_DIPSETTING( 0x10000000, DEF_STR( Off ) ) | |
| 311 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 312 | PORT_DIPNAME( 0x20000000, 0x20000000, "0-1d" ) | |
| 313 | PORT_DIPSETTING( 0x20000000, DEF_STR( Off ) ) | |
| 314 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 315 | PORT_DIPNAME( 0x40000000, 0x40000000, "0-1e" ) | |
| 316 | PORT_DIPSETTING( 0x40000000, DEF_STR( Off ) ) | |
| 317 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 318 | PORT_DIPNAME( 0x80000000, 0x80000000, "0-1f" ) | |
| 319 | PORT_DIPSETTING( 0x80000000, DEF_STR( Off ) ) | |
| 320 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 321 | ||
| 322 | PORT_START | |
| 323 | PORT_DIPNAME( 0x0001, 0x0001, "1-0" ) | |
| 324 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) | |
| 325 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 326 | PORT_DIPNAME( 0x0002, 0x0002, "1-1" ) | |
| 327 | PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) | |
| 328 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 329 | PORT_DIPNAME( 0x0004, 0x0004, "1-2" ) | |
| 330 | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) | |
| 331 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 332 | PORT_DIPNAME( 0x0008, 0x0008, "1-3" ) | |
| 333 | PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) | |
| 334 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 335 | PORT_DIPNAME( 0x0010, 0x0010, "1-4" ) | |
| 336 | PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) | |
| 337 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 338 | PORT_DIPNAME( 0x0020, 0x0020, "1-5" ) | |
| 339 | PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) | |
| 340 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 341 | PORT_DIPNAME( 0x0040, 0x0040, "1-6" ) | |
| 342 | PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) | |
| 343 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 344 | PORT_DIPNAME( 0x0080, 0x0080, "Test mode" ) | |
| 345 | PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) | |
| 346 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 347 | PORT_DIPNAME( 0x0100, 0x0100, "1-8" ) | |
| 348 | PORT_DIPSETTING( 0x0100, DEF_STR( Off ) ) | |
| 349 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 350 | PORT_DIPNAME( 0x0200, 0x0200, "1-9" ) | |
| 351 | PORT_DIPSETTING( 0x0200, DEF_STR( Off ) ) | |
| 352 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 353 | PORT_DIPNAME( 0x0400, 0x0400, "1-a" ) | |
| 354 | PORT_DIPSETTING( 0x0400, DEF_STR( Off ) ) | |
| 355 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 356 | PORT_DIPNAME( 0x0800, 0x0800, "1-b" ) | |
| 357 | PORT_DIPSETTING( 0x0800, DEF_STR( Off ) ) | |
| 358 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 359 | PORT_DIPNAME( 0x1000, 0x1000, "1-c" ) | |
| 360 | PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) | |
| 361 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 362 | PORT_DIPNAME( 0x2000, 0x2000, "1-d" ) | |
| 363 | PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) | |
| 364 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 365 | PORT_DIPNAME( 0x4000, 0x4000, "1-e" ) | |
| 366 | PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) | |
| 367 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 368 | PORT_DIPNAME( 0x8000, 0x8000, "1-f" ) | |
| 369 | PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) | |
| 370 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 371 | ||
| 372 | PORT_DIPNAME( 0x00010000, 0x00010000, "1-10" ) | |
| 373 | PORT_DIPSETTING( 0x00010000, DEF_STR( Off ) ) | |
| 374 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 375 | PORT_DIPNAME( 0x00020000, 0x00020000, "1-11" ) | |
| 376 | PORT_DIPSETTING( 0x00020000, DEF_STR( Off ) ) | |
| 377 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 378 | PORT_DIPNAME( 0x00040000, 0x00040000, "1-12" ) | |
| 379 | PORT_DIPSETTING( 0x00040000, DEF_STR( Off ) ) | |
| 380 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 381 | PORT_DIPNAME( 0x00080000, 0x00080000, "1-13" ) | |
| 382 | PORT_DIPSETTING( 0x00080000, DEF_STR( Off ) ) | |
| 383 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 384 | PORT_DIPNAME( 0x00100000, 0x00100000, "1-14" ) | |
| 385 | PORT_DIPSETTING( 0x00100000, DEF_STR( Off ) ) | |
| 386 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 387 | PORT_DIPNAME( 0x00200000, 0x00200000, "1-15" ) | |
| 388 | PORT_DIPSETTING( 0x00200000, DEF_STR( Off ) ) | |
| 389 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 390 | PORT_DIPNAME( 0x00400000, 0x00400000, "1-16" ) | |
| 391 | PORT_DIPSETTING( 0x00400000, DEF_STR( Off ) ) | |
| 392 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 393 | PORT_DIPNAME( 0x00800000, 0x00800000, "1-17" ) | |
| 394 | PORT_DIPSETTING( 0x00800000, DEF_STR( Off ) ) | |
| 395 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 396 | PORT_DIPNAME( 0x01000000, 0x01000000, "1-18" ) | |
| 397 | PORT_DIPSETTING( 0x01000000, DEF_STR( Off ) ) | |
| 398 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 399 | PORT_DIPNAME( 0x02000000, 0x02000000, "1-19" ) | |
| 400 | PORT_DIPSETTING( 0x02000000, DEF_STR( Off ) ) | |
| 401 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 402 | PORT_DIPNAME( 0x04000000, 0x04000000, "1-1a" ) | |
| 403 | PORT_DIPSETTING( 0x04000000, DEF_STR( Off ) ) | |
| 404 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 405 | PORT_DIPNAME( 0x08000000, 0x08000000, "1-1b" ) | |
| 406 | PORT_DIPSETTING( 0x08000000, DEF_STR( Off ) ) | |
| 407 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 408 | PORT_DIPNAME( 0x10000000, 0x10000000, "1-1c" ) | |
| 409 | PORT_DIPSETTING( 0x10000000, DEF_STR( Off ) ) | |
| 410 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 411 | PORT_DIPNAME( 0x20000000, 0x20000000, "1-1d" ) | |
| 412 | PORT_DIPSETTING( 0x20000000, DEF_STR( Off ) ) | |
| 413 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 414 | PORT_DIPNAME( 0x40000000, 0x40000000, "1-1e" ) | |
| 415 | PORT_DIPSETTING( 0x40000000, DEF_STR( Off ) ) | |
| 416 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 417 | PORT_DIPNAME( 0x80000000, 0x80000000, "1-1f" ) | |
| 418 | PORT_DIPSETTING( 0x80000000, DEF_STR( Off ) ) | |
| 419 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 420 | ||
| 421 | PORT_START | |
| 422 | PORT_DIPNAME( 0x0001, 0x0001, "2-0" ) | |
| 423 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) | |
| 424 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 425 | PORT_DIPNAME( 0x0002, 0x0002, "2-1" ) | |
| 426 | PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) | |
| 427 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 428 | PORT_DIPNAME( 0x0004, 0x0004, "2-2" ) | |
| 429 | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) | |
| 430 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 431 | PORT_DIPNAME( 0x0008, 0x0008, "2-3" ) | |
| 432 | PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) | |
| 433 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 434 | PORT_DIPNAME( 0x0010, 0x0010, "2-4" ) | |
| 435 | PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) | |
| 436 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 437 | ||
| 438 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) | |
| 439 | PORT_DIPNAME( 0x0040, 0x0040, "2-5" ) | |
| 440 | PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) | |
| 441 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 442 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 443 | PORT_DIPNAME( 0x0100, 0x0100, "2-8" ) | |
| 444 | PORT_DIPSETTING( 0x0100, DEF_STR( Off ) ) | |
| 445 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 446 | PORT_DIPNAME( 0x0200, 0x0200, "2-9" ) | |
| 447 | PORT_DIPSETTING( 0x0200, DEF_STR( Off ) ) | |
| 448 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 449 | PORT_DIPNAME( 0x0400, 0x0400, "2-a" ) | |
| 450 | PORT_DIPSETTING( 0x0400, DEF_STR( Off ) ) | |
| 451 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 452 | PORT_DIPNAME( 0x0800, 0x0800, "2-b" ) | |
| 453 | PORT_DIPSETTING( 0x0800, DEF_STR( Off ) ) | |
| 454 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 455 | PORT_DIPNAME( 0x1000, 0x1000, "2-c" ) | |
| 456 | PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) | |
| 457 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 458 | PORT_DIPNAME( 0x2000, 0x2000, "2-d" ) | |
| 459 | PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) | |
| 460 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 461 | PORT_DIPNAME( 0x4000, 0x4000, "2-e" ) | |
| 462 | PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) | |
| 463 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 464 | PORT_DIPNAME( 0x8000, 0x8000, "2-f" ) | |
| 465 | PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) | |
| 466 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 467 | ||
| 468 | ||
| 469 | PORT_DIPNAME( 0x00010000, 0x00010000, "2-10" ) | |
| 470 | PORT_DIPSETTING( 0x00010000, DEF_STR( Off ) ) | |
| 471 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 472 | PORT_DIPNAME( 0x00020000, 0x00020000, "2-11" ) | |
| 473 | PORT_DIPSETTING( 0x00020000, DEF_STR( Off ) ) | |
| 474 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 475 | PORT_DIPNAME( 0x00040000, 0x00040000, "2-12" ) | |
| 476 | PORT_DIPSETTING( 0x00040000, DEF_STR( Off ) ) | |
| 477 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 478 | PORT_DIPNAME( 0x00080000, 0x00080000, "2-13" ) | |
| 479 | PORT_DIPSETTING( 0x00080000, DEF_STR( Off ) ) | |
| 480 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 481 | PORT_DIPNAME( 0x00100000, 0x00100000, "2-14" ) | |
| 482 | PORT_DIPSETTING( 0x00100000, DEF_STR( Off ) ) | |
| 483 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 484 | PORT_DIPNAME( 0x00200000, 0x00200000, "2-15" ) | |
| 485 | PORT_DIPSETTING( 0x00200000, DEF_STR( Off ) ) | |
| 486 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 487 | PORT_DIPNAME( 0x00400000, 0x00400000, "2-16" ) | |
| 488 | PORT_DIPSETTING( 0x00400000, DEF_STR( Off ) ) | |
| 489 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 490 | PORT_DIPNAME( 0x00800000, 0x00800000, "2-17" ) | |
| 491 | PORT_DIPSETTING( 0x00800000, DEF_STR( Off ) ) | |
| 492 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 493 | PORT_DIPNAME( 0x01000000, 0x01000000, "2-18" ) | |
| 494 | PORT_DIPSETTING( 0x01000000, DEF_STR( Off ) ) | |
| 495 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 496 | PORT_DIPNAME( 0x02000000, 0x02000000, "2-19" ) | |
| 497 | PORT_DIPSETTING( 0x02000000, DEF_STR( Off ) ) | |
| 498 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 499 | PORT_DIPNAME( 0x04000000, 0x04000000, "2-1a" ) | |
| 500 | PORT_DIPSETTING( 0x04000000, DEF_STR( Off ) ) | |
| 501 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 502 | PORT_DIPNAME( 0x08000000, 0x08000000, "2-1b" ) | |
| 503 | PORT_DIPSETTING( 0x08000000, DEF_STR( Off ) ) | |
| 504 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 505 | PORT_DIPNAME( 0x10000000, 0x10000000, "2-1c" ) | |
| 506 | PORT_DIPSETTING( 0x10000000, DEF_STR( Off ) ) | |
| 507 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 508 | PORT_DIPNAME( 0x20000000, 0x20000000, "2-1d" ) | |
| 509 | PORT_DIPSETTING( 0x20000000, DEF_STR( Off ) ) | |
| 510 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 511 | PORT_DIPNAME( 0x40000000, 0x40000000, "2-1e" ) | |
| 512 | PORT_DIPSETTING( 0x40000000, DEF_STR( Off ) ) | |
| 513 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 514 | PORT_DIPNAME( 0x80000000, 0x80000000, "2-1f" ) | |
| 515 | PORT_DIPSETTING( 0x80000000, DEF_STR( Off ) ) | |
| 516 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 517 | ||
| 518 | PORT_START | |
| 519 | PORT_DIPNAME( 0x0001, 0x0001, "3-0" ) | |
| 520 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) | |
| 521 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 522 | PORT_DIPNAME( 0x0002, 0x0002, "3-1" ) | |
| 523 | PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) | |
| 524 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 525 | PORT_DIPNAME( 0x0004, 0x0004, "3-2" ) | |
| 526 | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) | |
| 527 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 528 | PORT_DIPNAME( 0x0008, 0x0008, "3-3" ) | |
| 529 | PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) | |
| 530 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 531 | PORT_DIPNAME( 0x0010, 0x0010, "3-4" ) | |
| 532 | PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) | |
| 533 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 534 | PORT_DIPNAME( 0x0020, 0x0020, "3-5" ) | |
| 535 | PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) | |
| 536 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 537 | PORT_DIPNAME( 0x0040, 0x0040, "3-6" ) | |
| 538 | PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) | |
| 539 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 540 | PORT_DIPNAME( 0x0080, 0x0080, "3-7" ) | |
| 541 | PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) | |
| 542 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 543 | PORT_DIPNAME( 0x0100, 0x0100, "3-8" ) | |
| 544 | PORT_DIPSETTING( 0x0100, DEF_STR( Off ) ) | |
| 545 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 546 | PORT_DIPNAME( 0x0200, 0x0200, "3-9" ) | |
| 547 | PORT_DIPSETTING( 0x0200, DEF_STR( Off ) ) | |
| 548 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 549 | PORT_DIPNAME( 0x0400, 0x0400, "3-a" ) | |
| 550 | PORT_DIPSETTING( 0x0400, DEF_STR( Off ) ) | |
| 551 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 552 | PORT_DIPNAME( 0x0800, 0x0800, "3-b" ) | |
| 553 | PORT_DIPSETTING( 0x0800, DEF_STR( Off ) ) | |
| 554 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 555 | PORT_DIPNAME( 0x1000, 0x1000, "3-c" ) | |
| 556 | PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) | |
| 557 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 558 | PORT_DIPNAME( 0x2000, 0x2000, "3-d" ) | |
| 559 | PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) | |
| 560 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 561 | PORT_DIPNAME( 0x4000, 0x4000, "3-e" ) | |
| 562 | PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) | |
| 563 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 564 | PORT_DIPNAME( 0x8000, 0x8000, "3-f" ) | |
| 565 | PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) | |
| 566 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 567 | ||
| 568 | PORT_DIPNAME( 0x00010000, 0x00010000, "3-10" ) | |
| 569 | PORT_DIPSETTING( 0x00010000, DEF_STR( Off ) ) | |
| 570 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) | |
| 571 | PORT_DIPNAME( 0x00020000, 0x00020000, "3-11" ) | |
| 572 | PORT_DIPSETTING( 0x00020000, DEF_STR( Off ) ) | |
| 573 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 574 | PORT_DIPNAME( 0x00040000, 0x00040000, "3-12" ) | |
| 575 | PORT_DIPSETTING( 0x00040000, DEF_STR( Off ) ) | |
| 576 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 577 | PORT_DIPNAME( 0x00080000, 0x00080000, "3-13" ) | |
| 578 | PORT_DIPSETTING( 0x00080000, DEF_STR( Off ) ) | |
| 579 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 580 | PORT_DIPNAME( 0x00100000, 0x00100000, "3-14" ) | |
| 581 | PORT_DIPSETTING( 0x00100000, DEF_STR( Off ) ) | |
| 582 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 583 | PORT_DIPNAME( 0x00200000, 0x00200000, "3-15" ) | |
| 584 | PORT_DIPSETTING( 0x00200000, DEF_STR( Off ) ) | |
| 585 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 586 | PORT_DIPNAME( 0x00400000, 0x00400000, "3-16" ) | |
| 587 | PORT_DIPSETTING( 0x00400000, DEF_STR( Off ) ) | |
| 588 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 589 | PORT_DIPNAME( 0x00800000, 0x00800000, "3-17" ) | |
| 590 | PORT_DIPSETTING( 0x00800000, DEF_STR( Off ) ) | |
| 591 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 592 | PORT_DIPNAME( 0x01000000, 0x01000000, "3-18" ) | |
| 593 | PORT_DIPSETTING( 0x01000000, DEF_STR( Off ) ) | |
| 594 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 595 | PORT_DIPNAME( 0x02000000, 0x02000000, "3-19" ) | |
| 596 | PORT_DIPSETTING( 0x02000000, DEF_STR( Off ) ) | |
| 597 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 598 | PORT_DIPNAME( 0x04000000, 0x04000000, "3-1a" ) | |
| 599 | PORT_DIPSETTING( 0x04000000, DEF_STR( Off ) ) | |
| 600 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 601 | PORT_DIPNAME( 0x08000000, 0x08000000, "3-1b" ) | |
| 602 | PORT_DIPSETTING( 0x08000000, DEF_STR( Off ) ) | |
| 603 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 604 | PORT_DIPNAME( 0x10000000, 0x10000000, "3-1c" ) | |
| 605 | PORT_DIPSETTING( 0x10000000, DEF_STR( Off ) ) | |
| 606 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 607 | PORT_DIPNAME( 0x20000000, 0x20000000, "3-1d" ) | |
| 608 | PORT_DIPSETTING( 0x20000000, DEF_STR( Off ) ) | |
| 609 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 610 | PORT_DIPNAME( 0x40000000, 0x40000000, "3-1e" ) | |
| 611 | PORT_DIPSETTING( 0x40000000, DEF_STR( Off ) ) | |
| 612 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 613 | PORT_DIPNAME( 0x80000000, 0x80000000, "3-1f" ) | |
| 614 | PORT_DIPSETTING( 0x80000000, DEF_STR( Off ) ) | |
| 615 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) | |
| 616 | INPUT_PORTS_END | |
| 617 | ||
| 618 | static struct ST0016interface st0016_interface = | |
| 619 | { | |
| 620 | &st0016_charram | |
| 621 | }; | |
| 622 | ||
| 623 | static MACHINE_DRIVER_START( srmp5 ) | |
| 624 | MDRV_CPU_ADD_TAG("main",Z80,8000000) | |
| 625 | MDRV_CPU_PROGRAM_MAP(st0016_mem,0) | |
| 626 | MDRV_CPU_IO_MAP(st0016_io,0) | |
| 627 | MDRV_CPU_VBLANK_INT(irq0_line_hold,1) | |
| 628 | ||
| 629 | MDRV_CPU_ADD(R3000LE, 40000000) | |
| 630 | MDRV_CPU_CONFIG(config) | |
| 631 | MDRV_CPU_VBLANK_INT(irq4_line_hold,2) | |
| 632 | MDRV_CPU_PROGRAM_MAP(srmp5_mem,0) | |
| 633 | ||
| 634 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 635 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION) | |
| 636 | ||
| 637 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) | |
| 638 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) | |
| 639 | MDRV_SCREEN_SIZE(64*8, 64*8) | |
| 640 | MDRV_SCREEN_VISIBLE_AREA(0*8, 350, 30, 280) | |
| 641 | MDRV_PALETTE_LENGTH(16*16*4+1) | |
| 642 | ||
| 643 | MDRV_VIDEO_START(st0016) | |
| 644 | MDRV_VIDEO_UPDATE(srmp5) | |
| 645 | ||
| 646 | MDRV_SPEAKER_STANDARD_STEREO("left", "right") | |
| 647 | ||
| 648 | MDRV_SOUND_ADD(ST0016, 0) | |
| 649 | MDRV_SOUND_CONFIG(st0016_interface) | |
| 650 | MDRV_SOUND_ROUTE(0, "left", 1.0) | |
| 651 | MDRV_SOUND_ROUTE(1, "right", 1.0) | |
| 652 | MACHINE_DRIVER_END | |
| 653 | ||
| 654 | ROM_START( srmp5 ) | |
| 655 | ROM_REGION( 0x410000, REGION_CPU1, 0 ) | |
| 656 | ROM_LOAD( "sx008-08.bin", 0x010000, 0x200000, CRC(d4ac54f4) SHA1(c3dc76cd71485796a0b6a960294ea96eae8c946e) ) | |
| 657 | ROM_LOAD( "sx008-09.bin", 0x200000, 0x200000, CRC(5a3e6560) SHA1(92ea398f3c5e3035869f0ca5dfe7b05c90095318) ) | |
| 658 | ROM_COPY( REGION_CPU1, 0x10000, 0x00000, 0x08000 ) | |
| 659 | ||
| 660 | ROM_REGION32_BE( 0x200000, REGION_USER1, 0 ) | |
| 661 | ROM_LOAD32_BYTE( "sx008-14.bin", 0x00000, 0x80000, CRC(b5c55120) SHA1(0a41351c9563b2c6a00709189a917757bd6e0a24) ) | |
| 662 | ROM_LOAD32_BYTE( "sx008-13.bin", 0x00001, 0x80000, CRC(0af475e8) SHA1(24cddffa0f8c81832ae8870823d772e3b7493194) ) | |
| 663 | ROM_LOAD32_BYTE( "sx008-12.bin", 0x00002, 0x80000, CRC(43e9bb98) SHA1(e46dd98d2e1babfa12ddf2fa9b31377e8691d3a1) ) | |
| 664 | ROM_LOAD32_BYTE( "sx008-11.bin", 0x00003, 0x80000, CRC(ca15ff45) SHA1(5ee610e0bb835568c36898210a6f8394902d5b54) ) | |
| 665 | ||
| 666 | ROM_REGION( 0x200000*8, REGION_USER2,0) /* gfx ? */ | |
| 667 | ROM_LOAD( "sx008-01.bin", 0x000000, 0x200000, CRC(82dabf48) SHA1(c53e9ed0056c431eab13ab362936c25d3cc5abba) ) | |
| 668 | ROM_LOAD( "sx008-02.bin", 0x200000, 0x200000, CRC(cfd2be0f) SHA1(a21f2928e08047c97443123aceba7ff4e95c6d3d) ) | |
| 669 | ROM_LOAD( "sx008-03.bin", 0x400000, 0x200000, CRC(d7323b10) SHA1(94ecc17b6b8b071cf2c61bbef4aec2c6c7693c62) ) | |
| 670 | ROM_LOAD( "sx008-04.bin", 0x600000, 0x200000, CRC(b10d3067) SHA1(21c36307780d4f38ec54d87cd222d65e4f8c00a5) ) | |
| 671 | ROM_LOAD( "sx008-05.bin", 0x800000, 0x200000, CRC(0ff5e6f5) SHA1(ab7d021757f341d28db6d7d009c20ec9d7bd83c1) ) | |
| 672 | ROM_LOAD( "sx008-06.bin", 0xa00000, 0x200000, CRC(ba6fd7c4) SHA1(f086195c5c647e07e77ce2a23e94d28e6ad9ff4f) ) | |
| 673 | ROM_LOAD( "sx008-07.bin", 0xc00000, 0x200000, CRC(3564485d) SHA1(12464de4e2b6c4df1595183996d1987f0ecffb01) ) | |
| 674 | ROM_END | |
| 675 | ||
| 676 | static DRIVER_INIT(srmp5) | |
| 677 | { | |
| 678 | st0016_game=9; | |
| 679 | tileram=(UINT16*)auto_malloc(0x100000); | |
| 680 | sprram=(UINT16*)auto_malloc(0x080000); | |
| 681 | } | |
| 682 | ||
| 683 | GAME( 1994, srmp5, 0, srmp5, srmp5, srmp5, ROT0, "Seta", "Super Real Mahjong P5", GAME_NOT_WORKING) |
| r1037 | r1038 | |
|---|---|---|
| 1379 | 1379 | GAME( 1995, wrally2, 0, wrally2, wrally2, 0, ROT0, "Gaelco", "World Rally 2: Twin Racing", GAME_UNEMULATED_PROTECTION ) |
| 1380 | 1380 | GAME( 1996, maniacsq, 0, maniacsq, maniacsq, 0, ROT0, "Gaelco", "Maniac Square (unprotected)", 0 ) |
| 1381 | 1381 | GAME( 1996, snowboar, 0, snowboar, snowboar, snowboar, ROT0, "Gaelco", "Snow Board Championship (set 1)", GAME_UNEMULATED_PROTECTION ) |
| 1382 | GAME( 1996, snowbalt, snowboar, snowboar, snowboar, 0, ROT0, "Gaelco", "Snow Board Championship ( | |
| 1382 | GAME( 1996, snowbalt, snowboar, snowboar, snowboar, 0, ROT0, "Gaelco", "Snow Board Championship (Version 2.1)", GAME_UNEMULATED_PROTECTION ) | |
| 1383 | 1383 | GAME( 1998, bang, 0, bang, bang, bang, ROT0, "Gaelco", "Bang!", 0 ) |
| 1384 | 1384 | GAME( 1998, bangj, bang, bang, bang, bang, ROT0, "Gaelco", "Gun Gabacho (Japan)", 0 ) |
| r1037 | r1038 | |
|---|---|---|
| 2 | 2 | Super Real Mahjong P6 (JPN Ver.) |
| 3 | 3 | (c)1996 Seta |
| 4 | 4 | |
| 5 | WIP driver by Sebastien Volpe | |
| 5 | WIP driver by Sebastien Volpe | |
| 6 | 6 | |
| 7 | Emulation Notes: | |
| 8 | The graphics are compressed, using the same 8bpp RLE scheme as CPS3 uses | |
| 9 | for the background on Sean's stage of Street Fighter III. | |
| 10 | ||
| 11 | DMA Operations are not fully understood | |
| 12 | ||
| 13 | ||
| 14 | 7 | according prg ROM (offset $0fff80): |
| 15 | 8 | |
| 16 | 9 | S12 SYSTEM |
| r1037 | r1038 | |
| 20 | 13 | V1.00 |
| 21 | 14 | |
| 22 | 15 | TODO: |
| 16 | - gfx decoding / emulation | |
| 23 | 17 | - sound emulation (appears to be really close to st0016) |
| 24 | - fix DMA operations | |
| 25 | - fix video emulation | |
| 26 | 18 | |
| 27 | 19 | Are there other games on this 'System S12' hardware ??? |
| 28 | 20 | |
| r1037 | r1038 | |
| 62 | 54 | |
| 63 | 55 | |
| 64 | 56 | Dumped 06/15/2000 |
| 65 | ||
| 66 | 57 | */ |
| 67 | 58 | |
| 68 | ||
| 69 | 59 | #include "driver.h" |
| 60 | #include "srmp6.h" | |
| 70 | 61 | |
| 71 | static UINT16* tileram; | |
| 72 | static UINT8* dirty_tileram; | |
| 73 | static UINT16* dmaram; | |
| 74 | 62 | |
| 75 | static UINT16 *sprram; | |
| 76 | ||
| 77 | #define SRMP6_VERBOSE 0 | |
| 78 | ||
| 79 | static const gfx_layout tiles8x8_layout = | |
| 80 | { | |
| 81 | 8,8, | |
| 82 | (0x100000*16)/0x40, | |
| 83 | 8, | |
| 84 | { 0,1,2,3,4,5,6,7 }, | |
| 85 | { 0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8 }, | |
| 86 | { 0*64,1*64,2*64,3*64,4*64,5*64,6*64,7*64 }, | |
| 87 | 8*64 | |
| 88 | }; | |
| 89 | ||
| 90 | ||
| 91 | static VIDEO_START(srmp6) | |
| 92 | { | |
| 93 | /* create the char set (gfx will then be updated dynamically from RAM) */ | |
| 94 | machine->gfx[0] = allocgfx(&tiles8x8_layout); | |
| 95 | machine->gfx[0]->total_colors = machine->drv->total_colors / 256; | |
| 96 | machine->gfx[0]->color_granularity=256; | |
| 97 | ||
| 98 | tileram = auto_malloc(0x100000*16); | |
| 99 | dirty_tileram = auto_malloc((0x100000*16)/0x40); // every 8x8x8 tile is 0x40 bytes | |
| 100 | ||
| 101 | memset(tileram,(0x100000*16),0x00); | |
| 102 | memset(dirty_tileram,(0x100000*16)/0x40,1); | |
| 103 | ||
| 104 | dmaram = auto_malloc(0x100); | |
| 105 | } | |
| 106 | ||
| 107 | /* Debug code */ | |
| 108 | static void srmp6_decode_charram(void) | |
| 109 | { | |
| 110 | if(input_code_pressed_once(KEYCODE_Z)) | |
| 111 | { | |
| 112 | int i; | |
| 113 | for (i=0;i<(0x100000*16)/0x40;i++) | |
| 114 | { | |
| 115 | decodechar(Machine->gfx[0], i, (UINT8*)tileram, &tiles8x8_layout); | |
| 116 | dirty_tileram[i] = 0; | |
| 117 | } | |
| 118 | } | |
| 119 | } | |
| 120 | ||
| 121 | #if 0 | |
| 122 | static int xixi=0; | |
| 123 | #endif | |
| 124 | ||
| 125 | static VIDEO_UPDATE(srmp6) | |
| 126 | { | |
| 127 | int x,y,tileno,height,width,xw,yw,sprite,xb,yb; | |
| 128 | UINT16 *sprite_list=sprram; | |
| 129 | UINT16 mainlist_offset = 0; | |
| 130 | ||
| 131 | union | |
| 132 | { | |
| 133 | INT16 a; | |
| 134 | UINT16 b; | |
| 135 | } temp; | |
| 136 | ||
| 137 | fillbitmap(bitmap,0,&machine->screen[0].visarea); | |
| 138 | ||
| 139 | #if 0 | |
| 140 | /* debug */ | |
| 141 | srmp6_decode_charram(); | |
| 142 | ||
| 143 | ||
| 144 | ||
| 145 | /* debug */ | |
| 146 | if(input_code_pressed_once(KEYCODE_Q)) | |
| 147 | { | |
| 148 | ++xixi; | |
| 149 | printf("%x\n",xixi); | |
| 150 | } | |
| 151 | ||
| 152 | if(input_code_pressed_once(KEYCODE_W)) | |
| 153 | { | |
| 154 | --xixi; | |
| 155 | printf("%x\n",xixi); | |
| 156 | } | |
| 157 | #endif | |
| 158 | ||
| 159 | /* Main spritelist is 0x0000 - 0x1fff in spriteram, sublists follow */ | |
| 160 | while (mainlist_offset<0x2000/2) | |
| 161 | { | |
| 162 | ||
| 163 | UINT16 *sprite_sublist=&sprram[sprite_list[mainlist_offset+1]<<3]; | |
| 164 | UINT16 sublist_length=sprite_list[mainlist_offset+0]&0x7fff; //+1 ? | |
| 165 | INT16 global_x,global_y; | |
| 166 | UINT16 global_pal; | |
| 167 | ||
| 168 | /* end of list marker */ | |
| 169 | if (sprite_list[mainlist_offset+0] == 0x8000) | |
| 170 | return 0; | |
| 171 | ||
| 172 | ||
| 173 | if(sprite_list[mainlist_offset+0]!=0) | |
| 174 | { | |
| 175 | temp.b=sprite_list[mainlist_offset+2]; | |
| 176 | global_x=temp.a; | |
| 177 | temp.b=sprite_list[mainlist_offset+3]; | |
| 178 | global_y=temp.a; | |
| 179 | ||
| 180 | global_pal = sprite_list[mainlist_offset+4] & 0xf; | |
| 181 | ||
| 182 | // printf("%x %x \n",sprite_list[mainlist_offset+1],sublist_length); | |
| 183 | ||
| 184 | while(sublist_length) | |
| 185 | { | |
| 186 | sprite=sprite_sublist[0]&0x3fff; | |
| 187 | temp.b=sprite_sublist[2]; | |
| 188 | x=temp.a; | |
| 189 | temp.b=sprite_sublist[3]; | |
| 190 | y=temp.a; | |
| 191 | x+=global_x; | |
| 192 | y+=global_y; | |
| 193 | ||
| 194 | width=((sprite_sublist[1])&0x3); | |
| 195 | height=((sprite_sublist[1]>>2)&0x3); | |
| 196 | ||
| 197 | height = 1 << height; | |
| 198 | width = 1 << width; | |
| 199 | ||
| 200 | tileno = sprite&0x3fff; | |
| 201 | //tileno += (sprite_list[4]&0xf)*0x4000; // this makes things worse in places (title screen for example) | |
| 202 | ||
| 203 | for(xw=0;xw<width;xw++) | |
| 204 | { | |
| 205 | for(yw=0;yw<height;yw++) | |
| 206 | { | |
| 207 | ||
| 208 | xb=x+xw*8; | |
| 209 | yb=y+yw*8; | |
| 210 | ||
| 211 | if (dirty_tileram[tileno]) | |
| 212 | { | |
| 213 | decodechar(Machine->gfx[0], tileno, (UINT8*)tileram, &tiles8x8_layout); | |
| 214 | dirty_tileram[tileno] = 0; | |
| 215 | } | |
| 216 | ||
| 217 | drawgfx(bitmap,machine->gfx[0],tileno,global_pal,0,0,xb,yb,cliprect,TRANSPARENCY_PEN,0); | |
| 218 | tileno++; | |
| 219 | } | |
| 220 | } | |
| 221 | ||
| 222 | sprite_sublist+=8; | |
| 223 | --sublist_length; | |
| 224 | } | |
| 225 | } | |
| 226 | mainlist_offset+=8; | |
| 227 | } | |
| 228 | ||
| 229 | return 0; | |
| 230 | } | |
| 231 | ||
| 232 | 63 | /*************************************************************************** |
| 233 | | |
| 64 | sndhrdw - VERY preliminary | |
| 234 | 65 | |
| 235 | 66 | TODO: watch similarities with st0016 |
| 236 | 67 | ***************************************************************************/ |
| r1037 | r1038 | |
| 270 | 101 | |
| 271 | 102 | */ |
| 272 | 103 | |
| 273 | /*************************************************************************** | |
| 274 | Main CPU memory handlers | |
| 275 | ***************************************************************************/ | |
| 104 | UINT16 *sound_regs; | |
| 276 | 105 | |
| 277 | static UINT16 srmp6_input_select = 0; | |
| 278 | ||
| 279 | static WRITE16_HANDLER( srmp6_input_select_w ) | |
| 106 | READ16_HANDLER( sound_regs_r ) | |
| 280 | 107 | { |
| 281 | srmp6_input_select = data & 0x0f; | |
| 282 | } | |
| 283 | ||
| 284 | static READ16_HANDLER( srmp6_inputs_r ) | |
| 285 | { | |
| 286 | if (offset == 0) // DSW | |
| 287 | return readinputport(4); | |
| 288 | ||
| 289 | switch(srmp6_input_select) // inputs | |
| 290 | { | |
| 291 | case 1<<0: return readinputport(0); | |
| 292 | case 1<<1: return readinputport(1); | |
| 293 | case 1<<2: return readinputport(2); | |
| 294 | case 1<<3: return readinputport(3); | |
| 295 | } | |
| 296 | ||
| 297 | 108 | return 0; |
| 298 | 109 | } |
| 299 | 110 | |
| 300 | ||
| 301 | static UINT16 *video_regs; | |
| 302 | ||
| 303 | static WRITE16_HANDLER( video_regs_w ) | |
| 111 | WRITE16_HANDLER( sound_regs_w ) | |
| 304 | 112 | { |
| 305 | switch(offset) | |
| 306 | { | |
| 113 | COMBINE_DATA(&sound_regs[offset]); | |
| 307 | 114 | |
| 308 | case 0x5e/2: // bank switch, used by ROM check | |
| 309 | #if SRMP6_VERBOSE | |
| 310 | printf("%x\n",data); | |
| 311 | #endif | |
| 312 | ||
| 313 | memory_set_bankptr(1,(UINT16 *)(memory_region(REGION_USER2) + (data & 0x0f)*0x200000)); | |
| 115 | switch(offset & 0x0f) | |
| 116 | { | |
| 117 | case 0x02: // Start Address LSW | |
| 314 | 118 | break; |
| 315 | ||
| 316 | ||
| 317 | /* unknown registers - there are others */ | |
| 318 | ||
| 319 | // set by IT4 (jsr $b3c), according flip screen dsw | |
| 320 | case 0x48/2: // 0 / 0xb0 if flipscreen | |
| 321 | case 0x52/2: // 0 / 0x2ef if flipscreen | |
| 322 | case 0x54/2: // 0x152 / 0x15e if flipscreen | |
| 323 | ||
| 324 | // set by IT4 ($82e-$846) | |
| 325 | case 0x56/2: // written 8,9,8,9 successively | |
| 326 | ||
| 327 | // set by IT4 | |
| 328 | case 0x5c/2: // either 0x40 explicitely in many places, or according $2083b0 (IT4) | |
| 329 | ||
| 119 | case 0x03: // Start Address MSW | |
| 120 | // fprintf(stdout, "Ch %d Start Address %08X\n", offset>>4, (sound_regs[offset]<<16)|sound_regs[offset-1]); | |
| 121 | break; | |
| 122 | case 0x0c: // End Address LSW | |
| 123 | break; | |
| 124 | case 0x0d: // End Address MSW | |
| 125 | // fprintf(stdout, "Ch %d End Address %08X\n", offset>>4, (sound_regs[offset]<<16)|sound_regs[offset-1]); | |
| 126 | break; | |
| 127 | case 0x05: // Status Register | |
| 128 | break; | |
| 129 | case 0x06: // frequency Register? | |
| 130 | break; | |
| 131 | case 0x0e: // Left Volume | |
| 132 | // fprintf(stdout, "Ch.%d Left Volume %04X\n", offset>>4, data); | |
| 133 | break; | |
| 134 | case 0x0f: // Right Volume | |
| 135 | // fprintf(stdout, "Ch.%d Right Volume %04X\n", offset>>4, data); | |
| 136 | break; | |
| 330 | 137 | default: |
| 331 | ||
| 138 | // fprintf(stdout, "Sound Re | |
| 332 | 139 | break; |
| 333 | 140 | } |
| 334 | COMBINE_DATA(&video_regs[offset]); | |
| 335 | 141 | } |
| 336 | 142 | |
| 337 | ||
| 143 | ||
| 338 | 144 | { |
| 339 | logerror("video_regs_r (PC=%06X): %04x\n", activecpu_get_previouspc(), offset*2); | |
| 340 | return video_regs[offset]; | |
| 145 | return 0; | |
| 341 | 146 | } |
| 342 | 147 | |
| 343 | ||
| 344 | /* DMA RLE stuff - the same as CPS3 */ | |
| 345 | static unsigned short lastb; | |
| 346 | static unsigned short lastb2; | |
| 347 | static int destl; | |
| 348 | ||
| 349 | static UINT32 process(UINT8 b,UINT32 dst_offset) | |
| 148 | WRITE16_HANDLER( sndctrl_reg_w ) | |
| 350 | 149 | { |
| 150 | /* | |
| 151 | int i; | |
| 152 | for(i=0;i<8;i++) | |
| 153 | if(data & (1 << i)) | |
| 154 | fprintf(stdout, "Ch.%d Sound Start\n", i); | |
| 155 | */ | |
| 156 | } | |
| 351 | 157 | |
| 352 | int l=0; | |
| 158 | /*************************************************************************** | |
| 159 | Main CPU memory handlers | |
| 160 | ***************************************************************************/ | |
| 353 | 161 | |
| 354 | | |
| 162 | static | |
| 355 | 163 | |
| 356 | if(lastb==lastb2) //rle | |
| 357 | { | |
| 358 | int i; | |
| 359 | int rle=(b+1)&0xff; | |
| 360 | ||
| 361 | for(i=0;i<rle;++i) | |
| 362 | { | |
| 363 | tram[dst_offset+destl] = lastb; | |
| 364 | dirty_tileram[(dst_offset+destl)/0x40] = 1; | |
| 365 | ||
| 366 | dst_offset++; | |
| 367 | ++l; | |
| 368 | } | |
| 369 | lastb2=0xffff; | |
| 370 | ||
| 371 | return l; | |
| 372 | } | |
| 373 | else | |
| 374 | { | |
| 375 | lastb2=lastb; | |
| 376 | lastb=b; | |
| 377 | tram[dst_offset+destl] = b; | |
| 378 | dirty_tileram[(dst_offset+destl)/0x40] = 1; | |
| 379 | ||
| 380 | return 1; | |
| 381 | } | |
| 382 | } | |
| 383 | ||
| 384 | ||
| 385 | static WRITE16_HANDLER(srmp6_dma_w) | |
| 164 | WRITE16_HANDLER( srmp6_input_select_w ) | |
| 386 | 165 | { |
| 387 | COMBINE_DATA(&dmaram[offset]); | |
| 388 | if(offset==13 && dmaram[offset]==0x40) | |
| 389 | { | |
| 390 | UINT32 srctab=2*((((UINT32)dmaram[5])<<16)|dmaram[4]); | |
| 391 | UINT32 srcdata=2*((((UINT32)dmaram[11])<<16)|dmaram[10]); | |
| 392 | UINT32 len=(((((UINT32)dmaram[7])<<16)|dmaram[6])+1); //??? WRONG! | |
| 393 | int tempidx=0; | |
| 394 | ||
| 395 | /* show params */ | |
| 396 | #if SRMP6_VERBOSE | |
| 397 | printf("DMA! %04x %04x %04x %04x %04x %04x %04x %04x %04x %04x %04x %04x %04x %04x\n", | |
| 398 | dmaram[0x00/2], | |
| 399 | dmaram[0x02/2], | |
| 400 | dmaram[0x04/2], | |
| 401 | dmaram[0x06/2], | |
| 402 | dmaram[0x08/2], | |
| 403 | dmaram[0x0a/2], | |
| 404 | dmaram[0x0c/2], | |
| 405 | dmaram[0x0e/2], | |
| 406 | dmaram[0x10/2], | |
| 407 | dmaram[0x12/2], | |
| 408 | dmaram[0x14/2], | |
| 409 | dmaram[0x16/2], | |
| 410 | dmaram[0x18/2], | |
| 411 | dmaram[0x1a/2]); | |
| 412 | #endif | |
| 413 | ||
| 414 | destl=dmaram[9]*0x100000; | |
| 415 | ||
| 416 | lastb=0xfffe; | |
| 417 | lastb2=0xffff; | |
| 418 | ||
| 419 | while(1) | |
| 420 | { | |
| 421 | int i; | |
| 422 | UINT8 ctrl=memory_region(REGION_USER2)[srcdata]; | |
| 423 | ++srcdata; | |
| 424 | ||
| 425 | for(i=0;i<8;++i) | |
| 426 | { | |
| 427 | UINT8 p=memory_region(REGION_USER2)[srcdata]; | |
| 428 | ||
| 429 | if(ctrl&0x80) | |
| 430 | { | |
| 431 | UINT8 real_byte; | |
| 432 | p&=0x7f; | |
| 433 | real_byte = memory_region(REGION_USER2)[srctab+p*2]; | |
| 434 | tempidx+=process(real_byte,tempidx); | |
| 435 | real_byte = memory_region(REGION_USER2)[srctab+p*2+1];//px[DMA_XOR((current_table_address+p*2+1))]; | |
| 436 | tempidx+=process(real_byte,tempidx); | |
| 437 | } | |
| 438 | else | |
| 439 | { | |
| 440 | tempidx+=process(p,tempidx); | |
| 441 | } | |
| 442 | ||
| 443 | ctrl<<=1; | |
| 444 | ++srcdata; | |
| 445 | ||
| 446 | ||
| 447 | if(tempidx>=len) | |
| 448 | { | |
| 449 | #if SRMP6_VERBOSE | |
| 450 | printf("%x\n",srcdata); | |
| 451 | #endif | |
| 452 | return; | |
| 453 | } | |
| 454 | } | |
| 455 | } | |
| 456 | } | |
| 166 | srmp6_input_select = data & 0x0f; | |
| 457 | 167 | } |
| 458 | 168 | |
| 459 | /* if tileram is actually bigger than the mapped area, how do we access the rest? */ | |
| 460 | static READ16_HANDLER(tileram_r) | |
| 169 | READ16_HANDLER( srmp6_inputs_r ) | |
| 461 | 170 | { |
| 462 | // return tileram[offset]; | |
| 463 | return 0x0000; | |
| 464 | } | |
| 171 | if (offset == 0) // DSW | |
| 172 | return readinputport(4); | |
| 465 | 173 | |
| 466 | static WRITE16_HANDLER(tileram_w) | |
| 467 | { | |
| 468 | //UINT16 tmp; | |
| 469 | // COMBINE_DATA(&tileram[offset]); | |
| 470 | ||
| 471 | /* are the DMA registers enabled some other way, or always mapped here, over RAM? */ | |
| 472 | if (offset >= 0xfff00/2 && offset <= 0xfff1a/2 ) | |
| 174 | switch(srmp6_input_select) // inputs | |
| 473 | 175 | { |
| 474 | offset &=0x1f; | |
| 475 | srmp6_dma_w(offset,data,mem_mask); | |
| 176 | case 1<<0: return readinputport(0); | |
| 177 | case 1<<1: return readinputport(1); | |
| 178 | case 1<<2: return readinputport(2); | |
| 179 | case 1<<3: return readinputport(3); | |
| 476 | 180 | } |
| 181 | ||
| 182 | return 0; | |
| 477 | 183 | } |
| 184 | ||
| 478 | 185 | static ADDRESS_MAP_START( srmp6, ADDRESS_SPACE_PROGRAM, 16 ) |
| 479 | 186 | AM_RANGE(0x000000, 0x0fffff) AM_ROM |
| 480 | 187 | AM_RANGE(0x200000, 0x23ffff) AM_RAM // work RAM |
| r1037 | r1038 | |
| 482 | 189 | AM_RANGE(0x800000, 0x9fffff) AM_ROM AM_REGION(REGION_USER1, 0) |
| 483 | 190 | |
| 484 | 191 | AM_RANGE(0x300000, 0x300005) AM_READWRITE(srmp6_inputs_r, srmp6_input_select_w) // inputs |
| 485 | AM_RANGE(0x480000, 0x480fff) AM_READWRITE(MRA16_RAM, paletteram16_x | |
| 192 | AM_RANGE(0x480000, 0x480fff) AM_READWRITE(MRA16_RAM, paletteram16_x | |
| 486 | 193 | AM_RANGE(0x4d0000, 0x4d0001) AM_READWRITE(watchdog_reset16_r, watchdog_reset16_w) // watchdog |
| 487 | 194 | |
| 488 | 195 | // OBJ RAM: checked [$400000-$47dfff] |
| 489 | AM_RANGE(0x400000, 0x47ffff) AM_RAM AM_BASE(&sprram) | |
| 196 | AM_RANGE(0x400000, 0x47dfff) AM_RAM AM_BASE(&sprite_ram) // 512 sprites & character list | |
| 197 | // AM_RANGE(0x402000, 0x40200f) AM_RAM // set by routine $11c48 | |
| 198 | // AM_RANGE(0x402010, 0x40806f) AM_RAM // set by routine $11bf6 - 2nd sprite RAM maybe ? | |
| 199 | // AM_RANGE(0x412000, 0x416ebf) AM_RAM // probably larger | |
| 490 | 200 | |
| 491 | 201 | // CHR RAM: checked [$500000-$5fffff] |
| 492 | AM_RANGE(0x500000, 0x5fffff) AM_READWRITE(tileram_r,tileram_w)//AM_RAM AM_BASE(&tileram) | |
| 493 | // AM_RANGE(0x5fff00, 0x5fffff) AM_WRITE(dma_w) AM_BASE(&dmaram) | |
| 494 | 202 | |
| 203 | AM_RANGE(0x5fff00, 0x5fff1f) AM_WRITE(gfx_decode_w) AM_BASE(&dec_regs)// ? see routine $5ca8, video_regs related ??? | |
| 204 | AM_RANGE(0x500000, 0x5fffff) AM_RAM | |
| 205 | // AM_RANGE(0x500000, 0x505cff) AM_RAM | |
| 206 | // AM_RANGE(0x505d00, 0x5fffff) AM_RAM | |
| 207 | ||
| 495 | 208 | AM_RANGE(0x4c0000, 0x4c006f) AM_READWRITE(video_regs_r, video_regs_w) AM_BASE(&video_regs) // ? gfx regs ST-0026 NiLe |
| 496 | // AM_RANGE(0x4e0000, 0x4e00ff) AM_READWRITE(sound_regs_r, sound_regs_w) AM_BASE(&sound_regs) // ? sound regs (data) ST-0026 NiLe | |
| 497 | // AM_RANGE(0x4e0100, 0x4e0101) AM_READWRITE(sndctrl_reg_r, sndctrl_reg_w) // ? sound reg (ctrl) ST-0026 NiLe | |
| 209 | AM_RANGE(0x4e0000, 0x4e00ff) AM_READWRITE(sound_regs_r, sound_regs_w) AM_BASE(&sound_regs) // ? sound regs (data) ST-0026 NiLe | |
| 210 | AM_RANGE(0x4e0100, 0x4e0101) AM_READWRITE(sndctrl_reg_r, sndctrl_reg_w) // ? sound reg (ctrl) ST-0026 NiLe | |
| 498 | 211 | // AM_RANGE(0x4e0110, 0x4e0111) AM_NOP // ? accessed once ($268dc, written $b.w) |
| 499 | // AM_RANGE(0x5fff00, 0x5fff1f) AM_RAM // ? see routine $5ca8, video_regs related ??? | |
| 500 | 212 | |
| 213 | ||
| 501 | 214 | // AM_RANGE(0xf00004, 0xf00005) AM_RAM // ? |
| 502 | 215 | // AM_RANGE(0xf00006, 0xf00007) AM_RAM // ? |
| 503 | ||
| 216 | AM_RANGE(0xfffffe, 0xffffff) AM_NOP | |
| 504 | 217 | ADDRESS_MAP_END |
| 505 | 218 | |
| 506 | 219 | |
| r1037 | r1038 | |
| 594 | 307 | PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) |
| 595 | 308 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 596 | 309 | PORT_SERVICE( 0x8000, IP_ACTIVE_LOW ) |
| 310 | ||
| 597 | 311 | INPUT_PORTS_END |
| 598 | 312 | |
| 599 | 313 | /*************************************************************************** |
| 600 | 314 | Machine driver |
| 601 | 315 | ***************************************************************************/ |
| 602 | 316 | |
| 603 | INTERRUPT_GEN(srmp6_interrupt) | |
| 604 | { | |
| 605 | if(!cpu_getiloops()) | |
| 606 | { | |
| 607 | cpunum_set_input_line(0,3,HOLD_LINE); | |
| 608 | } | |
| 609 | else | |
| 610 | { | |
| 611 | cpunum_set_input_line(0,4,HOLD_LINE); | |
| 612 | } | |
| 613 | } | |
| 614 | ||
| 615 | 317 | static MACHINE_DRIVER_START( srmp6 ) |
| 616 | 318 | MDRV_CPU_ADD(M68000, 16000000) |
| 617 | 319 | MDRV_CPU_PROGRAM_MAP(srmp6,0) |
| 618 | MDRV_CPU_VBLANK_INT( | |
| 320 | MDRV_CPU_VBLANK_INT(irq4 | |
| 619 | 321 | |
| 620 | 322 | MDRV_SCREEN_REFRESH_RATE(60) |
| 621 | 323 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION) |
| 622 | 324 | |
| 623 | 325 | MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) |
| 624 | 326 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| 625 | MDRV_SCREEN_SIZE(64*8, 64*8) | |
| 626 | MDRV_SCREEN_VISIBLE_AREA(0*8, 340, 2*8, 256) | |
| 327 | MDRV_SCREEN_SIZE(0x150,0xf0) | |
| 328 | MDRV_SCREEN_VISIBLE_AREA(0*8, 42*8-1, 0*8, 30*8-1) | |
| 627 | 329 | MDRV_PALETTE_LENGTH(0x800) |
| 628 | 330 | |
| 629 | 331 | MDRV_VIDEO_START(srmp6) |
| r1037 | r1038 | |
| 658 | 360 | ROM_REGION( 0x200000, REGION_USER1, 0 ) /* 68000 Data */ |
| 659 | 361 | ROM_LOAD( "sx011-09.10", 0x000000, 0x200000, CRC(58f74438) SHA1(a256e39ca0406e513ab4dbd812fb0b559b4f61f2) ) |
| 660 | 362 | |
| 661 | /* these are accessed directly by the 68k, DMA device etc. NOT decoded */ | |
| 363 | ROM_REGION( 0xc00000, REGION_SOUND1, 0) /* Samples */ | |
| 364 | ROM_LOAD( "sx011-08.15", 0x0000000, 0x400000, CRC(01b3b1f0) SHA1(bbd60509c9ba78358edbcbb5953eafafd6e2eaf5) ) // CHR00 | |
| 365 | ROM_LOAD( "sx011-07.16", 0x0400000, 0x400000, CRC(26e57dac) SHA1(91272268977c5fbff7e8fbe1147bf108bd2ed321) ) // CHR01 | |
| 366 | ROM_LOAD( "sx011-06.17", 0x0800000, 0x400000, CRC(220ee32c) SHA1(77f39b54891c2381b967534b0f6d380962eadcae) ) // CHR02 | |
| 367 | ||
| 368 | /* CHRxx loaded here undecoded for ROM Check */ | |
| 662 | 369 | ROM_REGION( 0x2000000, REGION_USER2, 0) /* Banked ROM */ |
| 663 | ROM_LOAD16_WORD_SWAP( "sx011-08.15", 0x0000000, 0x0400000, CRC(01b3b1f0) SHA1(bbd60509c9ba78358edbcbb5953eafafd6e2eaf5) ) // CHR00 | |
| 664 | ROM_LOAD16_WORD_SWAP( "sx011-07.16", 0x0400000, 0x0400000, CRC(26e57dac) SHA1(91272268977c5fbff7e8fbe1147bf108bd2ed321) ) // CHR01 | |
| 665 | ROM_LOAD16_WORD_SWAP( "sx011-06.17", 0x0800000, 0x0400000, CRC(220ee32c) SHA1(77f39b54891c2381b967534b0f6d380962eadcae) ) // CHR02 | |
| 666 | ROM_LOAD16_WORD_SWAP( "sx011-05.18", 0x0c00000, 0x0400000, CRC(87e5fea9) SHA1(abd751b5744d6ac7e697774ea9a7f7455bf3ac7c) ) // CHR03 | |
| 667 | ROM_LOAD16_WORD_SWAP( "sx011-04.19", 0x1000000, 0x0400000, CRC(e90d331e) SHA1(d8afb1497cec8fe6de10d23d49427e11c4c57910) ) // CHR04 | |
| 668 | ROM_LOAD16_WORD_SWAP( "sx011-03.20", 0x1400000, 0x0400000, CRC(f1f24b35) SHA1(70d6848f77940331e1be8591a33d62ac22a3aee9) ) // CHR05 | |
| 669 | ROM_LOAD16_WORD_SWAP( "sx011-02.21", 0x1800000, 0x0400000, CRC(c56d7e50) SHA1(355c64b38e7b266f386b9c0b906c8581fc15374b) ) // CHR06 | |
| 670 | ROM_LOAD16_WORD_SWAP( "sx011-01.22", 0x1c00000, 0x0400000, CRC(785409d1) SHA1(3e31254452a30d929161a1ea3a3daa69de058364) ) // CHR07 | |
| 370 | ROM_LOAD( "sx011-08.15", 0x0000000, 0x400000, CRC(01b3b1f0) SHA1(bbd60509c9ba78358edbcbb5953eafafd6e2eaf5) ) // CHR00 | |
| 371 | ROM_LOAD( "sx011-07.16", 0x0400000, 0x400000, CRC(26e57dac) SHA1(91272268977c5fbff7e8fbe1147bf108bd2ed321) ) // CHR01 | |
| 372 | ROM_LOAD( "sx011-06.17", 0x0800000, 0x400000, CRC(220ee32c) SHA1(77f39b54891c2381b967534b0f6d380962eadcae) ) // CHR02 | |
| 373 | ROM_LOAD( "sx011-05.18", 0x0c00000, 0x400000, CRC(87e5fea9) SHA1(abd751b5744d6ac7e697774ea9a7f7455bf3ac7c) ) // CHR03 | |
| 374 | ROM_LOAD( "sx011-04.19", 0x1000000, 0x400000, CRC(e90d331e) SHA1(d8afb1497cec8fe6de10d23d49427e11c4c57910) ) // CHR04 | |
| 375 | ROM_LOAD( "sx011-03.20", 0x1400000, 0x400000, CRC(f1f24b35) SHA1(70d6848f77940331e1be8591a33d62ac22a3aee9) ) // CHR05 | |
| 376 | ROM_LOAD( "sx011-02.21", 0x1800000, 0x400000, CRC(c56d7e50) SHA1(355c64b38e7b266f386b9c0b906c8581fc15374b) ) // CHR06 | |
| 377 | ROM_LOAD( "sx011-01.22", 0x1c00000, 0x400000, CRC(785409d1) SHA1(3e31254452a30d929161a1ea3a3daa69de058364) ) // CHR07 | |
| 378 | ||
| 379 | ||
| 380 | ROM_REGION( 0x1400000, REGION_USER3, 0) | |
| 381 | ROM_LOAD16_WORD_SWAP( "sx011-05.18", 0x0000000, 0x400000, CRC(87e5fea9) SHA1(abd751b5744d6ac7e697774ea9a7f7455bf3ac7c) ) // CHR03 | |
| 382 | ROM_LOAD16_WORD_SWAP( "sx011-04.19", 0x0400000, 0x400000, CRC(e90d331e) SHA1(d8afb1497cec8fe6de10d23d49427e11c4c57910) ) // CHR04 | |
| 383 | ROM_LOAD16_WORD_SWAP( "sx011-03.20", 0x0800000, 0x400000, CRC(f1f24b35) SHA1(70d6848f77940331e1be8591a33d62ac22a3aee9) ) // CHR05 | |
| 384 | ROM_LOAD16_WORD_SWAP( "sx011-02.21", 0x0c00000, 0x400000, CRC(c56d7e50) SHA1(355c64b38e7b266f386b9c0b906c8581fc15374b) ) // CHR06 | |
| 385 | ROM_LOAD16_WORD_SWAP( "sx011-01.22", 0x1000000, 0x400000, CRC(785409d1) SHA1(3e31254452a30d929161a1ea3a3daa69de058364) ) // CHR07 | |
| 386 | ||
| 671 | 387 | ROM_END |
| 672 | 388 | |
| 673 | 389 | |
| r1037 | r1038 | |
| 685 | 401 | ***************************************************************************/ |
| 686 | 402 | |
| 687 | 403 | /*GAME( YEAR,NAME,PARENT,MACHINE,INPUT,INIT,MONITOR,COMPANY,FULLNAME,FLAGS)*/ |
| 688 | GAME( 1995, srmp6, 0, srmp6, srmp6, srmp6, ROT0, "Seta", "Super Real Mahjong P6 (Japan)", | |
| 404 | GAME( 1995, srmp6, 0, srmp6, srmp6, srmp6, ROT0, "Seta", "Super Real Mahjong P6 (Japan)", | |
| 689 | 405 |
| r1037 | r1038 | |
|---|---|---|
| 181 | 181 | //return 0; |
| 182 | 182 | } |
| 183 | 183 | |
| 184 | #ifdef UNUSED_FUNCTION | |
| 184 | 185 | static READ64_HANDLER(unk2_r) |
| 185 | 186 | { |
| 186 | 187 | if (!(mem_mask & U64(0xffffffff00000000))) |
| r1037 | r1038 | |
| 189 | 190 | } |
| 190 | 191 | return 0; |
| 191 | 192 | } |
| 193 | #endif | |
| 192 | 194 | |
| 193 | 195 | static UINT64 unk3 = -1; |
| 194 | 196 | static READ64_HANDLER(unk3_r) |
| r1037 | r1038 | |
|---|---|---|
| 10 | 10 | Very little is known about the actual PC at this time, and the driver is |
| 11 | 11 | just a skeleton placeholder for the CHD dump of the hard disk. |
| 12 | 12 | |
| 13 | The donor PC looks like a standard Windows98 setup. | |
| 14 | The only exceptions I see are that there's a game logo.sys/logo.bmp in the | |
| 15 | root directory to hide the Windows98 startup screen, and a shortcut to | |
| 16 | the game in the startup programs. | |
| 17 | Also of interest, Windows98 was installed from a setup folder on the HD. | |
| 18 | To me this hints that there may have been some expectation of the disk | |
| 19 | being plugged into random hardware. | |
| 20 | ||
| 21 | The game is pretty much standard PC game running on Windows98 PC. | |
| 22 | It uses DirectSound and the Microsoft MCI interfaces and Glide for video. | |
| 23 | The PC that the game was dumped from has Sound Blaster and Ensoniq drivers, | |
| 24 | but it works fine with some other sound configurations. | |
| 25 | The donor PC has a 3dfxvoodoo3 driver installation directory, but it works | |
| 26 | fine with a Voodoo4 4500. | |
| 27 | ||
| 28 | The game itself has some protection, it expects a file C:\\WINDOWS\win386p.swp of 84 bytes | |
| 29 | to have the hard disk volume serial number in ascii number (not hex) format at offset 4. | |
| 30 | ||
| 31 | The game appears to use parallel port (0x378,0x379)for I/O. | |
| 32 | The direct port access means it won't run on XP | |
| 33 | For the controls, it writes a device select to 0x378, and reads the device value from 0x379. | |
| 34 | There is some other output, maybe lights? | |
| 35 | -------------------------------------------- | |
| 36 | |SELECT|RETURN | | |
| 37 | |--------------------------------------------| | |
| 38 | | 0x8 | self test/protection, return 5 | | |
| 39 | | 0x0 | P1 4 way joystick | | |
| 40 | | | ----x--- right | | |
| 41 | | | -----x-- left | | |
| 42 | | | ------x- down | | |
| 43 | | | -------x up | | |
| 44 | | 0x1 | P1 buttons | | |
| 45 | | | -----x-- C+D (is also start button) | | |
| 46 | | | ------x- B | | |
| 47 | | | -------x A | | |
| 48 | | 0x2 | P2 joystick (as P1) | | |
| 49 | | 0x3 | P2 buttons (as P1) | | |
| 50 | | 0x4 | Coin/Service | | |
| 51 | | | -----x-- Coin | | |
| 52 | | | ------x- Coin | | |
| 53 | | | -------x Test | | |
| 54 | -------------------------------------------- | |
| 55 | ||
| 56 | Easy enough to fix a broken game if you have the controls to plug into it. | |
| 13 | 57 | */ |
| 14 | 58 | |
| 15 | 59 | #include "driver.h" |
| r1037 | r1038 | |
|---|---|---|
| 361 | 361 | return 0x0000; |
| 362 | 362 | } |
| 363 | 363 | |
| 364 | WRITE16_HANDLER ( | |
| 364 | WRITE16_HANDLER ( | |
| 365 | 365 | { |
| 366 | 366 | offset *= 2; |
| 367 | 367 | offset &= 0x7fff; |
| 368 | 368 | |
| 369 | 369 | /* Shared Ram */ |
| 370 | if ((offset >= 0x0000) && (offset <= 0x | |
| 370 | if ((offset >= 0x0000) && (offset <= 0x3fff)) | |
| 371 | 371 | { |
| 372 | 372 | offset &=0x1fff; |
| 373 | 373 | |
| r1037 | r1038 | |
| 375 | 375 | if (ACCESSING_MSB) genesis_z80_ram[offset] = (data >> 8) & 0xff; |
| 376 | 376 | } |
| 377 | 377 | |
| 378 | if ((offset >= 0x2000) && (offset <= 0x3fff)) | |
| 379 | { | |
| 380 | offset &=0x1fff; | |
| 381 | 378 | |
| 382 | if (ACCESSING_LSB) ic36_ram[offset+1] = data & 0xff; | |
| 383 | if (ACCESSING_MSB) ic36_ram[offset] = (data >> 8) & 0xff; | |
| 384 | } | |
| 385 | ||
| 386 | ||
| 387 | 379 | /* YM2610 */ |
| 388 | 380 | if ((offset >= 0x4000) && (offset <= 0x5fff)) |
| 389 | 381 | { |
| r1037 | r1038 | |
| 642 | 634 | AM_RANGE(0x000000, 0x3fffff) AM_WRITE(MWA16_ROM) /* Cartridge Program Rom */ |
| 643 | 635 | AM_RANGE(0xa10000, 0xa1001f) AM_WRITE(genesis_io_w) AM_BASE(&genesis_io_ram) /* Genesis Input */ |
| 644 | 636 | AM_RANGE(0xa11000, 0xa11203) AM_WRITE(genesis_ctrl_w) |
| 645 | AM_RANGE(0xa00000, 0xa0ffff) AM_WRITE( | |
| 637 | AM_RANGE(0xa00000, 0xa0ffff) AM_WRITE( | |
| 646 | 638 | AM_RANGE(0xc00000, 0xc0001f) AM_WRITE(genesis_vdp_w) /* VDP Access */ |
| 647 | 639 | AM_RANGE(0xfe0000, 0xfeffff) AM_WRITE(MWA16_BANK3) /* Main Ram */ |
| 648 | 640 | AM_RANGE(0xff0000, 0xffffff) AM_WRITE(MWA16_RAM) AM_BASE(&genesis_68k_ram)/* Main Ram */ |
| r1037 | r1038 | |
|---|---|---|
| 146 | 146 | tilemap_mark_all_tiles_dirty(bg_tilemap); |
| 147 | 147 | } |
| 148 | 148 | |
| 149 | #ifdef UNUSED_FUNCTION | |
| 149 | 150 | //WRONG! |
| 150 | 151 | static WRITE8_HANDLER( trvmadns_palette_w ) |
| 151 | 152 | { |
| r1037 | r1038 | |
| 159 | 160 | |
| 160 | 161 | palette_set_color_rgb(Machine, offset >> 1, pal4bit(r), pal4bit(g), pal4bit(b)); |
| 161 | 162 | } |
| 163 | #endif | |
| 162 | 164 | |
| 163 | 165 | static WRITE8_HANDLER( w2 ) |
| 164 | 166 | { |
| r1037 | r1038 | |
|---|---|---|
| 240 | 240 | return (EEPROM_read_bit()<<24) | readinputport(1) | (readinputport(1)<<16); |
| 241 | 241 | } |
| 242 | 242 | |
| 243 | #ifdef UNUSED_FUNCTION | |
| 243 | 244 | static READ32_HANDLER(backfire_control3_r) |
| 244 | 245 | { |
| 245 | 246 | // logerror("%08x:Read eprom %08x (%08x)\n",activecpu_get_pc(),offset<<1,mem_mask); |
| 246 | 247 | return (EEPROM_read_bit()<<24) | readinputport(2) | (readinputport(2)<<16); |
| 247 | 248 | } |
| 249 | #endif | |
| 248 | 250 | |
| 249 | 251 | |
| 250 | 252 | static WRITE32_HANDLER(backfire_eeprom_w) |
| r1037 | r1038 | |
|---|---|---|
| 1 | 1 | /**************************************************************************** |
| 2 | 2 | |
| 3 | Royal Mahjong (c) 198 | |
| 3 | Royal Mahjong (c) 1981 Ni | |
| 4 | 4 | and many other Dyna/Dynax games running in similar bare-bones hardware |
| 5 | 5 | |
| 6 | 6 | driver by Zsolt Vasvari and Nicola Salmoria |
| r1037 | r1038 | |
| 13 | 13 | OSC: 18.432MHz and 8MHz |
| 14 | 14 | |
| 15 | 15 | ---------------------------------------------------------------------------------------------------------- |
| 16 | Year + Game Board CPU Company Notes | |
| 16 | Year + Game Board CPU Company Notes | |
| 17 | 17 | ---------------------------------------------------------------------------------------------------------- |
| 18 | 82 Royal Mahjong FRM-03 Z80 Falcon | |
| 19 | 86 Don Den Mahjong D039198L-0 Z80 Dyna Electronics | |
| 20 | 86 Watashiha Suzumechan Z80 Dyna Electronics | |
| 21 | 87 Mahjong Diplomat D0706088L1-0 Z80 Dynax | |
| 22 | 87 Mahjong Studio 101 D1708228L1 Z80 Dynax | |
| 23 | 87 Tonton D0908288L1-0 Z80 Dynax | |
| 24 | 88 Mahjong Almond Pinky D1401128L-0 Z80 Dynax | |
| 25 | 89 Mahjong Derringer D2203018L Z80 Dynax Larger palette | |
| 26 | 90 Mahjong If..? D29? TLCS-90 Dynax Larger palette | |
| 27 | 92 Mahjong Cafe Time D6310128L1-1 TLCS-90 Dynax Larger palette, Real Time Clock | |
| 28 | 95 Mahjong Tensinhai D10010318L1 TLCS-90 Dynax Larger palette, Real Time Clock | |
| 29 | 96 Janputer '96 Z80 Dynax Larger palette, Real Time Clock | |
| 18 | 81 Royal Mahjong Z80 Nichibutsu | |
| 19 | 81? Open Mahjong Z80 Sapporo Mechanic | |
| 20 | 82 Royal Mahjong FRM-03 Z80 Falcon bootleg | |
| 21 | 86 Ippatsu Gyakuten Z80 Public/Paradais | |
| 22 | 86 Don Den Mahjong D039198L-0 Z80 Dyna Electronics | |
| 23 | 86 Watashiha Suzumechan Z80 Dyna Electronics | |
| 24 | 87 Mahjong Diplomat D0706088L1-0 Z80 Dynax | |
| 25 | 87 Mahjong Studio 101 D1708228L1 Z80 Dynax | |
| 26 | 87 Tonton D0908288L1-0 Z80 Dynax | |
| 27 | 88 Mahjong Almond Pinky D1401128L-0 Z80 Dynax | |
| 28 | 89 Mahjong Derringer D2203018L Z80 Dynax Larger palette | |
| 29 | 90 Mahjong If..? D29? TLCS-90 Dynax Larger palette | |
| 30 | 92 Mahjong Cafe Time D6310128L1-1 TLCS-90 Dynax Larger palette, Real Time Clock | |
| 31 | 93 Mahjong Cafe Doll TLCS-90 Dynax Undumped internal rom | |
| 32 | 95 Mahjong Tensinhai D10010318L1 TLCS-90 Dynax Larger palette, Real Time Clock | |
| 33 | 96 Janputer '96 Z80 Dynax Larger palette, Real Time Clock | |
| 30 | 34 | ---------------------------------------------------------------------------------------------------------- |
| 31 | 35 | |
| 32 | 36 | TODO: |
| r1037 | r1038 | |
| 376 | 380 | AM_RANGE( 0x11, 0x11 ) AM_READWRITE( input_port_10_r, input_port_select_w ) |
| 377 | 381 | ADDRESS_MAP_END |
| 378 | 382 | |
| 383 | static ADDRESS_MAP_START( ippatsu_iomap, ADDRESS_SPACE_IO, 8 ) | |
| 384 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) | |
| 385 | AM_RANGE( 0x01, 0x01 ) AM_READ( AY8910_read_port_0_r ) | |
| 386 | AM_RANGE( 0x02, 0x02 ) AM_WRITE( AY8910_write_port_0_w ) | |
| 387 | AM_RANGE( 0x03, 0x03 ) AM_WRITE( AY8910_control_port_0_w ) | |
| 388 | AM_RANGE( 0x10, 0x10 ) AM_READWRITE( input_port_11_r, royalmah_palbank_w ) | |
| 389 | AM_RANGE( 0x11, 0x11 ) AM_READWRITE( input_port_10_r, input_port_select_w ) | |
| 390 | AM_RANGE( 0x12, 0x12 ) AM_READ( input_port_12_r ) | |
| 391 | AM_RANGE( 0x13, 0x13 ) AM_READ( input_port_13_r ) | |
| 392 | ADDRESS_MAP_END | |
| 393 | ||
| 379 | 394 | static ADDRESS_MAP_START( suzume_iomap, ADDRESS_SPACE_IO, 8 ) |
| 380 | 395 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) |
| 381 | 396 | AM_RANGE( 0x01, 0x01 ) AM_READ( AY8910_read_port_0_r ) |
| r1037 | r1038 | |
| 2680 | 2695 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2681 | 2696 | INPUT_PORTS_END |
| 2682 | 2697 | |
| 2698 | static INPUT_PORTS_START( ippatsu ) | |
| 2699 | PORT_START /* P1 IN0 */ | |
| 2700 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) | |
| 2701 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) | |
| 2702 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I ) | |
| 2703 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M ) | |
| 2704 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) | |
| 2705 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) | |
| 2706 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Credit Clear") PORT_CODE(KEYCODE_7) | |
| 2707 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P2 Credit Clear") PORT_CODE(KEYCODE_8) | |
| 2683 | 2708 | |
| 2709 | PORT_START /* P1 IN1 */ | |
| 2710 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B ) | |
| 2711 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F ) | |
| 2712 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_MAHJONG_J ) | |
| 2713 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_MAHJONG_N ) | |
| 2714 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) | |
| 2715 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) | |
| 2716 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2717 | ||
| 2718 | PORT_START /* P1 IN2 */ | |
| 2719 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_MAHJONG_C ) | |
| 2720 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_MAHJONG_G ) | |
| 2721 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_MAHJONG_K ) | |
| 2722 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) | |
| 2723 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) | |
| 2724 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2725 | ||
| 2726 | PORT_START /* P1 IN3 */ | |
| 2727 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_MAHJONG_D ) | |
| 2728 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_MAHJONG_H ) | |
| 2729 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_MAHJONG_L ) | |
| 2730 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) | |
| 2731 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2732 | ||
| 2733 | PORT_START /* P1 IN4 */ | |
| 2734 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE ) | |
| 2735 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) | |
| 2736 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) | |
| 2737 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP ) | |
| 2738 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) | |
| 2739 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) | |
| 2740 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2741 | ||
| 2742 | PORT_START /* P2 IN0 */ | |
| 2743 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A )PORT_PLAYER(2) | |
| 2744 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E )PORT_PLAYER(2) | |
| 2745 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I )PORT_PLAYER(2) | |
| 2746 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M )PORT_PLAYER(2) | |
| 2747 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN )PORT_PLAYER(2) | |
| 2748 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) | |
| 2749 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) // "COIN2" | |
| 2750 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) // "COIN1", but not working | |
| 2751 | ||
| 2752 | PORT_START /* P2 IN1 */ | |
| 2753 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B )PORT_PLAYER(2) | |
| 2754 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F )PORT_PLAYER(2) | |
| 2755 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_MAHJONG_J )PORT_PLAYER(2) | |
| 2756 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_MAHJONG_N )PORT_PLAYER(2) | |
| 2757 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_MAHJONG_REACH )PORT_PLAYER(2) | |
| 2758 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET )PORT_PLAYER(2) | |
| 2759 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2760 | ||
| 2761 | PORT_START /* P2 IN2 */ | |
| 2762 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_MAHJONG_C )PORT_PLAYER(2) | |
| 2763 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_MAHJONG_G )PORT_PLAYER(2) | |
| 2764 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_MAHJONG_K )PORT_PLAYER(2) | |
| 2765 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI )PORT_PLAYER(2) | |
| 2766 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_MAHJONG_RON )PORT_PLAYER(2) | |
| 2767 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2768 | ||
| 2769 | PORT_START /* P2 IN3 */ | |
| 2770 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_MAHJONG_D )PORT_PLAYER(2) | |
| 2771 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_MAHJONG_H )PORT_PLAYER(2) | |
| 2772 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_MAHJONG_L )PORT_PLAYER(2) | |
| 2773 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON )PORT_PLAYER(2) | |
| 2774 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2775 | ||
| 2776 | PORT_START /* P2 IN4 */ | |
| 2777 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE )PORT_PLAYER(2) | |
| 2778 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE )PORT_PLAYER(2) | |
| 2779 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP )PORT_PLAYER(2) | |
| 2780 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP )PORT_PLAYER(2) | |
| 2781 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_MAHJONG_BIG )PORT_PLAYER(2) | |
| 2782 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL )PORT_PLAYER(2) | |
| 2783 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 2784 | ||
| 2785 | PORT_START /* IN10 */ | |
| 2786 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE1 ) /* "Note" ("Paper Money") = 10 Credits */ | |
| 2787 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE3 ) /* Memory Reset */ | |
| 2788 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE2 ) /* Analizer (Statistics) */ | |
| 2789 | PORT_SERVICE( 0x08, IP_ACTIVE_HIGH ) | |
| 2790 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) | |
| 2791 | ||
| 2792 | PORT_START /* DSW (inport $10) */ | |
| 2793 | PORT_DIPNAME( 0x0f, 0x0f, "Pay Out Rate" ) | |
| 2794 | PORT_DIPSETTING( 0x0f, "96%" ) | |
| 2795 | PORT_DIPSETTING( 0x0e, "93%" ) | |
| 2796 | PORT_DIPSETTING( 0x0d, "90%" ) | |
| 2797 | PORT_DIPSETTING( 0x0c, "87%" ) | |
| 2798 | PORT_DIPSETTING( 0x0b, "84%" ) | |
| 2799 | PORT_DIPSETTING( 0x0a, "81%" ) | |
| 2800 | PORT_DIPSETTING( 0x09, "78%" ) | |
| 2801 | PORT_DIPSETTING( 0x08, "75%" ) | |
| 2802 | PORT_DIPSETTING( 0x07, "71%" ) | |
| 2803 | PORT_DIPSETTING( 0x06, "68%" ) | |
| 2804 | PORT_DIPSETTING( 0x05, "65%" ) | |
| 2805 | PORT_DIPSETTING( 0x04, "62%" ) | |
| 2806 | PORT_DIPSETTING( 0x03, "59%" ) | |
| 2807 | PORT_DIPSETTING( 0x02, "56%" ) | |
| 2808 | PORT_DIPSETTING( 0x01, "53%" ) | |
| 2809 | PORT_DIPSETTING( 0x00, "50%" ) | |
| 2810 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) | |
| 2811 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) | |
| 2812 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2813 | PORT_DIPNAME( 0x60, 0x60, "Maximum Bet" ) | |
| 2814 | PORT_DIPSETTING( 0x00, "1" ) | |
| 2815 | PORT_DIPSETTING( 0x20, "5" ) | |
| 2816 | PORT_DIPSETTING( 0x40, "7" ) | |
| 2817 | PORT_DIPSETTING( 0x60, "10" ) | |
| 2818 | PORT_DIPNAME( 0x80, 0x80, "First Chance" ) | |
| 2819 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) | |
| 2820 | PORT_DIPSETTING( 0x80, DEF_STR( Yes ) ) | |
| 2821 | ||
| 2822 | PORT_START /* DSW (inport $12) */ | |
| 2823 | PORT_DIPNAME( 0x03, 0x03, "Cut" ) | |
| 2824 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) | |
| 2825 | PORT_DIPSETTING( 0x02, "2 Bai" ) | |
| 2826 | PORT_DIPSETTING( 0x01, "3 Bai" ) | |
| 2827 | PORT_DIPSETTING( 0x03, "Yakuman" ) | |
| 2828 | PORT_DIPNAME( 0x0c, 0x0c, "Yakuman Bonus" ) | |
| 2829 | PORT_DIPSETTING( 0x00, "32" ) | |
| 2830 | PORT_DIPSETTING( 0x04, "100" ) | |
| 2831 | PORT_DIPSETTING( 0x08, "200" ) | |
| 2832 | PORT_DIPSETTING( 0x0c, "300" ) | |
| 2833 | PORT_DIPNAME( 0x30, 0x30, "Unknown 1-4&5*" ) | |
| 2834 | PORT_DIPSETTING( 0x00, "3" ) | |
| 2835 | PORT_DIPSETTING( 0x10, "4" ) | |
| 2836 | PORT_DIPSETTING( 0x20, "5" ) | |
| 2837 | PORT_DIPSETTING( 0x30, "6" ) | |
| 2838 | PORT_DIPNAME( 0x40, 0x40, "Unknown 1-6*" ) | |
| 2839 | PORT_DIPSETTING( 0x00, "3" ) | |
| 2840 | PORT_DIPSETTING( 0x40, "5" ) | |
| 2841 | PORT_DIPNAME( 0x80, 0x80, "Unknown 1-7" ) | |
| 2842 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 2843 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2844 | ||
| 2845 | PORT_START /* DSW (inport $13) */ | |
| 2846 | PORT_DIPNAME( 0x01, 0x01, "Unknown 2-0*" ) | |
| 2847 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) | |
| 2848 | PORT_DIPSETTING( 0x01, DEF_STR( Yes ) ) | |
| 2849 | PORT_DIPNAME( 0x02, 0x02, "Second Bonus" ) | |
| 2850 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) | |
| 2851 | PORT_DIPSETTING( 0x02, DEF_STR( Yes ) ) | |
| 2852 | PORT_DIPNAME( 0x04, 0x04, "Allow Bets" ) | |
| 2853 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) | |
| 2854 | PORT_DIPSETTING( 0x04, DEF_STR( Yes ) ) | |
| 2855 | PORT_DIPNAME( 0x08, 0x08, "Unknown 2-2" ) | |
| 2856 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) | |
| 2857 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2858 | PORT_DIPNAME( 0x18, 0x18, "Unknown 2-3&4*" ) | |
| 2859 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) | |
| 2860 | PORT_DIPSETTING( 0x18, "2" ) | |
| 2861 | PORT_DIPSETTING( 0x10, "4" ) | |
| 2862 | PORT_DIPSETTING( 0x08, "8" ) | |
| 2863 | PORT_DIPNAME( 0x20, 0x20, "Unknown 2-5" ) | |
| 2864 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 2865 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2866 | PORT_DIPNAME( 0x40, 0x40, "Unknown 2-6" ) | |
| 2867 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 2868 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2869 | PORT_DIPNAME( 0x80, 0x80, "Unknown 2-7" ) | |
| 2870 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) | |
| 2871 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 2872 | INPUT_PORTS_END | |
| 2873 | ||
| 2874 | ||
| 2684 | 2875 | static struct AY8910interface ay8910_interface = |
| 2685 | 2876 | { |
| 2686 | 2877 | royalmah_player_1_port_r, |
| r1037 | r1038 | |
| 2725 | 2916 | MDRV_CPU_IO_MAP(dondenmj_iomap,0) |
| 2726 | 2917 | MACHINE_DRIVER_END |
| 2727 | 2918 | |
| 2919 | static MACHINE_DRIVER_START( ippatsu ) | |
| 2920 | MDRV_IMPORT_FROM(dondenmj) | |
| 2921 | MDRV_CPU_MODIFY("main") | |
| 2922 | MDRV_CPU_IO_MAP(ippatsu_iomap,0) | |
| 2923 | MACHINE_DRIVER_END | |
| 2924 | ||
| 2728 | 2925 | static void suzume_irq(void) |
| 2729 | 2926 | { |
| 2730 | 2927 | if ( suzume_bank & 0x40 ) |
| r1037 | r1038 | |
| 2840 | 3037 | |
| 2841 | 3038 | ***************************************************************************/ |
| 2842 | 3039 | |
| 3040 | /*************************************************************************** | |
| 3041 | ||
| 3042 | Royal Mahjong | |
| 3043 | (c)1981 Nichibutsu | |
| 3044 | ||
| 3045 | CPU: Z80 | |
| 3046 | Sound: AY-3-8910 | |
| 3047 | OSC: 18.432MHz | |
| 3048 | ||
| 3049 | ***************************************************************************/ | |
| 3050 | ||
| 3051 | ROM_START( royalmj ) | |
| 3052 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 3053 | ROM_LOAD( "1.p1", 0x0000, 0x1000, CRC(549544bb) SHA1(dfb221572c7bfd267a22c0a944830d5f127f9942) ) | |
| 3054 | ROM_LOAD( "2.p2", 0x1000, 0x1000, CRC(afc8a61e) SHA1(4134f6404f955838fc48fd0f87b83ebc75c1a021) ) | |
| 3055 | ROM_LOAD( "3.p3", 0x2000, 0x1000, CRC(5d33e54d) SHA1(bf5e0ad5177c086f1cea5c90d7273a841db941bc) ) | |
| 3056 | ROM_LOAD( "4.p4", 0x3000, 0x1000, CRC(91339560) SHA1(0fb4141e236ab57b3e915dadb982b28ca11d269f) ) | |
| 3057 | ROM_LOAD( "5.p5", 0x4000, 0x1000, CRC(cc9123a3) SHA1(75276045247a0c9ac5810be01f3b58ad63101f9b) ) | |
| 3058 | ROM_LOAD( "6.p6", 0x5000, 0x1000, CRC(92150a0f) SHA1(5c97ba5014abdba4afc78e02e7d90e6ca4d777ac) ) | |
| 3059 | ||
| 3060 | ROM_REGION( 0x0020, REGION_PROMS, 0 ) | |
| 3061 | ROM_LOAD( "18s030n.6k", 0x0000, 0x0020, CRC(d3007282) SHA1(e4d863ab193e49208ed0f59dcddb1da0492314f6) ) | |
| 3062 | ROM_END | |
| 3063 | ||
| 2843 | 3064 | ROM_START( royalmah ) |
| 2844 | 3065 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 2845 | 3066 | ROM_LOAD( "rom1", 0x0000, 0x1000, CRC(69b37a62) SHA1(7792528754b0df4e11f4ebe33380b713ac7351a3) ) |
| r1037 | r1038 | |
| 2853 | 3074 | ROM_LOAD( "f-rom.bpr", 0x0000, 0x0020, CRC(d3007282) SHA1(e4d863ab193e49208ed0f59dcddb1da0492314f6) ) |
| 2854 | 3075 | ROM_END |
| 2855 | 3076 | |
| 3077 | ROM_START( openmj ) | |
| 3078 | ROM_REGION( 0x7000, REGION_CPU1, ROMREGION_ERASEFF ) | |
| 3079 | ROM_LOAD( "10", 0x0000, 0x2000, CRC(4042920e) SHA1(19753bcb27ebf391ab824a45c6e41d956826a263) ) | |
| 3080 | ROM_LOAD( "20", 0x2000, 0x2000, CRC(8fa0f735) SHA1(645154d51c0679b953b9ffc2f1d3b8f2752a0796) ) | |
| 3081 | ROM_LOAD( "30", 0x4000, 0x2000, CRC(00045cd7) SHA1(0c32995753c1da14dacc8bc6c12dbcbdcae4e1b0) ) | |
| 2856 | 3082 | |
| 3083 | ROM_REGION( 0x20, REGION_PROMS, 0 ) | |
| 3084 | ROM_LOAD( "82s123.prm", 0x00, 0x20, CRC(d3007282) SHA1(e4d863ab193e49208ed0f59dcddb1da0492314f6) ) | |
| 3085 | ROM_END | |
| 3086 | ||
| 3087 | /**************************************************************************** | |
| 3088 | ||
| 3089 | Ippatsu Gyakuten | |
| 3090 | (c)1986 Public Software / Paradais | |
| 3091 | ||
| 3092 | modified Royal Mahjong hardware | |
| 3093 | ||
| 3094 | CPU: Z80 | |
| 3095 | Sound: AY-3-8910 | |
| 3096 | ||
| 3097 | ROMs: | |
| 3098 | 11(27256) | |
| 3099 | 12(27128) | |
| 3100 | 82S123AN | |
| 3101 | ||
| 3102 | dumped by sayu | |
| 3103 | ||
| 3104 | ****************************************************************************/ | |
| 3105 | ||
| 3106 | ROM_START( ippatsu ) | |
| 3107 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 3108 | ROM_LOAD( "11", 0x0000, 0x8000, CRC(5f563be7) SHA1(2ce486777bd61a2de789683cd0c8abeefe31775b) ) | |
| 3109 | ROM_LOAD( "12", 0x8000, 0x4000, CRC(a09a43b0) SHA1(da12e669ccd036da817a69bd549e8668e6a45730) ) | |
| 3110 | ROM_RELOAD( 0xc000, 0x4000 ) | |
| 3111 | ||
| 3112 | ROM_REGION( 0x0020, REGION_PROMS, 0 ) | |
| 3113 | ROM_LOAD( "82s123an", 0x00, 0x20, CRC(3bde1bbd) SHA1(729498483943f960e38c4ada992b099b698b497a) ) | |
| 3114 | ROM_END | |
| 3115 | ||
| 3116 | ||
| 2857 | 3117 | ROM_START( suzume ) |
| 2858 | 3118 | ROM_REGION( 0x100000, REGION_CPU1, 0 ) |
| 2859 | 3119 | ROM_LOAD( "p1.bin", 0x00000, 0x1000, CRC(e9706967) SHA1(2e3d78178623de6552c9036da90e02f240d94055) ) |
| r1037 | r1038 | |
| 3173 | 3433 | ROM_LOAD( "d63-1.7f", 0x200, 0x200, CRC(e7410136) SHA1(54d3aec0d11485d4f419e76f9c4071ab9b817937) ) |
| 3174 | 3434 | ROM_END |
| 3175 | 3435 | |
| 3436 | ROM_START( cafedoll ) | |
| 3437 | ROM_REGION( 0x190000, REGION_CPU1, 0 ) | |
| 3438 | ROM_LOAD( "76xx.tmp90841", 0x00000, 0x02000, NO_DUMP ) | |
| 3439 | ROM_LOAD( "7601", 0x000000, 0x80000, CRC(20c80ad9) SHA1(e45edd101c6e26c0fa3c3f15f4a4152a853e41bd) ) | |
| 3440 | /* bank switched ROMs follow */ | |
| 3441 | ROM_RELOAD( 0x010000, 0x80000 ) | |
| 3442 | ROM_LOAD( "7602", 0x090000, 0x80000, CRC(f472960c) SHA1(cc2feb4374ba94035101114c73e1690cfeac9b91) ) | |
| 3443 | ROM_LOAD( "7603", 0x110000, 0x80000, CRC(c4293019) SHA1(afd717844e9e681ada14e80cd10dce0ed60d4259) ) | |
| 3176 | 3444 | |
| 3445 | ROM_REGION( 0x400, REGION_PROMS, 0 ) | |
| 3446 | ROM_LOAD( "cafedoll.prom1", 0x000, 0x200, NO_DUMP ) | |
| 3447 | ROM_LOAD( "cafedoll.prom2", 0x200, 0x200, NO_DUMP ) | |
| 3448 | ROM_END | |
| 3449 | ||
| 3450 | static DRIVER_INIT( ippatsu ) { memory_set_bankptr(1, memory_region(REGION_CPU1) + 0x8000 ); } | |
| 3451 | ||
| 3177 | 3452 | static DRIVER_INIT( janptr96 ) |
| 3178 | 3453 | { |
| 3179 | 3454 | generic_nvram_size = 0x1000 * 9; |
| r1037 | r1038 | |
| 3182 | 3457 | memory_set_bankptr(3,generic_nvram); |
| 3183 | 3458 | } |
| 3184 | 3459 | |
| 3185 | ||
| 3186 | GAME( 1982, royalmah, 0, royalmah, royalmah, 0, ROT0, "Falcon", "Royal Mahjong (Japan)", 0 ) | |
| 3187 | GAME( 1986, dondenmj, 0, dondenmj, majs101b, 0, ROT0, "Dyna Electronics", "Don Den Mahjong [BET] (Japan)", 0 ) | |
| 3188 | GAME( 1986, suzume, 0, suzume, suzume, 0, ROT0, "Dyna Electronics", "Watashiha Suzumechan (Japan)", 0 ) | |
| 3189 | GAME( 1987, mjdiplob, 0, mjdiplob, mjdiplob, 0, ROT0, "Dynax", "Mahjong Diplomat [BET] (Japan)", 0 ) | |
| 3190 | GAME( 1987, tontonb, 0, tontonb, tontonb, 0, ROT0, "Dynax", "Tonton [BET] (Japan)", 0 ) | |
| 3191 | GAME( 1988, majs101b, 0, majs101b, majs101b, 0, ROT0, "Dynax", "Mahjong Studio 101 [BET] (Japan)", 0 ) | |
| 3192 | GAME( 1988, mjapinky, 0, mjapinky, mjapinky, 0, ROT0, "Dynax", "Almond Pinky [BET] (Japan)", 0) | |
| 3193 | GAME( 1989, mjderngr, 0, mjderngr, majs101b, 0, ROT0, "Dynax", "Mahjong Derringer (Japan)", 0 ) | |
| 3194 | GAME( 1990, mjifb, 0, mjifb, mjifb, 0, ROT0, "Dynax", "Mahjong If...? [BET]", 0 ) | |
| 3195 | GAME( 1992, cafetime, 0, cafetime, cafetime, 0, ROT0, "Dynax", "Mahjong Cafe Time", 0 ) | |
| 3196 | GAME( 1995, mjtensin, 0, mjtensin, mjtensin, 0, ROT0, "Dynax", "Mahjong Tensinhai (Japan)", GAME_NOT_WORKING ) | |
| 3197 | GAME( 1996, janptr96, 0, janptr96, janptr96, janptr96, ROT0, "Dynax", "Janputer '96 (Japan)", 0 ) | |
| 3460 | GAME( 1981, royalmj, 0, royalmah, royalmah, 0, ROT0, "Nichibutsu", "Royal Mahjong (Japan, v1.13)", 0 ) | |
| 3461 | GAME( 1981?, openmj, royalmj, royalmah, royalmah, 0, ROT0, "Sapporo Mechanic", "Open Mahjong [BET] (Japan)", 0 ) | |
| 3462 | GAME( 1982, royalmah, royalmj, royalmah, royalmah, 0, ROT0, "bootleg", "Royal Mahjong (Falcon bootleg, v1.01)", 0 ) | |
| 3463 | GAME( 1986, dondenmj, 0, dondenmj, majs101b, 0, ROT0, "Dyna Electronics", "Don Den Mahjong [BET] (Japan)", 0 ) | |
| 3464 | GAME( 1986, ippatsu, 0, ippatsu, ippatsu, ippatsu, ROT0, "Public Software / Paradais", "Ippatsu Gyakuten [BET] (Japan)", 0 ) | |
| 3465 | GAME( 1986, suzume, 0, suzume, suzume, 0, ROT0, "Dyna Electronics", "Watashiha Suzumechan (Japan)", 0 ) | |
| 3466 | GAME( 1987, mjdiplob, 0, mjdiplob, mjdiplob, 0, ROT0, "Dynax", "Mahjong Diplomat [BET] (Japan)", 0 ) | |
| 3467 | GAME( 1987, tontonb, 0, tontonb, tontonb, 0, ROT0, "Dynax", "Tonton [BET] (Japan)", 0 ) | |
| 3468 | GAME( 1988, majs101b, 0, majs101b, majs101b, 0, ROT0, "Dynax", "Mahjong Studio 101 [BET] (Japan)", 0 ) | |
| 3469 | GAME( 1988, mjapinky, 0, mjapinky, mjapinky, 0, ROT0, "Dynax", "Almond Pinky [BET] (Japan)", 0 ) | |
| 3470 | GAME( 1989, mjderngr, 0, mjderngr, majs101b, 0, ROT0, "Dynax", "Mahjong Derringer (Japan)", 0 ) | |
| 3471 | GAME( 1990, mjifb, 0, mjifb, mjifb, 0, ROT0, "Dynax", "Mahjong If...? [BET]", 0 ) | |
| 3472 | GAME( 1992, cafetime, 0, cafetime, cafetime, 0, ROT0, "Dynax", "Mahjong Cafe Time", 0 ) | |
| 3473 | GAME( 1993, cafedoll, 0, mjifb, mjifb, 0, ROT0, "Dynax", "Mahjong Cafe Doll (Japan)", GAME_NOT_WORKING ) | |
| 3474 | GAME( 1995, mjtensin, 0, mjtensin, mjtensin, 0, ROT0, "Dynax", "Mahjong Tensinhai (Japan)", GAME_NOT_WORKING ) | |
| 3475 | GAME( 1996, janptr96, 0, janptr96, janptr96, janptr96, ROT0, "Dynax", "Janputer '96 (Japan)", 0 ) |
| r1037 | r1038 | |
|---|---|---|
| 153 | 153 | /* HTML helpers */ |
| 154 | 154 | static FILE *create_file_and_output_header(const char *filename, const char *title, const char *subtitle); |
| 155 | 155 | static void output_footer_and_close_file(FILE *file); |
| 156 | static int copy_file(const char *srcdir, const char *srcname, const char *dstdir, const char *dstname); | |
| 157 | 156 | |
| 158 | 157 | /* report generators */ |
| 159 | 158 | static void output_report(const char *dirname, summary_file *filelist); |
| r1037 | r1038 | |
| 639 | 638 | } |
| 640 | 639 | |
| 641 | 640 | |
| 642 | /*------------------------------------------------- | |
| 643 | copy_file - copy a file from source directory | |
| 644 | to the destination directory | |
| 645 | -------------------------------------------------*/ | |
| 646 | 641 | |
| 647 | static int copy_file(const char *srcdir, const char *srcname, const char *dstdir, const char *dstname) | |
| 648 | { | |
| 649 | const char *srcfilename = alloc_filename(srcdir, srcname); | |
| 650 | const char *dstfilename = alloc_filename(dstdir, dstname); | |
| 651 | FILE *srcfile, *dstfile; | |
| 652 | void *buffer; | |
| 653 | int bytes; | |
| 654 | ||
| 655 | /* open the source for read */ | |
| 656 | srcfile = fopen(srcfilename, "rb"); | |
| 657 | if (srcfile == NULL) | |
| 658 | { | |
| 659 | free((void *)srcfilename); | |
| 660 | free((void *)dstfilename); | |
| 661 | return 1; | |
| 662 | } | |
| 663 | free((void *)srcfilename); | |
| 664 | ||
| 665 | /* open the destination for write */ | |
| 666 | dstfile = fopen(dstfilename, "wb"); | |
| 667 | if (dstfile == NULL) | |
| 668 | { | |
| 669 | fprintf(stderr, "Could not create file '%s'\n", dstfilename); | |
| 670 | free((void *)dstfilename); | |
| 671 | fclose(srcfile); | |
| 672 | return 1; | |
| 673 | } | |
| 674 | free((void *)dstfilename); | |
| 675 | ||
| 676 | /* determine source size */ | |
| 677 | fseek(srcfile, 0, SEEK_END); | |
| 678 | bytes = ftell(srcfile); | |
| 679 | fseek(srcfile, 0, SEEK_SET); | |
| 680 | buffer = malloc(bytes); | |
| 681 | if (buffer == NULL) | |
| 682 | { | |
| 683 | fprintf(stderr, "Couldn't allocate %d bytes for file copy\n", bytes); | |
| 684 | fclose(srcfile); | |
| 685 | fclose(dstfile); | |
| 686 | return 1; | |
| 687 | } | |
| 688 | ||
| 689 | /* read/write the data */ | |
| 690 | fread(buffer, 1, bytes, srcfile); | |
| 691 | fwrite(buffer, 1, bytes, dstfile); | |
| 692 | fclose(srcfile); | |
| 693 | fclose(dstfile); | |
| 694 | return 0; | |
| 695 | } | |
| 696 | ||
| 697 | ||
| 698 | ||
| 699 | 642 | /*************************************************************************** |
| 700 | 643 | REPORT GENERATORS |
| 701 | 644 | ***************************************************************************/ |
| r1037 | r1038 | |
|---|---|---|
| 238 | 238 | // device list management |
| 239 | 239 | static void device_list_poll_devices(device_info *devlist_head); |
| 240 | 240 | static void device_list_reset_devices(device_info *devlist_head); |
| 241 | static int device_list_count(device_info *devlist_head); | |
| 242 | 241 | |
| 243 | 242 | // generic device management |
| 244 | 243 | static device_info *generic_device_alloc(device_info **devlist_head_ptr, const TCHAR *name); |
| r1037 | r1038 | |
| 780 | 779 | |
| 781 | 780 | |
| 782 | 781 | //============================================================ |
| 783 | // device_list_count | |
| 784 | //============================================================ | |
| 785 | ||
| 786 | static int device_list_count(device_info *devlist_head) | |
| 787 | { | |
| 788 | device_info *curdev; | |
| 789 | int count = 0; | |
| 790 | ||
| 791 | for (curdev = devlist_head; curdev != NULL; curdev = curdev->next) | |
| 792 | count++; | |
| 793 | return count; | |
| 794 | } | |
| 795 | ||
| 796 | ||
| 797 | //============================================================ | |
| 798 | 782 | // generic_device_alloc |
| 799 | 783 | //============================================================ |
| 800 | 784 |
| r1037 | r1038 | |
|---|---|---|
| 87 | 87 | ID_1_BYTE_CHUNKS, |
| 88 | 88 | ID_2_BYTE_CHUNKS, |
| 89 | 89 | ID_4_BYTE_CHUNKS, |
| 90 | ID_8_BYTE_CHUNKS, | |
| 91 | ID_LOGICAL_ADDRESSES, | |
| 92 | ID_PHYSICAL_ADDRESSES, | |
| 90 | 93 | ID_REVERSE_VIEW, |
| 91 | 94 | ID_INCREASE_MEM_WIDTH, |
| 92 | 95 | ID_DECREASE_MEM_WIDTH, |
| r1037 | r1038 | |
| 211 | 214 | |
| 212 | 215 | static LRESULT CALLBACK debug_edit_proc(HWND wnd, UINT message, WPARAM wparam, LPARAM lparam); |
| 213 | 216 | |
| 214 | static void generic_create_window(int type); | |
| 217 | //static void generic_create_window(int type); | |
| 215 | 218 | static void generic_recompute_children(debugwin_info *info); |
| 216 | 219 | |
| 217 | 220 | static void memory_create_window(void); |
| r1037 | r1038 | |
| 269 | 272 | |
| 270 | 273 | switch (message.message) |
| 271 | 274 | { |
| 272 | // special case for quit | |
| 273 | case WM_QUIT: | |
| 274 | mame_schedule_exit(Machine); | |
| 275 | break; | |
| 276 | ||
| 277 | 275 | // check for F10 -- we need to capture that ourselves |
| 278 | 276 | case WM_SYSKEYDOWN: |
| 279 | 277 | case WM_SYSKEYUP: |
| r1037 | r1038 | |
| 283 | 281 | |
| 284 | 282 | // process everything else |
| 285 | 283 | default: |
| 286 | TranslateMessage(&message); | |
| 287 | DispatchMessage(&message); | |
| 284 | winwindow_dispatch_message(&message); | |
| 288 | 285 | break; |
| 289 | 286 | } |
| 290 | 287 | |
| r1037 | r1038 | |
| 1608 | 1605 | // generic_create_window |
| 1609 | 1606 | //============================================================ |
| 1610 | 1607 | |
| 1608 | #ifdef UNUSED_FUNCTION | |
| 1611 | 1609 | static void generic_create_window(int type) |
| 1612 | 1610 | { |
| 1613 | 1611 | debugwin_info *info; |
| r1037 | r1038 | |
| 1629 | 1627 | SetWindowPos(info->wnd, HWND_TOP, 100, 100, info->maxwidth, 200, SWP_SHOWWINDOW); |
| 1630 | 1628 | generic_recompute_children(info); |
| 1631 | 1629 | } |
| 1630 | #endif | |
| 1632 | 1631 | |
| 1633 | 1632 | |
| 1634 | 1633 | |
| r1037 | r1038 | |
| 1731 | 1730 | memset(ci, 0, sizeof(*ci)); |
| 1732 | 1731 | ci->cpunum = cpunum; |
| 1733 | 1732 | ci->spacenum = spacenum; |
| 1734 | ci->prefsize = MIN(cpuinfo->space[spacenum].databytes, | |
| 1733 | ci->prefsize = MIN(cpuinfo->space[spacenum].databytes, 8); | |
| 1735 | 1734 | sprintf(ci->name, "CPU #%d (%s) %s memory", cpunum, cpunum_name(cpunum), address_space_names[spacenum]); |
| 1736 | 1735 | *tail = ci; |
| 1737 | 1736 | tail = &ci->next; |
| r1037 | r1038 | |
| 1762 | 1761 | little_endian = (cpuinfo->endianness == CPU_IS_LE); |
| 1763 | 1762 | } |
| 1764 | 1763 | } |
| 1765 | ci->prefsize = MIN(width, | |
| 1764 | ci->prefsize = MIN(width, 8); | |
| 1766 | 1765 | ci->offset_xor = width - 1; |
| 1767 | 1766 | ci->little_endian = little_endian; |
| 1768 | 1767 | strcpy(ci->name, memory_region_names[type - REGION_INVALID]); |
| r1037 | r1038 | |
| 1790 | 1789 | memset(ci, 0, sizeof(*ci)); |
| 1791 | 1790 | ci->base = base; |
| 1792 | 1791 | ci->length = valcount * valsize; |
| 1793 | ci->prefsize = MIN(valsize, | |
| 1792 | ci->prefsize = MIN(valsize, 8); | |
| 1794 | 1793 | ci->little_endian = TRUE; |
| 1795 | 1794 | strcpy(ci->name, strrchr(name, '/') + 1); |
| 1796 | 1795 | *tail = ci; |
| r1037 | r1038 | |
| 1842 | 1841 | AppendMenu(optionsmenu, MF_ENABLED, ID_1_BYTE_CHUNKS, TEXT("1-byte chunks\tCtrl+1")); |
| 1843 | 1842 | AppendMenu(optionsmenu, MF_ENABLED, ID_2_BYTE_CHUNKS, TEXT("2-byte chunks\tCtrl+2")); |
| 1844 | 1843 | AppendMenu(optionsmenu, MF_ENABLED, ID_4_BYTE_CHUNKS, TEXT("4-byte chunks\tCtrl+4")); |
| 1844 | AppendMenu(optionsmenu, MF_ENABLED, ID_8_BYTE_CHUNKS, TEXT("8-byte chunks\tCtrl+8")); | |
| 1845 | 1845 | AppendMenu(optionsmenu, MF_DISABLED | MF_SEPARATOR, 0, TEXT("")); |
| 1846 | AppendMenu(optionsmenu, MF_ENABLED, ID_LOGICAL_ADDRESSES, TEXT("Logical Addresses\tCtrl+L")); | |
| 1847 | AppendMenu(optionsmenu, MF_ENABLED, ID_PHYSICAL_ADDRESSES, TEXT("Physical Addresses\tCtrl+Y")); | |
| 1848 | AppendMenu(optionsmenu, MF_DISABLED | MF_SEPARATOR, 0, TEXT("")); | |
| 1846 | 1849 | AppendMenu(optionsmenu, MF_ENABLED, ID_REVERSE_VIEW, TEXT("Reverse View\tCtrl+R")); |
| 1847 | 1850 | AppendMenu(optionsmenu, MF_DISABLED | MF_SEPARATOR, 0, TEXT("")); |
| 1848 | 1851 | AppendMenu(optionsmenu, MF_ENABLED, ID_INCREASE_MEM_WIDTH, TEXT("Increase bytes per line\tCtrl+P")); |
| r1037 | r1038 | |
| 1989 | 1992 | CheckMenuItem(GetMenu(info->wnd), ID_1_BYTE_CHUNKS, MF_BYCOMMAND | (debug_view_get_property_UINT32(info->view[0].view, DVP_MEM_BYTES_PER_CHUNK) == 1? MF_CHECKED : MF_UNCHECKED)); |
| 1990 | 1993 | CheckMenuItem(GetMenu(info->wnd), ID_2_BYTE_CHUNKS, MF_BYCOMMAND | (debug_view_get_property_UINT32(info->view[0].view, DVP_MEM_BYTES_PER_CHUNK) == 2 ? MF_CHECKED : MF_UNCHECKED)); |
| 1991 | 1994 | CheckMenuItem(GetMenu(info->wnd), ID_4_BYTE_CHUNKS, MF_BYCOMMAND | (debug_view_get_property_UINT32(info->view[0].view, DVP_MEM_BYTES_PER_CHUNK) == 4 ? MF_CHECKED : MF_UNCHECKED)); |
| 1995 | CheckMenuItem(GetMenu(info->wnd), ID_8_BYTE_CHUNKS, MF_BYCOMMAND | (debug_view_get_property_UINT32(info->view[0].view, DVP_MEM_BYTES_PER_CHUNK) == 8 ? MF_CHECKED : MF_UNCHECKED)); | |
| 1996 | CheckMenuItem(GetMenu(info->wnd), ID_LOGICAL_ADDRESSES, MF_BYCOMMAND | (debug_view_get_property_UINT32(info->view[0].view, DVP_MEM_NO_TRANSLATION) ? MF_UNCHECKED : MF_CHECKED)); | |
| 1997 | CheckMenuItem(GetMenu(info->wnd), ID_PHYSICAL_ADDRESSES, MF_BYCOMMAND | (debug_view_get_property_UINT32(info->view[0].view, DVP_MEM_NO_TRANSLATION) ? MF_CHECKED : MF_UNCHECKED)); | |
| 1992 | 1998 | CheckMenuItem(GetMenu(info->wnd), ID_REVERSE_VIEW, MF_BYCOMMAND | (debug_view_get_property_UINT32(info->view[0].view, DVP_MEM_REVERSE_VIEW) ? MF_CHECKED : MF_UNCHECKED)); |
| 1993 | 1999 | } |
| 1994 | 2000 | |
| r1037 | r1038 | |
| 2050 | 2056 | memory_update_checkmarks(info); |
| 2051 | 2057 | return 1; |
| 2052 | 2058 | |
| 2059 | case ID_8_BYTE_CHUNKS: | |
| 2060 | debug_view_begin_update(info->view[0].view); | |
| 2061 | debug_view_set_property_UINT32(info->view[0].view, DVP_MEM_BYTES_PER_CHUNK, 8); | |
| 2062 | debug_view_end_update(info->view[0].view); | |
| 2063 | memory_update_checkmarks(info); | |
| 2064 | return 1; | |
| 2065 | ||
| 2066 | case ID_LOGICAL_ADDRESSES: | |
| 2067 | debug_view_begin_update(info->view[0].view); | |
| 2068 | debug_view_set_property_UINT32(info->view[0].view, DVP_MEM_NO_TRANSLATION, FALSE); | |
| 2069 | debug_view_end_update(info->view[0].view); | |
| 2070 | memory_update_checkmarks(info); | |
| 2071 | return 1; | |
| 2072 | ||
| 2073 | case ID_PHYSICAL_ADDRESSES: | |
| 2074 | debug_view_begin_update(info->view[0].view); | |
| 2075 | debug_view_set_property_UINT32(info->view[0].view, DVP_MEM_NO_TRANSLATION, TRUE); | |
| 2076 | debug_view_end_update(info->view[0].view); | |
| 2077 | memory_update_checkmarks(info); | |
| 2078 | return 1; | |
| 2079 | ||
| 2053 | 2080 | case ID_REVERSE_VIEW: |
| 2054 | 2081 | debug_view_begin_update(info->view[0].view); |
| 2055 | 2082 | debug_view_set_property_UINT32(info->view[0].view, DVP_MEM_REVERSE_VIEW, !debug_view_get_property_UINT32(info->view[0].view, DVP_MEM_REVERSE_VIEW)); |
| r1037 | r1038 | |
| 2098 | 2125 | SendMessage(info->wnd, WM_COMMAND, ID_4_BYTE_CHUNKS, 0); |
| 2099 | 2126 | return 1; |
| 2100 | 2127 | |
| 2128 | case '8': | |
| 2129 | SendMessage(info->wnd, WM_COMMAND, ID_8_BYTE_CHUNKS, 0); | |
| 2130 | return 1; | |
| 2131 | ||
| 2132 | case 'L': | |
| 2133 | SendMessage(info->wnd, WM_COMMAND, ID_LOGICAL_ADDRESSES, 0); | |
| 2134 | return 1; | |
| 2135 | ||
| 2136 | case 'Y': | |
| 2137 | SendMessage(info->wnd, WM_COMMAND, ID_PHYSICAL_ADDRESSES, 0); | |
| 2138 | return 1; | |
| 2139 | ||
| 2101 | 2140 | case 'R': |
| 2102 | 2141 | SendMessage(info->wnd, WM_COMMAND, ID_REVERSE_VIEW, 0); |
| 2103 | 2142 | return 1; |
| r1037 | r1038 | |
|---|---|---|
| 373 | 373 | { |
| 374 | 374 | int dispatch = TRUE; |
| 375 | 375 | |
| 376 | if ( | |
| 376 | if ( | |
| 377 | 377 | { |
| 378 | 378 | switch (message.message) |
| 379 | 379 | { |
| r1037 | r1038 | |
| 388 | 388 | dispatch = FALSE; |
| 389 | 389 | break; |
| 390 | 390 | |
| 391 | // special case for quit | |
| 392 | case WM_QUIT: | |
| 393 | mame_schedule_exit(Machine); | |
| 394 | break; | |
| 395 | ||
| 396 | // temporary pause from the window thread | |
| 397 | case WM_USER_UI_TEMP_PAUSE: | |
| 398 | winwindow_ui_pause_from_main_thread(message.wParam); | |
| 399 | dispatch = FALSE; | |
| 400 | break; | |
| 401 | ||
| 402 | // execute arbitrary function | |
| 403 | case WM_USER_EXEC_FUNC: | |
| 404 | { | |
| 405 | void (*func)(void *) = (void (*)(void *)) message.wParam; | |
| 406 | void *param = (void *) message.lParam; | |
| 407 | func(param); | |
| 408 | } | |
| 409 | break; | |
| 410 | ||
| 411 | 391 | // forward mouse button downs to the input system |
| 412 | 392 | case WM_LBUTTONDOWN: |
| 413 | 393 | wininput_handle_mouse_button(0, TRUE, GET_X_LPARAM(message.lParam), GET_Y_LPARAM(message.lParam)); |
| r1037 | r1038 | |
| 454 | 434 | |
| 455 | 435 | // dispatch if necessary |
| 456 | 436 | if (dispatch) |
| 457 | { | |
| 458 | TranslateMessage(&message); | |
| 459 | DispatchMessage(&message); | |
| 460 | } | |
| 437 | winwindow_dispatch_message(&message); | |
| 461 | 438 | } |
| 462 | 439 | } while (ui_temp_pause > 0); |
| 463 | 440 | |
| r1037 | r1038 | |
| 468 | 445 | |
| 469 | 446 | |
| 470 | 447 | //============================================================ |
| 448 | // winwindow_dispatch_message | |
| 449 | // (main thread) | |
| 450 | //============================================================ | |
| 451 | ||
| 452 | void winwindow_dispatch_message(MSG *message) | |
| 453 | { | |
| 454 | assert(GetCurrentThreadId() == main_threadid); | |
| 455 | ||
| 456 | // dispatch our special communication messages | |
| 457 | switch (message->message) | |
| 458 | { | |
| 459 | // special case for quit | |
| 460 | case WM_QUIT: | |
| 461 | mame_schedule_exit(Machine); | |
| 462 | break; | |
| 463 | ||
| 464 | // temporary pause from the window thread | |
| 465 | case WM_USER_UI_TEMP_PAUSE: | |
| 466 | winwindow_ui_pause_from_main_thread(message->wParam); | |
| 467 | break; | |
| 468 | ||
| 469 | // execute arbitrary function | |
| 470 | case WM_USER_EXEC_FUNC: | |
| 471 | { | |
| 472 | void (*func)(void *) = (void (*)(void *)) message->wParam; | |
| 473 | void *param = (void *) message->lParam; | |
| 474 | func(param); | |
| 475 | } | |
| 476 | break; | |
| 477 | ||
| 478 | // everything else dispatches normally | |
| 479 | default: | |
| 480 | TranslateMessage(message); | |
| 481 | DispatchMessage(message); | |
| 482 | break; | |
| 483 | } | |
| 484 | } | |
| 485 | ||
| 486 | ||
| 487 | ||
| 488 | //============================================================ | |
| 471 | 489 | // winwindow_toggle_full_screen |
| 472 | 490 | // (main thread) |
| 473 | 491 | //============================================================ |
| r1037 | r1038 | |
| 994 | 1012 | |
| 995 | 1013 | // otherwise, we just do it directly |
| 996 | 1014 | else |
| 997 | func(param); | |
| 1015 | (*func)(param); | |
| 998 | 1016 | } |
| 999 | 1017 | |
| 1000 | 1018 |
| r1037 | r1038 | |
|---|---|---|
| 132 | 132 | int winwindow_ui_is_paused(void); |
| 133 | 133 | |
| 134 | 134 | void winwindow_ui_exec_on_main_thread(void (*func)(void *), void *param); |
| 135 | void winwindow_dispatch_message(MSG *message); | |
| 135 | 136 | |
| 136 | 137 | #if HAS_WINDOW_MENU |
| 137 | 138 | int win_create_menu(HMENU *menus); |
| r1037 | r1038 | |
|---|---|---|
| 706 | 706 | d3d->presentation.MultiSampleType = D3DMULTISAMPLE_NONE; |
| 707 | 707 | d3d->presentation.SwapEffect = D3DSWAPEFFECT_DISCARD; |
| 708 | 708 | d3d->presentation.hDeviceWindow = window->hwnd; |
| 709 | d3d->presentation.Windowed = !window->fullscreen || HAS_WINDOW_MENU; | |
| 709 | d3d->presentation.Windowed = (!video_config.switchres || !window->fullscreen) || HAS_WINDOW_MENU; | |
| 710 | 710 | d3d->presentation.EnableAutoDepthStencil = FALSE; |
| 711 | 711 | d3d->presentation.AutoDepthStencilFormat = D3DFMT_D16; |
| 712 | 712 | d3d->presentation.Flags = 0; |
| r1037 | r1038 | |
| 1107 | 1107 | } |
| 1108 | 1108 | |
| 1109 | 1109 | // choose a resolution: window mode case |
| 1110 | if (!window->fullscreen || HAS_WINDOW_MENU) | |
| 1110 | if (!window->fullscreen || !video_config.switchres || HAS_WINDOW_MENU) | |
| 1111 | 1111 | { |
| 1112 | 1112 | RECT client; |
| 1113 | 1113 |
| r1037 | r1038 | |
|---|---|---|
| 2065 | 2065 | 00000000 00 11 22 33 44 55 66 77-88 99 aa bb cc dd ee ff 0123456789abcdef |
| 2066 | 2066 | 00000000 0011 2233 4455 6677- 8899 aabb ccdd eeff 0123456789abcdef |
| 2067 | 2067 | 00000000 00112233 44556677 - 8899aabb ccddeeff 0123456789abcdef |
| 2068 | 00000000 0011223344556677 - 8899aabbccddeeff 0123456789abcdef | |
| 2068 | 2069 | */ |
| 2069 | 2070 | |
| 2070 | 2071 | /*------------------------------------------------- |
| r1037 | r1038 | |
| 2145 | 2146 | *address = bytes_per_row * cury + memdata->byte_offset; |
| 2146 | 2147 | |
| 2147 | 2148 | /* the rest depends on the current format */ |
| 2148 | ||
| 2149 | /* non-reverse case */ | |
| 2150 | if (!memdata->reverse_view) | |
| 2149 | switch (memdata->bytes_per_chunk) | |
| 2151 | 2150 | { |
| 2152 | switch (memdata->bytes_per_chunk) | |
| 2153 | { | |
| 2154 | default: | |
| 2155 | case 1: | |
| 2156 | modval = curx % 3; | |
| 2157 | if (modval == 0) modval = 1; | |
| 2158 | modval -= 1; | |
| 2151 | default: | |
| 2152 | case 1: | |
| 2153 | modval = curx % 3; | |
| 2154 | if (modval == 0) modval = 1; | |
| 2155 | modval -= 1; | |
| 2156 | if (!memdata->reverse_view) | |
| 2159 | 2157 | *address += curx / 3; |
| 2160 | *shift = 4 - 4 * modval; | |
| 2161 | break; | |
| 2158 | else | |
| 2159 | *address += 15 - curx / 3; | |
| 2160 | *shift = 8-4 - 4 * modval; | |
| 2161 | break; | |
| 2162 | 2162 | |
| 2163 | case 2: | |
| 2164 | modval = curx % 6; | |
| 2165 | if (modval <= 1) modval = 2; | |
| 2166 | modval -= 2; | |
| 2163 | case 2: | |
| 2164 | modval = curx % 6; | |
| 2165 | if (modval <= 1) modval = 2; | |
| 2166 | modval -= 2; | |
| 2167 | if (!memdata->reverse_view) | |
| 2167 | 2168 | *address += 2 * (curx / 6); |
| 2168 | *shift = 12 - 4 * modval; | |
| 2169 | break; | |
| 2169 | else | |
| 2170 | *address += 14 - 2 * (curx / 6); | |
| 2171 | *shift = 16-4 - 4 * modval; | |
| 2172 | break; | |
| 2170 | 2173 | |
| 2171 | case 4: | |
| 2172 | modval = curx % 12; | |
| 2173 | if (modval <= 2) modval = 3; | |
| 2174 | if (modval == 11) modval = 10; | |
| 2175 | modval -= 3; | |
| 2174 | case 4: | |
| 2175 | modval = curx % 12; | |
| 2176 | if (modval <= 2) modval = 3; | |
| 2177 | if (modval == 11) modval = 10; | |
| 2178 | modval -= 3; | |
| 2179 | if (!memdata->reverse_view) | |
| 2176 | 2180 | *address += 4 * (curx / 12); |
| 2177 | *shift = 28 - 4 * modval; | |
| 2178 | break; | |
| 2179 | } | |
| 2181 | else | |
| 2182 | *address += 12 - 4 * (curx / 12); | |
| 2183 | *shift = 32-4 - 4 * modval; | |
| 2184 | break; | |
| 2185 | ||
| 2186 | case 8: | |
| 2187 | modval = curx % 24; | |
| 2188 | if (modval <= 4) modval = 5; | |
| 2189 | if (modval >= 21) modval = 20; | |
| 2190 | modval -= 5; | |
| 2191 | if (!memdata->reverse_view) | |
| 2192 | *address += 8 * (curx / 24); | |
| 2193 | else | |
| 2194 | *address += 8 - 8 * (curx / 24); | |
| 2195 | *shift = 64-4 - 4 * modval; | |
| 2196 | break; | |
| 2180 | 2197 | } |
| 2181 | else | |
| 2182 | { | |
| 2183 | switch (memdata->bytes_per_chunk) | |
| 2184 | { | |
| 2185 | default: | |
| 2186 | case 1: | |
| 2187 | modval = curx % 3; | |
| 2188 | if (modval == 0) modval = 1; | |
| 2189 | modval -= 1; | |
| 2190 | *address += 15 - curx / 3; | |
| 2191 | *shift = 4 - 4 * modval; | |
| 2192 | break; | |
| 2193 | 2198 | |
| 2194 | case 2: | |
| 2195 | modval = curx % 6; | |
| 2196 | if (modval <= 1) modval = 2; | |
| 2197 | modval -= 2; | |
| 2198 | *address += 14 - 2 * (curx / 6); | |
| 2199 | *shift = 12 - 4 * modval; | |
| 2200 | break; | |
| 2201 | ||
| 2202 | case 4: | |
| 2203 | modval = curx % 12; | |
| 2204 | if (modval <= 2) modval = 3; | |
| 2205 | if (modval == 11) modval = 10; | |
| 2206 | modval -= 3; | |
| 2207 | *address += 12 - 4 * (curx / 12); | |
| 2208 | *shift = 28 - 4 * modval; | |
| 2209 | break; | |
| 2210 | } | |
| 2211 | } | |
| 2212 | 2199 | return 1; |
| 2213 | 2200 | } |
| 2214 | 2201 | |
| r1037 | r1038 | |
| 2252 | 2239 | case 4: |
| 2253 | 2240 | curx = memdata->divider1 + 3 + 12 * ((address % bytes_per_row) / 4) + (7 - (shift / 4)); |
| 2254 | 2241 | break; |
| 2242 | ||
| 2243 | case 8: | |
| 2244 | curx = memdata->divider1 + 5 + 24 * ((address % bytes_per_row) / 8) + (15 - (shift / 4)); | |
| 2245 | break; | |
| 2255 | 2246 | } |
| 2256 | 2247 | } |
| 2257 | 2248 | else |
| r1037 | r1038 | |
| 2270 | 2261 | case 4: |
| 2271 | 2262 | curx = memdata->divider1 + 3 + 12 * (3 - (address % bytes_per_row) / 4) + (7 - (shift / 4)); |
| 2272 | 2263 | break; |
| 2264 | ||
| 2265 | case 8: | |
| 2266 | curx = memdata->divider1 + 5 + 24 * (1 - (address % bytes_per_row) / 8) + (15 - (shift / 4)); | |
| 2267 | break; | |
| 2273 | 2268 | } |
| 2274 | 2269 | } |
| 2275 | 2270 | |
| r1037 | r1038 | |
| 2292 | 2287 | static UINT8 memory_read_byte(debug_view_memory *memdata, offs_t offs, int apply_translation) |
| 2293 | 2288 | { |
| 2294 | 2289 | /* if no raw data, just use the standard debug routines */ |
| 2295 | if ( | |
| 2290 | if ( | |
| 2296 | 2291 | return debug_read_byte(memdata->spacenum, offs, apply_translation); |
| 2297 | 2292 | |
| 2298 | 2293 | /* all 0xff if out of bounds */ |
| r1037 | r1038 | |
| 2310 | 2305 | static UINT16 memory_read_word(debug_view_memory *memdata, offs_t offs, int apply_translation) |
| 2311 | 2306 | { |
| 2312 | 2307 | /* if no raw data, just use the standard debug routines */ |
| 2313 | if ( | |
| 2308 | if ( | |
| 2314 | 2309 | return debug_read_word(memdata->spacenum, offs, apply_translation); |
| 2315 | 2310 | |
| 2316 | 2311 | /* otherwise, decompose into bytes */ |
| r1037 | r1038 | |
| 2328 | 2323 | static UINT32 memory_read_dword(debug_view_memory *memdata, offs_t offs, int apply_translation) |
| 2329 | 2324 | { |
| 2330 | 2325 | /* if no raw data, just use the standard debug routines */ |
| 2331 | if ( | |
| 2326 | if ( | |
| 2332 | 2327 | return debug_read_dword(memdata->spacenum, offs, apply_translation); |
| 2333 | 2328 | |
| 2334 | 2329 | /* otherwise, decompose into words */ |
| r1037 | r1038 | |
| 2346 | 2341 | static UINT64 memory_read_qword(debug_view_memory *memdata, offs_t offs, int apply_translation) |
| 2347 | 2342 | { |
| 2348 | 2343 | /* if no raw data, just use the standard debug routines */ |
| 2349 | if ( | |
| 2344 | if ( | |
| 2350 | 2345 | return debug_read_qword(memdata->spacenum, offs, apply_translation); |
| 2351 | 2346 | |
| 2352 | 2347 | /* otherwise, decompose into dwords */ |
| 2353 | 2348 | if (memdata->raw_little_endian) |
| 2354 | return memory_read_word(memdata, offs + 0, apply_translation) | ((UINT64)memory_read_word(memdata, offs + 4, apply_translation) << 32); | |
| 2349 | return memory_read_dword(memdata, offs + 0, apply_translation) | ((UINT64)memory_read_dword(memdata, offs + 4, apply_translation) << 32); | |
| 2355 | 2350 | else |
| 2356 | return memory_read_word(memdata, offs + 4, apply_translation) | ((UINT64)memory_read_word(memdata, offs + 0, apply_translation) << 32); | |
| 2351 | return memory_read_dword(memdata, offs + 4, apply_translation) | ((UINT64)memory_read_dword(memdata, offs + 0, apply_translation) << 32); | |
| 2357 | 2352 | } |
| 2358 | 2353 | |
| 2359 | 2354 | |
| r1037 | r1038 | |
| 2364 | 2359 | static void memory_write_byte(debug_view_memory *memdata, offs_t offs, UINT8 data, int apply_translation) |
| 2365 | 2360 | { |
| 2366 | 2361 | /* if no raw data, just use the standard debug routines */ |
| 2367 | if ( | |
| 2362 | if ( | |
| 2368 | 2363 | { |
| 2369 | 2364 | debug_write_byte(memdata->spacenum, offs, data, apply_translation); |
| 2370 | 2365 | return; |
| r1037 | r1038 | |
| 2394 | 2389 | static void memory_write_word(debug_view_memory *memdata, offs_t offs, UINT16 data, int apply_translation) |
| 2395 | 2390 | { |
| 2396 | 2391 | /* if no raw data, just use the standard debug routines */ |
| 2397 | if ( | |
| 2392 | if ( | |
| 2398 | 2393 | { |
| 2399 | 2394 | debug_write_word(memdata->spacenum, offs, data, apply_translation); |
| 2400 | 2395 | return; |
| r1037 | r1038 | |
| 2421 | 2416 | static void memory_write_dword(debug_view_memory *memdata, offs_t offs, UINT32 data, int apply_translation) |
| 2422 | 2417 | { |
| 2423 | 2418 | /* if no raw data, just use the standard debug routines */ |
| 2424 | if ( | |
| 2419 | if ( | |
| 2425 | 2420 | { |
| 2426 | 2421 | debug_write_dword(memdata->spacenum, offs, data, apply_translation); |
| 2427 | 2422 | return; |
| r1037 | r1038 | |
| 2448 | 2443 | static void memory_write_qword(debug_view_memory *memdata, offs_t offs, UINT64 data, int apply_translation) |
| 2449 | 2444 | { |
| 2450 | 2445 | /* if no raw data, just use the standard debug routines */ |
| 2451 | if ( | |
| 2446 | if ( | |
| 2452 | 2447 | { |
| 2453 | 2448 | debug_write_qword(memdata->spacenum, offs, data, apply_translation); |
| 2454 | 2449 | return; |
| r1037 | r1038 | |
| 2565 | 2560 | memory_write_byte(memdata, address, (memory_read_byte(memdata, address, !memdata->no_translation) & ~(0xf << shift)) | ((hexchar - hexvals) << shift), !memdata->no_translation); |
| 2566 | 2561 | if (hexchar || chval == DCH_RIGHT) |
| 2567 | 2562 | { |
| 2568 | if (shift == 0) { shift = 4; if (address != maxaddr) address++; } | |
| 2563 | if (shift == 0) { shift = 8-4; if (address != maxaddr) address++; } | |
| 2569 | 2564 | else shift -= 4; |
| 2570 | 2565 | } |
| 2571 | 2566 | else if (chval == DCH_LEFT) |
| 2572 | 2567 | { |
| 2573 | if (shift == 4) { shift = 0; if (address != 0) address--; } | |
| 2568 | if (shift == 8-4) { shift = 0; if (address != 0) address--; } | |
| 2574 | 2569 | else shift += 4; |
| 2575 | 2570 | } |
| 2576 | 2571 | break; |
| r1037 | r1038 | |
| 2580 | 2575 | memory_write_word(memdata, address, (memory_read_word(memdata, address, !memdata->no_translation) & ~(0xf << shift)) | ((hexchar - hexvals) << shift), !memdata->no_translation); |
| 2581 | 2576 | if (hexchar || chval == DCH_RIGHT) |
| 2582 | 2577 | { |
| 2583 | if (shift == 0) { shift = 1 | |
| 2578 | if (shift == 0) { shift = 16-4; if (address != maxaddr) address += 2; } | |
| 2584 | 2579 | else shift -= 4; |
| 2585 | 2580 | } |
| 2586 | 2581 | else if (chval == DCH_LEFT) |
| 2587 | 2582 | { |
| 2588 | if (shift == 1 | |
| 2583 | if (shift == 16-4) { shift = 0; if (address != 0) address -= 2; } | |
| 2589 | 2584 | else shift += 4; |
| 2590 | 2585 | } |
| 2591 | 2586 | break; |
| r1037 | r1038 | |
| 2595 | 2590 | memory_write_dword(memdata, address, (memory_read_dword(memdata, address, !memdata->no_translation) & ~(0xf << shift)) | ((hexchar - hexvals) << shift), !memdata->no_translation); |
| 2596 | 2591 | if (hexchar || chval == DCH_RIGHT) |
| 2597 | 2592 | { |
| 2598 | if (shift == 0) { shift = 2 | |
| 2593 | if (shift == 0) { shift = 32-4; if (address != maxaddr) address += 4; } | |
| 2599 | 2594 | else shift -= 4; |
| 2600 | 2595 | } |
| 2601 | 2596 | else if (chval == DCH_LEFT) |
| 2602 | 2597 | { |
| 2603 | if (shift == 2 | |
| 2598 | if (shift == 32-4) { shift = 0; if (address != 0) address -= 4; } | |
| 2604 | 2599 | else shift += 4; |
| 2605 | 2600 | } |
| 2606 | 2601 | break; |
| 2602 | ||
| 2603 | case 8: | |
| 2604 | if (hexchar) | |
| 2605 | memory_write_qword(memdata, address, (memory_read_qword(memdata, address, !memdata->no_translation) & ~((UINT64)0xf << shift)) | ((UINT64)(hexchar - hexvals) << shift), !memdata->no_translation); | |
| 2606 | if (hexchar || chval == DCH_RIGHT) | |
| 2607 | { | |
| 2608 | if (shift == 0) { shift = 64-4; if (address != maxaddr) address += 8; } | |
| 2609 | else shift -= 4; | |
| 2610 | } | |
| 2611 | else if (chval == DCH_LEFT) | |
| 2612 | { | |
| 2613 | if (shift == 64-4) { shift = 0; if (address != 0) address -= 8; } | |
| 2614 | else shift += 4; | |
| 2615 | } | |
| 2616 | break; | |
| 2607 | 2617 | } |
| 2608 | 2618 | cpuintrf_pop_context(); |
| 2609 | 2619 | |
| r1037 | r1038 | |
| 2659 | 2669 | /* determine how many characters we need for an address and set the divider */ |
| 2660 | 2670 | sprintf(addrformat, " %*s%%0%dX ", 8 - addrchars, "", addrchars); |
| 2661 | 2671 | |
| 2662 | ||
| 2663 | 2672 | /* determine how wide the memory display area is */ |
| 2664 | 2673 | bytes_per_line = memdata->chunks_displayed * memdata->bytes_per_chunk; |
| 2665 | 2674 | memory_display_width = 1 + (bytes_per_line * 3) + 1; /* characters + spaces */ |
| 2666 | 2675 | |
| 2667 | ||
| 2668 | 2676 | /* compute total displayed rows and columns */ |
| 2669 | 2677 | view->total_rows = (maxaddr / bytes_per_line) + 1; |
| 2670 | 2678 | view->total_cols = (1 + 8 + 1) + memory_display_width; |
| r1037 | r1038 | |
| 2750 | 2758 | offs_t curaddr = addrbyte + i; |
| 2751 | 2759 | if (curaddr > maxaddr) |
| 2752 | 2760 | len += sprintf(&data[len], " "); |
| 2753 | else if (memdata->raw_base | |
| 2761 | else if (memdata->raw_base != NULL || memdata->no_translation || | |
| 2754 | 2762 | cpuinfo->translate == NULL || (*cpuinfo->translate)(memdata->spacenum, &curaddr)) |
| 2755 | 2763 | len += sprintf(&data[len], "%02X ", memory_read_byte(memdata, addrbyte + i, !memdata->no_translation)); |
| 2756 | 2764 | else |
| r1037 | r1038 | |
| 2764 | 2772 | offs_t curaddr = addrbyte + 2 * i; |
| 2765 | 2773 | if (curaddr > maxaddr) |
| 2766 | 2774 | len += sprintf(&data[len], " "); |
| 2767 | else if (memdata->raw_base | |
| 2775 | else if (memdata->raw_base != NULL || memdata->no_translation || | |
| 2768 | 2776 | cpuinfo->translate == NULL || (*cpuinfo->translate)(memdata->spacenum, &curaddr)) |
| 2769 | 2777 | len += sprintf(&data[len], " %04X ", memory_read_word(memdata, addrbyte + 2 * i, !memdata->no_translation)); |
| 2770 | 2778 | else |
| r1037 | r1038 | |
| 2778 | 2786 | offs_t curaddr = addrbyte + 4 * i; |
| 2779 | 2787 | if (curaddr > maxaddr) |
| 2780 | 2788 | len += sprintf(&data[len], " "); |
| 2781 | else if (memdata->raw_base | |
| 2789 | else if (memdata->raw_base != NULL || memdata->no_translation || | |
| 2782 | 2790 | cpuinfo->translate == NULL || (*cpuinfo->translate)(memdata->spacenum, &curaddr)) |
| 2783 | 2791 | len += sprintf(&data[len], " %08X ", memory_read_dword(memdata, addrbyte + 4 * i, !memdata->no_translation)); |
| 2784 | 2792 | else |
| 2785 | 2793 | len += sprintf(&data[len], " ******** "); |
| 2786 | 2794 | } |
| 2787 | 2795 | break; |
| 2796 | ||
| 2797 | case 8: | |
| 2798 | for (i = 0; i < memdata->chunks_displayed; i++) | |
| 2799 | { | |
| 2800 | offs_t curaddr = addrbyte + 8 * i; | |
| 2801 | if (curaddr > maxaddr) | |
| 2802 | len += sprintf(&data[len], " "); | |
| 2803 | else if (memdata->raw_base != NULL || memdata->no_translation || | |
| 2804 | cpuinfo->translate == NULL || (*cpuinfo->translate)(memdata->spacenum, &curaddr)) | |
| 2805 | { | |
| 2806 | UINT64 qword = memory_read_qword(memdata, addrbyte + 8 * i, !memdata->no_translation); | |
| 2807 | len += sprintf(&data[len], " %08X%08X ", (UINT32)(qword >> 32), (UINT32)qword); | |
| 2808 | } | |
| 2809 | else | |
| 2810 | len += sprintf(&data[len], " **************** "); | |
| 2811 | } | |
| 2812 | break; | |
| 2788 | 2813 | } |
| 2789 | 2814 | len += sprintf(&data[len], " "); |
| 2790 | 2815 | if (memdata->ascii_view) |
| r1037 | r1038 | |
| 2829 | 2854 | offs_t curaddr = addrbyte + i; |
| 2830 | 2855 | if (curaddr > maxaddr) |
| 2831 | 2856 | len += sprintf(&data[len], " "); |
| 2832 | else if (memdata->raw_base | |
| 2857 | else if (memdata->raw_base != NULL || memdata->no_translation || | |
| 2833 | 2858 | cpuinfo->translate == NULL || (*cpuinfo->translate)(memdata->spacenum, &curaddr)) |
| 2834 | 2859 | len += sprintf(&data[len], "%02X ", memory_read_byte(memdata, addrbyte + i, !memdata->no_translation)); |
| 2835 | 2860 | else |
| r1037 | r1038 | |
| 2843 | 2868 | offs_t curaddr = addrbyte + 2 * i; |
| 2844 | 2869 | if (curaddr > maxaddr) |
| 2845 | 2870 | len += sprintf(&data[len], " "); |
| 2846 | else if (memdata->raw_base | |
| 2871 | else if (memdata->raw_base != NULL || memdata->no_translation || | |
| 2847 | 2872 | cpuinfo->translate == NULL || (*cpuinfo->translate)(memdata->spacenum, &curaddr)) |
| 2848 | 2873 | len += sprintf(&data[len], " %04X ", memory_read_word(memdata, addrbyte + 2 * i, !memdata->no_translation)); |
| 2849 | 2874 | else |
| r1037 | r1038 | |
| 2857 | 2882 | offs_t curaddr = addrbyte + 4 * i; |
| 2858 | 2883 | if (curaddr > maxaddr) |
| 2859 | 2884 | len += sprintf(&data[len], " "); |
| 2860 | else if (memdata->raw_base | |
| 2885 | else if (memdata->raw_base != NULL || memdata->no_translation || | |
| 2861 | 2886 | cpuinfo->translate == NULL || (*cpuinfo->translate)(memdata->spacenum, &curaddr)) |
| 2862 | 2887 | len += sprintf(&data[len], " %08X ", memory_read_dword(memdata, addrbyte + 4 * i, !memdata->no_translation)); |
| 2863 | 2888 | else |
| 2864 | 2889 | len += sprintf(&data[len], " ******** "); |
| 2865 | 2890 | } |
| 2866 | 2891 | break; |
| 2892 | ||
| 2893 | case 8: | |
| 2894 | for (i = memdata->chunks_displayed - 1; i >= 0; i--) | |
| 2895 | { | |
| 2896 | offs_t curaddr = addrbyte + 8 * i; | |
| 2897 | if (curaddr > maxaddr) | |
| 2898 | len += sprintf(&data[len], " "); | |
| 2899 | else if (memdata->raw_base != NULL || memdata->no_translation || | |
| 2900 | cpuinfo->translate == NULL || (*cpuinfo->translate)(memdata->spacenum, &curaddr)) | |
| 2901 | { | |
| 2902 | UINT64 qword = memory_read_qword(memdata, addrbyte + 8 * i, !memdata->no_translation); | |
| 2903 | len += sprintf(&data[len], " %08X%08X ", (UINT32)(qword >> 32), (UINT32)qword); | |
| 2904 | } | |
| 2905 | else | |
| 2906 | len += sprintf(&data[len], " **************** "); | |
| 2907 | } | |
| 2908 | break; | |
| 2867 | 2909 | } |
| 2868 | 2910 | len += sprintf(&data[len], addrformat, BYTE2ADDR(addrbyte & addrmask, cpuinfo, memdata->spacenum)); |
| 2869 | 2911 | } |
| r1037 | r1038 | |
| 3045 | 3087 | memdata->chunks_displayed = memdata->chunks_displayed * |
| 3046 | 3088 | memdata->bytes_per_chunk / value.i; |
| 3047 | 3089 | |
| 3048 | if (memdata->chunks_displayed <= 0) memdata->chunks_displayed = 1; | |
| 3090 | if (memdata->chunks_displayed <= 0) | |
| 3091 | memdata->chunks_displayed = 1; | |
| 3049 | 3092 | |
| 3050 | 3093 | memdata->bytes_per_chunk = value.i; |
| 3051 | 3094 | view->update_pending = TRUE; |
| r1037 | r1038 | |
|---|---|---|
| 160 | 160 | static UINT16 h8_inc16(UINT16 src); |
| 161 | 161 | static UINT32 h8_inc32(UINT32 src); |
| 162 | 162 | |
| 163 | static UINT8 h8_bnot8(UINT8 src, UINT8 dst); | |
| 163 | //static UINT8 h8_bnot8(UINT8 src, UINT8 dst); | |
| 164 | 164 | static UINT8 h8_bst8(UINT8 src, UINT8 dst); |
| 165 | 165 | static UINT8 h8_bist8(UINT8 src, UINT8 dst); |
| 166 | 166 | static UINT8 h8_bset8(UINT8 src, UINT8 dst); |
| r1037 | r1038 | |
| 168 | 168 | static void h8_btst8(UINT8 src, UINT8 dst); |
| 169 | 169 | static void h8_bld8(UINT8 src, UINT8 dst); // loads to carry |
| 170 | 170 | static void h8_bor8(UINT8 src, UINT8 dst); // result in carry |
| 171 | static void h8_bxor8(UINT8 src, UINT8 dst); | |
| 171 | //static void h8_bxor8(UINT8 src, UINT8 dst); | |
| 172 | 172 | |
| 173 | 173 | static INT32 h8_mulxs16(INT16 src, INT16 dst); |
| 174 | 174 | static UINT32 h8_divxs16(INT16 src, INT32 dst); |
| r1037 | r1038 | |
| 2751 | 2751 | h8.h8cflag = (dst >> bit) & 1; |
| 2752 | 2752 | } |
| 2753 | 2753 | |
| 2754 | #ifdef UNUSED_FUNCTION | |
| 2754 | 2755 | static UINT8 h8_bnot8(UINT8 src, UINT8 dst) |
| 2755 | 2756 | { |
| 2756 | 2757 | UINT8 res; |
| r1037 | r1038 | |
| 2760 | 2761 | |
| 2761 | 2762 | return res; |
| 2762 | 2763 | } |
| 2764 | #endif | |
| 2763 | 2765 | |
| 2764 | 2766 | static UINT8 h8_bst8(UINT8 src, UINT8 dst) |
| 2765 | 2767 | { |
| r1037 | r1038 | |
| 2811 | 2813 | h8.h8cflag |= res ? 1 : 0; |
| 2812 | 2814 | } |
| 2813 | 2815 | |
| 2816 | #ifdef UNUSED_FUNCTION | |
| 2814 | 2817 | static void h8_bxor8(UINT8 src, UINT8 dst) |
| 2815 | 2818 | { |
| 2816 | 2819 | dst >>= src; |
| 2817 | 2820 | dst &= 0x1; |
| 2818 | 2821 | h8.h8cflag ^= dst; |
| 2819 | 2822 | } |
| 2823 | #endif | |
| 2820 | 2824 | |
| 2821 | 2825 | static UINT8 h8_bclr8(UINT8 src, UINT8 dst) |
| 2822 | 2826 | { |
| r1037 | r1038 | |
|---|---|---|
| 667 | 667 | tms34010_io_register_w(REG_HSTCTLH, 0x8000, 0); |
| 668 | 668 | } |
| 669 | 669 | |
| 670 | #if (HAS_TMS34020) | |
| 670 | 671 | static void tms34020_reset(void) |
| 671 | 672 | { |
| 672 | 673 | tms34010_reset(); |
| 673 | 674 | state.is_34020 = 1; |
| 674 | 675 | } |
| 676 | #endif | |
| 675 | 677 | |
| 676 | 678 | |
| 677 | 679 | |
| r1037 | r1038 | |
| 696 | 698 | memcpy(dst, &state, TMS34010_STATE_SIZE); |
| 697 | 699 | } |
| 698 | 700 | |
| 701 | #if (HAS_TMS34020) | |
| 699 | 702 | static void tms34020_get_context(void *dst) |
| 700 | 703 | { |
| 701 | 704 | if (dst) |
| 702 | 705 | memcpy(dst, &state, TMS34020_STATE_SIZE); |
| 703 | 706 | } |
| 707 | #endif | |
| 704 | 708 | |
| 705 | 709 | |
| 706 | 710 | |
| r1037 | r1038 | |
| 715 | 719 | change_pc(TOBYTE(PC)); |
| 716 | 720 | } |
| 717 | 721 | |
| 722 | #if (HAS_TMS34020) | |
| 718 | 723 | static void tms34020_set_context(void *src) |
| 719 | 724 | { |
| 720 | 725 | if (src) |
| 721 | 726 | memcpy(&state, src, TMS34020_STATE_SIZE); |
| 722 | 727 | change_pc(TOBYTE(PC)); |
| 723 | 728 | } |
| 729 | #endif | |
| 724 | 730 | |
| 725 | 731 | |
| 726 | 732 |
| r1037 | r1038 | |
|---|---|---|
| 792 | 792 | DBGOBJS += $(CPUOBJ)/mips/mips3dsm.o |
| 793 | 793 | |
| 794 | 794 | ifdef X86_MIPS3_DRC |
| 795 | CPUOBJS += $(CPUOBJ)/mips/mips3drc.o $(DRCOBJ) | |
| 795 | CPUOBJS += $(CPUOBJ)/mips/mips3drc.o $(CPUOBJ)/mips/mips3fe.o $(DRCOBJ) | |
| 796 | 796 | else |
| 797 | 797 | CPUOBJS += $(CPUOBJ)/mips/mips3.o |
| 798 | 798 | endif |
| r1037 | r1038 | |
| 804 | 804 | |
| 805 | 805 | $(CPUOBJ)/mips/mips3drc.o: $(CPUSRC)/mips/mips3drc.c \ |
| 806 | 806 | $(CPUSRC)/mips/mdrcold.c \ |
| 807 | $(CPUSRC)/mips/mdrc64.c \ | |
| 807 | 808 | $(CPUSRC)/mips/mips3.h \ |
| 808 | 809 | $(CPUSRC)/mips/mips3com.h \ |
| 810 | $(CPUSRC)/mips/mips3fe.h \ | |
| 809 | 811 | $(DRCDEPS) |
| 810 | 812 | |
| 811 | 813 | |
| r1037 | r1038 | |
| 1134 | 1136 | endif |
| 1135 | 1137 | |
| 1136 | 1138 | ifneq ($(filter V30MZ,$(CPUS)),) |
| 1137 | OBJDIRS += $(CPUOBJ)/v30mz | |
| 1139 | OBJDIRS += $(CPUOBJ)/v30mz $(CPUOBJ)/nec | |
| 1138 | 1140 | CPUOBJS += $(CPUOBJ)/v30mz/v30mz.o |
| 1139 | 1141 | DBGOBJS += $(CPUOBJ)/nec/necdasm.o |
| 1140 | 1142 | endif |
| r1037 | r1038 | |
|---|---|---|
| 1030 | 1030 | return 0; |
| 1031 | 1031 | } |
| 1032 | 1032 | |
| 1033 | #ifdef UNUSED_FUNCTION | |
| 1033 | 1034 | static UINT32 dasm_cjump_rframe(UINT32 pc, UINT64 opcode) |
| 1034 | 1035 | { |
| 1035 | 1036 | /* TODO */ |
| r1037 | r1038 | |
| 1043 | 1044 | } |
| 1044 | 1045 | return 0; |
| 1045 | 1046 | } |
| 1047 | #endif | |
| 1046 | 1048 | |
| 1047 | 1049 | static UINT32 dasm_invalid(UINT32 pc, UINT64 opcode) |
| 1048 | 1050 | { |
| r1037 | r1038 | |
|---|---|---|
| 432 | 432 | |
| 433 | 433 | static void take_interrupt(int irq) |
| 434 | 434 | { |
| 435 | if( _IFF1 ) | |
| 436 | { | |
| 437 | int irq_vector; | |
| 435 | int irq_vector; | |
| 438 | 436 | |
| 439 | /* there isn't a valid previous program counter */ | |
| 440 | _PPC = -1; | |
| 437 | /* there isn't a valid previous program counter */ | |
| 438 | _PPC = -1; | |
| 441 | 439 | |
| 442 | /* Check if processor was halted */ | |
| 443 | LEAVE_HALT; | |
| 440 | /* Check if processor was halted */ | |
| 441 | LEAVE_HALT; | |
| 444 | 442 | |
| 445 | if( irq == Z180_INT0 ) | |
| 446 | { | |
| 447 | /* Clear both interrupt flip flops */ | |
| 448 | _IFF1 = _IFF2 = 0; | |
| 443 | /* Clear both interrupt flip flops */ | |
| 444 | _IFF1 = _IFF2 = 0; | |
| 449 | 445 | |
| 450 | /* Daisy chain mode? If so, call the requesting device */ | |
| 451 | if (Z180.daisy) | |
| 452 | irq_vector = z80daisy_call_ack_device(Z180.daisy); | |
| 446 | if( irq == Z180_INT0 ) | |
| 447 | { | |
| 448 | /* Daisy chain mode? If so, call the requesting device */ | |
| 449 | if (Z180.daisy) | |
| 450 | irq_vector = z80daisy_call_ack_device(Z180.daisy); | |
| 453 | 451 | |
| 454 | /* else call back the cpu interface to retrieve the vector */ | |
| 455 | else | |
| 456 | irq_vector = (*Z180.irq_callback)(0); | |
| 452 | /* else call back the cpu interface to retrieve the vector */ | |
| 453 | else | |
| 454 | irq_vector = (*Z180.irq_callback)(0); | |
| 457 | 455 | |
| 458 | | |
| 456 | | |
| 459 | 457 | |
| 460 | /* Interrupt mode 2. Call [Z180.I:databyte] */ | |
| 461 | if( _IM == 2 ) | |
| 462 | { | |
| 463 | irq_vector = (irq_vector & 0xff) + (_I << 8); | |
| 464 | PUSH( PC ); | |
| 465 | RM16( irq_vector, &Z180.PC ); | |
| 466 | LOG(("Z180 #%d IM2 [$%04x] = $%04x\n",cpu_getactivecpu() , irq_vector, _PCD)); | |
| 467 | /* CALL opcode timing */ | |
| 468 | Z180.extra_cycles += cc[Z180_TABLE_op][0xcd]; | |
| 469 | } | |
| 470 | else | |
| 471 | /* Interrupt mode 1. RST 38h */ | |
| 472 | if( _IM == 1 ) | |
| 473 | { | |
| 474 | LOG(("Z180 #%d IM1 $0038\n",cpu_getactivecpu() )); | |
| 475 | PUSH( PC ); | |
| 476 | _PCD = 0x0038; | |
| 477 | /* RST $38 + 'interrupt latency' cycles */ | |
| 478 | Z180.extra_cycles += cc[Z180_TABLE_op][0xff] + cc[Z180_TABLE_ex][0xff]; | |
| 479 | } | |
| 480 | else | |
| 481 | { | |
| 482 | /* Interrupt mode 0. We check for CALL and JP instructions, */ | |
| 483 | /* if neither of these were found we assume a 1 byte opcode */ | |
| 484 | /* was placed on the databus */ | |
| 485 | LOG(("Z180 #%d IM0 $%04x\n",cpu_getactivecpu() , irq_vector)); | |
| 486 | switch (irq_vector & 0xff0000) | |
| 487 | { | |
| 488 | case 0xcd0000: /* call */ | |
| 489 | PUSH( PC ); | |
| 490 | _PCD = irq_vector & 0xffff; | |
| 491 | /* CALL $xxxx + 'interrupt latency' cycles */ | |
| 492 | Z180.extra_cycles += cc[Z180_TABLE_op][0xcd] + cc[Z180_TABLE_ex][0xff]; | |
| 493 | break; | |
| 494 | case 0xc30000: /* jump */ | |
| 495 | _PCD = irq_vector & 0xffff; | |
| 496 | /* JP $xxxx + 2 cycles */ | |
| 497 | Z180.extra_cycles += cc[Z180_TABLE_op][0xc3] + cc[Z180_TABLE_ex][0xff]; | |
| 498 | break; | |
| 499 | default: /* rst (or other opcodes?) */ | |
| 500 | PUSH( PC ); | |
| 501 | _PCD = irq_vector & 0x0038; | |
| 502 | /* RST $xx + 2 cycles */ | |
| 503 | Z180.extra_cycles += cc[Z180_TABLE_op][_PCD] + cc[Z180_TABLE_ex][_PCD]; | |
| 504 | break; | |
| 505 | } | |
| 506 | } | |
| 507 | } | |
| 508 | else | |
| 458 | /* Interrupt mode 2. Call [Z180.I:databyte] */ | |
| 459 | if( _IM == 2 ) | |
| 509 | 460 | { |
| 510 | irq_vector = (IO(Z180_IL) & Z180_IL_IL) + (irq - Z180_INT1) * 2; | |
| 511 | irq_vector = (_I << 8) + (irq_vector & 0xff); | |
| 461 | irq_vector = (irq_vector & 0xff) + (_I << 8); | |
| 512 | 462 | PUSH( PC ); |
| 513 | 463 | RM16( irq_vector, &Z180.PC ); |
| 514 | LOG(("Z180 #%d I | |
| 464 | LOG(("Z180 #%d IM2 | |
| 515 | 465 | /* CALL opcode timing */ |
| 516 | | |
| 466 | z180 | |
| 517 | 467 | } |
| 518 | z180_change_pc(_PCD); | |
| 468 | else | |
| 469 | /* Interrupt mode 1. RST 38h */ | |
| 470 | if( _IM == 1 ) | |
| 471 | { | |
| 472 | LOG(("Z180 #%d IM1 $0038\n",cpu_getactivecpu() )); | |
| 473 | PUSH( PC ); | |
| 474 | _PCD = 0x0038; | |
| 475 | /* RST $38 + 'interrupt latency' cycles */ | |
| 476 | z180_icount -= cc[Z180_TABLE_op][0xff] - cc[Z180_TABLE_ex][0xff]; | |
| 477 | } | |
| 478 | else | |
| 479 | { | |
| 480 | /* Interrupt mode 0. We check for CALL and JP instructions, */ | |
| 481 | /* if neither of these were found we assume a 1 byte opcode */ | |
| 482 | /* was placed on the databus */ | |
| 483 | LOG(("Z180 #%d IM0 $%04x\n",cpu_getactivecpu() , irq_vector)); | |
| 484 | switch (irq_vector & 0xff0000) | |
| 485 | { | |
| 486 | case 0xcd0000: /* call */ | |
| 487 | PUSH( PC ); | |
| 488 | _PCD = irq_vector & 0xffff; | |
| 489 | /* CALL $xxxx + 'interrupt latency' cycles */ | |
| 490 | z180_icount -= cc[Z180_TABLE_op][0xcd] - cc[Z180_TABLE_ex][0xff]; | |
| 491 | break; | |
| 492 | case 0xc30000: /* jump */ | |
| 493 | _PCD = irq_vector & 0xffff; | |
| 494 | /* JP $xxxx + 2 cycles */ | |
| 495 | z180_icount -= cc[Z180_TABLE_op][0xc3] - cc[Z180_TABLE_ex][0xff]; | |
| 496 | break; | |
| 497 | default: /* rst (or other opcodes?) */ | |
| 498 | PUSH( PC ); | |
| 499 | _PCD = irq_vector & 0x0038; | |
| 500 | /* RST $xx + 2 cycles */ | |
| 501 | z180_icount -= cc[Z180_TABLE_op][_PCD] - cc[Z180_TABLE_ex][_PCD]; | |
| 502 | break; | |
| 503 | } | |
| 504 | } | |
| 519 | 505 | } |
| 506 | else | |
| 507 | { | |
| 508 | irq_vector = (IO(Z180_IL) & Z180_IL_IL) + (irq - Z180_INT1) * 2; | |
| 509 | irq_vector = (_I << 8) + (irq_vector & 0xff); | |
| 510 | PUSH( PC ); | |
| 511 | RM16( irq_vector, &Z180.PC ); | |
| 512 | LOG(("Z180 #%d INT%d [$%04x] = $%04x\n", cpu_getactivecpu(), irq, irq_vector, _PCD)); | |
| 513 | /* CALL opcode timing */ | |
| 514 | z180_icount -= cc[Z180_TABLE_op][0xcd]; | |
| 515 | } | |
| 516 | z180_change_pc(_PCD); | |
| 517 | ||
| 518 | ||
| 520 | 519 | } |
| 521 | 520 |
| r1037 | r1038 | |
|---|---|---|
| 1 | 1 | /***************************************************************************** |
| 2 | 2 | * |
| 3 | 3 | * z180.c |
| 4 | * Portable Z180 emulator V0. | |
| 4 | * Portable Z180 emulator V0.3 | |
| 5 | 5 | * |
| 6 | 6 | * Copyright (C) 2000 Juergen Buchmueller, all rights reserved. |
| 7 | 7 | * |
| r1037 | r1038 | |
| 59 | 59 | |
| 60 | 60 | /* execute main opcodes inside a big switch statement */ |
| 61 | 61 | #ifndef BIG_SWITCH |
| 62 | #define BIG_SWITCH | |
| 62 | #define BIG_SWITCH | |
| 63 | 63 | #endif |
| 64 | 64 | |
| 65 | 65 | /* use big flag arrays (4*64K) for ADD/ADC/SUB/SBC/CP results */ |
| r1037 | r1038 | |
| 69 | 69 | #define Z180_EXACT 1 |
| 70 | 70 | |
| 71 | 71 | /* on JP and JR opcodes check for tight loops */ |
| 72 | #define BUSY_LOOP_HACKS | |
| 72 | #define BUSY_LOOP_HACKS | |
| 73 | 73 | |
| 74 | 74 | /* check for delay loops counting down BC */ |
| 75 | #define TIME_LOOP_HACKS | |
| 75 | #define TIME_LOOP_HACKS | |
| 76 | 76 | |
| 77 | static void set_irq_line(int irqline, int state); | |
| 78 | ||
| 77 | 79 | /****************************************************************************/ |
| 78 | 80 | /* The Z180 registers. HALT is set to 1 when the CPU is halted, the refresh */ |
| 79 | 81 | /* register is calculated as follows: refresh=(Regs.R&127)|(Regs.R2&128) */ |
| r1037 | r1038 | |
| 83 | 85 | PAIR AF2,BC2,DE2,HL2; |
| 84 | 86 | UINT8 R,R2,IFF1,IFF2,HALT,IM,I; |
| 85 | 87 | UINT8 tmdr_latch; /* flag latched TMDR0H, TMDR1H values */ |
| 88 | UINT8 read_tcr_tmdr[2]; /* flag to indicate that TCR or TMDR was read */ | |
| 86 | 89 | UINT32 iol; /* I/O line status bits */ |
| 87 | 90 | UINT8 io[64]; /* 64 internal 8 bit registers */ |
| 88 | 91 | offs_t mmu[16]; /* MMU address translation */ |
| 89 | UINT8 tmdr[2]; /* latched TMDR0H and TMDR1H values */ | |
| 92 | UINT8 tmdrh[2]; /* latched TMDR0H and TMDR1H values */ | |
| 93 | UINT16 tmdr_value[2]; /* TMDR values used byt PRT0 and PRT1 as down counter */ | |
| 94 | UINT8 tif[2]; /* TIF0 and TIF1 values */ | |
| 90 | 95 | UINT8 nmi_state; /* nmi line state */ |
| 96 | UINT8 nmi_pending; /* nmi pending */ | |
| 91 | 97 | UINT8 irq_state[3]; /* irq line states (INT0,INT1,INT2) */ |
| 98 | UINT8 after_EI; /* are we in the EI shadow? */ | |
| 92 | 99 | const struct z80_irq_daisy_chain *daisy; |
| 93 | 100 | int (*irq_callback)(int irqline); |
| 94 | int extra_cycles; /* extra cycles for interrupts */ | |
| 95 | 101 | } Z180_Regs; |
| 96 | 102 | |
| 97 | 103 | #define CF 0x01 |
| r1037 | r1038 | |
| 400 | 406 | |
| 401 | 407 | #define Z180_TCR_RESET 0x00 |
| 402 | 408 | #define Z180_TCR_RMASK 0xff |
| 403 | #define Z180_TCR_WMASK 0x | |
| 409 | #define Z180_TCR_WMASK 0x3f | |
| 404 | 410 | |
| 405 | 411 | /* 11 reserved */ |
| 406 | 412 | #define Z180_IO11_RESET 0x00 |
| r1037 | r1038 | |
| 740 | 746 | int z180_icount; |
| 741 | 747 | static Z180_Regs Z180; |
| 742 | 748 | static UINT32 EA; |
| 743 | static int after_EI = 0; | |
| 744 | 749 | |
| 745 | 750 | static UINT8 SZ[256]; /* zero and sign flags */ |
| 746 | 751 | static UINT8 SZ_BIT[256]; /* zero, sign and parity/overflow (=zero) flags for BIT opcode */ |
| r1037 | r1038 | |
| 789 | 794 | /* normal external readport */ |
| 790 | 795 | UINT8 data = io_read_byte_8(port); |
| 791 | 796 | |
| 797 | /* remap internal I/O registers */ | |
| 798 | if((port & (IO_IOCR & 0xc0)) == (IO_IOCR & 0xc0)) | |
| 799 | port = port - (IO_IOCR & 0xc0); | |
| 800 | ||
| 792 | 801 | /* but ignore the data and read the internal register */ |
| 793 | switch ( | |
| 802 | switch ( | |
| 794 | 803 | { |
| 795 | 804 | case Z180_CNTLA0: |
| 796 | 805 | data = IO_CNTLA0 & Z180_CNTLA0_RMASK; |
| r1037 | r1038 | |
| 854 | 863 | break; |
| 855 | 864 | |
| 856 | 865 | case Z180_TMDR0L: |
| 857 | data = | |
| 866 | data = Z180.tmdr_value[0] & Z180_TMDR0L_RMASK; | |
| 858 | 867 | LOG(("Z180 #%d TMDR0L rd $%02x ($%02x)\n", cpu_getactivecpu(), data, Z180.io[port & 0x3f])); |
| 859 | 868 | /* if timer is counting, latch the MSB and set the latch flag */ |
| 860 | 869 | if ((IO_TCR & Z180_TCR_TDE0) == 0) |
| 861 | 870 | { |
| 862 | 871 | Z180.tmdr_latch |= 1; |
| 863 | Z180.tmdr[0] = | |
| 872 | Z180.tmdrh[0] = (Z180.tmdr_value[0] & 0xff00) >> 8; | |
| 864 | 873 | } |
| 874 | ||
| 875 | if(Z180.read_tcr_tmdr[0]) | |
| 876 | { | |
| 877 | Z180.tif[0] = 0; // reset TIF0 | |
| 878 | Z180.read_tcr_tmdr[0] = 0; | |
| 879 | } | |
| 880 | else | |
| 881 | { | |
| 882 | Z180.read_tcr_tmdr[0] = 1; | |
| 883 | } | |
| 865 | 884 | break; |
| 866 | 885 | |
| 867 | 886 | case Z180_TMDR0H: |
| r1037 | r1038 | |
| 869 | 888 | if (Z180.tmdr_latch & 1) |
| 870 | 889 | { |
| 871 | 890 | Z180.tmdr_latch &= ~1; |
| 872 | data = Z180.tmdr[0] | |
| 891 | data = Z180.tmdrh[0] | |
| 873 | 892 | } |
| 874 | 893 | else |
| 875 | 894 | { |
| 876 | data = | |
| 895 | data = (Z180.tmdr_value[0] & | |
| 877 | 896 | } |
| 897 | ||
| 898 | if(Z180.read_tcr_tmdr[0]) | |
| 899 | { | |
| 900 | Z180.tif[0] = 0; // reset TIF0 | |
| 901 | Z180.read_tcr_tmdr[0] = 0; | |
| 902 | } | |
| 903 | else | |
| 904 | { | |
| 905 | Z180.read_tcr_tmdr[0] = 1; | |
| 906 | } | |
| 878 | 907 | LOG(("Z180 #%d TMDR0H rd $%02x ($%02x)\n", cpu_getactivecpu(), data, Z180.io[port & 0x3f])); |
| 879 | 908 | break; |
| 880 | 909 | |
| r1037 | r1038 | |
| 889 | 918 | break; |
| 890 | 919 | |
| 891 | 920 | case Z180_TCR: |
| 892 | data = IO_TCR & Z180_TCR_RMASK; | |
| 921 | data = (IO_TCR & Z180_TCR_RMASK) | (Z180.tif[0] << 6) | (Z180.tif[1] << 7); | |
| 922 | ||
| 923 | if(Z180.read_tcr_tmdr[0]) | |
| 924 | { | |
| 925 | Z180.tif[0] = 0; // reset TIF0 | |
| 926 | Z180.read_tcr_tmdr[0] = 0; | |
| 927 | } | |
| 928 | else | |
| 929 | { | |
| 930 | Z180.read_tcr_tmdr[0] = 1; | |
| 931 | } | |
| 932 | ||
| 933 | if(Z180.read_tcr_tmdr[1]) | |
| 934 | { | |
| 935 | Z180.tif[1] = 0; // reset TIF1 | |
| 936 | Z180.read_tcr_tmdr[1] = 0; | |
| 937 | } | |
| 938 | else | |
| 939 | { | |
| 940 | Z180.read_tcr_tmdr[1] = 1; | |
| 941 | } | |
| 942 | ||
| 893 | 943 | LOG(("Z180 #%d TCR rd $%02x ($%02x)\n", cpu_getactivecpu(), data, Z180.io[port & 0x3f])); |
| 894 | 944 | break; |
| 895 | 945 | |
| r1037 | r1038 | |
| 909 | 959 | break; |
| 910 | 960 | |
| 911 | 961 | case Z180_TMDR1L: |
| 912 | data = | |
| 962 | data = Z180.tmdr_value[1] & Z180_TMDR1L_RMASK; | |
| 913 | 963 | LOG(("Z180 #%d TMDR1L rd $%02x ($%02x)\n", cpu_getactivecpu(), data, Z180.io[port & 0x3f])); |
| 914 | 964 | /* if timer is counting, latch the MSB and set the latch flag */ |
| 915 | 965 | if ((IO_TCR & Z180_TCR_TDE1) == 0) |
| 916 | 966 | { |
| 917 | 967 | Z180.tmdr_latch |= 2; |
| 918 | Z180.tmdr[1] = | |
| 968 | Z180.tmdrh[1] = (Z180.tmdr_value[1] & 0xff00) >> 8; | |
| 919 | 969 | } |
| 970 | ||
| 971 | if(Z180.read_tcr_tmdr[1]) | |
| 972 | { | |
| 973 | Z180.tif[1] = 0; // reset TIF1 | |
| 974 | Z180.read_tcr_tmdr[1] = 0; | |
| 975 | } | |
| 976 | else | |
| 977 | { | |
| 978 | Z180.read_tcr_tmdr[1] = 1; | |
| 979 | } | |
| 920 | 980 | break; |
| 921 | 981 | |
| 922 | 982 | case Z180_TMDR1H: |
| r1037 | r1038 | |
| 924 | 984 | if (Z180.tmdr_latch & 2) |
| 925 | 985 | { |
| 926 | 986 | Z180.tmdr_latch &= ~2; |
| 927 | data = Z180.tmdr[ | |
| 987 | data = Z180.tmdrh[ | |
| 928 | 988 | } |
| 929 | 989 | else |
| 930 | 990 | { |
| 931 | data = | |
| 991 | data = ( | |
| 932 | 992 | } |
| 993 | ||
| 994 | if(Z180.read_tcr_tmdr[1]) | |
| 995 | { | |
| 996 | Z180.tif[1] = 0; // reset TIF1 | |
| 997 | Z180.read_tcr_tmdr[1] = 0; | |
| 998 | } | |
| 999 | else | |
| 1000 | { | |
| 1001 | Z180.read_tcr_tmdr[1] = 1; | |
| 1002 | } | |
| 933 | 1003 | LOG(("Z180 #%d TMDR1H rd $%02x ($%02x)\n", cpu_getactivecpu(), data, Z180.io[port & 0x3f])); |
| 934 | 1004 | break; |
| 935 | 1005 | |
| r1037 | r1038 | |
| 1143 | 1213 | LOG(("Z180 #%d IOCR rd $%02x ($%02x)\n", cpu_getactivecpu(), data, Z180.io[port & 0x3f])); |
| 1144 | 1214 | break; |
| 1145 | 1215 | } |
| 1216 | ||
| 1146 | 1217 | return data; |
| 1147 | 1218 | } |
| 1148 | 1219 | |
| r1037 | r1038 | |
| 1150 | 1221 | { |
| 1151 | 1222 | /* normal external write port */ |
| 1152 | 1223 | io_write_byte_8(port, data); |
| 1224 | ||
| 1225 | /* remap internal I/O registers */ | |
| 1226 | if((port & (IO_IOCR & 0xc0)) == (IO_IOCR & 0xc0)) | |
| 1227 | port = port - (IO_IOCR & 0xc0); | |
| 1228 | ||
| 1153 | 1229 | /* store the data in the internal register */ |
| 1154 | switch ( | |
| 1230 | switch ( | |
| 1155 | 1231 | { |
| 1156 | 1232 | case Z180_CNTLA0: |
| 1157 | 1233 | LOG(("Z180 #%d CNTLA0 wr $%02x ($%02x)\n", cpu_getactivecpu(), data, data & Z180_CNTLA0_WMASK)); |
| r1037 | r1038 | |
| 1215 | 1291 | |
| 1216 | 1292 | case Z180_TMDR0L: |
| 1217 | 1293 | LOG(("Z180 #%d TMDR0L wr $%02x ($%02x)\n", cpu_getactivecpu(), data, data & Z180_TMDR0L_WMASK)); |
| 1218 | IO_TMDR0L = (IO_TMDR0L & ~Z180_TMDR0L_WMASK) | (data & Z180_TMDR0L_WMASK); | |
| 1294 | IO_TMDR0L = data & Z180_TMDR0L_WMASK; | |
| 1295 | Z180.tmdr_value[0] = (Z180.tmdr_value[0] & 0xff00) | IO_TMDR0L; | |
| 1219 | 1296 | break; |
| 1220 | 1297 | |
| 1221 | 1298 | case Z180_TMDR0H: |
| 1222 | 1299 | LOG(("Z180 #%d TMDR0H wr $%02x ($%02x)\n", cpu_getactivecpu(), data, data & Z180_TMDR0H_WMASK)); |
| 1223 | IO_TMDR0H = (IO_TMDR0H & ~Z180_TMDR0H_WMASK) | (data & Z180_TMDR0H_WMASK); | |
| 1300 | IO_TMDR0H = data & Z180_TMDR0H_WMASK; | |
| 1301 | Z180.tmdr_value[0] = (Z180.tmdr_value[0] & 0x00ff) | (IO_TMDR0H << 8); | |
| 1224 | 1302 | break; |
| 1225 | 1303 | |
| 1226 | 1304 | case Z180_RLDR0L: |
| r1037 | r1038 | |
| 1255 | 1333 | |
| 1256 | 1334 | case Z180_TMDR1L: |
| 1257 | 1335 | LOG(("Z180 #%d TMDR1L wr $%02x ($%02x)\n", cpu_getactivecpu(), data, data & Z180_TMDR1L_WMASK)); |
| 1258 | IO_TMDR1L = (IO_TMDR1L & ~Z180_TMDR1L_WMASK) | (data & Z180_TMDR1L_WMASK); | |
| 1336 | IO_TMDR1L = data & Z180_TMDR1L_WMASK; | |
| 1337 | Z180.tmdr_value[1] = (Z180.tmdr_value[1] & 0xff00) | IO_TMDR1L; | |
| 1259 | 1338 | break; |
| 1260 | 1339 | |
| 1261 | 1340 | case Z180_TMDR1H: |
| 1262 | 1341 | LOG(("Z180 #%d TMDR1H wr $%02x ($%02x)\n", cpu_getactivecpu(), data, data & Z180_TMDR1H_WMASK)); |
| 1263 | IO_TMDR1H = (IO_TMDR1H & ~Z180_TMDR1H_WMASK) | (data & Z180_TMDR1H_WMASK); | |
| 1342 | IO_TMDR1H = data & Z180_TMDR1H_WMASK; | |
| 1343 | Z180.tmdr_value[1] = (Z180.tmdr_value[1] & 0x00ff) | IO_TMDR1H; | |
| 1264 | 1344 | break; |
| 1265 | 1345 | |
| 1266 | 1346 | case Z180_RLDR1L: |
| r1037 | r1038 | |
| 1822 | 1902 | state_save_register_item("z180", index, Z180.IM); |
| 1823 | 1903 | state_save_register_item("z180", index, Z180.I); |
| 1824 | 1904 | state_save_register_item("z180", index, Z180.nmi_state); |
| 1905 | state_save_register_item("z180", index, Z180.nmi_pending); | |
| 1825 | 1906 | state_save_register_item("z180", index, Z180.irq_state[0]); |
| 1826 | 1907 | state_save_register_item("z180", index, Z180.irq_state[1]); |
| 1827 | 1908 | state_save_register_item("z180", index, Z180.irq_state[2]); |
| 1909 | state_save_register_item("z180", index, Z180.after_EI); | |
| 1828 | 1910 | } |
| 1829 | 1911 | |
| 1830 | 1912 | /**************************************************************************** |
| r1037 | r1038 | |
| 1934 | 2016 | _IX = _IY = 0xffff; /* IX and IY are FFFF after a reset! */ |
| 1935 | 2017 | _F = ZF; /* Zero flag is set */ |
| 1936 | 2018 | Z180.nmi_state = CLEAR_LINE; |
| 2019 | Z180.nmi_pending = 0; | |
| 1937 | 2020 | Z180.irq_state[0] = CLEAR_LINE; |
| 1938 | 2021 | Z180.irq_state[1] = CLEAR_LINE; |
| 1939 | 2022 | Z180.irq_state[2] = CLEAR_LINE; |
| 2023 | Z180.after_EI = 0; | |
| 2024 | Z180.tif[0] = 0; | |
| 2025 | Z180.tif[1] = 0; | |
| 2026 | Z180.read_tcr_tmdr[0] = 0; | |
| 2027 | Z180.read_tcr_tmdr[1] = 0; | |
| 2028 | Z180.tmdr_value[0] = 0xffff; | |
| 2029 | Z180.tmdr_value[1] = 0xffff; | |
| 1940 | 2030 | |
| 1941 | 2031 | /* reset io registers */ |
| 1942 | 2032 | IO_CNTLA0 = Z180_CNTLA0_RESET; |
| r1037 | r1038 | |
| 2010 | 2100 | z180_change_pc(_PCD); |
| 2011 | 2101 | } |
| 2012 | 2102 | |
| 2103 | /* Handle PRT timers, decreasing them after 20 clocks and returning the new icount base that needs to be used for the next check */ | |
| 2104 | static int handle_timers(int current_icount, int previous_icount) | |
| 2105 | { | |
| 2106 | int diff = previous_icount - current_icount; | |
| 2107 | int new_icount_base; | |
| 2108 | ||
| 2109 | if(diff >= 20) | |
| 2110 | { | |
| 2111 | /* Programmable Reload Timer 0 */ | |
| 2112 | if(IO_TCR & Z180_TCR_TDE0) | |
| 2113 | { | |
| 2114 | Z180.tmdr_value[0]--; | |
| 2115 | if(Z180.tmdr_value[0] == 0) | |
| 2116 | { | |
| 2117 | Z180.tmdr_value[0] = IO_RLDR0L | (IO_RLDR0H << 8); | |
| 2118 | Z180.tif[0] = 1; | |
| 2119 | } | |
| 2120 | } | |
| 2121 | ||
| 2122 | /* Programmable Reload Timer 1 */ | |
| 2123 | if(IO_TCR & Z180_TCR_TDE1) | |
| 2124 | { | |
| 2125 | Z180.tmdr_value[1]--; | |
| 2126 | if(Z180.tmdr_value[1] == 0) | |
| 2127 | { | |
| 2128 | Z180.tmdr_value[1] = IO_RLDR1L | (IO_RLDR1H << 8); | |
| 2129 | Z180.tif[1] = 1; | |
| 2130 | } | |
| 2131 | } | |
| 2132 | ||
| 2133 | if((IO_TCR & Z180_TCR_TIE0) && Z180.tif[0]) | |
| 2134 | { | |
| 2135 | // check if we can take the interrupt | |
| 2136 | if(_IFF1 && !Z180.after_EI) | |
| 2137 | { | |
| 2138 | take_interrupt(Z180_INT_PRT0); | |
| 2139 | } | |
| 2140 | } | |
| 2141 | ||
| 2142 | if((IO_TCR & Z180_TCR_TIE1) && Z180.tif[1]) | |
| 2143 | { | |
| 2144 | // check if we can take the interrupt | |
| 2145 | if(_IFF1 && !Z180.after_EI) | |
| 2146 | { | |
| 2147 | take_interrupt(Z180_INT_PRT1); | |
| 2148 | } | |
| 2149 | } | |
| 2150 | ||
| 2151 | new_icount_base = current_icount + (diff - 20); | |
| 2152 | } | |
| 2153 | else | |
| 2154 | { | |
| 2155 | new_icount_base = previous_icount; | |
| 2156 | } | |
| 2157 | ||
| 2158 | return new_icount_base; | |
| 2159 | } | |
| 2160 | ||
| 2161 | static void check_interrupts(void) | |
| 2162 | { | |
| 2163 | int i; | |
| 2164 | for(i = 0; i <= 2; i++) | |
| 2165 | { | |
| 2166 | /* check for IRQs before each instruction */ | |
| 2167 | if(Z180.irq_state[i] != CLEAR_LINE && _IFF1 && !Z180.after_EI) | |
| 2168 | { | |
| 2169 | take_interrupt(Z180_INT0 + i); | |
| 2170 | } | |
| 2171 | } | |
| 2172 | } | |
| 2173 | ||
| 2013 | 2174 | /**************************************************************************** |
| 2014 | 2175 | * Execute 'cycles' T-states. Return number of T-states really executed |
| 2015 | 2176 | ****************************************************************************/ |
| 2016 | 2177 | static int z180_execute(int cycles) |
| 2017 | 2178 | { |
| 2018 | z180_icount = cycles - Z180.extra_cycles; | |
| 2019 | Z180.extra_cycles = 0; | |
| 2179 | int old_icount = cycles; | |
| 2180 | z180_icount = cycles; | |
| 2020 | 2181 | |
| 2182 | /* check for NMIs on the way in; they can only be set externally */ | |
| 2183 | /* via timers, and can't be dynamically enabled, so it is safe */ | |
| 2184 | /* to just check here */ | |
| 2185 | if (Z180.nmi_pending) | |
| 2186 | { | |
| 2187 | LOG(("Z180 #%d take NMI\n", cpu_getactivecpu())); | |
| 2188 | _PPC = -1; /* there isn't a valid previous program counter */ | |
| 2189 | LEAVE_HALT; /* Check if processor was halted */ | |
| 2190 | ||
| 2191 | /* disable DMA transfers!! */ | |
| 2192 | IO_DSTAT &= ~Z180_DSTAT_DME; | |
| 2193 | ||
| 2194 | _IFF2 = _IFF1; | |
| 2195 | _IFF1 = 0; | |
| 2196 | PUSH( PC ); | |
| 2197 | _PCD = 0x0066; | |
| 2198 | z180_icount -= 11; | |
| 2199 | Z180.nmi_pending = 0; | |
| 2200 | } | |
| 2201 | ||
| 2021 | 2202 | again: |
| 2022 | 2203 | /* check if any DMA transfer is running */ |
| 2023 | 2204 | if ((IO_DSTAT & Z180_DSTAT_DME) == Z180_DSTAT_DME) |
| r1037 | r1038 | |
| 2027 | 2208 | (IO_DMODE & Z180_DMODE_MMOD) == Z180_DMODE_MMOD) |
| 2028 | 2209 | { |
| 2029 | 2210 | CALL_MAME_DEBUG; |
| 2211 | ||
| 2030 | 2212 | z180_dma0(); |
| 2213 | old_icount = handle_timers(z180_icount, old_icount); | |
| 2031 | 2214 | } |
| 2032 | 2215 | else |
| 2033 | 2216 | { |
| 2034 | 2217 | do |
| 2035 | 2218 | { |
| 2219 | check_interrupts(); | |
| 2220 | Z180.after_EI = 0; | |
| 2221 | ||
| 2036 | 2222 | _PPC = _PCD; |
| 2037 | 2223 | CALL_MAME_DEBUG; |
| 2038 | 2224 | _R++; |
| 2225 | ||
| 2039 | 2226 | EXEC_INLINE(op,ROP()); |
| 2227 | old_icount = handle_timers(z180_icount, old_icount); | |
| 2228 | ||
| 2040 | 2229 | z180_dma0(); |
| 2230 | old_icount = handle_timers(z180_icount, old_icount); | |
| 2231 | ||
| 2041 | 2232 | z180_dma1(); |
| 2233 | old_icount = handle_timers(z180_icount, old_icount); | |
| 2234 | ||
| 2042 | 2235 | /* If DMA is done break out to the faster loop */ |
| 2043 | 2236 | if ((IO_DSTAT & Z180_DSTAT_DME) != Z180_DSTAT_DME) |
| 2044 | 2237 | break; |
| r1037 | r1038 | |
| 2050 | 2243 | { |
| 2051 | 2244 | do |
| 2052 | 2245 | { |
| 2246 | check_interrupts(); | |
| 2247 | Z180.after_EI = 0; | |
| 2248 | ||
| 2053 | 2249 | _PPC = _PCD; |
| 2054 | 2250 | CALL_MAME_DEBUG; |
| 2055 | 2251 | _R++; |
| 2056 | 2252 | EXEC_INLINE(op,ROP()); |
| 2253 | old_icount = handle_timers(z180_icount, old_icount); | |
| 2254 | ||
| 2057 | 2255 | /* If DMA is started go to check the mode */ |
| 2058 | 2256 | if ((IO_DSTAT & Z180_DSTAT_DME) == Z180_DSTAT_DME) |
| 2059 | 2257 | goto again; |
| 2060 | 2258 | } while( z180_icount > 0 ); |
| 2061 | 2259 | } |
| 2062 | 2260 | |
| 2063 | z180_icount -= Z180.extra_cycles; | |
| 2064 | Z180.extra_cycles = 0; | |
| 2065 | ||
| 2066 | 2261 | return cycles - z180_icount; |
| 2067 | 2262 | } |
| 2068 | 2263 | |
| r1037 | r1038 | |
| 2118 | 2313 | { |
| 2119 | 2314 | if (irqline == INPUT_LINE_NMI) |
| 2120 | 2315 | { |
| 2121 | if( Z180.nmi_state == state ) return; | |
| 2122 | ||
| 2123 | LOG(("Z180 #%d set_irq_line (NMI) %d\n", cpu_getactivecpu(), state)); | |
| 2316 | /* mark an NMI pending on the rising edge */ | |
| 2317 | if (Z180.nmi_state == CLEAR_LINE && state != CLEAR_LINE) | |
| 2318 | Z180.nmi_pending = 1; | |
| 2124 | 2319 | Z180.nmi_state = state; |
| 2125 | if( state == CLEAR_LINE ) return; | |
| 2126 | ||
| 2127 | LOG(("Z180 #%d take NMI\n", cpu_getactivecpu())); | |
| 2128 | _PPC = -1; /* there isn't a valid previous program counter */ | |
| 2129 | LEAVE_HALT; /* Check if processor was halted */ | |
| 2130 | ||
| 2131 | /* disable DMA transfers!! */ | |
| 2132 | IO_DSTAT &= ~Z180_DSTAT_DME; | |
| 2133 | ||
| 2134 | _IFF1 = 0; | |
| 2135 | PUSH( PC ); | |
| 2136 | _PCD = 0x0066; | |
| 2137 | Z180.extra_cycles += 11; | |
| 2138 | 2320 | } |
| 2139 | 2321 | else |
| 2140 | 2322 | { |
| r1037 | r1038 | |
| 2145 | 2327 | if (Z180.daisy) |
| 2146 | 2328 | Z180.irq_state[0] = z80daisy_update_irq_state(Z180.daisy); |
| 2147 | 2329 | |
| 2148 | /* if there's something pending, take it */ | |
| 2149 | if (Z180.irq_state[0] != CLEAR_LINE) | |
| 2150 | take_interrupt(Z180_INT0); | |
| 2151 | if (Z180.irq_state[1] != CLEAR_LINE) | |
| 2152 | take_interrupt(Z180_INT1); | |
| 2153 | if (Z180.irq_state[2] != CLEAR_LINE) | |
| 2154 | take_interrupt(Z180_INT2); | |
| 2330 | /* the main execute loop will take the interrupt */ | |
| 2155 | 2331 | } |
| 2156 | 2332 | } |
| 2157 | 2333 | |
| 2334 | /* logical to physical address translation */ | |
| 2335 | static int z180_translate(int space, offs_t *addr) | |
| 2336 | { | |
| 2337 | if (space == ADDRESS_SPACE_PROGRAM) | |
| 2338 | { | |
| 2339 | *addr = MMU_REMAP_ADDR(*addr); | |
| 2340 | } | |
| 2341 | return 1; | |
| 2342 | } | |
| 2158 | 2343 | |
| 2159 | ||
| 2160 | 2344 | /************************************************************************** |
| 2161 | 2345 | * Generic set_info |
| 2162 | 2346 | **************************************************************************/ |
| r1037 | r1038 | |
| 2171 | 2355 | case CPUINFO_INT_INPUT_STATE + Z180_INT1: set_irq_line(Z180_INT1, info->i); break; |
| 2172 | 2356 | case CPUINFO_INT_INPUT_STATE + Z180_INT2: set_irq_line(Z180_INT2, info->i); break; |
| 2173 | 2357 | |
| 2174 | /* TODO: timer interrupts are triggered internally, this is just a kludge to get 20pacgal running */ | |
| 2175 | case CPUINFO_INT_INPUT_STATE + Z180_INT_PRT0: set_irq_line(Z180_INT_PRT0, info->i); break; | |
| 2176 | ||
| 2177 | ||
| 2178 | 2358 | case CPUINFO_INT_PC: _PC = info->i; z180_change_pc(_PCD); break; |
| 2179 | 2359 | case CPUINFO_INT_REGISTER + Z180_PC: Z180.PC.w.l = info->i; break; |
| 2180 | 2360 | case CPUINFO_INT_SP: _SP = info->i; break; |
| r1037 | r1038 | |
| 2282 | 2462 | { |
| 2283 | 2463 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 2284 | 2464 | case CPUINFO_INT_CONTEXT_SIZE: info->i = sizeof(Z180); break; |
| 2285 | case CPUINFO_INT_INPUT_LINES: info->i = | |
| 2465 | case CPUINFO_INT_INPUT_LINES: info->i = 3; break; | |
| 2286 | 2466 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0xff; break; |
| 2287 | 2467 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_LE; break; |
| 2288 | 2468 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| r1037 | r1038 | |
| 2406 | 2586 | case CPUINFO_PTR_DISASSEMBLE: info->disassemble = z180_dasm; break; |
| 2407 | 2587 | #endif /* MAME_DEBUG */ |
| 2408 | 2588 | case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &z180_icount; break; |
| 2589 | case CPUINFO_PTR_TRANSLATE: info->translate = z180_translate; break; | |
| 2409 | 2590 | case CPUINFO_PTR_Z180_CYCLE_TABLE + Z180_TABLE_op: info->p = cc[Z180_TABLE_op]; break; |
| 2410 | 2591 | case CPUINFO_PTR_Z180_CYCLE_TABLE + Z180_TABLE_cb: info->p = cc[Z180_TABLE_cb]; break; |
| 2411 | 2592 | case CPUINFO_PTR_Z180_CYCLE_TABLE + Z180_TABLE_ed: info->p = cc[Z180_TABLE_ed]; break; |
| r1037 | r1038 | |
| 2416 | 2597 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 2417 | 2598 | case CPUINFO_STR_NAME: strcpy(info->s, "Z180"); break; |
| 2418 | 2599 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Zilog Z8x180"); break; |
| 2419 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "0. | |
| 2600 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "0.3"); break; | |
| 2420 | 2601 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 2421 | 2602 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright (C) 2000 Juergen Buchmueller, all rights reserved."); break; |
| 2422 | 2603 |
| r1037 | r1038 | |
|---|---|---|
| 4 | 4 | #define ENTER_HALT { \ |
| 5 | 5 | _PC--; \ |
| 6 | 6 | _HALT = 1; \ |
| 7 | if( !after_EI ) | |
| 7 | if( !Z180.after_EI ) | |
| 8 | 8 | z180_burn( z180_icount ); \ |
| 9 | 9 | } |
| 10 | 10 | |
| r1037 | r1038 | |
| 171 | 171 | /* speed up busy loop */ \ |
| 172 | 172 | if( _PCD == oldpc ) \ |
| 173 | 173 | { \ |
| 174 | if( !after_EI ) | |
| 174 | if( !Z180.after_EI ) | |
| 175 | 175 | BURNODD( z180_icount, 1, cc[Z180_TABLE_op][0xc3] ); \ |
| 176 | 176 | } \ |
| 177 | 177 | else \ |
| r1037 | r1038 | |
| 182 | 182 | /* NOP - JP $-1 or EI - JP $-1 */ \ |
| 183 | 183 | if ( op == 0x00 || op == 0xfb ) \ |
| 184 | 184 | { \ |
| 185 | if( !after_EI ) | |
| 185 | if( !Z180.after_EI ) | |
| 186 | 186 | BURNODD( z180_icount-cc[Z180_TABLE_op][0x00],\ |
| 187 | 187 | 2, cc[Z180_TABLE_op][0x00]+cc[Z180_TABLE_op][0xc3]); \ |
| 188 | 188 | } \ |
| r1037 | r1038 | |
| 191 | 191 | /* LD SP,#xxxx - JP $-3 (Galaga) */ \ |
| 192 | 192 | if( _PCD == oldpc-3 && op == 0x31 ) \ |
| 193 | 193 | { \ |
| 194 | if( !after_EI ) | |
| 194 | if( !Z180.after_EI ) | |
| 195 | 195 | BURNODD( z180_icount-cc[Z180_TABLE_op][0x31], \ |
| 196 | 196 | 2, cc[Z180_TABLE_op][0x31]+cc[Z180_TABLE_op][0xc3]); \ |
| 197 | 197 | } \ |
| r1037 | r1038 | |
| 231 | 231 | /* speed up busy loop */ \ |
| 232 | 232 | if( _PCD == oldpc ) \ |
| 233 | 233 | { \ |
| 234 | if( !after_EI ) | |
| 234 | if( !Z180.after_EI ) | |
| 235 | 235 | BURNODD( z180_icount, 1, cc[Z180_TABLE_op][0x18] ); \ |
| 236 | 236 | } \ |
| 237 | 237 | else \ |
| r1037 | r1038 | |
| 242 | 242 | /* NOP - JR $-1 or EI - JR $-1 */ \ |
| 243 | 243 | if ( op == 0x00 || op == 0xfb ) \ |
| 244 | 244 | { \ |
| 245 | if( !after_EI ) | |
| 245 | if( !Z180.after_EI ) | |
| 246 | 246 | BURNODD( z180_icount-cc[Z180_TABLE_op][0x00],\ |
| 247 | 247 | 2, cc[Z180_TABLE_op][0x00]+cc[Z180_TABLE_op][0x18]); \ |
| 248 | 248 | } \ |
| r1037 | r1038 | |
| 251 | 251 | /* LD SP,#xxxx - JR $-3 */ \ |
| 252 | 252 | if( _PCD == oldpc-3 && op == 0x31 ) \ |
| 253 | 253 | { \ |
| 254 | if( !after_EI ) | |
| 254 | if( !Z180.after_EI ) | |
| 255 | 255 | BURNODD( z180_icount-cc[Z180_TABLE_op][0x31], \ |
| 256 | 256 | 2, cc[Z180_TABLE_op][0x31]+cc[Z180_TABLE_op][0x18]); \ |
| 257 | 257 | } \ |
| r1037 | r1038 | |
| 315 | 315 | LOG(("Z180 #%d RETN IFF1:%d IFF2:%d\n", cpu_getactivecpu(), _IFF1, _IFF2)); \ |
| 316 | 316 | POP(PC); \ |
| 317 | 317 | z180_change_pc(_PCD); \ |
| 318 | if( _IFF1 == 0 && _IFF2 == 1 ) \ | |
| 319 | { \ | |
| 320 | _IFF1 = 1; \ | |
| 321 | if( Z180.irq_state[0] != CLEAR_LINE ) \ | |
| 322 | { \ | |
| 323 | LOG(("Z180 #%d RETN takes INT0\n", \ | |
| 324 | cpu_getactivecpu())); \ | |
| 325 | take_interrupt(Z180_INT0); \ | |
| 326 | } \ | |
| 327 | else if( Z180.irq_state[1] != CLEAR_LINE ) \ | |
| 328 | { \ | |
| 329 | LOG(("Z180 #%d RETN takes INT1\n", \ | |
| 330 | cpu_getactivecpu())); \ | |
| 331 | take_interrupt(Z180_INT1); \ | |
| 332 | } \ | |
| 333 | else if( Z180.irq_state[2] != CLEAR_LINE ) \ | |
| 334 | { \ | |
| 335 | LOG(("Z180 #%d RETN takes INT2\n", \ | |
| 336 | cpu_getactivecpu())); \ | |
| 337 | take_interrupt(Z180_INT2); \ | |
| 338 | } \ | |
| 339 | } \ | |
| 340 | else _IFF1 = _IFF2; \ | |
| 318 | _IFF1 = _IFF2; \ | |
| 341 | 319 | } |
| 342 | 320 | |
| 343 | 321 | /*************************************************************** |
| r1037 | r1038 | |
| 1148 | 1126 | * EI |
| 1149 | 1127 | ***************************************************************/ |
| 1150 | 1128 | #define EI { \ |
| 1151 | /* If interrupts were disabled, execute one more \ | |
| 1152 | * instruction and check the IRQ line. \ | |
| 1153 | * If not, simply set interrupt flip-flop 2 \ | |
| 1154 | */ \ | |
| 1155 | if( _IFF1 == 0 ) \ | |
| 1156 | { \ | |
| 1157 | _IFF1 = _IFF2 = 1; \ | |
| 1158 | _PPC = _PCD; \ | |
| 1159 | CALL_MAME_DEBUG; \ | |
| 1160 | _R++; \ | |
| 1161 | while( cpu_readop(_PCD) == 0xfb ) /* more EIs? */ \ | |
| 1162 | { \ | |
| 1163 | LOG(("Z180 #%d multiple EI opcodes at %04X\n", \ | |
| 1164 | cpu_getactivecpu(), _PC)); \ | |
| 1165 | CC(op,0xfb); \ | |
| 1166 | _PPC =_PCD; \ | |
| 1167 | CALL_MAME_DEBUG; \ | |
| 1168 | _PC++; \ | |
| 1169 | _R++; \ | |
| 1170 | } \ | |
| 1171 | if( Z180.irq_state[0] != CLEAR_LINE ) \ | |
| 1172 | { \ | |
| 1173 | after_EI = 1; /* avoid cycle skip hacks */ \ | |
| 1174 | EXEC(op,ROP()); \ | |
| 1175 | after_EI = 0; \ | |
| 1176 | LOG(("Z180 #%d EI takes INT0\n", cpu_getactivecpu())); \ | |
| 1177 | take_interrupt(Z180_INT0); \ | |
| 1178 | } \ | |
| 1179 | else if( Z180.irq_state[1] != CLEAR_LINE ) \ | |
| 1180 | { \ | |
| 1181 | after_EI = 1; /* avoid cycle skip hacks */ \ | |
| 1182 | EXEC(op,ROP()); \ | |
| 1183 | after_EI = 0; \ | |
| 1184 | LOG(("Z180 #%d EI takes INT1\n", cpu_getactivecpu())); \ | |
| 1185 | take_interrupt(Z180_INT1); \ | |
| 1186 | } \ | |
| 1187 | else if( Z180.irq_state[2] != CLEAR_LINE ) \ | |
| 1188 | { \ | |
| 1189 | after_EI = 1; /* avoid cycle skip hacks */ \ | |
| 1190 | EXEC(op,ROP()); \ | |
| 1191 | after_EI = 0; \ | |
| 1192 | LOG(("Z180 #%d EI takes INT2\n", cpu_getactivecpu())); \ | |
| 1193 | take_interrupt(Z180_INT2); \ | |
| 1194 | } else EXEC(op,ROP()); \ | |
| 1195 | } else _IFF2 = 1; \ | |
| 1129 | _IFF1 = _IFF2 = 1; \ | |
| 1130 | Z180.after_EI = 1; \ | |
| 1196 | 1131 | } |
| 1197 | 1132 | |
| 1198 | 1133 | /*************************************************************** |
| r1037 | r1038 | |
|---|---|---|
| 2 | 2 | 8-bit memory accessors |
| 3 | 3 | *****************************************************************************/ |
| 4 | 4 | |
| 5 | #ifdef I8086 | |
| 6 | #if (HAS_I8088||HAS_I80188) | |
| 5 | 7 | static UINT16 read_word_8(offs_t addr) |
| 6 | 8 | { |
| 7 | 9 | UINT16 result = program_read_byte_8(addr); |
| r1037 | r1038 | |
| 40 | 42 | I.mem.wbyte_port = io_write_byte_8; |
| 41 | 43 | I.mem.wword_port = write_port_word_8; |
| 42 | 44 | } |
| 45 | #endif | |
| 46 | #endif | |
| 43 | 47 | |
| 44 | 48 | |
| 45 | 49 | /***************************************************************************** |
| r1037 | r1038 | |
|---|---|---|
| 80 | 80 | #include "table86.h" |
| 81 | 81 | |
| 82 | 82 | #include "instr86.c" |
| 83 | #include "i86mem.c" | |
| 83 | 84 | #undef I8086 |
| 84 | 85 | |
| 85 | #include "i86mem.c" | |
| 86 | 86 | |
| 87 | 87 | /***************************************************************************/ |
| 88 | 88 | static void i8086_state_register(int index) |
| r1037 | r1038 | |
| 142 | 142 | configure_memory_16bit(); |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | #if (HAS_I8088||HAS_I80188) | |
| 145 | 146 | static void i8088_init(int index, int clock, const void *config, int (*irqcallback)(int)) |
| 146 | 147 | { |
| 147 | 148 | i8086_init(index, clock, config, irqcallback); |
| 148 | 149 | configure_memory_8bit(); |
| 149 | 150 | } |
| 151 | #endif | |
| 150 | 152 | |
| 151 | 153 | static void i8086_reset(void) |
| 152 | 154 | { |
| r1037 | r1038 | |
|---|---|---|
| 292 | 292 | // Opcode jump table |
| 293 | 293 | #include "optable.c" |
| 294 | 294 | |
| 295 | #ifdef UNUSED_FUNCTION | |
| 295 | 296 | static int v60_default_irq_cb(int irqline) |
| 296 | 297 | { |
| 297 | 298 | return 0; |
| 298 | 299 | } |
| 300 | #endif | |
| 299 | 301 | |
| 300 | 302 | static void base_init(const char *type, int index, int (*irqcallback)(int)) |
| 301 | 303 | { |
| r1037 | r1038 | |
|---|---|---|
| 1112 | 1112 | return 0; /* never reached, fatalerror won't return */ |
| 1113 | 1113 | } |
| 1114 | 1114 | |
| 1115 | #ifdef UNUSED_FUNCTION | |
| 1115 | 1116 | static UINT32 am1Error3(void) |
| 1116 | 1117 | { |
| 1117 | 1118 | fatalerror("CPU - AM1 - 3 (PC=%06x)", PC); |
| r1037 | r1038 | |
| 1123 | 1124 | fatalerror("CPU - BAM1 - 3 (PC=%06x)", PC); |
| 1124 | 1125 | return 0; /* never reached, fatalerror won't return */ |
| 1125 | 1126 | } |
| 1127 | #endif | |
| 1126 | 1128 | |
| 1127 | 1129 | static UINT32 am1Error4(void) |
| 1128 | 1130 | { |
| r1037 | r1038 | |
|---|---|---|
| 966 | 966 | return 0; /* never reached, fatalerror won't return */ |
| 967 | 967 | } |
| 968 | 968 | |
| 969 | #ifdef UNUSED_FUNCTION | |
| 969 | 970 | static UINT32 am2Error3(void) |
| 970 | 971 | { |
| 971 | 972 | fatalerror("CPU - AM2 - 3 (PC=%06x)", PC); |
| 972 | 973 | return 0; /* never reached, fatalerror won't return */ |
| 973 | 974 | } |
| 975 | #endif | |
| 974 | 976 | |
| 975 | 977 | static UINT32 am2Error4(void) |
| 976 | 978 | { |
| r1037 | r1038 | |
| 996 | 998 | return 0; /* never reached, fatalerror won't return */ |
| 997 | 999 | } |
| 998 | 1000 | |
| 1001 | #ifdef UNUSED_FUNCTION | |
| 999 | 1002 | static UINT32 bam2Error3(void) |
| 1000 | 1003 | { |
| 1001 | 1004 | fatalerror("CPU - BAM2 - 3 (PC=%06x)", PC); |
| 1002 | 1005 | return 0; /* never reached, fatalerror won't return */ |
| 1003 | 1006 | } |
| 1007 | #endif | |
| 1004 | 1008 | |
| 1005 | 1009 | static UINT32 bam2Error4(void) |
| 1006 | 1010 | { |
| r1037 | r1038 | |
|---|---|---|
| 745 | 745 | return 0; /* never reached, fatalerror won't return */ |
| 746 | 746 | } |
| 747 | 747 | |
| 748 | #ifdef UNUSED_FUNCTION | |
| 748 | 749 | static UINT32 am3Error3(void) |
| 749 | 750 | { |
| 750 | 751 | fatalerror("CPU - AM3 - 3 (PC=%06x)", PC); |
| 751 | 752 | return 0; /* never reached, fatalerror won't return */ |
| 752 | 753 | } |
| 754 | #endif | |
| 753 | 755 | |
| 754 | 756 | static UINT32 am3Error4(void) |
| 755 | 757 | { |
| r1037 | r1038 | |
|---|---|---|
| 254 | 254 | /* 0xfb */ opRETIS_1, |
| 255 | 255 | /* 0xfc */ opSTTASK_0, |
| 256 | 256 | /* 0xfd */ opSTTASK_1, |
| 257 | /* 0xfe */ opUNHANDLED, | |
| 258 | /* 0xff */ opUNHANDLED, | |
| 257 | /* 0xfe */ opCLRTLB_0, | |
| 258 | /* 0xff */ opCLRTLB_1, | |
| 259 | 259 | }; |
| r1037 | r1038 | |
|---|---|---|
| 50 | 50 | static int MovePOperation(void) ; |
| 51 | 51 | |
| 52 | 52 | static int AndiOperation(void) ; |
| 53 | static int OriOperation(void) ; | |
| 53 | //static int OriOperation(void) ; | |
| 54 | 54 | |
| 55 | 55 | static int BitfieldOperation(void) ; |
| 56 | 56 | static int JmpOperation(void) ; |
| r1037 | r1038 | |
| 105 | 105 | IMPLEMENTATION |
| 106 | 106 | ***************************************************************************/ |
| 107 | 107 | |
| 108 | #ifdef UNUSED_FUNCTION | |
| 108 | 109 | static void unimplemented(void) |
| 109 | 110 | { |
| 110 | 111 | fatalerror("Unimplemented OP @ %04X: %04X", PC-2, OP) ; |
| 111 | 112 | } |
| 113 | #endif | |
| 112 | 114 | |
| 113 | 115 | |
| 114 | 116 | static void execute_one(void) |
| r1037 | r1038 | |
| 1713 | 1715 | return retSize ; |
| 1714 | 1716 | } |
| 1715 | 1717 | |
| 1718 | #ifdef UNUSED_FUNCTION | |
| 1716 | 1719 | // !!! NOT IMPLEMENTED YET - JUST PUT HERE TO BE NEXT TO ANDI SOMEDAY !!! |
| 1717 | 1720 | static int OriOperation(void) |
| 1718 | 1721 | { |
| r1037 | r1038 | |
| 1720 | 1723 | |
| 1721 | 1724 | return retSize ; |
| 1722 | 1725 | } |
| 1726 | #endif | |
| 1723 | 1727 | |
| 1724 | 1728 | static int CmpOperation(void **wd, UINT64 *pa) |
| 1725 | 1729 | { |
| r1037 | r1038 | |
|---|---|---|
| 16 | 16 | |
| 17 | 17 | // Main opcode categories |
| 18 | 18 | static unsigned DecodeDataALUOpcode(char *buffer, UINT16 op, unsigned pc, int parallelType) ; |
| 19 | static unsigned DecodeDXMDROpcode(char *buffer, UINT16 op, unsigned pc) ; | |
| 19 | //static unsigned DecodeDXMDROpcode(char *buffer, UINT16 op, unsigned pc) ; | |
| 20 | 20 | static unsigned DecodeNPMOpcode(char *buffer, UINT16 op, unsigned pc, const UINT8 *oprom) ; |
| 21 | 21 | static unsigned DecodeMisfitOpcode(char *buffer, UINT16 op, unsigned pc, const UINT8 *oprom) ; |
| 22 | 22 | static unsigned DecodeSpecialOpcode(char *buffer, UINT16 op, unsigned pc, const UINT8 *oprom) ; |
| r1037 | r1038 | |
| 28 | 28 | static void AppendARU(char *buffer, UINT16 op) ; |
| 29 | 29 | static void AppendRRDM(char *buffer, UINT16 op, char *working) ; |
| 30 | 30 | |
| 31 | static void AppendDXMDR(char *buffer, UINT16 op) ; | |
| 31 | //static void AppendDXMDR(char *buffer, UINT16 op) ; | |
| 32 | 32 | |
| 33 | 33 | |
| 34 | 34 | // Helper functions |
| r1037 | r1038 | |
| 43 | 43 | static void DecodeccccTable (UINT16 cccc, char *mnemonic) ; |
| 44 | 44 | static void DecodeDDDDDTable(UINT16 DDDDD, char *SD) ; |
| 45 | 45 | static void DecodeDDTable (UINT16 DD, char *SD) ; |
| 46 | static void DecodeDDFTable (UINT16 DD, UINT16 F, char *S, char *D) ; | |
| 46 | //static void DecodeDDFTable (UINT16 DD, UINT16 F, char *S, char *D) ; | |
| 47 | 47 | static void DecodeEETable (UINT16 EE, char *D) ; |
| 48 | 48 | static void DecodeFTable (UINT16 F, char *SD) ; |
| 49 | 49 | static void Decodeh0hFTable (UINT16 h0h, UINT16 F, char *S, char *D) ; |
| r1037 | r1038 | |
| 52 | 52 | static void DecodeIIIITable (UINT16 IIII, char *S, char *D) ; |
| 53 | 53 | static void DecodeJJJFTable (UINT16 JJJ, UINT16 F, char *S, char *D) ; |
| 54 | 54 | static void DecodeJJFTable (UINT16 JJ, UINT16 F, char *S, char *D) ; |
| 55 | static void DecodeJFTable (UINT16 J, UINT16 F, char *S, char *D) ; | |
| 56 | static void DecodekTable (UINT16 k, char *Dnot) ; | |
| 57 | static void DecodekSignTable(UINT16 k, char *plusMinus) ; | |
| 58 | static void DecodeKKKTable (UINT16 KKK, char *D1, char *D2) ; | |
| 59 | static int DecodeNNTable (UINT16 NN) ; | |
| 60 | static void DecodeQQFTable (UINT16 QQ, UINT16 F, char *S1, char *S2, char *D) ; | |
| 55 | //static void DecodeJFTable (UINT16 J, UINT16 F, char *S, char *D) ; | |
| 56 | //static void DecodekTable (UINT16 k, char *Dnot) ; | |
| 57 | //static void DecodekSignTable(UINT16 k, char *plusMinus) ; | |
| 58 | //static void DecodeKKKTable (UINT16 KKK, char *D1, char *D2) ; | |
| 59 | //static int DecodeNNTable (UINT16 NN) ; | |
| 60 | //static void DecodeQQFTable (UINT16 QQ, UINT16 F, char *S1, char *S2, char *D) ; | |
| 61 | 61 | static void DecodeQQFTableSp(UINT16 QQ, UINT16 F, char *S1, char *S2, char *D) ; |
| 62 | static void DecodeQQQFTable (UINT16 QQQ, UINT16 F, char *S1, char *S2, char *D) ; | |
| 62 | //static void DecodeQQQFTable (UINT16 QQQ, UINT16 F, char *S1, char *S2, char *D) ; | |
| 63 | 63 | static int DecodeRRTable (UINT16 RR) ; |
| 64 | 64 | static void DecodesTable (UINT16 s, char *arithmetic) ; |
| 65 | static void DecodessTable (UINT16 ss, char *arithmetic) ; | |
| 66 | static void DecodeuuuuFTable(UINT16 uuuu, UINT16 F, char *arg, char *S, char *D) ; | |
| 65 | //static void DecodessTable (UINT16 ss, char *arithmetic) ; | |
| 66 | //static void DecodeuuuuFTable(UINT16 uuuu, UINT16 F, char *arg, char *S, char *D) ; | |
| 67 | 67 | static void DecodeZTable (UINT16 Z, char *ea) ; |
| 68 | 68 | |
| 69 | 69 | |
| 70 | 70 | static void AssembleeaFrommTable (UINT16 m, int n, char *ea) ; |
| 71 | static void AssembleeaFrommmTable(UINT16 mm, int n1, int n2, char *ea1, char *ea2) ; | |
| 71 | //static void AssembleeaFrommmTable(UINT16 mm, int n1, int n2, char *ea1, char *ea2) ; | |
| 72 | 72 | static void AssembleeaFromMMTable(UINT16 MM, int n, char *ea) ; |
| 73 | 73 | static void AssembleeaFromtTable (UINT16 t, UINT16 val, char *ea) ; |
| 74 | 74 | static void AssembleeaFromqTable (UINT16 q, int n, char *ea) ; |
| r1037 | r1038 | |
| 431 | 431 | } |
| 432 | 432 | |
| 433 | 433 | |
| 434 | #ifdef UNUSED_FUNCTION | |
| 434 | 435 | static unsigned DecodeDXMDROpcode(char *buffer, UINT16 op, unsigned pc) |
| 435 | 436 | { |
| 436 | 437 | unsigned retSize = 0 ; |
| r1037 | r1038 | |
| 501 | 502 | |
| 502 | 503 | return retSize ; |
| 503 | 504 | } |
| 505 | #endif | |
| 504 | 506 | |
| 505 | 507 | |
| 506 | 508 | static unsigned DecodeNPMOpcode(char *buffer, UINT16 op, unsigned pc, const UINT8 *oprom) |
| r1037 | r1038 | |
| 1410 | 1412 | strcat(buffer, final) ; |
| 1411 | 1413 | } |
| 1412 | 1414 | |
| 1415 | #ifdef UNUSED_FUNCTION | |
| 1413 | 1416 | static void AppendDXMDR(char *buffer, UINT16 op) |
| 1414 | 1417 | { |
| 1415 | 1418 | char D1[32] ; |
| r1037 | r1038 | |
| 1428 | 1431 | sprintf(temp, " X:%s,%s X:%s,%s", ea1, D1, ea2, D2) ; |
| 1429 | 1432 | strcat(buffer, temp) ; |
| 1430 | 1433 | } |
| 1434 | #endif | |
| 1431 | 1435 | |
| 1432 | 1436 | |
| 1433 | 1437 | |
| r1037 | r1038 | |
| 1521 | 1525 | } |
| 1522 | 1526 | } |
| 1523 | 1527 | |
| 1528 | #ifdef UNUSED_FUNCTION | |
| 1524 | 1529 | static void DecodeDDFTable(UINT16 DD, UINT16 F, char *S, char *D) |
| 1525 | 1530 | { |
| 1526 | 1531 | UINT16 switchVal = (DD << 1) | F ; |
| r1037 | r1038 | |
| 1537 | 1542 | case 0x7: sprintf(S, "Y1") ; sprintf(D, "B") ; break ; |
| 1538 | 1543 | } |
| 1539 | 1544 | } |
| 1545 | #endif | |
| 1540 | 1546 | |
| 1541 | 1547 | static void DecodeEETable(UINT16 EE, char *D) |
| 1542 | 1548 | { |
| r1037 | r1038 | |
| 1662 | 1668 | } |
| 1663 | 1669 | } |
| 1664 | 1670 | |
| 1671 | #ifdef UNUSED_FUNCTION | |
| 1665 | 1672 | static void DecodeJFTable(UINT16 J, UINT16 F, char *S, char *D) |
| 1666 | 1673 | { |
| 1667 | 1674 | UINT16 switchVal = (J << 1) | F ; |
| r1037 | r1038 | |
| 1729 | 1736 | case 0x7: sprintf(S1, "X1") ; sprintf(S2, "Y1") ; sprintf(D, "B") ; break ; |
| 1730 | 1737 | } |
| 1731 | 1738 | } |
| 1739 | #endif | |
| 1732 | 1740 | |
| 1733 | 1741 | static void DecodeQQFTableSp(UINT16 QQ, UINT16 F, char *S1, char *S2, char *D) |
| 1734 | 1742 | { |
| r1037 | r1038 | |
| 1747 | 1755 | } |
| 1748 | 1756 | } |
| 1749 | 1757 | |
| 1758 | #ifdef UNUSED_FUNCTION | |
| 1750 | 1759 | static void DecodeQQQFTable(UINT16 QQQ, UINT16 F, char *S1, char *S2, char *D) |
| 1751 | 1760 | { |
| 1752 | 1761 | UINT16 switchVal = (QQQ << 1) | F ; |
| r1037 | r1038 | |
| 1771 | 1780 | case 0xf: sprintf(S1, "Y1") ; sprintf(S2, "X1") ; sprintf(D, "B") ; break ; |
| 1772 | 1781 | } |
| 1773 | 1782 | } |
| 1783 | #endif | |
| 1774 | 1784 | |
| 1775 | 1785 | static int DecodeRRTable(UINT16 RR) |
| 1776 | 1786 | { |
| r1037 | r1038 | |
| 1786 | 1796 | } |
| 1787 | 1797 | } |
| 1788 | 1798 | |
| 1799 | #ifdef UNUSED_FUNCTION | |
| 1789 | 1800 | static void DecodessTable(UINT16 ss, char *arithmetic) |
| 1790 | 1801 | { |
| 1791 | 1802 | switch(ss) |
| r1037 | r1038 | |
| 1816 | 1827 | case 0x19: sprintf(arg, "add") ; case 0x1b: sprintf(arg, "sub") ; sprintf(S, "A") ; sprintf(D, "B") ; break ; |
| 1817 | 1828 | } |
| 1818 | 1829 | } |
| 1830 | #endif | |
| 1819 | 1831 | |
| 1820 | 1832 | static void DecodeZTable(UINT16 Z, char *ea) |
| 1821 | 1833 | { |
| r1037 | r1038 | |
| 1837 | 1849 | } |
| 1838 | 1850 | } |
| 1839 | 1851 | |
| 1852 | #ifdef UNUSED_FUNCTION | |
| 1840 | 1853 | static void AssembleeaFrommmTable(UINT16 mm, int n1, int n2, char *ea1, char *ea2) |
| 1841 | 1854 | { |
| 1842 | 1855 | switch(mm) |
| r1037 | r1038 | |
| 1851 | 1864 | sprintf(ea2, "(R%d)+N%d", n2, n2) ; break ; |
| 1852 | 1865 | } |
| 1853 | 1866 | } |
| 1867 | #endif | |
| 1854 | 1868 | |
| 1855 | 1869 | static void AssembleeaFromMMTable(UINT16 MM, int n, char *ea) |
| 1856 | 1870 | { |
| r1037 | r1038 | |
|---|---|---|
| 30 | 30 | |
| 31 | 31 | TODO: |
| 32 | 32 | - some wrong cycle counts |
| 33 | - support more than 1 cpu when it'll be needed | |
| 34 | 33 | |
| 35 | 34 | CHANGELOG: |
| 36 | 35 | |
| r1037 | r1038 | |
| 419 | 418 | UINT32 trap_entry; // entry point to get trap address |
| 420 | 419 | |
| 421 | 420 | UINT8 n; |
| 422 | mame_timer *timer; | |
| 423 | mame_time time; | |
| 424 | 421 | INT32 delay_timer; |
| 422 | int timer_clocks; | |
| 425 | 423 | |
| 426 | 424 | struct _delay delay; |
| 427 | 425 | |
| r1037 | r1038 | |
| 479 | 477 | #define SAME_SRC_DSTF current_regs.same_src_dstf |
| 480 | 478 | #define SAME_SRCF_DST current_regs.same_srcf_dst |
| 481 | 479 | |
| 480 | #if (HAS_E116T || HAS_E116XT || HAS_E116XS || HAS_E116XSR || HAS_GMS30C2116 || HAS_GMS30C2216) | |
| 482 | 481 | static UINT32 program_read_dword_16be(offs_t address) |
| 483 | 482 | { |
| 484 | 483 | return (program_read_word_16be(address & ~1) << 16) | program_read_word_16be((address & ~1) + 2); |
| r1037 | r1038 | |
| 500 | 499 | io_write_word_16be(address & ~1, (data & 0xffff0000)>>16); |
| 501 | 500 | io_write_word_16be((address & ~1)+2, data & 0xffff); |
| 502 | 501 | } |
| 502 | #endif | |
| 503 | 503 | |
| 504 | 504 | |
| 505 | 505 | /* Opcodes table */ |
| r1037 | r1038 | |
| 761 | 761 | //other bits are reversed, in particular 7 - 5 for the operating system. |
| 762 | 762 | //the user program can only changes the above 2 flags |
| 763 | 763 | |
| 764 | /* Timer */ | |
| 765 | static TIMER_CALLBACK( hyperstone_timer ) | |
| 766 | { | |
| 767 | TR++; // wrap around to 0 modulo 32 bits | |
| 768 | ||
| 769 | if( hyperstone.delay_timer ) | |
| 770 | { | |
| 771 | hyperstone.delay_timer = 0; | |
| 772 | mame_timer_adjust(hyperstone.timer,hyperstone.time,0,hyperstone.time); | |
| 773 | } | |
| 774 | } | |
| 775 | ||
| 776 | 764 | static UINT32 get_global_register(UINT8 code) |
| 777 | 765 | { |
| 778 | 766 | /* |
| r1037 | r1038 | |
| 876 | 864 | case TPR_REGISTER: |
| 877 | 865 | |
| 878 | 866 | hyperstone.n = (val & 0xff0000) >> 16; |
| 879 | hyperstone.time = scale_up_mame_time(MAME_TIME_IN_HZ(cpunum_get_clock(0)), hyperstone.n + 2); | |
| 880 | 867 | |
| 881 | 868 | if(!(val & 0x80000000)) /* change immediately */ |
| 882 | 869 | { |
| 883 | 870 | hyperstone.delay_timer = 0; |
| 884 | | |
| 871 | | |
| 885 | 872 | } |
| 886 | 873 | else |
| 887 | 874 | { |
| r1037 | r1038 | |
| 1672 | 1659 | state_save_register_item("E132XS", index, hyperstone.intblock); |
| 1673 | 1660 | state_save_register_item("E132XS", index, hyperstone.delay_timer); |
| 1674 | 1661 | state_save_register_item("E132XS", index, hyperstone.delay.delay_cmd); |
| 1675 | state_save_register_item("E132XS", index, hyperstone.time.seconds); | |
| 1676 | state_save_register_item("E132XS", index, hyperstone.time.subseconds); | |
| 1662 | state_save_register_item("E132XS", index, hyperstone.timer_clocks); | |
| 1677 | 1663 | |
| 1678 | hyperstone.timer = mame_timer_alloc(hyperstone_timer); | |
| 1679 | mame_timer_adjust(hyperstone.timer, time_never, 0, time_zero); | |
| 1680 | ||
| 1681 | 1664 | hyperstone.irq_callback = irqcallback; |
| 1682 | 1665 | } |
| 1683 | 1666 | |
| 1667 | #if (HAS_E116T || HAS_E116XT || HAS_E116XS || HAS_E116XSR || HAS_GMS30C2116 || HAS_GMS30C2216) | |
| 1684 | 1668 | static void e116_init(int index, int clock, const void *config, int (*irqcallback)(int)) |
| 1685 | 1669 | { |
| 1686 | 1670 | hyp_cpu_read_byte = program_read_byte_16be; |
| r1037 | r1038 | |
| 1697 | 1681 | |
| 1698 | 1682 | hyperstone_init(index, clock, config, irqcallback); |
| 1699 | 1683 | } |
| 1684 | #endif | |
| 1700 | 1685 | |
| 1686 | #if (HAS_E132N || HAS_E132T || HAS_E132XN || HAS_E132XT || HAS_E132XS || HAS_E132XSR || HAS_GMS30C2132 || HAS_GMS30C2232) | |
| 1701 | 1687 | static void e132_init(int index, int clock, const void *config, int (*irqcallback)(int)) |
| 1702 | 1688 | { |
| 1703 | 1689 | hyp_cpu_read_byte = program_read_byte_32be; |
| r1037 | r1038 | |
| 1714 | 1700 | |
| 1715 | 1701 | hyperstone_init(index, clock, config, irqcallback); |
| 1716 | 1702 | } |
| 1703 | #endif | |
| 1717 | 1704 | |
| 1718 | 1705 | static void hyperstone_reset(void) |
| 1719 | 1706 | { |
| 1720 | 1707 | //TODO: Add different reset initializations for BCR, MCR, FCR, TPR |
| 1721 | 1708 | |
| 1722 | 1709 | int (*save_irqcallback)(int); |
| 1723 | mame_timer *hyp_timer; | |
| 1724 | 1710 | |
| 1725 | 1711 | save_irqcallback = hyperstone.irq_callback; |
| 1726 | hyp_timer = hyperstone.timer; | |
| 1727 | 1712 | memset(&hyperstone, 0, sizeof(hyperstone_regs)); |
| 1728 | hyperstone.timer = hyp_timer; | |
| 1729 | 1713 | hyperstone.irq_callback = save_irqcallback; |
| 1730 | 1714 | |
| 1731 | 1715 | hyperstone.h_clear = 0; |
| r1037 | r1038 | |
| 1760 | 1744 | // nothing to do |
| 1761 | 1745 | } |
| 1762 | 1746 | |
| 1747 | /* Handle the timer, increasing its value after "timer_clocks" clocks and returning the new icount base that needs to be used for the next check */ | |
| 1748 | static int handle_timers(int current_icount, int previous_icount) | |
| 1749 | { | |
| 1750 | int diff = previous_icount - current_icount; | |
| 1751 | int new_icount_base; | |
| 1752 | ||
| 1753 | if(diff >= hyperstone.timer_clocks) | |
| 1754 | { | |
| 1755 | TR++; // wrap around to 0 modulo 32 bits | |
| 1756 | ||
| 1757 | if( hyperstone.delay_timer ) | |
| 1758 | { | |
| 1759 | hyperstone.delay_timer = 0; | |
| 1760 | hyperstone.timer_clocks = hyperstone.n + 2; | |
| 1761 | } | |
| 1762 | ||
| 1763 | new_icount_base = current_icount + (diff - hyperstone.timer_clocks); | |
| 1764 | } | |
| 1765 | else | |
| 1766 | { | |
| 1767 | new_icount_base = previous_icount; | |
| 1768 | } | |
| 1769 | ||
| 1770 | if(!hyperstone.intblock) | |
| 1771 | { | |
| 1772 | if( !((TR - TCR) & 0x80000000) ) | |
| 1773 | { | |
| 1774 | /* generate a timer interrupt */ | |
| 1775 | set_irq_line(7, PULSE_LINE); | |
| 1776 | } | |
| 1777 | } | |
| 1778 | ||
| 1779 | return new_icount_base; | |
| 1780 | } | |
| 1781 | ||
| 1763 | 1782 | static int hyperstone_execute(int cycles) |
| 1764 | 1783 | { |
| 1784 | int old_icount = cycles; | |
| 1765 | 1785 | hyperstone_ICount = cycles; |
| 1766 | 1786 | |
| 1767 | 1787 | do |
| r1037 | r1038 | |
| 1809 | 1829 | |
| 1810 | 1830 | SET_ILC(hyperstone.instruction_length & 3); |
| 1811 | 1831 | |
| 1832 | old_icount = handle_timers(hyperstone_ICount, old_icount); | |
| 1833 | ||
| 1812 | 1834 | if(hyperstone.h_clear) |
| 1813 | 1835 | { |
| 1814 | 1836 | SET_H(0); |
| r1037 | r1038 | |
| 1830 | 1852 | { |
| 1831 | 1853 | hyperstone.intblock--; |
| 1832 | 1854 | } |
| 1833 | else | |
| 1834 | { | |
| 1835 | if( !((TR - TCR) & 0x80000000) ) | |
| 1836 | { | |
| 1837 | /* generate a timer interrupt */ | |
| 1838 | set_irq_line(7, PULSE_LINE); | |
| 1839 | } | |
| 1840 | } | |
| 1841 | 1855 | |
| 1842 | 1856 | } while( hyperstone_ICount > 0 ); |
| 1843 | 1857 |
| r1037 | r1038 | |
|---|---|---|
| 277 | 277 | static I386_REGS I; |
| 278 | 278 | |
| 279 | 279 | |
| 280 | /* Forward declarations */ | |
| 281 | static void I386OP(decode_opcode)(void); | |
| 282 | static void I386OP(decode_two_byte)(void); | |
| 283 | ||
| 284 | ||
| 285 | 280 | extern int i386_parity_table[256]; |
| 286 | 281 | |
| 287 | 282 | #define PROTECTED_MODE (I.cr[0] & 0x1) |
| r1037 | r1038 | |
|---|---|---|
| 1250 | 1250 | if( address_size == 2 ) { |
| 1251 | 1251 | if ((rm & 7) == 4) |
| 1252 | 1252 | s = handle_sib_byte( s, mod ); |
| 1253 | else if (rm == 5 && mod == 0) { | |
| 1253 | else if ((rm & 7) == 5 && mod == 0) { | |
| 1254 | 1254 | disp32 = FETCHD32(); |
| 1255 | 1255 | s += sprintf( s, "rip%s", shexstring(disp32, 0, TRUE) ); |
| 1256 | 1256 | } else |
| r1037 | r1038 | |
| 1267 | 1267 | } else if (address_size == 1) { |
| 1268 | 1268 | if ((rm & 7) == 4) |
| 1269 | 1269 | s = handle_sib_byte( s, mod ); |
| 1270 | else if (rm == 5 && mod == 0) { | |
| 1270 | else if ((rm & 7) == 5 && mod == 0) { | |
| 1271 | 1271 | disp32 = FETCHD32(); |
| 1272 | 1272 | if (curmode == 64) |
| 1273 | 1273 | s += sprintf( s, "eip%s", shexstring(disp32, 0, TRUE) ); |
| r1037 | r1038 | |
|---|---|---|
| 391 | 391 | } |
| 392 | 392 | } |
| 393 | 393 | |
| 394 | /* Forward declarations */ | |
| 395 | static void I386OP(decode_opcode)(void); | |
| 396 | static void I386OP(decode_two_byte)(void); | |
| 394 | 397 | |
| 395 | 398 | |
| 399 | ||
| 396 | 400 | #include "i386ops.c" |
| 397 | 401 | #include "i386op16.c" |
| 398 | 402 | #include "i386op32.c" |
| r1037 | r1038 | |
|---|---|---|
| 111 | 111 | if (!drc->tentative_list) |
| 112 | 112 | return NULL; |
| 113 | 113 | |
| 114 | /* seed the cache */ | |
| 115 | // drc_cache_reset(drc); | |
| 116 | 114 | return drc; |
| 117 | 115 | |
| 118 | 116 | error: |
| r1037 | r1038 | |
|---|---|---|
| 66 | 66 | |
| 67 | 67 | /***********************************************************************/ |
| 68 | 68 | |
| 69 | #if (HAS_PPC601||HAS_PPC602||HAS_PPC603||HAS_MPC8240) | |
| 69 | 70 | static UINT16 ppc_read16_unaligned(UINT32 a) |
| 70 | 71 | { |
| 71 | 72 | return ((UINT16)ppc.read8(a+0) << 8) | ((UINT16)ppc.read8(a+1) << 0); |
| r1037 | r1038 | |
| 101 | 102 | ppc.write32(a+0, (UINT32)(d >> 32)); |
| 102 | 103 | ppc.write32(a+4, (UINT32)(d)); |
| 103 | 104 | } |
| 105 | #endif | |
| 104 | 106 | |
| 105 | 107 | /***********************************************************************/ |
| 106 | 108 | |
| r1037 | r1038 | |
| 119 | 121 | PPC_TRANSLATE_NOEXCEPTION = 0x0004 |
| 120 | 122 | }; |
| 121 | 123 | |
| 124 | #ifdef MESS | |
| 122 | 125 | static int ppc_is_protected(UINT32 pp, int flags) |
| 123 | 126 | { |
| 124 | 127 | if (flags & PPC_TRANSLATE_WRITE) |
| r1037 | r1038 | |
| 133 | 136 | } |
| 134 | 137 | return FALSE; |
| 135 | 138 | } |
| 139 | #endif | |
| 136 | 140 | |
| 137 | 141 | static int ppc_translate_address(offs_t *addr_ptr, int flags) |
| 138 | 142 | { |
| r1037 | r1038 | |
| 282 | 286 | #endif |
| 283 | 287 | } |
| 284 | 288 | |
| 289 | #if (HAS_PPC602||HAS_PPC603) | |
| 285 | 290 | static int ppc_translate_address_cb(int space, offs_t *addr) |
| 286 | 291 | { |
| 287 | 292 | int success = 1; |
| r1037 | r1038 | |
| 293 | 298 | } |
| 294 | 299 | return success; |
| 295 | 300 | } |
| 301 | #endif | |
| 296 | 302 | |
| 297 | 303 | static UINT8 ppc_read8_translated(offs_t address) |
| 298 | 304 | { |
| r1037 | r1038 | |
| 342 | 348 | program_write_qword_64be(address, data); |
| 343 | 349 | } |
| 344 | 350 | |
| 351 | #ifndef PPC_DRC | |
| 352 | #if (HAS_PPC601||HAS_PPC602||HAS_PPC603||HAS_MPC8240) | |
| 345 | 353 | static UINT32 ppc_readop_translated(offs_t address) |
| 346 | 354 | { |
| 347 | 355 | ppc_translate_address(&address, PPC_TRANSLATE_CODE | PPC_TRANSLATE_READ); |
| 348 | 356 | return program_read_dword_64be(address); |
| 349 | 357 | } |
| 358 | #endif | |
| 359 | #endif | |
| 350 | 360 | |
| 351 | 361 | /***********************************************************************/ |
| 352 | 362 | |
| r1037 | r1038 | |
| 362 | 372 | |
| 363 | 373 | /***********************************************************************/ |
| 364 | 374 | |
| 375 | #if (HAS_PPC601||HAS_PPC602||HAS_PPC603||HAS_MPC8240) | |
| 365 | 376 | static int ppc_readop(UINT32 offset, int size, UINT64 *value) |
| 366 | 377 | { |
| 367 | 378 | if (!(ppc.msr & MSR_IR)) |
| r1037 | r1038 | |
| 422 | 433 | |
| 423 | 434 | return 1; |
| 424 | 435 | } |
| 436 | #endif |
| r1037 | r1038 | |
|---|---|---|
| 71 | 71 | if((ppc.msr & 0x2000) == 0){ \ |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | #if (HAS_PPC601||HAS_PPC602||HAS_PPC603||HAS_MPC8240) | |
| 74 | 75 | static UINT32 ppc_field_xlat[256]; |
| 76 | #endif | |
| 75 | 77 | |
| 76 | 78 | |
| 77 | 79 | |
| r1037 | r1038 | |
| 247 | 249 | FPR fpr[32]; |
| 248 | 250 | UINT32 sr[16]; |
| 249 | 251 | |
| 250 | #if HAS_PPC603 || HAS_PPC601 | |
| 252 | #if HAS_PPC603 || HAS_PPC601 || HAS_MPC8240 | |
| 251 | 253 | int is603; |
| 252 | 254 | #endif |
| 253 | 255 | #if HAS_PPC602 |
| r1037 | r1038 | |
| 831 | 833 | #include "ppc602.c" |
| 832 | 834 | #endif |
| 833 | 835 | |
| 834 | #if (HAS_PPC603 || HAS_PPC601) | |
| 836 | #if (HAS_PPC603 || HAS_PPC601 || HAS_MPC8240) | |
| 835 | 837 | #include "ppc603.c" |
| 836 | 838 | #endif |
| 837 | 839 | |
| r1037 | r1038 | |
| 1834 | 1836 | case CPUINFO_PTR_READ: info->read = ppc_read; break; |
| 1835 | 1837 | case CPUINFO_PTR_WRITE: info->write = ppc_write; break; |
| 1836 | 1838 | case CPUINFO_PTR_READOP: info->readop = ppc_readop; break; |
| 1839 | case CPUINFO_PTR_TRANSLATE: info->translate = ppc_translate_address_cb; break; | |
| 1837 | 1840 | |
| 1838 | 1841 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 1839 | 1842 | case CPUINFO_STR_NAME: strcpy(info->s, "PPC602"); break; |
| r1037 | r1038 | |
|---|---|---|
| 3 | 3 | // it really seems like this should be elsewhere - like maybe the floating point checks can hang out someplace else |
| 4 | 4 | #include <math.h> |
| 5 | 5 | |
| 6 | #ifndef PPC_DRC | |
| 7 | #if (HAS_PPC601||HAS_PPC602||HAS_PPC603||HAS_MPC8240) | |
| 6 | 8 | static void ppc_unimplemented(UINT32 op) |
| 7 | 9 | { |
| 8 | 10 | fatalerror("ppc: Unimplemented opcode %08X at %08X", op, ppc.pc); |
| 9 | 11 | } |
| 12 | #endif | |
| 10 | 13 | |
| 11 | 14 | static void ppc_addx(UINT32 op) |
| 12 | 15 | { |
| r1037 | r1038 | |
| 39 | 42 | SET_CR0(REG(RT)); |
| 40 | 43 | } |
| 41 | 44 | } |
| 45 | #endif | |
| 42 | 46 | |
| 43 | 47 | static void ppc_addex(UINT32 op) |
| 44 | 48 | { |
| r1037 | r1038 | |
| 63 | 67 | } |
| 64 | 68 | } |
| 65 | 69 | |
| 70 | #ifndef PPC_DRC | |
| 66 | 71 | static void ppc_addi(UINT32 op) |
| 67 | 72 | { |
| 68 | 73 | UINT32 i = SIMM16; |
| r1037 | r1038 | |
| 112 | 117 | |
| 113 | 118 | REG(RT) = i; |
| 114 | 119 | } |
| 120 | #endif | |
| 115 | 121 | |
| 116 | 122 | static void ppc_addmex(UINT32 op) |
| 117 | 123 | { |
| r1037 | r1038 | |
| 155 | 161 | } |
| 156 | 162 | } |
| 157 | 163 | |
| 164 | #ifndef PPC_DRC | |
| 158 | 165 | static void ppc_andx(UINT32 op) |
| 159 | 166 | { |
| 160 | 167 | REG(RA) = REG(RS) & REG(RB); |
| r1037 | r1038 | |
| 345 | 352 | SET_CR0(REG(RA)); |
| 346 | 353 | } |
| 347 | 354 | } |
| 355 | #endif | |
| 348 | 356 | |
| 349 | 357 | static void ppc_crand(UINT32 op) |
| 350 | 358 | { |
| r1037 | r1038 | |
| 426 | 434 | CR(bit / 4) &= ~_BIT(3-(bit % 4)); |
| 427 | 435 | } |
| 428 | 436 | |
| 437 | #ifndef PPC_DRC | |
| 429 | 438 | static void ppc_dcbf(UINT32 op) |
| 430 | 439 | { |
| 431 | 440 | |
| r1037 | r1038 | |
| 455 | 464 | { |
| 456 | 465 | |
| 457 | 466 | } |
| 467 | #endif | |
| 458 | 468 | |
| 459 | 469 | static void ppc_divwx(UINT32 op) |
| 460 | 470 | { |
| r1037 | r1038 | |
| 507 | 517 | } |
| 508 | 518 | } |
| 509 | 519 | |
| 520 | #ifndef PPC_DRC | |
| 510 | 521 | static void ppc_eieio(UINT32 op) |
| 511 | 522 | { |
| 512 | 523 | |
| r1037 | r1038 | |
| 682 | 693 | |
| 683 | 694 | REG(RT) = (UINT32)READ16(ea); |
| 684 | 695 | } |
| 696 | #endif | |
| 685 | 697 | |
| 686 | 698 | static void ppc_lmw(UINT32 op) |
| 687 | 699 | { |
| r1037 | r1038 | |
| 777 | 789 | REG(RT) = READ32(ea); |
| 778 | 790 | } |
| 779 | 791 | |
| 792 | #ifndef PPC_DRC | |
| 780 | 793 | static void ppc_lwbrx(UINT32 op) |
| 781 | 794 | { |
| 782 | 795 | UINT32 ea; |
| r1037 | r1038 | |
| 856 | 869 | { |
| 857 | 870 | REG(RT) = ppc_get_spr(SPR); |
| 858 | 871 | } |
| 872 | #endif | |
| 859 | 873 | |
| 860 | 874 | static void ppc_mtcrf(UINT32 op) |
| 861 | 875 | { |
| r1037 | r1038 | |
| 872 | 886 | if( fxm & 0x01 ) CR(7) = (REG(t) >> 0) & 0xf; |
| 873 | 887 | } |
| 874 | 888 | |
| 889 | #ifndef PPC_DRC | |
| 875 | 890 | static void ppc_mtmsr(UINT32 op) |
| 876 | 891 | { |
| 877 | 892 | ppc_set_msr(REG(RS)); |
| r1037 | r1038 | |
| 1051 | 1066 | SET_CR0(REG(RA)); |
| 1052 | 1067 | } |
| 1053 | 1068 | } |
| 1069 | #endif | |
| 1054 | 1070 | |
| 1055 | 1071 | #ifndef PPC_DRC |
| 1056 | 1072 | static void ppc_sc(UINT32 op) |
| r1037 | r1038 | |
| 1145 | 1161 | } |
| 1146 | 1162 | } |
| 1147 | 1163 | |
| 1164 | #ifndef PPC_DRC | |
| 1148 | 1165 | static void ppc_stb(UINT32 op) |
| 1149 | 1166 | { |
| 1150 | 1167 | UINT32 ea; |
| r1037 | r1038 | |
| 1238 | 1255 | |
| 1239 | 1256 | WRITE16(ea, (UINT16)REG(RS)); |
| 1240 | 1257 | } |
| 1258 | #endif | |
| 1241 | 1259 | |
| 1242 | 1260 | static void ppc_stmw(UINT32 op) |
| 1243 | 1261 | { |
| r1037 | r1038 | |
| 1316 | 1334 | } |
| 1317 | 1335 | } |
| 1318 | 1336 | |
| 1337 | #ifndef PPC_DRC | |
| 1319 | 1338 | static void ppc_stw(UINT32 op) |
| 1320 | 1339 | { |
| 1321 | 1340 | UINT32 ea; |
| r1037 | r1038 | |
| 1341 | 1360 | w = REG(RS); |
| 1342 | 1361 | WRITE32(ea, BYTE_REVERSE32(w)); |
| 1343 | 1362 | } |
| 1363 | #endif | |
| 1344 | 1364 | |
| 1345 | 1365 | static void ppc_stwcx_rc(UINT32 op) |
| 1346 | 1366 | { |
| r1037 | r1038 | |
| 1367 | 1387 | } |
| 1368 | 1388 | } |
| 1369 | 1389 | |
| 1390 | #ifndef PPC_DRC | |
| 1370 | 1391 | static void ppc_stwu(UINT32 op) |
| 1371 | 1392 | { |
| 1372 | 1393 | UINT32 ea = REG(RA) + SIMM16; |
| r1037 | r1038 | |
| 1408 | 1429 | SET_CR0(REG(RT)); |
| 1409 | 1430 | } |
| 1410 | 1431 | } |
| 1432 | #endif | |
| 1411 | 1433 | |
| 1412 | 1434 | static void ppc_subfcx(UINT32 op) |
| 1413 | 1435 | { |
| r1037 | r1038 | |
| 1425 | 1447 | } |
| 1426 | 1448 | } |
| 1427 | 1449 | |
| 1450 | #ifndef PPC_DRC | |
| 1428 | 1451 | static void ppc_subfex(UINT32 op) |
| 1429 | 1452 | { |
| 1430 | 1453 | UINT32 ra = REG(RA); |
| r1037 | r1038 | |
| 1456 | 1479 | |
| 1457 | 1480 | SET_SUB_CA(REG(RT), i, ra); |
| 1458 | 1481 | } |
| 1482 | #endif | |
| 1459 | 1483 | |
| 1460 | 1484 | static void ppc_subfmex(UINT32 op) |
| 1461 | 1485 | { |
| r1037 | r1038 | |
| 1495 | 1519 | } |
| 1496 | 1520 | } |
| 1497 | 1521 | |
| 1522 | #ifndef PPC_DRC | |
| 1498 | 1523 | static void ppc_sync(UINT32 op) |
| 1499 | 1524 | { |
| 1500 | 1525 | |
| 1501 | 1526 | } |
| 1527 | #endif | |
| 1502 | 1528 | |
| 1503 | 1529 | #ifndef PPC_DRC |
| 1504 | 1530 | static void ppc_tw(UINT32 op) |
| r1037 | r1038 | |
| 1588 | 1614 | } |
| 1589 | 1615 | #endif |
| 1590 | 1616 | |
| 1617 | #ifndef PPC_DRC | |
| 1591 | 1618 | static void ppc_xorx(UINT32 op) |
| 1592 | 1619 | { |
| 1593 | 1620 | REG(RA) = REG(RS) ^ REG(RB); |
| r1037 | r1038 | |
| 1613 | 1640 | { |
| 1614 | 1641 | fatalerror("ppc: Invalid opcode %08X PC : %X", op, ppc.pc); |
| 1615 | 1642 | } |
| 1643 | #endif | |
| 1616 | 1644 | |
| 1617 | 1645 | |
| 1618 | 1646 | // Everything below is new from AJG |
| r1037 | r1038 | |
| 1757 | 1785 | |
| 1758 | 1786 | |
| 1759 | 1787 | |
| 1788 | #if (HAS_PPC601||HAS_PPC602||HAS_PPC603||HAS_MPC8240) | |
| 1760 | 1789 | static void ppc_lfs(UINT32 op) |
| 1761 | 1790 | { |
| 1762 | 1791 | UINT32 ea = SIMM16; |
| r1037 | r1038 | |
| 1786 | 1815 | REG(a) = ea; |
| 1787 | 1816 | } |
| 1788 | 1817 | |
| 1818 | #ifndef PPC_DRC | |
| 1789 | 1819 | static void ppc_lfd(UINT32 op) |
| 1790 | 1820 | { |
| 1791 | 1821 | UINT32 ea = SIMM16; |
| r1037 | r1038 | |
| 1810 | 1840 | |
| 1811 | 1841 | REG(a) = ea; |
| 1812 | 1842 | } |
| 1843 | #endif | |
| 1813 | 1844 | |
| 1814 | 1845 | static void ppc_stfs(UINT32 op) |
| 1815 | 1846 | { |
| r1037 | r1038 | |
| 1840 | 1871 | REG(a) = ea; |
| 1841 | 1872 | } |
| 1842 | 1873 | |
| 1874 | #ifndef PPC_DRC | |
| 1843 | 1875 | static void ppc_stfd(UINT32 op) |
| 1844 | 1876 | { |
| 1845 | 1877 | UINT32 ea = SIMM16; |
| r1037 | r1038 | |
| 1889 | 1921 | |
| 1890 | 1922 | FPR(d).id = READ64(ea); |
| 1891 | 1923 | } |
| 1924 | #endif | |
| 1892 | 1925 | |
| 1893 | 1926 | static void ppc_lfsux(UINT32 op) |
| 1894 | 1927 | { |
| r1037 | r1038 | |
| 1971 | 2004 | ppc.sr[REG(b) >> 28] = REG(t); |
| 1972 | 2005 | } |
| 1973 | 2006 | |
| 2007 | #ifndef PPC_DRC | |
| 1974 | 2008 | static void ppc_dcba(UINT32 op) |
| 1975 | 2009 | { |
| 1976 | 2010 | /* TODO: Cache not emulated so this opcode doesn't need to be implemented */ |
| r1037 | r1038 | |
| 1988 | 2022 | |
| 1989 | 2023 | REG(a) = ea; |
| 1990 | 2024 | } |
| 2025 | #endif | |
| 1991 | 2026 | |
| 1992 | 2027 | static void ppc_stfdx(UINT32 op) |
| 1993 | 2028 | { |
| r1037 | r1038 | |
| 2043 | 2078 | WRITE32(ea, f.i); |
| 2044 | 2079 | } |
| 2045 | 2080 | |
| 2081 | #ifndef PPC_DRC | |
| 2046 | 2082 | static void ppc_tlbia(UINT32 op) |
| 2047 | 2083 | { |
| 2048 | 2084 | /* TODO: TLB not emulated so this opcode doesn't need to implemented */ |
| r1037 | r1038 | |
| 2067 | 2103 | { |
| 2068 | 2104 | ppc_unimplemented(op); |
| 2069 | 2105 | } |
| 2106 | #endif | |
| 2070 | 2107 | |
| 2071 | 2108 | static void ppc_fabsx(UINT32 op) |
| 2072 | 2109 | { |
| r1037 | r1038 | |
| 2808 | 2845 | SET_CR1(); |
| 2809 | 2846 | } |
| 2810 | 2847 | } |
| 2848 | #endif |
| r1037 | r1038 | |
|---|---|---|
| 499 | 499 | emit_xor_r32_r32(DRCTOP, REG_EBX, REG_EBX); |
| 500 | 500 | emit_xor_r32_r32(DRCTOP, REG_EAX, REG_EAX); |
| 501 | 501 | emit_cmp_r32_imm(DRCTOP, REG_EDX, 0); |
| 502 | /*_lahf(); | |
| 502 | /* | |
| 503 | _lahf(); | |
| 503 | 504 | |
| 504 | 505 | _shr_r32_imm(REG_EAX, 14); |
| 505 | 506 | |
| 506 | 507 | _add_r32_imm(REG_EAX, &condition_table); |
| 507 | _mov_r8_m8(REG_BL, MBD(REG_EAX, 0)); | |
| 508 | */ | |
| 509 | ||
| 508 | _mov_r8_m8bd(REG_BL, REG_EAX, 0); | |
| 509 | */ | |
| 510 | 510 | emit_setcc_r8(DRCTOP, COND_Z, REG_AL); |
| 511 | 511 | emit_setcc_r8(DRCTOP, COND_L, REG_AH); |
| 512 | 512 | emit_setcc_r8(DRCTOP, COND_G, REG_BL); |
| r1037 | r1038 | |
| 522 | 522 | emit_mov_m8_r8(DRCTOP, MABS(&ppc.cr[0]), REG_BL); |
| 523 | 523 | } |
| 524 | 524 | |
| 525 | #ifdef UNUSED_FUNCTION | |
| 525 | 526 | static void append_set_cr1(drc_core *drc) |
| 526 | 527 | { |
| 527 | 528 | emit_mov_r32_m32(DRCTOP, REG_EAX, MABS(&ppc.fpscr)); |
| r1037 | r1038 | |
| 529 | 530 | emit_and_r32_imm(DRCTOP, REG_EAX, 0xf); |
| 530 | 531 | emit_mov_m8_r8(DRCTOP, MABS(&ppc.cr[1]), REG_AL); |
| 531 | 532 | } |
| 533 | #endif | |
| 532 | 534 | |
| 533 | 535 | static UINT32 recompile_addx(drc_core *drc, UINT32 op) |
| 534 | 536 | { |
| r1037 | r1038 | |
| 2618 | 2620 | return RECOMPILE_SUCCESSFUL_CP(1,4); |
| 2619 | 2621 | } |
| 2620 | 2622 | |
| 2623 | #if HAS_PPC403 | |
| 2621 | 2624 | static UINT32 recompile_dccci(drc_core *drc, UINT32 op) |
| 2622 | 2625 | { |
| 2623 | 2626 | return RECOMPILE_SUCCESSFUL_CP(1,4); |
| r1037 | r1038 | |
| 2649 | 2652 | return RECOMPILE_UNIMPLEMENTED; |
| 2650 | 2653 | } |
| 2651 | 2654 | |
| 2652 | #if HAS_PPC403 | |
| 2653 | 2655 | static UINT32 recompile_mfdcr(drc_core *drc, UINT32 op) |
| 2654 | 2656 | { |
| 2655 | 2657 | emit_mov_m32_r32(DRCTOP, MABS(&ppc_icount), REG_EBP); |
| r1037 | r1038 | |
| 2707 | 2709 | |
| 2708 | 2710 | /* PowerPC 60x Recompilers */ |
| 2709 | 2711 | |
| 2712 | #if (HAS_PPC601||HAS_PPC602||HAS_PPC603||HAS_MPC8240) | |
| 2710 | 2713 | static UINT32 recompile_lfs(drc_core *drc,UINT32 op) |
| 2711 | 2714 | { |
| 2712 | 2715 | emit_mov_m32_r32(DRCTOP, MABS(&ppc_icount), REG_EBP); |
| r1037 | r1038 | |
| 3757 | 3760 | |
| 3758 | 3761 | return RECOMPILE_SUCCESSFUL_CP(1,4); |
| 3759 | 3762 | } |
| 3763 | #endif | |
| 3760 | 3764 | |
| 3761 | 3765 | // PPC602 |
| 3762 | 3766 |
| r1037 | r1038 | |
|---|---|---|
| 498 | 498 | |
| 499 | 499 | |
| 500 | 500 | |
| 501 | #ifndef PPC_DRC | |
| 501 | 502 | static void ppc_dccci(UINT32 op) |
| 502 | 503 | { |
| 503 | 504 | |
| r1037 | r1038 | |
| 532 | 533 | |
| 533 | 534 | change_pc(ppc.npc); |
| 534 | 535 | } |
| 536 | #endif | |
| 535 | 537 | |
| 536 | 538 | static void ppc_mfdcr(UINT32 op) |
| 537 | 539 | { |
| r1037 | r1038 | |
|---|---|---|
| 29 | 29 | ppc_set_msr(msr); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | #ifndef PPC_DRC | |
| 32 | 33 | static void ppc_tlbli(UINT32 op) |
| 33 | 34 | { |
| 34 | 35 | |
| r1037 | r1038 | |
| 38 | 39 | { |
| 39 | 40 | |
| 40 | 41 | } |
| 42 | #endif | |
| 41 | 43 | |
| 42 | 44 | #ifndef PPC_DRC |
| 43 | 45 | void ppc602_exception(int exception) |
| r1037 | r1038 | |
|---|---|---|
| 183 | 183 | } |
| 184 | 184 | } |
| 185 | 185 | |
| 186 | #if HAS_PPC603 | |
| 186 | 187 | static void ppc603_set_smi_line(int state) |
| 187 | 188 | { |
| 188 | 189 | if( state ) { |
| 189 | 190 | ppc.interrupt_pending |= 0x4; |
| 190 | 191 | } |
| 191 | 192 | } |
| 193 | #endif | |
| 192 | 194 | |
| 193 | 195 | INLINE void ppc603_check_interrupts(void) |
| 194 | 196 | { |
| r1037 | r1038 | |
|---|---|---|
| 16 | 16 | #define MAX_INSTRUCTIONS 512 |
| 17 | 17 | |
| 18 | 18 | |
| 19 | #if (HAS_PPC603 | |
| 19 | #if (HAS_PPC603 | |
| 20 | 20 | static void ppcdrc603_init(int index, int clock, const void *_config, int (*irqcallback)(int)); |
| 21 | 21 | static void ppcdrc603_exit(void); |
| 22 | 22 | #endif |
| 23 | #if (HAS_PPC603 || HAS_MPC8240) | |
| 23 | #if (HAS_PPC601 || HAS_PPC603 || HAS_MPC8240) | |
| 24 | 24 | static void ppcdrc603_reset(void); |
| 25 | 25 | static int ppcdrc603_execute(int cycles); |
| 26 | 26 | static void ppcdrc603_set_irq_line(int irqline, int state); |
| r1037 | r1038 | |
| 102 | 102 | if((ppc.msr & 0x2000) == 0){ \ |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | #if (HAS_PPC601||HAS_PPC602||HAS_PPC603||HAS_MPC8240) | |
| 105 | 106 | static UINT32 ppc_field_xlat[256]; |
| 107 | #endif | |
| 106 | 108 | |
| 107 | 109 | |
| 108 | 110 | |
| r1037 | r1038 | |
| 845 | 847 | return CR(0) << 28 | CR(1) << 24 | CR(2) << 20 | CR(3) << 16 | CR(4) << 12 | CR(5) << 8 | CR(6) << 4 | CR(7); |
| 846 | 848 | } |
| 847 | 849 | |
| 850 | #ifdef UNUSED_FUNCTION | |
| 848 | 851 | static void log_code(drc_core *drc) |
| 849 | 852 | { |
| 850 | 853 | #if LOG_CODE |
| r1037 | r1038 | |
| 854 | 857 | fclose(temp); |
| 855 | 858 | #endif |
| 856 | 859 | } |
| 860 | #endif | |
| 861 | ||
| 857 | 862 | /***********************************************************************/ |
| 858 | 863 | |
| 859 | 864 | static UINT32 (* optable19[1024])(drc_core *, UINT32); |
| r1037 | r1038 | |
| 1338 | 1343 | } |
| 1339 | 1344 | #endif |
| 1340 | 1345 | |
| 1341 | #if (HAS_PPC603 || HAS_MPC8240) | |
| 1346 | #if (HAS_PPC601 || HAS_PPC603 || HAS_MPC8240) | |
| 1342 | 1347 | static void ppcdrc603_reset(void) |
| 1343 | 1348 | { |
| 1344 | 1349 | ppc.pc = ppc.npc = 0xfff00100; |
| r1037 | r1038 | |
|---|---|---|
| 273 | 273 | } |
| 274 | 274 | } |
| 275 | 275 | |
| 276 | #ifdef MAME_DEBUG | |
| 276 | 277 | static void sh4_syncronize_register_bank(int to) |
| 277 | 278 | { |
| 278 | 279 | int s; |
| r1037 | r1038 | |
| 282 | 283 | sh4.rbnk[to][s] = sh4.r[s]; |
| 283 | 284 | } |
| 284 | 285 | } |
| 286 | #endif | |
| 285 | 287 | |
| 286 | 288 | static void sh4_default_exception_priorities(void) // setup default priorities for exceptions |
| 287 | 289 | { |
| r1037 | r1038 | |
| 3376 | 3378 | cpuintrf_pop_context(); |
| 3377 | 3379 | } |
| 3378 | 3380 | |
| 3381 | #ifdef UNUSED_FUNCTION | |
| 3379 | 3382 | static void sh4_dmac_check(int dma) |
| 3380 | 3383 | { |
| 3381 | 3384 | if(sh4.m[0x63+4*dma] & sh4.m[0x6c] & 1) |
| r1037 | r1038 | |
| 3485 | 3488 | } |
| 3486 | 3489 | } |
| 3487 | 3490 | } |
| 3491 | #endif | |
| 3488 | 3492 | |
| 3489 | 3493 | WRITE32_HANDLER( sh4_internal_w ) |
| 3490 | 3494 | { |
| r1037 | r1038 | |
|---|---|---|
| 1035 | 1035 | 8-bit memory accessors |
| 1036 | 1036 | *****************************************************************************/ |
| 1037 | 1037 | |
| 1038 | #if (HAS_V20||HAS_V25) | |
| 1038 | 1039 | static UINT16 read_word_8(offs_t addr) |
| 1039 | 1040 | { |
| 1040 | 1041 | UINT16 result = program_read_byte_8(addr); |
| r1037 | r1038 | |
| 1073 | 1074 | I.mem.wbyte_port = io_write_byte_8; |
| 1074 | 1075 | I.mem.wword_port = write_port_word_8; |
| 1075 | 1076 | } |
| 1077 | #endif | |
| 1076 | 1078 | |
| 1077 | 1079 | |
| 1078 | 1080 | /***************************************************************************** |
| 1079 | 1081 | 16-bit memory accessors |
| 1080 | 1082 | *****************************************************************************/ |
| 1081 | 1083 | |
| 1084 | #if (HAS_V30||HAS_V33||HAS_V35) | |
| 1082 | 1085 | static UINT16 read_word_16le(offs_t addr) |
| 1083 | 1086 | { |
| 1084 | 1087 | if (!(addr & 1)) |
| r1037 | r1038 | |
| 1137 | 1140 | I.mem.wbyte_port = io_write_byte_16le; |
| 1138 | 1141 | I.mem.wword_port = write_port_word_16le; |
| 1139 | 1142 | } |
| 1143 | #endif | |
| 1140 | 1144 | |
| 1141 | 1145 | |
| 1142 | 1146 | /* Wrappers for the different CPU types */ |
| 1143 | #if (HAS_V20) | |
| 1147 | #if (HAS_V20||HAS_V25) | |
| 1144 | 1148 | void v20_init(int index, int clock, const void *config, int (*irqcallback)(int)) |
| 1145 | 1149 | { |
| 1146 | 1150 | nec_init(index, clock, config, irqcallback, 0); |
| r1037 | r1038 | |
| 1172 | 1176 | } |
| 1173 | 1177 | #endif |
| 1174 | 1178 | |
| 1175 | #if (HAS_V30) | |
| 1179 | #if (HAS_V30||HAS_V35) | |
| 1176 | 1180 | void v30_init(int index, int clock, const void *config, int (*irqcallback)(int)) |
| 1177 | 1181 | { |
| 1178 | 1182 | nec_init(index, clock, config, irqcallback, 1); |
| r1037 | r1038 | |
|---|---|---|
| 1402 | 1402 | i960_icount -= 30; |
| 1403 | 1403 | t1 = get_1_ri(opcode); |
| 1404 | 1404 | t2f = get_2_rifl(opcode); |
| 1405 | set_rifl(opcode, t2f * pow(2.0, (double)t1)); | |
| 1405 | set_rifl(opcode, t2f * pow(2.0, (double)(INT32)t1)); | |
| 1406 | 1406 | break; |
| 1407 | 1407 | |
| 1408 | 1408 | case 0x7: // scaler |
| 1409 | 1409 | i960_icount -= 30; |
| 1410 | 1410 | t1 = get_1_ri(opcode); |
| 1411 | 1411 | t2f = get_2_rif(opcode); |
| 1412 | | |
| 1412 | | |
| 1413 | 1413 | break; |
| 1414 | 1414 | |
| 1415 | 1415 | default: |
| r1037 | r1038 | |
| 1495 | 1495 | case 0x0: // atanrl |
| 1496 | 1496 | i960_icount -= 350; |
| 1497 | 1497 | t1f = get_1_rifl(opcode); |
| 1498 | set_rifl(opcode, atan(t1f)); | |
| 1498 | t2f = get_2_rifl(opcode); | |
| 1499 | set_rifl(opcode, atan2(t2f, t1f)); | |
| 1499 | 1500 | break; |
| 1500 | 1501 | |
| 1501 | 1502 | case 0x2: // logrl |
| r1037 | r1038 | |
|---|---|---|
| 1216 | 1216 | } |
| 1217 | 1217 | |
| 1218 | 1218 | /* base only case */ |
| 1219 | else if (index == REG_NONE && base != REG_ESP) | |
| 1219 | else if (index == REG_NONE && (base & 7) != REG_ESP) | |
| 1220 | 1220 | { |
| 1221 | 1221 | emit_op(emitptr, op, opsize, reg, 0, base); |
| 1222 | 1222 | |
| 1223 | 1223 | /* mode 0 for no offset */ |
| 1224 | if (disp == 0 && base != REG_EBP) | |
| 1224 | if (disp == 0 && (base & 7) != REG_EBP) | |
| 1225 | 1225 | emit_byte(emitptr, make_modrm(0, reg, base)); |
| 1226 | 1226 | |
| 1227 | 1227 | /* mode 1 for 1-byte offset */ |
| r1037 | r1038 | |
| 1258 | 1258 | } |
| 1259 | 1259 | |
| 1260 | 1260 | /* mode 0 for no offset */ |
| 1261 | else if (disp == 0 && base != REG_EBP) | |
| 1261 | else if (disp == 0 && (base & 7) != REG_EBP) | |
| 1262 | 1262 | { |
| 1263 | 1263 | emit_byte(emitptr, make_modrm(0, reg, 4)); |
| 1264 | 1264 | emit_byte(emitptr, make_sib(scale, index, base)); |
| r1037 | r1038 | |
| 1714 | 1714 | |
| 1715 | 1715 | INLINE void emit_mov_r64_imm(x86code **emitptr, UINT8 dreg, UINT64 imm) |
| 1716 | 1716 | { |
| 1717 | if ((INT32)imm == (INT64)imm) | |
| 1717 | if ((UINT32)imm == imm) | |
| 1718 | { | |
| 1719 | emit_op_reg(emitptr, OP_MOV_rAX_Iv | (dreg & 7), OP_32BIT, dreg); | |
| 1720 | emit_dword(emitptr, imm); | |
| 1721 | } | |
| 1722 | else if ((INT32)imm == imm) | |
| 1718 | 1723 | emit_op_modrm_reg_imm32(emitptr, OP_G11_Ev_Iz, OP_64BIT, 0, dreg, imm); |
| 1719 | 1724 | else |
| 1720 | 1725 | { |
| r1037 | r1038 | |
| 1996 | 2001 | INLINE void emit_shift_reg_imm(x86code **emitptr, UINT32 op1, UINT32 opn, UINT8 opsize, UINT8 opindex, UINT8 dreg, UINT8 imm) |
| 1997 | 2002 | { |
| 1998 | 2003 | if (imm == 1) |
| 1999 | emit_op_modrm_reg(emitptr, op1, | |
| 2004 | emit_op_modrm_reg(emitptr, op1, opsize | |
| 2000 | 2005 | else |
| 2001 | emit_op_modrm_reg_imm8(emitptr, opn, | |
| 2006 | emit_op_modrm_reg_imm8(emitptr, opn, opsize | |
| 2002 | 2007 | } |
| 2003 | 2008 | |
| 2004 | 2009 | INLINE void emit_shift_mem_imm(x86code **emitptr, UINT32 op1, UINT32 opn, UINT8 opsize, UINT8 opindex, DECLARE_MEMPARAMS, UINT8 imm) |
| 2005 | 2010 | { |
| 2006 | 2011 | if (imm == 1) |
| 2007 | emit_op_modrm_mem(emitptr, op1, | |
| 2012 | emit_op_modrm_mem(emitptr, op1, opsize | |
| 2008 | 2013 | else |
| 2009 | emit_op_modrm_mem_imm8(emitptr, opn, | |
| 2014 | emit_op_modrm_mem_imm8(emitptr, opn, opsize | |
| 2010 | 2015 | } |
| 2011 | 2016 | |
| 2012 | 2017 |
| r0 | r1038 | |
|---|---|---|
| 1 | /*************************************************************************** | |
| 2 | ||
| 3 | x64drc.c | |
| 4 | ||
| 5 | x64 Dynamic recompiler support routines. | |
| 6 | ||
| 7 | Copyright (c) 1996-2007, Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 9 | ||
| 10 | **************************************************************************** | |
| 11 | ||
| 12 | Windows x64 conventions: | |
| 13 | ||
| 14 | Register Status Use | |
| 15 | -------- ------ --- | |
| 16 | RAX Volatile Return value register | |
| 17 | RCX Volatile First integer argument | |
| 18 | RDX Volatile Second integer argument | |
| 19 | R8 Volatile Third integer argument | |
| 20 | R9 Volatile Fourth integer argument | |
| 21 | R10:R11 Volatile Must be preserved as needed by caller; used in syscall/sysret instructions | |
| 22 | R12:R15 Nonvolatile Must be preserved by callee | |
| 23 | RDI Nonvolatile Must be preserved by callee | |
| 24 | RSI Nonvolatile Must be preserved by callee | |
| 25 | RBX Nonvolatile Must be preserved by callee | |
| 26 | RBP Nonvolatile May be used as a frame pointer; must be preserved by callee | |
| 27 | RSP Nonvolatile Stack pointer | |
| 28 | ||
| 29 | XMM0 Volatile First FP argument | |
| 30 | XMM1 Volatile Second FP argument | |
| 31 | XMM2 Volatile Third FP argument | |
| 32 | XMM3 Volatile Fourth FP argument | |
| 33 | XMM4:XMM5 Volatile Must be preserved as needed by caller | |
| 34 | XMM6:XMM15 Nonvolatile Must be preserved as needed by callee. | |
| 35 | ||
| 36 | ||
| 37 | Linux/MacOS x64 conventions: | |
| 38 | ||
| 39 | Register Status Use | |
| 40 | -------- ------ --- | |
| 41 | RAX Volatile Return value register | |
| 42 | RDI Volatile First integer argument | |
| 43 | RSI Volatile Second integer argument | |
| 44 | RDX Volatile Third integer argument | |
| 45 | RCX Volatile Fourth integer argument | |
| 46 | R8 Volatile Fifth integer argument | |
| 47 | R9 Volatile Sixth integer argument | |
| 48 | R10:R11 Volatile Must be preserved as needed by caller | |
| 49 | R12:R15 Nonvolatile Must be preserved by callee | |
| 50 | RBX Nonvolatile Must be preserved by callee | |
| 51 | RBP Nonvolatile Must be preserved by callee | |
| 52 | RSP Nonvolatile Stack pointer | |
| 53 | ||
| 54 | XMM0 Volatile First FP argument | |
| 55 | XMM1 Volatile Second FP argument | |
| 56 | XMM2 Volatile Third FP argument | |
| 57 | XMM3 Volatile Fourth FP argument | |
| 58 | XMM4 Volatile Fifth FP argument | |
| 59 | XMM5 Volatile Sixth FP argument | |
| 60 | XMM6:XMM15 Volatile Must be preserved as needed by caller. | |
| 61 | ||
| 62 | ***************************************************************************/ | |
| 63 | ||
| 64 | #include "cpuintrf.h" | |
| 65 | #include "x64drc.h" | |
| 66 | #include "debugger.h" | |
| 67 | ||
| 68 | #include <stddef.h> | |
| 69 | ||
| 70 | ||
| 71 | ||
| 72 | /*************************************************************************** | |
| 73 | MACROS | |
| 74 | ***************************************************************************/ | |
| 75 | ||
| 76 | #define MXCSR_VALUE(x) (0x1fc0 | ((x) << 14)) | |
| 77 | ||
| 78 | ||
| 79 | ||
| 80 | /*************************************************************************** | |
| 81 | FUNCTION PROTOTYPES | |
| 82 | ***************************************************************************/ | |
| 83 | ||
| 84 | static void append_entry_point(drc_core *drc); | |
| 85 | static void append_exit_point(drc_core *drc); | |
| 86 | static void recompile_code(drc_core *drc); | |
| 87 | static void append_recompile(drc_core *drc); | |
| 88 | static void append_flush(drc_core *drc); | |
| 89 | ||
| 90 | ||
| 91 | ||
| 92 | /*************************************************************************** | |
| 93 | INLINE FUNCTIONS | |
| 94 | ***************************************************************************/ | |
| 95 | ||
| 96 | /*------------------------------------------------- | |
| 97 | allocate_l2_table - allocate an L2 table | |
| 98 | if necessary | |
| 99 | -------------------------------------------------*/ | |
| 100 | ||
| 101 | INLINE void allocate_l2_table(drc_core *drc, UINT32 l1index) | |
| 102 | { | |
| 103 | if (drc->lookup_l1[l1index] == drc->lookup_l2_recompile) | |
| 104 | { | |
| 105 | /* create a new copy of the recompile table */ | |
| 106 | drc->lookup_l1[l1index] = drc_alloc(drc, sizeof(*drc->lookup_l2_recompile) << drc->l2bits); | |
| 107 | memcpy(drc->lookup_l1[l1index], drc->lookup_l2_recompile, sizeof(*drc->lookup_l2_recompile) << drc->l2bits); | |
| 108 | } | |
| 109 | } | |
| 110 | ||
| 111 | ||
| 112 | /*************************************************************************** | |
| 113 | EXTERNAL INTERFACES | |
| 114 | ***************************************************************************/ | |
| 115 | ||
| 116 | /*------------------------------------------------- | |
| 117 | drc_init - initialize the DRC core | |
| 118 | -------------------------------------------------*/ | |
| 119 | ||
| 120 | drc_core *drc_init(UINT8 cpunum, drc_config *config) | |
| 121 | { | |
| 122 | int address_bits = config->address_bits; | |
| 123 | int effective_address_bits = address_bits - config->lsbs_to_ignore; | |
| 124 | drc_core *drc; | |
| 125 | int i; | |
| 126 | ||
| 127 | /* the drc structure lives at the start of the cache */ | |
| 128 | drc = (drc_core *)config->cache_base; | |
| 129 | memset(drc, 0, sizeof(*drc)); | |
| 130 | ||
| 131 | /* copy in relevant data from the config */ | |
| 132 | drc->baseptr = config->baseptr; | |
| 133 | drc->pcptr = config->pcptr; | |
| 134 | drc->cb_reset = config->cb_reset; | |
| 135 | drc->cb_recompile = config->cb_recompile; | |
| 136 | drc->cb_entrygen = config->cb_entrygen; | |
| 137 | drc->mxcsr_curr = MXCSR_VALUE(FPRND_NEAR); | |
| 138 | ||
| 139 | /* configure cache */ | |
| 140 | drc->cache_base = (UINT8 *)config->cache_base + sizeof(*drc); | |
| 141 | drc->cache_size = config->cache_size - sizeof(*drc); | |
| 142 | drc->cache_end = drc->cache_base + drc->cache_size; | |
| 143 | drc->cache_danger = drc->cache_end - 65536; | |
| 144 | ||
| 145 | /* compute shifts and masks */ | |
| 146 | drc->l1bits = effective_address_bits / 2; | |
| 147 | drc->l2bits = effective_address_bits - drc->l1bits; | |
| 148 | drc->l1shift = config->lsbs_to_ignore + drc->l2bits; | |
| 149 | drc->l2mask = ((1 << drc->l2bits) - 1) << config->lsbs_to_ignore; | |
| 150 | drc->l2scale = sizeof(x86code *) >> config->lsbs_to_ignore; | |
| 151 | ||
| 152 | /* configure the MXCSR states */ | |
| 153 | for (i = 0; i < 4; i++) | |
| 154 | drc->mxcsr_values[i] = MXCSR_VALUE(i); | |
| 155 | ||
| 156 | /* allocate lookup tables out of the cache */ | |
| 157 | drc->lookup_l1 = drc_alloc(drc, sizeof(*drc->lookup_l1) << drc->l1bits); | |
| 158 | drc->lookup_l2_recompile = drc_alloc(drc, sizeof(*drc->lookup_l2_recompile) << drc->l2bits); | |
| 159 | if (drc->lookup_l1 == NULL || drc->lookup_l2_recompile == NULL) | |
| 160 | goto error; | |
| 161 | memset(drc->lookup_l1, 0, sizeof(*drc->lookup_l1) << drc->l1bits); | |
| 162 | memset(drc->lookup_l2_recompile, 0, sizeof(*drc->lookup_l2_recompile) << drc->l2bits); | |
| 163 | ||
| 164 | /* allocate the sequence and tentative lists */ | |
| 165 | drc->sequence_count_max = config->max_instructions; | |
| 166 | drc->sequence_list = malloc(drc->sequence_count_max * sizeof(*drc->sequence_list)); | |
| 167 | if (drc->sequence_list == NULL) | |
| 168 | goto error; | |
| 169 | ||
| 170 | drc->tentative_count_max = config->max_instructions; | |
| 171 | drc->tentative_list = malloc(drc->tentative_count_max * sizeof(*drc->tentative_list)); | |
| 172 | if (drc->tentative_list == NULL) | |
| 173 | goto error; | |
| 174 | ||
| 175 | /* get pointers to external C functions */ | |
| 176 | #ifdef MAME_DEBUG | |
| 177 | drc->mame_debug_hook = (x86code *)mame_debug_hook; | |
| 178 | #endif | |
| 179 | drc->recompile_code = (x86code *)recompile_code; | |
| 180 | drc->drc_cache_reset = (x86code *)drc_cache_reset; | |
| 181 | return drc; | |
| 182 | ||
| 183 | error: | |
| 184 | if (drc != NULL) | |
| 185 | drc_exit(drc); | |
| 186 | return NULL; | |
| 187 | } | |
| 188 | ||
| 189 | ||
| 190 | /*------------------------------------------------- | |
| 191 | drc_alloc - allocate memory from the top of | |
| 192 | the DRC cache | |
| 193 | -------------------------------------------------*/ | |
| 194 | ||
| 195 | void *drc_alloc(drc_core *drc, size_t amount) | |
| 196 | { | |
| 197 | /* if we don't have enough space, reset the cache */ | |
| 198 | if (drc->cache_top >= drc->cache_danger - amount) | |
| 199 | drc_cache_reset(drc); | |
| 200 | ||
| 201 | /* if we still don't have enough space, fail */ | |
| 202 | if (drc->cache_top >= drc->cache_danger - amount) | |
| 203 | return NULL; | |
| 204 | ||
| 205 | /* adjust the end and danger values downward */ | |
| 206 | drc->cache_end -= amount; | |
| 207 | drc->cache_danger -= amount; | |
| 208 | return drc->cache_end; | |
| 209 | } | |
| 210 | ||
| 211 | ||
| 212 | /*------------------------------------------------- | |
| 213 | drc_cache_reset - reset the DRC cache | |
| 214 | -------------------------------------------------*/ | |
| 215 | ||
| 216 | void drc_cache_reset(drc_core *drc) | |
| 217 | { | |
| 218 | int i; | |
| 219 | ||
| 220 | /* reset the cache and add the basics */ | |
| 221 | drc->cache_top = drc->cache_base; | |
| 222 | ||
| 223 | /* append the core entry points to the fresh cache */ | |
| 224 | drc->entry_point = (void (*)(void *))(FPTR)drc->cache_top; | |
| 225 | append_entry_point(drc); | |
| 226 | drc->exit_point = drc->cache_top; | |
| 227 | append_exit_point(drc); | |
| 228 | drc->recompile = drc->cache_top; | |
| 229 | append_recompile(drc); | |
| 230 | drc->dispatch = drc->cache_top; | |
| 231 | drc_append_dispatcher(drc); | |
| 232 | drc->flush = drc->cache_top; | |
| 233 | append_flush(drc); | |
| 234 | ||
| 235 | /* populate the recompile table */ | |
| 236 | for (i = 0; i < (1 << drc->l2bits); i++) | |
| 237 | drc->lookup_l2_recompile[i] = drc->recompile; | |
| 238 | ||
| 239 | /* reset all the l1 tables */ | |
| 240 | for (i = 0; i < (1 << drc->l1bits); i++) | |
| 241 | { | |
| 242 | /* point NULL entries to the generic recompile table */ | |
| 243 | if (drc->lookup_l1[i] == NULL) | |
| 244 | drc->lookup_l1[i] = drc->lookup_l2_recompile; | |
| 245 | ||
| 246 | /* reset allocated tables to point all entries back to the recompiler */ | |
| 247 | else if (drc->lookup_l1[i] != drc->lookup_l2_recompile) | |
| 248 | memcpy(drc->lookup_l1[i], drc->lookup_l2_recompile, sizeof(*drc->lookup_l2_recompile) << drc->l2bits); | |
| 249 | } | |
| 250 | ||
| 251 | /* call back to the host */ | |
| 252 | if (drc->cb_reset != NULL) | |
| 253 | (*drc->cb_reset)(drc); | |
| 254 | } | |
| 255 | ||
| 256 | ||
| 257 | /*------------------------------------------------- | |
| 258 | drc_execute - execute generated code | |
| 259 | -------------------------------------------------*/ | |
| 260 | ||
| 261 | void drc_execute(drc_core *drc) | |
| 262 | { | |
| 263 | (*drc->entry_point)(drc->baseptr); | |
| 264 | } | |
| 265 | ||
| 266 | ||
| 267 | /*------------------------------------------------- | |
| 268 | drc_exit - release resources allocated by | |
| 269 | the DRC core | |
| 270 | -------------------------------------------------*/ | |
| 271 | ||
| 272 | void drc_exit(drc_core *drc) | |
| 273 | { | |
| 274 | /* free the lists */ | |
| 275 | if (drc->sequence_list != NULL) | |
| 276 | free(drc->sequence_list); | |
| 277 | if (drc->tentative_list != NULL) | |
| 278 | free(drc->tentative_list); | |
| 279 | } | |
| 280 | ||
| 281 | ||
| 282 | /*------------------------------------------------- | |
| 283 | drc_begin_sequence - begin code generation | |
| 284 | for a particular PC | |
| 285 | -------------------------------------------------*/ | |
| 286 | ||
| 287 | void drc_begin_sequence(drc_core *drc, UINT32 pc) | |
| 288 | { | |
| 289 | /* reset the sequence and tentative counts */ | |
| 290 | drc->sequence_count = 0; | |
| 291 | drc->tentative_count = 0; | |
| 292 | } | |
| 293 | ||
| 294 | ||
| 295 | /*------------------------------------------------- | |
| 296 | drc_add_entry_point - add a new external | |
| 297 | entry point for a given PC | |
| 298 | -------------------------------------------------*/ | |
| 299 | ||
| 300 | int drc_add_entry_point(drc_core *drc, UINT32 pc, int override) | |
| 301 | { | |
| 302 | UINT32 l1index = pc >> drc->l1shift; | |
| 303 | UINT32 l2index = ((pc & drc->l2mask) * drc->l2scale) / sizeof(x86code *); | |
| 304 | int was_occupied; | |
| 305 | ||
| 306 | /* allocate memory if necessary */ | |
| 307 | allocate_l2_table(drc, l1index); | |
| 308 | ||
| 309 | /* in case anybody was jumping directly to this code entry, replace | |
| 310 | the code with a jmp to the new code */ | |
| 311 | was_occupied = (drc->lookup_l1[l1index][l2index] != drc->recompile); | |
| 312 | if (was_occupied && override) | |
| 313 | { | |
| 314 | x86code *dest = drc->lookup_l1[l1index][l2index]; | |
| 315 | emit_jmp(&dest, drc->cache_top); | |
| 316 | } | |
| 317 | ||
| 318 | /* note the current location for this instruction */ | |
| 319 | if (!was_occupied || override) | |
| 320 | drc->lookup_l1[l1index][l2index] = drc->cache_top; | |
| 321 | return was_occupied; | |
| 322 | } | |
| 323 | ||
| 324 | ||
| 325 | /*------------------------------------------------------------------ | |
| 326 | drc_end_sequence | |
| 327 | ------------------------------------------------------------------*/ | |
| 328 | ||
| 329 | void drc_end_sequence(drc_core *drc) | |
| 330 | { | |
| 331 | int i, j; | |
| 332 | ||
| 333 | /* fix up any internal links */ | |
| 334 | for (i = 0; i < drc->tentative_count; i++) | |
| 335 | { | |
| 336 | for (j = 0; j < drc->sequence_count; j++) | |
| 337 | if (drc->tentative_list[i].pc == drc->sequence_list[j].pc) | |
| 338 | { | |
| 339 | x86code *dest = drc->tentative_list[i].target; | |
| 340 | emit_jmp(&dest, drc->sequence_list[j].target); | |
| 341 | while (dest < drc->tentative_list[i].end) | |
| 342 | emit_int_3(&dest); | |
| 343 | break; | |
| 344 | } | |
| 345 | } | |
| 346 | } | |
| 347 | ||
| 348 | ||
| 349 | /*------------------------------------------------------------------ | |
| 350 | drc_register_code_at_cache_top | |
| 351 | ------------------------------------------------------------------*/ | |
| 352 | ||
| 353 | void drc_register_code_at_cache_top(drc_core *drc, UINT32 pc) | |
| 354 | { | |
| 355 | pc_ptr_pair *pair = &drc->sequence_list[drc->sequence_count++]; | |
| 356 | assert_always(drc->sequence_count <= drc->sequence_count_max, "drc_register_code_at_cache_top: too many instructions!"); | |
| 357 | ||
| 358 | pair->target = drc->cache_top; | |
| 359 | pair->pc = pc; | |
| 360 | } | |
| 361 | ||
| 362 | ||
| 363 | /*------------------------------------------------------------------ | |
| 364 | drc_get_code_at_pc | |
| 365 | ------------------------------------------------------------------*/ | |
| 366 | ||
| 367 | x86code *drc_get_code_at_pc(drc_core *drc, UINT32 pc) | |
| 368 | { | |
| 369 | UINT32 l1index = pc >> drc->l1shift; | |
| 370 | UINT32 l2index = ((pc & drc->l2mask) * drc->l2scale) / sizeof(x86code *); | |
| 371 | x86code *codeptr = drc->lookup_l1[l1index][l2index]; | |
| 372 | return (codeptr != drc->recompile) ? codeptr : NULL; | |
| 373 | } | |
| 374 | ||
| 375 | ||
| 376 | /*------------------------------------------------------------------ | |
| 377 | drc_invalidate_code_range | |
| 378 | ------------------------------------------------------------------*/ | |
| 379 | ||
| 380 | void drc_invalidate_code_range(drc_core *drc, UINT32 startpc, UINT32 endpc) | |
| 381 | { | |
| 382 | UINT32 startl1index = startpc >> drc->l1shift; | |
| 383 | UINT32 startl2index = ((startpc & drc->l2mask) * drc->l2scale) / sizeof(x86code *); | |
| 384 | UINT32 endl1index = endpc >> drc->l1shift; | |
| 385 | UINT32 endl2index = ((endpc & drc->l2mask) * drc->l2scale) / sizeof(x86code *); | |
| 386 | UINT32 curl1; | |
| 387 | ||
| 388 | /* iterate over l1 bunches */ | |
| 389 | for (curl1 = startl1index; curl1 <= endl1index; curl1++) | |
| 390 | { | |
| 391 | x86code **l2table = drc->lookup_l1[curl1]; | |
| 392 | UINT32 l2start, l2end, curl2; | |
| 393 | ||
| 394 | /* if this is already empty, skip it */ | |
| 395 | if (l2table == drc->lookup_l2_recompile) | |
| 396 | continue; | |
| 397 | ||
| 398 | /* determine start/stop for this range */ | |
| 399 | l2start = (curl1 == startl1index) ? startl2index : 0; | |
| 400 | l2end = (curl1 == endl1index) ? endl2index : ((1 << drc->l2bits) - 1); | |
| 401 | ||
| 402 | /* invalidate any code entries here */ | |
| 403 | for (curl2 = l2start; curl2 <= l2end; curl2++) | |
| 404 | if (l2table[curl2] != drc->recompile) | |
| 405 | { | |
| 406 | /* overwrite code there with a jump to the recompiler in case we ever get there */ | |
| 407 | x86code *dest = l2table[curl2]; | |
| 408 | // emit_int_3(&dest); | |
| 409 | emit_jmp(&dest, drc->recompile); | |
| 410 | l2table[curl2] = drc->recompile; | |
| 411 | } | |
| 412 | } | |
| 413 | } | |
| 414 | ||
| 415 | ||
| 416 | /*------------------------------------------------------------------ | |
| 417 | drc_append_call_debugger | |
| 418 | ------------------------------------------------------------------*/ | |
| 419 | ||
| 420 | void drc_append_call_debugger(drc_core *drc) | |
| 421 | { | |
| 422 | #ifdef MAME_DEBUG | |
| 423 | if (Machine->debug_mode) | |
| 424 | emit_call_m64(DRCTOP, MDRC(&drc->mame_debug_hook)); // call mame_debug_hook | |
| 425 | #endif | |
| 426 | } | |
| 427 | ||
| 428 | ||
| 429 | /*------------------------------------------------------------------ | |
| 430 | drc_append_dispatcher | |
| 431 | ------------------------------------------------------------------*/ | |
| 432 | ||
| 433 | void drc_append_dispatcher(drc_core *drc) | |
| 434 | { | |
| 435 | /* target PC is in P1 on entry; we must keep P1 intact in case we jump to the recompile callback */ | |
| 436 | emit_mov_r32_r32(DRCTOP, REG_P2, REG_P1); // mov p2,p1 | |
| 437 | emit_mov_r32_r32(DRCTOP, REG_EAX, REG_P1); // mov eax,p1 | |
| 438 | emit_shr_r32_imm(DRCTOP, REG_P2, drc->l1shift); // shr p2,l1shift | |
| 439 | emit_mov_r64_m64(DRCTOP, REG_P2, MDRCISD(drc->lookup_l1, REG_P2, 8, 0)); // mov p2,[rbp+p2*8+l1lookup] | |
| 440 | emit_and_r32_imm(DRCTOP, REG_EAX, drc->l2mask); // and eax,l2mask | |
| 441 | emit_jmp_m64(DRCTOP, MBISD(REG_P2, REG_EAX, drc->l2scale, 0)); // jmp [p2 + eax*l2scale] | |
| 442 | } | |
| 443 | ||
| 444 | ||
| 445 | /*------------------------------------------------------------------ | |
| 446 | drc_append_fixed_dispatcher | |
| 447 | ------------------------------------------------------------------*/ | |
| 448 | ||
| 449 | void drc_append_fixed_dispatcher(drc_core *drc, UINT32 pc, int loadpc) | |
| 450 | { | |
| 451 | UINT32 l1index = pc >> drc->l1shift; | |
| 452 | UINT32 l2index = ((pc & drc->l2mask) * drc->l2scale) / sizeof(x86code *); | |
| 453 | ||
| 454 | /* make sure we have an L2 table for this entry */ | |
| 455 | allocate_l2_table(drc, l1index); | |
| 456 | ||
| 457 | /* emit a jump through the table entry */ | |
| 458 | if (loadpc) | |
| 459 | emit_mov_r32_imm(DRCTOP, REG_P1, pc); // mov p1,pc | |
| 460 | emit_jmp_m64(DRCTOP, MDRC(&drc->lookup_l1[l1index][l2index])); // jmp [lookup[l1index][l2index]] | |
| 461 | } | |
| 462 | ||
| 463 | ||
| 464 | /*------------------------------------------------------------------ | |
| 465 | drc_append_tentative_fixed_dispatcher | |
| 466 | ------------------------------------------------------------------*/ | |
| 467 | ||
| 468 | void drc_append_tentative_fixed_dispatcher(drc_core *drc, UINT32 newpc, int loadpc) | |
| 469 | { | |
| 470 | pc_ptr_pair *pair = &drc->tentative_list[drc->tentative_count++]; | |
| 471 | assert_always(drc->tentative_count <= drc->tentative_count_max, "drc_append_tentative_fixed_dispatcher: too many tentative branches!"); | |
| 472 | ||
| 473 | pair->target = drc->cache_top; | |
| 474 | pair->pc = newpc; | |
| 475 | drc_append_fixed_dispatcher(drc, newpc, loadpc); | |
| 476 | pair->end = drc->cache_top; | |
| 477 | } | |
| 478 | ||
| 479 | ||
| 480 | /*------------------------------------------------------------------ | |
| 481 | drc_append_set_sse_rounding | |
| 482 | ------------------------------------------------------------------*/ | |
| 483 | ||
| 484 | void drc_append_set_sse_rounding(drc_core *drc, UINT8 regindex) | |
| 485 | { | |
| 486 | emit_ldmxcsr_m32(DRCTOP, MDRCISD(&drc->mxcsr_values[0], regindex, 4, 0)); // ldmxcsr [mxcsr_values + reg*4] | |
| 487 | emit_stmxcsr_m32(DRCTOP, MDRC(&drc->mxcsr_curr)); // stmxcsr [mxcsr_curr] | |
| 488 | } | |
| 489 | ||
| 490 | ||
| 491 | ||
| 492 | /*------------------------------------------------------------------ | |
| 493 | drc_append_set_temp_sse_rounding | |
| 494 | ------------------------------------------------------------------*/ | |
| 495 | ||
| 496 | void drc_append_set_temp_sse_rounding(drc_core *drc, UINT8 rounding) | |
| 497 | { | |
| 498 | emit_ldmxcsr_m32(DRCTOP, MDRC(&drc->mxcsr_values[rounding])); // ldmxcsr mxcsr_values[rounding] | |
| 499 | } | |
| 500 | ||
| 501 | ||
| 502 | ||
| 503 | /*------------------------------------------------------------------ | |
| 504 | drc_append_restore_sse_rounding | |
| 505 | ------------------------------------------------------------------*/ | |
| 506 | ||
| 507 | void drc_append_restore_sse_rounding(drc_core *drc) | |
| 508 | { | |
| 509 | emit_ldmxcsr_m32(DRCTOP, MDRC(&drc->mxcsr_curr)); // ldmxcsr [mxcsr_curr] | |
| 510 | } | |
| 511 | ||
| 512 | ||
| 513 | ||
| 514 | /*************************************************************************** | |
| 515 | INTERNAL CODEGEN | |
| 516 | ***************************************************************************/ | |
| 517 | ||
| 518 | /*------------------------------------------------------------------ | |
| 519 | append_entry_point | |
| 520 | ------------------------------------------------------------------*/ | |
| 521 | ||
| 522 | static void append_entry_point(drc_core *drc) | |
| 523 | { | |
| 524 | int pushbytes = 8 * (5 + (REG_NV5 != REG_NONE) + (REG_NV6 != REG_NONE)); | |
| 525 | ||
| 526 | /* save non-volatile registers */ | |
| 527 | emit_push_r64(DRCTOP, REG_NV0); // push nv0 | |
| 528 | emit_push_r64(DRCTOP, REG_NV1); // push nv1 | |
| 529 | emit_push_r64(DRCTOP, REG_NV2); // push nv2 | |
| 530 | emit_push_r64(DRCTOP, REG_NV3); // push nv3 | |
| 531 | emit_push_r64(DRCTOP, REG_NV4); // push nv4 | |
| 532 | if (REG_NV5 != REG_NONE) emit_push_r64(DRCTOP, REG_NV5); // push nv5 | |
| 533 | if (REG_NV6 != REG_NONE) emit_push_r64(DRCTOP, REG_NV6); // push nv6 | |
| 534 | ||
| 535 | /* stack frame: | |
| 536 | 0x40/0x48 bytes of scratch space/alignment | |
| 537 | 0x20 bytes for register parameter spilling in Windows ABI | |
| 538 | */ | |
| 539 | emit_sub_r64_imm(DRCTOP, REG_RSP, 0x68 + (pushbytes % 16)); // sub rsp,0x68/0x70 | |
| 540 | ||
| 541 | /* parameter 1 is the baseptr; copy to RBP */ | |
| 542 | emit_mov_r64_r64(DRCTOP, REG_DRC, REG_P1); // mov rbp,p1 | |
| 543 | ||
| 544 | /* update the MXCSR register */ | |
| 545 | emit_stmxcsr_m32(DRCTOP, MDRC(&drc->mxcsr_save)); // stmxcsr [mxcsr_save] | |
| 546 | emit_ldmxcsr_m32(DRCTOP, MDRC(&drc->mxcsr_curr)); // ldmxcsr [mxcsr_curr] | |
| 547 | ||
| 548 | /* continue performing entry generation duties */ | |
| 549 | if (drc->cb_entrygen != NULL) | |
| 550 | (*drc->cb_entrygen)(drc); // additional entry point duties | |
| 551 | ||
| 552 | /* reload the PC into P1 and dispatch */ | |
| 553 | emit_mov_r32_m32(DRCTOP, REG_P1, MDRC(drc->pcptr)); // mov p1,[pc] | |
| 554 | drc_append_dispatcher(drc); // dispatch | |
| 555 | } | |
| 556 | ||
| 557 | ||
| 558 | /*------------------------------------------------------------------ | |
| 559 | append_exit_point | |
| 560 | ------------------------------------------------------------------*/ | |
| 561 | ||
| 562 | static void append_exit_point(drc_core *drc) | |
| 563 | { | |
| 564 | int pushbytes = 8 * (5 + (REG_NV5 != REG_NONE) + (REG_NV6 != REG_NONE)); | |
| 565 | ||
| 566 | /* on exit, P1 must contain the final PC */ | |
| 567 | emit_mov_m32_r32(DRCTOP, MDRC(drc->pcptr), REG_P1); // mov [pc],p1 | |
| 568 | ||
| 569 | /* restore the MXCSR state */ | |
| 570 | emit_ldmxcsr_m32(DRCTOP, MDRC(&drc->mxcsr_save)); // ldmxcsr [mxcsr_save] | |
| 571 | ||
| 572 | /* add 0x18 to RSP to get us back to the original stack pointer */ | |
| 573 | emit_add_r64_imm(DRCTOP, REG_RSP, 0x68 + (pushbytes % 16)); // add rsp,0x68/0x70 | |
| 574 | ||
| 575 | /* save non-volatile registers */ | |
| 576 | if (REG_NV6 != REG_NONE) emit_pop_r64(DRCTOP, REG_NV6); // pop nv6 | |
| 577 | if (REG_NV5 != REG_NONE) emit_pop_r64(DRCTOP, REG_NV5); // pop nv5 | |
| 578 | emit_pop_r64(DRCTOP, REG_NV4); // pop nv4 | |
| 579 | emit_pop_r64(DRCTOP, REG_NV3); // pop nv3 | |
| 580 | emit_pop_r64(DRCTOP, REG_NV2); // pop nv2 | |
| 581 | emit_pop_r64(DRCTOP, REG_NV1); // pop nv1 | |
| 582 | emit_pop_r64(DRCTOP, REG_NV0); // pop nv0 | |
| 583 | emit_ret(DRCTOP); // ret | |
| 584 | } | |
| 585 | ||
| 586 | ||
| 587 | /*------------------------------------------------------------------ | |
| 588 | recompile_code | |
| 589 | ------------------------------------------------------------------*/ | |
| 590 | ||
| 591 | static void recompile_code(drc_core *drc) | |
| 592 | { | |
| 593 | /* if we're above the danger line, flush the cache before recompiling */ | |
| 594 | if (drc->cache_top >= drc->cache_danger) | |
| 595 | drc_cache_reset(drc); | |
| 596 | ||
| 597 | /* call the recompile callback */ | |
| 598 | (*drc->cb_recompile)(drc); | |
| 599 | } | |
| 600 | ||
| 601 | ||
| 602 | /*------------------------------------------------------------------ | |
| 603 | append_recompile | |
| 604 | ------------------------------------------------------------------*/ | |
| 605 | ||
| 606 | static void append_recompile(drc_core *drc) | |
| 607 | { | |
| 608 | /* on entry, P1 must contain the PC that needs recompilation */ | |
| 609 | emit_mov_m32_r32(DRCTOP, MDRC(drc->pcptr), REG_P1); // mov [pc],p1 | |
| 610 | emit_lea_r64_m64(DRCTOP, REG_P1, MDRC(drc)); // lea p1,drc | |
| 611 | emit_call_m64(DRCTOP, MDRC(&drc->recompile_code)); // call recompile_code | |
| 612 | emit_mov_r32_m32(DRCTOP, REG_P1, MDRC(drc->pcptr)); // mov p1,[pc] | |
| 613 | drc_append_dispatcher(drc); // dispatch | |
| 614 | } | |
| 615 | ||
| 616 | ||
| 617 | /*------------------------------------------------------------------ | |
| 618 | append_flush | |
| 619 | ------------------------------------------------------------------*/ | |
| 620 | ||
| 621 | static void append_flush(drc_core *drc) | |
| 622 | { | |
| 623 | /* on entry, P1 must contain the PC that needs recompilation */ | |
| 624 | emit_mov_m32_r32(DRCTOP, MDRC(drc->pcptr), REG_P1); // mov [pc],p1 | |
| 625 | emit_lea_r64_m64(DRCTOP, REG_P1, MDRC(drc)); // lea p1,drc | |
| 626 | emit_call_m64(DRCTOP, MDRC(&drc->drc_cache_reset)); // call drc_cache_reset | |
| 627 | emit_mov_r32_m32(DRCTOP, REG_P1, MDRC(drc->pcptr)); // mov p1,[pc] | |
| 628 | drc_append_dispatcher(drc); // dispatch | |
| 629 | } |
| r1037 | r1038 | |
|---|---|---|
| 1800 | 1800 | tms32025_datamap[7] = &R.intRAM[0x380]; /* B1 */ |
| 1801 | 1801 | } |
| 1802 | 1802 | |
| 1803 | #if (HAS_TMS32026) | |
| 1803 | 1804 | static void tms32026_reset (void) |
| 1804 | 1805 | { |
| 1805 | 1806 | tms32025_reset(); |
| r1037 | r1038 | |
| 1822 | 1823 | tms32025_datamap[14] = &R.intRAM[0x700]; /* B3 */ |
| 1823 | 1824 | tms32025_datamap[15] = &R.intRAM[0x780]; /* B3 */ |
| 1824 | 1825 | } |
| 1826 | #endif | |
| 1825 | 1827 | |
| 1826 | 1828 | |
| 1827 | 1829 | /**************************************************************************** |
| r0 | r1038 | |
|---|---|---|
| 1 | /*************************************************************************** | |
| 2 | ||
| 3 | x64drc.h | |
| 4 | ||
| 5 | x64 Dynamic recompiler support routines. | |
| 6 | ||
| 7 | Copyright (c) 1996-2007, Nicola Salmoria and the MAME Team. | |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. | |
| 9 | ||
| 10 | ***************************************************************************/ | |
| 11 | ||
| 12 | #pragma once | |
| 13 | ||
| 14 | #ifndef __X64DRC_H__ | |
| 15 | #define __X64DRC_H__ | |
| 16 | ||
| 17 | #include "cpuintrf.h" | |
| 18 | #include "x86emit.h" | |
| 19 | ||
| 20 | ||
| 21 | /*************************************************************************** | |
| 22 | CONSTANTS | |
| 23 | ***************************************************************************/ | |
| 24 | ||
| 25 | /* ABI-specific configuration */ | |
| 26 | #define REG_DRC REG_RBP /* pointer to DRC base */ | |
| 27 | ||
| 28 | #ifdef X64_WINDOWS_ABI | |
| 29 | ||
| 30 | #define REG_P1 REG_RCX /* 1st function parameter */ | |
| 31 | #define REG_P2 REG_RDX /* 2nd function parameter */ | |
| 32 | #define REG_P3 REG_R8 /* 3rd function parameter */ | |
| 33 | #define REG_P4 REG_R9 /* 4th function parameter */ | |
| 34 | #define REG_V5 REG_R10 /* volatile register 5 */ | |
| 35 | #define REG_V6 REG_R11 /* volatile register 6 */ | |
| 36 | #define REG_NV0 REG_RBX /* non-volatile reg 0 */ | |
| 37 | #define REG_NV1 REG_RDI /* non-volatile reg 1 */ | |
| 38 | #define REG_NV2 REG_RSI /* non-volatile reg 2 */ | |
| 39 | #define REG_NV3 REG_R12 /* non-volatile reg 3 */ | |
| 40 | #define REG_NV4 REG_R13 /* non-volatile reg 4 */ | |
| 41 | #define REG_NV5 REG_R14 /* non-volatile reg 5 */ | |
| 42 | #define REG_NV6 REG_R15 /* non-volatile reg 6 */ | |
| 43 | ||
| 44 | #else | |
| 45 | ||
| 46 | #define REG_P1 REG_RDI /* 1st function parameter */ | |
| 47 | #define REG_P2 REG_RSI /* 2nd function parameter */ | |
| 48 | #define REG_P3 REG_RDX /* 3rd function parameter */ | |
| 49 | #define REG_P4 REG_RCX /* 4th function parameter */ | |
| 50 | #define REG_V5 REG_R10 /* volatile register 5 */ | |
| 51 | #define REG_V6 REG_R11 /* volatile register 6 */ | |
| 52 | #define REG_NV0 REG_RBX /* non-volatile reg 0 */ | |
| 53 | #define REG_NV1 REG_R12 /* non-volatile reg 1 */ | |
| 54 | #define REG_NV2 REG_R13 /* non-volatile reg 2 */ | |
| 55 | #define REG_NV3 REG_R14 /* non-volatile reg 3 */ | |
| 56 | #define REG_NV4 REG_R15 /* non-volatile reg 4 */ | |
| 57 | #define REG_NV5 REG_NONE /* non-volatile reg 5 */ | |
| 58 | #define REG_NV6 REG_NONE /* non-volatile reg 6 */ | |
| 59 | ||
| 60 | #endif | |
| 61 | ||
| 62 | ||
| 63 | ||
| 64 | /*************************************************************************** | |
| 65 | TYPE DEFINITIONS | |
| 66 | ***************************************************************************/ | |
| 67 | ||
| 68 | /* PC and pointer pair */ | |
| 69 | typedef struct _pc_ptr_pair pc_ptr_pair; | |
| 70 | struct _pc_ptr_pair | |
| 71 | { | |
| 72 | UINT32 pc; | |
| 73 | x86code * target; | |
| 74 | x86code * end; | |
| 75 | }; | |
| 76 | ||
| 77 | ||
| 78 | /* core interface structure for the drc common code */ | |
| 79 | typedef struct _drc_core drc_core; | |
| 80 | struct _drc_core | |
| 81 | { | |
| 82 | /* cache parameters */ | |
| 83 | x86code * cache_base; /* base pointer to the compiler cache */ | |
| 84 | x86code * cache_top; /* current top of cache */ | |
| 85 | x86code * cache_danger; /* high water mark for the end */ | |
| 86 | x86code * cache_end; /* end of cache memory */ | |
| 87 | size_t cache_size; /* cache allocated size */ | |
| 88 | ||
| 89 | /* hash table lookups */ | |
| 90 | x86code *** lookup_l1; /* level 1 lookup */ | |
| 91 | x86code ** lookup_l2_recompile; /* level 2 lookup populated with recompile pointers */ | |
| 92 | UINT8 l1bits; /* number of bits in level 1 lookup */ | |
| 93 | UINT8 l2bits; /* number of bits in level 2 lookup */ | |
| 94 | UINT8 l1shift; /* shift to go from PC to level 1 lookup */ | |
| 95 | UINT32 l2mask; /* mask to go from PC to level 2 lookup */ | |
| 96 | UINT8 l2scale; /* scale to get from masked PC value to final level 2 lookup */ | |
| 97 | ||
| 98 | /* entry point for calling from C code */ | |
| 99 | void (*entry_point)(void *); /* pointer to asm entry point */ | |
| 100 | ||
| 101 | /* base pointer for memory accesses */ | |
| 102 | void * baseptr; /* pointer to base; all cache must be accessible from here */ | |
| 103 | ||
| 104 | /* internal subroutines generated in the cache */ | |
| 105 | x86code * exit_point; /* exit out of the DRC engine */ | |
| 106 | x86code * recompile; /* pointer to recompile jump point */ | |
| 107 | x86code * dispatch; /* pointer to dispatch jump point */ | |
| 108 | x86code * flush; /* pointer to flush jump point */ | |
| 109 | ||
| 110 | /* pointers to external C code */ | |
| 111 | x86code * mame_debug_hook; /* pointer to mame_debug_hook function */ | |
| 112 | x86code * recompile_code; /* pointer to recompile_code function */ | |
| 113 | x86code * drc_cache_reset; /* pointer to drc_cache_reset function */ | |
| 114 | ||
| 115 | /* pointers to the PC */ | |
| 116 | UINT32 * pcptr; /* pointer to where the PC is stored */ | |
| 117 | ||
| 118 | /* save areas for the MXCSR register */ | |
| 119 | UINT32 mxcsr_curr; /* current SSE control word */ | |
| 120 | UINT32 mxcsr_save; /* saved SSE control word */ | |
| 121 | UINT32 mxcsr_values[4]; /* array of values for different modes */ | |
| 122 | ||
| 123 | /* internal lists of sequences and tentative branches */ | |
| 124 | pc_ptr_pair * sequence_list; /* PC/pointer sets for the current instruction sequence */ | |
| 125 | UINT32 sequence_count; /* number of instructions in the current sequence */ | |
| 126 | UINT32 sequence_count_max; /* max number of instructions in the current sequence */ | |
| 127 | pc_ptr_pair * tentative_list; /* PC/pointer sets for tentative branches */ | |
| 128 | UINT32 tentative_count; /* number of tentative branches */ | |
| 129 | UINT32 tentative_count_max; /* max number of tentative branches */ | |
| 130 | ||
| 131 | /* CPU-specific callbacks */ | |
| 132 | void (*cb_reset)(struct _drc_core *drc); /* callback when the cache is reset */ | |
| 133 | void (*cb_recompile)(struct _drc_core *drc); /* callback when code needs to be recompiled */ | |
| 134 | void (*cb_entrygen)(struct _drc_core *drc); /* callback before generating the dispatcher on entry */ | |
| 135 | }; | |
| 136 | ||
| 137 | ||
| 138 | /* configuration structure for the drc common code */ | |
| 139 | typedef struct _drc_config drc_config; | |
| 140 | struct _drc_config | |
| 141 | { | |
| 142 | void * cache_base; /* base of cache */ | |
| 143 | UINT32 cache_size; /* size of cache */ | |
| 144 | UINT32 max_instructions; /* maximum instructions per sequence */ | |
| 145 | UINT8 address_bits; /* number of live address bits in the PC */ | |
| 146 | UINT8 lsbs_to_ignore; /* number of LSBs to ignore on the PC */ | |
| 147 | ||
| 148 | void * baseptr; /* pointer to base; all cache must be accessible from here */ | |
| 149 | UINT32 * pcptr; /* pointer to where the PC is stored */ | |
| 150 | ||
| 151 | void (*cb_reset)(drc_core *drc); /* callback when the cache is reset */ | |
| 152 | void (*cb_recompile)(drc_core *drc); /* callback when code needs to be recompiled */ | |
| 153 | void (*cb_entrygen)(drc_core *drc); /* callback before generating the dispatcher on entry */ | |
| 154 | }; | |
| 155 | ||
| 156 | ||
| 157 | ||
| 158 | /*************************************************************************** | |
| 159 | MACROS | |
| 160 | ***************************************************************************/ | |
| 161 | ||
| 162 | /* use this macro in emit_* instructions to make them shorter */ | |
| 163 | #define DRCTOP &drc->cache_top | |
| 164 | ||
| 165 | /* memory references to DRC-relative data */ | |
| 166 | #define MDRC(x) MBD(REG_DRC, drcrel32(drc->baseptr, (x))) | |
| 167 | #define MDRCD(x, disp) MBD(REG_DRC, drcrel32(drc->baseptr, (x)) + (disp)) | |
| 168 | #define MDRCISD(x, index, scale, disp) MBISD(REG_DRC, (index), (scale), drcrel32(drc->baseptr, (x)) + (disp)) | |
| 169 | ||
| 170 | ||
| 171 | ||
| 172 | /*************************************************************************** | |
| 173 | FUNCTION PROTOTYPES | |
| 174 | ***************************************************************************/ | |
| 175 | ||
| 176 | /* init/shutdown */ | |
| 177 | drc_core *drc_init(UINT8 cpunum, drc_config *config); | |
| 178 | void *drc_alloc(drc_core *drc, size_t amount); | |
| 179 | void drc_cache_reset(drc_core *drc); | |
| 180 | void drc_execute(drc_core *drc); | |
| 181 | void drc_exit(drc_core *drc); | |
| 182 | ||
| 183 | /* code management */ | |
| 184 | void drc_begin_sequence(drc_core *drc, UINT32 pc); | |
| 185 | int drc_add_entry_point(drc_core *drc, UINT32 pc, int override); | |
| 186 | void drc_end_sequence(drc_core *drc); | |
| 187 | void drc_register_code_at_cache_top(drc_core *drc, UINT32 pc); | |
| 188 | x86code *drc_get_code_at_pc(drc_core *drc, UINT32 pc); | |
| 189 | void drc_invalidate_code_range(drc_core *drc, UINT32 startpc, UINT32 endpc); | |
| 190 | ||
| 191 | /* standard appendages */ | |
| 192 | void drc_append_dispatcher(drc_core *drc); | |
| 193 | void drc_append_fixed_dispatcher(drc_core *drc, UINT32 newpc, int loadpc); | |
| 194 | void drc_append_tentative_fixed_dispatcher(drc_core *drc, UINT32 newpc, int loadpc); | |
| 195 | void drc_append_call_debugger(drc_core *drc); | |
| 196 | ||
| 197 | void drc_append_set_sse_rounding(drc_core *drc, UINT8 regindex); | |
| 198 | void drc_append_set_temp_sse_rounding(drc_core *drc, UINT8 rounding); | |
| 199 | void drc_append_restore_sse_rounding(drc_core *drc); | |
| 200 | ||
| 201 | ||
| 202 | ||
| 203 | /*************************************************************************** | |
| 204 | INLINE FUNCTIONS | |
| 205 | ***************************************************************************/ | |
| 206 | ||
| 207 | INLINE INT32 drcrel32(void *base, void *ptr) | |
| 208 | { | |
| 209 | INT64 delta = (UINT8 *)ptr - (UINT8 *)base; | |
| 210 | assert((INT32)delta == delta); | |
| 211 | return (INT32)delta; | |
| 212 | } | |
| 213 | ||
| 214 | INLINE void *drcrelptr(drc_core *drc, INT32 offset) | |
| 215 | { | |
| 216 | return (UINT8 *)drc + offset; | |
| 217 | } | |
| 218 | ||
| 219 | #endif /* __X64DRC_H__ */ |
| r1037 | r1038 | |
|---|---|---|
| 6 | 6 | Written by ElSemi |
| 7 | 7 | MAME version by Ernesto Corvi |
| 8 | 8 | |
| 9 | ||
| 10 | 9 | TODO: |
| 11 | 10 | - Properly emulate the TGP Tables from the ROM (See GETEXTERNAL) |
| 12 | 11 | - Many unknown opcodes and addressing modes |
| r1037 | r1038 | |
| 43 | 42 | UINT32 shift; |
| 44 | 43 | UINT16 sr; |
| 45 | 44 | |
| 46 | UINT | |
| 45 | UINT32 gpr[16]; | |
| 47 | 46 | UINT32 extport[0x30]; |
| 48 | 47 | |
| 49 | 48 | /* FIFO */ |
| r1037 | r1038 | |
| 357 | 356 | break; |
| 358 | 357 | |
| 359 | 358 | case 0x18: /* ASR D, SHIFT */ |
| 360 | GETD().u = (GETD().u & 0x80000000) | (GETD().u >> GETSHIFT()); | |
| 359 | // GETD().u = (GETD().u & 0x80000000) | (GETD().u >> GETSHIFT()); | |
| 360 | GETD().i >>= GETSHIFT(); | |
| 361 | 361 | FLAGSI(GETD().u); |
| 362 | 362 | break; |
| 363 | 363 | |
| r1037 | r1038 | |
| 396 | 396 | |
| 397 | 397 | r.u = GETEXTPORT()[0x20]; |
| 398 | 398 | a = r.i; |
| 399 | r.f = (float)sin((float)a*(2.0*M_PI/65536.0)); | |
| 399 | if ( a == 0 || a == -32768 ) | |
| 400 | r.f = 0; | |
| 401 | else if ( a == 16384 ) | |
| 402 | r.f = 1.0; | |
| 403 | else if ( a == -16384 ) | |
| 404 | r.f=-1.0; | |
| 405 | else | |
| 406 | r.f = (float)sin((float)a*(2.0*M_PI/65536.0)); | |
| 407 | ||
| 400 | 408 | return r.u; |
| 401 | 409 | } |
| 402 | 410 | |
| r1037 | r1038 | |
| 407 | 415 | |
| 408 | 416 | r.u = GETEXTPORT()[0x20]; |
| 409 | 417 | a = r.i; |
| 418 | if ( a == 16384 || a == -16384 ) | |
| 419 | r.f = 0; | |
| 420 | else if ( a == 0 ) | |
| 421 | r.f = 1.0; | |
| 422 | else if ( a == -32768 ) | |
| 423 | r.f = -1.0; | |
| 424 | else | |
| 425 | r.f = (float)cos((float)a*(2.0*M_PI/65536.0)); | |
| 410 | 426 | |
| 411 | r.f = (float)cos((float)a*(2.0*M_PI/65536.0)); | |
| 412 | 427 | return r.u; |
| 413 | 428 | } |
| 414 | 429 | |
| 430 | #if 0 | |
| 415 | 431 | if ( offset == 0x22 ) /* -SIN from value at RAM(0x20) in 0x4000/PI steps */ |
| 416 | 432 | { |
| 417 | 433 | MB86233_REG r; |
| r1037 | r1038 | |
| 422 | 438 | r.f = (float)-sin((float)a*(2.0*M_PI/65536.0)); |
| 423 | 439 | return r.u; |
| 424 | 440 | } |
| 441 | #endif | |
| 425 | 442 | |
| 426 | 443 | if ( offset == 0x27 ) /* atan */ |
| 427 | 444 | { |
| 428 | 445 | MB86233_REG r1, r2; |
| 429 | INT32 v; | |
| 430 | 446 | |
| 431 | 447 | r1.u = GETEXTPORT()[0x24]; /* A */ |
| 432 | 448 | r2.u = GETEXTPORT()[0x25]; /* B */ |
| 433 | 449 | |
| 434 | v = (INT32)(atan2(r2.f,r1.f)*32768.0/M_PI); | |
| 450 | if ( r2.f == 0 ) | |
| 451 | { | |
| 452 | if ( r1.f >= 0 ) | |
| 453 | GETEXTPORT()[0x27] = 0; | |
| 454 | else | |
| 455 | GETEXTPORT()[0x27] = 0xFFFF8000; | |
| 456 | } | |
| 457 | else if ( r1.f == 0 ) | |
| 458 | { | |
| 459 | if ( r2.f >= 0 ) | |
| 460 | GETEXTPORT()[0x27] = 0x4000; | |
| 461 | else | |
| 462 | GETEXTPORT()[0x27] = 0xFFFFC000; | |
| 463 | } | |
| 464 | else | |
| 465 | { | |
| 466 | r1.i = (INT32)((atan2(r2.f,r1.f))*32768.0/M_PI); | |
| 467 | GETEXTPORT()[0x27] = r1.u; | |
| 468 | } | |
| 435 | 469 | |
| 436 | r1.i = v; | |
| 437 | return r1.u; | |
| 470 | return GETEXTPORT()[0x27]; | |
| 438 | 471 | } |
| 439 | 472 | |
| 440 | 473 | if ( offset == 0x28 ) /* 1/x - part 1 */ |
| r1037 | r1038 | |
| 444 | 477 | { |
| 445 | 478 | MB86233_REG r; |
| 446 | 479 | r.u = GETEXTPORT()[0x28]; |
| 480 | if ( r.f==0 ) | |
| 481 | r.u = 0x80000000; | |
| 447 | 482 | r.f = 1/r.f; |
| 448 | 483 | return r.u; |
| 449 | 484 | } |
| r1037 | r1038 | |
| 455 | 490 | { |
| 456 | 491 | MB86233_REG r; |
| 457 | 492 | r.u = GETEXTPORT()[0x2a]; |
| 458 | r.f = 1/sqrt(r.f); | |
| 493 | if ( r.f == 0 ) | |
| 494 | r.u=0x80000000; | |
| 495 | else | |
| 496 | r.f = 1/sqrt(r.f); | |
| 459 | 497 | return r.u; |
| 460 | 498 | } |
| 461 | 499 | |
| r1037 | r1038 | |
| 508 | 546 | break; |
| 509 | 547 | |
| 510 | 548 | case 0x11: /* A.e */ |
| 511 | return (GETA().u >> 23) & 0x | |
| 549 | return (GETA().u >> 23) & 0xff; | |
| 512 | 550 | break; |
| 513 | 551 | |
| 514 | 552 | case 0x12: /* A.m */ |
| r1037 | r1038 | |
| 520 | 558 | break; |
| 521 | 559 | |
| 522 | 560 | case 0x14: /* B.e */ |
| 523 | return (GETB().u >> 23) & 0x | |
| 561 | return (GETB().u >> 23) & 0xff; | |
| 524 | 562 | break; |
| 525 | 563 | |
| 526 | 564 | case 0x15: /* B.m */ |
| r1037 | r1038 | |
| 532 | 570 | break; |
| 533 | 571 | |
| 534 | 572 | case 0x1A: /* D.e */ |
| 535 | return (GETD().u >> 23) & 0x | |
| 573 | return (GETD().u >> 23) & 0xff; | |
| 536 | 574 | break; |
| 537 | 575 | |
| 538 | 576 | case 0x1B: /* D.m */ |
| r1037 | r1038 | |
| 544 | 582 | break; |
| 545 | 583 | |
| 546 | 584 | case 0x1D: /* P.e */ |
| 547 | return (GETP().u >> 23) & 0x | |
| 585 | return (GETP().u >> 23) & 0xff; | |
| 548 | 586 | break; |
| 549 | 587 | |
| 550 | 588 | case 0x1E: /* P.m */ |
| r1037 | r1038 | |
| 568 | 606 | { |
| 569 | 607 | if ( mb86233.fifo_read_cb(&fifo_data) ) |
| 570 | 608 | { |
| 571 | #if 0 | |
| 572 | if ( GETPC() == 0x4C ) | |
| 573 | printf( "TGP: Function %02x\n", (fifo_data >> 23 ) & 0xff ); | |
| 574 | #endif | |
| 575 | 609 | return fifo_data; |
| 576 | 610 | } |
| 577 | 611 | } |
| r1037 | r1038 | |
| 669 | 703 | { |
| 670 | 704 | if ( reg < 0x10 ) |
| 671 | 705 | { |
| 706 | if ( reg == 12 || reg == 13 ) | |
| 707 | val &= 0xff; | |
| 708 | ||
| 672 | 709 | GETGPR(reg) = val; |
| 673 | 710 | return; |
| 674 | 711 | } |
| r1037 | r1038 | |
| 681 | 718 | |
| 682 | 719 | case 0x11: /* A.e */ |
| 683 | 720 | GETA().u &= ~((0x0000007f) << 23); |
| 684 | GETA().u |= (( val & 0x | |
| 721 | GETA().u |= (( val & 0xff ) << 23 ); | |
| 685 | 722 | break; |
| 686 | 723 | |
| 687 | 724 | case 0x12: /* A.m */ |
| r1037 | r1038 | |
| 696 | 733 | |
| 697 | 734 | case 0x14: /* B.e */ |
| 698 | 735 | GETB().u &= ~((0x0000007f) << 23); |
| 699 | GETB().u |= (( val & 0x | |
| 736 | GETB().u |= (( val & 0xff ) << 23 ); | |
| 700 | 737 | break; |
| 701 | 738 | |
| 702 | 739 | case 0x15: /* B.m */ |
| r1037 | r1038 | |
| 711 | 748 | |
| 712 | 749 | case 0x1A: /* D.e */ |
| 713 | 750 | GETD().u &= ~((0x0000007f) << 23); |
| 714 | GETD().u |= (( val & 0x | |
| 751 | GETD().u |= (( val & 0xff ) << 23 ); | |
| 715 | 752 | break; |
| 716 | 753 | |
| 717 | 754 | case 0x1B: /* B.m */ |
| r1037 | r1038 | |
| 726 | 763 | |
| 727 | 764 | case 0x1D: /* P.e */ |
| 728 | 765 | GETP().u &= ~((0x0000007f) << 23); |
| 729 | GETP().u |= (( val & 0x | |
| 766 | GETP().u |= (( val & 0xff ) << 23 ); | |
| 730 | 767 | break; |
| 731 | 768 | |
| 732 | 769 | case 0x1E: /* P.m */ |
| r1037 | r1038 | |
| 845 | 882 | return 0; |
| 846 | 883 | } |
| 847 | 884 | |
| 848 | ||
| 849 | ||
| 850 | 885 | /*************************************************************************** |
| 851 | 886 | Core Execution Loop |
| 852 | 887 | ***************************************************************************/ |
| r1037 | r1038 | |
| 887 | 922 | |
| 888 | 923 | case 0x0D: |
| 889 | 924 | GETA().u = GETARAM()[INDIRECT(r1,0)]; |
| 890 | GETB().u = GETBRAM()[INDIRECT(r2| | |
| 925 | GETB().u = GETBRAM()[INDIRECT(r2| | |
| 891 | 926 | break; |
| 892 | 927 | |
| 893 | 928 | case 0x0F: |
| r1037 | r1038 | |
| 921 | 956 | |
| 922 | 957 | switch( op ) |
| 923 | 958 | { |
| 924 | case 0x04: /* MOV RAM-> | |
| 959 | case 0x04: /* MOV RAM->External */ | |
| 925 | 960 | { |
| 926 | | |
| 961 | SETEXTERNAL(GETEB(), r2, | |
| 927 | 962 | ALU(alu); |
| 928 | 963 | } |
| 929 | 964 | break; |
| r1037 | r1038 | |
| 1036 | 1071 | } |
| 1037 | 1072 | break; |
| 1038 | 1073 | |
| 1039 | case 0x03: /* RAM->External */ | |
| 1074 | case 0x03: /* RAM->External Ind */ | |
| 1040 | 1075 | { |
| 1041 | 1076 | val = GETARAM()[r1]; |
| 1042 | 1077 | ALU(alu); |
| r1037 | r1038 | |
| 1114 | 1149 | |
| 1115 | 1150 | if( sub2 == 0x00 ) /* CLEAR reg */ |
| 1116 | 1151 | { |
| 1117 | UINT32 reg = opcode & 0x | |
| 1152 | UINT32 reg = opcode & 0x1f; | |
| 1118 | 1153 | |
| 1119 | 1154 | switch( reg ) |
| 1120 | 1155 | { |
| r1037 | r1038 | |
| 1122 | 1157 | GETD().u = 0; |
| 1123 | 1158 | break; |
| 1124 | 1159 | |
| 1160 | case 0x08: | |
| 1161 | GETB().u = 0; | |
| 1162 | break; | |
| 1163 | ||
| 1125 | 1164 | case 0x04: |
| 1126 | 1165 | GETA().u = 0; |
| 1127 | 1166 | break; |
| r1037 | r1038 | |
| 1129 | 1168 | } |
| 1130 | 1169 | else if ( sub2 == 0x04 ) /* REP xxx */ |
| 1131 | 1170 | { |
| 1132 | if ( (opcode & 0xff) == 0 ) | |
| 1133 | GETREPS() = 0x100; | |
| 1134 | else | |
| 1135 | GETREPS() = opcode & 0xff; | |
| 1171 | UINT32 sub3 = ( opcode >> 12 ) & 0x0f; | |
| 1136 | 1172 | |
| 1137 | GETPC()++; | |
| 1173 | if ( sub3 == 0 ) | |
| 1174 | { | |
| 1175 | GETREPS() = opcode & 0xfff; | |
| 1176 | ||
| 1177 | if ( GETREPS() == 0 ) | |
| 1178 | GETREPS() = 0x100; | |
| 1179 | ||
| 1180 | GETPC()++; | |
| 1181 | } | |
| 1182 | else if ( sub3 == 8 ) | |
| 1183 | { | |
| 1184 | GETREPS() = GETREGS( opcode & 0xfff, 0 ); | |
| 1185 | GETPC()++; | |
| 1186 | } | |
| 1138 | 1187 | } |
| 1139 | 1188 | else if ( sub2 == 0x02 ) /* CLRFLAGS */ |
| 1140 | 1189 | { |
| 1141 | GETSR() &= ~(opcode&0xfff | |
| 1190 | GETSR() &= ~(opcode&0xfff | |
| 1142 | 1191 | } |
| 1143 | 1192 | else if ( sub2 == 0x06 ) /* SETFLAGS */ |
| 1144 | 1193 | { |
| 1145 | GETSR() |= (opcode&0xfff | |
| 1194 | GETSR() |= (opcode&0xfff | |
| 1146 | 1195 | } |
| 1147 | 1196 | } |
| 1148 | 1197 | break; |
| r1037 | r1038 | |
| 1162 | 1211 | UINT32 imm = opcode & 0xffffff; |
| 1163 | 1212 | |
| 1164 | 1213 | if ( sub == 0 ) /* R12 */ |
| 1165 | GETGPR(12) = imm; | |
| 1214 | GETGPR(12) = imm & 0xff; | |
| 1166 | 1215 | else if ( sub == 1 ) /* R13 */ |
| 1167 | GETGPR(13) = imm; | |
| 1216 | GETGPR(13) = imm & 0xff; | |
| 1168 | 1217 | else |
| 1169 | 1218 | logerror( "TGP: Unknown LDIMM r12 (sub=%d) at PC:%04x\n", sub, GETPC() ); |
| 1170 | 1219 | } |
| r1037 | r1038 | |
| 1175 | 1224 | UINT32 sub = (opcode>>24) & 0x03; |
| 1176 | 1225 | UINT32 imm = opcode & 0xffffff; |
| 1177 | 1226 | |
| 1178 | if ( sub == | |
| 1227 | if ( sub == 0 ) /* A | |
| 1179 | 1228 | { |
| 1180 | GETA().u = | |
| 1229 | GETA().u = | |
| 1181 | 1230 | } |
| 1231 | else if ( sub == 1 ) /* A.e */ | |
| 1232 | { | |
| 1233 | GETA().u = (imm & 0xff) << 23; | |
| 1234 | } | |
| 1182 | 1235 | else if ( sub == 2 ) /* A.m */ |
| 1183 | 1236 | { |
| 1184 | 1237 | GETA().u |= (imm & 0x7fffff ) | ((imm & 0x800000) << 8); |
| r1037 | r1038 | |
| 1195 | 1248 | UINT32 sub = (opcode>>24) & 0x03; |
| 1196 | 1249 | UINT32 imm = opcode & 0xffffff; |
| 1197 | 1250 | |
| 1198 | if ( sub == 0 ) /* B | |
| 1251 | if ( sub == 0 ) /* B ? */ | |
| 1199 | 1252 | { |
| 1200 | GETB().u = (imm & 0x7f) << 23; | |
| 1253 | GETB().u = ((imm & 0x7f) << 23) | ((imm & 0xff) << 8) | ( imm & 0xff ); | |
| 1201 | 1254 | } |
| 1202 | else if ( sub == 1 ) /* B. | |
| 1255 | else if ( sub == 1 ) /* B.e */ | |
| 1203 | 1256 | { |
| 1257 | GETB().u = (imm & 0xff) << 23; | |
| 1258 | } | |
| 1259 | else if ( sub == 2 ) /* B.m */ | |
| 1260 | { | |
| 1204 | 1261 | GETB().u |= (imm & 0x7fffff ) | ((imm & 0x800000) << 8); |
| 1205 | 1262 | } |
| 1206 | 1263 | else |
| r1037 | r1038 | |
| 1215 | 1272 | UINT32 sub = (opcode>>24) & 0x03; |
| 1216 | 1273 | UINT32 imm = opcode & 0xffffff; |
| 1217 | 1274 | |
| 1218 | if ( sub == | |
| 1275 | if ( sub == 1 ) /* clear + D.m */ | |
| 1219 | 1276 | { |
| 1220 | GETD().u = (imm & 0x7f) << | |
| 1277 | GETD().u = (imm & 0x7fffff ) | ((imm & 0x800000) << 8); | |
| 1221 | 1278 | } |
| 1279 | else if ( sub == 2 ) /* D.e */ | |
| 1280 | { | |
| 1281 | GETD().u = (imm & 0xff) << 23; | |
| 1282 | } | |
| 1222 | 1283 | else if ( sub == 3 ) /* D.m */ |
| 1223 | 1284 | { |
| 1224 | 1285 | GETD().u |= (imm & 0x7fffff ) | ((imm & 0x800000) << 8); |
| r1037 | r1038 | |
|---|---|---|
| 431 | 431 | |
| 432 | 432 | switch(op) |
| 433 | 433 | { |
| 434 | case 0x03: /* RAM->External */ | |
| 434 | case 0x03: /* RAM->External Indirect */ | |
| 435 | 435 | { |
| 436 | 436 | p += sprintf(p,"MOV RAM(0x%x)->E(EB+%s)",r1,INDIRECT(r2|(6<<6),0)); |
| 437 | 437 | } |
| 438 | 438 | break; |
| 439 | 439 | |
| 440 | case 0x04: /* MOV RAM-> | |
| 440 | case 0x04: /* MOV RAM->External */ | |
| 441 | 441 | { |
| 442 | p += sprintf(p,"MOV RAM(0x%x)-> | |
| 442 | p += sprintf(p,"MOV RAM(0x%x)->E | |
| 443 | 443 | } |
| 444 | 444 | break; |
| 445 | 445 | |
| r1037 | r1038 | |
| 560 | 560 | switch( opcode & 0x3f ) |
| 561 | 561 | { |
| 562 | 562 | case 0x04: p += sprintf(p, "a" ); break; |
| 563 | case 0x08: p += sprintf(p, "b" ); break; | |
| 563 | 564 | case 0x10: p += sprintf(p, "d" ); break; |
| 564 | 565 | default: p += sprintf(p, "UNKNOWN REG(%x)",opcode&0x3F); break; |
| 565 | 566 | } |
| r1037 | r1038 | |
| 568 | 569 | p += sprintf(p,"CLRFLAG 0x%x",opcode&0xffff); |
| 569 | 570 | else if ( sub2==0x4 ) |
| 570 | 571 | { |
| 571 | if ( (opcode & 0xff) == 0 ) | |
| 572 | if ( (opcode & 0xfff) == 0 ) | |
| 572 | 573 | p += sprintf(p,"REP 0x100"); |
| 573 | 574 | else |
| 574 | 575 | p += sprintf(p,"REP 0x%x",opcode&0xff); |
| r1037 | r1038 | |
| 608 | 609 | |
| 609 | 610 | p += sprintf(p,"LDIMM 0x%X->",opcode&0xffffff); |
| 610 | 611 | |
| 611 | if ( sub == 1 ) p += sprintf(p,"a.e"); | |
| 612 | if ( sub == 0 ) p += sprintf(p,"a.exp"); | |
| 613 | else if ( sub == 1 ) p += sprintf(p,"a.e"); | |
| 612 | 614 | else if ( sub == 2 ) p += sprintf(p,"a.m"); |
| 613 | 615 | else p += sprintf(p,"UNKREG(%x)", sub); |
| 614 | 616 | } |
| r1037 | r1038 | |
| 620 | 622 | |
| 621 | 623 | p += sprintf(p,"LDIMM 0x%X->",opcode&0xffffff); |
| 622 | 624 | |
| 623 | if ( sub == 0 ) p += sprintf(p,"b.e"); | |
| 624 | else if ( sub == 1 ) p += sprintf(p,"b.m"); | |
| 625 | if ( sub == 0 ) p += sprintf(p,"b.exp"); | |
| 626 | else if ( sub == 1 ) p += sprintf(p,"b.e"); | |
| 627 | else if ( sub == 2 ) p += sprintf(p,"b.m"); | |
| 625 | 628 | else p += sprintf(p,"UNKREG(%x)", sub); |
| 626 | 629 | } |
| 627 | 630 | break; |
| r1037 | r1038 | |
|---|---|---|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | /* HD63701 only */ |
| 23 | #if (HAS_HD63701) | |
| 23 | 24 | //INLINE void trap( void ) |
| 24 | 25 | static void trap( void ) |
| 25 | 26 | { |
| 26 | 27 | logerror("M6808: illegal opcode: address %04X, op %02X\n",PC,(int) M_RDOP_ARG(PC)&0xFF); |
| 27 | 28 | TAKE_TRAP; |
| 28 | 29 | } |
| 30 | #endif | |
| 29 | 31 | |
| 30 | 32 | /* $00 ILLEGAL */ |
| 31 | 33 |
| r1037 | r1038 | |
|---|---|---|
| 246 | 246 | INLINE void cpx_ex(void); |
| 247 | 247 | INLINE void cpx_im(void); |
| 248 | 248 | INLINE void cpx_ix(void); |
| 249 | #if (HAS_HD63701) | |
| 249 | 250 | //INLINE void trap(void); |
| 250 | 251 | static void trap(void); |
| 252 | #endif | |
| 251 | 253 | |
| 252 | 254 | static void (*m6800_insn[0x100])(void) = { |
| 253 | 255 | illegal,nop, illegal,illegal,illegal,illegal,tap, tpa, |
| r1037 | r1038 | |
|---|---|---|
| 163 | 163 | static UINT32 menu_cheat(UINT32 state); |
| 164 | 164 | static UINT32 menu_memory_card(UINT32 state); |
| 165 | 165 | static UINT32 menu_video(UINT32 state); |
| 166 | static UINT32 menu_reset_game(UINT32 state); | |
| 167 | 166 | static UINT32 menu_quit_game(UINT32 state); |
| 168 | 167 | static UINT32 menu_select_game(UINT32 state); |
| 169 | 168 | #ifdef MESS |
| r1037 | r1038 | |
| 837 | 836 | ADD_MENU(UI_memorycard, menu_memory_card, 0); |
| 838 | 837 | |
| 839 | 838 | /* add reset and exit menus */ |
| 840 | /* ADD_MENU(UI_resetgame, menu_reset_game, 0);*/ | |
| 841 | 839 | ADD_MENU(UI_selectgame, menu_select_game, 1 << 16); |
| 842 | 840 | ADD_MENU(UI_returntogame, NULL, 0); |
| 843 | 841 | |
| r1037 | r1038 | |
| 1527 | 1525 | |
| 1528 | 1526 | |
| 1529 | 1527 | /*------------------------------------------------- |
| 1530 | menu_reset_game - handle the "menu" for | |
| 1531 | resetting the game | |
| 1532 | -------------------------------------------------*/ | |
| 1533 | ||
| 1534 | static UINT32 menu_reset_game(UINT32 state) | |
| 1535 | { | |
| 1536 | /* request a reset */ | |
| 1537 | mame_schedule_soft_reset(Machine); | |
| 1538 | ||
| 1539 | /* reset the menu stack */ | |
| 1540 | ui_menu_stack_reset(); | |
| 1541 | return 0; | |
| 1542 | } | |
| 1543 | ||
| 1544 | ||
| 1545 | /*------------------------------------------------- | |
| 1546 | 1528 | menu_quit_game - handle the "menu" for |
| 1547 | 1529 | quitting the game |
| 1548 | 1530 | -------------------------------------------------*/ |
| r1037 | r1038 | |
|---|---|---|
| 1408 | 1408 | machine->playback_file = NULL; |
| 1409 | 1409 | |
| 1410 | 1410 | /* debugger-related information */ |
| 1411 | #ifdef MAME_DEBUG | |
| 1411 | 1412 | machine->debug_mode = options_get_bool(mame_options(), OPTION_DEBUG); |
| 1413 | #else | |
| 1414 | machine->debug_mode = 0; | |
| 1415 | #endif | |
| 1412 | 1416 | |
| 1413 | 1417 | /* reset the global MAME data and clear the other privates */ |
| 1414 | 1418 | memset(machine->mame_data, 0, sizeof(*machine->mame_data)); |
| r1037 | r1038 | |
|---|---|---|
| 220 | 220 | }; |
| 221 | 221 | |
| 222 | 222 | static void dma_scsp(struct _SCSP *SCSP); /*SCSP DMA transfer function*/ |
| 223 | #define scsp_dgate scsp_regs[0x416/2] & 0x4000 | |
| 224 | #define scsp_ddir scsp_regs[0x416/2] & 0x2000 | |
| 225 | #define scsp_dexe scsp_regs[0x416/2] & 0x1000 | |
| 226 | #define dma_transfer_end ((scsp_regs[0x424/2] & 0x10)>>4)|(((scsp_regs[0x426/2] & 0x10)>>4)<<1)|(((scsp_regs[0x428/2] & 0x10)>>4)<<2) | |
| 223 | #define scsp_dgate scsp_regs[0x16/2] & 0x4000 | |
| 224 | #define scsp_ddir scsp_regs[0x16/2] & 0x2000 | |
| 225 | #define scsp_dexe scsp_regs[0x16/2] & 0x1000 | |
| 226 | #define dma_transfer_end ((scsp_regs[0x24/2] & 0x10)>>4)|(((scsp_regs[0x26/2] & 0x10)>>4)<<1)|(((scsp_regs[0x28/2] & 0x10)>>4)<<2) | |
| 227 | 227 | |
| 228 | 228 | static const float SDLT[8]={-1000000.0,-36.0,-30.0,-24.0,-18.0,-12.0,-6.0,0.0}; |
| 229 | 229 | |
| r1037 | r1038 | |
| 742 | 742 | } |
| 743 | 743 | else if(addr<0x600) |
| 744 | 744 | { |
| 745 | *((unsigned short *) (SCSP->udata.datab+((addr&0xff)))) = val; | |
| 746 | SCSP_UpdateReg(SCSP, addr&0xff); | |
| 745 | if (addr < 0x430) | |
| 746 | { | |
| 747 | *((unsigned short *) (SCSP->udata.datab+((addr&0x3f)))) = val; | |
| 748 | SCSP_UpdateReg(SCSP, addr&0x3f); | |
| 749 | } | |
| 747 | 750 | } |
| 748 | 751 | else if(addr<0x700) |
| 749 | 752 | SCSP->RINGBUF[(addr-0x600)/2]=val; |
| r1037 | r1038 | |
| 777 | 780 | } |
| 778 | 781 | else if(addr<0x600) |
| 779 | 782 | { |
| 780 | SCSP_UpdateRegR(SCSP, addr&0xff); | |
| 781 | v= *((unsigned short *) (SCSP->udata.datab+((addr&0xff)))); | |
| 783 | if (addr < 0x430) | |
| 784 | { | |
| 785 | SCSP_UpdateRegR(SCSP, addr&0x3f); | |
| 786 | v= *((unsigned short *) (SCSP->udata.datab+((addr&0x3f)))); | |
| 787 | } | |
| 782 | 788 | } |
| 783 | 789 | else if(addr<0x700) |
| 784 | 790 | v=SCSP->RINGBUF[(addr-0x600)/2]; |
| r1037 | r1038 | |
| 1221 | 1227 | |
| 1222 | 1228 | scsp_regs = (UINT16 *)SCSP->udata.datab; |
| 1223 | 1229 | |
| 1224 | | |
| 1230 | mame_printf_debug("SCSP: DMA transfer START\n" | |
| 1225 | 1231 | "DMEA: %04x DRGA: %04x DTLG: %04x\n" |
| 1226 | 1232 | "DGATE: %d DDIR: %d\n",SCSP->scsp_dmea,SCSP->scsp_drga,SCSP->scsp_dtlg,scsp_dgate ? 1 : 0,scsp_ddir ? 1 : 0); |
| 1227 | 1233 | |
| r1037 | r1038 | |
| 1229 | 1235 | * (DMA *can't* overwrite his parameters). */ |
| 1230 | 1236 | if(!(scsp_ddir)) |
| 1231 | 1237 | { |
| 1232 | tmp_dma[0] = scsp_regs[0x412/2]; | |
| 1233 | tmp_dma[1] = scsp_regs[0x414/2]; | |
| 1234 | tmp_dma[2] = scsp_regs[0x416/2]; | |
| 1238 | tmp_dma[0] = scsp_regs[0x12/2]; | |
| 1239 | tmp_dma[1] = scsp_regs[0x14/2]; | |
| 1240 | tmp_dma[2] = scsp_regs[0x16/2]; | |
| 1235 | 1241 | } |
| 1236 | 1242 | |
| 1237 | 1243 | if(scsp_ddir) |
| r1037 | r1038 | |
| 1256 | 1262 | /*Resume the values*/ |
| 1257 | 1263 | if(!(scsp_ddir)) |
| 1258 | 1264 | { |
| 1259 | scsp_regs[0x412/2] = tmp_dma[0]; | |
| 1260 | scsp_regs[0x414/2] = tmp_dma[1]; | |
| 1261 | scsp_regs[0x416/2] = tmp_dma[2]; | |
| 1265 | scsp_regs[0x12/2] = tmp_dma[0]; | |
| 1266 | scsp_regs[0x14/2] = tmp_dma[1]; | |
| 1267 | scsp_regs[0x16/2] = tmp_dma[2]; | |
| 1262 | 1268 | } |
| 1263 | 1269 | |
| 1264 | 1270 | /*Job done,request a dma end irq*/ |
| 1265 | if(scsp_regs[0x | |
| 1271 | if(scsp_regs[0x | |
| 1266 | 1272 | cpunum_set_input_line(2,dma_transfer_end,HOLD_LINE); |
| 1267 | 1273 | } |
| 1268 | 1274 | |
| r1037 | r1038 | |
| 1349 | 1355 | case 0x412: |
| 1350 | 1356 | /*DMEA [15:1]*/ |
| 1351 | 1357 | /*Sound memory address*/ |
| 1352 | SCSP->scsp_dmea = (((scsp_regs[0x | |
| 1358 | SCSP->scsp_dmea = (((scsp_regs[0x | |
| 1353 | 1359 | break; |
| 1354 | 1360 | case 0x414: |
| 1355 | 1361 | /*DMEA [19:16]*/ |
| 1356 | SCSP->scsp_dmea = (((scsp_regs[0x | |
| 1362 | SCSP->scsp_dmea = (((scsp_regs[0x | |
| 1357 | 1363 | /*DRGA [11:1]*/ |
| 1358 | 1364 | /*Register memory address*/ |
| 1359 | SCSP->scsp_drga = scsp_regs[0x | |
| 1365 | SCSP->scsp_drga = scsp_regs[0x | |
| 1360 | 1366 | break; |
| 1361 | 1367 | case 0x416: |
| 1362 | 1368 | /*DGATE[14]*/ |
| r1037 | r1038 | |
| 1367 | 1373 | /*starting bit*/ |
| 1368 | 1374 | /*DTLG[11:1]*/ |
| 1369 | 1375 | /*size of transfer*/ |
| 1370 | SCSP->scsp_dtlg = scsp_regs[0x | |
| 1376 | SCSP->scsp_dtlg = scsp_regs[0x | |
| 1371 | 1377 | if(scsp_dexe) |
| 1372 | 1378 | { |
| 1373 | 1379 | dma_scsp(SCSP); |
| 1374 | scsp_regs[0x | |
| 1380 | scsp_regs[0x | |
| 1375 | 1381 | } |
| 1376 | 1382 | break; |
| 1377 | 1383 | //check main cpu IRQ |
| r1037 | r1038 | |
|---|---|---|
| 106 | 106 | stream_update(info->stream); |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | #if BUILD_YM2610 | |
| 109 | 110 | static void ym2610_stream_update(void *param, stream_sample_t **inputs, stream_sample_t **buffers, int length) |
| 110 | 111 | { |
| 111 | 112 | struct ym2610_info *info = param; |
| r1037 | r1038 | |
| 163 | 164 | /* error */ |
| 164 | 165 | return NULL; |
| 165 | 166 | } |
| 167 | #endif | |
| 166 | 168 | |
| 167 | 169 | #if BUILD_YM2610B |
| 168 | 170 | static void ym2610b_stream_update(void *param, stream_sample_t **inputs, stream_sample_t **buffers, int length) |
| r1037 | r1038 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Core options code code |
| 6 | 6 | |
| 7 | Copyright (c) 1996-200 | |
| 7 | Copyright (c) 1996-2007, Nicola Salmoria and the MAME Team. | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1037 | r1038 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | AVI movie format parsing helpers. |
| 6 | 6 | |
| 7 | Copyright (c) 1996-200 | |
| 7 | Copyright (c) 1996-2007, Nicola Salmoria and the MAME Team. | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1037 | r1038 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | AVI movie format parsing helpers. |
| 6 | 6 | |
| 7 | Copyright (c) 1996-200 | |
| 7 | Copyright (c) 1996-2007, Nicola Salmoria and the MAME Team. | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1037 | r1038 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Resource pool code |
| 6 | 6 | |
| 7 | Copyright (c) 1996-200 | |
| 7 | Copyright (c) 1996-2007, Nicola Salmoria and the MAME Team. | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1037 | r1038 | |
| 519 | 519 | |
| 520 | 520 | |
| 521 | 521 | |
| 522 | ||
| 523 | /*------------------------------------------------- | |
| 524 | pointer_in_block - returns whether a pointer | |
| 525 | is within a memory block | |
| 526 | -------------------------------------------------*/ | |
| 527 | ||
| 528 | static int pointer_in_block(const UINT8 *ptr, const UINT8 *block, size_t block_size) | |
| 529 | { | |
| 530 | return (ptr >= block && ptr < block + block_size); | |
| 531 | } | |
| 532 | ||
| 533 | ||
| 534 | ||
| 535 | 522 | /*************************************************************************** |
| 536 | 523 | INTERNAL FUNCTIONS |
| 537 | 524 | ***************************************************************************/ |
| r1037 | r1038 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Abstract object pool management |
| 6 | 6 | |
| 7 | Copyright (c) 1996-200 | |
| 7 | Copyright (c) 1996-2007, Nicola Salmoria and the MAME Team. | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1037 | r1038 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Video compression and decompression helpers. |
| 6 | 6 | |
| 7 | Copyright (c) 1996-200 | |
| 7 | Copyright (c) 1996-2007, Nicola Salmoria and the MAME Team. | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | **************************************************************************** |
| r1037 | r1038 | |
|---|---|---|
| 10 | 10 | |
| 11 | 11 | Audio/video compression and decompression helpers. |
| 12 | 12 | |
| 13 | Copyright (c) 1996-200 | |
| 13 | Copyright (c) 1996-2007, Nicola Salmoria and the MAME Team. | |
| 14 | 14 | Visit http://mamedev.org for licensing and usage restrictions. |
| 15 | 15 | |
| 16 | 16 | **************************************************************************** |
| r1037 | r1038 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Huffman compression routines. |
| 6 | 6 | |
| 7 | Copyright (c) 1996-200 | |
| 7 | Copyright (c) 1996-2007, Nicola Salmoria and the MAME Team. | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1037 | r1038 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Audio/video compression and decompression helpers. |
| 6 | 6 | |
| 7 | Copyright (c) 1996-200 | |
| 7 | Copyright (c) 1996-2007, Nicola Salmoria and the MAME Team. | |
| 8 | 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| r1037 | r1038 | |
|---|---|---|
| 10 | 10 | ---------------------- |
| 11 | 11 | - [PCE] Added support for Populous on-cart RAM. [Wilbert Pol] |
| 12 | 12 | |
| 13 | - [PCE] Added preliminary emulation of the CD-ROM interface. [Wilbert | |
| 14 | Pol] | |
| 13 | - [PCE] Added preliminary emulation of the CD-ROM interface. [Wilbert Pol] | |
| 15 | 14 | |
| 16 | 15 | |
| 17 | 16 | |
| r1037 | r1038 | |
| 29 | 28 | |
| 30 | 29 | Source Changes: |
| 31 | 30 | ---------------- |
| 31 | - The core is based on MAME 0.119u1. This incorporates all features of the | |
| 32 | update to this core. [MAME team] | |
| 33 | ||
| 32 | 34 | - Fixed multisession crash with the new menu selector. (bug #1328) [Nate |
| 33 | 35 | Woods] |
| 34 | 36 |
| r1037 | r1038 | |
|---|---|---|
| 322 | 322 | -Wundef \ |
| 323 | 323 | -Wformat-security \ |
| 324 | 324 | -Wwrite-strings \ |
| 325 | -Wno-unused-function \ | |
| 326 | 325 | |
| 327 | 326 | # add profiling information for the compiler |
| 328 | 327 | ifdef PROFILE |
| Previous | 15994 Revisions | Next |