From ead9e413f56e4ad7f525435327bfed2b4a276d92 Mon Sep 17 00:00:00 2001 From: edo999 Date: Sat, 25 May 2024 16:48:14 +0100 Subject: [PATCH] =?UTF-8?q?Generate=20ROM=20hacks=20with=20modified=20pale?= =?UTF-8?q?ttes=20=F0=9F=92=A5.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 13 ++- experiments/relocateNtAttrs.js | 5 +- experiments/updatePreps.js | 3 +- package.json | 4 +- public/404.html | 2 +- src/App.js | 40 ++------- src/components/DownloadRom.js | 51 +++++++++++ src/components/Footer.js | 72 +++++++-------- src/components/Header.js | 25 ++++-- src/components/Layout.js | 20 ++--- src/containers/DropZoneContainer.js | 31 ++++--- src/containers/ResourceExplorer.js | 7 +- src/containers/RoomsContainer.js | 16 +++- src/containers/TitlesContainer.js | 16 +++- src/contexts/RomContext.js | 50 +++++++++++ src/index.html | 2 +- src/index.js | 13 ++- src/lib/cliUtils.js | 69 +-------------- src/lib/parser/parseRom.js | 4 +- src/lib/resources.js | 16 ++-- src/lib/romUtils.js | 131 ++++++++++++++++++++++++++++ src/lib/serialiser/serialiser.js | 19 +++- src/lib/utils.js | 14 +-- 23 files changed, 412 insertions(+), 211 deletions(-) create mode 100644 src/components/DownloadRom.js create mode 100644 src/contexts/RomContext.js create mode 100644 src/lib/romUtils.js diff --git a/README.md b/README.md index 1b245ac..2facd8e 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ -# SCUMM NES resource explorer +# SCUMM-NES -> An app to explore the content of the Maniac Mansion game on NES. +> An app to explore and modify the game Maniac Mansion on NES. ## What is this? -This tool is a web app to explore the resources from the Maniac Mansion game on NES. +This tool is a web app to explore and modify the resources contained in the Maniac Mansion game on NES. The goal is to encourage the ROM hacking community to modify the game and create new hacks. -This app only works with Maniac Mansion on NES, it won't work with data files from other platforms or other games. +This app only works with Maniac Mansion on NES, it won't work with SCUMM files from other platforms or other NES games. Some of the code comes from the [ScummVM](https://github.com/scummvm) project. @@ -37,8 +37,6 @@ The Japanese version is not supported. The app doesn't use the runtime code used by the NES to start and play the game. It only works with the SCUMM resources stored in the ROM files. -It does not modify the ROM, it is only an explorer of the resources present in the game. - ## How to use it? On top of the app, there is a command line interface to export the resources to JSON. This is useful to do process or compare the data. @@ -82,9 +80,8 @@ Then deploy the content of the `dist` folder. - Use Typescript. - Write more tests. -- Parse more resource types (scripts, sounds...). +- Parse more resource types (sprites, sounds...). - QoF improvements (store the ROM files locally...) -- Enable modification of the resources to create new games. ### Out of scope for now diff --git a/experiments/relocateNtAttrs.js b/experiments/relocateNtAttrs.js index 70c31c6..940a860 100644 --- a/experiments/relocateNtAttrs.js +++ b/experiments/relocateNtAttrs.js @@ -2,7 +2,8 @@ import { parseArgs } from 'node:util'; import { basename } from 'node:path'; -import { loadRom, saveRom, expandRom, inject } from '../src/lib/cliUtils.js'; +import { loadRom, saveRom, expandRom } from '../src/lib/cliUtils.js'; +import { inject } from '../src/lib/romUtils.js'; import parseRoom from '../src/lib/parser/parseRooms.js'; import { zeroPad, hex } from '../src/lib/utils.js'; @@ -119,7 +120,7 @@ for (let i = 0; i < roomNum; i++) { nametableLength, hex(bankOffset + nametableLength, 4), hex(atOffset + headerLength), - attrsLength + attrsLength, ); bankOffset += nametableLength; bankOffset += attrsLength; diff --git a/experiments/updatePreps.js b/experiments/updatePreps.js index bb51231..ab15bb8 100644 --- a/experiments/updatePreps.js +++ b/experiments/updatePreps.js @@ -2,7 +2,8 @@ import { parseArgs } from 'node:util'; import { basename } from 'node:path'; -import { loadRom, saveRom, inject } from '../src/lib/cliUtils.js'; +import { loadRom, saveRom } from '../src/lib/cliUtils.js'; +import { inject } from '../src/lib/romUtils.js'; import serialisePreps from '../src/lib/serialiser/serialisePreps.js'; /* diff --git a/package.json b/package.json index 4c2d29f..ba34ff1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "scumm-nes", - "version": "0.1.2", - "description": "An app to explore the content of the Maniac Mansion game on NES.", + "version": "0.2.0", + "description": "An app to explore and modify the game Maniac Mansion on NES.", "author": "edo999@gmail.com", "license": "BlueOak-1.0.0", "keywords": [ diff --git a/public/404.html b/public/404.html index 9c464fe..68d4cad 100644 --- a/public/404.html +++ b/public/404.html @@ -2,7 +2,7 @@ - SCUMM NES resource explorer + SCUMM-NES