The above video goes away if you are a member and logged in, so log in now!

 Would you like to get all the new info from PSX-Scene in your email each day? Want to learn more about the team keeping you up to date with the latest scene news?

# Thread: Would anyone be kind enough to compile a very tiny OPL source change for me?    Tweet var b = document.createElement('script'); b.type = 'text/javascript'; b.src = ('http://platform.twitter.com/widgets.js'); var a=document.getElementById("bop5twt"); a.parentNode.insertBefore(b,a); (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })();

1. Member
Join Date
Jul 2013
Posts
13
0
0
Mentioned
0 Post(s)
Tagged
Likes Given
0
1
Hi, I just tried my hand at compiling Open PS2 Loader in order to make a very tiny change, but the amount of information needed for this, especially for someone who hasn't compiled before, is overwhelming. Cygwin, toolchains, ELF packers, etc. It's a lot of things to figure out to make one incredibly tiny source change!

Would anyone be willing to help me out and compile the latest source? The only change needed is detailed in another thread on this board(can't post links apparently), and is just a matter of changing lines 80-81 in padhook.h (located in \ee_core\include\) from:

#define IGR_COMBO_START_SELECT 0xF6
#define IGR_COMBO_R3_L3 0xF9
to:

#define IGR_COMBO_START_SELECT 0xFD
#define IGR_COMBO_R3_L3 0xFB
This should let me use L1+L2+R1+R2+L3 for OPL's built-in IGR, L1+L2+R1+R2+R3 to turn off the system, and the built-in soft-reset (L1+L2+R1+R2+Start+Select) of any game that features it (mainly Kingdom Hearts 1, where it's great for farming synthesis items), rather than the IGR over-riding it and possibly causing a crash for games that have their own reset.

It's such a tiny change, so I'm really hopeful someone here would be willing to help me out rather than me fumbling through trying to compile and pack and whatever else for hours on end. Thanks!

2. The last thing I compiled prior to OPL/PS2DEV was the Lynx web-browser with Slang libraries on UnixWare 2.1.2 waaaaay back in the 1990s. Looking back, that was more complicated than the PS2DEV toolchain and OPL. While I'm still a Linux noob (didn't touch it until 2009 or so), Unix is far more complicated beast that nonetheless made learning things in Linux much easier since the curve isn't so steep. With that said - what are your full computer specs? You probably already know the reason why I'm asking: although there is a slim - SLIM - chance somebody here might re-compile OPL for you, there's an even greater chance most people wouldn't want to risk sending a "message" that it's now open season for every Tom, Dick, and Harry to hit up us all up for personal boutique builds of OPL just for them. You've more than demonstrated that you'd rather compile it yourself since nobody would burn hours banging their head at the wall only to break down ask us for a pre-compile; such a request is definitely born of sheer frustration - one that unsurprisingly has Cygwin written all over it ...

Depending on your computer specs, a Linux VM would be a better, faster, and less frustrating option ...

For what its worth, here are my Minimum Specs for VMWare Player ...

CPU: Socket 939/754 Athon64 or better
RAM: 1GB bare minimum (for WinXP); 2GB bare minimum for Windows 7
VIDEO: GeForce 6600GT / ATI x1300 or better ...
HDD: 10 to 15 GB

With those specs, an XP SP3 machine with just 1GB of RAM can afford to give 512MBs up to VMWare Player ...

It'll be a bit rough, but should only take 60 to 90 minutes tops ...

3. Member
Join Date
Jul 2013
Posts
13
0
0
Mentioned
0 Post(s)
Tagged
Likes Given
0
1
Hmm, if those are the minimum specs then I pass with flying colors for sure. I'll give it a shot after dinner then. Hopefully I need to set up some sort of Linux environment for school anyway, so I'll get some additional use out of it. Thanks for the reply!

4. Feel free to use this thread with VMWare player ...

http://psx-scene.com/forums/f150/201...2-10-a-111460/ (2013 Linux OPL Compile Guide (Mint 14/Ubuntu 12.10 ))

The attached "ps2dsk-scripts" tarball was updated recently so the toolchain and OPL should compile without a hitch ...

5. Member
Join Date
Jul 2013
Posts
13
0
0
Mentioned
0 Post(s)
Tagged
Likes Given
0
1
I've been using your guide, and it's been extremely helpful, thank you! Ran into a problem on the last step, actually compiling OPL. Doing it with the included script in your guide won't get me the custom change I wanted to make, but not being able to do it regularly doesn't bode well for custom compiling.

I run the script, and I'm given a long list of errors in the fntsys.c file in the src folder:

* Interface
src/fntsys.c:16:22: ft2build.h: No such file or directory
src/fntsys.c:18:10: #include expects "FILENAME" or <FILENAME>
src/fntsys.c:31: parse error before "font_library"
src/fntsys.c:31: warning: type defaults to int' in declaration of font_library'
src/fntsys.c:31: warning: data definition has no type or storage class
src/fntsys.c:70: parse error before "FT_Face"
src/fntsys.c:70: warning: no semicolon at end of struct or union
src/fntsys.c:80: parse error before '}' token
src/fntsys.c:80: warning: type defaults to int' in declaration of font_t'
src/fntsys.c:80: warning: data definition has no type or storage class
src/fntsys.c:85: parse error before "fonts"
src/fntsys.c:85: warning: type defaults to int' in declaration of fonts'
src/fntsys.c:85: warning: data definition has no type or storage class
src/fntsys.c:90: parse error before "use_kerning"
src/fntsys.c:90: warning: type defaults to int' in declaration of use_kerning'
src/fntsys.c:90: warning: data definition has no type or storage class
src/fntsys.c:91: parse error before "glyph_index"
src/fntsys.c:91: warning: type defaults to int' in declaration of glyph_index'
src/fntsys.c:91: warning: type defaults to int' in declaration of previous'
src/fntsys.c:91: warning: data definition has no type or storage class
src/fntsys.c:92: parse error before "delta"
src/fntsys.c:92: warning: type defaults to int' in declaration of delta'
src/fntsys.c:92: warning: data definition has no type or storage class
src/fntsys.c:109: parse error before '*' token
src/fntsys.c: In function fntCacheFlush':
src/fntsys.c:112: font' undeclared (first use in this function)
src/fntsys.c:112: (Each undeclared identifier is reported only once
src/fntsys.c:112: for each function it appears in.)
src/fntsys.c: At top level:
src/fntsys.c:132: parse error before '*' token
src/fntsys.c: In function fntPrepareGlyphCachePage':
src/fntsys.c:133: pageid' undeclared (first use in this function)
src/fntsys.c:133: font' undeclared (first use in this function)
src/fntsys.c: At top level:
src/fntsys.c:187: parse error before '*' token
src/fntsys.c: In function fntInitSlot':
src/fntsys.c:188: font' undeclared (first use in this function)
src/fntsys.c: At top level:
src/fntsys.c:199: parse error before '*' token
src/fntsys.c: In function fntDeleteSlot':
src/fntsys.c:201: font' undeclared (first use in this function)
src/fntsys.c:203: warning: implicit declaration of function FT_Done_Face'
src/fntsys.c: At top level:
src/fntsys.c:219: parse error before '*' token
src/fntsys.c: In function fntLoadSlot':
src/fntsys.c:223: font' undeclared (first use in this function)
src/fntsys.c:225: path' undeclared (first use in this function)
src/fntsys.c:238: warning: implicit declaration of function FT_New_Memory_Face'
src/fntsys.c:238: FT_Byte' undeclared (first use in this function)
src/fntsys.c:238: parse error before ')' token
src/fntsys.c:245: warning: implicit declaration of function FT_Set_Char_Size'
src/fntsys.c: In function fntInit':
src/fntsys.c:259: warning: implicit declaration of function FT_Init_FreeType'
src/fntsys.c: In function fntLoadFile':
src/fntsys.c:281: font' undeclared (first use in this function)
src/fntsys.c: In function fntLoadDefault':
src/fntsys.c:296: parse error before "newFont"
src/fntsys.c:298: newFont' undeclared (first use in this function)
src/fntsys.c:303: oldFont' undeclared (first use in this function)
src/fntsys.c: In function fntEnd':
src/fntsys.c:320: warning: implicit declaration of function FT_Done_FreeType'
src/fntsys.c: At top level:
src/fntsys.c:336: parse error before '*' token
src/fntsys.c: In function fntGlyphAtlasPlace':
src/fntsys.c:337: FT_GlyphSlot' undeclared (first use in this function)
src/fntsys.c:337: parse error before "slot"
src/fntsys.c:341: slot' undeclared (first use in this function)
src/fntsys.c:349: font' undeclared (first use in this function)
src/fntsys.c: At top level:
src/fntsys.c:369: parse error before '*' token
src/fntsys.c: In function fntCacheGlyph':
src/fntsys.c:371: gid' undeclared (first use in this function)
src/fntsys.c:375: font' undeclared (first use in this function)
src/fntsys.c:394: warning: implicit declaration of function FT_Load_Char'
src/fntsys.c:394: FT_LOAD_RENDER' undeclared (first use in this function)
src/fntsys.c:404: FT_GlyphSlot' undeclared (first use in this function)
src/fntsys.c:404: parse error before "slot"
src/fntsys.c:405: slot' undeclared (first use in this function)
src/fntsys.c: In function fntSetAspectRatio':
src/fntsys.c:421: request for member isValid' in something not a structure or union
src/fntsys.c: In function fntRenderString':
src/fntsys.c:464: font' undeclared (first use in this function)
src/fntsys.c:483: warning: implicit declaration of function FT_HAS_KERNING'
src/fntsys.c:505: warning: implicit declaration of function FT_Get_Char_Index'
src/fntsys.c:507: warning: implicit declaration of function FT_Get_Kerning'
src/fntsys.c:507: FT_KERNING_DEFAULT' undeclared (first use in this function)
src/fntsys.c:508: request for member x' in something not a structure or union
src/fntsys.c: In function fntCalcDimensions':
src/fntsys.c:720: font' undeclared (first use in this function)
src/fntsys.c:725: FT_Bool' undeclared (first use in this function)
src/fntsys.c:725: parse error before "use_kerning"
src/fntsys.c:726: FT_UInt' undeclared (first use in this function)
src/fntsys.c:727: FT_Vector' undeclared (first use in this function)
src/fntsys.c:744: FT_KERNING_DEFAULT' undeclared (first use in this function)
src/fntsys.c:745: request for member x' in something not a structure or union
make[1]: *** [obj/fntsys.o] Error 1
make: *** [all] Error 2
ERROR: failed to build OPL
Any clue where I messed up? Installation of the SDK, downloading the source, etc.? It's like Linux is being picky about the way the file is formatted, but I guess it could be an indicator that the SDK didn't install properly so Linux doesn't know how to interpret everything in it?

EDIT: Yup, must've been it... Had to re-run the entire SDK install script :\
Last edited by bobrocks95; 07-04-2013 at 02:46 AM.

6. Yep have to run the whole thing easy and safest way

just to let you know those changes work and work well with KH and KHCoM and Okami at least have to check more games with their own IGR

7. Member
Join Date
Jul 2013
Posts
13
0
0
Mentioned
0 Post(s)
Tagged
Likes Given
0
1
Ah, very nice to know that all this effort hasn't been in vain!

Speaking of which, I got the script you provided Bat Rastard to work, and was able to compile my own copy of Open PS2 Loader finally! Only problem is: that was the unedited one! So following the guide, I created a new directory and cloned the regular source(rather than any betas or other custom builds), then went in and made the control change to the padhook.h file, then double-clicked on Makefile- and whoops, no pop-up, it only opens in the text editor. So after some more fiddling I found the "Allow executing file as program" option in the properties window. And after that, every time I double-click on it and select "Run in Terminal" the terminal opens and immediately closes.

Couple things I tried:
-Getting rid of the ".Silent:" line at the beginning of Makefile, thinking it was causing the terminal to not show me what's happening
-open the directory in the terminal and using the "exec" command, which I believe runs things as a program(just guessing though!)- as soon as I used the command on Makefile terminal closed

Any ideas? Possibly related to me running a VM?

EDIT: Had to use the "make" command inside the directory. Still new to Linux obviously. I wonder why running the Makefile itself didn't work though?

8. Originally Posted by bobrocks95
Ah, very nice to know that all this effort hasn't been in vain!

Speaking of which, I got the script you provided Bat Rastard to work, and was able to compile my own copy of Open PS2 Loader finally! Only problem is: that was the unedited one! So following the guide, I created a new directory and cloned the regular source(rather than any betas or other custom builds), then went in and made the control change to the padhook.h file, then double-clicked on Makefile- and whoops, no pop-up, it only opens in the text editor. So after some more fiddling I found the "Allow executing file as program" option in the properties window. And after that, every time I double-click on it and select "Run in Terminal" the terminal opens and immediately closes.

Couple things I tried:
-Getting rid of the ".Silent:" line at the beginning of Makefile, thinking it was causing the terminal to not show me what's happening
-open the directory in the terminal and using the "exec" command, which I believe runs things as a program(just guessing though!)- as soon as I used the command on Makefile terminal closed

Any ideas? Possibly related to me running a VM?

EDIT: Had to use the "make" command inside the directory. Still new to Linux obviously. I wonder why running the Makefile itself didn't work though?
best way I use
open terminal
make clean (Gets rid of the old)
make ( should compile with changes)

what most people do is
make rebuild (this cleans and recompiled together)

9. EDIT: Yup, must've been it... Had to re-run the entire SDK install script :\
What might've happened there is when the install script called the "ps2sdk-ports" script, it didn't grab and build FreeType. Re-running the SDK install script was probably overkill (probably only needed to execute the update script), but at least it worked itself out.

So after some more fiddling I found the "Allow executing file as program" option in the properties window. And after that, every time I double-click on it and select "Run in Terminal" the terminal opens and immediately closes.
What's happening here is Mercurial treating you like a leper. When OPL is build from the "install.opl" script, ownership and permissions will be given to root right along with Trusted status for Mercurial. Thus when you change the permissions of the update-opl script to "Allow executing file as program", and double-click it, the process is being executed under your username. Mercurial doesn't know you from Adam, returns a "this user is not trusted" error but Terminal simply opens and closes so fast you can't see it ...

Solution is easy:

(2) open Terminal; cut and paste the following ...

Code:
\$ hg clone https://bitbucket.org/ifcaro/open-ps2-loader
Manually cloning the repo in this way grants your user account "Trusted" status with Mercurial, and also solves the "root:root" ownership issue with the "open-ps2-loader" folder tree. From there, double-clicking the "update-opl" script and choosing "Run In Terminal" should work - i.e. updates are pulled, opl re-compiled, terminal window closes automatically when finished. But the problem there is since you're modifying padhook.c, you're better off doing as Rand said above (i.e. "make rebuild" from the OPL folder) in order to avoid the rebuild script reverting you edits to padhook.c or worse Linux cobbling together some whacked out merge that won't compile (because the phrase "----merge" got injected into the file) ...

10. Member
Join Date
Jul 2013
Posts
13
0
0
Mentioned
0 Post(s)
Tagged