use of org.javatari.atari.console.Console in project javatari by ppeccin.
the class JComboBoxNim method cartridgeAutoDetect.
private void cartridgeAutoDetect() {
Console console = room.currentConsole();
Cartridge cart = console.cartridgeSocket().inserted();
if (cart == null)
return;
ArrayList<CartridgeFormatOption> options;
try {
options = CartridgeDatabase.getFormatOptions(cart.rom());
} catch (ROMFormatUnsupportedException e) {
return;
}
Cartridge newCart = options.get(0).format.createCartridge(cart.rom());
console.cartridgeSocket().insert(newCart, true);
refreshCartridge();
}
use of org.javatari.atari.console.Console in project javatari by ppeccin.
the class JComboBoxNim method romFormatLbAction.
private void romFormatLbAction() {
Object sel = romFormatLb.getSelectedValue();
if (sel == null || !(sel instanceof CartridgeFormat))
return;
CartridgeFormat format = (CartridgeFormat) sel;
Console console = room.currentConsole();
Cartridge cart = console.cartridgeSocket().inserted();
if (cart == null || cart.format().equals(format))
return;
Cartridge newCart = format.createCartridge(cart.rom());
console.cartridgeSocket().insert(newCart, true);
}
use of org.javatari.atari.console.Console in project javatari by ppeccin.
the class Room method buildAndPlugStandaloneConsole.
protected Console buildAndPlugStandaloneConsole() {
if (standaloneConsole != null)
throw new IllegalStateException();
standaloneConsole = new Console();
plugConsole(standaloneConsole);
return standaloneConsole;
}
Aggregations