-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
3a73ba8
commit 30997eb
Showing
7 changed files
with
120 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,10 @@ | ||
## Castlevania 3 Improved Controls Hack | ||
|
||
### Contributing to this repository | ||
|
||
Run the `setup.sh` script before starting in order to enable githooks. | ||
|
||
You must supply your own ROM for Akumajou Densetsu (J). Paste the ROM | ||
|
||
CRC32 for ROM: 2E93CE72 | ||
SHA-1: A0F3B31D4E3B0D2CA2E8A34F91F14AD99A5AD11F |
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,54 @@ | ||
#!/bin/bash | ||
|
||
_force=false | ||
flips="./flips/flips.exe" | ||
|
||
while getopts ":f" opt; do | ||
case ${opt} in | ||
f ) #force | ||
_force=true | ||
esac | ||
done | ||
|
||
if [ ! -f base.nes ] | ||
then | ||
>&2 echo "No base.nes ROM detected; cannot generate working.nes" | ||
exit 4; | ||
else | ||
if [ -f working.nes ] | ||
then | ||
if [ "$_force" = false ] | ||
then | ||
>&2 echo "working.nes already exists. Rerun with -f flag to force overwriting working.nes" | ||
exit 1; | ||
else | ||
echo "Replacing existing working.nes" | ||
rm working.nes | ||
fi | ||
fi | ||
echo "Generating working.nes..." | ||
op=`uname` | ||
|
||
if [ "$op" = "Linux" ] | ||
then | ||
flips="./flips/flips-linux" | ||
fi | ||
|
||
if [ ! -f $flips ] | ||
then | ||
>&2 echo "flips not found; do you have the flips/ folder?" | ||
exit 2; | ||
fi | ||
|
||
cp base.nes working.nes | ||
if [ ! $? -eq 0 ] | ||
then | ||
>&2 echo "Error creating working.nes" | ||
exit 3; | ||
fi | ||
|
||
chmod u+x $flips | ||
|
||
$flips --apply patch.ips working.nes | ||
exit $? | ||
fi |
Binary file not shown.
Binary file not shown.
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,11 @@ | ||
Flips is licensed under GNU General Public License, version 3.0 or higher. The full legal text can | ||
be found in boring.zip; a rough interpretation (for non-lawyers only) follows: | ||
|
||
- You must credit the author. Don't claim it as your own. You may modify it and take credit for your | ||
modifications, but the author (Alcaro) must be credited for the original software. | ||
- If you modify this software, it must clearly be labeled as a modification. | ||
- Any applications containing any part of this software must provide the full source code needed to | ||
modify and rebuild this application, under the same license. Including this interpretation is | ||
optional. | ||
- The author claims no copyright over input, output, or error messages generated by this tool. Use | ||
it however you want. |
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,11 @@ | ||
#!/bin/bash | ||
|
||
# go to root directory of git repo: | ||
_rdir=`git rev-parse --show-toplevel` | ||
cd $_rdir | ||
|
||
# make sure base.nes and working.nes exist: | ||
if [ ! -f ./base.nes ] | ||
then | ||
echo "Base ROM (base.nes) is not found!" | ||
fi |
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,34 @@ | ||
#!/bin/bash | ||
echo "Seting git hoooks directory to hooks/" | ||
git config core.hooksPath hooks | ||
|
||
if [ -f base.nes ] | ||
then | ||
echo "Marking base.nes as read-only" | ||
chmod a-wx base.nes | ||
fi | ||
|
||
if [ ! -f ./working.nes ] | ||
then | ||
if [ -f ./base.nes ] | ||
then | ||
echo "Applying patch.ips to generate working.nes" | ||
./apply.sh | ||
else | ||
echo "Warning: no base ROM or working ROM detected." | ||
echo "Copy base.nes into the repository and then run apply.sh" | ||
fi | ||
else | ||
if [ ! -f ./base.nes ] | ||
then | ||
echo "Warning: working.nes but no base.nes file; you will not be able to generate patches." | ||
echo "(Perhaps you should delete working.nes and copy in a new base.nes?)" | ||
fi | ||
fi | ||
|
||
if [ $? -eq 0 ] | ||
then | ||
echo "Setup complete." | ||
else | ||
echo "Setup exited with errors. Please review." | ||
fi |