mirror of
https://github.com/libretro/Genesis-Plus-GX.git
synced 2024-11-28 02:50:22 +00:00
[SMS] fixed number of pages for ROM sizes which are not a factor of page size
This commit is contained in:
parent
c294796fdc
commit
d042eebd83
@ -427,17 +427,17 @@ void sms_cart_init(void)
|
||||
if (cart_rom.mapper < MAPPER_SEGA)
|
||||
{
|
||||
/* 1k ROM banks */
|
||||
cart_rom.pages = cart.romsize >> 10;
|
||||
cart_rom.pages = (cart.romsize + (1 << 10) - 1) >> 10;
|
||||
}
|
||||
else if (cart_rom.mapper & MAPPER_KOREA_8K)
|
||||
{
|
||||
/* 8k ROM banks */
|
||||
cart_rom.pages = cart.romsize >> 13;
|
||||
cart_rom.pages = (cart.romsize + (1 << 13) - 1) >> 13;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 16k ROM banks */
|
||||
cart_rom.pages = cart.romsize >> 14;
|
||||
cart_rom.pages = (cart.romsize + (1 << 14) - 1) >> 14;
|
||||
}
|
||||
|
||||
/* initialize extra hardware */
|
||||
|
Loading…
Reference in New Issue
Block a user