mmitch / gbsplay

gameboy sound player
https://mmitch.github.io/gbsplay/
Other
98 stars 20 forks source link

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

Closed jkotlinski closed 2 years ago

jkotlinski commented 3 years ago

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 https://github.com/jkotlinski/lsdpack/issues/4 for the case where final ROM has more than 256 banks.

jkotlinski commented 3 years ago

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

cyberic99 commented 3 years ago

@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 commented 3 years ago

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?

cyberic99 commented 3 years ago

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 commented 3 years ago

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

ranma commented 3 years ago

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 commented 3 years ago

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 commented 2 years ago

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