Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Each distinct function counts once: frontbin's copy of the menus is the main ima
| Network (net.text) | 494 of 2,441 | 16,240 of 465,620 bytes (3.49%) | 4.50% |
| Resident menus (.text) | 1,846 of 4,786 | 148,512 of 1,422,048 bytes (10.44%) | 10.65% |
| frontbin's own code | 3 of 17 | 580 of 15,776 bytes (3.68%) | 3.68% |
| **Shared level code** | 1,627 of 5,088 | 125,324 of 2,008,520 bytes (6.24%) | 6.89% |
| **Shared level code** | 1,642 of 5,088 | 127,004 of 2,008,520 bytes (6.32%) | 6.98% |
| **Level-specific code** | 1,089 of 4,080 | 94,180 of 1,601,892 bytes (5.88%) | 6.29% |
| Level 00: Multiplayer Menu | 758 of 2,826 | 63,332 of 943,820 bytes (6.71%) | 7.12% |
| Level 01: Dreadzone Station (and 21) | 91 of 357 | 7,656 of 189,772 bytes (4.03%) | 4.03% |
Expand All @@ -101,7 +101,7 @@ Each distinct function counts once: frontbin's copy of the menus is the main ima
| Level 14: Ghost Station (and 34) | 6 of 23 | 444 of 8,884 bytes (5.00%) | 5.00% |
| Level 15: Control Level (and 35) | 23 of 134 | 2,540 of 116,624 bytes (2.18%) | 2.18% |
| Level 41: Battledome Tower (all 22 multiplayer maps) | 141 of 374 | 14,568 of 140,340 bytes (10.38%) | 12.24% |
| **Total** | 5,855 of 18,113 | 464,252 of 5,812,924 bytes (7.99%) | 8.49% |
| **Total** | 5,870 of 18,113 | 465,932 of 5,812,924 bytes (8.02%) | 8.51% |

Each distinct function counts once: frontbin's copy of the menus is the main image's, and a level function counts once however many of the 47 levels have it. 244,748 bytes (4.21%) are in units with nothing left to decompile.
<!-- progress:end -->
Expand Down
15 changes: 15 additions & 0 deletions config/pal/map.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -6342,3 +6342,18 @@ func_L41_00445E10 nonmatching/shared/func_L41_00445E10.c near func_L41_00446F10
func_L41_00446500 nonmatching/shared/func_L41_00446500.c near func_L41_00447608 level_41:.text:00447608:836 94.50
func_L41_0044C720 nonmatching/shared/func_L41_0044C720.c near func_L41_0044D828 level_41:.text:0044D828:272 84.56
func_L41_0061C668 nonmatching/shared/func_L41_0061C668.c near func_L41_00620DE0 level_41:.text:00620DE0:148 95.27
func_L00_006A3670 src/pal/overlays/shared/L00_006A3670.c match func_L00_006A3670 level_00:.text:006A3670:112 100.00
func_L00_006A36E0 src/pal/overlays/shared/L00_006A36E0.c match func_L00_006A36E0 level_00:.text:006A36E0:112 100.00
func_L00_006A37D0 src/pal/overlays/shared/L00_006A37D0.c match func_L00_006A37D0 level_00:.text:006A37D0:112 100.00
func_L00_006A38C0 src/pal/overlays/shared/L00_006A38C0.c match func_L00_006A38C0 level_00:.text:006A38C0:112 100.00
func_L00_006A3930 src/pal/overlays/shared/L00_006A3930.c match func_L00_006A3930 level_00:.text:006A3930:112 100.00
func_L00_006A39A0 src/pal/overlays/shared/L00_006A39A0.c match func_L00_006A39A0 level_00:.text:006A39A0:112 100.00
func_L00_006A3A10 src/pal/overlays/shared/L00_006A3A10.c match func_L00_006A3A10 level_00:.text:006A3A10:112 100.00
func_L00_006A3A80 src/pal/overlays/shared/L00_006A3A80.c match func_L00_006A3A80 level_00:.text:006A3A80:112 100.00
func_L00_006A3AF0 src/pal/overlays/shared/L00_006A3AF0.c match func_L00_006A3AF0 level_00:.text:006A3AF0:112 100.00
func_L00_006A3B60 src/pal/overlays/shared/L00_006A3B60.c match func_L00_006A3B60 level_00:.text:006A3B60:112 100.00
func_L00_006A3BD0 src/pal/overlays/shared/L00_006A3BD0.c match func_L00_006A3BD0 level_00:.text:006A3BD0:112 100.00
func_L00_006A3CC0 src/pal/overlays/shared/L00_006A3CC0.c match func_L00_006A3CC0 level_00:.text:006A3CC0:112 100.00
func_L00_006A3D30 src/pal/overlays/shared/L00_006A3D30.c match func_L00_006A3D30 level_00:.text:006A3D30:112 100.00
func_L00_006A3DA0 src/pal/overlays/shared/L00_006A3DA0.c match func_L00_006A3DA0 level_00:.text:006A3DA0:112 100.00
func_L00_006A3E10 src/pal/overlays/shared/L00_006A3E10.c match func_L00_006A3E10 level_00:.text:006A3E10:112 100.00
15 changes: 15 additions & 0 deletions config/us/map.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -6342,3 +6342,18 @@ func_L41_00445E10 nonmatching/shared/func_L41_00445E10.c near func_L41_00445E10
func_L41_00446500 nonmatching/shared/func_L41_00446500.c near func_L41_00446500 level_41:.text:00446500:836 94.50
func_L41_0044C720 nonmatching/shared/func_L41_0044C720.c near func_L41_0044C720 level_41:.text:0044C720:272 84.56
func_L41_0061C668 nonmatching/shared/func_L41_0061C668.c near func_L41_0061C668 level_41:.text:0061C668:148 95.27
func_L00_006A3670 src/pal/overlays/shared/L00_006A3670.c other - - 0.00
func_L00_006A36E0 src/pal/overlays/shared/L00_006A36E0.c other - - 0.00
func_L00_006A37D0 src/pal/overlays/shared/L00_006A37D0.c other - - 0.00
func_L00_006A38C0 src/pal/overlays/shared/L00_006A38C0.c other - - 0.00
func_L00_006A3930 src/pal/overlays/shared/L00_006A3930.c other - - 0.00
func_L00_006A39A0 src/pal/overlays/shared/L00_006A39A0.c other - - 0.00
func_L00_006A3A10 src/pal/overlays/shared/L00_006A3A10.c other - - 0.00
func_L00_006A3A80 src/pal/overlays/shared/L00_006A3A80.c other - - 0.00
func_L00_006A3AF0 src/pal/overlays/shared/L00_006A3AF0.c other - - 0.00
func_L00_006A3B60 src/pal/overlays/shared/L00_006A3B60.c other - - 0.00
func_L00_006A3BD0 src/pal/overlays/shared/L00_006A3BD0.c other - - 0.00
func_L00_006A3CC0 src/pal/overlays/shared/L00_006A3CC0.c other - - 0.00
func_L00_006A3D30 src/pal/overlays/shared/L00_006A3D30.c other - - 0.00
func_L00_006A3DA0 src/pal/overlays/shared/L00_006A3DA0.c other - - 0.00
func_L00_006A3E10 src/pal/overlays/shared/L00_006A3E10.c other - - 0.00
39 changes: 39 additions & 0 deletions include/pal/word_probe.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#ifndef PAL_WORD_PROBE_H
#define PAL_WORD_PROBE_H

#include "common.h"

/* The first eight bytes are opaque. Slots contain interleaved 32-bit
* key/value words. Zero ends the search; marker-valued slots are skipped. */
static inline s32 pal_word_probe(void *table,s32 key,s32 marker_address) {
s32 position;
s32 count;
s32 value;
u8 *keys;
u8 *values;
s32 offset;
s32 sentinel;
values = ((u8 *) table) + 12;
keys = ((u8 *) table) + 8;
count = 0;
sentinel = (s32) (marker_address);
position = key & 7;
do
{
offset = (position & 7) * 8;
value = *((s32 *) (values + offset));
if (value == 0)
{
return 0;
}
if (((*((s32 *) (keys + offset))) == key) && (value != sentinel))
{
return value;
}
count += 1;
position += 1299827;
}
while (count < 8);
return 0;
}
#endif
70 changes: 35 additions & 35 deletions progress/pal/report.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"version": 2,
"measures": {
"fuzzy_match_percent": 8.485854,
"fuzzy_match_percent": 8.514755,
"total_code": "5812924",
"matched_code": "464252",
"matched_code_percent": 7.986549,
"matched_code": "465932",
"matched_code_percent": 8.01545,
"total_functions": 18113,
"matched_functions": 5855,
"matched_functions_percent": 32.32485,
"matched_functions": 5870,
"matched_functions_percent": 32.407663,
"complete_code": "244748",
"complete_code_percent": 4.210411,
"total_units": 3173,
Expand Down Expand Up @@ -120,13 +120,13 @@
"id": "level_code",
"name": "Level code",
"measures": {
"fuzzy_match_percent": 6.626757,
"fuzzy_match_percent": 6.673289,
"total_code": "3610412",
"matched_code": "219504",
"matched_code_percent": 6.079749,
"matched_code": "221184",
"matched_code_percent": 6.126281,
"total_functions": 9168,
"matched_functions": 2716,
"matched_functions_percent": 29.624782,
"matched_functions": 2731,
"matched_functions_percent": 29.788394,
"complete_code": "0",
"complete_code_percent": 0.0,
"total_units": 15,
Expand All @@ -137,13 +137,13 @@
"id": "common",
"name": "Shared level code",
"measures": {
"fuzzy_match_percent": 6.893741,
"fuzzy_match_percent": 6.977384,
"total_code": "2008520",
"matched_code": "125324",
"matched_code_percent": 6.239619,
"matched_code": "127004",
"matched_code_percent": 6.323263,
"total_functions": 5088,
"matched_functions": 1627,
"matched_functions_percent": 31.977201,
"matched_functions": 1642,
"matched_functions_percent": 32.272013,
"complete_code": "0",
"complete_code_percent": 0.0,
"total_units": 1,
Expand Down Expand Up @@ -163026,13 +163026,13 @@
{
"name": "Shared level code",
"measures": {
"fuzzy_match_percent": 6.893741,
"fuzzy_match_percent": 6.977384,
"total_code": "2008520",
"matched_code": "125324",
"matched_code_percent": 6.239619,
"matched_code": "127004",
"matched_code_percent": 6.323263,
"total_functions": 5088,
"matched_functions": 1627,
"matched_functions_percent": 31.977201,
"matched_functions": 1642,
"matched_functions_percent": 32.272013,
"complete_code": "0",
"complete_code_percent": 0.0,
"total_units": 1,
Expand Down Expand Up @@ -202075,7 +202075,7 @@
{
"name": "func_L00_006A3670",
"size": "112",
"fuzzy_match_percent": 0.0,
"fuzzy_match_percent": 100.0,
"address": "3007248",
"metadata": {
"virtual_address": "6960752"
Expand All @@ -202084,7 +202084,7 @@
{
"name": "func_L00_006A36E0",
"size": "112",
"fuzzy_match_percent": 0.0,
"fuzzy_match_percent": 100.0,
"address": "3007360",
"metadata": {
"virtual_address": "6960864"
Expand All @@ -202102,7 +202102,7 @@
{
"name": "func_L00_006A37D0",
"size": "112",
"fuzzy_match_percent": 0.0,
"fuzzy_match_percent": 100.0,
"address": "3007600",
"metadata": {
"virtual_address": "6961104"
Expand All @@ -202120,7 +202120,7 @@
{
"name": "func_L00_006A38C0",
"size": "112",
"fuzzy_match_percent": 0.0,
"fuzzy_match_percent": 100.0,
"address": "3007840",
"metadata": {
"virtual_address": "6961344"
Expand All @@ -202129,7 +202129,7 @@
{
"name": "func_L00_006A3930",
"size": "112",
"fuzzy_match_percent": 0.0,
"fuzzy_match_percent": 100.0,
"address": "3007952",
"metadata": {
"virtual_address": "6961456"
Expand All @@ -202138,7 +202138,7 @@
{
"name": "func_L00_006A39A0",
"size": "112",
"fuzzy_match_percent": 0.0,
"fuzzy_match_percent": 100.0,
"address": "3008064",
"metadata": {
"virtual_address": "6961568"
Expand All @@ -202147,7 +202147,7 @@
{
"name": "func_L00_006A3A10",
"size": "112",
"fuzzy_match_percent": 0.0,
"fuzzy_match_percent": 100.0,
"address": "3008176",
"metadata": {
"virtual_address": "6961680"
Expand All @@ -202165,7 +202165,7 @@
{
"name": "func_L00_006A3A80",
"size": "112",
"fuzzy_match_percent": 0.0,
"fuzzy_match_percent": 100.0,
"address": "3008288",
"metadata": {
"virtual_address": "6961792"
Expand All @@ -202174,7 +202174,7 @@
{
"name": "func_L00_006A3AF0",
"size": "112",
"fuzzy_match_percent": 0.0,
"fuzzy_match_percent": 100.0,
"address": "3008400",
"metadata": {
"virtual_address": "6961904"
Expand All @@ -202183,7 +202183,7 @@
{
"name": "func_L00_006A3B60",
"size": "112",
"fuzzy_match_percent": 0.0,
"fuzzy_match_percent": 100.0,
"address": "3008512",
"metadata": {
"virtual_address": "6962016"
Expand All @@ -202192,7 +202192,7 @@
{
"name": "func_L00_006A3BD0",
"size": "112",
"fuzzy_match_percent": 0.0,
"fuzzy_match_percent": 100.0,
"address": "3008624",
"metadata": {
"virtual_address": "6962128"
Expand All @@ -202210,7 +202210,7 @@
{
"name": "func_L00_006A3CC0",
"size": "112",
"fuzzy_match_percent": 0.0,
"fuzzy_match_percent": 100.0,
"address": "3008864",
"metadata": {
"virtual_address": "6962368"
Expand All @@ -202219,7 +202219,7 @@
{
"name": "func_L00_006A3D30",
"size": "112",
"fuzzy_match_percent": 0.0,
"fuzzy_match_percent": 100.0,
"address": "3008976",
"metadata": {
"virtual_address": "6962480"
Expand All @@ -202228,7 +202228,7 @@
{
"name": "func_L00_006A3DA0",
"size": "112",
"fuzzy_match_percent": 0.0,
"fuzzy_match_percent": 100.0,
"address": "3009088",
"metadata": {
"virtual_address": "6962592"
Expand All @@ -202237,7 +202237,7 @@
{
"name": "func_L00_006A3E10",
"size": "112",
"fuzzy_match_percent": 0.0,
"fuzzy_match_percent": 100.0,
"address": "3009200",
"metadata": {
"virtual_address": "6962704"
Expand Down
10 changes: 10 additions & 0 deletions src/pal/overlays/shared/L00_006A3670.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* cflags: -O2 -G8 -Wuninitialized */
#include "pal/word_probe.h"

/* Address-only marker; its initial byte is zero in the checked PAL image. */
u8 D_0022348A = 0;

s32 func_L00_006A3670(void *table, s32 key)
{
return pal_word_probe(table, key, (s32) &D_0022348A);
}
10 changes: 10 additions & 0 deletions src/pal/overlays/shared/L00_006A36E0.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* cflags: -O2 -G8 -Wuninitialized */
#include "pal/word_probe.h"

/* Address-only marker; its initial byte is zero in the checked PAL image. */
u8 D_0022348B = 0;

s32 func_L00_006A36E0(void *table, s32 key)
{
return pal_word_probe(table, key, (s32) &D_0022348B);
}
10 changes: 10 additions & 0 deletions src/pal/overlays/shared/L00_006A37D0.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* cflags: -O2 -G8 -Wuninitialized */
#include "pal/word_probe.h"

/* Address-only marker; its initial byte is zero in the checked PAL image. */
u8 D_0022348D = 0;

s32 func_L00_006A37D0(void *table, s32 key)
{
return pal_word_probe(table, key, (s32) &D_0022348D);
}
10 changes: 10 additions & 0 deletions src/pal/overlays/shared/L00_006A38C0.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* cflags: -O2 -G8 -Wuninitialized */
#include "pal/word_probe.h"

/* Address-only marker; its initial byte is zero in the checked PAL image. */
u8 D_0022348F = 0;

s32 func_L00_006A38C0(void *table, s32 key)
{
return pal_word_probe(table, key, (s32) &D_0022348F);
}
10 changes: 10 additions & 0 deletions src/pal/overlays/shared/L00_006A3930.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* cflags: -O2 -G8 -Wuninitialized */
#include "pal/word_probe.h"

/* Address-only marker; its initial byte is zero in the checked PAL image. */
u8 D_00223490 = 0;

s32 func_L00_006A3930(void *table, s32 key)
{
return pal_word_probe(table, key, (s32) &D_00223490);
}
10 changes: 10 additions & 0 deletions src/pal/overlays/shared/L00_006A39A0.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* cflags: -O2 -G8 -Wuninitialized */
#include "pal/word_probe.h"

/* Address-only marker; its initial byte is zero in the checked PAL image. */
u8 D_00223491 = 0;

s32 func_L00_006A39A0(void *table, s32 key)
{
return pal_word_probe(table, key, (s32) &D_00223491);
}
10 changes: 10 additions & 0 deletions src/pal/overlays/shared/L00_006A3A10.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* cflags: -O2 -G8 -Wuninitialized */
#include "pal/word_probe.h"

/* Address-only marker; its initial byte is zero in the checked PAL image. */
u8 D_00223492 = 0;

s32 func_L00_006A3A10(void *table, s32 key)
{
return pal_word_probe(table, key, (s32) &D_00223492);
}
10 changes: 10 additions & 0 deletions src/pal/overlays/shared/L00_006A3A80.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* cflags: -O2 -G8 -Wuninitialized */
#include "pal/word_probe.h"

/* Address-only marker; its initial byte is zero in the checked PAL image. */
u8 D_00223493 = 0;

s32 func_L00_006A3A80(void *table, s32 key)
{
return pal_word_probe(table, key, (s32) &D_00223493);
}
Loading
Loading