mirror of
https://github.com/badvision/lawless-legends.git
synced 2024-07-07 14:29:16 +00:00
Better cold-boot behavior
This commit is contained in:
parent
0567ed94cf
commit
0ca9b29614
@ -46,7 +46,7 @@ public class LawlessComputer extends Apple2e {
|
||||
getVideo().configureVideoMode();
|
||||
|
||||
try {
|
||||
waitForVBL(1);
|
||||
waitForVBL();
|
||||
renderWithMask(0x8, 0x11, 0x22, 0x44);
|
||||
Video.forceRefresh();
|
||||
waitForVBL(10);
|
||||
@ -106,7 +106,7 @@ public class LawlessComputer extends Apple2e {
|
||||
List<Runnable> vblCallbacks = Collections.synchronizedList(new ArrayList<Runnable>());
|
||||
|
||||
public void waitForVBL() throws InterruptedException {
|
||||
waitForVBL(1);
|
||||
waitForVBL(0);
|
||||
}
|
||||
|
||||
public void waitForVBL(int count) throws InterruptedException {
|
||||
@ -134,13 +134,16 @@ public class LawlessComputer extends Apple2e {
|
||||
}
|
||||
|
||||
public void finishColdStart() {
|
||||
try {
|
||||
for (Optional<Card> c : getMemory().getAllCards()) {
|
||||
c.ifPresent(Card::reset);
|
||||
waitForVBL();
|
||||
}
|
||||
getCpu().resume();
|
||||
reboot();
|
||||
cpu.resume();
|
||||
resume();
|
||||
warmStart();
|
||||
} catch (InterruptedException ex) {
|
||||
Logger.getLogger(LawlessComputer.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
private byte[] getBootScreen() {
|
||||
|
Loading…
Reference in New Issue
Block a user