public static List getSystemFiles(SystemDefinition system, Keyword type, boolean probefilesP) {
    { List files = List.newList();
      String filename = null;

      { Object old$Currentsystemdefinition$000 = Stella.$CURRENTSYSTEMDEFINITION$.get();
        Object old$Currentsystemdefinitionsubdirectory$000 = Stella.$CURRENTSYSTEMDEFINITIONSUBDIRECTORY$.get();

        try {
          Native.setSpecial(Stella.$CURRENTSYSTEMDEFINITION$, Stella.getSystemDefinition(system.name));
          Native.setSpecial(Stella.$CURRENTSYSTEMDEFINITIONSUBDIRECTORY$, ((((SystemDefinition)(Stella.$CURRENTSYSTEMDEFINITION$.get())) != null) ? ((SystemDefinition)(Stella.$CURRENTSYSTEMDEFINITION$.get())).directory : null));
          if (((SystemDefinition)(Stella.$CURRENTSYSTEMDEFINITION$.get())) != null) {
            {
              { StringWrapper f = null;
                Cons iter000 = ((SystemDefinition)(Stella.$CURRENTSYSTEMDEFINITION$.get())).files;

                for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
                  f = ((StringWrapper)(iter000.value));
                  if (type == Stella.KWD_JAVA) {
                    filename = StringWrapper.javaTranslateClassNamestring(StringWrapper.wrapString("_STARTUP-" + Native.stringUpcase(f.wrapperValue))).wrapperValue;
                  }
                  else {
                    filename = Stella_Object.makeFileNameFromRelativePath(f, type);
                  }
                  Stella.helpGetSystemFiles(filename, files, probefilesP);
                }
              }
              if (type == Stella.KWD_JAVA) {
                if (SystemDefinition.getCardinalModule(((SystemDefinition)(Stella.$CURRENTSYSTEMDEFINITION$.get()))) == null) {
                  {
                    System.out.println("No cardinal module defined for system `" + system.name + "'");
                    System.out.println();
                  }
;
                  return (Stella.NIL_LIST);
                }
                { Stella_Class renamed_Class = null;
                  Iterator iter001 = Module.allClasses(SystemDefinition.getCardinalModule(((SystemDefinition)(Stella.$CURRENTSYSTEMDEFINITION$.get()))), true);

                  while (iter001.nextP()) {
                    renamed_Class = ((Stella_Class)(iter001.value));
                    filename = renamed_Class.javaMakeCodeOutputFileName(false);
                    Stella.helpGetSystemFiles(filename, files, probefilesP);
                  }
                }
                filename = Stella.string_javaMakeCodeOutputFileName(Module.javaYieldFlotsamClassName(SystemDefinition.getCardinalModule(((SystemDefinition)(Stella.$CURRENTSYSTEMDEFINITION$.get())))), false);
                Stella.helpGetSystemFiles(filename, files, probefilesP);
              }
              else {
              }
            }
          }
          else {
            {
              Stella.STANDARD_WARNING.nativeStream.println("Warning: Can't find a system named `" + system.name + "'");
              Stella.STANDARD_WARNING.nativeStream.println();
            }
;
          }

        } finally {
          Stella.$CURRENTSYSTEMDEFINITIONSUBDIRECTORY$.set(old$Currentsystemdefinitionsubdirectory$000);
          Stella.$CURRENTSYSTEMDEFINITION$.set(old$Currentsystemdefinition$000);
        }
      }
      return (files);
    }
  }