aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/gui/WindowContainer.kt
diff options
context:
space:
mode:
authorJames Barnett <noreply@jamesbarnett.xyz>2018-07-21 19:46:20 +0100
committerJames Barnett <noreply@jamesbarnett.xyz>2018-07-21 19:46:20 +0100
commitc6a953d722b1fdc27a9db6f78f00c52fe43a7222 (patch)
tree6efab06c40d0bd3c26876ca2b40f2f0f20b2def2 /src/main/kotlin/gui/WindowContainer.kt
parent2861f2db6f918c48019c1ac3f91bf6a407452493 (diff)
downloadKGB-c6a953d722b1fdc27a9db6f78f00c52fe43a7222.tar.xz
KGB-c6a953d722b1fdc27a9db6f78f00c52fe43a7222.zip
Add ability to step through CPU execution of boot rom
Diffstat (limited to 'src/main/kotlin/gui/WindowContainer.kt')
-rw-r--r--src/main/kotlin/gui/WindowContainer.kt6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/kotlin/gui/WindowContainer.kt b/src/main/kotlin/gui/WindowContainer.kt
index 5e101b7..4d58c18 100644
--- a/src/main/kotlin/gui/WindowContainer.kt
+++ b/src/main/kotlin/gui/WindowContainer.kt
@@ -10,6 +10,7 @@ import imgui.impl.LwjglGL3
import org.lwjgl.opengl.GL11
import uno.glfw.GlfwWindow
import uno.glfw.glfw
+import java.io.File
class WindowContainer {
@@ -18,6 +19,10 @@ class WindowContainer {
init {
glfw.init("3.2")
cpu = Cpu()
+ val file = File("src/main/resources/roms/boot-rom.gb")
+ val rom = file.readBytes()
+ cpu.loadRom(rom)
+ //cpu.run()
}
val window = GlfwWindow(1280, 720, "KGB - KotlinGameBoy").apply {
@@ -52,6 +57,7 @@ class WindowContainer {
paintDebugWindow()
paintEmulationOutputWindow()
paintCpuRegisterWindow(cpu.registers)
+ paintRunControlWindow(cpu)
}
gln.glViewport(window.framebufferSize)