Showing posts with label links. Show all posts
Showing posts with label links. Show all posts

Monday, January 11, 2010

Day 3: In which I lose my windows programming virginity


And just like that, the first step toward a fully complete and functional Link's Awakening editor has been taken.


That's right, kiddos, I have official performed (and it WAS a performance) the creation my first ever Windows API program. That program, of course, being an empty window.


I feel pretty proud of myself. Let's detail how it happened, eh?

About four hours ago I went to the Microsoft website and downloaded the Windows SDK. Actually, I downloaded one of many of them, but I just went with the defaults anyway. Screw instructions.


While it was downloading I checked facebook, watched some TV, went and had dinner, and by the time I got back it was done. Great.

Anyway. I copied and pasted The Forger's Hello World message box program into VC++, and it worked. Thus began a three hour long journey of copying, pasting, looking in the help files, writing the code for myself (which I figured I should do to help me retain it, but with the Window Class Properties I just could not bring myself to do it), and finally building. After I thought I had it all done, I compiled and ran it.


There were 38 errors.


But, I pushed through. Most of the errors were simple syntax, or idiotic capitalization of variables, and I realized that I had never learned to handle strings in c++ without string objects, so needless to say I needed a refresher. Anyway, it finally worked, and what you see at the top it the result.


I still don't know how Window Procedure functions are referenced in the main body of code, so if anyone is reading this who knows, I'd appreciate it.


Speaking of, a note on people reading this blog (whom at the present I am sure are 0):

I created the blog primarily to document my progress and to give myself a sense of accomplishment that would drive my hard work. I never expected anyone to read it. But, maybe after a few more posts, I'll spam Mystery Google with it or something. (I wrote a Greasemonkey script for that.)


What I learned:
-Losing Windows API virginity should always be done with the condom of the Microsoft SDK and extensive help files.
-What handles are, how windows behave, and the basic structure of the Windows API.
-Ham and cheese omelets for dinner are delicious.


Up next:
-Minimap Pallete and Behavior Data editing.


Goodnight, all, and I wish you good hacking dreams.


...okay sorry, that was creepy.

Sunday, January 10, 2010

The Starting Line

Today is January 10, 2010, and I am going to attempt a ROM hack of The Legend of Zelda: Link's Awakening.

Now, mind you, this is a big deal, because I have attempted something like this in the past. A year ago, I failed, but this time, building on my experience, I'll see if I can't succeed. To the best of my knowledge, there is no complete hack of this game as of yet. There will be.

The challenge is this: Hack the Zelda ROM and create, using Windows API, a fully functional editor program. Then use the program to create a full Zelda hack and release it to the public.

What I will learn: First, how to ROM hack. I am really interested in this and also the experience it will give me with computer programming and file manipulation.

Second, how to use the Window API. I have learned a little bit of C++, but I grew tired of making only black and white console applications. The Zelda editor will be coded in pure C++ using the Windows API (and also SDK). The big challenge here, obviously, is learning WinAPI, so I will be using The Forger's tutorial to start and the references that the SDK provides for more complete functionality.

Third, a basic knowledge of the assembly language. That's right. Assembly, the motherload, the king of ROM hacking languages. With assembly, I've been told, it is possible to directly edit the game's engine, create new AI, new enemies, new bosses, new everything. This is going to be the BIG ONE. It's time to finally find out how much the legend can do.

What I will be using:

The ROM: a clean version of the ROM for LoZ:LA that I used a year ago. I donwloaded it from the internet previously.

The Hex Editor: HxD, a free hex editor that i have heard, based on reviews, is very good. I used Hex Workshop the last time, and I am hoping to improve.

The C++ Compiler: Microsoft Visual C++ Express Edition 2008. I used Dev-C++ last time, but I think that VC++ has a better IDE and will suit my interests as far as learning the Windows API nicely.

The Emulator: Visual Boy Advance. I have used this previously, and it is the best one.

Hacking Documents: Both my extensive (read: wordy) notes from last time, Jigglysaint's hacking documents for this game that I found on Romhacking.net, and Linscape99's notes that he sent me after I commented on his Youtube video. He has also written an editor called ZLADE. You could say I'm following in some footsteps here. But also I'm not, because I plan to hack LA with assembly. And, if possible, have a direct asm editor in my editor.

Those are the goals. Those are the challenges. Without further ado, let's get to it.