GithubHelp home page GithubHelp logo

gota7 / sm64dse-ultimate Goto Github PK

View Code? Open in Web Editor NEW
23.0 4.0 16.0 102.58 MB

This is an edited version of sm64dse 2.3.5.

License: GNU General Public License v3.0

C# 88.53% Makefile 0.43% Assembly 0.11% C++ 8.27% C 1.49% RPC 1.17%

sm64dse-ultimate's Introduction

Installation

You can download the latest version from releases section and download the release.zip.

Simply unzip the content in a folder, and launch SM64DSe.exe.

Usage

The SM64DSe editor has 2 usage the traditional through its GUI (Graphical User Interface) or through CLI (Command Line Interface).

๐Ÿ–ผ๏ธ Graphical User Interface

You can simply double click on the SM64DSe.exe file you downloaded, and it will open the interface.

The editor support drag and drop a .nds file.

#๏ธโƒฃ Command Line Interface

The CLI is mainly work in progress as it only support a few elements.

The CLI is aimed to provide tools for developers to

๐Ÿ”จ compile

The compile command aims to provide an easy way to build and insert binaries and overlays from source code.

Currently only the dynamic libraries support insertion. An utility option called TARGET allow you to simply run make in a given folder. This can be useful when running commands in batches.

SM64DSe.exe compile (DL|OVERLAY|TARGET) [SOURCE-CODE] [INTERNAL-PATH]

# flags
+ `--rom` path to the rom (nds format)

+ `--force` force the editor to use the required patch on the rom
+ `--create` if the internal path does not exist, the file will be created, by default it replaces an existing one.
+ `--recursive` if the internal path provided does not exist, create the parent directory.
+ `--env` environment variable to provide to the make command. E.g. `--env SOURCES=code/peach --env INCLUDE=includes` 

# Example

SM64DSe.exe compile DL ./src data/dynamic/peach_npc.dylb --force --create --recursive --rom="./EUROPE.nds"
SM64DSe.exe compile TARGET ./src 

๐Ÿ“ filesystem

The filesystem or in short fs command allows you to interact with the rom's filesystem.

To make the difference between your computer filesystem and the rom filesystem, we use URI (Uniform Resource Identifier) to indicate when a rom filesystem is targeted.

E.g. rom://file/data/message/msg_data_eng.bin is an URI with rom as scheme and file as authority. the remaining path is the internal path of the targeted file/directory.

โš ๏ธ Currently only file authority is supported. Later we could support overlay if some people needs it.

SM64DSe.exe fs ( rm | cp ) [TARGET] [DESTINATION]

# flags
+ `--rom` path to the rom (nds format)
+ `--force` force the editor to use the required patch on the rom
+ `--create` if the internal path does not exist, the file will be created, by default it replaces an existing one.
+ `--recursive` if the internal path provided does not exist, create the parent directory.

# Example

# Copy a local `msg_data_eng.bin` file inside the rom filesystem in `data/message/msg_data_eng.bin `
SM64DSe.exe fs cp ./msg_data_eng.bin rom://file/data/message/msg_data_eng.bin --rom="./EUROPE.nds"
# Delete the rom file data/message/msg_data_eng.bin 
SM64DSe.exe fs rm rom://file/data/message/msg_data_eng.bin --rom="./EUROPE.nds"
# Copy one rom file to another path of the rom
SM64DSe.exe fs cp rom://file/data/message/msg_data_eng.bin rom://file/data/message/msg_data_eng.bin.bak --rom="./EUROPE.nds"

๐Ÿ“˜ generate

The editor is often used to generate headers file for sounds and files. You can do the same using the generate command.

SM64DSe.exe generate ( sound | filesystem ) [OUTPUT]

# flags
+ `--rom` path to the rom (nds format)

# Example

SM64DSe.exe generate filesystem files.h --rom="./EUROPE.nds"
SM64DSe.exe generate sound sound.h --rom="./EUROPE.nds"

๐Ÿ“ฅ insertDLs

The insertDLs command will use already built binaries to generate one or many dynamics libraries and insert them inside the rom filesystem.

SM64DSe.exe insertDLs [BUILD-FOLDER] [TARGETS-FILE]

# flags
+ `--rom` path to the rom (nds format)
+ `--newcode-lo` (Default `newcode_lo`)
+ `--newcode-hi` (Default `newcode_hi`)

+ `--force` force the editor to use the required patch on the rom
+ `--create` if the internal path does not exist, the file will be created, by default it replaces an existing one.
+ `--recursive` if the internal path provided does not exist, create the parent directory.

# Example

SM64DSe.exe insertDLs ./build ./targets.json --newcode-lo=newcode --newcode-hi=newcode1 --rom="./EUROPE.nds"

The options --newcode-lo and --newcode-hi can be used to specify the names of the input files without extensions. The command assumes that each targeted folder contains two .bin files with the given filenames (newcode_lo.bin and newcode_hi.bin by default), and a .sym file with the name specified with --newcode-lo (or newcode_lo.sym by default).

โš ๏ธ The editor will not build the binaries for you, you need to execute make or any building process ahead. This will only combine for each target the existing newcode_lo and newcode_hi in a dynamic library.

The TARGETS-FILE values must point to a text file either plain text or json.

For plain text, the format is per line [directory]: [internal-path]. E.g.

infinite_floor: data/enemy/peach/peach_jump.bca
test_cutscene:  data/enemy/peach/peach_jump_end.bca

For json format, we simply require a dictionnary string: string. E.g.

{"infinite_floor": "data/enemy/peach/peach_jump.bca", "test_cutscene": "data/enemy/peach/peach_jump_end.bca"}

You can find an example in the repository pants64DS/Misc-SM64DS-Patches/dynamic_lib

๐Ÿ“ฆ batches

When dealing with many files, such as assets, dynamics libraries, we want to automatically assemble everything to ease the testing. This CLI allows you to makes it easy to interact with the filesystem of the game. However, having to run several time the CLI can be time consuming, each start having a delay etc.

The batches command is here to speed up this process. Given a text file, on each line a CLI command, the editor will run all of them one by one.

SM64DSe.exe batches [TEXT-FILE]

# flags
+ `--rom` path to the rom (nds format)
+ `--force` force the editor to use the required patch on the rom

Here is an example of the content of a text file that can be provided.

# Support comments ! (this line will not be run)
fs cp ./sound_data.sdat rom://file/data/sound_data.sdat

compile TARGET Code
insertDLs Code/build Code/targets.json --create --recursive

Note

Inside the text file provided, you should not set the --rom flag, as you should provide it with the batches command.

๐Ÿฉน patch

Warning

The .sp2 format is deprecated and hopefully will be removed from the editor soon.

The patch command is used to execute a .sp2 file containing instructions.

SM64DSe.exe patch [SP2-FILE]

# flags
+ `--rom` path to the rom (nds format)

When dealing with vanilla ROM, the default behavior of the CLI is to exit the program, as it will not edit vanilla rom by default. 
You can force the editor to install the required patch for vanilla rom to be edited using the following flag.

+ `--force` force the editor to use the required patch on the rom

Lean more about the .sp2 format in Documentation/SP2.

sm64dse-ultimate's People

Contributors

axel7083 avatar fiachra1993 avatar floralzalz avatar gota7 avatar jupahe64 avatar pants64ds avatar splattyds avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

sm64dse-ultimate's Issues

Discussion: Message ID to Sign table

Description

The Sign, does not use the Message ID to select which message to display.
There is a Mapping table for object message ids (parameter of the objects) to object message ids (the ones in the text editor).

A lot of element does not have a match corresponding in the text editor. Which makes it very weird.
I was hopping to have a clear match between the Sign first parameter value and the text. But sometime I can't found the matching correspondance in the table

Some weird sign I do not understand the mapping:

Location Parameter 1 message ID
image 0x73E 0x006A (I changed the message value from the editor)

Extracted and formatted table

This table is located at 0x0208eeec, it seems to be a table of short with a size of 196.

object ID message ID
0x0000 0x0000 (Dear Mario:\nPlease c...)
0x6400 0x0004 (Yoshi!...)
0x7800 0x000d (Oh!...)
0x8200 0x0016 (Oh!...)
0xc800 0x0017 (You need a key to \no...)
0xe803 0x002a (BEWARE OF CHAIN-CHOM...)
0x1a04 0x0033 (I'm sleeping because...)
0x4c04 0x0038 (ATTENTION! \nRead Bef...)
0x7e04 0x003b (Warning!\nCold, Cold ...)
0xb004 0x003e (You don't stand a gh...)
0xe204 0x0040 (Both ways fraught wi...)
0x1405 0x004c (It's Lethal Lava Lan...)
0x4605 0x004d (Watch out! Don't let...)
0x7805 0x004f (empty)
0xaa05 0x0050 (BRRR! Frostbite Dang...)
0xdc05 0x0052 (The mystery is of We...)
0x0e06 0x0053 (STRONG WIND!\nHold on...)
0x4006 0x0054 (It's not our problem...)
0x7206 0x0056 (empty)
0xa406 0x0057 (empty)
0xd606 0x0058 (Watch out for \nBowse...)
0x0807 0x005c (Princess Toadstool's...)
0x3a07 0x0066 (Pssst! The Boos are ...)
0xd007 0x0083 (In Standard Mode, pr...)
0xd107 0x0087 (You there, sir.\nWatc...)
0xd207 0x008b (Danger! We're in the...)
0xd307 0x008f (Thank you! The Big \n...)
0xdb07 0x009a (I'm the Big Bob-omb,...)
0xdc07 0x009e (Ow! That hurts! How ...)
0x0208 0x00a2 (That was such a good...)
0x3408 0x00a6 (No! Crushed again!\nI...)
0x6608 0x00a7 (empty)
0x7308 0x00b3 (Ayiiieee! Please don...)
0x9808 0x00b4 (So it IS true that \n...)
0xca08 0x00b6 (Boooooo-m! Here come...)
0xfc08 0x00b7 (empty)
0x2e09 0x00b8 (empty)
0x6009 0x00ba (Grrrrumbbble!\nWhat.....)
0x9209 0x00bb (empty)
0xc409 0x00bc (Hey! \nWho's there?\nW...)
0xf609 0x00bd (empty)
0x280a 0x00c4 (Uukee-kee! Don't eat...)
0x5a0a 0x00ca (Owwch! Uncle! Uncle!...)
0x8c0a 0x00cb (empty)
0xbe0a 0x00cc (empty)
0xc60a 0x00d7 (Bwa ha ha!\nI'm no or...)
0xc70a 0x00db (Beaten by a pip-sque...)
0xc80a 0x00df (empty)
0xc90a 0x00e3 (empty)
0xca0a 0x00e7 (Hmm? I see you have ...)
0xcb0a 0x00eb (I simply cannot beli...)
0xf00a 0x00ec (Eee hee hee...\nI am ...)
0xf10a 0x00f0 (Thank heavens you \nc...)
0xf20a 0x00f4 (The Star you chose a...)
0xf30a 0x00f8 (Bowser took all the ...)
0xf40a 0x00fc (Wow! You've recovere...)
0xf50a 0x0100 (Thank you, Yoshi!\nTh...)
0xf60a 0x0104 (You don't normally w...)
0xf70a 0x0108 (That dinosaur-skin l...)
0xf80a 0x010c (Wow! Look at all tho...)
0xf90a 0x0110 (Wow! Look at all tho...)
0xfa0a 0x0114 (You've finally corne...)
0xfb0a 0x0118 (You've got Bowser\nco...)
0xff0a 0x011f (Noooo! Don't eat me!...)
0x000b 0x0123 (What part of โ€I'm no...)
0x010b 0x0127 (Aaaargh!\nOh no, plea...)
0x020b 0x012b (I already gave you t...)
0x070b 0x0133 (Oh, no! Oh, no!\nI lo...)
0x130b 0x0142 (Yoshi! Mario and the...)
0x220b 0x014a (You got the key to\nt...)
0x270b 0x0152 (Looks like red caps ...)
0x280b 0x0156 (Green caps are all t...)
0x290b 0x015a (Yellow caps are real...)
0xb80b 0x0160 (Awesome!\nYou've coll...)
0xea0b 0x0161 (Chasing Mario led yo...)
0x1c0c 0x0162 (Hello! The Lakitu Br...)
0x4e0c 0x0163 (empty)
0x800c 0x0164 (Snow Mountain Summit...)
0xb20c 0x0167 (Luigi... Luigi......)
0xe40c 0x0168 (empty)
0x160d 0x0169 (Don't be a pushover!...)
0x480d 0x016a (empty)
0x7a0d 0x016b (empty)
0xac0d 0x016c (empty)
0xde0d 0x016d (empty)
0x100e 0x016e (empty)
0x420e 0x016f (empty)
0x740e 0x0170 (empty)
0xa60e 0x0171 (empty)
0xd80e 0x0175 (empty)
0x0a0f 0x0183 (Uh-oh. Looks like th...)
0x1e0f 0x018d (You've retrieved the...)
0x8813 0x0196 (While searching for ...)
0xb013 0x01b3 ( THE SECRET OF BAT...)
0xec13 0x01b4 ( CASTLE SECRET STA...)
0x7017 0x0224 (The door to the thir...)
0x581b 0x024e (Shell Smash\n\nHit Koo...)
0x401f 0x0276 (All Rights,\nincludin...)

Cannot export text box width and height with rest of game text data.

When exporting the game's text to an XML file using the text editor, each block of text along with its internal ID is included in the resulting XML file, but the width and height of each text box is not, despite them being viewable in the text editor. I would like the width and height to be included in the exported XML file along with the rest of the text data.

Misleading Texture Size Warning

If your textures take too much space, SM64DSe will give you a warning saying that your model probably won't work in-game. The thing is, a lot of the time, you can just ignore the warning and it'll work just fine. Oops.

Several menu options are broken in latest SM64DSe release

  1. The Additional Patches menu doesn't work due to a missing AdditonalPatches.xml file.
  2. Decompress Overlays Within Game now causes an error saying that the ROM is being used by a different process and also corrupts the entire ROM.
  3. Toggle Suitability for NSMBe ASM Patching does nothing but break compatibility with MelonDS and several ROM flashcarts and should honestly be removed as NSMBe no longer requires patched ROMs to apply ASM patches anyway.

All of these broken options should really be either fixed or removed to prevent new users from accidentally corrupting their ROMs.

Mario Model Switch Bug

Mario's model occasionally gets switched with other models. The issue is fairly frequent, but I do not know how to reproduce it consistently. Screenshots TBA.

DAE Importing is Glitchy

Sometimes it works, sometimes it errors. I'm sure everyone has already experienced this at some point with SM64DSe, but I'll still post example DAE files when I get some.

Issues When Opening Certain Roms Patched with Older Versions of SM64DSe

To be more precise, Super Mario Star Land and Super Mario the New Beginning. Starting with SM64DSe 2.3.2, opening them in SM64DSe will ask you to re-patch them. Doing so will fail completely in the case of Super Mario the New Beginning or cause graphical glitches in the case of Super Mario Star Land (screenshot below).
YoshiTongue

SM64DSe-Ultimate dont work with rom with patched arm9.bih

Hi, I'm working on translation for SM64DS and need to patch font table on arm9.bin.
After patching SM64DSe-Ultimate asks about making backup before patching and crashes. Is possible to fix it?
Or maybe I can patch arm9.bin directly from SM64DSe?

Mario's Holiday Doesn't Open

This is because SKELUX broke the rom's FNT by replacing the first four bytes of it with HACK (0x4841434B), which makes it impossible to open in every DS game editor.
The offset to the FNT can be found at 0x40 in the rom's header. It is four bytes long.

Additionally, the first 16 bytes of the rom's header have been modified. This has the effect of making the rom unopenable in SM64DSe because SM64DSe checks if a rom is SM64DS by checking the header. Finding a better way to check would fix this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.