@ Cartridge header and start-up for the DMA-stop test ROM (gba-python C12). @ @ build.py fills the logo (0x004-0x09F) and the complement check (0x0BD). @ start-up copies the IWRAM and EWRAM sections (probe copies that run from @ each region) and clears .bss, then calls main. .section .header, "ax", %progbits .arm .global _start _start: b rom_start .fill 156, 1, 0 @ logo, from build.py .ascii "DMASTOP\0\0\0\0\0" @ 0x0A0 title, 12 bytes .ascii "ZDMA" @ 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 @ (GBATEK "BIOS RAM Usage"); the probes' stacks live there, in IWRAM, @ as Hades-Tests' do. ldr r0, =__iwram_lma ldr r1, =__iwram_start ldr r2, =__iwram_end bl copy ldr r0, =__ewram_lma ldr r1, =__ewram_start ldr r2, =__ewram_end bl copy 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 copy: cmp r1, r2 ldrlo r3, [r0], #4 strlo r3, [r1], #4 blo copy bx lr .pool