Help with Resolution Setting @540p timings

I am currently trying to run Lakka with a Raspberry pi 4 on my 31kHz CRT. So far, I can get it to run in 1080i, but I want to run in 540p and that’s where I am getting hung up. I am using a cut-down modeline that displays the pi in 960x400, but the following issue seems to be the same for 540p as well.

I have a good modeline that I use for running Raspbian on this CRT, but when I try to use the same modeline on the config.txt in lakka, I get one of two issues.

  1. with my modeline in config.txt and the default distroconfig.txt, I get a horizontally garbled image. It appears to be the correct vertical pixel size, but the screen is severely torn horizontally. It looks like the scan lines are being either added to or mixed-up with other lines.
  2. Going into distroconfig.txt and commenting out the enable V3D line, I get a stable flower in the middle of the screen, but it hangs at the flower and that’s it. I have tried this with default resolution settings in the retroarch.cfg and also after setting the fullscreen resolution to 960x400. It makes not difference I can see.

Knowing what I am trying to do, is there anyone here who can recommend a course of action to get a 540p modeline running with lakka on a pi 4?