mirror of
https://github.com/holub/mame
synced 2025-05-22 05:38:52 +03:00
Haze: some refactoring, based on new findings
This commit is contained in:
parent
29facb8844
commit
806eb20af0
@ -148,27 +148,34 @@ ASIC 3:
|
||||
function:
|
||||
|
||||
ASIC 25 + ASIC 12
|
||||
these seem to be used together
|
||||
ASIC 25 appears to perform some kind of bitswap operations
|
||||
ASIC25 is a logic device (not MCU) which performs bitswap operations
|
||||
ASIC12 is ... ? (rom overlays?)
|
||||
|
||||
used by:
|
||||
Dragon World 2
|
||||
|
||||
ASIC 25 + ASIC 22
|
||||
ASIC25 provides some bitswap / maths etc. features
|
||||
ASIC22 acts as an encrypted DMA device (ASIC22 can be swapped between games with no side-effects, ASIC25 can't)
|
||||
ASIC25 is a logic device (not MCU) which performs bitswap operations, and connects to the ASIC22. It differs per region.
|
||||
ASIC22 is an MCU and acts as an encrypted DMA device
|
||||
|
||||
(ASIC22 can be swapped between games with no side-effects, ASIC25 can't)
|
||||
|
||||
used by:
|
||||
Dragon World 3
|
||||
The Killing Blade
|
||||
|
||||
ASIC 25 + ASIC 28
|
||||
ASIC25 provides some bitswap / maths etc. features
|
||||
ASIC25 (see above)
|
||||
ASIC28 acts as an encrypted DMA device (updated version of ASIC22 with different encryption etc.)
|
||||
|
||||
used by:
|
||||
Oriental Legend Super
|
||||
|
||||
ASIC 27 (55857E):
|
||||
performs a variety of calculations, quite complex, different per region, supplies region code
|
||||
|
||||
used by:
|
||||
Knights of Valour 1 / Plus
|
||||
Knights of Valour 1 / (Plus?)
|
||||
Photo Y2k / Real and Fake
|
||||
|
||||
ASIC 27A(55857F/55857G):
|
||||
@ -294,6 +301,7 @@ Notes:
|
||||
#include "includes/pgm.h"
|
||||
|
||||
UINT16 *pgm_mainram;
|
||||
static void IGS022_reset(running_machine* machine);
|
||||
|
||||
static WRITE16_HANDLER( pgm_videoram_w )
|
||||
{
|
||||
@ -1945,8 +1953,8 @@ ROM_START( drgw3 )
|
||||
ROM_REGION( 0x40000, "user2", 0 ) /* RAM dump - to be removed once the DMA is hooked up */
|
||||
ROM_LOAD16_WORD_SWAP( "dw3c_prot_ramdump", 0x0000, 0x4000, CRC(6b4fc08b) SHA1(61583637c2f1767df4bc637f922987c9510a584f) )
|
||||
|
||||
ROM_REGION( 0x010000, "user1", 0 ) /* Protection Data - is it correct for this set? */
|
||||
ROM_LOAD( "dw3_v100.u15", 0x000000, 0x010000, CRC(03dc4fdf) SHA1(b329b04325d4f725231b1bb7862eedef2319b652) )
|
||||
ROM_REGION( 0x010000, "igs022data", 0 ) /* Protection Data - is it correct for this set? */
|
||||
ROM_LOAD16_WORD_SWAP( "dw3_v100.u15", 0x000000, 0x010000, CRC(03dc4fdf) SHA1(b329b04325d4f725231b1bb7862eedef2319b652) )
|
||||
|
||||
ROM_REGION( 0xc00000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
|
||||
ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
|
||||
@ -1980,8 +1988,8 @@ ROM_START( drgw3105 )
|
||||
|
||||
/* CPU2 = Z80, romless, code uploaded by 68k */
|
||||
|
||||
ROM_REGION( 0x010000, "user1", 0 ) /* Protection Data - is it correct for this set? */
|
||||
ROM_LOAD( "dw3_v100.u15", 0x000000, 0x010000, CRC(03dc4fdf) SHA1(b329b04325d4f725231b1bb7862eedef2319b652) )
|
||||
ROM_REGION( 0x010000, "igs022data", 0 ) /* Protection Data - is it correct for this set? */
|
||||
ROM_LOAD16_WORD_SWAP( "dw3_v100.u15", 0x000000, 0x010000, CRC(03dc4fdf) SHA1(b329b04325d4f725231b1bb7862eedef2319b652) )
|
||||
|
||||
ROM_REGION( 0xc00000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
|
||||
ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
|
||||
@ -2036,8 +2044,8 @@ ROM_START( drgw3100 )
|
||||
ROM_REGION( 0x40000, "user2", 0 ) /* RAM dump - to be removed once the DMA is hooked up */
|
||||
ROM_LOAD16_WORD_SWAP( "dw3c_prot_ramdump", 0x0000, 0x4000, CRC(6b4fc08b) SHA1(61583637c2f1767df4bc637f922987c9510a584f) )
|
||||
|
||||
ROM_REGION( 0x010000, "user1", 0 ) /* Protection Data */
|
||||
ROM_LOAD( "dw3_v100.u15", 0x000000, 0x010000, CRC(03dc4fdf) SHA1(b329b04325d4f725231b1bb7862eedef2319b652) )
|
||||
ROM_REGION( 0x010000, "igs022data", 0 ) /* Protection Data */
|
||||
ROM_LOAD16_WORD_SWAP( "dw3_v100.u15", 0x000000, 0x010000, CRC(03dc4fdf) SHA1(b329b04325d4f725231b1bb7862eedef2319b652) )
|
||||
|
||||
ROM_REGION( 0xc00000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
|
||||
ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
|
||||
@ -2551,7 +2559,7 @@ ROM_START( killbld )
|
||||
|
||||
/* CPU2 = Z80, romless, code uploaded by 68k */
|
||||
|
||||
ROM_REGION( 0x010000, "user1", 0 ) /* Protection Data */
|
||||
ROM_REGION( 0x010000, "igs022data", 0 ) /* Protection Data */
|
||||
ROM_LOAD16_WORD_SWAP( "kb_u2.rom", 0x000000, 0x010000, CRC(de3eae63) SHA1(03af767ef764055bda528b5cc6a24b9e1218cca8) )
|
||||
|
||||
ROM_REGION( 0x800000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
|
||||
@ -2592,7 +2600,7 @@ ROM_START( killbld104 )
|
||||
|
||||
/* CPU2 = Z80, romless, code uploaded by 68k */
|
||||
|
||||
ROM_REGION( 0x010000, "user1", 0 ) /* Protection Data */
|
||||
ROM_REGION( 0x010000, "igs022data", 0 ) /* Protection Data */
|
||||
ROM_LOAD16_WORD_SWAP( "kb_u2_v104.u2", 0x000000, 0x010000, CRC(c970f6d5) SHA1(399fc6f80262784c566363c847dc3fdc4fb37494) )
|
||||
|
||||
ROM_REGION( 0x800000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
|
||||
@ -2773,7 +2781,7 @@ ROM_START( olds )
|
||||
|
||||
/* CPU2 = Z80, romless, code uploaded by 68k */
|
||||
|
||||
ROM_REGION( 0x010000, "user1", 0 ) /* ASIC25? Protection Data */
|
||||
ROM_REGION( 0x010000, "user1", 0 ) /* IGS028 Protection Data */
|
||||
ROM_LOAD( "sp_v101.u6", 0x000000, 0x010000, CRC(097046bc) SHA1(6d75db85cf4c79b63e837897785c253014b2126d) )
|
||||
|
||||
ROM_REGION( 0x4000, "user2", ROMREGION_ERASEFF ) /* its a dump of the shared protection rom/ram from pcb. */
|
||||
@ -2824,7 +2832,7 @@ ROM_START( olds100 )
|
||||
// used to simulate encrypted DMA protection device for now ..
|
||||
ROM_LOAD( "ram_dump", 0x000000, 0x04000, CRC(280cfb4e) SHA1(cd2bdcaa21347952c2bf38b105a204d327fde39e) )
|
||||
|
||||
ROM_REGION( 0x010000, "user1", 0 ) /* ASIC25? Protection Data */
|
||||
ROM_REGION( 0x010000, "user1", 0 ) /* IGS028 Protection Data */
|
||||
ROM_LOAD( "kd-u6.512", 0x000000, 0x010000, CRC(e7613dda) SHA1(0d7c043b90e2f9a36a45066f22e3e305dc716676) )
|
||||
|
||||
ROM_REGION( 0xc00000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
|
||||
@ -2864,7 +2872,7 @@ ROM_START( olds100a )
|
||||
|
||||
/* CPU2 = Z80, romless, code uploaded by 68k */
|
||||
|
||||
ROM_REGION( 0x010000, "user1", ROMREGION_ERASEFF ) /* ASIC25? Protection Data */
|
||||
ROM_REGION( 0x010000, "user1", ROMREGION_ERASEFF ) /* IGS028 Protection Data */
|
||||
/* missing from this set .. */
|
||||
|
||||
ROM_REGION( 0x4000, "user2", ROMREGION_ERASEFF ) /* its a dump of the shared protection rom/ram from pcb. */
|
||||
@ -4174,78 +4182,20 @@ static DRIVER_INIT( dmnfrnt )
|
||||
}
|
||||
|
||||
|
||||
/* Killing Blade uses some kind of DMA protection device which can copy data from a data rom. The
|
||||
MCU appears to have an internal ROM as if you remove the data ROM then the shared ram is filled
|
||||
with a constant value.
|
||||
/* The IGS022 is an MCU which performs encrypted DMA used by
|
||||
- The Killing Blade
|
||||
- Dragon World 3
|
||||
|
||||
The device can perform various decryption operations on the data it copies.
|
||||
There is also an automatic transfer which happens on startup using params stored in the data ROM.
|
||||
This has been verified on real hardware running without any 68k game program.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
static WRITE16_HANDLER( killbld_prot_w )
|
||||
static void IGS022_do_dma(running_machine* machine, UINT16 src, UINT16 dst, UINT16 size, UINT16 mode)
|
||||
{
|
||||
// mame_printf_debug("killbrd prot r\n");
|
||||
// return 0;
|
||||
pgm_state *state = (pgm_state *)space->machine->driver_data;
|
||||
offset &= 0xf;
|
||||
|
||||
if (offset == 0)
|
||||
state->kb_cmd = data;
|
||||
else //offset==2
|
||||
{
|
||||
logerror("%06X: ASIC25 W CMD %X VAL %X\n", cpu_get_pc(space->cpu), state->kb_cmd, data);
|
||||
if (state->kb_cmd == 0)
|
||||
state->kb_reg = data;
|
||||
else if (state->kb_cmd == 2)
|
||||
{
|
||||
if (data == 1) //Execute cmd
|
||||
{
|
||||
UINT16 cmd = state->sharedprotram[0x200/2];
|
||||
//mame_printf_debug("command %04x\n", cmd);
|
||||
if (cmd == 0x6d) //Store values to asic ram
|
||||
{
|
||||
UINT32 p1 = (state->sharedprotram[0x298/2] << 16) | state->sharedprotram[0x29a/2];
|
||||
UINT32 p2 = (state->sharedprotram[0x29c/2] << 16) | state->sharedprotram[0x29e/2];
|
||||
|
||||
if ((p2 & 0xffff) == 0x9) //Set value
|
||||
{
|
||||
int reg = (p2 >> 16) & 0xffff;
|
||||
if (reg & 0x200)
|
||||
state->kb_regs[reg & 0xff] = p1;
|
||||
}
|
||||
if ((p2 & 0xffff) == 0x6) //Add value
|
||||
{
|
||||
int src1 = (p1 >> 16) & 0xff;
|
||||
int src2 = (p1 >> 0) & 0xff;
|
||||
int dst = (p2 >> 16) & 0xff;
|
||||
state->kb_regs[dst] = state->kb_regs[src2] - state->kb_regs[src1];
|
||||
}
|
||||
if ((p2 & 0xffff) == 0x1) //Add Imm?
|
||||
{
|
||||
int reg = (p2 >> 16) & 0xff;
|
||||
int imm = (p1 >> 0) & 0xffff;
|
||||
state->kb_regs[reg] += imm;
|
||||
}
|
||||
if ((p2 & 0xffff) == 0xa) //Get value
|
||||
{
|
||||
int reg = (p1 >> 16) & 0xFF;
|
||||
state->sharedprotram[0x29c/2] = (state->kb_regs[reg] >> 16) & 0xffff;
|
||||
state->sharedprotram[0x29e/2] = state->kb_regs[reg] & 0xffff;
|
||||
}
|
||||
}
|
||||
if(cmd == 0x4f) //memcpy with encryption / scrambling
|
||||
{
|
||||
UINT16 src = state->sharedprotram[0x290 / 2] >> 1; // ?
|
||||
UINT32 dst = state->sharedprotram[0x292 / 2];
|
||||
UINT16 size = state->sharedprotram[0x294 / 2];
|
||||
UINT16 mode = state->sharedprotram[0x296 / 2];
|
||||
|
||||
pgm_state *state = (pgm_state *)machine->driver_data;
|
||||
UINT16 param;
|
||||
|
||||
// int a=1;
|
||||
// if(src==0x580)
|
||||
// int a=1;
|
||||
/*
|
||||
P_SRC =0x300290 (offset from prot rom base)
|
||||
P_DST =0x300292 (words from 0x300000)
|
||||
@ -4265,13 +4215,8 @@ static WRITE16_HANDLER( killbld_prot_w )
|
||||
param = mode >> 8;
|
||||
mode &=0xf; // what are the other bits?
|
||||
|
||||
if (mode == 0)
|
||||
{
|
||||
mame_printf_debug("unhandled copy mode %04x!\n", mode);
|
||||
// not used by killing blade
|
||||
/* plain byteswapped copy */
|
||||
}
|
||||
if ((mode == 1) || (mode == 2) || (mode == 3))
|
||||
|
||||
if ((mode == 0) || (mode == 1) || (mode == 2) || (mode == 3))
|
||||
{
|
||||
/* mode3 applies a xor from a 0x100 byte table to the data being
|
||||
transferred
|
||||
@ -4321,7 +4266,7 @@ static WRITE16_HANDLER( killbld_prot_w )
|
||||
};
|
||||
*/
|
||||
int x;
|
||||
UINT16 *PROTROM = (UINT16*)memory_region(space->machine, "user1");
|
||||
UINT16 *PROTROM = (UINT16*)memory_region(machine, "igs022data");
|
||||
|
||||
for (x = 0; x < size; x++)
|
||||
{
|
||||
@ -4331,11 +4276,12 @@ static WRITE16_HANDLER( killbld_prot_w )
|
||||
UINT16 dat2 = PROTROM[src + x];
|
||||
|
||||
UINT8 extraoffset = param&0xfe; // the lowest bit changed the table addressing in tests, see 'rawDataOdd' table instead.. it's still related to the main one, not identical
|
||||
UINT8* dectable = (UINT8*)memory_region(space->machine, "user1");//rawDataEven; // the basic decryption table is at the start of the mcu data rom! at least in killbld
|
||||
UINT8* dectable = (UINT8*)memory_region(machine, "igs022data");//rawDataEven; // the basic decryption table is at the start of the mcu data rom! at least in killbld
|
||||
UINT16 extraxor = ((dectable[((x*2)+0+extraoffset)&0xff]) << 8) | (dectable[((x*2)+1+extraoffset)&0xff] << 0);
|
||||
|
||||
dat2 = ((dat2 & 0x00ff)<<8) | ((dat2 & 0xff00)>>8);
|
||||
|
||||
// mode==0 plain
|
||||
if (mode==3) dat2 ^= extraxor;
|
||||
if (mode==2) dat2 += extraxor;
|
||||
if (mode==1) dat2 -= extraxor;
|
||||
@ -4362,7 +4308,7 @@ static WRITE16_HANDLER( killbld_prot_w )
|
||||
{
|
||||
/* mode 5 seems to be a straight copy */
|
||||
int x;
|
||||
UINT16 *PROTROM = (UINT16*)memory_region(space->machine, "user1");
|
||||
UINT16 *PROTROM = (UINT16*)memory_region(machine, "igs022data");
|
||||
for (x = 0; x < size; x++)
|
||||
{
|
||||
UINT16 dat = PROTROM[src + x];
|
||||
@ -4375,7 +4321,7 @@ static WRITE16_HANDLER( killbld_prot_w )
|
||||
{
|
||||
/* mode 6 seems to swap bytes and nibbles */
|
||||
int x;
|
||||
UINT16 *PROTROM = (UINT16*)memory_region(space->machine, "user1");
|
||||
UINT16 *PROTROM = (UINT16*)memory_region(machine, "igs022data");
|
||||
for (x = 0; x < size; x++)
|
||||
{
|
||||
UINT16 dat = PROTROM[src + x];
|
||||
@ -4401,8 +4347,106 @@ static WRITE16_HANDLER( killbld_prot_w )
|
||||
/* invalid? */
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// the internal MCU boot code automatically does this DMA
|
||||
static void IGS022_reset(running_machine* machine)
|
||||
{
|
||||
int i;
|
||||
UINT16 *PROTROM = (UINT16*)memory_region(machine, "igs022data");
|
||||
pgm_state *state = (pgm_state *)machine->driver_data;
|
||||
|
||||
// fill ram with A5 patern
|
||||
for (i = 0; i < 0x4000/2; i++)
|
||||
state->sharedprotram[i] = 0xa5a5;
|
||||
|
||||
// the auto-dma
|
||||
UINT16 src = PROTROM[0x100 / 2];
|
||||
UINT32 dst = PROTROM[0x102 / 2];
|
||||
UINT16 size = PROTROM[0x104/ 2];
|
||||
UINT16 mode = PROTROM[0x106 / 2];
|
||||
|
||||
src = ((src & 0xff00) >> 8) | ((src & 0x00ff) << 8);
|
||||
dst = ((dst & 0xff00) >> 8) | ((dst & 0x00ff) << 8);
|
||||
size = ((size & 0xff00) >> 8) | ((size & 0x00ff) << 8);
|
||||
mode &= 0xff;
|
||||
|
||||
src >>= 1;
|
||||
|
||||
printf("Auto-DMA %04x %04x %04x %04x\n",src,dst,size,mode);
|
||||
|
||||
IGS022_do_dma(machine,src,dst,size,mode);
|
||||
|
||||
}
|
||||
|
||||
static void IGS022_handle_command(running_machine* machine)
|
||||
{
|
||||
pgm_state *state = (pgm_state *)machine->driver_data;
|
||||
UINT16 cmd = state->sharedprotram[0x200/2];
|
||||
//mame_printf_debug("command %04x\n", cmd);
|
||||
if (cmd == 0x6d) //Store values to asic ram
|
||||
{
|
||||
UINT32 p1 = (state->sharedprotram[0x298/2] << 16) | state->sharedprotram[0x29a/2];
|
||||
UINT32 p2 = (state->sharedprotram[0x29c/2] << 16) | state->sharedprotram[0x29e/2];
|
||||
|
||||
if ((p2 & 0xffff) == 0x9) //Set value
|
||||
{
|
||||
int reg = (p2 >> 16) & 0xffff;
|
||||
if (reg & 0x200)
|
||||
state->kb_regs[reg & 0xff] = p1;
|
||||
}
|
||||
if ((p2 & 0xffff) == 0x6) //Add value
|
||||
{
|
||||
int src1 = (p1 >> 16) & 0xff;
|
||||
int src2 = (p1 >> 0) & 0xff;
|
||||
int dst = (p2 >> 16) & 0xff;
|
||||
state->kb_regs[dst] = state->kb_regs[src2] - state->kb_regs[src1];
|
||||
}
|
||||
if ((p2 & 0xffff) == 0x1) //Add Imm?
|
||||
{
|
||||
int reg = (p2 >> 16) & 0xff;
|
||||
int imm = (p1 >> 0) & 0xffff;
|
||||
state->kb_regs[reg] += imm;
|
||||
}
|
||||
if ((p2 & 0xffff) == 0xa) //Get value
|
||||
{
|
||||
int reg = (p1 >> 16) & 0xFF;
|
||||
state->sharedprotram[0x29c/2] = (state->kb_regs[reg] >> 16) & 0xffff;
|
||||
state->sharedprotram[0x29e/2] = state->kb_regs[reg] & 0xffff;
|
||||
}
|
||||
}
|
||||
if(cmd == 0x4f) //memcpy with encryption / scrambling
|
||||
{
|
||||
UINT16 src = state->sharedprotram[0x290 / 2] >> 1; // ?
|
||||
UINT32 dst = state->sharedprotram[0x292 / 2];
|
||||
UINT16 size = state->sharedprotram[0x294 / 2];
|
||||
UINT16 mode = state->sharedprotram[0x296 / 2];
|
||||
|
||||
IGS022_do_dma(machine, src,dst,size,mode);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
static WRITE16_HANDLER( killbld_igs025_prot_w )
|
||||
{
|
||||
// mame_printf_debug("killbrd prot r\n");
|
||||
// return 0;
|
||||
pgm_state *state = (pgm_state *)space->machine->driver_data;
|
||||
offset &= 0xf;
|
||||
|
||||
if (offset == 0)
|
||||
state->kb_cmd = data;
|
||||
else //offset==2
|
||||
{
|
||||
logerror("%06X: ASIC25 W CMD %X VAL %X\n", cpu_get_pc(space->cpu), state->kb_cmd, data);
|
||||
if (state->kb_cmd == 0)
|
||||
state->kb_reg = data;
|
||||
else if (state->kb_cmd == 2)
|
||||
{
|
||||
if (data == 1) //Execute cmd
|
||||
{
|
||||
IGS022_handle_command(space->machine);
|
||||
state->kb_reg++;
|
||||
}
|
||||
}
|
||||
@ -4413,7 +4457,7 @@ static WRITE16_HANDLER( killbld_prot_w )
|
||||
}
|
||||
}
|
||||
|
||||
static READ16_HANDLER( killbld_prot_r )
|
||||
static READ16_HANDLER( killbld_igs025_prot_r )
|
||||
{
|
||||
// mame_printf_debug("killbld prot w\n");
|
||||
pgm_state *state = (pgm_state *)space->machine->driver_data;
|
||||
@ -4438,16 +4482,13 @@ static READ16_HANDLER( killbld_prot_r )
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static MACHINE_RESET( killbld )
|
||||
{
|
||||
pgm_state *state = (pgm_state *)machine->driver_data;
|
||||
int i;
|
||||
|
||||
MACHINE_RESET_CALL(pgm);
|
||||
|
||||
/* fill the protection ram with a5 */
|
||||
for (i = 0; i < 0x4000/2; i++)
|
||||
state->sharedprotram[i] = 0xa5a5;
|
||||
/* fill the protection ram with a5 + auto dma */
|
||||
IGS022_reset(machine);
|
||||
}
|
||||
|
||||
|
||||
@ -4461,7 +4502,7 @@ static DRIVER_INIT( killbld )
|
||||
pgm_basic_init(machine);
|
||||
pgm_killbld_decrypt(machine);
|
||||
|
||||
memory_install_readwrite16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xd40000, 0xd40003, 0, 0, killbld_prot_r, killbld_prot_w);
|
||||
memory_install_readwrite16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xd40000, 0xd40003, 0, 0, killbld_igs025_prot_r, killbld_igs025_prot_w);
|
||||
|
||||
state->kb_cmd = 0;
|
||||
state->kb_reg = 0;
|
||||
@ -4476,14 +4517,11 @@ static DRIVER_INIT( killbld )
|
||||
|
||||
static MACHINE_RESET( dw3 )
|
||||
{
|
||||
//pgm_state *state = (pgm_state *)machine->driver_data;
|
||||
//int i;
|
||||
|
||||
MACHINE_RESET_CALL(pgm);
|
||||
/* fill the protection ram with a5 + auto dma - causes issues at the moment due to broken igs025/22 emulation for this game! */
|
||||
if (0)
|
||||
IGS022_reset(machine);
|
||||
|
||||
/* fill the protection ram with a5 - not until the DMA device is emulated! */
|
||||
//for (i = 0; i < 0x4000/2; i++)
|
||||
// state->sharedprotram[i] = 0xa5a5;
|
||||
}
|
||||
|
||||
|
||||
@ -4493,7 +4531,7 @@ static int ptr=0;
|
||||
|
||||
#define DW3BITSWAP(s,d,bs,bd) d=((d&(~(1<<bd)))|(((s>>bs)&1)<<bd))
|
||||
static UINT8 dw3_swap;
|
||||
static WRITE16_HANDLER( dw3_prot_w )
|
||||
static WRITE16_HANDLER( drgw3_igs025_prot_w )
|
||||
{
|
||||
pgm_state *state = (pgm_state *)space->machine->driver_data;
|
||||
|
||||
@ -4519,7 +4557,7 @@ static WRITE16_HANDLER( dw3_prot_w )
|
||||
}
|
||||
}
|
||||
|
||||
static READ16_HANDLER( dw3_prot_r )
|
||||
static READ16_HANDLER( drgw3_igs025_prot_r )
|
||||
{
|
||||
// mame_printf_debug("killbld prot w\n");
|
||||
pgm_state *state = (pgm_state *)space->machine->driver_data;
|
||||
@ -4579,7 +4617,7 @@ static DRIVER_INIT( dw3 )
|
||||
if((x>=0x100)&&(x<0x110)) printf("data 0x%4x, offset:%x\n",state->sharedprotram[x],x);
|
||||
}
|
||||
}
|
||||
memory_install_readwrite16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xDA5610, 0xDA5613, 0, 0, dw3_prot_r, dw3_prot_w);
|
||||
memory_install_readwrite16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0xDA5610, 0xDA5613, 0, 0, drgw3_igs025_prot_r, drgw3_igs025_prot_w);
|
||||
|
||||
pgm_dw3_decrypt(machine);
|
||||
}
|
||||
@ -4904,6 +4942,8 @@ GAME( 2001, puzzli2, pgm, kov, sango, puzzli2, ROT0, "IGS
|
||||
GAME( 2002, dmnfrnt, pgm, svg, sango, dmnfrnt, ROT0, "IGS", "Demon Front (ver. 102)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
|
||||
GAME( 2002, dmnfrnta, dmnfrnt, svg, sango, dmnfrnt, ROT0, "IGS", "Demon Front (ver. 105)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
|
||||
|
||||
/* Games below this point are known to have an 'execute only' internal ROM area covering an area at the start of the internal ROM. This can't be read when running code from either internal or external ROM space. */
|
||||
|
||||
GAME( 2003, theglad, pgm, svg, sango, theglad, ROT0, "IGS", "The Gladiator (ver. 100)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
|
||||
GAME( 2003, theglada, theglad, svg, sango, theglad, ROT0, "IGS", "The Gladiator (ver. 101)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user