vblank performance

This commit is contained in:
Randy Thiemann 2023-10-18 05:26:06 +02:00
parent 6b644665cf
commit 80a075e137
3 changed files with 30 additions and 43 deletions

View File

@ -1,19 +0,0 @@
# Tile layout
Note: All tiles are 8x7 so that the entire tetrion fits on the screen.
Tile 0, 1 are all black and all white for lockflash and such.
Tiles 2, 3, 4, 5, 6 are the edges of the tetrion.
Tile 7 is the background of the tetrion.
Tile 8 is a horizontal line for the level state
Tile 9 is a pointer
Tiles 10, 11, 12, 13, 14, 15, 16 are IZSJLOT in their falling state.
Tiles 17, 18, 19, 20, 21, 22, 23 are IZSJLOT in their locked state.
Tiles 24, 25, 26, 27, 28, 29, 30 are IZSJLOT in their locking state 1.
Tiles 31, 32, 33, 34, 35, 36, 37 are IZSJLOT in their locking state 2.
Tiles 38, 39, 40, 41, 42, 43, 44 are IZSJLOT in their locking state 3.
Tiles 45, 46, 47, 48, 49, 50, 51 are IZSJLOT in their locking state 4.
Tiles 52, 53, 54, 55, 56, 57, 58 are IZSJLOT in their locking state 5.
Tiles 59, 60, 61, 62, 63, 64, 65 are IZSJLOT in their locking state 6.
Tiles 66-73 are for section drawing
Tiles 74-109 are the font, dark.
Tiles 110-119 are the numbers, light.
Tiles 120-127 -----------------------------------------------

View File

@ -32,7 +32,7 @@ BlitField::
; Where to put it
ld hl, FIELD_TOP_LEFT
; How much to increment hl after each row
ld bc, 32
ld bc, 32-10
; The first 14 rows can be blitted without checking for vram access.
REPT 14
@ -44,23 +44,29 @@ BlitField::
add hl, bc
ENDR
: ldh a, [rLY]
cp a, 0
jr nz, :-
; The last 6 rows need some care.
REPT 6
REPT 2
; Wait until start of drawing, then insert 35 nops.
: ldh a, [rSTAT]
and STATF_LCD
cp STATF_HBL
jr z, :-
: ldh a, [rSTAT]
and STATF_LCD
cp STATF_HBL
and a, 3
cp a, 3
jr nz, :-
REPT 5
REPT 35
nop
ENDR
; Blit a line.
REPT 10
ld a, [de]
ld [hl+], a
inc de
ENDR
ENDR
; Increment HL so that the next line can be blitted.
add hl, bc
ENDR

View File

@ -1,5 +1,5 @@
#Emulicious settings file
#Wed Oct 18 04:45:41 CEST 2023
#Wed Oct 18 05:24:23 CEST 2023
WindowEventViewerWindowHeight=1416
WindowEventViewerWindowDivider=876
WindowMemoryTracerWindowY=631
@ -16,7 +16,7 @@ GBGamepadThreshold=50
GameBoyErrorBreakpointEnabled20=false
StretchToWindow=false
WindowTileViewerOpen=false
DebuggerWestPanelSelectedTab=1
DebuggerWestPanelSelectedTab=0
WindowMemoryTracerWindowWidth=243
WindowPaletteViewerOpen=false
Key37=-1
@ -98,7 +98,7 @@ Gamepad1Key31=-1
Gamepad1Key30=-1
BankSwapAtPCBreakpointEnabled=false
DebuggerMemorySelectedTab=HRAM
WindowVideoViewerOpen=false
WindowVideoViewerOpen=true
WindowMemoryEditorTabVisibleRect=0,0,583,128
Gamepad1Key29=-1
Gamepad1Key28=-1
@ -160,8 +160,8 @@ Gamepad0Key31=-1
Gamepad0Key30=-1
SMSGamepadAThreshold=50
WindowPaletteViewerHeight=313
WindowVideoViewerY=275
WindowVideoViewerX=946
WindowVideoViewerY=674
WindowVideoViewerX=2606
UninitializedMemoryBreakpointEnabled=false
Gamepad0Key29=-1
Gamepad0Key28=-1
@ -199,8 +199,8 @@ GameBoyErrorBreakpointMessage32=
InterruptBreakpointCondition=
Recent0=C\:\\workspace\\dmgtris\\bin\\out.gb
GameBoyErrorBreakpointMessage20=
WindowEmuliciousY=322
WindowEmuliciousX=900
WindowEmuliciousY=443
WindowEmuliciousX=1109
GameBoyErrorBreakpointEnabled9=false
GameBoyErrorBreakpointEnabled8=false
GameBoyErrorBreakpointEnabled7=false
@ -264,8 +264,8 @@ Gamepad0Key3=-1
Gamepad0Key2=-1
Gamepad0Key1=-1
Gamepad0Key0=-1
WindowDebuggerY=388
WindowDebuggerX=417
WindowDebuggerY=350
WindowDebuggerX=935
InterruptBreakpointSuspend=true
SMSGamepadAKeyboard=false
GameBoyErrorBreakpointSuspend32=true