mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
DC WIP: fifo set/reset hack
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1096 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
83b8527085
commit
8be6beed6a
@ -451,6 +451,12 @@ void Write16(const u16 _Value, const u32 _Address)
|
||||
case FIFO_RW_DISTANCE_LO:
|
||||
LOG(COMMANDPROCESSOR,"try to write to %s : %04x",((_Address & 0xFFF) == FIFO_RW_DISTANCE_HI) ? "FIFO_RW_DISTANCE_HI" : "FIFO_RW_DISTANCE_LO", _Value);
|
||||
_dbg_assert_msg_(COMMANDPROCESSOR, _Value==0, "WTF? attempt to overwrite fifo CPReadWriteDistance with a value(%04x) != 0 ",_Value);
|
||||
// TODO: break this hack
|
||||
// hack: if fifo is not empty and readable then spin until flushed
|
||||
// sleeping here is not a perf issue since GXSetFifo shouldn't be called too much often.
|
||||
while((fifo.CPReadWriteDistance>0) && (fifo.bFF_GPReadEnable==1))
|
||||
Common::SleepCurrentThread(1);
|
||||
_dbg_assert_msg_(COMMANDPROCESSOR, !(fifo.CPReadWriteDistance!=0 && fifo.bFF_GPReadEnable==0), "Is that bad? WARNING: reset a not empty and not readable fifo.\n CPReadWriteDistance: %08x | fifo.bFF_GPReadEnable: %i",fifo.CPReadWriteDistance,fifo.bFF_GPReadEnable);
|
||||
#ifdef _WIN32
|
||||
InterlockedExchange((LONG*)&fifo.CPReadWriteDistance, 0);
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user