Saturday, May 16, 2009

Lab 10: Laser Tag

Well that was easy.

Lab 10 was an introduction to using structs--I had to write a program which simulates a game of laser tag between two people by using structs to store the player's names (ex: = "Tony"), their laser strength, and their shield strength. At the end the program displays the winner of that round of laser tag.

Structs are pretty simple to use and are useful (it makes organizing a lot of info much easier), and this lab only took me about 20-30 minutes.

The source code:

Friday, May 15, 2009

Windows Live Movie Maker beta

I wanted to show my friend a video clip from a movie I have on my computer, and since I'm using Windows 7 RC1, it doesn't come with video editing software. Since I'm already trying out new things (Windows 7 being my case in point), I thought I would check to see if there were any advances in the Movie Maker department. What I found was Windows Live Movie Maker Beta, which is pretty dead simple as far as video editing goes.

You can: add text, stitch entire videos together, add music, add some simple transitions, and trim the ends of a video. That's about it, in a nutshell, although I'm hopeful that they'll be adding more features later on. For now, it's good enough for simple editing/combining videos. For saving videos, you can save your project to work on later, or you can output the video at 640x480 or 320x240 (both in .wmv format).

[Download Windows Live Movie Maker Beta] (click on the download link on the right, then you can choose to install just Movie Maker)

[Changes from previous Movie Maker versions - Windows Live Development Blog]

And now: some screen shots.

Wednesday, May 13, 2009

Windows 7: XP Mode


I did a bit of deep digging on the matter and it turns out that my Gigabyte M61p-S3 motherboard supports AMD-V (hardware assisted virtualization), but that it's turned off by default and the only way I can turn it on again is to modify and re-flash my firmware, potentially ruining my motherboard forever. I'm gonna pass on this one.

Hopefully in a future BIOS version Gigabyte will give us the choice to turn it on or off. Until then, no XP Mode for me.

Sunday, May 10, 2009

Windows 7 RC1: Installation

I finally got around to installing Windows 7 RC1 and I gotta say: it feels good to be back.

The installation process was easy and straightforward, so much so that I'll just show a few pictures to describe (more or less) the entire process.

And after a few minutes of configuration, here's what my current desktop looks like: (click to see full-sized picture (1280x1024))

One of the biggest new features that I'm planning on trying out is the under-hyped XP Mode. In a nutshell, XP Mode is a virtual machine running a full version of Windows XP SP3, allowing users to install any applications that are outdated/don't work in Windows 7. There's also an application mode in which just the window for the program you want to run will appear (so no having to select the virtual machine, then run the program: the very annoying window-in-window effect).

I have downloaded the XP Mode software from Microsoft's site, but I need to enable AMD-V (hardware-accelerated virtualization). I haven't thoroughly checked my BIOS to turn this feature on, but as of right now I can't seem to find it. Hmm.

I'll try and find a solution and post some screen shots of XP Mode, then I'll move on to other fun stuff in Windows 7.

Thursday, May 7, 2009

Lab 9: Eight Queens

For the past few days I have been working on a C++ assignment in my "Intro to Programming II" class at school. Up until now these labs have been fairly simple to handle with a bit of logical thinking and an understanding of what needs to get done in order for the program to work correctly. Lab 9 is a bit tough and only a few people in the class have done it. Many people have just decided to skip it altogether, but I'm a stubborn programmer.

The gist of the assignment is to write a program which will place eight queens on an 8x8 chessboard. The catch is that the queens have to be placed so that none of them would be able to take some other queen in one move.

My current program is on the computer at school, so I'll update this post with my (very rough draft-esque) code.

The code as of 5/8/09 9 eight queens.cpp
(see update 3)

It works up until the program runs into a dead end in the recursive function, where it just stops instead of returning to the previous column to try a different path. It shouldn't be too hard to fix once I find out why exactly the program stops.

Update2: So apparently the program runs fine on my computer (in Visual C++ 2008 and in Code::Blocks), but not in Xcode on my school's computers. Huh.

Update 3:
Yes! It works!

It turns out that all I needed to fix the progran was "if (row>=8) return 1;"
The problem was that the function which checks up, down, left right, and the diagonals for queens makes a call to the 2d array "board[8][8]" (which represents the chessboard). On certain occasions, the program will try to check the element "board[8][x]" where x=8 which is impossible since that would mean the program is trying to check the ninth row (which doesn't exist), causing the program to end (apparently Code::Blocks isn't as picky about these sorts of things as Xcode is).

Tuesday, May 5, 2009

Windows 7 RC1

So the Windows 7 Release Candidate (build 7100) was just released for the general public to download and test run today. I'm currently running the Windows 7 Beta (build 7000) and so I just had to give the new one a try.

[Download Windows 7 RC1 straight from Microsoft]

Build 7100 comes in both 32 and 64-bit flavors and is about 2.35 gb in size (for the 32-bit version - I don't know if the 64-bit version is any bigger or smaller).

You'll need to have a Windows Live account (free to sign up) and a valid e-mail address to get to your download page (which will have the serial key to activate your version of Windows 7).

For the current Beta users out there: don't worry about having to install build 7100 immediately. Microsoft announced that "the RC will be available at least through July, and we're not limiting the number of downloads or product keys" (RC download page) and that "the Beta expires on August 1, 2009, and bi-hourly shutdowns will begin July 1, 2009. The RC will expire June 1, 2010, and the bi-hourly shutdowns will begin on March 1, 2010" (RC download page).

I just downloaded and burned the new OS to DVD this afternoon and I plan on installing it sometime this weekend (too much schoolwork to get it done during the week, but I'll be sure to include plenty of pictures/my thoughts when I get around to installing it).

Xbox Linux: Progress 2

Well I'm back with some updates on the Xbox Linux project.

Up until this point things have been going well enough. In a strange twist of fate the model of the new USB flash drive I tried using doesn't work. I then realized that I never tried the old red Club Live flash drive without having the controller plugged into the breakaway cable (not enough power in the USB port on the Xbox to support two devices at once). I backed up my data from the drive and tried formatting it again through the Xbox, and this time it worked (transferring files from Action Replay and all that jazz).

The necessary files being put on the USB drive from my computer

My original plan idea was to use the "emergency linux" file to boot a very small bit of linux code which would allow me enough access to be able to telnet into the Xbox from my computer and install a Linux distro from there. Unfortunately I realized that (after some troubleshooting) this method of installation wouldn't work on my Xbox because my dashboard version has been too recently updated (relatively speaking: it updated a few years ago).

I chose to opt for a slightly different method for getting any code to run on the Xbox: UnleashX. UnleashX is a dashboard replacement which allows for greater access and control to the Xbox. I copied the files via the USB flash drive to my Xbox and booted the new dashboard as a MechAssault game save, which I was then able to install.

UnleashX dashboard installing

The next step of the project will be finding the right Linux distro to install but for now, I think I'll take a break from Xbox Linux to focus on schoolwork (blah, tests everywhere!)