Small fix to display buffer and new rom addition.
This commit is contained in:
@@ -18,7 +18,7 @@ System :: struct {
|
|||||||
// PC program counter
|
// PC program counter
|
||||||
pc: u16,
|
pc: u16,
|
||||||
// 64x32-pixel monochrome display
|
// 64x32-pixel monochrome display
|
||||||
display: [64][32]u8,
|
display: [32][64]u8,
|
||||||
keypad: [16]bool,
|
keypad: [16]bool,
|
||||||
delay_timer: u8,
|
delay_timer: u8,
|
||||||
sound_timer: u8,
|
sound_timer: u8,
|
||||||
|
|||||||
+3
-2
@@ -23,13 +23,14 @@ main :: proc() {
|
|||||||
system := chip.init()
|
system := chip.init()
|
||||||
|
|
||||||
// load rom, hardcoded for now, will eventually be cli or gui
|
// load rom, hardcoded for now, will eventually be cli or gui
|
||||||
err := chip.load_rom(&system, "./2-ibm-logo.ch8")
|
// err := chip.load_rom(&system, "./2-ibm-logo.ch8")
|
||||||
|
err := chip.load_rom(&system, "./1-chip8-logo.ch8")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic("failed to load rom!")
|
panic("failed to load rom!")
|
||||||
}
|
}
|
||||||
|
|
||||||
// start the cycle
|
// start the cycle
|
||||||
chip.init_display_and_cycle(&system)
|
chip.run_system(&system)
|
||||||
|
|
||||||
when DEV {
|
when DEV {
|
||||||
if len(track.allocation_map) > 0 {
|
if len(track.allocation_map) > 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user