Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
Update intepreter.pb
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard-Stayman committed Jul 2, 2024
1 parent df6757a commit a9bb196
Showing 1 changed file with 1 addition and 128 deletions.
129 changes: 1 addition & 128 deletions core/intepreter.pb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit a9bb196

Please sign in to comment.