That time Simon the Sorcerer made it into the bedroom 🤣
Now it covers up my Yamaha Tyros4 keyboard and provides a nice backdrop when I'm on camera in daily meetings. Always a good talking point along with the Displate posters.
#retrogaming #simonthesorcerer #bed #retrocomputing #adventuresoft #displate #yamaha #tyros
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.
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.