<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>soledad penadés &#187; psp</title>
	<atom:link href="http://soledadpenades.com/tag/psp/feed/" rel="self" type="application/rss+xml" />
	<link>http://soledadpenades.com</link>
	<description>repeat 4[fd 100 rt 90]</description>
	<lastBuildDate>Wed, 25 Apr 2012 21:10:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Back to Java (for Android)</title>
		<link>http://soledadpenades.com/2009/08/24/back-to-java-for-android/</link>
		<comments>http://soledadpenades.com/2009/08/24/back-to-java-for-android/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 21:32:17 +0000</pubDate>
		<dc:creator>sole</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[psp]]></category>

		<guid isPermaLink="false">http://soledadpenades.com/?p=1283</guid>
		<description><![CDATA[Some months ago I began tinkering with programming for PSP. I installed the toolchain and all that, but kind of abandoned it because although the ps2dev guys created a really nice environment to develop in, it still felt bad and precarious in a certain manner: whatever you did was in a way illegal. You had [...]]]></description>
			<content:encoded><![CDATA[<p>Some months ago I began tinkering with programming for PSP. I installed the <a href="http://soledadpenades.com/2008/09/01/installing-the-psp-toolchain-in-ubuntu/">toolchain</a> and all that, but kind of abandoned it because although the ps2dev guys created a really nice environment to develop in, it still felt bad and precarious in a certain manner: <strong>whatever you did was in a way illegal</strong>. You had to jailbreak your PSP for installing custom software and so had to do the potential users of your application. And it didn&#8217;t feel right to be programming for a platform whose creator (Sony) doesn&#8217;t want you to program for &#8212; unless you pay them a license, I guess. On the other hand, <strong>developing for iPhone is definitively a no-go area for me</strong>, as you might already have deducted from my <a href="http://soledadpenades.com/2009/06/19/bits-bites-2/">previous</a> posts on this subject.</p>
<p>Then, Ricardo <a href="http://ricardocabello.com/blog/post/668">got an Android</a> phone a few weeks ago and began programming for it. Yesterday, somehow I thought: <q>And why not?</q> I wasn&#8217;t aware that it was <em>that</em> easy to get started, and I am very pleased to have been proved otherwise: I downloaded the SDK and began following the guides and more or less <strong>had a grasp of how to build my first app in just few hours</strong>. Compared with building something for PSP, it is actually a bless. I do not know how does it compare with programming for iPhone, but from my experience with Cocoa, Objective C and XCode, I am sure it is much better. If only morally speaking and because one does not need to use the cumbersome [ brackets : everywhere syntax [here : with more [brackets : ha! ] ] or the infamous and opaque Apple developer docs.</p>
<p>It&#8217;s been a very very long time since I last did any Java programming &#8211;OK, actually it is not <em>that long</em>, only five years, but that, in Internet time, is definitely <em>a lot</em> of time&#8211;, and hence my ability to combine layers and layers of code to form what I used to call <q>the archetypal Java onion</q> is a little bit rusty.</p>
<p>So I am all the time <del datetime="2009-08-24T20:58:53+00:00">looking for information</del> googling for this and that, since I don&#8217;t remember well certain things, other have changed, some features are not implemented or are slightly different in the Android platform, and finally, in other cases, my mind is <em>intoxicated</em> with other languages and I tend to think that if something is available in language X there will probably be something like that in Java.</p>
<p>And there I was, looking for some info regarding File separators, when I found <a href="http://mrtextminer.wordpress.com/2007/10/02/java-programming-backslash-vs-forward-slash-and-windows-vs-linux/">this guy</a> suggesting the use of File.separator. <q>Of course!</q>, I thought <q>that&#8217;s the least one should do</q>. In fact, I was looking for an equivalent of Python&#8217;s <em>os.path.join</em>, which I happen to find very convenient, so this wasn&#8217;t exactly what I expected to find. Anyway, I kept reading the comments and suddenly <strong>got hit where it truly hurts</strong>:</p>
<blockquote><p>What about properties file?</p></blockquote>
<p>says <a href="http://mrtextminer.wordpress.com/2007/10/02/java-programming-backslash-vs-forward-slash-and-windows-vs-linux/#comment-215">that comment</a>. Ouch, that really HURT.</p>
<p><strong>This was one of the main reasons why I disliked Java programming</strong>. The tons of property files scattered all around the project, for configuring all sorts of stuff which could be deducted sometimes or that wasn&#8217;t actually needed in fact, but was there, due to lazy habits, or just out of ignorance. And XML databases, and a myriad more horrors created by <strong>unexperienced bad Java consultants</strong>. Not that I was the Best Java Programmer EVER, but I certainly noticed the <a href="http://www.codinghorror.com/blog/archives/000589.html">code smells</a>, which is undoubtedly the first step towards better coding.</p>
<p>Fortunately, <strong>things seem to have changed a lot since then. For good</strong>: my development computer is amazingly fast (back then, I was assigned a rheumatic Pentium III at 550MHz with a ridiculous 64M of memory and 6 Gb disk &#8211; of which only 0.5 were actually free: you <em>had</em> to use headphones to prevent your ears from being mercilessly hammered with page-swapping noises). And in the software front, the Android SDK is very nice and well thought (or at least it seems so, at first sight). The emulator &#8212; I love it! <strong>That&#8217;s where the whole concept of Java demonstrates its power</strong>, since being a virtual machine, it can be executed everywhere, whether it is the actual phone or the emulator.</p>
<p>I also like the idea that <strong>you can get really dirty</strong> &#8211;programmatically speaking, that is&#8211; and optimize certain parts of the code with C or assembly. Of course, then you can instantly forget about portability aspirations (since it will get compiled for an specific processor, i.e. ARM), but if required, could be done.</p>
<p>Being <em>day number 1 of Android programming</em>, I still feel a tad lost, and some things do not make much sense <em>yet</em> (for example: the easiness with which the applications get terminated when an error is encountered, although it is understandable in a limited resources environment such as a phone) but I am finding my way around.</p>
<p>Expect to find some Android related posts here from now on :-)</p>
 <p><a href="http://soledadpenades.com/?flattrss_redirect&amp;id=1283&amp;md5=944d5d28531e4367683be1a3b5096a9c" title="Flattr" target="_blank"><img src="http://soledadpenades.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://soledadpenades.com/2009/08/24/back-to-java-for-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=8399&amp;amp;url=http%3A%2F%2Fsoledadpenades.com%2F2009%2F08%2F24%2Fback-to-java-for-android%2F&amp;amp;language=en_GB&amp;amp;category=text&amp;amp;title=Back+to+Java+%28for+Android%29&amp;amp;description=Some+months+ago+I+began+tinkering+with+programming+for+PSP.+I+installed+the+toolchain+and+all+that%2C+but+kind+of+abandoned+it+because+although+the+ps2dev+guys+created+a+really+nice+environment+to+develop+in%2C+it+still+felt+bad+and+precarious+in+a+certain+manner%3A+whatever+you+did+was+in+a+way+illegal.+You+had+to+jailbreak+your+PSP+for+installing+custom+software+and+so+had+to+do+the+potential+users+of+your+application.+And+it+didn%27t+feel+right+to+be+programming+for+a+platform+whose+creator+%28Sony%29+doesn%27t+want+you+to+program+for+--+unless+you+pay+them+a+license%2C+I+guess.+On+the+other+hand%2C+developing+for+iPhone+is+definitively+a+no-go+area+for+me%2C+as+you+might+already+have+deducted+from+my+previous+posts+on+this+subject.%0D%0A%0D%0AThen%2C+Ricardo+got+an+Android+phone+a+few+weeks+ago+and+began+programming+for+it.+Yesterday%2C+somehow+I+thought%3A+And+why+not%3F+I+wasn%27t+aware+that+it+was+that+easy+to+get+started%2C+and+I+am+very+pleased+to+have+been+proved+otherwise%3A+I+downloaded+the+SDK+and+began+following+the+guides+and+more+or+less+had+a+grasp+of+how+to+build+my+first+app+in+just+few+hours.+Compared+with+building+something+for+PSP%2C+it+is+actually+a+bless.+I+do+not+know+how+does+it+compare+with+programming+for+iPhone%2C+but+from+my+experience+with+Cocoa%2C+Objective+C+and+XCode%2C+I+am+sure+it+is+much+better.+If+only+morally+speaking+and+because+one+does+not+need+to+use+the+cumbersome+%5B+brackets+%3A+everywhere+syntax+%5Bhere+%3A+with+more+%5Bbrackets+%3A+ha%21+%5D+%5D+or+the+infamous+and+opaque+Apple+developer+docs.%0D%0A%0D%0AIt%27s+been+a+very+very+long+time+since+I+last+did+any+Java+programming+--OK%2C+actually+it+is+not+that+long%2C+only+five+years%2C+but+that%2C+in+Internet+time%2C+is+definitely+a+lot+of+time--%2C+and+hence+my+ability+to+combine+layers+and+layers+of+code+to+form+what+I+used+to+call+the+archetypal+Java+onion+is+a+little+bit+rusty.%0D%0A%0D%0ASo+I+am+all+the+time+looking+for+information+googling+for+this+and+that%2C+since+I+don%27t+remember+well+certain+things%2C+other+have+changed%2C+some+features+are+not+implemented+or+are+slightly+different+in+the+Android+platform%2C+and+finally%2C+in+other+cases%2C+my+mind+is+intoxicated+with+other+languages+and+I+tend+to+think+that+if+something+is+available+in+language+X+there+will+probably+be+something+like+that+in+Java.%0D%0A%0D%0AAnd+there+I+was%2C+looking+for+some+info+regarding+File+separators%2C+when+I+found+this+guy+suggesting+the+use+of+File.separator.+Of+course%21%2C+I+thought+that%27s+the+least+one+should+do.+In+fact%2C+I+was+looking+for+an+equivalent+of+Python%27s+os.path.join%2C+which+I+happen+to+find+very+convenient%2C+so+this+wasn%27t+exactly+what+I+expected+to+find.+Anyway%2C+I+kept+reading+the+comments+and+suddenly+got+hit+where+it+truly+hurts%3A%0D%0A%0D%0AWhat+about+properties+file%3F%0D%0A%0D%0Asays+that+comment.+Ouch%2C+that+really+HURT.%0D%0A%0D%0AThis+was+one+of+the+main+reasons+why+I+disliked+Java+programming.+The+tons+of+property+files+scattered+all+around+the+project%2C+for+configuring+all+sorts+of+stuff+which+could+be+deducted+sometimes+or+that+wasn%27t+actually+needed+in+fact%2C+but+was+there%2C+due+to+lazy+habits%2C+or+just+out+of+ignorance.+And+XML+databases%2C+and+a+myriad+more+horrors+created+by+unexperienced+bad+Java+consultants.+Not+that+I+was+the+Best+Java+Programmer+EVER%2C+but+I+certainly+noticed+the+code+smells%2C+which+is+undoubtedly+the+first+step+towards+better+coding.%0D%0A%0D%0AFortunately%2C+things+seem+to+have+changed+a+lot+since+then.+For+good%3A+my+development+computer+is+amazingly+fast+%28back+then%2C+I+was+assigned+a+rheumatic+Pentium+III+at+550MHz+with+a+ridiculous+64M+of+memory+and+6+Gb+disk+-+of+which+only+0.5+were+actually+free%3A+you+had+to+use+headphones+to+prevent+your+ears+from+being+mercilessly+hammered+with+page-swapping+noises%29.+And+in+the+software+front%2C+the+Android+SDK+is+very+nice+and+well+thought+%28or+at+least+it+seems+so%2C+at+first+sight%29.+The+emulator+--+I+love+it%21+That%27s+where+the+whole+concept+of+Java+demonstrates+its+power%2C+since+being+a+virtual+machine%2C+it+can+be+executed+everywhere%2C+whether+it+is+the+actual+phone+or+the+emulator.%0D%0A%0D%0AI+also+like+the+idea+that+you+can+get+really+dirty+--programmatically+speaking%2C+that+is--+and+optimize+certain+parts+of+the+code+with+C+or+assembly.+Of+course%2C+then+you+can+instantly+forget+about+portability+aspirations+%28since+it+will+get+compiled+for+an+specific+processor%2C+i.e.+ARM%29%2C+but+if+required%2C+could+be+done.%0D%0A%0D%0ABeing+day+number+1+of+Android+programming%2C+I+still+feel+a+tad+lost%2C+and+some+things+do+not+make+much+sense+yet+%28for+example%3A+the+easiness+with+which+the+applications+get+terminated+when+an+error+is+encountered%2C+although+it+is+understandable+in+a+limited+resources+environment+such+as+a+phone%29+but+I+am+finding+my+way+around.%0D%0A%0D%0AExpect+to+find+some+Android+related+posts+here+from+now+on+%3A-%29&amp;amp;tags=android%2Ciphone%2Cjava%2Cpsp%2Cblog" type="text/html" />
	</item>
		<item>
		<title>And now PSPLink!</title>
		<link>http://soledadpenades.com/2008/09/03/and-now-psplink/</link>
		<comments>http://soledadpenades.com/2008/09/03/and-now-psplink/#comments</comments>
		<pubDate>Wed, 03 Sep 2008 16:42:08 +0000</pubDate>
		<dc:creator>sole</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[psp]]></category>

		<guid isPermaLink="false">http://soledadpenades.com/?p=749</guid>
		<description><![CDATA[Messing with the memory stick is fine if you&#8217;re just going to do it a couple of times, but after a while it becomes tedious. At that point I decided I would try to make psplink work with my computer. It is another utility programmed by the superclever people at pspdev, and enables you to [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/imgs/psp_psplink_screenshot.png" alt="Screenshot from sprite sample" /></p>
<p>Messing with the memory stick is fine if you&#8217;re just going to do it a couple of times, but after a while it becomes tedious.</p>
<p>At that point I decided I would try to make psplink work with my computer. It is another utility programmed by the superclever people at pspdev, and enables you to control the psp and even use your computer&#8217;s hard drive as readable/writable by the console, so you don&#8217;t need to copy things to the GAME directory anymore.</p>
<p>The building process was quick and easy, although it could have been faster, if I hadn&#8217;t mistakenly gone into the <em>psplink</em> directory from pspsdk&#8217;s SVN repository (which is an older version), instead of going directly to the <em>psplinkusb</em> directory, which is the one that lets you do everything via the USB cable. Also, this version&#8217;s manual is a tad clearer and more explicit, so unless you have any odd interest in using the older version, go for the newest one, at <a href="svn://svn.ps2dev.org/psp/trunk/psplinkusb">svn://svn.ps2dev.org/psp/trunk/psplinkusb</a>.</p>
<p>Yes! no more messing with the memory stick! You can even reset the console or get an screenshot, like the one from the picture :-)</p>
 <p><a href="http://soledadpenades.com/?flattrss_redirect&amp;id=749&amp;md5=df46701a07ff473dad4e6c9be1af9741" title="Flattr" target="_blank"><img src="http://soledadpenades.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://soledadpenades.com/2008/09/03/and-now-psplink/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=8399&amp;amp;url=http%3A%2F%2Fsoledadpenades.com%2F2008%2F09%2F03%2Fand-now-psplink%2F&amp;amp;language=en_GB&amp;amp;category=text&amp;amp;title=And+now+PSPLink%21&amp;amp;description=%0D%0A%0D%0AMessing+with+the+memory+stick+is+fine+if+you%27re+just+going+to+do+it+a+couple+of+times%2C+but+after+a+while+it+becomes+tedious.%0D%0A%0D%0AAt+that+point+I+decided+I+would+try+to+make+psplink+work+with+my+computer.+It+is+another+utility+programmed+by+the+superclever+people+at+pspdev%2C+and+enables+you+to+control+the+psp+and+even+use+your+computer%27s+hard+drive+as+readable%2Fwritable+by+the+console%2C+so+you+don%27t+need+to+copy+things+to+the+GAME+directory+anymore.%0D%0A%0D%0AThe+building+process+was+quick+and+easy%2C+although+it+could+have+been+faster%2C+if+I+hadn%27t+mistakenly+gone+into+the+psplink+directory+from+pspsdk%27s+SVN+repository+%28which+is+an+older+version%29%2C+instead+of+going+directly+to+the+psplinkusb+directory%2C+which+is+the+one+that+lets+you+do+everything+via+the+USB+cable.+Also%2C+this+version%27s+manual+is+a+tad+clearer+and+more+explicit%2C+so+unless+you+have+any+odd+interest+in+using+the+older+version%2C+go+for+the+newest+one%2C+at+svn%3A%2F%2Fsvn.ps2dev.org%2Fpsp%2Ftrunk%2Fpsplinkusb.%0D%0A%0D%0AYes%21+no+more+messing+with+the+memory+stick%21+You+can+even+reset+the+console+or+get+an+screenshot%2C+like+the+one+from+the+picture+%3A-%29&amp;amp;tags=debug%2Cpsp%2Cblog" type="text/html" />
	</item>
		<item>
		<title>PSP joystick &amp; buttons</title>
		<link>http://soledadpenades.com/2008/09/02/psp-joystick-buttons/</link>
		<comments>http://soledadpenades.com/2008/09/02/psp-joystick-buttons/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 10:30:24 +0000</pubDate>
		<dc:creator>sole</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[cpp]]></category>
		<category><![CDATA[psp]]></category>
		<category><![CDATA[sdl]]></category>

		<guid isPermaLink="false">http://soledadpenades.com/?p=745</guid>
		<description><![CDATA[Following the installation of the toolchain, I decided to make a little program to get some information about the PSP&#8217;s interface, from the programmers point of view. That is, it would use SDL&#8217;s joystick functions to find out how many axis and buttons and which codes did they report to the program. Although it might [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/imgs/psp_01_buttons.jpg" alt="test output" /></p>
<p>Following the <a href="http://soledadpenades.com/2008/09/01/installing-the-psp-toolchain-in-ubuntu/">installation of the toolchain</a>, I decided to make a little program to get some information about the PSP&#8217;s interface, from the programmers point of view. That is, it would use SDL&#8217;s joystick functions to find out how many axis and buttons and which codes did they report to the program. Although it might seem useless it is an easy exercise in checking events and it could even be the base for a future game.</p>
<p>I first tested the program on my computer, using a Logitech USB pad that I have for playing emulators. I intended to use it for <em>real games</em> but I still haven&#8217;t found one which doesn&#8217;t use the mouse. By the way, the pad works flawlessly in linux, just in case you were looking for a compatible joystick for your linux box.</p>
<p>The pad reported as having six axes, where the axes corresponded to the two analog joysticks and one digital joystick (two axes per joystick: vertical and horizontal), so I was expecting to find a very similar result in the PSP, but with four axes since it only has two joysticks.</p>
<p><img src="/imgs/logitech_pad.jpg" alt="Logitech dual action pad" /></p>
<p>Instead, I got an interesting result: two axes only, and the rest were buttons! PSP is reporting the digital joystick as simply four isolated buttons. This, although being surprising, also makes much easier to program simple stuff where you just need to react when a button has been pressed, instead of having to check the value of the axis which is reporting motions, and deduct the appropriate intended direction from there.</p>
<p>I also noticed that the analog joystick can sometimes have a very erratic behaviour, reporting movements while no one is even touching the console. It might be because it&#8217;s not a brand new PSP and maybe there&#8217;s some dirt or something in the controls &#8230; or maybe we were experiencing a earthquake and nobody noticed? :)</p>
<p>For the record, these are the reported SDL button codes, so you can look for an <strong>SDL_JOYBUTTONDOWN</strong> type of event, and compare <strong>event.jbutton.button</strong> to the following values to decide what to do:</p>
<p>Left: 7<br />
Right: 9<br />
Up: 8<br />
Down: 6<br />
L: 4<br />
R: 5<br />
Triangle: 0<br />
Square: 3<br />
Circle: 1<br />
Cross: 2<br />
start: 11<br />
select: 10</p>
<p>I didn&#8217;t manage to read the other buttons, they seem to be out of the reach of SDL. Maybe it&#8217;s got something to do with kernel/user mode, but it doesn&#8217;t worry me for the time being.</p>
<p>If you want to try this at home &#8211; worry not, it&#8217;s safe and harmless! Here&#8217;s the <a href="http://github.com/sole/snippets/blob/master/psp/log_buttons/main.c">source code</a>. You&#8217;ll notice I also used the balls and hats functions, but I must confess that while I suspect that <em>balls</em> is referring to trackballs, I have no idea what <em>hats</em> is referring to. If anybody knows, let me know in the comments so that I can stop imagining a little Mexican hat dressing a gamepad :-D</p>
<p>Here&#8217;s also a possible sample output, using my logitech pad and pressing buttons and moving sticks randomly:</p>
<div class="syhi_block"><code>Index: 0<br />
Name: Logitech Logitech Dual Action<br />
Num axes: 6<br />
Num balls: 0<br />
Num hats: 0<br />
Num buttons: 12<br />
// moving the digital stick<br />
Axis motion: j index = 0 axis = 5 value = -32767<br />
Axis motion: j index = 0 axis = 5 value = 0<br />
Axis motion: j index = 0 axis = 5 value = 32767<br />
Axis motion: j index = 0 axis = 5 value = 0<br />
Axis motion: j index = 0 axis = 4 value = -32767<br />
Axis motion: j index = 0 axis = 4 value = 0<br />
Axis motion: j index = 0 axis = 4 value = 32767<br />
Axis motion: j index = 0 axis = 4 value = 0<br />
// moving analog sticks, note the values aren't &quot;all, minus all or nothing&quot; here<br />
// you should get similar values with the psp's analog stick<br />
Axis motion: j index = 0 axis = 0 value = 337<br />
Axis motion: j index = 0 axis = 0 value = 1013<br />
Axis motion: j index = 0 axis = 0 value = 2026<br />
Axis motion: j index = 0 axis = 0 value = 4053<br />
Axis motion: j index = 0 axis = 0 value = 5742<br />
Axis motion: j index = 0 axis = 0 value = 7094<br />
Axis motion: j index = 0 axis = 0 value = 10134<br />
Axis motion: j index = 0 axis = 0 value = 13174<br />
Axis motion: j index = 0 axis = 0 value = 15877<br />
Axis motion: j index = 0 axis = 0 value = 19593<br />
Axis motion: j index = 0 axis = 0 value = 22633<br />
Axis motion: j index = 0 axis = 0 value = 26349<br />
Axis motion: j index = 0 axis = 0 value = 30741<br />
Axis motion: j index = 0 axis = 0 value = 32767<br />
Axis motion: j index = 0 axis = 1 value = -1014<br />
Axis motion: j index = 0 axis = 1 value = -3379<br />
Axis motion: j index = 0 axis = 1 value = -4392<br />
Axis motion: j index = 0 axis = 1 value = -5743<br />
Axis motion: j index = 0 axis = 1 value = -7432<br />
Axis motion: j index = 0 axis = 1 value = -9121<br />
Axis motion: j index = 0 axis = 1 value = -11486<br />
Axis motion: j index = 0 axis = 1 value = -13175<br />
Axis motion: j index = 0 axis = 1 value = -14189<br />
Axis motion: j index = 0 axis = 1 value = -16553<br />
Axis motion: j index = 0 axis = 1 value = -19932<br />
Axis motion: j index = 0 axis = 1 value = -22296<br />
Axis motion: j index = 0 axis = 1 value = -25337<br />
Axis motion: j index = 0 axis = 1 value = -28039<br />
Axis motion: j index = 0 axis = 1 value = -32767<br />
Axis motion: j index = 0 axis = 0 value = 25673<br />
Axis motion: j index = 0 axis = 0 value = 16890<br />
Axis motion: j index = 0 axis = 0 value = 8445<br />
Axis motion: j index = 0 axis = 0 value = 3378<br />
Axis motion: j index = 0 axis = 0 value = 1013<br />
Axis motion: j index = 0 axis = 0 value = 0<br />
Axis motion: j index = 0 axis = 1 value = -31755<br />
Axis motion: j index = 0 axis = 1 value = -27026<br />
Axis motion: j index = 0 axis = 1 value = -22296<br />
Axis motion: j index = 0 axis = 1 value = -13851<br />
Axis motion: j index = 0 axis = 1 value = -3379<br />
Axis motion: j index = 0 axis = 1 value = 0<br />
Axis motion: j index = 0 axis = 2 value = 3040<br />
Axis motion: j index = 0 axis = 2 value = 7769<br />
Axis motion: j index = 0 axis = 2 value = 10472<br />
Axis motion: j index = 0 axis = 3 value = -3041<br />
Axis motion: j index = 0 axis = 2 value = 13512<br />
Axis motion: j index = 0 axis = 3 value = -5068<br />
Axis motion: j index = 0 axis = 2 value = 16215<br />
Axis motion: j index = 0 axis = 3 value = -10473<br />
Axis motion: j index = 0 axis = 2 value = 19593<br />
Axis motion: j index = 0 axis = 3 value = -17229<br />
Axis motion: j index = 0 axis = 2 value = 22971<br />
Axis motion: j index = 0 axis = 3 value = -24661<br />
Axis motion: j index = 0 axis = 2 value = 26011<br />
Axis motion: j index = 0 axis = 3 value = -32767<br />
Axis motion: j index = 0 axis = 2 value = 28038<br />
Axis motion: j index = 0 axis = 2 value = 30741<br />
Axis motion: j index = 0 axis = 2 value = 31078<br />
Axis motion: j index = 0 axis = 2 value = 30065<br />
Axis motion: j index = 0 axis = 2 value = 28038<br />
Axis motion: j index = 0 axis = 2 value = 22295<br />
Axis motion: j index = 0 axis = 2 value = 15539<br />
Axis motion: j index = 0 axis = 2 value = 9458<br />
Axis motion: j index = 0 axis = 2 value = 3040<br />
Axis motion: j index = 0 axis = 2 value = 0<br />
Axis motion: j index = 0 axis = 2 value = -676<br />
Axis motion: j index = 0 axis = 2 value = -2365<br />
Axis motion: j index = 0 axis = 2 value = -3041<br />
Axis motion: j index = 0 axis = 2 value = -3716<br />
Axis motion: j index = 0 axis = 2 value = -4392<br />
Axis motion: j index = 0 axis = 2 value = -5068<br />
Axis motion: j index = 0 axis = 2 value = -7432<br />
Axis motion: j index = 0 axis = 2 value = -11148<br />
Axis motion: j index = 0 axis = 2 value = -13513<br />
Axis motion: j index = 0 axis = 2 value = -16216<br />
Axis motion: j index = 0 axis = 2 value = -18580<br />
Axis motion: j index = 0 axis = 2 value = -19932<br />
Axis motion: j index = 0 axis = 2 value = -21621<br />
Axis motion: j index = 0 axis = 3 value = -31755<br />
Axis motion: j index = 0 axis = 3 value = -27363<br />
Axis motion: j index = 0 axis = 3 value = -22972<br />
Axis motion: j index = 0 axis = 3 value = -19594<br />
Axis motion: j index = 0 axis = 3 value = -16216<br />
Axis motion: j index = 0 axis = 3 value = -15202<br />
Axis motion: j index = 0 axis = 3 value = -11824<br />
Axis motion: j index = 0 axis = 2 value = -19932<br />
Axis motion: j index = 0 axis = 3 value = -10135<br />
Axis motion: j index = 0 axis = 2 value = -18580<br />
Axis motion: j index = 0 axis = 3 value = -8784<br />
Axis motion: j index = 0 axis = 2 value = -14864<br />
Axis motion: j index = 0 axis = 3 value = -6419<br />
Axis motion: j index = 0 axis = 2 value = -8108<br />
Axis motion: j index = 0 axis = 3 value = -3041<br />
Axis motion: j index = 0 axis = 2 value = -676<br />
Axis motion: j index = 0 axis = 3 value = -1014<br />
Axis motion: j index = 0 axis = 2 value = 0<br />
Axis motion: j index = 0 axis = 3 value = 0<br />
// buttons!<br />
Pressed button 0<br />
Pressed button 1<br />
Pressed button 3<br />
Pressed button 2<br />
Pressed button 2<br />
Pressed button 1<br />
Pressed button 7<br />
Pressed button 5<br />
Pressed button 6<br />
Pressed button 4<br />
Pressed button 5<br />
Pressed button 4<br />
Pressed button 6<br />
Pressed button 9<br />
Pressed button 8</code></div>
 <p><a href="http://soledadpenades.com/?flattrss_redirect&amp;id=745&amp;md5=4eb0dee67a78723223350cee3bc337d5" title="Flattr" target="_blank"><img src="http://soledadpenades.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://soledadpenades.com/2008/09/02/psp-joystick-buttons/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=8399&amp;amp;url=http%3A%2F%2Fsoledadpenades.com%2F2008%2F09%2F02%2Fpsp-joystick-buttons%2F&amp;amp;language=en_GB&amp;amp;category=text&amp;amp;title=PSP+joystick+%26%23038%3B+buttons&amp;amp;description=%0D%0A%0D%0AFollowing+the+installation+of+the+toolchain%2C+I+decided+to+make+a+little+program+to+get+some+information+about+the+PSP%27s+interface%2C+from+the+programmers+point+of+view.+That+is%2C+it+would+use+SDL%27s+joystick+functions+to+find+out+how+many+axis+and+buttons+and+which+codes+did+they+report+to+the+program.+Although+it+might+seem+useless+it+is+an+easy+exercise+in+checking+events+and+it+could+even+be+the+base+for+a+future+game.%0D%0A%0D%0AI+first+tested+the+program+on+my+computer%2C+using+a+Logitech+USB+pad+that+I+have+for+playing+emulators.+I+intended+to+use+it+for+real+games+but+I+still+haven%27t+found+one+which+doesn%27t+use+the+mouse.+By+the+way%2C+the+pad+works+flawlessly+in+linux%2C+just+in+case+you+were+looking+for+a+compatible+joystick+for+your+linux+box.%0D%0A%0D%0AThe+pad+reported+as+having+six+axes%2C+where+the+axes+corresponded+to+the+two+analog+joysticks+and+one+digital+joystick+%28two+axes+per+joystick%3A+vertical+and+horizontal%29%2C+so+I+was+expecting+to+find+a+very+similar+result+in+the+PSP%2C+but+with+four+axes+since+it+only+has+two+joysticks.%0D%0A%0D%0A%0D%0A%0D%0AInstead%2C+I+got+an+interesting+result%3A+two+axes+only%2C+and+the+rest+were+buttons%21+PSP+is+reporting+the+digital+joystick+as+simply+four+isolated+buttons.+This%2C+although+being+surprising%2C+also+makes+much+easier+to+program+simple+stuff+where+you+just+need+to+react+when+a+button+has+been+pressed%2C+instead+of+having+to+check+the+value+of+the+axis+which+is+reporting+motions%2C+and+deduct+the+appropriate+intended+direction+from+there.%0D%0A%0D%0AI+also+noticed+that+the+analog+joystick+can+sometimes+have+a+very+erratic+behaviour%2C+reporting+movements+while+no+one+is+even+touching+the+console.+It+might+be+because+it%27s+not+a+brand+new+PSP+and+maybe+there%27s+some+dirt+or+something+in+the+controls+...+or+maybe+we+were+experiencing+a+earthquake+and+nobody+noticed%3F+%3A%29%0D%0A%0D%0AFor+the+record%2C+these+are+the+reported+SDL+button+codes%2C+so+you+can+look+for+an+SDL_JOYBUTTONDOWN+type+of+event%2C+and+compare+event.jbutton.button+to+the+following+values+to+decide+what+to+do%3A%0D%0A%0D%0ALeft%3A+7%0D%0ARight%3A+9%0D%0AUp%3A+8%0D%0ADown%3A+6%0D%0AL%3A+4%0D%0AR%3A+5%0D%0ATriangle%3A+0%0D%0ASquare%3A+3%0D%0ACircle%3A+1%0D%0ACross%3A+2%0D%0Astart%3A+11%0D%0Aselect%3A+10%0D%0A%0D%0AI+didn%27t+manage+to+read+the+other+buttons%2C+they+seem+to+be+out+of+the+reach+of+SDL.+Maybe+it%27s+got+something+to+do+with+kernel%2Fuser+mode%2C+but+it+doesn%27t+worry+me+for+the+time+being.%0D%0A%0D%0AIf+you+want+to+try+this+at+home+-+worry+not%2C+it%27s+safe+and+harmless%21+Here%27s+the+source+code.+You%27ll+notice+I+also+used+the+balls+and+hats+functions%2C+but+I+must+confess+that+while+I+suspect+that+balls+is+referring+to+trackballs%2C+I+have+no+idea+what+hats+is+referring+to.+If+anybody+knows%2C+let+me+know+in+the+comments+so+that+I+can+stop+imagining+a+little+Mexican+hat+dressing+a+gamepad+%3A-D%0D%0A%0D%0AHere%27s+also+a+possible+sample+output%2C+using+my+logitech+pad+and+pressing+buttons+and+moving+sticks+randomly%3A%0D%0A%0D%0A%0D%0AIndex%3A+0%0D%0AName%3A+Logitech+Logitech+Dual+Action%0D%0ANum+axes%3A+6%0D%0ANum+balls%3A+0%0D%0ANum+hats%3A+0%0D%0ANum+buttons%3A+12%0D%0A%2F%2F+moving+the+digital+stick%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+5+value+%3D+-32767%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+5+value+%3D+0%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+5+value+%3D+32767%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+5+value+%3D+0%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+4+value+%3D+-32767%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+4+value+%3D+0%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+4+value+%3D+32767%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+4+value+%3D+0%0D%0A%2F%2F+moving+analog+sticks%2C+note+the+values+aren%27t+%22all%2C+minus+all+or+nothing%22+here%0D%0A%2F%2F+you+should+get+similar+values+with+the+psp%27s+analog+stick%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+0+value+%3D+337%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+0+value+%3D+1013%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+0+value+%3D+2026%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+0+value+%3D+4053%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+0+value+%3D+5742%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+0+value+%3D+7094%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+0+value+%3D+10134%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+0+value+%3D+13174%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+0+value+%3D+15877%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+0+value+%3D+19593%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+0+value+%3D+22633%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+0+value+%3D+26349%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+0+value+%3D+30741%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+0+value+%3D+32767%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+1+value+%3D+-1014%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+1+value+%3D+-3379%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+1+value+%3D+-4392%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+1+value+%3D+-5743%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+1+value+%3D+-7432%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+1+value+%3D+-9121%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+1+value+%3D+-11486%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+1+value+%3D+-13175%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+1+value+%3D+-14189%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+1+value+%3D+-16553%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+1+value+%3D+-19932%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+1+value+%3D+-22296%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+1+value+%3D+-25337%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+1+value+%3D+-28039%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+1+value+%3D+-32767%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+0+value+%3D+25673%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+0+value+%3D+16890%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+0+value+%3D+8445%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+0+value+%3D+3378%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+0+value+%3D+1013%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+0+value+%3D+0%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+1+value+%3D+-31755%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+1+value+%3D+-27026%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+1+value+%3D+-22296%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+1+value+%3D+-13851%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+1+value+%3D+-3379%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+1+value+%3D+0%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+3040%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+7769%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+10472%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+3+value+%3D+-3041%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+13512%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+3+value+%3D+-5068%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+16215%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+3+value+%3D+-10473%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+19593%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+3+value+%3D+-17229%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+22971%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+3+value+%3D+-24661%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+26011%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+3+value+%3D+-32767%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+28038%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+30741%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+31078%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+30065%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+28038%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+22295%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+15539%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+9458%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+3040%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+0%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+-676%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+-2365%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+-3041%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+-3716%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+-4392%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+-5068%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+-7432%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+-11148%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+-13513%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+-16216%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+-18580%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+-19932%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+-21621%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+3+value+%3D+-31755%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+3+value+%3D+-27363%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+3+value+%3D+-22972%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+3+value+%3D+-19594%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+3+value+%3D+-16216%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+3+value+%3D+-15202%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+3+value+%3D+-11824%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+-19932%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+3+value+%3D+-10135%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+-18580%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+3+value+%3D+-8784%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+-14864%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+3+value+%3D+-6419%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+-8108%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+3+value+%3D+-3041%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+-676%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+3+value+%3D+-1014%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+2+value+%3D+0%0D%0AAxis+motion%3A+j+index+%3D+0+axis+%3D+3+value+%3D+0%0D%0A%2F%2F+buttons%21%0D%0APressed+button+0%0D%0APressed+button+1%0D%0APressed+button+3%0D%0APressed+button+2%0D%0APressed+button+2%0D%0APressed+button+1%0D%0APressed+button+7%0D%0APressed+button+5%0D%0APressed+button+6%0D%0APressed+button+4%0D%0APressed+button+5%0D%0APressed+button+4%0D%0APressed+button+6%0D%0APressed+button+9%0D%0APressed+button+8%0D%0A&amp;amp;tags=cpp%2Cpsp%2Csdl%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Installing the PSP toolchain in Ubuntu</title>
		<link>http://soledadpenades.com/2008/09/01/installing-the-psp-toolchain-in-ubuntu/</link>
		<comments>http://soledadpenades.com/2008/09/01/installing-the-psp-toolchain-in-ubuntu/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 10:38:37 +0000</pubDate>
		<dc:creator>sole</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[psp]]></category>
		<category><![CDATA[toolchains]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://soledadpenades.com/?p=743</guid>
		<description><![CDATA[(As all the guides I found out there were either outdated or specific to windows/cygwin, I decided to put this here just so that I remember how to do this next time I have to install the toolchain on another computer :-) ) First, check out the toolchain sources from svn://svn.ps2dev.org/psp/trunk/psptoolchain into say ~/tmp/psptoolchain: mkdir [...]]]></description>
			<content:encoded><![CDATA[<p><em>(As all the guides I found out there were either outdated or specific to windows/cygwin, I decided to put this here just so that I remember how to do this next time I have to install the toolchain on another computer :-) )<br />
</em></p>
<p>First, check out the toolchain sources from <strong>svn://svn.ps2dev.org/psp/trunk/psptoolchain</strong> into say ~/tmp/psptoolchain:</p>
<div class="syhi_block"><code><span style="color: #c20cb9; font-weight: bold;">mkdir</span> ~<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>psptoolchain<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>psptoolchain<br />
<span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #c20cb9; font-weight: bold;">co</span> <span style="color: #c20cb9; font-weight: bold;">svn</span>:<span style="color: #000000; font-weight: bold;">//</span>svn.ps2dev.org<span style="color: #000000; font-weight: bold;">/</span>psp<span style="color: #000000; font-weight: bold;">/</span>trunk<span style="color: #000000; font-weight: bold;">/</span>psptoolchain .</code></div>
<p>Notice the <strong>svn://</strong> and not <strong>http://</strong>, most tutorials are still using http://svn&#8230; and it won&#8217;t work.</p>
<p>Now read ~/tmp/psptoolchain/readme-ubuntu.txt. It tells you to make sure you have a series of packages installed; a pity they forgot to add a couple of packages (libmpfr-dev and libgmp3-dev). This is the full, updated list of packages to install:</p>
<div class="syhi_block"><code><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> build-essential <span style="color: #c20cb9; font-weight: bold;">autoconf</span> <span style="color: #c20cb9; font-weight: bold;">automake</span> <span style="color: #c20cb9; font-weight: bold;">bison</span> <span style="color: #c20cb9; font-weight: bold;">flex</span> \<br />
&nbsp; libncurses5-dev libreadline-dev libusb-dev texinfo libmpfr-dev \<br />
&nbsp; libgmp3-dev</code></div>
<p>with that and following the remaining instructions in the readme-ubuntu.txt file you should be able to get the toolchain installed in your computer. It will take some time depending on your processor etc, on my powerpc mac it takes a lot of time (in the order of hours), whereas in my brand new ubuntu machine with quad processor it took ~25 minutes, if I remember correctly.</p>
<p>So once it finishes, everything will be installed at <strong>/usr/local/pspdev</strong>. You might want to create a shortcut to the samples, which are in <strong>/usr/local/pspdev/psp/sdk/samples</strong>, but have a look at the other folders anyway, since the .h files are in there too and it&#8217;s good to know what you&#8217;re dealing with.</p>
<p>And this is entirely <strong>optional</strong>, but if you want to install SDL and other libraries, the easiest way I found is to use their <strong>psplibraries</strong> script. It is hosted in the same SVN repository so you just need to check it out:</p>
<div class="syhi_block"><code><span style="color: #c20cb9; font-weight: bold;">mkdir</span> ~<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>psplibraries<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>psplibraries<br />
<span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #c20cb9; font-weight: bold;">co</span> <span style="color: #c20cb9; font-weight: bold;">svn</span>:<span style="color: #000000; font-weight: bold;">//</span>svn.ps2dev.org<span style="color: #000000; font-weight: bold;">/</span>psp<span style="color: #000000; font-weight: bold;">/</span>trunk<span style="color: #000000; font-weight: bold;">/</span>psplibraries .</code></div>
<p>Again, there&#8217;s a readme-ubuntu.txt file; you might need to install <strong>libtool</strong> as specified there, and after that, simply run the <strong>libraries-sudo.sh</strong> file and let it work for a while since it needs to grab the sources for the libraries and build them.</p>
<p>Once that is finished too, the libraries will be also ready for your consumption and linkage inside the <strong>/usr/local/pspdev</strong> folder too, so everything is nice and clean. The guys at <a href="http://ps2dev.org/">pspdev</a> did a good job, kudos to them!</p>
 <p><a href="http://soledadpenades.com/?flattrss_redirect&amp;id=743&amp;md5=fd48d55dab098c04c241d9adc2361eb4" title="Flattr" target="_blank"><img src="http://soledadpenades.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://soledadpenades.com/2008/09/01/installing-the-psp-toolchain-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>43</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=8399&amp;amp;url=http%3A%2F%2Fsoledadpenades.com%2F2008%2F09%2F01%2Finstalling-the-psp-toolchain-in-ubuntu%2F&amp;amp;language=en_GB&amp;amp;category=text&amp;amp;title=Installing+the+PSP+toolchain+in+Ubuntu&amp;amp;description=%28As+all+the+guides+I+found+out+there+were+either+outdated+or+specific+to+windows%2Fcygwin%2C+I+decided+to+put+this+here+just+so+that+I+remember+how+to+do+this+next+time+I+have+to+install+the+toolchain+on+another+computer+%3A-%29+%29%0D%0A%0D%0A%0D%0AFirst%2C+check+out+the+toolchain+sources+from+svn%3A%2F%2Fsvn.ps2dev.org%2Fpsp%2Ftrunk%2Fpsptoolchain+into+say+%7E%2Ftmp%2Fpsptoolchain%3A%0D%0A%0D%0A%0D%0Amkdir+%7E%2Ftmp%2Fpsptoolchain%0D%0Acd+%7E%2Ftmp%2Fpsptoolchain%0D%0Asvn+co+svn%3A%2F%2Fsvn.ps2dev.org%2Fpsp%2Ftrunk%2Fpsptoolchain+.%0D%0A%0D%0A%0D%0ANotice+the+svn%3A%2F%2F+and+not+http%3A%2F%2F%2C+most+tutorials+are+still+using+http%3A%2F%2Fsvn...+and+it+won%27t+work.%0D%0A%0D%0ANow+read+%7E%2Ftmp%2Fpsptoolchain%2Freadme-ubuntu.txt.+It+tells+you+to+make+sure+you+have+a+series+of+packages+installed%3B+a+pity+they+forgot+to+add+a+couple+of+packages+%28libmpfr-dev+and+libgmp3-dev%29.+This+is+the+full%2C+updated+list+of+packages+to+install%3A%0D%0A%0D%0A%0D%0A+sudo+apt-get+install+build-essential+autoconf+automake+bison+flex+%5C%0D%0A++libncurses5-dev+libreadline-dev+libusb-dev+texinfo+libmpfr-dev+%5C%0D%0A++libgmp3-dev%0D%0A%0D%0A%0D%0Awith+that+and+following+the+remaining+instructions+in+the+readme-ubuntu.txt+file+you+should+be+able+to+get+the+toolchain+installed+in+your+computer.+It+will+take+some+time+depending+on+your+processor+etc%2C+on+my+powerpc+mac+it+takes+a+lot+of+time+%28in+the+order+of+hours%29%2C+whereas+in+my+brand+new+ubuntu+machine+with+quad+processor+it+took+%7E25+minutes%2C+if+I+remember+correctly.%0D%0A%0D%0ASo+once+it+finishes%2C+everything+will+be+installed+at+%2Fusr%2Flocal%2Fpspdev.+You+might+want+to+create+a+shortcut+to+the+samples%2C+which+are+in+%2Fusr%2Flocal%2Fpspdev%2Fpsp%2Fsdk%2Fsamples%2C+but+have+a+look+at+the+other+folders+anyway%2C+since+the+.h+files+are+in+there+too+and+it%27s+good+to+know+what+you%27re+dealing+with.%0D%0A%0D%0AAnd+this+is+entirely+optional%2C+but+if+you+want+to+install+SDL+and+other+libraries%2C+the+easiest+way+I+found+is+to+use+their+psplibraries+script.+It+is+hosted+in+the+same+SVN+repository+so+you+just+need+to+check+it+out%3A%0D%0A%0D%0A%0D%0Amkdir+%7E%2Ftmp%2Fpsplibraries%0D%0Acd+%7E%2Ftmp%2Fpsplibraries%0D%0Asvn+co+svn%3A%2F%2Fsvn.ps2dev.org%2Fpsp%2Ftrunk%2Fpsplibraries+.%0D%0A%0D%0A%0D%0AAgain%2C+there%27s+a+readme-ubuntu.txt+file%3B+you+might+need+to+install+libtool+as+specified+there%2C+and+after+that%2C+simply+run+the+libraries-sudo.sh+file+and+let+it+work+for+a+while+since+it+needs+to+grab+the+sources+for+the+libraries+and+build+them.%0D%0A%0D%0AOnce+that+is+finished+too%2C+the+libraries+will+be+also+ready+for+your+consumption+and+linkage+inside+the+%2Fusr%2Flocal%2Fpspdev+folder+too%2C+so+everything+is+nice+and+clean.+The+guys+at+pspdev+did+a+good+job%2C+kudos+to+them%21&amp;amp;tags=psp%2Ctoolchains%2Cubuntu%2Cblog" type="text/html" />
	</item>
	</channel>
</rss>

