/* * Copyright (C) 2012 Brendan Robert (BLuRry) brendan.robert@gmail.com. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301 USA */ package jace.apple2e; import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Optional; import java.util.Set; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.TimeUnit; import java.util.logging.Level; import java.util.logging.Logger; import jace.LawlessLegends; import jace.apple2e.softswitch.VideoSoftSwitch; import jace.cheat.Cheats; import jace.config.ClassSelection; import jace.config.ConfigurableField; import jace.core.Card; import jace.core.Computer; import jace.core.Device; import jace.core.Motherboard; import jace.core.RAM; import jace.core.RAMEvent; import jace.core.RAMListener; import jace.core.Utility; import jace.core.Video; import jace.hardware.CardDiskII; import jace.hardware.CardExt80Col; import jace.hardware.CardRamworks; import jace.hardware.ConsoleProbe; import jace.hardware.Joystick; import jace.hardware.NoSlotClock; import jace.hardware.ZipWarpAccelerator; import jace.hardware.massStorage.CardMassStorage; import jace.lawless.FPSMonitorDevice; import jace.lawless.LawlessVideo; import jace.state.Stateful; /** * Apple2e is a computer with a 65c02 CPU, 128k of bankswitched ram, * double-hires graphics, and up to seven peripheral I/O cards installed. Pause * and resume are implemented by the Motherboard class. This class provides * overall configuration of the computer, but the actual operation of the * computer and its timing characteristics are managed in the Motherboard class. * * @author Brendan Robert (BLuRry) brendan.robert@gmail.com */ @Stateful public class Apple2e extends Computer { static int IRQ_VECTOR = 0x003F2; @ConfigurableField(name = "Slot 1", shortName = "s1card") public ClassSelection card1 = new ClassSelection<>(Card.class, null); @ConfigurableField(name = "Slot 2", shortName = "s2card") public ClassSelection card2 = new ClassSelection<>(Card.class, null); @ConfigurableField(name = "Slot 3", shortName = "s3card") public ClassSelection card3 = new ClassSelection<>(Card.class, null); @ConfigurableField(name = "Slot 4", shortName = "s4card") public ClassSelection card4 = new ClassSelection<>(Card.class, null); @ConfigurableField(name = "Slot 5", shortName = "s5card") public ClassSelection card5 = new ClassSelection<>(Card.class, null); @ConfigurableField(name = "Slot 6", shortName = "s6card") public ClassSelection card6 = new ClassSelection<>(Card.class, CardDiskII.class); @ConfigurableField(name = "Slot 7", shortName = "s7card") public ClassSelection card7 = new ClassSelection<>(Card.class, CardMassStorage.class); @ConfigurableField(name = "Debug rom", shortName = "debugRom", description = "Use debugger //e rom") public boolean useDebugRom = false; @ConfigurableField(name = "Console probe", description = "Enable console redirection (experimental!)") public boolean useConsoleProbe = false; private final ConsoleProbe probe = new ConsoleProbe(); @ConfigurableField(name = "Helpful hints", shortName = "hints") public boolean enableHints = true; @ConfigurableField(name = "Renderer", shortName = "video", description = "Video rendering implementation") public ClassSelection