Hacking NDSTokyoTrim - batch trimmer with wifi detection

Grimalkin

Waaaaaaaah!
Member
Joined
Jun 9, 2006
Messages
1,173
Trophies
0
Website
Visit site
XP
141
Country
Canada
I don't see why people are complaining about the background, you'll see it for what? tops 1 minute at a time then you close the thing.

if you don't like it, don't use it. QFT.
 

BrianTokyo

NDSTokyoTrim Dev.
OP
Member
Joined
Jun 28, 2007
Messages
658
Trophies
0
Website
www.eden.fm
XP
303
Country
Thanks
smile.gif


Is anyone using Vista 64-bit? I got a report about the last version not working there for a user, I wonder if it's happened to other people too.
 

Codekingmss

Well-Known Member
Newcomer
Joined
Jan 9, 2007
Messages
45
Trophies
1
XP
284
Country
United States
I noticed something odd. It noticed trims that were too long by 136

SKIP: File already trimmed (wifi status unknown): 0190 - SEGA Casino (U).nds
WARNING: File was previously trimmed incorrectly. Proceeding to fix: 0190 - Sega Casino - USA - Trashman.nds
0190 - Sega Casino - USA - Trashman.nds: 136
SKIP: File already trimmed (wifi status unknown): 0191 - Ping Pals (G).nds
ERROR: File size mismatch or previously overtrimmed: 0192 - Pokemon Fushigi no Dungeon - Ao no Kyuujotai (J).nds
SKIP: File already trimmed (wifi status unknown): 0193 - Oide Yo Doubutsu No Mori (J).nds
SKIP: File already trimmed (wifi status unknown): 0194 - Pac Pix (J).nds
SKIP: File already trimmed (WIFI data found): 0195 - Simple DS Series Vol. 2 - The Billiards (J).nds
SKIP: File already trimmed (wifi status unknown): 0196 - The Chronicles of Narnia - The Lion, The Witch and The Wardrobe (E).nds
SKIP: File already trimmed (wifi status unknown): 0197 - Dragon Ball Z - Supersonic Warriors 2 - USA - SCZ.nds
WARNING: File was previously trimmed incorrectly. Proceeding to fix: 0198 - King Kong - USA - Mode7.nds
0198 - King Kong - USA - Mode7.nds: 136
SKIP: File already trimmed (wifi status unknown): 0199 - Kenshuui Tendo Dokuta 2 - Inochi no Tenbin (J).nds
SKIP: File already trimmed (wifi status unknown): 0200 - Bubble Bobble DS (J).nds
SKIP: File already trimmed (WIFI data found): 0201 - Mario Kart DS (E).nds
SKIP: File already trimmed (wifi status unknown): 0202 - Kirby - Canvas Curse (E).nds
SKIP: File already trimmed (wifi status unknown): 0203 - Nintendo Touch Golf (E).nds
SKIP: File already trimmed (wifi status unknown): 0204 - SpongeBob Squarepants - The Yellow Avenger (E).nds
WARNING: File was previously trimmed incorrectly. Proceeding to fix: 0205 - SBK - Snowboard Kids - USA - Mode7.nds
0205 - SBK - Snowboard Kids - USA - Mode7.nds: 136
WARNING: File was previously trimmed incorrectly. Proceeding to fix: 0206 - Snood 2 - Snoods on Vacation - USA - Mode7.nds
0206 - Snood 2 - Snoods on Vacation - USA - Mode7.nds: 136
SKIP: File already trimmed (wifi status unknown): 0207 - Simple DS Series Vol.6 - The Party Game (J).nds
SKIP: File already trimmed (wifi status unknown): 0208 - Need for Speed Most Wanted (E).nds
SKIP: File already trimmed (wifi status unknown): 0209 - The Incredibles - Rise of the Underminer (E).nds
SKIP: File already trimmed (WIFI data found): 0210 - Super Monkey Ball DS (J).nds
SKIP: File already trimmed (WIFI data found): 0211 - Real Time Conflict - Shogun Empires - USA - Mode7.nds
WARNING: File was previously trimmed incorrectly. Proceeding to fix: 0212 - ATV - Quad Frenzy - USA - Mode7.nds
0212 - ATV - Quad Frenzy - USA - Mode7.nds: 136
WARNING: File was previously trimmed incorrectly. Proceeding to fix: 0213 - Monster Trucks DS - USA - Mode7.nds
0213 - Monster Trucks DS - USA - Mode7.nds: 136
WARNING: File was previously trimmed incorrectly. Proceeding to fix: 0214 - Golden Nugget Casino DS - USA - Mode7.nds
0214 - Golden Nugget Casino DS - USA - Mode7.nds: 136
SKIP: File already trimmed (wifi status unknown): 0215 - Ford Racing 3 - USA - Trashman.nds
SKIP: File already trimmed (wifi status unknown): 0216 - Mario & Luigi - Partners in Time - USA - SCZ.nds
SKIP: File already trimmed (wifi status unknown): 0217 - Simple DS Series Vol.1 - The Mahjong (J).nds
SKIP: File already trimmed (wifi status unknown): 0218 - Bubble Bobble Revolution (E).nds
SKIP: File already trimmed (wifi status unknown): 0219 - Slime Morimori Dragon Quest 2 (J).nds
SKIP: File already trimmed (wifi status unknown): 0220 - Soreike Anpanman (J).nds
SKIP: File already trimmed (wifi status unknown): 0221 - Burnout Legends - USA - Mode7.nds
SKIP: File already trimmed (wifi status unknown): 0222 - Pawa Puro kun Poketto 8 (J).nds
SKIP: File already trimmed (wifi status unknown): 0223 - Animal Crossing - Wild World - USA - SCZ.nds
WARNING: File was previously trimmed incorrectly. Proceeding to fix: 0224 - Elf Bowling 1 & 2 - USA - Trashman.nds
0224 - Elf Bowling 1 & 2 - USA - Trashman.nds: 136
SKIP: File already trimmed (wifi status unknown): 0225 - Battles of Prince of Persia (E).nds
SKIP: File already trimmed (wifi status unknown): 0226 - Burnout Legends (E).nds
SKIP: File already trimmed (wifi status unknown): 0227 - Londonian Gothics - Meikyuu no Lolita (J).nds
SKIP: File already trimmed (WIFI data found): 0228 - Mario Kart DS - Japan - Mode7.nds
SKIP: File already trimmed (wifi status unknown): 0229 - Big Mutha Truckers - Europe - Legacy.nds
SKIP: File already trimmed (wifi status unknown): 0230 - Bokujou Monogatari - Colobockle Station for Girls - Japan - SCZ.nds
SKIP: File already trimmed (wifi status unknown): 0231 - Tootuff - Mission Nadia - Europe - Legacy.nds
SKIP: File already trimmed (wifi status unknown): 0232 - Teenage Mutant Ninja Turtles 3 - Mutant Nightmare - Europe - Legacy.nds
WARNING: File was previously trimmed incorrectly. Proceeding to fix: 0233 - Battles of Prince of Persia - USA - Trashman.nds
0233 - Battles of Prince of Persia - USA - Trashman.nds: 136

Here is the log for that section
 

BrianTokyo

NDSTokyoTrim Dev.
OP
Member
Joined
Jun 28, 2007
Messages
658
Trophies
0
Website
www.eden.fm
XP
303
Country
Possible error messages in the NDS trimming proc:
-----------------------------------------------------------

* ERROR: File doesn''t exist: // you could have deleted the file before trimming..
* ERROR: Incorrect File: // file is smaller than it should
* WARNING: POSSIBLE BRICKER: // basic bricker test
* ERROR: File size mismatch or previously overtrimmed: // file is 0 bytes or was trimmed too much with other trimmers
* ERROR: Previous trimming was wrong. Untrimmed source rom needed: // file was trimmed incorrectly with other trimmers.
The source rom is needed since part of the wifi block might have been removed
* SKIP: File already trimmed (wifi status unknown): // file is already trimmed and we don't know if it had wifi or not (most
probably it didn't, or the wifi block was already included in the rom offset header info, or another trimmer could have removed it)
* WARNING: File was previously trimmed incorrectly (or rom is homebrew). Proceeding to fix: // file was trimmed incorrectly
with other trimmers and it will be fixed, no source rom needed
* SKIP: File already trimmed (WIFI data found): // already trimmed and it has wifi data
* WARNING: File was previously trimmed incorrectly. Proceeding to fix: // file was trimmed including a wifi block for safety, but
there is no wifi data at all so it will be fixed, no source rom needed

* INFO: Wifi game: // Normal rom, wifi data detected
* Error: Memcopy failed: // buy a new computer

------------------------------------------------------------------------------------
 

BrianTokyo

NDSTokyoTrim Dev.
OP
Member
Joined
Jun 28, 2007
Messages
658
Trophies
0
Website
www.eden.fm
XP
303
Country
Those that trimmed by 136: they were probably trimmed with other trimmers (or a very old version of mine) and included the wifi block for safety.

My trimmer analyzes that block of the rom to determine whether there is wifi data or not. (if not, then it trims that "safe" block since it's not needed)
 

GH0ST

Your Hero is a Ghost
Member
Joined
Dec 17, 2006
Messages
921
Trophies
0
Location
I was here... before...
Website
www.neuronball.com
XP
187
Country
France
Thanks for the soft work ^^ Finally this 1 bit trojan protection is quite funny ;-)

( works well including update button thanks again ...till got error box for full disk warning and the trimmer is stuck with Halt Requested. Stopping Operations...

Thanks... Don't be rude with the pianist please
 

BrianTokyo

NDSTokyoTrim Dev.
OP
Member
Joined
Jun 28, 2007
Messages
658
Trophies
0
Website
www.eden.fm
XP
303
Country
( works well including update button thanks again ...till got error box for full disk warning and the trimmer is stuck with Halt Requested. Stopping Operations...

Ah damn, I forgot about that. I'll add a check for that in the next version

QUOTEI can confirm bricker detection works for both r0mloader and taihen.


Thanks for testing
smile.gif
It's only a basic brick test though (applied automatically to every rom, either trimmed or not).
A more advanced through check will come in another version (much slower)
 

Maikel Steneker

M3 Fanboy
Member
Joined
May 16, 2007
Messages
3,394
Trophies
1
Age
31
Website
ndss.nl
XP
373
Country
Netherlands
There's no such thing as a "trojan", it's a self-protection, not just for the background, but for any modification done to the exe; if you were to download the trimmer from a torrent or anywhere else than my website, you have no clue what you are getting; (I've found it in several torrent and other download sites, even though I don't even require a registration for downloading it from my website)

Think for example about the embedded DLLs for unrar and 7zip, someone could replace them for viruses and you'd never know. So the trimmer detects any modifications from the original exe and shuts down as a safety measure. (just like antivirus applications do). The check is done before anything else in the exe is loaded, so in case you would download a version with an embedded virus from some unsecure source, the application shuts down before anything else is executed.

If you think that's a bad feature, /shrug. This protection has been in the trimmer for a long time, and someone found out when they uncompressed the upx packing (for what purpose, I don't know, but go figure)

My program, as suplied and used as intented, is completely harmless (not like a reboot does any harm anyway).
Although I don't fully agree with you, I think that's a fair reason
smile.gif
And, as mentioned earlier, you have the right to do so.

I'm glad the trimmer doesn't do any harm. You had me worried for a while...
 

.::5pYd3r::.

Viva La Pizza
Member
Joined
Jun 2, 2007
Messages
765
Trophies
0
Age
28
Location
The GREAT Southern Land :D
Website
Visit site
XP
273
Country
I get this when trying to run it with WINE :'(
CODEXlib: Âextension "XFree86-DRI" missing on display ":1.0".
Xlib: Âextension "XFree86-DRI" missing on display ":1.0".
wine: Unhandled exception 0x0eedfade at address 0x0000:0x7b843f50 (thread 0009), starting debugger...
First chance exception: 0xc0000025 in 32-bit code (0x7bc39b4c).
Register dump:
CS:0073 SS:007b DS:007b ES:007b FS:0033 GS:003b
EIP:7bc39b4c ESP:0033f9f4 EBP:0033fa58 EFLAGS:00200282( Â - 00 Â Â Â- -IS1)
EAX:0033fa00 EBX:7bc8443c ECX:00110020 EDX:0033fde4
ESI:0033fde4 EDI:0033fa64
Stack dump:
0x0033f9f4: Â0033fa10 b7cfa5bd 00000000 c0000025
0x0033fa04: Â00000001 0033fde4 7b820000 00000000
0x0033fa14: Â7bc432f6 0033fa38 00000001 0033fa30
0x0033fa24: Â7bc8443c 00000000 0033fb40 7bc39270
0x0033fa34: Â00000001 7bc8443c 7b820000 00000002
0x0033fa44: Â0033fae0 73f431fe 9c65ed09 7bc39b00
Backtrace:
=>1 0x7bc39b4c __regs_RtlRaiseException+0x4c(rec=0x33fde4, context=0x33fa74) [/build/buildd/wine-0.9.46/dlls/ntdll/exception.c:396] in ntdll (0x0033fa58)
Â2 0x7bc72d83 __wine_call_from_32_regs+0xc3() in ntdll (0x0033fdc0)
Â3 0x7bc39116 RtlRaiseException+0x6() in ntdll (0x0033fe38)
Â4 0x0041cff3 in ndstokyotrim (+0x1cff3) (0x0033fea8)
Â5 0x0041ceb1 in ndstokyotrim (+0x1ceb1) (0x0033fed0)
Â6 0x004d9e6f in ndstokyotrim (+0xd9e6f) (0x0033ff08)
Â7 0x7b874c7e start_process+0xee(arg=0x0) [/build/buildd/wine-0.9.46/dlls/kernel32/process.c:839] in kernel32 (0x0033ffe8)
Â8 0xb7e4a9d7 wine_switch_to_stack+0x17() in libwine.so.1 (0x00000000)
0x7bc39b4c __regs_RtlRaiseException+0x4c [/build/buildd/wine-0.9.46/dlls/ntdll/exception.c:396] in ntdll: subl Â$4,%esp
Unable to open file '/build/buildd/wine-0.9.46/dlls/ntdll/exception.c'
Modules:
Module ÂAddress         Debug info   ÂName (79 modules)
PE    Â400000- Â5c0000    Export     Ândstokyotrim
ELF   7b800000-7b929000    Dwarf      kernel32
Â\-PE Â7b820000-7b929000 Â Â Â \ Â Â Â Â Â Â Â kernel32
ELF   7bc00000-7bca0000    Dwarf      ntdll
Â\-PE Â7bc10000-7bca0000 Â Â Â \ Â Â Â Â Â Â Â ntdll
ELF   7bf00000-7bf03000    Deferred    Â
ELF   7e078000-7e0c9000    Deferred    Âlibgcrypt.so.11
ELF   7e0c9000-7e0cd000    Deferred    Âlibgpg-error.so.0
ELF   7e0cd000-7e0dd000    Deferred    Âlibtasn1.so.3
ELF   7e0dd000-7e0df000    Deferred    Âlibkeyutils.so.1
ELF   7e0df000-7e0e7000    Deferred    Âlibkrb5support.so.0
ELF   7e0e7000-7e115000    Deferred    Âlibcrypt.so.1
ELF   7e115000-7e185000    Deferred    Âlibgnutls.so.13
ELF   7e185000-7e1aa000    Deferred    Âlibk5crypto.so.3
ELF   7e1aa000-7e232000    Deferred    Âlibkrb5.so.3
ELF   7e232000-7e25b000    Deferred    Âlibgssapi_krb5.so.2
ELF   7e25b000-7e290000    Deferred    Âlibcups.so.2
ELF   7e34e000-7e380000    Deferred    Âuxtheme
Â\-PE Â7e360000-7e380000 Â Â Â \ Â Â Â Â Â Â Â uxtheme
ELF   7e380000-7e385000    Deferred    Âlibxfixes.so.3
ELF   7e385000-7e3a2000    Deferred    Âimm32
Â\-PE Â7e390000-7e3a2000 Â Â Â \ Â Â Â Â Â Â Â imm32
ELF   7e3a2000-7e3aa000    Deferred    Âlibxrender.so.1
ELF   7e3b5000-7e3b8000    Deferred    Âlibcom_err.so.2
ELF   7e3ba000-7e45a000    Deferred    Âlibgl.so.1
ELF   7e45a000-7e45f000    Deferred    Âlibxdmcp.so.6
ELF   7e45f000-7e462000    Deferred    Âlibxau.so.6
ELF   7e462000-7e553000    Deferred    Âlibx11.so.6
ELF   7e553000-7e561000    Deferred    Âlibxext.so.6
ELF   7e561000-7e566000    Deferred    Âlibxxf86vm.so.1
ELF   7e566000-7e57e000    Deferred    Âlibice.so.6
ELF   7e57e000-7e586000    Deferred    Âlibsm.so.6
ELF   7e587000-7e590000    Deferred    Âlibxcursor.so.1
ELF   7e590000-7e596000    Deferred    Âlibxrandr.so.2
ELF   7e596000-7e621000    Deferred    Âwinex11
Â\-PE Â7e5b0000-7e621000 Â Â Â \ Â Â Â Â Â Â Â winex11
ELF   7e6a0000-7e6c0000    Deferred    Âlibexpat.so.1
ELF   7e6c0000-7e6eb000    Deferred    Âlibfontconfig.so.1
ELF   7e6eb000-7e700000    Deferred    Âlibz.so.1
ELF   7e700000-7e770000    Deferred    Âlibfreetype.so.6
ELF   7e770000-7e784000    Deferred    Âlz32
Â\-PE Â7e780000-7e784000 Â Â Â \ Â Â Â Â Â Â Â lz32
ELF   7e784000-7e79e000    Deferred    Âversion
Â\-PE Â7e790000-7e79e000 Â Â Â \ Â Â Â Â Â Â Â version
ELF   7e79e000-7e83c000    Deferred    Âoleaut32
Â\-PE Â7e7b0000-7e83c000 Â Â Â \ Â Â Â Â Â Â Â oleaut32
ELF   7e83c000-7e84f000    Deferred    Âlibresolv.so.2
ELF   7e85f000-7e87d000    Deferred    Âiphlpapi
Â\-PE Â7e870000-7e87d000 Â Â Â \ Â Â Â Â Â Â Â iphlpapi
ELF   7e87d000-7e8d6000    Deferred    Ârpcrt4
Â\-PE Â7e890000-7e8d6000 Â Â Â \ Â Â Â Â Â Â Â rpcrt4
ELF   7e8d6000-7e977000    Deferred    Âole32
Â\-PE Â7e8f0000-7e977000 Â Â Â \ Â Â Â Â Â Â Â ole32
ELF   7e977000-7e9ac000    Deferred    Âwinspool
Â\-PE Â7e980000-7e9ac000 Â Â Â \ Â Â Â Â Â Â Â winspool
ELF   7e9ac000-7ea05000    Deferred    Âshlwapi
Â\-PE Â7e9c0000-7ea05000 Â Â Â \ Â Â Â Â Â Â Â shlwapi
ELF   7ea05000-7eb08000    Deferred    Âshell32
Â\-PE Â7ea20000-7eb08000 Â Â Â \ Â Â Â Â Â Â Â shell32
ELF   7eb08000-7eba9000    Deferred    Âcomdlg32
Â\-PE Â7eb10000-7eba9000 Â Â Â \ Â Â Â Â Â Â Â comdlg32
ELF   7eba9000-7ec44000    Deferred    Âgdi32
Â\-PE Â7ebc0000-7ec44000 Â Â Â \ Â Â Â Â Â Â Â gdi32
ELF   7ec44000-7ed82000    Deferred    Âuser32
Â\-PE Â7ec60000-7ed82000 Â Â Â \ Â Â Â Â Â Â Â user32
ELF   7ed82000-7ee40000    Deferred    Âcomctl32
Â\-PE Â7ed90000-7ee40000 Â Â Â \ Â Â Â Â Â Â Â comctl32
ELF   7ee40000-7ee89000    Deferred    Âadvapi32
Â\-PE Â7ee50000-7ee89000 Â Â Â \ Â Â Â Â Â Â Â advapi32
ELF   7efa8000-7efb3000    Deferred    Âlibnss_files.so.2
ELF   7efb3000-7efcb000    Deferred    Âlibnsl.so.1
ELF   7efcb000-7eff0000    Deferred    Âlibm.so.6
ELF   7eff6000-7f000000    Deferred    Âlibnss_nis.so.2
ELF   b7cc2000-b7ccb000    Deferred    Âlibnss_compat.so.2
ELF   b7ccc000-b7cd0000    Deferred    Âlibdl.so.2
ELF   b7cd0000-b7e1a000    Deferred    Âlibc.so.6
ELF   b7e1b000-b7e33000    Deferred    Âlibpthread.so.0
ELF   b7e43000-b7f57000    Dwarf      libwine.so.1
ELF   b7f59000-b7f75000    Deferred    Âld-linux.so.2
Threads:
process Âtid   Âprio (all id:s are in hex)
0000000a
   Â0000000c  Â0
   Â0000000b  Â0
00000008 (D) Z:\home\james\NDSTokyoTrim.exe
   Â00000009  Â0 unable to dispatch exception.
 

ZAFDeltaForce

Specialist
Member
Joined
Sep 9, 2006
Messages
2,794
Trophies
1
XP
583
Country
Singapore
Brian makes perfect sense to me. And guys, you can wait months for Zelda: Phantom Hourglass. Why not just wait a little longer for that background change?

Its already nice of Brian to program one of the best ROM trimmer around. Cut him some slack guys
happy.gif
 

OSW

Wii King
Former Staff
Joined
Oct 30, 2006
Messages
4,787
Trophies
0
XP
462
Country
But apparently you had enough time to put a trojan horse in it (windows shutting down after uncompressing the file with upx)
Why not release a version with and without the background that makes text unreadable?


What the fuck are you talking about? The trimmer reboots your computer if it finds the exe/background has been altered (when you run it). How is that a trojan?
A trojan is a piece of code hidden inside a program that performs another action than what the program is supposed to do.
wiki

What will be the next thing you're gonna put inside the program, make it delete stuff from the hard drive?

ROFL ROFL ROFL massive pwnage

Please brian, never change the background or include other options (unless they are miharu too
tongue.gif
)
 

matriculated

Well-Known Member
Member
Joined
Sep 27, 2007
Messages
598
Trophies
0
Website
www.nubecoder.com
XP
77
Country
Canada
At this rate you guys will never see the background change because you keep pissing BrianTokyo off. He already said he was working on it and it was working in the beta but ppl are still complaining. If you don't like the background - don't use it. If you think it has a trojan - don't use it.
 

Rayder

Mostly lurking lately....
Former Staff
Joined
Jan 14, 2007
Messages
6,606
Trophies
1
Location
USA
XP
621
Country
United States
The background doesn't bother me in the least. I don't love it, nor do I hate it. I consider it a trademark of Brian's work. Seeing anything else in its place would be strange at this point.

All I can say is that this trimmer is a great asset to flashcard owners and complaining about the background seems kind of frivolous to me. Not that I don't understand where some with conservative parents are coming from, but really, it isn't THAT bad.

I think complaining about it is doing more to prevent him from changing it than just letting B do his thing with the program at his own speed.

I think a simple solution is an option to have the pic or a basic plain background. That would be simpler than trying to create protection for many different pics. Just my opinion.


Whatever Brian ultimately decides to do is fine with me though. As long as it trims my ROMs for me, I'm good.

Rock on with your bad self, B.
 

BrianTokyo

NDSTokyoTrim Dev.
OP
Member
Joined
Jun 28, 2007
Messages
658
Trophies
0
Website
www.eden.fm
XP
303
Country
okay i am going to spend nights and day to change the background no matter what!!!! i pretty sure i can do it
smile.gif
and no i wont release it so brain wont get mad

Ok i'll give you a hint. In order to replace the current background you need to create an encripted one, matching the same encription I used, which is based on random seeds, distribute it across the exe in several areas (it's not embedded as a resource), and have the checksum of various parts of it match certain values that affect the final rom size and trimming process. No background = wrong trimming.

Good luck!

everyone else: thanks for your support and backing
biggrin.gif


linux/wine: hopefully fixed in the next release (can you test teh 64bit version linked in the previous page?)
 
General chit-chat
Help Users
    SylverReZ @ SylverReZ: @AncientBoi, 10/10 ratings from every gaming outlet. +1