mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-15 18:05:45 -04:00
DMA: Determine slice size based on whether pad is transmitting
Plenty of games seem to suffer from this issue where they have a linked list DMA going while polling the controller. Using a too-large slice size will result in the serial timing being off, and the game thinking the controller is disconnected. So we don't hurt performance too much for the general case, we reduce this to equal CPU and DMA time when the controller is transferring, but otherwise leave it at the higher size.
This commit is contained in:
@ -50,7 +50,6 @@ public:
|
||||
private:
|
||||
static constexpr PhysicalMemoryAddress BASE_ADDRESS_MASK = UINT32_C(0x00FFFFFF);
|
||||
static constexpr PhysicalMemoryAddress ADDRESS_MASK = UINT32_C(0x001FFFFC);
|
||||
static constexpr u32 TRANSFER_TICKS = 10;
|
||||
|
||||
enum class SyncMode : u32
|
||||
{
|
||||
@ -68,6 +67,8 @@ private:
|
||||
void UpdateIRQ();
|
||||
|
||||
// returns false if the DMA should now be halted
|
||||
TickCount GetTransferSliceTicks() const;
|
||||
TickCount GetTransferHaltTicks() const;
|
||||
bool TransferChannel(Channel channel);
|
||||
void HaltTransfer(TickCount duration);
|
||||
void UnhaltTransfer(TickCount ticks);
|
||||
|
Reference in New Issue
Block a user