mirror of
https://github.com/badvision/jace.git
synced 2025-01-01 05:29:49 +00:00
Got all the startup issues with motherboard resolved, which were apparently the reason that the joysticks were not initalizing on startup correctly.
This commit is contained in:
parent
8a1844fb90
commit
2114059914
@ -124,7 +124,8 @@ public class Apple2e extends Computer {
|
||||
if (motherboard != null && motherboard.isRunning()) {
|
||||
motherboard.suspend();
|
||||
}
|
||||
motherboard = new Motherboard(this);
|
||||
motherboard = new Motherboard(this, motherboard);
|
||||
reconfigure();
|
||||
motherboard.reconfigure();
|
||||
}
|
||||
|
||||
@ -132,7 +133,6 @@ public class Apple2e extends Computer {
|
||||
public void coldStart() {
|
||||
pause();
|
||||
reinitMotherboard();
|
||||
//getMemory().dump();
|
||||
for (SoftSwitches s : SoftSwitches.values()) {
|
||||
s.getSwitch().reset();
|
||||
}
|
||||
@ -143,10 +143,6 @@ public class Apple2e extends Computer {
|
||||
}
|
||||
reboot();
|
||||
resume();
|
||||
/*
|
||||
getCpu().resume();
|
||||
getVideo().resume();
|
||||
*/
|
||||
}
|
||||
|
||||
public void reboot() {
|
||||
@ -477,4 +473,8 @@ public class Apple2e extends Computer {
|
||||
public String getShortName() {
|
||||
return "computer";
|
||||
}
|
||||
|
||||
private void attachMiscDevices() {
|
||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
}
|
@ -110,6 +110,7 @@ public abstract class Device implements Reconfigurable {
|
||||
|
||||
public void resume() {
|
||||
setRun(true);
|
||||
waitCycles = 0;
|
||||
}
|
||||
|
||||
public abstract void attach();
|
||||
|
@ -58,9 +58,14 @@ public class Motherboard extends TimedDevice {
|
||||
/**
|
||||
* Creates a new instance of Motherboard
|
||||
* @param computer
|
||||
* @param oldMotherboard
|
||||
*/
|
||||
public Motherboard(Computer computer) {
|
||||
public Motherboard(Computer computer, Motherboard oldMotherboard) {
|
||||
super(computer);
|
||||
if (oldMotherboard != null) {
|
||||
miscDevices.addAll(oldMotherboard.miscDevices);
|
||||
speaker = oldMotherboard.speaker;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -197,13 +197,13 @@ public class Joystick extends Device {
|
||||
|
||||
@Override
|
||||
protected void doEvent(RAMEvent e) {
|
||||
setRun(true);
|
||||
readJoystick();
|
||||
xSwitch.setState(true);
|
||||
x = 10 + joyX * 11;
|
||||
ySwitch.setState(true);
|
||||
y = 10 + joyY * 11;
|
||||
e.setNewValue(computer.getVideo().getFloatingBus());
|
||||
resume();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -69,7 +69,7 @@ public class PlaybackEngine extends Computer {
|
||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
};
|
||||
Motherboard motherboard = new Motherboard(dummyComputer);
|
||||
Motherboard motherboard = new Motherboard(dummyComputer, null);
|
||||
CardMockingboard mockingboard = new CardMockingboard(dummyComputer);
|
||||
|
||||
public PlaybackEngine() {
|
||||
|
Loading…
Reference in New Issue
Block a user