From a8530cbdc3baf3c415b3b7e96320b8d5d7f80e19 Mon Sep 17 00:00:00 2001 From: goyuken Date: Sat, 5 Jul 2014 05:58:00 +0000 Subject: [PATCH] genesis: actually get r872 from upstream (forgot it in prev commit) --- genplus-gx/core/cart_hw/md_cart.c | 24 ++++++++++++++++-------- output/dll/libgenplusgx.dll | Bin 1915904 -> 1915904 bytes 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/genplus-gx/core/cart_hw/md_cart.c b/genplus-gx/core/cart_hw/md_cart.c index c7ddf5850e..1db7c99574 100644 --- a/genplus-gx/core/cart_hw/md_cart.c +++ b/genplus-gx/core/cart_hw/md_cart.c @@ -292,14 +292,6 @@ void md_cart_init(void) while (cart.romsize > size) size <<= 1; - /* total ROM size is not a factor of 2 */ - /* TODO: handle all possible ROM configurations using cartridge database */ - if ((size < MAXROMSIZE) && (cart.romsize < size)) - { - /* ROM is padded up to 2^k bytes */ - memset(cart.rom + cart.romsize, 0xff, size - cart.romsize); - } - /* Sonic & Knuckles */ if (strstr(rominfo.international,"SONIC & KNUCKLES")) { @@ -307,6 +299,22 @@ void md_cart_init(void) size = 0x400000; } + /* total ROM size is not a factor of 2 */ + /* TODO: handle all possible ROM configurations using cartridge database */ + if (cart.romsize < size) + { + if (size < MAXROMSIZE) + { + /* ROM is padded up to 2^k bytes */ + memset(cart.rom + cart.romsize, 0xff, size - cart.romsize); + } + else + { + /* ROM is padded up to max ROM size */ + memset(cart.rom + cart.romsize, 0xff, MAXROMSIZE - cart.romsize); + } + } + /* ROM is mirrored each 2^k bytes */ cart.mask = size - 1; diff --git a/output/dll/libgenplusgx.dll b/output/dll/libgenplusgx.dll index 58c8129f559a640b73211f61962c26bf51c4cf22..51593f25e401b001114dbcf42d1cbb1b98e6cbbe 100644 GIT binary patch delta 350 zcmZqpQPS|EWWoog{;3l``7up#-0Z~Y#>m7FxVej|%|LwN6VA^9!D0It7#JDCt&f$l zF@Li@R{m>pjIoR_SkC%bv0Cqh2b{qI-RBzrF)%D(C}Q0SqO?y0X8dPhUj>Iw*z4LG+q>BN*_Yeb**DvF*w3`zV87jdxBU_O)AkqauiD?Te`^2L{72`RKs~OK_Jdbe=<66e^_jtj_Fg^;T zTO?G7icm44NQd;O1eGE~EZrin%u@ROIbyZ$H0|a&tnTpLR&3)&Hmb$mzS!Qqte9&m zp$+