How to add option to AMI BIOS?

I am trying to modify my BIOS to add an option to one of the submenus. Currently it is like this according to IFR:

1
2
3
4
5
6
7
8
9
 

0x3687D Suppress If: {0A 82}
0x3687F Variable 0xE3D equals 0x0 {12 06 3D 0E 00 00}
0x36885 Setting: GPU MODE, Variable: 0x127 {05 91 EB 1B EC 1B 4A 27 16 00 27 01 14 10 01 04 00}
0x36896 Option: Dedicated GPU only, Value: 0x1 {09 07 ED 1B 00 00 01}
0x3689D Option: NVIDIA(R) Optimus(TM), Value: 0x4 {09 07 EE 1B 30 00 04}
0x368A4 End of Options {29 02}
0x368A6 End If {29 02}
 
 


My goal is to get it like this:

1
2
3
4
5
6
7
8
9
10
 

0x3687D Suppress If: {0A 82}
0x3687F Variable 0xE3D equals 0x0 {12 06 3D 0E 00 00}
0x36885 Setting: GPU MODE, Variable: 0x127 {05 91 EB 1B EC 1B 4A 27 16 00 27 01 14 10 01 04 00}
0x36896 Option: Dedicated GPU only, Value: 0x1 {09 07 ED 1B 00 00 01}
0x3689D Option: NVIDIA(R) Optimus(TM), Value: 0x4 {09 07 EE 1B 30 00 04}
****** Option: Integrated GPU only, Value: 0x0 {09 07 EE 1B 30 00 00} ******************
0x368A4 End of Options {29 02}
0x368A6 End If {29 02}
 
 


How can I insert this option into my submenu? Also second question, is there a way to unlock flash descriptor region in BIOS to allow flashing with FPTW64? Its annoying to have to constantly take my computer apart to reflash the BIOS with new changes. It has secure flash so AFUWin is not an option for me.

Ok I have answered the second part of my question: In my Razer’s AMI Bios, I found under Setup -> Chipset -> PCH-IO Configuration -> Security Configuration I found the following interesting entries:
-BIOS Lock
-Force unlock on all GPIO pads

I changed failsafe and optimal values for BIOS Lock to always be disabled, and for Force unlock on all GPIO pads to be enabled, flashed with hardware flasher, and to my amazement, I don’t need the hardware flasher for all future mods. I can use fptw64 with following command: fptw64.exe -f bios.rom -BIOS


however I am still lost about how to add/insert an entry for that subfield.

EDIT nvm my computer will not POST now lol, wonder why considering I flashed back the exact dump I made.

EDIT2: it will work with the 12MB file if saved by AFUWinFlash, it will not work with the full 16MB image even with -BIOS flag. Any reason why?

witch ami bios are you optio4 or optio5 ?

thx

Aptio V