mirror of
https://github.com/libretro/FBNeo.git
synced 2024-12-11 19:13:42 +00:00
T-Unit Update
MK2 Playable with imperfect sound MK Turbo support Clones added NBA Jam WIP
This commit is contained in:
parent
55ffb43279
commit
020a44c3ff
@ -84,6 +84,59 @@ static struct BurnInputInfo Mk2InputList[] = {
|
||||
|
||||
STDINPUTINFO(Mk2)
|
||||
|
||||
static struct BurnInputInfo NbajamInputList[] = {
|
||||
{ "P1 Coin", BIT_DIGITAL, nTUnitJoy2 + 0, "p1 coin" },
|
||||
{ "P1 Start", BIT_DIGITAL, nTUnitJoy2 + 2, "p1 start" },
|
||||
{ "P1 Up", BIT_DIGITAL, nTUnitJoy1 + 0, "p1 up" },
|
||||
{ "P1 Down", BIT_DIGITAL, nTUnitJoy1 + 1, "p1 down" },
|
||||
{ "P1 Left", BIT_DIGITAL, nTUnitJoy1 + 2, "p1 left" },
|
||||
{ "P1 Right", BIT_DIGITAL, nTUnitJoy1 + 3, "p1 right" },
|
||||
{ "P1 Button 1", BIT_DIGITAL, nTUnitJoy1 + 6, "p1 fire 1" },
|
||||
{ "P1 Button 2", BIT_DIGITAL, nTUnitJoy1 + 4, "p1 fire 2" },
|
||||
{ "P1 Button 3", BIT_DIGITAL, nTUnitJoy1 + 5, "p1 fire 3" },
|
||||
|
||||
{ "P2 Coin", BIT_DIGITAL, nTUnitJoy2 + 1, "p2 coin" },
|
||||
{ "P2 Start", BIT_DIGITAL, nTUnitJoy2 + 5, "p2 start" },
|
||||
{ "P2 Up", BIT_DIGITAL, nTUnitJoy1 + 8, "p2 up" },
|
||||
{ "P2 Down", BIT_DIGITAL, nTUnitJoy1 + 9, "p2 down" },
|
||||
{ "P2 Left", BIT_DIGITAL, nTUnitJoy1 + 10, "p2 left" },
|
||||
{ "P2 Right", BIT_DIGITAL, nTUnitJoy1 + 11, "p2 right" },
|
||||
{ "P2 Button 1", BIT_DIGITAL, nTUnitJoy1 + 14, "p2 fire 1" },
|
||||
{ "P2 Button 2", BIT_DIGITAL, nTUnitJoy1 + 12, "p2 fire 2" },
|
||||
{ "P2 Button 3", BIT_DIGITAL, nTUnitJoy1 + 13, "p2 fire 3" },
|
||||
|
||||
{ "P3 Coin", BIT_DIGITAL, nTUnitJoy2 + 7, "p3 coin" },
|
||||
{ "P3 Start", BIT_DIGITAL, nTUnitJoy2 + 9, "p3 start" },
|
||||
{ "P3 Up", BIT_DIGITAL, nTUnitJoy3 + 0, "p3 up" },
|
||||
{ "P3 Down", BIT_DIGITAL, nTUnitJoy3 + 1, "p3 down" },
|
||||
{ "P3 Left", BIT_DIGITAL, nTUnitJoy3 + 2, "p3 left" },
|
||||
{ "P3 Right", BIT_DIGITAL, nTUnitJoy3 + 3, "p3 right" },
|
||||
{ "P3 Button 1", BIT_DIGITAL, nTUnitJoy3 + 6, "p3 fire 1" },
|
||||
{ "P3 Button 2", BIT_DIGITAL, nTUnitJoy3 + 4, "p3 fire 2" },
|
||||
{ "P3 Button 3", BIT_DIGITAL, nTUnitJoy3 + 5, "p3 fire 3" },
|
||||
|
||||
{ "P4 Coin", BIT_DIGITAL, nTUnitJoy2 + 8, "p4 coin" },
|
||||
{ "P4 Start", BIT_DIGITAL, nTUnitJoy2 + 10, "p4 start" },
|
||||
{ "P4 Up", BIT_DIGITAL, nTUnitJoy3 + 8, "p4 up" },
|
||||
{ "P4 Down", BIT_DIGITAL, nTUnitJoy3 + 9, "p4 down" },
|
||||
{ "P4 Left", BIT_DIGITAL, nTUnitJoy3 + 10, "p4 left" },
|
||||
{ "P4 Right", BIT_DIGITAL, nTUnitJoy3 + 11, "p4 right" },
|
||||
{ "P4 Button 1", BIT_DIGITAL, nTUnitJoy3+ 14, "p4 fire 1" },
|
||||
{ "P4 Button 2", BIT_DIGITAL, nTUnitJoy3 + 12, "p4 fire 2" },
|
||||
{ "P4 Button 3", BIT_DIGITAL, nTUnitJoy3 + 13, "p4 fire 3" },
|
||||
|
||||
{ "Reset", BIT_DIGITAL, &nTUnitReset, "reset" },
|
||||
{ "Service", BIT_DIGITAL, nTUnitJoy2 + 6, "service" },
|
||||
{ "Service Mode", BIT_DIGITAL, nTUnitJoy2 + 4, "diag" },
|
||||
{ "Tilt", BIT_DIGITAL, nTUnitJoy2 + 3, "tilt" },
|
||||
{ "Volume Down", BIT_DIGITAL, nTUnitJoy2 + 11, "p1 fire 7" },
|
||||
{ "Volume Up", BIT_DIGITAL, nTUnitJoy2 + 12, "p1 fire 8" },
|
||||
{ "Dip A", BIT_DIPSWITCH, nTUnitDSW + 0, "dip" },
|
||||
{ "Dip B", BIT_DIPSWITCH, nTUnitDSW + 1, "dip" },
|
||||
};
|
||||
|
||||
STDINPUTINFO(Nbajam)
|
||||
|
||||
static struct BurnDIPInfo MkDIPList[]=
|
||||
{
|
||||
{0x1e, 0xff, 0xff, 0x7d, NULL },
|
||||
@ -218,29 +271,79 @@ static struct BurnDIPInfo Mk2DIPList[]=
|
||||
|
||||
STDDIPINFO(Mk2)
|
||||
|
||||
static struct BurnDIPInfo NbajamDIPList[]=
|
||||
{
|
||||
{0x2a, 0xff, 0xff, 0xfd, NULL },
|
||||
{0x2b, 0xff, 0xff, 0x7f, NULL },
|
||||
|
||||
{0 , 0xfe, 0 , 2, "Test Switch" },
|
||||
{0x2a, 0x01, 0x01, 0x01, "Off" },
|
||||
{0x2a, 0x01, 0x01, 0x00, "On" },
|
||||
|
||||
{0 , 0xfe, 0 , 2, "Powerup Test" },
|
||||
{0x2a, 0x01, 0x02, 0x00, "Off" },
|
||||
{0x2a, 0x01, 0x02, 0x02, "On" },
|
||||
|
||||
{0 , 0xfe, 0 , 2, "Video" },
|
||||
{0x2a, 0x01, 0x20, 0x00, "Skip" },
|
||||
{0x2a, 0x01, 0x20, 0x20, "Show" },
|
||||
|
||||
{0 , 0xfe, 0 , 2, "Validator" },
|
||||
{0x2a, 0x01, 0x40, 0x00, "Installed" },
|
||||
{0x2a, 0x01, 0x40, 0x40, "Not Present" },
|
||||
|
||||
{0 , 0xfe, 0 , 2, "Players" },
|
||||
{0x2a, 0x01, 0x80, 0x00, "2" },
|
||||
{0x2a, 0x01, 0x80, 0x80, "4" },
|
||||
|
||||
{0 , 0xfe, 0 , 3, "Coin Counters" },
|
||||
{0x2b, 0x01, 0x03, 0x03, "" },
|
||||
{0x2b, 0x01, 0x03, 0x02, "1 Counter, Totalizing" },
|
||||
{0x2b, 0x01, 0x03, 0x01, "2 Counters, 1 count/coin" },
|
||||
|
||||
{0 , 0xfe, 0 , 3, "Country" },
|
||||
{0x2b, 0x01, 0x0c, 0x0c, "USA" },
|
||||
{0x2b, 0x01, 0x0c, 0x08, "French" },
|
||||
{0x2b, 0x01, 0x0c, 0x04, "German" },
|
||||
|
||||
{0 , 0xfe, 0 , 6, "Coinage" },
|
||||
{0x2b, 0x01, 0x70, 0x70, "1" },
|
||||
{0x2b, 0x01, 0x70, 0x30, "2" },
|
||||
{0x2b, 0x01, 0x70, 0x50, "3" },
|
||||
{0x2b, 0x01, 0x70, 0x10, "4" },
|
||||
{0x2b, 0x01, 0x70, 0x60, "ECA" },
|
||||
{0x2b, 0x01, 0x70, 0x00, "Free Play" },
|
||||
|
||||
{0 , 0xfe, 0 , 2, "Coinage Source" },
|
||||
{0x2b, 0x01, 0x80, 0x80, "Dipswitch" },
|
||||
{0x2b, 0x01, 0x80, 0x00, "CMOS" },
|
||||
};
|
||||
|
||||
STDDIPINFO(Nbajam)
|
||||
|
||||
static struct BurnRomInfo mkRomDesc[] = {
|
||||
{ "mkt-uj12.bin", 0x080000, 0xf4990bf2, 1 | BRF_PRG | BRF_ESS }, // 0 TMS34010
|
||||
{ "mkt-ug12.bin", 0x080000, 0xb06aeac1, 1 | BRF_PRG | BRF_ESS }, // 1
|
||||
|
||||
{ "sl1_mortal_kombat_u12_sound_rom.u12", 0x040000, 0x258bd7f9, 2 | BRF_PRG | BRF_ESS }, // 2 ADPCM sound banks
|
||||
{ "sl1_mortal_kombat_u13_sound_rom.u13", 0x040000, 0x7b7ec3b6, 2 | BRF_PRG | BRF_ESS }, // 3
|
||||
|
||||
{ "mkt-ug14.bin", 0x080000, 0x9e00834e, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 0) }, // 4 GFX
|
||||
{ "mkt-uj14.bin", 0x080000, 0xf4b0aaa7, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 1) }, // 5
|
||||
{ "mkt-ug19.bin", 0x080000, 0x2d8c7ba1, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 2) }, // 6
|
||||
{ "mkt-uj19.bin", 0x080000, 0x33b9b7a4, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 3) }, // 7
|
||||
|
||||
{ "mkt-ug16.bin", 0x080000, 0x52c9d1e5, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x02, 0) }, // 8
|
||||
{ "mkt-uj16.bin", 0x080000, 0xc94c58cf, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x02, 1) }, // 9
|
||||
{ "mkt-ug20.bin", 0x080000, 0x2f7e55d3, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x02, 2) }, // 10
|
||||
{ "mkt-uj20.bin", 0x080000, 0xeae96df0, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x02, 3) }, // 11
|
||||
|
||||
{ "mkt-ug17.bin", 0x080000, 0xe34fe253, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 0) }, // 12
|
||||
{ "mkt-uj17.bin", 0x080000, 0xa56e12f5, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 1) }, // 13
|
||||
{ "mkt-ug22.bin", 0x080000, 0xb537bb4e, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 2) }, // 14
|
||||
{ "mkt-uj22.bin", 0x080000, 0x5e12523b, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 3) }, // 15
|
||||
{ "sl1_mortal_kombat_u3_sound_rom.u3", 0x040000, 0xc615844c, 4 | BRF_PRG | BRF_ESS }, // 2 Sound CPU
|
||||
|
||||
{ "sl1_mortal_kombat_u3_sound_rom.u3", 0x040000, 0xc615844c, 4 | BRF_PRG | BRF_ESS }, // 16 Sound CPU
|
||||
{ "sl1_mortal_kombat_u12_sound_rom.u12", 0x040000, 0x258bd7f9, 2 | BRF_PRG | BRF_ESS }, // 3 ADPCM sound banks
|
||||
{ "sl1_mortal_kombat_u13_sound_rom.u13", 0x040000, 0x7b7ec3b6, 2 | BRF_PRG | BRF_ESS }, // 4
|
||||
|
||||
{ "mkt-ug14.bin", 0x080000, 0x9e00834e, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 0) }, // 5 GFX
|
||||
{ "mkt-uj14.bin", 0x080000, 0xf4b0aaa7, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 1) }, // 6
|
||||
{ "mkt-ug19.bin", 0x080000, 0x2d8c7ba1, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 2) }, // 7
|
||||
{ "mkt-uj19.bin", 0x080000, 0x33b9b7a4, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 3) }, // 8
|
||||
|
||||
{ "mkt-ug16.bin", 0x080000, 0x52c9d1e5, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x02, 0) }, // 9
|
||||
{ "mkt-uj16.bin", 0x080000, 0xc94c58cf, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x02, 1) }, // 10
|
||||
{ "mkt-ug20.bin", 0x080000, 0x2f7e55d3, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x02, 2) }, // 11
|
||||
{ "mkt-uj20.bin", 0x080000, 0xeae96df0, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x02, 3) }, // 12
|
||||
|
||||
{ "mkt-ug17.bin", 0x080000, 0xe34fe253, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 0) }, // 13
|
||||
{ "mkt-uj17.bin", 0x080000, 0xa56e12f5, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 1) }, // 14
|
||||
{ "mkt-ug22.bin", 0x080000, 0xb537bb4e, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 2) }, // 15
|
||||
{ "mkt-uj22.bin", 0x080000, 0x5e12523b, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 3) }, // 16
|
||||
};
|
||||
|
||||
STD_ROM_PICK(mk)
|
||||
@ -255,39 +358,122 @@ static INT32 MkInit()
|
||||
|
||||
struct BurnDriverD BurnDrvMk = {
|
||||
"mk", NULL, NULL, NULL, "1992",
|
||||
"Mortal Kombat (rev 5.0 T-Unit 03/19/93)\0", NULL, "Midway", "MIDWAY T-Unit",
|
||||
"Mortal Kombat (rev 5.0 T-Unit 03/19/93)\0", NULL, "Midway", "Midway T-Unit",
|
||||
NULL, NULL, NULL, NULL,
|
||||
BDF_GAME_WORKING | BDF_16BIT_ONLY, 2, HARDWARE_MIDWAY_TUNIT, GBF_MISC, 0,
|
||||
BDF_GAME_WORKING, 2, HARDWARE_MIDWAY_TUNIT, GBF_MISC, 0,
|
||||
NULL, mkRomInfo, mkRomName, NULL, NULL, MkInputInfo, MkDIPInfo,
|
||||
MkInit, TUnitExit, TUnitFrame, TUnitDraw, TUnitScan, &nTUnitRecalc, 0x8000,
|
||||
400, 254, 4, 3
|
||||
};
|
||||
|
||||
static struct BurnRomInfo mk2RomDesc[] = {
|
||||
{ "uj12.l31", 0x080000, 0xcf100a75, 1 | BRF_PRG | BRF_ESS }, // 0 TMS34010
|
||||
{ "ug12.l31", 0x080000, 0x582c7dfd, 1 | BRF_PRG | BRF_ESS }, // 1
|
||||
static struct BurnRomInfo mkr4RomDesc[] = {
|
||||
{ "mkr4uj12.bin", 0x080000, 0xa1b6635a, 1 | BRF_PRG | BRF_ESS }, // 0 TMS34010
|
||||
{ "mkr4ug12.bin", 0x080000, 0xaa94f7ea, 1 | BRF_PRG | BRF_ESS }, // 1
|
||||
|
||||
{ "su2.l1", 0x080000, 0x5f23d71d, 2 | BRF_PRG | BRF_ESS }, // 2 DCS sound banks
|
||||
{ "su3.l1", 0x080000, 0xd6d92bf9, 2 | BRF_PRG | BRF_ESS }, // 3
|
||||
{ "su4.l1", 0x080000, 0xeebc8e0f, 2 | BRF_PRG | BRF_ESS }, // 4
|
||||
{ "su5.l1", 0x080000, 0x2b0b7961, 2 | BRF_PRG | BRF_ESS }, // 5
|
||||
{ "su6.l1", 0x080000, 0xf694b27f, 2 | BRF_PRG | BRF_ESS }, // 6
|
||||
{ "su7.l1", 0x080000, 0x20387e0a, 2 | BRF_PRG | BRF_ESS }, // 7
|
||||
{ "sl1_mortal_kombat_u3_sound_rom.u3", 0x040000, 0xc615844c, 4 | BRF_PRG | BRF_ESS }, // 2 Sound CPU
|
||||
|
||||
{ "sl1_mortal_kombat_u12_sound_rom.u12", 0x040000, 0x258bd7f9, 2 | BRF_PRG | BRF_ESS }, // 3 ADPCM sound banks
|
||||
{ "sl1_mortal_kombat_u13_sound_rom.u13", 0x040000, 0x7b7ec3b6, 2 | BRF_PRG | BRF_ESS }, // 4
|
||||
|
||||
{ "ug14-vid", 0x100000, 0x01e73af6, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 0) }, // 8 GFX
|
||||
{ "uj14-vid", 0x100000, 0xd4985cbb, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 1) }, // 9
|
||||
{ "ug19-vid", 0x100000, 0xfec137be, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 2) }, // 10
|
||||
{ "uj19-vid", 0x100000, 0x2d763156, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 3) }, // 11
|
||||
{ "mkt-ug14.bin", 0x080000, 0x9e00834e, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 0) }, // 5 GFX
|
||||
{ "mkt-uj14.bin", 0x080000, 0xf4b0aaa7, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 1) }, // 6
|
||||
{ "mkt-ug19.bin", 0x080000, 0x2d8c7ba1, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 2) }, // 7
|
||||
{ "mkt-uj19.bin", 0x080000, 0x33b9b7a4, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 3) }, // 8
|
||||
|
||||
{ "ug16-vid", 0x100000, 0x8ba6ae18, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 0) }, // 12
|
||||
{ "uj16-vid", 0x100000, 0x39d885b4, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 1) }, // 13
|
||||
{ "ug20-vid", 0x100000, 0x809118c1, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 2) }, // 14
|
||||
{ "uj20-vid", 0x100000, 0xb96824f0, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 3) }, // 15
|
||||
{ "mkt-ug16.bin", 0x080000, 0x52c9d1e5, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x02, 0) }, // 9
|
||||
{ "mkt-uj16.bin", 0x080000, 0xc94c58cf, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x02, 1) }, // 10
|
||||
{ "mkt-ug20.bin", 0x080000, 0x2f7e55d3, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x02, 2) }, // 11
|
||||
{ "mkt-uj20.bin", 0x080000, 0xeae96df0, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x02, 3) }, // 12
|
||||
|
||||
{ "ug17-vid", 0x100000, 0x937d8620, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 0) }, // 16
|
||||
{ "uj17-vid", 0x100000, 0x218de160, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 1) }, // 17
|
||||
{ "ug22-vid", 0x100000, 0x154d53b1, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 2) }, // 18
|
||||
{ "uj22-vid", 0x100000, 0x8891d785, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 3) }, // 19
|
||||
{ "mkt-ug17.bin", 0x080000, 0xe34fe253, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 0) }, // 13
|
||||
{ "mkt-uj17.bin", 0x080000, 0xa56e12f5, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 1) }, // 14
|
||||
{ "mkt-ug22.bin", 0x080000, 0xb537bb4e, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 2) }, // 15
|
||||
{ "mkt-uj22.bin", 0x080000, 0x5e12523b, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 3) }, // 16
|
||||
};
|
||||
|
||||
STD_ROM_PICK(mkr4)
|
||||
STD_ROM_FN(mkr4)
|
||||
|
||||
struct BurnDriverD BurnDrvMkr4 = {
|
||||
"mkr4", "mk", NULL, NULL, "1992",
|
||||
"Mortal Kombat (rev 4.0 T-Unit 02/11/93)\0", NULL, "Midway", "Midway T-Unit",
|
||||
NULL, NULL, NULL, NULL,
|
||||
BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MIDWAY_TUNIT, GBF_MISC, 0,
|
||||
NULL, mkr4RomInfo, mkr4RomName, NULL, NULL, MkInputInfo, MkDIPInfo,
|
||||
MkInit, TUnitExit, TUnitFrame, TUnitDraw, TUnitScan, &nTUnitRecalc, 0x8000,
|
||||
400, 254, 4, 3
|
||||
};
|
||||
|
||||
static struct BurnRomInfo mkturboRomDesc[] = {
|
||||
{ "kombo-rom-uj-12.bin", 0x080000, 0x7a441f2d, 1 | BRF_PRG | BRF_ESS }, // 0 TMS34010
|
||||
{ "kombo-rom-ug-12.bin", 0x080000, 0x45bed5a1, 1 | BRF_PRG | BRF_ESS }, // 1
|
||||
|
||||
{ "sl1_mortal_kombat_u3_sound_rom.u3", 0x040000, 0xc615844c, 4 | BRF_PRG | BRF_ESS }, // 2 Sound CPU
|
||||
|
||||
{ "sl1_mortal_kombat_u12_sound_rom.u12", 0x040000, 0x258bd7f9, 2 | BRF_PRG | BRF_ESS }, // 3 ADPCM sound banks
|
||||
{ "sl1_mortal_kombat_u13_sound_rom.u13", 0x040000, 0x7b7ec3b6, 2 | BRF_PRG | BRF_ESS }, // 4
|
||||
|
||||
{ "mkt-ug14.bin", 0x080000, 0x9e00834e, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 0) }, // 5 GFX
|
||||
{ "mkt-uj14.bin", 0x080000, 0xf4b0aaa7, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 1) }, // 6
|
||||
{ "mkt-ug19.bin", 0x080000, 0x2d8c7ba1, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 2) }, // 7
|
||||
{ "mkt-uj19.bin", 0x080000, 0x33b9b7a4, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 3) }, // 8
|
||||
|
||||
{ "mkt-ug16.bin", 0x080000, 0x52c9d1e5, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x02, 0) }, // 9
|
||||
{ "mkt-uj16.bin", 0x080000, 0xc94c58cf, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x02, 1) }, // 10
|
||||
{ "mkt-ug20.bin", 0x080000, 0x2f7e55d3, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x02, 2) }, // 11
|
||||
{ "mkt-uj20.bin", 0x080000, 0xeae96df0, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x02, 3) }, // 12
|
||||
|
||||
{ "mkt-ug17.bin", 0x080000, 0xe34fe253, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 0) }, // 13
|
||||
{ "mkt-uj17.bin", 0x080000, 0xa56e12f5, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 1) }, // 14
|
||||
{ "mkt-ug22.bin", 0x080000, 0xb537bb4e, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 2) }, // 15
|
||||
{ "mkt-uj22.bin", 0x080000, 0x5e12523b, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 3) }, // 16
|
||||
};
|
||||
|
||||
STD_ROM_PICK(mkturbo)
|
||||
STD_ROM_FN(mkturbo)
|
||||
|
||||
static INT32 MkTurboInit()
|
||||
{
|
||||
TUnitIsMKTurbo = 1;
|
||||
|
||||
return MkInit();
|
||||
}
|
||||
|
||||
struct BurnDriverD BurnDrvMkturbo = {
|
||||
"mkturbo", "mk", NULL, NULL, "1992",
|
||||
"Mortal Kombat (Turbo Ninja T-Unit 03/19/93, hack)\0", NULL, "Hack", "Midway T-Unit",
|
||||
NULL, NULL, NULL, NULL,
|
||||
BDF_GAME_WORKING | BDF_CLONE | BDF_HACK, 2, HARDWARE_MIDWAY_TUNIT, GBF_MISC, 0,
|
||||
NULL, mkturboRomInfo, mkturboRomName, NULL, NULL, MkInputInfo, MkDIPInfo,
|
||||
MkTurboInit, TUnitExit, TUnitFrame, TUnitDraw, TUnitScan, &nTUnitRecalc, 0x8000,
|
||||
400, 254, 4, 3
|
||||
};
|
||||
|
||||
static struct BurnRomInfo mk2RomDesc[] = {
|
||||
{ "l3.1_mortal_kombat_ii_game_rom_uj12.uj12", 0x080000, 0xcf100a75, 1 | BRF_PRG | BRF_ESS }, // 0 TMS34010
|
||||
{ "l3.1_mortal_kombat_ii_game_rom_ug12.ug12", 0x080000, 0x582c7dfd, 1 | BRF_PRG | BRF_ESS }, // 1
|
||||
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u2.u2", 0x080000, 0x5f23d71d, 2 | BRF_PRG | BRF_ESS }, // 2 DCS sound banks
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u3.u3", 0x080000, 0xd6d92bf9, 2 | BRF_PRG | BRF_ESS }, // 3
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u4.u4", 0x080000, 0xeebc8e0f, 2 | BRF_PRG | BRF_ESS }, // 4
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u5.u5", 0x080000, 0x2b0b7961, 2 | BRF_PRG | BRF_ESS }, // 5
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u6.u6", 0x080000, 0xf694b27f, 2 | BRF_PRG | BRF_ESS }, // 6
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u7.u7", 0x080000, 0x20387e0a, 2 | BRF_PRG | BRF_ESS }, // 7
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug14.ug14", 0x100000, 0x01e73af6, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 0) }, // 8 GFX
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj14.uj14", 0x100000, 0xd4985cbb, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 1) }, // 9
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug19.ug19", 0x100000, 0xfec137be, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 2) }, // 10
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj19.uj19", 0x100000, 0x2d763156, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 3) }, // 11
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug16.ug16", 0x100000, 0x8ba6ae18, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 0) }, // 12
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj16.uj16", 0x100000, 0x39d885b4, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 1) }, // 13
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug20.ug20", 0x100000, 0x809118c1, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 2) }, // 14
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj20.uj20", 0x100000, 0xb96824f0, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 3) }, // 15
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug17.ug17", 0x100000, 0x937d8620, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 0) }, // 16
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj17.uj17", 0x100000, 0x218de160, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 1) }, // 17
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug22.ug22", 0x100000, 0x154d53b1, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 2) }, // 18
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj22.uj22", 0x100000, 0x8891d785, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 3) }, // 19
|
||||
};
|
||||
|
||||
STD_ROM_PICK(mk2)
|
||||
@ -302,10 +488,460 @@ static INT32 Mk2Init()
|
||||
|
||||
struct BurnDriverD BurnDrvMk2 = {
|
||||
"mk2", NULL, NULL, NULL, "1993",
|
||||
"Mortal Kombat II (rev L3.1)\0", NULL, "Midway", "MIDWAY T-Unit",
|
||||
"Mortal Kombat II (rev L3.1)\0", NULL, "Midway", "Midway T-Unit",
|
||||
NULL, NULL, NULL, NULL,
|
||||
BDF_GAME_WORKING | BDF_16BIT_ONLY, 2, HARDWARE_MIDWAY_TUNIT, GBF_MISC, 0,
|
||||
BDF_GAME_WORKING, 2, HARDWARE_MIDWAY_TUNIT, GBF_MISC, 0,
|
||||
NULL, mk2RomInfo, mk2RomName, NULL, NULL, Mk2InputInfo, Mk2DIPInfo,
|
||||
Mk2Init, TUnitExit, TUnitFrame, TUnitDraw, TUnitScan, &nTUnitRecalc, 0x8000,
|
||||
400, 254, 4, 3
|
||||
};
|
||||
|
||||
static struct BurnRomInfo mk2r32eRomDesc[] = {
|
||||
{ "uj12.l32e", 0x080000, 0x43f773a6, 1 | BRF_PRG | BRF_ESS }, // 0 TMS34010
|
||||
{ "ug12.l32e", 0x080000, 0xdcde9619, 1 | BRF_PRG | BRF_ESS }, // 1
|
||||
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u2.u2", 0x080000, 0x5f23d71d, 2 | BRF_PRG | BRF_ESS }, // 2 DCS sound banks
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u3.u3", 0x080000, 0xd6d92bf9, 2 | BRF_PRG | BRF_ESS }, // 3
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u4.u4", 0x080000, 0xeebc8e0f, 2 | BRF_PRG | BRF_ESS }, // 4
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u5.u5", 0x080000, 0x2b0b7961, 2 | BRF_PRG | BRF_ESS }, // 5
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u6.u6", 0x080000, 0xf694b27f, 2 | BRF_PRG | BRF_ESS }, // 6
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u7.u7", 0x080000, 0x20387e0a, 2 | BRF_PRG | BRF_ESS }, // 7
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug14.ug14", 0x100000, 0x01e73af6, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 0) }, // 8 GFX
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj14.uj14", 0x100000, 0xd4985cbb, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 1) }, // 9
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug19.ug19", 0x100000, 0xfec137be, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 2) }, // 10
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj19.uj19", 0x100000, 0x2d763156, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 3) }, // 11
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug16.ug16", 0x100000, 0x8ba6ae18, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 0) }, // 12
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj16.uj16", 0x100000, 0x39d885b4, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 1) }, // 13
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug20.ug20", 0x100000, 0x809118c1, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 2) }, // 14
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj20.uj20", 0x100000, 0xb96824f0, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 3) }, // 15
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug17.ug17", 0x100000, 0x937d8620, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 0) }, // 16
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj17.uj17", 0x100000, 0x218de160, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 1) }, // 17
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug22.ug22", 0x100000, 0x154d53b1, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 2) }, // 18
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj22.uj22", 0x100000, 0x8891d785, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 3) }, // 19
|
||||
};
|
||||
|
||||
STD_ROM_PICK(mk2r32e)
|
||||
STD_ROM_FN(mk2r32e)
|
||||
|
||||
struct BurnDriverD BurnDrvMk2r32e = {
|
||||
"mk2r32e", "mk2", NULL, NULL, "1993",
|
||||
"Mortal Kombat II (rev L3.2 (European))\0", NULL, "Midway", "Midway T-Unit",
|
||||
NULL, NULL, NULL, NULL,
|
||||
BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MIDWAY_TUNIT, GBF_MISC, 0,
|
||||
NULL, mk2r32eRomInfo, mk2r32eRomName, NULL, NULL, Mk2InputInfo, Mk2DIPInfo,
|
||||
Mk2Init, TUnitExit, TUnitFrame, TUnitDraw, TUnitScan, &nTUnitRecalc, 0x8000,
|
||||
400, 254, 4, 3
|
||||
};
|
||||
|
||||
static struct BurnRomInfo mk2r31eRomDesc[] = {
|
||||
{ "uj12.l31e", 0x080000, 0xf64306d1, 1 | BRF_PRG | BRF_ESS }, // 0 TMS34010
|
||||
{ "ug12.l31e", 0x080000, 0x4adeae7e, 1 | BRF_PRG | BRF_ESS }, // 1
|
||||
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u2.u2", 0x080000, 0x5f23d71d, 2 | BRF_PRG | BRF_ESS }, // 2 DCS sound banks
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u3.u3", 0x080000, 0xd6d92bf9, 2 | BRF_PRG | BRF_ESS }, // 3
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u4.u4", 0x080000, 0xeebc8e0f, 2 | BRF_PRG | BRF_ESS }, // 4
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u5.u5", 0x080000, 0x2b0b7961, 2 | BRF_PRG | BRF_ESS }, // 5
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u6.u6", 0x080000, 0xf694b27f, 2 | BRF_PRG | BRF_ESS }, // 6
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u7.u7", 0x080000, 0x20387e0a, 2 | BRF_PRG | BRF_ESS }, // 7
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug14.ug14", 0x100000, 0x01e73af6, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 0) }, // 8 GFX
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj14.uj14", 0x100000, 0xd4985cbb, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 1) }, // 9
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug19.ug19", 0x100000, 0xfec137be, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 2) }, // 10
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj19.uj19", 0x100000, 0x2d763156, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 3) }, // 11
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug16.ug16", 0x100000, 0x8ba6ae18, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 0) }, // 12
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj16.uj16", 0x100000, 0x39d885b4, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 1) }, // 13
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug20.ug20", 0x100000, 0x809118c1, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 2) }, // 14
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj20.uj20", 0x100000, 0xb96824f0, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 3) }, // 15
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug17.ug17", 0x100000, 0x937d8620, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 0) }, // 16
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj17.uj17", 0x100000, 0x218de160, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 1) }, // 17
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug22.ug22", 0x100000, 0x154d53b1, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 2) }, // 18
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj22.uj22", 0x100000, 0x8891d785, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 3) }, // 19
|
||||
};
|
||||
|
||||
STD_ROM_PICK(mk2r31e)
|
||||
STD_ROM_FN(mk2r31e)
|
||||
|
||||
struct BurnDriverD BurnDrvMk2r31e = {
|
||||
"mk2r31e", "mk2", NULL, NULL, "1993",
|
||||
"Mortal Kombat II (rev L3.1 (European))\0", NULL, "Midway", "Midway T-Unit",
|
||||
NULL, NULL, NULL, NULL,
|
||||
BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MIDWAY_TUNIT, GBF_MISC, 0,
|
||||
NULL, mk2r31eRomInfo, mk2r31eRomName, NULL, NULL, Mk2InputInfo, Mk2DIPInfo,
|
||||
Mk2Init, TUnitExit, TUnitFrame, TUnitDraw, TUnitScan, &nTUnitRecalc, 0x8000,
|
||||
400, 254, 4, 3
|
||||
};
|
||||
|
||||
static struct BurnRomInfo mk2r30RomDesc[] = {
|
||||
{ "l3_mortal_kombat_ii_game_rom_uj12.uj12.l30", 0x080000, 0x93440895, 1 | BRF_PRG | BRF_ESS }, // 0 TMS34010
|
||||
{ "l3_mortal_kombat_ii_game_rom_ug12.ug12.l30", 0x080000, 0x6153c2d8, 1 | BRF_PRG | BRF_ESS }, // 1
|
||||
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u2.u2", 0x080000, 0x5f23d71d, 2 | BRF_PRG | BRF_ESS }, // 2 DCS sound banks
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u3.u3", 0x080000, 0xd6d92bf9, 2 | BRF_PRG | BRF_ESS }, // 3
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u4.u4", 0x080000, 0xeebc8e0f, 2 | BRF_PRG | BRF_ESS }, // 4
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u5.u5", 0x080000, 0x2b0b7961, 2 | BRF_PRG | BRF_ESS }, // 5
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u6.u6", 0x080000, 0xf694b27f, 2 | BRF_PRG | BRF_ESS }, // 6
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u7.u7", 0x080000, 0x20387e0a, 2 | BRF_PRG | BRF_ESS }, // 7
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug14.ug14", 0x100000, 0x01e73af6, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 0) }, // 8 GFX
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj14.uj14", 0x100000, 0xd4985cbb, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 1) }, // 9
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug19.ug19", 0x100000, 0xfec137be, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 2) }, // 10
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj19.uj19", 0x100000, 0x2d763156, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 3) }, // 11
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug16.ug16", 0x100000, 0x8ba6ae18, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 0) }, // 12
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj16.uj16", 0x100000, 0x39d885b4, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 1) }, // 13
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug20.ug20", 0x100000, 0x809118c1, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 2) }, // 14
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj20.uj20", 0x100000, 0xb96824f0, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 3) }, // 15
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug17.ug17", 0x100000, 0x937d8620, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 0) }, // 16
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj17.uj17", 0x100000, 0x218de160, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 1) }, // 17
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug22.ug22", 0x100000, 0x154d53b1, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 2) }, // 18
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj22.uj22", 0x100000, 0x8891d785, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 3) }, // 19
|
||||
};
|
||||
|
||||
STD_ROM_PICK(mk2r30)
|
||||
STD_ROM_FN(mk2r30)
|
||||
|
||||
struct BurnDriverD BurnDrvMk2r30 = {
|
||||
"mk2r30", "mk2", NULL, NULL, "1993",
|
||||
"Mortal Kombat II (rev L3.0)\0", NULL, "Midway", "Midway T-Unit",
|
||||
NULL, NULL, NULL, NULL,
|
||||
BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MIDWAY_TUNIT, GBF_MISC, 0,
|
||||
NULL, mk2r30RomInfo, mk2r30RomName, NULL, NULL, Mk2InputInfo, Mk2DIPInfo,
|
||||
Mk2Init, TUnitExit, TUnitFrame, TUnitDraw, TUnitScan, &nTUnitRecalc, 0x8000,
|
||||
400, 254, 4, 3
|
||||
};
|
||||
|
||||
static struct BurnRomInfo mk2r21RomDesc[] = {
|
||||
{ "l2.1_mortal_kombat_ii_game_rom_uj12.uj12", 0x080000, 0xd6a35699, 1 | BRF_PRG | BRF_ESS }, // 0 TMS34010
|
||||
{ "l2.1_mortal_kombat_ii_game_rom_ug12.ug12", 0x080000, 0xaeb703ff, 1 | BRF_PRG | BRF_ESS }, // 1
|
||||
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u2.u2", 0x080000, 0x5f23d71d, 2 | BRF_PRG | BRF_ESS }, // 2 DCS sound banks
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u3.u3", 0x080000, 0xd6d92bf9, 2 | BRF_PRG | BRF_ESS }, // 3
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u4.u4", 0x080000, 0xeebc8e0f, 2 | BRF_PRG | BRF_ESS }, // 4
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u5.u5", 0x080000, 0x2b0b7961, 2 | BRF_PRG | BRF_ESS }, // 5
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u6.u6", 0x080000, 0xf694b27f, 2 | BRF_PRG | BRF_ESS }, // 6
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u7.u7", 0x080000, 0x20387e0a, 2 | BRF_PRG | BRF_ESS }, // 7
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug14.ug14", 0x100000, 0x01e73af6, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 0) }, // 8 GFX
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj14.uj14", 0x100000, 0xd4985cbb, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 1) }, // 9
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug19.ug19", 0x100000, 0xfec137be, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 2) }, // 10
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj19.uj19", 0x100000, 0x2d763156, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 3) }, // 11
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug16.ug16", 0x100000, 0x8ba6ae18, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 0) }, // 12
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj16.uj16", 0x100000, 0x39d885b4, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 1) }, // 13
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug20.ug20", 0x100000, 0x809118c1, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 2) }, // 14
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj20.uj20", 0x100000, 0xb96824f0, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 3) }, // 15
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug17.ug17", 0x100000, 0x937d8620, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 0) }, // 16
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj17.uj17", 0x100000, 0x218de160, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 1) }, // 17
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug22.ug22", 0x100000, 0x154d53b1, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 2) }, // 18
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj22.uj22", 0x100000, 0x8891d785, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 3) }, // 19
|
||||
};
|
||||
|
||||
STD_ROM_PICK(mk2r21)
|
||||
STD_ROM_FN(mk2r21)
|
||||
|
||||
struct BurnDriverD BurnDrvMk2r21 = {
|
||||
"mk2r21", "mk2", NULL, NULL, "1993",
|
||||
"Mortal Kombat II (rev L2.1)\0", NULL, "Midway", "Midway T-Unit",
|
||||
NULL, NULL, NULL, NULL,
|
||||
BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MIDWAY_TUNIT, GBF_MISC, 0,
|
||||
NULL, mk2r21RomInfo, mk2r21RomName, NULL, NULL, Mk2InputInfo, Mk2DIPInfo,
|
||||
Mk2Init, TUnitExit, TUnitFrame, TUnitDraw, TUnitScan, &nTUnitRecalc, 0x8000,
|
||||
400, 254, 4, 3
|
||||
};
|
||||
|
||||
static struct BurnRomInfo mk2r20RomDesc[] = {
|
||||
{ "l2_mortal_kombat_ii_game_rom_uj12.uj12", 0x080000, 0x72071550, 1 | BRF_PRG | BRF_ESS }, // 0 TMS34010
|
||||
{ "l2_mortal_kombat_ii_game_rom_ug12.ug12", 0x080000, 0x86c3ce65, 1 | BRF_PRG | BRF_ESS }, // 1
|
||||
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u2.u2", 0x080000, 0x5f23d71d, 2 | BRF_PRG | BRF_ESS }, // 2 DCS sound banks
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u3.u3", 0x080000, 0xd6d92bf9, 2 | BRF_PRG | BRF_ESS }, // 3
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u4.u4", 0x080000, 0xeebc8e0f, 2 | BRF_PRG | BRF_ESS }, // 4
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u5.u5", 0x080000, 0x2b0b7961, 2 | BRF_PRG | BRF_ESS }, // 5
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u6.u6", 0x080000, 0xf694b27f, 2 | BRF_PRG | BRF_ESS }, // 6
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u7.u7", 0x080000, 0x20387e0a, 2 | BRF_PRG | BRF_ESS }, // 7
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug14.ug14", 0x100000, 0x01e73af6, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 0) }, // 8 GFX
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj14.uj14", 0x100000, 0xd4985cbb, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 1) }, // 9
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug19.ug19", 0x100000, 0xfec137be, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 2) }, // 10
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj19.uj19", 0x100000, 0x2d763156, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 3) }, // 11
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug16.ug16", 0x100000, 0x8ba6ae18, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 0) }, // 12
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj16.uj16", 0x100000, 0x39d885b4, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 1) }, // 13
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug20.ug20", 0x100000, 0x809118c1, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 2) }, // 14
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj20.uj20", 0x100000, 0xb96824f0, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 3) }, // 15
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug17.ug17", 0x100000, 0x937d8620, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 0) }, // 16
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj17.uj17", 0x100000, 0x218de160, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 1) }, // 17
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug22.ug22", 0x100000, 0x154d53b1, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 2) }, // 18
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj22.uj22", 0x100000, 0x8891d785, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 3) }, // 19
|
||||
};
|
||||
|
||||
STD_ROM_PICK(mk2r20)
|
||||
STD_ROM_FN(mk2r20)
|
||||
|
||||
struct BurnDriverD BurnDrvMk2r20 = {
|
||||
"mk2r20", "mk2", NULL, NULL, "1993",
|
||||
"Mortal Kombat II (rev L2.0)\0", NULL, "Midway", "Midway T-Unit",
|
||||
NULL, NULL, NULL, NULL,
|
||||
BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MIDWAY_TUNIT, GBF_MISC, 0,
|
||||
NULL, mk2r20RomInfo, mk2r20RomName, NULL, NULL, Mk2InputInfo, Mk2DIPInfo,
|
||||
Mk2Init, TUnitExit, TUnitFrame, TUnitDraw, TUnitScan, &nTUnitRecalc, 0x8000,
|
||||
400, 254, 4, 3
|
||||
};
|
||||
|
||||
static struct BurnRomInfo mk2r14RomDesc[] = {
|
||||
{ "l1.4_mortal_kombat_ii_game_rom_uj12.uj12", 0x080000, 0x6d43bc6d, 1 | BRF_PRG | BRF_ESS }, // 0 TMS34010
|
||||
{ "l1.4_mortal_kombat_ii_game_rom_ug12.ug12", 0x080000, 0x42b0da21, 1 | BRF_PRG | BRF_ESS }, // 1
|
||||
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u2.u2", 0x080000, 0x5f23d71d, 2 | BRF_PRG | BRF_ESS }, // 2 DCS sound banks
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u3.u3", 0x080000, 0xd6d92bf9, 2 | BRF_PRG | BRF_ESS }, // 3
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u4.u4", 0x080000, 0xeebc8e0f, 2 | BRF_PRG | BRF_ESS }, // 4
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u5.u5", 0x080000, 0x2b0b7961, 2 | BRF_PRG | BRF_ESS }, // 5
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u6.u6", 0x080000, 0xf694b27f, 2 | BRF_PRG | BRF_ESS }, // 6
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u7.u7", 0x080000, 0x20387e0a, 2 | BRF_PRG | BRF_ESS }, // 7
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug14.ug14", 0x100000, 0x01e73af6, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 0) }, // 8 GFX
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj14.uj14", 0x100000, 0xd4985cbb, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 1) }, // 9
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug19.ug19", 0x100000, 0xfec137be, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 2) }, // 10
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj19.uj19", 0x100000, 0x2d763156, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 3) }, // 11
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug16.ug16", 0x100000, 0x8ba6ae18, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 0) }, // 12
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj16.uj16", 0x100000, 0x39d885b4, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 1) }, // 13
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug20.ug20", 0x100000, 0x809118c1, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 2) }, // 14
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj20.uj20", 0x100000, 0xb96824f0, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 3) }, // 15
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug17.ug17", 0x100000, 0x937d8620, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 0) }, // 16
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj17.uj17", 0x100000, 0x218de160, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 1) }, // 17
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug22.ug22", 0x100000, 0x154d53b1, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 2) }, // 18
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj22.uj22", 0x100000, 0x8891d785, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 3) }, // 19
|
||||
};
|
||||
|
||||
STD_ROM_PICK(mk2r14)
|
||||
STD_ROM_FN(mk2r14)
|
||||
|
||||
struct BurnDriverD BurnDrvMk2r14 = {
|
||||
"mk2r14", "mk2", NULL, NULL, "1993",
|
||||
"Mortal Kombat II (rev L1.4)\0", NULL, "Midway", "Midway T-Unit",
|
||||
NULL, NULL, NULL, NULL,
|
||||
BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_MIDWAY_TUNIT, GBF_MISC, 0,
|
||||
NULL, mk2r14RomInfo, mk2r14RomName, NULL, NULL, Mk2InputInfo, Mk2DIPInfo,
|
||||
Mk2Init, TUnitExit, TUnitFrame, TUnitDraw, TUnitScan, &nTUnitRecalc, 0x8000,
|
||||
400, 254, 4, 3
|
||||
};
|
||||
|
||||
static struct BurnRomInfo mk2r11RomDesc[] = {
|
||||
{ "l1.1_mortal_kombat_ii_game_rom_uj12.uj12", 0x080000, 0x01daff19, 1 | BRF_PRG | BRF_ESS }, // 0 TMS34010
|
||||
{ "l1.1_mortal_kombat_ii_game_rom_ug12.ug12", 0x080000, 0x54042eb7, 1 | BRF_PRG | BRF_ESS }, // 1
|
||||
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u2.u2", 0x080000, 0x5f23d71d, 2 | BRF_PRG | BRF_ESS }, // 2 DCS sound banks
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u3.u3", 0x080000, 0xd6d92bf9, 2 | BRF_PRG | BRF_ESS }, // 3
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u4.u4", 0x080000, 0xeebc8e0f, 2 | BRF_PRG | BRF_ESS }, // 4
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u5.u5", 0x080000, 0x2b0b7961, 2 | BRF_PRG | BRF_ESS }, // 5
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u6.u6", 0x080000, 0xf694b27f, 2 | BRF_PRG | BRF_ESS }, // 6
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u7.u7", 0x080000, 0x20387e0a, 2 | BRF_PRG | BRF_ESS }, // 7
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug14.ug14", 0x100000, 0x01e73af6, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 0) }, // 8 GFX
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj14.uj14", 0x100000, 0xd4985cbb, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 1) }, // 9
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug19.ug19", 0x100000, 0xfec137be, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 2) }, // 10
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj19.uj19", 0x100000, 0x2d763156, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 3) }, // 11
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug16.ug16", 0x100000, 0x8ba6ae18, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 0) }, // 12
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj16.uj16", 0x100000, 0x39d885b4, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 1) }, // 13
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug20.ug20", 0x100000, 0x809118c1, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 2) }, // 14
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj20.uj20", 0x100000, 0xb96824f0, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 3) }, // 15
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug17.ug17", 0x100000, 0x937d8620, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 0) }, // 16
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj17.uj17", 0x100000, 0x218de160, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 1) }, // 17
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug22.ug22", 0x100000, 0x154d53b1, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 2) }, // 18
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj22.uj22", 0x100000, 0x8891d785, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 3) }, // 19
|
||||
};
|
||||
|
||||
STD_ROM_PICK(mk2r11)
|
||||
STD_ROM_FN(mk2r11)
|
||||
|
||||
struct BurnDriverD BurnDrvMk2r11 = {
|
||||
"mk2r11", "mk2", NULL, NULL, "1993",
|
||||
"Mortal Kombat II (rev L1.1)\0", NULL, "Midway", "Midway T-Unit",
|
||||
NULL, NULL, NULL, NULL,
|
||||
BDF_GAME_WORKING | BDF_CLONE | BDF_CLONE, 2, HARDWARE_MIDWAY_TUNIT, GBF_MISC, 0,
|
||||
NULL, mk2r11RomInfo, mk2r11RomName, NULL, NULL, Mk2InputInfo, Mk2DIPInfo,
|
||||
Mk2Init, TUnitExit, TUnitFrame, TUnitDraw, TUnitScan, &nTUnitRecalc, 0x8000,
|
||||
400, 254, 4, 3
|
||||
};
|
||||
|
||||
static struct BurnRomInfo mk2r42RomDesc[] = {
|
||||
{ "mk242j12.bin", 0x080000, 0xc7fb1525, 1 | BRF_PRG | BRF_ESS }, // 0 TMS34010
|
||||
{ "mk242g12.bin", 0x080000, 0x443d0e0a, 1 | BRF_PRG | BRF_ESS }, // 1
|
||||
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u2.u2", 0x080000, 0x5f23d71d, 2 | BRF_PRG | BRF_ESS }, // 2 DCS sound banks
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u3.u3", 0x080000, 0xd6d92bf9, 2 | BRF_PRG | BRF_ESS }, // 3
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u4.u4", 0x080000, 0xeebc8e0f, 2 | BRF_PRG | BRF_ESS }, // 4
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u5.u5", 0x080000, 0x2b0b7961, 2 | BRF_PRG | BRF_ESS }, // 5
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u6.u6", 0x080000, 0xf694b27f, 2 | BRF_PRG | BRF_ESS }, // 6
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u7.u7", 0x080000, 0x20387e0a, 2 | BRF_PRG | BRF_ESS }, // 7
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug14.ug14", 0x100000, 0x01e73af6, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 0) }, // 8 GFX
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj14.uj14", 0x100000, 0xd4985cbb, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 1) }, // 9
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug19.ug19", 0x100000, 0xfec137be, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 2) }, // 10
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj19.uj19", 0x100000, 0x2d763156, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 3) }, // 11
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug16.ug16", 0x100000, 0x8ba6ae18, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 0) }, // 12
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj16.uj16", 0x100000, 0x39d885b4, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 1) }, // 13
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug20.ug20", 0x100000, 0x809118c1, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 2) }, // 14
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj20.uj20", 0x100000, 0xb96824f0, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 3) }, // 15
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug17.ug17", 0x100000, 0x937d8620, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 0) }, // 16
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj17.uj17", 0x100000, 0x218de160, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 1) }, // 17
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug22.ug22", 0x100000, 0x154d53b1, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 2) }, // 18
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj22.uj22", 0x100000, 0x8891d785, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 3) }, // 19
|
||||
};
|
||||
|
||||
STD_ROM_PICK(mk2r42)
|
||||
STD_ROM_FN(mk2r42)
|
||||
|
||||
struct BurnDriverD BurnDrvMk2r42 = {
|
||||
"mk2r42", "mk2", NULL, NULL, "1993",
|
||||
"Mortal Kombat II (rev L4.2, hack)\0", NULL, "hack", "Midway T-Unit",
|
||||
NULL, NULL, NULL, NULL,
|
||||
BDF_GAME_WORKING | BDF_CLONE | BDF_HACK, 2, HARDWARE_MIDWAY_TUNIT, GBF_MISC, 0,
|
||||
NULL, mk2r42RomInfo, mk2r42RomName, NULL, NULL, Mk2InputInfo, Mk2DIPInfo,
|
||||
Mk2Init, TUnitExit, TUnitFrame, TUnitDraw, TUnitScan, &nTUnitRecalc, 0x8000,
|
||||
400, 254, 4, 3
|
||||
};
|
||||
|
||||
static struct BurnRomInfo mk2r91RomDesc[] = {
|
||||
{ "uj12.l91", 0x080000, 0x41953903, 1 | BRF_PRG | BRF_ESS }, // 0 TMS34010
|
||||
{ "ug12.l91", 0x080000, 0xc07f745a, 1 | BRF_PRG | BRF_ESS }, // 1
|
||||
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u2.u2", 0x080000, 0x5f23d71d, 2 | BRF_PRG | BRF_ESS }, // 2 DCS sound banks
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u3.u3", 0x080000, 0xd6d92bf9, 2 | BRF_PRG | BRF_ESS }, // 3
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u4.u4", 0x080000, 0xeebc8e0f, 2 | BRF_PRG | BRF_ESS }, // 4
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u5.u5", 0x080000, 0x2b0b7961, 2 | BRF_PRG | BRF_ESS }, // 5
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u6.u6", 0x080000, 0xf694b27f, 2 | BRF_PRG | BRF_ESS }, // 6
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u7.u7", 0x080000, 0x20387e0a, 2 | BRF_PRG | BRF_ESS }, // 7
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug14.ug14", 0x100000, 0x01e73af6, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 0) }, // 8 GFX
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj14.uj14", 0x100000, 0xd4985cbb, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 1) }, // 9
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug19.ug19", 0x100000, 0xfec137be, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 2) }, // 10
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj19.uj19", 0x100000, 0x2d763156, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 3) }, // 11
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug16.ug16", 0x100000, 0x8ba6ae18, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 0) }, // 12
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj16.uj16", 0x100000, 0x39d885b4, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 1) }, // 13
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug20.ug20", 0x100000, 0x809118c1, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 2) }, // 14
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj20.uj20", 0x100000, 0xb96824f0, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 3) }, // 15
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug17.ug17", 0x100000, 0x937d8620, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 0) }, // 16
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj17.uj17", 0x100000, 0x218de160, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 1) }, // 17
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug22.ug22", 0x100000, 0x154d53b1, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 2) }, // 18
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj22.uj22", 0x100000, 0x8891d785, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 3) }, // 19
|
||||
};
|
||||
|
||||
STD_ROM_PICK(mk2r91)
|
||||
STD_ROM_FN(mk2r91)
|
||||
|
||||
struct BurnDriverD BurnDrvMk2r91 = {
|
||||
"mk2r91", "mk2", NULL, NULL, "1993",
|
||||
"Mortal Kombat II (rev L9.1, hack)\0", NULL, "hack", "Midway T-Unit",
|
||||
NULL, NULL, NULL, NULL,
|
||||
BDF_GAME_WORKING | BDF_CLONE | BDF_HACK, 2, HARDWARE_MIDWAY_TUNIT, GBF_MISC, 0,
|
||||
NULL, mk2r91RomInfo, mk2r91RomName, NULL, NULL, Mk2InputInfo, Mk2DIPInfo,
|
||||
Mk2Init, TUnitExit, TUnitFrame, TUnitDraw, TUnitScan, &nTUnitRecalc, 0x8000,
|
||||
400, 254, 4, 3
|
||||
};
|
||||
|
||||
static struct BurnRomInfo mk2chalRomDesc[] = {
|
||||
{ "uj12.chl", 0x080000, 0x2d5c04e6, 1 | BRF_PRG | BRF_ESS }, // 0 TMS34010
|
||||
{ "ug12.chl", 0x080000, 0x3e7a4bad, 1 | BRF_PRG | BRF_ESS }, // 1
|
||||
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u2.u2", 0x080000, 0x5f23d71d, 2 | BRF_PRG | BRF_ESS }, // 2 DCS sound banks
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u3.u3", 0x080000, 0xd6d92bf9, 2 | BRF_PRG | BRF_ESS }, // 3
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u4.u4", 0x080000, 0xeebc8e0f, 2 | BRF_PRG | BRF_ESS }, // 4
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u5.u5", 0x080000, 0x2b0b7961, 2 | BRF_PRG | BRF_ESS }, // 5
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u6.u6", 0x080000, 0xf694b27f, 2 | BRF_PRG | BRF_ESS }, // 6
|
||||
{ "l1_mortal_kombat_ii_sound_rom_u7.u7", 0x080000, 0x20387e0a, 2 | BRF_PRG | BRF_ESS }, // 7
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug14.ug14", 0x100000, 0x01e73af6, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 0) }, // 8 GFX
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj14.uj14", 0x100000, 0xd4985cbb, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 1) }, // 9
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug19.ug19", 0x100000, 0xfec137be, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 2) }, // 10
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj19.uj19", 0x100000, 0x2d763156, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 3) }, // 11
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug16.ug16", 0x100000, 0x8ba6ae18, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 0) }, // 12
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj16.uj16", 0x100000, 0x39d885b4, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 1) }, // 13
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug20.ug20", 0x100000, 0x809118c1, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 2) }, // 14
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj20.uj20", 0x100000, 0xb96824f0, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 3) }, // 15
|
||||
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug17.ug17", 0x100000, 0x937d8620, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 0) }, // 16
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj17.uj17", 0x100000, 0x218de160, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 1) }, // 17
|
||||
{ "l1_mortal_kombat_ii_game_rom_ug22.ug22", 0x100000, 0x154d53b1, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 2) }, // 18
|
||||
{ "l1_mortal_kombat_ii_game_rom_uj22.uj22", 0x100000, 0x8891d785, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x08, 3) }, // 19
|
||||
};
|
||||
|
||||
STD_ROM_PICK(mk2chal)
|
||||
STD_ROM_FN(mk2chal)
|
||||
|
||||
struct BurnDriverD BurnDrvMk2chal = {
|
||||
"mk2chal", "mk2", NULL, NULL, "1993",
|
||||
"Mortal Kombat II Challenger (hack)\0", NULL, "hack", "Midway T-Unit",
|
||||
NULL, NULL, NULL, NULL,
|
||||
BDF_GAME_WORKING | BDF_CLONE | BDF_HACK, 2, HARDWARE_MIDWAY_TUNIT, GBF_MISC, 0,
|
||||
NULL, mk2chalRomInfo, mk2chalRomName, NULL, NULL, Mk2InputInfo, Mk2DIPInfo,
|
||||
Mk2Init, TUnitExit, TUnitFrame, TUnitDraw, TUnitScan, &nTUnitRecalc, 0x8000,
|
||||
400, 254, 4, 3
|
||||
};
|
||||
|
||||
static struct BurnRomInfo nbajamRomDesc[] = {
|
||||
{ "l3_nba_jam_game_rom_uj12.uj1", 0x080000, 0xb93e271c, 1 | BRF_PRG | BRF_ESS }, // 0 TMS34010
|
||||
{ "l3_nba_jam_game_rom_ug12.ug12", 0x080000, 0x407d3390, 1 | BRF_PRG | BRF_ESS }, // 1
|
||||
|
||||
{ "l2_nba_jam_u3_sound_rom.u3", 0x020000, 0x3a3ea480, 4 | BRF_PRG | BRF_ESS }, // 2 Sound CPU
|
||||
|
||||
{ "sl1_mortal_kombat_u12_sound_rom.u12", 0x080000, 0xb94847f1, 2 | BRF_PRG | BRF_ESS }, // 3 ADPCM sound banks
|
||||
{ "sl1_mortal_kombat_u13_sound_rom.u13", 0x080000, 0xb6fe24bd, 2 | BRF_PRG | BRF_ESS }, // 4
|
||||
|
||||
{ "l1_nba_jam_game_rom_ug14.ug14", 0x080000, 0x04bb9f64, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 0) }, // 5 GFX
|
||||
{ "l1_nba_jam_game_rom_uj14.uj14", 0x080000, 0xb34b7af3, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 1) }, // 6
|
||||
{ "l1_nba_jam_game_rom_ug19.ug19", 0x080000, 0xa8f22fbb, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 2) }, // 7
|
||||
{ "l1_nba_jam_game_rom_uj19.uj19", 0x080000, 0x8130a8a2, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x00, 3) }, // 8
|
||||
|
||||
{ "l1_nba_jam_game_rom_ug16.ug16", 0x080000, 0x8591c572, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x02, 0) }, // 9
|
||||
{ "l1_nba_jam_game_rom_uj16.uj16", 0x080000, 0xd2e554f1, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x02, 1) }, // 10
|
||||
{ "l1_nba_jam_game_rom_ug20.ug20", 0x080000, 0x44fd6221, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x02, 2) }, // 11
|
||||
{ "l1_nba_jam_game_rom_uj20.uj20", 0x080000, 0xf9cebbb6, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x02, 3) }, // 12
|
||||
|
||||
{ "l1_nba_jam_game_rom_ug17.ug17", 0x080000, 0x6f921886, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 0) }, // 13
|
||||
{ "l1_nba_jam_game_rom_uj17.uj17", 0x080000, 0xb2e14981, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 1) }, // 14
|
||||
{ "l1_nba_jam_game_rom_ug22.ug22", 0x080000, 0xab05ed89, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 2) }, // 15
|
||||
{ "l1_nba_jam_game_rom_uj22.uj22", 0x080000, 0x59a95878, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x04, 3) }, // 16
|
||||
|
||||
{ "l1_nba_jam_game_rom_ug18.ug18", 0x080000, 0x5162d3d6, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x06, 0) }, // 17
|
||||
{ "l1_nba_jam_game_rom_uj18.uj18", 0x080000, 0xfdee0037, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x06, 1) }, // 18
|
||||
{ "l1_nba_jam_game_rom_ug23.ug23", 0x080000, 0x7b934c7a, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x06, 2) }, // 19
|
||||
{ "l1_nba_jam_game_rom_uj23.uj23", 0x080000, 0x427d2eee, 3 | BRF_GRA | BRF_ESS | TUNIT_GFX(0x06, 3) }, // 20
|
||||
};
|
||||
|
||||
STD_ROM_PICK(nbajam)
|
||||
STD_ROM_FN(nbajam)
|
||||
|
||||
static INT32 NbajamInit()
|
||||
{
|
||||
TUnitIsNbajam = 1;
|
||||
|
||||
return TUnitInit();
|
||||
}
|
||||
|
||||
struct BurnDriverD BurnDrvNbajam = {
|
||||
"nbajam", NULL, NULL, NULL, "1993",
|
||||
"NBA Jam (rev 3.01 04/07/93)\0", NULL, "Midway", "Midway T-Unit",
|
||||
NULL, NULL, NULL, NULL,
|
||||
BDF_GAME_WORKING, 2, HARDWARE_MIDWAY_TUNIT, GBF_MISC, 0,
|
||||
NULL, nbajamRomInfo, nbajamRomName, NULL, NULL, NbajamInputInfo, NbajamDIPInfo,
|
||||
NbajamInit, TUnitExit, TUnitFrame, TUnitDraw, TUnitScan, &nTUnitRecalc, 0x8000,
|
||||
400, 254, 4, 3
|
||||
};
|
||||
|
@ -1,5 +1,6 @@
|
||||
// todo:
|
||||
// MK: sound tempo too slow
|
||||
// NBAJAM: resets in intro - CPU core?
|
||||
|
||||
#include "tiles_generic.h"
|
||||
#include "midtunit.h"
|
||||
@ -45,10 +46,18 @@ static UINT16 nTUnitCtrl = 0;
|
||||
static UINT8 DrvFakeSound = 0;
|
||||
|
||||
static UINT8 MKProtIndex = 0;
|
||||
static UINT16 MK2ProtData = 0;
|
||||
static UINT16 MK2ProtData = 0xffff;
|
||||
|
||||
static UINT16 NbajamProtQueue[5] = { 0, 0, 0, 0, 0 };
|
||||
static UINT8 NbajamProtIndex = 0;
|
||||
|
||||
static UINT16 SoundProtAddressStart = 0;
|
||||
static UINT16 SoundProtAddressEnd = 0;
|
||||
|
||||
UINT8 TUnitIsMK = 0;
|
||||
UINT8 TUnitIsMKTurbo = 0;
|
||||
UINT8 TUnitIsMK2 = 0;
|
||||
UINT8 TUnitIsNbajam = 0;
|
||||
|
||||
static INT32 nSoundType = 0;
|
||||
|
||||
@ -99,14 +108,206 @@ static INT32 MemIndex()
|
||||
return 0;
|
||||
}
|
||||
|
||||
// forwards
|
||||
static void MKsound_bankswitch(INT32 bank);
|
||||
static void MKsound_reset(INT32 local);
|
||||
static void MKsound_reset_write(INT32 val);
|
||||
static void MKsound_main2soundwrite(INT32 data);
|
||||
static void MKsound_msm6295bankswitch(INT32 bank);
|
||||
// dcs sound helpers
|
||||
static void dcs_sound_sync()
|
||||
{
|
||||
INT32 cyc = ((double)TMS34010TotalCycles() / 63 * 100) - Dcs2kTotalCycles();
|
||||
if (cyc > 0) {
|
||||
Dcs2kRun(cyc);
|
||||
}
|
||||
}
|
||||
|
||||
static void dcs_sound_sync_end()
|
||||
{
|
||||
INT32 cyc = ((double)10000000 * 100 / nBurnFPS) - Dcs2kTotalCycles();
|
||||
if (cyc > 0) {
|
||||
Dcs2kRun(cyc);
|
||||
}
|
||||
}
|
||||
|
||||
// williams adpcm-compat. sound section (MK)
|
||||
static INT32 sound_latch;
|
||||
static INT32 sound_talkback;
|
||||
static INT32 sound_irqstate;
|
||||
static INT32 sound_bank;
|
||||
static INT32 sound_msm6295bank;
|
||||
static INT32 sound_inreset;
|
||||
|
||||
static void MKsound_bankswitch(INT32 bank)
|
||||
{
|
||||
sound_bank = bank & 7;
|
||||
}
|
||||
|
||||
static void MKsound_msm6295bankswitch(INT32 bank)
|
||||
{
|
||||
bank &= 7;
|
||||
sound_msm6295bank = bank;
|
||||
|
||||
INT32 bank_offs = 0;
|
||||
switch (bank) {
|
||||
case 0:
|
||||
case 1: bank_offs = 0x40000; break;
|
||||
case 2: bank_offs = 0x20000; break;
|
||||
case 3: bank_offs = 0x00000; break;
|
||||
case 4: bank_offs = 0xe0000; break;
|
||||
case 5: bank_offs = 0xc0000; break;
|
||||
case 6: bank_offs = 0xa0000; break;
|
||||
case 7: bank_offs = 0x80000; break;
|
||||
}
|
||||
|
||||
MSM6295SetBank(0, DrvSoundROM + 0x60000, 0x20000, 0x3ffff); // static bank
|
||||
MSM6295SetBank(0, DrvSoundROM + bank_offs, 0x00000, 0x1ffff); // dynamic bank
|
||||
}
|
||||
|
||||
static void MKsound_reset(INT32 local)
|
||||
{
|
||||
sound_latch = 0;
|
||||
sound_irqstate = 0;
|
||||
sound_talkback = 0;
|
||||
sound_inreset = 0;
|
||||
|
||||
if (!local) M6809Open(0);
|
||||
MKsound_bankswitch(0);
|
||||
MKsound_msm6295bankswitch(0);
|
||||
M6809Reset();
|
||||
if (!local) M6809Close();
|
||||
|
||||
BurnYM2151Reset();
|
||||
DACReset();
|
||||
MSM6295Reset();
|
||||
}
|
||||
|
||||
static void MKsound_reset_write(INT32 val)
|
||||
{
|
||||
if (val) {
|
||||
MKsound_reset(1);
|
||||
sound_inreset = 1;
|
||||
} else {
|
||||
sound_inreset = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void MKsound_main2soundwrite(INT32 data)
|
||||
{
|
||||
sound_latch = data & 0xff;
|
||||
if (~data & 0x200) {
|
||||
M6809SetIRQLine(M6809_IRQ_LINE, CPU_IRQSTATUS_ACK);
|
||||
sound_irqstate = 1;
|
||||
}
|
||||
}
|
||||
|
||||
static void MKsound_statescan(INT32 nAction)
|
||||
{
|
||||
if (nAction & ACB_DRIVER_DATA) {
|
||||
M6809Scan(nAction);
|
||||
SCAN_VAR(sound_latch);
|
||||
SCAN_VAR(sound_talkback);
|
||||
SCAN_VAR(sound_irqstate);
|
||||
SCAN_VAR(sound_bank);
|
||||
SCAN_VAR(sound_msm6295bank);
|
||||
}
|
||||
|
||||
if (nAction & ACB_WRITE) {
|
||||
M6809Open(0);
|
||||
MKsound_bankswitch(sound_bank);
|
||||
M6809Close();
|
||||
MKsound_msm6295bankswitch(sound_msm6295bank);
|
||||
}
|
||||
}
|
||||
|
||||
static void MKYM2151IrqHandler(INT32 Irq)
|
||||
{
|
||||
M6809SetIRQLine(M6809_FIRQ_LINE, (Irq) ? CPU_IRQSTATUS_ACK : CPU_IRQSTATUS_NONE);
|
||||
}
|
||||
|
||||
static UINT8 MKSoundRead(UINT16 address)
|
||||
{
|
||||
if (address >= 0x4000 && address <= 0xbfff) {
|
||||
return DrvSoundProgROM[(sound_bank * 0x8000) + (address - 0x4000)];
|
||||
}
|
||||
|
||||
if (address >= 0xc000 && address <= 0xffff) {
|
||||
if (address >= SoundProtAddressStart && address <= SoundProtAddressEnd) { // MK sound protection ram.
|
||||
return DrvSoundProgRAMProt[address - SoundProtAddressStart];
|
||||
}
|
||||
return DrvSoundProgROM[(0x4000 + 7 * 0x8000) + (address - 0xc000)];
|
||||
}
|
||||
|
||||
address &= ~0x3ff; // mirroring
|
||||
|
||||
switch (address) {
|
||||
case 0x2000: {
|
||||
return 0; // NOP?
|
||||
}
|
||||
case 0x2400: {
|
||||
return BurnYM2151Read();
|
||||
}
|
||||
case 0x2c00: {
|
||||
return MSM6295Read(0);
|
||||
}
|
||||
case 0x3000: {
|
||||
M6809SetIRQLine(M6809_IRQ_LINE, CPU_IRQSTATUS_NONE);
|
||||
sound_irqstate = 0; // if self-test fails, delay this! (not on this hw, though)
|
||||
return sound_latch;
|
||||
}
|
||||
}
|
||||
|
||||
bprintf(PRINT_NORMAL, _T("M6809 Read Byte -> %04X\n"), address);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void MKSoundWrite(UINT16 address, UINT8 value)
|
||||
{
|
||||
if (address >= SoundProtAddressStart && address <= SoundProtAddressEnd) { // MK sound protection ram.
|
||||
DrvSoundProgRAMProt[address - SoundProtAddressStart] = value;
|
||||
}
|
||||
|
||||
if (address >= 0x4000) return; // ROM
|
||||
|
||||
if ((address & ~0x3ff) == 0x2400) // mirroring
|
||||
address &= ~0x3fe; // ym
|
||||
else
|
||||
address &= ~0x3ff; // everything else
|
||||
|
||||
|
||||
switch (address) {
|
||||
case 0x2000: {
|
||||
MKsound_bankswitch(value);
|
||||
return;
|
||||
}
|
||||
|
||||
case 0x2400:
|
||||
case 0x2401: {
|
||||
BurnYM2151Write(address&1, value);
|
||||
return;
|
||||
}
|
||||
|
||||
case 0x2800: {
|
||||
DACSignedWrite(0, value);
|
||||
return;
|
||||
}
|
||||
|
||||
case 0x2c00: {
|
||||
MSM6295Write(0, value);
|
||||
return;
|
||||
}
|
||||
|
||||
case 0x3400: {
|
||||
MKsound_msm6295bankswitch(value);
|
||||
return;
|
||||
}
|
||||
|
||||
case 0x3c00: {
|
||||
sound_talkback = value;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
bprintf(PRINT_NORMAL, _T("M6809 Write Byte -> %04X, %02X\n"), address, value);
|
||||
}
|
||||
|
||||
// general emulation helpers, etc.
|
||||
static INT32 LoadGfxBanks()
|
||||
{
|
||||
char *pRomName;
|
||||
@ -130,43 +331,53 @@ static INT32 LoadGfxBanks()
|
||||
|
||||
static INT32 LoadSoundProgRom()
|
||||
{
|
||||
char *pRomName;
|
||||
struct BurnRomInfo pri;
|
||||
if (BurnLoadRom(DrvSoundProgROM, 2, 1)) return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (INT32 i = 0; !BurnDrvGetRomName(&pRomName, i, 0); i++) {
|
||||
BurnDrvGetRomInfo(&pri, i);
|
||||
if ((pri.nType & 7) == 4) {
|
||||
if (BurnLoadRom(DrvSoundProgROM, i, 1) != 0) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
static INT32 LoadSoundProgNbajamRom()
|
||||
{
|
||||
if (BurnLoadRom(DrvSoundProgROM, 2, 1)) return 1;
|
||||
if (BurnLoadRom(DrvSoundProgROM + 0x20000, 2, 1)) return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static INT32 LoadSoundBanksMK()
|
||||
{
|
||||
char *pRomName;
|
||||
struct BurnRomInfo pri;
|
||||
INT32 offs = 0;
|
||||
INT32 bank = 0;
|
||||
if (BurnLoadRom(DrvSoundROM + 0x000000, 3, 1)) return 1;
|
||||
if (BurnLoadRom(DrvSoundROM + 0x040000, 3, 1)) return 1;
|
||||
if (BurnLoadRom(DrvSoundROM + 0x080000, 4, 1)) return 1;
|
||||
if (BurnLoadRom(DrvSoundROM + 0x0c0000, 4, 1)) return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (INT32 i = 0; !BurnDrvGetRomName(&pRomName, i, 0); i++) {
|
||||
BurnDrvGetRomInfo(&pri, i);
|
||||
if ((pri.nType & 7) == 2) {
|
||||
bprintf(0, _T("MKsound: loading soundbank %d @ %x\n"), bank, offs);
|
||||
if (BurnLoadRom(DrvSoundROM + offs, i, 1) != 0) {
|
||||
return 1;
|
||||
}
|
||||
offs += pri.nLen;
|
||||
bprintf(0, _T("MKsound: loading soundbank %d @ %x\n"), bank, offs);
|
||||
if (BurnLoadRom(DrvSoundROM + offs, i, 1) != 0) {
|
||||
return 1;
|
||||
}
|
||||
offs += pri.nLen;
|
||||
bank++;
|
||||
}
|
||||
}
|
||||
static INT32 LoadSoundBanksMk2()
|
||||
{
|
||||
memset(DrvSoundROM, 0xFF, 0x1000000);
|
||||
if (BurnLoadRom(DrvSoundROM + 0x000000, 2, 2)) return 1;
|
||||
if (BurnLoadRom(DrvSoundROM + 0x100000, 2, 2)) return 1;
|
||||
if (BurnLoadRom(DrvSoundROM + 0x200000, 3, 2)) return 1;
|
||||
if (BurnLoadRom(DrvSoundROM + 0x300000, 3, 2)) return 1;
|
||||
if (BurnLoadRom(DrvSoundROM + 0x400000, 4, 2)) return 1;
|
||||
if (BurnLoadRom(DrvSoundROM + 0x500000, 4, 2)) return 1;
|
||||
if (BurnLoadRom(DrvSoundROM + 0x600000, 5, 2)) return 1;
|
||||
if (BurnLoadRom(DrvSoundROM + 0x700000, 5, 2)) return 1;
|
||||
if (BurnLoadRom(DrvSoundROM + 0x800000, 6, 2)) return 1;
|
||||
if (BurnLoadRom(DrvSoundROM + 0x900000, 6, 2)) return 1;
|
||||
if (BurnLoadRom(DrvSoundROM + 0xa00000, 7, 2)) return 1;
|
||||
if (BurnLoadRom(DrvSoundROM + 0xb00000, 7, 2)) return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static INT32 LoadSoundBanksNbajam()
|
||||
{
|
||||
if (BurnLoadRom(DrvSoundROM + 0x000000, 3, 1)) return 1;
|
||||
if (BurnLoadRom(DrvSoundROM + 0x080000, 4, 1)) return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -185,18 +396,24 @@ static void TUnitDoReset()
|
||||
TMS34010Reset();
|
||||
|
||||
switch (nSoundType) {
|
||||
case SOUND_ADPCM:
|
||||
case SOUND_ADPCM: {
|
||||
MKsound_reset(0);
|
||||
break;
|
||||
}
|
||||
|
||||
case SOUND_DCS:
|
||||
case SOUND_DCS: {
|
||||
Dcs2kReset();
|
||||
Dcs2kResetWrite(1);
|
||||
Dcs2kResetWrite(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
MKProtIndex = 0;
|
||||
MK2ProtData = 0;
|
||||
MK2ProtData = 0xffff;
|
||||
NbajamProtIndex = 0;
|
||||
memset(NbajamProtQueue, 0, 5 * sizeof(UINT8));
|
||||
|
||||
DrvFakeSound = 0;
|
||||
}
|
||||
|
||||
@ -274,7 +491,9 @@ static UINT16 TUnitRead(UINT32 address)
|
||||
if (address == 0x01600040) return 0xff; // ???
|
||||
if (address == 0x01d81070) return 0xff; // watchdog
|
||||
|
||||
if (address == 0x01f00000) return 0; // ?
|
||||
if (address == 0x01b00000) return 0xff; // ?
|
||||
if (address == 0x01c00060) return 0xff; // ?
|
||||
if (address == 0x01f00000) return 0xff; // ?
|
||||
|
||||
bprintf(PRINT_NORMAL, _T("Read %x\n"), address);
|
||||
|
||||
@ -284,6 +503,7 @@ static UINT16 TUnitRead(UINT32 address)
|
||||
static void TUnitWrite(UINT32 address, UINT16 value)
|
||||
{
|
||||
if (address == 0x01d81070) return; // watchdog
|
||||
if (address == 0x01c00060) return; // ?
|
||||
|
||||
bprintf(PRINT_NORMAL, _T("Write %x, %x\n"), address, value);
|
||||
}
|
||||
@ -314,8 +534,10 @@ static UINT16 TUnitSoundStateRead(UINT32 address)
|
||||
{
|
||||
//bprintf(PRINT_NORMAL, _T("Sound State Read %x\n"), address);
|
||||
if (address >= 0x1d00000 && address <= 0x1d0001f) {
|
||||
if (nSoundType == SOUND_DCS)
|
||||
if (nSoundType == SOUND_DCS) {
|
||||
dcs_sound_sync();
|
||||
return Dcs2kControlRead() >> 4;
|
||||
}
|
||||
|
||||
if (DrvFakeSound) {
|
||||
DrvFakeSound--;
|
||||
@ -329,8 +551,12 @@ static UINT16 TUnitSoundStateRead(UINT32 address)
|
||||
static UINT16 TUnitSoundRead(UINT32 address)
|
||||
{
|
||||
if (address >= 0x01d01020 && address <= 0x01d0103f) {
|
||||
if (nSoundType == SOUND_DCS)
|
||||
return Dcs2kDataRead() & 0xff;
|
||||
if (nSoundType == SOUND_DCS) {
|
||||
dcs_sound_sync();
|
||||
UINT16 dr = Dcs2kDataRead();
|
||||
Dcs2kRun(20); // "sync" in frame will even things out.
|
||||
return dr & 0xff;
|
||||
}
|
||||
}
|
||||
//bprintf(PRINT_NORMAL, _T("Sound Read %x\n"), address);
|
||||
|
||||
@ -343,21 +569,25 @@ static void TUnitSoundWrite(UINT32 address, UINT16 value)
|
||||
if (address >= 0x01d01020 && address <= 0x01d0103f) {
|
||||
// this should check the mem mask for a full 16-bit write. and ignore byte-writes.
|
||||
if (value == 0 || value == 1) return; // spurious bad-writes
|
||||
|
||||
|
||||
switch (nSoundType) {
|
||||
case SOUND_ADPCM:
|
||||
case SOUND_ADPCM: {
|
||||
MKsound_reset_write(~value & 0x100);
|
||||
MKsound_main2soundwrite(value & 0xff);
|
||||
|
||||
DrvFakeSound = 128;
|
||||
break;
|
||||
}
|
||||
|
||||
case SOUND_DCS:
|
||||
case SOUND_DCS: {
|
||||
Dcs2kResetWrite(~value & 0x100);
|
||||
dcs_sound_sync();
|
||||
Dcs2kDataWrite(value & 0xff);
|
||||
Dcs2kRun(20);
|
||||
|
||||
DrvFakeSound = 128;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -395,6 +625,7 @@ static void TUnitCMOSWrite(UINT32 address, UINT16 value)
|
||||
wn[offset] = value;
|
||||
}
|
||||
|
||||
// mortal kombat protection
|
||||
static const UINT8 mk_prot_values[] =
|
||||
{
|
||||
0x13, 0x27, 0x0f, 0x1f, 0x3e, 0x3d, 0x3b, 0x37,
|
||||
@ -416,7 +647,6 @@ static UINT16 MKProtRead(UINT32 /*address*/)
|
||||
return mk_prot_values[MKProtIndex++] << 9;
|
||||
}
|
||||
|
||||
|
||||
static void MKProtWrite(UINT32 /*address*/, UINT16 value)
|
||||
{
|
||||
INT32 first_val = (value >> 9) & 0x3f;
|
||||
@ -434,214 +664,108 @@ static void MKProtWrite(UINT32 /*address*/, UINT16 value)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// williams adpcm-compat. sound section (MK)
|
||||
static INT32 sound_latch;
|
||||
static INT32 sound_talkback;
|
||||
static INT32 sound_irqstate;
|
||||
static INT32 sound_bank;
|
||||
static INT32 sound_msm6295bank;
|
||||
static INT32 sound_inreset;
|
||||
|
||||
static void MKsound_reset_write(INT32 val)
|
||||
// mortal kombat turbo protection
|
||||
static UINT16 MKTurboProtRead(UINT32 address)
|
||||
{
|
||||
if (val) {
|
||||
MKsound_reset(1);
|
||||
sound_inreset = 1;
|
||||
} else {
|
||||
sound_inreset = 0;
|
||||
if (address >= 0xfffff400 && address <= 0xfffff40f) {
|
||||
return BurnRandom();
|
||||
}
|
||||
|
||||
UINT32 offset = TOBYTE(address & 0x7fffff);
|
||||
return DrvBootROM[offset] | (DrvBootROM[offset + 1] << 8);
|
||||
}
|
||||
|
||||
// mortal kombat 2 protection
|
||||
static UINT16 MK2ProtRead(UINT32 address)
|
||||
{
|
||||
if (address >= 0x01a190e0 && address <= 0x01a190ff) {
|
||||
return MK2ProtData;
|
||||
}
|
||||
|
||||
if (address >= 0x01a191c0 && address <= 0x01a191df) {
|
||||
return MK2ProtData >> 1;
|
||||
}
|
||||
|
||||
if (address >= 0x01a3d0c0 && address <= 0x01a3d0ff) {
|
||||
return MK2ProtData;
|
||||
}
|
||||
|
||||
if (address >= 0x01d9d1e0 && address <= 0x01d9d1ff) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (address >= 0x01def920 && address <= 0x01def93f) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
return ~0;
|
||||
}
|
||||
|
||||
static void MK2ProtWrite(UINT32 address, UINT16 value)
|
||||
{
|
||||
if (address >= 0x00f20c60 && address <= 0x00f20c7f) {
|
||||
MK2ProtData = value;
|
||||
}
|
||||
|
||||
if (address >= 0x00f42820 && address <= 0x00f4283f) {
|
||||
MK2ProtData = value;
|
||||
}
|
||||
}
|
||||
|
||||
static void MKsound_reset(INT32 local)
|
||||
// nba jam protection
|
||||
static const UINT32 nbajam_prot_values[128] =
|
||||
{
|
||||
sound_latch = 0;
|
||||
sound_irqstate = 0;
|
||||
sound_talkback = 0;
|
||||
sound_inreset = 0;
|
||||
0x21283b3b, 0x2439383b, 0x31283b3b, 0x302b3938, 0x31283b3b, 0x302b3938, 0x232f2f2f, 0x26383b3b,
|
||||
0x21283b3b, 0x2439383b, 0x312a1224, 0x302b1120, 0x312a1224, 0x302b1120, 0x232d283b, 0x26383b3b,
|
||||
0x2b3b3b3b, 0x2e2e2e2e, 0x39383b1b, 0x383b3b1b, 0x3b3b3b1b, 0x3a3a3a1a, 0x2b3b3b3b, 0x2e2e2e2e,
|
||||
0x2b39383b, 0x2e2e2e2e, 0x393a1a18, 0x383b1b1b, 0x3b3b1b1b, 0x3a3a1a18, 0x2b39383b, 0x2e2e2e2e,
|
||||
0x01202b3b, 0x0431283b, 0x11202b3b, 0x1021283b, 0x11202b3b, 0x1021283b, 0x03273b3b, 0x06302b39,
|
||||
0x09302b39, 0x0c232f2f, 0x19322e06, 0x18312a12, 0x19322e06, 0x18312a12, 0x0b31283b, 0x0e26383b,
|
||||
0x03273b3b, 0x06302b39, 0x11202b3b, 0x1021283b, 0x13273938, 0x12243938, 0x03273b3b, 0x06302b39,
|
||||
0x0b31283b, 0x0e26383b, 0x19322e06, 0x18312a12, 0x1b332f05, 0x1a302b11, 0x0b31283b, 0x0e26383b,
|
||||
0x21283b3b, 0x2439383b, 0x31283b3b, 0x302b3938, 0x31283b3b, 0x302b3938, 0x232f2f2f, 0x26383b3b,
|
||||
0x21283b3b, 0x2439383b, 0x312a1224, 0x302b1120, 0x312a1224, 0x302b1120, 0x232d283b, 0x26383b3b,
|
||||
0x2b3b3b3b, 0x2e2e2e2e, 0x39383b1b, 0x383b3b1b, 0x3b3b3b1b, 0x3a3a3a1a, 0x2b3b3b3b, 0x2e2e2e2e,
|
||||
0x2b39383b, 0x2e2e2e2e, 0x393a1a18, 0x383b1b1b, 0x3b3b1b1b, 0x3a3a1a18, 0x2b39383b, 0x2e2e2e2e,
|
||||
0x01202b3b, 0x0431283b, 0x11202b3b, 0x1021283b, 0x11202b3b, 0x1021283b, 0x03273b3b, 0x06302b39,
|
||||
0x09302b39, 0x0c232f2f, 0x19322e06, 0x18312a12, 0x19322e06, 0x18312a12, 0x0b31283b, 0x0e26383b,
|
||||
0x03273b3b, 0x06302b39, 0x11202b3b, 0x1021283b, 0x13273938, 0x12243938, 0x03273b3b, 0x06302b39,
|
||||
0x0b31283b, 0x0e26383b, 0x19322e06, 0x18312a12, 0x1b332f05, 0x1a302b11, 0x0b31283b, 0x0e26383b
|
||||
};
|
||||
|
||||
if (!local) M6809Open(0);
|
||||
MKsound_bankswitch(0);
|
||||
MKsound_msm6295bankswitch(0);
|
||||
M6809Reset();
|
||||
if (!local) M6809Close();
|
||||
|
||||
BurnYM2151Reset();
|
||||
DACReset();
|
||||
MSM6295Reset();
|
||||
static UINT16 NbajamProtRead(UINT32 address)
|
||||
{
|
||||
if (address >= 0x1b14020 && address <= 0x1b2503f) {
|
||||
UINT16 result = NbajamProtQueue[NbajamProtIndex];
|
||||
if (NbajamProtIndex < 4) NbajamProtIndex++;
|
||||
return result;
|
||||
}
|
||||
|
||||
return ~0;
|
||||
}
|
||||
|
||||
static void MKsound_main2soundwrite(INT32 data)
|
||||
static void NbajamProtWrite(UINT32 address, UINT16 value)
|
||||
{
|
||||
sound_latch = data & 0xff;
|
||||
if (~data & 0x200) {
|
||||
M6809SetIRQLine(M6809_IRQ_LINE, CPU_IRQSTATUS_ACK);
|
||||
sound_irqstate = 1;
|
||||
if (address >= 0x1b14020 && address <= 0x1b2503f) {
|
||||
UINT32 offset = (address - 0x1b14020) >> 4;
|
||||
INT32 table_index = (offset >> 6) & 0x7f;
|
||||
UINT32 protval = nbajam_prot_values[table_index];
|
||||
|
||||
NbajamProtQueue[0] = value;
|
||||
NbajamProtQueue[1] = ((protval >> 24) & 0xff) << 9;
|
||||
NbajamProtQueue[2] = ((protval >> 16) & 0xff) << 9;
|
||||
NbajamProtQueue[3] = ((protval >> 8) & 0xff) << 9;
|
||||
NbajamProtQueue[4] = ((protval >> 0) & 0xff) << 9;
|
||||
NbajamProtIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void MKsound_msm6295bankswitch(INT32 bank)
|
||||
{
|
||||
bank &= 7;
|
||||
sound_msm6295bank = bank;
|
||||
|
||||
INT32 bank_offs = 0;
|
||||
switch (bank) {
|
||||
case 0:
|
||||
case 1: bank_offs = 0x40000; break;
|
||||
case 2: bank_offs = 0x20000; break;
|
||||
case 3: bank_offs = 0x00000; break;
|
||||
case 4: bank_offs = 0xe0000; break;
|
||||
case 5: bank_offs = 0xc0000; break;
|
||||
case 6: bank_offs = 0xa0000; break;
|
||||
case 7: bank_offs = 0x80000; break;
|
||||
}
|
||||
|
||||
MSM6295SetBank(0, DrvSoundROM + 0x60000, 0x20000, 0x3ffff); // static bank
|
||||
MSM6295SetBank(0, DrvSoundROM + bank_offs, 0x00000, 0x1ffff); // dynamic bank
|
||||
}
|
||||
|
||||
static void MKsound_bankswitch(INT32 bank)
|
||||
{
|
||||
sound_bank = bank & 7;
|
||||
}
|
||||
|
||||
static void MKsound_statescan(INT32 nAction)
|
||||
{
|
||||
if (nAction & ACB_DRIVER_DATA) {
|
||||
M6809Scan(nAction);
|
||||
SCAN_VAR(sound_latch);
|
||||
SCAN_VAR(sound_talkback);
|
||||
SCAN_VAR(sound_irqstate);
|
||||
SCAN_VAR(sound_bank);
|
||||
SCAN_VAR(sound_msm6295bank);
|
||||
}
|
||||
|
||||
if (nAction & ACB_WRITE) {
|
||||
M6809Open(0);
|
||||
MKsound_bankswitch(sound_bank);
|
||||
M6809Close();
|
||||
MKsound_msm6295bankswitch(sound_msm6295bank);
|
||||
}
|
||||
}
|
||||
|
||||
static void MKYM2151IrqHandler(INT32 Irq)
|
||||
{
|
||||
M6809SetIRQLine(M6809_FIRQ_LINE, (Irq) ? CPU_IRQSTATUS_ACK : CPU_IRQSTATUS_NONE);
|
||||
}
|
||||
|
||||
static UINT8 MKSoundRead(UINT16 address)
|
||||
{
|
||||
|
||||
if (address >= 0x4000 && address <= 0xbfff) {
|
||||
return DrvSoundProgROM[(sound_bank * 0x8000) + (address - 0x4000)];
|
||||
}
|
||||
|
||||
if (address >= 0xc000 && address <= 0xffff) {
|
||||
if (address >= 0xfb9c && address <= 0xfbc6) { // MK sound protection ram.
|
||||
return DrvSoundProgRAMProt[address - 0xfb9c];
|
||||
}
|
||||
return DrvSoundProgROM[(0x4000 + 7 * 0x8000) + (address - 0xc000)];
|
||||
}
|
||||
|
||||
address &= ~0x3ff; // mirroring
|
||||
|
||||
switch (address) {
|
||||
case 0x2000: {
|
||||
return 0; // NOP?
|
||||
}
|
||||
case 0x2400: {
|
||||
return BurnYM2151Read();
|
||||
}
|
||||
case 0x2c00: {
|
||||
return MSM6295Read(0);
|
||||
}
|
||||
case 0x3000: {
|
||||
M6809SetIRQLine(M6809_IRQ_LINE, CPU_IRQSTATUS_NONE);
|
||||
sound_irqstate = 0; // if self-test fails, delay this! (not on this hw, though)
|
||||
return sound_latch;
|
||||
}
|
||||
}
|
||||
|
||||
bprintf(PRINT_NORMAL, _T("M6809 Read Byte -> %04X\n"), address);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static void MKSoundWrite(UINT16 address, UINT8 value)
|
||||
{
|
||||
if (address >= 0xfb9c && address <= 0xfbc6) { // MK sound protection ram.
|
||||
DrvSoundProgRAMProt[address - 0xfb9c] = value;
|
||||
}
|
||||
|
||||
if (address >= 0x4000) return; // ROM
|
||||
|
||||
if ((address & ~0x3ff) == 0x2400) // mirroring
|
||||
address &= ~0x3fe; // ym
|
||||
else
|
||||
address &= ~0x3ff; // everything else
|
||||
|
||||
|
||||
switch (address) {
|
||||
case 0x2000: {
|
||||
MKsound_bankswitch(value);
|
||||
return;
|
||||
}
|
||||
|
||||
case 0x2400:
|
||||
case 0x2401: {
|
||||
BurnYM2151Write(address&1, value);
|
||||
return;
|
||||
}
|
||||
|
||||
case 0x2800: {
|
||||
DACSignedWrite(0, value);
|
||||
return;
|
||||
}
|
||||
|
||||
case 0x2c00: {
|
||||
MSM6295Write(0, value);
|
||||
return;
|
||||
}
|
||||
|
||||
case 0x3400: {
|
||||
MKsound_msm6295bankswitch(value);
|
||||
return;
|
||||
}
|
||||
|
||||
case 0x3c00: {
|
||||
sound_talkback = value;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
bprintf(PRINT_NORMAL, _T("M6809 Write Byte -> %04X, %02X\n"), address, value);
|
||||
}
|
||||
|
||||
static UINT16 MK2ProtConstRead(UINT32 /*address*/)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
static UINT16 MK2ProtRead(UINT32 /*address*/)
|
||||
{
|
||||
return MK2ProtData;
|
||||
}
|
||||
|
||||
static UINT16 MK2ProtShiftRead(UINT32 /*address*/)
|
||||
{
|
||||
return MK2ProtData >> 1;
|
||||
}
|
||||
|
||||
static void MK2ProtWrite(UINT32 /*address*/, UINT16 value)
|
||||
{
|
||||
MK2ProtData = value;
|
||||
}
|
||||
|
||||
// init, exit, etc.
|
||||
INT32 TUnitInit()
|
||||
{
|
||||
MemIndex();
|
||||
nSoundType = SOUND_ADPCM;
|
||||
|
||||
MemIndex();
|
||||
INT32 nLen = MemEnd - (UINT8 *)0;
|
||||
|
||||
if ((AllMem = (UINT8 *)BurnMalloc(nLen)) == NULL)
|
||||
@ -663,10 +787,19 @@ INT32 TUnitInit()
|
||||
nRet = LoadSoundBanksMK();
|
||||
if (nRet != 0) return 1;
|
||||
}
|
||||
|
||||
if (TUnitIsMK2) {
|
||||
nRet = LoadSoundBanksMk2();
|
||||
if (nRet != 0) return 1;
|
||||
}
|
||||
|
||||
if (TUnitIsNbajam) {
|
||||
nRet = LoadSoundProgNbajamRom();
|
||||
if (nRet != 0) return 1;
|
||||
|
||||
/* nRet = LoadSoundBanks();
|
||||
if (nRet != 0)
|
||||
return 1;*/
|
||||
nRet = LoadSoundBanksNbajam();
|
||||
if (nRet != 0) return 1;
|
||||
}
|
||||
|
||||
nRet = LoadGfxBanks();
|
||||
if (nRet != 0) return 1;
|
||||
@ -726,33 +859,30 @@ INT32 TUnitInit()
|
||||
TMS34010SetReadHandler(12, TUnitGfxRead);
|
||||
TMS34010MapHandler(12, 0x02000000, 0x07ffffff, MAP_READ);
|
||||
|
||||
if (TUnitIsMKTurbo) {
|
||||
TMS34010SetReadHandler(13, MKTurboProtRead);
|
||||
TMS34010MapHandler(13, 0xFF800000, 0xffffffff, MAP_READ);
|
||||
}
|
||||
|
||||
if (TUnitIsMK2) {
|
||||
TMS34010SetWriteHandler(13, MK2ProtWrite);
|
||||
TMS34010MapHandler(13, 0x00f20c60, 0x00f20c7f, MAP_WRITE);
|
||||
TMS34010MapHandler(13, 0x00f20000, 0x00f4ffff, MAP_WRITE);
|
||||
|
||||
TMS34010SetWriteHandler(14, MK2ProtWrite);
|
||||
TMS34010MapHandler(14, 0x00f42820, 0x00f4283f, MAP_WRITE);
|
||||
TMS34010SetReadHandler(14, MK2ProtRead);
|
||||
TMS34010MapHandler(14, 0x01a10000, 0x01a3ffff, MAP_READ);
|
||||
|
||||
TMS34010SetReadHandler(15, MK2ProtRead);
|
||||
TMS34010MapHandler(15, 0x01a190e0, 0x01a190ff, MAP_READ);
|
||||
|
||||
TMS34010SetReadHandler(16, MK2ProtShiftRead);
|
||||
TMS34010MapHandler(16, 0x01a191c0, 0x01a191df, MAP_READ);
|
||||
|
||||
TMS34010SetReadHandler(17, MK2ProtRead);
|
||||
TMS34010MapHandler(17, 0x01a3d0c0, 0x01a3d0ff, MAP_READ);
|
||||
|
||||
TMS34010SetReadHandler(18, MK2ProtConstRead);
|
||||
TMS34010MapHandler(18, 0x01d9d1e0, 0x01d9d1ff, MAP_READ);
|
||||
|
||||
TMS34010SetReadHandler(19, MK2ProtConstRead);
|
||||
TMS34010MapHandler(19, 0x01def920, 0x01def93f, MAP_READ);
|
||||
TMS34010MapHandler(15, 0x01d90000, 0x01dfffff, MAP_READ);
|
||||
}
|
||||
|
||||
if (TUnitIsNbajam) {
|
||||
TMS34010SetHandlers(13, NbajamProtRead, NbajamProtWrite);
|
||||
TMS34010MapHandler(13, 0x1b14000, 0x1b25fff, MAP_READ | MAP_WRITE);
|
||||
}
|
||||
|
||||
memset(DrvVRAM, 0, 0x400000);
|
||||
|
||||
if (TUnitIsMK) {
|
||||
nSoundType = SOUND_ADPCM;
|
||||
if (TUnitIsMK || TUnitIsNbajam) {
|
||||
M6809Init(0);
|
||||
M6809Open(0);
|
||||
M6809MapMemory(DrvSoundProgRAM, 0x0000, 0x1fff, MAP_RAM);
|
||||
@ -776,6 +906,27 @@ INT32 TUnitInit()
|
||||
|
||||
MSM6295Init(0, 1000000 / MSM6295_PIN7_HIGH, 1);
|
||||
MSM6295SetRoute(0, 0.50, BURN_SND_ROUTE_BOTH);
|
||||
|
||||
SoundProtAddressStart = 0xfb9c;
|
||||
SoundProtAddressEnd = 0xfbc6;
|
||||
|
||||
if (TUnitIsNbajam) {
|
||||
SoundProtAddressStart = 0xfbaa;
|
||||
SoundProtAddressEnd = 0xfbd4;
|
||||
}
|
||||
}
|
||||
|
||||
if (TUnitIsMK2) {
|
||||
nSoundType = SOUND_DCS;
|
||||
|
||||
Dcs2kInit(DCS_8K, MHz(10));
|
||||
Dcs2kMapSoundROM(DrvSoundROM, 0x1000000);
|
||||
Dcs2kSetVolume(10.00);
|
||||
|
||||
Dcs2kBoot();
|
||||
|
||||
Dcs2kResetWrite(1);
|
||||
Dcs2kResetWrite(0);
|
||||
}
|
||||
|
||||
GenericTilesInit();
|
||||
@ -818,6 +969,11 @@ INT32 TUnitExit()
|
||||
|
||||
TUnitIsMK = 0;
|
||||
TUnitIsMK2 = 0;
|
||||
TUnitIsMKTurbo = 0;
|
||||
TUnitIsNbajam = 0;
|
||||
|
||||
SoundProtAddressStart = 0;
|
||||
SoundProtAddressEnd = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -835,6 +991,21 @@ INT32 TUnitDraw()
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void HandleDCSIRQ(INT32 line)
|
||||
{
|
||||
if (nBurnFPS == 6000) {
|
||||
// 60hz needs 2 irq's/frame (this is here for "force 60hz"/etc)
|
||||
if (line == 0 || line == 144) DcsIRQ(); // 2x per frame
|
||||
} else {
|
||||
// 54.71hz needs 5 irq's every 2 frames
|
||||
if (nCurrentFrame & 1) {
|
||||
if (line == 0 || line == 144) DcsIRQ(); // 2x per frame
|
||||
} else {
|
||||
if (line == 0 || line == 96 || line == 192) DcsIRQ(); // 3x
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
INT32 TUnitFrame()
|
||||
{
|
||||
if (nTUnitReset) TUnitDoReset();
|
||||
@ -843,24 +1014,36 @@ INT32 TUnitFrame()
|
||||
|
||||
TMS34010NewFrame();
|
||||
|
||||
if (TUnitIsMK) M6809NewFrame();
|
||||
if (nSoundType == SOUND_ADPCM) M6809NewFrame();
|
||||
|
||||
INT32 nInterleave = 288;
|
||||
INT32 nCyclesTotal[2] = { (INT32)(50000000/8/54.71), (INT32)(2000000 / 54.71) };
|
||||
INT32 nCyclesDone[2] = { 0, 0 };
|
||||
INT32 nSoundBufferPos = 0;
|
||||
|
||||
if (TUnitIsMK) M6809Open(0);
|
||||
if (nSoundType == SOUND_DCS) {
|
||||
nCyclesTotal[1] = (INT32)(10000000 / 54.71);
|
||||
Dcs2kNewFrame();
|
||||
}
|
||||
|
||||
if (nSoundType == SOUND_ADPCM) M6809Open(0);
|
||||
|
||||
for (INT32 i = 0; i < nInterleave; i++) {
|
||||
nCyclesDone[0] += TMS34010Run((nCyclesTotal[0] * (i + 1) / nInterleave) - nCyclesDone[0]);
|
||||
|
||||
if (TUnitIsMK && !sound_inreset) nCyclesDone[1] += M6809Run((nCyclesTotal[1] * (i + 1) / nInterleave) - nCyclesDone[1]);
|
||||
if (nSoundType == SOUND_ADPCM && !sound_inreset) nCyclesDone[1] += M6809Run((nCyclesTotal[1] * (i + 1) / nInterleave) - nCyclesDone[1]);
|
||||
|
||||
TMS34010GenerateScanline(i);
|
||||
|
||||
if (nSoundType == SOUND_DCS) {
|
||||
HandleDCSIRQ(i);
|
||||
|
||||
dcs_sound_sync(); // sync to main cpu
|
||||
if (i == nInterleave - 1) dcs_sound_sync_end();
|
||||
}
|
||||
|
||||
if (pBurnSoundOut) {
|
||||
if (TUnitIsMK && i&1) {
|
||||
if (nSoundType == SOUND_ADPCM && i&1) {
|
||||
INT32 nSegmentLength = nBurnSoundLen / (nInterleave / 2);
|
||||
INT16* pSoundBuf = pBurnSoundOut + (nSoundBufferPos << 1);
|
||||
BurnYM2151Render(pSoundBuf, nSegmentLength);
|
||||
@ -871,7 +1054,7 @@ INT32 TUnitFrame()
|
||||
|
||||
// Make sure the buffer is entirely filled.
|
||||
if (pBurnSoundOut) {
|
||||
if (TUnitIsMK) {
|
||||
if (nSoundType == SOUND_ADPCM) {
|
||||
INT32 nSegmentLength = nBurnSoundLen - nSoundBufferPos;
|
||||
INT16* pSoundBuf = pBurnSoundOut + (nSoundBufferPos << 1);
|
||||
|
||||
@ -881,9 +1064,13 @@ INT32 TUnitFrame()
|
||||
DACUpdate(pBurnSoundOut, nBurnSoundLen);
|
||||
MSM6295Render(pBurnSoundOut, nBurnSoundLen);
|
||||
}
|
||||
|
||||
if (nSoundType == SOUND_DCS) {
|
||||
Dcs2kRender(pBurnSoundOut, nBurnSoundLen);
|
||||
}
|
||||
}
|
||||
|
||||
if (TUnitIsMK) M6809Close();
|
||||
if (nSoundType == SOUND_ADPCM) M6809Close();
|
||||
|
||||
if (pBurnDraw) {
|
||||
TUnitDraw();
|
||||
|
@ -19,4 +19,6 @@ INT32 TUnitDraw();
|
||||
INT32 TUnitScan(INT32 nAction, INT32 *pnMin);
|
||||
|
||||
extern UINT8 TUnitIsMK;
|
||||
extern UINT8 TUnitIsMK2;
|
||||
extern UINT8 TUnitIsMKTurbo;
|
||||
extern UINT8 TUnitIsMK2;
|
||||
extern UINT8 TUnitIsNbajam;
|
Loading…
Reference in New Issue
Block a user