public void saveRoms() {
        try {
            FileOutputStream fos = new FileOutputStream("prg.bin");
            fos.write(prgMemory);
            fos.close();
        } catch (Exception e) {

        }
        try {
            FileOutputStream fos = new FileOutputStream("chr.bin");
            fos.write(chrMemory);
            fos.close();
        } catch (Exception e) {

        }
        try {
            FileOutputStream fos = new FileOutputStream("chrRAM.bin");
            byte[] stream = new byte[0x2000];
            for (int i = 0; i < 0x2000; i++) {
                stream[i] = (byte)(readChr(i) & 0xFF);
            }
            fos.write(stream);
            fos.close();
        } catch (Exception e) {

        }
    }