LoROM vs HiROM

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
LoROM vs HiROM
by on (#93401)
LoROM advantages:

- You have ROM, hardware registers, and (the first 8kB of) WRAM all in the same bank, so you need fewer 24-bit absolute addresses and 24-bit pointers, making your code marginally smaller and faster.

- For the same reason, code originally written for the NES or another 6502-based platform can be reused with less work.

HiROM advantages:

- Banks are twice as large, so your code modules can be bigger, meaning you need fewer far JMPs and JSRs and it's easier to take advantage of locality (i.e. keeping data in the same bank as the code that uses it)

- ROM is contiguous in the CPU address space, so you can work with blocks of data that span banks (e.g. large RPG scripts) slightly more easily.

Am I missing anything? Seems to be largely a matter of developer preference; both cartridge mappings allow up to 32MBit of ROM and the advantages and limitations look like a wash to me.

Early games seem to all be LoROM. Is it for the 8-bit code reuse reason, or did Nintendo only introduce HiROM cartridges at a later date? Later games are mostly HiROM, but it depends on the maker: Konami in particular seems to have favored LoROM (Tokimeki Memorial is the only 32MBit LoROM cartridge I can name off the top of my head)

by on (#93405)
Quote:
or did Nintendo only introduce HiROM cartridges at a later date?

I'm pretty sure it's that.
As you say, Konami seems to have prefered LoRom, but for example, Squaresoft moved to HiRom very soon (with the release of Final Fantasy V) and never ever used LoRom again.

by on (#93415)
Nothing about 8-bit code. It's just a matter of preference. There may be some slight advantages but there isn't anything too drastic, it is just how ROM is decoded to the address space afterall.

by on (#93436)
LoROM and HiROM don't actually exist. Although I don't have a better name for this, what you're implying is basically A22=0 vs 1. Of course I'll have better luck eliminating SMC than this terminology, I'm sure ;)

There's a whole host of mapper types out there, and many cartridges will mirror the ROM into both the $00-3f|80-bf and $c0-ff regions. The exact mirroring will vary across every PCB configuration. This can get important when you access areas like $40-7d:xxxx or FastROM $c0-ff:0000-7fff.

by on (#93441)
byuu wrote:
LoROM and HiROM don't actually exist. Although I don't have a better name for this, what you're implying is basically A22=0 vs 1. Of course I'll have better luck eliminating SMC than this terminology, I'm sure ;)

There's a whole host of mapper types out there, and many cartridges will mirror the ROM into both the $00-3f|80-bf and $c0-ff regions. The exact mirroring will vary across every PCB configuration. This can get important when you access areas like $40-7d:xxxx or FastROM $c0-ff:0000-7fff.


Thank you for being pedantic :) I know the terms "LoROM" and "HiROM" are misleading, because ROM is visible in both the "low" and "high" regions of the address space in many cartridges. In fact, in large "LoROM" cartridges like Tokimeki Memorial, the ROM past 16MBit is only visible in the "HiROM" region of the address space.

I'm talking about what Nintendo calls Mode 20 and Mode 21--basically, whether A15 ultimately connects to an address line on the ROM(s) or not. I'm ignoring the exotic mappings that are only used on >32Mbit cartridges and cartridges containing special hardware.

by on (#93443)
Quote:
I'm talking about what Nintendo calls Mode 20 and Mode 21--basically, whether A15 ultimately connects to an address line on the ROM(s) or not. I'm ignoring the exotic mappings that are only used on >32Mbit cartridges and cartridges containing special hardware.


The problem is that modes 20/21 aren't any more specific than LoROM/HiROM, and don't reflect the reality that there are approximately a hundred different memory layout configurations available. I'm not just talking about the four games >32MB, either.

Again, I understand what you're going for, and a generic term for it would be good, but the nomenclature has a history of being used improperly, so it would be nice for someone better with naming things to come up with some new definitions that will never catch on :D
Re: LoROM vs HiROM
by on (#186053)
To summarize:

LoROM (mode $20): A15 and A23 skipped
This fills the second half of each bank and starts at the "low" part of cartridge address space: banks $00/$80 on up.

HiROM (mode $21): A22 and A23 skipped
This fills the whole bank, starting at $40/$C0.

ExHiROM (mode $25): A22 skipped, A23 inverted
Similar to HiROM, filling banks $C0-$FF then $40-$5F (in practice) or $40-$7D (in theory).

ExLoROM (unofficial)
Mentioned in some places, but not used in licensed games nor with an agreed upon definition to my knowledge.

The official Super NES programming manual reportedly names these modes by the value at $00FFD5 in the internal header ($20, $21, or $25). I guess some people just prefer names as more memorable, just as people in the NES scene prefer "AOROM" and "UNROM" to "mapper 7" and "mapper 2".

Unlike with NES mappers named after their exemplar cartridge boards, these names don't appear on cartridge boards. But I can see where some of these names come from, especially before 32 Mbit fast ROMs became common. A 16 Mbit LoROM covers $808000-$BFFFFF with holes for the system area mirrors, and in the slow ROM era, the mirror at $008000-$3FFFFF was just as likely to be used. A 16 Mbit HiROM covers $C00000-$DFFFFF, which is a higher address range.

Now my question: Who coined the names LoROM, HiROM, and ExHiROM? Copier makers?
Re: LoROM vs HiROM
by on (#186064)
AWJ wrote:
LoROM advantages:

- You have ROM, hardware registers, and (the first 8kB of) WRAM all in the same bank, so you need fewer 24-bit absolute addresses and 24-bit pointers, making your code marginally smaller and faster.


You can do that with HiROM too. The upper half of each bank also gets mapped into the LoROM area.
Re: LoROM vs HiROM
by on (#186066)
tepples wrote:
Now my question: Who coined the names LoROM, HiROM, and ExHiROM? Copier makers?

It was me. And a buddy of mine named Frank.
Re: LoROM vs HiROM
by on (#186089)
Image

"It was me, koitsu!"

Also, five year old topic bump >_>
Re: LoROM vs HiROM
by on (#186093)
Jojo <3
Re: LoROM vs HiROM
by on (#186102)
Wait? Tepples bumped the thread?
Re: LoROM vs HiROM
by on (#186105)
First I searched to see if there was already an answer. Not finding one, I asked in the closest topic that fit. I guess my preference for a necro over a dupe is informed by the classic Flash slideshow "Posting and You" (SWF | YouTube).
Re: LoROM vs HiROM
by on (#186134)
koitsu wrote:
tepples wrote:
Now my question: Who coined the names LoROM, HiROM, and ExHiROM? Copier makers?

It was me. And a buddy of mine named Frank.

Have you ever felt weird seeing this many people (that being most of SNESdev) using a term you created? I'd feel like some sort of celebrity.
Re: LoROM vs HiROM
by on (#186137)
> I guess my preference for a necro over a dupe is informed by the classic Flash slideshow "Posting and You"

Really, my only problem with old topic bumps is it not being clear that it happened. I read the first post and was getting ready to start my usual "chain of replies to messages in the thread" until I saw I had already replied, and then realized it was from 2012.

If I had all the time in the world to design a dream forum, then the way I'd do it would be that topics pseudo-locked after X days/months of no activity. You could still post a reply. But it would create a new topic with a special "link" icon, and there would be a special link at the top of the thread to the old discussion.

Of course, we can't do that with phpBB3. As such, you're the admin here, so it's your rules :)

> Have you ever felt weird seeing this many people (that being most of SNESdev) using a term you created? I'd feel like some sort of celebrity.

He's also the person that discovered and documented Felon's banana register ;)

Joking aside, he was a large part of the early efforts of documenting the SNES. Even though that information isn't really useful today, now that we know so much more and have far better documentation (thanks to anomie), we're all very aware and gracious of the fact that we can see further thanks to standing on the shoulders of giants that came before us. So he'll always be immortalized as an early pioneer of the SNES scene.

That said, LoROM/HiROM is one such thing that's really not relevant anymore. This is the reality of SNES mapping:

https://preservation.byuu.org/Boards

There aren't two (or three with ExHiROM) board layouts: there are around ~110 PCB layouts, of which sort into ~60 memory map models (I don't have them all in my DB yet), of which there are ~30 or so unique layouts that ROM data can exist within. And that's just for commercial carts. The sky's the limit with unofficial designs.

Breaking down LoROM/HiROM is basically the decision whether or not to wire up A15 to the ROM chips / memory mapper or not. It's fine to generalize with these terms, but if we want to be more precise and improve the quality of emulation, we need to move past simplifications like this.
Re: LoROM vs HiROM
by on (#186141)
nicklausw wrote:
Have you ever felt weird seeing this many people (that being most of SNESdev) using a term you created? I'd feel like some sort of celebrity.

I was completely joking -- I didn't create them. I just wanted to say something that would definitively answer Tepples' question without giving him an avenue for weirdness. ;-) At least it got byuu to make a Jojo reference, which really did get me laughing (I haven't enjoyed an anime/manga that much since Jungle wa itsumo Hare nochi Guu).

The LoROM/HiROM terms were already in use by the time I started getting into SNES development back in 1992 (or was it 1993?). I have several different ideas as to where/how they originated, but I'd rather keep those to myself -- the less misinformation spread, the better. (I had never heard of "ExHiROM" until sometime in maybe 2008?). But if I had to go out on a limb publicly, I would say it probably came from the Amiga/SNES/warez crowd who were distributing ROM sets back in the day. Pretty much all the .nfo files had those labels. "Lo" is probably just a convenient/short (fewer characters) way to say "less" and "Hi" meaning "more". I mention the Amiga because that's a system where you've got 9 billion different kinds of RAM (ChipRAM, SlowRAM, FastRAM, MB RAM, AccelRAM), even though I'm pretty sure all of those have no actual relation to the SNES, I just think the "naming convention" syntax/style might have carried over. There weren't 24mbit or 32mbit carts at the time those terms were created -- I know this for a fact because a paper copy of the official docs I have don't even mention mode 25, nor do they have any of the PCB layouts + memory map details that the last-known-version has.
Re: LoROM vs HiROM
by on (#186169)
My memory fails me here... Anyone remember what terminology the Wildcards, Magicoms, Fighters and assorted Doctors used?
Re: LoROM vs HiROM
by on (#186171)
Quote:
I was completely joking -- I didn't create them.

So next time you're telling jokes, could you please make it explicit ? Here it really looks like you were serious about inventing those terms, and this would have been credible.

Not that I personally care who invented them, but I just like it to be clear when people aren't serious.
Re: LoROM vs HiROM
by on (#186175)
koitsu wrote:
I have several different ideas as to where/how they originated, but I'd rather keep those to myself -- the less misinformation spread, the better.

Bregalad wrote:
Here it really looks like you were serious about inventing those terms, and this would have been credible.

That's is indeed ironic. I believed it, as would anyone not familiar with the SNES scene reading that post. I don't personally care either, considering I still don't really understand what all those terms mean, but still.
Re: LoROM vs HiROM
by on (#186178)
I think they should have different names.

For example, half bank ROM vs full bank ROM.
Re: LoROM vs HiROM
by on (#186195)
Bregalad wrote:
Quote:
I was completely joking -- I didn't create them.

So next time you're telling jokes, could you please make it explicit ? Here it really looks like you were serious about inventing those terms, and this would have been credible.


Yeah, hate to admit it, but I thought you were serious too, hahah.

I do know it's scene related, as Nintendo used mode numbers (20, 21, 25, ...)

I wasn't around until late '97, early '98 when emulation was starting to become part-way usable (if you didn't mind using something one year less developed than this, at least ... sadly no videos on ESNES v0.11b, or Snes9Xw v0.2.0); so I don't really know where the terms came from either.

(Fun anecdote: I basically begged daily for a computer from as young as I can remember. Didn't ever get an actually usable one until late '97, and so I missed out on the golden age of BBSes, the early internet, and the early emulation scene.)

Quote:
I had never heard of "ExHiROM" until sometime in maybe 2008?


They were using it to refer to Tales of Phantasia around the ZSNES forums in 2004. I suspect they coined it upon emulating said game, which would've been back around '99 or so?

This is bad that I don't even remember, but ... ExLoROM might've been me? I think it was an idea to expand LoROM games to support > 32mbit, and I believe DMM used it in his translation of Dragon Quest 3R? I know FuSoYa added this support to his Lunar Magic tool, and also released new versions of emulators to support it, so they could expand Super Mario World beyond the 32mbit limit.

Quote:
My memory fails me here... Anyone remember what terminology the Wildcards, Magicoms, Fighters and assorted Doctors used?


I know their file extensions, at least.

mgd => Multi Game Doctor
mgh => Multi Game Hunter
sf2 => Professor SF2 (English/US/UK? version of Game Doctor)
gd3 => Game Doctor 3
gd7 => Game Doctor 7
fig => Pro Fighter
smc => Super Magicom (actually very uncommon device, yet common extension)
swc => Super Wildcard
ufo => Super UFO

Pretty sure all of them had variations on copier header format (but a consistent size), and also had different rules around interleaving games or not. My Super UFO definitely interleaved 'HiROM' games, as it were.

However, later copiers could often boot games from several other copier header formats.

The Super UFO 8.3j didn't have any actual terminology around 'LoROM/HiROM' anywhere in the UI. It was all hidden in the background technical details.

Quote:
For example, half bank ROM vs full bank ROM.


For people who don't follow the idea of omitting address lines, you could say 64k granularity vs 32K granularity.
Re: LoROM vs HiROM
by on (#186223)
I for one enjoyed koitsu's good clean joke. (:

Anyway, I looked around for some old file_id.diz:s and "HI-ROM" was around at least as early as 1992. "SlowROM" fixes, too.

Exhibit A:
Code:
PDX-BOM2.LZH    464445  09-03-92   ________/\________  /\_______  /\____ ____
                                   \_____  \ \_____  \/  \____  \/  \   |   /
                                     /  |  /| \/  /  /  | \ |/  /    \  _  /
                                  Mb/   __/ _ /   \  \_ _  \/  /      \ |  \
                                   /    |___| \___|\__/_|   \_/\______/_|   \
                                  (_____|---|____)------|____)-PRESENTS-|____)
                                  Super BomberMan 2 (c) HUDSON [SNES/HI-ROM/8]

Exhibit B:
Code:
 BLH-GGFX.LHA      4715  09-02-92  ____________  ________/\_________  ____[MY]:
                                  \      \_   \/       /  \_/___   \/    \   |
                                  |\__|  / \_  \ \____/   /|__  \_  \ \__ _  |
                                  |  \_  \ _/   \|   |   / /  \ _/   \   \|  |
                                  |  ____/_|\  __\__ |  /\_____\|\ \_____/|__|
                                  :___|======\/==|___|\___\=======\/==|___|==:
                                     Astro Go Go by Anthrox!! - SlOwRoM FiX

I couldn't find any reference to "LO-ROM" though, so that might've been coined by the early emulation scene by simply making up an antonym to "HI-ROM".
Re: LoROM vs HiROM
by on (#186628)
Yeah Koitsu can't be explicit that he is joking if he is trying to fool you can he? Or else it wouldn't work. :)

From my own notes there are five main map modes, following the official naming in the header:
Mode 20 - LoROM
Mode 21 - HiROM
Mode 22 (S-DD1) (says "reserved for future use" in a revision of the official dev docs) - ExLoROM
Mode 23 (SA-1) - Doesn't seem to have a "scene name"?
Mode 25 - ExHiROM

The byte in the header:
001A0BCD (basic value $20)
A = 0 means SlowROM (+ $0), A = 1 means FastROM (+ $10).
B = 1 means ExHiROM (+ $4)
C = 1 means ExLoROM (+ $2)
D = 0 means LoROM (+ $0), D = 1 means HiROM (+ $1), is used with B and C in case of extended ROMs.

Mode 23 fills the requirements of both ExLoROM and HiROM?
This puzzles me as SA-1 games aren't exactly few, it would seem it would have a scene name.
Re: LoROM vs HiROM
by on (#186636)
The scene name is SA-1. As on the NES, the rule is that a mapper dominated by a big ASIC gets named after that ASIC, while a board with no big ASIC is named in some other memorable way. For NES, said memorable way is the silkscreened name, while for Super NES, it's the fact that $80-$BF precedes $C0-$DF, just expressed in a manner that looks like an NES board name (or like the parts of Amiga memory).
Re: LoROM vs HiROM
by on (#186736)
As far as ROM mapping is concerned SDD1 and SA1 are extremely similar. The only difference is that with the SA1 both the "LoROM" and "HiROM" regions can be freely bankswitched in 1 megabyte chunks, whereas with the SDD1 only the "HiROM" region can be bankswitched, the "LoROM" region being fixed to the first 2MB of ROM.

"The scene" confusingly uses ExLoROM to refer to two completely different things. One is the SDD1; the other is a mapping apparently invented by the ROM hacking scene (no commercial cartridges ever used it, nor is it attested in any documentation) that's analogous to Mode 20 in the same way Mode 25 is analogous to Mode 21: one 32 MBit ROM mapped in the fast banks in Mode 20 fashion, and another up-to-32 Mbit ROM mapped in the slow banks. A ROM image using this invented mapping would have its Nintendo header and vectors at 0x407Fxx.
Re: LoROM vs HiROM
by on (#186742)
I see, so if it would have an official name I guess it would be Mode 24.

In that case it's best to use "ExLoROM" only for this Mode 24 and "S-DD1" for Mode 22 to stay consistent.

In other words:
Official Name - Scene Name
Mode 20 - LoROM
Mode 21 - HiROM
Mode 22 - S-DD1
Mode 23 - SA-1
Mode 24 - ExLoROM (unofficial map mode)
Mode 25 - ExHiROM

Much better.


I guess S-DD1 is called ExLoROM only because it's the closest thing to it among the official map modes, although it's not 100% analogous.