Yes. For example:
Super Mario 64 DS (ASMEN0J20)
Code:
Infinite Lives
020973ec 00000063
Super Mario 64 DS (ASMEN1J12 / 1J22)
Code:
Infinite Lives
02098930 00000063
Open calc.exe, change Dec to Hex.
02098930 - 020973ec = 1544
This method may not work for all codes, but here is an example once you have the offset to 'port' the codes
Super Mario 64 DS (ASMEN0J20)
Code:
Invincible
62093550 00000000
b2093550 00000000
200006a0 0000001c
d2000000 00000000
Add 1544 to 2093550
Super Mario 64 DS (ASMEN0J20)
Code:
Invincible
62094A94 00000000
b2094A94 00000000
200006a0 0000001c
d2000000 00000000