Clarified that users must run 5_restore.sh after step 4 or their device will be inoperable. (#30)

* Added missing dependencies required by openocd

Nightly build of openocd depends on libftdi1-2 and libhidapi-hidraw0

* Update README.md

* Update README.md

* Update README.md

* Update 4_unlock_device.sh

Updated the script to make it clear users must run 5_restore.sh
This commit is contained in:
viral_dna 2023-02-17 02:43:47 -08:00 committed by GitHub
parent 7d99781f90
commit f6b40091a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 16 deletions

View File

@ -26,5 +26,8 @@ if ! ${OPENOCD} -f "openocd/interface_${ADAPTER}.cfg" \
exit 1
fi
echo "Congratulations, your device has been unlocked."
echo "Please power-cycle it for the changes to take full effect."
echo "Congratulations, your device has been unlocked. Just a few more steps!"
echo "- The Game & Watch will not yet be functional"
echo "- Disconnect power from the device for the changes to take full effect"
echo "- Power it again"
echo "- Run the 5_restore.sh script to restore the SPI and Internal Flash."

View File

@ -3,10 +3,10 @@
This repository contains pre-built tools for backing up & restoring the original Game and Watch firmware. Both the Mario and Zelda variants are supported.
What you'll need:
- A Game & Watch in original state
- A Limited Edition Game & Watch, either the Super Mario Bros. edition released in 2020 or The Legend of Zelda edition released in 2021 in thier original state
- An ARM debug probe (Tested with J-Link and ST-Link compatible devices) or a Raspberry Pi
- Connections to the [debug port](https://twitter.com/ghidraninja/status/1326860677353512960) - testclips or soldered wires work well!
- A computer with Ubuntu 20.04 or compatible.
- A computer running Ubuntu 20.04 or compatible Linux distro. You can also use a Virtual Machine such as Virtual Box under Windows or MacOS.
Also see this video for a rough overview over how the scripts work: https://www.youtube.com/watch?v=-MzmoEFs0bQ
@ -15,13 +15,8 @@ Also see this video for a rough overview over how the scripts work: https://www.
The tools in this repository will modify both the internal and the external flash of the Game and Watch.
While we tested the scripts to our best ability, we can not guarantee that there won't be failures that will leave your
Game & Watch damaged. Use these tools at your own risk. If you feel like you don't understand what you're doing it might be best to let someone with more experience help (and teach) you!
Feel free to join our [discord channel](https://discord.gg/rE2nHVAKvn) and ask any support questions in *#game-and-watch-support*.
Feel free to join our [discord channel](https://discord.gg/rE2nHVAKvn) and ask any support questions in *#game-and-watch-support*. You can also checkout the [reddit community](https://www.reddit.com/r/GameAndWatchMods/) with over 2000 Members
## Read this first
This manual is for developers, and not yet suitable for end-users. The goal is to enable other developers to be able to contribute to Game & Watch development, and hopefully eventually get to a point where we can release end-user instructions :)
Please note that we recommend either a (full-size, not mini) J-Link/J-Link Edu, or an offical ST-Link. ST-Link clones have caused a lot of issues, please avoid them. Also please disconnect the battery before you continue.
## Connecting the debugger
@ -31,9 +26,9 @@ The debug connector of the Zelda variant shares pinout with the Mario variant, b
### Supported Debuggers
Please either use an official ST-Link (not one of the small USB stick clones) or a full-size J-Link. Others might work, a lot of them do not work with the 1.9V logic levels used on the Game and Watch.
For best results please either use a full sizzed official ST-Link or a STM32 Nucleo device (not one of the small USB stick clones which can be hit or miss) or a full-size J-Link debug probe. There are others that work, but many of them do not work with the 1.9V logic levels used on the Game and Watch.
Programmers we had a lot of trouble with: J-Link EDU Mini (does not work), cheap ST-Link clones.
Programmers some users have reported having trouble with are: J-Link EDU Mini, cheap ST-Link clones (with the later likely do to changing pinouts or different chipsets).
### Raspberry Pi host
@ -41,17 +36,25 @@ You can use a Raspberry Pi to back up your Game and Watch. In this case you shou
### Ubuntu setup
Install the required tools:
Install the required tools (Press "Y" for yes, if/when asked "Do you want to continue" and press the "Enter" key):
```
sudo apt-get install binutils-arm-none-eabi python3 libhidapi-hidraw0 libftdi1 libftdi1-2
sudo apt-get install git binutils-arm-none-eabi python3 libhidapi-hidraw0 libftdi1 libftdi1-2
```
# Clone this repo with submodules:
```
git clone --recurse-submodules https://github.com/DNA64/game-and-watch-backup
cd game-and-watch-backup
```
Note: The version of openocd included in Ubuntu 20.04 (0.10.0) does not include functionality that is needed by these scripts. A build from the unreleased master branch is needed. Please install a newer version either by building it yourself, or by installing a prebuilt package, e.g. from [this nightly build](https://github.com/kbeckmann/ubuntu-openocd-git-builder), using [xPack](https://xpack.github.io/openocd/) or similar.
### Alternative openocd location
If you used the aforementioned nightly openocd build, it will reside in the /opt directory.
If you used the aforementioned nightly openocd build, it will reside in the /opt directory as shown below.
To use that specific version you can either export the variable OPENOCD or prefix your commands with the variable declaration:
@ -66,7 +69,8 @@ OPENOCD="/opt/openocd-git/bin/openocd" ; ./1_sanity_check.sh
OPENOCD="/opt/openocd-git/bin/openocd" ; ./2_....
```
Finally, you could just hardwire some variables in 'config.sh'
Finally, you could just hardwire some variables in the 'config.sh' file.
### Mac Setup