Changed friendly text to make more sense, also added hack to do a proper reboot when the HDV is inserted during the boot sequence... for science.

This commit is contained in:
Brendan Robert 2015-03-29 16:07:00 -05:00
parent 3fa800d791
commit 4fc71a43a7
3 changed files with 35 additions and 25 deletions

View File

@ -25,6 +25,7 @@ import jace.config.ConfigurationUIController;
import jace.config.InvokableAction;
import jace.config.Reconfigurable;
import jace.core.CPU;
import jace.core.Computer;
import jace.core.Debugger;
import jace.core.RAM;
import jace.core.RAMEvent;
@ -46,6 +47,9 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import javafx.application.Platform;
import javafx.embed.swing.SwingFXUtils;
import javafx.event.EventHandler;
import javafx.fxml.FXMLLoader;
@ -440,6 +444,20 @@ public class EmulatorUILogic implements Reconfigurable {
JaceApplication.singleton.controller.removeMouseListener(handler);
}
}
public static void simulateCtrlAppleReset() {
Computer computer = JaceApplication.singleton.controller.computer;
computer.keyboard.openApple(true);
computer.warmStart();
Platform.runLater(() -> {
try {
Thread.sleep(500);
} catch (InterruptedException ex) {
Logger.getLogger(EmulatorUILogic.class.getName()).log(Level.SEVERE, null, ex);
}
computer.keyboard.openApple(false);
});
}
@Override
public String getName() {

View File

@ -383,18 +383,15 @@ public class Apple2e extends Computer {
" Presented by BLuRry",
" http://goo.gl/SnzqG",
"",
"Press F1 to insert disk in Slot 6, D1",
"Press F2 to insert disk in Slot 6, D2",
"Press F3 to insert HDV or 2MG in slot 7",
"Press F4 to open configuration",
"Press F5 to run raw binary program",
"Press F8 to correct the aspect ratio",
"Press F9 to toggle fullscreen",
"Press F10 to open/close the debugger",
"To insert a disk, please drag it over",
"this window and drop on the desired",
"drive icon.",
"",
" If metacheat is enabled:",
"Press HOME to activate memory heatmap",
"Press END to activate metacheat search"
"Press CTRL+SHIFT+C for configuration.",
"",
"O-A is Alt/Option",
"C-A is Shortcut/Command",
"Reset is Delete/Backspace"
}) {
int addr = 0x0401 + VideoDHGR.calculateTextOffset(row++);
for (char c : s.toCharArray()) {

View File

@ -18,6 +18,7 @@
*/
package jace.hardware.massStorage;
import jace.EmulatorUILogic;
import jace.apple2e.MOS65C02;
import jace.config.Name;
import jace.core.Card;
@ -127,21 +128,15 @@ public class CardMassStorage extends Card implements MediaConsumerParent {
@Override
public void reconfigure() {
try {
unregisterListeners();
int pc = computer.getCpu().getProgramCounter();
if (drive1.getCurrentDisk() != null && getSlot() == 7 && (pc == 0x0c65e || pc == 0x0c661)) {
unregisterListeners();
int pc = computer.getCpu().getProgramCounter();
if (drive1.getCurrentDisk() != null && getSlot() == 7 && (pc >= 0x0c65e && pc <= 0x0c66F)) {
// If the computer is in a loop trying to boot from cards 6, fast-boot from here instead
// This is a convenience to boot a hard-drive if the emulator has started waiting for a currentDisk
currentDrive = drive1;
getCurrentDisk().boot0(getSlot(), computer);
Optional<Card>[] cards = computer.getMemory().getAllCards();
cards[6].ifPresent(card->computer.getMotherboard().cancelSpeedRequest(card));
}
registerListeners();
} catch (IOException ex) {
Logger.getLogger(CardMassStorage.class.getName()).log(Level.SEVERE, null, ex);
// This is a convenience to boot a hard-drive if the emulator has started waiting for a currentDisk
currentDrive = drive1;
EmulatorUILogic.simulateCtrlAppleReset();
}
registerListeners();
}
@Override
@ -258,4 +253,4 @@ public class CardMassStorage extends Card implements MediaConsumerParent {
public MediaConsumer[] getConsumers() {
return new MediaConsumer[]{drive1, drive2};
}
}
}