1
0
Fork 0
forked from len0rd/rockbox

Update libgme to Blargg's Game_Music_Emu 0.6-pre.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30397 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Andree Buschmann 2011-08-31 19:19:49 +00:00
parent d089e10403
commit 13cbade08a
68 changed files with 4113 additions and 4893 deletions

View file

@ -21,7 +21,7 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
blargg_err_t Rom_load( struct Rom_Data* this, const void* data, long size,
int header_size, void* header_out, int fill )
{
long file_offset = this->pad_size;
int file_offset = this->pad_size;
this->rom_addr = 0;
this->mask = 0;
@ -43,11 +43,11 @@ blargg_err_t Rom_load( struct Rom_Data* this, const void* data, long size,
return 0;
}
void Rom_set_addr( struct Rom_Data* this, long addr )
void Rom_set_addr( struct Rom_Data* this, int addr )
{
this->rom_addr = addr - this->bank_size - pad_extra;
long rounded = (addr + this->file_size + this->bank_size - 1) / this->bank_size * this->bank_size;
int rounded = (addr + this->file_size + this->bank_size - 1) / this->bank_size * this->bank_size;
if ( rounded <= 0 )
{
rounded = 0;
@ -55,7 +55,7 @@ void Rom_set_addr( struct Rom_Data* this, long addr )
else
{
int shift = 0;
unsigned long max_addr = (unsigned long) (rounded - 1);
unsigned int max_addr = (unsigned int) (rounded - 1);
while ( max_addr >> shift )
shift++;
this->mask = (1L << shift) - 1;