PCSX2 - Widescreen Game Patches
#31
i think this is not related to gsdx and "reporting" (???) a resolution. i guess the patches basicly scale the 3D projection matrix before the data is computed by the VU. this a lil technical to explain so i just don't.

as a test if it's matrix or something else. setting those numbers from 3fxxxxxx to bfxxxxxx should horizontal the picture. while 4 or 5 float addresses (4-5 x 4 byte) forward you could do the same and probably turn the picture upside down if so. it depends if the matrix is row or column major.
Reply

Sponsored links

#32
so how do you find the address that define the aspect ratio (or the 3d projection matrix as you put it) then?
Reply
#33
let me think. will post in a min. wanna drink my coffee first. Tongue

well the projection matrix theory. the typical matrix layout in memory is a 4x3 float array. usually extended by projection translation. some what like:

3F800000 00000000 00000000 00000000
00000000 3F800000 00000000 00000000
00000000 00000000 3F800000 BF800000

x and y. in complete the first row is the x-axis, second is y-axis and third is depth projection.

this layout is what you could search for and play with it. atleast try to find something similar and do it.

depending on how the matrix scales the projection in x and y you could probably search for the x-axis by 3F800000 00000000 00000000 or the y-axis by 00000000 3F800000 00000000. if the programmer of the game wasn't ridiculously stupid you should hit atleast one of them in a matter of time. note that you can extend the search for the x-axis to 3F800000 00000000 00000000 00000000 00000000. the y-axis search can be extended to 00000000 3F800000 00000000 00000000 00000000 00000000.

final note: i don't guarantee it works or you will find the results instantly. maybe the developers didn't store it like that. it's wild guessing. but better than nothing. Biggrin
Reply
#34
SH2's address which holds the screen width value, does indeed change everytime you shutdown/load the game...

Which makes 0 sense, or logic, wtf advantage would that have been to the devs..

I'll hopefully find a work-around for it.

Edit: Out of curiousity, Hyakki, did you test SH2 from an ISO or disc?
Reply
#35
(03-19-2012, 09:45 PM)Asmodean Wrote: SH2's address which holds the screen width value, does indeed change everytime you shutdown/load the game...

Which makes 0 sense, or logic, wtf advantage would that have been to the devs..

I'll hopefully find a work-around for it.

Edit: Out of curiousity, Hyakki, did you test SH2 from an ISO or disc?

the changing address is called dynamic memory allocation. it's a regular technique to allocate memory on every OS. you could even bypass that if you clever. but it's not really a save technique. you have to reconstruct the screen parameters at an accessable memory location or if it works somewhere at the end the ram and hack the screen initialisation routine to get the data from the fixed address copy there at the end of the ram. it's basicly just overloading a pointer in the routine to redirect the data origin to read. but as said it's not save. whether not supported to get data from an unallocated memory or it's not fail save to be overwritten at some time.

just wanted to tell ya. Wink
Reply
#36
@xstyla: Okay so does all game use 3F800000 value?
Reply
#37
i'm not sure. it's just the way that projection matrix is setup on windows and dx. usually one of them x or y is 1.0f (hex 0x3F800000) and the other is used to scale the projection to aspect. both works. the difference is a bit a look like zooming if you scale over the y dimension. hard to describe.

i don't even know if there's maybe another technique to project on the ps2, but most of the vu code i've seen uses a bit matrix operations to get that stuff in place. so yeah. i assume it does.
Reply
#38
(03-19-2012, 10:48 PM)xstyla Wrote: the changing address is called dynamic memory allocation. it's a regular technique to allocate memory on every OS. you could even bypass that if you clever. but it's not really a save technique. you have to reconstruct the screen parameters at an accessable memory location or if it works somewhere at the end the ram and hack the screen initialisation routine to get the data from the fixed address copy there at the end of the ram. it's basicly just overloading a pointer in the routine to redirect the data origin to read. but as said it's not save. whether not supported to get data from an unallocated memory or it's not fail save to be overwritten at some time.

just wanted to tell ya. Wink

If that's Wikipedia garble for: find the static DMA address for the temp pointer, then yes I've tried that, and it still didn't work lol.
Reply
#39
(03-19-2012, 09:45 PM)Asmodean Wrote: SH2's address which holds the screen width value, does indeed change everytime you shutdown/load the game...

Which makes 0 sense, or logic, wtf advantage would that have been to the devs..

I'll hopefully find a work-around for it.

Edit: Out of curiousity, Hyakki, did you test SH2 from an ISO or disc?
Nice work with khbbs (though I dont have that game) also with the new ratio calculation i'll try that on the other games beats having to find the height value.
with khbbs did you find that code with 3f4ccccd? I was looking at kingdom of heats 1 and I didn't have much luck with that game using the 3f4 value.

anyways I usually test from my iso's, more convenient then having to keep swapping dvds.
If you search for the 3f4ccccd, 1061997773 or 0.8f value in google it seems its a common way to calculate view ports or ratio in 3d.
Reply
#40
(03-19-2012, 11:36 PM)hyakki Wrote: Nice work with khbbs (though I dont have that game) also with the new ratio calculation i'll try that on the other games beats having to find the height value.
with khbbs did you find that code with 3f4ccccd? I was looking at kingdom of heats 1 and I didn't have much luck with that game using the 3f4 value.

anyways I usually test from my iso's, more convenient then having to keep swapping dvds.
If you search for the 3f4ccccd, 1061997773 or 0.8f value in google it seems its a common way to calculate view ports or ratio in 3d.

Yeah I found it with the float conversion of 3f4ccccd, which is 0.800000, This value also finds the SH2 map ratio, meaning when your running around but, I think the resolution changes when you enter battles, for some reason. The ratio edit has no effect in battle >.>

This and the fact it's RNG with the address, looking bad for SH2 Sad lol
Reply




Users browsing this thread: 14 Guest(s)