mirror of
https://github.com/ethauvin/chip-8.git
synced 2025-04-24 08:27:10 -07:00
Added mnemonic and pause/pause to resume.
This commit is contained in:
parent
8cd6a16568
commit
dc9bc73529
2 changed files with 8 additions and 4 deletions
|
@ -45,7 +45,7 @@ class MyFxApp : Application() {
|
|||
// Computer is paused
|
||||
|
||||
// Update the pause button label
|
||||
pauseButton?.text = if (newVal) "Resume" else "Pause"
|
||||
pauseButton?.text = if (newVal) "_Resume" else "_Pause"
|
||||
|
||||
// Display the disassembly
|
||||
updateDisassembly(disassembly!!, computer.disassemble())
|
||||
|
@ -187,10 +187,14 @@ class MyFxApp : Application() {
|
|||
exitProcess(0)
|
||||
}
|
||||
KeyCode.P -> {
|
||||
computer.pause()
|
||||
if (computer.paused) {
|
||||
computer.start()
|
||||
} else {
|
||||
computer.pause()
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
if (computer.paused) computer.start()
|
||||
if (computer.paused && event.code != KeyCode.ALT) computer.start()
|
||||
else {
|
||||
try {
|
||||
val key = Integer.parseInt(event.code.char, 16)
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
</padding>
|
||||
<Button text="Open rom..." alignment="CENTER" id="loadRom">
|
||||
</Button>
|
||||
<Button text="Pause" id="pause">
|
||||
<Button text="_Pause" id="pause">
|
||||
</Button>
|
||||
<HBox maxWidth="Infinity" spacing="10">
|
||||
<Label text="Clock speed"/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue