RELEASE Kirikiri for Nintendo Switch / ニンテンドースイッチ用の吉里吉里

Discussion in 'Switch - Emulation, Homebrew & Software Projects' started by uyjulian, Jul 11, 2019.

  1. uyjulian
    OP

    uyjulian Homebrewer

    Member
    9
    Nov 26, 2012
    United States
    United States
    Last edited by uyjulian, Jul 12, 2019
    NoNAND and lordelan like this.
  2. iriez

    iriez GBAtemp Fan

    Member
    7
    Oct 27, 2016
    United States
    If someone builds this and plays for a bit, let me know. Thanks for the post uyjulian....would you consider posting the binaries to your github?
     
    NoNAND likes this.
  3. uyjulian
    OP

    uyjulian Homebrewer

    Member
    9
    Nov 26, 2012
    United States
    United States
    I'll post binaries once I have an example ready to bundle, and after the TVPGetAppPath / ExePath bug gets fixed. It's a giant hackjob right now.
     
    Last edited by uyjulian, Jul 11, 2019
  4. chaoskagami

    chaoskagami G̷̘̫̍̈́̊̓̈l̴̙͔̞͠i̵̳͊ţ̸̙͇͒̓c̵̬̪̯̥̳͒͌̚h̵̹̭͛̒̊̽̚

    Member
    9
    Mar 26, 2016
    United States
    ↑↑↓↓←→←→BA
    Neat. More VNs on my switch.

    I didn't even know that mkrkr existed, so also thanks for that OP. I'll probably compile that for my Linux systems later.

    Now that I think of it, are KAG2 games compatible with KAG3? Because come to think of it, those might not be playable on this... Hm.
     
    Last edited by chaoskagami, Jul 11, 2019
  5. uyjulian
    OP

    uyjulian Homebrewer

    Member
    9
    Nov 26, 2012
    United States
    United States
    Nekopara won't work without an emoteplayer, psbfile, and other M2-specific implementation.
    KAG2 games should be more compatible when Krkr2Compat is used.
     
    Last edited by uyjulian, Jul 12, 2019
  6. chaoskagami

    chaoskagami G̷̘̫̍̈́̊̓̈l̴̙͔̞͠i̵̳͊ţ̸̙͇͒̓c̵̬̪̯̥̳͒͌̚h̵̹̭͛̒̊̽̚

    Member
    9
    Mar 26, 2016
    United States
    ↑↑↓↓←→←→BA
    Ah, good. Didn't even know there was a backcompat library.

    And it's unfortunate about the plugins; I'm guessing emoteplayer is in the more or less "never going to be implemented due to complexity" category, yeah?

    (I edited my point to avoid confusing the poor saps that only read the first few posts and get excited.)
     
    Last edited by chaoskagami, Jul 11, 2019
  7. uyjulian
    OP

    uyjulian Homebrewer

    Member
    9
    Nov 26, 2012
    United States
    United States
    Correct. The plugins are produced by M2, the same company that made the engine for the Switch version of the game.
     
  8. chaoskagami

    chaoskagami G̷̘̫̍̈́̊̓̈l̴̙͔̞͠i̵̳͊ţ̸̙͇͒̓c̵̬̪̯̥̳͒͌̚h̵̹̭͛̒̊̽̚

    Member
    9
    Mar 26, 2016
    United States
    ↑↑↓↓←→←→BA
    Huh. I didn't realize that was made by the same company...that explains a thing or two about the port, I suppose. You learn something new every day, I guess.

    The sheer number of VNs this will allow to play, though, is still freaking great. I mean, it's probably about half of VNDB alone, albeit requiring some tweaks to the tjs files, possibly.
     
    Last edited by chaoskagami, Jul 11, 2019
  9. uyjulian
    OP

    uyjulian Homebrewer

    Member
    9
    Nov 26, 2012
    United States
    United States
    Yes, it will require some tweaks to the script files. Currently, System.exePath and System.dataPath need to be replaced with absolute (TVP storage system formatted) or relative paths, since the functionality of those are broken. Also, it is recommended for the encoding of text files to be UTF-16 with BOM. That job can be done easily with the "iconv" command from GNU libiconv.
     
    Last edited by uyjulian, Jul 11, 2019
  10. chaoskagami

    chaoskagami G̷̘̫̍̈́̊̓̈l̴̙͔̞͠i̵̳͊ţ̸̙͇͒̓c̵̬̪̯̥̳͒͌̚h̵̹̭͛̒̊̽̚

    Member
    9
    Mar 26, 2016
    United States
    ↑↑↓↓←→←→BA
    Noted. Relative paths sounds easier, since most games use relative paths internally. Does it produce logs if anything goes wrong? That'll make testing this all much easier.

    When there's no BOM, does it default to one (UTF16LE?), or attempt to autodetect encoding? I mean, I have no problem with running everything through iconv; it's easy. I'm just curious as to what the default behavior is.

    I probably won't have time to test this out within the next few days, but I'll certainly be experimenting in the week if possible (been getting haxchi set up on my WiiU, and I need to update devkitpro on my development machine before I can build this.)

    EDIT: Come to think of it, this does support xp3 archives, right? Otherwise, Japanese filenames are going to be...uh...fun.
     
    Last edited by chaoskagami, Jul 11, 2019
  11. uyjulian
    OP

    uyjulian Homebrewer

    Member
    9
    Nov 26, 2012
    United States
    United States
    Logs are generated in krkr.console.log. The output can also be viewed via nxlink.

    Here is the rule for encoding detection:
    If the first bytes are 0xfe 0xfe, the file will be decoded/deobfuscated and the encoding detection will continue.
    If the first bytes are 0xff 0xfe (UTF-16LE BOM), the file is loaded as UTF-16LE.
    If the first bytes are 0xef 0xbb 0xbf (UTF-8 BOM), the file is loaded as UTF-8.
    Otherwise, the encoding is set using the "-readencoding" command line option. If TVP_TEXT_READ_ANSI_MBCS is defined, the default value will be Shift_JIS. Otherwise, it will be UTF-8. Valid options are: "", "UTF-8", "Shift_JIS", "GBK". If the option is "", the decoding will be attempted in the following order: "Shift_JIS", "UTF-8", "GBK". If decoding fails, TJSNarrowToWideConversionError will be thrown.
     
    Last edited by uyjulian, Jul 11, 2019
  12. chaoskagami

    chaoskagami G̷̘̫̍̈́̊̓̈l̴̙͔̞͠i̵̳͊ţ̸̙͇͒̓c̵̬̪̯̥̳͒͌̚h̵̹̭͛̒̊̽̚

    Member
    9
    Mar 26, 2016
    United States
    ↑↑↓↓←→←→BA
    Noted. Now I understand why you say to use the BOM; it leaves less room for encoding errors to occur.

    I personally prefer UTF-8 to UTF-16, since it's more easily editable on Linux, so I'll probably start by attempting to use that first instead of UTF-16 to avoid extra iconv passes. Most console tools (sed, grep) choke on UTF-16 (my choice for batch fixing problems with VNs, since there's generally a lot of unneeded code duplication), so UTF-8 is generally easier to work with.

    See, I'd have normally read through the codebase, but it's pretty huge. It's not exactly easy to figure out what is where, but that's game engines for you. Thanks for answering in such detail.
     
  13. uyjulian
    OP

    uyjulian Homebrewer

    Member
    9
    Nov 26, 2012
    United States
    United States
    No problem. If you have any other problems or questions, feel free to ask.
     
    chaoskagami likes this.
  14. Sumandora

    Sumandora Im using Parental Controls. Change my Mind!

    Member
    4
    Nov 13, 2018
    Germany
    this is so old and today was the first comment lol
     
  15. Naked_Snake

    Naked_Snake Constant Miscreant

    Member
    7
    Oct 6, 2013
    Australia
    Hyrule Field
    What is this exactly
     
  16. chaoskagami

    chaoskagami G̷̘̫̍̈́̊̓̈l̴̙͔̞͠i̵̳͊ţ̸̙͇͒̓c̵̬̪̯̥̳͒͌̚h̵̹̭͛̒̊̽̚

    Member
    9
    Mar 26, 2016
    United States
    ↑↑↓↓←→←→BA
    Uh, no. You might be thinking of Ren'Py or something else. This is new. It hasn't even been on github for more than six hours.

    It's a port of Kirikiri which is a rather popular engine for visual novels in Japan. There's about a 1/2 chance any given VN is implemented on Kirikiri - this allows to run a sizeable chunk of them on the switch (with some compatibility hacks applied, depending on the game.)
     
    Last edited by chaoskagami, Jul 11, 2019
    Naked_Snake likes this.
  17. Sumandora

    Sumandora Im using Parental Controls. Change my Mind!

    Member
    4
    Nov 13, 2018
    Germany
    by uyjulian Jul 11, 2019 at 4:59 AM
     
  18. chaoskagami

    chaoskagami G̷̘̫̍̈́̊̓̈l̴̙͔̞͠i̵̳͊ţ̸̙͇͒̓c̵̬̪̯̥̳͒͌̚h̵̹̭͛̒̊̽̚

    Member
    9
    Mar 26, 2016
    United States
    ↑↑↓↓←→←→BA
    Dude, what universe are you living in? Today is July 11, 2019. Did you accidentally strap a cellular phone to a microwave or something?
     
  19. Sumandora

    Sumandora Im using Parental Controls. Change my Mind!

    Member
    4
    Nov 13, 2018
    Germany
    oh my fault. i thought January
     
  20. Darksabre72

    Darksabre72 Blue Falcon

    Member
    5
    Nov 26, 2016
    United States
Loading...