Added rotation

This commit is contained in:
Logan Hunt 2020-08-10 14:04:44 -06:00
parent 7f856467a0
commit e09a23f0a4
28 changed files with 856 additions and 620 deletions

Binary file not shown.

View File

View File

@ -1,498 +0,0 @@
Archive member included to satisfy reference by file (symbol)
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/libg.a(lib_a-init.o)
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/gba_crt0.o (__libc_init_array)
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/libg.a(lib_a-memcpy-stub.o)
main.o (memcpy)
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/libsysbase.a(malloc_vars.o)
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/gba_crt0.o (fake_heap_end)
Discarded input sections
.text 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/gba_crt0.o
.data 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/gba_crt0.o
.bss 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/gba_crt0.o
.text 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crti.o
.data 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crti.o
.bss 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crti.o
.text 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtbegin.o
.data 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtbegin.o
.bss 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtbegin.o
.data.__dso_handle
0x0000000000000000 0x4 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtbegin.o
.text 0x0000000000000000 0x5c main.o
.data 0x0000000000000000 0x4 main.o
.text 0x0000000000000000 0x0 player.o
.data 0x0000000000000000 0x0 player.o
.bss 0x0000000000000000 0x0 player.o
.data 0x0000000000000000 0x0 toolbox.o
.text 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/libg.a(lib_a-init.o)
.data 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/libg.a(lib_a-init.o)
.bss 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/libg.a(lib_a-init.o)
.text 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/libg.a(lib_a-memcpy-stub.o)
.data 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/libg.a(lib_a-memcpy-stub.o)
.bss 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/libg.a(lib_a-memcpy-stub.o)
.text 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/libsysbase.a(malloc_vars.o)
.data 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/libsysbase.a(malloc_vars.o)
.bss 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/libsysbase.a(malloc_vars.o)
.bss.fake_heap_start
0x0000000000000000 0x4 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/libsysbase.a(malloc_vars.o)
.text 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtend.o
.data 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtend.o
.bss 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtend.o
.text 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtn.o
.data 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtn.o
.bss 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtn.o
Memory Configuration
Name Origin Length Attributes
rom 0x0000000008000000 0x0000000002000000
iwram 0x0000000003000000 0x0000000000008000
ewram 0x0000000002000000 0x0000000000040000
*default* 0x0000000000000000 0xffffffffffffffff
Linker script and memory map
0x0000000008000000 __text_start = ORIGIN (rom)
0x0000000002040000 __eheap_end = (ORIGIN (ewram) + LENGTH (ewram))
0x0000000003000000 __iwram_start = ORIGIN (iwram)
0x0000000003008000 __iwram_top = (ORIGIN (iwram) + LENGTH (iwram))
0x0000000003007fa0 __sp_irq = (__iwram_top - 0x60)
0x0000000003007f00 __sp_usr = (__sp_irq - 0xa0)
0x0000000003007ff8 __irq_flags = 0x3007ff8
0x0000000008000000 . = __text_start
.crt0 0x0000000008000000 0x210
*(.crt0)
.crt0 0x0000000008000000 0x210 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/gba_crt0.o
0x0000000008000000 _start
0x00000000080000c4 __boot_method
0x00000000080000c5 __slave_number
0x00000000080000e0 start_vector
0x0000000008000210 . = ALIGN (0x4)
.init 0x0000000008000210 0xc
*(SORT_NONE(.init))
.init 0x0000000008000210 0x4 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crti.o
0x0000000008000210 _init
.init 0x0000000008000214 0x8 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtn.o
.plt 0x000000000800021c 0x0
*(.plt)
0x000000000800021c . = ALIGN (0x4)
.text 0x000000000800021c 0x338
*(EXCLUDE_FILE(*.iwram*) .text*)
.text.deregister_tm_clones
0x000000000800021c 0x2c /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtbegin.o
.text.register_tm_clones
0x0000000008000248 0x34 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtbegin.o
.text.__do_global_dtors_aux
0x000000000800027c 0x30 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtbegin.o
.text.frame_dummy
0x00000000080002ac 0x28 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtbegin.o
.text.startup 0x00000000080002d4 0x108 main.o
0x00000000080002d4 main
.text 0x00000000080003dc 0x80 toolbox.o
0x00000000080003dc oam_init
0x000000000800041c oam_copy
0x000000000800043c obj_copy
.text.__libc_init_array
0x000000000800045c 0x50 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/libg.a(lib_a-init.o)
0x000000000800045c __libc_init_array
.text.memcpy 0x00000000080004ac 0xa8 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/libg.a(lib_a-memcpy-stub.o)
0x00000000080004ac memcpy
*(.gnu.linkonce.t.*)
*(.text.*personality*)
*(.gnu.warning)
*(.glue_7t)
.glue_7t 0x0000000008000554 0x0 linker stubs
*(.glue_7)
.glue_7 0x0000000008000554 0x0 linker stubs
*(.vfp11_veneer)
.vfp11_veneer 0x0000000008000554 0x0 linker stubs
0x0000000008000554 . = ALIGN (0x4)
0x0000000008000554 __text_end = .
.v4_bx 0x0000000008000554 0x0
.v4_bx 0x0000000008000554 0x0 linker stubs
.iplt 0x0000000008000554 0x0
.iplt 0x0000000008000554 0x0 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/gba_crt0.o
.fini 0x0000000008000554 0xc
*(.fini)
.fini 0x0000000008000554 0x4 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crti.o
0x0000000008000554 _fini
.fini 0x0000000008000558 0x8 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtn.o
0x0000000008000560 . = ALIGN (0x4)
.rodata 0x0000000008000560 0x280
*(.rodata)
.rodata 0x0000000008000560 0x280 player.o
0x0000000008000560 playerTiles
0x00000000080005e0 playerPal
*all.rodata*(*)
*(.roda)
*(.rodata.*)
*(.gnu.linkonce.r*)
0x00000000080007e0 . = ALIGN (0x4)
.ARM.extab
*(.ARM.extab* .gnu.linkonce.armextab.*)
0x00000000080007e0 __exidx_start = .
.ARM.exidx
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
0x00000000080007e0 __exidx_end = .
.ctors 0x00000000080007e0 0x0
*crtbegin.o(.ctors)
*(EXCLUDE_FILE(*crtend.o) .ctors)
*(SORT_BY_NAME(.ctors.*))
*(.ctors)
0x00000000080007e0 . = ALIGN (0x4)
.dtors 0x00000000080007e0 0x0
*crtbegin.o(.dtors)
*(EXCLUDE_FILE(*crtend.o) .dtors)
*(SORT_BY_NAME(.dtors.*))
*(.dtors)
0x00000000080007e0 . = ALIGN (0x4)
.eh_frame 0x00000000080007e0 0x4
*(.eh_frame)
.eh_frame 0x00000000080007e0 0x0 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtbegin.o
.eh_frame 0x00000000080007e0 0x4 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtend.o
0x00000000080007e4 . = ALIGN (0x4)
.rel.dyn 0x00000000080007e4 0x0
.rel.iplt 0x00000000080007e4 0x0 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/gba_crt0.o
.gcc_except_table
0x00000000080007e4 0x0
*(.gcc_except_table)
0x00000000080007e4 . = ALIGN (0x4)
0x00000000080007e4 __iwram_lma = .
.iwram 0x0000000003000000 0x0 load address 0x00000000080007e4
0x0000000003000000 __iwram_start__ = ABSOLUTE (.)
*(.iwram .iwram*)
*iwram.*(.text* .data*)
0x0000000003000000 . = ALIGN (0x4)
0x0000000003000000 __iwram_end__ = ABSOLUTE (.)
0x00000000080007e4 __data_lma = (__iwram_lma + SIZEOF (.iwram))
.bss 0x0000000003000000 0x424
0x0000000003000000 __bss_start = ABSOLUTE (.)
0x0000000003000000 __bss_start__ = ABSOLUTE (.)
*(.dynbss)
*(.gnu.linkonce.b*)
*(.bss*)
.bss.completed.1
0x0000000003000000 0x1 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtbegin.o
*fill* 0x0000000003000001 0x3
.bss.object.0 0x0000000003000004 0x18 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtbegin.o
.bss 0x000000000300001c 0x400 main.o
0x000000000300001c obj_buffer
.bss 0x000000000300041c 0x4 toolbox.o
0x000000000300041c __key_prev
0x000000000300041e __key_curr
.bss.fake_heap_end
0x0000000003000420 0x4 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/libsysbase.a(malloc_vars.o)
0x0000000003000420 fake_heap_end
*(COMMON)
0x0000000003000424 . = ALIGN (0x4)
0x0000000003000424 __bss_end__ = ABSOLUTE (.)
.data 0x0000000003000424 0x0 load address 0x00000000080007e4
0x0000000003000424 __data_start__ = ABSOLUTE (.)
*(.data*)
*(.gnu.linkonce.d*)
0x0000000003000424 . = ALIGN (0x4)
0x00000000080007e4 __preinit_lma = (__data_lma + SIZEOF (.data))
.igot.plt 0x0000000003000000 0x0
.igot.plt 0x0000000003000000 0x0 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/gba_crt0.o
.tm_clone_table
0x0000000003000000 0x0
.tm_clone_table
0x0000000003000000 0x0 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtbegin.o
.tm_clone_table
0x0000000003000000 0x0 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtend.o
.preinit_array 0x0000000003000424 0x0 load address 0x00000000080007e4
0x0000000003000424 __preinit_array_start = ABSOLUTE (.)
*(.preinit_array)
0x0000000003000424 __preinit_array_end = ABSOLUTE (.)
0x00000000080007e4 __init_lma = (__preinit_lma + SIZEOF (.preinit_array))
.init_array 0x0000000003000424 0x4 load address 0x00000000080007e4
0x0000000003000424 __init_array_start = ABSOLUTE (.)
*(SORT_BY_NAME(.init_array.*))
*(.init_array)
.init_array 0x0000000003000424 0x4 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtbegin.o
0x0000000003000428 __init_array_end = ABSOLUTE (.)
0x00000000080007e8 __fini_lma = (__init_lma + SIZEOF (.init_array))
.fini_array 0x0000000003000428 0x4 load address 0x00000000080007e8
0x0000000003000428 __fini_array_start = ABSOLUTE (.)
*(SORT_BY_NAME(.fini_array.*))
*(.fini_array)
.fini_array 0x0000000003000428 0x4 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtbegin.o
0x000000000300042c __fini_array_end = ABSOLUTE (.)
0x00000000080007ec __jcr_lma = (__fini_lma + SIZEOF (.fini_array))
.jcr 0x000000000300042c 0x0 load address 0x00000000080007ec
*(.jcr)
0x000000000300042c __data_end__ = ABSOLUTE (.)
0x00000000080007ec __iwram_overlay_lma = (__jcr_lma + SIZEOF (.jcr))
0x000000000300042c __iwram_overlay_start = .
.iwram0 0x000000000300042c 0x0 load address 0x00000000080007ec
*(.iwram0)
0x000000000300042c . = ALIGN (0x4)
0x00000000080007ec PROVIDE (__load_start_iwram0 = LOADADDR (.iwram0))
0x00000000080007ec PROVIDE (__load_stop_iwram0 = (LOADADDR (.iwram0) + SIZEOF (.iwram0)))
.iwram1 0x000000000300042c 0x0
*(.iwram1)
0x000000000300042c . = ALIGN (0x4)
[!provide] PROVIDE (__load_start_iwram1 = LOADADDR (.iwram1))
[!provide] PROVIDE (__load_stop_iwram1 = (LOADADDR (.iwram1) + SIZEOF (.iwram1)))
.iwram2 0x000000000300042c 0x0
*(.iwram2)
0x000000000300042c . = ALIGN (0x4)
[!provide] PROVIDE (__load_start_iwram2 = LOADADDR (.iwram2))
[!provide] PROVIDE (__load_stop_iwram2 = (LOADADDR (.iwram2) + SIZEOF (.iwram2)))
.iwram3 0x000000000300042c 0x0
*(.iwram3)
0x000000000300042c . = ALIGN (0x4)
[!provide] PROVIDE (__load_start_iwram3 = LOADADDR (.iwram3))
[!provide] PROVIDE (__load_stop_iwram3 = (LOADADDR (.iwram3) + SIZEOF (.iwram3)))
.iwram4 0x000000000300042c 0x0
*(.iwram4)
0x000000000300042c . = ALIGN (0x4)
[!provide] PROVIDE (__load_start_iwram4 = LOADADDR (.iwram4))
[!provide] PROVIDE (__load_stop_iwram4 = (LOADADDR (.iwram4) + SIZEOF (.iwram4)))
.iwram5 0x000000000300042c 0x0
*(.iwram5)
0x000000000300042c . = ALIGN (0x4)
[!provide] PROVIDE (__load_start_iwram5 = LOADADDR (.iwram5))
[!provide] PROVIDE (__load_stop_iwram5 = (LOADADDR (.iwram5) + SIZEOF (.iwram5)))
.iwram6 0x000000000300042c 0x0
*(.iwram6)
0x000000000300042c . = ALIGN (0x4)
[!provide] PROVIDE (__load_start_iwram6 = LOADADDR (.iwram6))
[!provide] PROVIDE (__load_stop_iwram6 = (LOADADDR (.iwram6) + SIZEOF (.iwram6)))
.iwram7 0x000000000300042c 0x0
*(.iwram7)
0x000000000300042c . = ALIGN (0x4)
[!provide] PROVIDE (__load_start_iwram7 = LOADADDR (.iwram7))
[!provide] PROVIDE (__load_stop_iwram7 = (LOADADDR (.iwram7) + SIZEOF (.iwram7)))
.iwram8 0x000000000300042c 0x0
*(.iwram8)
0x000000000300042c . = ALIGN (0x4)
[!provide] PROVIDE (__load_start_iwram8 = LOADADDR (.iwram8))
[!provide] PROVIDE (__load_stop_iwram8 = (LOADADDR (.iwram8) + SIZEOF (.iwram8)))
.iwram9 0x000000000300042c 0x0
*(.iwram9)
0x000000000300042c . = ALIGN (0x4)
[!provide] PROVIDE (__load_start_iwram9 = LOADADDR (.iwram9))
[!provide] PROVIDE (__load_stop_iwram9 = (LOADADDR (.iwram9) + SIZEOF (.iwram9)))
0x000000000300042c __iwram_overlay_end = .
0x00000000080007ec __ewram_lma = (__iwram_overlay_lma + (__iwram_overlay_end - __iwram_overlay_start))
0x000000000300042c __iheap_start = .
0x0000000002000000 __ewram_start = ORIGIN (ewram)
.ewram 0x0000000002000000 0x0 load address 0x00000000080007ec
*(.ewram*)
0x0000000002000000 . = ALIGN (0x4)
0x0000000002000000 __ewram_end = ABSOLUTE (.)
0x00000000080007ec __pad_lma = (__ewram_lma + SIZEOF (.ewram))
.sbss 0x0000000002000000 0x0
0x0000000002000000 __sbss_start__ = ABSOLUTE (.)
*(.sbss*)
0x0000000002000000 . = ALIGN (0x4)
0x0000000002000000 __sbss_end__ = ABSOLUTE (.)
0x0000000002000000 __end__ = ABSOLUTE (.)
0x0000000002000000 __eheap_start = ABSOLUTE (.)
.pad 0x0000000002000000 0x8 load address 0x00000000080007ec
0x0000000002000000 0x4 LONG 0x52416b64
0x0000000002000004 0x4 LONG 0x4d
0x0000000002000008 . = ALIGN (0x4)
0x00000000080007f4 __rom_end__ = (__pad_lma + SIZEOF (.pad))
.stab
*(.stab)
.stabstr
*(.stabstr)
.stab.excl
*(.stab.excl)
.stab.exclstr
*(.stab.exclstr)
.stab.index
*(.stab.index)
.stab.indexstr
*(.stab.indexstr)
.comment 0x0000000000000000 0x23
*(.comment)
.comment 0x0000000000000000 0x23 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtbegin.o
0x24 (size before relaxing)
.comment 0x0000000000000023 0x24 main.o
.comment 0x0000000000000023 0x24 player.o
.comment 0x0000000000000023 0x24 toolbox.o
.comment 0x0000000000000023 0x24 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/libg.a(lib_a-init.o)
.comment 0x0000000000000023 0x24 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/libg.a(lib_a-memcpy-stub.o)
.comment 0x0000000000000023 0x24 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/libsysbase.a(malloc_vars.o)
.comment 0x0000000000000023 0x24 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtend.o
.debug
*(.debug)
.line
*(.line)
.debug_srcinfo
*(.debug_srcinfo)
.debug_sfnames
*(.debug_sfnames)
.debug_aranges 0x0000000000000000 0x60
*(.debug_aranges)
.debug_aranges
0x0000000000000000 0x28 main.o
.debug_aranges
0x0000000000000028 0x18 player.o
.debug_aranges
0x0000000000000040 0x20 toolbox.o
.debug_pubnames
*(.debug_pubnames)
.debug_info 0x0000000000000000 0xc70
*(.debug_info)
.debug_info 0x0000000000000000 0x967 main.o
.debug_info 0x0000000000000967 0x7f player.o
.debug_info 0x00000000000009e6 0x28a toolbox.o
.debug_abbrev 0x0000000000000000 0x46c
*(.debug_abbrev)
.debug_abbrev 0x0000000000000000 0x2cb main.o
.debug_abbrev 0x00000000000002cb 0x47 player.o
.debug_abbrev 0x0000000000000312 0x15a toolbox.o
.debug_line 0x0000000000000000 0x603
*(.debug_line)
.debug_line 0x0000000000000000 0x42f main.o
.debug_line 0x000000000000042f 0x4a player.o
.debug_line 0x0000000000000479 0x18a toolbox.o
.debug_frame 0x0000000000000000 0xbc
*(.debug_frame)
.debug_frame 0x0000000000000000 0x60 main.o
.debug_frame 0x0000000000000060 0x5c toolbox.o
.debug_str 0x0000000000000000 0x36b
*(.debug_str)
.debug_str 0x0000000000000000 0x307 main.o
0x347 (size before relaxing)
.debug_str 0x0000000000000307 0x2a player.o
0xdc (size before relaxing)
.debug_str 0x0000000000000331 0x3a toolbox.o
0x167 (size before relaxing)
.debug_loc 0x0000000000000000 0x5ea
*(.debug_loc)
.debug_loc 0x0000000000000000 0x310 main.o
.debug_loc 0x0000000000000310 0x2da toolbox.o
.debug_macinfo
*(.debug_macinfo)
.debug_weaknames
*(.debug_weaknames)
.debug_funcnames
*(.debug_funcnames)
.debug_typenames
*(.debug_typenames)
.debug_varnames
*(.debug_varnames)
.stack 0x0000000000080000 0x0
0x0000000000080000 _stack = .
*(.stack)
.note.gnu.arm.ident
*(.note.gnu.arm.ident)
.ARM.attributes
0x0000000000000000 0x2c
*(.ARM.attributes)
.ARM.attributes
0x0000000000000000 0x20 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/gba_crt0.o
.ARM.attributes
0x0000000000000020 0x1c /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crti.o
.ARM.attributes
0x000000000000003c 0x2a /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtbegin.o
.ARM.attributes
0x0000000000000066 0x2a main.o
.ARM.attributes
0x0000000000000090 0x30 player.o
.ARM.attributes
0x00000000000000c0 0x2a toolbox.o
.ARM.attributes
0x00000000000000ea 0x2a /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/libg.a(lib_a-init.o)
.ARM.attributes
0x0000000000000114 0x2a /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/libg.a(lib_a-memcpy-stub.o)
.ARM.attributes
0x000000000000013e 0x30 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/libsysbase.a(malloc_vars.o)
.ARM.attributes
0x000000000000016e 0x30 /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtend.o
.ARM.attributes
0x000000000000019e 0x1c /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtn.o
/DISCARD/
*(.note.GNU-stack)
LOAD /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/gba_crt0.o
LOAD /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crti.o
LOAD /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtbegin.o
LOAD main.o
LOAD player.o
LOAD toolbox.o
LOAD /opt/devkitpro/libgba/lib/libmm.a
LOAD /opt/devkitpro/libgba/lib/libgba.a
START GROUP
LOAD /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/libgcc.a
LOAD /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/libg.a
LOAD /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/libc.a
LOAD /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/lib/thumb/libsysbase.a
END GROUP
LOAD /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtend.o
LOAD /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/10.1.0/thumb/crtn.o
OUTPUT(/home/logan/git/GBA-Dash/GBA-Dash.elf elf32-littlearm)
.debug_ranges 0x0000000000000000 0x168
.debug_ranges 0x0000000000000000 0x168 main.o

532
build/gba-dash.map Normal file
View File

@ -0,0 +1,532 @@
Archive member included to satisfy reference by file (symbol)
/opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/libg.a(lib_a-init.o)
/opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/gba_crt0.o (__libc_init_array)
/opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/libg.a(lib_a-memcpy-stub.o)
main.o (memcpy)
/opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/libsysbase.a(malloc_vars.o)
/opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/gba_crt0.o (fake_heap_end)
Discarded input sections
.text 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/gba_crt0.o
.data 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/gba_crt0.o
.bss 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/gba_crt0.o
.text 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crti.o
.data 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crti.o
.bss 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crti.o
.text 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crtbegin.o
.data 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crtbegin.o
.bss 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crtbegin.o
.data.__dso_handle
0x0000000000000000 0x4 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crtbegin.o
.data 0x0000000000000000 0x0 playerObject.o
.bss 0x0000000000000000 0x0 playerObject.o
.text 0x0000000000000000 0x0 main.o
.text 0x0000000000000000 0x0 sinlut.o
.data 0x0000000000000000 0x0 sinlut.o
.bss 0x0000000000000000 0x0 sinlut.o
.data 0x0000000000000000 0x0 toolbox.o
.text 0x0000000000000000 0x0 player.o
.data 0x0000000000000000 0x0 player.o
.bss 0x0000000000000000 0x0 player.o
.text 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/libg.a(lib_a-init.o)
.data 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/libg.a(lib_a-init.o)
.bss 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/libg.a(lib_a-init.o)
.text 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/libg.a(lib_a-memcpy-stub.o)
.data 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/libg.a(lib_a-memcpy-stub.o)
.bss 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/libg.a(lib_a-memcpy-stub.o)
.text 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/libsysbase.a(malloc_vars.o)
.data 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/libsysbase.a(malloc_vars.o)
.bss 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/libsysbase.a(malloc_vars.o)
.bss.fake_heap_start
0x0000000000000000 0x4 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/libsysbase.a(malloc_vars.o)
.text 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crtend.o
.data 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crtend.o
.bss 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crtend.o
.text 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crtn.o
.data 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crtn.o
.bss 0x0000000000000000 0x0 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crtn.o
Memory Configuration
Name Origin Length Attributes
rom 0x0000000008000000 0x0000000002000000
iwram 0x0000000003000000 0x0000000000008000
ewram 0x0000000002000000 0x0000000000040000
*default* 0x0000000000000000 0xffffffffffffffff
Linker script and memory map
0x0000000008000000 __text_start = ORIGIN (rom)
0x0000000002040000 __eheap_end = (ORIGIN (ewram) + LENGTH (ewram))
0x0000000003000000 __iwram_start = ORIGIN (iwram)
0x0000000003008000 __iwram_top = (ORIGIN (iwram) + LENGTH (iwram))
0x0000000003007fa0 __sp_irq = (__iwram_top - 0x60)
0x0000000003007f00 __sp_usr = (__sp_irq - 0xa0)
0x0000000003007ff8 __irq_flags = 0x3007ff8
0x0000000008000000 . = __text_start
.crt0 0x0000000008000000 0x210
*(.crt0)
.crt0 0x0000000008000000 0x210 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/gba_crt0.o
0x0000000008000000 _start
0x00000000080000c4 __boot_method
0x00000000080000c5 __slave_number
0x00000000080000e0 start_vector
0x0000000008000210 . = ALIGN (0x4)
.init 0x0000000008000210 0xc
*(SORT_NONE(.init))
.init 0x0000000008000210 0x4 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crti.o
0x0000000008000210 _init
.init 0x0000000008000214 0x8 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crtn.o
.plt 0x000000000800021c 0x0
*(.plt)
0x000000000800021c . = ALIGN (0x4)
.text 0x000000000800021c 0x4cc
*(EXCLUDE_FILE(*.iwram*) .text*)
.text.__do_global_dtors_aux
0x000000000800021c 0x2c /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crtbegin.o
.text.frame_dummy
0x0000000008000248 0x24 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crtbegin.o
.text 0x000000000800026c 0x1e8 playerObject.o
0x000000000800026c initializePlayerObject
0x0000000008000280 createPlayerObject
0x00000000080002c8 applyGravity
0x00000000080002d0 scalePlayer
0x00000000080002e0 rotatePlayer
0x0000000008000310 roundToNearest90Degrees
0x0000000008000360 updatePlayer
.text.startup 0x0000000008000454 0xdc main.o
0x0000000008000454 main
.text 0x0000000008000530 0xc0 toolbox.o
0x0000000008000530 oam_init
0x0000000008000570 oam_copy
0x0000000008000590 obj_copy
0x00000000080005b0 obj_affine_copy
0x00000000080005e0 obj_affine_identity
.text.__libc_init_array
0x00000000080005f0 0x50 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/libg.a(lib_a-init.o)
0x00000000080005f0 __libc_init_array
.text.memcpy 0x0000000008000640 0xa8 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/libg.a(lib_a-memcpy-stub.o)
0x0000000008000640 memcpy
*(.gnu.linkonce.t.*)
*(.text.*personality*)
*(.gnu.warning)
*(.glue_7t)
.glue_7t 0x00000000080006e8 0x0 linker stubs
*(.glue_7)
.glue_7 0x00000000080006e8 0x0 linker stubs
*(.vfp11_veneer)
.vfp11_veneer 0x00000000080006e8 0x0 linker stubs
0x00000000080006e8 . = ALIGN (0x4)
0x00000000080006e8 __text_end = .
.v4_bx 0x00000000080006e8 0x0
.v4_bx 0x00000000080006e8 0x0 linker stubs
.iplt 0x00000000080006e8 0x0
.iplt 0x00000000080006e8 0x0 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/gba_crt0.o
.fini 0x00000000080006e8 0xc
*(.fini)
.fini 0x00000000080006e8 0x4 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crti.o
0x00000000080006e8 _fini
.fini 0x00000000080006ec 0x8 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crtn.o
0x00000000080006f4 . = ALIGN (0x4)
.rodata 0x00000000080006f4 0x680
*(.rodata)
.rodata 0x00000000080006f4 0x400 sinlut.o
0x00000000080006f4 sin_lut
.rodata 0x0000000008000af4 0x280 player.o
0x0000000008000af4 playerTiles
0x0000000008000b74 playerPal
*all.rodata*(*)
*(.roda)
*(.rodata.*)
*(.gnu.linkonce.r*)
0x0000000008000d74 . = ALIGN (0x4)
.ARM.extab
*(.ARM.extab* .gnu.linkonce.armextab.*)
0x0000000008000d74 __exidx_start = .
.ARM.exidx
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
0x0000000008000d74 __exidx_end = .
.ctors 0x0000000008000d74 0x0
*crtbegin.o(.ctors)
*(EXCLUDE_FILE(*crtend.o) .ctors)
*(SORT_BY_NAME(.ctors.*))
*(.ctors)
0x0000000008000d74 . = ALIGN (0x4)
.dtors 0x0000000008000d74 0x0
*crtbegin.o(.dtors)
*(EXCLUDE_FILE(*crtend.o) .dtors)
*(SORT_BY_NAME(.dtors.*))
*(.dtors)
0x0000000008000d74 . = ALIGN (0x4)
.eh_frame 0x0000000008000d74 0x4
*(.eh_frame)
.eh_frame 0x0000000008000d74 0x0 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crtbegin.o
.eh_frame 0x0000000008000d74 0x4 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crtend.o
0x0000000008000d78 . = ALIGN (0x4)
.rel.dyn 0x0000000008000d78 0x0
.rel.iplt 0x0000000008000d78 0x0 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/gba_crt0.o
.gcc_except_table
0x0000000008000d78 0x0
*(.gcc_except_table)
0x0000000008000d78 . = ALIGN (0x4)
0x0000000008000d78 __iwram_lma = .
.iwram 0x0000000003000000 0x0 load address 0x0000000008000d78
0x0000000003000000 __iwram_start__ = ABSOLUTE (.)
*(.iwram .iwram*)
*iwram.*(.text* .data*)
0x0000000003000000 . = ALIGN (0x4)
0x0000000003000000 __iwram_end__ = ABSOLUTE (.)
0x0000000008000d78 __data_lma = (__iwram_lma + SIZEOF (.iwram))
.bss 0x0000000003000000 0x424
0x0000000003000000 __bss_start = ABSOLUTE (.)
0x0000000003000000 __bss_start__ = ABSOLUTE (.)
*(.dynbss)
*(.gnu.linkonce.b*)
*(.bss*)
.bss.completed.1
0x0000000003000000 0x1 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crtbegin.o
*fill* 0x0000000003000001 0x3
.bss.object.0 0x0000000003000004 0x18 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crtbegin.o
.bss 0x000000000300001c 0x400 main.o
0x000000000300001c obj_buffer
.bss 0x000000000300041c 0x4 toolbox.o
0x000000000300041c __key_prev
0x000000000300041e __key_curr
.bss.fake_heap_end
0x0000000003000420 0x4 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/libsysbase.a(malloc_vars.o)
0x0000000003000420 fake_heap_end
*(COMMON)
0x0000000003000424 . = ALIGN (0x4)
0x0000000003000424 __bss_end__ = ABSOLUTE (.)
.data 0x0000000003000424 0x4 load address 0x0000000008000d78
0x0000000003000424 __data_start__ = ABSOLUTE (.)
*(.data*)
.data 0x0000000003000424 0x4 main.o
0x0000000003000424 obj_aff_buffer
*(.gnu.linkonce.d*)
0x0000000003000428 . = ALIGN (0x4)
0x0000000008000d7c __preinit_lma = (__data_lma + SIZEOF (.data))
.igot.plt 0x0000000003000428 0x0 load address 0x0000000008000d7c
.igot.plt 0x0000000003000428 0x0 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/gba_crt0.o
.preinit_array 0x0000000003000428 0x0 load address 0x0000000008000d7c
0x0000000003000428 __preinit_array_start = ABSOLUTE (.)
*(.preinit_array)
0x0000000003000428 __preinit_array_end = ABSOLUTE (.)
0x0000000008000d7c __init_lma = (__preinit_lma + SIZEOF (.preinit_array))
.init_array 0x0000000003000428 0x4 load address 0x0000000008000d7c
0x0000000003000428 __init_array_start = ABSOLUTE (.)
*(SORT_BY_NAME(.init_array.*))
*(.init_array)
.init_array 0x0000000003000428 0x4 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crtbegin.o
0x000000000300042c __init_array_end = ABSOLUTE (.)
0x0000000008000d80 __fini_lma = (__init_lma + SIZEOF (.init_array))
.fini_array 0x000000000300042c 0x4 load address 0x0000000008000d80
0x000000000300042c __fini_array_start = ABSOLUTE (.)
*(SORT_BY_NAME(.fini_array.*))
*(.fini_array)
.fini_array 0x000000000300042c 0x4 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crtbegin.o
0x0000000003000430 __fini_array_end = ABSOLUTE (.)
0x0000000008000d84 __jcr_lma = (__fini_lma + SIZEOF (.fini_array))
.jcr 0x0000000003000430 0x0 load address 0x0000000008000d84
*(.jcr)
0x0000000003000430 __data_end__ = ABSOLUTE (.)
0x0000000008000d84 __iwram_overlay_lma = (__jcr_lma + SIZEOF (.jcr))
0x0000000003000430 __iwram_overlay_start = .
.iwram0 0x0000000003000430 0x0 load address 0x0000000008000d84
*(.iwram0)
0x0000000003000430 . = ALIGN (0x4)
0x0000000008000d84 PROVIDE (__load_start_iwram0 = LOADADDR (.iwram0))
0x0000000008000d84 PROVIDE (__load_stop_iwram0 = (LOADADDR (.iwram0) + SIZEOF (.iwram0)))
.iwram1 0x0000000003000430 0x0
*(.iwram1)
0x0000000003000430 . = ALIGN (0x4)
[!provide] PROVIDE (__load_start_iwram1 = LOADADDR (.iwram1))
[!provide] PROVIDE (__load_stop_iwram1 = (LOADADDR (.iwram1) + SIZEOF (.iwram1)))
.iwram2 0x0000000003000430 0x0
*(.iwram2)
0x0000000003000430 . = ALIGN (0x4)
[!provide] PROVIDE (__load_start_iwram2 = LOADADDR (.iwram2))
[!provide] PROVIDE (__load_stop_iwram2 = (LOADADDR (.iwram2) + SIZEOF (.iwram2)))
.iwram3 0x0000000003000430 0x0
*(.iwram3)
0x0000000003000430 . = ALIGN (0x4)
[!provide] PROVIDE (__load_start_iwram3 = LOADADDR (.iwram3))
[!provide] PROVIDE (__load_stop_iwram3 = (LOADADDR (.iwram3) + SIZEOF (.iwram3)))
.iwram4 0x0000000003000430 0x0
*(.iwram4)
0x0000000003000430 . = ALIGN (0x4)
[!provide] PROVIDE (__load_start_iwram4 = LOADADDR (.iwram4))
[!provide] PROVIDE (__load_stop_iwram4 = (LOADADDR (.iwram4) + SIZEOF (.iwram4)))
.iwram5 0x0000000003000430 0x0
*(.iwram5)
0x0000000003000430 . = ALIGN (0x4)
[!provide] PROVIDE (__load_start_iwram5 = LOADADDR (.iwram5))
[!provide] PROVIDE (__load_stop_iwram5 = (LOADADDR (.iwram5) + SIZEOF (.iwram5)))
.iwram6 0x0000000003000430 0x0
*(.iwram6)
0x0000000003000430 . = ALIGN (0x4)
[!provide] PROVIDE (__load_start_iwram6 = LOADADDR (.iwram6))
[!provide] PROVIDE (__load_stop_iwram6 = (LOADADDR (.iwram6) + SIZEOF (.iwram6)))
.iwram7 0x0000000003000430 0x0
*(.iwram7)
0x0000000003000430 . = ALIGN (0x4)
[!provide] PROVIDE (__load_start_iwram7 = LOADADDR (.iwram7))
[!provide] PROVIDE (__load_stop_iwram7 = (LOADADDR (.iwram7) + SIZEOF (.iwram7)))
.iwram8 0x0000000003000430 0x0
*(.iwram8)
0x0000000003000430 . = ALIGN (0x4)
[!provide] PROVIDE (__load_start_iwram8 = LOADADDR (.iwram8))
[!provide] PROVIDE (__load_stop_iwram8 = (LOADADDR (.iwram8) + SIZEOF (.iwram8)))
.iwram9 0x0000000003000430 0x0
*(.iwram9)
0x0000000003000430 . = ALIGN (0x4)
[!provide] PROVIDE (__load_start_iwram9 = LOADADDR (.iwram9))
[!provide] PROVIDE (__load_stop_iwram9 = (LOADADDR (.iwram9) + SIZEOF (.iwram9)))
0x0000000003000430 __iwram_overlay_end = .
0x0000000008000d84 __ewram_lma = (__iwram_overlay_lma + (__iwram_overlay_end - __iwram_overlay_start))
0x0000000003000430 __iheap_start = .
0x0000000002000000 __ewram_start = ORIGIN (ewram)
.ewram 0x0000000002000000 0x0 load address 0x0000000008000d84
*(.ewram*)
0x0000000002000000 . = ALIGN (0x4)
0x0000000002000000 __ewram_end = ABSOLUTE (.)
0x0000000008000d84 __pad_lma = (__ewram_lma + SIZEOF (.ewram))
.sbss 0x0000000002000000 0x0
0x0000000002000000 __sbss_start__ = ABSOLUTE (.)
*(.sbss*)
0x0000000002000000 . = ALIGN (0x4)
0x0000000002000000 __sbss_end__ = ABSOLUTE (.)
0x0000000002000000 __end__ = ABSOLUTE (.)
0x0000000002000000 __eheap_start = ABSOLUTE (.)
.pad 0x0000000002000000 0x8 load address 0x0000000008000d84
0x0000000002000000 0x4 LONG 0x52416b64
0x0000000002000004 0x4 LONG 0x4d
0x0000000002000008 . = ALIGN (0x4)
0x0000000008000d8c __rom_end__ = (__pad_lma + SIZEOF (.pad))
.stab
*(.stab)
.stabstr
*(.stabstr)
.stab.excl
*(.stab.excl)
.stab.exclstr
*(.stab.exclstr)
.stab.index
*(.stab.index)
.stab.indexstr
*(.stab.indexstr)
.comment 0x0000000000000000 0x23
*(.comment)
.comment 0x0000000000000000 0x23 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crtbegin.o
0x24 (size before relaxing)
.comment 0x0000000000000023 0x24 playerObject.o
.comment 0x0000000000000023 0x24 main.o
.comment 0x0000000000000023 0x24 sinlut.o
.comment 0x0000000000000023 0x24 toolbox.o
.comment 0x0000000000000023 0x24 player.o
.comment 0x0000000000000023 0x24 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/libg.a(lib_a-init.o)
.comment 0x0000000000000023 0x24 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/libg.a(lib_a-memcpy-stub.o)
.comment 0x0000000000000023 0x24 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/libsysbase.a(malloc_vars.o)
.comment 0x0000000000000023 0x24 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crtend.o
.debug
*(.debug)
.line
*(.line)
.debug_srcinfo
*(.debug_srcinfo)
.debug_sfnames
*(.debug_sfnames)
.debug_aranges 0x0000000000000000 0x90
*(.debug_aranges)
.debug_aranges
0x0000000000000000 0x20 playerObject.o
.debug_aranges
0x0000000000000020 0x20 main.o
.debug_aranges
0x0000000000000040 0x18 sinlut.o
.debug_aranges
0x0000000000000058 0x20 toolbox.o
.debug_aranges
0x0000000000000078 0x18 player.o
.debug_pubnames
*(.debug_pubnames)
.debug_info 0x0000000000000000 0x13d6
*(.debug_info)
.debug_info 0x0000000000000000 0x996 playerObject.o
.debug_info 0x0000000000000996 0x581 main.o
.debug_info 0x0000000000000f17 0x8b sinlut.o
.debug_info 0x0000000000000fa2 0x3b5 toolbox.o
.debug_info 0x0000000000001357 0x7f player.o
.debug_abbrev 0x0000000000000000 0x70c
*(.debug_abbrev)
.debug_abbrev 0x0000000000000000 0x2b1 playerObject.o
.debug_abbrev 0x00000000000002b1 0x20d main.o
.debug_abbrev 0x00000000000004be 0x61 sinlut.o
.debug_abbrev 0x000000000000051f 0x1a6 toolbox.o
.debug_abbrev 0x00000000000006c5 0x47 player.o
.debug_line 0x0000000000000000 0x9ee
*(.debug_line)
.debug_line 0x0000000000000000 0x4c7 playerObject.o
.debug_line 0x00000000000004c7 0x1f3 main.o
.debug_line 0x00000000000006ba 0x80 sinlut.o
.debug_line 0x000000000000073a 0x26a toolbox.o
.debug_line 0x00000000000009a4 0x4a player.o
.debug_frame 0x0000000000000000 0x15c
*(.debug_frame)
.debug_frame 0x0000000000000000 0xa4 playerObject.o
.debug_frame 0x00000000000000a4 0x30 main.o
.debug_frame 0x00000000000000d4 0x88 toolbox.o
.debug_str 0x0000000000000000 0x476
*(.debug_str)
.debug_str 0x0000000000000000 0x2f2 playerObject.o
0x30b (size before relaxing)
.debug_str 0x00000000000002f2 0xf8 main.o
0x2c3 (size before relaxing)
.debug_str 0x00000000000003ea 0x29 sinlut.o
0x116 (size before relaxing)
.debug_str 0x0000000000000413 0x39 toolbox.o
0x1ad (size before relaxing)
.debug_str 0x000000000000044c 0x2a player.o
0xdc (size before relaxing)
.debug_loc 0x0000000000000000 0x9c2
*(.debug_loc)
.debug_loc 0x0000000000000000 0x640 playerObject.o
.debug_loc 0x0000000000000640 0x16 main.o
.debug_loc 0x0000000000000656 0x36c toolbox.o
.debug_macinfo
*(.debug_macinfo)
.debug_weaknames
*(.debug_weaknames)
.debug_funcnames
*(.debug_funcnames)
.debug_typenames
*(.debug_typenames)
.debug_varnames
*(.debug_varnames)
.stack 0x0000000000080000 0x0
0x0000000000080000 _stack = .
*(.stack)
.note.gnu.arm.ident
*(.note.gnu.arm.ident)
.ARM.attributes
0x0000000000000000 0x2c
*(.ARM.attributes)
.ARM.attributes
0x0000000000000000 0x20 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/gba_crt0.o
.ARM.attributes
0x0000000000000020 0x1c /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crti.o
.ARM.attributes
0x000000000000003c 0x2a /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crtbegin.o
.ARM.attributes
0x0000000000000066 0x2a playerObject.o
.ARM.attributes
0x0000000000000090 0x2a main.o
.ARM.attributes
0x00000000000000ba 0x30 sinlut.o
.ARM.attributes
0x00000000000000ea 0x2a toolbox.o
.ARM.attributes
0x0000000000000114 0x30 player.o
.ARM.attributes
0x0000000000000144 0x2a /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/libg.a(lib_a-init.o)
.ARM.attributes
0x000000000000016e 0x2a /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/libg.a(lib_a-memcpy-stub.o)
.ARM.attributes
0x0000000000000198 0x30 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/libsysbase.a(malloc_vars.o)
.ARM.attributes
0x00000000000001c8 0x30 /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crtend.o
.ARM.attributes
0x00000000000001f8 0x1c /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crtn.o
/DISCARD/
*(.note.GNU-stack)
LOAD /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/gba_crt0.o
LOAD /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crti.o
LOAD /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crtbegin.o
LOAD playerObject.o
LOAD main.o
LOAD sinlut.o
LOAD toolbox.o
LOAD player.o
LOAD /opt/devkitpro/libgba/lib/libmm.a
LOAD /opt/devkitpro/libgba/lib/libgba.a
START GROUP
LOAD /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/libgcc.a
LOAD /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/libg.a
LOAD /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/libc.a
LOAD /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/../../../../arm-none-eabi/lib/thumb/libsysbase.a
END GROUP
LOAD /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crtend.o
LOAD /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/10.2.0/thumb/crtn.o
OUTPUT(/home/logan/git/gba-dash/gba-dash.elf elf32-littlearm)
LOAD linker stubs
.debug_ranges 0x0000000000000000 0x1e8
.debug_ranges 0x0000000000000000 0x1a8 playerObject.o
.debug_ranges 0x00000000000001a8 0x28 main.o
.debug_ranges 0x00000000000001d0 0x18 toolbox.o

View File

@ -1,35 +1,37 @@
main.o: /home/logan/git/GBA-Dash/source/main.c \ main.o: /home/logan/git/gba-dash/source/main.c \
/home/logan/git/GBA-Dash/source/../include/input.h \ /home/logan/git/gba-dash/source/../include/input.h \
/home/logan/git/GBA-Dash/source/../include/memmap.h \ /home/logan/git/gba-dash/source/../include/memmap.h \
/home/logan/git/GBA-Dash/source/../include/types.h \ /home/logan/git/gba-dash/source/../include/types.h \
/home/logan/git/GBA-Dash/source/../include/memdef.h \ /home/logan/git/gba-dash/source/../include/memdef.h \
/home/logan/git/GBA-Dash/source/../include/toolbox.h \ /home/logan/git/gba-dash/source/../include/toolbox.h \
/home/logan/git/GBA-Dash/source/../include/input.h \ /home/logan/git/gba-dash/source/../include/input.h \
/home/logan/git/GBA-Dash/source/../include/memmap.h \ /home/logan/git/gba-dash/source/../include/memmap.h \
/home/logan/git/GBA-Dash/source/../include/types.h \ /home/logan/git/gba-dash/source/../include/types.h \
/home/logan/git/GBA-Dash/source/../include/memdef.h \ /home/logan/git/gba-dash/source/../include/memdef.h \
/home/logan/git/GBA-Dash/source/../include/point.h \ /home/logan/git/gba-dash/source/../include/point.h \
/home/logan/git/GBA-Dash/source/../include/fixed.h \ /home/logan/git/gba-dash/source/../include/fixed.h \
/home/logan/git/GBA-Dash/source/../include/velocity.h \ /home/logan/git/gba-dash/source/../include/velocity.h \
/home/logan/git/GBA-Dash/source/../include/point.h \ /home/logan/git/gba-dash/source/../include/point.h \
/home/logan/git/GBA-Dash/source/../include/playerObject.h \ /home/logan/git/gba-dash/source/../include/playerObject.h \
/home/logan/git/GBA-Dash/source/../include/velocity.h \ /home/logan/git/gba-dash/source/../include/velocity.h \
/home/logan/git/GBA-Dash/source/../include/toolbox.h \ /home/logan/git/gba-dash/source/../include/toolbox.h \
/home/logan/git/GBA-Dash/source/../sprites/player.h /home/logan/git/gba-dash/source/../include/sinlut.h \
/home/logan/git/GBA-Dash/source/../include/input.h: /home/logan/git/gba-dash/source/../sprites/player.h
/home/logan/git/GBA-Dash/source/../include/memmap.h: /home/logan/git/gba-dash/source/../include/input.h:
/home/logan/git/GBA-Dash/source/../include/types.h: /home/logan/git/gba-dash/source/../include/memmap.h:
/home/logan/git/GBA-Dash/source/../include/memdef.h: /home/logan/git/gba-dash/source/../include/types.h:
/home/logan/git/GBA-Dash/source/../include/toolbox.h: /home/logan/git/gba-dash/source/../include/memdef.h:
/home/logan/git/GBA-Dash/source/../include/input.h: /home/logan/git/gba-dash/source/../include/toolbox.h:
/home/logan/git/GBA-Dash/source/../include/memmap.h: /home/logan/git/gba-dash/source/../include/input.h:
/home/logan/git/GBA-Dash/source/../include/types.h: /home/logan/git/gba-dash/source/../include/memmap.h:
/home/logan/git/GBA-Dash/source/../include/memdef.h: /home/logan/git/gba-dash/source/../include/types.h:
/home/logan/git/GBA-Dash/source/../include/point.h: /home/logan/git/gba-dash/source/../include/memdef.h:
/home/logan/git/GBA-Dash/source/../include/fixed.h: /home/logan/git/gba-dash/source/../include/point.h:
/home/logan/git/GBA-Dash/source/../include/velocity.h: /home/logan/git/gba-dash/source/../include/fixed.h:
/home/logan/git/GBA-Dash/source/../include/point.h: /home/logan/git/gba-dash/source/../include/velocity.h:
/home/logan/git/GBA-Dash/source/../include/playerObject.h: /home/logan/git/gba-dash/source/../include/point.h:
/home/logan/git/GBA-Dash/source/../include/velocity.h: /home/logan/git/gba-dash/source/../include/playerObject.h:
/home/logan/git/GBA-Dash/source/../include/toolbox.h: /home/logan/git/gba-dash/source/../include/velocity.h:
/home/logan/git/GBA-Dash/source/../sprites/player.h: /home/logan/git/gba-dash/source/../include/toolbox.h:
/home/logan/git/gba-dash/source/../include/sinlut.h:
/home/logan/git/gba-dash/source/../sprites/player.h:

Binary file not shown.

View File

@ -1 +1 @@
player.o: /home/logan/git/GBA-Dash/sprites/player.c player.o: /home/logan/git/gba-dash/sprites/player.c

Binary file not shown.

21
build/playerObject.d Normal file
View File

@ -0,0 +1,21 @@
playerObject.o: /home/logan/git/gba-dash/source/playerObject.c \
/home/logan/git/gba-dash/source/../include/playerObject.h \
/home/logan/git/gba-dash/source/../include/types.h \
/home/logan/git/gba-dash/source/../include/point.h \
/home/logan/git/gba-dash/source/../include/fixed.h \
/home/logan/git/gba-dash/source/../include/velocity.h \
/home/logan/git/gba-dash/source/../include/toolbox.h \
/home/logan/git/gba-dash/source/../include/memmap.h \
/home/logan/git/gba-dash/source/../include/memdef.h \
/home/logan/git/gba-dash/source/../include/input.h \
/home/logan/git/gba-dash/source/../include/sinlut.h
/home/logan/git/gba-dash/source/../include/playerObject.h:
/home/logan/git/gba-dash/source/../include/types.h:
/home/logan/git/gba-dash/source/../include/point.h:
/home/logan/git/gba-dash/source/../include/fixed.h:
/home/logan/git/gba-dash/source/../include/velocity.h:
/home/logan/git/gba-dash/source/../include/toolbox.h:
/home/logan/git/gba-dash/source/../include/memmap.h:
/home/logan/git/gba-dash/source/../include/memdef.h:
/home/logan/git/gba-dash/source/../include/input.h:
/home/logan/git/gba-dash/source/../include/sinlut.h:

BIN
build/playerObject.o Normal file

Binary file not shown.

5
build/sinlut.d Normal file
View File

@ -0,0 +1,5 @@
sinlut.o: /home/logan/git/gba-dash/source/sinlut.c \
/home/logan/git/gba-dash/source/../include/sinlut.h \
/home/logan/git/gba-dash/source/../include/types.h
/home/logan/git/gba-dash/source/../include/sinlut.h:
/home/logan/git/gba-dash/source/../include/types.h:

BIN
build/sinlut.o Normal file

Binary file not shown.

View File

@ -1,11 +1,11 @@
toolbox.o: /home/logan/git/GBA-Dash/sprites/toolbox.c \ toolbox.o: /home/logan/git/gba-dash/source/toolbox.c \
/home/logan/git/GBA-Dash/sprites/../include/toolbox.h \ /home/logan/git/gba-dash/source/../include/toolbox.h \
/home/logan/git/GBA-Dash/sprites/../include/types.h \ /home/logan/git/gba-dash/source/../include/types.h \
/home/logan/git/GBA-Dash/sprites/../include/memmap.h \ /home/logan/git/gba-dash/source/../include/memmap.h \
/home/logan/git/GBA-Dash/sprites/../include/memdef.h \ /home/logan/git/gba-dash/source/../include/memdef.h \
/home/logan/git/GBA-Dash/sprites/../include/input.h /home/logan/git/gba-dash/source/../include/input.h
/home/logan/git/GBA-Dash/sprites/../include/toolbox.h: /home/logan/git/gba-dash/source/../include/toolbox.h:
/home/logan/git/GBA-Dash/sprites/../include/types.h: /home/logan/git/gba-dash/source/../include/types.h:
/home/logan/git/GBA-Dash/sprites/../include/memmap.h: /home/logan/git/gba-dash/source/../include/memmap.h:
/home/logan/git/GBA-Dash/sprites/../include/memdef.h: /home/logan/git/gba-dash/source/../include/memdef.h:
/home/logan/git/GBA-Dash/sprites/../include/input.h: /home/logan/git/gba-dash/source/../include/input.h:

Binary file not shown.

4
copyToDesktop.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
rm /mnt/c/Users/Logan\ Hunt/Desktop/gba-dash.gba
cp gba-dash.gba /mnt/c/Users/Logan\ Hunt/Desktop
echo Copy Successful

Binary file not shown.

BIN
gba-dash.gba Executable file

Binary file not shown.

Binary file not shown.

View File

@ -3,6 +3,7 @@
#include "velocity.h" #include "velocity.h"
#include "toolbox.h" #include "toolbox.h"
#include "fixed.h" #include "fixed.h"
#include "sinlut.h"
#ifndef PLAYEROBJECT_H #ifndef PLAYEROBJECT_H
#define PLAYEROBJECT_H #define PLAYEROBJECT_H
@ -14,60 +15,17 @@ typedef struct playerObject {
POINT pt; POINT pt;
u32 rotation; // Rotation amount u32 rotation; // Rotation amount
OBJ_ATTR *obj; // Attributes of the object for GBA OBJ_ATTR *obj; // Attributes of the object for GBA
OBJ_AFFINE *affine; // Affine transformations
int pallete_bank; // Index of pallete int pallete_bank; // Index of pallete
int tile_id; // Index of player tile int tile_id; // Index of player tile
int isJumping; int isJumping;
} ALIGN(4) playerObject; // Word-align to ensure corruption doesn't occur } ALIGN(4) playerObject; // Word-align to ensure corruption doesn't occur
static inline void initializePlayerObject (playerObject *object) { void initializePlayerObject();
// Initialize the point and velocity of an object playerObject createPlayerObject();
object->vel = createVelocity(0, 0); void applyGravity();
object->pt = createPoint(20 << FIX_SHIFT, 100 << FIX_SHIFT); void scalePlayer();
} void updatePlayer();
static inline playerObject createPlayerObject (OBJ_ATTR *obj_buffer, int pallete_bank, int tile_id) {
// Create a player object from data
playerObject temp;
initializePlayerObject(&temp);
temp.rotation = 0;
temp.obj = obj_buffer;
temp.pallete_bank = pallete_bank;
temp.tile_id = tile_id;
temp.isJumping = 0;
obj_set_attr(temp.obj,
ATTR0_SQUARE, // Set attribute 1 to be a square
ATTR1_SIZE_16, // Set size to 16 x 16
ATTR2_PALBANK(pallete_bank) | tile_id // Which pallete to use, as we are in
// 16-color mode
);
obj_set_pos(temp.obj, temp.pt.x >> FIX_SHIFT, temp.pt.y >> FIX_SHIFT);
return temp;
}
static inline void applyGravity (playerObject *object) {
// Apply a gravity constant to a player
object->vel.dy += float_to_fixed(GRAVITY);
// This is a weird convention to have gravity in the positive direction,
// but I don't want to deal with coordinate changing. Too lazy
}
static inline void updatePlayer (playerObject *object, u32 GROUND_LEVEL) {
// Update the position of a player object
updatePoint(&object->pt, &object->vel);
if (object->pt.y >> FIX_SHIFT >= GROUND_LEVEL) {
// Only apply gravity if player is not touching the ground
object->isJumping = 0;
object->pt.y = GROUND_LEVEL << FIX_SHIFT; // Don't go through ground
object->vel.dy = 0;
}
else {
object->isJumping = 1;
applyGravity(object);
}
// Update the player object's attributes' position
obj_set_pos(object->obj, object->pt.x >> FIX_SHIFT, object->pt.y >> FIX_SHIFT);
// Update the player's second attribute (tile and pallete bank)
object->obj->attr2 = ATTR2_BUILD(object->tile_id, object->pallete_bank, 0);
}
#endif // PLAYEROBJECT_H #endif // PLAYEROBJECT_H

15
include/sinlut.h Normal file
View File

@ -0,0 +1,15 @@
#include "types.h"
#ifndef SINLUT_H
#define SINLUT_H
extern const short sin_lut[512];
static inline s32 lu_sin(u32 theta)
{ return sin_lut[(theta>>7)&0x1FF]; }
//! Look-up a cosine value
static inline s32 lu_cos(u32 theta)
{ return sin_lut[((theta>>7)+128)&0x1FF]; }
#endif //SINLUT_H

View File

@ -69,6 +69,8 @@ INLINE void obj_set_pos(OBJ_ATTR *obj, int x, int y);
INLINE void obj_hide(OBJ_ATTR *oatr); INLINE void obj_hide(OBJ_ATTR *oatr);
INLINE void obj_unhide(OBJ_ATTR *obj, u16 mode); INLINE void obj_unhide(OBJ_ATTR *obj, u16 mode);
void obj_copy(OBJ_ATTR *dst, const OBJ_ATTR *src, u32 count); void obj_copy(OBJ_ATTR *dst, const OBJ_ATTR *src, u32 count);
void obj_affine_copy(OBJ_AFFINE *dst, const OBJ_AFFINE *src, u32 count);
void obj_affine_identity(OBJ_AFFINE *aff);
// === INLINES ======================================================== // === INLINES ========================================================

View File

@ -13,28 +13,6 @@
OBJ_ATTR obj_buffer[128]; OBJ_ATTR obj_buffer[128];
OBJ_AFFINE *obj_aff_buffer= (OBJ_AFFINE*)obj_buffer; // Object affine-buffer OBJ_AFFINE *obj_aff_buffer= (OBJ_AFFINE*)obj_buffer; // Object affine-buffer
void obj_test() {
int x, y;
x = 10; y = 10;
u32 tid= 0, pb= 0;
OBJ_ATTR *player = &obj_buffer[0];
obj_set_attr(player,
ATTR0_SQUARE,
ATTR1_SIZE_16,
ATTR2_PALBANK(pb) | tid
);
obj_set_pos(player, x, y);
while(1) {
vid_vsync();
key_poll();
oam_copy(oam_mem, obj_buffer, 1);
}
}
int main() { int main() {
memcpy(&tile_mem[4][0], playerTiles, playerTilesLen); memcpy(&tile_mem[4][0], playerTiles, playerTilesLen);
memcpy(pal_obj_mem, playerPal, playerPalLen); memcpy(pal_obj_mem, playerPal, playerPalLen);
@ -43,8 +21,7 @@ int main() {
REG_DISPCNT= DCNT_OBJ | DCNT_OBJ_1D; REG_DISPCNT= DCNT_OBJ | DCNT_OBJ_1D;
playerObject player = createPlayerObject(&obj_buffer[0], 0, 0); playerObject player = createPlayerObject(&obj_buffer[0], &obj_aff_buffer[0],0, 0);
while(1) { while(1) {
vid_vsync(); vid_vsync();
@ -54,8 +31,9 @@ int main() {
player.vel.dy -= 9 << FIX_SHIFT; player.vel.dy -= 9 << FIX_SHIFT;
} }
updatePlayer(&player, 140); updatePlayer(&player, 120);
oam_copy(oam_mem, obj_buffer, 1); obj_affine_copy(obj_aff_mem, player.affine, 1);
obj_copy(obj_mem, player.obj, 1);
} }
return 0; return 0;

98
source/playerObject.c Normal file
View File

@ -0,0 +1,98 @@
#include "../include/playerObject.h"
void initializePlayerObject (playerObject *object) {
// Initialize the point and velocity of a player object
object->vel = createVelocity(0, 0);
object->pt = createPoint(20 << FIX_SHIFT, 100 << FIX_SHIFT);
}
playerObject createPlayerObject (OBJ_ATTR *obj_buffer, OBJ_AFFINE *affine_buffer, int pallete_bank, int tile_id) {
// Create a player object from data
obj_affine_identity(affine_buffer);
playerObject temp;
initializePlayerObject(&temp);
temp.rotation = 0;
temp.obj = obj_buffer;
temp.affine = affine_buffer;
temp.pallete_bank = pallete_bank;
temp.tile_id = tile_id;
temp.isJumping = 0;
obj_set_attr(temp.obj,
ATTR0_SQUARE | ATTR0_AFF | ATTR0_AFF_DBL_BIT, // Set attribute 1 to be a square using affine
ATTR1_SIZE_16 | ATTR1_AFF_ID(0), // Set size to 16 x 16
ATTR2_PALBANK(pallete_bank) | tile_id // Which pallete to use, as we are in
// 16-color mode
);
obj_set_pos(temp.obj, temp.pt.x >> FIX_SHIFT, temp.pt.y >> FIX_SHIFT);
return temp;
}
void applyGravity (playerObject *object) {
// Apply a gravity constant to a player
object->vel.dy += float_to_fixed(GRAVITY);
// This is a weird convention to have gravity in the positive direction,
// but I don't want to deal with coordinate changing. Too lazy
}
void scalePlayer (playerObject *object, u32 scaleX, u32 scaleY) {
// Scale the player's sprite
// Maximum 0.5
object->affine->pa = scaleX; object->affine->pb = 0 ;
object->affine->pc = 0 ; object->affine->pd = scaleY;
}
void rotatePlayer (playerObject *object) {
// Rotate the player's sprite
int sinAlpha = lu_sin(object->rotation >> 4) >> 4;
int cosAlpha = lu_cos(object->rotation >> 4) >> 4;
object->affine->pa = cosAlpha; object->affine->pb =-sinAlpha;
object->affine->pc = sinAlpha; object->affine->pd = cosAlpha;
}
u32 roundToNearest90Degrees(u32 rotation) {
// Round a rotation to the nearest 90 degree equivalent of "binary radians"
// (Where 2pi = 0xFFFF and 0pi = 0)
u32 twoPi = 0xFFFF << 4;
u32 pi = 0x8000 << 4;
u32 halfPi = 0x4000 << 4;
u32 quarterPi = 0x2000 << 4;
if (rotation > quarterPi && rotation < 3 * quarterPi) {
return halfPi;
}
else if (rotation > 3 * quarterPi && rotation < (pi + quarterPi)) {
return pi;
}
else if (rotation > (pi + quarterPi) && rotation < (pi + 3*quarterPi)) {
return pi + halfPi;
}
else if (rotation < quarterPi || rotation > (twoPi - quarterPi)) {
return 1;
}
return 1;
}
void updatePlayer (playerObject *object, u32 GROUND_LEVEL) {
// Update the position of a player object
updatePoint(&object->pt, &object->vel);
if (object->pt.y >> FIX_SHIFT >= GROUND_LEVEL) {
// Only apply gravity if player is not touching the ground
object->isJumping = 0;
object->pt.y = GROUND_LEVEL << FIX_SHIFT; // Don't go through ground
object->vel.dy = 0;
object->rotation = roundToNearest90Degrees(object->rotation);
}
else {
object->isJumping = 1;
applyGravity(object);
object->rotation += 100 << 8;
}
rotatePlayer(object);
// Update the player object's attributes' position
obj_set_pos(object->obj, object->pt.x >> FIX_SHIFT, object->pt.y >> FIX_SHIFT);
// Update the player's second attribute (tile and pallete bank)
object->obj->attr2 = ATTR2_BUILD(object->tile_id, object->pallete_bank, 0);
}

73
source/sinlut.c Normal file
View File

@ -0,0 +1,73 @@
#include "../include/sinlut.h"
//
// Sine lut; 512 entries, 12 fixeds
//
const short sin_lut[512]=
{
0x0000, 0x0032, 0x0064, 0x0096, 0x00C8, 0x00FB, 0x012D, 0x015F,
0x0191, 0x01C3, 0x01F5, 0x0227, 0x0259, 0x028A, 0x02BC, 0x02ED,
0x031F, 0x0350, 0x0381, 0x03B2, 0x03E3, 0x0413, 0x0444, 0x0474,
0x04A5, 0x04D5, 0x0504, 0x0534, 0x0563, 0x0593, 0x05C2, 0x05F0,
0x061F, 0x064D, 0x067B, 0x06A9, 0x06D7, 0x0704, 0x0731, 0x075E,
0x078A, 0x07B7, 0x07E2, 0x080E, 0x0839, 0x0864, 0x088F, 0x08B9,
0x08E3, 0x090D, 0x0936, 0x095F, 0x0987, 0x09B0, 0x09D7, 0x09FF,
0x0A26, 0x0A4D, 0x0A73, 0x0A99, 0x0ABE, 0x0AE3, 0x0B08, 0x0B2C,
0x0B50, 0x0B73, 0x0B96, 0x0BB8, 0x0BDA, 0x0BFC, 0x0C1D, 0x0C3E,
0x0C5E, 0x0C7D, 0x0C9D, 0x0CBB, 0x0CD9, 0x0CF7, 0x0D14, 0x0D31,
0x0D4D, 0x0D69, 0x0D84, 0x0D9F, 0x0DB9, 0x0DD2, 0x0DEB, 0x0E04,
0x0E1C, 0x0E33, 0x0E4A, 0x0E60, 0x0E76, 0x0E8B, 0x0EA0, 0x0EB4,
0x0EC8, 0x0EDB, 0x0EED, 0x0EFF, 0x0F10, 0x0F21, 0x0F31, 0x0F40,
0x0F4F, 0x0F5D, 0x0F6B, 0x0F78, 0x0F85, 0x0F91, 0x0F9C, 0x0FA7,
0x0FB1, 0x0FBA, 0x0FC3, 0x0FCB, 0x0FD3, 0x0FDA, 0x0FE1, 0x0FE7,
0x0FEC, 0x0FF0, 0x0FF4, 0x0FF8, 0x0FFB, 0x0FFD, 0x0FFE, 0x0FFF,
0x0FFF, 0x0FFF, 0x0FFE, 0x0FFD, 0x0FFB, 0x0FF8, 0x0FF4, 0x0FF0,
0x0FEC, 0x0FE7, 0x0FE1, 0x0FDA, 0x0FD3, 0x0FCB, 0x0FC3, 0x0FBA,
0x0FB1, 0x0FA7, 0x0F9C, 0x0F91, 0x0F85, 0x0F78, 0x0F6B, 0x0F5D,
0x0F4F, 0x0F40, 0x0F31, 0x0F21, 0x0F10, 0x0EFF, 0x0EED, 0x0EDB,
0x0EC8, 0x0EB4, 0x0EA0, 0x0E8B, 0x0E76, 0x0E60, 0x0E4A, 0x0E33,
0x0E1C, 0x0E04, 0x0DEB, 0x0DD2, 0x0DB9, 0x0D9F, 0x0D84, 0x0D69,
0x0D4D, 0x0D31, 0x0D14, 0x0CF7, 0x0CD9, 0x0CBB, 0x0C9D, 0x0C7D,
0x0C5E, 0x0C3E, 0x0C1D, 0x0BFC, 0x0BDA, 0x0BB8, 0x0B96, 0x0B73,
0x0B50, 0x0B2C, 0x0B08, 0x0AE3, 0x0ABE, 0x0A99, 0x0A73, 0x0A4D,
0x0A26, 0x09FF, 0x09D7, 0x09B0, 0x0987, 0x095F, 0x0936, 0x090D,
0x08E3, 0x08B9, 0x088F, 0x0864, 0x0839, 0x080E, 0x07E2, 0x07B7,
0x078A, 0x075E, 0x0731, 0x0704, 0x06D7, 0x06A9, 0x067B, 0x064D,
0x061F, 0x05F0, 0x05C2, 0x0593, 0x0563, 0x0534, 0x0504, 0x04D5,
0x04A5, 0x0474, 0x0444, 0x0413, 0x03E3, 0x03B2, 0x0381, 0x0350,
0x031F, 0x02ED, 0x02BC, 0x028A, 0x0259, 0x0227, 0x01F5, 0x01C3,
0x0191, 0x015F, 0x012D, 0x00FB, 0x00C8, 0x0096, 0x0064, 0x0032,
0x0000, 0xFFCE, 0xFF9C, 0xFF6A, 0xFF38, 0xFF05, 0xFED3, 0xFEA1,
0xFE6F, 0xFE3D, 0xFE0B, 0xFDD9, 0xFDA7, 0xFD76, 0xFD44, 0xFD13,
0xFCE1, 0xFCB0, 0xFC7F, 0xFC4E, 0xFC1D, 0xFBED, 0xFBBC, 0xFB8C,
0xFB5B, 0xFB2B, 0xFAFC, 0xFACC, 0xFA9D, 0xFA6D, 0xFA3E, 0xFA10,
0xF9E1, 0xF9B3, 0xF985, 0xF957, 0xF929, 0xF8FC, 0xF8CF, 0xF8A2,
0xF876, 0xF849, 0xF81E, 0xF7F2, 0xF7C7, 0xF79C, 0xF771, 0xF747,
0xF71D, 0xF6F3, 0xF6CA, 0xF6A1, 0xF679, 0xF650, 0xF629, 0xF601,
0xF5DA, 0xF5B3, 0xF58D, 0xF567, 0xF542, 0xF51D, 0xF4F8, 0xF4D4,
0xF4B0, 0xF48D, 0xF46A, 0xF448, 0xF426, 0xF404, 0xF3E3, 0xF3C2,
0xF3A2, 0xF383, 0xF363, 0xF345, 0xF327, 0xF309, 0xF2EC, 0xF2CF,
0xF2B3, 0xF297, 0xF27C, 0xF261, 0xF247, 0xF22E, 0xF215, 0xF1FC,
0xF1E4, 0xF1CD, 0xF1B6, 0xF1A0, 0xF18A, 0xF175, 0xF160, 0xF14C,
0xF138, 0xF125, 0xF113, 0xF101, 0xF0F0, 0xF0DF, 0xF0CF, 0xF0C0,
0xF0B1, 0xF0A3, 0xF095, 0xF088, 0xF07B, 0xF06F, 0xF064, 0xF059,
0xF04F, 0xF046, 0xF03D, 0xF035, 0xF02D, 0xF026, 0xF01F, 0xF019,
0xF014, 0xF010, 0xF00C, 0xF008, 0xF005, 0xF003, 0xF002, 0xF001,
0xF001, 0xF001, 0xF002, 0xF003, 0xF005, 0xF008, 0xF00C, 0xF010,
0xF014, 0xF019, 0xF01F, 0xF026, 0xF02D, 0xF035, 0xF03D, 0xF046,
0xF04F, 0xF059, 0xF064, 0xF06F, 0xF07B, 0xF088, 0xF095, 0xF0A3,
0xF0B1, 0xF0C0, 0xF0CF, 0xF0DF, 0xF0F0, 0xF101, 0xF113, 0xF125,
0xF138, 0xF14C, 0xF160, 0xF175, 0xF18A, 0xF1A0, 0xF1B6, 0xF1CD,
0xF1E4, 0xF1FC, 0xF215, 0xF22E, 0xF247, 0xF261, 0xF27C, 0xF297,
0xF2B3, 0xF2CF, 0xF2EC, 0xF309, 0xF327, 0xF345, 0xF363, 0xF383,
0xF3A2, 0xF3C2, 0xF3E3, 0xF404, 0xF426, 0xF448, 0xF46A, 0xF48D,
0xF4B0, 0xF4D4, 0xF4F8, 0xF51D, 0xF542, 0xF567, 0xF58D, 0xF5B3,
0xF5DA, 0xF601, 0xF629, 0xF650, 0xF679, 0xF6A1, 0xF6CA, 0xF6F3,
0xF71D, 0xF747, 0xF771, 0xF79C, 0xF7C7, 0xF7F2, 0xF81E, 0xF849,
0xF876, 0xF8A2, 0xF8CF, 0xF8FC, 0xF929, 0xF957, 0xF985, 0xF9B3,
0xF9E1, 0xFA10, 0xFA3E, 0xFA6D, 0xFA9D, 0xFACC, 0xFAFC, 0xFB2B,
0xFB5B, 0xFB8C, 0xFBBC, 0xFBED, 0xFC1D, 0xFC4E, 0xFC7F, 0xFCB0,
0xFCE1, 0xFD13, 0xFD44, 0xFD76, 0xFDA7, 0xFDD9, 0xFE0B, 0xFE3D,
0xFE6F, 0xFEA1, 0xFED3, 0xFF05, 0xFF38, 0xFF6A, 0xFF9C, 0xFFCE,
};

View File

@ -63,3 +63,20 @@ void obj_copy(OBJ_ATTR *dst, const OBJ_ATTR *src, u32 count)
dst[ii].attr2= src[ii].attr2; dst[ii].attr2= src[ii].attr2;
} }
} }
void obj_affine_copy (OBJ_AFFINE *dst, const OBJ_AFFINE *src, u32 count) {
// Copy affine attributes from one pointer to another
for (int i = 0; i < count; i++) {
dst->pa = src->pa; dst->pb = src->pb;
dst->pc = src->pc; dst->pd = src->pd;
dst++;
src++;
}
}
void obj_affine_identity(OBJ_AFFINE *aff) {
// Make a pointer point to a identity affine matrix
aff->pa = 1 << 8; aff->pb = 0;
aff->pc = 0 ; aff->pd = 1 << 8;
}

BIN
tools/a.out Executable file

Binary file not shown.

29
tools/lookuptablemaker.c Normal file
View File

@ -0,0 +1,29 @@
// Example sine lut generator
#include <stdio.h>
#include <math.h>
#define M_PI 3.1415926535f
#define SIN_SIZE 512
#define SIN_FP 12
int main()
{
int ii;
FILE *fp= fopen("sinlut.c", "w");
unsigned short hw;
fprintf(fp, "//\n// Sine lut; %d entries, %d fixeds\n//\n\n",
SIN_SIZE, SIN_FP);
fprintf(fp, "const short sin_lut[%d]=\n{", SIN_SIZE);
for(ii=0; ii<SIN_SIZE; ii++)
{
hw= (unsigned short)(sin(ii*2*M_PI/SIN_SIZE)*(1<<SIN_FP));
if(ii%8 == 0)
fputs("\n\t", fp);
fprintf(fp, "0x%04X, ", hw);
}
fputs("\n};\n", fp);
fclose(fp);
return 0;
}