Pages: 12 »
Posted on 06-29-13, 03:15 pm
Fire Brother
Eugene

Karma: 3646
Posts: 118/1120
Since: 11-29-11
I'm sorry if I'm at the wrong place with this question.
I don't get much about ASM Hacking...

But there's something I want to change in NSMB, but I don't know how to do.
It's hard to explain.

If Mario gets a item (Mushroom, Fire Flower, etc.), the level'll freeze very short.
Also when Mario dies, the game freezes.
I would like it if the game doesn't freeze, like in Mario vs. Luigi.
Is that possible? And if so, how?

I don't really have a clear reason, but I think it looks nicer if the game doesn't stand still.
I actually think it should be possible, because I saw that if you get hit by a Amp, the game's still going on while you 'drop dead'.
When you get an item I'm not sure, but in the E3 Build they had that.

Thanks,  KingYoshi
Posted on 06-29-13, 05:38 pm
Super Mario
( ͡° ͜ʖ ͡°)

Karma: 10010
Posts: 3476/4457
Since: 06-08-11
MvsL mode also has that, you dont get frozen when grabbing a powerup.

I think I know how to do it. Have a look at Actor::beforeExecute and/or StageActor::beforeExecute. Don't remember which ones.

These check some flags that will freeze the game in these cases. Either patch the code to ignore them or make an AR code that sets the flag to false and you will have it. Probably.
Posted on 06-29-13, 06:18 pm (rev. 1 by  KingYoshi on 06-29-13, 06:19 pm)
Fire Brother
Eugene

Karma: 3646
Posts: 119/1120
Since: 11-29-11
How and where most I search that?
Posted on 06-29-13, 06:29 pm
Super Mario
( ͡° ͜ʖ ͡°)

Karma: 10010
Posts: 3477/4457
Since: 06-08-11
In the ida pro database (nsmb.idb). Its in the uploader and you need ida pro 6.1 to open it
Posted on 07-02-13, 03:42 pm (rev. 1 by  KingYoshi on 07-02-13, 03:42 pm)
Fire Brother
Eugene

Karma: 3646
Posts: 122/1120
Since: 11-29-11
Ehhhh... how to open a '.idb'-file?
Posted on 07-02-13, 03:48 pm
Super Mario
( ͡° ͜ʖ ͡°)

Karma: 10010
Posts: 3489/4457
Since: 06-08-11
Posted by Dirbaio
In the ida pro database (nsmb.idb). Its in the uploader and you need ida pro 6.1 to open it
Posted on 07-14-13, 06:20 pm (rev. 6 by  KingYoshi on 07-19-13, 04:56 pm)
Fire Brother
Eugene

Karma: 3646
Posts: 129/1120
Since: 11-29-11
Ok, I'll try that.
Posted on 07-19-13, 04:56 pm
Fire Brother
Eugene

Karma: 3646
Posts: 131/1120
Since: 11-29-11
Ok, I've downloaded the program and I opened the file nsmb.idb
But I don't get anything about what you say after that,  Dirbaio.

These check some flags that will freeze the game in these cases. Either patch the code to ignore them or make an AR code that sets the flag to false and you will have it. Probably.


So... what most I do now?

This is what I see now by StageActor__beforeExecute:


I found also EnemyActor::beforeExecute

Or must I change something with 'freezeFlag'?
Posted on 07-19-13, 11:16 pm (rev. 2 by  Dirbaio on 07-19-13, 11:45 pm)
Super Mario
( ͡° ͜ʖ ͡°)

Karma: 10010
Posts: 3532/4457
Since: 06-08-11
I... found it. Yay. Turns out it was harder than I thought. freezeFlag and beforeExecute were used to pause actors, but for other cases... Dunno.

Here it is:

repl_0211F92C: repl_0211F974: mov r0, #0 bx lr


Basically, the variable at 02085ABC tells if the game should pause at powerup/powerdown.
It's set at loadLevel, something like this:

if(isMvsLMode) pauseOnPowerup = 0x00; else pauseOnPowerup = 0x10;
.

I tried haxing that code to always set it to 0x00 but it made the level crash. I guess that variable wasn't used only for powerup pausing...

So I did the code above, which patched it when it's being read only in the particular piece of code that takes care of powerup/powerdown. And now it works.

If you want no pause on death, there's MAYBE another place that reads that value that you need to patch similarly.



EDIT: Ugh. Just noticed it makes Mario not pause, but it still pauses all the other sprites.
Maybe look for more usages of that var and hax m0ar

EDIT2: Found it! And it now makes the world not pause on death too:
repl_0211F904: repl_0211F92C: repl_0211F974: repl_021207B8: mov r0, #0 bx lr repl_0212C13C: mov r1, #0 bx lr
Posted on 07-21-13, 09:23 am
Fire Brother
Eugene

Karma: 3646
Posts: 132/1120
Since: 11-29-11
Cool! Thanks, Dirbaio! But what must I do with it?
If you edit that 'nsmb.idb', how can you bring that in a NSMB DS-ROM?

Because I don't get much of ASM-Hacking and because you've already done this,
can you maybe do this for me?
Posted on 07-21-13, 01:46 pm
Pokey
me some orange juice my hand

Karma: 674
Posts: 347/699
Since: 09-24-12
Posted on 07-25-13, 12:20 pm (rev. 2 by  KingYoshi on 07-25-13, 12:33 pm)
Fire Brother
Eugene

Karma: 3646
Posts: 137/1120
Since: 11-29-11
Place a ROM in the template folder. (NOT in data/ or source/. In the main folder) Open it with NSMB Editor. Go to the Tools tab and click "Run make and insert".
Yes, it's that easy.


The button "Run make and insert" doesn't work.
There comes a Command Prompt-screen, and there's the text (translated from Dutch):

'make' is not recognized as an internal or external command, operable program or batch file.
Posted on 07-25-13, 06:51 pm
Super Mario
( ͡° ͜ʖ ͡°)

Karma: 10010
Posts: 3541/4457
Since: 06-08-11
You have to install devkitARM.
Posted on 10-16-13, 06:00 pm
Fire Brother
Eugene

Karma: 3646
Posts: 198/1120
Since: 11-29-11
(Yes, this is a late response )
Sorry, I'm watchting this thread now,
and I see I forgot something to say.

I don't only want the game won't 'freeze' when Mario takes an item,
but also if an enemy hit him. How to do that?
Or that happens already if I do what Dirbaio said?

And I've got Autumn Holidays next week.
(One week holidays in the season Autumn, I don't know if people in other countries have that to...)
But then I'll try ASM Hacking.
Posted on 10-16-13, 06:07 pm (rev. 1 by  Dirbaio on 10-16-13, 06:07 pm)
Super Mario
( ͡° ͜ʖ ͡°)

Karma: 10010
Posts: 3839/4457
Since: 06-08-11
I think the powerup freeze and the powerdown freeze are the same flag, so both freezes should go away.
I don't remember though.
Posted on 10-27-13, 06:39 pm (rev. 2 by  KingYoshi on 10-27-13, 06:48 pm)
Fire Brother
Eugene

Karma: 3646
Posts: 209/1120
Since: 11-29-11
Dirbaio, from your examples I now know how to use the nsub_02 hook. But how do I specify the repl_02 type of hook ?
I would like to try your "nofreeze" code but I am not sure how to put it into the source directory.

I tried to copy this what you placed in a post from you earlier in this thread, that says:



I tried to copy that text too a new file, named 'noFreeze.cpp'.
I maked the file in the source folder.
But the editor says error when I choose 'run make and insert'.
Posted on 10-27-13, 09:05 pm
Mariomaster

Karma: 8528
Posts: 365/1681
Since: 06-09-12
Just put it in a textfile and call it 'noFreeze.s'. The ending '.cpp' is only for C++ codes.
_________________________
GitHub - Kuribo64 - YouTube
Posted on 10-28-13, 03:07 pm (rev. 1 by  KingYoshi on 10-28-13, 03:08 pm)
Fire Brother
Eugene

Karma: 3646
Posts: 210/1120
Since: 11-29-11
Posted by Mariomaster
Just put it in a textfile and call it 'noFreeze.s'. The ending '.cpp' is only for C++ codes.


Thanks RicBent, it worked!

OMG! This looks soooooo awsum!
Very thanks,  Dirbaio! This is super!


EDIT: Maybe I make a video with the effect, and post it on this thread.
Posted on 10-28-13, 03:27 pm
a

Karma: 1579
Posts: 575/1290
Since: 02-12-13
Yeah, that would be good.
Posted on 10-28-13, 06:37 pm (rev. 3 by  KingYoshi on 04-21-14, 12:59 pm)
Fire Brother
Eugene

Karma: 3646
Posts: 211/1120
Since: 11-29-11
I've test what NSMB does at different situations.
Here is a list with situations the game doesn't freeze.

- If Mario takes an item
- If Mario hit an enemy
- If Mario dies (It's funny to see that with Cheep-Chomp, but sometimes, Cheep-Chomp moves 'weird'.)
- If Mario opens a door
- If Mario goes into a pipe

EDIT: But... sadly there's one thing (for now) the game does freeze.
The Rotating Carry-Through-Wall Platform, you only see in W4-GhostHouse.

I don't know why the game freezes here.
But it doesn't matter much to me.
I'm very, very happy with the things where the game doesn't freezes.
Pages: 12 »