From 5dd97b51bc3abffc27acea491c92640e9b010129 Mon Sep 17 00:00:00 2001 From: iq_132 <1191709+iq132@users.noreply.github.com> Date: Fri, 10 Oct 2014 23:00:22 +0000 Subject: [PATCH] Add protection routine for orlegend111t. Mark it as working. --- src/burn/drv/pgm/d_pgm.cpp | 9 +++++++-- src/burn/drv/pgm/pgm_prot.cpp | 13 +++++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/burn/drv/pgm/d_pgm.cpp b/src/burn/drv/pgm/d_pgm.cpp index a76145170..3b9a40994 100644 --- a/src/burn/drv/pgm/d_pgm.cpp +++ b/src/burn/drv/pgm/d_pgm.cpp @@ -147,6 +147,10 @@ static struct BurnDIPInfo orld111cDIPList[] = { {0x2E, 0x01, 0x03, 0x02, "China" }, }; +static struct BurnDIPInfo orld111tDIPList[] = { + {0x2E, 0xFF, 0xFF, 0x04, NULL }, +}; + static struct BurnDIPInfo orld105kDIPList[] = { {0x2E, 0xFF, 0xFF, 0x02, NULL }, }; @@ -339,6 +343,7 @@ static struct BurnDIPInfo svgDIPList[] = { STDDIPINFOEXT(orlegend, pgm, orlegend ) STDDIPINFOEXT(orld111c, pgm, orld111c ) +STDDIPINFOEXT(orld111t, pgm, orld111t ) STDDIPINFOEXT(orld105k, pgm, orld105k ) STDDIPINFOEXT(kov, pgm, kov ) STDDIPINFOEXT(kovshxas, pgm, kovshxas ) @@ -664,8 +669,8 @@ struct BurnDriver BurnDrvOrlegend111t = { "orlegend111t", "orlegend", "pgm", NULL, "1997", "Oriental Legend - Xi Yo Gi Shi Re Zuang (V111, Taiwan)\0", NULL, "IGS", "PolyGameMaster", L"Oriental Legend\0\u897F\u6E38\u91CA\u5384\u4F20 (V111, Taiwan)\0", NULL, NULL, NULL, - BDF_CLONE, 4, HARDWARE_IGS_PGM, GBF_SCRFIGHT, 0, - NULL, orlegend111tRomInfo, orlegend111tRomName, NULL, NULL, pgmInputInfo, orld111cDIPInfo, + BDF_GAME_WORKING | BDF_CLONE, 4, HARDWARE_IGS_PGM, GBF_SCRFIGHT, 0, + NULL, orlegend111tRomInfo, orlegend111tRomName, NULL, NULL, pgmInputInfo, orld111tDIPInfo, orlegendInit, pgmExit, pgmFrame, pgmDraw, pgmScan, &nPgmPalRecalc, 0x900, 448, 224, 4, 3 }; diff --git a/src/burn/drv/pgm/pgm_prot.cpp b/src/burn/drv/pgm/pgm_prot.cpp index f862d5208..1abf36f51 100644 --- a/src/burn/drv/pgm/pgm_prot.cpp +++ b/src/burn/drv/pgm/pgm_prot.cpp @@ -669,8 +669,8 @@ static UINT32 bt(UINT32 v, INT32 bit) static void asic3_compute_hold() { // The mode is dependant on the region - static INT32 modes[4] = { 1, 1, 3, 2 }; - INT32 mode = modes[PgmInput[7] & 3]; + static INT32 modes[8] = { 1, 1, 3, 2, 4, 4, 4, 4 }; + INT32 mode = modes[PgmInput[7] & 7]; switch(mode) { case 1: @@ -697,6 +697,15 @@ static void asic3_compute_hold() ^bt(asic3_z, asic3_y) ^(bt(asic3_x, 0) << 4)^(bt(asic3_x, 1) << 6)^(bt(asic3_x, 2) << 10)^(bt(asic3_x, 3) << 12); break; + + case 4: // orlegend111t + asic3_hold = + (asic3_hold << 1) + ^0x2bad + ^bt(asic3_hold, 15)^bt(asic3_hold, 7)^bt(asic3_hold, 6)^bt(asic3_hold, 5) + ^bt(asic3_z, asic3_y) + ^(bt(asic3_x, 0) << 3)^(bt(asic3_x, 1) << 8)^(bt(asic3_x, 2) << 10)^(bt(asic3_x, 3) << 14); + break; } }