Illogicality

March 6, 2008

Question: Design a two pass assembler for an SIC machine in C language.

Time: 3 hrs.

I spent around 5 hours today working on the above mentioned program. A program that I had been working on, at college, for the past few weeks, totalling perhaps 7 hrs out of 9 in three lab periods. That’s 12 hours.

And I haven’t finished.

Now, I really don’t think I’m stupid or anything (or even lacking in the field of coding)… but this reminds me heavily of something Sriram chetan told me about my mini-project a few weeks ago when I told him what it was:

“Hmm… Graphical Representation of Non-Recursive Sorting Methods… hmm… kozhappamilla…

Pakshe… ithu moonu manikkoorinte karyam-e ollu.”

What is interesting is that nobody ever really questions the logic behind our examinations.

Exam (Definition): Tests designed to measure progress against the objectives of a lesson, course or field of study.

It’s a difficult concept, at best, so I’m gonna leave it at that definition. Let’s talk about our 3hr assembler for starts.

The algorithm for the 2 pass assembler is two pages long. One page each for each of the passes. It describes in a very general manner how the first pass scans the whole assembler code, finds of the locations of symbols and stores it. The seconds pass is similarly described as how the results of the first pass are used to put together the final object code.

The whole  thing really isn’t that hard to understand. A layman can understand the nitty-gritties of the whole damned thing in maybe 1 or 2 hours of reading. I began much the same way because I didn’t really pay all that much attention to the algorithm last semester. It was way too big for me to have finished studying the the last few hours before the exam, you see.

Constructing the actual program is, as always, an entirely different matter. The assembler is expected to read the contents of a file, and do a hellu-va lot of things (to say the least) before anything resembling an object code comes out of it. After my 12 hrs on this thing, I’ve completed the first pass, and maybe one-third of the 2nd pass.

As far as I know, no one in my class has completed this program yet. And I know that 90% of the girls and at least 70% of the boys (well rounded figures, don’t pay too much attention) are incapable of completing a program of  this scale. And this isn’t even that big. I’ve gotten to around 300 lines and think there’s another 100 to go. Not much, no.

But 3 hrs?? I mean, seriously?! I think I’ll barely be able to finish typing 400 lines of code in that time period, let alone make a program that size from scratch.

I also remember that my bro had suggested something like an assembler (macro processor, maybe) as an ‘easy’ candidate for a mini-project. True, it would have been an easy option.

For a mini-project! Not an effin 3 hr exam!

Gotta ask the teach about this one… just to see how she’ll squirm out of it. ^_^

P.S. I’ve updated the blogroll to include Sriram chetan’s new blog.

Edit: I’ve completed those programs and talked about them here.

HD-DVD is dead. Yaaay! Finally, someone has decided to give up in the mad race to be the next next-gen recording media. Finally, I can look forward to backing up the hundreds of gigs of data I’d rather not keep on my hard disk. Well… at the very least, I can finally anticipate a near future where I can back up all those HD movies to some brilliant multiple layer discs.

I played Witcher the other day, and realized that graphics in computing has moved beyond my 7900GS for good. It seemed like the sort of game I’d really appreciate, but the frame rates were too inconsistent, even at medium settings… and that’s a total no-no. Ah well, this is in a way, good news, since it just points to the improvements being made in the general gaming industry… unlike some once-in-a-while rarities that are more graphics than gameplay (cough! crysis! cough!). I most certainly look forward to the story-telling possibilities created by the new graphics powerhouses that are the updated nVidia 8-series. I suppose I could say the same about the 9, higher ends of which should be out late this year.

The Macbook Air was a delightful surprise! Un-buyably costly as it is, it’s perhaps the best example of the thinning that’s going on among gadgets in general. And thinner is almost always better! The one device I have which follows the same trend is, of course, the nano… which is ridiculously thin! In fact, the nano, as a mp3 player with a 3.5mm jack has probably reached it’s minimum size since the device is just thick enough to accommodate the jack! You gotta put the hole somewhere!

I’ve also been wondering about just how important sound is in the field of computing. The thought of sound bring three things to my mind: music, movies and games. Of these, both movies and games demand surround sound reproduction as an obvious feature. Music on the other hand is still primarily stereo. I remember seeing the intro of DVD-A-s with AC3 / DTS audio and such, but those don’t seem to have caught on… and having listened to a lot of surround music, I can attest to how ruddy brilliant it is, and how much of an improvement it is over regular 2-channel music. Surround music is still a rarity though and I wonder when it’ll become mainstream. It should, eventually, since it seems like a natural progression.

Staying on the topic of sound and games, it comes to my mind that close to no one I know has ever experienced any game with surround sound. I haven’t either… not really anyway. Almost everybody owns just stereo speakers, even though decent 5.1-s can be had for dirt cheap these days. I wonder how many guys are even aware of the fact that sound could actually matter when playing a game (or how much it could matter). Think F.E.A.R. or Doom 3 with perfect directional sound reproduction. It’s one of my dreams to play such horror thriller titles on a properly working surround setup. :)

That’s enough thinking for one night, I think. :D I need to sleep!

Playing Outcast Again

December 13, 2007

Literally. Whoa.

Another game that I really really loved way way back is…

Outcast

You wouldn’t believe how much trouble I had to go through to get it to work on my current system (properly). Actually, I still don’t know whether all of it works properly (I do now, check end of article) since I just made sure that some of the show-stopper bugs have been eliminated (Once again, check EOA).

Anyway, as a record of what I’ve achieved today, here goes:

PC Specs: Core 2 Duo E6300 + 2Gig RAM + 950Gig HDD (total) + 17″ LCD (1280×1024)

Operating System: Windows Vista 64bit (x64) Ultimate

What I did

After a lot of research and testing, I found out that doing the following will fix a bunch of issues that Outcast faces in today’s computers.

1. Install Outcast - Duh, yeah, but you’ll most probably need Patch 1 to do that. Download it from the link.

2. Further patch it with Patch 2 (the same link as above, really), to remove some glitches.

I’m not sure about what Patch 3 does, but it seems like that one can be used to install the game too. Maybe it’s some kind of combined Patch 1 + 2 thingy. Who cares, I haven’t had to use it yet.

3. Get CPU Killer. Install it (I used CPUKiller v2.05).

Yeah, the old version listed there (or not, who knows what you’ll find when you look there). The why, later on.

4. Start CPU Killer in Administrator Mode, and set the bar to around 6%, and start.

This 6% value will, of course, depend on the kind of system you have. Experiment.

5. Open up the Windows Task Manager, set the process affinity of CPUKiller to CPU 0, or 1 (my computer’s only got two processors at the moment. ^_^) , whichever you prefer.

6. Set the compatibility mode of OC1.EXE, OC2.EXE, OC3.EXE to Windows 98 / ME (or equivalent, actually I’m not entirely sure this is needed, but bleh).

7. Fire up Outcast (use the default link) in Admin Mode. Even though I was using images of my really old and now useless Outcast CDs, mounted using Daemon Tools (Really. I’d bought the game. Seriously.), it worked just fine. I guess Patch 2 acts as a no-cd, or something. :)

8. Alt-Tab out once inside the game, and using the Windows Task Manager, set the affinity of OC3.EXE, the process that’s active when the game is running, to CPU 0, or 1, or N, whichever you selected earlier, that is.

9. Alt-Tab back in.

10. Play.

There you go. Outcast in 10 relatively easy steps. Now you require explanations.

Q1. Why slow down the computer with CPU Killer?

You don’t actually have to use CPU Killer. You can use any CPU slowing program you want. CPU Killer worked for me.

Q2. What I meant was, why slow down at all?!

Certain rather annoying bugs like Mr. Slade (the hero) slowing down to a CRAWL when walking through the paddy fields (in Shamazaar) or the fact that the damned Twon-Ha won’t move can be fixed by lowering CPU Speed. Seems like poor old Outcast can’t handle our super duper fast computers.

Q3. Does CPU Killer version matter?

It didn’t for me. The higher version (CPUKiller3 v1.0.5, right now) was useless since I had to use the older CPUKiller2 algorithm (selectable in configuration) to make the CPU slow down properly (with slider at 2%), so the old version of the program worked for me (albeit with the slider at 6%). In fact, performance with the older version was BETTER for me, since it allowed me to set all the settings to high (in the Outcast loader) and get decent framerates (16-24, according to FRAPS).

None of these slowing down programs work as they should, because even these programs are too old for the new hardware, and their approximation of CPU use is rubbish… which would explain the 2 and the 6% reduction.

Q4. Anything else?

Outcast is a wonderful game. Play it if you can.

See ya!

UPDATE:

1) I’ve finished the game! Everything worked fine, well, except at one point in the game.

Minor Spoiler Alert! In Okasankaar, Cutter is required to accept the assistance of a talan to push two buttons simultaneously in order to open the door to a sunken temple. I was able to bypass this requirement by pushing one button then running to the other and doing it myself. This was before I even had the quest requiring me to enter the temple. However, it worked out fine since it turned out that I didn’t have to complete the mini-quest to satisfy the main quest’s requirements.

2) I actually got a page hit from someone searching for ‘Outcast Patch 2 -jedi’. Haha! I knew there’d be some use to including all those tags! I suppose whoever it was got helped since he / she clicked the link to the download page at planet-adelpha where all the patches reside. Me happy! :) Oh, and I also changed the title. Duh reason. ^_^

Idea

August 13, 2007

I had an idea. A good one. I like!

Enough about that (^_^). Let’s get down to the nitty-gritty of everyday life.

Or not, since I wouldn’t know how to make it sound interesting. I say that because I do not believe that my everyday activities are not interesting. Saying so, would not only be stupid, it would most likely be false. Of course, my everyday activities refers to waking up, going to college, falling asleep, and everything in-between. :)

Let’s see… what interesting stuff have I done (thought about, realized, whatever) lately?

  • I’ve installed Windows Vista on my system (64bit Ultimate)! I have to admit that I’m mightily impressed by the work Microsoft has put in. The installation was deceptively easy… I kept wondering when the endless pop-ups full of ‘Allow this to happen’ and ‘Allow that to happen’ would begin their assault. As it turned out my fears were unfounded. Those popups do pop up once in a while, but not too often. It’s difficult to find 64-bit software by the way, but that’s okay since 32bit works fine. The only failed app I’ve encountered till now is Alcohol, which is kinda sad. Vista is extremely zippy by the way. Windows Explorer has had an overhaul and is nigh unrecognizable from its predecessor. If you have a system with >= 2gB RAM and a decent CPU (read C2Ds or X2s), you should be thinking about upgrading. 64-bit is not a must, but it’s nice if you like to stay on top of things. :)
  • I’ve noticed (over a large period of time) that girls like to mention that I talk very little when I’m in their company. Its interesting to note that they offer this piece of insight only when they outnumber the number of guys that are in the chat at that time, and almost invariably never let me answer the question. Perhaps they feel intimidated. By my looks? No one in their right mind would call me cute, but I guess I could be called handsome under certain lighting conditions. :D That’s me being silly, but then telling me that I’m quiet and I need to talk more is kind of silly too. What makes them think I don’t know that I’m quiet? As for the question… its involuted nature lends me to believe that it can be safely disregarded.
  • I saw the teaser trailer of Need for Speed: Pro Street in High Definition, and I’ve grudgingly accepted the possibility of the eventual death of gaming on the PC. The sort of graphics displayed on that Trailer (run on an XBOX360) cannot be run on my PC (C2D E6300 + 2gig RAM + 7900GS) at either that level of detail or at those frame-rates.
  • Oh, and lest you forget, I had a good idea. A very good one. I like, like, like! :D

Randomness

July 24, 2007

One more lab exam and the fourth sem can be considered over. That’s tomorrow, by the way, and it’s DS, so I’m not exactly worried. La Fest was yesterday and I came out of it thinking “I’ve seen this before”, and of course I had. My bro was correct in his assessment - “La Fest doesn’t change. The people do.”

I’ve been tinkering with my computer. I tried to overclock the CPU, but there’s something wrong with the settings and its doing more harm than good. Instead I tried clicking a idiot-proof button in the BIOS that read “Robust Graphics Booster” and set that to Turbo. My 3DMark06 scores jumped a good 300 points from its stock value! Here’s a text file listing my journey. Simple, and so much more effective than a CPU overclock! Heck, it even took my 3D performance above what it used to be when I had the 7900GT. The GS won’t last long anyway (in the current gaming climate) so a little automatic overclocking by the board should do no harm.

Oh, and I’ve been thinking.

In the distant future, it is inevitable that sufficiently advanced technology and comprehensive (or close to it) knowledge of the working of the universe will allow man to live in harmony with nature, as is so often portrayed in Utopian views of the ‘not-so-distant’ future.

The question is, how much will we have to destroy before we get there?

Or, perhaps, whether there will even be a nature with which to co-exist.

On a far lighter note, I’ve put together a series of Garfield comic strips. They’re supposed to be read together, and so if you’re in the mood for a few laughs (or not ^_^ ), follow the link. Ta ta!

Garfield is Jealous!

Adroit Senselessness

May 11, 2007

I’m leaving for Ernakulam tomorrow morning to attend my cousin’s wedding. Chetan’s gonna be taking his macbook along and I’m gonna test the ‘new’ Photoshop CS3 Mac OSX Native version on it. From the peek that I got of it, it seems to pretty similar to its predecessor… but the update to the magic wand tool (I can’t remember the new name) seems pretty interesting.

And for the record…

and out of nowhere, it seems…

…I’d like to state that I was being really, really stupid when I advised anyone to buy a CRT monitor over an LCD. The past two months with a BenQ FP71-E+ has brought me up to date with quite a bit of changes that have taken place in the world of displays since the oh-so-old cathode ray tubes were in power. For one, the age old excuse(s) of saying that a CRT has better Colour Reproduction, Black Level, 180 degree Viewing angle, and most IMPORTANTLY no ghosting no longer has any practical value. When I moved from my old Samsung CRT over to the current LCD, the changes quite literally blew me away.

  • Colour reproduction was, if anything, so much better that it made me want to cry.
  • True… LCD black isn’t exactly black, but it still dark enough that you’d never dare call it dark grey.
  • 180 degree? You can’t see anything at that angle! Most LCDs boast 120 degrees of acceptable visibility though it still looks better when you sit in front of the computer table rather than viewing from the floor…

… which would be pretty stupid.

  • Ghosting? What’s ghosting? I really don’t know what that is… and I’ve watched tons of films and fragged quite a bit on this display. This problem has been history for quite a while it seems.

LCDs are brighter, thinner… ergo smarter… ergo sexier, and in short much better than a CRT. If you’re planning to buy a new computer, say ta ta to the CRT.

Oh yeah, the title. I actually thought this one up on my own, believe it or not, and it’s even got a hidden meaning of its own. Wicked, if I say so myself. :D

And no, I’m not gonna explain it. Where’s the fun in that? Oh okay, I’ll give you a hint since it’s at least remotely possible that you’ve read up to this point:

I live it.

These are computers that have graced my home through the… ahem… ages.

  • 1. The original 8086 8088 (Edited, check comments)
  • Storage - Two 5.25″ Floppy Drives
  • Display - Monochrome

I don’t remember any specifications… all I remember is playing ‘Paperboy’ and and a quasi-3D racing game, whose name I cannot recall. I still have this machine, though when me n’ Asif tried turning it on today, we heard a popping sound and smoke came out of the cabinet. I think somethings busted. :-|

  • 2. 80286
  • Capacity - 50 mB
  • Removable - 3.5″ Floppy

I don’t remember much about this either, except that I used ‘Norton Commander’ as a file navigator on it, instead of the regular dos command, and that I played the first true-3d game on it. It was a pretty nice racing game. I think ‘Dave’ and ‘Skyroads’ fall in this timeline too.

  • 3. Pentium 233
  • Memory: 16 mB
  • Capacity - 200 mB
  • Removable - 3.5″ Floppy
  • Display - 15″ CRT

Memories of this one are mixed up with the earlier 286. The only thing I remember clearly is that this one got burned in a fire (while it was at someone else’s house). It even had a turbo button which took the processor to 333!

  • 4. Pentium III MMX (500 Mhz)
  • Memory: 64 mB
  • Capacity - 8 gB
  • Removable - 3.5″ Floppy, CD Drive.
  • Display - 15″ CRT

This one didn’t last all that long. Don’t remember much about it either. It’s currently living out its retirement at Petti’s Sreekanth’s place.

  • 5. Pentium IV (1.7 Ghz)
  • Motherboard - Intel 845e Max
  • Memory - 128 mB DDR
  • Graphics - Chaintech Geforce 4 MX440 with 32mB DDR
  • Capacity - 160 gB (towards the end)
  • Removable - Floppy, CD-RW, DVD Reader
  • Display - 17″ CRT

I had this one for quite a long time. It’s residing in Asif’s home right now, along with a twin brother. :)

  • 6. AMD Athlon 3000+ (1.83Ghz)
  • Motherboard - MSI K8N Neo4 Platinum (for the most part… until it croaked)
  • Memory - 2gB DDR
  • Graphics - Leadtek Geforce 6600GT with 128 mB GDDR3
  • Removable - Floppy, CD-DVD Complete Combo (Sony DRU-720A)
  • Display - 17″ CRT

Dad’s using this system right now. Pretty damned powerful, and it’s still selling around here.

  • 7. Laptop - HP Pavilion DV4000 (Bro)
  • Display - 15.4” Widescreen
  • Processor - Centrino 1.7 Ghz
  • Memory - 512 mB DDR

I’m not sure where this one is.

  • 8. Apple Mac Mini (Bro)
  • Processor - Core Duo 1.83 Ghz
  • Memory - 1 gB
  • Capacity - 80 gB
  • Removable - CD-DVD Complete Combo

…which resides in Delhi right now.

  • 9. Intel Core 2 Duo E6300 (Dual Core)
  • Processor: 1.83 Ghz (Stock)
  • Memory - 2 gB DDR2
  • Graphics - Leadtek Geforce 7900GT with 256mB GDDR3 (dead, awaiting replacement)
  • Capacity - 400 gB (three HDDs)
  • Removable - CD-DVD Complete Combo (Sony DRU-720A)
  • Display - 2 x 17″ CRT at first, 17″ LCD (BenQ FP-71e) now.

…which I’m using right now. It’s running on Anand’s 6600GT for the moment, awaiting a replacement 7900GT. Or Better. :D

  • 10. Laptop - Apple Macbook (White Core Duo) (Bro)
  • Display - 13.3″ Widescreen
  • Processor - Core Duo (2 Ghz)
  • Memory - 2gB DDR2
  • Capacity - 120 gB
  • Removable - CD-DVD Complete Combo

Its monitor got bashed in by some evil  person. :-|

  • 11. Laptop - HP Compaq Presario V3000 (Mum)
  • Display - 15.4″ Widescreen
  • Processor - Core Duo (1.6 Ghz)
  • Memory - 512 mB DDR2
  • Capacity - 80 gB
  • Removable - CD-DVD Complete Combo

which Mom uses very rarely.

  • 12. Laptop - Apple Macbook (White Core 2 Duo) (Bro)
  • Display: 13.3″ Widescreen
  • Processor - Core 2 Duo (2.13 Ghz)
  • Memory - 1gB DDR2 (awaiting more RAM from the busted macbook)
  • Removable - CD-DVD Complete Combo

which Dad just bought and will bring over here in a few weeks.

I wonder which the thirteenth one will be. ^_^

Surround Woes

December 27, 2006

I’ve been at it all day, tinkering, that is. I guess I’ll never be satisfied with the way my sound system works. By the way, it’s a JBL ESC 360 HTS. It’s not in production anymore though I noticed it sitting in a shop in Dubai for a LOT cheaper than what dad bought it for some 3 years ago. Aah, the curse of all electronic equipment.

Anyway, let me explain what I’ve been doing today. The JBL system that I have only has a digital input (S/PDIF) unlike conventional PC surround sound systems which have multiple analog cables doing the job. The digital signal over the coaxial cable (and the decoder in the subwoofer) allows for theoretically higher quality sound output. Its downside is that the speaker can understand only few kinds of singal. Dolby Surround, DTS, and any PCM (Pulse Coded Modulation) singal. By passing the audio component of DVD movies and other video files with Dolby Audio over the S/PDIF unaltered, using a feature known as S/PDIF pass-through (supported by players like PowerDVD, MediaPlayer Classic etc. etc.) I can listen to the full quality sound without any trouble. However, when it comes to multi-channel sound generated by the likes of games and other surround-sound formats (AAC and Vorbis being good examples), my speakers simply fail to recognize the different audio channels and assume it to be a normal stereo PCM and proceed to decode it with ProLogic. This, quite uninterestingly, yields inaccurate output.

But I had this nagging question in my mind as to why there was no REAL-TIME encoder on the software side which could, on-the-fly, encode ALL the sound information coming out of the PC, be it stereo or multi-channel sound in an unsupported format, into AC3 (Dolby). That way, my speakers could recognize ALL signals as dolby and thus retain correct positional information (for the surround sound anyway).

And as usual, somebody had thought of this before. There’s a program called AC3Filter which does this to an extent. It encodes almost every multichannel source (transcoding) to AC3 but the problem is that it IS A FILTER. That means that it’s got to be activated by a program when it encounters surround sound of a certain type and I’m using MediaPlayer Classic (there are many others) for that purpose. Today evening, I heard for the first time how the surround (AAC) music files I’d gotten from Tuner2 really sounds. PWETTY impressive to say the least. It almost makes me wonder why people bother with plain old stereo songs anymore. :D

Anyway the problem (sigh…) is that no GAME will ever be able to call up AC3Filter’s encoder and achieve the same effect… however I’ve read about a certain other program called redocneXk dedicated for Creative soundblaster cards with S/PDIF out that can do absolutely everything… meaning perfect surround sound even for games over an S/PDIF interface. The only two downsides I can see to a system like that is the increased performance hit (since the CPU will have to do the encoding even with a sound-card) due to encoding and the slight loss in quality due to encoding process itself. Pretty acceptable losses in my mind for those who have quality speaker systems and don’t want to dump it for ones with analog in.

Now if anyone can donate a Creative Audigy, I’d be so very very thankful (not to mention happy). :D

Back Home

September 13, 2006

Yup, I’m back home. Hmm… I don’t see anything special about it… except perhaps for that odd fluttering feeling somewhere in my abdomen telling me that the series exams are just 4 days away. Not good. Not good at all. Heck, I don’t even have my textbooks yet. Gotta search among bro’s old books for something that will do I guess, or I’ll have to set out to get some soon enough. Tomorrow seems to be a good bet.

I set up the computer on the day I got here (yesterday, ahem). It was my first time assembling a computer from the ground up without assistance. It went… okay, as long as you ignore the part where I kept inserting and releasing the locks on the HSF (Heatsink Fan), without realizing what I was doing. I made a proper mess of the conductive paste which was pre-applied on the Intel boxed fan. The temps on the core look okay though, so I’m not all that worried. I do plan to change the HSF to something better soon, so this little messy arrangement will have to do for the time being. Performance wise, I haven’t noticed much of an improvement… probably because I haven’t really done any processor intensive stuff on it yet, I guess. Some synthetic benchmarks have shown that things have gotten really faster. For example the 3dmark06 scores for the CPU went from some 800 odd (for a 3000+ Winny clocked at 2.1Ghz) to a quite impressive 1600. Not bad, not bad at all. :) I’ve got tons more software to install on this PC, not to mention set up the dual monitor config again and then the JBL 5.1 speakers. Thank god for the S/PDIF out on this new mobo, I really MISS the awesome sound. :-| Must do that soon.

The thing is, everytime these thoughts of indulging myself comes into my head, the warning bells about overdoing it get just a little bit louder. Experience has shown me that I’m a loser when it comes to achieving anything at studies. It’s not that I’m stupid… at least I’M quite sure that I’m not, it’s just that… well… I’ll gonna have to leave this discussion for another day. I can’t come up with a sensible category for that kind of topic right now. :D So see ya later! :)

Ever heard of this?

September 9, 2006

It’s supposed to make shut-downs as fast as they were when you first (re)installed windows.

http://www.intelliadmin.com/blog/2006/07/why-windows-takes-so-long-to-shut-down.html

Clicky!

You might wanna read this too…

http://www.intelliadmin.com/blog/2006/09/why-windows-takes-so-long-to-start-up.html

They seemed interesting.