temp, until we have the proper algorithm (nw)

This commit is contained in:
David Haywood 2016-01-04 23:32:36 +00:00
parent f1d75fd96d
commit 03f6c359b0
3 changed files with 29 additions and 14 deletions

View File

@ -1015,6 +1015,9 @@ ROM_START( snowboara )
ROM_LOAD( "sb44", 0x0000000, 0x0400000, CRC(1bbe88bc) SHA1(15bce9ada2b742ba4d537fa8efc0f29f661bff00) ) /* GFX only */
ROM_LOAD( "sb45", 0x0400000, 0x0400000, CRC(373983d9) SHA1(05e35a8b27cab469885f0ec2a5df200a366b50a1) ) /* Sound only */
ROM_LOAD( "sb46", 0x0800000, 0x0400000, CRC(22e7c648) SHA1(baddb9bc13accd83bea61533d7286cf61cd89279) ) /* GFX only */
DISK_REGION( "decrypt" )
DISK_IMAGE( "snowboar", 0, SHA1(fecf611bd9289d24a0b1cabaaf030e2cee322cfa) )
ROM_END
ROM_START( snowboar )
@ -1052,6 +1055,9 @@ ROM_START( snowboar )
ROM_LOAD( "sb.e2", 0x1100000, 0x0080000, CRC(f5948c6c) SHA1(91bba817ced194b02885ce84b7a8132ef5ca631a) ) /* GFX only */
ROM_LOAD( "sb.e3", 0x1180000, 0x0080000, CRC(4baa678f) SHA1(a7fbbd687e2d8d7e96207c8ace0799a3cc9c3272) ) /* GFX only */
ROM_FILL( 0x1200000, 0x0200000, 0x00 ) /* Empty */
DISK_REGION( "decrypt" )
DISK_IMAGE( "snowboar", 0, SHA1(fecf611bd9289d24a0b1cabaaf030e2cee322cfa) )
ROM_END
@ -1413,9 +1419,10 @@ GAME( 1995, touchgon, touchgo, touchgo, touchgo, gaelco2_state, touchgo, ROT
GAME( 1995, touchgoe, touchgo, touchgo, touchgo, gaelco2_state, touchgo, ROT0, "Gaelco", "Touch & Go (earlier revision)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING )
GAME( 1995, wrally2, 0, wrally2, wrally2, driver_device, 0, ROT0, "Gaelco", "World Rally 2: Twin Racing", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING )
GAME( 1996, maniacsq, 0, maniacsq, maniacsq, driver_device, 0, ROT0, "Gaelco", "Maniac Square (unprotected)", 0 )
GAME( 1996, snowboar, 0, snowboar, snowboar, driver_device, 0, ROT0, "Gaelco", "Snow Board Championship (Version 2.1)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING )
GAME( 1996, snowboara,snowboar, snowboar, snowboar, gaelco2_state, snowboar, ROT0, "Gaelco", "Snow Board Championship (Version 2.0)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING )
GAME( 1996, snowboar, 0, snowboar, snowboar, driver_device, 0, ROT0, "Gaelco", "Snow Board Championship (Version 2.1)", 0 )
GAME( 1996, snowboara,snowboar, snowboar, snowboar, gaelco2_state, snowboar, ROT0, "Gaelco", "Snow Board Championship (Version 2.0)", 0 )
GAME( 1998, bang, 0, bang, bang, bang_state, bang, ROT0, "Gaelco", "Bang!", 0 )
GAME( 1998, bangj, bang, bang, bang, bang_state, bang, ROT0, "Gaelco", "Gun Gabacho (Japan)", 0 )
// are these ACTUALLY Gaelco hardware, or do they just use the same Dallas?
GAME( 1999, grtesoro, 0, maniacsq, maniacsq, driver_device, 0, ROT0, "Nova Desitec", "Gran Tesoro? / Play 2000 (v5.01) (Italy)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING )
GAME( 1999, grtesoro4, grtesoro,maniacsq, maniacsq, driver_device, 0, ROT0, "Nova Desitec", "Gran Tesoro? / Play 2000 (v4.0) (Italy)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING )

View File

@ -27,6 +27,9 @@ public:
required_device<palette_device> m_palette;
required_shared_ptr<UINT16> m_generic_paletteram_16;
UINT32 snowboard_latch;
UINT16 *m_videoram;
tilemap_t *m_pant[2];
int m_dual_monitor;

View File

@ -12,6 +12,7 @@
#include "emu.h"
#include "machine/eepromser.h"
#include "includes/gaelco2.h"
#include "chd.h"
/***************************************************************************
@ -286,25 +287,29 @@ WRITE16_MEMBER(gaelco2_state::gaelco2_eeprom_data_w)
***************************************************************************/
/*
The game writes 2 values and then reads from a memory address.
If the read value is wrong, the game can crash in some places.
If we always return 0, the game doesn't crash but you can't see
the full intro (because it expects 0xffff somewhere).
The protection handles sound, controls, gameplay and some sprites
*/
READ16_MEMBER(gaelco2_state::snowboar_protection_r)
{
logerror("%06x: protection read from %04x\n", space.device().safe_pc(), offset*2);
return 0x0000;
chd_file * table = get_disk_handle(machine(), ":decrypt");
UINT8 temp[1024];
table->read_hunk(snowboard_latch>>9, &temp[0]);
UINT16 data = (temp[(snowboard_latch & 0x1ff)*2]<<8) | temp[((snowboard_latch & 0x1ff)*2)+1];
// TODO: replace above lookup (8GB table) with emulation of device
logerror("%06x: protection read (input %08x output %04x)\n", space.device().safe_pc(), snowboard_latch, data);
return data;
}
WRITE16_MEMBER(gaelco2_state::snowboar_protection_w)
{
COMBINE_DATA(&m_snowboar_protection[offset]);
snowboard_latch = (snowboard_latch << 16) | data;
logerror("%06x: protection write %04x to %04x\n", space.device().safe_pc(), data, offset*2);
}