Search in sources :

Example 1 with Console

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();
}
Also used : Cartridge(org.javatari.atari.cartridge.Cartridge) Console(org.javatari.atari.console.Console) CartridgeFormatOption(org.javatari.atari.cartridge.CartridgeFormatOption) ROMFormatUnsupportedException(org.javatari.atari.cartridge.ROMFormatUnsupportedException)

Example 2 with Console

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);
}
Also used : Cartridge(org.javatari.atari.cartridge.Cartridge) CartridgeFormat(org.javatari.atari.cartridge.CartridgeFormat) Console(org.javatari.atari.console.Console)

Example 3 with Console

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;
}
Also used : Console(org.javatari.atari.console.Console) ClientConsole(org.javatari.atari.network.ClientConsole) ServerConsole(org.javatari.atari.network.ServerConsole)

Aggregations

Console (org.javatari.atari.console.Console)3 Cartridge (org.javatari.atari.cartridge.Cartridge)2 CartridgeFormat (org.javatari.atari.cartridge.CartridgeFormat)1 CartridgeFormatOption (org.javatari.atari.cartridge.CartridgeFormatOption)1 ROMFormatUnsupportedException (org.javatari.atari.cartridge.ROMFormatUnsupportedException)1 ClientConsole (org.javatari.atari.network.ClientConsole)1 ServerConsole (org.javatari.atari.network.ServerConsole)1