ROM Hack Discussion Monster Hunter Rise Mod and Cheat (Demo version)

fuffsss

Member
Newcomer
Joined
Sep 21, 2020
Messages
9
Trophies
0
Age
21
XP
113
Country
Taiwan
60fps
580F0000 0CE891C0
580F1000 00000008
580F1000 00000018
580F1000 00000190
780F0000 00000294
640F0000 00000000 42700000



invalid
 
Last edited by fuffsss,

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,231
Trophies
3
XP
11,937
Country
Poland
Yes, that 60 FPS cheat won't work On the Switch itself because of the V-Sync.
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,
  • Like
Reactions: cbasic and Hazerou

Hazerou

60 FPS Cheat Dude
Member
Joined
Jul 27, 2018
Messages
499
Trophies
1
Age
25
XP
2,233
Country
United States
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. 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.
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.

--------------------- MERGED ---------------------------

BTW, there's something I noticed on the Switch, When this Image appears;
share-png.243335

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.
 

Attachments

  • share.png
    share.png
    439.7 KB · Views: 838

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,231
Trophies
3
XP
11,937
Country
Poland
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.

--------------------- MERGED ---------------------------

BTW, there's something I noticed on the Switch, When this Image appears;
share-png.243335

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.
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.

--------------------- MERGED ---------------------------

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,
  • Like
Reactions: Hazerou

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,231
Trophies
3
XP
11,937
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.
 
  • Like
Reactions: Hazerou

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,231
Trophies
3
XP
11,937
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,
  • Like
Reactions: Hazerou

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,231
Trophies
3
XP
11,937
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.
 

Attachments

  • MHRiseDemoFPSUnlocker.zip
    473 bytes · Views: 317
Last edited by masagrator,

Fadi5555

Well-Known Member
Member
Joined
Jan 3, 2018
Messages
495
Trophies
0
Age
35
XP
2,356
Country
United States
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.
Please can you make a patch to run this game at 720p in handheld mode. Many thanks for your efforts.
 

Hazerou

60 FPS Cheat Dude
Member
Joined
Jul 27, 2018
Messages
499
Trophies
1
Age
25
XP
2,233
Country
United States
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.
Wow you really are a God! Thank you for making this!
 

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,231
Trophies
3
XP
11,937
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,
  • Like
Reactions: Hazerou and fuffsss

ioritree

Active Member
Newcomer
Joined
Jan 4, 2015
Messages
27
Trophies
0
XP
726
Country
Taiwan
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.

thanks ,seem not work for "100BEF013050000" version
 

cbasic

Member
Newcomer
Joined
Jan 30, 2021
Messages
5
Trophies
0
Age
28
XP
36
Country
China
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.

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?
 

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,231
Trophies
3
XP
11,937
Country
Poland
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?
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.
 

cbasic

Member
Newcomer
Joined
Jan 30, 2021
Messages
5
Trophies
0
Age
28
XP
36
Country
China
I was using rawtex
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.

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?
 

Attachments

  • 32432189-1993858538-sample.rar
    168.7 KB · Views: 165

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,231
Trophies
3
XP
11,937
Country
Poland
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?
Yup, this texture is BC1. But you have set wrong offset and dimensions.
In this case it's 0x38

32432189-1993858538.png
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Xdqwerty @ Xdqwerty: Good night