Sunday, September 07, 2008

OpenSUSE 11.0 on the PlayStation 3

I recently decided to do something crazy and install OpenSUSE 11.0 on my PlayStation 3.. Believe me, its Wow!! Before SUSE, i tried Yellow Dog Linux 6.0 and it sucked!! YDL had poor performance on my machine..


Motivation:

Sony made provisions in the PS3 for installing and booting other operating systems. Aside from fact that it seemed like a cool thing to do I also thought that after doing the Linux install I might be able to play all the video formats like mpeg, xvid etc.

Method:

I downloaded OpenSUSE 11.0 PPC DVD and burned it to a re-writable DVD.

Setup:

Obviously I used a PlayStation 3. It was connected to a 32" Samsung Series 5 LCD HDTV using the HDMI (High-Definition Multimedia Interface) cable and the resolution of that output was set on the PS3 to 1080p (this is not relevant to the install since you have to pick the resolution)

I also decided to splurge and get a Wireless USB keyboard and mouse (Rs.1500/-). I don’t happen to own any USB keyboards so I needed to get one anyhow and I figured life would be much easier if I could do everything from the couch. I was right. The wireless USB keyboard and mouse just plugged into the PS3 and worked. Simple as that. And as a bonus they work both in the Linux OS as well as the default PS3 OS.

Drawbacks:

You must reformat your PS3 hard drive before doing the install. This means you could loose a lot of data including saved game data as well as installed and downloaded games. However there is a simple backup mechanism in the PS3 which allows you to save this data to a USB key. As a worse case scenario you can re-download your games.

On the PS3, select: Settings -> System Settings -> Backup before you start.

The other drawback is that the install can take a long time which means you can’t play your PS3 while your waiting which is what I normally do when installing systems.

Steps:

I have incorporated most everything from these instructions on the “official” page located here:

http://en.opensuse.org/Playstation.

However this page is a bit less “official” and has a bit more detail.

Post Install Video Resolution:

After the install, the default resolution is insanely small. You have to manually edit the /etc/kboot.conf file so it looks like this

default=openSuSE
timeout=20
openSuSE="/dev/ps3da5:/vmlinux initrd=/dev/ps3da5:/initrd quiet panic=42 sysrq=1 video=ps3fb:mode:5"

The mode is based on this table from the PS3 Linux Starter Kit docs.

============================================
YUV 60Hz 1:480i 2:480p 3:720p 4:1080i 5:1080p
YUV 50Hz 6:576i 7:576p 8:720p 9:1080i 10:1080p
RGB 60Hz 33:480i 34:480p 35:720p 36:1080i 37:1080p
RGB 50Hz 38:576i 39:576p 40:720p 41:1080i 42:1080p
VESA 11:WXGA 12:SXGA 13:WUXGA
============================================
full screen mode: + 128
dither ON mode : + 2048

So for example, 1080p = 5, + Full screen = 128, total 133.

Multimedia Support:

With proper installation of OpenSUSE 11.0 you should be able to play Mp3 formats without any error but most of the video formats wont be playable. Don't get down, just click Packman for PPC and you will find audio and video players like Mplayer, vlc Player, xine, XMMS, Rhythmbox, Amarok etc which can play most of the formats known to Mankind.. ;)

Supported media formats ( Courtesy: Wiki )

============================================
Physical media
============================================

* CD
* DVD

============================================
Container formats
============================================

* 3GP
* AVI
* ASF
* FLV
* Matroska
* MOV (QuickTime)
* MP4
* NUT
* Ogg
* OGM
* RealMedia

============================================
Video formats
============================================

* Cinepak
* DV
* H.263
* H.264/MPEG-4 AVC
* HuffYUV
* Indeo
* MJPEG
* MPEG-1
* MPEG-2
* MPEG-4 Part 2
* RealVideo
* Sorenson
* Theora
* WMV

============================================
Audio formats
============================================

* AAC
* AC3
* ALAC
* AMR
* FLAC
* Intel Music Coder
* Monkey's Audio
* MP3
* RealAudio
* Shorten
* Speex,
* Vorbis
* WMA

============================================
Subtitle formats
============================================

* AQTitle
* ASS/SSA
* CC
* JACOsub
* MicroDVD
* MPsub,
* OGM
* PJS
* RT
* Sami
* SRT
* SubViewer
* VOBsub
* VPlayer

============================================

Friday, September 05, 2008

PlayStation 3 or Xbox 360??

This is still a question in my mind.. But all i can say is PS3 is really worth for the money i lost.. I took it at Sony World for Rs. 25,000/- for which i got Rs. 3,000/- worth Grand Theft Auto 4 Blu-ray disc.



Whats there in PS3 which is not there in Xbox 360:

1) No HDMI support.

2) No Blu-ray player.

3) Can't install an operating system. This itself is a dealbreaker.. ;)



PlayStation 3 Specifications:

=============================
CPU: Cell Processor
=============================

* PowerPC-base Core @3.2GHz
* 1 VMX vector unit per core
* 512KB L2 cache
* 7 x SPE @3.2GHz
* 7 x 128b 128 SIMD GPRs
* 7 x 256KB SRAM for SPE
* 1 of 8 SPEs reserved for redundancy total floating point performance: 218 GFLOPS

=============================
GPU: RSX @550MHz
=============================

* 1.8 TFLOPS floating point performance
* Full HD (up to 1080p) x 2 channels
* Multi-way programmable parallel floating point shader pipelines

=============================
Sound:
=============================

* Dolby 5.1ch
* DTS
* LPCM

=============================
Memory:
=============================

* 256MB XDR Main RAM @3.2GHz
* 256MB GDDR3 VRAM @700MHz

=============================
System Bandwidth:
=============================

* Main RAM: 25.6GB/s
* VRAM: 22.4GB/s
* RSX: 20GB/s (write) + 15GB/s (read)
* SB: 2.5GB/s (write) + 2.5GB/s (read)

System Floating Point Performance: 2 TFLOPS

=============================
Storage:
=============================

* HDD
* Detachable 2.5” HDD slot x 1

=============================
I/O:
=============================

* USB: Front x 4, Rear x 2 (USB2.0)
* Memory Stick: standard/Duo, PRO x 1
* SD: standard/mini x 1
* CompactFlash: (Type I, II) x 1

=============================
Communication:
=============================

* Ethernet (10BASE-T, 100BASE-TX, 1000BASE-T) x3 (input x 1 + output x 2)
* Wi-Fi: IEEE 802.11 b/g
* Bluetooth: Bluetooth 2.0 (EDR)

=============================
Controller:
=============================

* Bluetooth (up to 7)
* USB2.0 (wired)
* Wi-Fi (PSP®)
* Network (over IP)

=============================
AV Output:
=============================

* Screen size: 480i, 480p, 720p, 1080i, 1080p
* HDMI: HDMI out x 2
* Analog: AV MULTI OUT x 1
* Digital audio: DIGITAL OUT (OPTICAL) x 1

=============================
CD Disc media (read only):
=============================

* PlayStation CD-ROM
* PlayStation 2 CD-ROM
* CD-DA (ROM), CD-R, CD-RW
* SACD Hybrid (CD layer), SACD HD
* DualDisc (audio side), DualDisc (DVD side)

=============================
DVD Disc media (read only):
=============================

* PlayStation 2 DVD-ROM
* PLAYSTATION 3 DVD-ROM
* DVD-Video: DVD-ROM, DVD-R, DVD-RW, DVD+R, DVD+RW

=============================
Blu-ray Disc media (read only):
=============================
* PLAYSTATION 3 BD-ROM
* BD-Video: BD-ROM, BD-R, BD-RE

=============================

Samsung S5

After a research of about 3 months finally decided to go for Samsung Series 5 LCD HDTV (LA32A550P1) for my room. I took it for Rs. 55,000/- with which i got a Pebble DVD Player (DVD-F1080) worth Rs. 5,900/- absolutely free.. ;)

Take a look at specification ( Courtesy: Samsung )

============================
VIDEO
============================

. Size : 81cm (32)
. Resolution : 1920 x 1080
. Dynamic Contrast Ratio : 15,000:1
. Viewing Angle : 178°/178° (H/V)

Viewing angle is defined as the maximum visibility covering total Angle in horizontal & vertical direction from a display panel, with minimum loss of color shade & contrast of the Image. The measuring standard is normally taken from the centre of the display.

. Response Time : 5ms
. DNIe™ : DNIe +

The input signal passes through a series of four advanced processors, 1. Motion Optimizer 2. Contrast Enhancer 3. Detail Enhancer 4. Color Optimizer. That forms the core of the DNIe™ technology.

. Brightness : 500nit
. Backlight : CCFL

============================
AUDIO
============================

. Sound Output (RMS) : 10W x 2
. Sound Effect System : SRS TrusurroundXT
. Input & Output (Side) HDMI : 1

High-Definition Multimedia Interface (HDMI) is quickly becoming the standard for connecting high-definition home Theater components. HDMI is the only interface in consumer electronics that can carry both uncompressed high-definition video and Uncompressed Two-channel audio in all HD formats (720p, 1080i and even 1080p). HDMI carries all Digital Video and Audio channels in a single cable to connect any HDMI-enabled source device to a Display System.

. composite (AV) : 1
. S-Video : 1

S-Video expanded as Super Video, where the Picture resolution is Superior to Composite Video. H-Resolution can be as much as 400 Lines. A special cable with 2-Core shielded wire is used with 4-Mini DIN socket. S-Video Socket The video signal is split into 2-sections as: a) Y - Luminance (B&W + Control Signal) & b) C - Chrominance (Color Signal) Normally such high quality video is not available from common CTV or VCR or VCD Players.

. Headphone : 1

============================
Cabinet
============================

. Swivel (left/right) : Yes

============================
Feature
============================

. Picture-in-Picture : 1 Tuner PIP
. Sleep Timer : Yes
. Clock & On/Off timer : Yes
. Still Picture : No
. Auto Channel Search : Yes
. Auto Power Off : Yes
. Auto Volume Leveller : Yes

The advantage of ‘Auto Volume Leveler’ is to maintain a similar sound output level on each channel, provided the Volume Bar Graph is set at same value for each of the selected channels. There should be minimum variation in sound level during the commercial break & advertisement etc. Even the performance is optimized while changing 1-Channel to another

. Anynet+ (HDMI-CEC) : Yes
. Movie Plus : Yes
. TTXT : Yes

============================
System
============================

. Colour system : PAL Multi
. Power : Free

============================
Dimension
============================

. Set size (WXHXD) with stand : 865.0 x 561.0 x 220.0mm
. Set size(WXHXD) without stand : 865.0 x 499.8 x 79.0mm
. Package(WXHXD) : 981.0 x 196.0 x 711.0mm

============================
Weight
============================

. Set weight with stand : 13.7Kg
. Set weight without stand : 11.8Kg
. Package weight : 18.7Kg

============================
Accessory
============================

. Wall Mount : Auto
. Remote Controller : TM96B
. Batteries : AAA Type
. ANT- Cable : No
. Power Cable : Yes

============================
Input & Output(Back)
============================

. RF Input : 1
. Component(Y/Pb/Pr) : 2
. S-Video : No
. Headphone : No
. Composite(AV) : 1
. HDMI : 2
. PC input (D-sub) : 1
. Video Monitor out, L/R : 1 (Audio Only)
. RS232C (for Service only) : 1

============================
Power consumption
============================

. Operation power consumption : 180W
. Stand-By power consumption : 1W

============================

Best Features:

Linux based operating system inside along with new innovation called WiseLink.

About WISELINK - music and photo on TV:



The WISELINK connection allows you to share music and photos with those who are closest to you. By simply using the USB 2.0 interface you can delight your friends and family with the things that delight you.

Saturday, February 09, 2008

Intuit.. Applied as a fresher.

It was on Friday at 11AM.. I thought it was a GOOD Friday for me as i was confident that i will clear the interview but unfortunately it wasn't.. I reached the Company at 10.35AM.. Vijay Dixit (contact person whom i had to meet) came at around 10.50AM with a Question paper and the same was asked to complete in 1 hour.. I was left alone in a meeting room..

-----------------------------------------------------------
Round 1) Written Test:

The Question paper consisted of 12 questions which consisted of
1-5 Marks question,
4-3 Marks questions,
1-2 Marks question and
6-1 Mark questions.
-----------------------------------------------------------

I answered almost all the questions except 2-1 Marks questions and 5 Marks question partially.. Anyway, i cleared written round and within 15 minutes i was started off with the technical interview.

Chandru, the guy who came to walk me through the technical interview for me entered the room.. He asked me whether i have some water or coffee.. I replied "Yes, Water would do good as i dint had my breakfast in the morning".. He gave a gentle smile and took me to an area where i had water.. I was relaxed.. Then we went back to the meeting room.. He asked me to take my seat after which i did the same.. He gave a small introduction about himself saying his name is Chandru, joined Intuit recently 2 months before etc..

-----------------------------------------------------------
Round 2) Technical Interview:

There was a question in the written round which asked to give an algorithm to get the mirror tree from the given tree.. Chandru asked me to write a program in any language for the same.. Since i was not sure about the traversing i told him that i am not sure about coding..
Code for Mirror the tree:
-----------------------------------------------------------
/*
Change a tree so that the roles of the
left and right pointers are swapped at every node.

So the tree...
| 4
| / \
| 2 5
| / \
| 1 3

is changed to...
| 4
| / \
| 5 2
| / \
| 3 1
*/
void mirror(struct node* node) {
if (node==NULL) {
return;
}
else {
struct node* temp;

// do the subtrees
mirror(node->left);
mirror(node->right);

// swap the pointers in this node
temp = node->left;
node->left = node->right;
node->right = temp;
}
}

-----------------------------------------------------------
Then he asked me about JVM, i answered.. He was not satisfied.. I din't know what he was expecting me to answer, so i asked him what exactly he was expecting me to answer.. He replied anything.. Next, he asked me to Reverse the words in a given sentence, i repeat he asked me to reverse the words not the character.. Say suppose the given sentence is "India is a great country" the output should be "Country great a is India".. I came up with an answer how to solve the problem.. But he asked me to code it.. Since i had no practice of coding for a long time i couldn't code.. Next i was given a puzzle.. There are 50 floors in a building and i have given with two glass balls, how do i find from which floor the glass balls break when i drop it.. I came up with the answer saying Linear search, Binary search and some more Methodologies.. But he was not satisfied.. I don't know what he thinks about himself.. He was not satisfied with any of my answers.. I wonder whether he was expecting me to be better than him in Coding.. I know he is an X-Employee of Microsoft, but he had no need to show it off..
Anyway, for Reversing the words in a given sentence the code is as follows..

-----------------------------------------------------------
In C:
-----------------------------
#include"stdio.h"
#include"stdlib.h"

int reverse(char *string, char delimiter)
{
char *src, *dest;
char *temp = string;

while( *temp )
{
if (*temp == delimiter)
{
temp++;
continue;
}

src=dest=temp;
while ( (*(dest+1) != delimiter) && ( *(dest+1) != '\0' ))
dest++;
temp=dest+1;
while( dest > src )
{
char tmp = *dest;
*dest = *dest-- *src;
*src = *src++ tmp;
}
}
return 0;
}

int main()
{
char name[] = "India is a great country";
printf("%s\n",name);
reverse(name,' '); /* Space as delimiter, Reverse Words */
printf("%s\n",name);
reverse(name,'\n'); /* Reverse Complete Sentence */
printf("%s\n",name);
}
-----------------------------
In C++
-----------------------------
#include
#include
using namespace std;
int main()
{
char str[]="India is a great country";

string ans;
int n=0;
while(str[n]!='\0')
n++;
bool flag=true;
for(int i=n-1;i>=0;i--)
{
if(str[i]==' ')
{
int m=i+1;
string temp;
while(str[m]!=' ' && m < n)
{
temp+=str[m];
m++;
}
if(flag)
{
ans+=temp;
flag=false;
continue;
}
if(flag==false)
{
ans+=' ';
ans+=temp;
}
}
}

cout << ans;
system("pause");
return 0;
}
---------------------------
In Java
---------------------------
import java.util.*;
public class StringReverseWord {

private static void doStringReverseWord() {

String a = "India is a great Country";
Stack stack = new Stack();
StringTokenizer tempStringTokenizer = new StringTokenizer(a);

while (tempStringTokenizer.hasMoreTokens()) {
stack.push(tempStringTokenizer.nextElement());
}

System.out.println("\nOriginal string: " + a);

System.out.print("Reverse word string: ");
while(!stack.empty()) {
System.out.print(stack.pop());
System.out.print(" ");
}

System.out.println("\n");
}
public static void main(String[] args) {
doStringReverseWord();
}

}

-----------------------------------------------------------
After the Technical round Vijay Dixit came in and told me that i was done with the Interview and i can move.. I just asked him about the Discussion round with the Manager which was mentioned in the mail.. He told me that it has been skipped.. I was sure then that i dint clear.. I was DISAPPOINTED..
I believe in:
"CODING IS NOT THAT IMPORTANT.. PEOPLE WHO KNOW TO CODE MIGHT NOT BE ABLE TO ANALYZE THE PROBLEM AND COME OUT WITH A RIGHT SOLUTION BUT PEOPLE WHO CAN ANALYZE THE PROBLEM CAN CODE IT.."
"WE CAN LEARN CODING BUT NOT THE THINKING CAPACITY AND CAPABILITY"
"CODE CAN BE REUSED BUT WE SHOULD BE KNOWING HOW DO WE DO THAT!!"
I dint even had my lunch as i was feeling low.. Later, Vijay Dixit asked me to stay saying that i would be having Discussion with the Manager.. I got some hopes..
-----------------------------------------------------------
Round 3) Discussion with the Manager.

Balaji, the manager, was looking Handsome and Smart.. We went to a meeting room at about 1:30PM.. He asked me about the work type at Infosys and what do i do there.. He then asked me to pick up a topic so that we can have a great discussion.. I picked JAVA.. As Java is vast, he asked me to pick some particular topic in it.. I picked up Inheritance.. So, he asked me to write a code in Java to connect to the database and execute a simply select query.. I was not sure about the code as i used to reuse the code and never byheart..

Code is as:
---------------------------
Connection connection=null;
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
connection=DriverManager.getConnection("Host Details","Host Name","Password");
Statement statement = connection.createStatement();

if (connection==null)
{
out.println("error");
}
PreparedStatement preparedStatement = connection.prepareStatement("Query goes here");
ResultSet resultSet = preparedStatement.executeQuery();
}
---------------------------
Then i took Data Structures as a topic.. He asked me when do i use Arrays and when do i use Linked Lists.. I answered, Arrays are used when the data has to be accessed randomly and Linked Lists are used when the data can be accessed sequentially.. But i forgot to mention that Arrays are used for Static declaration and Linked Lists are used for Dynamic declaration.. Finally, i took Virtual functions as a topic for discussion.. I explained him with diagrams.. I explained him about "Diamond of Death", the need for Virtual Functions, Object Infrastructure and Virtual Table.. Then we discussed about a couple of problems from the question paper.. He told he was impressed.. I felt happy.. I forgot to show him couple of Excellent feedbacks which i received from the customer at Infosys which i had it in my file.. He told me that he was done with the interview and do i have anything to ask.. I just smiled and asked him how my performance was.. He replied saying i would be knowing about my performance.. I told, To me i did good but with your perception it might be different.. He just smiled and asked me to wait as Vijay Dixit would be contacting me..
I really enjoyed having discussion with Balaji.. He is really GREAT guy to meet.. I was impressed the way he spoke etc..
-----------------------------------------------------------

I was waiting for Vijay Dixit.. He came and told me that i was done with the interview.. I just asked him when do i get to know about the results, whether they would mail me or they would give me a ring.. He told me that he would let me know about the results by any means of communication on Monday.. I just came out with colors..

But the same night, i got to know that i haven't cleared as i didn't do any of the coding stuff.. I never knew they would expect me to know the coding for a fresher role.. I was disappointed.. Whats in MY hands?? Had a nice Experience, i learnt from it.. Anyways, now BYHEARTING some code snippets so that when i go again i can just put it down on a PAPER.. It MATTERS for them.. ;) WATEVER HAPPENS is for GOOD.. Believe they don't DESERVE ME.. Thats ATTITUTE, Never get it DOWN.. :)