Skip to content

Commit

Permalink
Fix saving the game, add EEPROM saving (#4)
Browse files Browse the repository at this point in the history
* desmume-compatible cervi saving, blocksds stuff

* Fixup TWLmenu compat

* Improve eeprom write failure handling

* Update QR code
  • Loading branch information
WiIIiam278 authored Oct 10, 2023
1 parent 24391e2 commit e445133
Show file tree
Hide file tree
Showing 68 changed files with 15,130 additions and 14,934 deletions.
52 changes: 26 additions & 26 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
{
"name": "Existing Dockerfile",
"build": {
// Sets the run context to one level up instead of the .devcontainer folder.
"context": "..",
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"dockerfile": "../Dockerfile"
}

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Uncomment the next line to run commands after the container is created.
// "postCreateCommand": "cat /etc/os-release",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "devcontainer"
}
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
{
"name": "Existing Dockerfile",
"build": {
// Sets the run context to one level up instead of the .devcontainer folder.
"context": "..",
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"dockerfile": "../Dockerfile"
}

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Uncomment the next line to run commands after the container is created.
// "postCreateCommand": "cat /etc/os-release",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "devcontainer"
}
138 changes: 69 additions & 69 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,69 +1,69 @@
name: CI

on:
push:
branches: ["*"]
paths-ignore:
- 'README.md'
pull_request:
branches: ["*"]
paths-ignore:
- 'README.md'
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
container: devkitpro/devkitarm
steps:
- name: 'Checkout repository'
uses: actions/checkout@v3
with:
path: 'breaking-bad-ds'
- name: 'Checkout libfilesystem'
uses: actions/checkout@v3
with:
repository: 'RetroVNDjinn/libfilesystem'
path: 'libfilesystem'
- name: 'Patch libfilesystem'
run: |
cd ./libfilesystem;
make;
cp ./lib/libfilesystem.a /opt/devkitpro/libnds/lib/libfilesystem.a;
cd ../;
- name: 'Checkout Nitro-Engine'
uses: actions/checkout@v3
with:
repository: 'AntonioND/nitro-engine'
path: 'nitro-engine'
- name: 'Build Nitro-Engine'
run: |
cd ./nitro-engine;
make;
cd ../;
cp -r ./nitro-engine /opt/devkitpro/nitro-engine;
- name: 'Checkout NightFoxLib'
uses: actions/checkout@v3
with:
repository: 'knightfox75/nds_nflib'
path: 'nds_nflib'
- name: 'Build NightFoxLib'
run: |
cd ./nds_nflib;
make;
cd ../;
cp -r ./nds_nflib /opt/devkitpro/nflib;
- name: 'Execute build'
run: |
cd ./breaking-bad-ds/
make;
- name: 'Upload ROM'
uses: actions/upload-artifact@v3
with:
path: |
./breaking-bad-ds/*.nds
./breaking-bad-ds/*.md
./breaking-bad-ds/LICENSE
./breaking-bad-ds/cover-artwork.png
name: 'Breaking Bad DS'
name: CI

on:
push:
branches: ["*"]
paths-ignore:
- 'README.md'
pull_request:
branches: ["*"]
paths-ignore:
- 'README.md'
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
container: devkitpro/devkitarm
steps:
- name: 'Checkout repository'
uses: actions/checkout@v3
with:
path: 'breaking-bad-ds'
- name: 'Checkout libfilesystem'
uses: actions/checkout@v3
with:
repository: 'RetroVNDjinn/libfilesystem'
path: 'libfilesystem'
- name: 'Patch libfilesystem'
run: |
cd ./libfilesystem;
make;
cp ./lib/libfilesystem.a /opt/devkitpro/libnds/lib/libfilesystem.a;
cd ../;
- name: 'Checkout Nitro-Engine'
uses: actions/checkout@v3
with:
repository: 'AntonioND/nitro-engine'
path: 'nitro-engine'
- name: 'Build Nitro-Engine'
run: |
cd ./nitro-engine;
make;
cd ../;
cp -r ./nitro-engine /opt/devkitpro/nitro-engine;
- name: 'Checkout NightFoxLib'
uses: actions/checkout@v3
with:
repository: 'knightfox75/nds_nflib'
path: 'nds_nflib'
- name: 'Build NightFoxLib'
run: |
cd ./nds_nflib;
make;
cd ../;
cp -r ./nds_nflib /opt/devkitpro/nflib;
- name: 'Execute build'
run: |
cd ./breaking-bad-ds/
make;
- name: 'Upload ROM'
uses: actions/upload-artifact@v3
with:
path: |
./breaking-bad-ds/*.nds
./breaking-bad-ds/*.md
./breaking-bad-ds/LICENSE
./breaking-bad-ds/cover-artwork.png
name: 'Breaking Bad DS'
64 changes: 32 additions & 32 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
{
"configurations": [
{
"name": "NDS",
"includePath": [
"${workspaceFolder}",
"/nitro-engine/include/**",
"/nds_nflib/include/**",
"/opt/devkitpro/libnds/include/**"
],
"defines": [
"_DEBUG",
"_UNICODE",
"WIN32",
"ARM7",
"ARM9"
],
"browse": {
"path": [
"${workspaceFolder}",
"/nitro-engine/include/**",
"/nds_nflib/include/**",
"/opt/devkitpro/libnds/include/**"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
},
"cStandard": "c11",
"cppStandard": "c++11"
}
],
"version": 4
{
"configurations": [
{
"name": "NDS",
"includePath": [
"${workspaceFolder}",
"/nitro-engine/include/**",
"/nds_nflib/include/**",
"/opt/devkitpro/libnds/include/**"
],
"defines": [
"_DEBUG",
"_UNICODE",
"WIN32",
"ARM7",
"ARM9"
],
"browse": {
"path": [
"${workspaceFolder}",
"/nitro-engine/include/**",
"/nds_nflib/include/**",
"/opt/devkitpro/libnds/include/**"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
},
"cStandard": "c11",
"cppStandard": "c++11"
}
],
"version": 4
}
1 change: 1 addition & 0 deletions ATTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ This project and its source code is licensed under Apache-2.0, except where othe
- 2D graphics: NightFoxLib by NightFox (https://github.com/knightfox75/nds_nflib/)
- devKitARM and libnds by the devKitPro team (https://github.com/devkitPro/libnds)
- Nintendo DS NiFi Template by Fewnity (https://github.com/Fewnity/Nintendo-DS-Nifi-Template/), based on jpenny19993 and Stephen Stair's original work (libwifi)
- Save system by C3RV1, based on their awesome work for Undertale DS (https://github.com/C3RV1/UndertaleNDS/) — Licensed under GPL-3.0

#### Sound
- Metal sound 12 (drumming sink) by giddster (https://freesound.org/people/giddster/sounds/387958/) — Licensed under CC0 (Creative Commons Public Domain)
Expand Down
18 changes: 9 additions & 9 deletions convert-lab-model.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
cd ../../nitro-engine/tools/obj2dl &&
python obj2dl.py --input ../../../projects/breaking-bad-ds/models/superlab/superlab.obj --texture 256 256 --output ../../../projects/breaking-bad-ds/nitrofiles/model/superlab.dl &&
python obj2dl.py --input ../../../projects/breaking-bad-ds/models/superlab/superlab_mixer.obj --texture 256 256 --output ../../../projects/breaking-bad-ds/nitrofiles/model/superlab_mixer.dl &&
python obj2dl.py --input ../../../projects/breaking-bad-ds/models/superlab/superlab_pipe.obj --texture 256 256 --output ../../../projects/breaking-bad-ds/nitrofiles/model/superlab_pipe.dl &&
cd ../img2ds &&
# use imagemagick to flip superlab_textures.png ONLY VERTICALLY
convert ../../../projects/breaking-bad-ds/models/superlab/superlab_textures.png -flip ../../../projects/breaking-bad-ds/models/superlab/superlab_textures.png &&
python img2ds.py --input ../../../projects/breaking-bad-ds/models/superlab/superlab_textures.png --name superlab --format A1RGB5 --output ../../../projects/breaking-bad-ds/nitrofiles/model &&
# flip superlab_textures.png back
cd ../../nitro-engine/tools/obj2dl &&
python obj2dl.py --input ../../../projects/breaking-bad-ds/models/superlab/superlab.obj --texture 256 256 --output ../../../projects/breaking-bad-ds/nitrofiles/model/superlab.dl &&
python obj2dl.py --input ../../../projects/breaking-bad-ds/models/superlab/superlab_mixer.obj --texture 256 256 --output ../../../projects/breaking-bad-ds/nitrofiles/model/superlab_mixer.dl &&
python obj2dl.py --input ../../../projects/breaking-bad-ds/models/superlab/superlab_pipe.obj --texture 256 256 --output ../../../projects/breaking-bad-ds/nitrofiles/model/superlab_pipe.dl &&
cd ../img2ds &&
# use imagemagick to flip superlab_textures.png ONLY VERTICALLY
convert ../../../projects/breaking-bad-ds/models/superlab/superlab_textures.png -flip ../../../projects/breaking-bad-ds/models/superlab/superlab_textures.png &&
python img2ds.py --input ../../../projects/breaking-bad-ds/models/superlab/superlab_textures.png --name superlab --format A1RGB5 --output ../../../projects/breaking-bad-ds/nitrofiles/model &&
# flip superlab_textures.png back
convert ../../../projects/breaking-bad-ds/models/superlab/superlab_textures.png -flip ../../../projects/breaking-bad-ds/models/superlab/superlab_textures.png
14 changes: 7 additions & 7 deletions convert-logo-model.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cd ../../nitro-engine/tools/obj2dl &&
python obj2dl.py --input ../../../projects/breaking-bad-ds/models/logo/logo.obj --texture 128 128 --output ../../../projects/breaking-bad-ds/nitrofiles/model/logo.dl &&
python obj2dl.py --input ../../../projects/breaking-bad-ds/models/logo/logo_text.obj --texture 128 128 --output ../../../projects/breaking-bad-ds/nitrofiles/model/logo_text.dl &&
python obj2dl.py --input ../../../projects/breaking-bad-ds/models/logo/logo_skybox.obj --texture 256 256 --output ../../../projects/breaking-bad-ds/nitrofiles/model/logo_skybox.dl &&
cd ../img2ds &&
python img2ds.py --input ../../../projects/breaking-bad-ds/models/logo/logo.png --name logo --format A1RGB5 --output ../../../projects/breaking-bad-ds/nitrofiles/model &&
python img2ds.py --input ../../../projects/breaking-bad-ds/models/logo/logo_text.png --name logo_text --format A1RGB5 --output ../../../projects/breaking-bad-ds/nitrofiles/model &&
cd ../../nitro-engine/tools/obj2dl &&
python obj2dl.py --input ../../../projects/breaking-bad-ds/models/logo/logo.obj --texture 128 128 --output ../../../projects/breaking-bad-ds/nitrofiles/model/logo.dl &&
python obj2dl.py --input ../../../projects/breaking-bad-ds/models/logo/logo_text.obj --texture 128 128 --output ../../../projects/breaking-bad-ds/nitrofiles/model/logo_text.dl &&
python obj2dl.py --input ../../../projects/breaking-bad-ds/models/logo/logo_skybox.obj --texture 256 256 --output ../../../projects/breaking-bad-ds/nitrofiles/model/logo_skybox.dl &&
cd ../img2ds &&
python img2ds.py --input ../../../projects/breaking-bad-ds/models/logo/logo.png --name logo --format A1RGB5 --output ../../../projects/breaking-bad-ds/nitrofiles/model &&
python img2ds.py --input ../../../projects/breaking-bad-ds/models/logo/logo_text.png --name logo_text --format A1RGB5 --output ../../../projects/breaking-bad-ds/nitrofiles/model &&
python img2ds.py --input ../../../projects/breaking-bad-ds/models/logo/logo_skybox.png --name logo_skybox --format A1RGB5 --output ../../../projects/breaking-bad-ds/nitrofiles/model
Binary file modified dsi-qr-code.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 12 additions & 12 deletions graphics/bg/convert.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/bin/sh

for file in *.png; do
grit $file -ftb -fh! -gTFF00FF -gt -gB8 -mR8 -mLs
echo "Converting $file"
done

for file in *.bin; do
mv -- "$file" "${file%.bin}"
echo "Moving $file"
done

#!/bin/sh

for file in *.png; do
grit $file -ftb -fh! -gTFF00FF -gt -gB8 -mR8 -mLs
echo "Converting $file"
done

for file in *.bin; do
mv -- "$file" "${file%.bin}"
echo "Moving $file"
done

mv *.pal *.img *.map ../../nitrofiles/bg
24 changes: 12 additions & 12 deletions graphics/sprite/convert.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/bin/sh

for file in *.png; do
grit $file -ftb -fh! -gTFF00FF -gt -gB8 -m!
echo "Converting $file"
done

for file in *.bin; do
mv -- "$file" "${file%.bin}"
echo "Moving $file"
done

#!/bin/sh

for file in *.png; do
grit $file -ftb -fh! -gTFF00FF -gt -gB8 -m!
echo "Converting $file"
done

for file in *.bin; do
mv -- "$file" "${file%.bin}"
echo "Moving $file"
done

mv *.pal *.img ../../nitrofiles/sprite
Loading

0 comments on commit e445133

Please sign in to comment.