rom_index should be the number of times the loop has been iterated through
Use the actual size of the rom_index pointer