Skip to content

Commit

Permalink
Add N64
Browse files Browse the repository at this point in the history
- Added N64
- Updated regex
- Ensure MD5 is lowercase for RA
  • Loading branch information
bbtufty committed Dec 19, 2024
1 parent 8d37641 commit 2458040
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 8 deletions.
11 changes: 11 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
0.1.2 (Unreleased)
==================

Features
--------

- Added N64

Fixes
-----

ROMParser
~~~~~~~~~

- Ensure MD5 hash is lowercase from RetroAchievements

General
~~~~~~~

- Updated regex
- Add more tests

0.1.1 (2024-12-18)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ works for the following consoles:
* Nintendo (Home)
* Nintendo Entertainment System
* Super Nintendo Entertainment System
* Nintendo 64
* GameCube
* Sony (Handheld)
* PlayStation Portable
Expand Down
5 changes: 3 additions & 2 deletions docs/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ has the capability for:

* Nintendo (Home)

* Nintendo Entertainment System
* Super Nintendo Entertainment System
* Nintendo 64
* GameCube
* Nintendo - Nintendo Entertainment System
* Nintendo - Super Nintendo Entertainment System

* Sony (Handheld)

Expand Down
12 changes: 10 additions & 2 deletions romsearch/configs/clonelists/retool.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
url: "https://raw.githubusercontent.com/unexpectedpanda/retool-clonelists-metadata/main/clonelists"

# Nintendo Handhelds
Nintendo - Game Boy: "Nintendo - Game Boy (No-Intro).json"
Nintendo - Game Boy Color: "Nintendo - Game Boy Color (No-Intro).json"
Nintendo - Game Boy Advance: "Nintendo - Game Boy Advance (No-Intro).json"
Nintendo - GameCube: "Nintendo - GameCube (Redump).json"

# Nintendo Home Consoles
Nintendo - Nintendo Entertainment System: "Nintendo - Nintendo Entertainment System (No-Intro).json"
Nintendo - Super Nintendo Entertainment System: "Nintendo - Super Nintendo Entertainment System (No-Intro).json"
Nintendo - Nintendo 64: "Nintendo - Nintendo 64 (No-Intro).json"
Nintendo - GameCube: "Nintendo - GameCube (Redump).json"

# Sony Handhelds
Sony - PlayStation Portable: "Sony - PlayStation Portable (Redump).json"

# Sony Home Consoles
Sony - PlayStation: "Sony - PlayStation (Redump).json"
Sony - PlayStation 2: "Sony - PlayStation 2 (Redump).json"
Sony - PlayStation Portable: "Sony - PlayStation Portable (Redump).json"
5 changes: 4 additions & 1 deletion romsearch/configs/dats/no-intro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ Nintendo - Nintendo Entertainment System:
file_mapping: "Nintendo - Nintendo Entertainment System (Headered) (*)"

Nintendo - Super Nintendo Entertainment System:
file_mapping: "Nintendo - Super Nintendo Entertainment System (*)"
file_mapping: "Nintendo - Super Nintendo Entertainment System (*)"

Nintendo - Nintendo 64:
file_mapping: "Nintendo - Nintendo 64 (BigEndian) (*)"
3 changes: 2 additions & 1 deletion romsearch/configs/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ platforms:
- "Nintendo - Game Boy"
- "Nintendo - Game Boy Color"
- "Nintendo - Game Boy Advance"
- "Nintendo - GameCube"
- "Nintendo - Nintendo Entertainment System"
- "Nintendo - Super Nintendo Entertainment System"
- "Nintendo - Nintendo 64"
- "Nintendo - GameCube"
- "Sony - PlayStation"
- "Sony - PlayStation 2"
- "Sony - PlayStation Portable"
Expand Down
6 changes: 6 additions & 0 deletions romsearch/configs/platforms/Nintendo - Nintendo 64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
group: "No-Intro"
dir: "/No-Intro/Nintendo - Nintendo 64 (BigEndian)/"
unzip: false

ra_id: 2
ra_hash_method: "md5"
14 changes: 14 additions & 0 deletions romsearch/configs/regex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,10 @@ sgb_enhanced_gb_compatible:
pattern: "\\(SGB Enhanced, GB Compatible\\)"
group: "improved_version"

shindou_edition:
pattern: "\\(Shindou Edition\\)"
group: "improved_version"

subor_keyboard:
pattern: "\\(Subor Keyboard\\)"
group: "improved_version"
Expand Down Expand Up @@ -700,6 +704,10 @@ limited_run:
pattern: "\\(Limited Run Games\\)"
group: "demoted_version"

lodgenet:
pattern: "\\(LodgeNet\\)"
group: "demoted_version"

mb91:
pattern: "\\(MB-91\\)"
group: "demoted_version"
Expand Down Expand Up @@ -790,6 +798,12 @@ pal:
pattern: "([?:-][\\s])?[(]?PAL(?: [a-zA-Z]+| 50[Hh]z)?(?:\\)?| (?=\\())"
flags: "NOFLAG"

presence_of_mind:
pattern: "\\(Presence of Mind \\'98\\)"

summer64:
pattern: "\\(Summer64\\)"

supervision:
pattern: "\\(SuperVision\\)"

Expand Down
9 changes: 7 additions & 2 deletions romsearch/modules/romparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,11 +734,16 @@ def get_ra_match(
if any([l not in self.ra_labels for l in h["Labels"]]):
continue

# Use the md5 as the unique key, and then name as the thing we'll match to
md5 = copy.deepcopy(h["MD5"])
# Use the md5 as the unique key, and then name as the thing we'll match to.
# Ensure we lowercase the hash, just to be sure
md5 = copy.deepcopy(h["MD5"].lower())
name = copy.deepcopy(h[key])
name = name.strip()

# Ensure we also lowercase the hash here, if we need to
if key in ["MD5"]:
name = name.lower()

# If we're dealing with names, there might
# be file extensions to strip
if key in ["Name"]:
Expand Down

0 comments on commit 2458040

Please sign in to comment.