It is currently Tue Oct 17, 2017 5:25 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sun Jan 03, 2010 3:47 am 
Offline
User avatar

Joined: Sat Oct 29, 2005 2:09 am
Posts: 500
Location: Indianapolis
I've been working on an FPGA .GBS player, and have it working pretty decently, but I have come across a bunch of things in .GBS files that cannot be right.

I cannot seem to find a newer version of the spec, and on the entire internet, there appears to only be exactly 1 copy of the .GBS spec present, which is version 1.01 from 1/28/2001.

Where is everyone getting their info to write .GBS players?

I ran into a few bad problems that I don't know how to solve, because I cannot find documentation... Ferinstance, the .GBS for Felix the Cat does a bankswitch and tries to switch to bank 7, when the ROM only has 2 banks (0 and 1). What do you do in this case when a .GBS file tries to switch to a non-existant bank?

Obviously there's a "desired" method of emulating this because it plays on the .GBS players. The only thing I can think of that makes sense is to AND mask the bank register with the highest power of 2, i.e. in this case ANDing with 001h because it only has 2 banks. This would result in the tune working.

Another odd one is Motorcross Maniacs 2. An older version of the .GBS plays at the proper rate, but a newer version does not- it plays at around 1/2 the proper rate.

Checking with a PC GBS player, the old one plays back 2x faster than it should, while the new one plays at the proper rate. It appears that the function of the timer register at FF07h has been changed somehow. Like if bit 7 is set it runs at 2x normal speed?

Thanx for any help :-)

_________________
/* this is a comment */


Top
 Profile  
 
PostPosted: Sun Jan 03, 2010 7:48 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19091
Location: NE Indiana, USA (NTSC)
kevtris wrote:
Obviously there's a "desired" method of emulating this because it plays on the .GBS players. The only thing I can think of that makes sense is to AND mask the bank register with the highest power of 2, i.e. in this case ANDing with 001h because it only has 2 banks. This would result in the tune working.

And if the number of banks isn't a power of two, repeat the last bank up to the nearest power of two. In fact, if we were to standardize handling of odd-size ROMs in an update to the .nes format, I'd recommend this exact algorithm.

Quote:
Another odd one is Motorcross Maniacs 2. An older version of the .GBS plays at the proper rate, but a newer version does not- it plays at around 1/2 the proper rate.

MM2 is GBC exclusive; that might have something to do with it.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 03, 2010 6:18 pm 
Offline

Joined: Sat Oct 29, 2005 12:03 am
Posts: 338
I have a modified 1.02, updated 07/15/01, prior to my modifications for Timer+VBlank.

Grab GBS2GB, and check the source folder for !gbsspec.txt

http://www.angelfire.com/nc/ugetab/

Also, the 2x speed thing is mentioned in the new doc(the 1.02 update). Basically, the Gameboy Color emulates instructions at twice the speed of the original Gameboy. This makes the sound a little sharper, even if you halve the execution speed of the play routine to account for the doubled execution rate. There's some sort of work-around coded in the .GB player for regular gameboy systems.

There's a register that's not accounted for in the docs that you should emulate for 2x speed detection: FF4D= 7E(1x GBC Speed)/FE(2x GBC Speed) (FF used for Original Gameboy, but this doesn't need to be an option)

_________________
NSFs I've ripped:
http://www.angelfire.com/nc/ugetab/

A Searchable list of NSFs from other sites. In Internet Explorer, go to Edit>Find (on This Page)...
http://www.angelfire.com/nc/ugetab/NSFList.txt


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 03, 2010 7:05 pm 
Offline
User avatar

Joined: Sat Oct 29, 2005 2:09 am
Posts: 500
Location: Indianapolis
Thanks for the infos, I got more .gbs tunes playing now. Just have to figure out the last few bugs and it should be good to go I hope. Then it's onto the sound hardware bugs :-)

_________________
/* this is a comment */


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group