Hacking EZ-Trim+

TrolleyDave

Philosolosophising
OP
Former Staff
Joined
Jan 1, 2007
Messages
7,761
Trophies
1
Age
52
Location
Wales, UK
XP
933
Country
Nice app : ) Very fast with overwrite method, seems around as fast as mine
smile.gif
(haven't compared). However, I noticed it's extremely slow when not overwriting, (in par with other trimmers other than mine). What block size are you using for loading/writing the files?

I'm using 64k blocks I think, I'm going to work on the app this weekend so I'll double check then. It's basically a Reset(F,1) and a BlockRead(F,Buff,SizeOf(Buff),BytesRead) where Buff is Array[0..65535] Of Byte. Should I be doing it differently? Thanks for your help Brian mate!
 

Azimuth

Chicken Teriyaki Boy!
Member
Joined
Feb 23, 2006
Messages
637
Trophies
0
Website
Visit site
XP
110
Country
Canada
Its seems to be trimming off 6 extra bytes on games with a wifi block. How are you detecting the wifi block(if you don't mind me asking)?
 

TrolleyDave

Philosolosophising
OP
Former Staff
Joined
Jan 1, 2007
Messages
7,761
Trophies
1
Age
52
Location
Wales, UK
XP
933
Country
I seek to the end of the file (the actual_cart_size info in the header), scan something like 10 bytes and if I hit a non-$00 or non-$ff then I assume it's a wifi block and keep x (blank byte count) bytes + 128 bytes. How big should the wifi block be?

To be honest I've probably made a typo in the calculations. Thanks for pointing it out, it means it's wrong in R4 Commander as well.
 

Azimuth

Chicken Teriyaki Boy!
Member
Joined
Feb 23, 2006
Messages
637
Trophies
0
Website
Visit site
XP
110
Country
Canada
Wifi blocks are 136 bytes(after the actual rom size), just scan the whole 136 bytes looking for anything other than FF or 00, thats a sure way of detecting the wifi block.
 

TrolleyDave

Philosolosophising
OP
Former Staff
Joined
Jan 1, 2007
Messages
7,761
Trophies
1
Age
52
Location
Wales, UK
XP
933
Country
Wifi blocks are 136 bytes(after the actual rom size), just scan the whole 136 bytes looking for anything other than FF or 00, thats a sure way of detecting the wifi block.

That would explain the size difference, thanks for the info. The reason I did the scan and then 136 bytes is I noticed some of them started directly after then end of the rom and sometimes there was 1 or 2 blank bytes, I must've just been looking at the data wrong.

Will get the wifi detection fixed this weekend. Thanks again mate.
 

TrolleyDave

Philosolosophising
OP
Former Staff
Joined
Jan 1, 2007
Messages
7,761
Trophies
1
Age
52
Location
Wales, UK
XP
933
Country
v0.01 Released
------------------
First official release.

+ Wifi block size fixed
+ Window size adjusted
+ Sped up trimming

Downloads availabe on my blog
 

naes

Well-Known Member
Member
Joined
Jul 16, 2007
Messages
172
Trophies
0
XP
112
Country
United States
Thanks, so far all my games have been working fine. I hope there aren't any bugs with this!


Well, even if there is, I have back ups of back ups... so I'm fine.
 

zardoz

Active Member
Newcomer
Joined
Jan 7, 2008
Messages
38
Trophies
0
XP
25
Country
I have tried the new 0.01 version but found that there is a problem with the internal URL that you are using to get the updates for the release list. As a result, the list is not updated and the renamer causes the program to error.

The list is however downloaded from R4-commander, so I suspect you just forgot to update the embedded URL.

Hope this helps...

Z
 

TrolleyDave

Philosolosophising
OP
Former Staff
Joined
Jan 1, 2007
Messages
7,761
Trophies
1
Age
52
Location
Wales, UK
XP
933
Country
I have tried the new 0.01 version but found that there is a problem with the internal URL that you are using to get the updates for the release list. As a result, the list is not updated and the renamer causes the program to error.

The list is however downloaded from R4-commander, so I suspect you just forgot to update the embedded URL.

Hope this helps...

Z

That helps alot, thanks! I'll fix that shortly.

EDIT: Fixed! It should work fine now, you don't need to upgrade the program. It was a spelling mistake on the server side rather than the app.
 

dohclude

Well-Known Member
Member
Joined
Oct 12, 2006
Messages
384
Trophies
0
Age
41
Location
The Patch Walks!
Website
www.MODaWii.com
XP
304
Country
United States
This program works great for me, I've only found one bug. When I use the "Trim & Rename" option and my roms are compressed inside of "7zip" archives and my output directory is different than the input, it renames the input 7z file and adds an extra period to the name. For instance, if the file was "ROM.7z", after it trims and renames the input file is now called "ROM..7z" and I have to go back through all of the roms that were trimmed and remove the extra dot. Otherwise it seems to work great. Thanks!
 

TrolleyDave

Philosolosophising
OP
Former Staff
Joined
Jan 1, 2007
Messages
7,761
Trophies
1
Age
52
Location
Wales, UK
XP
933
Country
This program works great for me, I've only found one bug. When I use the "Trim & Rename" option and my roms are compressed inside of "7zip" archives and my output directory is different than the input, it renames the input 7z file and adds an extra period to the name. For instance, if the file was "ROM.7z", after it trims and renames the input file is now called "ROM..7z" and I have to go back through all of the roms that were trimmed and remove the extra dot. Otherwise it seems to work great. Thanks!

Fixed!
 

dohclude

Well-Known Member
Member
Joined
Oct 12, 2006
Messages
384
Trophies
0
Age
41
Location
The Patch Walks!
Website
www.MODaWii.com
XP
304
Country
United States
lol, now it renames my 7zip file to just ".7z" and names the output rom ".NDS". If I try to trim more than one rom at a time, it overwrites the previous ".7z" and ".NDS" files. I lost about 10 roms from my collection, now I have to remember which ones they are and replace them.
 

TrolleyDave

Philosolosophising
OP
Former Staff
Joined
Jan 1, 2007
Messages
7,761
Trophies
1
Age
52
Location
Wales, UK
XP
933
Country
lol, now it renames my 7zip file to just ".7z" and names the output rom ".NDS". If I try to trim more than one rom at a time, it overwrites the previous ".7z" and ".NDS" files. I lost about 10 roms from my collection, now I have to remember which ones they are and replace them.

Damn, it was working ok when I tested it. Will look into it and try to get an update out shortly. Sorry about that.

EDIT : I can't seem to get the same result as you. What games did it happen on?
 

dohclude

Well-Known Member
Member
Joined
Oct 12, 2006
Messages
384
Trophies
0
Age
41
Location
The Patch Walks!
Website
www.MODaWii.com
XP
304
Country
United States
well, it's a bit difficult to remember because I did about 10 of them at once and it renamed about 5-6 of them like that, each overwriting the previous. The last one I can confirm was Lunar Knights (i think it's 0847).
 

dohclude

Well-Known Member
Member
Joined
Oct 12, 2006
Messages
384
Trophies
0
Age
41
Location
The Patch Walks!
Website
www.MODaWii.com
XP
304
Country
United States
I had a look in the "NDSRELS.INI" file and it seems like this rom isn't in there. I guess this problem only happens when the rom can't be referenced in the ini file. In this case it should just leave the filename alone instead of renaming it with no name and only an extension.
 

TrolleyDave

Philosolosophising
OP
Former Staff
Joined
Jan 1, 2007
Messages
7,761
Trophies
1
Age
52
Location
Wales, UK
XP
933
Country
I had a look in the "NDSRELS.INI" file and it seems like this rom isn't in there. I guess this problem only happens when the rom can't be referenced in the ini file. In this case it should just leave the filename alone instead of renaming it with no name and only an extension.

Nice one. I thought I'd put stuff in to check for the game not existing in the release ini file, I'll go back in and fix it. I've just checked the NDSRELS.INI in R4 Commander and the Lunar Knights stuff is definitely in there, can you try redownloading the release list through EZ-Trim and see if's in there after redownloading? Cheers for the feedback.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: https://youtu.be/MddR6PTmGKg?si=mU2EO5hoE7XXSbSr