try {
options = CartridgeDatabase.getFormatOptions(cartridge().rom());
} catch (ROMFormatUnsupportedException e) {
return;
}
CartridgeFormatOption currOption = null;
for (CartridgeFormatOption option : options)
if (option.format.equals(cartridge().format())) currOption = option;
int pos = options.indexOf(currOption) + 1; // cycle through options
if (pos >= options.size()) pos = 0;
CartridgeFormatOption newOption = options.get(pos);
Cartridge newCart = newOption.format.createCartridge(cartridge().rom());
cartridgeSocket().insert(newCart, true);
showOSD(newOption.format.toString(), true);
}