PVSnesLib Error

A place where you can keep others updated about your SNES-related projects through screenshots, videos or information in general.

Moderator: Moderators

Post Reply
pscd
Posts: 12
Joined: Fri Jun 17, 2022 3:07 am

PVSnesLib Error

Post by pscd »

When compiling ROM I encountered the following error:

Code: Select all

DISCARD: heroes.obj: heroes.asm: Section "BTxTQspxDZ.data" was discarded.
Levels.obj: Levels.asm: INSERT_SECTIONS: No room for section ".rodata" (56012 bytes) in ROM bank 0.
make: *** [/e/pvsneslib/devkitsnes/snes_rules:118: Mode1ContinuousScroll.sfc] Error 1
How to solve this problem, maybe you can somehow increase the size of the bank or ram?
pscd
Posts: 12
Joined: Fri Jun 17, 2022 3:07 am

Re: PVSnesLib Error

Post by pscd »

I think that in the hdr.asm file, you can change the bank size

Code: Select all

.ROMBANKSIZE $8000              ; Every ROM bank is 32 KBytes in size
.ROMBANKS 8                     ; 2 Mbits - Tell WLA we want to use 8 ROM Banks
But if you change it, for example like this

Code: Select all

.ROMBANKSIZE $10000              ; Every ROM bank is 32 KBytes in size
.ROMBANKS 8                     ; 2 Mbits - Tell WLA we want to use 8 ROM Banks
then the compiler gives an error

Code: Select all

Doing obj files ...
Building with -x flag: /e/pvsneslib/devkitsnes/bin/wla-65816 -s -x -o hdr.obj hdr.asm
/e/pvsneslib/devkitsnes/bin/wla-65816 -d -s -x -o hdr.obj hdr.asm
Creating linkfile ...
Linking ... Mode1ContinuousScroll.sfc
/e/pvsneslib/devkitsnes/bin/wlalink -d -s -v -A -c -L /e/pvsneslib/pvsneslib/lib linkfile Mode1ContinuousScroll.sfc
OBTAIN_ROMBANKMAP: ROMBANKMAPs don't match.
make: *** [/e/pvsneslib/devkitsnes/snes_rules:118: Mode1ContinuousScroll.sfc] Error 1
Who can tell me how to correctly change the bank size in the header?
User avatar
segaloco
Posts: 107
Joined: Fri Aug 25, 2023 11:56 am
Contact:

Re: PVSnesLib Error

Post by segaloco »

Relative SNES luddite here but can you just double the size of a physical bank like that? Wouldn't you have to split 64k into two 32k banks? Some reading on the mapping systems indicates HiROM mapping exposes 64k, but is it really as trivial as just defining it in a different size? It sounds like there may be something somewhere still expecting 32k banks that isn't being told you're using 64k banks instead. If I was having this problem I'd start looking into what all is involved in changing the bank size/mapping mode when compiling, as I suspect it isn't as trivial as changing a single definition. Good luck!
User avatar
Memblers
Site Admin
Posts: 4035
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Re: PVSnesLib Error

Post by Memblers »

Unfortunately, PVSnesLib FAQ says no, only LoROM is supported for now.
https://github.com/alekmaul/pvsneslib/w ... h-the-lib-

What you may need to do is spread your data across multiple banks. That's what I did when I made my SNES NSF player, lots and lots and LOTS of that, sorted by hand to fill every possible gap until I filled up 4MB (at least it was HiROM, 64kB banks). If I'd known better at the time, I might have made a tool to automate it.

I'm assuming "levels.asm" has several sections of data that have their own labels. So, I'd recommend splitting it into level00.asm, level01.asm, etc. (or insert bank commands into levels.asm, whatever is easier, I'm not really familiar with this toolchain). If your code absolutely needs it to be in one bank, and if load time is acceptable, you could split it, then copy each section into RAM at run-time, as needed.
Post Reply