mirror of
https://github.com/holub/mame
synced 2025-05-22 21:58:57 +03:00
Major Naomi/Atomiswave update:
- Emulated Atomiswave coin slots and standard Dreamcast controller. Non-lightgun games without other problems are now playable. [R. Belmont] - Added protection data to Moero Justice Gakuen, Heavy Metal Geomatrix, WWF Royal Rumble, Gigawing 2, Toy Fighter, and Guilty Gear X (all are now playable but still marked GAME_NOT_WORKING due to general Naomi concerns). [R. Belmont, Guru, Deunan Knute, Cah4e3] - Completed partial dumps: Derby Owners Club II, Slashout, WWF Royal Rumble, Gigawing 2, Moero Justice Gakuen, Wild Riders, Virtua Fighter 4 (cartridge) [Guru] New games marked as GAME_NOT_WORKING ------------------------------------ The House of the Dead 2 [Guru] Super Major League '99 [Guru] Gun Survivor 2: Bio Hazard Code Veronica [Guru] Club Kart: European Session [Guru] The King of Fighters Neowave [R. Belmont, Guru] Neo Geo Battle Coliseum [R. Belmont, Guru] New games added or promoted from NOT_WORKING status --------------------------------------------------- Dolphin Blue [R. Belmont, Guru] The Rumble Fish [R. Belmont, Guru] Knights of Valour: The Seven Spirits [R. Belmont, Guru]
This commit is contained in:
parent
b12ea76a0d
commit
c01df88b6d
File diff suppressed because it is too large
Load Diff
@ -13,6 +13,8 @@ READ64_HANDLER( dc_sysctrl_r );
|
||||
WRITE64_HANDLER( dc_sysctrl_w );
|
||||
READ64_HANDLER( dc_maple_r );
|
||||
WRITE64_HANDLER( dc_maple_w );
|
||||
READ64_HANDLER( naomi_maple_r );
|
||||
WRITE64_HANDLER( naomi_maple_w );
|
||||
READ64_HANDLER( dc_gdrom_r );
|
||||
WRITE64_HANDLER( dc_gdrom_w );
|
||||
READ64_HANDLER( dc_g1_ctrl_r );
|
||||
|
@ -112,6 +112,26 @@ static const char *const maple_names[] =
|
||||
|
||||
#endif
|
||||
|
||||
static UINT8 dc_controller_id[0x70] =
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x01, 0x00, 0x0f, 0x06, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0x00, 0x44, 0x72, 0x65, 0x61, 0x6d, 0x63, 0x61, 0x73, 0x74, 0x20, 0x43, 0x6f, 0x6e, 0x74,
|
||||
0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
|
||||
0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x20, 0x42, 0x79, 0x20, 0x6f, 0x72, 0x20, 0x55,
|
||||
0x6e, 0x64, 0x65, 0x72, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x46, 0x72, 0x6f,
|
||||
0x6d, 0x20, 0x53, 0x45, 0x47, 0x41, 0x20, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x50, 0x52, 0x49, 0x53,
|
||||
0x45, 0x53, 0x2c, 0x4c, 0x54, 0x44, 0x2e, 0x20, 0x20, 0x20, 0x20, 0x20, 0xae, 0x01, 0xf4, 0x01
|
||||
};
|
||||
|
||||
static UINT8 dc_controller_version[0x50] =
|
||||
{
|
||||
0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x31, 0x2e, 0x30, 0x31, 0x30, 0x2c, 0x31, 0x39,
|
||||
0x39, 0x38, 0x2f, 0x30, 0x39, 0x2f, 0x32, 0x38, 0x2c, 0x33, 0x31, 0x35, 0x2d, 0x36, 0x32, 0x31,
|
||||
0x31, 0x2d, 0x41, 0x42, 0x20, 0x20, 0x20, 0x2c, 0x41, 0x6e, 0x61, 0x6c, 0x6f, 0x67, 0x20, 0x4d,
|
||||
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x20, 0x3a, 0x20, 0x54, 0x68, 0x65, 0x20, 0x34, 0x74, 0x68, 0x20,
|
||||
0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x35, 0x2f, 0x38, 0x20, 0x20, 0x2b, 0x44, 0x46
|
||||
};
|
||||
|
||||
// selected Maple registers
|
||||
enum
|
||||
{
|
||||
@ -517,7 +537,8 @@ WRITE64_HANDLER( dc_sysctrl_w )
|
||||
#endif
|
||||
}
|
||||
|
||||
READ64_HANDLER( dc_maple_r )
|
||||
// Naomi/Naomi2 implementation with Maple/JVS bridging
|
||||
READ64_HANDLER( naomi_maple_r )
|
||||
{
|
||||
int reg;
|
||||
UINT64 shift;
|
||||
@ -530,7 +551,7 @@ READ64_HANDLER( dc_maple_r )
|
||||
return (UINT64)maple_regs[reg] << shift;
|
||||
}
|
||||
|
||||
WRITE64_HANDLER( dc_maple_w )
|
||||
WRITE64_HANDLER( naomi_maple_w )
|
||||
{
|
||||
int reg;
|
||||
UINT64 shift;
|
||||
@ -542,7 +563,7 @@ WRITE64_HANDLER( dc_maple_w )
|
||||
static int jvs_command = 0,jvs_address = 0;
|
||||
int chk;
|
||||
int a;
|
||||
int off,len;
|
||||
int off,len,func;
|
||||
|
||||
reg = decode_reg32_64(space->machine, offset, mem_mask, &shift);
|
||||
dat = (UINT32)(data >> shift);
|
||||
@ -587,6 +608,7 @@ WRITE64_HANDLER( dc_maple_w )
|
||||
command=buff[2] & 255;
|
||||
dap=(buff[2] >> 8) & 255;
|
||||
sap=(buff[2] >> 16) & 255;
|
||||
func = buff[3];
|
||||
//buff[0]=0;
|
||||
//if(buff[1] == 0x700)
|
||||
// printf("%08x %08x",buff[0],buff[2]);
|
||||
@ -602,9 +624,10 @@ WRITE64_HANDLER( dc_maple_w )
|
||||
case 3:
|
||||
ddtdata.length=1;
|
||||
#if DEBUG_MAPLE
|
||||
printf("MAPLE: transfer command %x port %x\n", command, port);
|
||||
printf("MAPLE: transfer command %x port %x length %x\n", command, port, length);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 0x80: // get data and compute checksum
|
||||
ddtdata.length=length;
|
||||
ddtdata.direction=0;
|
||||
@ -842,7 +865,7 @@ WRITE64_HANDLER( dc_maple_w )
|
||||
|
||||
if (endflag)
|
||||
{
|
||||
#if ENABLE_MAPLE_IRQ
|
||||
#if 1 //ENABLE_MAPLE_IRQ
|
||||
/*TODO: this fixes moeru but breaks other games, understand why.*/
|
||||
dc_sysctrl_regs[SB_ISTNRM] |= IST_DMA_MAPLE;
|
||||
dc_update_interrupt_status(space->machine);
|
||||
@ -867,6 +890,160 @@ WRITE64_HANDLER( dc_maple_w )
|
||||
}
|
||||
}
|
||||
|
||||
// implementation for Dreamcast and Atomiswave supports only standard Sega Dreamcast Maple commands and peripherals
|
||||
READ64_HANDLER( dc_maple_r )
|
||||
{
|
||||
int reg;
|
||||
UINT64 shift;
|
||||
|
||||
reg = decode_reg32_64(space->machine, offset, mem_mask, &shift);
|
||||
|
||||
#if DEBUG_MAPLE_REGS
|
||||
mame_printf_verbose("MAPLE: Unmapped read %08x\n", 0x5f6c00+reg*4);
|
||||
#endif
|
||||
return (UINT64)maple_regs[reg] << shift;
|
||||
}
|
||||
|
||||
WRITE64_HANDLER( dc_maple_w )
|
||||
{
|
||||
int reg, func;
|
||||
UINT64 shift;
|
||||
UINT32 old,dat;
|
||||
struct sh4_ddt_dma ddtdata;
|
||||
UINT32 buff[512];
|
||||
UINT32 endflag,port,pattern,length,command,dap,sap,destination;
|
||||
|
||||
reg = decode_reg32_64(space->machine, offset, mem_mask, &shift);
|
||||
dat = (UINT32)(data >> shift);
|
||||
old = maple_regs[reg];
|
||||
|
||||
#if DEBUG_MAPLE_REGS
|
||||
mame_printf_verbose("MAPLE: [%08x=%x] write %" I64FMT "x to %x (reg %x: %s), mask %" I64FMT "x\n", 0x5f6c00+reg*4, dat, data >> shift, offset, reg, maple_names[reg], mem_mask);
|
||||
#endif
|
||||
|
||||
maple_regs[reg] = dat; // 5f6c00+reg*4=dat
|
||||
switch (reg)
|
||||
{
|
||||
case SB_MDST:
|
||||
maple_regs[reg] = old;
|
||||
if (!(old & 1) && (dat & 1) && maple_regs[SB_MDEN] & 1) // 0 -> 1
|
||||
{
|
||||
if (!(maple_regs[SB_MDTSEL] & 1))
|
||||
{
|
||||
maple_regs[reg] = 1;
|
||||
dat=maple_regs[SB_MDSTAR];
|
||||
// printf("Maple DMA: %08x %08x %08x %08x\n",maple_regs[SB_MDSTAR],maple_regs[SB_MDTSEL],maple_regs[SB_MDEN],maple_regs[SB_MDST]);
|
||||
// printf(" %08x %08x %08x %08x\n",maple_regs[SB_MSYS],maple_regs[SB_MST],maple_regs[SB_MSHTCL],maple_regs[SB_MMSEL]);
|
||||
while (1) // do transfers
|
||||
{
|
||||
ddtdata.source=dat; // source address
|
||||
ddtdata.length=3; // words to transfer
|
||||
ddtdata.size=4; // bytes per word
|
||||
ddtdata.buffer=buff; // destination buffer
|
||||
ddtdata.direction=0; // 0 source to buffer, 1 buffer to source
|
||||
ddtdata.channel= -1; // not used
|
||||
ddtdata.mode= -1; // copy from/to buffer
|
||||
sh4_dma_ddt(cputag_get_cpu(space->machine, "maincpu"), &ddtdata);
|
||||
|
||||
maple_regs[reg] = 0;
|
||||
endflag=buff[0] & 0x80000000;
|
||||
port=(buff[0] >> 16) & 3;
|
||||
pattern=(buff[0] >> 8) & 7;
|
||||
length=buff[0] & 255;
|
||||
//if(length == 0)
|
||||
// length = 0x100;
|
||||
destination=buff[1];
|
||||
command=buff[2] & 255;
|
||||
dap=(buff[2] >> 8) & 255;
|
||||
sap=(buff[2] >> 16) & 255;
|
||||
func = buff[3];
|
||||
//buff[0]=0;
|
||||
//if(buff[1] == 0x700)
|
||||
// printf("%08x %08x",buff[0],buff[2]);
|
||||
ddtdata.size=4;
|
||||
|
||||
if (pattern == 0)
|
||||
{
|
||||
char pL[8], pH[8];
|
||||
|
||||
if (port > 0)
|
||||
buff[0]=0xffffffff;
|
||||
switch (command)
|
||||
{
|
||||
case 1: // AW/DC MAPLE_CMD_INFO
|
||||
ddtdata.length = sizeof(dc_controller_id)/4;
|
||||
|
||||
buff[0] = 5; // MAPLE_RESP_INFO
|
||||
memcpy(&buff[1], dc_controller_id, sizeof(dc_controller_id));
|
||||
break;
|
||||
|
||||
case 2: // AW/DC MAPLE_CMD_EXT_INFO
|
||||
ddtdata.length = sizeof(dc_controller_id)+sizeof(dc_controller_version)/4;
|
||||
|
||||
buff[0] = 6; // MAPLE_RESP_EXT_INFO
|
||||
memcpy(&buff[1], dc_controller_id, sizeof(dc_controller_id));
|
||||
memcpy(&buff[1+(0x70/4)], dc_controller_version, sizeof(dc_controller_version));
|
||||
break;
|
||||
|
||||
case 3: // AW/DC MAPLE_CMD_RESET
|
||||
ddtdata.length=1;
|
||||
#if DEBUG_MAPLE
|
||||
printf("MAPLE: transfer command %x port %x length %x\n", command, port, length);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 9: // AW/DC MAPLE_CMD_GET_COND
|
||||
buff[0] = 8; // MAPLE_RESP_DATA
|
||||
|
||||
sprintf(pL, "P%dL", port+1);
|
||||
sprintf(pH, "P%dH", port+1);
|
||||
|
||||
buff[1] = func;
|
||||
buff[2] = input_port_read(space->machine, pH)<<8 | input_port_read(space->machine, pL) | 0xffff0000;
|
||||
buff[3] = 0xffffffff;
|
||||
ddtdata.length=(8/4)+1;
|
||||
break;
|
||||
default:
|
||||
#if DEBUG_MAPLE
|
||||
printf("MAPLE: unknown transfer command %x port %x\n", command, port);
|
||||
#endif
|
||||
ddtdata.length=0;
|
||||
endflag = 1; /*TODO: check this */
|
||||
//buff[0]=0xffffffff;
|
||||
break;
|
||||
}
|
||||
}
|
||||
ddtdata.destination=destination;
|
||||
ddtdata.buffer=buff;
|
||||
ddtdata.direction=1;
|
||||
sh4_dma_ddt(cputag_get_cpu(space->machine, "maincpu"),&ddtdata);
|
||||
|
||||
if (endflag)
|
||||
{
|
||||
#if ENABLE_MAPLE_IRQ
|
||||
dc_sysctrl_regs[SB_ISTNRM] |= IST_DMA_MAPLE;
|
||||
dc_update_interrupt_status(space->machine);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
// skip fixed packet header
|
||||
dat += 8;
|
||||
// skip transfer data
|
||||
dat += (length + 1) * 4;
|
||||
} // do transfers
|
||||
maple_regs[reg] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
#if DEBUG_MAPLE
|
||||
printf("MAPLE: hardware trigger not supported yet\n");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
INPUT_CHANGED( dc_coin_slots_callback )
|
||||
{
|
||||
UINT32 *counter = (UINT32 *)param;
|
||||
@ -950,7 +1127,7 @@ WRITE64_HANDLER( dc_g1_ctrl_w )
|
||||
mame_printf_verbose("G1CTRL: unsupported transfer\n");
|
||||
return;
|
||||
}
|
||||
// printf("ROM board DMA to %x (PC %x)\n", g1bus_regs[SB_GDSTAR], cpu_get_pc(space->cpu));
|
||||
// printf("ROM board DMA to %x len %x (PC %x)\n", g1bus_regs[SB_GDSTAR], g1bus_regs[SB_GDLEN], cpu_get_pc(space->cpu));
|
||||
ROM = (UINT8 *)devtag_get_info_ptr(space->machine, "rom_board", DEVINFO_PTR_MEMORY);
|
||||
dmaoffset = (UINT32)devtag_get_info_int(space->machine, "rom_board", DEVINFO_INT_DMAOFFSET);
|
||||
ddtdata.destination=g1bus_regs[SB_GDSTAR]; // destination address
|
||||
|
@ -182,6 +182,8 @@ Atomiswave ROM board specs from Cah4e3 @ http://cah4e3.wordpress.com/2009/07/26/
|
||||
#define NAOMIBD_FLAG_SPECIAL_MODE (4) // used to access protection registers
|
||||
#define NAOMIBD_FLAG_ADDRESS_SHUFFLE (2) // 0 to let protection chip en/decrypt, 1 for normal
|
||||
|
||||
#define NAOMIBD_PRINTF_PROTECTION (0) // 1 to printf protection access details
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Prototypes
|
||||
@ -225,6 +227,9 @@ struct _naomibd_state
|
||||
|
||||
UINT32 *prot_translate;
|
||||
int prot_reverse_bytes;
|
||||
#if NAOMIBD_PRINTF_PROTECTION
|
||||
int prot_pio_count;
|
||||
#endif
|
||||
};
|
||||
|
||||
// maps protection offsets to real addresses
|
||||
@ -254,6 +259,39 @@ static naomibd_config_table naomibd_translate_tbl[] =
|
||||
0xad8c, 0, 0xf0000, 0x923d, 0, 0x100000, 0x4a65, 0, 0x110000, 0x9958, 0, 0x120000, 0x8216, 0, 0x130000,
|
||||
0xaa91, 0, 0x140000, 0xd007, 0, 0x150000, 0xead, 0, 0x160000, 0x492, 0, 0x170000,
|
||||
0xffffffff, 0xffffffff, 0xffffffff } },
|
||||
{ "pjustic", 0, { 0x923d, 0, 0, 0x3e41, 0, 0x10000, 0xb7af, 0, 0x20000,
|
||||
0x9651, 0, 0x30000, 0xad8c, 0, 0x40000, 0xffffffff, 0xffffffff, 0xffffffff } },
|
||||
{ "hmgeo", 0, { 0x6cc8, 0, 0x000000, 0x7b92, 0, 0x010000, 0x69bc, 0, 0x020000,
|
||||
0x6d16, 0, 0x030000, 0x6134, 0, 0x040000, 0x1340, 0, 0x050000,
|
||||
0x7716, 0, 0x060000, 0x2e1a, 0, 0x070000, 0x3030, 0, 0x080000,
|
||||
0x0870, 0, 0x090000, 0x2856, 0, 0x0a0000, 0x4224, 0, 0x0b0000,
|
||||
0x6df0, 0, 0x0c0000, 0x0dd8, 0, 0x0d0000, 0x576c, 0, 0x0e0000,
|
||||
0x0534, 0, 0x0f0000, 0x0904, 0, 0x100000, 0x2f14, 0, 0x110000,
|
||||
0x1792, 0, 0x120000, 0x6866, 0, 0x130000, 0x06fa, 0, 0x140000,
|
||||
0x2842, 0, 0x150000, 0x7cc8, 0, 0x160000, 0xffffffff, 0xffffffff, 0xffffffff } },
|
||||
{ "wwfroyal",0, { 0xaaaa, 0, 0, 0xffffffff, 0xffffffff, 0xffffffff } },
|
||||
{ "gwing2", 0, { -1, 0x85ddc0, 0, 0xd567, 0, 0x10000, 0xe329, 0, 0x30000, 0xc112, 0, 0x50000,
|
||||
0xabcd, 0, 0x70000, 0xef01, 0, 0x90000, 0x1234, 0, 0xb0000, 0x5678, 0, 0xd0000,
|
||||
0x5555, 0, 0xf0000, 0x6666, 0, 0x110000, 0xa901, 0, 0x130000, 0xa802, 0, 0x150000,
|
||||
0x3232, 0, 0x170000, 0x8989, 0, 0x190000, 0x6655, 0, 0x1a0000,
|
||||
0x3944, 0, 0x1c0000, 0x655a, 0, 0x1d0000, 0xf513, 0, 0x1e0000,
|
||||
0xb957, 0, 0, 0x37ca, 0, 0, 0xffffffff, 0xffffffff, 0xffffffff } },
|
||||
/* { "pstone2", 0, { 0x4a65, 0, 0x000000, 0x0ead, 0, 0x010000, 0x0492, 0, 0x020000, 0x414a, 0, 0x030000,
|
||||
0xad8c, 0, 0x040000, 0x923d, 0, 0x050000, 0x4a65, 0, 0x060000, 0x9958, 0, 0x070000,
|
||||
0x8216, 0, 0x080000, 0xaa91, 0, 0x090000, 0xd007, 0, 0x0a0000, 0x71ee, 0, 0x0b0000,
|
||||
0x3e41, 0, 0x0c0000, 0xb7af, 0, 0x0d0000, 0x9651, 0, 0x0e0000, 0x0492, 0, 0x0f0000,
|
||||
0x414a, 0, 0x100000, 0xaf99, 0, 0x110000, 0x5182, 0, 0x120000, 0x08aa, 0, 0x130000,
|
||||
0x69d0, 0, 0x140000, 0x9d71, 0, 0x150000, 0xd319, 0, 0x160000, 0xcc09, 0, 0x170000,
|
||||
0x5ec4, 0, 0x180000, 0x7103, 0, 0x190000, 0xffffffff, 0xffffffff, 0xffffffff } },
|
||||
*/
|
||||
{ "toyfight", 0,{ 0x0615, 0, 0x0000, 0x1999, 0, 0x1000, 0x7510, 0, 0x2000, 0x5736, 0, 0x3000,
|
||||
0xffffffff, 0xffffffff, 0xffffffff } },
|
||||
{ "ggx", 0,{ -1, 0x200000, 0x100000, -1, 0x210004, 0x110000, -1, 0x220008, 0x120000, -1, 0x228000, 0x130000,
|
||||
0x3af9, 0, 0x000000, 0x2288, 0, 0x010000, 0xe5e6, 0, 0x020000, 0xebb0, 0, 0x030000,
|
||||
0x0228, 0, 0x040000, 0x872c, 0, 0x050000, 0xbba0, 0, 0x060000, 0x772f, 0, 0x070000,
|
||||
0x2924, 0, 0x080000, 0x3222, 0, 0x090000, 0x7954, 0, 0x0a0000, 0x5acd, 0, 0x0b0000,
|
||||
0xdd19, 0, 0x0c0000, 0x2428, 0, 0x0d0000, 0x3329, 0, 0x0e0000, 0x2142, 0, 0x0f0000,
|
||||
0xffffffff, 0xffffffff, 0xffffffff } },
|
||||
};
|
||||
|
||||
/***************************************************************************
|
||||
@ -378,10 +416,18 @@ READ64_DEVICE_HANDLER( naomibd_r )
|
||||
|
||||
if (v->prot_translate == NULL)
|
||||
{
|
||||
logerror("naomibd: reading protection data, but none was supplied\n");
|
||||
#if NAOMIBD_PRINTF_PROTECTION
|
||||
v->prot_pio_count += 2;
|
||||
printf("naomibd: reading protection data, but none was supplied (now %x bytes)\n", v->prot_pio_count);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if NAOMIBD_PRINTF_PROTECTION
|
||||
v->prot_pio_count += 2;
|
||||
printf("naomibd: PIO read count %x\n", v->prot_pio_count);
|
||||
#endif
|
||||
|
||||
if (v->prot_reverse_bytes)
|
||||
{
|
||||
ret = (UINT64)(prot[byte_offset+1] | (prot[byte_offset]<<8));
|
||||
@ -393,10 +439,12 @@ READ64_DEVICE_HANDLER( naomibd_r )
|
||||
|
||||
v->prot_offset++;
|
||||
}
|
||||
#if NAOMIBD_PRINTF_PROTECTION
|
||||
else
|
||||
{
|
||||
logerror("Bad protection offset read %x\n", v->rom_offset);
|
||||
printf("Bad protection offset read %x\n", v->rom_offset);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -564,6 +612,10 @@ WRITE64_DEVICE_HANDLER( naomibd_w )
|
||||
v->rom_offset &= 0xffff0000;
|
||||
v->rom_offset |= ((data >> 32) & 0xffff);
|
||||
}
|
||||
|
||||
#if NAOMIBD_PRINTF_PROTECTION
|
||||
printf("PIO: offset to %x\n", v->rom_offset);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
@ -593,7 +645,11 @@ WRITE64_DEVICE_HANDLER( naomibd_w )
|
||||
case 0x1fffc: // decryption key
|
||||
v->prot_key = data;
|
||||
|
||||
// printf("Protection: set up read @ %x, key %x (PIO %x DMA %x) [%s]\n", v->prot_offset, v->prot_key, v->rom_offset, v->dma_offset, cpuexec_describe_context(device->machine));
|
||||
#if NAOMIBD_PRINTF_PROTECTION
|
||||
printf("Protection: set up read @ %x, key %x (PIO %x DMA %x) [%s]\n", v->prot_offset*2, v->prot_key, v->rom_offset, v->dma_offset, cpuexec_describe_context(device->machine));
|
||||
|
||||
v->prot_pio_count = 0;
|
||||
#endif
|
||||
|
||||
// translate address if necessary
|
||||
if (v->prot_translate != NULL)
|
||||
@ -606,7 +662,9 @@ WRITE64_DEVICE_HANDLER( naomibd_w )
|
||||
{
|
||||
if (v->prot_translate[i] == v->prot_key)
|
||||
{
|
||||
mame_printf_verbose("Protection: got key %x, translated to %x\n", v->prot_key, v->prot_translate[i+2]);
|
||||
#if NAOMIBD_PRINTF_PROTECTION
|
||||
printf("Protection: got key %x, translated to %x\n", v->prot_key, v->prot_translate[i+2]);
|
||||
#endif
|
||||
v->prot_offset = v->prot_translate[i+2]/2;
|
||||
break;
|
||||
}
|
||||
@ -619,7 +677,9 @@ WRITE64_DEVICE_HANDLER( naomibd_w )
|
||||
{
|
||||
if (v->prot_translate[i+1] == (v->prot_offset*2))
|
||||
{
|
||||
mame_printf_verbose("Protection: got offset %x, translated to %x\n", v->prot_offset, v->prot_translate[i+2]);
|
||||
#if NAOMIBD_PRINTF_PROTECTION
|
||||
printf("Protection: got offset %x, translated to %x\n", v->prot_offset, v->prot_translate[i+2]);
|
||||
#endif
|
||||
v->prot_offset = v->prot_translate[i+2]/2;
|
||||
break;
|
||||
}
|
||||
@ -630,14 +690,18 @@ WRITE64_DEVICE_HANDLER( naomibd_w )
|
||||
}
|
||||
}
|
||||
}
|
||||
#if NAOMIBD_PRINTF_PROTECTION
|
||||
else
|
||||
{
|
||||
logerror("naomibd: protection not handled for this game\n");
|
||||
printf("naomibd: protection not handled for this game\n");
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
default:
|
||||
mame_printf_verbose("naomibd: unknown protection write %x @ %x\n", (UINT32)data, offset);
|
||||
#if NAOMIBD_PRINTF_PROTECTION
|
||||
printf("naomibd: unknown protection write %x @ %x\n", (UINT32)data, offset);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -908,6 +972,9 @@ static DEVICE_START( naomibd )
|
||||
|
||||
/* find the protection address translation for this game */
|
||||
v->prot_translate = (UINT32 *)0;
|
||||
#if NAOMIBD_PRINTF_PROTECTION
|
||||
v->prot_pio_count = 0;
|
||||
#endif
|
||||
for (i=0; i<ARRAY_LENGTH(naomibd_translate_tbl); i++)
|
||||
{
|
||||
if (!strcmp(device->machine->gamedrv->name, naomibd_translate_tbl[i].name))
|
||||
@ -1030,11 +1097,13 @@ DEVICE_GET_INFO( naomibd )
|
||||
case DEVINFO_INT_INLINE_CONFIG_BYTES: info->i = sizeof(naomibd_config); break;
|
||||
case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break;
|
||||
case DEVINFO_INT_DMAOFFSET:
|
||||
// printf("DMA source %x, flags %x\n", get_safe_token(device)->dma_offset, get_safe_token(device)->dma_offset_flags);
|
||||
#if NAOMIBD_PRINTF_PROTECTION
|
||||
printf("DMA source %08x, flags %x\n", get_safe_token(device)->dma_offset, get_safe_token(device)->dma_offset_flags);
|
||||
#endif
|
||||
|
||||
// if the flag is cleared that lets the protection chip go,
|
||||
// we need to handle this specially.
|
||||
if (!(get_safe_token(device)->dma_offset_flags & NAOMIBD_FLAG_ADDRESS_SHUFFLE))
|
||||
// we need to handle this specially. but not on DIMM boards.
|
||||
if (!(get_safe_token(device)->dma_offset_flags & NAOMIBD_FLAG_ADDRESS_SHUFFLE) && (get_safe_token(device)->type == ROM_BOARD))
|
||||
{
|
||||
if (!strcmp(device->machine->gamedrv->name, "qmegamis"))
|
||||
{
|
||||
@ -1089,7 +1158,7 @@ DEVICE_GET_INFO( naomibd )
|
||||
}
|
||||
break;
|
||||
case DEVINFO_STR_FAMILY: strcpy(info->s, "Naomi/Atomiswave plug-in board"); break;
|
||||
case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break;
|
||||
case DEVINFO_STR_VERSION: strcpy(info->s, "1.1"); break;
|
||||
case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break;
|
||||
case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME Team"); break;
|
||||
}
|
||||
|
@ -4339,7 +4339,9 @@ BOMULEUL CHAJARA SEGA ST-V 1997/04/11
|
||||
DRIVER( naomi2 )
|
||||
|
||||
DRIVER( hod2bios ) /* 1998.11 The House of the Dead 2 */
|
||||
DRIVER( hotd2 ) /* 1998.11 The House of the Dead 2 */
|
||||
DRIVER( dybbnao ) /* 1998.12 Dynamite Baseball NAOMI */
|
||||
DRIVER( smlg99 ) /* 1999.?? Super Major League '99 */
|
||||
DRIVER( pstone ) /* 1999.02 Power Stone */
|
||||
/* 1999.02 Crazy Taxi */
|
||||
DRIVER( zombrvn ) /* 1999.02 Zombie Revenge */
|
||||
@ -4416,7 +4418,7 @@ BOMULEUL CHAJARA SEGA ST-V 1997/04/11
|
||||
/* 2001.06 Crackin' DJ Part2 */
|
||||
DRIVER( wsbbgd ) /* 2001.06 Super Major League */
|
||||
DRIVER( spkrbtl ) /* 2001.07 Spikers Battle */
|
||||
/* 2001.07 Gun Survivor 2: Bio Hazard Code Veronica */
|
||||
DRIVER( gunsur2 ) /* 2001.07 Gun Survivor 2: Bio Hazard Code Veronica */
|
||||
/* 2001.07 Dokidoki Idol Star Seeker */
|
||||
DRIVER( cvs2gd ) /* 2001.08 Capcom vs. SNK 2 */
|
||||
DRIVER( gundmxgd ) /* 2001.09 Kidou Senshi Gundam Renpou vs. Zeon DX */
|
||||
@ -4510,12 +4512,14 @@ BOMULEUL CHAJARA SEGA ST-V 1997/04/11
|
||||
/* 2001.06 Club Kart */
|
||||
DRIVER( beachspi ) /* 2001.07 Beach Spikers */
|
||||
/* 2001.08 Wave Runner GP */
|
||||
DRIVER( vf4 ) /* 2001.08.02 Virtua Fighter 4 */
|
||||
DRIVER( vf4cart ) /* 2001.08.02 Virtua Fighter 4 (cartridge) */
|
||||
DRIVER( vf4 ) /* 2001.08.02 Virtua Fighter 4 (GD-ROM) */
|
||||
DRIVER( vf4b ) /* 2001.08.20 Virtua Fighter 4 ver.B */
|
||||
DRIVER( vf4c ) /* 2002.01.31 Virtua Fighter 4 ver.C */
|
||||
/* 2002.02 The King of Route 66 */
|
||||
DRIVER( initd ) /* 2002.03 Initial D Arcade Stage */
|
||||
DRIVER( initdexp ) /* 200?.?? Initial D Export Version */
|
||||
DRIVER( clubkrte ) /* 2002.?? Club Kart: European Session */
|
||||
/* 2002.06 WCCF SERIE A 2001-2002 */
|
||||
/* 2002.07 Soul Surfer */
|
||||
DRIVER( vf4evoa ) /* 2002.08 Virtua Fighter 4 Evolution */
|
||||
@ -4548,19 +4552,20 @@ BOMULEUL CHAJARA SEGA ST-V 1997/04/11
|
||||
DRIVER( sprtshot ) /* 2002.12 Sports Shooting USA */
|
||||
/* 2003.03 Guilty Gear X ver.1.5 */
|
||||
DRIVER( demofist ) /* 2003.06 Demolish Fist */
|
||||
/* 2003.08 Dolphin Blue */
|
||||
/* 2003.12 Guilty Gear Isuka */
|
||||
DRIVER( dolphin ) /* 2003.08 Dolphin Blue */
|
||||
DRIVER( ggisuka ) /* 2003.12 Guilty Gear Isuka */
|
||||
/* 2003.12 Sangoku Senki Shichisei Tensei (IGS) */
|
||||
/* 2004.03 The Rumble Fish */
|
||||
DRIVER( rumblef ) /* 2004.03 The Rumble Fish */
|
||||
DRIVER( rangrmsn ) /* 2004.03 Ranger Mission */
|
||||
/* 2004.06 Salary Man Kintarou Net Select */
|
||||
/* 2004.07 The King of Fighters Neo Wave */
|
||||
DRIVER( kofnw ) /* 2004.07 The King of Fighters Neo Wave */
|
||||
DRIVER( xtrmhunt ) /* 2004.09 Extreme Hunting */
|
||||
/* 2004.09 Dirty Pig Skin Football */
|
||||
/* 2004.09 Faster than Speed */
|
||||
DRIVER( kov7sprt ) /* 2004.?? Knights of Valour - The Seven Sprits */
|
||||
/* 2005.03 Net Select Keiba Victory Furlong */
|
||||
/* 2005.03 The Rumble Fish 2 */
|
||||
/* 2005.07 NeoGeo Battle Colloseum */
|
||||
DRIVER( ngbc ) /* 2005.07 NeoGeo Battle Colloseum */
|
||||
/* 2005.09 Samurai Spirits Tenkaichi Kenkakuden */
|
||||
/* 2005.10 The King of Fighters XI */
|
||||
DRIVER( fotns ) /* 2005.12 Hokuto no Ken */
|
||||
|
Loading…
Reference in New Issue
Block a user