forked from KolibriOS/kolibrios
chip8: fix window frame + fix two Page fault issues
git-svn-id: svn://kolibrios.org@8729 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
ffc66daaff
commit
c09b0569fc
@ -103,7 +103,7 @@ proc chip8_emulatecycle stdcall
|
||||
movzx bx, byte [memory + 1 + ecx]
|
||||
or ax, bx
|
||||
mov word [opcode], ax
|
||||
; DEBUGF DBG_INFO, "opcode = 0x%x, ax = 0x%x\n", [opcode]:4, ax
|
||||
DEBUGF DBG_INFO, "opcode = 0x%x, ax = 0x%x\n", [opcode]:4, ax
|
||||
|
||||
shr ax, 8
|
||||
and ax, 0x000F
|
||||
@ -483,8 +483,8 @@ proc chip8_emulatecycle stdcall
|
||||
|
||||
.sw5_case_A1: ; skip next instruction if key V[X] is NOT pressed
|
||||
movzx ecx, byte [x]
|
||||
movzx eax, byte [V + ecx]
|
||||
mov bl, byte [key + eax]
|
||||
movzx edx, byte [V + ecx]
|
||||
mov bl, byte [key + edx]
|
||||
mov ax, 4
|
||||
cmp bl, 1
|
||||
jne .sw5_case_A1_endcheck
|
||||
|
@ -1,17 +1,19 @@
|
||||
; draw main window
|
||||
align 4
|
||||
proc draw_main_window stdcall
|
||||
DEBUGF DBG_INFO, "draw_main_window() start\n"
|
||||
mcall 12, 1 ; notify about draw beginning
|
||||
mcall 48, 3, sys_colors, sizeof.system_colors
|
||||
|
||||
mov edx, [sys_colors.work] ; background color
|
||||
or edx, 0x74000000 ; window type
|
||||
; DEBUGF DBG_INFO, "mainwindow w, h = %u, %u", GFX_COLS*GFX_PIX_SIZE + 8, GFX_ROWS*GFX_PIX_SIZE + 28
|
||||
mcall 0, <50, GFX_COLS*GFX_PIX_SIZE + 8>, <50, GFX_ROWS*GFX_PIX_SIZE + 28>, , , main_window_title ;
|
||||
mcall 0, <50, GFX_COLS*GFX_PIX_SIZE + 9>, <50, GFX_ROWS*GFX_PIX_SIZE + 28>, , , main_window_title ;
|
||||
|
||||
stdcall draw_screen
|
||||
|
||||
mcall 12, 2 ; notify about draw ending
|
||||
DEBUGF DBG_INFO, "draw_main_window() end\n"
|
||||
ret
|
||||
endp
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user