Sunday, July 28, 2013

Music stuff

This should be an amusing experiment, when I get around to it.


Thursday, July 25, 2013

God damnit, Secret of Mana.

So, I figured out the reason map 258's collisions look wrong.  Some maps are set to use layer 2 for collision data instead of layer 1.  This is all well and good, except the bit that controls this isn't on the map, it's on the DOOR LEADING IN.  So theoretically, a map could have either state.  I'm hoping none do, because the collision data is what's originally used to determine where doors are.

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

The first draft of this is in, with a few hundred new bytes of som-code generated by the editor if you change the composite maps.  Triggers can now be placed freely, rather than dealing with tile types.  After hours of crashing, it plays smoothly now and behaves at least somewhat like the original.

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

More things.

 - 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

Goddamn mouse wheel.

 - 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

A few more minor fixes.

 - 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

Fixing stuff as I find it.  Trigger refactoring stuff is not in this build.

 - 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

Includes the following:

 - 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

Music data is no longer overwriting the world map tiles, but there are still some minor problems.  Loop points sound a little funky, and sometimes the song just continues into other songs at the end.  I suspect I'm off by a little in the song/channel lengths that I store, and it's just continuing on to shit in SPC RAM that was there from a previous song.

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

There are logging options for more detailed debugging now.  If you pass "debuglogging" on the command-line (to enable all file logging) it will pull data from the properties file to determine which types of log messages you want to see.  For example, if you want music debugging, put debugLogging.music=yes in the properties file, and next time you run, you'll get a shitload of music data in the log.

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

User interface/usability updates.  The title screen editor needs at least a copy/paste or something.

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

This one has debug logging.  If it won't start for you, give me the last line that shows up in the somedit.log, and we'll figure out what's going on.

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

Saturday, June 29, 2013

Build 0203

Here's a new release with some random new stuff, some working, some not.

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

I'm actually surprised this worked as well as it did.

Here are rabites modified to have the sprite frame and tile settings of mushbooms.



Friday, June 28, 2013

Sprites

This hasn't been fully tested, but sprites (and their graphics) are now exporting back to ROM:






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

Okay, after a couple hours of fucking around with a bunch of open source things that didn't quite do what I wanted, I've got something simple that works.


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

Character/enemy tiles (except for bosses, yet) and their palettes can be written back to the ROM.  Like most things, the editor interface is not great yet, and I'll probably end up adding some sort of export/import to/from BMP/GIF/PNG feature.  I guess when you import them it will just have to match against the closest color of the palette you're currently displaying with, or maintain indexes in a paletted file (like a GIF).  Maybe in the end you could color it however you want and it would convert your colors into a new palette (assuming you use less than 16).  I guess I can play around with this later to see what's most useful.

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

One thing at a time.  Almost got everything editable now!


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

Man, who would have thought the palette would have been the bitch part of this.






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

Well, this works now too.



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

Still working on making various shitty things less shitty.  Event Editor currently takes the cake.

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

Working on making them less shitty.  The arrows at the ends work now for example.

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.

For the most part, editing works now.  Just need to implement writing stuff to the project and the ROM.

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

Trying to make the ever-overlapping clusterfuck that is character sprites as easy to edit and search through as possible.


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

It won't be for a bit still.  I've got a lot of half-finished shit that I'm working on.

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

More sprites

Sprites are loading somewhat better today.  Here's level 0 Freeze.


Spell Sprites

Spell effect sprites are loading and rendering in their simplest form.  Needs work though.  Here's a debug shot of level 0 earth slide's first frame. 

Five-color images again like the ring menu icons... I do not know why.


Tuesday, January 29, 2013

Spell Editor

The graphics don't load yet, but at least the stats and icons do.

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

Anonymous Comments

You should be able to post without a blogspot account now.

Enemy Stats Editor

Updating this broken thing, too.  May as well make all these stat-editing things work for the next build.

Saturday, January 26, 2013

Ring Menu stuff

The editor for these icons and their many strange five-color palettes will also be in the next release.


Weapon Editor

First rev of weapon editor


and apparently this ring blocks a bunch of conditions.


Friday, January 25, 2013

Numeric Stuff

Adding support for easy numeric stuff that's been documented for a long time anyway (like weapon/armor stats) before I start dealing with sprites and animations again.  I accidentally left the sprite editor selectable in Build 0202 - you can see what a mess they are at present.

Wednesday, January 23, 2013

Build 0202

http://dl.dropbox.com/u/19968993/som/FileListing.html
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

Ah ha.. the second "special event" for a map seems to be what happens what you step on a particular tile type.  The map I spoke of, in Pandora, has three of these lined up where you walk through to trigger the event.  It's more commonly used (as in the Mana Fort interior) for the whip post buttons that gather your party to one spot.

Tuesday, January 22, 2013

Doors

Not sure whose bright idea it was to store doors this way, but doors and step-on-to-execute events are stored on each map without a source x,y.  It pokes through the map from top to bottom looking for tiles of a certain type, and when it finds them, it pairs them iteratively with the door definitions defined for a map.  For example, 128, the waterfall map, has four such trigger tiles.  From the top of the map down, the first two are the door tiles to the map to the right, 129, so these are the first two defined for the map. The other two are the dialogue boxes that pop up while you walk through to get the sword.

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

http://dl.dropbox.com/u/19968993/som/FileListing.html
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!

Stats editing works.  Here I am with 500 HP .. minus some from trying to get a good screenshot, one-shotting the mantis ant at level 1.


Some minor cleanup and build 0201 should be on its way.

Saturday, January 19, 2013

Release

I'll probably drop the first 2.x release in a couple days.  Lots of speed and stability improvements, the ExHiRom stuff, and preliminary sprite stuff (no sprite editing yet.. needs work.. but a lot of them show up on maps) are among the changes.  Also took out the OpenTK dependency.  I want to polish up the character stats editor a bit before I do the release (it doesn't write anything back to the rom at the moment)

Wait, is anyone even still interested in these things?

Friday, January 18, 2013

Map piece editing

..is also now much faster.  You can pull each map editor to its own window, edit the piece, and see the composite map update when you hit OK.  Hasn't crashed yet, it's orders of magnitude faster, and it's barely using any CPU at all.  In other words, it's actually somewhat usable now.

Thursday, January 17, 2013

Multi-window editing

This is something I got some requests for a while back.  Seemed useful to add.


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

..is much improved.  Stabler and faster.  Everything else needs to be worked on still, particularly the "Map pieces."

.. and fixed a bug where apparently you couldn't edit the foreground section of tilesets.  Lovely.

Tuesday, January 15, 2013

Extended Hirom

Finished playing the 6 MB Extended Hirom version.  169 total changes to code to make it work, made painstakingly one by one by savestating before a crash, generating a code dump, and finding where it jumped to a patch of 00s instead of code (or in the trickier cases, where it read from zeros instead of data). 

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.

This is something I think we've all wanted to be able to do at some point.  This game is so much more fun to play when your movement isn't restricted by where the other characters are.  The "fix" I'm working on for this has its share of problems (for example, it flips the fuck out when you try to bring up a ring menu for someone offscreen), but I'd like to clean it up and include it as an automated fix... in fact, I think there's already a checkbox for it.

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

Converting to ExHiRom (which will effectively triple the potential size of the ROM, to 6 MB) seems to be.. doable, but it's going to require some code patches.

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

"Export to ROM" now only expands if necessary.. changing fixed-size things won't bump your ROM up to 4 MB anymore.  If you added things, it first pads it up to 3 MB if necessary, then to 4.  If it goes over 4 (which won't play) it will warn you on the little status log thing.

Sound Effects

Sound effects are sort of loading.  As I was hoping, they're basically just a single-channel version of the music data, so I can use the same code to process them. 

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

Checking out how the game organizes SPC700 memory so I can do stuff like allowing sample expansion and warn if the samples you chose won't all fit into memory for a given song.

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

Yes, I'm still around.  No, I haven't answered your emails.  I have a bunch of them to go through.  Hopefully get to it soon.

Lots of stuff still needs finishing and improvement.  I've been touching up the MIDI importer, which has always worked like shit at best.