예제 #1
0
파일: GIDE.java 프로젝트: rexut/jkcemu
 private static HardDisk[] getHardDisks(Properties props, String propPrefix) {
   HardDisk[] rv = null;
   if (props != null) {
     for (int i = 0; i < 2; i++) {
       HardDisk disk = null;
       String prefix = String.format("%sharddisk.%d.", propPrefix, i + 1);
       String diskModel = EmuUtil.getProperty(props, prefix + "model");
       String fileName = EmuUtil.getProperty(props, prefix + "file");
       if (!diskModel.isEmpty() && !fileName.isEmpty()) {
         int c = EmuUtil.getIntProperty(props, prefix + "cylinders", 0);
         int h = EmuUtil.getIntProperty(props, prefix + "heads", 0);
         int n = EmuUtil.getIntProperty(props, prefix + "sectors_per_track", 0);
         if ((c > 0) && (h > 0) && (n > 0)) {
           disk = new HardDisk(diskModel, c, h, n, fileName);
         }
       }
       if (disk != null) {
         if (rv != null) {
           HardDisk[] a = new HardDisk[rv.length + 1];
           System.arraycopy(rv, 0, a, 0, rv.length);
           rv = a;
         } else {
           rv = new HardDisk[1];
         }
         rv[rv.length - 1] = disk;
       }
     }
   }
   return rv;
 }
예제 #2
0
파일: GIDE.java 프로젝트: rexut/jkcemu
 private static boolean emulatesGIDE(Properties props, String propPrefix) {
   boolean rv = true;
   for (int i = 0; i < propKeys.length; i++) {
     if (EmuUtil.getProperty(props, propPrefix + "harddisk.1." + propKeys[i]).isEmpty()) {
       rv = false;
       break;
     }
   }
   return rv;
 }
예제 #3
0
  @Override
  public void updFields(Properties props) {
    String os = EmuUtil.getProperty(props, this.propPrefix + "os.version");
    if (os.equals("3.1_64x16")) {
      this.btnMon31_64x16.setSelected(true);
    } else if (os.equals("3.1_64x32")) {
      this.btnMon31_64x32.setSelected(true);
    } else if (os.equals("SCCH8.0")) {
      this.btnMonSCCH80.setSelected(true);
    } else if (os.equals("2010")) {
      this.btnMon2010.setSelected(true);
    } else {
      this.btnMonSCCH1088.setSelected(true);
    }
    this.tabRF.updFields(props);
    this.tabGIDE.updFields(props);
    this.tabSCCH.updFields(props);
    this.fldAltPio2Rom2010.updFields(props);
    this.fldRomBank2010.updFields(props);

    this.btnColor.setSelected(EmuUtil.getBooleanProperty(props, this.propPrefix + "color", false));

    this.btnFloppyDisk.setSelected(
        EmuUtil.getBooleanProperty(props, this.propPrefix + "floppydisk.enabled", false));

    this.btnKCNet.setSelected(
        EmuUtil.getBooleanProperty(props, this.propPrefix + "kcnet.enabled", false));

    this.btnVDIP.setSelected(
        EmuUtil.getBooleanProperty(props, this.propPrefix + "vdip.enabled", false));

    this.btnJoystick.setSelected(
        EmuUtil.getBooleanProperty(props, this.propPrefix + "joystick.enabled", false));

    this.btnPasteFast.setSelected(
        EmuUtil.getBooleanProperty(props, this.propPrefix + "paste.fast", false));

    this.fldAltOS.updFields(props);
    this.fldAltFont.updFields(props);

    updSCCHFieldsEnabled();
    upd2010FieldsEnabled();
  }