@ SPDX-License-Identifier: MIT @ Cartridge header and start-up for the Thumb undefined-encoding test ROM. @ @ build.py fills the logo (0x004-0x09F) and the complement check (0x0BD). @ The debugging-enable byte 0x09C stays 0x21 as the logo has it, so the @ retail BIOS keeps its own undefined-instruction handler (GBATEK "09Ch Bit @ 2,7"); that handler is what this ROM observes. .section .header, "ax", %progbits .arm .global _start _start: b rom_start .fill 156, 1, 0 @ logo, from build.py .ascii "THUMBUNDEF\0\0" @ 0x0A0 title, 12 bytes .ascii "ZTUA" @ 0x0AC game code .ascii "00" @ 0x0B0 maker code .byte 0x96 @ 0x0B2 fixed value .byte 0x00 @ 0x0B3 main unit .byte 0x00 @ 0x0B4 device type .fill 7, 1, 0 @ 0x0B5 reserved .byte 0x00 @ 0x0BC version .byte 0x00 @ 0x0BD complement, from build.py .hword 0 @ 0x0BE reserved rom_start: @ The BIOS hands over in System mode with SP_sys 0x03007F00, @ SP_irq 0x03007FA0, SP_svc 0x03007FE0 (GBATEK "BIOS RAM Usage"). ldr r0, =__iwram_lma ldr r1, =__iwram_start ldr r2, =__iwram_end 1: cmp r1, r2 ldrlo r3, [r0], #4 strlo r3, [r1], #4 blo 1b ldr r1, =__bss_start ldr r2, =__bss_end mov r3, #0 2: cmp r1, r2 strlo r3, [r1], #4 blo 2b ldr r0, =main mov lr, pc bx r0 3: b 3b .pool