.sm to .dwi converter

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • #31
    no
    FFR Simfile Author
    Fission
    • Jan 2004
    • 1850

    Re: .sm to .dwi converter

    updated op with standalone executable. i haven't ran this through a very extensive battery of tests, but please let me know right away if it doesn't convert a file with no holds, mines, etc. properly.
    Last edited by Fission; 08-4-2013, 02:46 PM.

    Comment

    • #32
      no
      FFR Simfile Author
      Fission
      • Jan 2004
      • 1850

      Re: .sm to .dwi converter

      discovered a bug thanks to tosh

      "—" in filenames will cause the converter to crash on certain language locales. i suspect there are more characters that will cause this behavior. i will look for a solution later.

      Comment

      • #33
        FFR Player
        FFR Music Producer
        Choofers
        • Dec 2008
        • 6205

        Re: .sm to .dwi converter

        I can't think of why that would cause a crash... is that a standard ascii character?

        Comment

        • #34
          no
          FFR Simfile Author
          Fission
          • Jan 2004
          • 1850

          Re: .sm to .dwi converter

          you raise a good point. it is a standard ascii character, so i'm confused as to why it's even an issue if that's the case.

          maybe all of the appropriate windows updates aren't applied? not sure right now. will think on it some more.

          Comment

          • #35
            FFR Player
            FFR Music Producer
            Choofers
            • Dec 2008
            • 6205

            Re: .sm to .dwi converter

            edit: https://en.wikipedia.org/wiki/Extended_ASCII

            tosh, try converting an sm file with any character above 127 on this table
            A complete list of all ASCII codes, characters, symbols and signs included in the 7-bit ASCII table and the extended ASCII table according to the Windows-1252 character set, which is a superset of ISO 8859-1 in terms of printable characters.
            Last edited by Choofers; 08-5-2013, 05:06 PM.

            Comment

            • #36
              O Derby, Where Art Thou?
              tosh
              • Jul 2003
              • 1057

              Re: .sm to .dwi converter

              Originally posted by Choofers
              edit: https://en.wikipedia.org/wiki/Extended_ASCII

              tosh, try converting an sm file with any character above 127 on this table
              http://www.ascii-code.com/
              Just noticed this.

              I've only tried a few, but most of them didn't work. Some of the ones that worked were †, ‡, and ‰. I'm running on a Japanese locale, so I'm kinda surprised ¥ didn't work.

              Comment

              • #37
                no
                FFR Simfile Author
                Fission
                • Jan 2004
                • 1850

                Re: .sm to .dwi converter

                i am not 100% certain, but i think i discovered the cause of this.

                lua doesn't support UTF by default. on a japanese locale, for instance, the characters you are having trouble with aren't in the ascii set of characters, so they need to use UTF. i found a fix for this, and will work on it tonight.

                Comment

                • #38
                  D7 Elite Keymasher
                  FFR Simfile Author
                  rCaliberGX
                  • Jun 2012
                  • 2339

                  Re: .sm to .dwi converter

                  yeah sorry for putting it in the batch thread

                  so when i put it in the same folder and run, the converter opens and closes in an instant but there's no output.

                  edit: nvm i found why it didn't show. my sm installation is in program files, and output is in the compatibility files section. it has to be run in administrator mode for output to be in the song folder.

                  Released!

                  Originally posted by Wayward Vagabond
                  you look like you're dSucks

                  Comment

                  • #39
                    no
                    FFR Simfile Author
                    Fission
                    • Jan 2004
                    • 1850

                    Re: .sm to .dwi converter

                    phew. glad you figured it out :D.

                    i'll add a note about that to the OP in case anybody else runs into that pitfall. thanks for discovering that. guess that's something else i should investigate; i don't think i'll be able to find a work-around for that though.
                    Last edited by Fission; 08-19-2013, 10:31 PM.

                    Comment

                    • #40
                      no
                      FFR Simfile Author
                      Fission
                      • Jan 2004
                      • 1850

                      Re: .sm to .dwi converter

                      i'm planning on completely writing the entire script using the penlight lua libraries. in particular, most of the .sm file parsing will be done in the method described in http://stevedonovan.github.io/Penlig...guration_Files. i have spent a lot of time writing my own file parsing when most of the work was already done for me, so i'm just going to use it.

                      this is going to allow me to convert between .dwi and .sm formats a lot easier so i can write a converter that goes the other direction (.dwi -> .sm) and will allow the converter to be configurable with a configuration file.

                      also, i created a gist for this script that i'll update the op with when i'm at home so i can give real-time updates as to what i'm doing.
                      Last edited by Fission; 08-26-2013, 12:06 PM.

                      Comment

                      Working...