Sunday, July 28, 2013
Thursday, July 25, 2013
God damnit, Secret of Mana.
So to determine the right collision state for a map, now I have to pick through all the doors leading to it, and see what the value of this bit is.
Edit: I ran a quick loop, and there are no two doors leading to the same map with different collision flags. Why the fuck store this on the door then, when it's clearly a property of the target map. Another thing for me to move to make everything properly editable...
Oh, and on a completely unrelated note, as a child I always thought there was something secret in this door in Northtown that I could never figure out how to get to:
Turns out, there isn't even a trigger on that spot. More disappointment.
Wednesday, July 24, 2013
Positionable Composite Map Triggers
Waterfall maps work fine... I can play to Potos and kill the Mantis Ant.
Potos Inn takes me to Northtown.
Huh. Close enough?
Edit: Found what's causing this. Fix tomorrow.
Saturday, July 20, 2013
Build 0210
- Change "Doors" checkbox to "Triggers" on Composite Map Editor.
- Fix issues with display of Tileset 8 flags.
- Add checkbox to view 3BPP tiles as second half of palette in
raw tiles editor.
- Add/implement some new edit linkages between tileset screens.
- Fix issue where flipping to the Tileset16 editor from the
composite map editor would not update the selected tile16 index
and such correctly until you clicked on them.
https://dl.dropboxusercontent.com/u/19968993/som/FileListing.html
https://dl.dropboxusercontent.com/u/19968993/som/build%200210/somedit0210.rar
https://dl.dropboxusercontent.com/u/19968993/som/release_notes.txt
Friday, July 19, 2013
Build 0209
- Fix failure to update scrollbar size for events list when window resizes.
- Implement File->Exit that for a long time did nothing. Oops.
- Fix issue where spamming the mousewheel on the event editor would crash
the application under Windows 7.
- Fix issue where scrollable area less than the size of the scrollbar would
sit at the bottom/right instead of top/left.
- Fix issue where map piece width/height were not adjustable.
https://dl.dropboxusercontent.com/u/19968993/som/FileListing.html
https://dl.dropboxusercontent.com/u/19968993/som/build%200209/somedit0209.rar
https://dl.dropboxusercontent.com/u/19968993/som/release_notes.txt
Thursday, July 18, 2013
Build 0208
- Fix some exceptions when changing tilesets on map pieces editor.
- Remove outdated event editor options and add option to show dialogue
and non-dialogue events with either in-game font or Courier New.
- Change sprite exception that comes up often for non-working sprites
to a debug log message so it stops spamming the messages area.
- Fix exception if trying to "Open in another window" with nothing
selected.
- Tweak handling of horizontal scrollbar for music view; it should be
a little more accurate now.
- Fix positioning of text on samples screen about how sound effects samples
don't work yet.
https://dl.dropboxusercontent.com/u/19968993/som/FileListing.html
https://dl.dropboxusercontent.com/u/19968993/som/build%200208/somedit0208.rar
https://dl.dropboxusercontent.com/u/19968993/som/release_notes.txt
Build 0207
- Fix miscalculation of code size for modified trigger data.
- Fix issue where clicking a trigger would throw an exception.
- Fix incorrect calculation of scrollbar maximums for composite maps.
https://dl.dropboxusercontent.com/u/19968993/som/FileListing.html
https://dl.dropboxusercontent.com/u/19968993/som/build%200207/somedit0207.rar
https://dl.dropboxusercontent.com/u/19968993/som/release_notes.txt
To the guy who's having .NET problems, here's a link to a map editor app I wrote for a lesser-known MMORPG that I play called Darkages. It won't fully function without the game's data files, but it should open to a big white screen with some controls and a title that is a random Mitch Hedberg quote. Does this one run for you?
https://dl.dropboxusercontent.com/u/19968993/som/MapEditor.exe
Tuesday, July 16, 2013
Build 0206
- Add options for detailed debug logging in somedit config.
Detailed logging added for music and map pieces for now.
- Fix bug that caused music to overwrite part of the world map.
- Fix bug that caused an audio glitch in the town theme.
- Fix bug in event editor where closing the popup with the "X"
instead of the cancel button caused problems.
- Fix bug that caused unknown/raw event editor to throw exceptions
a lot when you cycle through the type.
https://dl.dropboxusercontent.com/u/19968993/som/FileListing.html
https://dl.dropboxusercontent.com/u/19968993/som/build%200206/somedit0206.rar
https://dl.dropboxusercontent.com/u/19968993/som/release_notes.txt
Next up: refactoring how they store their triggers. These are the spots on a map that cause things to happen, like door transitions, or events. Right now it's 2 bytes each, with a flag for whether it's a door or an event, then the index for which one. There is no x or y. The position is determined by seeking all the way down the map, looking for tiles of a certain type, and placing the triggers one by one in the map load routine. This is accomplished by changing the tile value to 0xC0 (the upper limit of actual tile values) through 0xFF. If you step on a tile with a value >= 0xC0, it executes the trigger (value - 0xC0). Why anyone thought this would all be a good idea or how they designed their maps under a system like this are beyond me.
The new plan is to expand triggers from 2 bytes each to 4 bytes each, with a new x and y value for each. The existing loop over every tile will be removed, and replaced with a loop over every trigger, that will simply write the trigger 0xC0+ marker value as it is now at the associated x,y based on the two new bytes. Everything else should work the same as it does now after that point.
This should make map editing a lot easier, since you can just place triggers wherever the hell you want.
Monday, July 15, 2013
Music problems
Should be fixed soon for the next build~
Edit: fixed, the value I was writing for the total song length was off by 20, the header size.
The only thing I've noticed wrong in the music now is there's one bad note in the town theme right after the loop point. That problem's been around for a long time, but I'd like to fix it already. Think it's just slightly incorrect handling of their looping.. causes one note to be off by one octave. You can hear it in the editor playback too.
Edit: fixed that too. Release soon.
Sunday, July 14, 2013
Debug logging
By default, it puts =no for each of these in the config file, so it's just a matter of switching them to "yes" to see what you want. Not everything is logged yet (map decompression, and as of recently, music processing, are logged pretty well so far). The ones that are, are logged in great detail (byte by byte) and slow things down considerably, so I'd recommend keeping them all off unless you need them. They are intended to be enabled only if the editor is corrupting your ROM and we need to figure out why.
None of them will do anything if you don't use the command-line parameter.
Music is still an issue. It's being worked on for the next build. Don't use the music editor for now, you'll screw up your world map.
Friday, July 5, 2013
Future things
Here is a list of things I plan to work on in the future, in-order. Mostly for my own reference since my memory is shitty, but feel free to vote things up or down. Will be edited as it changes.
- Bugfixes as they come up
- Usability/UI improvements
- Rewriting their trigger handling code to allow them to be placed at a specific location, rather than automatically on certain tile types. This should make maps a lot more "editable."
- Handling of European roms and DTE in general. Maybe Japanese rom as well.
- Other misc numeric data editing like enemy stats
- Map bugfixes, like figuring out what's up with map 256, animation (and palette change) handling, and various minor rendering issues
- Automated fixes for some current in-game annoyances, like computer-controlled P2 and P3 getting stuck on shit.
- Ensure roms work on more strict emulation systems than ZSNES and Snex9x, and give the option of writing back the new CRC so you don't get "bad rom" when loading.
- An option to generate an IPS patch file.
- Menu graphic editing and various other little in-game graphics
- Boss graphic editing
- Spell sprite editing (this is already sort of halfway done)
- Weapon sprite editing
- Remapping SPC RAM to allow songs and samples to be more "expandable"; also allow samples to be dynamically resized. Currently, a song that is slightly longer than the mana beast theme (the largest existing song, and apparent basis for their current allocations) will simply not play correctly.
- MIDI importer improvements
- Figuring out what's up with the title screen scrollytext, and why adding lines to it causes graphical glitches. Chances are there are just some timing settings that need to be adjusted.
- Enemy AI table editing
- Boss AI table editing
- Sprite animation editing
- Allow adding elements beyond current maximums. For example, if you wanted to keep all the current maps, but just add new places. This will include some serious code mods for certain things (events, maps) since many references to these elements are tightly-sized based on the current maximums (11-bit event IDs, for example). These will probably take some time. Other things (like character exp levels & associated stats) may be easier to extend.
- Sound effects editing
- Title screen tree graphic editing. Importing new JPEGs and such.
- Editor text translations (I'd prefer this be done after I get a majority of the features in, so it only really has to be done once. I don't speak anything but English, so I either have to use the one of the generally-shitty automated options, or have someone do it for me)
- ExHIROM test/debugging. It will currently try to do this conversion if you exceed 4 MB of rom data, but it really hasn't been tested very much yet.
Things I don't really plan to ever deal with, but if you want to work on them, do feel free:
- Having more than three main characters. I am expecting the memory reallocation (RAM, ROM, and Saveram) and code changes associated with this to be way more trouble than it's worth. MAYBE having only 3 in the party at the time but having them swappable (like Chrono Trigger, for example) would eventually be doable.
- Along similar lines, the ability to have more than 3 enemies onscreen at once, though this is probably easier than > 3 main characters.
- I always thought it would be nice if I could borrow Tales of Phantasia's system for streaming SPC samples in and out of the SPC700's unfortunately-small memory on demand (they use this to play a fully-vocalized song, for example), but to say that I don't want to deal with all the changes that would be involved with this is quite an understatement.
Tuesday, July 2, 2013
Next up
Also fixing problems as people report them. I'm not really using this thing beyond briefly testing new changes so I'm relying on you guys to report broken stuff.
Monday, July 1, 2013
Build 0205
Debug logging is disabled by default. To enable debug logging, pass "debuglogging" as a parameter on the command-line. It should write to a log file in the same directory.
If you don't know how to do this, make a new text file in the same directory as the EXE, and in it put:
"someditc debuglogging"
Name it someditWithLogging.bat and run it instead of someditc.exe.
Logging is the first thing I set up, so if you don't see ANY logging, then you probably have issues with the .NET runtimes.
I also added a little more information to the events help page.
https://dl.dropboxusercontent.com/u/19968993/som/FileListing.html
https://dl.dropboxusercontent.com/u/19968993/som/build%200205/somedit0205.rar
https://dl.dropboxusercontent.com/u/19968993/som/release_notes.txt
Sunday, June 30, 2013
Oh shit, another one
https://dl.dropboxusercontent.com/u/19968993/som/FileListing.html
https://dl.dropboxusercontent.com/u/19968993/som/build%200204/somedit0204.rar
https://dl.dropboxusercontent.com/u/19968993/som/release_notes.txt
Saturday, June 29, 2013
Build 0203
Release listing:
https://dl.dropboxusercontent.com/u/19968993/som/FileListing.html
Latest release:
https://dl.dropboxusercontent.com/u/19968993/som/build%200203/somedit0203.rar
Release notes:
https://dl.dropboxusercontent.com/u/19968993/som/release_notes.txt
I dropped some red labels on all the parts that aren't editable/saveable yet. These will probably be worked on soon.
Report broken things here, or at ACMLM.
Sprite Swapping
Here are rabites modified to have the sprite frame and tile settings of mushbooms.
Friday, June 28, 2013
Sprites
That's the normal standing sprite modified to include a mirror of itself.
That means it's almost time for a release once I clean some stuff up a little bit.
Wednesday, June 26, 2013
Help Pages
I ended up just using the standard RichTextBox control with embedded RTF files. These are large, bloated files, so I embed them gzipped, and unzip & display them as they're requested. Seems to work, so we're going with this for now.
Edit: I can make links between them as well.
Tuesday, June 25, 2013
Minor update
Next up is the character sprite data (again, not bosses yet, since with the exception of the Mantis Ant those don't even read in properly) and maybe after that I'll drop a release, since I've added a bunch of shit since the last one.
I wanted to add an in-editor help feature as well, but I'm having trouble finding a good format to do it in. HTML was my first idea, except that referencing embedded images from embedded HTML seems to be impossible, and I prefer to have things wrapped up in the binary when possible.
Saturday, June 22, 2013
More title screen stuff
This one was a bit of a pain, because to make it variable-length and not give myself a huge hassle on the rest of the data in this block, I had to move it to the end. It's also stored with a few other strings like the four credits that fade in and out, and those had to be moved with it since the same code is used to load all of them.
Adding lines to this thing "works" but has issues. Not sure why yet.
Edit: "issues":
I think all that's left is making those pink birds editable, and the tree graphic. Tree graphic comes later.
Friday, June 21, 2013
Title screen palette
This turned out to be one of those situations where I have no idea why they did what they did.
Changing the palette worked fine until I noticed part of it just magically reverted itself a little way through the title screen. Turns out to achieve the text fading and transparency effects they do with the text that rolls across the screen, they keep about a million fucking modified copies of four of the palette's colors, and swap them in and out over time. Once I picked through all of this and started generating all of these in the ROM export, everything was good.
Triple compression on this thing. Compressed tiles, referenced by a compressed block of data that lays them out, all processed by a compressed block of code, and then they throw this giant table of colors in here, presumably to.. make up for the space saved by compressing the whole thing, I guess. Sigh. Whatever, it works now.
Wednesday, June 19, 2013
Title screen arrangement
Editing these things is pretty time-consuming at the moment, but oh well. At least it works. I'll work on a better interface later.
Monday, June 17, 2013
More things working
LZ77 recompression working. This is used for these graphics, the assembly data of these graphics into their title screen formations (oddly), parts of the boss graphics, and probably some others, so this crosses a bunch of shit off my list.
JPEG tree graphic not recompressable yet. That's going to be a big pain, and I'm leaving that for very last.
Sunday, June 9, 2013
Event Editor
Edit: a bunch less exceptions now. Editing events works better. I also added the ability to insert dialogue characters you generally don't have a keyboard key for:
Friday, March 1, 2013
Scrollbars
Oh, and you can use the mouse wheel to scroll through them now.
I'd sort of like to implement a click & pull for panning around composite maps as well.
Monday, February 25, 2013
More sprite stuff.
It's not terribly pretty looking yet, but for now, it works, and I've been trying to put in a lot of search-type stuff to make it easier to use.
Sunday, February 10, 2013
Character Sprites
Sprite animations (at least for characters) won't be edit-able for a while, because as big a mess as the sprite constructions are, the animations are on another level entirely.
Next Build
Spell, enemy, weapon, armor character stats and ring menu tiles will probably be editable. Spell graphics won't yet for the next one; they have too many issues still.
I'm also working on the character sprite stuff. Character tiles and sprite formations (maybe) should be editable. Animation data will not yet. Jesus that stuff is a mess.
Bosses? Maybe. I have to write a tile recompression routine for them still.
Title screen stuff won't be for a bit still. Sound effects too.
I also fixed that bug where you can't make new objects on a map.
Thursday, January 31, 2013
Spell Sprites
Five-color images again like the ring menu icons... I do not know why.
Tuesday, January 29, 2013
Monday, January 28, 2013
Map Flags
Implemented editing for a couple settings for composite maps last night - whether flammie is available on the map, and whether the magic rope is available. There are only a couple "unknowns" of these flags left, then composite map processing should be pretty well done.
The way the magic rope works is when you transition from a map where it's not available to one where it is, it saves off the ID of the door you went through. If you transition back to a no-rope map, it wipes it out. When you use the rope, it transitions through the saved-off door if it's non-zero. This has some weird side effects for indoor sections where you can't use it--for example, walk into the right side of gaia's navel then down into dwarf town.. using the rope takes you back up to gaia's navel, as you'd expect. But walk back down and through the first door into the gnome palace (the first room of which disallows magic rope) then back out, and suddenly that's your new magic rope warp point.
Sunday, January 27, 2013
Enemy Stats Editor
Saturday, January 26, 2013
Ring Menu stuff
Friday, January 25, 2013
Numeric Stuff
Wednesday, January 23, 2013
Build 0202
https://dl.dropbox.com/u/19968993/som/build%200202/somedit0202.rar
A few bugfixes, special events for maps, and I now list known bugs/to-do at the top of the release notes.
Release notes:
******************
*** build 0202 ***
******************
- Process "Special events" for maps. This fixes inconsistent trigger
lists with a number of maps (248, 265, 17) and allows you to edit
what happens when you step on a "special event" tile.
- Fix size of right tab on composite maps view when collapsing then
restoring it.
- Add collision types for the partially destroyed crystal things in the
mana fort interior.
- Fixed issue where loading a new file would.. merge the fonts from the
two files together.
- Clear the display and close all secondary windows when loading a new
file to avoid keeping stale data up.
- Fixed issue where loading another project would continue to add more
tiles, tilesets, and palettes on top of the ones from the previous
project.
- Fixed issue where sound effects samples weren't clearing out properly
for a new load.
- If you go to create a new project, then cancel the first dialog, it
will no longer open the second one.
Triggers & Map Special Events
Tuesday, January 22, 2013
Doors
0201 has bugs with how it detects and matches these together. Working on fixing this. Map 248 is an example of where it's way off - I'm counting double for multiple map pieces with door tiles placed on top of each other - this is part of the problem.
Edit: it looks like some maps (like 248) are also flagged with a second "special" event (like the map walk-on event that I already process) that is throwing off the count. These are being processed now and most of the counts are looking okay, but I still don't know what the fuck this event is or how/when it's processed. Map 265 one has one that triggers the event where the girl joins you (Event 188), but this is a multi-room map, and I'm not sure yet how they make it only execute for entering through the one doorway.
Sunday, January 20, 2013
Build 0201
https://dl.dropbox.com/u/19968993/som/build%200201/somedit0201.rar
Let me know if you find any problems. I'm aware of most of the minor stuff and it will get fixed eventually. It should crash much less than the old one (or never? Let's go with never.)
Release notes:
******************
*** build 0201 ***
******************
- You can now pass a .som project as a command-line argument, and it will
open it (ie, associate the filetype in windows)
- Added a collapse/expand button to the left-side tree.
- Title screen tree graphic and organization of the logos and such are
loading, finally. Curious whose bright idea it was to use JPEG
compression for that tree graphic and spend 20-30 seconds decompressing
it. Later I'll make it so you can import your own and compress it back;
it's just for show for now.
- Add graph and function input for character stats editor.
- Add an "Edit" palette button on the Tileset16 screen.
- Add collision type for those little crystals in the mana fort that you
have to slash a few times.
- Fix minor hex/dec conversion issue with finding referencing events from
the door editor screen.
- Preliminary support for exporting to a 6 MB ExHiRom ROM (a la Tales of
Phantasia). This includes a number of SOM code mods that have probably
not been tested thoroughly enough. Will only happen if your ROM requires
between 4 and 6 MB of space. Also, it only expands as necessary now (not
at all if you added nothing, to 3 MB, then to 4 MB, then to 6.)
- Add menu item for exporting an IPS patch, which is not yet implemented.
- Preliminary loading of sound effects, but these aren't editable yet.
Before audio is fully editable/expandable/whatnot I need to do a bit
of a re-org of how they store stuff in SPC700 memory.
- Add ability to pull a section off into another window so you can work
with two related sections side by side.
- MIDI importer improvements; still not wonderful, but getting closer to
what I want.
- Fix an issue where the tileset editor wouldn't let you edit foreground
tiles.
- Preliminary support for sprite loading. Some sprites render properly
on maps. Most bosses (Except Mantis Ant, who was my test subject for
boss tile decompression) do not yet. Composite maps may show exceptions
for displaying some sprites - these should not crash or otherwise affect
stability.. debug-only.
- Complete rewrite of map editors.. should be much faster and more
stable now. Removed OpenGL components. Should no longer depend on
OpenTK DLLs.
- Fix bug where map piece filtering for the initial map (128) would be
blank until you switch maps.
- Fix object directions - up and down were swapped.
- More convenience shortcuts on various components.
- Allow changing direction and "mobile" flag of objects.
- Update selection in tileset view when eyedropper used to pick a tile
from a map piece.
- Fix bug where map filtering wouldn't work correctly when flipping
through maps.
Known issues:
- Having issues getting the right scrolling range on the scrollbars I use
on stuff like the map editors and the music editor.
- As mentioned, many sprites do not look right yet.
Stats!
Some minor cleanup and build 0201 should be on its way.
Saturday, January 19, 2013
Release
Wait, is anyone even still interested in these things?
Friday, January 18, 2013
Map piece editing
Thursday, January 17, 2013
Multi-window editing
Menus missing in the screenshots (like "Music" on the music editor window), but they're there now.
Wednesday, January 16, 2013
Composite Map Rendering/Editing
.. and fixed a bug where apparently you couldn't edit the foreground section of tilesets. Lovely.
Tuesday, January 15, 2013
Extended Hirom
Probably still some crashes in it that I didn't get to test. This will go into some build of the editor in the near future... to be used only if the data you're trying to write exceeds 4 MB (and doesn't exceed 6 MB, in which case I can't fucking help you.)
I guess there's some extended format that supports 8 MB as well, but it sounds like it's largely unsupported by emulators (did any game actually use it? I get the feeling Tales of Phantasia is the only reason anyone bothers to support the 6 MB one..)
Saturday, January 12, 2013
More stuff.
As for the ExHiRom patching, it's giving me an excuse to play through the game again (it's actually been a long time) to fix where it still crashes. I'm at Matango, as you may have guessed from the gif. It's pretty stable so far and low on non-catastrophic glitches. The only one I've noticed is some palleting issues with layer 3 (also visible in the gif) but I think this might just be a Snes9x issue.
Friday, January 11, 2013
ExHiRom
The addressing for SNES addresses C0xxxx-FFxxxx (HiRom ROM range, and typically how HiRom code accesses ROM) is the same, but it varies for the range (00xxxx-3F0000), which under HiRom points to ROM, but in ExHiRom points to the upper portion of the ROM (see http://slack.net/~ant/old/info/snes_super_flash_cart_64m.txt).
SOM, of course, is littered with code that jumps to 01xxxx, 02xxxx, etc - so either I patch this code (replacing 01xxxx with C1xxxx, etc), or copy a bunch of it to the 4xxxxx range (which is a waste of space that I'd rather avoid).
FuSoYa's expansion tool looks like it copies the ROM from 008xxx to the 408xxx range (to avoid such problems for 16-bit addressing?) but why does it not surprise me that SOM is actually calling out these types of addresses as 24-bit in some of the code... and using HiRom-style Cxxxxx, Dxxxxx etc in other parts of the code. Meh.
Edit: So far, 64 24-bit address references changed in SomExHi.smc, and I've managed to get the game to play up until you fall down the waterfall, at which point it crashes. Getting this to work for all code paths is going to be a long process.
Thursday, January 10, 2013
ROM file sizes
Sound Effects
Not sure how the sampling works for them yet, but the music samples start at 0x20, so I'd have to imagine 00 through 1F are reserved for these. There are 5F3 bytes loaded into SPC RAM at 0x4800 from 31AE2 in the ROM, that appear directly before the music samples (which are swapped in and out dynamically as songs are loaded, whereas this block is loaded on game startup along with the effects themselves) -- I'd guess this block has the samples I'm looking for.
Wednesday, January 9, 2013
SPC Stuff
Looks like the DSP code runs until SPC address x4DF1, so I have about 70% of the RAM (45K) left to play with for samples and music data.
Edit: Meh, on second glance, the music data sits at 1A00, and runs until 2C00, between two blocks of code. Some of the larger songs (like the mana beast fight theme) take up almost this entire block. I'm going to have to do some reorganizing before longer songs are doable.
Edit2: Ah ha; the 2C00 block that appears after the music data (from C32137 in the ROM) seems to be the sound effects, something I hadn't found much on until now. Nice I guess, but moving it elsewhere would be nice... optimally I'd stick that stuff at 1A00, followed by the music, followed by the samples (which currently start at 4DF1 and run through pretty much the rest of the SPC RAM), that way all the dynamic stuff is in one big block, and I can shift it around as I please. I'm pretty sure all the static stuff (code, and presumably the sound effects) gets uploaded once when the game starts then never again. Music is also tricky because all of the offsets and jumps it uses are 16-bit ROM addresses, so I'm guessing it applies some static offset (like 1A00) to them to figure out where in SPC RAM to actually jump.
Kind of wish I had Tales of Phantasia's code that streams samples in and out as needed. That would be a hell of a project to import...
Tuesday, January 8, 2013
Trying to catch up
Lots of stuff still needs finishing and improvement. I've been touching up the MIDI importer, which has always worked like shit at best.