Register - Login
Views: 19712584
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - JCS - Stats - Color Chart - Smilies
09-09-10 01:56:43 PM

Jul - NSMB Hacking - NSMB Editor 5 - Latest Version: 5.1 (15th January) New poll - New thread - New reply
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13Add to favorites | Next newer thread | Next older thread
dirbaio
Member

Level: 42


Posts: 236/838
EXP: 490101
For next: 31261

Since: 07-28-09
From: Spain

Since last post: 27 min.
Last activity: 27 min.

Posted on 12-19-09 10:40:35 AM Link | Quote |
Originally posted by jceggbert5
Hey Dirbaio:

Is there a way that I can add a line of 8x8 blocks to the Nohara set? I would like to add more custom blocks to it, but don't know how to add lines for more graphics... (Brick containing Mini-Mushroom ) I know how to code the new block (thanks to you )


It is not possible at all. Sorry.
NSMB has areas of memory reserved to each type of GFX: the 3 tilesets, the bgs and the sprites. They fit exactly, so it is impossible to expand any of these three categories. Sorry.
But if you need to make new tiles, you can rearrange the existing tiles so they take less space and use the freed space for your tiles. For example, in grassland tileset there are a lot of repeated tiles. Just keep only ONE copy of them, and change the map16 tiles that used them to the only remaining copy. Another thing you can do to gain space is to delete tiles that are filpped copies of others, and update the map16. Hint: In Map16 editor, shift-click a tile to flip it vertically and alt-click it for horizontally.
jceggbert5
Member
again
Level: 22


Posts: 17/218
EXP: 54099
For next: 4251

Since: 12-01-09


Since last post: 163 days
Last activity: 61 days

Posted on 12-19-09 03:50:50 PM Link | Quote |
Does Nohara have any compression? If so, what happens if you use the same type of compression on Jyotyu?

Just an idea...
dirbaio
Member

Level: 42


Posts: 239/838
EXP: 490101
For next: 31261

Since: 07-28-09
From: Spain

Since last post: 27 min.
Last activity: 27 min.

Posted on 12-19-09 05:02:51 PM Link | Quote |
Originally posted by jceggbert5
Does Nohara have any compression? If so, what happens if you use the same type of compression on Jyotyu?

Just an idea...


no... that wont work.
All graphics of all tilesets are lz77 compressed. That's not the problem, since we know how to recompress them.
The problem is with the behaviors. All behaviors of tilesets 1 and 2 are plain files, not compressed. BUT tileset 0's behaviors are inserted in the binaries (executable code), which are compressed with the weird compression that we can't break yet.
jceggbert5
Member
again
Level: 22


Posts: 18/218
EXP: 54099
For next: 4251

Since: 12-01-09


Since last post: 163 days
Last activity: 61 days

Posted on 12-19-09 05:35:03 PM Link | Quote |
Originally posted by dirbaio
Originally posted by jceggbert5
Does Nohara have any compression? If so, what happens if you use the same type of compression on Jyotyu?

Just an idea...


no... that wont work.
All graphics of all tilesets are lz77 compressed. That's not the problem, since we know how to recompress them.
The problem is with the behaviors. All behaviors of tilesets 1 and 2 are plain files, not compressed. BUT tileset 0's behaviors are inserted in the binaries (executable code), which are compressed with the weird compression that we can't break yet.


You seem to have been able to decompress it properly, so can't you reverse-engineer your decompression algorithm?


P.S. I'm not trying to be a pain, just trying to help (some coders completely overdo it and go for the hard stuff and not try the easy/obvious stuff )

P.P.S. If I knew ANYTHING about coding, I'd try to help, but I don't...
dirbaio
Member

Level: 42


Posts: 241/838
EXP: 490101
For next: 31261

Since: 07-28-09
From: Spain

Since last post: 27 min.
Last activity: 27 min.

Posted on 12-19-09 05:58:12 PM Link | Quote |
try to reverse engineer THIS:




public static byte[] DecompressOverlay(byte[] sourcedata)
{
uint DataVar1, DataVar2;
//uint last 8-5 bytes
DataVar1 = (uint)(sourcedata[sourcedata.Length - 8] | (sourcedata[sourcedata.Length - 7] << 8) | (sourcedata[sourcedata.Length - 6] << 16) | (sourcedata[sourcedata.Length - 5] << 24));
//uint last 4 bytes
DataVar2 = (uint)(sourcedata[sourcedata.Length - 4] | (sourcedata[sourcedata.Length - 3] << 8) | (sourcedata[sourcedata.Length - 2] << 16) | (sourcedata[sourcedata.Length - 1] << 24));

byte[] memory = new byte[sourcedata.Length + DataVar2];
sourcedata.CopyTo(memory, 0);

uint r0, r1, r2, r3, r5, r6, r7, r12;
bool N, V;
r0 = (uint)sourcedata.Length;

if (r0 == 0) {
return null;
}
r1 = DataVar1;
r2 = DataVar2;
r2 = r0 + r2; //length + datavar2 -> decompressed length
r3 = r0 - (r1 >> 0x18); //delete the latest 3 bits??
r1 &= 0xFFFFFF; //save the latest 3 bits
r1 = r0 - r1;
a958:
if (r3 <= r1) { //if r1 is 0 they will be equal
goto a9B8; //return the memory buffer
}
r3 -= 1;
r5 = memory[r3];
r6 = 8;
a968:
SubS(out r6, r6, 1, out N, out V);
if (N != V) {
goto a958;
}
if ((r5 & 0x80) != 0) {
goto a984;
}
r3 -= 1;
r0 = memory[r3];
r2 -= 1;
memory[r2] = (byte)r0;
goto a9AC;
a984:
r3 -= 1;
r12 = memory[r3];
r3 -= 1;
r7 = memory[r3];
r7 |= (r12 << 8);
r7 &= 0xFFF;
r7 += 2;
r12 += 0x20;
a99C:
r0 = memory[r2 + r7];
r2 -= 1;
memory[r2] = (byte)r0;
SubS(out r12, r12, 0x10, out N, out V);
if (N == V) {
goto a99C;
}
a9AC:
r5 <<= 1;
if (r3 > r1) {
goto a968;
}
a9B8:
return memory;
}

private static void SubS(out uint dest, uint v1, uint v2, out bool N, out bool V) {
dest = v1 - v2;
N = (dest & 2147483648) != 0;
V = ((((v1 & 2147483648) != 0) && ((v2 & 2147483648) == 0) && ((dest & 2147483648) == 0)) || ((v1 & 2147483648) == 0) && ((v2 & 2147483648) != 0) && ((dest & 2147483648) != 0));
}





It has been translated from the ASM code of the game directly, we have NO IDEA of what it does
jceggbert5
Member
again
Level: 22


Posts: 19/218
EXP: 54099
For next: 4251

Since: 12-01-09


Since last post: 163 days
Last activity: 61 days

Posted on 12-19-09 06:01:40 PM Link | Quote |
Um...... No thanks...... You have a good point there..... I think I'll pass this time.....

I thought you guys made the code, not rip it from the game...

(Too bad this place doesn't have a spoiler box like GBATemp...)
Dark_fusionX
Member
Level: 24


Posts: 26/263
EXP: 71409
For next: 6716

Since: 12-03-09
From: Canning Vale, Western Australia

Since last post: 39 days
Last activity: 2 days

Posted on 12-19-09 06:02:48 PM Link | Quote |
woah... what?
D8
dirbaio
Member

Level: 42


Posts: 242/838
EXP: 490101
For next: 31261

Since: 07-28-09
From: Spain

Since last post: 27 min.
Last activity: 27 min.

Posted on 12-20-09 08:56:51 AM Link | Quote |
Originally posted by jceggbert5

I thought you guys made the code, not rip it from the game...




We would have made it ourselves if we knew what kind of compression it is
jceggbert5
Member
again
Level: 22


Posts: 22/218
EXP: 54099
For next: 4251

Since: 12-01-09


Since last post: 163 days
Last activity: 61 days

Posted on 12-20-09 02:52:24 PM Link | Quote |
Is there a way to edit every frame of the "animated" blocks? Like the bricks are in Jyotyu (but make my own in Tileset 00 - Grassland)?
dirbaio
Member

Level: 42


Posts: 246/838
EXP: 490101
For next: 31261

Since: 07-28-09
From: Spain

Since last post: 27 min.
Last activity: 27 min.

Posted on 12-20-09 04:02:39 PM Link | Quote |
Originally posted by jceggbert5
Is there a way to edit every frame of the "animated" blocks? Like the bricks are in Jyotyu (but make my own in Tileset 00 - Grassland)?

Animated blocks are somewhere in the ncg folder, dont remember where...
You can edit it, but you can't create new animated blocks.
Sonicfan49
Random nobody
Level: 5


Posts: 1/7
EXP: 298
For next: 231

Since: 12-23-09


Since last post: 259 days
Last activity: 234 days

Posted on 12-23-09 03:39:56 PM Link | Quote |
The editor doesn't work for me. I have .NET framework 3.5 SP1 which should be MORE than enough. Somebody please help me.
Camewel

unfunny, plz leave
Level: 23


Posts: 74/208
EXP: 66264
For next: 1459

Since: 05-09-09


Since last post: 165 days
Last activity: 100 days

Posted on 12-23-09 04:06:42 PM Link | Quote |
Doesn't work how?
Sonicfan49
Random nobody
Level: 5


Posts: 2/7
EXP: 298
For next: 231

Since: 12-23-09


Since last post: 259 days
Last activity: 234 days

Posted on 12-23-09 04:08:38 PM Link | Quote |
Window isn't opening.
Camewel

unfunny, plz leave
Level: 23


Posts: 75/208
EXP: 66264
For next: 1459

Since: 05-09-09


Since last post: 165 days
Last activity: 100 days

Posted on 12-23-09 04:29:41 PM Link | Quote |
Close all windows.
Open it from a desktop shortcut.
That should help.
Sonicfan49
Random nobody
Level: 5


Posts: 3/7
EXP: 298
For next: 231

Since: 12-23-09


Since last post: 259 days
Last activity: 234 days

Posted on 12-23-09 04:57:12 PM Link | Quote |
That doesn't work either.
dirbaio
Member

Level: 42


Posts: 253/838
EXP: 490101
For next: 31261

Since: 07-28-09
From: Spain

Since last post: 27 min.
Last activity: 27 min.

Posted on 12-23-09 05:24:38 PM Link | Quote |
Originally posted by Sonicfan49
That doesn't work either.

does it show any error messages?
Check also that you have the spritedata.txt file in the same folder as the executable.
Sonicfan49
Random nobody
Level: 5


Posts: 4/7
EXP: 298
For next: 231

Since: 12-23-09


Since last post: 259 days
Last activity: 234 days

Posted on 12-23-09 05:40:08 PM Link | Quote |
I extracted absolutely everything included in the ZIP file to the same folder, including spritedata.txt
dirbaio
Member

Level: 42


Posts: 254/838
EXP: 490101
For next: 31261

Since: 07-28-09
From: Spain

Since last post: 27 min.
Last activity: 27 min.

Posted on 12-23-09 05:57:26 PM Link | Quote |
Originally posted by Sonicfan49
I extracted absolutely everything included in the ZIP file to the same folder, including spritedata.txt

and it does absolutely nothing???
I dont believe it. Probably your windows or your net framework installation is broken, because i've never seen it make absolutely nothing.
Check if the process is still running in Task Manager: Open task manager, go to processes and see if there's a process named nsmbe5.exe when you open it...
or try opening it from the command line (start menu -> run -> type "cmd" -> type "cd C:\the\folder\of\your\exe" -> type nsmbe5.exe and see if it shows some error messages...
Sonicfan49
Random nobody
Level: 5


Posts: 5/7
EXP: 298
For next: 231

Since: 12-23-09


Since last post: 259 days
Last activity: 234 days

Posted on 12-23-09 06:15:33 PM (last edited by Sonicfan49 at 12-23-09 06:16 PM) Link | Quote |
I tried cmd and it gave me nothing (I did everything right). However, the NSMBe5.exe process IS running in Task Manager.
Camewel

unfunny, plz leave
Level: 23


Posts: 79/208
EXP: 66264
For next: 1459

Since: 05-09-09


Since last post: 165 days
Last activity: 100 days

Posted on 12-23-09 06:32:47 PM Link | Quote |
There should be a window that appears saying 'Open'. Do you see this window?
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13Add to favorites | Next newer thread | Next older thread
Jul - NSMB Hacking - NSMB Editor 5 - Latest Version: 5.1 (15th January) New poll - New thread - New reply




Rusted Logic


Acmlmboard - 04/23/2010 b378.01
©2000-2010 Acmlm, Emuz, Blades, Xkeeper
Page rendered in 0.478 seconds.