Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow .gbs code to switch to more ROM banks #63

Closed
jkotlinski opened this issue Feb 6, 2021 · 8 comments
Closed

Allow .gbs code to switch to more ROM banks #63

jkotlinski opened this issue Feb 6, 2021 · 8 comments

Comments

@jkotlinski
Copy link

jkotlinski commented Feb 6, 2021

As a non-standard extension, it would be great if .gbs playback would support MBC5 bank switching, to allow for more than 256 ROM banks. What needs to be done then is to make sure that writes to $3000-$3FFFF control the high bit of the ROM bank number. This might be needed to fix jkotlinski/lsdpack#4 for the case where final ROM has more than 256 banks.

@jkotlinski
Copy link
Author

jkotlinski commented Feb 6, 2021

I'm closing this now, on further consideration, .gbs format does not seem suitable for what I intend to do.

@cyberic99
Copy link

@jkotlinski can you please develop a bit further why it does not seem suitable ?
Having a compact .gbs lsdj "player" would be really interesting!

@jkotlinski
Copy link
Author

jkotlinski commented Feb 6, 2021

Hey, sorry for sending confused and conflicting messages.

I messed around with things and I think actually I got lsdpack LSDj to .gbs conversion working today! Hooray!

Regarding the current ROM bank mapping situation... The v1.02 .gbs format specification makes it fairly clear that MBC5 bank switching is not supported:
"A page is selected into Bank 1 by writing the page number as a byte value somewhere in the address range $2000-$3fff."
So I think it would be impossible to add MBC5 support while conforming to the (presumably dead) .gbs format.

I'm still concerned about lack of space, and I wonder if gbsplayer could make more ROM banks available. Specifically, it looks like it only allows switching to banks 0-31. Why not 0-255?

@jkotlinski jkotlinski reopened this Feb 6, 2021
@jkotlinski jkotlinski changed the title .gbs MBC5 support Allow .gbs code to switch to more ROM banks Feb 6, 2021
@cyberic99
Copy link

I got lsdpack LSDj to .gbs conversion working today! Hooray!
That is huge!

I'll try to test it in a few days, and try to play the resulting .gbs files on several players

At least:

@jkotlinski
Copy link
Author

I don't have any particular players in mind. I gave it some light testing on Foobar2000

@ranma
Copy link
Collaborator

ranma commented Feb 9, 2021

I'm still concerned about lack of space, and I wonder if gbsplayer could make more ROM banks available. Specifically, it looks like it only allows switching to banks 0-31. Why not 0-255?

IIRC I was assuming at the time that GBS is supposed to be close to MBC1, which is where the 32 banks limit came from at the time. I think I should fix that and allow 0-255 there.

@jkotlinski
Copy link
Author

Cool!
I realize now that 0-31 is already pretty much (half a megabyte), but supporting 0-255 seems like it possibly can't do any harm.

ranma added a commit that referenced this issue Feb 15, 2021
gbsspec doesn't say anything about limiting the selected bank to the
MBC1 range:
> A page is selected into Bank 1 by writing the page number as a byte
> value somewhere in the address range $2000-$3fff. A small ROM (32K)
> has Page 1 permanently loaded into Bank 1, no switching needed.  Some
> cartridge memory controllers allow the selection of Page 0; which
> doesn't seem very useful, but it's possible.

See discussion on #63
@ranma
Copy link
Collaborator

ranma commented Jan 10, 2022

Closing this issue since the GBS mapper now supports all 256 banks.

@ranma ranma closed this as completed Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants