Skip to content

Commit

Permalink
Add Game Boy Advance
Browse files Browse the repository at this point in the history
- Add Game Boy Advance
- Language parsing can now handle languages formatted like "En+De" (and test updated)
- ROMParser will now filter out RetroAchievements subsets, since they're hacks
- When checking for RAPatch matches, if the check is a list will simply check there's something in the list subset
- RAPatch checks now includes modern/improved/demoted versions
- ROMPatcher now supports RomPatcher.js
- ROMCleaner clears patched files out of cache
- ROMPatcher unquotes patch URL before downloading
  • Loading branch information
bbtufty committed Dec 6, 2024
1 parent 84070e1 commit 6376e76
Show file tree
Hide file tree
Showing 16 changed files with 343 additions and 27 deletions.
34 changes: 34 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
0.1.1 (Unreleased)
==================

Features
--------

- Added Game Boy Advance
- ROMPatcher now supports RomPatcher.js

Fixes
-----

ROMCleaner
~~~~~~~~~~

- Ensure we clear patched files out of cache

ROMParser
~~~~~~~~~

- ROMParser will now filter out RetroAchievements subsets, since they're hacks
- When checking for RAPatch matches, if the check is a list will simply check there's something in the list subset

ROMPatcher
~~~~~~~~~~

- Unquote patch URL before downloading

General
~~~~~~~

- RAPatch checks now includes modern/improved/demoted versions
- Language parsing can now handle languages formatted like "En+De" (and test updated)

0.1.0 (2024-12-04)
==================

Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,19 @@ To get started, see the [documentation](https://romsearch.readthedocs.io/en/late
Currently, ROMSearch is in early development, and so many features may be added over time. At the moment, ROMSearch
works for the following consoles:

* Nintendo
* Nintendo (Handheld)
* Game Boy
* Game Boy Color
* Game Boy Advance
* Nintendo (Home)
* Nintendo Entertainment System
* Super Nintendo Entertainment System
* GameCube
* Sony
* Sony (Handheld)
* PlayStation Portable
* Sony (Home)
* PlayStation
* PlayStation 2
* PlayStation Portable

but be aware there may be quirks that will only become apparent over time. We encourage users to open
[issues](https://github.com/bbtufty/romsearch/issues) as and where they find them.
5 changes: 3 additions & 2 deletions docs/configs/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ Syntax: ::
# ['games', 'applications']. Defaults to 'all_but_games', which will
# remove everything except games

rompatcher: # ROMPatcher specific options
xdelta_path: [path_to_xdelta] # OPTIONAL. This is where xdelta is located on your filesystem
rompatcher: # ROMPatcher specific options
xdelta_path: [path_to_xdelta] # OPTIONAL. This is where xdelta is located on your filesystem
rompatcher_js_path: [path_to_rompatcher] # OPTIONAL. This is where RomPatcher.js is located on your filesystem

discord: # OPTIONAL. If defined, supply a webhook URL so that ROMSearch can post Discord
webhook_url: [webhook_url] # notifications
Expand Down
32 changes: 26 additions & 6 deletions docs/configs/platforms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ Syntax: ::
ra_id: [id] # OPTIONAL. The RetroAchievements console ID, from their API_GetConsoleIDs
ra_hash_method: ["md5", "custom"] # OPTIONAL. The RetroAchievements hash method. Supports "md5" and "custom"

patch_method: ["xdelta"] # OPTIONAL: Method for patching ROMs. Supports "xdelta", "rompatcher.js"
file_exts: # OPTIONAL: Potential file extensions. ROMPatcher uses this to figure
- [ext] # out the file to patch
patch_file_exts: # OPTIONAL: Potential file extensions. ROMPatcher uses this to figure
- [ext] # out the patch file
patch_method: ["xdelta", "rompatcher_js"] # OPTIONAL: Method for patching ROMs. Supports "xdelta", "rompatcher_js"
file_exts: # OPTIONAL: Potential file extensions. ROMPatcher uses this to figure
- [ext] # out the file to patch
patch_file_exts: # OPTIONAL: Potential file extensions. ROMPatcher uses this to figure
- [ext] # out the patch file

Nintendo - Game Boy
===================
Expand All @@ -31,17 +31,37 @@ Nintendo - Game Boy Color

.. literalinclude:: ../../romsearch/configs/platforms/Nintendo - Game Boy Color.yml

Nintendo - Game Boy Advance
===========================

.. literalinclude:: ../../romsearch/configs/platforms/Nintendo - Game Boy Advance.yml

Nintendo - GameCube
===================

.. literalinclude:: ../../romsearch/configs/platforms/Nintendo - GameCube.yml

Nintendo - Nintendo Entertainment System
========================================

.. literalinclude:: ../../romsearch/configs/platforms/Nintendo - Nintendo Entertainment System.yml

Nintendo - Super Nintendo Entertainment System
==============================================

.. literalinclude:: ../../romsearch/configs/platforms/Nintendo - Super Nintendo Entertainment System.yml

Sony - PlayStation Portable
===========================

.. literalinclude:: ../../romsearch/configs/platforms/Sony - PlayStation Portable.yml

Sony - PlayStation
==================

.. literalinclude:: ../../romsearch/configs/platforms/Sony - PlayStation.yml
.. literalinclude:: ../../romsearch/configs/platforms/Sony - PlayStation.yml

Sony - PlayStation 2
====================

.. literalinclude:: ../../romsearch/configs/platforms/Sony - PlayStation 2.yml
13 changes: 10 additions & 3 deletions docs/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,26 @@ everything and then filter from the downloaded files. For more details, see the
Currently, ROMSearch is in early development, and so many features may be added over time. At the moment, ROMSearch
has the capability for:

* Nintendo
* Nintendo (Handheld)

* Game Boy
* Game Boy Color
* Game Boy Advance

* Nintendo (Home)

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

* Sony
* Sony (Handheld)

* PlayStation Portable

* Sony (Home)

* PlayStation
* PlayStation 2
* PlayStation Portable

but be aware there may be quirks that will only become apparent over time. We encourage users to open
`issues <https://github.com/bbtufty/romsearch/issues>`_ as and where they find them. Known issues can be found at
Expand Down
14 changes: 13 additions & 1 deletion docs/modules/rompatcher.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ROMPatcher
If a patch file is found and the ROMPatcher module is selected, then this will download patch files and apply to ROMs.
To highlight if a ROM has been patched, the final file will have a (ROMPatched) in the file name.

Currently, ROMSearch only uses ``xdelta`` to patch ROMs.
Currently, ROMSearch can use ``xdelta`` and ``RomPatcher.js`` to patch ROMs.

For more details on the ROMPatcher arguments, see the :doc:`config file documentation <../configs/config>`.

Expand All @@ -16,6 +16,18 @@ To use ``xdelta``, download the latest xdelta3 release from
`here <https://github.com/jmacd/xdelta-gpl/releases/latest>`_. After unzipping the .exe file, add the path to this file
into your config, under ``xdelta_path`` in the ``rompatcher`` config section.

RomPatcher.js
=============

You may need to download ``node.js`` to start with. You can get it `here <https://nodejs.org/en>`_. After that, clone
the NodePatcher.js repository and install: ::

git clone https://github.com/marcrobledo/RomPatcher.js.git
cd RomPatcher.js
npm install

After this, as the RomPatcher.js path in the config, put the path to the ``index.js`` file.

API
===

Expand Down
1 change: 1 addition & 0 deletions romsearch/configs/clonelists/retool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ url: "https://raw.githubusercontent.com/unexpectedpanda/retool-clonelists-metada

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 - Nintendo Entertainment System: "Nintendo - Nintendo Entertainment System (No-Intro).json"
Nintendo - Super Nintendo Entertainment System: "Nintendo - Super Nintendo Entertainment System (No-Intro).json"
Expand Down
3 changes: 3 additions & 0 deletions romsearch/configs/dats/no-intro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Nintendo - Game Boy:
Nintendo - Game Boy Color:
file_mapping: "Nintendo - Game Boy Color (*)"

Nintendo - Game Boy Advance:
file_mapping: "Nintendo - Game Boy Advance (*)"

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

Expand Down
4 changes: 4 additions & 0 deletions romsearch/configs/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ datetime_format: "%Y/%m/%d, %H:%M:%S"
platforms:
- "Nintendo - Game Boy"
- "Nintendo - Game Boy Color"
- "Nintendo - Game Boy Advance"
- "Nintendo - GameCube"
- "Nintendo - Nintendo Entertainment System"
- "Nintendo - Super Nintendo Entertainment System"
Expand Down Expand Up @@ -234,3 +235,6 @@ ra_patch_checks:
- "multi_disc"
- "demos"
- "preproduction"
- "improved_version"
- "modern_version"
- "demoted_version"
13 changes: 13 additions & 0 deletions romsearch/configs/platforms/Nintendo - Game Boy Advance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
group: "No-Intro"
dir: "/No-Intro/Nintendo - Game Boy Advance/"
unzip: false

ra_id: 5
ra_hash_method: "md5"

# For the ROM patcher
patch_method: "rompatcher.js"
file_exts:
- ".gba"
patch_file_exts:
- ".bps"
18 changes: 17 additions & 1 deletion romsearch/configs/regex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ regions:
flags: "NOFLAG"

languages:
pattern: "\\((([languages])(,\\s?)?)*\\)"
pattern: "\\((([languages])((,|\\+)\\s?)?)*\\)"
type: "list"
flags: "NOFLAG"

Expand Down Expand Up @@ -191,6 +191,10 @@ controller_set:
culture_publishers:
pattern: "\\(Culture Publishers\\)"

dsi:
pattern: "\\(DSI\\)"
group: "improved_version"

dx_pack:
pattern: "\\(DX Pack\\)"
group: "improved_version"
Expand Down Expand Up @@ -319,6 +323,10 @@ usb_mic_doukonban:
pattern: "\\(USB Mic Doukonban\\)"
group: "improved_version"

vivendi:
pattern: "\\(Vivendi\\)"
group: "improved_version"

# BUDGET EDITIONS

artdink:
Expand Down Expand Up @@ -502,6 +510,10 @@ konami_collector_series:
pattern: "\\(Konami Collector's Series\\)"
group: "modern_version"

mega_man_battle_network_legacy_collection:
pattern: "\\(Mega Man Battle Network Legacy Collection\\)"
group: "modern_version"

mega_man_legacy_collection:
pattern: "\\(Mega Man Legacy Collection\\)"
group: "modern_version"
Expand Down Expand Up @@ -530,6 +542,10 @@ ninja_jajamaru_retro:
pattern: "\\(Ninja JaJaMaru Retro Collection\\)"
group: "modern_version"

pokemon_box:
pattern: "\\(Pokemon Box\\)"
group: "modern_version"

qubyte_classic:
pattern: "\\(QUByte Classics\\)"
group: "modern_version"
Expand Down
1 change: 1 addition & 0 deletions romsearch/configs/sample_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ rahasher:

rompatcher:
xdelta_path: F:/Emulation/xdelta3-3.1.0-x86_64.exe
rompatcher_js_path: F:\Emulation\RomPatcher.js\index.js

discord:
webhook_url: "https://discord.com/api/webhooks/discord_url"
Expand Down
3 changes: 3 additions & 0 deletions romsearch/modules/romcleaner.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ def clean_roms(

g_i_short = os.path.splitext(g_i)[0]

if "(ROMPatched)" in rom_short:
g_i_short += " (ROMPatched)"

if g_i_short == rom_short:

# Also keep info on the dictionary stuff to clean from the cache
Expand Down
Loading

0 comments on commit 6376e76

Please sign in to comment.