From ce5e1b1d7e5b0afa3f91b50803f6ba4bc9730110 Mon Sep 17 00:00:00 2001 From: mid-kid Date: Fri, 9 Sep 2022 23:52:09 +0200 Subject: [PATCH] Small changes over time --- .lvimrc | 2 +- source/home/video.asm | 2 +- source/main.asm | 2 +- source/prog/ezflash_test.asm | 13 +++++++++++-- source/prog/serial_test.asm | 7 +++---- 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/.lvimrc b/.lvimrc index e453939..cedac71 100644 --- a/.lvimrc +++ b/.lvimrc @@ -1,3 +1,3 @@ if expand(":e") ==? 'asm' || expand(":e") ==? 'inc' || expand(":e") ==? 'link' - setf rgbds + setf rgbds endif diff --git a/source/home/video.asm b/source/home/video.asm index 720eebb..3cc4927 100644 --- a/source/home/video.asm +++ b/source/home/video.asm @@ -9,7 +9,7 @@ section "home/video.asm", rom0 lcd_vblank_wait:: ldh a, [r_ly] - cp r_ly_vblank + 1 + cp r_ly_vblank jr nz, lcd_vblank_wait ret diff --git a/source/main.asm b/source/main.asm index 8408202..9cec8f6 100644 --- a/source/main.asm +++ b/source/main.asm @@ -4,7 +4,7 @@ include "video.inc" section "main.asm", rom0 main:: - ;call prog_serial_test + call prog_serial_test call prog_ezflash_test call lcd_disable diff --git a/source/prog/ezflash_test.asm b/source/prog/ezflash_test.asm index 4bbcd48..fa7a8b8 100644 --- a/source/prog/ezflash_test.asm +++ b/source/prog/ezflash_test.asm @@ -58,8 +58,6 @@ prog_ezflash_test:: ld bc, ezf_write_end - ezf_write_ram call memcpy - call ezf_unlock - call update_write_addr call update_write_val call update_write2_addr @@ -98,6 +96,7 @@ main: jr main .joy_a_write + call ezf_unlock ld hl, w_write_addr ld a, [hl+] ld h, [hl] @@ -107,12 +106,14 @@ main: jr main .joy_a_write2 + call ezf_lock ld hl, w_write2_addr ld a, [hl+] ld h, [hl] ld l, a ld a, [w_write2_val] call ezf_write + ;ld [hl], a jr main .joy_right @@ -318,6 +319,14 @@ update_read_view: jr nz, .loop ret +ezf_lock: + xor a + ld hl, $7f31 + call ezf_write + xor a + ld hl, $7f32 + jp ezf_write + ezf_unlock: xor a ld hl, $7f31 diff --git a/source/prog/serial_test.asm b/source/prog/serial_test.asm index 115bb9f..23dc2c6 100644 --- a/source/prog/serial_test.asm +++ b/source/prog/serial_test.asm @@ -23,10 +23,6 @@ main: bit joy_a_f, a jr nz, .send_shit - bgcoord hl, 7, 5 - call lcd_blank_wait - ld [hl], " " - .continue call vblank_wait jr main @@ -45,6 +41,9 @@ main: call serial_finished jr nz, .send_shit_wait + bgcoord hl, 7, 5 + call lcd_blank_wait + ld [hl], " " jr .continue transfer_buffer: