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: 4 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
This is a Github Pages site all about reverse engineering and the source code for retro video games. The audience is technical.
Always read and respect the contents of (Contributing.md)[./Contributing.md] when making changes.

Do not do any git operations! Multiple changes will be made by different agents so git operations will effect their work.

Load the following Skill: ./codex/skills/retroreversing-contributing/SKILL.md
8 changes: 4 additions & 4 deletions _includes/followUs.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@
</style>
<div class="followus-banner">
<div class="followus-logo-container">
<a href="https://twitter.com/RetroReversing">
<a href="https://twitter.com/RetroReversing" aria-label="Follow RetroReversing on Twitter">
<svg class="followus-logo" viewBox="0 0 24 24" fill="#1DA1F2">
<path d="M23.643 4.937c-.835.37-1.732.62-2.675.733.962-.576 1.7-1.49 2.048-2.578-.9.534-1.897.922-2.958 1.13-.85-.904-2.06-1.47-3.4-1.47-2.572 0-4.658 2.086-4.658 4.66 0 .364.042.718.12 1.06-3.873-.195-7.304-2.05-9.602-4.868-.4.69-.63 1.49-.63 2.342 0 1.616.823 3.043 2.072 3.878-.764-.025-1.482-.234-2.11-.583v.06c0 2.257 1.605 4.14 3.737 4.568-.392.106-.803.162-1.227.162-.3 0-.593-.028-.877-.082.593 1.85 2.313 3.198 4.352 3.234-1.595 1.25-3.604 1.995-5.786 1.995-.376 0-.747-.022-1.112-.065 2.062 1.323 4.51 2.093 7.14 2.093 8.57 0 13.255-7.098 13.255-13.254 0-.2-.005-.402-.014-.602.91-.658 1.7-1.477 2.323-2.41z"/>
</svg>
</a>
<a href="https://bsky.app/profile/retroreversing.bsky.social">
<a href="https://bsky.app/profile/retroreversing.bsky.social" aria-label="Follow RetroReversing on Bluesky">
<svg
className="followus-logo"
class="followus-logo"
viewBox="0 0 600 600"
width="60"
height="60"
Expand All @@ -68,7 +68,7 @@
</a>
</div>
<div class="followus-want-more">Want More?</div>
<h1 class="follow-text">Follow us on <a href="https://twitter.com/RetroReversing">Twitter</a> & <a href="https://bsky.app/profile/retroreversing.bsky.social">Bluesky!</a></h1>
<h2 class="follow-text">Follow us on <a href="https://twitter.com/RetroReversing">Twitter</a> & <a href="https://bsky.app/profile/retroreversing.bsky.social">Bluesky!</a></h2>
<div class="followus-divider"></div>
<p class="follow-subtitle">Don't miss out on Retro Reverse Engineering updates!</p>
</div>
37 changes: 13 additions & 24 deletions _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,51 +15,38 @@ <h4 class="footer-title">Help Us Provide the Correct Answer</h4>
</div>
<div class="footer-bottom">
<div class="footer-social">
<a rel="noreferrer" href="https://twitter.com/RetroReversing" target="_blank" data-toggle="tooltip" title="twitter"><i class="fa fa-twitter"></i></a>
<a rel="noreferrer" href="https://www.youtube.com/user/RetroReversing" target="_blank" data-toggle="tooltip" title="youtube"><i class="fa fa-youtube"></i></a>
<a rel="noreferrer" href="/atom.xml" target="_blank" data-toggle="tooltip" title="rss"><i class="fa fa-rss"></i></a>
<a rel="noreferrer" href="https://twitter.com/RetroReversing" target="_blank" data-toggle="tooltip" title="twitter" aria-label="RetroReversing on Twitter"><i class="fa fa-twitter" aria-hidden="true"></i></a>
<a rel="noreferrer" href="https://www.youtube.com/user/RetroReversing" target="_blank" data-toggle="tooltip" title="youtube" aria-label="RetroReversing on YouTube"><i class="fa fa-youtube" aria-hidden="true"></i></a>
<a rel="noreferrer" href="/atom.xml" target="_blank" data-toggle="tooltip" title="rss" aria-label="RetroReversing RSS feed"><i class="fa fa-rss" aria-hidden="true"></i></a>

</div>
<p>Copyright &copy; 2026 <a href="https://www.retroreversing.com/" target="_blank">Retro Reversing</a>. All rights reserved.</p>
</div>
</div>
</footer>
<!-- /footer -->
<script src="/public/js/jquery.min.js"></script>
<script defer src="/public/js/jquery.min.js"></script>
<script defer src="/public/js/popper.min.js"></script>
<script defer src="/public/js/bootstrap.min.js"></script>
<script defer src="/public/js/generateTOC.js"></script>
<script defer src="/public/js/owl.carousel.min.js"></script>
<script defer src="/public/js/lightbox.js"></script>
<script defer src="/public/js/wow.min.js"></script>
<script defer src="https://unpkg.com/mermaid@11/dist/mermaid.min.js"></script>

<script async id="datatable-scr" type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-1.10.18/b-1.5.2/b-colvis-1.5.2/b-html5-1.5.2/r-2.2.2/rg-1.0.3/sc-1.5.0/datatables.min.js"></script>
{% if page.mermaid == true or page.content contains '```mermaid' %}
<script defer src="https://unpkg.com/mermaid@11/dist/mermaid.min.js"></script>
{% endif %}

<!-- GeoPattern generates a nice patten for any element that has class="geopatten" and data-title="whatever" -->
<script async src="https://cdnjs.cloudflare.com/ajax/libs/geopattern/1.2.3/js/geopattern.min.js"></script>
<!-- GeoPattern generates a nice pattern for any element that has class="geopattern" and data-title="whatever" -->
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/geopattern/1.2.3/js/geopattern.min.js"></script>
<!-- End GeoPattern -->
<script defer src="{{ '/public/js/main.js' | relative_url }}"></script>

<!-- Search functionality -->
<script src="https://cdn.jsdelivr.net/npm/fuse.js@6.6.2"></script>
<script src="{{ '/public/js/search-index.js' | relative_url }}"></script>
<script defer src="https://cdn.jsdelivr.net/npm/fuse.js@6.6.2"></script>
<script defer src="{{ '/public/js/search-index.js' | relative_url }}"></script>
<script defer src="{{ '/public/js/search.js' | relative_url }}"></script>

<script>
$(document).ready(function() {
$("img.postImage").each(function() {
$(this).wrap($("<a/>", {
href: $(this).attr("src"),
"data-lightbox": '{"gallery": "page-images"}'
}));
});
// $('[data-lightbox]').lightbox({
// disqus: 'retro-reversing'
// });
});
</script>

<!-- Only include certain scripts when specific custom elements are used -->
<script type="module">
if (!customElements.get("rr-sandpack")) {
Expand All @@ -68,4 +55,6 @@ <h4 class="footer-title">Help Us Provide the Correct Answer</h4>
</script>

<!-- This is to avoid having to include widgets.js every time a tweet is embedded -->
{% if page.content contains 'twitter-tweet' or page.content contains 'twitter-timeline' %}
<script defer src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
{% endif %}
11 changes: 9 additions & 2 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@
<div class="navbar-backdrop">
<div class="navbar">
<div class="navbar-left">
<a class="navbar-toggle"><i class="fa fa-bars"></i></a>
<img src="/public/images/RetroReversingLogoSmall.png" style="height: 45px; padding-right: 10px; margin-bottom: 10px;" />
<a class="navbar-toggle" href="#" role="button" aria-label="Open menu"><i class="fa fa-bars"></i></a>
<img
src="/public/images/RetroReversingLogoSmall.png"
srcset="/public/images/RetroReversingLogoSmall.png 1x, /public/images/RetroReversingLogo.png 2x"
width="45"
height="45"
alt="RetroReversing logo"
style="height: 45px; padding-right: 10px; margin-bottom: 10px;"
/>
<a href="/" class="logo">Retro Reversing</a>
<nav class="nav">
<ul>
Expand Down
6 changes: 3 additions & 3 deletions _includes/social-share.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="social-share">
<a class="btn btn-social btn-bluesky btn-circle" href="https://bsky.app/intent/compose?text={{ include.title }}%0Ahttps%3A//www.retroreversing.com/{{ include.url }}" data-toggle="tooltip" title="" data-placement="bottom" role="button" data-original-title="Share on BlueSky"><i class="fa fs-brands fa-bluesky"></i></a>
<a class="btn btn-social btn-twitter btn-circle" data-toggle="tooltip" href="https://twitter.com/share?url={{site.url}}{{ include.url }}&amp;text={{ include.title }}&amp;hashtags=retroreversing" data-placement="bottom" role="button" data-original-title="Share on twitter"><i class="fa fs-brands fa-twitter"></i></a>
<a class="btn btn-social btn-reddit btn-circle" href="http://reddit.com/submit?url={{site.url}}{{ include.url }}&amp;title={{ include.title }}" data-toggle="tooltip" title="" data-placement="bottom" role="button" data-original-title="Share on Reddit"><i class="fa fs-brands fa-reddit"></i></a>
<a class="btn btn-social btn-bluesky btn-circle" aria-label="Share on BlueSky" href="https://bsky.app/intent/compose?text={{ include.title }}%0Ahttps%3A//www.retroreversing.com/{{ include.url }}" data-toggle="tooltip" title="" data-placement="bottom" role="button" data-original-title="Share on BlueSky"><i class="fa fs-brands fa-bluesky"></i></a>
<a class="btn btn-social btn-twitter btn-circle" aria-label="Share on Twitter" data-toggle="tooltip" href="https://twitter.com/share?url={{site.url}}{{ include.url }}&amp;text={{ include.title }}&amp;hashtags=retroreversing" data-placement="bottom" role="button" data-original-title="Share on twitter"><i class="fa fs-brands fa-twitter"></i></a>
<a class="btn btn-social btn-reddit btn-circle" aria-label="Share on Reddit" href="http://reddit.com/submit?url={{site.url}}{{ include.url }}&amp;title={{ include.title }}" data-toggle="tooltip" title="" data-placement="bottom" role="button" data-original-title="Share on Reddit"><i class="fa fs-brands fa-reddit"></i></a>
</div>
6 changes: 4 additions & 2 deletions _includes/sources-sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ <h5 class="widget-title">Sources <span>({{ include.references.size }})</span></h
{% endif %}
{% if include.hideTOC != true %}
<div class="post-directory widget widget-friends">
<h5 class="widget-title">Table of Contents</h5>
<dl></dl>
<h2 class="widget-title">Table of Contents</h2>
<nav class="post-directory-nav" aria-label="Table of contents">
<ul class="post-directory-list"></ul>
</nav>
</div>
{% endif %}
<!-- /sources-sidebar -->
34 changes: 18 additions & 16 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,27 @@

{% include_cached video-carousel.html videocarousel=page.videocarousel %}

<section>
<div class="container post-container">
<div class="row">
<div class="col-lg-9", style="padding-left: 0px;">
<div class="post post-single">
{% include posts/post-header.html %}
{{ content | markdownify }}
<main id="main-content">
<section>
<div class="container post-container">
<div class="row">
<div class="col-lg-9" style="padding-left: 0px;">
<div class="post post-single">
{% include posts/post-header.html %}
{{ content | markdownify }}
</div>
{% include_cached posts/post-footer.html tags=page.tags %}
</div>
{% include_cached posts/post-footer.html tags=page.tags %}
<aside class="col-lg-3">
<div class="sidebar">
{% include_cached sources-sidebar.html references=page.references hideTOC=page.hideTOC %}
{% include_cached recommended-sidebar.html recommend=page.recommend tags=page.tags recommend_title=page.recommendTitle current_url=page.url %}
</div>
</aside>
</div>
<aside class="col-lg-3">
<div class="sidebar">
{% include_cached sources-sidebar.html references=page.references hideTOC=page.hideTOC %}
{% include_cached recommended-sidebar.html recommend=page.recommend tags=page.tags recommend_title=page.recommendTitle current_url=page.url %}
</div>
</aside>
</div>
</div>
</section>
</section>
</main>
<!-- /main -->

{% include_cached footer.html %}
Expand Down
12 changes: 9 additions & 3 deletions categories/consoles/Intellivision.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ permalink: /intellivision
layout: post
category: intellivision
title: Intellivision Reverse Engineering
consoleimage: /public/consoles/Intellivision.png
image_: /public/images/Intellivision.jpg
twitterimage_: https://www.retroreversing.com/public/images/Intellivision.jpg
excerpt: Awesome list of Intellivision Game Development and Reverse Engineering information
breadcrumbs:
- name: Home
Expand All @@ -32,6 +29,15 @@ Whether you're interested in understanding the hardware architecture of the cons

So grab your Intellivision controller, and get ready to dive into the exciting world of Intellivision reverse engineering!

## The Story of The Mattel Intellivision
[Newsmakers Games](https://www.youtube.com/watch?v=RhlDH46BzJ0) has released a comprehensive retrospective detailing the hardware development and history of the Mattel Intellivision. The video covers the console's inception as a direct Atari competitor, its reliance on a General Instruments chipset, and the technical ambitions behind the ill-fated "Keyboard Component" intended to upgrade the system with a 6502 processor and 16K of RAM.
It also provides a great look into the system's pioneering controller design and its early push into complex simulation software like **Utopia**.

<iframe width="560" height="315" src="https://www.youtube.com/embed/RhlDH46BzJ0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>

---
# Software Development for Intellivision
Ever wondered what it was like to develop **Intellivision** games back on the day? The user **decle** on the **AtariAge** forum has put together an excellent pdf covering almost everything you would ever want to know about it:
[Intellivision development, back in the day - Intellivision Programming - AtariAge Forums](https://forums.atariage.com/topic/259003-intellivision-development-back-in-the-day/)


6 changes: 6 additions & 0 deletions categories/consoles/SG1000.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,9 @@ The most in-depth history of the Sega SG-1000 that I have found is a video creat

<iframe width="560" height="315" src="https://www.youtube.com/embed/qBDx83UZ1nw?si=yfLTdn_1rA9ykb7d" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>

## Sega SG-1000 II System Review & Story
[Nostalgia Nerd](https://www.youtube.com/watch?v=52Y33X6YGmQ) has a video exploring the hardware architecture and history of the Sega SG-1000 II console. The review details the system's underlying technical specifications, highlighting its use of a Zilog Z80 CPU running at 3.58 MHz alongside a Texas Instruments TMS9928A video processor and SN76489 sound chip.
Additionally, it examines the console's physical design, peripheral expansion capabilities, and software compatibility, demonstrating how its internal components heavily mirrored the **ColecoVision** and established the foundation for the Sega Master System.

<iframe width="560" height="315" src="https://www.youtube.com/embed/52Y33X6YGmQ" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>

39 changes: 39 additions & 0 deletions categories/games/Games.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,45 @@ We have a specific post that aggregates all our posts on games with debug symbol

{% include_cached link-to-other-post.html post="/symbols" %}

---
# NES Games

## The Final Fantasy Battle Engine: A Dissection of Physical Attacks
[Displaced Gamers](https://www.youtube.com/watch?v=O_CLnBCgJks) has an excellent video dissecting the underlying code, hidden math, and bugs governing physical attacks in the original NES Final Fantasy. The video explores how battle stats like accuracy, critical hit rates, and elemental weaknesses are processed in Assembly, revealing several programming oversights that heavily impact gameplay. It provides a fascinating look into early RPG mechanics and console game reverse engineering.

<iframe width="560" height="315" src="https://www.youtube.com/embed/O_CLnBCgJks" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>

Core Architecture:
* **System Scope:** Analysis of the physical attack mechanics within the Final Fantasy (NES/Famicom) battle engine.
* **Code Footprint:** The execution logic for a single physical attack consists of 781 total bytes (excluding called subroutines), responsible for animation, damage calculation, and variable reporting.

Base Stat Formulas:
* **Attack Power:** Calculated as `(Character Strength / 2) + Weapon Power`. The decimal value is truncated.
* **Accuracy:** Calculated as `Base Character Accuracy + Equipped Weapon Accuracy`.
* **Hits per Attack:** Calculated as `(Accuracy / 32) + 1`. This value determines how many discrete damage rolls are executed per attack command.
* **Evade:** Calculated as `Base 48 + Agility Modifier - Armor Weight Penalty`.
* **Absorb (Defense):** Total numerical summation of all equipped armor mitigation values.

The Black Belt / Master Class Exceptions:
* **Armed:** Attack power receives a hardcoded `+1` modifier in addition to standard formulas.
* **Unarmed:** Attack power and Critical Hit values bypass standard logic and are set to `Current Level * 2`. The hit count is calculated normally but then strictly doubled.
* **Unarmored:** Absorb value logic is bypassed and set equal to the character's `Current Level`.

RNG, Hit Validation, and Damage Calculation:
* **Turn Order:** Agility does not govern turn priority. An array queue of players and enemies undergoes 16 RNG-based memory position swaps to randomize round sequence.
* **Hit Chance Formula:** `168 (Flat Base Constant) + Attacker Accuracy - Defender Evade`. The initial calculation before the evasion deduction is hard-capped at 255.
* **Battle RNG Validation:** A random value generated between `0` and `200`. A roll of `200` forces an automatic miss. If `Hit Chance >= Battle RNG`, the attack successfully lands.
* **Base Damage Roll:** Generates a random value bounded by `[Attack Power]` and `[Attack Power * 2]`.
* **Calculated Damage:** `Damage Roll - Defender Absorb`. Floor value is strictly clamped at a minimum of `1` damage.
* **Critical Hits:** If the same `Battle RNG <= Critical Hit Rate`, a critical strike occurs. A secondary raw damage roll is executed and added directly to the damage total, completely ignoring the defender's Absorb stat.

Critical Engine Bugs & Logic Errors:
* **Critical Hit Memory Fetch Error:** When querying the ROM table for a weapon's stored critical hit rate, the engine skips the instruction to load the stat. Instead, it writes the weapon's *index array ID* into RAM. Consequently, later-game weapons (higher index table values) yield artificially high crit rates regardless of intended design.
* **Ailment Application on Misses:** Ailments run against `100 - Defender Magic Defense` and an RNG check. However, the logic utilizes a non-resetting running tally of connected hits to permit ailment rolls. If hit #1 connects, the flag turns non-zero; if hit #2 misses completely, the engine still executes the ailment roll against the player because the flag remains non-zero.
* **Elemental Weakness Inversion:** When an enemy executes a physical attack carrying a status effect (e.g., Poison), the engine erroneously cross-references the player's resistances against the *enemy's innate elemental weaknesses* rather than the status type. (Example: Resisting Poison from a Scum enemy requires equipping Fire/Ice resistance, as the Scum is weak to Fire/Ice).
* **Player Element Nullification:** Weapons with elemental attributes (e.g., Flame Sword) fail to trigger elemental damage bonuses because the combat routine queries the *player character's* element variable (which is nonexistent/null) instead of the *equipped weapon's* variable.
* **Stun/Sleep Accuracy Omission:** When an attack target is under Stun or Sleep status, the attacker correctly receives a +25% attack power bonus. However, the logic jump bypasses the instruction to apply the attacker's accuracy stat entirely, locking the base hit chance at a fixed `84%` (168 base / 200).

---
# All Posts related to Specific Games

Expand Down
Loading
Loading