MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / ChannelNumber

Function ChannelNumber

pcsx2/Dmac.h:295–315  ·  view source on GitHub ↗

Believe it or not, making this const can generate compiler warnings in gcc.

Source from the content-addressed store, hash-verified

293
294// Believe it or not, making this const can generate compiler warnings in gcc.
295static __fi int ChannelNumber(u32 addr)
296{
297 switch (addr)
298 {
299 case D0_CHCR: return 0;
300 case D1_CHCR: return 1;
301 case D2_CHCR: return 2;
302 case D3_CHCR: return 3;
303 case D4_CHCR: return 4;
304 case D5_CHCR: return 5;
305 case D6_CHCR: return 6;
306 case D7_CHCR: return 7;
307 case D8_CHCR: return 8;
308 case D9_CHCR: return 9;
309 default:
310 {
311 pxFail("Invalid DMA channel number");
312 return 51; // some value
313 }
314 }
315}
316
317union tDMAC_CTRL {
318 struct {

Callers 1

DmaExecFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected