Whenever I learn how to calculate a value for something useful -- even a simple one -- I like to write a program that performs the calculation for me. It helps me cement the process and recall it more easily. My Advanced EMT course has recently gone over medication-related skills like fluid boluses and injections. The calculations for these skills are very simple, but sometimes tricky to perform mentally on-the-fly. And, while 4 lines of Python will perform both of the calculations needed for these skills, I've been meaning to learn some assembly for a modern platform -- so I decided to pass on the Python this time. This post will explain the process and demo the resulting application.
A post I read last week convinced me that I needed to start messing around with ROM hacking some of my favorite old school games. My platform of choice was the Nintendo GameBoy, a console I've played around with previously, and the first title I attempted was Seiken Densetsu -- released as "Final Fantasy Adventure" in the States. The memory addresses and values below are the same for both the US and Japanese versions of the game. I took the same approach as that of the referenced post, inspecting addresses and changing values with debugging tools. I'll look at some of the values in RAM I was able to hack, then wrap up by giving a short explanation on how to actually patch the game binary to make our modifications permanent.