The random rantings of a concerned programmer.

(Untitled)

April 30th, 2009 | Category: Random

Some random points:

  • My shitty new EEEPC arrived today. It’s a 900 with 512MB RAM and 4GB of SSD. And the GENERIC kernel panics while booting over the network (missing the ae driver? I dunno).
  • I got fucking shitfaced last night and forgot to set my alarm — I subsequently woke up at 3PM and thus didn’t go to work today.
  • I’m picking up the keys for my new house tomorrow. Going to spent the next four days cleaning the fuck out of it and making everything pretty.
  • I haven’t had sex in over 6 weeks.
  • I got fucking shitfaced tonight and somehow acquired a bunch of adderall. Amphetamines + FreeBSD + Haskell = ?
5 comments

(Untitled)

March 24th, 2009 | Category: Random

ぱんつ

God I was fucked up last night (again). I remember trying to compile devel/cross-gcc for some reason (and laughing when I remembered I had to apply patches to get the arm-eabi version to build). I should submit those patches upstream one of these days.

You know what’s always bothered me a bit? Why don’t NDS emulations use dynamic recompilation to make them not slow as balls? Naturally, due to Nintendo’s API model (ie, “nothing” except memory-mapped registers) there are a couple tricks — not only do those registers have to be emulated (by mmap‘ing those regions and reading them with a helper thread in the same process space), but you’d also have to simulate interrupts.

On the DS, interrupts aren’t that bad. There’s a couple of IRQ tables sitting off in memory where you put pointers to your interrupt handlers. Simulating interrupts are basically just a matter of pthread_suspend_np‘ing the application code, jumping to it’s interrupt function, then resuming the application (I think).

And then there’s the actual recompilation of the ARM binaries to a native assembly (honestly, it’d be better to recompile to LLVM or GCC bytecode, then push that through a compiler to generate the native assembly), which I imagine is a massive pain in the ass.

Not nearly as much a pain in the ass as going through and figuring out what all the hundreds of little weird places in memory are supposed to do. It’d be a lot of digging through reverse-engineered documentation and diving into the code for other emulators and stuff.

But I think this is basically the only way to get any reasonable performance. I think emulating the hardware with an ARM interpreter is a needlessly costly way to implement the functionality (though it works, for the most part). Blah.

6 comments

(Untitled)

March 19th, 2009 | Category: Random

IT’S BEEN AWHILE SINCE MY LAST EMO POST SO I FIGURE IT’S ABOUT THAT TIME.

I’M SO FUCKING DRUNK JESUS CHRIST I FUCKING HATE THIS SHIT. WORK ALL DAY EARN LOTS OF MONEY COME HOME SIT AROUND DO RANDOM SHIT GO TO BED THEN GO TO WORK THE NEXT DAY. WHAT THE FUCK IS THE POINT OF THIS SHIT.

Fuck I know I’ve tooted this pipe before. I fucking hate this bullshit life thing, but I’m too cowardly to fucking off myself. Writing fucking code is the only goddamn thing I do remotely well (and I’m shit at it) and I fucking hate doing it. I fucking hate computers. I fucking hate how I subvert myself into a microcosm containing myself and a small 17″ screen.

And yet I obviously don’t fucking hate it since I don’t make any motions to get myself out of the grave I’ve fucking dug for myself. And I can’t honestly think of anything I’d rather be doing — everything is fucking mundane and boring. Maybe I should just join the army and volunteer to go to a war zone so I can just start killing people, then get shot and fucking end this pitiful pathetic existence.

UGH.

9 comments