A few months ago I wanted to explain the whole creation process I have in mind with tools deduced from the game's data structures, and then I got lost into real life again, so this time I'll just make a quick list of existing tools and enrich the original post later.
Just one quick detail to make things clear :
These tools are intended to be used on the game's disassembly, not on the ROM directly.
Current and future "low-level" tools may allow to work on ROMs when possible, because handling basic assets is still feasible quite easily, as long as original data length is not exceeded.
However, direct ROM hacking is not flexible enough to handle "high-level" data structure editing.
This is why most future and more complex tools will work exclusively with a disassembly.
Some people may find it harder to use than just hacking a ROM file, but this is well worth the effort.
The sonic hacking community is the best example there is to show how powerful this approach can be.
With the disassembly, anything will be possible. We're the developers now !
Disassembly quick start guide :
1. Get SF2DISASM :
- Get the latest revision with the repository's download link :
(In a near future there may be proper releases here : https://github.com/ShiningForceCentral/SF2DISASM/releases/latest)
- Unzip it anywhere you want
(not sure if space characters in path will work though)
2. Split :
- Put the original US ROM in BIN format (not SMD) in the split/ directory, with the following filename : sf2.bin
- Then run split/split.bat. This may take from a few seconds to around a minute.
This will split the ROM's original data in thousands of tiny binary files in the disasm/ directory.
3. Build :
- Also put sf2.bin into the build/ directory, as a comparison reference for new builds.
- Run build/build.bat. This may take from a few seconds to a few minutes.
This will assemble the game from the content of the disasm/ directory only.
With the original content of disasm/, the resulting ROM file is supposed to be a bit-perfect replica of sf2.bin, hence the comparison at the end of the build to make sure of SF2DISASM's integrity.
When disasm/'s content has been modified, the build will naturally notice differences compared to sf2.bin and you can ignore it.
4. Play with your disassembly !
According to your understanding of how ASM 68K works and how data is organized, you can modify the game's content step by step and see if/how it builds.
Just be aware that extensive modifications (with more content than original content) imply to extend the ROM's layout from a 2MB ROM to a 4MB one, and this involves a bit of ASM hacking which should be covered in a future tutorial, I guess.
SF2TextManager : https://github.com/ShiningForceCentral/SF2TextManager/releases/latest
SF2VWFontManager : https://github.com/ShiningForceCentral/SF2VWFontManager/releases/latest
SF2PaletteManager : https://github.com/ShiningForceCentral/SF2PaletteManager/releases/latest
SF2GraphicsManager : WIP 40% https://github.com/ShiningForceCentral/SF2GraphicsManager
Stack-compressed data decoding/encoding.
Uncompressed data processing. Easy part but good first use case to establish the whole import/export process with a defined PNG format.
Basic-compressed data processing for map sprites.
Implies to use "4 bits per pixel" PNG format with indexed 16-color palette and transparent color at index 0.
Make sure your image editor keeps this color mode when saving, or else PNG import may not work properly.
Nice editor here : http://www.qualibyte.com/pixelformer/
SF2IconManager : https://github.com/ShiningForceCentral/SF2IconManager/releases/latest
- Import icons from ROM or Disassembly
- Export as PNG files
- Edit files with external image editor (make sure original PNG color mode is kept : 4BPP/16-color index with transparent color at index 0)
- You can re-arrange icons by changing their filename index. Just make sure they're all named "iconXXX.png" with decimal value and no missing number between two entries.
- Import PNG files
- Export into ROM or Disassembly
Fun fact :
Can also be used on Shining Force 1 !
SF1 ROM info :
Palette offset : 398C
Icons offset : CF0EA including spells first, or CFCEA for items only.
Icons length : 15552 including spells, or 12480 for items only.
So SF1 and SF2 icons can now be freely edited and/or swapped between each other.
Beware though ! SF1 and SF2 base palettes are different, so swapping can imply some palette tricks.
SF2PaletteManager can help here.
You can also combine the source game's icons file with the destination game's palette file by using the Disassembly import feature.
SF2MapSpriteManager : https://github.com/ShiningForceCentral/SF2MapSpriteManager/releases/latest
I won't take the time to work on making it compatible directly with ROMs as it's not my main target.
However, anybody is free to contribute by adding this feature. The tools' code structure should be clear enough to make it simple to add. Just make sure to manage the whole map sprite pointer table to avoid data overriding !
TODO roadmap with future tools to give a global view of the tool suite architecture.