28 Oct 2011 @ 6:32 PM 

Everybody knows war is hell. That hardly needs any introduction.

However, not many people are aware of a certain intergalactic struggle that earth recently recovered from. This war was against an alien race known as the… well, actually, nobody really asked their names. They were all “hey, earth, we’re on your turf killin your doods” and we were all “hey” and stuff. Anyway we didn’t really know what they were called.

So at any rate, Earth deployed an elite squad- well, actually, they deployed a single ship, code-named Zanac.

Now one wonders- “why just one ship?”

well, back in those days they had a “sprite limit” see, nobody could see more then about 8 (maybe it was 11, I forget) moving objects on at once. Zanac was a experimental machine that allowed the pilot to perceive more then 8 objects at once using a method known as image compositing. The Zanac ship pilot explains:

“It was a philosophical question, back in those days- nobody was even sure if the human mind or visual cortex could handle more then 8 objects in their view at once without instantly exploding, or at least without frame lag. This was rather troublesome for mormons, since they had lots of wives and kids and generally had very oversized families, it made getting family photos rather difficult, with the photographer having the wear an anti-sprite-limit suit and all. So anyway, in the war against these new alien oppressors, we deployed the ship, code-named “Zanac” that included a sprite-capacitor that absorbed sprite information and fed it to the user in smaller, more managable chunks. The first few test runs were pretty promising, excepting of course the pilots heads exploding and making quite a mess out of the ships upholstery. But we didn’t have time quite to finish the tech, we needed to fight the aliens. I do recall my cousin bob making a note in his logbook at the time, about how well his beans were growing in his garden, and I think I said something to the effect of “It’s cold outside” or something, to which he remarke…

Me:You were talking about the Zanac war, and why you only deployed a single ship at a time.

Pilot:Oh yes, I do apologize- so anyways, they sent me on this mission to infiltrate the Alien federation and destroy it- or something. The actual mission was sort of vague, in fact I believe it may have been a yorkshire pudding recipe jotted down on a napkin. In any case, I had no idea what I was in for, in fact at the time I did believe there was going to be a fleet of ships. However, I wasn’t aware of the newest feature they had installed on the ships. See, although the ships’ sprite capacitors could absorb sprites and allow the viewer to see them in more managable chunks, there was a sort of force feedback with any nearby disturbances in the sprite continuum, so there could only feasibly be a single ship in operation at once. When I first heard the news of this, I was rather heartbroken- I couldn’t drink milk for a good week after that.

So they sent me on my mission, Which was pretty crazy right from the start.

Me:How do you mean?

Pilot:Well, when I started this weird triangely thing swooped towards me, so I figured I’d shoot it, it being an alien vessel and all.

Me: And?

Pilot: Well it turned into a giant fucking smiley face! I mean, what the hell was going on? I mean, it was the 70′s but a giant smiley face? people, come on!

Me: Actually, we have to satellite footage of this smiley face- refer to “Exhibit Q”.

Pilot: So, there I am, in this state of the art machine, fighting a god damned giant smiley weird face. So I decide- well, I may as well shoot it right- I shoot it. And nothing happens!

Me: And this was hardly weak weaponry, I take it?

Pilot: it was state of the art- well, truly speaking it still needed me to find weird blue boxes and grab yellow spheres from inside them for whatever reaso…

Me: wait, what? How does that make sense? you grab yellow spheres from blue boxes, supposedly owned by the aliens, to power up your weapons? Why not just attach a god damned nuclear warhead and just kill them all at once.

Pilot: Ahh, the sprite limit is why. See, if you tried to use a nuclear device in those days, you’d end up spawning too many explosion sprites and cause lag fallout that wouldn’t really do that much damage.

Me: Ok, so you shot the smiley face-

Pilot: I had to shoot it several times- and you know what happened? the damn thing turned orange/red. Like it was teasing me, saying “yep, you hit me, but I’m invincible”

Me: and what weapon were you using for this?

Pilot: for that I was using the blue circlely thing attachment, the silly string main weapon was pretty useless, it went right through them. So then I decided that I was done for, and set a kamikaze course into the smiley face, intent on wiping that god damned smirk off their face- and you know what happened? moment I touched him, he dissapeared!

Me: you’re saying he? How do you know?

Pilot: I was pointed straight up between his legs, He was like a bloody smurf… well, until he turned red, then he was a red smurf. Anyway, so there I am- dumbfounded. Already sure I had seen the strangest thing ever- but then I saw the aliens secret weapon coming right towards me- two concentric circles! It was awful, the pure horror of it all is indescribable.

Me: I can imagine.

Pilot: So there I was, ducking and dodging… shooting my silly string… and then I see an odd glass thing coming up on the horizon- so I naturally try to shoot over top of it at an enemy. And the damned shot hits the glass thing even though it was about a million feet above it in the air. Quite odd. So I continued shooting, and eventually this strange transparent number appeared. So, I of course grabbed it.

me: Wait, why the of course?

Pilot: Well, I’m not sure, it just looked inviting. I mean, can you think of a single time where a number in a square looks dangerous to you? I sure can’t. I can think of times that twigs looked rather menacing from the distance due to the way the light and shadow plays with them, and how our perceptions cause us to recognize patterns and objects that aren’t necessarily there.

Me: ok, well, carry on

Pilot: So there I am, I grab this number thing- and nothing happens.

Me: Were you expecting something to happen?

Pilot: Well, yeah, I guess so.

Me: OK, carry on

Pilot: so, anyway, I keep fighting, and I go to use my blue swirly thing attachment, and it is all purple and fuzzy and downright weird looking.

Me: oh, so something did happen.

Pilot: Yes, most importantly, it cut through everything like a sharp knife through goat entrails.

Me: Sounds useful.

Pilot: Hell yeah it was useful, in a world with giant blue circular smurfs, you need all the help you can get.

Posted By: BC_Programming
Last Edit: 28 Oct 2011 @ 06:32 PM

EmailPermalinkComments (0)
Tags
Categories: Games, Humour
 25 Oct 2011 @ 11:13 AM 

Serialization has always been a thorn in my side. In VB6. in Python, in C#. The biggest annoyance is that most applications consist of somewhat complex object relationships and heirarchy’s, different race conditions about values that need to be initialized first, and who knows what else, all meticulously built during the course of your application, which you eventually need to save to persistent storage.

All applications can benefit from some form of persistence, even if it is only in the form of settings. As a result most Object Oriented languages have a way to allow you to “serialize” an object to a stream. In .NET, this is provided by way of the [Serializable] Attribute and the ISerializable interface, which allows you to customize the serialization somewhat.

What is interesting, at least in the case of .NET object serialization, is that you can choose one of a number of “Formatters” which will take the data acquired by the Serialization support framework and format it to one of any number of formats. Personally, I have only used The BinaryFormatter class, which will allow to write or read a serialized stream to or from a stream.

So, what use is serialization? Well, aside from the obvious ability to save the stream to a file, you can also use it in other ways. For example, since you can send the data across any stream, you could send it through a network stream, and on the other end another instance of your application would be able to rebuild the exact same object. Another usage I’ve found is for usage on the system clipboard; serialize what is being copied, plop it on the clipboard with your own format specifier, and then when you want to see if you can paste check if that specifier exists and when pasting deserialize that data from the clipboard, and you’ve got the objects that need to be pasted, which will be “new” objects separate from those copied (if they are still present).

Copying a object graph to stream, however, has a bit of boilerplate; you need to create the BinaryFormatter(), serialize, and the opposite in the other direction.

However, with generics, this task can be made a tad easier:

  1.  
  2.     public static void ObjectToStream<T>(T saveme, Stream outstream) where T : ISerializable
  3.     {
  4.  
  5.         BinaryFormatter bf = new BinaryFormatter();
  6.         using(GZipStream gz = new GZipStream(outstream,CompressionMode.Compress))
  7.         {
  8.             bf.Serialize(gz, saveme);
  9.  
  10.  
  11.  
  12.         }
  13.    }
  14.  
  15.    public static T StreamToObject<T>(Stream instream) where T : ISerializable
  16.         {
  17.             BinaryFormatter bf = new BinaryFormatter();
  18.             using(GZipStream gz = new GZipStream(instream,CompressionMode.Decompress))
  19.             {
  20.  
  21.                 return (T)bf.Deserialize(gz);
  22.  
  23.             }
  24.  
  25.  
  26.  
  27.         }
  28.  

Two static methods that serve to input and output a object whose type implements ISerializable to and from a given stream. It also uses the GZipStream to compress and decompress that stream to try to save space.

Extending this directly to files is rather easy as well:

  1.  
  2. public static T ObjectFromFile<T>(String filename)  where T : ISerializable
  3. {
  4.    //open the file.
  5.    T acquireobject;
  6.    FileStream fstream = new FileStream(filename,FileMode.Open);
  7.    //input from the stream…
  8.    acquireobject = StreamToObject(filename);
  9.    fstream.Close();
  10. }
  11. public static ObjectToFile<T>(String filename,T Objectsave) where T:ISerializable
  12. {
  13.   //open the file
  14.   FileStream fstream = new FileStream(filename,FileMode.Create);
  15.   ObjectToStream(fstream,Objectsave);
  16.   fstream.Close();
  17. }
  18.  

And huzzah! suddenly you can read and write objects to and from a file with ease.

One might even venture to create extension methods on the Stream class that provide this sort of functionality for input and output of any object supporting ISerializable, like the following, which assumes the previous routines are within a ‘ObjectStreaming’ class definition.

  1.  
  2.  public static class StreamExtensions
  3.     {
  4.  
  5.         public static void WriteObject<T>(this Stream str,T writeobj) where T:ISerializable
  6.         {
  7.             ObjectStreaming.ObjectToStream(writeobj, str);
  8.            
  9.  
  10.  
  11.         }
  12.         public static T ReadObject<T>(this Stream str) where T : ISerializable
  13.         {
  14.  
  15.             return ObjectStreaming.StreamToObject<t>(str);
  16.  
  17.         }
  18.  
  19.     }
  20. </t>

And there you have it, suddenly you can write objects directly to any stream, using methods of that stream Object, and that saved data is automatically GZipped for you as well.

This Does, however, present it’s own issues. If there is an error anywhere in your serialization code, using a “filter” type of stream, such as the GZipStream, may cause difficult to trace errors that cause exceptions to fire from the GZipStream itself, most notably “unexpected end of stream” type errors. You can usually trace these in Visual Studio by checking “thrown” on System.Runtime.Serialization.SerializationException in the Debug->Exceptions dialog, and allowing the data to save to a normal stream (that is, directly to a filestream or memory stream rather than by way of the GZipStream). This will allow you to determine where you made the mistake elsewhere. Typically, in my experience, it’s usually something as innocent as a misspelling, or even inconsistent capitalization.

Posted By: BC_Programming
Last Edit: 25 Oct 2011 @ 11:18 AM

EmailPermalinkComments (0)
Tags
 23 Sep 2011 @ 3:31 AM 

So, I have an ancient laptop. A Toshiba Satellite 440CDX. I covered it in a youtube video:

Basically, for modern purposes, it’s practically useless. However, it could still be usable in some sense, I feel. So the first step was to get it network connected- it could, for example, server as a file server, or something.

The laptop is old enough- and I guess wasn’t the right model- that it doesn’t have a built-in Ethernet port. I don’t think it was typical in those days to have one, anyway. The only item that appears in the network adapters list of Device manager is the infrared port (remember those?). However, thankfully, it supports Cardbus. So I hopped on ebay and bought some cheap chinese thing for like 4 bucks. it took like 3 weeks to arrive but it made it.

I originally intended to create an “opening” video, where I set it up. I did, but I made an ass of myself by trying to plug the cardbus card in the Expresscard slot of my newer laptop for “testing” which of course didn’t work. Plugging it into the 440CDX- nothing happened. Was it defective? Wouldn’t be surprising, given the price. I perservered, because I guess I had nothing better to do.

I ended up in the laptops CMOS setup, and on a whim I toggled some PC-Card mode from “PCIC-compatible” to “Cardbus/16″ or something.

Upon rebooting, I plugged in the PC-Card… and Poof! Found new hardware appeared.

And thus began my trek to find it’s driver. The CD that came with the device was utterly useless since it was for a completely different component (judging from the INF files, a PC-card for serial/parallel ports, or something). What ended up happening, was I allowed the device to “fail” to install, and used Everest Home, at which point I discovered it was a Realtek chipset. This gave me something to work with. I first tried the closest model in the win98 database, which of course didn’t work, so I downloaded the appropriate driver. As I speak, it is installing now

. I needed to copy the contents of the Windows 98 CD to my flash drive. And I now realize that I used the Windows 98 First Edition disk contents rather than SE, so I’ll have to start the entire shebang again unfortunately. I ought to point out that the flash drive usage is supplemented by the incredibly awesome “unofficial service pack” for windows 98- that can be found here, and adds Generic Mass Storage drivers (whereas normally you would need a special driver for nearly every different drive you want to use). As well as a plethora of fixes/tweaks that make the Operating system as stable as possible. Which is very useful for systems that cannot run a newer OS.

Having now restarted the process with the appropriate(Win98SE) files, with any luck it will soon have network connectivity.

At which point I can forget about the entire thing and toss it back in a closet. But not after seeing how laughable the net is with IE 6 (or possibly 5.5). I might search for a more lightweight alternative but a Pentium 133 machine just isn’t cut out for the contents of the net today. I can’t imagine how terrible this site looks on it. At the very least I open up the possibility to use the laptop as a file server or something. Which would be pointless since it’s HD is tiny. SO some might ask “what was the point”? Well, actually, I did gain something so far:

I’ve now learned more about and actually used PC-Card type peripherals. While I was well aware of the various type I,II, III, etc designations, I was unclear as to the specific differences (PCMCIA on older machines being basically a portable ISA, PC-Card being PCI, and Express-Card being PCI-E). my ignorance shown quite completely by my attempts to plug a cardbus card into a expresscard slot. That, and I’ve now actually (well, with any luck) gotten one working, so there is that. The experience, I guess is the motivating factor. Also, it was totally worth it to hear the cool noise the laptop makes when you remove a PC-Card that it knows about. It’s like a PC-speaker version of the XP/Vista/7 “Device removed” sound. Hilarious, and fairly sure the BIOS is doing it too, which means that it’s really coming from the heart of the machine. Touching.

If the CD-ROM Drive of the machine still worked, I’d probably be testing out lightweight OSS Operating Systems, but unless I shell out 80 bucks for a new CD-ROM for the thing (haha, fat chance) that simply is not going to happen.

Posted By: BC_Programming
Last Edit: 23 Sep 2011 @ 03:31 AM

EmailPermalinkComments (0)
Tags
Categories: Programming
 16 Aug 2011 @ 4:55 AM 

When choosing a font for any situation, you must consider the context of the font as well as it’s readability. Choosing a font for programming work is no exception. However, for the most part, programming fonts are blocky, and rigid; much like the source code  they are used to display. Traditionally, Monospaced fonts work best; I know people who use MS Sans Serif and it drives me nuts.

 

I’ll skip the prologue involving the TX-1 and PDP-1, PDP-7, and so forth. Let’s start with the first Personal Computer- the IBM PC. Naturally, this machine didn’t really have a concept of “fonts”. usually, any editing of text you would do- programming or otherwise- was done using the “System” font. This actually varied between systems. Typically, the font was actually stored in the video card, so different video cards could often yield different results.

To demonstrate a few select Programming fonts I have encountered in my internet travels, I will use Visual Studio 2008, and change the font, and take a screenshot of a small segment of code that I feel is “busy” enough.

 

System

Fig 1. A Typical System Font

Fig 1 shows this sample using the “System” Font. A few issues stick out for this font; first, it’s a tad too bold. It feels too “heavy” for use today, compared to other fonts. Also, it’s rather large; it  takes up an unnecessary amount of space. For the most part, nobody uses the System font for… well, anything, actually.

 FixedSys

Fig 2. FixedSys

Another “System” Font, FixedSys looks similar to System, but is different in a few ways. This font, shown in Fig. 2, differs so slightly from System; In fact, I can’t even see the differences, now. I did notice a change when I switched between System and FixedSys in the editor, though. Largely, whether one chooses System or FixedSys makes no difference; there are other, better fonts to choose from on any modern system.

Courier

Fig 3. Courier Font

Courier was another popular font at the time for programming, and other text-oriented tasks. Courier is basically the template “Typewriter” font. This brings the advantage (for most programming fonts) that it is monospaced. Typically, Courier is a “fixed” font. What this means, is that it isn’t scalable. This has good points and bad points; a good thing about this is that every font size is designed by hand; but the downside is, because of that there are usually fewer sizes to choose from. One issue with Courier is that the 0 (zero) and the O are quite similar, differing only in that the O is slightly thicker than the 0 (or the 0 is thinner than the O, depending on your perspective) This can make deciphering source code slightly more difficult. As does the similarities between the 1 (one) and l (lower case l); the number has a mere 3 pixels added on to what the l has! In an emergency, this font will do in a pinch, but I think it’s hour of glory has passed.

Courier New

Fig 3: Courier New

At some point, a newer, TrueType Courier font was created; being a TrueType font meant that the font could be resized to any size at all, on the fly. Engineers, however, were stuck on the name. A crack team of highly skilled engineers,  literature professors, and English majors were assembled, and they worked, tirelessly, for weeks trying to think of a name that says both “Courier”, and “New”. Eventually, they made a breakthrough; the name for this new font? Courier New, as depicted above in Fig 3.

Courier New was the staple font for basic text editors and Programming tools on Windows for years. It carries over a lot of the flaws of it’s predecessor, such as having easily confused 0′s and zeroes. They even made the 1 (one) and  lower-case L situation more difficult by making the net difference between them a single pixel. Overall, the font was nothing more than a true-typed version of it’s predecessor, which in and of itself was useful, since it allowed for using any size you could imagine. A contender appeared about the time of Windows 2000, This font, designed for the console, also makes a good Programming font, because it meets all the same requirements; Lucida Console.

 

 Lucida Console

Fig 4:Lucida Console

Lucida Console was born from the marriage between a Typewriter and an insect called the 7-year Lucida, which every seven years emerges from it’s burrow and showers random passerby with luck it stored in it’s cocoon. Lucida Console was made fun of often in the schoolyard, being forced to play with fonts like Comic Sans. The font isn’t terrible, but, it makes the worst mistake possible for a programming font (which debatably it isn’t to begin with, judging from it’s name) this is that it makes the 0 (zero) and capital O look identical. 1 and lower-case l still look different, thankfully, but having O and zero looking the same for a programming font is sort of like running to a halloween party without a costume and then saying that you are dressed as Steve Ballmer when you notice how much you had sweat on the way there. That is, it doesn’t matter how cool you are or look otherwise, you are still sweaty and possibly sticky and are therefore in the eyes of other guests best avoided.

Consolas

Fig. 5:Consolas

With the release of Vista, Microsoft got MonoType to re-envision many fonts; Consolas is the monospaced font (out of many fonts) that resulted from this. Basically it is designed to replace Courier New. Additionally, Consolas is better tuned to take advantage of ClearType. Also, some of the mistakes of Courier New were resolved; the zero is now clearly a zero, signified with a slash. the one and lowercase-l are still a tad similar, but Braces ({}) are a  bit more clear, as well. All around, probably my favourite programming font.

 Inconsolata

Fig. 6:Inconsolata

Unfortunately, Consolas comes with Windows Vista; you can install it on XP, but since it is tuned for ClearType it doesn’t always look quite right on Linux. Thankfully, there is an alternative for Linux, called Inconsolata. However, the problem is that Inconsolata appears to be tuned for *nix font smoothing, and looks a bit funky on Windows (even with cleartype off), as you can see in Fig 6. Obviously this isn’t so bad since for the most part Inconsolata is an attempt to bring Consolas to the Linux desktop anyway.

Because, from my experience, you can’t seem to get Inconsolata working properly on Windows (I’m probably doing something wrong, though) The picture does not do it justice; for all intents and purposes, it is pretty much the same thing as Consolas. If you program on a Linux/BSD machine in a graphical environment, I would recommend this font highly.

 

Proggy Fonts

Fig 7: Proggy Clean

Inconsolata is a free font; It is, however, hardly the only one of it’s kind. Dozens upon dozens of free fonts are available, for any purpose, including writing source code. Some fonts go that extra step and are explicitly designed to be used for editing source code. One such font in that category are the Proggy Fonts. The Proggy fonts come in several varieties; but they all hold to one tenet: to be as readable as possible at small sizes. This is the sort of idea I can agree with! Just look at Fig 7. gorgeous… nice, clean lines… a bit small though, if you are using a high-resolution. I’ve set my text editors to use this font.

Anonymous

 

Fig 8: Anonymous

Anonymous is an interesting font, mostly because it’s name is so silly. For me it seems like a thinner, monospaced version of Helvetica Or Arial; but, it does use serifs on a handful  of letters, such as Z’s, lower case L and 1. Anonymous crosses the zeroes, as well; making it easy to distinguish zeroes and the letter O. The slash extends outside the character itself, making it sort of look like a pictographic depiction of Uranus. Over all, another excellent font worth considering.

Envy Code R

 

Envy Code R

Envy Code R is another excellent programming font. The zeroes are slashed with a line that is more horizontal then usual, and the lowercase-L’s, ones, and I’s are all easily distinguished from one another. Another advantage is that the font scales rather well both to small sizes as well as large ones. The braces,brackets, and greater than and less than signs are all centered horizontally as well as vertically within the character box, which can be desirable. Like many of the other listed fonts, it appears to have pretty good support for unicode, as well.

 

There are many other fonts- I may make revisions and/or post new entries for them as I collect them together and  get appropriate screenshots.

Posted By: BC_Programming
Last Edit: 16 Aug 2011 @ 04:55 AM

EmailPermalinkComments (3)
Tags
Categories: Programming
 01 Aug 2011 @ 11:44 AM 

Three common criticisms of MLP:FIM are that it is “girly”, “gay” and/or “childish”. Here is my rebuttal to these three perceptions.

 

girly

Well, there certainly isn’t a hard argument one can make against it- after all, it’s not filled with macho robots or explosions or superheroes with superpowers. Well, I guess it sort of has the last one but that is something of a stretch. For the most part, all the “girly” ness can easily be attributed to corporate meddling; after all, they weren’t trying to make a gender-neutral television show, they were targeting a specific market at the time to try to sell their wares. The difference, I think, between the earlier version and the new version (which I base on assumptions about the first version from the 80′s because there is no way in hell I’m going to be watching those, low expectations or otherwise) will likely be that this newer version basically tries to skin the limits of the limitations they put on, and some bits easily slip under the radar; whereas the earlier ones probably didn’t need limitations set at all and they (the producers/animators/etc) went to create a show designed specifically for selling the toys, possibly with very little pride in their work. Now, naturally, it’s not for everybody. The ponies themselves are usually coloured in various hues such as purple, pink, and pastels that are often associated with the female gender. A better question is why that is the case, but I digress. They are however, animated fucking beautifully; the realistic animation of their manes during movement left me flabberghasted that the bloody thing was done in flash. Having experienced the creation of flash videos and realizing just how much work it is to add some minute, and innocuous details made me feel that there was a lot of pride on the part of the creators; after all, they could have easily gotten away with just moving the symbol up and down, say, when Rainbow dash or another pegasus pony is hovering, but they took the time, in each instance, the animate their manes and tail reacting to their oscillation; same with walking, running, moving their head. I can still watch it now and notice such little nuances and am still blown away by the expertise that went into it. Yes, there are some pithy bits like the letters at the end and a few tidbits here and there, but personally I like the contrast that sort of thing can provide with my other favourite shows, compare, for example, Charles Lister from Red Dwarf With Twilight Sparkle.

gay

Freddie Mercury was a Homosexual. That doesn’t mean Queen’s music isn’t fucking awesome, though. Well, unless you are a homophobe, I suppose. But really, I’m not really sure what this could possibly mean. I think maybe people just like the alliterative with girly so plop this in there as well with no real basis.

childish

Now, I will contend that you MAY have something of a point here, given that the show is, obviously, intended for that demographic. But I can’t help but wonder, personally, why they would pay such close attention to little details like the manes/tails swaying in response to movement/wind/etc and so forth, when clearly their “target demographic” isn’t going to nitpick that type of thing. Again, they take pride in their work, and this extends to the writers, who try to make things appeal to nearly any audience. In particular the various puns that wouldn’t be “got” by most in the “childish “bracket, such as the “nightmare moon”/”mare in the moon” which works not only because mare is the name for a female horse but also because mare is the singular latin word for “sea” and is used to describe the patches, or “maria” of plains on the moon. Hell I didn’t even get the equine->Equestria reference at all until a few days ago. I also rather liked the exploration of the ideas of Critical Thinking in the “Bridle Gossip” episode, even if they sort of took a backwards step in that regard with “Feeling Pinkie Keen”, which is my least favourite episode, Aesop-wise. Have I personally learned anything from it? Well, aside from the fact that book titles with long, alliterative and possibly redundant names are kind of funny, no. But compared to the cartoons I would watch as a kid, I feel this one is better done. Even if the theme song isn’t as catchy as Duck Tales, it makes up for it by not being STUCK IN YOUR HEAD AT THE WORST TIMES. Like, say you are at the altar and the minister says “And do you, XXX take this woman to be your lawfully wedded wife”, would you rather accidentally blurt out “DUCK TALES WOOHOO” or, “I used to wonder what love could be, until you shared it’s magic with me” etc. I mean, see, the second one might actually pass for a vow. IT COULD SAVE YOUR MARRIAGE.

Posted By: BC_Programming
Last Edit: 01 Aug 2011 @ 11:44 AM

EmailPermalinkComments (0)
Tags
Categories: Programming
 08 Jun 2011 @ 7:14 AM 

On most modern keyboards, manufacturers have decided to add an assortment of random keys, sometimes above the Function keys, sometimes on the left or right. For the most part, these are called “Media” keys. They often posess play/pause, skip next/previous, volume controls, etc. Sensible.

My Wireless keyboard has these. I don’t use it because- well, I don’t exactly have a magic battery maker machine, the Fome/End/Insert keys are configured “wrong” (well actually the way I’m used to is wrong, but I prefer to absolve the confusion by avoid it entirely for now, it just causes headaches while editing source code). that combined with the seeming inconsistency in how well it works have caused me to switch back to my wireless-500. Not to mention the fact that it gobbles up batteries.

 

Now with the MS wireless-500 keyboard, it has media keys as well. Play/Pause, Volume Up/Down, Mute. “My Computer” “Calculator” favourites, home, and E-mail.

 

My question here is why they are called “media” keys? I mean, I don’t have Skip Next/previous, which I would find MOST useful, but I have a bunch of other keys. They shouldn’t be called “Media” keys, they should be called “start random shit” keys. Because, you know, I start calculator sooo often I simply need to have it available at the press of a button. And I start thunderbird soo often I simply need it with a single keypress; even though if I started it often I could either pin it to the taskbar, put it on the desktop, or put it in startup. Not to mention that Vista/7 will keep applications that are started frequently right there on the start menu, so if I started thunderbird frequently, it would only be two keystrokes. Of course, that is more than the one keystroke to press the button marked with a envelope- but It just seems kind of silly to have these types of controls for other actions that can be done with only the keyboard, and yet leave out stuff like volume control, which are a defined media “key” but are suspiciously absent from this keyboard. Who seriously uses these keys? Am I wrong to assume they are, or at least, were, some silly marketing gimmick for when people thought the more keys a keyboard had the better it was?

Posted By: BC_Programming
Last Edit: 08 Jun 2011 @ 07:14 AM

EmailPermalinkComments (0)
Tags
Categories: Programming
 20 May 2011 @ 6:32 PM 

I’ve already written about the “classic” 2012 end of the world doomsday prediction, you know, prediction number fifty bajillion. I have to say that end of the world predictions don’t have a very good success rate so far, what with the world not being ended and all.

Anyway, as ridiculous as the prediction is, there is an even more ridiculous prediction that occurs in 2011 (this year). In fact, it’s mere days away on the 21st.

Now, it is important to note that this prediction is… well it’s not really based on anything, and truly what end of the world prediction isn’t based on self-doubt and nonsense. This one however truly takes the cake. The wikipedia article on this can be found here. Apparently, this is yet another prediction by one of those people who seems to have this magical ability to predict when the world will end and then when it doesn’t they find they made a “calculation error”. This doesn’t make a whole lot of sense. You would think in the time between predicting the “end of the world” and when it doesn’t actually happen you might have given the “math” (haha, how laughable is that, but you’ll see, it’s freaking hilarious) a once over and found this “calculation error” especially since, in almost every case the “math” is the thing being constantly brought forward. Are we really supposed to believe that “oh the prediction is sound I just forgot to borrow a ten here”. Bullshit. This same guy apparently also predicted the end of the world in 1994, and I’m sure we can work out how accurate that was.

 

Camping states he has attempted to work out mathematically-based prophecies in the Bible for decades. In an interview with the San Francisco Chronicle he explained “…I was an engineer, I was very interested in the numbers. I’d wonder, ‘Why did God put this number in, or that number in?’ It was not a question of unbelief, it was a question of, ‘There must be a reason for it.’ “

What the FUCK is this? “There must be a reason for it”? Really? Even the most devout christian can agree that there is such a thing as overanalysis, and treating the bible as a fucking math textbook takes it beyond a joke.

But it get’s better. He provides a “mathematical proof” of this:

 

  1. According to Camping, the number five equals “atonement”, the number ten equals “completeness”, and the number seventeen equals “heaven”.
  2. Christ is said to have hung on the cross on April 1, 33 AD. The time between April 1, 33 AD and April 1, 2011 is 1,978 years.
  3. If 1,978 is multiplied by 365.2422 days (the number of days in a solar year, not to be confused with the lunar year), the result is 722,449.
  4. The time between April 1 and May 21 is 51 days.
  5. 51 added to 722,449 is 722,500.
  6. (5 × 10 × 17)2 or (atonement × completeness × heaven)2 also equals 722,500.

What? seriously? “hey look at me assign arbitrary numbers to these words and do some pointless math and come out to another number that happens to be able to be derived from another math formula involving these numbers? Is this guy on FUCKING CRACK? Seriously? Just take a bunch of completely fucking arbitrary date intervals, do some basic arithmetic on them and them make up some handwavey bullshit about the results and POOF! proof of some retarded idea. Here, I’ll try this too!

  1. The number 12 equals bear. the number 3 equals eagle, and the number 7 equals tertiary turkey.
  2. 3 is a prime number. so is 97. if you convert 3 to a word (three) and take the length of the word-version of 97 (ninety seven) (11 letters) and subtract it, you end up with 8, which is one more than 7, which represents a tertiary turkey
  3. Tertiary means three, which is the original prime number; having established an intrinsic relationship between 3 and turkey, we also find that 3 is the number of sides a triangle has.
  4. The word isosceles( a type of triangle)  has  9 letters, which multiplied with 180 (the number of degrees the angles in a triangle add up to) we get 1,620, divide by 10, and we get 162, 180-162 is 18, which divided by three is 6, which is exactly half of the bear number.
  5. This CAN’T be a coincidence! it indicates a clear relationship between triangles, bears, and turkeys that cannot be refuted!

Really, just try to find something that I did differently. I replaced the terms and the numbers but I included the same ass-pull of arbitrary other numbers that is done in the “original” prediction text.

Posted By: BC_Programming
Last Edit: 20 May 2011 @ 06:32 PM

EmailPermalinkComments (0)
Tags
Categories: Programming
 19 May 2011 @ 12:37 PM 

Fig 1-1: Process Explorer viewing disk cleanup DLL files

Ever wonder how the windows disk cleanup utility works? Go ahead. Try googling it. All you’ll get are various “tech tips” on how to effectively use the program, nothing on how it actually does it’s task. I became curious recently in a forum thread regarding Disk cleanup and a few other similar tools. Ages ago I recall reading some article or Q&A column or something where the author described some of the intricacies of disk cleanup; I couldn’t find it, (it was probably in the MSDN library collection I was using at the time)- and it was written for Windows 98 Anyways. So, I decided to determine the method disk cleanup uses to figure this out. My first tool in this fight was to try to use Process Explorer to try to determine what DLLs disk cleanup loaded, shown in Fig 1-1.

 

 

 

 

From this, there isn’t a whole lot to go on. There is a lot of informational noise, in that it’s difficult to determine which files would be the presumed “plugin” dlls and which are simply loaded by other DLLs and so forth; Additionally, there is also the possibility that it doesn’t keep the DLL loaded and therefore it wouldn’t appear in this list at all. However, there would still be behaviour using the DLL and related data, and it has to retrieve the list of “plugin” DLLs or whatever from somewhere, so I turned to Process Monitor instead.

Process Monitor

Generally speaking, I actually prefer to avoid using Process Monitor if I can. It’s not that I dislike the program- it is extremely powerful and replaces both of the older filemon and regmon utilities. The problem I have is that even though it provides a number of powerful tools for filtering the various events, it is still a lot of data to sift through. In this case, I set a filter to include only cleanmgr.exe related events, ran disk cleanup, (or at least let it “enumerate” what it could clean) and then sifted through the various events. Searching through the results I found some entries corresponding to the names of each “cleanup” list item, which can be seem in Fig 1-2.

Fig 1-2:Process Monitor finds something relevant to my goose chase

From this, it seems clear that Disk cleanup is getting many of it’s cleanup “entries” from a list contained in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches. Naturally I assume this differs if the tool is run as a standard user (rather than as administrator). Each key seems to have a few pieces of data; a filelist, for example, and a Folder, both of which seem to allow for pipes separating multiple values as well as wildcards. They also have a Description entry, which is either a string or it could be a resource reference in the form @filename.ext,-resid where resid is the resource id in the dll/exe’s string table that is referenced by the @filename.ext. This same format is repeated for a few other entries as well as what icon Disk cleanup should show in the list.

More interesting however is the “default” item, which references a CLSID; I followed the CLSID for one cleanup entry, in this case the “chkdsk temporary files” entry. This clsid can be found in HKEY_CLASSES_ROOT\clsid and it’s inprocserver32 is %SystemRoot%\System32\DATACLEN.DLL. Because CLSID’s are in fact class IDs and

Fig 1-3: OLE/COM Object viewer failing to load dataclen.dll

therefore we can assume that DATACLEN.DLL is in fact a COM component, I opened it up with OLE/COM Object viewer included with the Windows SDK. Unfortunately, it refused to open it, as seem in fig 1-3; inspecting the file with Resource Hacker, I determined that the cause was in fact because the file did not have the TYPELIB resource entry that is typical of COM components; or, more precisely, that entry was probably stripped. So, I was somewhat at a loss here; clearly, disk cleanup interfaces with DLLs as COM components and passes the data from each registry key to that component in order to perform that particular phase of cleanup; in the case of the chkdsk temporary files cleaner for example, it passes in a FileList of *.CHK, and also a list of folders, ?:\FOUND.000|?:\FOUND.001|?:\FOUND.002|?:\FOUND.003|?:\FOUND.004|?:\FOUND.005|?:\FOUND.006|?:\FOUND.007|?:\FOUND.008|?:\FOUND.009 which I would imagine means to search the specified drive for each of those given “found.00#” folders and delete all .chk files within them. Pretty straightforward, judging from this we can assume that dataclen.dll is what actually is doing the grunt work here, in that many of the entries specified- at least in my registry- point to dataclen.dll with varying folders and file masks.

For a bit, I figured “well, maybe it’s a secret interface that isn’t documented” but no doubt there would be trouble over that- Microsoft is apparently supposed to work with their insides out nowadays but I digress; either way, application vendors have been adding functionality to Disk cleanup for ages so I assumed there was some sort of documentation, which led me to this page.

This documents exactly what I originally suspected; Disk cleanup does use a specific interface, in this case IEmptyVolumeCache and IEmptyVolumeCache2. So far, the way Disk cleanup works appears to be something like this:

it enumerates all keys in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches. It may also enumerate other keys for similar entries.

In this case the default value for each key will be a CLSID; this CLSID points to a class that implements either IEmptyVolumeCache or IEmptyVolumeCache2; the latter of which is of course newer and adds a single new function which adds better multi-language support. Disk Cleanup opens the appropriate registry key (which again may be in HKEY_CURRENT_USER in the case of a non-admin run) and passes the HKEY handle to the initialize routine of the instantiated class. Then presumably each cleanup class will “do it’s thing” to initialize from that key. This explains why some of the keys present in VolumeCaches seem to have different values; the different DLLs and CLSIDs can require different keys and values to be present which can mean different things. That said most of them are in fact “standard”, and are documented here. the “stateflags” entry appears to be the one affected by using /sageset and /sagerun, the behaviour and effects of which to me were a final puzzle piece:

 

By running the disk cleanup manager’s executable file—Cleanmgr.exe—from a command line, you can declare cleanup profiles. These profiles are composed of a subset of the available handlers and are given a unique numeric label. This allows you to automate the running of different sets of handlers at different times.

The command line “cleanmgr.exe /sageset:nnnn“, where nnnn is a unique numeric label, displays a UI allowing you to choose the handlers to be included in that profile. As well as defining the profile, the sageset parameter also writes a value named StateFlagsnnnn, where nnnn is the label you used in the parameter, to all of the subkeys under VolumeCaches. There are two possible data values for those entries.

  • 0: Do not run this handler when this profile is run.
  • 2: Include this handler when this profile is run.

For example, suppose that the command line “cleanmgr.exe /sageset:1234″ is run. In the UI that is presented, the user chooses Downloaded Program Files, but does not choose Temporary Internet Files. The following values are then written to the registry.

 

HKEY_LOCAL_MACHINE
   Software
      Microsoft
         Windows
            CurrentVersion
               Explorer
                  VolumeCaches
                     Downloaded Program Files
                        StateFlags1234 = 0x00000002
                     Internet Cache Files
                        StateFlags1234 = 0x00000000

The command line “cleanmgr.exe /sagerun:nnnn“, where the value of nnnn matches the label declared with the sageset parameter, runs all of the handlers selected in that profile.

A generic StateFlags value is written to the registry when Disk Cleanup is run normally. This value simply stores the state (checked or unchecked) of the handler the last time it was presented as an option to the user. There are two possible data values for those entries.

  • 0: The handler was not selected.
  • 1: The handler was selected.

 

What can we glean from this? well, aside from changing a few flags in the registry, this doesn’t actually change the list of usable cleanup options. “But BC” I hear you say- “My list is different when I use cleanmgr /sageset:65536 & cleanmgr /sagerun:65536″!

 

Of course it is. when you run cleanmgr /sageset, it lists <every> handler; even those that would normally be excluded because of permissions, since you are merely changing the values of them in the registry. When you then use the /sagerun switch you aren’t actually performing the cleanup for all those items, only those valid for the current profile. Compare for example the list you see when you use /sageset:65536 to the list you get when you run cleanmgr.exe as an administrator. For me, I see no difference. /sageset and /sagerun don’t actually change the available cleanup options, they just change the cleanup options chosen (which boxes are checked by default).

Posted By: BC_Programming
Last Edit: 19 May 2011 @ 12:37 PM

EmailPermalinkComments (0)
Tags
Categories: Programming
 04 May 2011 @ 2:30 AM 

Specifically, I’m talking about sites like this.

I mean- come on. Just what in the fuck is that? “Voluntary Human Extinction Movement”? From the site’s basic 1996-era HTML page:

Phasing out the human race by voluntarily ceasing to breed will allow Earth’s biosphere to return to good health. Crowded conditions and resource shortages will improve as we become less dense.

Now I have some problems with this; first off, it seems to be one of the many perspectives that regard Humans as somehow different from the rest of the planet. I mean, we are- in that we are now the dominant species on the planet; however, it’s important to note that we are also the only species that, and if I may put this bluntly, gives a flying fuck. if a Baleen whale is about to eat the last of some rare endangered species of krill, it doesn’t give a fuck. Why should it? It’s not it’s fault that that particular species of krill happens to be coloured a extremely bright red (or whatever colour) that they can identify and find easily. Only humans feel bad about doing what is necessary to survive. We (as humans) kill and eat livestock; in the grand scheme this is an advantage for the animals; they no longer have to hunt for their food or scavenge it, they can just laze and run about in a pen, or in the case of cows graze in the pasture to their hearts content; We (well, the farmers) try to protect them from their predators, and basically the entire process of that species survival is set in stone; it’s a form of inter-species mutualism, the fact that one of those species is us doesn’t change that into some sort of slavery. Hell, just by domestication we’ve created thousands of new species or at least breeds of species- if we are supposed to feel bad about species going extinct, should we feel bad about creating new ones?

The thing is, we as humans evolved and basically took over the planet; now it seems that our innate sense of outward altruism has extended to all other species and even the earth itself. This is preposterous. Other species should evolve around us- in fact, many already have- we shouldn’t just drop out of the race for no reason. I mean, holy shit, how much of an over-inflated sense of altruism would somebody need to think “golly, we are killing all these other species, it can’t possibly be their fault for being stupider, slower, and all around less intelligent then us, no, we must be evil”. No other animal feels remorse. Consider that for a moment. you think if there were 6 billion tigers on the planet they would decide to kill themselves for the good of the planet? Hell no. They eat gazelle and don’t give a fuck. the gazelle eat grass, you think they have nightmares where the grass screams in terror as it’s cells are ripped apart and those cells are masticated into a fine paste by their mouths? No. In fact, we don’t to co-exist and live with the animals, we could kill all of them for no reason, but that is the thing, there is [i]no reason[/i] to do so. Let’s consider a made-up animal, let’s call it the superpig (because I lack imagination, obviously). The superpig is an animal discovered deep in some unnamed jungle. Let’s say somebody, lost in the jungle, traps and eats one of these animals for food, and discovers that it is the most delicious thing he’s ever tasted, even though it was covered with bits of charcoal and didn’t have any seasoning at all. Needless to say he spreads the information and more and more people go deep in the jungle and hunt the superpig until it goes extinct. Some people like to qq at such a scenario. “oh poor piggies, OMG why do we think we can just trample everywhere”. But seriously, think about it. The reason the pig went extinct wasn’t because we are malicious and selfish assholes, but rather because the pig <i>tasted good</i>. There are plenty of insects that either taste bad to their predators, smell bad, or are otherwise unappealing as a meal; in the case of this supposed “superpig” none of this happened; only evolutionary traits that help the species become dominant. It’s fully possible that the superpig hunts a rare supergold truffle and it evolved a sense of smell able to hunt out these rare golden truffles, but the side effect being that it also makes them taste delicious to humans. Naturally, this isn’t a problem when they first develop the trait, because there are no humans around. But then the explorer encountered them and basically their ecosystem changed. They got a new predator. We like to think of ourselves as somehow above the whole predator/prey distinction, but we aren’t. Typically we are of course more predator them prey; I don’t think that we are a predator in the sense of domesticated animals for the reasons of mutualism I noted earlier, though.

The evolutionary line of all the animals that exist today has plenty of unrealized lineages; the trilobite went extinct long before mankind, as did millions, if not billions of other types of plants and animals. In many ways we protect species because we will take steps to prevent them from going extinct- why? Nobody knows. most of the animals that have gone extinct had serious shortcomings anyway. Dodo birds couldn’t fly, for example, and basically evolved to take advantage of a predator-free ecosystem; otherwise, over time, they would have either been made extinct by such predators or developed ways to survive. That is how shit works. Either kill or beat the shit out of what is trying to kill you. Or fly away, I guess. I just like the idea of a Dodo bird that evolved to fight kangaroos and could perform flying kicks. That said, there are plenty of similar birds, like the penguin, that cannot fly, but manage to survive simply because it developed a powerful swimming ability as opposed to flying. This makes perfect sense, because in their ecosystem there simply isn’t a whole lot for them to do in the air but fly around randomly; Seagulls need to take to the sky to seek out food, and owls use it to spot prey that they hunt on land, and so forth, but with penguins there isn’t anything in the air. So they developed powerful swimming ability via natural selection; if somehow another animal entered the ecosystem that was either a much better swimmer or was able to pick them off from the air or something, then the penguin would either need to develop instinctual tactics or tics that manage to help it elude that enemy, develop more powerful swimming ability, or some sort of defensive addon. (the last of which is highly unlikely). The only problem when that animal is man is simply that there is never enough time for any sort of adaptation on the part of the animal, simply because we don’t hunt like other predators would, which is, only for food, but oftentimes the leading factor is simply profit, and the method by which the animals are exterminated are very systematic and often occur over a short period.

In any case, the idea of purposefully making our species extinct is just ludicrous; “so the biosphere returns to normal”? And just what the fuck IS normal? I mean, the very reason that mammals and ourselves ever became a dominant species was because the dinosaurs were killed by something, and the mammals at the time happened to be equipped with the tools to deal with the aftermath and survive. The fact is, we don’t change the ecosystem or make it worse, we are a part of it. We are a part of the food chain, and if we were to voluntarily remove ourselves from this planet something else would eventually become sentient and start feeling self-important, or maybe they would see what was left of our society and learn that we killed ourselves on purpose and laugh in our face for being so <i>fucking stupid</i>. Also I like to imagine that they would be dolphins or dogs, because it’s funny thinking of them wearing a suit, even though the realism of such a scenario is pretty low.

To the website itself, I totally support their cause. I move that they stage a protest where they sit outside the government buildings of their choosing and take the first step by killing themselves. After all, voluntary extinction starts with YOU!

Posted By: BC_Programming
Last Edit: 07 Jun 2011 @ 03:48 PM

EmailPermalinkComments (0)
Tags
Categories: Programming
 22 Apr 2011 @ 1:29 AM 

With such a vague title, I could talk about anything; some may assume that I might actually, you know, talk about something programming related. Well, not really, sorry.

Game Controllers. Conventionally PC Gaming has been confined to usually use a keyboard and Mouse combination for most things; or just the keyboard. Most games do, in fact, support gamepads, but oftentimes the game has so many god damned functions that you just don’t have enough buttons to bind.

However, With emulation programs there is a different problem; the PC  gamepads often have widely differing configurations.

One of the earliest PC compatible gamepads was the Gravis gamepad, shown in figure 1-1.

Fig 1-1: Gravis Gamepad

Fig 1-1:The Gravis Gamepad

When I was first given this, three things lept out at me: one, was the fact that there was some stupid stick screwed into what can at best be called the D-Pad, and the second was that the button colours were similar to the Japanese SNES controller (but reversed horizontally for some reason, maybe the manager was all “copy the colours for the SNES” and the person who did it was dyslexic and did it backwards?):

Figure 1-2: Super Famicom Controller

The third thing that lept out was that there was no “mode” type of button; such as start or select. There were two switches, one of them literally swapped the functions of the D-pad-rocker-thing and the four buttons, so the buttons became the directional controls and the D-pad became the buttons. What the fuck use that is to anybody I don’t know. the other switch was even more exciting because it disable two of the gamepad buttons. I forget which ones, I think green and blue. The idea behind that was because the controller was a game-port controller, and therefore if you had more then one gamepad plugged in they would end up stomping on each other. By changing the mode switch things you could make it so you had two gamepads, albiet with only two functioning buttons each.

For far too long I had to suffer with this miserable thing. Now, to be fair, it did work for the most part, but it had this uncanny ability to not have enough fucking buttons. I mean, four buttons? wtf? it worked fine for NES games, since I just assigned the green and blue buttons to start and select respectively, but everything else suffered from not enough buttons.

NES

Fig 2-1: Nintendo Entertainment System- "Toaster" edition.

Ahh, the “regular Nintendo” or “Normal Nintendo” as I used to call it, in order to prevent it being confused with the Super Nintendo, I suppose. Anyway, this was the first console I ever played in my entire life, at least, to my recollection. Our good friends in the U.K were not quite so blessed; Nintendo for some reason originally decided to get mattel to distribute the NES, it was ridiculously overpriced, and sucked ass, because the chances that a given game would work were about the same chance that a grizzly bear covered in marmalade will eat jelly beans. So Nintendo released their own, so in the UK you get to deal with whether you have the mattel edition or the Nintendo Edition, the Mattel edition doesn’t work with some games and the standard Nintendo console doesn’t work with some of the mattel-only games. Thankfully the mattel only games suck ass anyway. Over here, there were two “releases” of the console- the original Console, shown in Fig 2-1. Basically, a big boxy thing, with a completely unnecessary mechanism to insert a game. I mean, what the hell nintendo, you have to insert the game into a horizontal slot and then push the smegging thing down? Warranted, it was sort of a necessary gimmick so they could call it an “entertainment system” rather then a “game system” to avoid being caught in the game console industry recession at the time. The downside to that decision is that it’s damn near impossible to find a original NES that still works, unless the Pin assembly had been replaced.- every time you insert and push down a game, you bend the contact pins ever so slightly, and eventually they just don’t contact at all; then you just push it down even more, so now they get bent even further away. The only sure-fire way to fix that is, NOT the blowing on the games bit that everybody did. That doesn’t do fuck all, people. stop it. It doesn’t help to blow on your games contacts. Idiots. Anyway, the only sure-fire way to fix it was to actually open it up and replace the 68-pin connector itself, but then you’re just back to a pristine connector and it still get’s damaged and bent over time. It’s just awful. However, there is light at the end of the tunnel- I’m not sure why, but this one is far more moddable then the NES2, which I will cover in a moment. Don’t believe me? Check this out!

Fig 2-2:The ColecoVision controller

In any case, the controller itself is what I should be focusing on. As can be seen above, it’s really quite basic; this is nice, given that some of the slightly earlier consoles had attempted to simply one-up each other by adding a shitload of useless buttons. For example- the colecovision controller (Fig 2-2).It is basically a shitload of switches and dials. What the hell is that supposed to be. Looks more like… well, I don’t know, like a joystick and a telephone got together and that was their mutant offspring. Anyway, pretty well any PC compatible gamepad will work comfortably to emulate an NES controller (on a computer). Of course one concern is that the D-pads/POV hats on many controllers suck total ass. Even the gamecube controller fucks it up by giving you this tiny thing that is too small to use comfortably and in an odd position. Oh well, I make do. Almost any controller will have enough button to go around, so you can do all sorts of goofy things like assign controller buttons to save/load save states or turbo fire and all that.

The NES had a second release sometime later in it’s life- the NES2, shown in Figure 2-3.

Fig 2-3: NES2, the "Top-loader" Edition

This re-release addressed most of the important concerns of the first one- they completely removed the Lockout chip, which means that some common problems such as the “blinking red light of death” (which is a term I just invented, so copyright and all that  I suppose) as well as allowing the playing of import games; they also removed the composite video output leaving only the RF switch/cable input thing for going to the TV. As can be seen from the image- the games are loaded differently as well; since at it’s rerelease the video game industry had been revived, there was no need for gimmicky sidestepping of game console labels, so they just had the game inserted right into the top, much like the SNES (which I might add was actually released before this redesign). Since there was no longer a bunch of pins being bent during game removal and insertion, nor nearly as many mechanical parts, this meant that the 68-pin connector no longer succumbed to the same problems whereby contact was lost from excessive insertions/removals. Most people call this the NES top-loader. As for the new controller, well, I have to be honest.

I hate it. I actually like the original better. The thing is, mostly the angle they added between the buttons. Normally I play so that the joint of my thumb rests on the A button, and the pad of my thumb controls B. but with this I have to go into some contorted painful position to do that. It’s like trying to play Jenga upside down. I do somewhat like the “dogbone” shape, if only for it’s novelty and the fact that it no longer has sharp painful edges. Also, this console is about a bajillion times harder to get a hold of, unless you want to spend 100 or so dollars on it on ebay (or get the console only for 20 or so dollars, which isn’t so bad, if you have a SNES or N64 with a RF-modulator, since you can use your existing equipment with it). It does work a lot better then the original though. Some NES games broke new ground by introducing the foreign concept of “saving” your game data. Zelda to my understanding being the most common game to have this feature; Final Fantasy is another. The idea is that it sames data to a chip in the cartridge, and a small battery will make sure that memory stays there. Problem is of course that batteries die; and with multi-hour quest games like Dragon Warrior or Zelda or Final Fantasy, the prospect of going through the entire game in one go is something to balk at. These batteries can be easily replaced, but usually need some familiarity with soldering.

So, for NES emulation- pretty much any gamepad will do. for any Nintendo or Super Nintendo Emulation, the D-pad needs to be a fairly foremost concern. for NES, you can use a keyboard without too many problems though.

SMS(Sega Master System)

Fig 3-1: The Sega Master System

I noted earlier that in the UK and Europe, the Original Nintendo console didn’t really get much attention. This was mostly due to bad marketing decisions on the part of Nintendo; or at least of the U.K/Europe division of Nintendo. When Sega released the SMS (which was more officially referred to as the Sega “Power Base” with only the bundle being called the “Master System”, but the name stuck), the receptions were reversed- in Europe and the U.K it was a big hit, but in North America it was regarded more in a “Nintendo did it” fashion; that is, it was several years after the Nintendo was released, and it was hard to justify having a Master System rather then a Nintendo. It was, technologically, somewhat better then the Nintendo; but having a couple extra years, that wouldn’t be that surprising. Additionally, the power of the processing of a console is wholly irrelevant, in my opinion; it is how that power is used that changes the market. Wether a certain console uses a 16-bit or 32-bit processor doesn’t matter if every game released for the 32-bit system uses it in some stupid 16-bit mode or if all it’s games suck to begin with. One of the nice things about Sega consoles- at least the master system and the Megadrive/Genesis, is the “compatibility” factor. The connector of the Master System and Megadrive/Genesis controllers were a “standard” (if there is any such thing in the console world) format, in that you could often plug in Master System and genesis controllers into Atari 2600 and 7800 machines and use them; they were compatible both electrically and mechanically. The SNES controllers were electrically compatible with NES controllers but not mechanically. Which is actually a tad strange (why rearrange the controller connection?). Anyway, the Master System was unique in that, from what my 10 minute research tells me, it came wit ha pair of 3-d glasses- and not those cheap shitty red/blue glasses, but real 3-d glasses, and even had a special port for them. Although I feel that seems more like a gimmick then anything, it’s still very cool. It could play “card” based games (which were like the standard SMS games… only shit) as well as the more familiar cartridge based format. The controllers were similar to the NES controllers, except that they lacked a start and select button. Personally I think the directional pad is a bit strange as well; although it looks pretty similar to the one on my Dual Action Pro, which in and of itself is concerning because relatively the D-pad on the Dual Action sucks, but  I will get to that later. Oddly enough the console placed the pause button on the console, which is sort of weird. That would be like having the remote control of a TV provide adjustments for the channel but not the volume, or requiring you to shake a dwarf underneath a palm tree to get to channel 12; and the end results are the same, you end up with a concussive dwarf. It was of course workable, since the larger portion of those playing the game were not mobility challenged seniors suffering from rheumatoid arthritis, but rather younger kid, who aside from the occasional make a wish foundation candidate are generally quite active.

SNES

fig 4-1: SNES, North American Original Release

the SNES, the first console I actually owned. In fact, I quite recall being disappointed at getting a Super Nintendo rather then a “Normal” nintendo, which was a bit quirky. I don’t recall even knowing about the SNES at the time, although I can remember that my uncle had rented it at some point and me and my cousin had tried to play Super Mario World by using only the A and Y buttons for some stupid reason. Clearly all the other buttons were ancillary. For the longest time I only owned Super Mario World, and I don’t even want to GUESS at how many god damned times I’ve gotten 96 star on that game. I played it to such an extent that the B button on my controller quite literally broke… thankfully by that time I had expanded my library to a full three games, Mario World, Mario Paint, and Super Mario All-Stars, and SMAS worked with the A button so I had to make do for a bit like that. I eventually expanded to SMW,Mario Paint, All-stars, Mario Kart, and the now rare Tetris and Doctor mario, which goes for a good 80$ or so on ebay sometimes, which is a good profit since it was like 19 dollars when I bought it. but Alas I no longer have my original SNES or games, I have empty shell replacements, none of whom were with me for my early victories over that asshole Iggy Koopa. Oh well, doesn’t really matter.

Anyway, the SNES had about a bajillion different designs- I’ll focus on the North American releases, since those are the ones I’m most familiar with. First, we had the SNS-001 model, shown in Fig 4-1

Opinions are rather varied on this one. some wonder “why purple?” why not use the standard nintendo red? Of course, the reason is that in North America there was no “Nintendo red” in a sense that the original Nintendo was Black and light and dark grey; sure, the box art features the red Nintendo Logo and the controller A and B buttons were red, but that hardly makes it “standard” color. Also, it’s important to note that in a way the Super Nintendo/Famicom logo was different in various locales; in North America it looked something Fig 4-2; compare that to Fig 4-3, the Super Famicom logo used in Japan and Europe.

Fig 4-3: Super Famicom Logo

fig 4-2: SNES North American Logo

They both follow with the “four mysterious weird ovals” theme, but the Super Famicom version is more colourful, and looks like a blue and a red pac-man looking in awe at the bowl of two toilets in need of being flushed. Whereas the North American logo (Fig 4-2) can be represented with as few as two colours, and I find it difficult to make toilet based jokes against it, except perhaps that it looks somewhat like an arrangement of toilet seats you might find in a hardware store. What makes this even more interesting is that the Super Famicom logo was in fact used in the pack-in game, Super Mario world, in the secret Special world. When I first discovered that world I thought it was like a rainbow castle or some shit, turns out it’s some purely decorative and pointless logo they put at the top that might have made sense if I had ever seen it on any SNES merchandise or packaging. Also the North American version has that weird swish thing at the upper right, like the person mastering the original lithographic slab got frustrated and just smacked his chisel across it. I like to imagine it ends in the nike logo on the left.

Anyways, on to the controllers, which was sort of the point of this post; anyway, the controllers are a rather nice improvement IMO over either NES controller;  in fact the second NES controller is “inspired” by this one, at least somewhat. it has L and R buttons on the top left and top Right respectively, a well-designed and very usable directional-pad, Select and Start buttons have a rather “mushy” feel, but any game that has you jamming those constantly is clearly rather badly designed, and I think the NES had the same setup (sort of mushy start/select buttons seem to be something that are not uncommon). The four “action” buttons, or whatever the hell you want to call them, are now the standard layout for most controllers, at least in part; B at the bottom, Y to the left, X at the Top, and A to the right. Generally, games that have you jump use B for jump, and Y for acceleration/running; most racing games use B for gas, and Y for brake. In fact, any game that defied this strangely intuitive feel was not very well regarded. I’d compare this to the Genesis controller, but I can’t really say I’ve had much experience with the Genesis at all; aside from emulation, but I certainly don’t have a genesis controller. However, when you speak of the genesis controller it’s important to note that the Genesis controller seems to use some sort of oddly universal protocol (as I noted previously); to the point where you can quite literally plug a Genesis controller into any number of Atari Consoles and the knock-offs and it works perfectly; the SNES controller can be plugged into a NES, but you need to adapt the pins to fit the differently shaped plug; I believe the A Button on the NES controller is the equivalent of the B button on the SNES and the B button is the equivalent of the Y button on the SNES, but if you want to use an NES controller on an SNES (or are forced to by some sick sadistic super-villian) you’re shit out of luck if you need L, R, X, or Y. on account of the NES not having those buttons.

This brings me to another point- well, not really, but I have a habit of placing non-sequitur points completely unrelated to the current train of thought and I thought I’d make it seem somewhat related, what with the use of a transitory introduction-  I’ve all to often heard people call game controllers “paddles”. Whaaa? who the hell started this? it doesn’t even make sense. Even the original PONG, which had paddles, didn’t call the controllers “Paddles” they had the names “Paddle 1″ and “paddle 2″ to tell you what the controlled, not the name of the damn device. That would be like calling your steering wheel a car. Such synecdoche is pointless, especially when you realize that we aren’t even controlling paddles anymore, so it’s a fucking stupid name. they are called CONTROLLERS. get that through your head people, please? you don’t call the keyboard “letters” or the numberpad “arithmetic” on a keyboard, so stop calling controllers paddles! It’s like people who call Television remote controls “converters” what the fuck? that doesn’t even make any sense. What does it convert? other then the somewhat technical fact that it converts the press of a button into a radio signal, it hardly tells you it’s purpose, may as well call it a damned paddle.

Sega Genesis

Fig 5-1:A Family of Genesis's and Megadrives in their natural environment

Fig 5-2:The Sega 3-Button Controller

Because I’ve never owned a Genesis, I can’t really provide much in the way of subjective opinions on the system. That didn’t stop me from doing the same with the Sega Master System, though. So here I go. In Figure 5-1 we see a family of Genesis and Megadrive systems and their children sitting down for tea. the two systems at the upper right are connected to Sega CD attachments, whose primary purpose was to make the system heavier for no good reason… and make noise while failing to read the disc. More relevant would be the controllers; the original Controller released by Sega was a three-button controller as shown in Fig 5-2. This was before Sony broke new ground and made it so even illiterate idiots could play video games by using geometric shapes instead of letters or numbers. These are purported to be extremely ergonomic controllers in that they are very “easy to hold”. For a demonstration of what I mean, hold a pineapple as tightly as you can. Then do the same with a watermelon. Aside from being a little more slippery from the blood that your hands were covered in by squeezing the pineapple, the watermelon is “easier to hold”. for a direct comparison in the proper context, take the NES controller; it’s square shape wasn’t exactly ergonomic. In fact come to think of it not very much was really designed for comfort or ease of use, at least as far as computers and digital equipent went; controllers hard-wired into the systems with 2-feet of cable cramped, unintuitive controls, square boxy designed for everything, etc. In any case it’s something you will understand if you get your hands on one. Which brings me to another point (which is actually related, unlike my previous digression that was entirely tangential)- these controllers weren’t necessarily designed only for kids hands. Take an SNES controller. If you have big hands, it seems cramped. Heck I wouldn’t call my hands oversized, but I can certainly tell that I have to hold it far differently then I did when I was a kid. It’s not so much uncomfortable as it is awkward. The genesis controller, on the other hand, is huge by comparison. This was entirely on purpose, from what I can tell. It’s difficult to explain, if you ever have the chance to hold one- or even play a game using it (remember, Genesis controllers are backward compatible with master System as well as Atari Consoles) You will certainly know what I mean.

On the other hand, although the Genesis controller is well designed, comfortable, and easy to hold, the original controller only had three buttons.

“So what” you say incredulously, “The NES only has two!”. And indeed it does. But, the problem here is that the Genesis was designed to compete with the SNES, and they only added one extra button; the SNES has 4 more buttons then the NES (L,R,Y and X); if it was merely a dick-waving contest (“my game console controllers have more buttons then yours” type of deal) this wouldn’t be much of an issue, but the thing is many arcade games being ported used a lot of buttons; particularly Street Fighter and Mortal Kombat, for example (Why does Mortal Kombat always remind me of the fake credits from the original Donkey Kong? and the silly names like “Klump” and “Klap-trap”?). So the SNES usually ended up with the “better” version in terms of controls. On the other hand, Sega’s Censoring was hardly as draconian as Nintendo’s, so while the SNES had a Mortal Kombat where your moves would cause your opponent to sweat, the Genesis version had them losing vast quantities of blood (neither was realistic, of course, but the latter had Blood, that automatically translated to badass in those days, apparently). It was a mixed bag. Usually the three buttons did in fact suffice with a few changes. Sega released a 6-button controller that attempted to solve the “not enuff buttons to weak punch” problem, but also discarded some of the stellar usability principles of the original, making it much more cramped. They finally remedied it later, making a nice, usable, and comfortable controller later on, but by then we were practically into the next generation of consoles. Another nice thing is that it is one of the few North American consoles that get’s good use out of it’s expansion slots; I cannot think of a single commercially available accessory for the NES that used that mysterious “EXT” port; and the only one that comes to mind for the SNES is the multi-tap, and I’m not sure if I am merely misremembering it’s connection method. the gamecube has three external connections; one can be used for the broadband modem (or something) and the others I don’t know. Either way, most of the expansion slots are only well used in Japan. the Sega Genesis however, makes good use of them with two attachments (the Sega 32x connects to the cartridge slot, but I am not 100% if it also uses an external connector elsewhere on the console). the Sega CD attached to the bottom or the side, and they both needed their own power supply, so you’ve got three plugs needed for a single console. But at least you got a sense of using it to it’s full potential. Or you would if they had done that with more of the 32x and CD games.

Nintendo 64

Fig 6-1: Nintendo 64 controller

So anyway, where was I? ahh yes; the Nintendo lineage; next in line was the Nintendo 64, whose controller is shown in Fig 1-10. The n64 controller is one of those controllers that seemed to have been designed to look “futuristic” for their time; specifically, the three grips that make it look like a spaceship with a docking bay. It’s also a strange system in that some games that didn’t have battery backed RAM (yes, because the games were still on cartridges)  would have to store their data on a Memory Card (no surprise there, really) but the kicker is that the memory card actually was placed into the controller itself. What a strange mishmash. The idea was that you could have the memory card, Rumble Pak, or… well a few other pak things like the transfer pack, in the controller. The only one that was any good was the memory card, the Rumble pak was just a battery draining device. The main problem is that the design of the controller to hold an extra item made it a tad more bulky then would be ideal. It does have the distinct advantage of a trigger button that actually seems like a trigger button (Z button on the back). The D-pad is just as high-quality as that provided on the SNES controller, with the exception that the SNES controller’s D-pad was actually used- very few games used the D-Pad on the N64 controller, preferring instead to use the Analog stick for movement. Aside that, we have the L and R buttons, B,A, the 4 C-buttons, and Start. The C-buttons generally were “reserved” for camera control; but  they of course found various other uses in other games. For example, in The Legend of Zelda:Ocarina of Time, only C-Up would act as a “camera control” everything else the game controlled for you (placing the camera) and you could use Z-targeting to change your view angle so it made explicit controls for the camera unnecessary. It’s a great controller, overall.

With one debilitating weakness: the Analog stick.

The problem is pretty much that the Analog stick “loosens”; that is, unlike the one shown in Fig 1-10, the Stick will “Wobble” about freely; this doesn’t affect gameplay per se – the stick’s wobbling does not do anything to the game – but it does lessen the possible range of motion for the controller.Meaning you can’t run as fast, can’t do the quick spin attack in Ocarina of Time or Majora’s Mask, and so on. There is one way that you can find a person who has a badly loosened Controller Stick. Ask them if they own Mario Party. If they do, consider their Controller sticks loose. That game had a number of mini-games where the objective required you to spin the control stick wildly. What I’ve always found interesting is that- as I noted previously – very few games took advantage of the very well done Directional-Pad; instead preferring to go for the analog stick. This isn’t bad per se, but it seems a shame to let such a good Directional Pad go to waste. There weren’t even any good “collection” games (Like Super Nintendo’s Super Mario All Stars, which has been released (to my amusement) for the Wii Virtual Console. And they didn’t even add any games. They pretty much just resold the exact same game that I already have on the SNES. Aside from a few weirdness’s (like memory cards going into the controller and not the console) it was a fine system. One other thing that might bear mention is that it uses cartridges, which was pretty surprising at the time. The PSX (the “original” playstation, also re-released under the name PS One) used CD-ROM based media. Naturally, each type had their own advantages and disadvantages; Also, it’s important to note that the Playstation wasn’t the first console to use CD-ROM based media, it was merely the first commercially successful one, which certainly let’s it stand out; other consoles that used Optical Media include the Phillips CD-I, Sega CD, and the Sega Saturn. Cartridges means zero (or near zero) load times, but generally means that the reduced space for information (because it all had to be stored on chips costing maybe 10 cents each) and usually lower quality textures. On the other hand, the N64 “compensated” for this by using texture filters; additionally many games forwent textures altogether, instead choosing to use plain, untextured polygons with gouraud shading. Cartridges also means fewer moving parts; there is no disc drive to fail, for example. A Disc based system can usually have higher quality textures and often they also contain full-motion video, something which is practically unthinkable (or financially intractable, to be more precise) for cartridge based games. The main advantage, and perhaps the most important, is price. A Disc only costs a few cents to duplicate (I’m speaking in bulk, of course) whereas often it would cost manufacturers upwards of 3 dollars per cartridge to create an N64 title. In many ways this was the straw that broke the camel’s back, as developers flocked to the cheaper-to-develop for Playstation, creating droves of games for the system at relatively cheap prices. many great Playstation games retailed for less then 30 dollars, while N64 bestsellers like Super Smash Brothers could cost upwards of 60$. (I know because that’s how much my copy cost me).

Sony Playstation

Fig 7-1:The Sony PSX

Generally known at the time for their Walkman and Discman products, as well as a failed partnership with Nintendo to create a Disk addon for the SNES, their entrance into the Home Console market was fast and stunned both Nintendo and Sega. First, it was the first viable Console to use Optical Discs for the game media, the advantages and disadvantages of which I have already discussed. It’s direct competitors were the N64 and the Sega Dreamcast; of the three only the N64 used cart-based media.

Fig 7-2:the PS-1

Again, I do not actually own this system. The original release was something like shown in Figure 7-1. Sony re-released the Console (at some point after the PS2 was released) as the “PS-1″ shown in Fig 7-2. Of course these terms shouldn’t be confused with the IBM PS/1 or IBM PS/2 or the keyboard interface still common from the latter. One important difference: the PSOne includes the Dualshock controller. Moving along to the controller then… It’s flipping awesome. Probably one of the best controllers ever designed. I personally think the Directional “pad” is a little weak, but that is probably just me being used to the Nintendo design. The Analog sticks are better then the N64′s version (to be fair, the Dual Shock came out some time after the initial “war” between the consoles), since they are all-around better designed (they do have less overall resistance (I believe they don’t use springs to reset the position, which also serves to mean they don’t “loosen”) Particularly interesting here is the fact that the controller is a nice cream white; most people will be more familiar with the PS2 or PS3 controllers of this breed, which are black and black respectively. One nice feature is the Memory cards plug into the console- which is a nice and sane design apparently neither Nintendo, nor Sega, discovered originally. This controller is probably the best all-around controller ever made; good ergonomics combined with plenty of buttons for all sorts of games (did I mention the analog sticks are buttons? They are) I can’t say I’m a fan of the whole “triangle square circle” thing, but that’s just me.

Sega Saturn

Fig 8-1: The Sega Saturn

Another System for which I have no experience and yet insist on commenting on. The Sega Saturn was released after before (edit: thanks to commenter Bruce for correcting me- the Saturn was released before the Playstation, and thus (iirc) the N64 as well) both the Playstation and the N64; it used CD-ROM for the game media. There really isn’t a whole lot for me to say, being that I’ve never even really seen one. For all I know they don’t exist and are a whimsical fiction conjured up by a fictitious, and most certainly giant, purple hippo for the sole purpose of making me think of things to say. Well, just look at it (Fig 8-1). It’s big. Oversized, even. It didn’t gain very much market share simply because gamers no longer trusted Sega, what with that 32x Genesis attachment that was supposed to play games but usually just ended up making your unit heavier. There were only a handful of 32x games released, then Sega discontinued it and released this. Gamers were skeptical, and perhaps a little worried about wether the same thing would happen. The fact that Sega tried to “cash in early” and release the console a few months before the Playstation didn’t help, because there were, almost literally, no games available for the Saturn. An additional problem was the issue of- oddly enough- game saving. Note the lack of any distinct “memory slot” on the front of the system. And no, it’s not on the controller either, thankfully. The memory for your game saves was actually stored in the console itself; that storage was terribly limited, meaning you had to purchase a memory cartridge that would go into the otherwise mysterious slot near the back, which up to that point nobody knew what it was for. Warranted, it’s nice to be able to save games with a base system (unlike, many systems of the time which required separate peripherals). Also, a common issue seems to be that the internal memory peters out; I suspect that the internal memory is simply a CMOS RAM chip powered by a CR2032 battery, or at the very least a battery of some sort, and naturally over time the battery dies, meaning you can no longer save games. Note the lack of a Directional pad, which isn’t so much a problem, since most of the best games for the Saturn were 2-D. Also, you could get controllers with a Analog stick. They look like crap though; seriously. So weird and deformed that I won’t even provide an image.

Atari Jaguar

Fig 9-1:Atari Jaguar With Jaguar CD

I know I’ve oddly skipped the other Atari Systems; I’m covering a lot of ground here and I really don’t want to spread myself thin. In any case, the Atari Jaguar is a rarely seen and even rarer heard from console outside the realm of hardcore enthusiasts. In Fig 9-1, we have a Jaguar with the CD-attachment on top. CD accessories were all the rage, and it

didn’t really matter how unnecessary or extraneous they were (there were SNES CD

accessories in Japan, for example) What isn’t shown in the image is the rear view connectors. The connectors for AV and DSP both just look like the exposed bit of the internal motherboard. Doesn’t exactly inspire confidence in their reliability, which isn’t helped by their frequent “red screen of death” on startup.

Fig 9-2: Jaguar Controller

That doesn’t even touch on the exponential weirdness that is it’s controller, shown in Fig 9-2. What the HELL is that supposed to be? Seriously? What is with the flipping numeric buttons there, did they think people would use their Jaguar for accounting or basic calculator stuff? holy crap. I’m not even sure how to properly criticize this controller, it’s just that bad. The D-pad looks awful, it only has three buttons, and no shoulder buttons, etc. It basically criticized itself. Instead of the stupid number pad they could have added a few more sane buttons.

I may cover more/newer systems/controllers in a future post.

Posted By: BC_Programming
Last Edit: 18 Nov 2011 @ 11:44 AM

EmailPermalinkComments (3)
Tags
Categories: Programming

 Last 50 Posts
 Back
Change Theme...
  • Users » 734
  • Posts/Pages » 98
  • Comments » 38
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

PP



    No Child Pages.

Windows optimization tips



    No Child Pages.