mirror of
https://github.com/marcrobledo/RomPatcher.js.git
synced 2025-06-27 16:25:54 +00:00
refactor and added EBP description showing in frontend
This commit is contained in:
parent
198c046424
commit
844cfcb5a6
5 changed files with 88 additions and 55 deletions
42
test.js
42
test.js
|
@ -14,9 +14,6 @@
|
|||
- IPS test
|
||||
- Patch: https://www.romhacking.net/hacks/3784/
|
||||
- ROM: Super Mario Land 2 - 6 Golden Coins (USA, Europe).gb [CRC32=d5ec24e4]
|
||||
- EBP test
|
||||
- Patch: https://forum.starmen.net/forum/Community/PKHack/NickBound/page/1#post2333521
|
||||
- ROM: EarthBound (USA).sfc [CRC32=dc9bb451]
|
||||
- BPS test
|
||||
- Patch: https://www.romhacking.net/translations/6297/
|
||||
- ROM: Samurai Kid (Japan).gbc [CRC32=44a9ddfb]
|
||||
|
@ -26,9 +23,15 @@
|
|||
- APS test
|
||||
- Patch: http://dorando.emuverse.com/projects/eduardo_a2j/zelda-ocarina-of-time.html
|
||||
- ROM: Legend of Zelda, The - Ocarina of Time (USA).z64 [CRC32=7e107c35]
|
||||
- APS (GBA) test
|
||||
- Patch: http://ngplus.net/InsaneDifficultyArchive/www.insanedifficulty.com/board/index9837.html?/files/file/65-final-fantasy-tactics-advance-x/
|
||||
- ROM: Final Fantasy Tactics Advance (USA).gba [CRC32=5645e56c]
|
||||
- RUP test
|
||||
- Patch: https://www.romhacking.net/translations/843/
|
||||
- ROM: Uchuu no Kishi - Tekkaman Blade (Japan).sfc [CRC32=cd16c529]
|
||||
- EBP test
|
||||
- Patch: https://forum.starmen.net/forum/Community/PKHack/NickBound/page/1#post2333521
|
||||
- ROM: EarthBound (USA).sfc [CRC32=dc9bb451]
|
||||
- xdelta test
|
||||
- Patch: https://www.romhacking.net/hacks/2871/
|
||||
- ROM: New Super Mario Bros. (USA, Australia).nds [CRC32=0197576a]
|
||||
|
@ -53,14 +56,6 @@ const TEST_PATCHES = [
|
|||
patchCrc32: 0x0b742316,
|
||||
patchDownload: 'https://www.romhacking.net/hacks/3784/',
|
||||
outputCrc32: 0xf0799017
|
||||
}, {
|
||||
title: 'EBP - Mother Rebound',
|
||||
romFile: 'EarthBound (USA).sfc',
|
||||
romCrc32: 0xdc9bb451,
|
||||
patchFile: 'Mother_Rebound.ebp',
|
||||
patchCrc32: 0x271719e1,
|
||||
patchDownload: 'https://forum.starmen.net/forum/Community/PKHack/NickBound/page/1#post2333521',
|
||||
outputCrc32: 0x5065b02f
|
||||
}, {
|
||||
title: 'BPS - Samurai Kid translation',
|
||||
romFile: 'Samurai Kid (Japan).gbc',
|
||||
|
@ -85,6 +80,14 @@ const TEST_PATCHES = [
|
|||
patchCrc32: 0x7b70119d,
|
||||
patchDownload: 'http://dorando.emuverse.com/projects/eduardo_a2j/zelda-ocarina-of-time.html',
|
||||
outputCrc32: 0x7866f1ca
|
||||
}, {
|
||||
title: 'APS (GBA) - Final Fantasy Tactics Advance X',
|
||||
romFile: 'Final Fantasy Tactics Advance (USA).gba',
|
||||
romCrc32: 0x5645e56c,
|
||||
patchFile: 'FFTA_X_1.0.3.1.aps',
|
||||
patchCrc32: 0x77e5f2ae,
|
||||
patchDownload: 'http://ngplus.net/InsaneDifficultyArchive/www.insanedifficulty.com/board/index9837.html?/files/file/65-final-fantasy-tactics-advance-x/',
|
||||
outputCrc32: 0x49a5539a
|
||||
}, {
|
||||
title: 'Tekkaman Blade translation',
|
||||
romFile: 'Uchuu no Kishi - Tekkaman Blade (Japan).sfc',
|
||||
|
@ -92,8 +95,17 @@ const TEST_PATCHES = [
|
|||
patchFile: 'Tekkaman Blade v1.0.rup',
|
||||
patchCrc32: 0x621ab323,
|
||||
patchDownload: 'https://www.romhacking.net/hacks/4633/',
|
||||
outputCrc32: 0xe83e9b0a
|
||||
//outputCrc32: 0xe83e9b0a //Headerless
|
||||
outputCrc32: 0xda833bce //Headered
|
||||
}, {
|
||||
title: 'EBP - Mother Rebound',
|
||||
romFile: 'EarthBound (USA).sfc',
|
||||
romCrc32: 0xdc9bb451,
|
||||
patchFile: 'Mother_Rebound.ebp',
|
||||
patchCrc32: 0x271719e1,
|
||||
patchDownload: 'https://forum.starmen.net/forum/Community/PKHack/NickBound/page/1#post2333521',
|
||||
outputCrc32: 0x5065b02f
|
||||
}, {
|
||||
title: 'NSMB Hack Domain Infusion',
|
||||
romFile: 'New Super Mario Bros. (USA, Australia).nds',
|
||||
romCrc32: 0x0197576a,
|
||||
|
@ -139,7 +151,7 @@ _test('HashCalculator integrity', function () {
|
|||
const MODIFIED_TEST_DATA = (new Uint8Array([
|
||||
98, 91, 64, 8, 35, 53, 122, 167, 52, 253, 222, 156, 247, 82, 227, 213, 22, 221, 17, 247, 107, 102, 164, 254, 221, 8, 207, 63, 117, 164, 223, 10, 1, 77, 87, 123, 48, 9, 111, 64, 233, 118, 1, 36, 1, 60, 208, 245, 136, 126, 29, 231, 168, 18, 125, 172, 11, 184, 81, 20, 16, 30, 154, 16, 236, 21, 5, 74, 255, 112, 171, 198, 185, 89, 2, 98, 45, 164, 214, 55, 103, 15, 217, 95, 212, 133, 184, 21, 67, 144, 198, 163, 76, 35, 248, 229, 163, 37, 103, 33, 193, 96, 77, 255, 117, 89, 193, 61, 64, 253, 119, 82, 49, 187, 195, 165, 205, 140, 222, 134, 249, 68, 224, 248, 144, 207, 18, 126
|
||||
])).buffer;
|
||||
['ips', 'bps', 'ppf', 'ups', 'aps', 'rup'].forEach(function (patchFormat) {
|
||||
['ips', 'bps', 'ppf', 'ups', 'aps', 'rup', 'ebp'].forEach(function (patchFormat) {
|
||||
_test('create and apply ' + patchFormat.toUpperCase(), function () {
|
||||
const originalFile = new BinFile(TEST_DATA);
|
||||
const modifiedFile = new BinFile(MODIFIED_TEST_DATA);
|
||||
|
@ -165,7 +177,7 @@ TEST_PATCHES.forEach(function (patchInfo) {
|
|||
const patchPath = TEST_PATH + 'patches/' + patchInfo.patchFile;
|
||||
if (!existsSync(patchPath)) {
|
||||
console.log(chalk.yellow('! skipping patch ' + patchInfo.title));
|
||||
console.log(chalk.yellow(' patch file not found: ' + patchInfo.patchFile));
|
||||
console.log(chalk.yellow(' patch file not found: ' + TEST_PATH + 'patches/' + patchInfo.patchFile));
|
||||
console.log(chalk.yellow(' download patch at ' + patchInfo.patchDownload));
|
||||
return false;
|
||||
}
|
||||
|
@ -181,7 +193,7 @@ TEST_PATCHES.forEach(function (patchInfo) {
|
|||
const romPath = TEST_PATH + 'roms/' + patchInfo.romFile;
|
||||
if (!existsSync(romPath)) {
|
||||
console.log(chalk.yellow('! skipping patch ' + patchInfo.title));
|
||||
console.log(chalk.yellow(' ROM file not found: ' + patchInfo.romFile));
|
||||
console.log(chalk.yellow(' ROM file not found: ' + TEST_PATH + 'roms/' + patchInfo.romFile));
|
||||
return false;
|
||||
}
|
||||
const romFile = new BinFile(romPath);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue