PGM: Implement some missing asic25/asic28 registers. This fixes the high score screen for olds & clones. [rockywall, Creamy Mami]

PGM:  Mark olds & clones as working, remove a few now unneeded patches, notes, miscellanea. [iq_132]
This commit is contained in:
Scott Stone 2013-08-15 13:46:30 +00:00
parent 74ebabf032
commit f67a0f48e4
7 changed files with 65 additions and 52 deletions

View File

@ -4084,11 +4084,10 @@ GAME( 2001, puzzli2s, puzzli2, pgm_arm_type1_sim, puzzli2, pgm_arm_type1_
Partially Working, playable, but some imperfections
-----------------------------------------------------------------------------------------------------------------------*/
GAME( 1998, olds, pgm, pgm_028_025_ol, olds, pgm_028_025_state, olds, ROT0, "IGS", "Oriental Legend Special / Xi You Shi E Zhuan Super (ver. 101, Korean Board)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
GAME( 1998, olds100, olds, pgm_028_025_ol, olds, pgm_028_025_state, olds, ROT0, "IGS", "Oriental Legend Special / Xi You Shi E Zhuan Super (ver. 100, set 1)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
GAME( 1998, olds100a, olds, pgm_028_025_ol, olds, pgm_028_025_state, olds, ROT0, "IGS", "Oriental Legend Special / Xi You Shi E Zhuan Super (ver. 100, set 2)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) // crashes on some bosses, high score table etc.
// this version was specially made for a Chinese online gaming company. While it may not be entirely suitable for
// mame, it can give some insight into how protection should work.
GAME( 1998, olds, pgm, pgm_028_025_ol, olds, pgm_028_025_state, olds, ROT0, "IGS", "Oriental Legend Special / Xi You Shi E Zhuan Super (ver. 101, Korean Board)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE ) /* region provided by protection device */
GAME( 1998, olds100, olds, pgm_028_025_ol, olds, pgm_028_025_state, olds, ROT0, "IGS", "Oriental Legend Special / Xi You Shi E Zhuan Super (ver. 100, set 1)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE ) /* region provided by protection device */
GAME( 1998, olds100a, olds, pgm_028_025_ol, olds, pgm_028_025_state, olds, ROT0, "IGS", "Oriental Legend Special / Xi You Shi E Zhuan Super (ver. 100, set 2)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE ) /* region provided by protection device */
// This version was specially made for a Chinese online gaming company. While it may not be entirely suitable for MAME, it can give some insight into how protection should work.
GAME( 1998, olds103t, olds, pgm, pgm, pgm_state, pgm, ROT0, "IGS", "Oriental Legend Special / Xi You Shi E Zhuan Super (ver. 103, China, Tencent) (unprotected)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
GAME( 1999, kov, pgm, pgm_arm_type1_sim, sango, pgm_arm_type1_state, kov, ROT0, "IGS", "Knights of Valour / Sangoku Senki (ver. 117)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */ // V0008 04/27/99 10:33:33

View File

@ -389,8 +389,6 @@ public:
const UINT8 (*m_kb_source_data)[0xec];
INT32 m_kb_source_data_offset;
DECLARE_WRITE16_MEMBER( killbld_mainram_w ); // debug
UINT32 m_kb_game_id;
UINT16 m_kb_prot_hold;

View File

@ -318,20 +318,19 @@ void neogeo_state::decrypt_kf2k5uni()
/* The King of Fighters 2002 (bootleg) */
// Thanks to IQ_132 for the info
void neogeo_state::kof2002b_gfx_decrypt(UINT8 *src, int size)
{
int i, j;
int t[ 8 ][ 10 ] =
{
{ 0, 8, 7, 3, 4, 5, 6, 2, 1 },
{ 1, 0, 8, 4, 5, 3, 7, 6, 2 },
{ 2, 1, 0, 3, 4, 5, 8, 7, 6 },
{ 6, 2, 1, 5, 3, 4, 0, 8, 7 },
{ 7, 6, 2, 5, 3, 4, 1, 0, 8 },
{ 0, 1, 2, 3, 4, 5, 6, 7, 8 },
{ 2, 1, 0, 4, 5, 3, 6, 7, 8 },
{ 8, 0, 7, 3, 4, 5, 6, 2, 1 },
{ 0, 8, 7, 6, 2, 1 },
{ 1, 0, 8, 7, 6, 2 },
{ 2, 1, 0, 8, 7, 6 },
{ 6, 2, 1, 0, 8, 7 },
{ 7, 6, 2, 1, 0, 8 },
{ 0, 1, 2, 6, 7, 8 },
{ 2, 1, 0, 6, 7, 8 },
{ 8, 0, 7, 6, 2, 1 },
};
UINT8 *dst = auto_alloc_array(machine(), UINT8, 0x10000 );
@ -342,9 +341,8 @@ void neogeo_state::kof2002b_gfx_decrypt(UINT8 *src, int size)
for ( j = 0; j < 0x200; j++ )
{
int n = (( j % 0x40) / 8 );
int ofst = BITSWAP16(j, 15, 14, 13, 12, 11, 10, 9, t[n][0], t[n][1], t[n][2],
t[n][3], t[n][4], t[n][5], t[n][6], t[n][7], t[n][8]);
int n = (j & 0x38) >> 3;
int ofst = BITSWAP16(j, 15, 14, 13, 12, 11, 10, 9, t[n][0], t[n][1], t[n][2], 5, 4, 3, t[n][3], t[n][4], t[n][5]);
memcpy( src+i+ofst*128, dst+j*128, 128 );
}
}

View File

@ -1402,7 +1402,6 @@ void neogeo_state::kof2003_decrypt_68k()
}
// Thanks to IQ_132 for the info
void neogeo_state::kof2003h_decrypt_68k()
{
static const UINT8 xor1[0x20] = { 0xc2, 0x4b, 0x74, 0xfd, 0x0b, 0x34, 0xeb, 0xd7, 0x10, 0x6d, 0xf9, 0xce, 0x5d, 0xd5, 0x61, 0x29, 0xf5, 0xbe, 0x0d, 0x82, 0x72, 0x45, 0x0f, 0x24, 0xb3, 0x34, 0x1b, 0x99, 0xea, 0x09, 0xf3, 0x03 };

View File

@ -42,6 +42,7 @@ void pgm_012_025_state::pgm_drgw2_decrypt()
}
// All tables all xored by 'warning' information at $1354ee (drgw2)
// tables are the same as drgw3 and olds
static const UINT8 drgw2_source_data[0x08][0xec] =
{
{ 0, }, // Region 0, not used
@ -142,7 +143,7 @@ READ16_MEMBER(pgm_012_025_state::drgw2_d80000_protection_r )
{
switch (m_drgw2_cmd)
{
case 0x05:
case 0x05:
{
switch (m_drgw2_ptr)
{

View File

@ -186,6 +186,7 @@ static const UINT8 killbld_source_data[0x0c][0xec] = // offsets to these tables
};
// all tables xored with data from $149c4c
// tables are the same as olds and drgw2
static const UINT8 dw3_source_data[0x07][0xec] =
{
{ // region 1, $14c21a

View File

@ -14,7 +14,6 @@
IGS025 is some kind of state machine, bitswaps etc.
Simulation is incomplete
- Register simulation incomplete
- DMA Mode 0 decryption unknown
***********************************************************************/
@ -23,8 +22,12 @@
#include "includes/pgm.h"
// tables are xored by table at $1998dc
static const UINT8 olds_source_data[7][0xec] = // table addresses $2951CA
// tables are the same as drgw3 and drgw2
static const UINT8 olds_source_data[8][0xec] = // table addresses $2951CA
{
{ // region 0, unused...
0,
},
{ // region 1, $1A669A
0x67, 0x51, 0xf3, 0x19, 0xa0, 0x11, 0xe1, 0x11, 0x10, 0xee, 0xe3, 0xf6, 0xbe, 0x81, 0x35, 0xe3,
0xfb, 0xe6, 0xef, 0xdf, 0x61, 0x01, 0xfa, 0x22, 0x5d, 0x43, 0x01, 0xa5, 0x3b, 0x17, 0xd4, 0x74,
@ -183,7 +186,7 @@ void pgm_028_025_state::IGS028_do_dma(UINT16 src, UINT16 dst, UINT16 size, UINT1
UINT16 param = mode >> 8;
UINT16 *PROTROM = (UINT16*)memregion("user1")->base();
// logerror ("mode: %2.2x, src: %4.4x, dst: %4.4x, size: %4.4x, data: %4.4x\n", (mode &0xf), src, dst, size, mode);
// logerror ("mode: %2.2x, src: %4.4x, dst: %4.4x, size: %4.4x, data: %4.4x\n", (mode &0xf), src, dst, size, mode);
mode &= 0x0f;
@ -211,7 +214,7 @@ void pgm_028_025_state::IGS028_do_dma(UINT16 src, UINT16 dst, UINT16 size, UINT1
if (mode==0) dat2 = 0x4e75; // hack
if (mode==1) dat2 = ((dat2 & 0xf000) >> 12) | ((dat2 & 0x0f00) >> 4) | ((dat2 & 0x00f0) << 4) | ((dat2 & 0x000f) << 12);
if (mode==2) dat2 ^= extraxor;
//if (mode==5) dat2 = dat2;
// if (mode==5) dat2 = dat2;
if (mode==6) dat2 += extraxor;
if (mode==2 || mode==6) dat2 = (dat2<<8)|(dat2>>8);
@ -221,8 +224,8 @@ void pgm_028_025_state::IGS028_do_dma(UINT16 src, UINT16 dst, UINT16 size, UINT1
}
break;
//default:
// logerror ("DMA mode unknown!!!\nsrc:%4.4x, dst: %4.4x, size: %4.4x, mode: %4.4x\n", src, dst, size, mode);
// default:
// logerror ("DMA mode unknown!!!\nsrc:%4.4x, dst: %4.4x, size: %4.4x, mode: %4.4x\n", src, dst, size, mode);
}
}
@ -250,7 +253,7 @@ void pgm_028_025_state::olds_protection_calculate_hilo() // calculated in routin
m_olds_prot_hilo_select = 0;
}
source = olds_source_data[ioport("Region")->read() - 1][m_olds_prot_hilo_select];
source = olds_source_data[ioport("Region")->read()][m_olds_prot_hilo_select];
if (m_olds_prot_hilo_select & 1) // $8178fa
{
@ -299,15 +302,42 @@ WRITE16_MEMBER(pgm_028_025_state::olds_w )
}
break;
case 0x64: // incomplete...
case 0x64: // incomplete?
{
UINT16 p1 = m_sharedprotram[0x3050 / 2];
UINT16 p2 = m_sharedprotram[0x3082 / 2];
UINT16 p1 = m_sharedprotram[0x3050 / 2];
UINT16 p2 = m_sharedprotram[0x3082 / 2];
UINT16 p3 = m_sharedprotram[0x3054 / 2];
UINT16 p4 = m_sharedprotram[0x3088 / 2];
// logerror ("p1: %4.4x, p2: %4.4x\n", p1, p2);
if (p2 == 0x02)
olds_write_reg(p1, olds_read_reg(p1) + 0x10000);
if (p2 == 0x02)
olds_write_reg(p1, olds_read_reg(p1) + 0x10000);
switch (p4)
{
case 0xd:
olds_write_reg(p1,olds_read_reg(p3));
break;
case 0x0:
olds_write_reg(p3,(olds_read_reg(p2))^(olds_read_reg(p1)));
break;
case 0xe:
olds_write_reg(p3,olds_read_reg(p3)+0x10000);
break;
case 0x2:
olds_write_reg(p1,(olds_read_reg(p2))+(olds_read_reg(p3)));
break;
case 0x6:
olds_write_reg(p3,(olds_read_reg(p2))&(olds_read_reg(p1)));
break;
case 0x1:
olds_write_reg(p2,olds_read_reg(p1)+0x10000);
break;
case 0x7:
olds_write_reg(p3,olds_read_reg(p1));
break;
default:
break;
}
}
break;
@ -335,8 +365,8 @@ WRITE16_MEMBER(pgm_028_025_state::olds_w )
olds_protection_calculate_hold(m_olds_cmd & 0x0f, data & 0xff);
break;
// default:
// logerror ("unemulated write mode!\n");
// default:
// logerror ("unemulated write mode!\n");
}
}
}
@ -390,26 +420,13 @@ MACHINE_RESET_MEMBER(pgm_028_025_state,olds)
{
MACHINE_RESET_CALL_MEMBER(pgm);
// written by protection device
// there seems to be an auto-dma that writes from $401000-402573?
// written by protection device
// there seems to be an auto-dma that writes from $401000-402573?
m_sharedprotram[0x1000/2] = 0x4749; // 'IGS.28'
m_sharedprotram[0x1002/2] = 0x2E53;
m_sharedprotram[0x1004/2] = 0x3832;
m_sharedprotram[0x3064/2] = 0xB315; // crc or status check?
// Should these be written by command 64??
// m_sharedprotram[0x2a00/2] = 0x0000; // ?
// m_sharedprotram[0x2a02/2] = 0x0000; // ?
m_sharedprotram[0x2a04/2] = 0x0002; // ?
// m_sharedprotram[0x2a06/2] = 0x0000; // ?
// m_sharedprotram[0x2ac0/2] = 0x0000; // ?
m_sharedprotram[0x2ac2/2] = 0x0001; // ?
// m_sharedprotram[0x2e00/2] = 0x0000; // ?
// m_sharedprotram[0x2e02/2] = 0x0000; // ?
// m_sharedprotram[0x2e04/2] = 0x0000; // ?
m_sharedprotram[0x2e06/2] = 0x0009; // seconds on char. select timer
// m_sharedprotram[0x2e08/2] = 0x0000; // ?
m_sharedprotram[0x2e0a/2] = 0x0006; // ?
m_sharedprotram[0x3064/2] = 0xB315; // crc?
}
DRIVER_INIT_MEMBER(pgm_028_025_state,olds)