Tuesday, July 14, 2009

Report and Timeline

  • ~23 May - 1 June The History
    I chosen to start at the hierarchical top of the Format then work my way down. ie. Song -> Tracksteps -> Patterns -> Macros. I used ScummVM classes right from the start which saved some time vs my initially planned approach to make a small selfcontained project at the start, there where some troubles with the linux buildsystem but nothing major.
    As I progressed I realized that the TFMX Format is way more complex than I initially though, creating songs for it is more like programming than composing (maybe one reason why only a handful musicians used it). I felt like I`m falling behind my schedule more and more. I did however reverse parts of the executeable and used this to verify some of he weirder stuff in tfmxplay, some things turned out to be different in MI
  • 1 June - 4 June:
    I now can follow the "path" of the modules. Follow is a bit of a big word, 4-5 patterns just outputted their current command and parameters - and interleaved with each other. Impatience and some disappointment showed up. I now worked feverishly to get evenough macros implemented to be able to hook it all up audio-output.
    The first versions had ugly, distorted noise but you still could figure out the parts of songs.
  • 4 June - 6 June
    Now I had a full player, only I needed to detect the bugs that kept it from outputting something recognisable. This proved to be difficult and took me 2 days just to find some rather laughable bugs (storing 16bit in a byte?). For the next task (maxtrax) I plan to start at the lowest level, so I can verify new code soon and not code for 2 weeks and then have to hunt around endlessly. It might need some more code for beeing able to instantly test new additions, but I think steady progress is more important than beeing halted for indeterminate time searching bugs.
  • 6 June - 12 June
    Things were clearing up again and after finding the few showstopping bugs I quickly could pad out the player, find playback issues and verify nonworking code with the MI-Executeable. Guess I made up the time lost this week. I also managed to put hook the player into ScummVM so the game would work with Sound.
  • 14 - 18 June
    I was busy with University so I wasnt around much. Nevertheless I good a good look at how sfx are handled. Turns out that TFMX has functions to queue both external macros or patterns (channel 7 is reserved for external patterns it seems), complete with priority levels and "lifetime" to determine when and if other effects/music should be replaced. Luckily ScummVM is only using macros and priority 0, its however pretty messy keeping track of them (probably not at all).
    I implemented a first version with sfx by using 2 Tfmx instances, 1 for music and 1 for effects, this allows hooking up both to the right mixer channels. Not sure if I might use only 1 instance in the end.
  • 18 - 20 June
    Actually played a bit of "Monkey Island", found out that the mansion-scene was quite bad in the last implementation. Some effects depended on beeing stopped or muted by the next effect, and I had to implement that for this scene. The game should work well now.
  • 22 June - 1 July
    This week I was occupied primary with University. Still found some time for a few fixes.
  • 1 July  - 11 July
    Merged in changes from trunk before starting work on Maxtrax.
    I initially thought about reversing the format the hard way (disassembler) as the sources linked in ScummVM Wiki are already adapted for a Player.. and have wuite some code decated to some pluginframeworks. I wanted to base my player on the original source. Reversing proved to be difficult as Kyrandia uses the Amiga`s libraries and I havent found a way to fed the definitions to the disassembler.
    Compare this to TFMX which hits the Hardware directly, finding the related code was merely a matter of looking at the exception-vectors (eg. which code gets called on Audio-Interrupts) in an emulator. Of course it also helped that TFMX is structured rather nicely and placed right at the beginning of the executeable.
    Without fast progress I was trying to locate the origins of the assembler-sources and found out that the original, almost unmodified sources are available in UADE.
    Progress was steady since, even though I dint worked very dutifully this week I had hit the milestone of beeing able to iterate through songs.
  • 12 July  - 14 July
    Some cleanups tiresome debuggin work later, the player now reproduces the intro-song. Need to test some more but it appears to be pretty truthfully aswell.
  • 14 July  - 18 July (The Now)
    What Im doing now is looking at how sound-effects are played (and which kinds of effects are used in Kyrandia) and figure out how to add them into the game. I plan to have support for that at the end of the week.
  • 19 July  - 10 August The Mystery
    The following weeks are a bit of a mystery, I will have a look at the Desktoptracker-Format, but from what information is available I fear its not enough to base an implementation on it.
    So Im still uncertain on how to use this time, more on this and some possible options at another blog-entry
  • 10 August - 17 August
    Expect 3-4 days to improve TFMX/maxtrax
    Remainded is codecleanups, testing and preparations to merge the code back into ScummVM

State

  • Monkey Island + TFMX
    The game should work fine with both effects and sounds, player implements everything the game uses. Differently to the original I however use 2 instances of the TFMX-Player for sound and effects which should be noticeable in the game even if its rare that both are used at the same time.
    There are some cleanups necessary, primary for making both instances share data, currently the music + samples get loaded twice in seperate blocks of memory.
  • Legend of Kyrandia + Maxtrax
    Commandline player can load and play songs (called scores in this format). Output appears to be thruthful, but more comparisons (only tested intro-music so far). Effects are totally missing currently. The original player implemented communication by using 2 OS-conform "servers" - the game sended commands to those servers and the commands got processed asynchronously. Need to figure out which commands where used and how to hook the player into the kyra-engine.

No comments:

Post a Comment