잘생긴 남자

133 Followers
115 Following
873 Posts

Computer science college instructor living in Canada.

Fatherhood, embedded programming, operating systems, compilers, free software, kpop girls

IPFShttps://gateway.ipfs.io/ipns/12D3KooWHKF1XxSjda1EjQ16NxXooshif1Tc7cVWtMycqKcQNcnX

My performance in chess puzzles, as taken from lichess.org. The part shaded in pink is when I had a cold (the point at which I "no longer have a cold" is not really a sharp line, so I made it kind of fade out).

I thought it was cool that I can visually see the effects of a cold on my ability to think.

Make a 24-bit RGB pixmap to #ansiart converter (outputs only IBM437 codepage). Very proud of myself for a 2-hour project. It's even configurable for preserving sharpness/detail fidelity (top) or preserving colour fidelity (bottom). It's the Korean flag over a sky, in case you can't tell. 4-bit colour text mode is still relevant!!

But the BBS scene! I tried out a couple BBSes about a week ago on a lark, just out of nostalgia's sake. The nostalgia was nice, not going to lie.

But it's more than just nostalgia. It's an actual active scene, and it's nice. It's friendly and it's all community-driven and it's got the right feeling, the right balance of pseudonymity and freedom and manners and friendship and intimacy.

I took this screenshot of a poll on a BBS in Montreal. What's really fascinating to me about the modern BBS scene is that it's not just old fogeys like me. There are a considerable number of people who never used a BBS in the BBS era who are now investigating it. You read messaging from high school students who are exploring BBSes now. Really cool to see.

Update on my #hobbyos , #tyros . Feature-wise nothing has changed, as I'm still at the state of having detected a SATA disk, but haven't send any commands to it yet.

The code behind the scenes has changed a lot, though. As you may discern from the screenshot, I have some debugging prints in there from my memory mapping code. Mapping memory is much more dynamic and flexible now (and I can even dynamically allocate new memory from the free memory pools).

This is all necessary to get SATA working, which is the next step.

Tip for anyone else developing a hobby OS: if your kernel is compiled with debugging symbols, gdb can show you the line of code for a specific instruction pointer with the 'list' command (e.g., "list *0xf0a"). Very useful in conjunction with your page fault handler to quickly determine which pointer was not mapped properly.

Minor update to my #hobbyos , #tyros . Basic AHCI (SATA) configuration, setup, and probing is working. Actual SATA operations like reading or writing are still a ways off. That will involve memory allocation (still haven't finished my memory allocator), DMA, interrupts with locks....

Still very proud of myself!

This has really given me an appreciation for how fiddly it is writing hardware drivers. EVERY hardware specification you read is like "So set this bit to 1 to initialize. That's all that's required, but some devices may require a reset after that. Also you should check this bit to see if it's 1, but it will probably work anyway, unless your device is very old". And it goes on like that. Like how can anyone have any confidence that their code is going to work across all devices? It's an impossible problem. I thought specifications would be better by now, and I guess they are...a little bit...but still quite bad.

Another update on my #hobbyos #tyros . Last post, I said I was going to tackle AHCI (SATA controller) next. Which...I've started...kind of.

There was a bit of a domino effect here. In order to find the AHCI controller, I needed some PCI code, and in order to find the PCI code, I needed some ACPI code. And all of this is complicating my virtual memory mappings, so I'm in the middle of redoing virtual memory to be done properly. That means dynamically allocated page tables.

Fun stuff! I have made the decision to only support PCI Express. This excludes all (old) PCI 1.0 and PCI 2.0 systems. I can live with that since it makes my life easier, ha.

Hope to get into real AHCI code soon!

Obligatory screenshot.

Going to work on #tyros #hobbyos again today. Did some preliminary PS/2 keyboard work. I can type stuff! Next up is AHCI (hard drive support).

Doing this work on a hobby OS is, as always, granting a deeper appreciation for how hard it is working with hardware. I'm working with hardware specifications that have been published and examined and implemented for sometimes decades, and even then it's often hard to figure out exactly what to do.

To help keep myself from forgetting everything, I've done, I've started rewriting (so far just the boot code) in noweb (https://www.cs.tufts.edu/~nr/noweb/), a Literate Programming tool. I've always been a fan of Literate Programming and have found it helps a lot.

Obligatory screenshot of my keyboard doing stuff.

Noweb home page

Amusing (to me) error message from my music-mixing program for Kiddo.

As I mentioned in another post, I'm sequencing the music in a spreadsheet (sc-formatted). I then have a shell script which translates the musical notation and timings into C code. I have an enum for musical notes (C, D, E, F, ...). However, "C#" is not a valid identifier name, so it's written as "Db" in the enum.

No problem, right? Just get the shell script to detect whenever there's a note name that ends in #. Take the next note (by increasing its ASCII value...yeah, it's not pretty) and turn the # into b, and everything works great.

Somehow when I was writing that shell script, I never considere the possibility of a G#, hence the error message.

Petition to have Ab renamed to Hb.

Update on #tyros #hobbyos that I'm foolishly making from scratch. My first time in a couple weeks getting to sit down with it. Fixed the crashing bug I had with handling IRQs. I can now properly get IRQs from the timer and keyboard (and then do nothing with them). Scrolling text even works now! Feeling somewhat accomplished.

Next up is dealing with scan codes from the keyboard.

Slow and steady progress on #tyros #hobbyos . This is not a real milestone because I clearly have a bug, but it's been about 3 days (and more than 5 hours of work I think) of trying to get the timer IRQ handler working.

So I'm showing off! Avec bug! I won't have time to fix it until next weekend anyway probably.

I got 3 pings from the PIT (hardware timer) before my kernel went tits up somehow. It really is nice to see SOMETHING. #request_reaction #topic_milestone