include "charmap.inc" include "video.inc" include "hardware.inc" section "prog/serial_test.asm", rom0 prog_serial_test:: call lcd_disable call font_load call pals_set_bw call vram_clear_bgmap call lcd_enable ld hl, string_title bgcoord de, (screen_width - string_title.end + string_title + 1) / 2, 2 call prints call serial_init_master main: call joypad_update ldh a, [h_joypad_released] bit joy_a_f, a jr nz, .send_shit .continue call vblank_wait jr main .send_shit bgcoord hl, 7, 5 call lcd_blank_wait ld [hl], "A" ld hl, transfer_buffer ld de, NULL ld bc, transfer_buffer.end - transfer_buffer call serial_transfer .send_shit_wait call vblank_wait call serial_finished jr nz, .send_shit_wait bgcoord hl, 7, 5 call lcd_blank_wait ld [hl], " " jr .continue transfer_buffer: db $00, $11, $22, $33, $44, $55, $66, $77, $88, $99, $AA, $BB, $CC, $DD, $EE, $FF .end string_title: db "SERIAL TEST$" .end