Browsed by
Category: Technical

Upgrading ssd’s/nvme drives

Upgrading ssd’s/nvme drives

Consumer SSDs (solid state drives) have been transformative for the PC world. Their massively smaller size, temperatures, and power requirements have made ultra-thin laptops possible, nearly double battery life, massively increase drop resistance, and their speed has increased performance of disk operations/booting by 10x or more.

The only down side is that they’re fairly limited in capacity. While platter-based drives are selling consumer-priced 8-10 terabyte drives, your average consumer-level SSD is a paltry 512GB for the same price. As prices drop and one upgrades their SSD, one is faced with a terrible upgrade procedure. Upgrading your SSD often means backing up your data, making a windows re-install usb, re-installing your OS, and restoring all your data and re-installing your apps. Annoying to say the least.

It would be great if one could just copy the current image to a new drive, expand the partitions, and just swap drives – but that doesn’t seem possible…or does it.

Equipment you’ll need:

First you need to know what kind of SSD your system has. Is it SATA, PCIe, M.2, U.2, mSATA, or SATA Express, or a soldered-on drive? There is a lot of confusion here, because there is the interface type (SATA, NVMe, PCIe) but there is also the plug type (SATA, M.2, etc). Often you will find guides that interchange or equate them in confusing ways.

Once you have determined your drive type, you need to buy an appropriate drive-to-USB adapter.

Hardware you’ll need

Get one of the following that matches your system configuration:

Software you’ll need:

The Procedure:

  1. Make a backup. No, seriously. You should make a full backup of your system and all those important photos and documents. Go buy an external hard drive and download a free backup program, or buy a cloud storage solution right now, and back up your system. What you’re about to undertake could result in a dead drive if something goes really wrong (static discharge, select wrong source/dest drive, etc). Besides, you have already been doing backups of all your stuff already – right. RIGHT?
  2. Plug in your new SSD/M.2 drive into your USB adapter and plug it into the USB port. To be safe, unplug ALL unnecissary drives – including USB, external backup drives, etc. The less confusion the better.
  3. The procedure I’m going to use is more fully outlined here. And more discussion here.
    1. Start up EaseUS Backup Home (free version).
    2. Click on the ‘Clone’ operation in the lower left sidebar.
    3. Select your SOURCE drive. Proceed to the next step.
    4. Select your DESTINATION drive. Make SURE this drive is your brand new, empty drive.
    5. When you click next here, you’ll see the partition layout of the source and destination drives. You’ll notice there is a tiny partition at the start of the drive – this is the boot partition and doesn’t need to be touched. The next, largest bar will be the system drive. Many laptops will have a 3rd, very tiny partition as a backup partition.
  1. While not immediately clear, you can actually click, move, and resize these partitions! If you can expand the second/larger partition to the end of the space, do so. If you cannot, you need to carefully MOVE (not resize) the 3rd/recovery partition to the end of the drive. Then you can resize the larger middle partition until there is no more free space between the tiny first and tiny 3rd partitions.
  2. Click proceed to image the source drive to the new destination drive. This could easily take 30-90 minutes or longer.
  3. Once you are done, shut down the program and power down the system.
  4. Take your new cloned disk out of the USB adapter.
  5. Physically swap the old drive in your laptop/PC with the newer drive. Unplug the system/disconnect internal batteries to avoid accidental poweron while doing this.
  6. Plug back in and boot. If you did everything correctly, you should be able to power up with the new drive and boot right back up like nothing changed. When you check the free drive space, you should notice all that new capacity!

Wiping and selling

If you wish to sell your old drive, then I recommend using the program DiscGenius to wipe it before selling it. Simply deleting the partitions doesn’t actually wipe the data – and it can all be read by crafty people. Don’t do this wipe of the old drive until you’ve used your new SSD for at least a week to make sure it won’t prematurely fail.

  1. Take the old, smaller drive you wish to wipe+sell and plug it into the USB adapter you used above. Plug this into your PC.
  2. Start up DiscGenius
  3. Delete all the partitions on the old drive. Make SURE you are picking the correct, old drive and not your current boot or a spare drive that’s plugged in.
  4. Right click on the now empty drive, and select ‘Erase Sectors’. Fill the sectors with random data and then click proceed. This will overwrite EVERYTHING on that drive with junk data. It will take around an hour or two. Once you’ve done this, nothing can be recovered from the drive. Safely unmount the drive, shut the program down, and unplug the drive.
  5. You can now sell or use the drive for some other purpose.
Jim Keller on Moore’s Law

Jim Keller on Moore’s Law

Jim Keller has lead chip design efforts at Tesla, the highly performant Xen architecture at AMD, design of A4 and A5 processor at Apple – with both x86 and ARM processors over the years. He currently work here at Intel as a design lead.

Jim gives his thoughts on Moore’s law. Definitely worth a listen from probably the leading designer in the industry today.

C# App hangs when BitmapDecoder.CreateAsync is called

C# App hangs when BitmapDecoder.CreateAsync is called

Calling ASync functions from UI event handling routines/the main UI thread in C# turns out to require some basic knowledge to avoid getting into deadlocks. I sort of jumped in without doing much learning, so here were some of my learning resources as I made the inevitable mistakes:

Debugging tips:

C# and Universal Windows App file handling:

The details of fighting game logic

The details of fighting game logic

Making a button-mashing fighting game like Street Fighter has some surprisingly sophisticated logic when it comes to frame-perfect animation hits and combos. Strange Wire does an awesome job describing the difficulties and some ways to solve them.

What are those difficulties? Problems like checking hit and hurt boxes at the right parts of animation frames. Attaching events at the right parts of the animations can be tricky – especially if animators are still tweaking them. And the ever-present issue of keep the code clean.

Definitely worth a read whether you’re doing 2D to 3D fighters.

The interesting possibilities of Google Stadia

The interesting possibilities of Google Stadia

Stadia disclosure at PAX Dev:

Google has released the first round of game announcements for Stadia. But this isn’t your father’s Steam store.

“It was important for us with Stadia that we moved away from the Wild West that exists in some storefronts today,” Bautista said, speaking at PAX Dev. “Just because a studio has a game idea doesn’t mean we’re going to allow them to publish that game on our platform. Just because a developer or publisher releases a game that was a success, we certainly aren’t going to allow ten, 20, 50 fast follows to come after that.”

Google is hand curating their game list. Which is not totally surprising since this is new technology that has been tried and failed before. They require devs to fill out a form – and told them to do so carefully and thoughtfully. It will be reviewed and if accepted, you’ll get an email to submit even more material about your company and pitch. If you pass that stage, Stadia reviewers will then determine which projects to prioritize. If selected after that, you’ll be invited to discussions of a tailored sponsorship package. So, quite a process.

It was mentioned that projects will be evaluated especially on their viability for the Stadia platform. Projects that have specific functionality that is either unique to or shines on Google Stadia will probably be prioritized for partnerships. Example: in Orcs Must Die 3, they have a game mode that allows for orc hordes in numbers not possible on a local system, but easily handled in a cloud environment with massive parallel compute.

Nodes and instances

You can develop directly in the cloud itself or you can use one of Google’s “nodes.” There are two kinds of nodes: server development nodes, which are very large physical devkits that go into a server room at your studio and have four different Stadia instances on them; or desktop development nodes, which have a single instance.

With the near complete takeover of engines like Unity for development, (engines that increasingly have cloud compiling and other cloud services for game development) the creation of a complete cloud-based development environment could be foretelling the next big transformation in game development.

In fact, Google urged applications to consider the unique capabilities offered by running on a cloud-based platform – and put them into your overall game design. Image horde modes on the order of hundreds of thousands of animated characters. Something impossible on a single platform, but easily done on a massively parallel environment like the cloud. The ideas and new gameplay modes that might be generated are really interesting.

New features

Google Stadia will have other features that developers could take advantage of in unique ways. One that’s been shown before is Stream Connect, which shows multiple viewpoints on a player’s screen at once and is ideal for strategic play.

Another is State Share, a function that allows someone to compile game metadata into a shareable link, that can then be shared to others. For example, you can take a capture of a character wearing specific armor, with a specific weapon, at a certain level, and then send that state out via a YouTube stream, text, or email. Anyone who clicks on it can then experience the game in that state, which can be used to share a game with a friend or as a promotional tool.

Crowdplay, a feature that was teased in the initial Stadia reveal at GDC. It allows a livestreamer to play a game and viewers can queue up to play with or against them, jump in, and join the game instantly. 

Unanswered questions

The biggest selling point of creating a game for Stadia, or other streaming service, is that it has instantly been ported to any platform that supports Stadia. Consoles, PCs, mobile devices, etc. Anything that accepts input and is powerful enough for low-latency video streaming.

However, as has been discovered before, interface/controls are 70% of a game’s experience. Accounting for countless different display form factors and input schemes made game development extremely painful and error prone on early Android devices. A typing tutor game makes sense on a PC with a keyboard, but would probably be a terrible idea on a phone.

There is also the elephant in the room – latency. The United States is a huge marketplace, and internet latency and bandwidth can be radically different from place to place. Even in fairly ideal situations, latency on GoLive was deemed no substitute for local gaming experience. However, turned based games like Civilization and other non-twitch reaction time games (Civs, etc) should work just fine.

I think there’s some really interesting work going on and am excited watching the development of these ideas. I have doubts about latency issues, actual portability of games to different devices, and the costs for the platform/subscriptions; but the ideas of developing in the cloud and new game modes based on massively available compute are really compelling.

Time will tell which pan out.