summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/charmap.inc4
-rw-r--r--shim.sym14
-rw-r--r--source/bank_00.asm73
-rw-r--r--source/bank_7e.asm11
-rw-r--r--source/bank_7f.asm11
5 files changed, 110 insertions, 3 deletions
diff --git a/include/charmap.inc b/include/charmap.inc
index ee1cf1d..72b2490 100644
--- a/include/charmap.inc
+++ b/include/charmap.inc
@@ -322,3 +322,7 @@ charmap "~", 240
TX_LF EQU -2 ; Line feed
TX_END EQU -1 ; End of message
+
+pushc
+newcharmap ascii
+popc
diff --git a/shim.sym b/shim.sym
index d194ebd..feb81f5 100644
--- a/shim.sym
+++ b/shim.sym
@@ -1,6 +1,14 @@
-00:04c5 lcd
-00:0531 timer
-00:0533 joypad
+00:13f0 lcd_function_1
+00:142e lcd_function_2
+00:144b lcd_function_3
+00:1466 lcd_function_4
+00:1481 lcd_function_5
+00:1496 lcd_function_6
+00:1545 lcd_function_7
+00:1719 lcd_function_8
+00:173c lcd_function_9
+00:162f lcd_function_a
+00:1776 lcd_function_b
00:0df5 function_00_0df5
00:0ecf function_00_0ecf
diff --git a/source/bank_00.asm b/source/bank_00.asm
index 961107b..05c1d18 100644
--- a/source/bank_00.asm
+++ b/source/bank_00.asm
@@ -484,6 +484,79 @@ function_00_0458::
pop af
ret
+unknown_00_0475:: ; ???
+ db 8,8,8,8, 8,8,8,8, 8,8,8,8, 8,8,8,8
+ db 8,8,8,0, 8,8,8,0, 8,8,8,0, 8,8,8,0
+ db 8,0,8,0, 8,0,8,0, 8,0,8,0, 8,0,8,0
+ db 8,0,0,8, 0,0,8,0, 0,8,0,0, 8,0,0,8
+ db 0,8,0,0, 0,8,0,0, 0,8,0,0, 0,8,0,0
+
+lcd::
+ push af
+ push bc
+ push de
+ push hl
+
+ ld hl, .return
+ push hl
+
+ ld a, [w_c340]
+ sla a
+ ld c, a
+ ld b, 0
+ ld hl, .pointers
+ add hl, bc
+ ld c, [hl]
+ inc hl
+ ld b, [hl]
+ push bc
+ pop hl
+ jp hl
+
+.return:
+ ld hl, w_c343
+ inc [hl]
+ ld hl, rSTAT
+.hblank_enter
+ ld a, STATF_LCD
+ and [hl]
+ jr nz, .hblank_enter
+
+ pop hl
+ pop de
+ pop bc
+ pop af
+rept 40
+ nop
+endr
+ reti
+
+.pointers:
+ const_def
+ const_dw LCD_FUNCTION_0, lcd_function_0
+ const_dw LCD_FUNCTION_1, lcd_function_1
+ const_dw LCD_FUNCTION_2, lcd_function_2
+ const_dw LCD_FUNCTION_3, lcd_function_3
+ const_dw LCD_FUNCTION_4, lcd_function_4
+ const_dw LCD_FUNCTION_5, lcd_function_5
+ const_dw LCD_FUNCTION_6, lcd_function_6
+ const_dw LCD_FUNCTION_7, lcd_function_7
+ const_dw LCD_FUNCTION_8, lcd_function_8
+ const_dw LCD_FUNCTION_9, lcd_function_9
+ const_dw LCD_FUNCTION_A, lcd_function_a
+ const_dw LCD_FUNCTION_B, lcd_function_b
+
+lcd_function_0::
+ ret ; unused
+
+timer::
+ reti
+
+ reti ; unused
+
+joypad::
+ reti
+
SECTION "vwf_draw_char", ROM0[$0723]
vwf_char_draw::
ld a, [w_vwf_char_start_x]
diff --git a/source/bank_7e.asm b/source/bank_7e.asm
new file mode 100644
index 0000000..aacb3e5
--- /dev/null
+++ b/source/bank_7e.asm
@@ -0,0 +1,11 @@
+INCLUDE "charmap.inc"
+
+SECTION "ASCII credits 1", ROMX[$4010], BANK[$7e]
+
+pushc
+setcharmap ascii
+ db "DSEQLITE", 0
+ db $01
+ db "CRTS(C) mcmxcvi by Toshiyuki Ueno", 0
+ db "toshi-u@tau.bekkoame.or.jp", 0
+popc
diff --git a/source/bank_7f.asm b/source/bank_7f.asm
new file mode 100644
index 0000000..b07a270
--- /dev/null
+++ b/source/bank_7f.asm
@@ -0,0 +1,11 @@
+INCLUDE "charmap.inc"
+
+SECTION "ASCII credits 2", ROMX[$4010], BANK[$7f]
+
+pushc
+setcharmap ascii
+ db "DSEQLITE", 0
+ db $01
+ db "CRTS(C) mcmxcvi by Toshiyuki Ueno", 0
+ db "toshi-u@tau.bekkoame.or.jp", 0
+popc