From 9f859e7744616dfc8361207eaf689daea157bbe2 Mon Sep 17 00:00:00 2001 From: Ilya Shurumov Date: Thu, 29 Apr 2021 19:27:43 +0600 Subject: [PATCH] - overlay loading location fixes --- PSXToolchain/.vscode/launch.json | 6 +--- PSXToolchain/redriver2.txt | 23 --------------- PSXToolchain/redriver2_.txt | 44 ----------------------------- PSXToolchain/redriver2_cd.xml | 35 ++++++++++++++++++++--- PSXToolchain/redriver2_overlays.ld | 45 ++++++++++++++++-------------- 5 files changed, 56 insertions(+), 97 deletions(-) delete mode 100644 PSXToolchain/redriver2.txt delete mode 100644 PSXToolchain/redriver2_.txt diff --git a/PSXToolchain/.vscode/launch.json b/PSXToolchain/.vscode/launch.json index 48987bd3..e353f61e 100644 --- a/PSXToolchain/.vscode/launch.json +++ b/PSXToolchain/.vscode/launch.json @@ -1,16 +1,12 @@ { - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ - { "type": "gdb", "request": "attach", "name": "Attach to gdbserver", "executable": "0_CD_DATA/DRIVER2.ps-exe", - "gdbpath": "D:/mingw/bin/gdb.exe", + "gdbpath": "C:/mingw/bin/gdb.exe", "target": "localhost:3333", "remote": true, "cwd": "${workspaceRoot}" diff --git a/PSXToolchain/redriver2.txt b/PSXToolchain/redriver2.txt deleted file mode 100644 index c1c19aef..00000000 --- a/PSXToolchain/redriver2.txt +++ /dev/null @@ -1,23 +0,0 @@ -SYSTEM.CNF 23 68 -DRIVER2.EXE 24 552960 -FRONTEND.BIN 295 47576 -LEAD.BIN 319 25424 -PATH.BIN 332 45584 -SKY0.RAW 356 327680 -SKY1.RAW 516 327680 -SKY2.RAW 676 327680 -SKY3.RAW 836 327680 -FONT2.FNT 997 7276 -SPLASH1N.TIM 1001 328224 -LOADCHIC.TIM 1162 164384 -LOADHAVA.TIM 1243 164384 -LOADVEGA.TIM 1324 164384 -LOADRIO.TIM 1405 164384 -CHICAGO.LEV 1487 10915840 -HAVANA.LEV 6817 10915840 -VEGAS.LEV 12147 10915840 -RIO.LEV 17477 10915840 -MISSIONS.BLK 22808 315392 -PATH40.0 22962 640 -MUSIC.BIN 22964 777944 -VOICES2.BLK 23344 2377156 diff --git a/PSXToolchain/redriver2_.txt b/PSXToolchain/redriver2_.txt deleted file mode 100644 index 9aad913e..00000000 --- a/PSXToolchain/redriver2_.txt +++ /dev/null @@ -1,44 +0,0 @@ -File LBA log generated by MKPSXISO v1.23.GEC - -Image bin file: REDRIVER2.bin -Image cue file: REDRIVER2.cue - -File System: - - Type Name Length LBA Timecode Bytes Source File - - File SYSTEM.CNF;1 1 23 00:02:23 68 SYSTEM.CNF - File DRIVER2.EXE;1 270 24 00:02:24 552960 0_CD_DATA/DRIVER2.ps-exe - Dir DRIVER2 1 294 00:05:69 2048 - File FRONTEND.BIN;1 24 295 00:05:70 47576 0_CD_DATA/Overlay.frnt - File LEAD.BIN;1 13 319 00:06:19 25424 0_CD_DATA/Overlay.lead - File PATH.BIN;1 23 332 00:06:32 45584 0_CD_DATA/Overlay.path - Dir DATA 1 355 00:06:55 2048 - File SKY0.RAW;1 160 356 00:06:56 327680 0_CD_DATA/DATA/SKY0.RAW - File SKY1.RAW;1 160 516 00:08:66 327680 0_CD_DATA/DATA/SKY1.RAW - File SKY2.RAW;1 160 676 00:11:01 327680 0_CD_DATA/DATA/SKY2.RAW - File SKY3.RAW;1 160 836 00:13:11 327680 0_CD_DATA/DATA/SKY3.RAW - End DATA - Dir GFX 1 996 00:15:21 2048 - File FONT2.FNT;1 4 997 00:15:22 7276 0_CD_DATA/GFX/FONT2.FNT - File SPLASH1N.TIM;1 161 1001 00:15:26 328224 0_CD_DATA/GFX/SPLASH1N.TIM - File LOADCHIC.TIM;1 81 1162 00:17:37 164384 0_CD_DATA/GFX/LOADCHIC.TIM - File LOADHAVA.TIM;1 81 1243 00:18:43 164384 0_CD_DATA/GFX/LOADHAVA.TIM - File LOADVEGA.TIM;1 81 1324 00:19:49 164384 0_CD_DATA/GFX/LOADVEGA.TIM - File LOADRIO.TIM;1 81 1405 00:20:55 164384 0_CD_DATA/GFX/LOADRIO.TIM - End GFX - Dir LEVELS 1 1486 00:21:61 2048 - File CHICAGO.LEV;1 5330 1487 00:21:62 10915840 0_CD_DATA/LEVELS/CHICAGO.LEV - File HAVANA.LEV;1 5330 6817 01:32:67 10915840 0_CD_DATA/LEVELS/HAVANA.LEV - File VEGAS.LEV;1 5330 12147 02:43:72 10915840 0_CD_DATA/LEVELS/VEGAS.LEV - File RIO.LEV;1 5330 17477 03:55:02 10915840 0_CD_DATA/LEVELS/RIO.LEV - End LEVELS - Dir MISSIONS 1 22807 05:06:07 2048 - File MISSIONS.BLK;1 154 22808 05:06:08 315392 0_CD_DATA/MISSIONS/MISSIONS.BLK - File PATH40.0;1 1 22962 05:08:12 640 0_CD_DATA/MISSIONS/PATH40.0 - End MISSIONS - Dir SOUND 1 22963 05:08:13 2048 - File MUSIC.BIN;1 380 22964 05:08:14 777944 0_CD_DATA/SOUND/MUSIC.BIN - File VOICES2.BLK;1 1161 23344 05:13:19 2377156 0_CD_DATA/SOUND/VOICES2.BLK - End SOUND - End DRIVER2 diff --git a/PSXToolchain/redriver2_cd.xml b/PSXToolchain/redriver2_cd.xml index 19cb789f..130e87c4 100644 --- a/PSXToolchain/redriver2_cd.xml +++ b/PSXToolchain/redriver2_cd.xml @@ -44,10 +44,35 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -57,6 +82,8 @@ + + diff --git a/PSXToolchain/redriver2_overlays.ld b/PSXToolchain/redriver2_overlays.ld index 0b1c7ee1..27cfe8ec 100644 --- a/PSXToolchain/redriver2_overlays.ld +++ b/PSXToolchain/redriver2_overlays.ld @@ -1,4 +1,4 @@ -__heap_base = memTab_end; +__heap_base = mallocTab_end; SECTIONS { @@ -25,7 +25,7 @@ SECTIONS { KEEP(GameSRC/Game/C/pathfind.o(.ctors)) . = ALIGN(4); - __path_end = .; + __path_end = .; } .lead @@ -42,10 +42,30 @@ SECTIONS { KEEP(GameSRC/Game/C/leadai.o(.ctors)) . = ALIGN(4); - __lead_end = .; + __lead_end = .; } } - + + OVERLAY LOADADDR(.memTab) + SIZEOF(.memTab) + 0x88C00 : NOCROSSREFS SUBALIGN(4) + { + .frnt + { + KEEP(GameSRC/Game/*.o(.text)) + __frnt_ctor = .; + KEEP(GameSRC/Game/Frontend/*.o(.text.startup._GLOBAL__*)) + KEEP(GameSRC/Game/Frontend/*.o(.text.*)) + KEEP(GameSRC/Game/Frontend/*.o(.rodata*)) + KEEP(GameSRC/Game/Frontend/*.o(.sdata*)) + KEEP(GameSRC/Game/Frontend/*.o(.data*)) + KEEP(GameSRC/Game/Frontend/*.o(.sbss*)) + KEEP(GameSRC/Game/Frontend/*.o(.bss*)) + KEEP(GameSRC/Game/Frontend/*.o(.ctors)) + + . = ALIGN(4); + __frnt_end = .; + } + } + OVERLAY LOADADDR(.memTab) + SIZEOF(.memTab) : NOCROSSREFS SUBALIGN(4) { .mallocTab @@ -54,23 +74,6 @@ SECTIONS { . = 0xD7C00; mallocTab_end = .; } - - .frnt - { - KEEP(GameSRC/Game/*.o(.text)) - __frnt_ctor = .; - KEEP(GameSRC/Game/Frontend/*.o(.text.startup._GLOBAL__*)) - KEEP(GameSRC/Game/Frontend/*.o(.text.*)) - KEEP(GameSRC/Game/Frontend/*.o(.rodata*)) - KEEP(GameSRC/Game/Frontend/*.o(.sdata*)) - KEEP(GameSRC/Game/Frontend/*.o(.data*)) - KEEP(GameSRC/Game/Frontend/*.o(.sbss*)) - KEEP(GameSRC/Game/Frontend/*.o(.bss*)) - KEEP(GameSRC/Game/Frontend/*.o(.ctors)) - - . = ALIGN(4); - __frnt_end = .; - } } }