Box Model

I’ve always been confused by the html/css box model. I can never put my finger on what it is specifically, but it never works how I expect it to. Anyway, about an hour ago it clicked for a second so I thought I’d draw a diagram so I could remember it for more than 10 seconds. The problem I find with a lot of diagrams is they don’t actually say what each part does. Saying that, I totally remember seeing a diagram just like this in the past.

Now all I need to do is lean how to do graphic design I guess.


I was driving home yesterday just coming off the M40 and got stopped at some traffic lights behind a few other cars. Now the specific junction has 4 lanes with two going off onto a dual carriageway which I wanted. We pulled off and the car in the outside two lanes trundelled along the national limit half mile strech at 50. Fair enough I supose, holding me and the car behind you and, as I wanted that lane at the next roundabout, me up as well. No problem, I dropped in behind the two cars then the guy in the middle decided to undertake and drove off somewhere. The car in front of me now drove around the roundabout at 40, hugging the inside the whole way around. I pulled into the outside lane, not increasing my speed at all but then they started to slow down for some reason, so I did the same because they were in front of me and I had no intention of shooting past them on the roundabout. This kept happening as we approached the exit we both wanted, this person clear of my front bumper right up until they started to pull off through my path and came to a full stop. It got to the point where I was also stopped and just looking at them as thy were looking back at me. To be honest I should have just driven past and left myself t think of how much of a moron they were to stop on the inner lane of a roundabout, but I didn’t.

Anyway, they continued to stare at me so I gestured for them to go thinking “You’re in front of me, you have been this entire time and you’re currently in my way, please continue driving before I die of old age”. So now we’re going along at 50 in a 50 limit, perfectly fine. Ahead is a speed camera, I’m personally not worried, we’re doing 50, they clearly are and so slow down to 40 typically. Then after the camera is a nice long stretch of road with this 50 limit which is clearly only there because there are a couple of quite blind junctions onto the road. The person infront of me continues to drive along at 70… why? You were quite happy to drive along at 50 in the 70 limit earlier, why are you now not only breaking the speed limit, but what would and probably should, be the limit (60) if it were unrestricted.

Ridiculous, but I continued to drive along at 50, slowing down to 40 when the next limit came in. Then there is a cross road with a right turn lane and traffic lights, and there in front of me is the same car waiting at the red lights to turn right. So I pulled in behind and waited for the lights, pulled into the road, now with a 30 limit and watch them speed off to around 40mph. Further on, another set of lights, and there they are waiting again, as I pull up the lights go green and out paths separated.

So this got me thinking, that distance, granted only 4.5 miles, took the two of us exactly the same amount of time, and in fact, if I hadn’t been held up on the initial stretch I would have taken less time. So there was a spectrum of speeds we could have used to cover the same distance in the same time. Now this seems like a much more interesting measure of travel. Our two velocities must have been the same, we travelled between the same two points in the same amount of time, and our average speeds must have been the same as we travelled the same overall distance in the same time.

In the “real world” of physics this sort of measurement isn’t really ever thought about, because if you travel the same distance at different speeds your travel time is different, and if you travel for a certain time at different speeds your distance covered is different. Its only when you add in social constructs such as traffic, roundabouts, crossings, traffic lights, etc that this measurement even exists, and if anything it’s a much more accurate measure of congestion and road design than any other. The only issue is that it is incredibly hard to measure. How do you define travelling speeds? Attempt to travel x many miles above the speed limit? Attempt to travel at a set speed? Then the setting off time makes a difference, if you have two miles then a traffic light and travelling at 30 you will get there as it turns red everyone travelling at >30 will get through it and have a faster time to get across it. If you set off a few seconds earlier you’ll likely get across it at 30 as well altering the spectrum further.

Now I think that if you put up signs showing the speed spectrum as well as the limit you’d get people to slow down. If you saw a sign saying the limit was 40, but the speed spectrum is 35-50, meaning if you travel along at 35 you’ll get there at the same time as someone going 50, I’d drive at 40 still, but thats because I’d know the measurement can’t be accurate to my exact case, but if I didn’t understand the measurement I would have driven at 35 to save fuel, the minuscule amount it would be.

Unfortunately I well know that most people would see that and either continue to drive at or below the speed limit per usual, or think, OK, I need to drive at over 50 to get through this faster. This is mainly due to the fact that most people believe they are better than everyone else, and that they deserve to get wherever they’re going faster than anyone else does. This is also the sole reason people run red/changing to red lights, everyone else has to wait, so why don’t you eh?

Dry spell

Successful blogging… yeah. So I’ve not really had anything worth blogging about lately, I’ve not had any enthusiasm for anything. I was looking at writing a Minecraft server/client, but the latest update implements a load of stuff I was planning on implementing to make my server worth using and it’s kinda killed what little drive I had to do it. The Gamecube project kinda got rail-roaded by my getting pissed off with using my laptop on the floor and having no furniture in my house so I have no where to do it now due to the level of crap on my only table.

In better news though I have a new job to start next week, beaming films into cinemas from space! At least it sounds more epic like that, I’m moving to another form of support, but hopefully more enjoyable and with a much bigger pay cheque which is not half bad. This weekend I’m being taken to look at houses which is a bit of a weird thing for me. My Dad’s bank pension is being paid out and he’s giving me some money towards a house which is awesome and mortgages work out much cheaper than rent it seems.

Hopefully after this week I’ll be able to do something constructive in my spare time, rather than playing Minecraft. Our server is pretty epic though even if I do spend far too long on there. View a map here!

Some thoughts on layout

So bread took up most of today. Scratch that, sleep, not being arsed to get out of bed and bread took up most of today. In that order. Decreasing order.

But, I did do some thinking about how I’m going to lay out this portable GameCube. My vision of what it should look like is something like this image on the right, and I think its going to be pretty close.

Some rough estimates look like I should be able to get another 2 battery packs in there so 9.6Ah * 3 = 28.8Ah? Should be good anyway, the GameCube power supply says 3.25A at 12V so should be looking at around 8-9 hours battery life, which in all honesty, is pretty good but that doesn’t take into account the LCD.

Still it is going to be pretty bulky and these extra battery packs are really just there because there is going to be space. Issue is, I really want it to have the disc drive central on the back. Sorta like the… well completely like the PSP did, essentially this is what I’m aiming for. That’s what takes up the space, clearly if I put the disc drive to one side and just had the one battery it’d be only just bigger than the screen.

Anyway as you can see from the photo it’s going to be a little… wide, especially with the controller halfs on the sides. Not too bad though, its about 2 inches either side of the screen before the controller and it does allow for the extra batterys. Biggest bonus though is its going to be pretty thin… comparatively, not much more than the controller, this was my biggest fear initially that you’d have the controller and about 3 inches back from that as more case.

As an aside of sorts I found a while back something I’m really not trying to make: The Ccube. The successor to that actually looks pretty swish, if a bit pricey at 800-1000USD (I assume US) seeing as you can pick up everything I’ve got for under 100 quid and my battery life is going to be excessively more than that one’s.

Putting a Bun in the Oven… and 7 more

Had to.

Anyway, I baked some rolls today, and learnt some important lessons.

So, pretty epic eh?

Anyway, I wanted to make rolls because I cannot find, anywhere I’ve spent the time to look, crusty rolls. They always sell these nasty, solid, soft outer rolls that I don’t like. My issue with rolls is theres too much bread, so a nice crusty shell sorta breaks it up a bit, that and light and airy inside is good too.

Unfortunately these rolls didn’t go super well. Well they are pretty epic, I just had some kitchen equipment issues. So lessons learnt:

Lesson 1: I really need to clean my oven… its not that its really dirty, theres just some oil/fat/something at the bottom that vaporises when I cook anything in there, probably because I never really use a baking tray, which leads onto…

Lesson 2: I need baking trays if I’m going to keep baking stuff, also for pizzas and other things too. I spent maybe 30 minutes today cleaning the wire racks in the oven because I don’t have baking trays to put the rolls on, and it’s not the best thing ever to use for this reason:

Yeah, so bread dough on a rack tend to sorta fall through and re-form on the other side, I had to pull some of the rolls off and push others back through the gaps… good thing i cleaned them pretty well.

Lesson 3: Ovens get really hot, my right hand is killing me from stupid burns. I managed to get one at work when i decided to catch a soldering iron, but that wasn’t too bad, in the fleshy bit of the palm by your thumb. But picking up a hot wire rack with a tea towel, not good. The tea towel was damp, folded up lots and I still managed to quite badly burn my middle finger and thumb on my right hand.

Lesson 4: My cooking is amazing.
Well not so much a lesson, I already knew this, but it can be a lesson for you. Don’t be taking me on in the kitchen, my food is epic even when I fuck it up… maybe even especially when I mess it up… maybe not that last one.

Weird Screws, Clip-on Panels and Tricksy Heatsinks

Ok so yesterday I began this Portable GameCube project by taking apart the donor console. Here’s a picture of all the parts I have so far for this project, should be everything I need apart from a few consumables and paint.

Picture quality sucks, but it was on my phone, anyway. On the left is the 7″ TFT screen and all the extra junk that came with it. It’s designed for use in a car or something but its actually a pretty good screen for only 20 quid, comes with a panel mounting plate, has two video inputs tehcnically one is for a rear view camera in a car with a remote switch to change between them. In the top right is the donor GameCube, cables and controllers. The issue with the controllers is that the switches are attached to a single PCB inside, so to cut the controller in half you have to cut the PCB which of course means it wont work any longer, so the second controller will be used with wires to connect up all the buttons and such.

Bottom right is the battery, its a 12V 9600mAh battery with a mains charger for japan or wherever it came from,I will probably get a few more of these as when I was figuring the size out a while back I think there was a load of extra room and more battery == more playtime, and longer battery life too since the current drain will be lower on each battery. Not pictured, there is a LED display and driver chip for a battery monitoring circuit so you can see how much battery is left, this’ll have to be set-up in situe so I’ll also have to get some variable resistors and other items to finish off that part.

OK, so on with the dissassembly, there are 4 deep holes at the corners each of which has a screw at the bottom, but not a normal screw, oh no. Nintendo at least use a special headed screw which is kindof an inverse torx head. Instead of being a 6 sided cog shape imprint its a similar shape extruded instead, of course you need a special tool to undo these screws called a “Game Bit”. The right part is acutally pretty cheap, you can get both sizes for about 5 quid plus postage from ebay but the GameCube uses the larger of the two.

Right so you’ve bought your relatively special tools and you’ve undone the 4 screws that secure the top to the base. Flip the Gamecube over and lift the top of the case off, it should come away easily. Now you’re left with the actual Gamecube hardware and to be honest, its pretty small. Theres a laser lens in the top which you do not want to damage so best way to avoid it is to just put a disc in which will keep it covered and relatively safe.

Now on the left is a fan assembly and at the front is the controller/memory card facia. All the mechanical parts for the disc cover are self contained in the case which is great as it means I don’t have to rebuild it all in a dodgey way, but the reset and power buttons are seperate and will have to be attached later on. The front facia is pretty easy to remove, it looks and feels pretty sturdy but actually you can just lift/pull ir forward and it unclips, just don’t pull it straight off.

The ribbon cable at the back is actually quite strong but still, try and be a bit careful with it, as you can see it is soldered to the front panel not in a connector and that would be a bastard to fix. The back of the cable is just in a vertical slot on the main PCB and can be pulled straight up and out disconnecting the front panel entirely with the controller ports, which is good, but also with the reset switch and power on LED which is somewhat annoying. The memory card slots are connected directly to the main PCB which is an issue, but not unsolvable.

Next comes the fan assembly, there are two screws which hold it in place and are undone in the picture, and there is a power cable that runs through the fan to the small power PCB at the rear of the unit. Disconnect the red and black power lead and pull it out of the securing slot in the fan, the cable runs right down to the base so its best to just pull it to the side so it is out of the way. You have to full remove the two screws before removing the fan as it has to be pulled out laterally away from the unit due to the plastic piece going under the disc reader.

So with the fan you’ve removed 2 of the 20 screws securing the disc assembly to the main PCB. There are 8 more that you can see on the sides on this picture and 4 more in the back that you can’t. There is also an additional 4 screws that hold the memory card slots together that have to be removed as well. The back plate is then attached in much the same way as the front panel and just pulls away, no cables attached to it. This then reveals the 4 remaining screws which allows you to remove the disc unit with relative ease as it just lifs off.

So here it is, the main core of the GameCube, with one pretty big heatsink. Now this is where it gets a bit tricky to see what to do next. There are no obvious screws holding the board in place but it wont budge. So there are those 6 heatsink screws… normally you don’t want to remove a heatsink if you can help it because you have to get thermal goo and reseat it and a world of other pains, but actually those 6 screws aren’t holding the heatsink, they hold the PCB to the base. Undo these with care as they have a small spring washer on them as well which you want to make sure you don’t lose assuming you want to attach the PCB to the metal base below it again, which I might. These spring washers just help to stop the screw losening under vibration by holding it tight against the threads once it has been done up and if you’ve ever picked up a GameCube whilst it is on it vibrates A LOT with the disc spinning. Anyway, after removing the screws the PCB just lifts out leaving the base and that power cable from earlier.

The large metal plate is held in by 4 screws and then just lifts out leaving only the power regulator circuit and some metal pieces for grounding and structural purposes. The power regulator is held in by 4 small screws and then just lifts out. This circuit will is important as it allows the GameCube to use the 12V power supply from the mains brick, or in my case, battery packs to give all the power rails the board needs, I’ve not checked it but at a guess there’s 12V, 3.3V and 1.8V supply rails, but there could well be other voltages too.

So that’s it, just lift out the regulator circuit and other bits of metal and you’ve disassembled the GameCube, pretty much entirely. There are other things you can disassemble if you want, like the disc drive assembly, but I want mine to continue to work after I’ve finished.

There are two things I’d like to say about this process. Firstly, I’d normally try and keep track of where screws came from and there’s loads of methods, you can label everything and write it all down, put the screws back where they came from, lay them out in a map format so you can immediately see where they came from, but I didn’t, there is only 4 types of screw in the gamecube and it’s pretty obvious where they go, as its mostly the large brass ones that hold the disc drive in place.

Secondly, the GameCube is a really well built piece of kit, there were no connectors to undo for the most part and no tricky parts to undo… execept the gameb bit obviously. This is something usually really overlooked by electronics designers, usually you’re lucky if the PCB fits the case properly once it has parts on it, and working in the test an repair department for a company that makes a load electronics, it can be a real pain in the ass to undo some screws and get to components sometimes. The GameCube is a pleasure to work on though and if you know what you’re doing you could completely disassemble and reassemble a GameCube in 10 minutes, which is impressive for most electronics of this level, look at any other console, it’ll take you 10 minutes to get the case off, let alone disconnect everything and dismantle it to base parts.

So next on this project I’m going to try and work out some spacings and I’ve got a couple of quic drawings of what i want it to look like in the end to scan in and upload at some point.

What is up with internet providing companies

I’ve spent the last 2 hours trying to get this to work how I want, a job that if i had direct access to the machine in any form would have taken 10 mintues. From 1&1’s bastardised admin tools to BT blocking my site for some reason it’s been a nightmare. Whilst I can understand why they make this stuff hard to do look at 123-reg, its a shitty form ok, but it’s direct access to the DNS registration you’ve bought, and at the end of the day, you’ve paid for the domain, why can’t you access the proper DNS record information.
And BT, don’t even. Seriously, what is with blocking sites at random… I can’t even connect with FTP or SFTP it’s ridiculous, that and they put their own fake 404 response, so if they want to block a website from you, they just throw their 404 page at you and there aint a thing you can do about it… except tunnel through an external computer of course, which is what I’m doing now.

Oh, I was going to post some lovely pictures of disassembling the GameCube but BT fucked that one in the ass, going to sleep now instead.

What really gets me out of bed in the morning…


Basically, nothing. It’s not that I dislike getting up, I just have no reason to. This is probably my biggest problem in life, motivation. I have none, well except for the starting a project motivation, the one that fades away after the first few days/failed attempts.

Projects are awesome, not like Barney Stinson awesome, but they’re up there somewhere. I have within a few meters of me at least the beginnings of 4 projects I’ve started over the years. Behind my laptop is the MIMO USB touch screen I bought shortly after deciding I was going to build a car PC and software, I had it all worked out too with GPS, music, phone intergration, wireless syncing, etc, etc. But it never really got much further than that, till about 9 months ago when I bought a 300 quid microITX computer that would run off a 12V supply… and thats where that stalled again, I got it up and running, had debian running on it with the little screen, played about with synergy for a bit, then got bored and its just be collecting dust ever since.

So now I’ve decided I need to take these things more seriously, I’ve invested stupid amounts of money into some things for no real reason and have got bored of them pretty quickly, my mini, this blog/site thing. Well not so much the mini, I had to start working which buggered that up but that’s another story. Anyway, main point of all this, I was planning on making soemthing in the vein of this.

Now what I really like about this one over the hundreds out there, is that it still feels like an N64, I look at it and think that’s an N64, not, that’s the insides of an N64 stuffed into a lunch box. I don’t know what it is about it, but when I see that, I still see an N64, even though it clearly isn’t anymore. So in that vein I decided, a while back now, I think it was early last summer, to do a similar project, only with a different console. The GameCube.

What I think makes the GameCube such a good console for this is it was always designed to be portable… sort of. It’s small, robust, has a handle and most importantly, the games are mostly games you want to play with a group of people. This, I think, is where Nintendo were cornering the market, whilst Sony and Microsoft were fighting it out for the super intense, real life graphic, n00b pawning action in the on-line fps market, Nintendo were dominating the multi-player and casual gamer market with first the GameCube and then the Wii. Unfortunately they seemed to have turned back on this and tried to head into the serious gamer market, which to be honest, they were never that far out of with series like Metroid and Zelda.

But I digress, Portable Friggin’ GameCube, it’s going to be intense, watch this space…. well no, watch above because that’s where anything will be posted not in the whitespace following that statement.

Socks, WTF

Seriously, WTF is with socks. They never pair, I have a pile of unmatched socks and there’s no second sock to go with any of them. At all. It’s not like I’ve found an odd sock and thrown it away, that’s what the pile is for. Still, every month it gets bigger even though there’s nowhere for the socks to have gone. I’m always having to buy more socks so I have pairs but since I don’t throw any away where are the others going?

I can only assume there is an evil cartel between sock and washing machine manufacturers to have the washing machine completely destroy socks on occasion so you always have to buy new socks and so endlessly fuelling the capitalist machine, or something like that anyway. So after I’ve done my washing tomorrow and searched this entire house/flat/duplex thing for any sock I can find, 20 odd socks are going in the bin. I will have only pairs, and only socks without holes in. More than likely I will be buying a new pack of socks by the end of the week when I run out.

On anther note, successful blogging here, 6 months between posting. See you in August I guess!

Let us begin… plus a few days

So the first day of dismantling my Mini… well, not really, right now when writing this I’m a couple of days off taking out the engine, but lets pretend.

Ok, so my Mini has been rusting for a while, and I’ve been wanting to restore it properly pretty much since I got it, but it was cheap, 650 (ish) quid to be precise (ish). It wasn’t great when I bought it 4 years ago, all four roof corners rusting, one with an inch diameter hole in, A-Frames rusting, subframes rusting and to top it all off, the fuel tank hose broke off the day before I went to pick it up. I had to drive about 50 miles with a car full of petrol fumes. Now normally this would be manageable with the windows wide open, which it was, until it started to piss down with rain on the M3.

So we reached the travellodge we were staying in, and it was horrific, articulated lorries going past the window all night, about once every 30 minutes, literally. Anyway, we ended up throwing away the back seat of the car and just saving the cover. Luckily we found another Mini in a scrapyard and bought a “new” back seat to replace it.

Whilst at University I managed to lose the back end whilst driving out of a Tesco car park in the dark with steamed up windows and not only bent the rear subframe, but also, somehow, the solid cast iron stub axle arms. So I’ve had the rear subframe off twice and replaced it once. Then 2 years ago I made a fancy repair to the roof, with a chopped up Evian bottle and some bathroom sealant, which actually worked quite well.

Anyway, photos of the Mini in its before state will follow when I next post something, probably “Day 1”