if (rom.getRomType().equals("Earthbound") && (rom.length() == 0x300200 || rom.length() == 0x400200))
if (rom.getRomType().equals("Earthbound") && rom.length() == 0x300200)
    private boolean loadRom(File loc)    {        loading = true;        if (loc == null)        {            if (!rom.loadRom())            {                loading = false;                return false;            }        }        else if (!rom.loadRom(loc))        {            loading = false;            return false;        }        // TODO finish original ROM loading special case        // If ROM just loaded is the original ROM...        if (rom.getFilePath().getAbsoluteFile()            .equals(                getOrginalRomFile(rom.getRomType()).getFilePath()                    .getAbsoluteFile()))        {            // If using direct file IO, changes could be made without saving.            if (rom.isDirectFileIO())            {                JOptionPane.showMessageDialog(mainWindow,                    "You have attempted to load the ROM you have\n"                        + "designated as the original ROM. In order\n"                        + "for this program to work correctly, that\n"                        + "ROM must stay unmodified. If you wish to\n"                        + "do any hacking, make a copy of that ROM,\n"                        + "and edit the copy. If you wish to simply\n"                        + "view but not modify the original ROM,\n"                        + "disable direct file IO mode, and try again.",                    "May Not Load ROM", JOptionPane.WARNING_MESSAGE);                rom.isLoaded = false;                loading = false;                return false;            }            // If not using direct file IO, just disallowing saving            else            {                JOptionPane.showMessageDialog(mainWindow,                    "You have choosen to load the ROM you have\n"                        + "designated as the original ROM. In order\n"                        + "for this program to work correctly, that\n"                        + "ROM must stay unmodified. If you wish to\n"                        + "do any hacking, make a copy of that ROM,\n"                        + "and edit the copy. If you wish to simply\n"                        + "view but not modify the original ROM,\n"                        + "continue, but remember you will not be\n"                        + "allowed to save your changes in any way.",                    "May Not Save Over Original ROM",                    JOptionPane.WARNING_MESSAGE);                save.setEnabled(false);                saveAs.setEnabled(false);                useFileIO.setEnabled(false);            }        }        //if a Earthbound ROM was just loaded and it is unexpanded (3 MB + 512        // byte header) then we may want to expand it        if (rom.getRomType().equals("Earthbound")            && (rom.length() == 0x300200 || rom.length() == 0x400200))        {            //name of the automatic expansion preference            String prefName = "Earthbound.autoExpand";            //check preferences for user set default            //Earthbound.autoExpand:            // true = always expand unexpanded ROMs on load            // false = never expand unexpanded ROMs on load            // null (unset) = ask user            if (getPrefs().hasValue(prefName))            {                if (getPrefs().getValueAsBoolean(prefName))                {                    //if user selected always expand, do so                    rom.expand();                }                //if user selected never expand, do nothing            }            else            {                //if user has not set preference, or choose to have it ask                //pop up a dialog explaining preference, with a remember                //my preference checkbox                JCheckBox remember = new JCheckBox(                    "Remember my choice and use it next time.", false);                JTextArea text = new JTextArea(                    "The Earthbound ROM you loaded is "                        + "not expanded. Expanding a ROM allows you to "                        + "have an extra megabyte of storage for more "                        + "of anything. ROM expansion cannot be undone"                        + "If you do not expand your ROM now "                        + "you can do so later by using the "                        + "ROM Expander located in the \"General\" "                        + "group. You can also use the ROM Expander "                        + "to expand by another 2 MB at any time."                        + "\n\nDo you wish to expand this ROM?", 10, 30);                //make sure text area looks right and does word wrap                text.setEditable(false);                text.setEnabled(false);                text.setLineWrap(true);                text.setWrapStyleWord(true);                //little L&F specific stuff, hopefully it won't mess up other                //L&F's                //makes text in the JTextArea look like the text in                //the JCheckBox                text.setBackground(remember.getBackground());                text.setDisabledTextColor(remember.getForeground());                text.setFont(remember.getFont());                int opt = JOptionPane.showConfirmDialog(mainWindow,                    new JComponent[]{text, remember}, "Expand ROM?",                    JOptionPane.YES_NO_OPTION);                //yes is true if user selected yes, false if they did not                boolean yes = opt == JOptionPane.YES_OPTION;                if (yes)                    rom.expand();                //if user selected to remember their selection, put it into                //the preferences                if (remember.isSelected())                    getPrefs().setValueAsBoolean(prefName, yes);            }        }        resetModules();        mainWindow.setTitle(MainGUI.getDescription() + " "            + MainGUI.getVersion() + " - " + rom.getPath());        addRecentLoad(rom.getPath());        refreshRecentLoads();        doBackup();        loading = false;        return true;    }