Homebrew [Q] Why is .BIN an obsessively used file extension?

WhoAmI?

PASTA's dirty animal
OP
Member
Joined
Mar 15, 2015
Messages
1,276
Trophies
0
Location
Poké Ball
Website
lavanoid.github.io
XP
1,279
Country
Okay, just wondering - why is .BIN used a lot, for file extensions? Aren't file extensions typically used to distinguish different types of files from each other?

For example, when we backup our NAND - why is .BIN used when logically it should be .IMG? We quite literally create an image of the NAND, so why not use .IMG?

At the moment, the 3DS scene has an odd file naming scheme. For example, on Windows - you have .exe's, .dll's etc etc.

If I was to name a .java programme as .exe - would it work? Nope. How would I be able to distinguish a Java file from a Windows executable, if the file extension is the same?

It's like when we use win32diskimager to backup/restore our nands - wouldn't it be more convenient for us to use .img as a file extension so we don't have to keep manually enter "NAND.BIN" into explorer, just so it'll show up in the "browse dialogue"?

I'm not complaining or anything, I just think that we and devs should be using different file extensions instead of obsessively using .bin, as not every .bin file does the same thing...

Example:

We call our NAND backups "NAND.BIN" and we call WebHax LoadCode payloads "code.bin", yet you can't launch "NAND.BIN" through the web exploit, can you? I'm just saying that if a file has a different purpose - give it a different file extension. You know, be original....

So yeah... You think we should make a standard for 3DS-related files? I think we should - everything seems to be a bit of a mess at the moment, with all the .BINs here and there...
 
  • Like
Reactions: Margen67

WhoAmI?

PASTA's dirty animal
OP
Member
Joined
Mar 15, 2015
Messages
1,276
Trophies
0
Location
Poké Ball
Website
lavanoid.github.io
XP
1,279
Country
because bin stands for "binary"


Yeah... Pretty much everything digital is considered a binary... Is your whole music collection called .bin, too? Why can't things follow more of a standard like the PC? When you RIP a CD - You can store it as .iso or .img. When you image a Raspberry Pi SD card - the extension used is .img... Things are tidier and more identifiable that way...

Just because everything is stored in binary, doesn't mean we should name everything as .BIN. We have file extensions for a reason...
 

gamesquest1

Nabnut
Former Staff
Joined
Sep 23, 2013
Messages
15,153
Trophies
2
XP
12,247
because its the default "not really a specific file", filename....you can rename your nand to NAND.NAND if you like, but for files with little purpose other than storing data that isnt intended to get opened a lot by a program it saves having 9999999999999999999999999999999999 different file types,

basically, if its not a common file format, it is generally left as .bin or whatever, if its a actual file format that you need to be able to recognize i.e you know .jpg is a picture, .mp3 is music etc, it would be much more confusing if everything needed a specific extension, the extensions are really only there so the OS knows that program to open it with, so filename = for you to know what it is, extension = for the system to know what format it is and how to open it
 

WhoAmI?

PASTA's dirty animal
OP
Member
Joined
Mar 15, 2015
Messages
1,276
Trophies
0
Location
Poké Ball
Website
lavanoid.github.io
XP
1,279
Country
because its the default "not really a specific file", filename....you can rename your nand to NAND.NAND if you like, but for files with little purpose other than storing data that isnt intended to get opened a lot by a program it saves having 9999999999999999999999999999999999 different file types,


Perhaps... .IMG is already an existing file type though... We open NAND files with win32diskimager, right? Why not make things easier for ourselves and give it a standard naming scheme? It's like with DS games. We could've saved the roms as .bin but we used .nds, instead as it made things more identifiable...

We have .3dsx files... Why not name them to .bin, like most other payloads on the 3DS? Just saying... We seem to name executable's as .BIN's as well as archives/images...

Edit: I'm personally gonna start using .IMG, for NAND backups.. Just my preference.
 
D

Deleted User

Guest
Perhaps... .IMG is already an existing file type though... We open NAND files with win32diskimager, right? Why not make things easier for ourselves and give it a standard naming scheme? It's like with DS games. We could've saved the roms as .bin but we used .nds, instead as it made things more identifiable...

We have .3dsx files... Why not name them to .bin, like most other payloads on the 3DS? Just saying... We seem to name executable's as .BIN's as well as archives/images...

Edit: I'm personally gonna start using .IMG, for NAND backups.. Just my preference.
Because NDS files follow a specific file format. 3DSX files follow a specific file format. NAND dumps are just raw binary dumps of a NAND sectors that don't follow a specific file format.
 
  • Like
Reactions: klear

gamesquest1

Nabnut
Former Staff
Joined
Sep 23, 2013
Messages
15,153
Trophies
2
XP
12,247
suppose nand dumps do technically fit the .IMG criteria, they are just an image of the nand....thats why win32diskimager looks for .img files as thats its main usage, so either one is correct, .bin as its not actually a file with a format, or .img, as despite it not technically being a file format, it is a .img file i.e a image of a disk
 
  • Like
Reactions: WhoAmI?

WhoAmI?

PASTA's dirty animal
OP
Member
Joined
Mar 15, 2015
Messages
1,276
Trophies
0
Location
Poké Ball
Website
lavanoid.github.io
XP
1,279
Country
Because NDS files follow a specific file format. 3DSX files follow a specific file format. NAND dumps are just raw binary dumps of a NAND sectors that don't follow a specific file format.


Whats the different between a raw image file and a raw dump of NAND sectors? Commonly, in "the world of unix" - when someone images a drive with "dd", they usually use .img, e.g. "dd if=/dev/sda1 of=/media/sdc/backup.img". dd copies everything byte for byte, just like a raw backup.

If most users use Windows to make nand dumps, why aren't we using file types that programs typically support by default. E.g. The disk imager software on windows, typically looks for .img, right? Why don't we use .img?
 
  • Like
Reactions: Margen67

gamesquest1

Nabnut
Former Staff
Joined
Sep 23, 2013
Messages
15,153
Trophies
2
XP
12,247
Whats the different between a raw image file and a raw dump of NAND sectors? Commonly, in "the world of unix" - when someone images a drive with "dd", they usually use .img, e.g. "dd if=/dev/sda1 of=/media/sdc/backup.img". dd copies everything byte for byte, just like a raw backup.

If most users use Windows to make nand dumps, why aren't we using file types that programs typically support by default. E.g. The disk imager software on windows, typically looks for .img, right? Why don't we use .img?
we can....but as the files are pretty much hardly ever needed (unless your doing extensive nand flashing) you gain practically nothing by calling them .img, plus GW dumps them as .bin, and restores them as .bin....so its generally just accepted that you keep your nand.bin safe, we don't want to confuse people by some people saying nand.bin, and others saying nand.img......yeah same file, but lets be a bit unified on that front, if you want to name them .img thats upto you, but i doubt there will be any major movement with everyone changing their file name just for the sake of it
 
  • Like
Reactions: WhoAmI?
D

Deleted User

Guest
Whats the different between a raw image file and a raw dump of NAND sectors? Commonly, in "the world of unix" - when someone images a drive with "dd", they usually use .img, e.g. "dd if=/dev/sda1 of=/media/sdc/backup.img". dd copies everything byte for byte, just like a raw backup.

If most users use Windows to make nand dumps, why aren't we using file types that programs typically support by default. E.g. The disk imager software on windows, typically looks for .img, right? Why don't we use .img?
Don't NAND dumps usually come out still encrypted, though? If it's encrypted, it isn't usable as a .img file.
 

Kafke

Well-Known Member
Member
Joined
Jan 2, 2009
Messages
416
Trophies
0
XP
362
Country
United States
File extensions are strictly a "windows" convention. There's no real point to them, and any well constructed format should be able to be identified by the content (usually using a marker of some sort at the beginning of the file). The extensions are for user convenience, and windows (and mac too, to an extent) has started to rely on them for file identification.

".BIN" is the extension for a generic binary file. Likewise ".DAT" is the extension for a generic data file. They are widely used for the same reason ".TXT" is widely used. Ideally each unique filetype should have it's own extension, but that's hardly ever the case.

"We call our NAND backups "NAND.BIN" and we call WebHax LoadCode payloads "code.bin", yet you can't launch "NAND.BIN" through the web exploit, can you? I'm just saying that if a file has a different purpose - give it a different file extension. You know, be original...."


Both are binary data They are just used in different ways.
 

WhoAmI?

PASTA's dirty animal
OP
Member
Joined
Mar 15, 2015
Messages
1,276
Trophies
0
Location
Poké Ball
Website
lavanoid.github.io
XP
1,279
Country
Don't NAND dumps usually come out still encrypted, though? If it's encrypted, it isn't usable as a .img file.


As gamesquest1 said - it's still a raw copy, it doesn't matter if it's encrypted. RAW copies of a disk still counts as an image. That's like me imaging an encrypted hard drive and saying that it's not an image because I can't use it...
 
  • Like
Reactions: Margen67
D

Deleted User

Guest
yeah generally .img is a raw filesystem, but really .img would just cover any raw sector dump from a disk, even if it was encrypted
As gamesquest1 said - it's still a raw copy, it doesn't matter if it's encrypted. RAW copies of a disk still counts as an image. That's like me imaging an encrypted hard drive and saying that it's not an image because I can't use it...
I suppose, although the argument that .img is better because programs look for it is false, as raw NAND dumps wouldn't work in said programs.
 

WhoAmI?

PASTA's dirty animal
OP
Member
Joined
Mar 15, 2015
Messages
1,276
Trophies
0
Location
Poké Ball
Website
lavanoid.github.io
XP
1,279
Country
I suppose, although the argument that .img is better because programs look for it is false, as raw NAND dumps wouldn't work in said programs.


So NAND.BIN doesn't work in win32diskimager? That's a surprise... I was saying that using .img would be better instead of .bin because it'll make things more identifiable in the long run. It'll save us more time, over a period... Just think about all those seconds wasted, typing "NAND.BIN" when you could be clicking on it instead.

File extensions are strictly a "windows" convention. There's no real point to them, and any well constructed format should be able to be identified by the content (usually using a marker of some sort at the beginning of the file). The extensions are for user convenience, and windows (and mac too, to an extent) has started to rely on them for file identification.

".BIN" is the extension for a generic binary file. Likewise ".DAT" is the extension for a generic data file. They are widely used for the same reason ".TXT" is widely used. Ideally each unique filetype should have it's own extension, but that's hardly ever the case.




Both are binary data They are just used in different ways.


If we keep naming things ".bin", why even bother specifying .bin? The extension means nothing if it isn't used for anything...
 

gamesquest1

Nabnut
Former Staff
Joined
Sep 23, 2013
Messages
15,153
Trophies
2
XP
12,247
I suppose, although the argument that .img is better because programs look for it is false, as raw NAND dumps wouldn't work in said programs.
win32diskimager looks for .img, and then lets your write it directly to a disk....in this case the 3DS nand.

same way as .3ds can be opened with 3dsmax, or different .3ds files would open in 3dsexplorer, the extension is only as good as the program trying to open it, in both those cases the program is correct to be looking for .3DS, but even different file format can share the same extension
 
  • Like
Reactions: WhoAmI?
D

Deleted User

Guest
I'll concede the point about NAND. BIN is just what was first used I guess. Although, things for mounting an IMG for file access wouldn't work with it encrypted, and changing it doesn't really have too much use.
If we keep naming things ".bin", why even bother specifying .bin? The extension means nothing if it isn't used for anything...
It does mean something. It means that the contents are generic binary data with no specified format. For example, LoadCode payloads are bin files because they are raw binary data for code, not in a specific format like elf, 3dsx, etc.
 

Kafke

Well-Known Member
Member
Joined
Jan 2, 2009
Messages
416
Trophies
0
XP
362
Country
United States
If we keep naming things ".bin", why even bother specifying .bin? The extension means nothing if it isn't used for anything...


Pretty much. The extension is only useful for local filesystems. To distinguish a .bin from a .dat, for example. One current project I'm working on uses .BIN to distinguish archive files, while it uses other 'new' extensions (like SBF) for other filetypes. As I said, it's mostly convention. You don't even *need* an extension. Instead of having 'filename.bin', you could just have 'filename'
 
  • Like
Reactions: billzo and WhoAmI?

WhoAmI?

PASTA's dirty animal
OP
Member
Joined
Mar 15, 2015
Messages
1,276
Trophies
0
Location
Poké Ball
Website
lavanoid.github.io
XP
1,279
Country
I'll concede the point about NAND. BIN is just what was first used I guess. Although, things for mounting an IMG for file access wouldn't work with it encrypted, so changing it doesn't really have too much use.

It does mean something. It means that the contents are generic binary data with no specified format. For example, LoadCode payloads are bin files because they are raw binary data for code, not in a specific format like elf, 3dsx, etc.


I understand that - my main point was pretty much NAND.BIN files, to be honest.
 

Jim_e

Well-Known Member
Newcomer
Joined
Nov 13, 2007
Messages
79
Trophies
0
XP
267
Country
United States
There's nothing to get so worked up about. File extensions are just left overs from old file systems. We could get rid of all file extensions now, more useful information is stored in metadata anyway. In fact many operating systems try to hide that file extensions even exist anymore(which is a security issue).

File extensions aren't as useful as they were. 3 character namespace is simply insufficient to denote all possible file formats. Now they are just evolutionary leftovers. Naming things dot bin is just a way to denote that no specific program will guarantee know what to do with the file.
 
  • Like
Reactions: mid-kid and cearp

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • Xdqwerty @ Xdqwerty:
    also gonna install twilight menu in my r4 flashcard
  • Psionic Roshambo @ Psionic Roshambo:
    One thing that just occurred to me.... The sound on the 2600 sucked less back then the harsh sound we hear now is from infinitely better speakers we have now, back when the 2600 was new speakers produced a almost muffled sound, like CRTs made old graphics look slightly better.
  • Psionic Roshambo @ Psionic Roshambo:
    I wonder if I could recommend that to some emulation devs that perhaps the sound could use some smoothing out to simulate those old TVs
  • Psionic Roshambo @ Psionic Roshambo:
    I think a few of the early systems could benefit from that, at least up to the 8 bit generation, by the 16 bit generation I think TVs had gotten a lot better in almost every way
  • Xdqwerty @ Xdqwerty:
    i dont have an sd card adapter but I have an usb sd card adapter
  • K3Nv2 @ K3Nv2:
    Old people games
  • Xdqwerty @ Xdqwerty:
    its not the one that comes with the r4
  • Xdqwerty @ Xdqwerty:
    doesnt work (my flashcard is from r4isdhc.com)
  • Xdqwerty @ Xdqwerty:
    might install ysmenu first
  • Psionic Roshambo @ Psionic Roshambo:
    Try Wood firmware
  • Psionic Roshambo @ Psionic Roshambo:
    For your R4
  • Psionic Roshambo @ Psionic Roshambo:
    It's old but it's the best firmware out for DS stuff
  • Xdqwerty @ Xdqwerty:
    it says it only works for the original R4, R4i Gold (r4ids.cn), R4iDSN (r4idsn.com) and Acekard R.P.G.
  • Xdqwerty @ Xdqwerty:
    nvm it does support mine
  • Xdqwerty @ Xdqwerty:
    but why choose it over ysmenu @Psionic Roshambo?
  • Xdqwerty @ Xdqwerty:
    bc im stupid?
  • Xdqwerty @ Xdqwerty:
    yea ik im stupid
  • Xdqwerty @ Xdqwerty:
    good night
  • Psionic Roshambo @ Psionic Roshambo:
    Just give it a try, but honestly if you have a 3DS you can play DS games without a card just off the internal SD card
  • Psionic Roshambo @ Psionic Roshambo:
    Slightly slower loading but a bit more convenient
  • BakerMan @ BakerMan:
    guys, my fuckin headphones have an out of place speaker
  • K3Nv2 @ K3Nv2:
    Did you try wearing them?
    B @ btjunior: @Xdqwerty 16