Freeplaytech Forum

Full Version: DMA channel collision on N64 games
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, I recently bought a Freeplay CM3 and I've been having a lot of fun with it.

I have an issue with N64 though. I was initially able to play games on it without much issues. Then, while I was playing one, I plugged the CM3 into an HDMI and it looked like it detected it (the screen flickered for a second) but it did not send the image to the TV. 

I shut it down and tried turning it back on while being plugged to the TV. This time the Retropie menu was shown both on the screen and TV. I then selected the N64 emulator and the entire image and sound were sent to the TV only (the screen remained black during this).

Unfortunately, every time I run the N64 emulator now, it defaults to sending the image to HDMI only. I can plug it into the TV while the CM3 screen is black and I'll see and hear the rom playing on the TV.

These are the options I have enabled for the emulator:

System: n64
Emulator: mupen64plus-auto
Video mode: 1024x768 @ 60 Hz 4:3, clock: 65MHz progressive
ROM: Legend of Zelda, The Ocarina of Time

After entering the emulator I see an error in the daemon.log saying that there was a DMA channel collision:

retropie fbcpFilledNoSleep[380]: DMA channel collision! DMA channel 1 was expected to be assigned to our peripheral 7, but something else has assigned it to peripheral 17!

I think it initially tried to use the screen through SPI (peripheral 7) but something else assigned it to HDMI (peripheral 17).

Is there an easy way to revert whatever configuration was assigned when I plugged it into the TV?

Here's the daemon.log file in case it's needed:

PS: I have the Freeplay_CM3_19110701 CM3 image installed with the FastNoSleepFilled LCD driver selected.
DMA is a weird thing on Raspberry Pi, sometime, for whatever reason, something decide to change DMA channel it is using... Had some troubles with this too :S

I have a build with the possibility to set RX/TX channels (this version is for fullscreen) :

I did compile it a while ago, I hope it will work.
With this version, arguments need to be set as followed : 'fbcp-ili9341 -DMA_TX_CHANNEL 1 -DMA_RX_CHANNEL 5'
To check for available channels, follow this link, under 'Compiling' section :

You will need to stop (not disable) the current service that run the driver : 'sudo systemctl stop fbcpFilledNoSleep.service'

Sadly, I don't have my device with me to help more (quarantine :/)
It is also possible that you changed a setting that causes the emulator to switch resolutions when booting N64. This will definitely cause problems for the LCD driver. It can not handle having the HDMI change resolutions.

When you go to boot the game, hit A to enter the runcommand menu. While in there, there is a choice to revert all the settings back to default. I'm sorry that I can't recall the exact wording at the moment, and I can't boot up a machine at the moment. Anyway, you want to be sure that it's not going to change any HDMI settings (typically resolution) when it runs the emulator. If it does, the LCD driver will crash.
Thanks for the replies.

@Flavor, I have double checked and it seems like the emulator options (visible through the runcommand menu) are the default ones:
System: n64
Emulator: mupen64plus-auto
Video mode: 1024x768 @ 60 Hz 4:3, clock: 65MHz progressive
ROM: Legend of Zelda, The Ocarina of Time

@Porcinus, I tried with the precompiled driver but the same is still happening. I will try compiling my own and see if that makes any difference.

Any other suggestions are greatly appreciated.
Ok so, according to the following issue raised on juj's repository, N64 games only work with DMA disabled.

I went ahead and compiled a version without DMA channels by setting DUSE_DMA_TRANSFERS to OFF, and commenting out the following constants (as explained here

DISPLAY_FLIP_ORIENTATION_IN_SOFTWARE //to comment, I don't remember why
SAVE_BATTERY_BY_SLEEPING_WHEN_IDLE //to comment, good catch

This gave me a driver that runs N64 games at an amazing performance with clock divisor of 6!

Other emulators looked a bit choppy so I went ahead and added an option to the "Freeplay Change Display Driver" so that I can manually change them when I want to play N64 games.

Thank you for building this magnificent machine!

PS: This process left me with N64 games with no sound, I just set mupen64plus_audio to "0" in /opt/retropie/configs/all/autoconf.cfg and got audio out of the internal speaker.
This is really interesting. Thank you very much, smoscar01!