Emulation Terms FAQ?

General area for talk about ZSNES. The best place to ask for related questions as well as troubleshooting.

Moderator: ZSNES Mods

Post Reply
Criftus
New Member
Posts: 6
Joined: Sun Nov 14, 2004 9:03 pm

Emulation Terms FAQ?

Post by Criftus »

Hey,

Apologies if this is a dumb question, but I've been looking for a while for definitions to some pretty common Emulation/ROM/IPS Patching terms, such as:

Interleaved, De-interleaved, Headered, Unheadered, HiROM, LoROM, ChkSum, Static RAM, Various types of chip names, etc. etc.

I've had no luck so far. I have a fairly weak knowledge of programming, so all of these terms are alien to me, and when they're thrown around I just sort of skim over them. :wink:

So does anyone know of a FAQ that would define these terms for me? Or is anyone willing to fill me in on what they mean? It's fairly essential when patching a ROM, and I can *do* things like add a header, but I'd love to know *why* it's needed and what exactly is going on when I do these things.

Thanks for any help. -Criftus
Agozer
16-bit Corpse | Nyoron~
Posts: 3534
Joined: Sun Aug 01, 2004 7:14 pm
Location: Nokia Land

Post by Agozer »

Check this link for information about the different SNES chips.

Static RAM = This is where data is written when you save a game / where the game keeps track of your progress.

Others may correct me if I'm wrong.
whicker: franpa is grammatically correct, and he still gets ripped on?
sweener2001: Grammatically correct this one time? sure. every other time? no. does that give him a right? not really.
Image
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

A definition of most of those terms should be explained in my knowledge base, take a look through it.

http://nsrt.edgeemu.com/forum/kb.php
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Criftus
New Member
Posts: 6
Joined: Sun Nov 14, 2004 9:03 pm

Post by Criftus »

Okay, scratch Interleaving, Deinterleaving, Chips, and Static RAM from the list. I think I understand.

·Interleaving is the scrambling of ROM code caused by various means (so you'd prefer to have a deinterleaved ROM when emulating)?
·I now have more than enough info on the chips :wink: Thanks!
·The Static RAM definition was given already (thanks Agozer!). One question though: when a tool asks if you'd like to 'disable Static RAM', would this only affect carts that used battery backup? With carts that didn't store information either enabling/disabling it shouldn't make a difference, right?

I still don't quite understand what LoROM & HiROM is though. As far as the document is concerned it states that these terms define where the ROM information is stored (either between 1-32kb, or 33-64kb of the ROM). Why wouldn't you naturally place that information at the beginning? Are there ways to convert a HiROM to a LoROM for consistencies sake, or vice versa? I know it's not important, really, but the games could all be in one type, I'd take it.

Any help with the Headers & checksum would still be great. Oh, and I guess I'll add another question or two now since I just thought of it:

· Are there any ROMs that require having a header, or would be damaged by removing a header? I say this because I use GoodTools, and it doesn't distinguish between Headered/Unheadered ROMs (ie. two copies of "cart.smc"- one is 524,288, the other 524,800 ... GoodSNES won't catch a difference between the two). Again with the consistency - I'd like to have my ROMs as consistent as possible. I dunno. Weird I guess. :D
· The newest version of GoodSNES gives you the option to convert ROMs to non-interleaved - could this potentially damage the ROM? There was mention of something along those lines in the document, but it was fairly complex and I'm not sure I got what was intended out of it. Something about deinterleaving an interleaved ROM interleaves it? lol :? Maybe I totally mixed it up.

Anyways, thanks for the help so far. Cheers. -Criftus
adventure_of_link
Locksmith of Hyrule
Posts: 3634
Joined: Sun Aug 08, 2004 7:49 am
Location: 255.255.255.255
Contact:

Post by adventure_of_link »

Header: small 512 byte file put in the rom, which contains all info of it (IE: Special chipset, S-RAM size and use, Checksum (mabey?) ect)
CheckSum: Sum of all the bytes in the ROM, usually in Hex format.
Usually, you would remove a header when applying a *.ips patch to a ROM, but for some reason I still have problems with ips patching in ZSnes when the header is missing.
Last edited by adventure_of_link on Sun Nov 14, 2004 11:21 pm, edited 1 time in total.
<Nach> so why don't the two of you get your own room and leave us alone with this stupidity of yours?
NSRT here.
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

Criftus wrote:I say this because I use GoodTools, and it doesn't distinguish between Headered/Unheadered ROMs (ie. two copies of "cart.smc"- one is 524,288, the other 524,800 ... GoodSNES won't catch a difference between the two).
How about switching to a really good ROM sorting app and using NSRT ?

</shameless promotion>
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Nightcrawler
Romhacking God
Posts: 922
Joined: Wed Jul 28, 2004 11:27 pm
Contact:

Post by Nightcrawler »

Criftus wrote: ·Interleaving is the scrambling of ROM code caused by various means (so you'd prefer to have a deinterleaved ROM when emulating)?
More or less, yes. Interleaving is is caused by the copier that dumped the ROM image. Rather than each bank being dumped in order such as 1234 it comes out 2143 or similar. Why was this done you ask? One reasons is so you couldn't use ROM images made by one copier with another. More reasons were discussed before, but I don't remember any more of them.
·The Static RAM definition was given already (thanks Agozer!). One question though: when a tool asks if you'd like to 'disable Static RAM', would this only affect carts that used battery backup? With carts that didn't store information either enabling/disabling it shouldn't make a difference, right?
In general that's correct. Some games however have actual additional RAM chips rather than battery backup mapped to SRAM. I would imagine it would impact these games as well. I'm don't know enough about this to answer for sure.
I still don't quite understand what LoROM & HiROM is though. As far as the document is concerned it states that these terms define where the ROM information is stored (either between 1-32kb, or 33-64kb of the ROM). Why wouldn't you naturally place that information at the beginning? Are there ways to convert a HiROM to a LoROM for consistencies sake, or vice versa? I know it's not important, really, but the games could all be in one type, I'd take it.
LoROM and HiROM are the way the physical cartrige is layed out and how it is addressed by the SNES. You should search for a document on the SNES memory map for additional information. HiRom games are stored in 64K chunks starting at C0:0000 and up to FF:FFFF for a maximum normal size of 32megabits. LoROM is stored in 32K chunks starting at 80:8000 or 00:8000. Theres quite a few more details, so you should go read up on a SNES memory map document if you want to know more. It turns out be a bit more complex than you first guess. It took me awhile before I understood why the first 32K chunk in Hi-Rom was in the same place the first 32K chunk in LoROM is and get all the mirroring down.

http://members.tripod.com/FDwR/docs/snesmem.txt
This will probably make you even more confused.

The data IS at the beginning in the actual ROM chip, however the way the cartridge is physically connected to the SNES, the data is read at a different address from the SNES's perspective.

You cannot convert from LoROM to HiROM or vice versa. It will break most every single address in the entire game.

· Are there any ROMs that require having a header, or would be damaged by removing a header? I say this because I use GoodTools, and it doesn't distinguish between Headered/Unheadered ROMs (ie. two copies of "cart.smc"- one is 524,288, the other 524,800 ... GoodSNES won't catch a difference between the two). Again with the consistency - I'd like to have my ROMs as consistent as possible. I dunno. Weird I guess. :D
· The newest version of GoodSNES gives you the option to convert ROMs to non-interleaved - could this potentially damage the ROM? There was mention of something along those lines in the document, but it was fairly complex and I'm not sure I got what was intended out of it. Something about deinterleaving an interleaved ROM interleaves it? lol :? Maybe I totally mixed it up.

Anyways, thanks for the help so far. Cheers. -Criftus
Headers are added to the ROM by the copiers that dumped them so they can be loaded back into the copier using the correct mapping(LoROM/HiROM SRAM etc..). They are NOT actually part of the ROM chip and therefore not used by the emulators and you can safely remove the 512 byte header from any ROM and not damage it.

GoodSNES doesn't differentiate between header and no header because it does not matter and the ROM will function perfectly either way. Headers are only important if you use a copier or you are going to apply an ips patch. Sometimes translators or hackers work on a ROM with a header. Even though the header information is still of no use, the patch can only be applied to another ROM with a header for the offsets of what data was changed to be correct.

Deinterleaving the ROM will simply unscramble it and put the data in the right order. Deinterleaved ROMs are the unofficial standard in the scene. Again, a translation patch or hack however that was made on a interleaved ROM will still require an interleaved ROM for the offets to be right.

Interleaving a ROM should nto damage it in any way unless it was interleaved using a format that isn't correctly supported by whatever tool you are using to deinterleave it.
[url=http://transcorp.romhacking.net]TransCorp[/url] - Home of the Dual Orb 2, Cho Mahou Tairyku Wozz, and Emerald Dragon SFC/SNES translations.
[url=http://www.romhacking.net]ROMhacking.net[/url] - The central hub of the ROM hacking community.
Criftus
New Member
Posts: 6
Joined: Sun Nov 14, 2004 9:03 pm

Post by Criftus »

Wow. Thank you Nightcrawler! That definitely finished off the other questions I had. :wink: I now have a better grasp of what I've doing when working with the ROMs. Thanks again everyone. :D
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Criftus wrote: ·The Static RAM definition was given already (thanks Agozer!). One question though: when a tool asks if you'd like to 'disable Static RAM', would this only affect carts that used battery backup? With carts that didn't store information either enabling/disabling it shouldn't make a difference, right?
A tool that asks to 'disable Static RAM' sounds like SnesTool. In fact using it's options will have no impact what so ever on your emulator. All it does is modify some bits in a copier header that your emulator ignores anyway.

For running on your copier, don't use SnesTool, for the simple reason it's old, wasn't designed for a whole slew of copiers, and didn't have enough now common knowledge to really do things correctly in the first place. If you want proper headers, use uCON64. Also in other words, using that option in SnesTool will very likely have no effect even on a copier.

Nightcrawler wrote: Deinterleaving the ROM will simply unscramble it and put the data in the right order. Deinterleaved ROMs are the unofficial standard in the scene. Again, a translation patch or hack however that was made on a interleaved ROM will still require an interleaved ROM for the offets to be right.
I'm sorry, but I have to correct you.

Deinterleaving will only unscramble if you really are deinterleaving it. One deinterleave algorithm will not deinterleave every ROM interleaved by different algorithms. "Deinterleaving" with the wrong algorithm will simply interleave the ROM more.

Deinterleaved ROMs are not the unofficial standard. Non interleaved ROMs are the standard, and the standard was in fact made by Nintendo, they don't put on carts data in a different order than the data that is put on carts (in fact it's impossible).

Read my document: http://nsrt.edgeemu.com/forum/kb.php?mode=article&k=2
Last edited by Nach on Tue Nov 16, 2004 4:37 am, edited 1 time in total.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Nightcrawler
Romhacking God
Posts: 922
Joined: Wed Jul 28, 2004 11:27 pm
Contact:

Post by Nightcrawler »

Nach wrote:
Criftus wrote:
Nightcrawler wrote: Deinterleaving the ROM will simply unscramble it and put the data in the right order. Deinterleaved ROMs are the unofficial standard in the scene. Again, a translation patch or hack however that was made on a interleaved ROM will still require an interleaved ROM for the offets to be right.
I'm sorry, but I have to correct you.

Deinterleaving will only unscramble if you really are deinterleaving it. One deinterleave algorithm will not deinterleave every ROM interleaved by different algorithms. "Deinterleaving" with the wrong algorithm will simply interleave the ROM more.

Deinterleaved ROMs are not the unofficial standard. Non interleaved ROMs are the standard, and the standard was in fact made by Nintendo, they don't put on carts data in a different order than the data that is put on carts (in fact it's impossible).

Read my document: http://nsrt.edgeemu.com/forum/kb.php?mode=article&k=2
Technicalities.. Technicalities! :P It's more like adding to my information aside from correct my terminology of the standard.

When I said deinterleaved ROMs were standard I meant that as in not interleaved rather than one that was interleaved and then deinterleaved specifially. It came out incorrect nontheless, so thanks for the correction.

I didn't go into enough depth for interleaving ROMS. It is certainly a good point that there are different interleaved formats and trying to use the wrong algorithm will make your ROM worse rather than better.
[url=http://transcorp.romhacking.net]TransCorp[/url] - Home of the Dual Orb 2, Cho Mahou Tairyku Wozz, and Emerald Dragon SFC/SNES translations.
[url=http://www.romhacking.net]ROMhacking.net[/url] - The central hub of the ROM hacking community.
Post Reply