MCPcopy Create free account
hub / github.com/badvision/jace / runFile

Method runFile

src/main/java/jace/EmulatorUILogic.java:197–211  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

195// }
196//
197 @InvokableAction(
198 name = "BRUN file",
199 category = "file",
200 description = "Loads a binary file in memory and executes it. File should end with #06xxxx, where xxxx is the start address in hex",
201 alternatives = "Execute program;Load binary;Load program;Load rom;Play single-load game",
202 defaultKeyMapping = "ctrl+shift+b")
203 public static void runFile() {
204 Emulator.whileSuspended(c-> {
205 FileChooser select = new FileChooser();
206 File binary = select.showOpenDialog(JaceApplication.getApplication().primaryStage);
207 if (binary != null) {
208 runFileNamed(binary);
209 }
210 });
211 }
212
213 public static void runFileNamed(File binary) {
214 String fileName = binary.getName().toLowerCase();

Callers 1

initMethod · 0.80

Calls 3

whileSuspendedMethod · 0.95
getApplicationMethod · 0.95
runFileNamedMethod · 0.95

Tested by

no test coverage detected