mirror of
https://github.com/holub/mame
synced 2025-07-03 17:08:39 +03:00
konami/konmedalppc.cpp: Corrected ATA hookup, IDed game as "G1 Turf Wild 3". [R. Belmont, Windy Fairy]
This commit is contained in:
parent
f058e5649d
commit
bc49f9786c
@ -2,6 +2,8 @@
|
||||
// copyright-holders:R. Belmont
|
||||
/*
|
||||
Konami PowerPC medal hardware
|
||||
|
||||
G1 Turf Wild 3 (c) 2005 GSF51
|
||||
*/
|
||||
|
||||
#include "emu.h"
|
||||
@ -54,23 +56,41 @@ uint32_t konmedalppc_state::screen_update(screen_device &screen, bitmap_ind16 &b
|
||||
return m_gcu->draw(screen, bitmap, cliprect);
|
||||
}
|
||||
|
||||
// The code wants to read the ATA STATUS port (1F7 on a PC) at an offset of 6 (0x721001F6).
|
||||
// so convert our offset back to the address and XOR to flip the endianness.
|
||||
// This isn't exactly right, but it does pass the initial check.
|
||||
/*
|
||||
Offset 0 is the full 16 bits of ATA register 0 (1F0h on PC)
|
||||
Offset 1 is ATA registers 2 & 3 (3322)
|
||||
Offset 2 is ATA registers 4 & 5 (5544)
|
||||
Offset 3 is ATA registers 6 & 7 (7766)
|
||||
*/
|
||||
u16 konmedalppc_state::ata_r(offs_t offset, u16 mem_mask)
|
||||
{
|
||||
offset <<= 1;
|
||||
offset ^= 1;
|
||||
if (offset == 0)
|
||||
{
|
||||
return m_ata->cs0_swap_r(offset, mem_mask);
|
||||
}
|
||||
|
||||
return m_ata->cs0_swap_r(offset, mem_mask);
|
||||
u16 result = m_ata->cs0_r((offset<<1) + 1, 0x00ff)<<8;
|
||||
result |= m_ata->cs0_r(offset<<1, 0xff);
|
||||
return result;
|
||||
}
|
||||
|
||||
void konmedalppc_state::ata_w(offs_t offset, u16 data, u16 mem_mask)
|
||||
{
|
||||
offset <<= 1;
|
||||
offset ^= 1;
|
||||
if (offset == 0)
|
||||
{
|
||||
m_ata->cs0_swap_w(offset, data, mem_mask);
|
||||
return;
|
||||
}
|
||||
|
||||
m_ata->cs0_swap_w(offset, data, mem_mask);
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
m_ata->cs0_w(offset << 1, data & 0xff, 0xff);
|
||||
}
|
||||
|
||||
if (ACCESSING_BITS_8_15)
|
||||
{
|
||||
m_ata->cs0_w((offset<<1) + 1, data>>8, 0xff);
|
||||
}
|
||||
}
|
||||
|
||||
void konmedalppc_state::main_map(address_map &map)
|
||||
@ -137,7 +157,7 @@ void konmedalppc_state::konmedalppc(machine_config &config)
|
||||
ymz.add_route(0, "rspeaker", 1.0);
|
||||
}
|
||||
|
||||
ROM_START( konmdlunk )
|
||||
ROM_START( turfwld3 )
|
||||
ROM_REGION32_BE(0x80000, "program", 0) // PowerPC program ROMs
|
||||
ROM_LOAD16_WORD_SWAP("a89-pce-b01.u2", 0x000000, 0x080000, CRC(3c5d44d4) SHA1(5ba46e3405b3c2ed5b4880abbbe557064b3492e9))
|
||||
|
||||
@ -150,4 +170,4 @@ ROM_END
|
||||
|
||||
} // Anonymous namespace
|
||||
|
||||
GAME(199?, konmdlunk, 0, konmedalppc, konmedalppc, konmedalppc_state, empty_init, ROT0, "Konami", "Unknown PowerPC Medal Game", MACHINE_NOT_WORKING | MACHINE_NO_SOUND)
|
||||
GAME(2005, turfwld3, 0, konmedalppc, konmedalppc, konmedalppc_state, empty_init, ROT0, "Konami", "G1 Turf Wild 3", MACHINE_NOT_WORKING | MACHINE_NO_SOUND)
|
||||
|
@ -23795,7 +23795,7 @@ ymcapsul
|
||||
pikkaric
|
||||
|
||||
@source:konami/konmedalppc.cpp
|
||||
konmdlunk // GSF51 (c)????
|
||||
turfwld3 // GSF51 (c) 2005 Konami
|
||||
|
||||
@source:konami/kontest.cpp
|
||||
kontest // GX800 (c) 198? (Japan)
|
||||
|
Loading…
Reference in New Issue
Block a user