N64 File Format

General No-Intro related discussions.
Post Reply
Buddybenj
Posts: 142
Joined: 29 Jan 2015 23:00

N64 File Format

Post by Buddybenj » 14 Feb 2015 03:54

No-Intro currently uses a byte swapped file format for the N64. However, the developer of CEN64, an emulator which attempts to emulate the N64 as accurately as possible (cycle-accurate), has said that the N64 uses big endian internally, so that's the only ROM format it supports (i.e. big endian ROMs are the most "accurate"). If No-Intro is about preserving ROMs as closely as possible to the actual hardware, shouldn't No-Intro use big endian for N64 ROMs?

User avatar
Tauwasser
Datter
Posts: 160
Joined: 04 Oct 2010 06:51

Re: N64 File Format

Post by Tauwasser » 14 Feb 2015 10:07

Please see this thread.

Basically, it boils down to:
  • 16bit-only ROMs don't have Endianness, since all accesses are word-oriented
  • mixed 8bit/16bit ROMs do have Endianness
For mixed 8bit/16bit ROMs pinout is mostly compatible between manufacturers (JEDEC), but Endianness not always is. Most manufacturers do not expect you to switch between byte and word mode at runtime. Thus, you will find information regarding Endianness only on rare occasions.

The idea of no-intro is to preserve the ROM, not necessarily the ROM in the Endianness of the processor. Some processors can even switch Endianness at runtime, which diminishes that meaning even further... Also, programming plays a big part, too. You'd mostly want an image that you can program without modifying it, though I personally don't see that as a big hurdle.

cYa,

Tauwasser

Buddybenj
Posts: 142
Joined: 29 Jan 2015 23:00

Re: N64 File Format

Post by Buddybenj » 03 Mar 2016 17:24

There has been a new discussion on the CEN64 forums about the proper N64 byteorder. I'd like to hear what other people think about MarathonMan's (author of CEN64) opinion on No-Intro's choice to use byteswapped ROMs.

http://forums.cen64.com/viewtopic.php?f=9&t=203

User avatar
C. V. Reynolds
Datter
Posts: 294
Joined: 17 Jun 2009 04:42

Re: N64 File Format

Post by C. V. Reynolds » 06 Mar 2016 22:27

What makes byteswapped ROM images more "correct", though? Does the N64 switch the endianness in the processor? When you open a ROM mage in a hex editor, it is immediately clear that the big endian format is the coherent one, anyway. No-Intro seems to use the something equivalent to big endian for the Megadrive/Genesis dat as well. Is that incorrect or does the Genesis actually handle things differently?

At the least, having an option on the Datomatic would be great. Choose one or the other between byteswapped and big endian.

coraz
Datter
Posts: 4
Joined: 29 Apr 2014 20:25

Re: N64 File Format

Post by coraz » 09 Sep 2017 14:26

I feel like the format change was rushed and reckless. MAME uses byte-swapped format and it would have been more clever to contact mamedevs about it first, since MAME tends to use 1:1 accurate format. Mooglyguy is the mister n64 of the the mame team, I would have asked his opinion first before doing any change, what if cen64 is wrong and we have to revert the whole set back and forth ? That would be terrible for all no-intro users.

Collecter
Posts: 154
Joined: 25 Nov 2016 17:09

Re: N64 File Format

Post by Collecter » 09 Sep 2017 17:02

I kept a copy of my byteswapped set so i dont care much :D

KingMike
Posts: 360
Joined: 22 Sep 2012 16:36

Re: N64 File Format

Post by KingMike » 09 Sep 2017 19:11

Trying to follow that discussion immediately gives me a headache, when they refer to files by extension.
Which is arbitrary.
Like Genesis. Doesn't the set currently "md", or was it "gen"? I know "md" was originally used for some really old, obsolete format so it's probably fair enough to reuse since people have probably even forgot about it. Though the "SMD" and "BIN" names remained in constant use (despite that ROMs found on the Internet were regularly renamed anyways). Long after the interleaved ("SMD") format had hopefully disappeared, since it was unnecessary for most users and as I recall, scrambled enough to make it unusable for ROM hacks/translations anyways.

Buddybenj
Posts: 142
Joined: 29 Jan 2015 23:00

Re: N64 File Format

Post by Buddybenj » 11 Sep 2017 00:29

When was the format changed?

Collecter
Posts: 154
Joined: 25 Nov 2016 17:09

Re: N64 File Format

Post by Collecter » 12 Sep 2017 08:26

i think it was in january this year

coraz
Datter
Posts: 4
Joined: 29 Apr 2014 20:25

Re: N64 File Format

Post by coraz » 12 Sep 2017 21:13

KingMike wrote:Trying to follow that discussion immediately gives me a headache, when they refer to files by extension.
Which is arbitrary.
Like Genesis. Doesn't the set currently "md", or was it "gen"? I know "md" was originally used for some really old, obsolete format so it's probably fair enough to reuse since people have probably even forgot about it. Though the "SMD" and "BIN" names remained in constant use (despite that ROMs found on the Internet were regularly renamed anyways). Long after the interleaved ("SMD") format had hopefully disappeared, since it was unnecessary for most users and as I recall, scrambled enough to make it unusable for ROM hacks/translations anyways.
This is not a mere extension problem, nointro will always use the .n64 extension regardless of the format.
The issue here is the byte order. cen64 author claim the roms are not byte swapped, fair enough, but I would have tried to get a confirmation before rushing a format change for a whole set, because the mame project which is reputed for its accuracy, still uses byte swapped format. I think mooglyguy, the main author of the cycle accurate n64 driver, is idling on the mamedev irc channel, at freenode. Try to contact him about this issue. I would trust his word over anyone else.

User avatar
C. V. Reynolds
Datter
Posts: 294
Joined: 17 Jun 2009 04:42

Re: N64 File Format

Post by C. V. Reynolds » 13 Sep 2017 07:51

Not everyone reputes MAME for accuracy in all matters.

I think it's worth noting that No-Intro currently uses z64 as the extension for N64 files rather than having the extension be n64. I think we should have the extension be N64 on big endian and byteswapped both, though.

coraz
Datter
Posts: 4
Joined: 29 Apr 2014 20:25

Re: N64 File Format

Post by coraz » 14 Sep 2017 19:47

C. V. Reynolds wrote:Not everyone reputes MAME for accuracy in all matters.

I think it's worth noting that No-Intro currently uses z64 as the extension for N64 files rather than having the extension be n64. I think we should have the extension be N64 on big endian and byteswapped both, though.
friend, you've done enough rushed changes, it's time to document yourself before doing any more stupid things
using .z64 is a violation of the nointro extension policy
and most of all do as I say and contact the mamedev mooglyguy
he knows more about the n64 hardware than you ever will, stop doing things you don't understand anything about, nointro deserves better standards

sorry to put it so bluntly but this is a serious issue we have here, it's time you understand you need to know what you're doing, especially when it has consequences on the storage of hundreds people

Buddybenj
Posts: 142
Joined: 29 Jan 2015 23:00

Re: N64 File Format

Post by Buddybenj » 15 Sep 2017 17:37

coraz wrote:
C. V. Reynolds wrote:Not everyone reputes MAME for accuracy in all matters.

I think it's worth noting that No-Intro currently uses z64 as the extension for N64 files rather than having the extension be n64. I think we should have the extension be N64 on big endian and byteswapped both, though.
friend, you've done enough rushed changes, it's time to document yourself before doing any more stupid things
using .z64 is a violation of the nointro extension policy
and most of all do as I say and contact the mamedev mooglyguy
he knows more about the n64 hardware than you ever will, stop doing things you don't understand anything about, nointro deserves better standards

sorry to put it so bluntly but this is a serious issue we have here, it's time you understand you need to know what you're doing, especially when it has consequences on the storage of hundreds people
Is there any place where mooglyguy has documented why he believes byteswapped ROMs are more accurate?

KingMike
Posts: 360
Joined: 22 Sep 2012 16:36

Re: N64 File Format

Post by KingMike » 16 Sep 2017 17:43

coraz wrote:
friend, you've done enough rushed changes, it's time to document yourself before doing any more stupid things
using .z64 is a violation of the nointro extension policy
and most of all do as I say and contact the mamedev mooglyguy
he knows more about the n64 hardware than you ever will, stop doing things you don't understand anything about, nointro deserves better standards

sorry to put it so bluntly but this is a serious issue we have here, it's time you understand you need to know what you're doing, especially when it has consequences on the storage of hundreds people
No matter how much of an "expert" one guy is, it seems a rash decision to make based solely on one person's opinion. Especially for a subject that clearly has been so heavily debated for years.

And I've also read things about MAME development in the past and how committed they are to accuracy. I heard of them not making changes to drivers that were already "good enough". (as much as the fact they keep redefining what "good" ROM sets are would suggest a concern for accuracy)

User avatar
Tauwasser
Datter
Posts: 160
Joined: 04 Oct 2010 06:51

Re: N64 File Format

Post by Tauwasser » 17 Sep 2017 02:31

This post would suggest that he doesn't care about the format as long as the contents match.

MAME/MESS recognizes two formats, see n64.cpp line 315: Little Endian and Byteswapped Big Endian.

Post Reply