28 January, 2009

Dishwashers: if there's one thing they don't do...

...it's the washing of your dishes.

I have to deal with bits of food stuck to plates, cutlery, knives, bowls, et cetera. This sort of thing makes me wonder why we even have a dishwasher in the first place if it's not going to clean a bloody thing.

Of course, one of you is going to tell me that the cutlery should be facing upwards in the cutlery basket. But there are two problems when removing them:
  • I would get germs all over the eating side of the cutlery, defeating the purpose of putting them in the dishwasher in the first place.
  • We have knives in the cutlery basket.
So, either way, you're going to have to wash them a second time.

This morning, I had to empty the dishwasher and I noticed that there was a plastic container on the top tray which was full of water. I pulled it out, poured some of the water out, and there was a bunch of gunk on the bottom. Fortunately, it washed away after adding more water to it.

Oh, and one more thing: who the fuck forgets to put some water in their cup after drinking their tea? The cup gets stained and it's fucking impossible to remove it afterwards, not even with a good ol' fashioned scrub. So, I will have to drink tea while thinking about the fucking moon.

Anyways, that is all I have to say. Sorry it's so short.

27 January, 2009

Hippies: 'nuff said.

I was "fortunate" enough to go to the "Organic" River Festival a week or so ago with my parents. $20 a head to get in, $5 for parking, $65 total... for entry. Oh yeah, seeing as it was an alcohol-free event, we had to leave the beer we had with the person at the entrance. Fortunately, we got it back, considering that it was a dozen bottles of Heineken.

So we drive into the makeshift carpark (read: paddock), get out, and one of the first things I notice is that there's a group of people drinking beer and doing the "wassup" head flick at us. I was tempted to give them the "no" look back.

We expected this to be a food festival; however, the first stalls were where we could get some "organic" clothing. My Dad paid about $70 for a hat at one of them because, well, he needed a hat. Probably didn't look at the price tag. One of the next stalls across were some cheap clothes made in Equador, a country well known for slave labour. And a few stalls along, there was a fairtrade clothing stall. Hang on...

Once we finally got to food, there was some pretty cool stuff. Hey, 50% organic woodfire pizza! $10 for the basic pizza, or $15 for a few mere sprinklings of one of 3 different things. We ordered one with salami.

That $5 was probably one of the most pointless $5 we ever spent there. Having said that, the pizza was good.

I'm going to ignore some of the weirder stalls until later in this post, as I can't quite remember when they came in, and this is a post about hippies.

I did have a couple of drinks. There was a stall selling hot drinks, so I got a hot chocolate ($4, or $5 for the bigger cup, this is the one I chose). You could REALLY taste the cocoa. The other one I had was a strawberry + orange fruit smoothie... UGH that filled me up. Was about $6 IIRC.

So yeah, that was the good stuff. The first problem you might notice is that a lot of the stuff was expensive. You may also notice that a lot of the stuff wasn't actually organic. Come on, there was a bouncy castle there, how the fuck could that be organic? And even if it were, it'd probably taste pretty bloody horrid.

I came past a stall which was playing some rather Chinese-sounding music and had someone standing in a weird position with his eyes closed. Something about experiencing nature. My verdict: if you want to experience nature, go camping. Don't pay some loon to play some trippy-ass music and tell you some shit even though you're really surrounded by a bunch of stalls. Hello
(if you see a rectangle there, it is because you don't have any fonts with the interrobang in them. if you see a diamond with a question mark in it, same thing, except at least it's partially correct.)

Because this was a hippy festival, there were vegetarians. At a food stall there was something on the wall saying "Go Green Go Vege", and a piece of paper saying that cattle are one of the biggest contributors to global warming.

Wait. You only told me not to eat beef.

Now, here's my counter-argument to that. I don't believe that sheep, pigs, nor chickens (especially the latter) emit a lot of greenhouse gas. And do you know what I believe would be a clean, green alternative to cattle?

Whale meat. Yes, according to someone who has actually eaten whale meat (not myself, although I would like to try it one day), they taste just like big sea cows. What's more, they don't appear to emit the greenhouse gasses that a cattle would. So, we have it wrong: we should be eating whale, not beef.

Ten bucks the people who put that up regularly drink milk.

Oh, yes, the recycling stations. When you had some waste, you could recycle it. Great idea in theory, but only a few stalls had recyclable and/or compostable waste, so most of the waste went to the landfill.

So, what was the $20 a head for? We seem to think it's to cover the cost of pot.

Now, most of you have probably encountered people who happen to have a bit of hippiness. Y'know, those who are into "ethical" stuff. Well, I get my ethics from my Christianity, so I'm quite frankly not interested in the hippy ideals.

If you've seen the TV show "Off The Radar" (if you don't live in New Zealand, odds are you probably haven't), you may have come across something the guy said about eating animals. He summed it up by saying that, after you've raised these animals, and they've reached the end of their lives, the most honorable thing to do would be to eat them.

In theory, if you need to kill an animal, doing it as quickly and/or painlessly as possible (although tranqulisers might not be a good choice as people are probably going to eat them, otherwise you wouldn't have killed them in the first place) would be the way to go. Also, you'll want to raise them with care, not "oh let's just shove them in a cage and not actually give a shit about what they feel." Because animals have feelings, too, and it's what drives them. I, quite frankly, don't have any objections to that, and if they're feeling really worn out, then I suppose that would be the best thing to do.

I'm not entirely sure what's with all this "don't eat animals" shit, though, considering that a lot will quite happily eat eggs. A friend of mine will only eat free range eggs, however, using that reasoning, he should be able to eat meat which has been ethically dealt with. This sort of shit stumps me. Especially when I think his shoes are made out of leather.

Another friend of mine apparently saw a cow being dragged across a desert while still alive, and that sort of thing would make me feel like shit. So yeah, I think she has some excuse.

Now, I could go on for quite some time about vegetarianism, but I think it's a good time to move on. After all, this post is about hippies, not vegetarians.

What's with this "mother nature" bullshit? I mean, seriously, who's fucking stupid idea was this? My theory: "Mother Nature" is just a term to keep atheist hippies happy. I did a rant about atheists quite some time ago, and what it seems to boil down to is that, to follow God, or any other gods, you actually need to have an appropriate lifestyle. So we have some twisted reasoning, that there must be a god otherwise life itself won't make sense, but there must not be a god either otherwise you'll have to actually fucking do something decent, so we get this stupid term of "Mother Nature". Because the Christian god is described as a male, and we don't want any resemblance.

Before we move on, I'd just like to say one thing.

MOTHER NATURE IS A FUCKING CROCK OF SHIT.

If you're going to believe in a god of some sort, at least do it properly.

Now, tree hugging. You just want to stick it in that hole. Uh yeah, oh, Oh, OHHH DARWIN STOP IT! YES!

My verdict: It's a fucking tree.

A tree doesn't have emotions. Nevertheless, we still need trees. But hugging them and trying to feel up a tree is pointless. Like I said, if you want to experience nature, go camping. AND DON'T FUCK THOSE TREES!

Yes, trees can look really good, but it's still a fucking tree.

Lastly, of all things: maraijuana can cause brain damage. If you think you're right, and you're getting stoned off your ass all the time, chances are you're probably wrong. And you're probably not getting off that joint any time soon.

09 January, 2009

Game Boy Colo[u]r: the scene is nearly completely dead :(

If you're doing any game-boy development, you will probably come across a file called GBSPEC.TXT. This tells you everything that you need to know... about the classic Game Boy. But what if you wanted to know about the Game Boy Colo[u]r? The only information I could find was on the website about the "Lush Engine". This thing is a goldmine of information... there's gold there, but you have to mine for it, and pan it out. Sadly, the only trace of this website is in the WayBack Machine.

There's a list of registers that can come in handy if you know what they do, a tutorial on how to edit the GBC palettes, and some source code to show you how to put a coloured tile onto the screen.

Remember to thank me for this, because the only alternative to that is to tell everyone to fuck themselves and die for losing such information. I would rather thank someone than wish that on anyone.

So, here's all the vital information which isn't already out there and isn't only stored in an archive. Spread it like wildfire or watch the scene die completely - I mark it as public domain.

My code examples will be in the same format as the WLA-GB compiler, one of the several compilers in WLA-DX. Because, let's face it, RGBDS is bullshit.

Here are all the extra GBC registers AFAIK, according to the Lush archive:
  • FF4D (KEY 1) - Speed switching
  • FF4F (VBK) - VRAM bank select
  • FF51 (HDMA1) - Horizontal Blanking, General Purpose DMA Control
  • FF52 (HDMA2) - Horizontal Blanking, General Purpose DMA Control
  • FF53 (HDMA3) - Horizontal Blanking, General Purpose DMA Control
  • FF54 (HDMA4) - Horizontal Blanking, General Purpose DMA Control
  • FF55 (HDMA5) - Horizontal Blanking, General Purpose DMA Control
  • FF56 (RP) - Infrared Communications Port
  • FF68 (BCPS) - Colour Palette BG Write Specification
  • FF69 (BCPD) - Colour Palette BG Write Data
  • FF6A (OCPS) - Colour Palette Object Write Specification
  • FF6B (OCPD) - Colour Palette Object Write Data
  • FF70 (SVBK) - WRAM Bank Specification
I can't tell you about any of the HDMA ones or the SVBK register. I can only speculate on KEY1 (you write something to double the speed and zero it to go back to normal) and RP (you treat it just like the serial port). But I can tell you about the rest.

On a GBC, video memory is banked, and there are two banks. The first bank (vbank0, not an official naming scheme) acts just like your normal Game Boy. But the second bank (vbank1) is what makes it special.

There are 8 background palettes, and 8 sprite palettes. You set them by filling in the palette registers, which look a little like this:

H = XRRRRRGG
L = GGGBBBBB

R is red, G is green, B is blue, X is unused. You fill in the registers by using a set of I/O registers. BCPS and BCPD (or OCPS and OCPD for sprites). And you access them like this:

BCPS = IXPPPEEB
I = if set, move onto the next palette entry automatically after writing the data
X = unused
P = palette select
E = palette entry
B = byte (0 = low, 1 = high)

You write to BCPS first, then write the data into BCPD. Here's an example on how to write the colour magenta into palette 5, index 2:
LD a,101100
LD ($FF68),a
LD a,011111
LD ($FF69),a
LD a,101101
LD ($FF68),a
LD a,%01111100
LD ($FF69),a

But how do we use them? We need the help of the second bank (vbank1). Generally, you write your tile data to vbank0, and then your colour / bank select data to vbank1.

Hang on, bank select data?

Yes, you can write tiles to vbank1 in the tile space, and they will be accessible with this magic write :D

The format of the tile space bytes in vbank1:
ATTR = ????BPPP
B = bank
P = palette

Let's say that we had the ASCII set loaded into vbank0 and we wanted to put an exclamation mark in the top-left corner which used palette 5, we would use the VBK register, like so:
LD a,$00
LD ($FF42),a
LD a,"!"
LD ($9800),a
LD a,$01
LD ($FF42),a
LD a,%0101
LD ($9800),a

But how do you handle sprites?
For some weird reason, you can only use 3 of the 4 colours of the object palettes, even though you can set all 4. So, ignore entry 0.

To write the object palettes, you do it the same way as you would with the background palettes, except you write to OCPS and OCPD. And you don't fill in entry 0, as that is pointless.

So how do we use them? If BGB is correct, you fill in your sprite flag byte like this, as opposed to the Game Boy:

FLAGS = ?YX??PPP
? = unused / unknown
Y = y flip
X = x flip
P = palette

And it should work... that is, if you've filled in the correct bit in the LCDC.

So, there you have it, a crash tutorial on how to use the most anticipated feature in the Game Boy Colo[u]r: colour.

Because, quite frankly, there's no fucking information left.