💾 Archived View for vigrey.com › journal › december-adventure-2024.gmi captured on 2024-12-17 at 10:30:31. Gemini links have been rewritten to link to archived content

View Raw

More Information

-=-=-=-=-=-=-

December Adventure 2024

2024-12-03 - [53] 9:18

Folks in the Merveilles community have been doing "December Adventure" since 2023. I'm not part of that community, but I do appreciate it still and felt like joining in this time around, even if not "officially". The description for December Adventure can be found at the link below.

Oatmeal - December Adventure

The point of December Adventure is to code a little bit every day in December.

I'll update this particular page with each day's log, even if I don't update the date of this post. The content in the RSS feed should update properly throughout this month, even if it doesn't update the date of the post.

Day 1

About 7 months ago, I removed support for the git-http-backend cgi script on my git server. This removed HTTP and HTTPS support for fetching my git repositories. The post mentioning me removing that support can be found below.

Simplifying vigrey.com - Changing Git, Gopher, and Finger

Well, I added support for the "simple" HTTP transfer protocol to Aurgelmir, so now git fetch/pull/clone supports HTTP and HTTPS on for my git server. This was a long time coming and I'm glad I finally decided to add that support.

Day 2

I have learned today about using the http <meta> tag to set Content-Security-Policy value data, so I added that to the HTTP version of my site along with the HTTP error pages from my web server and to all HTTP pages in my Thrudgelmir server. I'm surprised I didn't know this before, because I already set the value for "onion-location" this way. This now means instead of receiving an HTTP header key and value for Content-Security-Policy, it'll be baked into the HTML pages themselves.

Considering my website and gemini capsule are fully navigatable and downloadable in a .zip file, this will add support for those Content-Security-Policy values on the local navigatable version of my site.

Day 3

Changed up some code for the web server I use to more closely match the redirect behavior my gemini capsule does. What I thought would be easy and quick ended up being a bit of a pain and resulted in quite a few commits. I could have done this the "correct" way, but my testing was making sure the web server code would compile, push the commit, pull the commit on my server, then finally test it in production. It's working now though!

Day 4

Worked on changing out the output of Syzygy, my Sun/Moon/Earth tracker. Wanting to add support for more coordinate systems, like Azimuth/Elevation/Range. This will probably take a few days and will break support for my topbar project, but will get me more useful information!

Day 5

I'm a bit heartbroken today... just learned that the gameboy assembly code I have been working on for the gameboy tarot deck is corrupted and unrecoverable. At least the gameboy tarot card designs are backed up in quite a few places. Started the project over again, having to remember how to start a gameboy project. Another good thing is that at least 2 mockup images still exist, so I can work off of that. Not sure though if this corruption will demotivate me or motivate me. I want to get this project done and out there, but dang that was a lot of time and mental energy that's gone now...

Day 6

I have an incredibly barebones gameboy rom built now. I also set up a dev log for the gameboy tarot card project. Hopefully I'll be motivated to get at least back to the point I was at before, and who knows, maybe I'll write cleaner, more efficient, and more maintainable gameboy assembly code! Also wrote a script to generate an RSS feed for the gameboy tarot card dev logs. Finally, set up some systems of backing up this gameboy project so I don't have to start over again in the future.

Day 7

The random number generator is implemented now in the gameboy ROM. Next up will probably be the deck shuffle functionality and the ability to convert 8-bit random numbers to arbitrary random numbers, which is needed for the deck shuffle functionality.

Day 8

I got the arbitrary random number generator working in the gameboy ROM that converts a stream of random bits into arbitrary numbers. The method I am using is shown at the journal post below.

Mathematically Transforming a Biased 6-Sided Dice Into an Unbiased 20-Sided Dice

Day 9

Spent more time than I wanted figuring out some flaw in my arbitrary random number generator for the gameboy ROM. After finally getting the BGB emulator working, I had access to a good debugger and figured out the issue almost immediately. With that figured out, the card shuffle mechanic works flawlessly!

mGBA does play WISDOM TREE mapper gameboy ROMs, but the emulator kept crashing on me while attempting to use the debugger. I also couldn't get debugging working with visualboyadvance-m, but that emulator doesn't like WISDOM TREE mapper ROMs anyways. Now that I have the BGB emulator playing nice, programming, testing, and debugging should be a lot easier.

I also found an error in the fool's journey NES ROM code for shuffling a deck. The ROM assumed there were 76 cards in the deck rather than 78, so fixed that. Because I'm better at programming in 6502 assembly for the NES than I am at programming in LR35902 assembly for the gameboy, I'm using the NES ROM to help verify that the gameboy ROM's code works as expected.

Day 10

Started building tools to convert a PNG into graphics tile data for the gameboy ROM. I'm considering adding Game Boy Color (CGB) support for colored card tiles, but that will at least nearly double the size of the finished ROM when the source code is assembled.

I also may need to build a tool that relatively efficiently picks color palettes for a colored image to make sure the cards fit within the limitation of 8 palettes of 4 colors each for each 8x8 px tile. That means I need to make sure each 8x8 px tile uses no more than 4 colors each and no more than 8 palettes of 4 colors are needed to represent the entire picture. That's a problem for "later me" though. For now, I'll work on the initial gameboy color palettes a few cards at a time here and there.

Day 11

So it turns out I can get away with a few more than 4 colors per tile as long as I keep to a total of 8 palettes of 4 colors each and set sprites on top of background tiles. As such, I have been colorizing all of the gameboy tarot cards and wrote a script that tells me which tiles use more than 4 colors. I'll also need to write some code to determine how many color palettes are needed for each card.

At this moment, I colorized all of the Major Arcana cards, all of the Wands cards, all of the Cups cards, and all of the Aces. The remaining 26 cards should be relatively fast for me to colorize and I should have those done sometime tonight.

At some point, hopefully soon, I'll try to come up with a standardized set of colors so every card doesn't have slightly different versions of yellow or sky blue for instance. It would be nice to have the cards be relatively consistent.

Day 12

It's pretty cold in my office where I program, so I kept things pretty short. Last night after midnight, I finished up colorizing the gameboy tarot cards. This afternoon, I edited ham-test-practice-fcc to randomize the answer options for questions to prevent myself from memorizing "The answer to the question with this particular ID is C". That should help me feel a bit more confident in my information retention while studying for the Amateur Extra test.

Unrelated, but I cooked a tater tot hotdish today to warm the house up. Here's the recipe.

Tater Tot Hotdish Recipe

Day 13

Well, after determining palette requirements for the gameboy color versions of the cards, I realize too many colors are too close too each other. Because of that, I am dropping gameboy color support from the tarot card project. I don't consider all of that time colorizing the cards to be wasted though, as I found a few miscolorings in the gameboy versions of the cards. Ah well, time to continue the project.

Continued work on the PNG to gameboy tile data converter.

Day 14

Kind of a boring programming day. Yet more work on the PNG to gameboy tile data converter code. Spent more time salting a sidewalk and cooking a roast today than programming, but still programmed a little bit.

Day 15

Finally got the PNG to tile data converter code finished. Next up will likely be writing some gameboy assembly to load small card graphics into VRAM.

Day 16

Started work on getting the gameboy tiles for the backs of small cards and the tiles for flipping the cards into VRAM. Also changed some formatting on the gameboy assembly files for the sake of consistency and readability.

Contact/Reply

If you would like to reply to this post, feel free to send me an email or misfin message.

Email: vi@vigrey.com

Misfin: vi@vigrey.com