Assembly to machinecode
2024-03-25

intro

	I finally got to do a video on some actual development for the CBA-8. Sure took a while to get to this point. In this video I write a little program in my assembly language and go through the source for my compiler.

Next we compile it into machine code and then step through it byte by byte to show how assembly turns into instructions which turns into raw bytes. After that I go through the source for the emulator and then run the machine code in it.

All in all I'm quite happy with the video. I've learned a lot from these first videos but I'm just beginning to realize just how much is left to learn to improve the quality. Let's take a look at what I've done so far though.

video editing

	I began this youtube revival with not editing at all, then switched to Kdenlive when the need to arose. In general I found the program unintuitive and it had a tendency to crash.

On the advice of a friend I tried out Davinci Resolve. It's closed source, which annoyed me to no end, but since I'm not reliant upon the video editor's format for future projects (I store the raw video and audio) I'm ok with running it in a container without access to my system at large.

Wow. What a difference. Resolve is night and day compared to Kdenlive. Every function is where I'd logically think it would be, no more hunting through sub-menus. It's amazingly snappy for scrubbing and previewing. Rendering is done at close to real-time as opposed to 6x slower than realtime. And in general I found it much more intuitive to interact with its functionality.

Something as simple as turning my webcam's footage into a circle and positioning it was a massive struggle in Kdenlive but took me less than a minute to figure out in Resolve. This is a future buy for me but the free version has way more functionality than I even need.

visual quality

	I ran into some issues with recording to H.264 then re-encoding it by exporting from the NLE and finally having the quality crushed by youtube's re-encode process. I managed to work around this by recording to AV1 in OBS. Resolve has native support for decoding AV1 so that worked out great. It's rough on the CPU since my graphics card (3070) doesn't support AV1 encoding in hardware, just decoding.

It was immediately apparent that my webcam wasn't up to snuff. It's a decade old and has been gathering dust in a drawer, but it's been great for testing. I opted to put myself in a circular window to hide the low visual quality of it. In addition it can only record to a very compressed H.264 or MJPEG. I've opted for MJPEG which results in catastrophically large filesizes for the rather poor quality. But I then immediately re-encode it to av1 reducing the size from 10gb for 20 minutes to around 200mb with no loss in visual quality (since it's so poor to begin with).

Importing these files into Resolve works great, scrubbing and previewing doesn't stutter at all (likely due to the 3070's hardware previewing of AV1) and I then export to a lossless format from Resolve only to re-encode it to AV1 before uploading to youtube. Yes, I should be uploading the raw exports but ain't nobody got time to upload 20gb of video when the source quality is as low as mine is. 

audio quality

	Remains a massive issue. I cannot figure out how to get good quality audio from my Blue Yeti. If I keep the microphone right by my mouth my bass-y and throaty voice is hard to understand. If I keep it further away I lose overall quality.

I've begun reducing the lower frequencies of the recording and amping up the higher. Unfortunately this results in my voice being a bit squeaky and it doesn't sound like my normal voice. But at least people can understand what I'm saying at the expense of fidelity.

There's a lot of work left on this front. A lot. I'm really not good with audio engineering. At least the fuzzy pop filter seems to be working as intended but I believe it creates a weird bass-y sound by itself. Thus making the overall quality even worse when I increase the highs in post.