Refactor: Restructure project package hierarchy and add initial implementation for assembler instructions, shell commands, and exception handling.

This commit is contained in:
2025-08-13 21:42:49 +02:00
parent b103631133
commit 12027fe740
135 changed files with 10835 additions and 31 deletions

View File

@@ -0,0 +1,28 @@
package mtmc.emulator
import java.util.*
class MTMCIO {
var value: Int = 0
internal enum class Buttons(val mask: Int) {
UP(128),
DOWN(64),
LEFT(32),
RIGHT(16),
START(8),
SELECT(4),
B(2),
A(1)
}
fun keyPressed(key: String) {
val button = Buttons.valueOf(key.uppercase(Locale.getDefault()))
value = value or button.mask
}
fun keyReleased(key: String) {
val button = Buttons.valueOf(key.uppercase(Locale.getDefault()))
value = value and button.mask.inv()
}
}