Now the ship can flawlessly cross the doomed 0/320 barrier

This commit is contained in:
Rohmer Maxime
2024-06-14 09:34:54 +02:00
parent d3a38c9516
commit 79ab2c4ed7
8 changed files with 52 additions and 49 deletions
Binary file not shown.
+44 -44
View File
@@ -680,7 +680,7 @@ END GROUP
0x20084000 __top_RamAHB32 = 0x20084000 0x20084000 __top_RamAHB32 = 0x20084000
0x20084000 __top_RAM2 = 0x20084000 0x20084000 __top_RAM2 = 0x20084000
.text 0x00000000 0x3ab6c .text 0x00000000 0x3ab68
FILL mask 0xff FILL mask 0xff
0x00000000 __vectors_start__ = ABSOLUTE (.) 0x00000000 __vectors_start__ = ABSOLUTE (.)
*(.isr_vector) *(.isr_vector)
@@ -689,10 +689,10 @@ END GROUP
0x000000cc . = ALIGN (0x4) 0x000000cc . = ALIGN (0x4)
0x000000cc __section_table_start = . 0x000000cc __section_table_start = .
0x000000cc __data_section_table = . 0x000000cc __data_section_table = .
0x000000cc 0x4 LONG 0x3ab6c LOADADDR (.data) 0x000000cc 0x4 LONG 0x3ab68 LOADADDR (.data)
0x000000d0 0x4 LONG 0x10000000 ADDR (.data) 0x000000d0 0x4 LONG 0x10000000 ADDR (.data)
0x000000d4 0x4 LONG 0x1c SIZEOF (.data) 0x000000d4 0x4 LONG 0x1c SIZEOF (.data)
0x000000d8 0x4 LONG 0x3ab6c LOADADDR (.data_RAM2) 0x000000d8 0x4 LONG 0x3ab68 LOADADDR (.data_RAM2)
0x000000dc 0x4 LONG 0x2007c000 ADDR (.data_RAM2) 0x000000dc 0x4 LONG 0x2007c000 ADDR (.data_RAM2)
0x000000e0 0x4 LONG 0x0 SIZEOF (.data_RAM2) 0x000000e0 0x4 LONG 0x0 SIZEOF (.data_RAM2)
0x000000e4 __data_section_table_end = . 0x000000e4 __data_section_table_end = .
@@ -880,57 +880,57 @@ END GROUP
0x00001320 min 0x00001320 min
*fill* 0x00001342 0x2 ff *fill* 0x00001342 0x2 ff
.text.RefreshPlayer .text.RefreshPlayer
0x00001344 0x148 ./src/main.o 0x00001344 0x144 ./src/main.o
0x00001344 RefreshPlayer 0x00001344 RefreshPlayer
.text.main 0x0000148c 0x214 ./src/main.o .text.main 0x00001488 0x214 ./src/main.o
0x0000148c main 0x00001488 main
.text.__weak_main .text.__weak_main
0x000016a0 0x4 /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(__weak__main.o) 0x0000169c 0x4 /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(__weak__main.o)
0x000016a0 __main 0x0000169c __main
0x000016a0 __weak_main 0x0000169c __weak_main
.text.abs 0x000016a4 0x8 /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(stdlib.o) .text.abs 0x000016a0 0x8 /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(stdlib.o)
0x000016a4 abs 0x000016a0 abs
*(.rodata .rodata.* .constdata .constdata.*) *(.rodata .rodata.* .constdata .constdata.*)
.rodata.SMPTE 0x000016ac 0x38410 ./src/SPI.o .rodata.SMPTE 0x000016a8 0x38410 ./src/SPI.o
.rodata.ShipSprite1 .rodata.ShipSprite1
0x00039abc 0xc10 ./src/SPI.o 0x00039ab8 0xc10 ./src/SPI.o
.rodata.SmallFont .rodata.SmallFont
0x0003a6cc 0x478 ./src/fonts.o 0x0003a6c8 0x478 ./src/fonts.o
0x0003a6cc SmallFont 0x0003a6c8 SmallFont
.rodata.SCREEN .rodata.SCREEN
0x0003ab44 0x10 ./src/main.o 0x0003ab40 0x10 ./src/main.o
0x0003ab44 SCREEN 0x0003ab40 SCREEN
.rodata 0x0003ab54 0x18 ./src/main.o .rodata 0x0003ab50 0x18 ./src/main.o
0x0003ab6c . = ALIGN (0x4) 0x0003ab68 . = ALIGN (0x4)
.glue_7 0x0003ab6c 0x0 .glue_7 0x0003ab68 0x0
.glue_7 0x0003ab6c 0x0 linker stubs .glue_7 0x0003ab68 0x0 linker stubs
.glue_7t 0x0003ab6c 0x0 .glue_7t 0x0003ab68 0x0
.glue_7t 0x0003ab6c 0x0 linker stubs .glue_7t 0x0003ab68 0x0 linker stubs
.vfp11_veneer 0x0003ab6c 0x0 .vfp11_veneer 0x0003ab68 0x0
.vfp11_veneer 0x0003ab6c 0x0 linker stubs .vfp11_veneer 0x0003ab68 0x0 linker stubs
.v4_bx 0x0003ab6c 0x0 .v4_bx 0x0003ab68 0x0
.v4_bx 0x0003ab6c 0x0 linker stubs .v4_bx 0x0003ab68 0x0 linker stubs
.iplt 0x0003ab6c 0x0 .iplt 0x0003ab68 0x0
.iplt 0x0003ab6c 0x0 ./src/SPI.o .iplt 0x0003ab68 0x0 ./src/SPI.o
.rel.dyn 0x0003ab6c 0x0 .rel.dyn 0x0003ab68 0x0
.rel.iplt 0x0003ab6c 0x0 ./src/SPI.o .rel.iplt 0x0003ab68 0x0 ./src/SPI.o
.ARM.extab .ARM.extab
*(.ARM.extab* .gnu.linkonce.armextab.*) *(.ARM.extab* .gnu.linkonce.armextab.*)
.ARM.exidx 0x0003ab6c 0x0 .ARM.exidx 0x0003ab68 0x0
0x0003ab6c __exidx_start = . 0x0003ab68 __exidx_start = .
*(.ARM.exidx* .gnu.linkonce.armexidx.*) *(.ARM.exidx* .gnu.linkonce.armexidx.*)
0x0003ab6c __exidx_end = . 0x0003ab68 __exidx_end = .
0x0003ab6c _etext = . 0x0003ab68 _etext = .
.data_RAM2 0x2007c000 0x0 load address 0x0003ab6c .data_RAM2 0x2007c000 0x0 load address 0x0003ab68
FILL mask 0xff FILL mask 0xff
[!provide] PROVIDE (__start_data_RAM2 = .) [!provide] PROVIDE (__start_data_RAM2 = .)
[!provide] PROVIDE (__start_data_RamAHB32 = .) [!provide] PROVIDE (__start_data_RamAHB32 = .)
@@ -951,7 +951,7 @@ END GROUP
0x10000000 . = ALIGN (0x4) 0x10000000 . = ALIGN (0x4)
0x10000000 _end_uninit_RESERVED = . 0x10000000 _end_uninit_RESERVED = .
.data 0x10000000 0x1c load address 0x0003ab6c .data 0x10000000 0x1c load address 0x0003ab68
FILL mask 0xff FILL mask 0xff
0x10000000 _data = . 0x10000000 _data = .
[!provide] PROVIDE (__start_data_RAM = .) [!provide] PROVIDE (__start_data_RAM = .)
@@ -979,7 +979,7 @@ END GROUP
[!provide] PROVIDE (__end_data_RAM = .) [!provide] PROVIDE (__end_data_RAM = .)
[!provide] PROVIDE (__end_data_RamLoc32 = .) [!provide] PROVIDE (__end_data_RamLoc32 = .)
.igot.plt 0x1000001c 0x0 load address 0x0003ab88 .igot.plt 0x1000001c 0x0 load address 0x0003ab84
.igot.plt 0x1000001c 0x0 ./src/SPI.o .igot.plt 0x1000001c 0x0 ./src/SPI.o
.bss_RAM2 0x2007c000 0x0 .bss_RAM2 0x2007c000 0x0
@@ -1044,8 +1044,8 @@ END GROUP
0x10008000 PROVIDE (_vStackTop = DEFINED (__user_stack_top)?__user_stack_top:(__top_RamLoc32 - 0x0)) 0x10008000 PROVIDE (_vStackTop = DEFINED (__user_stack_top)?__user_stack_top:(__top_RamLoc32 - 0x0))
0xefff74b2 PROVIDE (__valid_user_code_checksum = (0x0 - ((((((_vStackTop + (ResetISR + 0x1)) + (NMI_Handler + 0x1)) + (HardFault_Handler + 0x1)) + (DEFINED (MemManage_Handler)?MemManage_Handler:0x0 + 0x1)) + (DEFINED (BusFault_Handler)?BusFault_Handler:0x0 + 0x1)) + (DEFINED (UsageFault_Handler)?UsageFault_Handler:0x0 + 0x1)))) 0xefff74b2 PROVIDE (__valid_user_code_checksum = (0x0 - ((((((_vStackTop + (ResetISR + 0x1)) + (NMI_Handler + 0x1)) + (HardFault_Handler + 0x1)) + (DEFINED (MemManage_Handler)?MemManage_Handler:0x0 + 0x1)) + (DEFINED (BusFault_Handler)?BusFault_Handler:0x0 + 0x1)) + (DEFINED (UsageFault_Handler)?UsageFault_Handler:0x0 + 0x1))))
0x00000000 _image_start = LOADADDR (.text) 0x00000000 _image_start = LOADADDR (.text)
0x0003ab88 _image_end = (LOADADDR (.data) + SIZEOF (.data)) 0x0003ab84 _image_end = (LOADADDR (.data) + SIZEOF (.data))
0x0003ab88 _image_size = (_image_end - _image_start) 0x0003ab84 _image_size = (_image_end - _image_start)
OUTPUT(MyProject.axf elf32-littlearm) OUTPUT(MyProject.axf elf32-littlearm)
LOAD linker stubs LOAD linker stubs
@@ -1118,16 +1118,16 @@ LOAD linker stubs
.debug_macro 0x000015f3 0x6b ./src/main.o .debug_macro 0x000015f3 0x6b ./src/main.o
.debug_macro 0x0000165e 0xc4 ./src/main.o .debug_macro 0x0000165e 0xc4 ./src/main.o
.debug_line 0x00000000 0x1d4a .debug_line 0x00000000 0x1d4e
.debug_line 0x00000000 0x358 ./src/GPIO.o .debug_line 0x00000000 0x358 ./src/GPIO.o
.debug_line 0x00000358 0xa66 ./src/SPI.o .debug_line 0x00000358 0xa66 ./src/SPI.o
.debug_line 0x00000dbe 0x161 ./src/cr_startup_lpc175x_6x.o .debug_line 0x00000dbe 0x161 ./src/cr_startup_lpc175x_6x.o
.debug_line 0x00000f1f 0xb9 ./src/crp.o .debug_line 0x00000f1f 0xb9 ./src/crp.o
.debug_line 0x00000fd8 0x3a ./src/fonts.o .debug_line 0x00000fd8 0x3a ./src/fonts.o
.debug_line 0x00001012 0x3c8 ./src/init_clk.o .debug_line 0x00001012 0x3c8 ./src/init_clk.o
.debug_line 0x000013da 0x5e7 ./src/main.o .debug_line 0x000013da 0x5eb ./src/main.o
.debug_line 0x000019c1 0x4a /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(__weak__main.o) .debug_line 0x000019c5 0x4a /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(__weak__main.o)
.debug_line 0x00001a0b 0x33f /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(stdlib.o) .debug_line 0x00001a0f 0x33f /Applications/MCUXpressoIDE_11.9.0_2144/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.9.0.202307121226/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libcr_c.a(stdlib.o)
.debug_str 0x00000000 0x63db .debug_str 0x00000000 0x63db
.debug_str 0x00000000 0x5145 ./src/GPIO.o .debug_str 0x00000000 0x5145 ./src/GPIO.o
+1 -1
View File
@@ -5,7 +5,7 @@
* Generated linker script file for LPC1769 * Generated linker script file for LPC1769
* Created from linkscript.ldt by FMCreateLinkLibraries * Created from linkscript.ldt by FMCreateLinkLibraries
* Using Freemarker v2.3.30 * Using Freemarker v2.3.30
* MCUXpresso IDE v11.9.0 [Build 2144] [2024-01-05] on Jun 14, 2024, 9:19:59 AM * MCUXpresso IDE v11.9.0 [Build 2144] [2024-01-05] on Jun 14, 2024, 9:33:19 AM
*/ */
INCLUDE "MyProject_Debug_library.ld" INCLUDE "MyProject_Debug_library.ld"
+1 -1
View File
@@ -5,7 +5,7 @@
* Generated linker script file for LPC1769 * Generated linker script file for LPC1769
* Created from library.ldt by FMCreateLinkLibraries * Created from library.ldt by FMCreateLinkLibraries
* Using Freemarker v2.3.30 * Using Freemarker v2.3.30
* MCUXpresso IDE v11.9.0 [Build 2144] [2024-01-05] on Jun 14, 2024, 9:19:59 AM * MCUXpresso IDE v11.9.0 [Build 2144] [2024-01-05] on Jun 14, 2024, 9:33:19 AM
*/ */
GROUP ( GROUP (
+1 -1
View File
@@ -5,7 +5,7 @@
* Generated linker script file for LPC1769 * Generated linker script file for LPC1769
* Created from memory.ldt by FMCreateLinkMemory * Created from memory.ldt by FMCreateLinkMemory
* Using Freemarker v2.3.30 * Using Freemarker v2.3.30
* MCUXpresso IDE v11.9.0 [Build 2144] [2024-01-05] on Jun 14, 2024, 9:19:59 AM * MCUXpresso IDE v11.9.0 [Build 2144] [2024-01-05] on Jun 14, 2024, 9:33:19 AM
*/ */
MEMORY MEMORY
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -9,4 +9,4 @@
../src/main.c:103:8:CreatePlayer 80 static ../src/main.c:103:8:CreatePlayer 80 static
../src/main.c:112:5:min 16 static ../src/main.c:112:5:min 16 static
../src/main.c:120:6:RefreshPlayer 72 static ../src/main.c:120:6:RefreshPlayer 72 static
../src/main.c:150:5:main 144 dynamic ../src/main.c:153:5:main 144 dynamic
+4 -1
View File
@@ -142,7 +142,10 @@ void RefreshPlayer(Point vector){
Point bigPos = {0,0}; Point bigPos = {0,0};
bigPos.X = min(player.Hitbox.Position.X, player.Hitbox.Position.X - vector.X); bigPos.X = min(player.Hitbox.Position.X, player.Hitbox.Position.X - vector.X);
bigPos.Y = min(player.Hitbox.Position.Y, player.Hitbox.Position.Y - vector.Y); bigPos.Y = min(player.Hitbox.Position.Y, player.Hitbox.Position.Y - vector.Y);
bigPos.Y = bigPos.Y % SCREEN_SIZE.Height;
if(bigPos.Y < 0)
bigPos.Y = SCREEN_SIZE.Height + bigPos.Y;
//bigPos.Y = bigPos.Y % SCREEN_SIZE.Height;
Refresh_Player_Area((Rectangle){bigPos,bigSize},player.Hitbox); Refresh_Player_Area((Rectangle){bigPos,bigSize},player.Hitbox);
} }