#How do I convert old template code to new template?

1 messages · Page 1 of 1 (latest)

sharp pewter
#

how would one convert code written for one to make it work on the other?

for example, old template new template?

heres a file I want to convert for reference

#

Templates?

upper imp
#

If that's what I'm thinking I'll download it

sharp pewter
#

second nintendo logo that can be customized, i need help converting it to the new template

upper imp
#

Is that the second boot screen codes?

sharp pewter
#

the one newer

#

uses

sharp pewter
#

@hardy stag could you tell me how to do this please? sorry if i pinged.

hardy stag
#

Away from pc rn srry

#

At school

#

For shit that's programmed in c/cpp it's usually a bit more complicated to port cause you gotta find the equivalent functions

upper imp
hardy stag
#

How do I convert old template code to new template?

upper imp
#

Also, what i need to put in my símbols.x? Because i dont want to replace it because it have all the things about my codes

limber mortar
#
hook_ADDR -> ncp_hook(ADDR)
hook_ADDR_ov_OV -> ncp_hook(ADDR, OV)
nsub_ADDR -> ncp_jump(ADDR)
nsub_ADDR_ov_OV -> ncp_jump(ADDR, OV)
repl_ADDR -> ncp_call(ADDR)
repl_ADDR_ov_OV -> ncp_call(ADDR, OV)
#

and in NCPatcher the names aren't specified by changing the function names, but rather like attributes

#
// In NSMBe Patching mode
void hook_ADDR_ov_OV() {
    // do something 
}

// In NCPatcher patching mode
ncp_hook(ADDR, OV)
void doSomethingPatch() {
    // do something 
}
sharp pewter
#

i.. dont know what to do though

limber mortar
#

Do you know how to program in C?

sharp pewter
#

nope.

limber mortar
#

Such as understanding the concept of a pointer

sharp pewter
#

nuh uh

#

basic BASIC hex editing knowledge

limber mortar
#

That isn't enough

sharp pewter
#

i know i have to replace something with something

#

I'm still learning Python, I'll be covering C next

limber mortar
#

You need to find what the corresponding functions in the new template are and use those instead

#

For example
loadSave in the new template is Save::loadMainSave I think

#

The easiest way of doing this is comparing the symbols in symbols.x

#

In the old template symbols.x there should be a line like
loadSave = 0x02012E08;

#

Searching for 2012E08 in the new template gives you this:

#

The symbol looks much more complicated because it's a C++ symbol instead of a C symbol

#

But you can see that the corresponding function for that symbol is Save::loadMainSave

sharp pewter
#

I'm still confused about that

#

as I mentioned before

#

I'm very inexperienced with the whole code part

sharp pewter
#

yeah i still have no clue

limber mortar
#

Guess you'll have to insist and do more searching

sharp pewter
#

and is 0x83 important?

#

@hardy stag Again, really very sorry for the ping, but could you help please?

hardy stag
#

yeah dw gimme a sec

sharp pewter
#

tysm!

limber mortar
#

Nope, it's wrong

#

To check for errors easily and understand better what is going on you should probably use an IDE like Visual Studio code

sharp pewter
#

yeah, no. i dont have enough space for it

sharp pewter
#

@hardy stag?

hardy stag
#

rewriting it

sharp pewter
#

woah

nimble quest
sharp pewter
#

any updates, will smith?

sharp pewter
sharp pewter
# hardy stag rewriting it

like, the sound that plays when you press "Mario Game" on the title screen? And for credits, could I get a higher res version of your profile pic?

hardy stag
#

soo I was going to rewrite it as a proper scene like how ed_it did with the level previews hack but I got lazy and pretty much just ported it

#

sorry for the wait I was busy

#

@sharp pewter

sharp pewter
#

Im so sorry for bothering you, thank you so much though! Could I have. high quality version of your pfp for credits?

hardy stag
#

np, and I don't think I have a high quality version of my pfp anymore lol it's just a random AI generated peter griffin image I found

sharp pewter
#

this is what it looks like so far

#

ah

hardy stag
#

oh nice

sharp pewter
#

does this work fine?

hardy stag
#

LMAO

#

sure

#

but I don't really think I need a special thanks tbh

#

just put me in the credits

sharp pewter
#

k

#

found it

hardy stag
#

lmao yes you did

pine nest
mortal panther
#

LMAO the image goes so hard

limber mortar
hardy stag
#

oh I assume it's not in the reference then

mortal panther
#

it is

#

it's the buttons pressed lol

hardy stag
#

I swear I tried that and it didn't work

mortal panther
#

Input namespace

#

smth like that

hardy stag
#

Yeah I used getpressedkeys

mortal panther
#

(screenshot from tr)

hardy stag
#

Leaked😳

mortal panther
#

yeah fix these

hardy stag
#

Bro I tried but it didn't return key presses

mortal panther
#

weird

#

@mystic tundra?

sharp pewter
#

it works, thats the point

upper imp
limber mortar
#

Sometimes just passing the code as is because it just works might come as a surprise later

sharp pewter
#

i really dont care, does it work without interfering with anything else? even if its just barely hanging on? if yes, ok.

nimble quest
#

bc a lot of his codehacks cause other problems

sharp pewter
#

eh idc
skawo is a god anyways

limber mortar
#

I hope you run into undefined behavior

sharp pewter
limber mortar
#

lmao

nimble quest
wraith pivot
#

❌ Asking for help
✅ Burning laptop + DS

sharp pewter
#

me if hack breaks:

sharp pewter
#

i mean guys look it works just fine

#

see?

wraith pivot
sharp pewter
#

its fine

#

i think its normal for the ds to make sounds it never was meant to make

#

but at least the thing sort of works

nimble quest
#

game then load the dj hallyboo bossfight

upper imp
upper imp
hardy stag
sharp pewter
limber mortar
#

it was hard to contain my laughter reading this