Well, the easiest trick is to create an ini file for the 'twincobr' driver, as 'twincobr.ini' where the mame.ini file is. Then enter the following:
aspect 5:4
The -aspect option forces GM into thinking your monitor has a different aspect. This option is global so you need to place it in a specific game or driver file otherwise it would affect all games. For vertical games, 4:3 means normal aspect, 3:3 square, 3:4 full screen stretch (ugly). This means something in the middle of 3:3 and 4:3 is what you want, e.g. 5:4. Try different values.
Obviously this will only affect those games (Twin Cobra & Flying Shark). If you want to affect all 320 lines tall games, you need to edit the range. It seems GM is picking the 18-19kHz range (2).
So one approach is to reduce the margins (horizontal porches) so the active picture will get wider. These are the default D9800 values:
monitor custom
crt_range0 15250-18000, 40-80, 2.187, 4.688, 6.719, 0.190, 0.191, 1.018, 0, 0, 224, 288, 448, 576
crt_range1 18001-19000, 40-80, 2.187, 4.688, 6.719, 0.140, 0.191, 0.950, 0, 0, 288, 320, 0, 0
crt_range2 20501-29000, 40-80, 2.910, 3.000, 4.440, 0.451, 0.164, 1.048, 0, 0, 320, 384, 0, 0
crt_range3 29001-32000, 40-80, 0.636, 3.813, 1.906, 0.318, 0.064, 1.048, 0, 0, 384, 480, 0, 0
crt_range4 32001-34000, 40-80, 0.636, 3.813, 1.906, 0.020, 0.106, 0.607, 0, 0, 480, 576, 0, 0
crt_range5 34001-38000, 40-80, 1.000, 3.200, 2.200, 0.020, 0.106, 0.607, 0, 0, 576, 600, 0, 0
So change crt_range1 line by something like this:
crt_range1 18001-19000, 40-80, 2.000, 3.000, 4.000, 0.140, 0.191, 0.950, 0, 0, 288, 320, 0, 0
Notice the values are guessed, you will need to experiment to get those modes centered.
A second approach is to ditch the whole 18-19kHz range altogether and send 320-lines tall modes to the upper ranges by stretching the resolutions, e.g.:
monitor custom
crt_range0 15250-18000, 40-80, 2.187, 4.688, 6.719, 0.190, 0.191, 1.018, 0, 0, 224, 288, 448, 576
crt_range1 24500-29000, 40-80, 2.910, 3.000, 4.440, 0.451, 0.164, 1.048, 0, 0, 384, 400, 0, 0
crt_range2 29001-32000, 40-80, 0.636, 3.813, 1.906, 0.318, 0.064, 1.048, 0, 0, 400, 480, 0, 0
crt_range3 32001-34000, 40-80, 0.636, 3.813, 1.906, 0.020, 0.106, 0.607, 0, 0, 480, 576, 0, 0
crt_range4 34001-38000, 40-80, 1.000, 3.200, 2.200, 0.020, 0.106, 0.607, 0, 0, 576, 600, 0, 0