diff --git a/HISTORY.txt b/HISTORY.txt index 9cea7fbd..e3a085bb 100644 --- a/HISTORY.txt +++ b/HISTORY.txt @@ -56,10 +56,12 @@ Genesis Plus GX 1.7.5 (xx/xx/xxxx) (Eke-Eke) * added support for Everdrive extended SSF mapper * added (very basic) emulation of Flashkit MD hardware * added emulation of Micro Machines USA on-board TMSS bypass logic hardware +* added SRAM support for games larger than 8MB * improved console region auto-detection for a few PAL-only games (The Smurfs Travel the World & Williams Arcade's Greatest Hits) * improved I2C EEPROM boards emulation accuracy * improved SVP memory handlers accuracy (fixes Virtua Racing debug mode) * fixed Game Genie / Pro Action Replay lock-on support when Mega CD hardware is enabled +* fixed Game Genie / Pro Action Replay lock-on support with games larger than 8MB * fixed SRAM support in Triple Play 96 & Triple Play - Gold Edition * fixed automatic CD loading with .md ROM files * fixed ROM padding for Sonic & Knuckles @@ -187,6 +189,7 @@ Genesis Plus GX 1.7.5 (xx/xx/xxxx) (Eke-Eke) * added configurable Wiimote timeout * added game auto-load support through DOL args (compatible with "Wiiflow" plugin arguments) * fixed support for 3rd-party classic controllers with invalid calibration settings +* increased maximal ROM size to 15MB [GCW0] --------------- diff --git a/Makefile.libretro b/Makefile.libretro index 6a4ce16f..f92b1f55 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -87,7 +87,7 @@ ifneq (,$(findstring unix,$(platform))) fpic := -fPIC SHARED := -shared -Wl,--version-script=$(CORE_DIR)/libretro/link.T -Wl,--no-undefined ENDIANNESS_DEFINES := -DLSB_FIRST -DBYTE_ORDER=LITTLE_ENDIAN - PLATFORM_DEFINES := -DHAVE_ZLIB + PLATFORM_DEFINES := -DHAVE_ZLIB -DMAXROMSIZE=33554432 ifneq ($(findstring Linux,$(shell uname -s)),) HAVE_CDROM = 1 @@ -213,7 +213,7 @@ ifeq ($(arch),ppc) else ENDIANNESS_DEFINES := -DLSB_FIRST -DBYTE_ORDER=LITTLE_ENDIAN endif - PLATFORM_DEFINES := -DHAVE_ZLIB + PLATFORM_DEFINES := -DHAVE_ZLIB -DMAXROMSIZE=33554432 OSXVER = `sw_vers -productVersion | cut -d. -f 2` OSX_LT_MAVERICKS = `(( $(OSXVER) <= 9)) && echo "YES"` @@ -241,7 +241,7 @@ else ifneq (,$(findstring ios,$(platform))) fpic := -fPIC SHARED := -dynamiclib ENDIANNESS_DEFINES := -DLSB_FIRST -DBYTE_ORDER=LITTLE_ENDIAN - PLATFORM_DEFINES := -DHAVE_ZLIB + PLATFORM_DEFINES := -DHAVE_ZLIB -DMAXROMSIZE=16777216 MINVERSION := ifeq ($(IOSSDK),) @@ -713,7 +713,7 @@ else CXX ?= g++ SHARED := -shared -static-libgcc -static-libstdc++ -Wl,--version-script=$(CORE_DIR)/libretro/link.T -Wl,--no-undefined ENDIANNESS_DEFINES := -DLSB_FIRST -DBYTE_ORDER=LITTLE_ENDIAN - PLATFORM_DEFINES := -DHAVE_ZLIB + PLATFORM_DEFINES := -DHAVE_ZLIB -DMAXROMSIZE=33554432 HAVE_CDROM = 1 endif diff --git a/Makefile.wii b/Makefile.wii index 731ae7ec..66af42fe 100644 --- a/Makefile.wii +++ b/Makefile.wii @@ -30,7 +30,7 @@ INCLUDES := core core/m68k core/z80 core/sound core/tremor core/ntsc core/input_ # options for code generation #--------------------------------------------------------------------------------- -CFLAGS = -O3 -fomit-frame-pointer -Wall -Wno-strict-aliasing $(MACHDEP) $(INCLUDE) -DUSE_LIBTREMOR -DUSE_LIBCHDR -DUSE_16BPP_RENDERING -DALT_RENDERER -DBLIP_INVERT -DHW_RVL -DCPU_IS_BIG_ENDIAN=1 -DWORDS_BIGENDIAN=1 -DPACKAGE_VERSION=\"1.3.2\" -DFLAC_API_EXPORTS -DFLAC__HAS_OGG=0 -DHAVE_LROUND -DHAVE_STDINT_H -DHAVE_SYS_PARAM_H -D_7ZIP_ST +CFLAGS = -O3 -fomit-frame-pointer -Wall -Wno-strict-aliasing $(MACHDEP) $(INCLUDE) -DMAXROMSIZE=15728640 -DUSE_LIBTREMOR -DUSE_LIBCHDR -DUSE_16BPP_RENDERING -DALT_RENDERER -DBLIP_INVERT -DHW_RVL -DCPU_IS_BIG_ENDIAN=1 -DWORDS_BIGENDIAN=1 -DPACKAGE_VERSION=\"1.3.2\" -DFLAC_API_EXPORTS -DFLAC__HAS_OGG=0 -DHAVE_LROUND -DHAVE_STDINT_H -DHAVE_SYS_PARAM_H -D_7ZIP_ST CXXFLAGS = $(CFLAGS) LDFLAGS = $(MACHDEP) -Wl,-Map,$(notdir $@).map diff --git a/builds/genesis_plus_gx_libretro.dll b/builds/genesis_plus_gx_libretro.dll index 17de76e3..9e5ed3a1 100644 Binary files a/builds/genesis_plus_gx_libretro.dll and b/builds/genesis_plus_gx_libretro.dll differ diff --git a/core/cart_hw/areplay.c b/core/cart_hw/areplay.c index 73b16a40..0113045d 100644 --- a/core/cart_hw/areplay.c +++ b/core/cart_hw/areplay.c @@ -1,8 +1,8 @@ /**************************************************************************** * Genesis Plus - * Action Replay / Pro Action Replay emulation + * Action Replay / Pro Action Replay hardware support * - * Copyright (C) 2009-2014 Eke-Eke (Genesis Plus GX) + * Copyright (C) 2009-2021 Eke-Eke (Genesis Plus GX) * * Redistribution and use of this code or any derivative works are permitted * provided that the following conditions are met: @@ -45,8 +45,7 @@ static struct { uint8 enabled; uint8 status; - uint8 *rom; - uint8 *ram; + uint8 ram[0x10000]; uint16 regs[13]; uint16 old[4]; uint16 data[4]; @@ -54,64 +53,52 @@ static struct } action_replay; static void ar_write_regs(uint32 address, uint32 data); -static void ar_write_regs_2(uint32 address, uint32 data); +static void ar2_write_reg(uint32 address, uint32 data); static void ar_write_ram_8(uint32 address, uint32 data); void areplay_init(void) { - int size; - - memset(&action_replay,0,sizeof(action_replay)); + action_replay.enabled = action_replay.status = 0; - /* store Action replay ROM (max. 128k) & RAM (64k) above cartridge ROM + SRAM area */ - if (cart.romsize > 0x810000) return; - action_replay.rom = cart.rom + 0x810000; - action_replay.ram = cart.rom + 0x830000; - - /* try to load Action Replay ROM file */ - size = load_archive(AR_ROM, action_replay.rom, 0x20000, NULL); - - /* detect Action Replay board type */ - switch (size) + /* try to load Action Replay ROM file (max. 64KB) */ + if (load_archive(AR_ROM, cart.lockrom, 0x10000, NULL) > 0) { - case 0x8000: + /* detect Action Replay board type */ + if (!memcmp(cart.lockrom + 0x120, "ACTION REPLAY ", 16)) { - if (!memcmp(action_replay.rom + 0x120, "ACTION REPLAY ", 16)) - { - /* normal Action Replay (32K) */ - action_replay.enabled = TYPE_AR; - - /* internal registers mapped at $010000-$01ffff */ - m68k.memory_map[0x01].write16 = ar_write_regs; - break; - } - } + /* normal Action Replay (32KB ROM) */ + action_replay.enabled = TYPE_AR; - case 0x10000: - case 0x20000: + /* $0000-$7fff mirrored into $8000-$ffff */ + memcpy(cart.lockrom + 0x8000, cart.lockrom, 0x8000); + + /* internal registers mapped at $010000-$01ffff */ + m68k.memory_map[0x01].write16 = ar_write_regs; + } + else { /* Read stack pointer MSB */ - uint8 sp = READ_BYTE(action_replay.rom, 0x01); + uint8 sp = cart.lockrom[0x01]; /* Detect board version */ - if ((sp == 0x42) && !memcmp(action_replay.rom + 0x120, "ACTION REPLAY 2 ", 16)) + if ((sp == 0x42) && !memcmp(cart.lockrom + 0x120, "ACTION REPLAY 2 ", 16)) { - /* PRO Action Replay 1 (64/128K) */ + /* PRO Action Replay (2x32KB ROM) */ action_replay.enabled = TYPE_PRO1; /* internal registers mapped at $010000-$01ffff */ m68k.memory_map[0x01].write16 = ar_write_regs; } - else if ((sp == 0x60) && !memcmp(action_replay.rom + 0x3c6, "ACTION REPLAY II", 16)) + else if ((sp == 0x60) && !memcmp(cart.lockrom + 0x3c6, "ACTION REPLAY II", 16)) { - /* PRO Action Replay 2 (64K) */ + /* PRO Action Replay 2 (2x32KB ROM) */ action_replay.enabled = TYPE_PRO2; - /* internal registers mapped at $100000-$10ffff */ - m68k.memory_map[0x10].write16 = ar_write_regs_2; + /* internal register mapped at $100000-$10ffff */ + m68k.memory_map[0x10].write16 = ar2_write_reg; } - /* internal RAM (64k), mapped at $420000-$42ffff or $600000-$60ffff */ + /* internal RAM (64KB), mapped at $420000-$42ffff or $600000-$60ffff */ if (action_replay.enabled) { m68k.memory_map[sp].base = action_replay.ram; @@ -120,28 +107,22 @@ void areplay_init(void) m68k.memory_map[sp].write8 = ar_write_ram_8; m68k.memory_map[sp].write16 = NULL; } - break; } - default: - { - break; - } - } - #ifdef LSB_FIRST - if (action_replay.enabled) - { - int i; - for (i= 0; i 0x810000) return; - ggenie.rom = cart.rom + 0x810000; - - /* Try to load Game Genie ROM file */ - if (load_archive(GG_ROM, ggenie.rom, 0x8000, NULL) > 0) + /* Try to load Game Genie ROM file (32KB) */ + if (load_archive(GG_ROM, cart.lockrom, 0x8000, NULL) > 0) { #ifdef LSB_FIRST int i; for (i=0; i<0x8000; i+=2) { /* Byteswap ROM */ - uint8 temp = ggenie.rom[i]; - ggenie.rom[i] = ggenie.rom[i+1]; - ggenie.rom[i+1] = temp; + uint8 temp = cart.lockrom[i]; + cart.lockrom[i] = cart.lockrom[i+1]; + cart.lockrom[i+1] = temp; } #endif /* $0000-$7fff mirrored into $8000-$ffff */ - memcpy(ggenie.rom + 0x8000, ggenie.rom, 0x8000); + memcpy(cart.lockrom + 0x8000, cart.lockrom, 0x8000); /* Game Genie hardware is enabled */ ggenie.enabled = 1; @@ -113,7 +108,7 @@ void ggenie_reset(int hard) } /* Game Genie ROM is mapped at $000000-$007fff */ - m68k.memory_map[0].base = ggenie.rom; + m68k.memory_map[0].base = cart.lockrom; /* Internal registers are mapped at $000000-$00001f */ m68k.memory_map[0].write8 = ggenie_write_byte; @@ -214,7 +209,7 @@ static void ggenie_write_regs(unsigned int offset, unsigned int data) else { /* $0000-$7ffff reads mapped to Game Genie ROM */ - m68k.memory_map[0].base = ggenie.rom; + m68k.memory_map[0].base = cart.lockrom; m68k.memory_map[0].read8 = NULL; m68k.memory_map[0].read16 = NULL; diff --git a/core/cart_hw/ggenie.h b/core/cart_hw/ggenie.h index a67f007b..0e36ff9d 100644 --- a/core/cart_hw/ggenie.h +++ b/core/cart_hw/ggenie.h @@ -1,8 +1,8 @@ /**************************************************************************** * Genesis Plus - * Game Genie Hardware emulation + * Game Genie hardware support * - * Copyright (C) 2009-2014 Eke-Eke (Genesis Plus GX) + * Copyright (C) 2009-2021 Eke-Eke (Genesis Plus GX) * * Based on documentation from Charles McDonald * (http://cgfm2.emuviews.com/txt/genie.txt) diff --git a/core/cart_hw/md_cart.c b/core/cart_hw/md_cart.c index 58d06d22..c864ce0b 100644 --- a/core/cart_hw/md_cart.c +++ b/core/cart_hw/md_cart.c @@ -453,79 +453,6 @@ void md_cart_init(void) svp_init(); } - /********************************************** - LOCK-ON - ***********************************************/ - - /* clear existing patches */ - ggenie_shutdown(); - areplay_shutdown(); - - /* initialize extra hardware */ - switch (config.lock_on) - { - case TYPE_GG: - { - ggenie_init(); - break; - } - - case TYPE_AR: - { - areplay_init(); - break; - } - - case TYPE_SK: - { - /* store S&K ROM above cartridge ROM (and before backup memory) */ - if (cart.romsize > 0x600000) break; - - /* try to load Sonic & Knuckles ROM file (2 MB) */ - if (load_archive(SK_ROM, cart.rom + 0x600000, 0x200000, NULL) == 0x200000) - { - /* check ROM header */ - if (!memcmp(cart.rom + 0x600000 + 0x120, "SONIC & KNUCKLES",16)) - { - /* try to load Sonic 2 & Knuckles UPMEM ROM (256 KB) */ - if (load_archive(SK_UPMEM, cart.rom + 0x900000, 0x40000, NULL) == 0x40000) - { - /* $000000-$1FFFFF is mapped to S&K ROM */ - for (i=0x00; i<0x20; i++) - { - m68k.memory_map[i].base = cart.rom + 0x600000 + (i << 16); - } - -#ifdef LSB_FIRST - for (i=0; i<0x200000; i+=2) - { - /* Byteswap ROM */ - uint8 temp = cart.rom[i + 0x600000]; - cart.rom[i + 0x600000] = cart.rom[i + 0x600000 + 1]; - cart.rom[i + 0x600000 + 1] = temp; - } - - for (i=0; i<0x40000; i+=2) - { - /* Byteswap ROM */ - uint8 temp = cart.rom[i + 0x900000]; - cart.rom[i + 0x900000] = cart.rom[i + 0x900000 + 1]; - cart.rom[i + 0x900000 + 1] = temp; - } -#endif - cart.special |= HW_LOCK_ON; - } - } - } - break; - } - - default: - { - break; - } - } - /********************************************** CARTRIDGE EXTRA HARDWARE ***********************************************/ @@ -569,16 +496,16 @@ void md_cart_init(void) /* Realtec mapper */ if (cart.hw.realtec) { - /* 8k BOOT ROM */ + /* copy 8KB Boot ROM after cartridge ROM area */ for (i=0; i<8; i++) { - memcpy(cart.rom + 0x900000 + i*0x2000, cart.rom + 0x7e000, 0x2000); + memcpy(cart.rom + 0x400000 + i*0x2000, cart.rom + 0x7e000, 0x2000); } - /* BOOT ROM is mapped to $000000-$3FFFFF */ + /* Boot ROM (8KB mirrored) is mapped to $000000-$3FFFFF */ for (i=0x00; i<0x40; i++) { - m68k.memory_map[i].base = cart.rom + 0x900000; + m68k.memory_map[i].base = cart.rom + 0x400000; } } @@ -768,6 +695,79 @@ void md_cart_init(void) { cart.hw.time_w = default_time_w; } + + /********************************************** + LOCK-ON + ***********************************************/ + + /* clear existing patches */ + ggenie_shutdown(); + areplay_shutdown(); + + /* initialize extra hardware */ + switch (config.lock_on) + { + case TYPE_GG: + { + ggenie_init(); + break; + } + + case TYPE_AR: + { + areplay_init(); + break; + } + + case TYPE_SK: + { + /* store Sonic & Knuckles ROM files after cartridge ROM area */ + if (cart.romsize > 0x400000) break; + + /* try to load Sonic & Knuckles ROM file (2MB) */ + if (load_archive(SK_ROM, cart.rom + 0x400000, 0x200000, NULL) == 0x200000) + { + /* check ROM header */ + if (!memcmp(cart.rom + 0x400000 + 0x120, "SONIC & KNUCKLES",16)) + { + /* try to load Sonic 2 & Knuckles upmem ROM file (256KB) */ + if (load_archive(SK_UPMEM, cart.rom + 0x600000, 0x40000, NULL) == 0x40000) + { + /* $000000-$1FFFFF is mapped to S&K ROM */ + for (i=0x00; i<0x20; i++) + { + m68k.memory_map[i].base = cart.rom + 0x400000 + (i << 16); + } + +#ifdef LSB_FIRST + for (i=0; i<0x200000; i+=2) + { + /* Byteswap ROM */ + uint8 temp = cart.rom[i + 0x400000]; + cart.rom[i + 0x400000] = cart.rom[i + 0x400000 + 1]; + cart.rom[i + 0x400000 + 1] = temp; + } + + for (i=0; i<0x40000; i+=2) + { + /* Byteswap ROM */ + uint8 temp = cart.rom[i + 0x600000]; + cart.rom[i + 0x600000] = cart.rom[i + 0x600000 + 1]; + cart.rom[i + 0x600000 + 1] = temp; + } +#endif + cart.special |= HW_LOCK_ON; + } + } + } + break; + } + + default: + { + break; + } + } } /* hardware that need to be reseted on power on */ @@ -961,12 +961,12 @@ static void mapper_sega_w(uint32 data) } /* S&K lock-on chip */ - if ((cart.special & HW_LOCK_ON) && (config.lock_on == TYPE_SK)) + if (cart.special & HW_LOCK_ON) { - /* S2K upmem chip mapped to $300000-$3fffff (256K mirrored) */ + /* S2K upmem chip mapped to $300000-$3fffff (256KB mirrored) */ for (i=0x30; i<0x40; i++) { - m68k.memory_map[i].base = (cart.rom + 0x900000) + ((i & 3) << 16); + m68k.memory_map[i].base = (cart.rom + 0x600000) + ((i & 3) << 16); } } } diff --git a/core/cart_hw/md_cart.h b/core/cart_hw/md_cart.h index 0343030d..cd29c177 100644 --- a/core/cart_hw/md_cart.h +++ b/core/cart_hw/md_cart.h @@ -81,7 +81,8 @@ typedef struct uint32 mask; /* ROM mask */ uint8 special; /* custom external hardware (Lock-On, J-Cart, 3-D glasses, Terebi Oekaki,...) */ cart_hw_t hw; /* cartridge internal hardware */ - uint8 rom[MAXROMSIZE]; /* ROM area */ + uint8 lockrom[0x10000]; /* Game Genie / (Pro) Action Replay Lock-On ROM area (max 64KB) */ + uint8 rom[MAXROMSIZE]; /* cartridge ROM area */ } md_cart_t; diff --git a/core/cart_hw/sms_cart.c b/core/cart_hw/sms_cart.c index 64a79a8b..8d56de14 100644 --- a/core/cart_hw/sms_cart.c +++ b/core/cart_hw/sms_cart.c @@ -199,6 +199,7 @@ static const rominfo_t game_list[] = {0xC0E25D62, 0, 0, 0, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* California Games II */ {0x45C50294, 0, 0, 0, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Jogos de Verao II (BR) */ {0xC9DBF936, 0, 0, 0, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Home Alone */ + {0xA109A6FE, 0, 0, 0, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Power Strike II */ {0x0047B615, 0, 0, 0, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Predator2 */ {0xF42E145C, 0, 0, 0, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* Quest for the Shaven Yak Starring Ren Hoek & Stimpy (BR) */ {0x9F951756, 0, 0, 0, MAPPER_SEGA, SYSTEM_SMS2, REGION_EUROPE}, /* RoboCop 3 */ diff --git a/core/cart_hw/sram.c b/core/cart_hw/sram.c index 58ef4048..4abc91ee 100644 --- a/core/cart_hw/sram.c +++ b/core/cart_hw/sram.c @@ -2,7 +2,7 @@ * Genesis Plus * Backup RAM support * - * Copyright (C) 2007-2020 Eke-Eke (Genesis Plus GX) + * Copyright (C) 2007-2021 Eke-Eke (Genesis Plus GX) * * Redistribution and use of this code or any derivative works are permitted * provided that the following conditions are met: @@ -61,11 +61,8 @@ T_SRAM sram; ****************************************************************************/ void sram_init() { - memset(&sram, 0, sizeof (T_SRAM)); - - /* backup RAM data is stored above cartridge ROM area, at $800000-$80FFFF (max. 64K) */ - if (cart.romsize > 0x800000) return; - sram.sram = cart.rom + 0x800000; + /* disable Backup RAM by default */ + sram.detected = sram.on = sram.custom = sram.start = sram.end = 0; /* initialize Backup RAM */ if (strstr(rominfo.international,"Sonic 1 Remastered")) diff --git a/core/cart_hw/sram.h b/core/cart_hw/sram.h index 3b505c55..e33f6e44 100644 --- a/core/cart_hw/sram.h +++ b/core/cart_hw/sram.h @@ -2,7 +2,7 @@ * Genesis Plus * Backup RAM support * - * Copyright (C) 2007-2020 Eke-Eke (Genesis Plus GX) + * Copyright (C) 2007-2021 Eke-Eke (Genesis Plus GX) * * Redistribution and use of this code or any derivative works are permitted * provided that the following conditions are met: @@ -47,7 +47,7 @@ typedef struct uint32 start; uint32 end; uint32 crc; - uint8 *sram; + uint8 sram[0x10000]; } T_SRAM; /* Function prototypes */ diff --git a/core/cd_hw/cd_cart.c b/core/cd_hw/cd_cart.c index 09e84df5..a380bd2d 100644 --- a/core/cd_hw/cd_cart.c +++ b/core/cd_hw/cd_cart.c @@ -2,7 +2,7 @@ * Genesis Plus * CD compatible ROM/RAM cartridge support * - * Copyright (C) 2012-2016 Eke-Eke (Genesis Plus GX) + * Copyright (C) 2012-2021 Eke-Eke (Genesis Plus GX) * * Redistribution and use of this code or any derivative works are permitted * provided that the following conditions are met: @@ -38,7 +38,6 @@ #include "shared.h" - /*--------------------------------------------------------------------------*/ /* backup RAM cartridge (max. 512KB) */ /*--------------------------------------------------------------------------*/ diff --git a/core/cd_hw/cd_cart.h b/core/cd_hw/cd_cart.h index 6ee7cad2..c708a786 100644 --- a/core/cd_hw/cd_cart.h +++ b/core/cd_hw/cd_cart.h @@ -2,7 +2,7 @@ * Genesis Plus * CD compatible ROM/RAM cartridge support * - * Copyright (C) 2012-2016 Eke-Eke (Genesis Plus GX) + * Copyright (C) 2012-2021 Eke-Eke (Genesis Plus GX) * * Redistribution and use of this code or any derivative works are permitted * provided that the following conditions are met: @@ -41,7 +41,7 @@ typedef struct { uint8 reserved[0x80]; /* reserved for ROM cartridge infos (see md_cart.h) */ - uint8 area[0x840000]; /* cartridge ROM/RAM area (max. 8MB ROM + 64KB backup memory + Pro Action Replay 128KB ROM / 64KB RAM) */ + uint8 area[0x810000]; /* cartridge ROM/RAM area (max. 8MB ROM + Pro Action Replay 64KB ROM) */ uint8 boot; /* cartridge boot mode (0x00: boot from CD with ROM/RAM cartridge enabled, 0x40: boot from ROM cartridge with CD enabled) */ uint8 id; /* RAM cartridge ID (related to RAM size, 0 if disabled) */ uint8 prot; /* RAM cartridge write protection */ diff --git a/gx/gx_video.c b/gx/gx_video.c index 5b24a8a1..4dc321fa 100644 --- a/gx/gx_video.c +++ b/gx/gx_video.c @@ -3,7 +3,7 @@ * * Genesis Plus GX video & rendering support * - * Copyright Eke-Eke (2007-2019), based on original work from Softdev (2006) + * Copyright Eke-Eke (2007-2021), based on original work from Softdev (2006) * * Redistribution and use of this code or any derivative works are permitted * provided that the following conditions are met: @@ -1888,6 +1888,9 @@ void gx_video_Init(void) /* Configure VI */ VIDEO_Configure(vmode); + /* Initialize font first (to ensure IPL font buffer is allocated in MEM1 as DMA from EXI bus to MEM2 is apparently not possible) */ + FONT_Init(); + /* Allocate framebuffers */ xfb[0] = (u32 *) MEM_K0_TO_K1((u32 *) SYS_AllocateFramebuffer(&TV50hz_576i)); xfb[1] = (u32 *) MEM_K0_TO_K1((u32 *) SYS_AllocateFramebuffer(&TV50hz_576i)); @@ -1916,9 +1919,6 @@ void gx_video_Init(void) gxStart(); gxResetRendering(1); gxResetMode(vmode, GX_TRUE); - - /* Initialize FONT */ - FONT_Init(); } void gx_video_Shutdown(void) diff --git a/gx/gx_video.h b/gx/gx_video.h index b4bea54d..55294dda 100644 --- a/gx/gx_video.h +++ b/gx/gx_video.h @@ -3,7 +3,7 @@ * * Genesis Plus GX video support * - * Copyright Eke-Eke (2007-2019), based on original work from Softdev (2006) + * Copyright Eke-Eke (2007-2021), based on original work from Softdev (2006) * * Redistribution and use of this code or any derivative works are permitted * provided that the following conditions are met: diff --git a/libretro/jni/Android.mk b/libretro/jni/Android.mk index 139483cd..d9448aff 100644 --- a/libretro/jni/Android.mk +++ b/libretro/jni/Android.mk @@ -10,7 +10,7 @@ USE_PER_SOUND_CHANNELS_CONFIG := 1 include $(CORE_DIR)/libretro/Makefile.common -COREFLAGS := -ffast-math -funroll-loops -DINLINE="static inline" -DUSE_LIBTREMOR -DUSE_16BPP_RENDERING -DLSB_FIRST -DBYTE_ORDER=LITTLE_ENDIAN -D__LIBRETRO__ -DFRONTEND_SUPPORTS_RGB565 -DALIGN_LONG -DALIGN_WORD -DM68K_OVERCLOCK_SHIFT=20 -DZ80_OVERCLOCK_SHIFT=20 -DHAVE_YM3438_CORE -DUSE_LIBCHDR -D_7ZIP_ST -DUSE_LIBRETRO_VFS -DHAVE_OPLL_CORE -DUSE_PER_SOUND_CHANNELS_CONFIG $(INCFLAGS) +COREFLAGS := -ffast-math -funroll-loops -DINLINE="static inline" -DUSE_LIBTREMOR -DUSE_16BPP_RENDERING -DLSB_FIRST -DBYTE_ORDER=LITTLE_ENDIAN -D__LIBRETRO__ -DFRONTEND_SUPPORTS_RGB565 -DALIGN_LONG -DALIGN_WORD -DM68K_OVERCLOCK_SHIFT=20 -DZ80_OVERCLOCK_SHIFT=20 -DHAVE_YM3438_CORE -DUSE_LIBCHDR -D_7ZIP_ST -DUSE_LIBRETRO_VFS -DHAVE_OPLL_CORE -DUSE_PER_SOUND_CHANNELS_CONFIG $(INCFLAGS) -DMAXROMSIZE=16777216 ifeq ($(TARGET_ARCH),arm) COREFLAGS += -D_ARM_ASSEM_ diff --git a/sdl/Makefile.sdl1 b/sdl/Makefile.sdl1 index b74b954c..4783878a 100644 --- a/sdl/Makefile.sdl1 +++ b/sdl/Makefile.sdl1 @@ -22,7 +22,7 @@ # -DUSE_LIBTREMOR : enable OGG file support for CD emulation using provided TREMOR library # -DUSE_LIBVORBIS : enable OGG file support for CD emulation using external VORBIS library # -DISABLE_MANY_OGG_OPEN_FILES : only have one OGG file opened at once to save RAM -# -DMAXROMSIZE : defines maximal size of ROM/SRAM buffer (also shared with CD hardware) +# -DMAXROMSIZE : defines maximal size of ROM buffer (also shared with CD hardware) # -DHAVE_YM3438_CORE : enable (configurable) support for Nuked cycle-accurate YM2612/YM3438 core # -DHAVE_OPLL_CORE : enable (configurable) support for Nuked cycle-accurate YM2413 core # -DHOOK_CPU : enable CPU hooks diff --git a/sdl/Makefile.sdl2 b/sdl/Makefile.sdl2 index 30ab095d..488d341c 100644 --- a/sdl/Makefile.sdl2 +++ b/sdl/Makefile.sdl2 @@ -22,7 +22,7 @@ # -DUSE_LIBTREMOR : enable OGG file support for CD emulation using provided TREMOR library # -DUSE_LIBVORBIS : enable OGG file support for CD emulation using external VORBIS library # -DISABLE_MANY_OGG_OPEN_FILES : only have one OGG file opened at once to save RAM -# -DMAXROMSIZE : defines maximal size of ROM/SRAM buffer (also shared with CD hardware) +# -DMAXROMSIZE : defines maximal size of ROM buffer (also shared with CD hardware) # -DHAVE_YM3438_CORE : enable (configurable) support for Nuked cycle-accurate YM2612/YM3438 core # -DHAVE_OPLL_CORE : enable (configurable) support for Nuked cycle-accurate YM2413 core # -DHOOK_CPU : enable CPU hooks