d0k3 / GodMode9

GodMode9 Explorer - A full access file browser for the Nintendo 3DS console :godmode:
GNU General Public License v3.0
2.12k stars 191 forks source link

[BUG] Trim NDS File(s?) Result Corruption #763

Closed giiutfff closed 2 years ago

giiutfff commented 2 years ago

So you want to report a bug?

  1. Boot gm9
  2. select a nds file ("puyo puyo fever two" in this case)
  3. trim it, and it becomes a file less than 1kb (originally 64mb)

Might happens to other files, but so far this is the only one I am aware of.

Also I noticed that files trimmed by gm9 may leaving a bunch of FF at the eof while other tools does not. And gm9 says file trimmed by other tools cannot be trimmed but already trimmed of files trimmed by itself. My guess is that gm9 uses a very different way to do this whole thing, and somehow not robust.

Info about your system Include this info to make our work easier:

Help yourself Especially for any kind of boot issue ("GodMode9 doesn't boot"), but also in many other cases these steps make a lot of sense and we will ask you to do them anyways:

Have you actually read this? [Yes] I have read the information above

d0k3 commented 2 years ago

Thanks, good catch!

The common "Puyo Puyo Fever Two!" dump is special in that it doesn't have it's proper data size in the header. There may be more like it, which is at the present point, unknown to me. It may also be an improper cart dump.

The file could be trimmed anyways, by other means, but we may trim too much if we do that. I solved it by making GodMode9 just refuse to trim any data from this file (you can check with NDSTokyoTrim, which also refuses to trim this file).

Here's a test build: GodMode9_763.zip