2013-04-01

How I finally got PS3 Media Server to work again

After many curse words I finally managed to find out why my PS3 could not find my PS3 Media Server (PS3MS).

This is the background for my scenario:

  • Running Windows 7 64-bit
  • In PS3MS traces, this text is shown : Access granted to /192.168.1.132 (my ps3 ip)
  • On PS3, I see Windows Media Server but no PS3MS
  • When I turn off windows firewall they find eachother
  • Turning it back on and looking at the pfirewall.log file (C:\windows\system32\logfiles\firewall\) with every log setting enabled I see that TCP-connections to port 5001 are dropped
  • After a lot of guessing. googling and bruteforce attempts, it turns out that those drops are due to calls to "javaw.exe".
Solution:
For me it was inbound connections that were dropped. When looking at inbound rules for Windows Firewall advanced settings.

I had all the regular things enabled (java.exe, PS3 Media server.exe and what not...)

I had the following items as blocked on my inbound rules:
TCP C:\program files (x86)\java\jre6\bin\javaw.exe
UDP C:\program files (x86)\java\jre6\bin\javaw.exe

I enabled those applications for port 5001 on the interface "Local Area Network" and I finally got a connection.

Also, make sure that C:\windows\syswow64\java.exe is enabled.

Me guessing on why this happens:
As I understand it, it seems like the issue is that PS3 Media Server is using the java binaries to handle network communication. Thus even if PS3MS is allowed communication through firewall the communication will still be dropped. Worst part is that all of this information and all this blocking is hidden for the user making it close to impossible to understand why something was blocked...

2013-03-12

Change language in SimCity

So, I got a bit sad after installing SimCity and I found out that I got it in Swedish.

I contacted Origin and they said that there is no way to change the localization/language setting. Well, turns out there is, but it requires some manual work (been working for me at least). I sat down with a colleague and started looking for localization settings and we found the following stuff...

We basically wanted to go from Swedish to English and this is how we did it...


  1. Insert disc containing data (you will need to get the dll-files from somewhere and I wont publish it)
  2. open up SimCity.zip (found on disc) in winrar or some other program
    1. copy the wanted GDFBinary_*.dll file to your "origin games\simcity" folder (gameFolder)
    2. in zip file, navigate to SimCityData\Locale\
      1. copy appropriate language folder into gameFolder\SimCity\Locale
      2. copy same language folder into gameFolder\SimCityData\Locale
    3. in zip file, navigate to SimCityRecovery\Locale\
      1. copy appropriate language folder into gameFolder\SimCityRecovery\Locale
  3. enter 'regedit' through start menu\run
    1. navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Maxis\SimCity
      1. change GDFBinary to your wanted dll-file (E:\games\SimCity\GDFBinary_en_US.dll)
      2. change locale to wanted language en_US

Enjoy!



2013-02-19

Interesting reads

This will be a short post and just a link to some fun stuff I've been running into:

Regular Expression crossword puzzle : http://boingboing.net/2013/02/11/regular-expressions-crossword.html
Evolution of UX Design : http://carynvainio.com/?p=1233

2013-01-30

Inspirational body weight exercices

Hmmm, note to self, if I ever find myself thinking that you can't workout at home, check out this video


Let the workout session commence...

2013-01-03

OpenOffice alternate background color on rows

Thought I'd write down a short post on how to do this thing, I've been wondering for a long time and finally took the time to figure out how to actually do it.

The easiest way I found was to goto Format/Conditional Formatting change to "Formula is" and then write ISEVEN(ROW()) and then change the style to something interesting.

The end result? I made it so each even row got a light cyan blue, and the spread sheet was waaaaaay easier to read :)

2012-12-10

Caching loaded images in AS3

Link to example project
Link to stack overflow

So, I read this question on StackOverflow about a guy who wanted to load images several times but didn't want to have them placed inside a swf-file or a swc-file (or rather wanted to have the swc created at runtime).

Storing images inside a cache in that way isn't super easy so I thought I would give it a try and see how a solution to that would work. I started out with a simple Static ImageManager but shortly found that it wasn't nearly as easy as I first thought it would be due to race conditions and as3 being rather limited to how you can work with loaded content, queuing loads etc.

I ended up creating two classes and an extra Main-class to provide as an example:

ImageManager (static class, keeps url as id for the image sand stores loaded images bitmapdata)
FileLoader (dynamic instances, does the actual load of objects and then notifies when it is done)

Since there is no easy way of storing files on this blog, I had to create some online storage service [chose Skybox today].

Anyways, here is the link to my example project, source code is "pasted" below for "completeness" if you just wanna see the files and don't wanna download the entire project.

Main.as - link to pastie
ImageManager.as - link to pastie
FileLoader.as - link to pastie

2012-12-06

Online code editor

So, today I was trying to figure out what type of resolutions that were used on android devices. And I ran into the following list:



1   2560*1600
2   1366*768
3   1280*800
4   1280*768
5   1024*768
6   1024*600
7   960*640
8   960*540
9   854*480
10  800*600
11  800*480
12  800*400
13  640*360
14  640*240
15  480*320
16  400*240
17  320*240
And as usual I needed to do something with this list, such as counting out the aspect ratio for those resolutions into something similar to 4:3 or 16:9 or whatever the end result would be. For a long time I've been looking into some quick way to do this without having to create a project, creating files, building html web page with included JS etc. And today I found it by googling for "online code browser" and spending time in actually evaluating the results.


The end result was a webpage called JSBin, where it is possible to just mash down some js-script and then run it automatically.

No code hinting (unfortunately) but it gets the job down and, the end result was this super nice and clean code:

var input = ["1   2560*1600","2   1366*768","3   1280*800","4   1280*768","5   1024*768",
"6  1024*600","7   960*640","8   960*540","9   854*480","10  800*600","11  800*480",
"12  800*400","13  640*360","14  640*240","15  480*320","16  400*240","17  320*240"]

 for(var i=0; i < input.length; ++i) {
      var s = input[i].split(" ");
      for(var j=0; j < s.length; ++j) {
        if(j > 0 && s[j]) {
          console.log("resolution=" + s[j] + " - Ratio: " + s[j].split("*")[0] / s[j].split("*")[1]);
        }
      }      
    }

You can find the editor on jsbin.com and my super nice code should be available at http://jsbin.com/omiyik/22/edit. Now, assuming no one breaks it it should give you this output:

  • "resolution=2560*1600 - Ratio: 1.6"
  • "resolution=1366*768 - Ratio: 1.7786458333333333"
  • "resolution=1280*800 - Ratio: 1.6"
  • "resolution=1280*768 - Ratio: 1.6666666666666667"
  • "resolution=1024*768 - Ratio: 1.3333333333333333"
  • "resolution=1024*600 - Ratio: 1.7066666666666668"
  • "resolution=960*640 - Ratio: 1.5"
  • "resolution=960*540 - Ratio: 1.7777777777777777"
  • "resolution=854*480 - Ratio: 1.7791666666666666"
  • "resolution=800*600 - Ratio: 1.3333333333333333"
  • "resolution=800*480 - Ratio: 1.6666666666666667"
  • "resolution=800*400 - Ratio: 2"
  • "resolution=640*360 - Ratio: 1.7777777777777777"
  • "resolution=640*240 - Ratio: 2.6666666666666665"
  • "resolution=480*320 - Ratio: 1.5"
  • "resolution=400*240 - Ratio: 1.6666666666666667"
  • "resolution=320*240 - Ratio: 1.3333333333333333"