summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2009-07-16 06:14:18 +0000
committer Aaron Giles <aaron@aarongiles.com>2009-07-16 06:14:18 +0000
commit061280b057b048b6788f6b300c744900d0f574ef (patch)
tree635b875f2ba1ee529888004537fb1544fc2912eb
parent1fc759af692030f0b345069ea3628ba108d8139e (diff)
From: David Haywood [neohaze@nildram.co.uk]
Sent: Friday, July 10, 2009 11:02 AM To: Aaron Giles; Angelo Salese Subject: Otenami Haiken Final (V2.07JC) Note, I've talked this one through with him, and this is correct. Taito sold this on a 64Mb CF card, it *requires* the V2 bios which is where CF card support was added (it might be the reason the V2 bios exists) The supported bios is dumped from the PCB, I know we have the actual upgrade kit, but afaik MAME can't upgrade it properly. Only the new game uses this bios, as it's actually a less featured bios aside from the CF support. New Games added -------------------- Otenami Haiken Final (V2.07JC) [Joerg Hartenberger] Other changes -------------- - Added flashv2.u30 (v2 bios) to the taitogn driver [Joerg Hartenberger] - Added IDE Lock mechanism to the IDE Driver in MAME, so games on gnet v2 bios are working correct now (idectrl.c / idectrl.h) & taitogn.c [Joerg Hartenberger]
-rw-r--r--src/emu/machine/idectrl.c43
-rw-r--r--src/emu/machine/idectrl.h2
-rw-r--r--src/mame/drivers/taitogn.c28
-rw-r--r--src/mame/mamedriv.c1
4 files changed, 67 insertions, 7 deletions
diff --git a/src/emu/machine/idectrl.c b/src/emu/machine/idectrl.c
index a0ff587b447..9166d21d089 100644
--- a/src/emu/machine/idectrl.c
+++ b/src/emu/machine/idectrl.c
@@ -83,6 +83,7 @@
#define IDE_COMMAND_IDLE_IMMEDIATE 0xe1
#define IDE_COMMAND_TAITO_GNET_UNLOCK_1 0xfe
#define IDE_COMMAND_TAITO_GNET_UNLOCK_2 0xfc
+#define IDE_COMMAND_TAITO_GNET_UNLOCK_3 0x0f
#define IDE_ERROR_NONE 0x00
#define IDE_ERROR_DEFAULT 0x01
@@ -152,11 +153,13 @@ struct _ide_state
hard_disk_file *disk;
emu_timer * last_status_timer;
emu_timer * reset_timer;
-
+
UINT8 master_password_enable;
UINT8 user_password_enable;
const UINT8 * master_password;
const UINT8 * user_password;
+
+ UINT8 gnetreadlock;
};
@@ -273,6 +276,11 @@ UINT8 *ide_get_features(const device_config *device)
return ide->features;
}
+void ide_set_gnet_readlock(const device_config *device, const UINT8 onoff)
+{
+ ide_state *ide = get_safe_token(device);
+ ide->gnetreadlock = onoff;
+}
void ide_set_master_password(const device_config *device, const UINT8 *password)
{
@@ -713,6 +721,12 @@ static void read_sector_done(ide_state *ide)
{
int lba = lba_address(ide), count = 0;
+ /* GNET readlock check */
+ if (ide->gnetreadlock) {
+ ide->status &= ~IDE_STATUS_ERROR;
+ ide->status &= ~IDE_STATUS_BUSY;
+ return;
+ }
/* now do the read */
if (ide->disk)
count = hard_disk_read(ide->disk, lba, ide->buffer);
@@ -986,7 +1000,9 @@ static TIMER_CALLBACK( write_sector_done_callback )
*************************************/
static void handle_command(ide_state *ide, UINT8 command)
-{
+{
+ UINT8 key[5];
+
/* implicitly clear interrupts here */
clear_interrupt(ide);
@@ -1191,6 +1207,22 @@ static void handle_command(ide_state *ide, UINT8 command)
signal_interrupt(ide);
break;
+ case IDE_COMMAND_TAITO_GNET_UNLOCK_3:
+ LOGPRINT(("IDE GNET Unlock 3\n"));
+
+ /* key check */
+ chd_get_metadata (ide->handle, HARD_DISK_KEY_METADATA_TAG, 0, key, 5, 0, 0, 0);
+ if ((ide->precomp_offset == key[0]) && (ide->sector_count == key[1]) && (ide->cur_sector == key[2]) && (ide->cur_cylinder == (((UINT16)key[4]<<8)|key[3])))
+ {
+ ide->gnetreadlock= 0;
+ }
+
+ /* update flags */
+ ide->status |= IDE_STATUS_DRIVE_READY;
+ ide->status &= ~IDE_STATUS_ERROR;
+ signal_interrupt(ide);
+ break;
+
default:
LOGPRINT(("IDE unknown command (%02X)\n", command));
debugger_break(ide->device->machine);
@@ -1409,8 +1441,10 @@ static void ide_controller_write(const device_config *device, int bank, offs_t o
ide->status &= ~IDE_STATUS_BUFFER_READY;
if (bad)
ide->status |= IDE_STATUS_ERROR;
- else
+ else {
ide->status &= ~IDE_STATUS_ERROR;
+ ide->gnetreadlock= 0;
+ }
}
else
continue_write(ide);
@@ -1842,6 +1876,8 @@ static DEVICE_START( ide_controller )
state_save_register_device_item(device, 0, ide->master_password_enable);
state_save_register_device_item(device, 0, ide->user_password_enable);
+
+ state_save_register_device_item(device, 0, ide->gnetreadlock);
}
@@ -1873,6 +1909,7 @@ static DEVICE_RESET( ide_controller )
ide->status = IDE_STATUS_DRIVE_READY | IDE_STATUS_SEEK_COMPLETE;
ide->error = IDE_ERROR_DEFAULT;
ide->buffer_offset = 0;
+ ide->gnetreadlock = 0;
ide->master_password_enable = (ide->master_password != NULL);
ide->user_password_enable = (ide->user_password != NULL);
clear_interrupt(ide);
diff --git a/src/emu/machine/idectrl.h b/src/emu/machine/idectrl.h
index 937a83fa799..f9515ecc4e1 100644
--- a/src/emu/machine/idectrl.h
+++ b/src/emu/machine/idectrl.h
@@ -60,6 +60,8 @@ UINT8 *ide_get_features(const device_config *device);
void ide_set_master_password(const device_config *device, const UINT8 *password);
void ide_set_user_password(const device_config *device, const UINT8 *password);
+void ide_set_gnet_readlock(const device_config *device, const UINT8 onoff);
+
int ide_bus_r(const device_config *config, int select, int offset);
void ide_bus_w(const device_config *config, int select, int offset, int data);
diff --git a/src/mame/drivers/taitogn.c b/src/mame/drivers/taitogn.c
index 5a26cb3111c..868aeee3232 100644
--- a/src/mame/drivers/taitogn.c
+++ b/src/mame/drivers/taitogn.c
@@ -403,6 +403,9 @@ static WRITE32_HANDLER(rf5c296_mem_w)
locked &= ~(1 << pos);
else
locked |= 1 << pos;
+ if (!locked) {
+ ide_set_gnet_readlock (devtag_get_device(space->machine, "card"), 0);
+ }
}
}
@@ -552,11 +555,14 @@ static WRITE32_HANDLER(control3_w)
{
COMBINE_DATA(&control3);
+ /* Not card reset */
+ #if 0
// card reset, maybe
if(control3 & 2) {
- devtag_reset(space->machine, "card");
+ devtag_reset(space->machine, "card");
locked = 0x1ff;
}
+ #endif
}
static READ32_HANDLER(gn_1fb70000_r)
@@ -824,6 +830,7 @@ static MACHINE_RESET( coh3002t )
control = 0;
psx_machine_init(machine);
devtag_reset(machine, "card");
+ ide_set_gnet_readlock (devtag_get_device(machine, "card"), 1);
}
static ADDRESS_MAP_START( zn_map, ADDRESS_SPACE_PROGRAM, 32 )
@@ -1032,14 +1039,19 @@ static INPUT_PORTS_START( coh3002t_mp )
INPUT_PORTS_END
-// ROM_LOAD( "flashv2.u30", 0x000000, 0x200000, CRC(f624ebf8) SHA1(be84ef1b083f819f3ab13c983c52bca97bb908ef) )
+//
+#define ROM_LOAD16_WORD_BIOS(bios,name,offset,length,hash) \
+ ROMX_LOAD(name, offset, length, hash, ROM_GROUPWORD | ROM_BIOS(bios+1)) /* Note '+1' */
+
#define TAITOGNET_BIOS \
ROM_REGION32_LE( 0x080000, "mainbios", 0 ) \
ROM_LOAD( "coh-3002t.353", 0x000000, 0x080000, CRC(03967fa7) SHA1(0e17fec2286e4e25deb23d40e41ce0986f373d49) ) \
-\
ROM_REGION16_LE( 0x200000, "subbios", 0 ) \
- ROM_LOAD( "flash.u30", 0x000000, 0x200000, CRC(c48c8236) SHA1(c6dad60266ce2ff635696bc0d91903c543273559) ) \
+ ROM_SYSTEM_BIOS( 0, "v1", "G-NET Bios v1" ) \
+ ROM_LOAD16_WORD_BIOS(0, "flash.u30", 0x000000, 0x200000, CRC(c48c8236) SHA1(c6dad60266ce2ff635696bc0d91903c543273559) ) \
+ ROM_SYSTEM_BIOS( 1, "v2", "G-NET Bios v2" ) \
+ ROM_LOAD16_WORD_BIOS(1, "flashv2.u30", 0x000000, 0x200000, CRC(CAE462D3) SHA1(f1b10846a8423d9fe021191c5876190857c3d2a4) ) \
ROM_REGION32_LE( 0x80000, "soundcpu", 0) \
ROM_FILL( 0, 0x80000, 0xff) \
ROM_REGION32_LE( 0x600000, "samples", 0) \
@@ -1184,6 +1196,13 @@ ROM_START(zokuoten)
DISK_IMAGE( "zokuoten", 0, SHA1(5ce13db00518f96af64935176c71ec68d2a51938))
ROM_END
+ROM_START(otenamhf)
+ TAITOGNET_BIOS
+ ROM_DEFAULT_BIOS( "v2" )
+
+ DISK_REGION( "card" )
+ DISK_IMAGE( "otenamhf", 0, SHA1(5b15c33bf401e5546d78e905f538513d6ffcf562))
+ROM_END
@@ -1256,6 +1275,7 @@ GAME( 2003, sianniv, taitogn, coh3002t, coh3002t, coh3002t, ROT270, "Taito", "
GAME( 2003, kollon, taitogn, coh3002t, coh3002t, coh3002t, ROT0, "Taito", "Kollon (V2.04J)", 0 )
GAME( 1999, otenamih, taitogn, coh3002t, coh3002t, coh3002t, ROT0, "Success", "Otenami Haiken (V2.04J)", 0 )
+GAME( 2005, otenamhf, taitogn, coh3002t, coh3002t, coh3002t, ROT0, "Success/Warashi", "Otenami Haiken Final (V2.07JC)", 0 )
GAME( 2000, psyvaria, taitogn, coh3002t, coh3002t, coh3002t, ROT270, "Success", "Psyvariar -Medium Unit- (V2.04J)", 0 )
GAME( 2000, psyvarrv, taitogn, coh3002t, coh3002t, coh3002t, ROT270, "Success", "Psyvariar -Revision- (V2.04J)", 0 )
GAME( 2000, zokuoten, taitogn, coh3002t, coh3002t, coh3002t, ROT0, "Success", "Zoku Otenamihaiken (V2.03J)", 0 )
diff --git a/src/mame/mamedriv.c b/src/mame/mamedriv.c
index f88093c8f98..7634fbe9ce5 100644
--- a/src/mame/mamedriv.c
+++ b/src/mame/mamedriv.c
@@ -2995,6 +2995,7 @@ V-V TP-027
DRIVER( chaoshej ) /* 1998.10 Chaos Heat (V2.08J) */
DRIVER( raycris ) /* 1998.12 Ray Crisis (V2.03J) */
DRIVER( otenamih ) /* 1999.02 Otenami Haiken (Success) */
+ DRIVER( otenamhf ) /* 2005.04 Otenami Haiken Final (V2.07JC) */
DRIVER( spuzbobj ) /* 1999.03 Super Puzzle Bobble (Japan) */
DRIVER( spuzbobl ) /* 1999.?? Super Puzzle Bobble (V2.05O) */
DRIVER( gobyrc ) /* 1999.?? Go By RC (V2.03O) */