Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating CRC HW hacks ?
#1
Ok  a question how to create crc hw hacks ? Where and how do you get the values from ?
I'm still new to this so I want to know how this is done Smile

Code:
if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x00e00 || fi.FBP == 0x01000) && fi.FPSM == fi.TPSM && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x00e00 || fi.TBP0 == 0x01000) && fi.TPSM == PSM_PSMCT32 && fi.FBMSK == 0x0FF000000)
For example this , where and how do I find those values ?
CPU: I3-4160 3.6GHZ
Motherboard: Asrock B85M - DGS
RAM: Hyper X Savage 2x8GB 1.6GHZ cl9
GPU: Asus AMD Radeon R7 360 OC 2GB GDDR5
OS: Windows 7 Ultimate SP1 64bit
Reply

Sponsored links

#2
only me is allowed to create CRC hack Smile

On the GS draw are like that
while
program registers
draw

The CRC hack are based on the value of 2/3 registers.
F => frame buffer
T => texture
TME => texturing enabled
PSM => format of the object
BP* => base pointer aka the address in GS memory
MSK => bit mask

So basically you dump all draw calls. Find the bad one, get the register value, build this line to skip it.
Reply
#3
(04-30-2017, 10:47 AM)gregory Wrote: only me is allowed to create CRC hack Smile
Help plx then xD

Anyway back on topic this seems a bit too hard for me to do , I need a little bit of explanation how to do it.
Can the values be found in gs dumps and if so how ?

I have a couple of demo discs I want to add crc hacks for specific games. (multiple games on 1 demo disc)

1. The Getaway Black Monday demo
Code:
bool GSC_DEMODISC58(const GSFrameInfo& fi, int& skip)
{
    if(skip == 0)
    {
        // Getaway Black Monday crc. Other demo games might be affected by the hack as well
        if((fi.FBP ==0 || fi.FBP ==0x1180)&& fi.TPSM == PSM_PSMT8H && fi.FBMSK == 0)
        {
            skip = 1;
        }
    }

    return true;
}

I tried reusing the code from the original games but it seems it doesn't work. fi.FBP ==0x1180 might have a different value in the demo so I need a bit of help with this one.

GS dump: https://drive.google.com/open?id=0B8cQAq...WlRM2Eyd00

2. Area 51 demo
Area 51 has a strange issue that is depth related similar to Dragonball Z Budokai Tenkaichi 3. A transparent wall is shown in front of the player , with depth emulation it's partially rendered but makes things worse by making the wall more visible and appear as a bar but not full screen. Disabling depth emulation the transparency is increased and the wall is now shown on the whole screen but less visible.

GS dump: https://drive.google.com/open?id=0B8cQAq...klIV010VjA

Looking at http://forums.pcsx2.net/attachment.php?aid=49644 the issue seems to be present on the full game as well.
CPU: I3-4160 3.6GHZ
Motherboard: Asrock B85M - DGS
RAM: Hyper X Savage 2x8GB 1.6GHZ cl9
GPU: Asus AMD Radeon R7 360 OC 2GB GDDR5
OS: Windows 7 Ultimate SP1 64bit
Reply
#4
Here the dump option
Code:
dump = 0 <= enable GS state dump
save = 1 <= dump framebuffer image
savef = 0 <= dump CRTC image
savel = 1800 <= dump length (number of draw call)
saven = 5520 <= first draw call to dump
savet = 0 <= dump input texture image
savez = 0 <= dump Z buffer image

Data will be stored here. You will have a nice txt file too with the content of all GS registers.
Code:
const std::string root_sw("c:\\temp1\\_");
const std::string root_hw("c:\\temp2\\_");

But it will be better to fix emulation rather to add more hacks
Reply
#5
(05-01-2017, 05:12 AM)lightningterror Wrote: I have a couple of demo discs I want to add crc hacks for specific games. (multiple games on 1 demo disc)

Looking at http://forums.pcsx2.net/attachment.php?aid=49644 the issue seems to be present on the full game as well.
CRC hacks applied to demo discs will apply to all games on said disc, it might break something in the other games.

If you end up wanting to add a new CRC hack to PCSX2, make sure you've made it for the full version, not the demo. There's no guarantee a CRC hack for a demo will work on the full version, and even if it does can create regressions that are not in the demo version.
Reply




Users browsing this thread: 1 Guest(s)