Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

Converting Assembly Code


Recommended Posts

Hello, I will be taking classes on programming at my high school pretty soon(I'm 9th grade btw) and I was wondering if any of you guys could help me with a future project that I will be working on. I have just downloaded a disassembly of Sonic 3 & Knuckles and I was wondering if there were any way to convert the assembly code of the game into a high-level programming such as C. My school does not have any electives covering assembly programming, so I would greatly appreciate it if anyone could point me to a tool if one exists.

Thanks in advance,

Lightspeed

Edit: oops, could someone please move this to the fangaming assistance forum?

Link to comment
Share on other sites

No high school programming class that exists will ever cover the sheer volume of what you'll need to really make a game.

But to answer the question, no, there is absolutely no way to convert machine code into a high level language (in a useful way) short of long and painful reverse engineering. And thats not conversion as much as it is recreation.

Link to comment
Share on other sites

Yes and no. You could write an application wich could parse the assembly code in question and output the C equivalent.

For example,

mov r0, $33F

into

Register[0] = *((unsigned char*) 0x33F);

Even though you would still require insight knowledge of the 68k architecture and the Sonic engine. Your best bet would be trying to give a go to this once it's for public usage, as it's a WIP C port of the original engine (and being able to cross platform to the Genesis too).

Link to comment
Share on other sites

Yes and no. You could write an application wich could parse the assembly code in question and output the C equivalent.

For example,

mov r0, $33F

into

Register[0] = *((unsigned char*) 0x33F);

Even though you would still require insight knowledge of the 68k architecture and the Sonic engine. Your best bet would be trying to give a go to this once it's for public usage, as it's a WIP C port of the original engine (and being able to cross platform to the Genesis too).

Damizean- I sorta figured as much.Thank you for the help I actually already have that saved on my computer, but since it's not finished I guess I have to wait.

Dimension Warped- Well I don't want to do that unless I have no other options.(Which i'm sure there are.) Also, my school does have a class that requires you to code a basic game from scratch and requires you to do some 3D modeling as well. I'll be taking it soon enough. As a quick question, how did you learn how to program and make games and how long did it take you?

Link to comment
Share on other sites

No high school programming class that exists will ever cover the sheer volume of what you'll need to really make a game.

But to answer the question, no, there is absolutely no way to convert machine code into a high level language (in a useful way) short of long and painful reverse engineering. And thats not conversion as much as it is recreation.

The programming classes at my old high school were ancient. For your first year, you got to learn Basic. (Yes, that's it. Basic.) For your second and final year, you got to learn basic Java skills. (Because as we all know, everyone's ITCHING to learn Java in today's world.)

Link to comment
Share on other sites

The programming classes at my old high school were ancient. For your first year, you got to learn Basic. (Yes, that's it. Basic.) For your second and final year, you got to learn basic Java skills. (Because as we all know, everyone's ITCHING to learn Java in today's world.)

LOL, my school's a bit better. For my first year I have to learn to use microsoft office(as a review) HTML(I can do that) Dreamweaver, Flash, and Visual Basic. In later grades you have to learn C++ and Java. You even get to work with robotics.

Link to comment
Share on other sites

I took C++ and Java courses in High School, but they were completely optional. I even had a 3D modeling class, but it was pretty blunt and I ended up turning it into independent study.

As for how I learned what I do know about game programming, it hasn't been an active effort. I'm not really planning on joining the game industry and I'm a dual major between Electrical Engineering and Computer Science right now.

But just so we are clear, the first games I made were text based and I was about 6 at the time. Those are the kinds of games you can actually expect to learn in your typical first year high school programming class, and maybe if you are lucky you'll learn a little bit of applet programming to go with it.

Link to comment
Share on other sites

I took C++ and Java courses in High School, but they were completely optional. I even had a 3D modeling class, but it was pretty blunt and I ended up turning it into independent study.

As for how I learned what I do know about game programming, it hasn't been an active effort. I'm not really planning on joining the game industry and I'm a dual major between Electrical Engineering and Computer Science right now.

But just so we are clear, the first games I made were text based and I was about 6 at the time. Those are the kinds of games you can actually expect to learn in your typical first year high school programming class, and maybe if you are lucky you'll learn a little bit of applet programming to go with it.

Thats interesting, I actually want to major in Computer Science once I get out of high school. And as for schools, mine seems to be a bit different from yours. At my school, we have to take at least 2 tech-related electives per year, so we have to take those classes. I've also noticed that the Juniors at my school seem to work with 3D maze games, Dark GDK, and FPS creator so that's probably what I will get to work with. But for the kind of projects that I want to work on, I'll probably need more experience. Do you have any suggestions for someone who would want to do game development as a hobby?

Link to comment
Share on other sites

  • 2 weeks later...
I took C++ and Java courses in High School, but they were completely optional. I even had a 3D modeling class, but it was pretty blunt and I ended up turning it into independent study.

As for how I learned what I do know about game programming, it hasn't been an active effort. I'm not really planning on joining the game industry and I'm a dual major between Electrical Engineering and Computer Science right now.

But just so we are clear, the first games I made were text based and I was about 6 at the time. Those are the kinds of games you can actually expect to learn in your typical first year high school programming class, and maybe if you are lucky you'll learn a little bit of applet programming to go with it.

Ahh, so you're dual majoring in CS/EE? I want to do the exact same thing x_x(I'm stuck dead in the midde, with these hobbies and having been an ET in the Navy). Does your school offer a specific program or are you just fulfilling both majors.

*sorry to get off topic there : P

Do you have any suggestions for someone who would want to do game development as a hobby?

Well, it doesn't hurt to start off with reading at least a book on general game design. One that is thorough to review most of the general things, like colors/sprites/story/objective. Aside from that, learn programming as you plan to. I would reccomend messing with Clickteam products or GameMaker as they make learning the concepts of programming easier. Helped me when I went to try C++ ^ _ ^. And try to get into the habit of finishing projects early(start small). That's another thing I messed up with lol. I always try to aim for something outside of my scope and don't get around to completing games(although I do it for the fun of programming/recreating old games).

Link to comment
Share on other sites

  • 2 months later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...