This repo really helped me out creating a custom firmware for my controller. Short story, needed change type 4 to a custom chs and change c800h checks because I had to relocate the rom but then still work for a primary controller.
You saved me so much time and work. Thank you!