A potentially interesting blog

Posted by Astryl on Oct. 4, 2012, 3:48 a.m.

Of course, the potential interest in this blog will depend on whether the people reading it have any interest in the subject matter or not.

I haven't written an interesting blog in a while though; my life has suddenly been frantic, what with work. Not stressful, just an unaccustomed lack of time to do things.

My S4D entry

I've got the game working, which is always the easiest part. Making the content is the part that throws me off. I fully intend to release it though; complete or not.

Game mechanics so far include being able to pick some blocks up and throw them, an automap system, view shifts, and basic platforming.

Even with a month left, I see this going nowhere.

OS Development

I'm still working on my kernel and surrounding system, slowly. So far, I've completed all IRQ handlers, tweaked the fault page generator, and started the groundwork for the memory management system.

Writing a memory management unit is fun, in every sense of the word. At first, you may be thinking that it's incredibly difficult to do, but in the end, you come to the realization: There's no wrong, because there's nobody to tell you you're wrong. Ergo, no Windows/Linux/Whatever freaking out because you touched their protected pages.

The paging protection mechanism is handled by the processor, though. A page is allocated and referenced through a page table.

The page table is, in C terms, an array of 32-bit values. The first 12 high-order bits are used for various status flags (Such as whether the page is 'present', has been accessed, etc), and the 20 remaining bits are used for the frame address.

Allocating memory merely means setting a few of the status bits (Notably, the Present bit, and sometimes the Read Only bit). The program requesting the allocation will then get a virtual address returned to it. The kernel handles mapping virtual space addresses to physical addresses.

There is nothing mysterious about memory management; it's just a case of micro-logistics with 4KB pages.

The kernel doesn't have to worry about stepping on anything. It does, however, have to prevent any processes it spawns from stepping on each other, and of course itself.

Speaking of processes, my basic task model… I'm going to try use a simple timer based task roster. Every new process gets added to a list. These processes are sorted on insert, and carry various 'task weights' (Or priorities). In a theoretical frame of execution, a pointer is pointing to the first entry in the table. It jumps to that code. The code in question will execute until it hands over to the OS, requests an asynchronous IO read/write, or the interrupt timer triggers.

When one of these things happens, the 'state' of the process is saved (A flash save of any registers involved, basically), and the OS moves onto the next task in the list and repeats.

Of course, I can't create my task model without first having a kernel heap, and I can't have that without the memory manager. Once I'm done with these three main problems, I can start working on the other 'problems'. Notably, a VFS (Virtual file system), User modes, Executables, and the OS API.

Of music and songs

I have never written a song. Probably never will, because I can't imagine myself singing again. Ever.

But regardless, I still write pieces of music. Most commonly for games, but also for the Guitar and Keyboard. I was practicing on my guitar again this morning, turning out some improvised Jazz, when my 1st string snapped and slapped me across the thumb. Fortunately it didn't hurt me this time (Last time the point of the string hit my hand. Stung for quite a while).

I'm still thinking of buying a cheap keyboard next month. Preferably one that can be used as a MIDI controller, and supports basic key velocity. A lot of emphasis can be added to your music if you can control the tone of each note…

I'm still writing a ton of chiptune, I just haven't released any in a while. I'm sitting with around 20 new tracks at the moment, most of them complete. I might drop some of them on SoundCloud sooner or later.

I also intend to write that beginners guide sooner or later (For Famitracker, later on for VGM Maker, notably instrument creation).

I've been drawing a lot of inspiration from the old Commodore 64 composers, notably Ron Hubbard. I have something here that may be of interest to some:

http://www.hvsc.c64.org/

Over 40000 SIDS. If you're a chiptune artist, you can draw a lot of inspiration from these, and at the same time feel like crawling up into a ball and giving up…

Upgrades

I was rejected for that contract, the one that would have netted me a laptop and a cellphone. Probably my credit history, which is practically non-existent.

So I went shopping around through catalogs again, this time browsing through some of the local PC part suppliers, and set my sights on a few upgrades to my PC that I can afford.

Specifically, an Intel Pentium G620, a Gigabyte Socket 1155 compatible motherboard, and 2GB of DDR3 memory. All of this is better than what I currently have. It also offers me the opportunity to incrementally upgrade (The motherboard is compatible with the current i* range, for instance).

I'm being nice and using the old parts to build my brother a PC. The one he has earned a nickname from the family: Dracula. It's an ancient Celeron 1.2GhZ, with 512mb of RAM, and a tendency to not work when it doesn't feel like it, only to 'resurrect' every 100 days.

Actually, it's problem is simple: The RAM is derped. But nobody is going to fork out money to buy more unreliable DDR ram, which costs more than DDR2/3.

The only thing I'm not upgrading is my version of Windows. Because I refuse to pay R980 for 7 Home Basic. There is a special deal on Win 8 at the moment, but I absolutely abhor it. I like my nice buggy open-ended systems that I can choose to screw up, thank you very much Microsoft.

Programming Goals

I don't know if I've ever talked about this before, but hey, here I am writing a kernel and OS from scratch. Why? I was thinking about that the other day.

The reason is simple. I want to try learn as much about programming as possible, in all the possible facets; this includes Systems design, low-level programming, driver programming, compiler design, sound system drivers, multimedia programming, etc, etc. I guess I just want to pull of the near impossible and learn everything. Probably because I love programming.

Anyway, my list of lifetime projects is kinda looking like this:

> OS + Kernel + Custom Bootloader (Got one, but use GRUB too)

> 3D game with custom software renderer

> Raytracer (Already done, in part)

> 3D game in OpenGL (Done. See Exile)

> Music synthesizer/tracker.

> Video format and player

> Image format and viewer (Done, but lost. REWRITE ALL THE CODE!)

> Packed file format (Done)

> Compression algorithm

> Interpreter for a custom script language

> Byte-code based scripting language

> Compiled programming language

> Assist AI for general applications.

> Several more, most minor.

Most of these will take ages, if I ever get past the preliminary research. These exercises prove no point, and won't net me any money, but they're great for learning purposes. At the moment, I'm focusing on the OS, and the many interesting problems that go with it. My ultimate goal with it is to make it 'self hosted'. That is, I want to compiled GCC for it, or even better, my own variation of the C language. I'm gaining an intimate understanding of X86 assembly now, and therefore can begin to see myself creating a compiler in the near future.

Anyway, I'll end the blog here. Looks like I've gotten back into the writing groove.

TL;DR:

I'm crazy, insane, out of my mind, etc, etc.

Comments

Astryl 11 years, 11 months ago

Oh heck, a wall of text… it looked a lot shorter on the Post Blog page…

svf 11 years, 11 months ago

I'm crazy too.

Astryl 11 years, 11 months ago

I love how I write a wall of text, it gets practically ignored.

I write a relatively short blog about getting injured while skateboarding, and it explodes…

Conclusion: We don't promote reading on 64digits :3

We promote Reality TVBlogging.

JuurianChi 11 years, 11 months ago

I write game reviews and nobody gives a shit about them unless it's a game that is already popular or something they have played already.

also I'm criminally insane. so no fowl, mate.

I'm looking forward to your tutorials on using Trackers. If only to see how you explain algorithms because I have a hard time explaining them to other people.

Astryl 11 years, 11 months ago

Quote:
I'm looking forward to your tutorials on using Trackers. If only to see how you explain algorithms because I have a hard time explaining them to other people.

I'm having an interesting time thinking of ways to explain everything I want to explain. I'll probably make a vid, or a highly visual step-by-step document with lots of pictures. Video sounds like a better idea though. Perhaps I'll do one this Sunday, when my family are conveniently out of the house, and I ought to overcome my odd stage fright concerning microphones and family-members.

Wait, when was it the world was supposed to end again?

Charlie Carlo 11 years, 11 months ago

Don't worry Mega, I, your favorite commentator, will read this bitch. I just need a cigarette first.

Astryl 11 years, 11 months ago

Quote: Filched from another time, another place

I'm going to attempt to quit smoking

Just read your blog again… Giving up already?

Charlie Carlo 11 years, 11 months ago

Quote:
Just read your blog again… Giving up already?
It's hard, man, especially when you don't actually want to quit.

I just read your blog. I don't understand what you're talking about at all with the OS stuff. To be honest, my brain probably just inhibits even attempting to comprehend it because it doesn't really interest me. I mean, it interests me that you are making one, which is crazy awesome. All I know about operating systems is apparently mine is 64 bit, but I don't know what that means. I know it has something to do with me having two Program Files folders.

Anyways, the music, you should make a chiptune song and then somehow import it to a more dynamic music program, and master it and add new shit, so it's got all the badassness of chip tune with modern stuff thrown in. I'm not sure how well that'd work out, though. I had my high E string snap on me once, it cut my pinky finger. I didn't know fingers could bleed so much.

Also, your brother's computer sounds a lot better than my family computer.

Astryl 11 years, 11 months ago

Quote:
Anyways, the music, you should make a chiptune song and then somehow import it to a more dynamic music program, and master it and add new shit, so it's got all the badassness of chip tune with modern stuff thrown in. I'm not sure how well that'd work out, though. I had my high E string snap on me once, it cut my pinky finger. I didn't know fingers could bleed so much.
I've done that a few times with my tracks. Never released the results though, because I was worried it wasn't going to be accepted/listened to.

What I do is export each channel, then import them as samples into MadTracker or LMMS, then perform mastering. Useful if I want one of my channels to become an electric guitar (Shred).

Also useful when I want some soft strings in the background.

Quote:
Also, your brother's computer sounds a lot better than my family computer.
That makes me wonder if your family computer is a 486DX or a Pentium II.

Charlie Carlo 11 years, 11 months ago

For the record, I'd totally listen to guitar shredding chiptune music. Your music already sounds like punk music to me, which is my favorite kind of music. Obviously it's more… chippy.

My family computer is a custom built one. It was customly built in 2002, maybe, probably before that, even.