Merge branch 'ekeeke:master' into master

This commit is contained in:
ds22x 2023-03-15 00:46:03 +01:00 committed by GitHub
commit ff371e24cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 517 additions and 69 deletions

View File

@ -68,6 +68,7 @@ Genesis Plus GX 1.7.5 (xx/xx/xxxx) (Eke-Eke)
* 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 Realtec mapper behavior on soft-reset and with TMSS hardware
* 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

View File

@ -12,17 +12,17 @@ Genesis Plus GX is an open-source Sega 8/16 bit emulator focused on accuracy and
----
The source code, initially based on Genesis Plus 1.2a by [Charles MacDonald](http://www.techno-junk.org/ ) has been heavily modified & enhanced, with respect to original goals and design, in order to improve emulation accuracy as well as adding support for new peripherals, cartridge or console hardware and many other exciting [features](https://bitbucket.org/eke/genesis-plus-gx/src/master/wiki/Features.md).
The source code, initially based on Genesis Plus 1.2a by [Charles MacDonald](http://www.techno-junk.org/ ) has been heavily modified & enhanced, with respect to original goals and design, in order to improve emulation accuracy as well as adding support for new peripherals, cartridge or console hardware and many other exciting [features](https://github.com/ekeeke/Genesis-Plus-GX/blob/master/wiki/Features.md).
The result is that Genesis Plus GX is now more a continuation of the original project than a simple port, providing very accurate emulation and [100% compatibility](https://bitbucket.org/eke/genesis-plus-gx/src/master/wiki/Compatibility.md) with Genesis / Mega Drive, Sega/Mega CD, Master System, Game Gear & SG-1000 released software (including all unlicensed or pirate known dumps), also emulating backwards compatibility modes when available. All the people who contributed (directly or indirectly) to this project are listed on the [Credits](https://bitbucket.org/eke/genesis-plus-gx/src/master/wiki/Credits.md) page.
The result is that Genesis Plus GX is now more a continuation of the original project than a simple port, providing very accurate emulation and [100% compatibility](https://github.com/ekeeke/Genesis-Plus-GX/blob/master/wiki/Compatibility.md) with Genesis / Mega Drive, Sega/Mega CD, Master System, Game Gear & SG-1000 released software (including all unlicensed or pirate known dumps), also emulating backwards compatibility modes when available. All the people who contributed (directly or indirectly) to this project are listed on the [Credits](https://github.com/ekeeke/Genesis-Plus-GX/blob/master/wiki/Credits.md) page.
----
Multi-platform sourcecode (core), which is made available for use under a specific non-commercial [license](https://bitbucket.org/eke/genesis-plus-gx/src/master/LICENSE.txt), is maintained on [Bitbucket](https://bitbucket.org/eke/genesis-plus-gx/src/) / [Github](https://github.com/ekeeke/Genesis-Plus-GX) so that other Genesis Plus ports can benefit of it, as I really wish this emulator becomes a reference for _portable_ and _accurate_ Sega 8/16-bit emulation. If you ported this emulator to other platforms or need help porting it, feel free to contact me.
Multi-platform sourcecode (core), which is made available for use under a specific non-commercial [license](https://github.com/ekeeke/Genesis-Plus-GX/blob/master/LICENSE.txt), is maintained on [Bitbucket](https://bitbucket.org/eke/genesis-plus-gx/src/) / [Github](https://github.com/ekeeke/Genesis-Plus-GX) so that other Genesis Plus ports can benefit of it, as I really wish this emulator becomes a reference for _portable_ and _accurate_ Sega 8/16-bit emulation. If you ported this emulator to other platforms or need help porting it, feel free to contact me.
----
Latest official Gamecube / Wii standalone port (screenshots below) is available [here](https://bitbucket.org/eke/genesis-plus-gx/downloads). Be sure to check the included user manual first. A [startup guide](https://bitbucket.org/eke/genesis-plus-gx/src/master/wiki/Getting%20Started.md) and a [FAQ](https://bitbucket.org/eke/genesis-plus-gx/src/master/wiki/Frequently%20Asked%20Questions.md) are also available.
Latest official Gamecube / Wii standalone port (screenshots below) is available [here](https://github.com/ekeeke/Genesis-Plus-GX/tree/master/builds). Be sure to check the included [user manual](https://github.com/ekeeke/Genesis-Plus-GX/blob/master/gx/docs/README.pdf) first. A [startup guide](https://github.com/ekeeke/Genesis-Plus-GX/blob/master/wiki/Getting%20Started.md) and a [FAQ](https://github.com/ekeeke/Genesis-Plus-GX/blob/master/wiki/Frequently%20Asked%20Questions.md) are also available.
![MainMenu.png](https://bitbucket.org/repo/7AjE6M/images/3565283297-MainMenu.png)
![menu_load.png](https://bitbucket.org/repo/7AjE6M/images/164055790-menu_load.png)
@ -32,9 +32,7 @@ Latest official Gamecube / Wii standalone port (screenshots below) is available
----
You can also test latest compiled builds for Gamecube / Wii and Retroarch (Windows 32-bit version only) by downloading them from [here](https://bitbucket.org/eke/genesis-plus-gx/src/master/builds/).
You can also test latest compiled builds for Gamecube / Wii and Retroarch (Windows 32-bit version only) by downloading them from [here](https://github.com/ekeeke/Genesis-Plus-GX/tree/master/builds).
----

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 MiB

After

Width:  |  Height:  |  Size: 3.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 MiB

After

Width:  |  Height:  |  Size: 4.0 MiB

View File

@ -2,7 +2,7 @@
* Genesis Plus
* Mega Drive cartridge hardware support
*
* Copyright (C) 2007-2021 Eke-Eke (Genesis Plus GX)
* Copyright (C) 2007-2023 Eke-Eke (Genesis Plus GX)
*
* Many cartridge protections were initially documented by Haze
* (http://haze.mameworld.info/)
@ -71,6 +71,7 @@ static uint32 mapper_flashkit_r(uint32 address);
static uint32 mapper_smw_64_r(uint32 address);
static void mapper_smw_64_w(uint32 address, uint32 data);
static void mapper_realtec_w(uint32 address, uint32 data);
static uint32 mapper_realtec_r(uint32 address);
static void mapper_seganet_w(uint32 address, uint32 data);
static void mapper_32k_w(uint32 data);
static void mapper_64k_w(uint32 data);
@ -377,20 +378,20 @@ void md_cart_init(void)
zbank_memory_map[i].write = zbank_unused_w;
}
/* support for Quackshot REV 01 (real) dump */
if (strstr(rominfo.product,"00004054-01") && (cart.romsize == 0x80000))
/* support for Quackshot REV A original ROM dump (512KB) */
if (strstr(rominfo.product,"00004054-01") && (cart.romsize == 0x80000) && (rominfo.checksum == 0xa4b3))
{
/* $000000-$0fffff: first 256K mirrored (A18 not connected to ROM chip, A19 not decoded) */
/* $000000-$0fffff: lower 256KB mirrored (VA18 and VA19 not connected to ROM chip) */
for (i=0x00; i<0x10; i++)
{
/* $200000-$3fffff: mirror of $000000-$1fffff (A21 not decoded) */
/* $200000-$3fffff: mirror of $000000-$1fffff (VA21 not connected to ROM chip) */
m68k.memory_map[i].base = m68k.memory_map[i + 0x20].base = cart.rom + ((i & 0x03) << 16);
}
/* $100000-$1fffff: second 256K mirrored (A20 connected to ROM chip A18) */
/* $100000-$1fffff: upper 256KB mirrored (VA20 connected to ROM chip A19) */
for (i=0x10; i<0x20; i++)
{
/* $200000-$3fffff: mirror of $000000-$1fffff (A21 not decoded) */
/* $200000-$3fffff: mirror of $000000-$1fffff (VA21 not connected to ROM chip) */
m68k.memory_map[i].base = m68k.memory_map[i + 0x20].base = cart.rom + 0x40000 + ((i & 0x03) << 16);
}
}
@ -503,15 +504,12 @@ void md_cart_init(void)
memcpy(cart.rom + 0x400000 + i*0x2000, cart.rom + 0x7e000, 0x2000);
}
/* Boot ROM (8KB mirrored) is mapped to $000000-$3FFFFF */
for (i=0x00; i<0x40; i++)
{
m68k.memory_map[i].base = cart.rom + 0x400000;
}
/* specific read handler for ROM header area */
m68k.memory_map[0].read16 = mapper_realtec_r;
}
/* detect specific mappers */
if (strstr(rominfo.consoletype,"SEGA SSF"))
else if (strstr(rominfo.consoletype,"SEGA SSF"))
{
/* Everdrive extended SSF mapper */
cart.hw.time_w = mapper_512k_w;
@ -803,8 +801,18 @@ void md_cart_reset(int hard_reset)
{
int i;
/* Realtec mapper */
if (cart.hw.realtec)
{
/* Boot ROM (8KB mirrored) is mapped to $000000-$3FFFFF */
for (i=0x00; i<0x40; i++)
{
m68k.memory_map[i].base = cart.rom + 0x400000;
}
}
/* reset cartridge mapping */
if (cart.hw.bankshift)
else if (cart.hw.bankshift)
{
for (i=0x00; i<0x40; i++)
{
@ -1615,7 +1623,7 @@ static uint32 mapper_smw_64_r(uint32 address)
}
/*
Realtec ROM bankswitch (Earth Defend, Balloon Boy & Funny World, Whac-A-Critter)
Realtec ROM bankswitch (Earth Defend, Balloon Boy & Funny World, Whac-A-Critter, Tom Clown)
(Note: register usage is inverted in TascoDlx documentation)
*/
static void mapper_realtec_w(uint32 address, uint32 data)
@ -1659,6 +1667,19 @@ static void mapper_realtec_w(uint32 address, uint32 data)
}
}
static uint32 mapper_realtec_r(uint32 address)
{
/* /VRES is asserted to bypass TMSS licensing screen when first read access to cartridge ROM header is detected */
if ((address == 0x100) && (m68k.memory_map[0].base = cart.base))
{
/* asserting /VRES from cartridge should only reset 68k CPU (TODO: confirm this on real hardware) */
m68k_pulse_reset();
}
/* default ROM area read handler */
return *(uint16 *)(m68k.memory_map[0].base + (address & 0xfffe));
}
/* Game no Kanzume Otokuyou ROM Mapper */
static void mapper_seganet_w(uint32 address, uint32 data)
{
@ -1959,23 +1980,24 @@ static uint32 mapper_128k_radica_r(uint32 address)
/*
Custom logic (ST 16S25HB1 PAL) used in Micro Machines US cartridge (SR16V1.1 board)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/VRES is asserted after write access to 0xA14101 (TMSS bank-shift register)
with D0=1 (cartridge ROM access enabled instead of TMSS Boot ROM) being detected
Custom logic (ST 16S25HB1 PAL) used in Micro Machines USA cartridge (SR16V1.1 board)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/VRES is asserted to bypass TMSS security checks when write access to 0xA141xx
with D0=1 is detected (access to cartridge ROM enabled instead of TMSS Boot ROM)
*/
static void mapper_sr16v1_w(uint32 address, uint32 data)
{
/* 0xA10000-0xA1FFFF address range is mapped to I/O and Control registers */
/* default I/O and Control registers write handler */
ctrl_io_write_byte(address, data);
/* cartridge uses /LWR, /AS and VA1-VA18 (only VA8-VA17 required to decode access to TMSS bank-shift register) */
/* cartridge uses /LWR, /AS and VA1-VA18 (only VA8-VA17 are required to decode access to TMSS bankswitch register) */
if ((address & 0xff01) == 0x4101)
{
/* cartridge ROM is enabled when D0=1 */
/* check if cartridge ROM is enabled (D0=1) */
if (data & 0x01)
{
gen_reset(0);
/* asserting /VRES from cartridge should only reset 68k CPU (TODO: confirm this on real hardware) */
m68k_pulse_reset();
}
}
}

View File

@ -2,7 +2,7 @@
* Genesis Plus
* Mega Drive cartridge hardware support
*
* Copyright (C) 2007-2021 Eke-Eke (Genesis Plus GX)
* Copyright (C) 2007-2023 Eke-Eke (Genesis Plus GX)
*
* Most cartridge protections were initially documented by Haze
* (http://haze.mameworld.info/)

View File

@ -2,7 +2,7 @@
* Genesis Plus
* SG-1000, Master System & Game Gear cartridge hardware support
*
* Copyright (C) 2007-2022 Eke-Eke (Genesis Plus GX)
* Copyright (C) 2007-2023 Eke-Eke (Genesis Plus GX)
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met:
@ -737,6 +737,24 @@ void sms_cart_switch(uint8 mode)
}
}
int sms_cart_ram_size(void)
{
if ((cart_rom.mapper == MAPPER_RAM_8K) || (cart_rom.mapper == MAPPER_RAM_8K_EXT1))
{
/* 8KB on-board RAM */
return 0x2000;
}
if (cart_rom.mapper == MAPPER_RAM_2K)
{
/* 2KB on-board RAM */
return 0x800;
}
/* no on-board RAM by default */
return 0;
}
int sms_cart_region_detect(void)
{
int i = sizeof(game_list) / sizeof(rominfo_t) - 1;

View File

@ -2,7 +2,7 @@
* Genesis Plus
* SG-1000, Master System & Game Gear cartridge hardware support
*
* Copyright (C) 2007-2022 Eke-Eke (Genesis Plus GX)
* Copyright (C) 2007-2023 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,6 +47,7 @@
extern void sms_cart_init(void);
extern void sms_cart_reset(void);
extern void sms_cart_switch(uint8 mode);
extern int sms_cart_ram_size(void);
extern int sms_cart_region_detect(void);
extern int sms_cart_context_save(uint8 *state);
extern int sms_cart_context_load(uint8 *state);

Binary file not shown.

Binary file not shown.

View File

@ -3,7 +3,7 @@
*
* Genesis Plus GX menu
*
* Copyright Eke-Eke (2009-2022)
* Copyright Eke-Eke (2009-2023)
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met:
@ -1662,7 +1662,7 @@ static void systemmenu ()
case 12: /*** Main 68k Overclock ***/
{
GUI_OptionBox(m,0,"Main 68k Overclock Ratio",(void *)&config.m68k_overclock,0.1,1.0,3.0,0);
GUI_OptionBox(m,0,"Main 68k Overclock Ratio",(void *)&config.m68k_overclock,0.1,1.0,7.0,0);
if (config.m68k_overclock > 1.0)
sprintf (items[12].text, "Main 68k Overclock: %1.1fx", config.m68k_overclock);
else
@ -1672,7 +1672,7 @@ static void systemmenu ()
case 13: /*** Sub 68k Overclock ***/
{
GUI_OptionBox(m,0,"Sub 68k Overclock Ratio",(void *)&config.s68k_overclock,0.1,1.0,3.0,0);
GUI_OptionBox(m,0,"Sub 68k Overclock Ratio",(void *)&config.s68k_overclock,0.1,1.0,4.0,0);
if (config.s68k_overclock > 1.0)
sprintf (items[13].text, "Sub 68k Overclock: %1.1fx", config.s68k_overclock);
else
@ -1682,7 +1682,7 @@ static void systemmenu ()
case 14: /*** Z80 Overclock ***/
{
GUI_OptionBox(m,0,"Z80 Overclock Ratio",(void *)&config.z80_overclock,0.1,1.0,3.0,0);
GUI_OptionBox(m,0,"Z80 Overclock Ratio",(void *)&config.z80_overclock,0.1,1.0,15.0,0);
if (config.z80_overclock > 1.0)
sprintf (items[14].text, "Z80 Overclock: %1.1fx", config.z80_overclock);
else

View File

@ -3,7 +3,7 @@
*
* Genesis Plus GX menus
*
* Copyright Eke-Eke (2009-2022)
* Copyright Eke-Eke (2009-2023)
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met:

View File

@ -3513,39 +3513,46 @@ size_t retro_get_memory_size(unsigned id)
{
case RETRO_MEMORY_SAVE_RAM:
{
if (!sram.on)
return 0;
/* return 0 if SRAM is disabled */
if (!sram.on)
return 0;
/* if emulation is not running, we assume the frontend is requesting SRAM size for loading */
if (!is_running)
{
/* max supported size is returned */
return 0x10000;
}
/* otherwise, we assume this is for saving and we need to check if SRAM data has been modified */
/* this is obviously not %100 safe since the frontend could still be trying to load SRAM while emulation is running */
/* a better solution would be that the frontend itself checks if data has been modified before writing it to a file */
for (i=0xffff; i>=0; i--)
{
if (sram.sram[i] != 0xff)
{
/* only save modified size */
return (i+1);
}
}
}
case RETRO_MEMORY_SYSTEM_RAM:
if (system_hw == SYSTEM_SG)
return 0x00400;
else if (system_hw == SYSTEM_SGII)
return 0x00800;
else if (system_hw == SYSTEM_SGII_RAM_EXT || system_hw == SYSTEM_SMS || system_hw == SYSTEM_SMS2 || system_hw == SYSTEM_GG || system_hw == SYSTEM_GGMS || system_hw == SYSTEM_PBC)
return 0x02000;
else
/* if emulation is not running, we assume the frontend is requesting SRAM size for loading so max supported size is returned */
if (!is_running)
return 0x10000;
default:
/* otherwise, we assume this is for saving and we return the size of SRAM data that has actually been modified */
/* this is obviously not %100 safe since the frontend could still be trying to load SRAM while emulation is running */
/* a better solution would be that the frontend itself checks if data has been modified before writing it to a file */
for (i=0xffff; i>=0; i--)
if (sram.sram[i] != 0xff)
return (i+1);
/* return 0 if SRAM is not modified */
return 0;
}
case RETRO_MEMORY_SYSTEM_RAM:
{
/* 16-bit hardware */
if ((system_hw & SYSTEM_PBC) == SYSTEM_MD)
return 0x10000; /* 64KB internal RAM */
/* get 8-bit cartrige on-board RAM size */
i = sms_cart_ram_size();
if (i > 0)
return i + 0x2000; /* on-board RAM size + max 8KB internal RAM */
else if (system_hw == SYSTEM_SGII)
return 0x0800; /* 2KB internal RAM */
else if (system_hw == SYSTEM_SG)
return 0x0400; /* 1KB internal RAM */
else
return 0x2000; /* 8KB internal RAM */
}
default:
return 0;
}
}

64
wiki/Compatibility.md Normal file
View File

@ -0,0 +1,64 @@
Genesis Plus GX is able to accurately emulate various console hardware models, which makes it compatible with 100% of SG-1000, Master System, Game Gear, Genesis / Mega Drive & Sega/Mega CD released software, including demos, unlicensed & pirate games.
This means that all these games have been verified to be working without any graphical glitches or lock-up but off course, it is impossible for me to test all games *from start to end* so feel free to report an [issue](https://bitbucket.org/eke/genesis-plus-gx/issues?status=new&status=open) if you found a specific game not running accurately with this emulator.
On a side note, make sure you are always using good dumps: ROM files labeled as bad, "fixed" or hacked dumps (b1, f1, h1, ...), are known to cause issues, even on real hardware.
## Sega/Mega CD games ##
Sega/Mega CD games are only compatible with Genesis / Mega Drive hardware. Sega/Mega CD add-on is automatically enabled when a valid CD image file is detected.
## Genesis / Mega Drive games ##
Genesis / Mega Drive games are only compatible with Genesis / Mega Drive hardware. Some games might require different hardware to be enabled (PICO games or games only working with CD unit attached) and are auto-detected.
## Game Gear games ##
Game Gear games are only compatible with Game Gear hardware.
## Master System games ##
Master System games are compatible with Game Gear and Genesis hardware, using backwards compatibility mode. However, the following games are known to be working only on specific hardware:
### _games requiring Master System BIOS to initialize VDP registers_ ###
* California Games II
* Speed Ball
### _games incompatible with Genesis VDP_ ###
* Bart vs. The Space Mutants (palette issue)
* Earthworm Jim (zoomed sprites issue)
* X-Men - Mojo World (palette issue)
### _games requiring legacy VDP modes (not supported by Genesis VDP or Game Gear with custom BIOS)_ ###
* Dr Hello
* F-1 Spirit - The way to Formula-1
* F16 Fighter
* F16 Fighting Falcon
* FA Tetris
* Flashpoint
* Loretta no Shouzou - Sherlock Holmes
* Penguin Adventure
* Street Master
* Super Boy II
* The Three Dragon Story
* Wonsiin
* Cyborg Z
### _games requiring extended VDP modes (Master System II & Game Gear only)_ ###
* Cosmic Spacehead
* Excellent Dizzy Collection, The [Proto]
* Fantastic Dizzy
* Micro Machines
### _games requiring original VDP limitation (Mark III & Master System I only)_ ###
* Y'S (Japanese version)
## SG-1000 games ##
SG-1000 games are compatible with Mark-III and Master System hardware, using backwards compatibility mode (a custom BIOS, not available, is required on Game Gear). In order to display the correct colour palette, it is however recommended to use SG-1000 hardware.

45
wiki/Credits.md Normal file
View File

@ -0,0 +1,45 @@
This project would not have been possible without these people:
## Genesis Plus core ##
* current version (improved emulation accuracy, new features, compatibility fixes & various cores modification) by [eke-eke](http://gxdev.wordpress.com/)
* based on the original 1.2a version by [Charles MacDonald](http://www.techno-junk.org/)
* original Z80 core by Juergen Buchmueller ([MAME](http://mamedev.org/release.html))
* original Musashi 68k core by Karl Stenerud ([MAME](http://mamedev.org/release.html))
* original YM2612 & YM2413 core by Jarek Burczynski and Tatsuyuki Satoh ([MAME](http://mamedev.org/release.html))
* SVP core by [Notaz](http://notaz.gp2x.de/svp.php)
* Blip Buffer library & NTSC Video filter by Shay Green ([Blargg](http://www.fly.net/~ant/libs))
* 3-Band EQ implementation by [Neil C ](http://www.musicdsp.org/archive.php?classid=3#236)
* [libtremor](http://www.freshports.org/audio/libtremor) by xiph.org
### additional thanks to ###
* [Nemesis], for his tests and documentation on YM2612 & VDP chips.
* Tasco Deluxe for his work around the SVP chip and for his documentation of Realtec mapper used in a few unlicensed games.
* [Bart Trzynadlowski](http://www.trzy.org/) for his documentation of the "Super Street Fighter II" mapper and some 68000 undocumented aspects.
* [Jorge Cwik](http://pasti.fxatari.com/68kdocs/) for his work on some 68000 undocumented timings and instruction prefetch.
* [Haze](http://mamedev.emulab.it/haze/) for having found and documented many unlicensed game protections.
* Notaz & Stephane Dallongeville for sharing the source code of their respective emulators, Picodrive and Gens, which were also great sources of inspiration.
* Steve Snake, author of [Kega](http://www.eidolons-inn.net/tiki-index.php?page=Kega) and AamirM, author of [Regen](http://aamirm.hacking-cult.org/), for sharing some of their findings.
* Charles Mac Donald, again, for his excellent documentation about the Sega Genesis hardware and for having designed such a great emulator in the first place (your VDP renderer rules).
* [Spritesmind](http://www.spritesmind.net/_GenDev/forum/) & [SMS Power](http://www.smspower.org/) forums members for their technical help.
## Gamecube/Wii ports ##
* current version, Wii port, generic GUI design & coding by eke-eke
* based on the original Game Cube port from Softdev, Honkeykong & Markcube
* original icon, logo & button design by [LowLines](http://llref.emutalk.net/)
* credit picture by [Orioto](http://orioto.deviantart.com/)
* memory card icon design by [Brakken](http://www.tehskeen.net)
* [libFAT](http://chishm.drunkencoders.com/libfat/) by Chism
* [wiiuse](http://www.wiiuse.net/) library by Michael Laforest (para)
* [libDI](http://hackmii.com/2008/08/libdi-and-the-dvdx-installer/) by Erant
* [libOGC](http://www.devkitpro.org/category/libogc/) by Shagkur & many others
* asndlib and OGG player by [Hermes](http://www.entuwii.net/foro/viewtopic.php?f=6&t=87) incl. some fixes by [Tantric](http://code.google.com/u/dborth/)
* [libpng](http://www.libpng.org/pub/png/libpng.html) by various authors
### additional thanks to ###
* Softdev for all his great work and inspiration
* Wintermute for [devkitpro](http://www.devkitpro.org/) & [devkitPPC](http://www.devkitpro.org/category/devkitppc/)
* [Tmbinc](http://debugmo.de/) for having opened the way to the Game Cube scene
* [Twiizer team](http://hackmii.com/) for all their contribution to the Wii scene
* Brakken & former Tehskeen forum members for their feedback, support and donations

109
wiki/Features.md Normal file
View File

@ -0,0 +1,109 @@
Genesis Plus main goal is to provide the most complete & accurate emulation of the Sega Genesis/Megadrive hardware.
The original emulation core from [Charles Mac Donald](http://cgfm2.emuviews.com/) has been largely modified to improve overall accuracy and therefore compatibility, as well as adding emulation of various peripherals, cartridge and system hardware.
![sega_megadrive_2.thumbnail.jpg](https://bitbucket.org/repo/7AjE6M/images/4007718275-sega_megadrive_2.thumbnail.jpg)
## Very Accurate & Full Speed Sega 8-bit / 16-bit emulation ##
* accurate emulation of SG-1000, Mark-III, Master System (I & II), Game Gear, Genesis / Mega Drive, Sega / Mega CD hardware models (incl. backwards compatibility modes)
* NTSC (60Hz) & PAL (50Hz) video hardware emulation
* highly accurate 68000 & Z80 CPU emulation & synchronization
* highly accurate VDP emulation (all rendering modes, mid-line changes, undocumented registers,…) & timings (HBLANK, DMA, FIFO, HV interrupts,…)
* sample-accurate YM2612,YM2413, SN76489, & RF5C164 PCM sound chips emulation
* cycle-accurate sound chips synchronization with 68000/Z80 CPU
* cycle-accurate 68000 & Z80 CPU synchronization
* optimized Main-CPU / Sub-CPU synchronization (Sega/Mega CD)
* accurate CDD, CDC & GFX chip emulation (Sega/Mega CD)
* accurate CD-DA fader emulation (Sega/Mega CD)
* Mode 1 cartridge support (Sega/Mega CD)
* Audio CD & CD+G support (Sega/Mega CD)
* high-quality audio resampling using Blip Buffer
* basic hardware latency emulation (VDP/68k, Z80/68k)
* full overscan area emulation (horizontal & vertical color borders)
* optional Game Gear extended screen mode
* optional Game Gear LCD ghosting filter
* optional Blargg's NTSC filters
* optional BOOT ROM support (Master System, Game Gear, Genesis / Mega Drive)
* optional TMSS hardware emulation (Genesis / Mega Drive)
* preliminary PICO emulation
* support for raw (.bin, .gen, .md, .sms, .gg & .sg) and interleaved (.smd & .mdx) ROM files
* support for various CD image file formats (CUE+BIN, ISO+WAV & ISO+OGG)
* support for subcodes external files (SUB)
![street.gif](https://bitbucket.org/repo/7AjE6M/images/607524734-street.gif)
## Support for various peripherals ##
* 2-buttons, 3-buttons & 6-buttons Control Pads
* Sega Team Player & EA 4-Way Play multitaps
* Master Tap
* Sega Mouse
* Sega Paddle Control
* Sega Sports Pad
* Sega Graphics Board
* Terebi Oekaki tablet
* Sega Light Phaser
* Sega Menacer
* Konami Justifiers
* Sega Activator
* XE-1AP analog controller
![menacer.jpg](https://bitbucket.org/repo/7AjE6M/images/4221166085-menacer.jpg)
## Support for various cartridges extra hardware ##
* SVP DSP (Virtua Racing)
* J-Cart adapter (Micro Machines & Pete Sampras series, Super Skidmarks)
* Backup RAM (max. 64KB)
* I2C (24Cxx), SPI (95xxx) & MicroWire (93C46) EEPROMs
* RAM cart (max. 512KB) (Sega/Mega CD)
* “official” ROM bankswitch hardware (Super Street Fighter 2)
* “official” backup RAM bankswitch hardware (Phantasy Star 4, Legend of Thor, Sonic the Hedgehog 3)
* all known unlicensed/pirate cartridges bankswitch & copy protection hardware
* all known Master System & Game Gear cartridge “mappers” (incl. unlicensed Korean ones)
* Game Genie & Action Replay hardware emulation
* Sonic & Knuckles “Lock-On” hardware emulation
* support for ROM image up to 10MB (Ultimate MK3 hack)
![vracing.png](https://bitbucket.org/repo/7AjE6M/images/802538951-vracing.png)
## Gamecube/Wii generic features ##
* fully featured & optimized Graphical User Interface
* 48 kHz stereo sound
* optimized GX video rendering engine
* perfect audio/video/input synchronization
* 50/60 Hz video output support
* original low-resolution video modes support (interlaced & non-interlaced)
* high-resolution interlaced (480i/576i) & progressive (480p/576p) video modes support
* hardware bilinear filtering
* configurable BIOS & Lock-on ROM files
* configurable sound mixer (FM/PSG levels) and filtering (Low-Pass filter & 3-Band equalizer)
* configurable NTSC filter
* independently configurable region mode, VDP mode & Master Clock
* 1~4 Players support
* automatic Backup RAM and State files loading/saving
* automatic game files loading
* game files loading history
* load files from SD/SDHC or DVD
* support for zipped ROM files
* game internal header information display
* internal game screenshots
* Game Genie & Pro Action Replay codes support through .pat files
* cartridge "hot-swap"
* automatic disc swap
## Wii extra features ##
* up to 8 Players support
* Wii Remote, Nunchuk & Classic controllers support
* Wii Remote IR support & calibration for light guns
* Wii U Pro Controller support
* USB mouse support for mouse emulation
* USB drive support (IOS58 is required for USB2)
* configurable hardware “Trap” filter & Gamma correction
* "Wiiflow" plugin compatibility
![wiimote.jpg](https://bitbucket.org/repo/7AjE6M/images/2853669073-wiimote.jpg)

View File

@ -0,0 +1,119 @@
----
**_The emulator does not start and hangs on a black screen when loaded on my Wii._**
Preferably use the Homebrew Channel to launch this program on your Wii, using the provided meta.xml file.
If you installed the emulator as a standalone channel or are using a different loader, you might have modified or deleted required system files (IOS), which could prevent the application from starting. Also note that some loaders are not compatible with compressed dols, instead of provided boot.dol, use genplus_wii.dol, which is not compressed.
Lastly, if you have unsupported devices connected to the Game Cube ports or USB ports, you might want to remove them.
----
**_The emulator loads fine but randomly freeze (no input response) or crashes (DSI exception screen) in the menu or during game._**
Use the latest version of Homebrew Channel to launch the emulator.
----
**_When I try to load game files from my SD card or USB drive, no files are found or an error message occurs._**
Make sure you have at least one FAT (FAT16 or FAT32) partition on your device.
----
**_My USB2 compatible drive does not seem to be detected, is that normal ?_**
USB2 compatibility requires IOS58 to be installed in your system (it usually came with recent System Menu updates). You must also make sure the Homebrew Channel is using this IOS (reinstall HBC if it doesn't) to load the emulator.
Please note that you cannot use both USB ports at the same time.
----
**_I can not load game files from the DVD, an error message occurs saying it can not be mounted or no valid DVD was found._**
First, make sure the DVD has been formatted in the expected format (ISO9960/Joliet). Then, your console must be able to read burned DVD: on a non-chipped Wii, you should use the Homebrew Channel and the provided meta.xml file, which enables full access to the DVD drive, without requiring a modchip.
Please note that on most recent Wii models, it is impossible to enable DVD access anymore.
----
**_Well, I can access my device but I can't see all my game files, what is happening ?_**
Because of memory limitations, the emulator only lists up to 1000 game files per directory. This should be more than enough for anybody but if you have a larger "collection", it is highly advised to arrange your files within subdirectories, which also increase the speed and the usability of the file browser.
----
**_When I load a game, nothing happen. I can return to the emulator menu but the game does not play or make the emulator crash._**
You probably tried to load an unsupported game file. The emulator only supports valid Genesis / Mega Drive (.bin, .gen, .md, .smd, .mdx), Master System (.sms), Game Gear (.gg), SG-1000 (.sg) ROM files or Sega/Mega CD image files (.bin, .iso, .cue). ROM files (not CD image files !) can be zipped but make sure there is only one file per .zip archive. Also note that .rar or .7z files are NOT supported.
Lastly, make sure you are only using verified dumps: bad dumps, hacked or fixed image files are subject to crash, even on real hardware, so just get ride of them.
----
**_I'm trying to load a CD game but I got an error message telling me the file is too big_**
This happen if the file you are trying to load is not recognized as a valid Sega / Mega CD image. Please make sure you are only loading valid .iso or .bin files (or a .cue file pointing to a valid .iso / .bin file). Compressed image (such as .rar, .zip, .7z, etc) are NOT supported for CD emulation, you must decompress them first. Also make sure the game you are trying to load is really a Sega / Mega CD game (you wouldn't believe the amount of people trying to load Saturn games !)
----
**_I can hear the sound of the game I loaded but nothing is displayed but a black or distorted screen._**
You are most likely using invalid video settings. Try deleting the configuration file (config.ini) and restart the emulator. If that does not help, try changing the following options, Display and TV Mode, and see if that fixes the issue.
----
**_I try to load a CD game but there is no audio at all, only sound effects most of the time._**
It means you did not load a CD image with valid CD-DA tracks informations. You can confirm that by entering the CD Boot menu when resetting the game (press A to enter Boot menu) and seeing the number of tracks is stuck to 99 (max). Keep in mind that if you are using an ISO file with external audio files, only 44100hz stereo 16-bit WAV or OGG audio files are supported and you must either name them accordingly or use an associated CUE file. When using a BIN file, an associated CUE file is needed if you want to hear audio tracks. Have a look in the README for more details about supported CD image & audio tracks format and how you should load them. Also note that many games will lock or crash at some points if the expected number and lengths of audio tracks is not respected.
----
**_Well, I can hear audio tracks and the CD Boot menu show them all but the sound is buggy/scratched/distorted._**
It is most likely due to audio files themselves. Play them on a computer with another media player to check if there are correct. Many CD rips you can find online are either corrupt or incomplete, you might want to use verified good disc dumps.
----
**_When playing CD games, I randomly experiment some slowdowns or short freezes with audio and/or video._**
Sega/Mega CD emulation is quite CPU consuming and all in all, there is only short time allowed to the emulator to read data from the disc image. Since disc images are continuously accessed from the loading device (SD, USB, DVD), slow or inconsistent device accesses will likely cause bottlenecks in emulator processing. There is no much solutions beside using faster devices and, for USB drives, to make sure IOS58 is loaded when the emulator starts and USB2 mode is enabled.
----
**_How can I use my Classic Controller, Nunchuk, etc ? It is connected to my Wii Remote but it does not respond in games._**
You must first configure the type of controller you want to use for each player. Go to controller settings, pick one of the player and change the affected device. Don't forget to change it back if you disconnect the expansion controller.
----
**_How can I play with the gun in Snatcher ? I successfully calibrated it using the wiimote when the game is started but it does not aim correctly during the game_**
The calibration routine in Snatcher is kinda bugged, or more exactly, it worked with a real gun because the original Justifiers were relatively imprecise so you wouldn't really notice if it doesn't really aim the center of the screen. The solution is simply not to use the calibration option AT ALL, the default configuration works fine in-game and aims perfectly where the wiimote is pointing.
----
**_My second Wii remote controller is not detected by the emulator. How can i play 2 players games ?_**
Any additional Wii remote must be permanently registered in your Wii system settings, otherwise it cannot be detected by homebrew applications. Go back to the Wii system menu and register each Wii remote using the red SYNC buttons, as explained in your Wii user manual.
----
**_I'm trying to use ??? feature and have put all the required files as described in the User Manual but it doesn't seem to work. What am I doing wrong ?_**
Make sure you disable the "Hide Known Extension" feature in your OS then verify again if the required files have the proper name and extension.
----
**_How can I play 32X games in this emulator ?_**
You can't. This program currently only emulates SG-1000, Master System, Game Gear, Genesis / Mega Drive & Sega/Mega CD hardware, including existing backward compatibility modes. Other systems might be added in the future but it's actually not high priority.
----
**_Hey, I have a very original idea. What about adding a cool feature like (insert anything) ? I think the emulator would be perfect with that feature._**
You can always make an enhancement request in the Issue page on this site. However, if something has not been implemented yet, it has very likely a good reason not to be. Some stuff need time to work on, while others are simply no interest to me. As a general rule, I prefer focusing myself on the emulation core rather than features only designed to make the emulator interface "cooler" or "easier" to use.
----

64
wiki/Getting Started.md Normal file
View File

@ -0,0 +1,64 @@
## How to start the emulator ##
Gamecube and Wii applications usually come in the form of .dol files.
Once you have downloaded and decompressed the archive, you should get two versions of the emulator:
* genplus_cube.dol is the application running in Gamecube mode.
This can be loaded on a Game Cube by using various methods: see http://www.gc-linux.org/wiki/Getting_Started#Booting_Code for more details.
* genplus_wii.dol is the application running in Wii mode.
The easiest way to run the emulator on a Wii is to install the [Homebrew Channel](http://hbc.hackmii.com/). Once you are done, simply copy the /apps directory (included with this release) and its content to the root of your SD card or USB drive.
There are other ways to run dol files on the Wii like building a dedicated channel or using an alternate DOL loader. Feel free to visit http://www.wiibrew.org for additional information.
----
## How to use the emulator ##
Genesis Plus GX supports Mega Drive / Genesis, Master System, Game Gear & SG-1000 ROM files and Sega/Mega CD image files. Supported ROM files must come in the form of RAW .bin, .ison .gen, .md, .smd, .mdx, .sms, .gg & .sg files. Compressed .zip files (for ROM files only) are also supported as long as they contain a single ROM file in one of the supported format.
To play a game, you first need to load a ROM file from one of the supported devices: you can either load it from DVD, SD card or USB drive (Wii only).
There is a limit of 1000 ROM files per directory so it's strongly advised to create subdirectories. Reducing the number of ROM files per directory also improves menu interface speed and usability.
For Sega / Mega CD emulation, original BIOS files are needed for each console region: the emulator expects BIOS ROM files to be respectively named BIOS_CD_J.bin, BIOS_CD_U.bin and BIOS_CD_E.bin and placed in /genplus/bios/ directory on the default FAT device. It should not matter what BIOS versions you are using but it is recommended, for best compatibility, to use Model 1 BIOS ROM image files.
### from SD ###
The SD card should be formatted to FAT (FAT16 or FAT32). If not found, the emulator automatically creates a directory named “/genplus” at the root of your SD card, as well as subdirectories required by the emulator to store miscellaneous files (cheat, save & screenshot files).
By default, the emulator will look for files in the sd:/genplus/roms directory but you can place them anywhere you want, the menu keeping trace of the last accessed directory for each device.
### from USB (Wii only) ###
The USB drive should have at least one partition formatted to FAT (FAT16 or FAT32), other file systems (NTFS, EXT2, etc) are not supported. If no SD card is inserted when the emulator starts, it automatically creates a directory named “/genplus” at the root of your USB drive partition, as well as subdirectories required by the emulator to store miscellaneous files (cheat, save & screenshot files).
By default, the emulator will look for files in the usb:/genplus/roms directory but you can place them anywhere you want, the menu keeping trace of the last accessed directory for each device and for each file types.
To use an USB2 drive, you must have IOS58 installed (it should be automatically installed with System Menu 4.3 update). You should also load the emulator through the Homebrew Channel, using the provided meta.xml file and make sure Homebrew Channel is using IOS58 as default IOS. If not, you might need to reinstall Homebrew Channel after having installed IOS58.
### from DVD ###
The DVD should be formatted using ISO9660/Joliet (refer to the user manual of your DVD Burning software for more details). The Game Cube Mini-DVD drive allows up to 1.35GB of data while the Wii DVD drive allows up to 4.7GB of data (simple-layer).
By default, the emulator will look for files at the root of your DVD but you can place them anywhere you want, the menu keeping trace of the last accessed directory for each device and for each file types.
To use DVD on a non-chipped Wii, you should load the emulator through the Homebrew Channel and use the provided meta.xml file, in order to allow full access to the DVD drive.
----
*Please report to the included [User Manual](https://github.com/ekeeke/Genesis-Plus-GX/blob/master/gx/docs/README.pdf) for additional informations.*