How to manually add a Keyboard Gamepad Mapping Type for 8bitdo Zero?

Hi, I have installed RetroArch on my Iphone 4s, and I am able to get full control with 8bitdo Zero when setting Keyboard Gamepad Mapping Type to SNES30 8bitdo. The only problem is the a-b and x-y buttons of 8bitdo Zero are reversed from 8bitdo SNES30. I can manually remap the keys in Input User 1 Binds, but when I want to save autoconfig, it prompts “Error saving autoconf file”. After I restart RetroArch, I have to remap the keys again.

So what I want to do is to manually add a Keyboard Gamepad Mapping Type for 8bitdo Zero. I think it only needs a little modification on the config file for 8bitdo SNES30. Any suggestion on how to do so? Thanks.