A little help with ASM coding vs C code in MHS!!!!

Discussions Related to Game Hacking and Memory Hacking Software

Moderators: g3nuin3, SpeedWing, WhiteHat, mezzo

A little help with ASM coding vs C code in MHS!!!!

Postby esco » Sat May 17, 2008 2:22 am

Wuddup Spiro, it's me again. This time I have a quick question for you on using ASM for my code instead of C. And I don't mean MIPS I since I know last time I mentioned converting it to psx asm, I mean just the normal ASM language your program would take.

1)Would ASM make it run better? I mean you have seen how much code I have (alucards file alone is 1500 lines... and it DOESN'T EVEN have ALL the data for him!) so would converting it make it run faster on people's pc's?

And my 2nd question would be the big one:

2)If I DID choose to want to change my code to ASM... what could I use to convert it?

What I intend to do is code in C, and then IF it would run better... convert my code to asm. I have heard that there are tools to do this, is that true or is what I'm trying to basically gonna be something that I would have to do by hand line by line?

By the way, does anyone else here hack the psx but me? Because I was thinking of putting all my data findings under the tutorials section, if anyone can use it. I've only been Hacking Castlevania: SOTN but I even went so far as to figure out the hex values for how the ASM MIPS I code is coded. Which I thought might be helpful for some heads.

P.S. Thanks for the optimizing tips you gave me last time... they helped IMMENSELY bro. :)
Esco.... the name says it all. New Yorikan for life.
User avatar
esco
NULL
 
Posts: 148
Joined: Mon Sep 18, 2006 2:25 am
Location: Florida, a.k.a. the US's version of hell!

Postby L. Spiro » Sat May 17, 2008 9:53 am

I don’t think ASM is the solution for you since you are hacking an emulated game. The code you would change would be in the emulator, not the game.

I do not know of any programs that convert C to ASM but there probably are some.


L. Spiro
Our songs remind you of songs you’ve never heard.
User avatar
L. Spiro
L. Spiro
 
Posts: 3129
Joined: Mon Jul 17, 2006 10:14 pm
Location: Tokyo, Japan

Postby esco » Sat May 17, 2008 10:06 am

L. Spiro wrote:I don’t think ASM is the solution for you since you are hacking an emulated game. The code you would change would be in the emulator, not the game.

I do not know of any programs that convert C to ASM but there probably are some.


L. Spiro


I'm just trying to speed things up. I have a 2 gb machine and in some areas (the ones with a LOT of different types of enemies) the game slows down to between 52-60 frames. I want to keep it near 58-60 frames, since some people may have 1.5 gb machines. And I heard asm was faster than C. Do you have any better suggestions?
Esco.... the name says it all. New Yorikan for life.
User avatar
esco
NULL
 
Posts: 148
Joined: Mon Sep 18, 2006 2:25 am
Location: Florida, a.k.a. the US's version of hell!

Postby spunge » Sun Jul 27, 2008 6:21 am

esco wrote:
L. Spiro wrote:I don’t think ASM is the solution for you since you are hacking an emulated game. The code you would change would be in the emulator, not the game.

I do not know of any programs that convert C to ASM but there probably are some.


L. Spiro


I'm just trying to speed things up. I have a 2 gb machine and in some areas (the ones with a LOT of different types of enemies) the game slows down to between 52-60 frames. I want to keep it near 58-60 frames, since some people may have 1.5 gb machines. And I heard asm was faster than C. Do you have any better suggestions?
For routines that are called frequently you should use ASM. Codeflow is a bitch when you are coding something that big in ASM. Only optimize routines that are very frequently called. I'm assuming you know how to inline ASM. anyways i'm afraid there are no automation tools to convert C>ASM. even if there were they wouldn't be really fast. You have to have advanced knowledge of assembly so that you can really cut down on the clockcycles.
spunge
NULL
 
Posts: 121
Joined: Sun Jul 27, 2008 4:58 am
Location: VEH callback


Return to General Related Discussions

Who is online

Users browsing this forum: No registered users and 0 guests

cron