Skip to content

Commit 5cd344e

Browse files
Merge pull request #268 from RetroReversing/feature/rr-gm
Added missing title field to pages
2 parents 6aaed59 + b591407 commit 5cd344e

29 files changed

+2348
-39
lines changed
Lines changed: 246 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,246 @@
1+
name: Markdown Content Validation
2+
3+
on:
4+
pull_request:
5+
branches: [ main, master ]
6+
paths:
7+
- 'categories/**/*.md'
8+
- 'pages/**/*.md'
9+
- 'scripts/**'
10+
- '.github/workflows/markdown-validation.yml'
11+
12+
jobs:
13+
validate-markdown:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: '18'
24+
25+
- name: Check metadata completeness
26+
id: check-metadata
27+
run: |
28+
echo "🔍 Checking metadata completeness..."
29+
30+
# Run metadata check and capture output
31+
if node scripts/check-metadata.js editlink title > metadata-report.txt 2>&1; then
32+
echo "metadata_status=success" >> $GITHUB_OUTPUT
33+
else
34+
echo "metadata_status=failed" >> $GITHUB_OUTPUT
35+
fi
36+
37+
# Extract summary statistics
38+
editlink_coverage=$(grep "editlink:" metadata-report.txt | grep -o '[0-9.]*% coverage' | head -1 || echo "0% coverage")
39+
title_coverage=$(grep "title:" metadata-report.txt | grep -o '[0-9.]*% coverage' | head -1 || echo "0% coverage")
40+
41+
echo "editlink_coverage=$editlink_coverage" >> $GITHUB_OUTPUT
42+
echo "title_coverage=$title_coverage" >> $GITHUB_OUTPUT
43+
44+
echo "✅ Metadata check completed"
45+
46+
- name: Validate tags
47+
id: validate-tags
48+
run: |
49+
echo "🏷️ Validating tags against approved list..."
50+
51+
# Run tag validation and capture exit code
52+
if node scripts/validate-tags.js > tag-validation-report.txt 2>&1; then
53+
echo "validation_status=success" >> $GITHUB_OUTPUT
54+
echo "✅ All tags are valid"
55+
else
56+
echo "validation_status=failed" >> $GITHUB_OUTPUT
57+
echo "❌ Tag validation failed"
58+
59+
# Extract invalid tags for summary
60+
invalid_tags=$(grep -A 1000 "INVALID TAGS SUMMARY" tag-validation-report.txt | grep "❌" | head -5 | sed 's/❌ //' || echo "See detailed report for invalid tags")
61+
62+
# Save invalid tags to output (escape for GitHub Actions)
63+
{
64+
echo 'invalid_tags<<EOF'
65+
echo "$invalid_tags"
66+
echo 'EOF'
67+
} >> $GITHUB_OUTPUT
68+
fi
69+
70+
- name: Generate detailed reports
71+
run: |
72+
echo "📋 Generating detailed reports..."
73+
74+
# Create a comprehensive report
75+
cat > validation-summary.md << 'EOF'
76+
# 📊 Markdown Content Validation Report
77+
78+
## Metadata Completeness
79+
80+
- **editlink field**: ${{ steps.check-metadata.outputs.editlink_coverage }}
81+
- **title field**: ${{ steps.check-metadata.outputs.title_coverage }}
82+
83+
## Tag Validation
84+
85+
**Status**: ${{ steps.validate-tags.outputs.validation_status == 'success' && '✅ All tags valid' || '❌ Invalid tags found' }}
86+
87+
## Detailed Reports
88+
89+
<details>
90+
<summary>📋 Metadata Analysis Report</summary>
91+
92+
```
93+
EOF
94+
95+
cat metadata-report.txt >> validation-summary.md
96+
97+
cat >> validation-summary.md << 'EOF'
98+
```
99+
100+
</details>
101+
102+
<details>
103+
<summary>🏷️ Tag Validation Report</summary>
104+
105+
```
106+
EOF
107+
108+
cat tag-validation-report.txt >> validation-summary.md
109+
110+
cat >> validation-summary.md << 'EOF'
111+
```
112+
113+
</details>
114+
115+
---
116+
117+
*This report was automatically generated by the Markdown Content Validation workflow.*
118+
EOF
119+
120+
- name: Upload validation reports
121+
uses: actions/upload-artifact@v4
122+
with:
123+
name: markdown-validation-reports
124+
path: |
125+
validation-summary.md
126+
metadata-report.txt
127+
tag-validation-report.txt
128+
129+
- name: Comment on PR
130+
uses: actions/github-script@v7
131+
with:
132+
script: |
133+
const fs = require('fs');
134+
135+
// Read the validation summary
136+
const summary = fs.readFileSync('validation-summary.md', 'utf8');
137+
138+
// Determine overall status
139+
const metadataStatus = '${{ steps.check-metadata.outputs.metadata_status }}';
140+
const tagStatus = '${{ steps.validate-tags.outputs.validation_status }}';
141+
142+
let overallStatus = '✅ PASSED';
143+
let statusEmoji = '✅';
144+
145+
if (tagStatus === 'failed') {
146+
overallStatus = '❌ FAILED';
147+
statusEmoji = '❌';
148+
} else if (metadataStatus === 'failed') {
149+
overallStatus = '⚠️ WARNINGS';
150+
statusEmoji = '⚠️';
151+
}
152+
153+
let comment = `${statusEmoji} **Markdown Content Validation ${overallStatus}**
154+
155+
${summary}
156+
157+
## Quick Actions
158+
159+
${tagStatus === 'failed' ? '- ❌ **Fix invalid tags** before merging' : '- ✅ All tags are valid'}
160+
- 📈 **Consider adding missing metadata fields** to improve content completeness
161+
- 📥 **Download detailed reports** from the workflow artifacts
162+
`;
163+
164+
// Add specific invalid tags if validation failed
165+
if (tagStatus === 'failed') {
166+
const invalidTags = `${{ steps.validate-tags.outputs.invalid_tags }}`;
167+
if (invalidTags && invalidTags.trim() !== '' && !invalidTags.includes('See detailed report')) {
168+
comment += `
169+
170+
## ❌ Invalid Tags Found
171+
172+
The following tags are not in the approved list:
173+
${invalidTags}
174+
175+
**Fix Required**: Please remove these invalid tags or add them to the approved tags list before merging.
176+
`;
177+
}
178+
}
179+
180+
comment += `
181+
182+
---
183+
184+
💡 **Tip**: Run \`node scripts/validate-tags.js\` locally to see detailed validation results.
185+
`;
186+
187+
// Find existing comment
188+
const { data: comments } = await github.rest.issues.listComments({
189+
owner: context.repo.owner,
190+
repo: context.repo.repo,
191+
issue_number: context.issue.number,
192+
});
193+
194+
const existingComment = comments.find(comment =>
195+
comment.user.type === 'Bot' &&
196+
comment.body.includes('Markdown Content Validation')
197+
);
198+
199+
if (existingComment) {
200+
// Update existing comment
201+
await github.rest.issues.updateComment({
202+
owner: context.repo.owner,
203+
repo: context.repo.repo,
204+
comment_id: existingComment.id,
205+
body: comment
206+
});
207+
} else {
208+
// Create new comment
209+
await github.rest.issues.createComment({
210+
owner: context.repo.owner,
211+
repo: context.repo.repo,
212+
issue_number: context.issue.number,
213+
body: comment
214+
});
215+
}
216+
217+
- name: Check validation results
218+
run: |
219+
echo "🔍 Final validation check..."
220+
221+
if [ "${{ steps.validate-tags.outputs.validation_status }}" = "failed" ]; then
222+
echo "❌ Tag validation failed - blocking merge"
223+
echo "Please fix invalid tags before merging this PR"
224+
exit 1
225+
fi
226+
227+
echo "✅ All critical validations passed"
228+
echo "Note: Metadata warnings don't block the merge but should be addressed"
229+
230+
- name: Generate status summary
231+
run: |
232+
echo "## 📊 Validation Summary" >> $GITHUB_STEP_SUMMARY
233+
echo "" >> $GITHUB_STEP_SUMMARY
234+
echo "| Check | Status | Coverage |" >> $GITHUB_STEP_SUMMARY
235+
echo "|-------|---------|----------|" >> $GITHUB_STEP_SUMMARY
236+
echo "| Tag Validation | ${{ steps.validate-tags.outputs.validation_status == 'success' && '✅ Passed' || '❌ Failed' }} | - |" >> $GITHUB_STEP_SUMMARY
237+
echo "| editlink Field | ⚠️ Warnings | ${{ steps.check-metadata.outputs.editlink_coverage }} |" >> $GITHUB_STEP_SUMMARY
238+
echo "| title Field | ⚠️ Warnings | ${{ steps.check-metadata.outputs.title_coverage }} |" >> $GITHUB_STEP_SUMMARY
239+
echo "" >> $GITHUB_STEP_SUMMARY
240+
echo "### 🎯 Action Items" >> $GITHUB_STEP_SUMMARY
241+
echo "" >> $GITHUB_STEP_SUMMARY
242+
if [ "${{ steps.validate-tags.outputs.validation_status }}" = "failed" ]; then
243+
echo "- ❌ **CRITICAL**: Fix invalid tags (blocks merge)" >> $GITHUB_STEP_SUMMARY
244+
fi
245+
echo "- 📈 Consider adding missing metadata fields" >> $GITHUB_STEP_SUMMARY
246+
echo "- 📥 Download detailed reports from workflow artifacts" >> $GITHUB_STEP_SUMMARY

categories/companies/Codemasters.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ layout: post
44
console: codemasters
55
recommend:
66
- industry
7-
- codemasters
87
tags:
98
- companies
109
- industry
11-
- codemasters
1210
recommendTitle: All Codemasters Posts
1311
title: Codemasters (Creator of the Game Genie)
1412
image_: /public/images/companies/Codemasters - Company.jpg

categories/consoles/GameBoyAdvance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ layout: post
44
title: Nintendo Game Boy Advance (GBA) Reverse Engineering
55
recommend:
66
- gba
7-
- gb
7+
- gameboy
88
recommendTitle: All GBA Posts
99
editlink: ../categories/consoles/GameBoyAdvance.md
1010
console: gba

categories/games/FileFormats.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
22
permalink: /games/fileformats
3-
layout: blog-cards
3+
layout: post
44
console: fileformats
5+
title: Introduction to Game File Formats
56
breadcrumbs:
67
- name: Home
78
url: /
@@ -13,11 +14,14 @@ redirect_from:
1314
- /gamefiles
1415
- /fileformat
1516
- /game-file-formats
17+
recommend:
18+
- fileformats
1619
---
17-
<h1>Introduction to Game File Formats </h1>
18-
With the advent of Disc-based video games, developers were free to seperate games into multiple files, such as audio, textures, sprites, 3d models etc.
1920

20-
Before disc based games games used to all be on a single rom chip which could be thought of as a single file with all the assets and game code in one large binary file.
21+
# Introduction to Game File Formats
22+
With the advent of Disc-based video games, developers were free to separate games into multiple files, such as audio, textures, sprites, 3d models etc.
23+
24+
Before disc based games, games used to all be on a single rom chip which could be thought of as a single file with all the assets and game code in one large binary file.
2125

2226
## What are the benefits of external files?
2327
It was much easier for artists or sound designers to modify the game and test on hardware if all they needed to do was replace a single file, instead of the old days when everything needed to be compiled into one.
@@ -28,7 +32,7 @@ Another benefit is that it makes it much easier for modding of the game if you a
2832

2933
## But what about performance?
3034
There is a performance issue with loading hundreds of small files from a cd so games tended to create their own binary blobs of concatenated (and sometimes compressed) smaller files.
31-
This make some games similar to ROMS in that everything is packed in a single file, this makes loading from disc faster in theory but the bigger the data file the slower it will be.
35+
This makes some games similar to ROMS in that everything is packed in a single file, this makes loading from disc faster in theory but the bigger the data file the slower it will be.
3236

3337
## Are game formats standard?
3438
Some are and some are custom formats created by the developers for efficiency, in more modern games you will get files like .mp3, .dds, .png etc.
@@ -37,7 +41,7 @@ Some are from middleware providers such as .bik files which play using the Bink
3741

3842
---
3943
# Game Formats by Platform
40-
Although game formats can be used across multiple games consoles or platforms, we have seperated the file formats by platform to make it easier to see the files a developer would be working with when developing for a specific platform.
44+
Although game formats can be used across multiple games consoles or platforms, we have separated the file formats by platform to make it easier to see the files a developer would be working with when developing for a specific platform.
4145

4246
Platform Name | Game Engine List
4347
---|---
@@ -46,6 +50,3 @@ Nintendo WiiU | [Wii U File Formats](https://www.retroreversing.com/WiiUFileForm
4650
Sony Playstation 1 | [Playstation 1 File Formats](https://www.retroreversing.com/ps1-file-formats)
4751

4852

49-
<div>
50-
{% include console.html %}
51-
</div>

categories/games/Games.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
permalink: /games/
33
layout: post
44
console: games
5+
title: Games specific posts
56
breadcrumbs:
67
- name: Home
78
url: /
@@ -10,4 +11,6 @@ breadcrumbs:
1011
redirect_from:
1112
- /games/all
1213
---
14+
This page collects all the posts that are related to reverse engineering a specific game rather than an entire console or platform.
15+
1316
{% include console.html %}

categories/games/SourceCode.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
permalink: /games/sourcecode
33
layout: post
44
console: sourcecode
5+
title: Retail Game Source Code
56
breadcrumbs:
67
- name: Home
78
url: /
@@ -13,4 +14,7 @@ redirect_from:
1314
- /games/source
1415
- /retailsourcecode
1516
---
17+
This page collects all the posts that are related to source code, either officially released or leaked, for retail games (not homebrew or open source games).
18+
19+
1620
{% include console.html %}

categories/games/debugSymbols.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
permalink: /games/symbols
33
layout: post
44
console: symbols
5+
title: Introduction to Debug Symbols in Game Development
56
breadcrumbs:
67
- name: Home
78
url: /
@@ -13,14 +14,14 @@ redirect_from:
1314
- /games/debugsymbols
1415
- /unstrippedbinaries
1516
---
16-
<h1>Introduction to Debug Symbols</h1>
17+
# Introduction to Debug Symbols
1718
Finding Debug Symbols when reverse engineering a game is the equivalent of buying a Strategy Guide, all the secrets are unlocked which is awesome but it also removes part of the fun of discovering what each part of the game does.
1819

1920
## Where do debug symbols come from?
20-
Debug symbols are an artifact of compiling a game from a higher level language (e.g. C\C++) down to a lower level language such as Assembly code.
21+
Debug symbols are an artifact of compiling a game from a higher level language (e.g. C/C++) down to a lower level language such as Assembly code.
2122

2223
## What are debug symbols used for?
23-
They are used by developers to allow them to attach a debugger to the game and debug the code line-by-line with all the function and variable names in tact.
24+
They are used by developers to allow them to attach a debugger to the game and debug the code line-by-line with all the function and variable names intact.
2425

2526
## Why are debug symbols only in some games?
2627
Developers *should* remove the debug symbols before the release of the game, a process called `stripping executables`, but due to the high pressures of development and last-minute bugs they can be left in.
@@ -35,7 +36,7 @@ Also some platforms that used compiled code but were to be released on a small s
3536
Platform Name | List of games that still contain debug symbols
3637
---|---
3738
Sony Playstation 1 | [Playstation 1 Games with Debug Symbols](https://www.retroreversing.com/ps1-debug-symbols)
38-
Sony Playstation 2 | [PS2 Demo Discs](https://www.retroreversing.com/ps2-demos/) && [PS2 Retail Games](https://www.retroreversing.com/ps2-unstripped/)
39+
Sony Playstation 2 | [PS2 Demo Discs](https://www.retroreversing.com/ps2-demos/) and [PS2 Retail Games](https://www.retroreversing.com/ps2-unstripped/)
3940
Sony Playstation Portable | [Playstation Portable Games with Debug Symbols](https://www.retroreversing.com/psp-debug-symbols)
4041
Nintendo DS |
4142
Nintendo 64 | None due to limitations of cart size. But we do have part of Turok source code: [Turok 64 Official Source Code Analysis](https://www.retroreversing.com/turok64sourcecode)

0 commit comments

Comments
 (0)