diff options
Diffstat (limited to 'src/mame/drivers/savquest.c')
-rw-r--r-- | src/mame/drivers/savquest.c | 102 |
1 files changed, 51 insertions, 51 deletions
diff --git a/src/mame/drivers/savquest.c b/src/mame/drivers/savquest.c index 49684b6f523..d6d1ad550a7 100644 --- a/src/mame/drivers/savquest.c +++ b/src/mame/drivers/savquest.c @@ -425,47 +425,47 @@ WRITE32_MEMBER(savquest_state::bios_ec000_ram_w) static const UINT8 m_hasp_cmppass[] = {0xc3, 0xd9, 0xd3, 0xfb, 0x9d, 0x89, 0xb9, 0xa1, 0xb3, 0xc1, 0xf1, 0xcd, 0xdf, 0x9d}; /* 0x9d or 0x9e */ static const UINT8 m_hasp_prodinfo[] = {0x51, 0x4c, 0x52, 0x4d, 0x53, 0x4e, 0x53, 0x4e, 0x53, 0x49, 0x53, 0x48, 0x53, 0x4b, 0x53, 0x4a, - 0x53, 0x43, 0x53, 0x45, 0x52, 0x46, 0x53, 0x43, 0x53, 0x41, 0xac, 0x40, 0x53, 0xbc, 0x53, 0x42, - 0x53, 0x57, 0x53, 0x5d, 0x52, 0x5e, 0x53, 0x5b, 0x53, 0x59, 0xac, 0x58, 0x53, 0xa4 - }; + 0x53, 0x43, 0x53, 0x45, 0x52, 0x46, 0x53, 0x43, 0x53, 0x41, 0xac, 0x40, 0x53, 0xbc, 0x53, 0x42, + 0x53, 0x57, 0x53, 0x5d, 0x52, 0x5e, 0x53, 0x5b, 0x53, 0x59, 0xac, 0x58, 0x53, 0xa4 + }; READ8_MEMBER(savquest_state::parallel_port_r) { if (offset == 1) { if ((m_haspstate == HASPSTATE_READ) - && (m_hasp_passmode == 3) - ) + && (m_hasp_passmode == 3) + ) { /* passmode 3 is used to retrieve the product(s) information it comes in two parts: header and product the header has this format: - offset range purpose - 00 01 header type - 01 01-05 count of used product slots, must be 2 - 02 01-05 count of unused product slots - this is assumed to be 6-(count of used slots) - but it is not enforced here - however a total of 6 structures will be checked - 03 01-02 unknown - 04 01-46 country code - 05-0f 00 reserved - the used product slots have this format: - (the unused product slots must be entirely zeroes) - 00-01 0001-000a product ID, one must be 6, the other 0a - 02 0001-0003 unknown but must be 0001 - 04 01-05 HASP plug country ID - 05 01-02 unknown but must be 01 - 06 05 unknown - 07-0a any unknown, not used - 0b ff unknown - 0c ff unknown - 0d-0f 00 reserved - - the read is performed by accessing an array of 16-bit big-endian values - and returning one bit at a time into bit 5 of the result - the 16-bit value is then XORed with 0x534d and the register index - */ + offset range purpose + 00 01 header type + 01 01-05 count of used product slots, must be 2 + 02 01-05 count of unused product slots + this is assumed to be 6-(count of used slots) + but it is not enforced here + however a total of 6 structures will be checked + 03 01-02 unknown + 04 01-46 country code + 05-0f 00 reserved + the used product slots have this format: + (the unused product slots must be entirely zeroes) + 00-01 0001-000a product ID, one must be 6, the other 0a + 02 0001-0003 unknown but must be 0001 + 04 01-05 HASP plug country ID + 05 01-02 unknown but must be 01 + 06 05 unknown + 07-0a any unknown, not used + 0b ff unknown + 0c ff unknown + 0d-0f 00 reserved + + the read is performed by accessing an array of 16-bit big-endian values + and returning one bit at a time into bit 5 of the result + the 16-bit value is then XORed with 0x534d and the register index + */ if (m_hasp_prodind <= (sizeof(m_hasp_prodinfo) * 8)) { @@ -567,24 +567,24 @@ WRITE8_MEMBER(savquest_state::parallel_port_w) */ if ((data8 == 0x94) - || (data8 == 0x9e) - || (data8 == 0xa4) - || (data8 == 0xb2) - || (data8 == 0xbe) - || (data8 == 0xd0) - ) + || (data8 == 0x9e) + || (data8 == 0xa4) + || (data8 == 0xb2) + || (data8 == 0xbe) + || (data8 == 0xd0) + ) { return; } if ((data8 == 0x8a) - || (data8 == 0x8e) - || (data8 == 0xca) - || (data8 == 0xd2) - || (data8 == 0xe2) - || (data8 == 0xf0) - || (data8 == 0xfc) - ) + || (data8 == 0x8e) + || (data8 == 0xca) + || (data8 == 0xd2) + || (data8 == 0xe2) + || (data8 == 0xf0) + || (data8 == 0xfc) + ) { /* someone with access to the actual dongle could dump the true values I've never seen it so I just determined the relevant bits instead @@ -648,8 +648,8 @@ WRITE8_MEMBER(savquest_state::parallel_port_w) if (data8 & 1) { if ((m_hasp_passmode == 1) - && (data8 == 0x9d) - ) + && (data8 == 0x9d) + ) { m_hasp_passmode = 2; } @@ -663,8 +663,8 @@ WRITE8_MEMBER(savquest_state::parallel_port_w) if (++m_hasp_passind == sizeof(m_hasp_tmppass)) { if ((m_hasp_tmppass[0] == 0x9c) - && (m_hasp_tmppass[1] == 0x9e) - ) + && (m_hasp_tmppass[1] == 0x9e) + ) { int i; @@ -690,7 +690,7 @@ WRITE8_MEMBER(savquest_state::parallel_port_w) } } else if ((m_haspstate == HASPSTATE_PASSBEG) - && (data8 & 1) + && (data8 & 1) ) { m_hasp_tmppass[m_hasp_passind] = data8; @@ -725,7 +725,7 @@ WRITE8_MEMBER(savquest_state::smram_w) } static ADDRESS_MAP_START(savquest_map, AS_PROGRAM, 32, savquest_state) - ADDRESS_MAP_UNMAP_HIGH + ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x00000000, 0x0009ffff) AM_RAM AM_RANGE(0x000a0000, 0x000bffff) AM_READWRITE8(smram_r,smram_w,0xffffffff) //AM_DEVREADWRITE8("vga", vga_device, mem_r, mem_w, 0xffffffff) AM_RANGE(0x000c0000, 0x000c7fff) AM_ROM AM_REGION("video_bios", 0) @@ -804,7 +804,7 @@ static MACHINE_CONFIG_START( savquest, savquest_state ) MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("pic8259_1", pic8259_device, inta_cb) MCFG_FRAGMENT_ADD( pcat_common ) - MCFG_DEVICE_REMOVE("rtc") + MCFG_DEVICE_REMOVE("rtc") MCFG_DS12885_ADD("rtc") MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0) |