(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
04-29-24 11:43 AM
0 users currently in ROM Hacking.
Acmlm's Board - I3 Archive - ROM Hacking - ROM Memory banks New poll | |
Add to favorites | Next newer thread | Next older thread
User Post
Rom Manic









Since: 12-18-05
From: Detroit, WHAT?!

Last post: 6279 days
Last view: 6279 days
Posted on 12-25-06 06:07 AM Link | Quote
Is it possible to set up a ROM so that it can have ANY size data bank? As I understand it, HiRom has 64 KB banks, and LoRom has 32 KB banks (In relation to the SNES).

I ask this because it may be a more efficient way of storing data within a ROM, as pertaining to addressing data. Of course, I may misunderstand the concept completely, but if it is possible, I might be able to utilize this.
Sukasa

Birdo
Not quite as active as before.
Xkeeper supporter
Xk > ||bass
I IP Banned myself! Twice!








Since: 11-17-05
From: Somewhere over there

Last post: 6280 days
Last view: 6279 days
Posted on 12-25-06 06:09 AM Link | Quote
No. The limit is imposed by the 65c816 and SNES memory mapper itself, so you can't change it. You'll need to work with either of those two limits.
Rom Manic









Since: 12-18-05
From: Detroit, WHAT?!

Last post: 6279 days
Last view: 6279 days
Posted on 12-25-06 06:20 AM Link | Quote
I suppose it's not really a big issue, but IF it were possible, would it increase or decrease the performance of a ROM? Like, is LoRom better than HiRom or is the opposite true or neither?
HyperHacker

Star Mario
Finally being paid to code in VB! If only I still enjoyed that. <_<
Wii #7182 6487 4198 1828


 





Since: 11-18-05
From: Canada, w00t!
My computer's specs, if anyone gives a damn.
STOP TRUNCATING THIS >8^(

Last post: 6280 days
Last view: 6280 days
Posted on 12-25-06 06:58 AM Link | Quote
HiROM is more efficient, since LoROM has 32K of unuseable blank space after every 32K of data. HiROM also means you can have smaller code and tables by using 2-byte pointers more often.
Kejardon

Shyguy








Since: 05-21-06

Last post: 6280 days
Last view: 6279 days
Posted on 12-25-06 09:09 AM Link | Quote
On the other hand, LoRom allows you to write to $2000 bytes of RAM and the cpu registers at any time with a 2 byte address. Meaning you can use 2-byte addresses more often.

I personally think LoRom is better - code interacting with the RAM and cpu registers is more common than code that would be optimized by having more than $8000 bytes in a bank.
Gideon Zhi

Keese








Since: 12-05-05
From: ...behind you! Boo!

Last post: 6282 days
Last view: 6279 days
Posted on 12-25-06 07:32 PM Link | Quote
Originally posted by Alice
HiROM is more efficient, since LoROM has 32K of unuseable blank space after every 32K of data. HiROM also means you can have smaller code and tables by using 2-byte pointers more often.


What the hell? This information is completely incorrect. Please don't shoot your mouth off on subjects you obviously know nothing about.

LoROM databanks are 32K, yes. They are stored consecutively, just like any normal file. There are no empty banks or anything similar between each LoROM bank unless the programmers were stupid and made the game that way; rather, the lower 32K of address space is wired to various registers and a bunch of the first 32K of WRAM ( the $7E/0000-$7E/7FFF range, specifically.)

HiROM databanks are 64K. The only functional differences between LoROM and HiROM are that 1) you can fit more data into a HiROM bank, which doesn't necessarily mean you'll be able to "use 2-byte pointers more often" because you could just as well have a small table of 24-bitters pointing to different tables of 16-bitters in different rom banks, and 2) you can't access ram by loading or storing from addresses below $8000 - you actually need to modify the DBR or do indirect loads if you want to get at ramspace.

Both have their advantages and disadvantages, and I personally can work with either; the only reason I prefer to work with HiROM titles is that it's slightly easier to convert back and forth between SNES HiROM and a file address than it is with LoROM.
MathOnNapkins

1100

In SPC700 HELL


 





Since: 11-18-05

Last post: 6279 days
Last view: 6279 days
Posted on 12-26-06 03:16 AM Link | Quote
Well... theoretically HiRom would allow for much more data if you could fill all the banks (minus the WRAM and SRAM banks probably) While this thread addresses existing memory maps fairly well, Rom Manic brings up an interesting point... is it possible to reprogram the system to make a different memory map? Obviously banks would still be 64K from the processor's perspective, but being able to have a memory map that allows for almost a full 16 MB (126.5 megabits exactly) of data sounds nice.
Gideon Zhi

Keese








Since: 12-05-05
From: ...behind you! Boo!

Last post: 6282 days
Last view: 6279 days
Posted on 12-26-06 03:50 AM Link | Quote
It would be nice, certainly. It's probably theoretically possible, too.

There are actually ways to "trick" data load routines into ignoring bank boundaries. I used one of these in Shin Megami Tensei II's translation; when the text load counter overflows the edge of a bank, it just increments the bank number and starts at the "next" byte. Works wonderfully, and I was able to insert the script sequentially without regard for bank boundaries. You have to specifically program for this, though.

Also, far as I'm aware, you can access a full 32mbit with lorom addressing provided your origin address is in bank $80. Further, in SA-1 mapping (unconfirmed - certainly the case in SRW Gaiden) you can access both hirom and lorom space. Threw me for a bit of a loop when I first encountered it.
HyperHacker

Star Mario
Finally being paid to code in VB! If only I still enjoyed that. <_<
Wii #7182 6487 4198 1828


 





Since: 11-18-05
From: Canada, w00t!
My computer's specs, if anyone gives a damn.
STOP TRUNCATING THIS >8^(

Last post: 6280 days
Last view: 6280 days
Posted on 12-26-06 04:38 PM Link | Quote
Originally posted by Gideon Zhi
Originally posted by Alice
HiROM is more efficient, since LoROM has 32K of unuseable blank space after every 32K of data. HiROM also means you can have smaller code and tables by using 2-byte pointers more often.


What the hell? This information is completely incorrect. Please don't shoot your mouth off on subjects you obviously know nothing about.


For once I'd like to see someone on this board make a mistake and not be ridiculed for it. FYI, the info came from this oooooold document I read back in 2K3 or so.
Originally posted by ASM Hacking for Dummies - v1.0 by SysTEm[id
]5.1 LoRom Address Equation

You have seen twice now in this doc notations about LoRom address. LoRom
games have 32k hunks of empty bits between pages, so when you hack a LoRom
address, you need to account for that.


Also, with double bank size you're twice as likely to fit all of a given data block in one bank, negating the need for three-byte pointers. Hence the "use 2-byte pointers more often" idea.


(edited by Alice on 12-26-06 10:40 AM)
(edited by Alice on 12-26-06 10:42 AM)
Rom Manic









Since: 12-18-05
From: Detroit, WHAT?!

Last post: 6279 days
Last view: 6279 days
Posted on 12-26-06 11:12 PM Link | Quote
Originally posted by Gideon Zhi
There are no empty banks or anything similar between each LoROM bank unless the programmers were stupid and made the game that way; rather, the lower 32K of address space is wired to various registers and a bunch of the first 32K of WRAM ( the $7E/0000-$7E/7FFF range, specifically.)


I understand the first part of what you said, but I don't know what you mean by "wired to" the registers and most of the preliminary 32k of WRAM.

Originally posted by Gideon Zhi
There are actually ways to "trick" data load routines into ignoring bank boundaries. I used one of these in Shin Megami Tensei II's translation; when the text load counter overflows the edge of a bank, it just increments the bank number and starts at the "next" byte. Works wonderfully, and I was able to insert the script sequentially without regard for bank boundaries. You have to specifically program for this, though.


If it's possible, I'd very much like to discuss this with you. As always, I'm on #rohmacking, but I might not be there for the next little while, so anytime during the weekend should be fine.

Originally posted by Alice
For once I'd like to see someone on this board make a mistake and not be ridiculed for it.


It would be nice, but it was an honest mistake
Add to favorites | Next newer thread | Next older thread
Acmlm's Board - I3 Archive - ROM Hacking - ROM Memory banks |


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.017 seconds; used 398.37 kB (max 494.01 kB)