Giter Club home page Giter Club logo

Comments (5)

nyanpasu64 avatar nyanpasu64 commented on June 25, 2024

So here's the bug!

Spirit Tracks overworld theme uses 0x94 jump at the very beginning of each track, to jump to the relevant song section.

SeqTrack::AddLoopForever interprets it as a loop point end, and immediately bails out in both READMODE_ADD_TO_UI and READMODE_FIND_DELTA_LENGTH.

Because READMODE_ADD_TO_UI breaks, the hex dump terminates early.

Because READMODE_FIND_DELTA_LENGTH breaks, deltaLength is set to zero and the subsequent READMODE_CONVERT_TO_MIDI stopTime is zero, causing the MIDI conversion to terminate immediately.

The correct way to detect loops is to keep a set of which byte ranges you have already processed, and abort when you reenter a visited range.

That method won't abort incorrectly whenever the song jumps to an unvisited area.

One awful hack to sorta-kinda workaround the second (only) issue is to increase ConversionOptions::numSequenceLoops. However, this is absolutely not the correct fix. Guessing the number of non-jump loops to follow is not the correct fix. Correctly recognizing jumps vs loops is.

from vgmtrans.

loveemu avatar loveemu commented on June 25, 2024

The commit above improves the situation, probably. Can you test it and give a feedback here?

from vgmtrans.

nyanpasu64 avatar nyanpasu64 commented on June 25, 2024

It plays back properly now.
VGMTrans preview has missing/bad notes, the MIDI export is fine.
Both contain neither the intro nor the first-part repeat. I believe it may be a CPU-based jump.

from vgmtrans.

loveemu avatar loveemu commented on June 25, 2024

I think so too. (I haven't verify the details, though)

If those missing notes are caused by a CPU-based branch, I want to going to close this issue. If you have an opinion on a CPU-based branch, you can write it on issue #19.

from vgmtrans.

nyanpasu64 avatar nyanpasu64 commented on June 25, 2024

I checked the SSEQ hex dump: Each track has a leading unvisited segment (intro skipped by jump), and a later unvisited segment (skipped part A-A loop). Is it possible to modify SSEQ ripping to add custom rip from offset?

OH, it uses SSEQ if-else statements!

from vgmtrans.

Related Issues (20)

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.