.sm to .dwi converter

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

    #31
    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, 01:46 PM.

    Comment

    • Fission
      no
      FFR Simfile Author
      • Jan 2004
      • 1850

      #32
      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

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

        #33
        Re: .sm to .dwi converter

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

        Comment

        • Fission
          no
          FFR Simfile Author
          • Jan 2004
          • 1850

          #34
          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

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

            #35
            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, 04:06 PM.

            Comment

            • tosh
              O Derby, Where Art Thou?
              • Jul 2003
              • 1018

              #36
              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

              • Fission
                no
                FFR Simfile Author
                • Jan 2004
                • 1850

                #37
                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

                • rCaliberGX
                  D7 Elite Keymasher
                  FFR Simfile Author
                  • Jun 2012
                  • 2337

                  #38
                  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

                  • Fission
                    no
                    FFR Simfile Author
                    • Jan 2004
                    • 1850

                    #39
                    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, 09:31 PM.

                    Comment

                    • Fission
                      no
                      FFR Simfile Author
                      • Jan 2004
                      • 1850

                      #40
                      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, 11:06 AM.

                      Comment

                      Working...