Turning a laptop into a desktop

January 21, 2015

Alright, so this post is going to be quite long. Basically, what I’ve been doing the past 4 days is to migrate the internals of a HP Envy 17 2001tx laptop into a desktop casing (AVF).

Why am I going down this path? The HP Envy 17 has to be the worst engineered laptop in the history of HP (it even had class action lawsuits filed against it). The bloody thing would overheat to 80 degrees celsius when on idle after a couple of minutes.

Please take note, this was just a very quick DIY. There was no real planning involved except “what size casing will we need to fit the motherboard in?”.

Instead of throwing it out, I attempted to breathe new life into it. My dad was very eager to use his power tools as well, so we cooperated in the process.

The locations of the screws on the back:

After unscrewing the screws, it’s time to remove the harddrives. They are connected via a single SATA cable, both of differing lengths.

The sata cable has a black plastic piece on top of it, which is meant to be pulled. It is connected to the motherboard in a downwards motion.

Now it’s time to unplug the Wifi module and remove it.

Notice the two small cables have a numbering on them. It’s important to reconnect them later with the right numbers (thankfully the module has the numbers written on it in white).

The cables are removed by pulling them upwards. I recommend doing it gently, and with the aid of a screwdriver or flathead to slowly remove them from their positions.

Now that they are removed, you’ll need to unscrew the 2 black screws that connect it to the motherboard. After unscrewing, you’ll notice it rises. That’s ok and normal.

The Wi-Fi module removed completely will look like the above.

Now, it’s time to unscrew the hidden screws beneath the rubber stamp legs. For these, use a flathead or toothpick-like tool to pry them from the body. They are connected to the body via glue.

Finally, the bottom should look like the following with everything unscrewed and removed (no need to remove the RAM).

Now, moving on to the top part, we first need to remove the keyboard.

To remove the keyboard, all screws underneath need to be removed. If it still feels like it’s being held strongly, then there might be a screw not yet removed. The idea behind removing the keyboard is to push at the spaces on the top part, until the entire top is free, and to pull towards the screen. This is because the bottom has metal potrusions to hold it in place ( I just pulled it from all directions, since it wasn’t going back into the laptop body).

There will be four cables to remove before pulling off the top cover.

The first two will be the keyboard and touchpad connectors, as seen below:

These parts are pretty easy to remove. just slowly unclip the top black or white plastic holder, and slide the cable out via the blue plastic meant for fingers.

You’ll want to remove the other keyboard connector, it’s a small orange cable to the top right. You’ll also notice there was one screw in the center that holds the keyboard in.

Don’t forget to remove the power switch cable connector on the top left. It’s a small blue-ish cable.

Now, we are ready to start peeling off the top cover. You’ll need something to get between the crevices to pull it off, but once you get one clip to unhook it should be straight forward.

Now, it’s time to remove the rest of the power cables and connectors so we can pull out the main motherboard unit. There’s also two additional screws.

First, remove the card reader cable connector.

Then, unscrew the BD-Rom drive and pull it to the right to dislodge it from the motherboard (there’s no cables for this).

Unplug the speakers/LED power.

The monitor is attached to the motherboard via a single cable that branches out into two connectors.

You’ll want to pull the white cable branch to the left to remove it from its place.

The other branch just needs to be pulled upwards to disconnect it.

Lastly, remove the power cable that connects the power brick to the motherboard. It’s this small white 8-pin cable.

Now, the unit is removable from the body.

The mess we’ve made so far, before we start cleaning the parts and moving them into a new house.

Now, onto the cleaning! The most important part to clean is the cooler. This unit connects to the CPU and GPU in one go.

I went with this thermal paste (Cooler Master E1 IC ESSENTIAL Thermal compound) as it was affordable, and it came with grease which really helped with the cleaning process.

I forgot to take pictures of the unscrewing and cleaning, but basically you’ll want to unscrew 7 screws (4 for the CPU, 3 for the GPU). After which, remove all previous grey/white thermal compound. You’ll know they did a shoddy job, if the thermal paste isn’t only on the shiny parts, but also on the green sections around the metal encasings (it shouldn’t be that way).

All spick and span, you’ll want it to be shiny enough that it looks like a mirror.

Don’t forget to clean the bottom parts of the copper cooler as well! Don’t leave any of the old thermal residue there.

Unscrewing the fan and it showcases that HP didn’t actually test this against massive dust build up. They didn’t even have the courtesy to make it easy to clean for end-users.

So, now that it’s all cleaned let’s put a single drop of thermal compound on each die. The CPU die cover will require a slightly larger drop, but basically you want to make sure it won’t leak over to the edges. Only apply the thermal compound to the onboard CPU and GPU, no need to put any on the cooler. Now, put the cooler back on and screw it in.

Alright! Cleaning is done, let’s get that new fang-dangled case ready for a new tenant.

Why’d I go with this case? As you’ll see later on, the area for cable management allowed me to do some pretty unorthodox installing of this mobo into it. REMEMBER! It’s a laptop, so both sides of the motherboard has connectors. You’ll need to figure out how to make sure both sides get the cables that they need connected.

We used a black & decker drill to make the holes in the casing, so that I could screw the motherboard in. 2 was more than sufficient (it’s a light motherboard).

One thing became apparent, we would need the power switch from the laptop to be able to turn this unit on. So, it was time to saw the piece off.

At this point, it had been over 12 hours on working with this. My mind was starting to wander, and I’d forget to take pictures often. Apologies in advance for missing information.

We were able to fit the motherboard in nicely, and the two harddrives fit as well. One had to be screwed onto the casing’s motherboard wall section (the SATA cable connector was too short). The other fit snugly in the actual HDD compartment.

After connecting the power switch, we’re basically holding it on the back of the case via sticky tape. Later on we’ll actually make a hole in the back casing cover and slip this guy into it to look slightly less hideous.

For the monitor, since the laptop monitor was still good, we detached it from the laptop body and drilled holes into the sides of the casing to get it to fit.

The Wi-Fi dongle is in this monitor, so you’ll need it anyway to get the in-built Wi-Fi working.

Plugging in the power, we ran it to see if it would start. Lo and behold! It works!

The Windows install was corrupted though, and the HDD’s RAID mode was the cause. So I had to disable that.

This is where the power brick connects to. I forgot to take pictures of the process, but it’s pretty straight forward. The white 8-pin power connector stretches out over a cable length and then connects directly to the HP power brick.

After having Windows 7 poop it’s pants, I needed to confirm if the hardware was actually faulty. Ubuntu 14.10 64bit to the rescue!

My younger brother then tested it for a couple of hours, and confirmed no shutdowns due to overheating, no RAM issues (hanging, screen corruption). The HDDs seemed to be fine as well, as the SMART test inside Ubuntu showed them to be fully operational.

That was the end of day 1! So, what took the other 3 days time? Installing Windows 7. I’ll give you a hint. Don’t use the original Windows 7 ISO, instead use a SP1 version. On top of that, if you find that using a disc or USB drive isn’t working, then you’ll have to go through the hell I did.

I extracted the 7 SP1 ISO into a folder, used Windows Updates Downloader to slipstream the DEC 2014 updates into the ISO. ( I followed this guide http://www.sevenforums.com/installation-setup/282232-test-update-7-installation-media.html ) Then, I went to the HP driver page and downloaded the necessary storage, wifi, and USB drivers. I used NTLite to slipstream those drivers into that same ISO.

After which, I just simply copied it (the extracted version) into a pendrive, plugged it into the USB2.0 slot, and finally Windows 7 would install. Pretty difficult, compared to installing Ubuntu 14.10. I just plugged my Ubuntu USB into any of the USB slots, booted it up and installed it. (HP Envy 17 wasn’t built to run Ubuntu, yet here we are)

If you’re looking for NTLite, get it here:

https://www.ntlite.com/download/

If you’re looking for Windows Updates Downloader, get it here: http://www.windowsupdatesdownloader.com/

If you’re looking for Ubuntu (it’s free), get it here:

http://www.ubuntu.com/download

So, was this a professional DIY? Not by any means. In fact, this was probably the most adventurous DIY project I’ve ever done. What matters though, is that we now have a working computer, and it’s able to operate at it’s full power.


Compiling VoglPerf on Ubuntu 14.10

January 16, 2015

Well, whilst taking a short break from designing my inventory, weapon, and attribute systems for my little game, I’ve been doing some game benchmark videos pitting Windows against Ubuntu.

In this quest, it usually helps to have a suitable FPS OSD. On Windows, most often it will be MSI Afterburner or FRAPS. On Ubuntu, I have the choice of GLXOSD (preferred), Valve’s VoglPerf and Steam’s own Beta FPS counter.

The issue today is that I can’t seem to get GLXOSD to cleanly inject itself into Dota 2 for some tasty benchmarking. Thus, I have to resort to using VoglPerf, which is really aimed at developers who want to pinpoint where in their game performance is lost, and why. (Take note that VoglPerf only works with games that are on Steam)

I just need the FPS counter.

That said, after downloading VoglPerf from Github here, we can get started:

https://github.com/ValveSoftware/voglperf/archive/0.2.zip

Please note that this guide will work on Ubuntu 14.04 and 15.04 as well. I’ve tested it myself.

I usually just extract it to my desktop, so that’s where all my terminals will point to later when compiling VoglPerf.

First off, you’ll need a couple of dependencies. I recommend installing them one-by-one to see if any issues arise or Ubuntu is unable to find them. To install the following, just simply open a terminal and enter them. Let’s get started on how to compile Voglperf on Ubuntu.

SHORTCUT: INSTALLING THE DEPENDENCIES IN ONE GO

If you can’t be bothered with entering the following one-by-one, and want to get it over with quickly, then just copy this into a terminal, hit Enter, enter your password, and hit y to agree. It should install all required dependencies in one go:

sudo apt-get install build-essential cmake mesa-common-dev libc6-dev-i386 gcc-4.9-multilib g++-4.9-multilib lib32ncurses5-dev

INSTALLING THE DEPENDENCIES ONE-BY-ONE

It’s always best to start with the essentials, and so I usually do this:

sudo apt-get install build-essential

Now, for the required dependencies:

sudo apt-get install cmake

If you get the error regarding

fatal error: GL/glx.h: No such file or directory #include <GL/glx.h>

then you need mesa-common-dev:

sudo apt-get install mesa-common-dev

If you get the error regarding

fatal error: sys/cdefs.h: No such file or directory #include <sys/cdefs.h>

then you need libc6-dev-i386:

sudo apt-get install libc6-dev-i386

If you get the error regarding

fatal error: bits/c++config.h: No such file or directory #include <bits/c++config.h

then you need gcc-4.9-multilib and g++-4.9-multilib:

sudo apt-get install gcc-4.9-multilib g++-4.9-multilib

Moving on, it also looks like you’ll need the following if you’re compiling on a 64bit system and you’re trying to compile VoglPerf64 (although most games on Steam are 32bit binaries, so I believe the most useful version is VoglPerf32 regardless of your system’s architecture):

sudo apt-get install lib32ncurses5-dev

You’ll know if you need the above, when trying to compile and you get the following error:

Linking CXX executable /home/ismail/Desktop/voglperf-0.2/bin/voglperfrun64
/usr/bin/ld: cannot find -ltinfo
collect2: error: ld returned 1 exit status

COMPILING VOGLPERF

Now that you have the required dependencies installed, let’s actually compile VoglPerf so we can use it. Open a new terminal, and CD to your VoglPerf folder. For me that would be:

cd '/home/ismail/Desktop/voglperf-0.2'

Protip: After typing cd and hitting the space bar, simply drag and drop your Voglperf folder into the terminal and it will autocomplete the entire directory path to the folder. Very neat, and seriously saves time.

Once I’m in, I have the choice of doing one of three things. I can either compile both the 32bit version and 64bit version, or I can compile each one one-by-one. I chose to simply compile only the 64bit one so that I may trace any problems easily. So, to compile both, all you would do is:

make

If you’re looking to just compile the 32bit version, then do the following in the same terminal:

make voglperf32

For the 64bit version, do the following in the same terminal:

make voglperf64

If you compiled successfully, it should look something like the following:

Now, please take note that after you’ve compiled a build, that folder will be in the voglperf folder. You’re building to the same folder you’re taking the source from. What this means is that, if you want to start fresh, or have made changes to the code, I recommend deleting the build folder (aptly named build32 for the 32bit version, and build64 for the 64bit version) before compiling a new build.

After all that compiling, you can find what you’ve built in the bin folder inside the voglperf folder. After all, what you’ll be running is the executable (which should be voglperfrun32 or voglperfrun64). You should have one of either of these, or both like I do:

Also, if you feel uncomfortable using the terminal, for the most part you can make use of the Ubuntu Software Center to install the dependencies. For example:

Please note, that while my Ubuntu system was a fresh install, it may be possible that I’ve installed other required libraries or dependencies previously that I have forgotten about or unknowingly done so. If you find any dependencies not listed here, please feel free to comment and add them so that others may know what they are and how to resolve them.


Game Inventory

January 11, 2015

Well, since my last post, I went ahead and purchased the Ubuntu exporter for Game Maker. Now, I’m only waiting on the Steam keys to be distributed to me. Using the IDE outside of Steam is nice, but I don’t get that satisfaction of looking at the hours I’ve logged. Plus, Game Maker’s achievements are pretty neat too.

For the past week, I’ve been going through some basic inventory ideas. I’ve been trying to figure out everything from how to draw the inventory to the screen, to how to appropriately store and manage items in the inventory. Check out my initial ugly sketch, which I’m now continuing from as a base. Start with laziness, and proceed to professionalism.

I’ll admit, this is the first time I’m making use of a 2D array outside of a University project. When storing the objects picked up by the player in this global array, I store several pieces of information. Namely the following, albeit this will likely change in time, but for now does the trick:

I’ve realised that planning ahead is pretty important. Some things I needed to think of before getting down to code was:

1. The inventory needs to be able to receive items and delete items

2. Upon deleting items, instantiate that object back into the world.

3. Upon picking up item, select the correct sub-image with item from world.

4. Upon picking up item, instance_destroy() of the object in the world.

5. Does player simply colliding with object act as a pickup scenario, or should there be additional player input upon collision with item?

6. Upon mouse over, item slots in inventory need to be highlighted.

7. Upon mouse over, item descriptions need to be displayed.

8. Will there be drag and drop functionality? Or simply keyboard/mouse clicks to commence inventory actions like equip and drop?

After going through the above, I’ve covered how to do 1, 3, 4 and 6. I’m still going over how to get around to the others, but it should be trivial once I start going through the workflow process on paper (scribbling really helps me figure things out). The ability to have all the items that can be picked up as a child of a single object, and only test the player’s collision with this parent object really simplifies the logic.

You can see the implementation from art asset on the right, to implemented in code on the left in the following image (it’ll only appear if “I” has been pressed, and it also has highlightable inventory slots).

On top of coding though, since I’m alone in this, I also have to design my own art assets. As such, I’ve been going over some of the items that can be picked up. I’m currently in the process of creating higher resolution versions of the health items.

On an ending note, there’s been an interesting project that seems to have popped up in my newsfeed recently. It’s name is Enigma-Dev. Apparently, you can code and compile GML through this IDE, and the best part is that it’s multi-platform, open-source and free. However, as with most open projects, it’s still quite buggy(from what I’ve read). I’ll have to get around to trying it sooner or later. It could mean me continuing my development in Ubuntu exclusively, which would be cool.


GameMaker and more Game Development

January 2, 2015

During the past last week of Winter sales on Steam, I came across GameMaker Studio. This piece of software has been an amazing revelation to the way I was always attempting to make a 2D game!

In the past, I’ve given my time to game APIs like XNA 4, LOVE2D and Pygame (even did a 2D final year project in Unity). Whilst all of them were amazing in one way or the other (multi-platform support, ease of compiling/redistribution, forgiving EULAs), I would always start to delve too deep into technicality rather than on game mechanics and design. For example, it took me one month to cover the XNA basics to barely implement a week’s worth of game development to a one-level idea of a zombie top-down shooter (generic, I know, but a good place to start).

I ended up spending more time on how the sprites should be blitted, and what the most efficient method of performing them would be rather than on what added gameplay I could provide in my one-level game prototype. (It was a top down shooter, with the original plan being to implement different types of basic A.I. I only ever got around to doing chase). The picture below is of my XNA game running, controlled via keyboard and mouse.

Jumping into GameMaker, I figured a good test of how well this software might perform for my needs would be to simply remake that XNA top-down shooter in it. Lo and behold, within the same week of learning GameMaker I am already at 90% of the game I made in XNA. A look at the remake in GameMaker in the image below.

I am currently sitting down in front of my computer with the Professional version of GameMaker just bought, and am contemplating on whether I should grab the Ubuntu exporter before sale time runs out. The only reason I am contemplating, is that it’s rather pricey for an export function, and my YouTube funds have almost run dry for this month.

As can be seen in the picture below, I was able to add item drops on the map, a healthbar to the zombie, the ability to pickup the item drops, and even make the item drops scale up and down using a sinusoidal function (although it’s animation can’t be seen here). I am currently learning how to make an inventory, and it seems to be extremely more feasible than I ever thought.

In all honesty, I believe I may actually be able to develop a full small game that I can finally share around with my close friends to get some constructive criticism on without feeling too ashamed at what would previously be extremely shoddy work. I am aware that the art assets I make are of extremely poor quality, but I would be seeking feedback on gameplay and functionality instead (as has always been my goal).

To summarise, I feel that the following are very true when it comes to GameMaker Studio:

  1. GML is very easy to grasp if you’ve got a background in languages like C, C++, Javascript, C# and so on.
  2. The built-in sprite editor is an extremely powerful and time-saving tool.
  3. The documentation is in abundance and well organized.
  4. A great swathe of tutorials are available on Youtube, and ebooks are available from For Dummies, Apress and Packt.

5. The free Standard edition really lets you test everything out before convincing you to buy the Pro edition (for unlimited resources).


2014 workspace to 2015 workspace

January 2, 2015

Well, here’s a short post with two simple pictures. What my workplace looked like throughout 2014, and what it will now seemingly look like throughout the rest of 2015.

My 2014 workspace

My 2015 workspace

I am very grateful for all that I received in 2014, and I hope to be an even better person moving forward who will hopefully have earned all that he may come to receive.


Getting new hardware

December 27, 2014

It’s always a great start to a day when you know that new technology is on it’s way in the mail! Well, I recently had the pleasure of getting a few Playstation branded hardware arriving in the mail. Among them was a Playstation 4!

After having played around with it for a couple of days, it is indeed a pretty neat system. I’m loving the interface, and the new Share features are pretty awesome. The fact that it has a video editor inside is amazing! Thus, one morning I woke up and just felt like making a 3D model of the system for fun.

I fired up Blender 2.69 and started modelling away. By no means am I an artist, but after continuous practice I’ve sort of gotten the hang of how to use this nice piece of software.

I started off pretty slowly, but kept going.

Getting the materials on it, and still noticing there’s something off with the model. So, on I go.

After elongating the body and adding additional symbols, it’s actually starting to look like the real deal!

Just to add something additional to the scenery, I added a UV modeled box that somewhat resembles a TV.

Lastly, the generally final render is:

While not the best, it felt nice getting a model this close to something I have in real life in under an hour. It could certainly do with improvements, such as adding the ON light, adding the controller, and the cables at the back and making the material on the shiny part more reflective. However, I’ll leave that for another day when I’ve matured my basic blender skills further.


Trying out RPG Maker VX Ace

October 12, 2014

Well, I’d never have figured I would get into this sort of 2D game making tool but Humble Bundle’s (now over) Game Development competition had me psyched. I purchased VX Ace and worked on a mini-game for 3 weeks. Sadly, a week before submission I had to jump into Industrial Training and was forced to drop this small project. Oh how I wish I could have submitted it.

Nevertheless, I had some pretty fun and wonderful experiences, and really ventured into RPG Maker VX Ace in those three weeks.


166 hours into it! I know others probably have in the thousands, but I guess it goes to show that if you’re spirited enough you can keep going at it no matter how alien it is to you at first.

In an attempt to make my main menu different from the other submissions, I jumped into RPG Maker’s scripting engine which runs on Ruby. I’d never touched Ruby as a language before, so this was a fresh first.

With those minor alterations to the base code for the main menu, I was able to add a credits and controls page for players. If I had more time on my hands, I know I would have done so much more!

Added some shameless self promoting in the credits as well, all in good fun!
The Credits page that players will see.

Setting up the first mountain village was pretty easy after figuring out what each button did in RPG Maker VX Ace.

I relied heavily on GIMP 2.8.10 to produce certain tiles and images I needed. Whilst art and drawing is most definitely not my strong suit, I figured out how to do some pixel art in GIMP. The workflow is quite different for producing pixel based art instead of the usual brush style work.

Finally, here is a look at a bit of the game itself running and interacting with NPCs.



Making up the world that Suria would explore to reach his destiny was one of a lot of fun! I wrote down different story endings, discussed some with a close friend and threw ideas back and forth. If there was one thing I wished more for than being able to submit my project, it would have been to have a partner to work alongside with (and the option to export to Linux!).


Follow

Get every new post delivered to your Inbox.