1. fuffsss

    fuffsss Newbie
    Newcomer

    Joined:
    Sep 21, 2020
    Messages:
    4
    Country:
    Taiwan
    60fps
    580F0000 0CE891C0
    580F1000 00000008
    580F1000 00000018
    580F1000 00000190
    780F0000 00000294
    640F0000 00000000 42700000



    invalid
     
    Last edited by fuffsss, Jan 25, 2021
  2. Hazerou

    Hazerou 60 FPS Cheat Dude
    Member

    Joined:
    Jul 27, 2018
    Messages:
    208
    Country:
    United States
    Yes, that 60 FPS cheat won't work On the Switch itself because of the V-Sync.
     
  3. masagrator

    masagrator The patches guy
    Member

    Joined:
    Oct 14, 2018
    Messages:
    3,817
    Country:
    Poland
    I think you're misunderstanding terms.

    V-sync is something that is forced in whole Switch ecosystem.

    Probly you mean double buffer. So until game will reach locked 60 FPS, it will be 30 FPS.
    And this is still something that is not figured out how to disable it, it seems from some time this is SDK option (before all devs needed to implement it manually, BoTW has its own double buffer for example). Emulator's code is not perfect and doesn't know what forces this double buffer, so it doesn't exist. The same thing is happening for Xenoblade Chronicles DE.

    Curious that this type of double buffer exists only in games that doesn't need it to properly manage game speed. But pro of that is correct framepacing.
     
    Last edited by masagrator, Jan 25, 2021
    cbasic and Hazerou like this.
  4. Hazerou

    Hazerou 60 FPS Cheat Dude
    Member

    Joined:
    Jul 27, 2018
    Messages:
    208
    Country:
    United States
    You mean like that "FrameSkipping" thing?
    In New 3DS console, there are some games that are locked at 30 FPS but if we use 60 FPS cheat, the Game's FPS will drop straight to 30 if there are a lot of Effects going around but will go back to 60 if it's on a tight and light area.
    But If we use 60 FPS cheat on Emulator with a Capable Device. The FPS will not drop straight Specifically to 30 FPS.

    — Posts automatically merged - Please don't double post! —

    BTW, there's something I noticed on the Switch, When this Image appears;
    [​IMG]
    It's seems like the Framerate is 60 at that moment. I tried to quickly go to Edizon to do some search but the problem is the game will keep running in the background... So I keep missing it... If only the game would pause just as you go to the home menu.
     

    Attached Files:

  5. masagrator

    masagrator The patches guy
    Member

    Joined:
    Oct 14, 2018
    Messages:
    3,817
    Country:
    Poland
    dmnt:cht has option to pause and resume, writing overlay for it should be simple.

    And my guess is that it's not locked to 30 FPS yet and because nothing is happening, it doesn't need much resources to achieve 60 FPS.

    — Posts automatically merged - Please don't double post! —

    And frameskipping also is different thing, but partially related.
    Frameskipping happens to maintain game speed correct for end user. No frameskipping you can see f.e. in LA Noire. Dropping FPS results in slowed down from end user perspective gameplay.
     
    Last edited by masagrator, Jan 25, 2021
    Hazerou likes this.
  6. masagrator

    masagrator The patches guy
    Member

    Joined:
    Oct 14, 2018
    Messages:
    3,817
    Country:
    Poland
    And btw. some values may work in emulator, but not on Switch for because of emulator quirks.
    For example theboy181 found UI speed for Xenoblade Chronicles DE that wasn't working for Switch. For Switch Kirby567Fan found different offset that was working.

    I will be testing soon your code with beyond OC clocks. :P Curious if it will work.
     
    Hazerou likes this.
  7. masagrator

    masagrator The patches guy
    Member

    Joined:
    Oct 14, 2018
    Messages:
    3,817
    Country:
    Poland
    Yeah, it seems this is not double buffer issue.
    Cheat just don't work on real hardware.

    FPS limiter doesn't exist in memory at loading screen, so searching for change from 42700000 to 41F00000 this way didn't work.

    Edit: game doesn't have double buffer.
     
    Last edited by masagrator, Jan 25, 2021
    Hazerou likes this.
  8. masagrator

    masagrator The patches guy
    Member

    Joined:
    Oct 14, 2018
    Messages:
    3,817
    Country:
    Poland
    Ok, figured it out. It seems those clever guys either forgot that they have enabled in emulator options setting presentinterval always to 1, or emulator is now broken.


    With attached exefs patch below your cheats are now working on hardware.

    It seems it's not possible to get locked 60 without memory OC over 1600 MHz. It will fluctuate between 50 and 60 FPS even at 1963.5 MHz CPU and 1267.2 MHz GPU. There is no difference between those and 1785/921.
     

    Attached Files:

    Last edited by masagrator, Jan 25, 2021
    ioritree, themosteve, fuffsss and 3 others like this.
  9. Fadi5555

    Fadi5555 GBAtemp Fan
    Member

    Joined:
    Jan 3, 2018
    Messages:
    348
    Country:
    United States
    Please can you make a patch to run this game at 720p in handheld mode. Many thanks for your efforts.
     
  10. Hazerou

    Hazerou 60 FPS Cheat Dude
    Member

    Joined:
    Jul 27, 2018
    Messages:
    208
    Country:
    United States
    Wow you really are a God! Thank you for making this!
     
  11. masagrator

    masagrator The patches guy
    Member

    Joined:
    Oct 14, 2018
    Messages:
    3,817
    Country:
    Poland
    And exefs has plenty informations to figure out where settings are stored.

    For example this is 60 FPS patch made from reading main

    Code:
    [60 FPS native]
    580F0000 0CD2DC58
    780F0000 00000434
    640F0000 00000000 42700000
    
    So wait until final release. There will be plenty of graphics cheats to look for.

    Edit: Because I don't like how RE Tool manages to name files when there is no list, I have made my own python script for unpacking files.
    It names file in this regard:
    *order in pak file*-*offset of stored data*-*CRC Name*.*file type*

    file type is guessed based on magic. If Magic cannot be properly converted to ascii, as type is used "dat"

    Requirements: python3, zstd, numpy (and because numpy is broken on Windows, you won't use it by cmd. Use WSL or msys2)

    Usage:
    Code:
    python3 script.py pakfile.pak
    
    Code:
    import os
    import sys
    import zstd
    import numpy
    
    file = open(sys.argv[1], 'rb')
    
    MAGIC = file.read(0x4)
    
    if (MAGIC != b'KPKA'): raise ValueError("Wrong MAGIC")
    version = numpy.fromfile(file, dtype=numpy.uint32, count=1)[0]
    file_count = numpy.fromfile(file, dtype=numpy.uint32, count=1)[0]
    file.seek(0x4, 1)
    CRC_Name = []
    offset = []
    zsize = []
    size = []
    flag = []
    null = False
    file_result = 0
    
    
    for i in range(0, file_count):
        CRC_Name.append("%x" % (numpy.fromfile(file, dtype=numpy.uint64, count=1)[0]))
        offset.append(numpy.fromfile(file, dtype=numpy.uint64, count=1)[0])
        zsize.append(numpy.fromfile(file, dtype=numpy.uint64, count=1)[0])
        size.append(numpy.fromfile(file, dtype=numpy.uint64, count=1)[0])
        flag.append(numpy.fromfile(file, dtype=numpy.uint8, count=8)[0])
        file.seek(0x8, 1)
     
    if (os.path.isdir("output") == False):
        os.makedirs("output")
    
    for i in range(0, file_count):
        file.seek(offset[i], 0)
        if (flag[i] == 2):
            buffer = file.read(zsize[i])
            buffer_out = zstd.decompress(buffer)
        elif (flag[i] == 0):
            file.seek(offset[i], 0)
            buffer_out = file.read(size[i])
        else: raise ValueError("Wrong compression flag: %x" % (flag[i])) 
     
        if (len(buffer_out) != size[i]): raise ValueError("Wrong Uncompressed size")
        for x in range(0,3):
            if (buffer_out[x] == 0x0 or buffer_out[x] > 126): null = True
        if (null == True):
            new = open("output/%d-%x-%s.dat" % (i, offset[i], CRC_Name[i]), "wb")
            if (flag[i] == 2): print("%d: %x-%s.dat, Compression: zstd, compressed size: %d, uncompressed size: %d" % (i, offset[i], CRC_Name[i], zsize[i], size[i]))
            else: print("%d: %x-%s.dat, Compression: None, size: %d" % (i, offset[i], CRC_Name[i], size[i]))
        else:
            new = open("output/%d-%x-%s.%s" % (i, offset[i], CRC_Name[i], buffer_out[0:3].decode("ascii")), "wb")
            if (flag[i] == 2): print("%d: %x-%s.%s, Compression: zstd, compressed size: %d, uncompressed size: %d" % (i, offset[i], CRC_Name[i], buffer_out[0:3].decode("ascii"), zsize[i], size[i]))
            else: print("%d: %x-%s.%s, Compression: None, size: %d" % (i, offset[i], CRC_Name[i], buffer_out[0:3].decode("ascii"), size[i]))
        new.write(buffer_out)
        new.close()
        null = False
        file_result = file_result + 1
    
    if (file_result != file_count): raise ValueError("Wrong file count. Expected: %d, unpacked: %d" % (file_count, file_result))
    file.close()
    

    Textures have mipmaps and are using swizzle.
     
    Last edited by masagrator, Jan 26, 2021
    Hazerou and fuffsss like this.
  12. ioritree

    ioritree Member
    Newcomer

    Joined:
    Jan 4, 2015
    Messages:
    27
    Country:
    Taiwan
    thanks ,seem not work for "100BEF013050000" version
     
  13. masagrator

    masagrator The patches guy
    Member

    Joined:
    Oct 14, 2018
    Messages:
    3,817
    Country:
    Poland
    It relies on buildid, so any difference in code makes it not working.
    For main release I will provide on request for any version this patch.
     
    ioritree likes this.
  14. cbasic

    cbasic Newbie
    Newcomer

    Joined:
    Jan 30, 2021
    Messages:
    5
    Country:
    China
    That's amazing. I extracted textures with your script but find that those .tex files can't be decoded by any RE2/3 or DMC5 tex tools. You said they are using swizzle. Any suggestion on previewing or exporting them to PNGs?
     
  15. masagrator

    masagrator The patches guy
    Member

    Joined:
    Oct 14, 2018
    Messages:
    3,817
    Country:
    Poland
    I was using rawtex
    https://zenhax.com/viewtopic.php?t=7099
    It needs texconv downloaded in the same folder
    Just write offset from where texture data starts (only tested one and it was at offset 0x1b0, format was iirc r8g8b8a8_unorm or b8g8r8a8_unorm). Tool will guess dimensions, but it's hit and miss. Output is dds.
     
  16. cbasic

    cbasic Newbie
    Newcomer

    Joined:
    Jan 30, 2021
    Messages:
    5
    Country:
    China
    Thanks for your suggestion!
    I tried to use Rawtex with some .tex files. But neither r8g8b8a8_unorm nor b8g8r8a8_unorm worked fine. The default bc1 format did the best but still not statisfying. Here is a sample. It almost gives right picture. May you have a look at it?
     

    Attached Files:

  17. masagrator

    masagrator The patches guy
    Member

    Joined:
    Oct 14, 2018
    Messages:
    3,817
    Country:
    Poland
    Yup, this texture is BC1. But you have set wrong offset and dimensions.
    In this case it's 0x38

    32432189-1993858538.png
     
  18. cbasic

    cbasic Newbie
    Newcomer

    Joined:
    Jan 30, 2021
    Messages:
    5
    Country:
    China
    Wow, it's cool! Thanks a lot.
     
  19. cbasic

    cbasic Newbie
    Newcomer

    Joined:
    Jan 30, 2021
    Messages:
    5
    Country:
    China
    Is there a common method to find/calc the offset?
     
  20. masagrator

    masagrator The patches guy
    Member

    Joined:
    Oct 14, 2018
    Messages:
    3,817
    Country:
    Poland
    Well, it must be, but I didn't dig into how tex looks like.
     
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - version), Monster, Hunter