use of org.javatari.atari.cartridge.Cartridge in project javatari by ppeccin.
the class Monitor method loadCartridgePaste.
private void loadCartridgePaste() {
if (cartridgeChangeDisabledWarning())
return;
try {
Clipboard clip = Toolkit.getDefaultToolkit().getSystemClipboard();
Transferable transf = clip.getContents("Ignored");
if (transf == null)
return;
Cartridge cart = ROMTransferHandlerUtil.importCartridgeData(transf);
if (cart != null)
cartridgeInsert(cart, true);
} catch (Exception ex) {
// Simply give up
}
}
use of org.javatari.atari.cartridge.Cartridge in project javatari by ppeccin.
the class Monitor method loadCartridgeFromFile.
private void loadCartridgeFromFile(boolean autoPower) {
if (cartridgeChangeDisabledWarning())
return;
display.displayLeaveFullscreen();
Cartridge cart = null;
try {
File file = FileROMChooser.chooseFileToLoad();
if (file != null)
cart = ROMLoader.load(file);
} catch (AccessControlException e) {
// Automatically tries FileServiceChooser if access is denied
FileContents fileContents = FileServiceROMChooser.chooseFileToLoad();
if (fileContents != null)
cart = ROMLoader.load(fileContents);
}
if (cart != null)
cartridgeInsert(cart, autoPower);
else
display.displayRequestFocus();
}
use of org.javatari.atari.cartridge.Cartridge in project javatari by ppeccin.
the class Monitor method loadCartridgeFromURL.
private void loadCartridgeFromURL(boolean autoPower) {
if (cartridgeChangeDisabledWarning())
return;
display.displayLeaveFullscreen();
Cartridge cart = null;
String url = URLROMChooser.chooseURLToLoad();
if (url != null)
cart = ROMLoader.load(url, false);
if (cart != null)
cartridgeInsert(cart, autoPower);
else
display.displayRequestFocus();
}
use of org.javatari.atari.cartridge.Cartridge in project javatari by ppeccin.
the class Room method morphToStandaloneMode.
public void morphToStandaloneMode() {
if (isStandaloneMode())
return;
powerOff();
Cartridge lastCartridge = isClientMode() ? cartridgeProvided : currentConsole.cartridgeSocket().inserted();
if (standaloneConsole == null)
buildAndPlugStandaloneConsole();
else
plugConsole(standaloneConsole);
adjustPeripheralsToStandaloneOrServerOperation();
currentConsole.cartridgeSocket().insert(lastCartridge, false);
powerOn();
}
Aggregations