Previous Thread
Next Thread
Print Thread
Page 2 of 2 1 2
#70388 - 06/04/11 02:35 PM Re: Sega Mega-CD [Re: Cassiel]  
Joined: Jan 2008
Posts: 6
Eke Offline
Member
Eke  Offline
Member

Joined: Jan 2008
Posts: 6
The claim that current dumps are not "correct" does not make much sense to me either: I mean, ROMS are stored as 16-bit words and the 68k is reading them as big endian words, right ? If they were truly byte-swapped in the chip compared to the current dump we know, the CPU would not be able to read valid instructions since the address lines are not swapped as far as I know.

I think the reason they appear byte-swapped is because the dumping software is configured for little-endian words and save/display them this way, dumping from the chip directly or from the console should not make any differences as long as address lines matches.

I agree that a few games use odd address/data lines arrangment that would cause strange ROM mirroring but it's certainly not the majority.

Last edited by Eke; 06/04/11 02:39 PM.
#70389 - 06/04/11 02:39 PM Re: Sega Mega-CD [Re: Cassiel]  
Joined: Jan 2006
Posts: 3,687
etabeta78 Offline
Very Senior Member
etabeta78  Offline
Very Senior Member

Joined: Jan 2006
Posts: 3,687
Trondheim, Norway
doesn't it depend on the way you read the roms into the CPU space? wink

#70390 - 06/04/11 02:46 PM Re: Sega Mega-CD [Re: Cassiel]  
Joined: Jan 2008
Posts: 6
Eke Offline
Member
Eke  Offline
Member

Joined: Jan 2008
Posts: 6
I'm not sure to understand what you mean by "CPU space" ?

The CPU simply sets address lines and read data lines. If the data was byteswapped inside the ROM chip, this necessarely means data lines are arranged in a strange way and not "directly" connected to D0-D15 on the 68k bus because all 68k instructions are stored as big-endian words, with MSB stored at even address and LSB at odd address, exactly as current ROM dump are stored. It's possible that a few cartridges are arranged like that but it's not the norm as far as I checked so no, genesis ROM are definitively not stored as little-endian words.

This is the reason why emulators are generally byte-swapping genesis ROM dumps on startup: so that directly fetching instructions as words is possible on little-endian (x86) computers, without having to byteswap them manually everytime you read a word from the ROM in order to decode the next instruction/parameter. On big-endian systems (such as Wii or PS3), this is completely unnecesseary and indeed not done.

Last edited by Eke; 06/04/11 03:04 PM.
#70407 - 06/04/11 06:33 PM Re: Sega Mega-CD [Re: Eke]  
Joined: Apr 2005
Posts: 544
Darkstar Online sleepy
Senior Member
Darkstar  Online Sleepy
Senior Member

Joined: Apr 2005
Posts: 544
GERMANY
The problem is not the system that runs the ROMs, it's the system that dumps the ROMs.

Let me try to give an explanation:
Even if the EPROM reader can read 16bit at once (and not 2x8 bit), you would still have the problem on how the EPROM reader writes these 16bit to disk. For example, an Intel x86 would read 16bit 0xaabb, but in memory they look like 0xbbaa and that is what gets written into the ROM file: 1 byte of 0xbb and then one byte of 0xaa. On a big endian system that's the other way round. Since almost all dumps are made on x86 hardware (I guess...) you get bytes swapped in the ROM file. Or the dumps are made with an 8->16 bit adapter which reads the 16bit as separate bytes then you have the same problems (still depending on the adapter and the software though)

-Darkstar

#70408 - 06/04/11 06:50 PM Re: Sega Mega-CD [Re: Cassiel]  
Joined: May 2004
Posts: 1,499
Haze Offline
Very Senior Member
Haze  Offline
Very Senior Member

Joined: May 2004
Posts: 1,499
but the key thing you want is consistency. Industry standard has pretty much dictated the byte order in which ROM files are represented. All the pro tools will dump to the same format.

You want to know that any properly verified ROM is in that format, and if programmed directly, with the proper tools, will program the ROM to be an exact copy of the original ROM.

Cart copiers etc. come and go, the real tools are permanent, and the standards set in stone for a long time now.

Page 2 of 2 1 2

Who's Online Now
3 registered members (Dorando, Darkstar, Pernod), 16 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,543
Posts111,677
Members4,795
Most Online225
May 26th, 2014
Powered by UBB.threads™ PHP Forum Software 7.6.0
Page Time: 0.024s Queries: 15 (0.009s) Memory: 4.9674 MB (Peak: 5.1541 MB) Zlib enabled. Server Time: 2018-06-20 11:20:01 UTC