From a9bb196d094b8a2abd4f07bc9b6be98a3768fcfb Mon Sep 17 00:00:00 2001 From: Richard-Stayman Date: Tue, 2 Jul 2024 23:12:53 +0000 Subject: [PATCH] Update intepreter.pb --- core/intepreter.pb | 129 +-------------------------------------------- 1 file changed, 1 insertion(+), 128 deletions(-) diff --git a/core/intepreter.pb b/core/intepreter.pb index 66efbe8..d1476a9 100644 --- a/core/intepreter.pb +++ b/core/intepreter.pb @@ -467,121 +467,6 @@ Procedure intepreter_NextOpcode() Next Next EndIf - - - - - - - - - - - - -; intepreter_GPR_RV(15)=0 -; dheight = Hex2Dec(op_i4) -; dv_i2 = intepreter_GPR_RV(Hex2Dec(op_i2)) -; dv_i3 = intepreter_GPR_RV(Hex2Dec(op_i3)) -; ; --------------------- -; ; -- CHIP8 DRAWING -- -; ; --------------------- -; -; If dheight > 0 ; not superchip drawing -; -; For i2 = 0 To dheight-1 -; sprite.s = Bin(memory_GetValue(intepreter_SPR_I+i2)) -; offsetx.b = 8 - Len(sprite.s) -; For i3 = 1 To Len(sprite.s) -; -; If Mid(sprite.s,i3,1) = "1" -; -; x=( dv_i2 +offsetx.b+i3)-1 -; y=( dv_i3 +i2) -; -; ; ----------------------- -; ; -- Screen wrapping -- -; ; ----------------------- -; While y >= screen_pheight -; y = y-screen_pheight -; Wend -; While x >= screen_pwidth -; x = x-screen_pwidth -; Wend -; While y < 0 -; y = y+screen_pheight -; Wend -; While x < 0 -; x = x+screen_pwidth -; Wend -; -; If x<=screen_width And y<=screen_height And x>=0 And y>=0 -; If screen_pixels( x, y ) = #Black -; screen_pixels( x, y ) = #White -; ;intepreter_GPR_RV(15)=0 ; Pixel went from unset, to set -; ElseIf screen_pixels( x, y ) = #White -; screen_pixels( x, y ) = #Black -; intepreter_GPR_RV(15)=1 ; Pixel went from set, to unset -; EndIf -; EndIf -; -; EndIf -; Next -; Next -; -; ;force_redraw() ; Always redraw instantly in chip8 mode [S L O W] -; -; ; ------------------------- -; ; -- SUPERCHIP DRAWING -- -; ; ------------------------- -; -; Else ; draw 16x16 sprite instead -; dheight=16 -; di2=0 -; For i2 = 0 To dheight-1 -; sprite.s = RSet(Bin(memory_GetValue(intepreter_SPR_I+di2)),8,"0")+RSet(Bin(memory_GetValue(intepreter_SPR_I+di2+1)),8,"0") -; di2=di2+2 -; offsetx.b = 16 - Len(sprite.s) -; For i3 = 1 To Len(sprite.s) -; -; If Mid(sprite.s,i3,1) = "1" -; -; x=( dv_i2 +offsetx.b+i3)-1 -; y=( dv_i3 +i2) -; -; ; ----------------------- -; ; -- Screen wrapping -- -; ; ----------------------- -; While y >= screen_pheight -; y = y-screen_pheight -; Wend -; While x >= screen_pwidth -; x = x-screen_pwidth -; Wend -; While y < 0 -; y = y+screen_pheight -; Wend -; While x < 0 -; x = x+screen_pwidth -; Wend -; -; If x<=screen_pwidth And y<=screen_pheight And x>=0 And y>=0 -; If screen_pixels( x, y ) = #Black -; screen_pixels( x, y ) = #White -; ;intepreter_GPR_RV(15)=0 ; Pixel went from unset, to set -; ElseIf screen_pixels( x, y ) = #White -; screen_pixels( x, y ) = #Black -; intepreter_GPR_RV(15)=1 ; Pixel went from set, to unset -; EndIf -; EndIf -; -; EndIf -; Next -; Next -; -; EndIf - - Case "E" Select op_i3 @@ -771,17 +656,5 @@ Procedure intepreter_NextOpcode() intepreter_SPR_ST = intepreter_SPR_ST - 1 ; Decrease sound timer SetSoundFrequency(#beep_sound, 45000+(intepreter_SPR_ST*100)) PlaySound(#beep_sound,0,25); Play beep sound - EndIf - - ; -- keep registers within range -; For i=0 To 15 -; While intepreter_GPR_RV(i) < 0 -; intepreter_GPR_RV(i) + 256 -; Wend -; While intepreter_GPR_RV(i) > 255 -; intepreter_GPR_RV(i) - 256 -; Wend -; Next - - + EndIf EndProcedure