-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1206f9f
Showing
46 changed files
with
7,095 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
.pnpm-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Snowpack dependency directory (https://snowpack.dev/) | ||
web_modules/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional stylelint cache | ||
.stylelintcache | ||
|
||
# Microbundle cache | ||
.rpt2_cache/ | ||
.rts2_cache_cjs/ | ||
.rts2_cache_es/ | ||
.rts2_cache_umd/ | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variable files | ||
.env | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
.env.local | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
.parcel-cache | ||
|
||
# Next.js build output | ||
.next | ||
out | ||
|
||
# Nuxt.js build / generate output | ||
.nuxt | ||
dist | ||
|
||
# Gatsby files | ||
.cache/ | ||
# Comment in the public line in if your project uses Gatsby and not Next.js | ||
# https://nextjs.org/blog/next-9-1#public-directory-support | ||
# public | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# vuepress v2.x temp and cache directory | ||
.temp | ||
.cache | ||
|
||
# Docusaurus cache and generated files | ||
.docusaurus | ||
|
||
# Serverless directories | ||
.serverless/ | ||
|
||
# FuseBox cache | ||
.fusebox/ | ||
|
||
# DynamoDB Local files | ||
.dynamodb/ | ||
|
||
# TernJS port file | ||
.tern-port | ||
|
||
# Stores VSCode versions used for testing VSCode extensions | ||
.vscode-test | ||
|
||
# yarn v2 | ||
.yarn/cache | ||
.yarn/unplugged | ||
.yarn/build-state.yml | ||
.yarn/install-state.gz | ||
.pnp.* | ||
|
||
# Misc. | ||
.DS_* | ||
prg/ | ||
rom/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"plugins": { | ||
"tailwindcss": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Blue Oak Model License | ||
|
||
Version 1.0.0 | ||
|
||
## Purpose | ||
|
||
This license gives everyone as much permission to work with | ||
this software as possible, while protecting contributors | ||
from liability. | ||
|
||
## Acceptance | ||
|
||
In order to receive this license, you must agree to its | ||
rules. The rules of this license are both obligations | ||
under that agreement and conditions to your license. | ||
You must not do anything with this software that triggers | ||
a rule that you cannot or will not follow. | ||
|
||
## Copyright | ||
|
||
Each contributor licenses you to do everything with this | ||
software that would otherwise infringe that contributor's | ||
copyright in it. | ||
|
||
## Notices | ||
|
||
You must ensure that everyone who gets a copy of | ||
any part of this software from you, with or without | ||
changes, also gets the text of this license or a link to | ||
<https://blueoakcouncil.org/license/1.0.0>. | ||
|
||
## Excuse | ||
|
||
If anyone notifies you in writing that you have not | ||
complied with [Notices](#notices), you can keep your | ||
license by taking all practical steps to comply within 30 | ||
days after the notice. If you do not do so, your license | ||
ends immediately. | ||
|
||
## Patent | ||
|
||
Each contributor licenses you to do everything with this | ||
software that would otherwise infringe any patent claims | ||
they can license or become able to license. | ||
|
||
## Reliability | ||
|
||
No contributor can revoke this license. | ||
|
||
## No Liability | ||
|
||
***As far as the law allows, this software comes as is, | ||
without any warranty or condition, and no contributor | ||
will be liable to anyone for any damages related to this | ||
software or this license, under any kind of legal claim.*** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# SCUMM NES resource explorer | ||
|
||
> An app to explore the content of the Maniac Mansion game on NES. | ||
## What is this? | ||
|
||
This tool is a web app to explore the resources from 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. | ||
|
||
Some of the code comes from the [ScummVM](https://github.com/scummvm) project. | ||
|
||
## What does it do? | ||
|
||
It currently support: | ||
|
||
- Rooms (partially) | ||
- Room graphics | ||
- Prepositions | ||
|
||
The following version are supported: | ||
|
||
- American English | ||
- European English | ||
- French | ||
- German | ||
- Italian | ||
- Spanish | ||
- Swedish | ||
|
||
The Japanese version and the prototype are not supported. | ||
|
||
## What does it NOT do? | ||
|
||
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. | ||
|
||
## Contribute | ||
|
||
To run it locally, clone the repo and install the dependencies: | ||
|
||
```sh | ||
npm install | ||
``` | ||
|
||
Start the dev server with: | ||
|
||
```sh | ||
npm run dev | ||
``` | ||
|
||
### Production build | ||
|
||
Create a production build with: | ||
|
||
```sh | ||
npm run build | ||
``` | ||
|
||
Then deploy the content of the `dist` folder. | ||
|
||
## Future improvements | ||
|
||
- Use Typescript. | ||
- Write tests. | ||
- The parsing scripts should be callable from a CLI. | ||
- Parse more resource types (scripts, sounds...). | ||
- QoF improvements (store the ROM files locally...) | ||
- Enable modification of the resources to create new games. | ||
|
||
### Out of scope for now | ||
|
||
- Cover other SCUMM versions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
// Convert a palette from RGB components to CSS colours. | ||
import { hex } from '../src/lib/utils.js'; | ||
|
||
/** This is Mesen's NTSC palette and the new default palette for ScummVM. | ||
* It was chosen due to the accuracy of Mesen when it comes to emulating a NES. | ||
*/ | ||
// prettier-ignore | ||
const tableNESNTSCPalette = [ | ||
0x66, 0x66, 0x66, 0x00, 0x2A, 0x88, 0x14, 0x12, 0xA7, 0x3B, 0x00, 0xA4, | ||
0x5C, 0x00, 0x7E, 0x6E, 0x00, 0x40, 0x6C, 0x06, 0x00, 0x56, 0x1D, 0x00, | ||
0x33, 0x35, 0x00, 0x0B, 0x48, 0x00, 0x00, 0x52, 0x00, 0x00, 0x4F, 0x08, | ||
0x00, 0x40, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
|
||
0xAD, 0xAD, 0xAD, 0x15, 0x5F, 0xD9, 0x42, 0x40, 0xFF, 0x75, 0x27, 0xFE, | ||
0xA0, 0x1A, 0xCC, 0xB7, 0x1E, 0x7B, 0xB5, 0x31, 0x20, 0x99, 0x4E, 0x00, | ||
0x6B, 0x6D, 0x00, 0x38, 0x87, 0x00, 0x0C, 0x93, 0x00, 0x00, 0x8F, 0x32, | ||
0x00, 0x7C, 0x8D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
|
||
0xFF, 0xFE, 0xFF, 0x64, 0xB0, 0xFF, 0x92, 0x90, 0xFF, 0xC6, 0x76, 0xFF, | ||
0xF3, 0x6A, 0xFF, 0xFE, 0x6E, 0xCC, 0xFE, 0x81, 0x70, 0xEA, 0x9E, 0x22, | ||
0xBC, 0xBE, 0x00, 0x88, 0xD8, 0x00, 0x5C, 0xE4, 0x30, 0x45, 0xE0, 0x82, | ||
0x48, 0xCD, 0xDE, 0x4F, 0x4F, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
|
||
0xFF, 0xFE, 0xFF, 0xC0, 0xDF, 0xFF, 0xD3, 0xD2, 0xFF, 0xE8, 0xC8, 0xFF, | ||
0xFB, 0xC2, 0xFF, 0xFE, 0xC4, 0xEA, 0xFE, 0xCC, 0xC5, 0xF7, 0xD8, 0xA5, | ||
0xE4, 0xE5, 0x94, 0xCF, 0xEF, 0x96, 0xBD, 0xF4, 0xAB, 0xB3, 0xF3, 0xCC, | ||
0xB5, 0xEB, 0xF2, 0xB8, 0xB8, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 | ||
]; | ||
|
||
/** This is an alternative palette based on FirebrandX's NES Classic | ||
* palette. This palette is what Nintendo ships on the NES Classic which | ||
* makes it somewhat of an "official" digital palette for the NES. | ||
*/ | ||
// prettier-ignore | ||
const tableNESClassicPalette = [ | ||
0x60, 0x61, 0x5F, 0x00, 0x00, 0x83, 0x1D, 0x01, 0x95, 0x34, 0x08, 0x75, | ||
0x51, 0x05, 0x5E, 0x56, 0x00, 0x0F, 0x4C, 0x07, 0x00, 0x37, 0x23, 0x08, | ||
0x20, 0x3A, 0x0B, 0x0F, 0x4B, 0x0E, 0x19, 0x4C, 0x16, 0x02, 0x42, 0x1E, | ||
0x02, 0x31, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
|
||
0xA9, 0xAA, 0xA8, 0x10, 0x4B, 0xBF, 0x47, 0x12, 0xD8, 0x63, 0x00, 0xCA, | ||
0x88, 0x00, 0xA9, 0x93, 0x0B, 0x46, 0x8A, 0x2D, 0x04, 0x6F, 0x52, 0x06, | ||
0x5C, 0x71, 0x14, 0x1B, 0x8D, 0x12, 0x19, 0x95, 0x09, 0x17, 0x84, 0x48, | ||
0x20, 0x6B, 0x8E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
|
||
0xFB, 0xFB, 0xFB, 0x66, 0x99, 0xF8, 0x89, 0x74, 0xF9, 0xAB, 0x58, 0xF8, | ||
0xD5, 0x57, 0xEF, 0xDE, 0x5F, 0xA9, 0xDC, 0x7F, 0x59, 0xC7, 0xA2, 0x24, | ||
0xA7, 0xBE, 0x03, 0x75, 0xD7, 0x03, 0x60, 0xE3, 0x4F, 0x3C, 0xD6, 0x8D, | ||
0x56, 0xC9, 0xCC, 0x41, 0x42, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
|
||
0xFB, 0xFB, 0xFB, 0xBE, 0xD4, 0xFA, 0xC9, 0xC7, 0xF9, 0xD7, 0xBE, 0xFA, | ||
0xE8, 0xB8, 0xF9, 0xF5, 0xBA, 0xE5, 0xF3, 0xCA, 0xC2, 0xDF, 0xCD, 0xA7, | ||
0xD9, 0xE0, 0x9C, 0xC9, 0xEB, 0x9E, 0xC0, 0xED, 0xB8, 0xB5, 0xF4, 0xC7, | ||
0xB9, 0xEA, 0xE9, 0xAB, 0xAB, 0xAB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
]; | ||
|
||
const convertPalette = (nesPalette) => { | ||
const palette = []; | ||
for (let i = 0; i < nesPalette.length; i += 3) { | ||
palette.push( | ||
`#` + | ||
hex( | ||
(nesPalette[i] << 16) | | ||
(nesPalette[i + 1] << 8) | | ||
(nesPalette[i + 2] << 0) | ||
).padEnd(6, '0') | ||
); | ||
} | ||
return palette; | ||
}; | ||
|
||
console.log( | ||
'const tableNESNTSCPalette = ' + | ||
JSON.stringify(convertPalette(tableNESNTSCPalette)) | ||
); | ||
console.log( | ||
'const tableNESClassicPalette = ' + | ||
JSON.stringify(convertPalette(tableNESClassicPalette)) | ||
); |
Oops, something went wrong.