January 29, 2010. A great day in history. By which I mean, one of the main obstacles to my creation of a Link's Awakening editor (which I have decided to call Zledit) had been conquered. I have discovered a way to edit the ROM byte by byte.
Actually, it was easier than I had thought. I was about halfway through the forger's WinAPI tutorial, when I decided to skip to the section about edit controls and skip to the part about editing files.
Now I had tried file input and output with file streams with C++ Standard Library streams, but I never was able to write single bytes. Even if I had, the file stream method would be all but incompatible with my plan for a WinAPI interface.
However. Through the discovery of the BYTE data type, the use of the & operator to pass a pointer value (and thus a greater understanding of pointers), and new knowledge of the SetFilePointer and WriteFile functions, I was able to win the battle.
But obviously, the war is not over yet, nor will it be for a long time. I still need to figure out how to (1) actually display things in the window, (2) load 2BPP graphics from the rom to the screen, and (3) set up functions and classes to make it work. We'll get there.
What I learned:
-How to get byte by byte access to the rom file.
What's next:
-2BPP graphics. Hopefully.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment