├── .gitignore ├── HISTORY.txt ├── LICENSE.txt ├── Makefile.gc ├── Makefile.libretro ├── Makefile.wii ├── README.md ├── builds ├── genesis_plus_gx_libretro.dll ├── genplus_cube.dol └── genplus_wii.dol ├── core ├── cart_hw │ ├── areplay.c │ ├── areplay.h │ ├── eeprom_93c.c │ ├── eeprom_93c.h │ ├── eeprom_i2c.c │ ├── eeprom_i2c.h │ ├── eeprom_spi.c │ ├── eeprom_spi.h │ ├── ggenie.c │ ├── ggenie.h │ ├── md_cart.c │ ├── md_cart.h │ ├── sms_cart.c │ ├── sms_cart.h │ ├── sram.c │ ├── sram.h │ └── svp │ │ ├── imageformat.txt │ │ ├── ssp16.c │ │ ├── ssp16.h │ │ ├── svp.c │ │ ├── svp.h │ │ └── svpdoc.txt ├── cd_hw │ ├── cd_cart.c │ ├── cd_cart.h │ ├── cdc.c │ ├── cdc.h │ ├── cdd.c │ ├── cdd.h │ ├── gfx.c │ ├── gfx.h │ ├── pcm.c │ ├── pcm.h │ ├── scd.c │ └── scd.h ├── genesis.c ├── genesis.h ├── hvc.h ├── input_hw │ ├── activator.c │ ├── activator.h │ ├── gamepad.c │ ├── gamepad.h │ ├── graphic_board.c │ ├── graphic_board.h │ ├── input.c │ ├── input.h │ ├── lightgun.c │ ├── lightgun.h │ ├── mouse.c │ ├── mouse.h │ ├── paddle.c │ ├── paddle.h │ ├── sportspad.c │ ├── sportspad.h │ ├── teamplayer.c │ ├── teamplayer.h │ ├── terebi_oekaki.c │ ├── terebi_oekaki.h │ ├── xe_1ap.c │ └── xe_1ap.h ├── io_ctrl.c ├── io_ctrl.h ├── loadrom.c ├── loadrom.h ├── m68k │ ├── m68k.h │ ├── m68kconf.h │ ├── m68kcpu.c │ ├── m68kcpu.h │ ├── m68ki_cycles.h │ ├── m68ki_instruction_jump_table.h │ ├── m68kops.h │ ├── readme.txt │ ├── s68kconf.h │ ├── s68kcpu.c │ └── s68ki_cycles.h ├── macros.h ├── mem68k.c ├── mem68k.h ├── membnk.c ├── membnk.h ├── memz80.c ├── memz80.h ├── ntsc │ ├── changes.txt │ ├── license.txt │ ├── md_ntsc.c │ ├── md_ntsc.h │ ├── md_ntsc_config.h │ ├── md_ntsc_impl.h │ ├── readme.txt │ ├── sms_ntsc.c │ ├── sms_ntsc.h │ ├── sms_ntsc.txt │ ├── sms_ntsc_config.h │ └── sms_ntsc_impl.h ├── shared.h ├── sound │ ├── blip_buf.c │ ├── blip_buf.h │ ├── eq.c │ ├── eq.h │ ├── sn76489.c │ ├── sn76489.h │ ├── sound.c │ ├── sound.h │ ├── ym2413.c │ ├── ym2413.h │ ├── ym2612.c │ └── ym2612.h ├── state.c ├── state.h ├── system.c ├── system.h ├── tremor │ ├── CHANGELOG │ ├── COPYING │ ├── README │ ├── Version_script.in │ ├── asm_arm.h │ ├── backends.h │ ├── bitwise.c │ ├── block.c │ ├── block.h │ ├── codebook.c │ ├── codebook.h │ ├── codec_internal.h │ ├── config_types.h │ ├── configure.in │ ├── floor0.c │ ├── floor1.c │ ├── framing.c │ ├── info.c │ ├── ivorbiscodec.h │ ├── ivorbisfile.h │ ├── lsp_lookup.h │ ├── mapping0.c │ ├── mdct.c │ ├── mdct.h │ ├── mdct_lookup.h │ ├── misc.h │ ├── ogg.h │ ├── os.h │ ├── os_types.h │ ├── registry.c │ ├── registry.h │ ├── res012.c │ ├── sharedbook.c │ ├── synthesis.c │ ├── vorbisfile.c │ ├── window.c │ ├── window.h │ └── window_lookup.h ├── types.h ├── vdp_ctrl.c ├── vdp_ctrl.h ├── vdp_render.c ├── vdp_render.h └── z80 │ ├── osd_cpu.h │ ├── z80.c │ └── z80.h ├── gcw0 ├── Makefile ├── config.c ├── config.h ├── error.c ├── error.h ├── fileio.c ├── fileio.h ├── main.c ├── main.h ├── opk-data │ ├── CLASSIC_01.png │ ├── CLASSIC_01_RED.png │ ├── CLASSIC_02.png │ ├── GG.png │ ├── LICENSE.txt │ ├── MCD.png │ ├── MD.png │ ├── PICO.png │ ├── ProggyTiny.ttf │ ├── SG1000.png │ ├── SMS.png │ ├── SQUARE_02.png │ ├── default.gcw0.desktop │ ├── gcw0readme.txt │ └── scanlines.png ├── opk_build.sh ├── osd.h ├── unzip.c ├── unzip.h ├── utils.c └── utils.h ├── gx ├── config.c ├── config.h ├── fileio │ ├── file_load.c │ ├── file_load.h │ ├── file_slot.c │ ├── file_slot.h │ ├── fileio.c │ ├── fileio.h │ ├── history.c │ └── history.h ├── gui │ ├── cheats.c │ ├── cheats.h │ ├── filesel.c │ ├── filesel.h │ ├── font.c │ ├── font.h │ ├── gui.c │ ├── gui.h │ ├── legal.c │ ├── menu.c │ ├── menu.h │ └── saveicon.h ├── gx_audio.c ├── gx_audio.h ├── gx_input.c ├── gx_input.h ├── gx_video.c ├── gx_video.h ├── images │ ├── Banner_bottom.png │ ├── Banner_main.png │ ├── Banner_top.png │ ├── Bg_credits.png │ ├── Bg_intro_c1.png │ ├── Bg_intro_c2.png │ ├── Bg_intro_c3.png │ ├── Bg_intro_c4.png │ ├── Bg_layer.png │ ├── Bg_overlay.png │ ├── Browser_dir.png │ ├── Button_arrow.png │ ├── Button_arrow_over.png │ ├── Button_delete.png │ ├── Button_delete_over.png │ ├── Button_digit.png │ ├── Button_digit_over.png │ ├── Button_down.png │ ├── Button_down_over.png │ ├── Button_icon.png │ ├── Button_icon_over.png │ ├── Button_icon_sm.png │ ├── Button_icon_sm_over.png │ ├── Button_load.png │ ├── Button_load_over.png │ ├── Button_save.png │ ├── Button_save_over.png │ ├── Button_sm_blue.png │ ├── Button_sm_grey.png │ ├── Button_sm_yellow.png │ ├── Button_special.png │ ├── Button_special_over.png │ ├── Button_text.png │ ├── Button_text_over.png │ ├── Button_up.png │ ├── Button_up_over.png │ ├── CD_access_off.png │ ├── CD_access_on.png │ ├── CD_ready_off.png │ ├── CD_ready_on.png │ ├── Cart_gg.png │ ├── Cart_md.png │ ├── Cart_ms.png │ ├── Cart_sg.png │ ├── Crosshair_p1.png │ ├── Crosshair_p2.png │ ├── Ctrl_4wayplay.png │ ├── Ctrl_activator.png │ ├── Ctrl_config.png │ ├── Ctrl_gamepad.png │ ├── Ctrl_graphic_board.png │ ├── Ctrl_justifiers.png │ ├── Ctrl_lightphaser.png │ ├── Ctrl_mastertap.png │ ├── Ctrl_menacer.png │ ├── Ctrl_mouse.png │ ├── Ctrl_none.png │ ├── Ctrl_pad2b.png │ ├── Ctrl_pad3b.png │ ├── Ctrl_pad6b.png │ ├── Ctrl_pad_auto.png │ ├── Ctrl_paddle.png │ ├── Ctrl_sportspad.png │ ├── Ctrl_teamplayer.png │ ├── Ctrl_xe_1ap.png │ ├── Frame_s1.png │ ├── Frame_s1_title.png │ ├── Frame_s2.png │ ├── Frame_s2_title.png │ ├── Frame_s3.png │ ├── Frame_throbber.png │ ├── Key_A_gcn.png │ ├── Key_A_wii.png │ ├── Key_B_gcn.png │ ├── Key_B_wii.png │ ├── Key_DPAD.png │ ├── Key_L_gcn.png │ ├── Key_Minus_wii.png │ ├── Key_Plus_wii.png │ ├── Key_R_gcn.png │ ├── Load_cd.png │ ├── Load_gg.png │ ├── Load_md.png │ ├── Load_ms.png │ ├── Load_recent.png │ ├── Load_sg.png │ ├── Main_cheats.png │ ├── Main_file.png │ ├── Main_load.png │ ├── Main_logo.png │ ├── Main_options.png │ ├── Main_play_gcn.png │ ├── Main_play_wii.png │ ├── Main_quit.png │ ├── Main_reset.png │ ├── Main_showinfo.png │ ├── Main_takeshot.png │ ├── Option_ctrl.png │ ├── Option_menu.png │ ├── Option_sound.png │ ├── Option_system.png │ ├── Option_video.png │ ├── Overlay_bar.png │ ├── Snap_empty.png │ ├── Star_empty.png │ ├── Star_full.png │ ├── ctrl_classic.png │ ├── ctrl_gamecube.png │ ├── ctrl_nunchuk.png │ ├── ctrl_option_off.png │ ├── ctrl_option_on.png │ ├── ctrl_wiimote.png │ └── generic_point.png ├── main.c ├── osd.h ├── sounds │ ├── button_over.pcm │ ├── button_select.pcm │ └── intro.pcm └── utils │ ├── oggplayer.c │ ├── oggplayer.h │ ├── vi_encoder.c │ ├── vi_encoder.h │ └── wrap_wiiuse.c ├── libretro ├── Makefile.common ├── debian │ ├── changelog │ ├── compat │ ├── control │ ├── copyright │ ├── dirs │ ├── rules │ └── source │ │ └── format ├── jni │ ├── Android.mk │ └── Application.mk ├── libretro.c ├── libretro.h ├── link.T ├── msvc │ ├── msvc-2003-xbox1.bat │ ├── msvc-2003-xbox1.sln │ ├── msvc-2003-xbox1 │ │ ├── msvc-2003-xbox1.vcproj │ │ └── stdint.h │ ├── msvc-2010-360.bat │ ├── msvc-2010-360.sln │ ├── msvc-2010-360 │ │ ├── msvc-2010-360.vcxproj │ │ └── msvc-2010-360.vcxproj.filters │ ├── msvc-2010.bat │ ├── msvc-2010.sln │ └── msvc-2010 │ │ ├── libretro.def │ │ ├── msvc-2010.vcxproj │ │ └── msvc-2010.vcxproj.filters ├── osd.h ├── scrc32.c └── scrc32.h ├── psp2 ├── Makefile ├── config.c ├── config.h ├── db.json ├── emumain.c ├── emumain.h ├── error.c ├── error.h ├── fileio.c ├── fileio.h ├── main.c ├── main.h ├── menu.c ├── menu.h ├── osd.h ├── unzip.c └── unzip.h └── sdl ├── CHANGELOG.txt ├── Makefile ├── README.txt ├── config.c ├── config.h ├── error.c ├── error.h ├── fileio.c ├── fileio.h ├── icon.rc ├── main.c ├── main.h ├── md.ico ├── osd.h ├── readme-sdl.txt ├── unzip.c └── unzip.h /.gitignore: -------------------------------------------------------------------------------- 1 | psp2/*.o 2 | psp2/*.elf 3 | psp2/*.velf 4 | psp2/build_vita/* 5 | psp2/*.a 6 | -------------------------------------------------------------------------------- /HISTORY.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/HISTORY.txt -------------------------------------------------------------------------------- /builds/genesis_plus_gx_libretro.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/builds/genesis_plus_gx_libretro.dll -------------------------------------------------------------------------------- /builds/genplus_cube.dol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/builds/genplus_cube.dol -------------------------------------------------------------------------------- /builds/genplus_wii.dol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/builds/genplus_wii.dol -------------------------------------------------------------------------------- /core/cart_hw/areplay.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Genesis Plus 3 | * DATEL Action Replay / Pro Action Replay emulation 4 | * 5 | * Copyright (C) 2009-2014 Eke-Eke (Genesis Plus GX) 6 | * 7 | * Redistribution and use of this code or any derivative works are permitted 8 | * provided that the following conditions are met: 9 | * 10 | * - Redistributions may not be sold, nor may they be used in a commercial 11 | * product or activity. 12 | * 13 | * - Redistributions that are modified from the original source must include the 14 | * complete source code, including the source code for all components used by a 15 | * binary built from the modified sources. However, as a special exception, the 16 | * source code distributed need not include anything that is normally distributed 17 | * (in either source or binary form) with the major components (compiler, kernel, 18 | * and so on) of the operating system on which the executable runs, unless that 19 | * component itself accompanies the executable. 20 | * 21 | * - Redistributions must reproduce the above copyright notice, this list of 22 | * conditions and the following disclaimer in the documentation and/or other 23 | * materials provided with the distribution. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 29 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 | * POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | ****************************************************************************************/ 38 | 39 | #ifndef _AREPLAY_H_ 40 | #define _AREPLAY_H_ 41 | 42 | #define AR_SWITCH_OFF (0) 43 | #define AR_SWITCH_ON (1) 44 | #define AR_SWITCH_TRAINER (2) 45 | 46 | extern void areplay_init(void); 47 | extern void areplay_shutdown(void); 48 | extern void areplay_reset(int hard); 49 | extern void areplay_set_status(int status); 50 | extern int areplay_get_status(void); 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /core/cart_hw/eeprom_93c.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Genesis Plus 3 | * Microwire Serial EEPROM (93C46 only) support 4 | * 5 | * Copyright (C) 2011 Eke-Eke (Genesis Plus GX) 6 | * 7 | * Redistribution and use of this code or any derivative works are permitted 8 | * provided that the following conditions are met: 9 | * 10 | * - Redistributions may not be sold, nor may they be used in a commercial 11 | * product or activity. 12 | * 13 | * - Redistributions that are modified from the original source must include the 14 | * complete source code, including the source code for all components used by a 15 | * binary built from the modified sources. However, as a special exception, the 16 | * source code distributed need not include anything that is normally distributed 17 | * (in either source or binary form) with the major components (compiler, kernel, 18 | * and so on) of the operating system on which the executable runs, unless that 19 | * component itself accompanies the executable. 20 | * 21 | * - Redistributions must reproduce the above copyright notice, this list of 22 | * conditions and the following disclaimer in the documentation and/or other 23 | * materials provided with the distribution. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 29 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 | * POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | ****************************************************************************************/ 38 | 39 | #ifndef _EEPROM_93C_H_ 40 | #define _EEPROM_93C_H_ 41 | 42 | typedef enum 43 | { 44 | WAIT_STANDBY, 45 | WAIT_START, 46 | GET_OPCODE, 47 | WRITE_WORD, 48 | READ_WORD 49 | } T_STATE_93C; 50 | 51 | typedef struct 52 | { 53 | uint8 enabled; /* 1: chip enabled */ 54 | uint8 cs; /* CHIP SELECT line state */ 55 | uint8 clk; /* CLK line state */ 56 | uint8 data; /* DATA OUT line state */ 57 | uint8 cycles; /* current operation cycle */ 58 | uint8 we; /* 1: write enabled */ 59 | uint8 opcode; /* 8-bit opcode + address */ 60 | uint16 buffer; /* 16-bit data buffer */ 61 | T_STATE_93C state; /* current operation state */ 62 | } T_EEPROM_93C; 63 | 64 | /* global variables */ 65 | extern T_EEPROM_93C eeprom_93c; 66 | 67 | /* Function prototypes */ 68 | extern void eeprom_93c_init(); 69 | extern void eeprom_93c_write(unsigned char data); 70 | extern unsigned char eeprom_93c_read(void); 71 | 72 | #endif 73 | -------------------------------------------------------------------------------- /core/cart_hw/eeprom_i2c.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Genesis Plus 3 | * I2C Serial EEPROM (24Cxx) boards 4 | * 5 | * Copyright (C) 2007-2016 Eke-Eke (Genesis Plus GX) 6 | * 7 | * Redistribution and use of this code or any derivative works are permitted 8 | * provided that the following conditions are met: 9 | * 10 | * - Redistributions may not be sold, nor may they be used in a commercial 11 | * product or activity. 12 | * 13 | * - Redistributions that are modified from the original source must include the 14 | * complete source code, including the source code for all components used by a 15 | * binary built from the modified sources. However, as a special exception, the 16 | * source code distributed need not include anything that is normally distributed 17 | * (in either source or binary form) with the major components (compiler, kernel, 18 | * and so on) of the operating system on which the executable runs, unless that 19 | * component itself accompanies the executable. 20 | * 21 | * - Redistributions must reproduce the above copyright notice, this list of 22 | * conditions and the following disclaimer in the documentation and/or other 23 | * materials provided with the distribution. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 29 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 | * POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | ****************************************************************************************/ 38 | 39 | #ifndef _EEPROM_I2C_H_ 40 | #define _EEPROM_I2C_H_ 41 | 42 | /* Function prototypes */ 43 | extern void eeprom_i2c_init(); 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /core/cart_hw/eeprom_spi.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Genesis Plus 3 | * SPI Serial EEPROM (25XX512 only) support 4 | * 5 | * Copyright (C) 2012 Eke-Eke (Genesis Plus GX) 6 | * 7 | * Redistribution and use of this code or any derivative works are permitted 8 | * provided that the following conditions are met: 9 | * 10 | * - Redistributions may not be sold, nor may they be used in a commercial 11 | * product or activity. 12 | * 13 | * - Redistributions that are modified from the original source must include the 14 | * complete source code, including the source code for all components used by a 15 | * binary built from the modified sources. However, as a special exception, the 16 | * source code distributed need not include anything that is normally distributed 17 | * (in either source or binary form) with the major components (compiler, kernel, 18 | * and so on) of the operating system on which the executable runs, unless that 19 | * component itself accompanies the executable. 20 | * 21 | * - Redistributions must reproduce the above copyright notice, this list of 22 | * conditions and the following disclaimer in the documentation and/or other 23 | * materials provided with the distribution. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 29 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 | * POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | ****************************************************************************************/ 38 | 39 | #ifndef _EEPROM_SPI_H_ 40 | #define _EEPROM_SPI_H_ 41 | 42 | /* Function prototypes */ 43 | extern void eeprom_spi_init(); 44 | extern void eeprom_spi_write(unsigned char data); 45 | extern unsigned int eeprom_spi_read(unsigned int address); 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /core/cart_hw/ggenie.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Genesis Plus 3 | * Game Genie Hardware emulation 4 | * 5 | * Copyright (C) 2009-2014 Eke-Eke (Genesis Plus GX) 6 | * 7 | * Based on documentation from Charles McDonald 8 | * (http://cgfm2.emuviews.com/txt/genie.txt) 9 | * 10 | * Redistribution and use of this code or any derivative works are permitted 11 | * provided that the following conditions are met: 12 | * 13 | * - Redistributions may not be sold, nor may they be used in a commercial 14 | * product or activity. 15 | * 16 | * - Redistributions that are modified from the original source must include the 17 | * complete source code, including the source code for all components used by a 18 | * binary built from the modified sources. However, as a special exception, the 19 | * source code distributed need not include anything that is normally distributed 20 | * (in either source or binary form) with the major components (compiler, kernel, 21 | * and so on) of the operating system on which the executable runs, unless that 22 | * component itself accompanies the executable. 23 | * 24 | * - Redistributions must reproduce the above copyright notice, this list of 25 | * conditions and the following disclaimer in the documentation and/or other 26 | * materials provided with the distribution. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 29 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 30 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 31 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 32 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 33 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 34 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 35 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 36 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 37 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | ****************************************************************************************/ 41 | 42 | #ifndef _GGENIE_H_ 43 | #define _GGENIE_H_ 44 | 45 | /* Function prototypes */ 46 | extern void ggenie_init(void); 47 | extern void ggenie_shutdown(void); 48 | extern void ggenie_reset(int hard); 49 | extern void ggenie_switch(int enable); 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /core/cart_hw/sms_cart.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/core/cart_hw/sms_cart.c -------------------------------------------------------------------------------- /core/cart_hw/sms_cart.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Genesis Plus 3 | * SG-1000, Master System & Game Gear cartridge hardware support 4 | * 5 | * Copyright (C) 2007-2016 Eke-Eke (Genesis Plus GX) 6 | * 7 | * Redistribution and use of this code or any derivative works are permitted 8 | * provided that the following conditions are met: 9 | * 10 | * - Redistributions may not be sold, nor may they be used in a commercial 11 | * product or activity. 12 | * 13 | * - Redistributions that are modified from the original source must include the 14 | * complete source code, including the source code for all components used by a 15 | * binary built from the modified sources. However, as a special exception, the 16 | * source code distributed need not include anything that is normally distributed 17 | * (in either source or binary form) with the major components (compiler, kernel, 18 | * and so on) of the operating system on which the executable runs, unless that 19 | * component itself accompanies the executable. 20 | * 21 | * - Redistributions must reproduce the above copyright notice, this list of 22 | * conditions and the following disclaimer in the documentation and/or other 23 | * materials provided with the distribution. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 29 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 | * POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | ****************************************************************************************/ 38 | 39 | #ifndef _SMS_CART_H_ 40 | #define _SMS_CART_H_ 41 | 42 | /* Special hardware */ 43 | #define HW_3D_GLASSES 0x01 44 | #define HW_TEREBI_OEKAKI 0x02 45 | 46 | /* Function prototypes */ 47 | extern void sms_cart_init(void); 48 | extern void sms_cart_reset(void); 49 | extern void sms_cart_switch(uint8 mode); 50 | extern int sms_cart_region_detect(void); 51 | extern int sms_cart_context_save(uint8 *state); 52 | extern int sms_cart_context_load(uint8 *state); 53 | 54 | #endif 55 | 56 | 57 | -------------------------------------------------------------------------------- /core/cart_hw/sram.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************************** 2 | * Genesis Plus 3 | * Backup RAM support 4 | * 5 | * Copyright (C) 2007-2013 Eke-Eke (Genesis Plus GX) 6 | * 7 | * Redistribution and use of this code or any derivative works are permitted 8 | * provided that the following conditions are met: 9 | * 10 | * - Redistributions may not be sold, nor may they be used in a commercial 11 | * product or activity. 12 | * 13 | * - Redistributions that are modified from the original source must include the 14 | * complete source code, including the source code for all components used by a 15 | * binary built from the modified sources. However, as a special exception, the 16 | * source code distributed need not include anything that is normally distributed 17 | * (in either source or binary form) with the major components (compiler, kernel, 18 | * and so on) of the operating system on which the executable runs, unless that 19 | * component itself accompanies the executable. 20 | * 21 | * - Redistributions must reproduce the above copyright notice, this list of 22 | * conditions and the following disclaimer in the documentation and/or other 23 | * materials provided with the distribution. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 29 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 | * POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | ****************************************************************************************/ 38 | 39 | #ifndef _SRAM_H_ 40 | #define _SRAM_H_ 41 | 42 | typedef struct 43 | { 44 | uint8 detected; 45 | uint8 on; 46 | uint8 custom; 47 | uint32 start; 48 | uint32 end; 49 | uint32 crc; 50 | uint8 *sram; 51 | } T_SRAM; 52 | 53 | /* Function prototypes */ 54 | extern void sram_init(); 55 | extern unsigned int sram_read_byte(unsigned int address); 56 | extern unsigned int sram_read_word(unsigned int address); 57 | extern void sram_write_byte(unsigned int address, unsigned int data); 58 | extern void sram_write_word(unsigned int address, unsigned int data); 59 | 60 | /* global variables */ 61 | extern T_SRAM sram; 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /core/cart_hw/svp/ssp16.h: -------------------------------------------------------------------------------- 1 | /* 2 | basic, incomplete SSP160x (SSP1601?) interpreter 3 | with SVP memory controller emu 4 | 5 | (c) Copyright 2008, Grazvydas "notaz" Ignotas 6 | Free for non-commercial use. 7 | 8 | For commercial use, separate licencing terms must be obtained. 9 | 10 | Modified for Genesis Plus GX (Eke-Eke): added BIG ENDIAN support, fixed addr/code inversion 11 | */ 12 | 13 | #ifndef _SSP16_H_ 14 | #define _SSP16_H_ 15 | 16 | /* emulation event logging (from Picodrive) */ 17 | #ifdef LOG_SVP 18 | #define EL_SVP 0x00004000 /* SVP stuff */ 19 | #define EL_ANOMALY 0x80000000 /* some unexpected conditions (during emulation) */ 20 | #define elprintf(w,f,...) error("%d(%d): " f "\n",frame_count,v_counter,##__VA_ARGS__); 21 | #endif 22 | 23 | /* register names */ 24 | enum { 25 | SSP_GR0, SSP_X, SSP_Y, SSP_A, 26 | SSP_ST, SSP_STACK, SSP_PC, SSP_P, 27 | SSP_PM0, SSP_PM1, SSP_PM2, SSP_XST, 28 | SSP_PM4, SSP_gr13, SSP_PMC, SSP_AL 29 | }; 30 | 31 | typedef union 32 | { 33 | unsigned int v; 34 | struct { 35 | #ifdef LSB_FIRST 36 | unsigned short l; 37 | unsigned short h; 38 | #else 39 | unsigned short h; 40 | unsigned short l; 41 | #endif 42 | } byte; 43 | } ssp_reg_t; 44 | 45 | typedef struct 46 | { 47 | union { 48 | unsigned short RAM[256*2]; /* 2 internal RAM banks */ 49 | struct { 50 | unsigned short RAM0[256]; 51 | unsigned short RAM1[256]; 52 | } bank; 53 | } mem; 54 | ssp_reg_t gr[16]; /* general registers */ 55 | union { 56 | unsigned char r[8]; /* BANK pointers */ 57 | struct { 58 | unsigned char r0[4]; 59 | unsigned char r1[4]; 60 | } bank; 61 | } ptr; 62 | unsigned short stack[6]; 63 | unsigned int pmac[2][6]; /* read/write modes/addrs for PM0-PM5 */ 64 | #define SSP_PMC_HAVE_ADDR 0x0001 /* address written to PMAC, waiting for mode */ 65 | #define SSP_PMC_SET 0x0002 /* PMAC is set */ 66 | #define SSP_HANG 0x1000 /* 68000 hangs SVP */ 67 | #define SSP_WAIT_PM0 0x2000 /* bit1 in PM0 */ 68 | #define SSP_WAIT_30FE06 0x4000 /* ssp tight loops on 30FE08 to become non-zero */ 69 | #define SSP_WAIT_30FE08 0x8000 /* same for 30FE06 */ 70 | #define SSP_WAIT_MASK 0xf000 71 | unsigned int emu_status; 72 | unsigned int pad[30]; 73 | } ssp1601_t; 74 | 75 | 76 | void ssp1601_reset(ssp1601_t *ssp); 77 | void ssp1601_run(int cycles); 78 | 79 | #endif 80 | -------------------------------------------------------------------------------- /core/cart_hw/svp/svp.c: -------------------------------------------------------------------------------- 1 | /* 2 | basic, incomplete SSP160x (SSP1601?) interpreter 3 | with SVP memory controller emu 4 | 5 | (c) Copyright 2008, Grazvydas "notaz" Ignotas 6 | Free for non-commercial use. 7 | 8 | For commercial use, separate licencing terms must be obtained. 9 | 10 | Modified for Genesis Plus GX (Eke-Eke): added BIG ENDIAN support, fixed addr/code inversion 11 | */ 12 | 13 | #include "shared.h" 14 | 15 | svp_t *svp; 16 | 17 | static void svp_write_dram(uint32 address, uint32 data) 18 | { 19 | *(uint16 *)(svp->dram + (address & 0x1fffe)) = data; 20 | if (data) 21 | { 22 | if (address == 0x30fe06) svp->ssp1601.emu_status &= ~SSP_WAIT_30FE06; 23 | else if (address == 0x30fe08) svp->ssp1601.emu_status &= ~SSP_WAIT_30FE08; 24 | } 25 | } 26 | 27 | static uint32 svp_read_cell_1(uint32 address) 28 | { 29 | address = (address & 0xe002) | ((address & 0x7c) << 6) | ((address & 0x1f80) >> 5); 30 | return *(uint16 *)(svp->dram + address); 31 | } 32 | 33 | static uint32 svp_read_cell_2(uint32 address) 34 | { 35 | address = (address & 0xf002) | ((address & 0x3c) << 6) | ((address & 0xfc0) >> 4); 36 | return *(uint16 *)(svp->dram + address); 37 | } 38 | 39 | static uint32 svp_read_cell_byte(uint32 address) 40 | { 41 | uint16 data = m68k.memory_map[address >> 16].read16(address); 42 | 43 | if (address & 0x01) 44 | { 45 | return (data & 0xff); 46 | } 47 | 48 | return (data >> 8); 49 | } 50 | 51 | void svp_init(void) 52 | { 53 | svp = (void *) ((char *)cart.rom + 0x200000); 54 | memset(svp, 0, sizeof(*svp)); 55 | 56 | m68k.memory_map[0x30].base = svp->dram; 57 | m68k.memory_map[0x30].read8 = NULL; 58 | m68k.memory_map[0x30].read16 = NULL; 59 | m68k.memory_map[0x30].write8 = NULL; 60 | m68k.memory_map[0x30].write16 = svp_write_dram; 61 | zbank_memory_map[0x30].read = NULL; 62 | zbank_memory_map[0x30].write = NULL; 63 | 64 | m68k.memory_map[0x31].base = svp->dram + 0x10000; 65 | m68k.memory_map[0x31].read8 = NULL; 66 | m68k.memory_map[0x31].read16 = NULL; 67 | m68k.memory_map[0x31].write8 = NULL; 68 | m68k.memory_map[0x31].write16 = NULL; 69 | zbank_memory_map[0x31].read = NULL; 70 | zbank_memory_map[0x31].write = NULL; 71 | 72 | m68k.memory_map[0x39].read8 = svp_read_cell_byte; 73 | m68k.memory_map[0x39].read16 = svp_read_cell_1; 74 | zbank_memory_map[0x39].read = svp_read_cell_byte; 75 | m68k.memory_map[0x3a].read8 = svp_read_cell_byte; 76 | m68k.memory_map[0x3a].read16 = svp_read_cell_2; 77 | zbank_memory_map[0x3a].read = svp_read_cell_byte; 78 | } 79 | 80 | void svp_reset(void) 81 | { 82 | memcpy(svp->iram_rom + 0x800, cart.rom + 0x800, 0x20000 - 0x800); 83 | ssp1601_reset(&svp->ssp1601); 84 | } 85 | 86 | -------------------------------------------------------------------------------- /core/cart_hw/svp/svp.h: -------------------------------------------------------------------------------- 1 | /* 2 | basic, incomplete SSP160x (SSP1601?) interpreter 3 | with SVP memory controller emu 4 | 5 | (c) Copyright 2008, Grazvydas "notaz" Ignotas 6 | Free for non-commercial use. 7 | 8 | For commercial use, separate licencing terms must be obtained. 9 | 10 | Modified for Genesis Plus GX (Eke-Eke): added BIG ENDIAN support, fixed addr/code inversion 11 | */ 12 | 13 | #ifndef _SVP_H_ 14 | #define _SVP_H_ 15 | 16 | #include "shared.h" 17 | #include "ssp16.h" 18 | 19 | typedef struct { 20 | unsigned char iram_rom[0x20000]; /* IRAM (0-0x7ff) and program ROM (0x800-0x1ffff) */ 21 | unsigned char dram[0x20000]; 22 | ssp1601_t ssp1601; 23 | } svp_t; 24 | 25 | extern svp_t *svp; 26 | 27 | extern void svp_init(void); 28 | extern void svp_reset(void); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /core/cd_hw/cd_cart.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************************** 2 | * Genesis Plus 3 | * CD compatible ROM/RAM cartridge support 4 | * 5 | * Copyright (C) 2012-2016 Eke-Eke (Genesis Plus GX) 6 | * 7 | * Redistribution and use of this code or any derivative works are permitted 8 | * provided that the following conditions are met: 9 | * 10 | * - Redistributions may not be sold, nor may they be used in a commercial 11 | * product or activity. 12 | * 13 | * - Redistributions that are modified from the original source must include the 14 | * complete source code, including the source code for all components used by a 15 | * binary built from the modified sources. However, as a special exception, the 16 | * source code distributed need not include anything that is normally distributed 17 | * (in either source or binary form) with the major components (compiler, kernel, 18 | * and so on) of the operating system on which the executable runs, unless that 19 | * component itself accompanies the executable. 20 | * 21 | * - Redistributions must reproduce the above copyright notice, this list of 22 | * conditions and the following disclaimer in the documentation and/or other 23 | * materials provided with the distribution. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 29 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 | * POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | ****************************************************************************************/ 38 | 39 | 40 | /* CD compatible ROM/RAM cartridge */ 41 | typedef struct 42 | { 43 | uint8 area[0x840080]; /* cartridge ROM/RAM area (max. 8MB ROM + 64KB backup memory + Pro Action Replay 128KB ROM / 64KB RAM + cartridge infos) */ 44 | uint8 boot; /* cartridge boot mode (0x00: boot from CD with ROM/RAM cartridge enabled, 0x40: boot from ROM cartridge with CD enabled) */ 45 | uint8 id; /* RAM cartridge ID (related to RAM size, 0 if disabled) */ 46 | uint8 prot; /* RAM cartridge write protection */ 47 | uint32 mask; /* RAM cartridge size mask */ 48 | } cd_cart_t; 49 | 50 | /* Function prototypes */ 51 | extern void cd_cart_init(void); 52 | -------------------------------------------------------------------------------- /core/cd_hw/cdd.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/core/cd_hw/cdd.c -------------------------------------------------------------------------------- /core/input_hw/activator.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************************** 2 | * Genesis Plus 3 | * Sega Activator support 4 | * 5 | * Copyright (C) 2011-2013 Eke-Eke (Genesis Plus GX) 6 | * 7 | * Redistribution and use of this code or any derivative works are permitted 8 | * provided that the following conditions are met: 9 | * 10 | * - Redistributions may not be sold, nor may they be used in a commercial 11 | * product or activity. 12 | * 13 | * - Redistributions that are modified from the original source must include the 14 | * complete source code, including the source code for all components used by a 15 | * binary built from the modified sources. However, as a special exception, the 16 | * source code distributed need not include anything that is normally distributed 17 | * (in either source or binary form) with the major components (compiler, kernel, 18 | * and so on) of the operating system on which the executable runs, unless that 19 | * component itself accompanies the executable. 20 | * 21 | * - Redistributions must reproduce the above copyright notice, this list of 22 | * conditions and the following disclaimer in the documentation and/or other 23 | * materials provided with the distribution. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 29 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 | * POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | ****************************************************************************************/ 38 | 39 | #ifndef _ACTIVATOR_H_ 40 | #define _ACTIVATOR_H_ 41 | 42 | /* Function prototypes */ 43 | extern void activator_reset(int index); 44 | extern unsigned char activator_1_read(void); 45 | extern unsigned char activator_2_read(void); 46 | extern void activator_1_write(unsigned char data, unsigned char mask); 47 | extern void activator_2_write(unsigned char data, unsigned char mask); 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /core/input_hw/graphic_board.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************************** 2 | * Genesis Plus 3 | * Sega Graphic board support 4 | * 5 | * Copyright (C) 2017 Eke-Eke (Genesis Plus GX) 6 | * 7 | * Redistribution and use of this code or any derivative works are permitted 8 | * provided that the following conditions are met: 9 | * 10 | * - Redistributions may not be sold, nor may they be used in a commercial 11 | * product or activity. 12 | * 13 | * - Redistributions that are modified from the original source must include the 14 | * complete source code, including the source code for all components used by a 15 | * binary built from the modified sources. However, as a special exception, the 16 | * source code distributed need not include anything that is normally distributed 17 | * (in either source or binary form) with the major components (compiler, kernel, 18 | * and so on) of the operating system on which the executable runs, unless that 19 | * component itself accompanies the executable. 20 | * 21 | * - Redistributions must reproduce the above copyright notice, this list of 22 | * conditions and the following disclaimer in the documentation and/or other 23 | * materials provided with the distribution. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 29 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 | * POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | ****************************************************************************************/ 38 | 39 | #ifndef _GRAPHIC_H_ 40 | #define _GRAPHIC_H_ 41 | 42 | /* Function prototypes */ 43 | extern void graphic_board_reset(int port); 44 | extern unsigned char graphic_board_read(void); 45 | extern void graphic_board_write(unsigned char data, unsigned char mask); 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /core/input_hw/lightgun.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************************** 2 | * Genesis Plus 3 | * Sega Light Phaser, Menacer & Konami Justifiers support 4 | * 5 | * Copyright (C) 2007-2013 Eke-Eke (Genesis Plus GX) 6 | * 7 | * Redistribution and use of this code or any derivative works are permitted 8 | * provided that the following conditions are met: 9 | * 10 | * - Redistributions may not be sold, nor may they be used in a commercial 11 | * product or activity. 12 | * 13 | * - Redistributions that are modified from the original source must include the 14 | * complete source code, including the source code for all components used by a 15 | * binary built from the modified sources. However, as a special exception, the 16 | * source code distributed need not include anything that is normally distributed 17 | * (in either source or binary form) with the major components (compiler, kernel, 18 | * and so on) of the operating system on which the executable runs, unless that 19 | * component itself accompanies the executable. 20 | * 21 | * - Redistributions must reproduce the above copyright notice, this list of 22 | * conditions and the following disclaimer in the documentation and/or other 23 | * materials provided with the distribution. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 29 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 | * POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | ****************************************************************************************/ 38 | 39 | #ifndef _LIGHTGUN_H_ 40 | #define _LIGHTGUN_H_ 41 | 42 | /* Input devices port handlers */ 43 | extern void lightgun_reset(int index); 44 | extern void lightgun_refresh(int port); 45 | extern unsigned char phaser_1_read(void); 46 | extern unsigned char phaser_2_read(void); 47 | extern unsigned char menacer_read(void); 48 | extern unsigned char justifier_read(void); 49 | extern void justifier_write(unsigned char data, unsigned char mask); 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /core/input_hw/mouse.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************************** 2 | * Genesis Plus 3 | * Sega Mouse support 4 | * 5 | * Copyright (C) 2007-2011 Eke-Eke (Genesis Plus GX) 6 | * 7 | * Redistribution and use of this code or any derivative works are permitted 8 | * provided that the following conditions are met: 9 | * 10 | * - Redistributions may not be sold, nor may they be used in a commercial 11 | * product or activity. 12 | * 13 | * - Redistributions that are modified from the original source must include the 14 | * complete source code, including the source code for all components used by a 15 | * binary built from the modified sources. However, as a special exception, the 16 | * source code distributed need not include anything that is normally distributed 17 | * (in either source or binary form) with the major components (compiler, kernel, 18 | * and so on) of the operating system on which the executable runs, unless that 19 | * component itself accompanies the executable. 20 | * 21 | * - Redistributions must reproduce the above copyright notice, this list of 22 | * conditions and the following disclaimer in the documentation and/or other 23 | * materials provided with the distribution. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 29 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 | * POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | ****************************************************************************************/ 38 | 39 | #ifndef _MOUSE_H_ 40 | #define _MOUSE_H_ 41 | 42 | /* Function prototypes */ 43 | extern void mouse_reset(int port); 44 | extern unsigned char mouse_read(void); 45 | extern void mouse_write(unsigned char data, unsigned char mask); 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /core/input_hw/paddle.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************************** 2 | * Genesis Plus 3 | * Sega Paddle Control support 4 | * 5 | * Copyright (C) 2007-2013 Eke-Eke (Genesis Plus GX) 6 | * 7 | * Redistribution and use of this code or any derivative works are permitted 8 | * provided that the following conditions are met: 9 | * 10 | * - Redistributions may not be sold, nor may they be used in a commercial 11 | * product or activity. 12 | * 13 | * - Redistributions that are modified from the original source must include the 14 | * complete source code, including the source code for all components used by a 15 | * binary built from the modified sources. However, as a special exception, the 16 | * source code distributed need not include anything that is normally distributed 17 | * (in either source or binary form) with the major components (compiler, kernel, 18 | * and so on) of the operating system on which the executable runs, unless that 19 | * component itself accompanies the executable. 20 | * 21 | * - Redistributions must reproduce the above copyright notice, this list of 22 | * conditions and the following disclaimer in the documentation and/or other 23 | * materials provided with the distribution. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 29 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 | * POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | ****************************************************************************************/ 38 | 39 | #ifndef _PADDLE_H_ 40 | #define _PADDLE_H_ 41 | 42 | /* Function prototypes */ 43 | extern void paddle_reset(int index); 44 | extern unsigned char paddle_1_read(void); 45 | extern unsigned char paddle_2_read(void); 46 | extern void paddle_1_write(unsigned char data, unsigned char mask); 47 | extern void paddle_2_write(unsigned char data, unsigned char mask); 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /core/input_hw/sportspad.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************************** 2 | * Genesis Plus 3 | * Sega Sports Pad support 4 | * 5 | * Copyright (C) 2007-2013 Eke-Eke (Genesis Plus GX) 6 | * 7 | * Redistribution and use of this code or any derivative works are permitted 8 | * provided that the following conditions are met: 9 | * 10 | * - Redistributions may not be sold, nor may they be used in a commercial 11 | * product or activity. 12 | * 13 | * - Redistributions that are modified from the original source must include the 14 | * complete source code, including the source code for all components used by a 15 | * binary built from the modified sources. However, as a special exception, the 16 | * source code distributed need not include anything that is normally distributed 17 | * (in either source or binary form) with the major components (compiler, kernel, 18 | * and so on) of the operating system on which the executable runs, unless that 19 | * component itself accompanies the executable. 20 | * 21 | * - Redistributions must reproduce the above copyright notice, this list of 22 | * conditions and the following disclaimer in the documentation and/or other 23 | * materials provided with the distribution. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 29 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 | * POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | ****************************************************************************************/ 38 | 39 | #ifndef _SPORTSPAD_H_ 40 | #define _SPORTSPAD_H_ 41 | 42 | /* Function prototypes */ 43 | extern void sportspad_reset(int index); 44 | extern unsigned char sportspad_1_read(void); 45 | extern unsigned char sportspad_2_read(void); 46 | extern void sportspad_1_write(unsigned char data, unsigned char mask); 47 | extern void sportspad_2_write(unsigned char data, unsigned char mask); 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /core/input_hw/teamplayer.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************************** 2 | * Genesis Plus 3 | * Team Player support 4 | * 5 | * Copyright (C) 2007-2014 Eke-Eke (Genesis Plus GX) 6 | * 7 | * Redistribution and use of this code or any derivative works are permitted 8 | * provided that the following conditions are met: 9 | * 10 | * - Redistributions may not be sold, nor may they be used in a commercial 11 | * product or activity. 12 | * 13 | * - Redistributions that are modified from the original source must include the 14 | * complete source code, including the source code for all components used by a 15 | * binary built from the modified sources. However, as a special exception, the 16 | * source code distributed need not include anything that is normally distributed 17 | * (in either source or binary form) with the major components (compiler, kernel, 18 | * and so on) of the operating system on which the executable runs, unless that 19 | * component itself accompanies the executable. 20 | * 21 | * - Redistributions must reproduce the above copyright notice, this list of 22 | * conditions and the following disclaimer in the documentation and/or other 23 | * materials provided with the distribution. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 29 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 | * POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | ****************************************************************************************/ 38 | 39 | #ifndef _TEAMPLAYER_H_ 40 | #define _TEAMPLAYER_H_ 41 | 42 | /* Function prototypes */ 43 | extern void teamplayer_init(int port); 44 | extern void teamplayer_reset(int port); 45 | extern unsigned char teamplayer_1_read(void); 46 | extern unsigned char teamplayer_2_read(void); 47 | extern void teamplayer_1_write(unsigned char data, unsigned char mask); 48 | extern void teamplayer_2_write(unsigned char data, unsigned char mask); 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /core/input_hw/terebi_oekaki.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************************** 2 | * Genesis Plus 3 | * Terebi Oekaki graphic board support 4 | * 5 | * Copyright (C) 2011 Eke-Eke (Genesis Plus GX) 6 | * 7 | * Redistribution and use of this code or any derivative works are permitted 8 | * provided that the following conditions are met: 9 | * 10 | * - Redistributions may not be sold, nor may they be used in a commercial 11 | * product or activity. 12 | * 13 | * - Redistributions that are modified from the original source must include the 14 | * complete source code, including the source code for all components used by a 15 | * binary built from the modified sources. However, as a special exception, the 16 | * source code distributed need not include anything that is normally distributed 17 | * (in either source or binary form) with the major components (compiler, kernel, 18 | * and so on) of the operating system on which the executable runs, unless that 19 | * component itself accompanies the executable. 20 | * 21 | * - Redistributions must reproduce the above copyright notice, this list of 22 | * conditions and the following disclaimer in the documentation and/or other 23 | * materials provided with the distribution. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 29 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 | * POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | ****************************************************************************************/ 38 | 39 | #include "shared.h" 40 | 41 | static struct 42 | { 43 | uint8 axis; 44 | uint8 busy; 45 | } tablet; 46 | 47 | void terebi_oekaki_reset(void) 48 | { 49 | input.analog[0][0] = 128; 50 | input.analog[0][1] = 128; 51 | tablet.axis = 1; 52 | tablet.busy = 1; 53 | } 54 | 55 | unsigned short terebi_oekaki_read(void) 56 | { 57 | uint16 data = (tablet.busy << 15) | input.analog[0][tablet.axis]; 58 | 59 | if (!(input.pad[0] & INPUT_B)) 60 | { 61 | data |= 0x100; 62 | } 63 | 64 | /* clear BUSY flag */ 65 | tablet.busy = 0; 66 | 67 | return data; 68 | } 69 | 70 | void terebi_oekaki_write(unsigned char data) 71 | { 72 | /* X (1) or Y (0) axis */ 73 | tablet.axis = (data & 1) ^ 1; 74 | 75 | /* set BUSY flag */ 76 | tablet.busy = 1; 77 | } 78 | -------------------------------------------------------------------------------- /core/input_hw/terebi_oekaki.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************************** 2 | * Genesis Plus 3 | * Terebi Oekaki graphic board support 4 | * 5 | * Copyright (C) 2011 Eke-Eke (Genesis Plus GX) 6 | * 7 | * Redistribution and use of this code or any derivative works are permitted 8 | * provided that the following conditions are met: 9 | * 10 | * - Redistributions may not be sold, nor may they be used in a commercial 11 | * product or activity. 12 | * 13 | * - Redistributions that are modified from the original source must include the 14 | * complete source code, including the source code for all components used by a 15 | * binary built from the modified sources. However, as a special exception, the 16 | * source code distributed need not include anything that is normally distributed 17 | * (in either source or binary form) with the major components (compiler, kernel, 18 | * and so on) of the operating system on which the executable runs, unless that 19 | * component itself accompanies the executable. 20 | * 21 | * - Redistributions must reproduce the above copyright notice, this list of 22 | * conditions and the following disclaimer in the documentation and/or other 23 | * materials provided with the distribution. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 29 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 | * POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | ****************************************************************************************/ 38 | 39 | #ifndef _TEREBI_H_ 40 | #define _TEREBI_H_ 41 | 42 | /* Function prototypes */ 43 | extern void terebi_oekaki_reset(void); 44 | extern unsigned short terebi_oekaki_read(void); 45 | extern void terebi_oekaki_write(unsigned char data); 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /core/input_hw/xe_1ap.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************************** 2 | * Genesis Plus 3 | * XE-1AP analog controller support 4 | * 5 | * Copyright (C) 2011-2015 Eke-Eke (Genesis Plus GX) 6 | * 7 | * Redistribution and use of this code or any derivative works are permitted 8 | * provided that the following conditions are met: 9 | * 10 | * - Redistributions may not be sold, nor may they be used in a commercial 11 | * product or activity. 12 | * 13 | * - Redistributions that are modified from the original source must include the 14 | * complete source code, including the source code for all components used by a 15 | * binary built from the modified sources. However, as a special exception, the 16 | * source code distributed need not include anything that is normally distributed 17 | * (in either source or binary form) with the major components (compiler, kernel, 18 | * and so on) of the operating system on which the executable runs, unless that 19 | * component itself accompanies the executable. 20 | * 21 | * - Redistributions must reproduce the above copyright notice, this list of 22 | * conditions and the following disclaimer in the documentation and/or other 23 | * materials provided with the distribution. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 29 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 | * POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | ****************************************************************************************/ 38 | 39 | #ifndef _XE_1APH_ 40 | #define _XE_1APH_ 41 | 42 | /* Function prototypes */ 43 | extern void xe_1ap_reset(int index); 44 | extern unsigned char xe_1ap_1_read(void); 45 | extern unsigned char xe_1ap_2_read(void); 46 | extern void xe_1ap_1_write(unsigned char data, unsigned char mask); 47 | extern void xe_1ap_2_write(unsigned char data, unsigned char mask); 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /core/macros.h: -------------------------------------------------------------------------------- 1 | #ifndef _MACROS_H_ 2 | #define _MACROS_H_ 3 | 4 | #ifdef LSB_FIRST 5 | 6 | #define READ_BYTE(BASE, ADDR) (BASE)[(ADDR)^1] 7 | 8 | #define READ_WORD(BASE, ADDR) (((BASE)[ADDR]<<8) | (BASE)[(ADDR)+1]) 9 | 10 | #define READ_WORD_LONG(BASE, ADDR) (((BASE)[(ADDR)+1]<<24) | \ 11 | ((BASE)[(ADDR)]<<16) | \ 12 | ((BASE)[(ADDR)+3]<<8) | \ 13 | (BASE)[(ADDR)+2]) 14 | 15 | #define WRITE_BYTE(BASE, ADDR, VAL) (BASE)[(ADDR)^1] = (VAL)&0xff 16 | 17 | #define WRITE_WORD(BASE, ADDR, VAL) (BASE)[ADDR] = ((VAL)>>8) & 0xff; \ 18 | (BASE)[(ADDR)+1] = (VAL)&0xff 19 | 20 | #define WRITE_WORD_LONG(BASE, ADDR, VAL) (BASE)[(ADDR+1)] = ((VAL)>>24) & 0xff; \ 21 | (BASE)[(ADDR)] = ((VAL)>>16)&0xff; \ 22 | (BASE)[(ADDR+3)] = ((VAL)>>8)&0xff; \ 23 | (BASE)[(ADDR+2)] = (VAL)&0xff 24 | 25 | #else 26 | 27 | #define READ_BYTE(BASE, ADDR) (BASE)[ADDR] 28 | #define READ_WORD(BASE, ADDR) *(uint16 *)((BASE) + (ADDR)) 29 | #define READ_WORD_LONG(BASE, ADDR) *(uint32 *)((BASE) + (ADDR)) 30 | #define WRITE_BYTE(BASE, ADDR, VAL) (BASE)[ADDR] = VAL & 0xff 31 | #define WRITE_WORD(BASE, ADDR, VAL) *(uint16 *)((BASE) + (ADDR)) = VAL & 0xffff 32 | #define WRITE_WORD_LONG(BASE, ADDR, VAL) *(uint32 *)((BASE) + (ADDR)) = VAL & 0xffffffff 33 | #endif 34 | 35 | /* C89 compatibility */ 36 | #ifndef M_PI 37 | #define M_PI 3.14159265358979323846264338327f 38 | #endif /* M_PI */ 39 | 40 | /* Set to your compiler's static inline keyword to enable it, or 41 | * set it to blank to disable it. 42 | * If you define INLINE in the makefile, it will override this value. 43 | * NOTE: not enabling inline functions will SEVERELY slow down emulation. 44 | */ 45 | #ifndef INLINE 46 | #define INLINE static __inline__ 47 | #endif /* INLINE */ 48 | 49 | #endif /* _MACROS_H_ */ 50 | -------------------------------------------------------------------------------- /core/membnk.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************************** 2 | * Genesis Plus 3 | * Z80 bank access to 68k bus 4 | * 5 | * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Charles Mac Donald (original code) 6 | * Copyright (C) 2007-2012 Eke-Eke (Genesis Plus GX) 7 | * 8 | * Redistribution and use of this code or any derivative works are permitted 9 | * provided that the following conditions are met: 10 | * 11 | * - Redistributions may not be sold, nor may they be used in a commercial 12 | * product or activity. 13 | * 14 | * - Redistributions that are modified from the original source must include the 15 | * complete source code, including the source code for all components used by a 16 | * binary built from the modified sources. However, as a special exception, the 17 | * source code distributed need not include anything that is normally distributed 18 | * (in either source or binary form) with the major components (compiler, kernel, 19 | * and so on) of the operating system on which the executable runs, unless that 20 | * component itself accompanies the executable. 21 | * 22 | * - Redistributions must reproduce the above copyright notice, this list of 23 | * conditions and the following disclaimer in the documentation and/or other 24 | * materials provided with the distribution. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 27 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 28 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 29 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 30 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 31 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 32 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 33 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 34 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 35 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | * POSSIBILITY OF SUCH DAMAGE. 37 | * 38 | ****************************************************************************************/ 39 | 40 | #ifndef _MEMBNK_H_ 41 | #define _MEMBNK_H_ 42 | 43 | extern unsigned int zbank_unused_r(unsigned int address); 44 | extern void zbank_unused_w(unsigned int address, unsigned int data); 45 | extern unsigned int zbank_lockup_r(unsigned int address); 46 | extern void zbank_lockup_w(unsigned int address, unsigned int data); 47 | extern unsigned int zbank_read_ctrl_io(unsigned int address); 48 | extern void zbank_write_ctrl_io(unsigned int address, unsigned int data); 49 | extern unsigned int zbank_read_vdp(unsigned int address); 50 | extern void zbank_write_vdp(unsigned int address, unsigned int data); 51 | 52 | struct _zbank_memory_map 53 | { 54 | unsigned int (*read)(unsigned int address); 55 | void (*write)(unsigned int address, unsigned int data); 56 | } zbank_memory_map[256]; 57 | 58 | #endif /* _MEMBNK_H_ */ 59 | -------------------------------------------------------------------------------- /core/ntsc/md_ntsc_config.h: -------------------------------------------------------------------------------- 1 | /* Configure library by modifying this file */ 2 | 3 | #ifndef MD_NTSC_CONFIG_H 4 | #define MD_NTSC_CONFIG_H 5 | 6 | /* Format of source & output pixels (RGB555 or RGB565 only)*/ 7 | #ifdef USE_15BPP_RENDERING 8 | #define MD_NTSC_IN_FORMAT MD_NTSC_RGB15 9 | #define MD_NTSC_OUT_DEPTH 15 10 | #else 11 | #define MD_NTSC_IN_FORMAT MD_NTSC_RGB16 12 | #define MD_NTSC_OUT_DEPTH 16 13 | #endif 14 | 15 | /* Original CRAM format (not used) */ 16 | /* #define MD_NTSC_IN_FORMAT MD_NTSC_BGR9 */ 17 | 18 | /* The following affect the built-in blitter only; a custom blitter can 19 | handle things however it wants. */ 20 | 21 | /* Type of input pixel values (fixed to 16-bit) */ 22 | #define MD_NTSC_IN_T unsigned short 23 | 24 | /* Each raw pixel input value is passed through this. You might want to mask 25 | the pixel index if you use the high bits as flags, etc. */ 26 | #define MD_NTSC_ADJ_IN( in ) in 27 | 28 | /* For each pixel, this is the basic operation: 29 | output_color = MD_NTSC_ADJ_IN( MD_NTSC_IN_T ) */ 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /core/ntsc/readme.txt: -------------------------------------------------------------------------------- 1 | sms_ntsc 0.2.3: Sega Master System NTSC Video Filter 2 | ---------------------------------------------------- 3 | This library filters a Sega Master System image to match what a TV would 4 | show, allowing an authentic image in an emulator. It uses a highly 5 | optimized algorithm to perform the same signal processing as an NTSC 6 | decoder in a TV, giving very similar pixel artifacts and color bleeding. 7 | The usual picture controls can be adjusted: hue, saturation, contrast, 8 | brightness, and sharpness. Additionally, the amount of NTSC chroma and 9 | luma artifacts can be reduced, allowing an image that corresponds to 10 | composite video (artifacts), S-video (color bleeding only), RGB (clean 11 | pixels), or anywhere inbetween. 12 | 13 | The output is scaled to the proper horizontal width, leaving it up the 14 | emulator to simply double the height. Specialized blitters can be easily 15 | written using a special interface, allowing customization of input and 16 | output pixel formats, optimization for the host platform, and efficient 17 | scanline doubling. 18 | 19 | Blitting a 248x192 source image to a 581x384 pixel 16-bit RGB memory 20 | buffer at 60 frames per second uses 7% CPU on a 2.0 GHz Athlon 3500+ and 21 | 33% CPU on a 10-year-old 400 MHz G3 PowerMac. 22 | 23 | Author : Shay Green 24 | Website : http://www.slack.net/~ant/ 25 | Forum : http://groups.google.com/group/blargg-sound-libs 26 | License : GNU Lesser General Public License (LGPL) 27 | Language: C or C++ 28 | 29 | 30 | Getting Started 31 | --------------- 32 | Build a program from demo.c, sms_ntsc.c, and the SDL multimedia library 33 | (see http://libsdl.org/). Run it with "test.bmp" in the same directory 34 | and it should show the filtered image. See demo.c for more. 35 | 36 | See sms_ntsc.txt for documentation and sms_ntsc.h for reference. Post to 37 | the discussion forum for assistance. 38 | 39 | 40 | Files 41 | ----- 42 | readme.txt Essential information 43 | sms_ntsc.txt Library documentation 44 | changes.txt Changes made since previous releases 45 | license.txt GNU Lesser General Public License 46 | 47 | benchmark.c Measures frame rate and processor usage of library 48 | demo.c Displays and saves NTSC filtered image 49 | demo_impl.h Internal routines used by demo 50 | test.bmp Test image for demo 51 | 52 | sms_ntsc_config.h Library configuration (modify as needed) 53 | sms_ntsc.h Library header and source 54 | sms_ntsc.c 55 | sms_ntsc_impl.h 56 | 57 | -- 58 | Shay Green 59 | -------------------------------------------------------------------------------- /core/ntsc/sms_ntsc_config.h: -------------------------------------------------------------------------------- 1 | /* Configure library by modifying this file */ 2 | 3 | #ifndef SMS_NTSC_CONFIG_H 4 | #define SMS_NTSC_CONFIG_H 5 | 6 | /* Format of source & output pixels (RGB555 or RGB565 only) */ 7 | #ifdef USE_15BPP_RENDERING 8 | #define SMS_NTSC_IN_FORMAT SMS_NTSC_RGB15 9 | #define SMS_NTSC_OUT_DEPTH 15 10 | #else 11 | #define SMS_NTSC_IN_FORMAT SMS_NTSC_RGB16 12 | #define SMS_NTSC_OUT_DEPTH 16 13 | #endif 14 | 15 | /* Original CRAM format (not used) */ 16 | /* #define SMS_NTSC_IN_FORMAT SMS_NTSC_BGR12 */ 17 | 18 | /* The following affect the built-in blitter only; a custom blitter can 19 | handle things however it wants. */ 20 | 21 | /* Type of input pixel values (fixed to 16-bit)*/ 22 | #define SMS_NTSC_IN_T unsigned short 23 | 24 | /* Each raw pixel input value is passed through this. You might want to mask 25 | the pixel index if you use the high bits as flags, etc. */ 26 | #define SMS_NTSC_ADJ_IN( in ) in 27 | 28 | /* For each pixel, this is the basic operation: 29 | output_color = SMS_NTSC_ADJ_IN( SMS_NTSC_IN_T ) */ 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /core/shared.h: -------------------------------------------------------------------------------- 1 | #ifndef _SHARED_H_ 2 | #define _SHARED_H_ 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include "types.h" 10 | #include "macros.h" 11 | #include "osd.h" 12 | #include "loadrom.h" 13 | #include "m68k.h" 14 | #include "z80.h" 15 | #include "system.h" 16 | #include "genesis.h" 17 | #include "vdp_ctrl.h" 18 | #include "vdp_render.h" 19 | #include "mem68k.h" 20 | #include "memz80.h" 21 | #include "membnk.h" 22 | #include "io_ctrl.h" 23 | #include "input.h" 24 | #include "sound.h" 25 | #include "sn76489.h" 26 | #include "ym2413.h" 27 | #include "ym2612.h" 28 | #include "sram.h" 29 | #include "ggenie.h" 30 | #include "areplay.h" 31 | #include "svp.h" 32 | #include "state.h" 33 | 34 | #endif /* _SHARED_H_ */ 35 | 36 | -------------------------------------------------------------------------------- /core/sound/blip_buf.h: -------------------------------------------------------------------------------- 1 | /** Sample buffer that resamples from input clock rate to output sample rate \file */ 2 | 3 | /* blip_buf $vers */ 4 | #ifndef BLIP_BUF_H 5 | #define BLIP_BUF_H 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | /** First parameter of most functions is blip_t*, or const blip_t* if nothing 12 | is changed. */ 13 | typedef struct blip_t blip_t; 14 | 15 | /** Creates new buffer that can hold at most sample_count samples. Sets rates 16 | so that there are blip_max_ratio clocks per sample. Returns pointer to new 17 | buffer, or NULL if insufficient memory. */ 18 | blip_t* blip_new( int sample_count ); 19 | 20 | /** Sets approximate input clock rate and output sample rate. For every 21 | clock_rate input clocks, approximately sample_rate samples are generated. */ 22 | void blip_set_rates( blip_t*, double clock_rate, double sample_rate ); 23 | 24 | enum { /** Maximum clock_rate/sample_rate ratio. For a given sample_rate, 25 | clock_rate must not be greater than sample_rate*blip_max_ratio. */ 26 | blip_max_ratio = 1 << 20 }; 27 | 28 | /** Clears entire buffer. Afterwards, blip_samples_avail() == 0. */ 29 | void blip_clear( blip_t* ); 30 | 31 | /** Adds positive/negative delta into buffer at specified clock time. */ 32 | void blip_add_delta( blip_t*, unsigned int clock_time, int delta ); 33 | 34 | /** Same as blip_add_delta(), but uses faster, lower-quality synthesis. */ 35 | void blip_add_delta_fast( blip_t*, unsigned int clock_time, int delta ); 36 | 37 | /** Length of time frame, in clocks, needed to make sample_count additional 38 | samples available. */ 39 | int blip_clocks_needed( const blip_t*, int sample_count ); 40 | 41 | enum { /** Maximum number of samples that can be generated from one time frame. */ 42 | blip_max_frame = 4000 }; 43 | 44 | /** Makes input clocks before clock_duration available for reading as output 45 | samples. Also begins new time frame at clock_duration, so that clock time 0 in 46 | the new time frame specifies the same clock as clock_duration in the old time 47 | frame specified. Deltas can have been added slightly past clock_duration (up to 48 | however many clocks there are in two output samples). */ 49 | void blip_end_frame( blip_t*, unsigned int clock_duration ); 50 | 51 | /** Number of buffered samples available for reading. */ 52 | int blip_samples_avail( const blip_t* ); 53 | 54 | /** Reads and removes at most 'count' samples and writes them to to every other 55 | element of 'out', allowing easy interleaving of two buffers into a stereo sample 56 | stream. Outputs 16-bit signed samples. Returns number of samples actually read. */ 57 | int blip_read_samples( blip_t*, short out [], int count); 58 | 59 | /* Same as above function except sample is added to output buffer previous value */ 60 | /* This allows easy mixing of different blip buffers into a single output stream */ 61 | int blip_mix_samples( blip_t* m, short out [], int count); 62 | 63 | /** Frees buffer. No effect if NULL is passed. */ 64 | void blip_delete( blip_t* ); 65 | 66 | 67 | /* Deprecated */ 68 | typedef blip_t blip_buffer_t; 69 | 70 | #ifdef __cplusplus 71 | } 72 | #endif 73 | 74 | #endif 75 | -------------------------------------------------------------------------------- /core/sound/eq.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | // 3 | // 3 Band EQ :) 4 | // 5 | // EQ.H - Header file for 3 band EQ 6 | // 7 | // (c) Neil C / Etanza Systems / 2K6 8 | // 9 | // Shouts / Loves / Moans = etanza at lycos dot co dot uk 10 | // 11 | // This work is hereby placed in the public domain for all purposes, including 12 | // use in commercial applications. 13 | // 14 | // The author assumes NO RESPONSIBILITY for any problems caused by the use of 15 | // this software. 16 | // 17 | //----------------------------------------------------------------------------*/ 18 | 19 | #ifndef __EQ3BAND__ 20 | #define __EQ3BAND__ 21 | 22 | /* ------------ 23 | //| Structures | 24 | // ------------*/ 25 | 26 | typedef struct { 27 | /* Filter #1 (Low band) */ 28 | 29 | double lf; /* Frequency */ 30 | double f1p0; /* Poles ... */ 31 | double f1p1; 32 | double f1p2; 33 | double f1p3; 34 | 35 | /* Filter #2 (High band) */ 36 | 37 | double hf; /* Frequency */ 38 | double f2p0; /* Poles ... */ 39 | double f2p1; 40 | double f2p2; 41 | double f2p3; 42 | 43 | /* Sample history buffer */ 44 | 45 | double sdm1; /* Sample data minus 1 */ 46 | double sdm2; /* 2 */ 47 | double sdm3; /* 3 */ 48 | 49 | /* Gain Controls */ 50 | 51 | double lg; /* low gain */ 52 | double mg; /* mid gain */ 53 | double hg; /* high gain */ 54 | 55 | } EQSTATE; 56 | 57 | 58 | /* --------- 59 | //| Exports | 60 | // ---------*/ 61 | 62 | extern void init_3band_state(EQSTATE * es, int lowfreq, int highfreq, 63 | int mixfreq); 64 | extern double do_3band(EQSTATE * es, int sample); 65 | 66 | 67 | #endif /* #ifndef __EQ3BAND__ */ 68 | -------------------------------------------------------------------------------- /core/sound/sn76489.h: -------------------------------------------------------------------------------- 1 | /* 2 | SN76489 emulation 3 | by Maxim in 2001 and 2002 4 | */ 5 | 6 | #ifndef _SN76489_H_ 7 | #define _SN76489_H_ 8 | 9 | #include "blip_buf.h" 10 | 11 | #define SN_DISCRETE 0 12 | #define SN_INTEGRATED 1 13 | 14 | /* Function prototypes */ 15 | extern void SN76489_Init(int type); 16 | extern void SN76489_Reset(void); 17 | extern void SN76489_Config(unsigned int clocks, int preAmp, int boostNoise, int stereo); 18 | extern void SN76489_Write(unsigned int clocks, unsigned int data); 19 | extern void SN76489_Update(unsigned int cycles); 20 | extern void *SN76489_GetContextPtr(void); 21 | extern int SN76489_GetContextSize(void); 22 | 23 | #endif /* _SN76489_H_ */ 24 | -------------------------------------------------------------------------------- /core/sound/sound.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************************** 2 | * Genesis Plus 3 | * Sound Hardware 4 | * 5 | * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Charles Mac Donald (original code) 6 | * Copyright (C) 2007-2013 Eke-Eke (Genesis Plus GX) 7 | * 8 | * Redistribution and use of this code or any derivative works are permitted 9 | * provided that the following conditions are met: 10 | * 11 | * - Redistributions may not be sold, nor may they be used in a commercial 12 | * product or activity. 13 | * 14 | * - Redistributions that are modified from the original source must include the 15 | * complete source code, including the source code for all components used by a 16 | * binary built from the modified sources. However, as a special exception, the 17 | * source code distributed need not include anything that is normally distributed 18 | * (in either source or binary form) with the major components (compiler, kernel, 19 | * and so on) of the operating system on which the executable runs, unless that 20 | * component itself accompanies the executable. 21 | * 22 | * - Redistributions must reproduce the above copyright notice, this list of 23 | * conditions and the following disclaimer in the documentation and/or other 24 | * materials provided with the distribution. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 27 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 28 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 29 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 30 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 31 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 32 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 33 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 34 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 35 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | * POSSIBILITY OF SUCH DAMAGE. 37 | * 38 | ****************************************************************************************/ 39 | 40 | #ifndef _SOUND_H_ 41 | #define _SOUND_H_ 42 | 43 | /* Function prototypes */ 44 | extern void sound_init(void); 45 | extern void sound_reset(void); 46 | extern int sound_context_save(uint8 *state); 47 | extern int sound_context_load(uint8 *state); 48 | extern int sound_update(unsigned int cycles); 49 | extern void fm_reset(unsigned int cycles); 50 | extern void fm_write(unsigned int cycles, unsigned int address, unsigned int data); 51 | extern unsigned int fm_read(unsigned int cycles, unsigned int address); 52 | 53 | #endif /* _SOUND_H_ */ 54 | -------------------------------------------------------------------------------- /core/sound/ym2413.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** 3 | ** File: ym2413.c - software implementation of YM2413 4 | ** FM sound generator type OPLL 5 | ** 6 | ** Copyright (C) 2002 Jarek Burczynski 7 | ** 8 | ** Version 1.0 9 | ** 10 | */ 11 | 12 | #ifndef _H_YM2413_ 13 | #define _H_YM2413_ 14 | 15 | extern void YM2413Init(void); 16 | extern void YM2413ResetChip(void); 17 | extern void YM2413Update(int *buffer, int length); 18 | extern void YM2413Write(unsigned int a, unsigned int v); 19 | extern unsigned int YM2413Read(void); 20 | extern unsigned char *YM2413GetContextPtr(void); 21 | extern unsigned int YM2413GetContextSize(void); 22 | 23 | #endif /*_H_YM2413_*/ 24 | -------------------------------------------------------------------------------- /core/sound/ym2612.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** 3 | ** software implementation of Yamaha FM sound generator (YM2612/YM3438) 4 | ** 5 | ** Original code (MAME fm.c) 6 | ** 7 | ** Copyright (C) 2001, 2002, 2003 Jarek Burczynski (bujar at mame dot net) 8 | ** Copyright (C) 1998 Tatsuyuki Satoh , MultiArcadeMachineEmulator development 9 | ** 10 | ** Version 1.4 (final beta) 11 | ** 12 | ** Additional code & fixes by Eke-Eke for Genesis Plus GX 13 | ** 14 | */ 15 | 16 | #ifndef _H_YM2612_ 17 | #define _H_YM2612_ 18 | 19 | extern void YM2612Init(void); 20 | extern void YM2612Config(unsigned char dac_bits); 21 | extern void YM2612ResetChip(void); 22 | extern void YM2612Update(int *buffer, int length); 23 | extern void YM2612Write(unsigned int a, unsigned int v); 24 | extern unsigned int YM2612Read(void); 25 | extern int YM2612LoadContext(unsigned char *state); 26 | extern int YM2612SaveContext(unsigned char *state); 27 | 28 | #endif /* _YM2612_ */ 29 | -------------------------------------------------------------------------------- /core/state.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************************** 2 | * Genesis Plus 3 | * Savestate support 4 | * 5 | * Copyright (C) 2007-2014 Eke-Eke (Genesis Plus GX) 6 | * 7 | * Redistribution and use of this code or any derivative works are permitted 8 | * provided that the following conditions are met: 9 | * 10 | * - Redistributions may not be sold, nor may they be used in a commercial 11 | * product or activity. 12 | * 13 | * - Redistributions that are modified from the original source must include the 14 | * complete source code, including the source code for all components used by a 15 | * binary built from the modified sources. However, as a special exception, the 16 | * source code distributed need not include anything that is normally distributed 17 | * (in either source or binary form) with the major components (compiler, kernel, 18 | * and so on) of the operating system on which the executable runs, unless that 19 | * component itself accompanies the executable. 20 | * 21 | * - Redistributions must reproduce the above copyright notice, this list of 22 | * conditions and the following disclaimer in the documentation and/or other 23 | * materials provided with the distribution. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 29 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 | * POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | ****************************************************************************************/ 38 | 39 | #ifndef _STATE_H_ 40 | #define _STATE_H_ 41 | 42 | #define STATE_SIZE 0xfd000 43 | #define STATE_VERSION "GENPLUS-GX 1.7.5" 44 | 45 | #define load_param(param, size) \ 46 | memcpy(param, &state[bufferptr], size); \ 47 | bufferptr+= size; 48 | 49 | #define save_param(param, size) \ 50 | memcpy(&state[bufferptr], param, size); \ 51 | bufferptr+= size; 52 | 53 | /* Function prototypes */ 54 | extern int state_load(unsigned char *state); 55 | extern int state_save(unsigned char *state); 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /core/tremor/CHANGELOG: -------------------------------------------------------------------------------- 1 | *** 20020517: 1.0.2 *** 2 | 3 | Playback bugfix to floor1; mode mistakenly used for sizing instead 4 | of blockflag 5 | 6 | *** 20020515: 1.0.1 *** 7 | 8 | Added complete API documentation to source tarball. No code 9 | changes. 10 | 11 | *** 20020412: 1.0.1 *** 12 | 13 | Fixed a clipping bug that affected ARM processors; negative 14 | overflows were being properly clipped, but then clobbered to 15 | positive by the positive overflow chec (asm_arm.h:CLIP_TO_15) 16 | 17 | *** 20020403: 1.0.0 *** 18 | 19 | Initial version -------------------------------------------------------------------------------- /core/tremor/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 2002, Xiph.org Foundation 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | 7 | - Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | - Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | - Neither the name of the Xiph.org Foundation nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION 22 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /core/tremor/README: -------------------------------------------------------------------------------- 1 | This README covers the Ogg Vorbis 'Tremor' integer playback codec 2 | source as of date 2002 09 02, version 1.0.0. 3 | 4 | ****** 5 | 6 | The C source in this package will build on any ANSI C compiler and 7 | function completely and properly on any platform. The included build 8 | system assumes GNU build system and make tools (m4, automake, 9 | autoconf, libtool and gmake). GCC is not required, although GCC is 10 | the most tested compiler. To build using GNU tools, type in the 11 | source directory: 12 | 13 | ./autogen.sh 14 | make 15 | 16 | Currently, the source implements playback in pure C on all platforms 17 | except ARM, where a [currently] small amount of assembly (see 18 | asm_arm.h) is used to implement 64 bit math operations and fast LSP 19 | computation. If building on ARM without the benefit of GNU build 20 | system tools, be sure that '_ARM_ASSEM_' is #defined by the build 21 | system if this assembly is desired, else the resulting library will 22 | use whatever 64 bit math builtins the compiler implements. 23 | 24 | No math library is required by this source. No floating point 25 | operations are used at any point in either setup or decode. This 26 | decoder library will properly decode any past, current or future 27 | Vorbis I file or stream. 28 | 29 | ******** 30 | 31 | The build system produces a static and [when supported by the OS] 32 | dynamic library named 'libvorbisidec'. This library exposes an API 33 | nearly identical to the BSD reference library's 'libvorbisfile', 34 | including all the features familiar to users of vorbisfile. This API 35 | is similar enough that the proper header file to include is named 36 | 'ivorbisfile.h' [included in the source build directory]. Lower level 37 | libvorbis-style headers and structures are in 'ivorbiscodec.h' 38 | [included in the source build directory]. A simple example program, 39 | ivorbisfile_example.c, can be built with 'make example'. 40 | 41 | ******** 42 | 43 | Detailed Tremor API Documentation begins at doc/index.html 44 | 45 | Monty 46 | xiph.org 47 | -------------------------------------------------------------------------------- /core/tremor/Version_script.in: -------------------------------------------------------------------------------- 1 | # 2 | # Export file for libvorbisidec 3 | # 4 | # Only the symbols listed in the global section will be callable from 5 | # applications linking to libvorbisidec. 6 | # 7 | 8 | @PACKAGE@.so.1 9 | { 10 | global: 11 | ov_clear; 12 | ov_open; 13 | ov_open_callbacks; 14 | ov_test; 15 | ov_test_callbacks; 16 | ov_test_open; 17 | ov_bitrate; 18 | ov_bitrate_instant; 19 | ov_streams; 20 | ov_seekable; 21 | ov_serialnumber; 22 | ov_raw_total; 23 | ov_pcm_total; 24 | ov_time_total; 25 | ov_raw_seek; 26 | ov_pcm_seek; 27 | ov_pcm_seek_page; 28 | ov_time_seek; 29 | ov_time_seek_page; 30 | ov_raw_tell; 31 | ov_pcm_tell; 32 | ov_time_tell; 33 | ov_info; 34 | ov_comment; 35 | ov_read; 36 | 37 | vorbis_info_init; 38 | vorbis_info_clear; 39 | vorbis_info_blocksize; 40 | vorbis_comment_init; 41 | vorbis_comment_add; 42 | vorbis_comment_add_tag; 43 | vorbis_comment_query; 44 | vorbis_comment_query_count; 45 | vorbis_comment_clear; 46 | 47 | local: 48 | *; 49 | }; 50 | -------------------------------------------------------------------------------- /core/tremor/block.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * 4 | * * 5 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 6 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 7 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 8 | * * 9 | * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2008 * 10 | * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: shared block functions 15 | 16 | ********************************************************************/ 17 | 18 | #ifndef _V_BLOCK_ 19 | #define _V_BLOCK_ 20 | 21 | extern void _vorbis_block_ripcord(vorbis_block *vb); 22 | extern void *_vorbis_block_alloc(vorbis_block *vb,long bytes); 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /core/tremor/config_types.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * 4 | * * 5 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 6 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 7 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 8 | * * 9 | * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * 10 | * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: #ifdef jail to whip a few platforms into the UNIX ideal. 15 | 16 | ********************************************************************/ 17 | #ifndef _OS_CVTYPES_H 18 | #define _OS_CVTYPES_H 19 | 20 | typedef long long ogg_int64_t; 21 | typedef int ogg_int32_t; 22 | typedef unsigned int ogg_uint32_t; 23 | typedef short ogg_int16_t; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /core/tremor/mdct.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * 4 | * * 5 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 6 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 7 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 8 | * * 9 | * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * 10 | * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: modified discrete cosine transform prototypes 15 | 16 | ********************************************************************/ 17 | 18 | #ifndef _OGG_mdct_H_ 19 | #define _OGG_mdct_H_ 20 | 21 | #include "ivorbiscodec.h" 22 | #include "misc.h" 23 | 24 | #define DATA_TYPE ogg_int32_t 25 | #define REG_TYPE register ogg_int32_t 26 | 27 | #ifdef _LOW_ACCURACY_ 28 | #define cPI3_8 (0x0062) 29 | #define cPI2_8 (0x00b5) 30 | #define cPI1_8 (0x00ed) 31 | #else 32 | #define cPI3_8 (0x30fbc54d) 33 | #define cPI2_8 (0x5a82799a) 34 | #define cPI1_8 (0x7641af3d) 35 | #endif 36 | 37 | extern void mdct_forward(int n, DATA_TYPE *in, DATA_TYPE *out); 38 | extern void mdct_backward(int n, DATA_TYPE *in, DATA_TYPE *out); 39 | 40 | #endif 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /core/tremor/os.h: -------------------------------------------------------------------------------- 1 | #ifndef _OS_H 2 | #define _OS_H 3 | /******************************************************************** 4 | * * 5 | * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * 6 | * * 7 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 8 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 9 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 10 | * * 11 | * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * 12 | * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * 13 | * * 14 | ******************************************************************** 15 | 16 | function: #ifdef jail to whip a few platforms into the UNIX ideal. 17 | 18 | ********************************************************************/ 19 | 20 | #include 21 | #include "os_types.h" 22 | 23 | #ifndef _V_IFDEFJAIL_H_ 24 | # define _V_IFDEFJAIL_H_ 25 | 26 | # ifdef __GNUC__ 27 | # define STIN static __inline__ 28 | # elif _WIN32 29 | # define STIN static __inline 30 | # endif 31 | #else 32 | # define STIN static 33 | #endif 34 | 35 | #ifndef M_PI 36 | # define M_PI (3.1415926536f) 37 | #endif 38 | 39 | #ifdef _WIN32 40 | # include 41 | # define rint(x) (floor((x)+0.5f)) 42 | # define NO_FLOAT_MATH_LIB 43 | # define FAST_HYPOT(a, b) sqrt((a)*(a) + (b)*(b)) 44 | #ifndef _XBOX360 45 | # define LITTLE_ENDIAN 1 46 | # define BYTE_ORDER LITTLE_ENDIAN 47 | #endif 48 | #endif 49 | 50 | #ifdef HAVE_ALLOCA_H 51 | # include 52 | #endif 53 | 54 | #ifdef USE_MEMORY_H 55 | # include 56 | #endif 57 | 58 | #ifndef min 59 | # define min(x,y) ((x)>(y)?(y):(x)) 60 | #endif 61 | 62 | #ifndef max 63 | # define max(x,y) ((x)<(y)?(y):(x)) 64 | #endif 65 | 66 | #endif /* _OS_H */ 67 | -------------------------------------------------------------------------------- /core/tremor/os_types.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * 4 | * * 5 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 6 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 7 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 8 | * * 9 | * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * 10 | * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: #ifdef jail to whip a few platforms into the UNIX ideal. 15 | 16 | ********************************************************************/ 17 | #ifndef _OS_TYPES_H 18 | #define _OS_TYPES_H 19 | 20 | #ifdef _LOW_ACCURACY_ 21 | # define X(n) (((((n)>>22)+1)>>1) - ((((n)>>22)+1)>>9)) 22 | # define LOOKUP_T const unsigned char 23 | #else 24 | # define X(n) (n) 25 | # define LOOKUP_T const ogg_int32_t 26 | #endif 27 | 28 | /* make it easy on the folks that want to compile the libs with a 29 | different malloc than stdlib */ 30 | #define _ogg_malloc malloc 31 | #define _ogg_calloc calloc 32 | #define _ogg_realloc realloc 33 | #define _ogg_free free 34 | 35 | #if defined(_WIN32) && defined(__LIBRETRO__) 36 | #include 37 | #else 38 | #include 39 | #endif 40 | 41 | typedef int64_t ogg_int64_t; 42 | typedef int32_t ogg_int32_t; 43 | typedef uint32_t ogg_uint32_t; 44 | typedef int16_t ogg_int16_t; 45 | 46 | #endif /* _OS_TYPES_H */ 47 | -------------------------------------------------------------------------------- /core/tremor/registry.c: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * 4 | * * 5 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 6 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 7 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 8 | * * 9 | * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * 10 | * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: registry for floor, res backends and channel mappings 15 | 16 | ********************************************************************/ 17 | 18 | #include "ivorbiscodec.h" 19 | #include "codec_internal.h" 20 | #include "registry.h" 21 | #include "misc.h" 22 | 23 | 24 | /* seems like major overkill now; the backend numbers will grow into 25 | the infrastructure soon enough */ 26 | 27 | extern vorbis_func_floor floor0_exportbundle; 28 | extern vorbis_func_floor floor1_exportbundle; 29 | extern vorbis_func_residue residue0_exportbundle; 30 | extern vorbis_func_residue residue1_exportbundle; 31 | extern vorbis_func_residue residue2_exportbundle; 32 | extern vorbis_func_mapping mapping0_exportbundle; 33 | 34 | vorbis_func_floor *_floor_P[]={ 35 | &floor0_exportbundle, 36 | &floor1_exportbundle, 37 | }; 38 | 39 | vorbis_func_residue *_residue_P[]={ 40 | &residue0_exportbundle, 41 | &residue1_exportbundle, 42 | &residue2_exportbundle, 43 | }; 44 | 45 | vorbis_func_mapping *_mapping_P[]={ 46 | &mapping0_exportbundle, 47 | }; 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /core/tremor/registry.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * 4 | * * 5 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 6 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 7 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 8 | * * 9 | * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * 10 | * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: registry for time, floor, res backends and channel mappings 15 | 16 | ********************************************************************/ 17 | 18 | #ifndef _V_REG_H_ 19 | #define _V_REG_H_ 20 | 21 | #define VI_TRANSFORMB 1 22 | #define VI_WINDOWB 1 23 | #define VI_TIMEB 1 24 | #define VI_FLOORB 2 25 | #define VI_RESB 3 26 | #define VI_MAPB 1 27 | 28 | #include "backends.h" 29 | 30 | #if defined(_WIN32) && defined(VORBISDLL_IMPORT) 31 | # define EXTERN __declspec(dllimport) extern 32 | #else 33 | # define EXTERN extern 34 | #endif 35 | 36 | EXTERN vorbis_func_floor *_floor_P[]; 37 | EXTERN vorbis_func_residue *_residue_P[]; 38 | EXTERN vorbis_func_mapping *_mapping_P[]; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /core/tremor/window.c: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * 4 | * * 5 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 6 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 7 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 8 | * * 9 | * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * 10 | * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: window functions 15 | 16 | ********************************************************************/ 17 | 18 | #include 19 | #include 20 | #include "misc.h" 21 | #include "window.h" 22 | #include "window_lookup.h" 23 | 24 | const void *_vorbis_window(int type, int left){ 25 | 26 | switch(type){ 27 | case 0: 28 | 29 | switch(left){ 30 | case 32: 31 | return vwin64; 32 | case 64: 33 | return vwin128; 34 | case 128: 35 | return vwin256; 36 | case 256: 37 | return vwin512; 38 | case 512: 39 | return vwin1024; 40 | case 1024: 41 | return vwin2048; 42 | case 2048: 43 | return vwin4096; 44 | case 4096: 45 | return vwin8192; 46 | default: 47 | return(0); 48 | } 49 | break; 50 | default: 51 | return(0); 52 | } 53 | } 54 | 55 | void _vorbis_apply_window(ogg_int32_t *d,const void *window_p[2], 56 | long *blocksizes, 57 | int lW,int W,int nW){ 58 | 59 | LOOKUP_T *window[2]; 60 | long n=blocksizes[W]; 61 | long ln=blocksizes[lW]; 62 | long rn=blocksizes[nW]; 63 | 64 | long leftbegin=n/4-ln/4; 65 | long leftend=leftbegin+ln/2; 66 | 67 | long rightbegin=n/2+n/4-rn/4; 68 | long rightend=rightbegin+rn/2; 69 | 70 | int i,p; 71 | 72 | window[0]=window_p[0]; 73 | window[1]=window_p[1]; 74 | 75 | for(i=0;i 6 | 7 | /**************************************************************************** 8 | * Config Option 9 | * 10 | ****************************************************************************/ 11 | 12 | enum {A = 0, B, C, X, Y, Z, START, MODE}; 13 | 14 | typedef struct 15 | { 16 | uint8 padtype; 17 | } t_input_config; 18 | 19 | typedef struct 20 | { 21 | uint8 hq_fm; 22 | uint8 filter; 23 | uint8 psgBoostNoise; 24 | uint8 dac_bits; 25 | uint8 ym2413; 26 | int16 psg_preamp; 27 | int16 fm_preamp; 28 | uint32 lp_range; 29 | int16 low_freq; 30 | int16 high_freq; 31 | int16 lg; 32 | int16 mg; 33 | int16 hg; 34 | uint8 mono; 35 | uint8 system; 36 | uint8 region_detect; 37 | uint8 vdp_mode; 38 | uint8 master_clock; 39 | uint8 force_dtack; 40 | uint8 addr_error; 41 | uint8 bios; 42 | uint8 lock_on; 43 | uint8 hot_swap; 44 | uint8 invert_mouse; 45 | uint8 gun_cursor[2]; 46 | uint8 overscan; 47 | uint8 gg_extra; 48 | uint8 ntsc; 49 | uint8 lcd; 50 | uint8 render; 51 | t_input_config input[MAX_INPUTS]; 52 | uint8 gcw0_fullscreen; 53 | uint8 gcw0_frameskip; 54 | uint8 keepaspectratio; 55 | uint8 gg_scanlines; 56 | uint8 smsmaskleftbar; 57 | uint8 sl_autoresume; 58 | uint8 lightgun_speed; 59 | uint8 a_stick; 60 | uint8 cursor; 61 | SDLKey buttons[8]; 62 | //SDLKey button_a; 63 | //SDLKey button_b; 64 | //SDLKey button_c; 65 | //SDLKey button_x; 66 | //SDLKey button_y; 67 | //SDLKey button_z; 68 | //SDLKey button_start; 69 | //SDLKey button_mode; 70 | } t_config; 71 | 72 | /* Global variables */ 73 | extern t_config config; 74 | extern void config_save(void); 75 | extern void set_config_defaults(void); 76 | 77 | #endif /* _CONFIG_H_ */ 78 | 79 | -------------------------------------------------------------------------------- /gcw0/error.c: -------------------------------------------------------------------------------- 1 | /* 2 | error.c -- 3 | Error logging 4 | */ 5 | 6 | #include "osd.h" 7 | 8 | static FILE *error_log; 9 | 10 | void error_init(void) 11 | { 12 | #ifdef LOGERROR 13 | error_log = fopen("error.log","w"); 14 | #endif 15 | } 16 | 17 | void error_shutdown(void) 18 | { 19 | #ifdef LOGERROR 20 | if(error_log) fclose(error_log); 21 | #endif 22 | } 23 | 24 | void error(char *format, ...) 25 | { 26 | #ifdef LOGERROR 27 | if (log_error) 28 | { 29 | va_list ap; 30 | va_start(ap, format); 31 | if(error_log) vfprintf(error_log, format, ap); 32 | va_end(ap); 33 | } 34 | #endif 35 | } 36 | -------------------------------------------------------------------------------- /gcw0/error.h: -------------------------------------------------------------------------------- 1 | #ifndef _ERROR_H_ 2 | #define _ERROR_H_ 3 | 4 | /* Function prototypes */ 5 | void error_init(void); 6 | void error_shutdown(void); 7 | void error(char *format, ...); 8 | 9 | #endif /* _ERROR_H_ */ 10 | 11 | -------------------------------------------------------------------------------- /gcw0/fileio.h: -------------------------------------------------------------------------------- 1 | /* 2 | * fileio.c 3 | * 4 | * Load a normal file, or ZIP/GZ archive. 5 | * Returns loaded ROM size (zero if an error occured) 6 | * 7 | * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Charles Mac Donald 8 | * modified by Eke-Eke (Genesis Plus GX) 9 | * 10 | * Redistribution and use of this code or any derivative works are permitted 11 | * provided that the following conditions are met: 12 | * 13 | * - Redistributions may not be sold, nor may they be used in a commercial 14 | * product or activity. 15 | * 16 | * - Redistributions that are modified from the original source must include the 17 | * complete source code, including the source code for all components used by a 18 | * binary built from the modified sources. However, as a special exception, the 19 | * source code distributed need not include anything that is normally distributed 20 | * (in either source or binary form) with the major components (compiler, kernel, 21 | * and so on) of the operating system on which the executable runs, unless that 22 | * component itself accompanies the executable. 23 | * 24 | * - Redistributions must reproduce the above copyright notice, this list of 25 | * conditions and the following disclaimer in the documentation and/or other 26 | * materials provided with the distribution. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 29 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 30 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 31 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 32 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 33 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 34 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 35 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 36 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 37 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | ****************************************************************************************/ 41 | 42 | #ifndef _FILEIO_H_ 43 | #define _FILEIO_H_ 44 | 45 | /* Function prototypes */ 46 | extern int load_archive(char *filename, unsigned char *buffer, int maxsize, char *extension); 47 | 48 | #endif /* _FILEIO_H_ */ 49 | -------------------------------------------------------------------------------- /gcw0/main.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _MAIN_H_ 3 | #define _MAIN_H_ 4 | 5 | #define MAX_INPUTS 8 6 | 7 | extern int debug_on; 8 | extern int log_error; 9 | extern int sdl_input_update(void); 10 | 11 | #endif /* _MAIN_H_ */ 12 | -------------------------------------------------------------------------------- /gcw0/opk-data/CLASSIC_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gcw0/opk-data/CLASSIC_01.png -------------------------------------------------------------------------------- /gcw0/opk-data/CLASSIC_01_RED.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gcw0/opk-data/CLASSIC_01_RED.png -------------------------------------------------------------------------------- /gcw0/opk-data/CLASSIC_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gcw0/opk-data/CLASSIC_02.png -------------------------------------------------------------------------------- /gcw0/opk-data/GG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gcw0/opk-data/GG.png -------------------------------------------------------------------------------- /gcw0/opk-data/MCD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gcw0/opk-data/MCD.png -------------------------------------------------------------------------------- /gcw0/opk-data/MD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gcw0/opk-data/MD.png -------------------------------------------------------------------------------- /gcw0/opk-data/PICO.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gcw0/opk-data/PICO.png -------------------------------------------------------------------------------- /gcw0/opk-data/ProggyTiny.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gcw0/opk-data/ProggyTiny.ttf -------------------------------------------------------------------------------- /gcw0/opk-data/SG1000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gcw0/opk-data/SG1000.png -------------------------------------------------------------------------------- /gcw0/opk-data/SMS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gcw0/opk-data/SMS.png -------------------------------------------------------------------------------- /gcw0/opk-data/SQUARE_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gcw0/opk-data/SQUARE_02.png -------------------------------------------------------------------------------- /gcw0/opk-data/default.gcw0.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Genesis Plus GX 3 | Comment=Genesis Plus GX for GCW-Zero 4 | MimeType=application/zip;application/x-genesis-rom;application/x-megadrive-rom;application/x-sms-rom;application/x-cd-image; 5 | Exec=gen_gcw0 %f 6 | Terminal=false 7 | Type=Application 8 | StartupNotify=true 9 | Icon=md 10 | Categories=emulators; 11 | X-OD-Manual=gcw0readme.txt 12 | -------------------------------------------------------------------------------- /gcw0/opk-data/scanlines.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gcw0/opk-data/scanlines.png -------------------------------------------------------------------------------- /gcw0/opk_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | rm -rf genplus.opk 3 | mksquashfs gen_gcw0 opk-data/* genplus.opk -all-root -noappend -no-exports -no-xattrs -------------------------------------------------------------------------------- /gcw0/osd.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _OSD_H_ 3 | #define _OSD_H_ 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #include 11 | #include 12 | 13 | #include "shared.h" 14 | #include "main.h" 15 | #include "config.h" 16 | #include "error.h" 17 | #include "unzip.h" 18 | #include "fileio.h" 19 | 20 | #define MAXPATHLEN 1024 21 | #define DEFAULT_PATH "/.genplus" 22 | #define osd_input_update sdl_input_update 23 | 24 | 25 | #define GG_ROM "/usr/local/home/.genplus/lock-on/ggenie.bin" 26 | #define AR_ROM "/usr/local/home/.genplus/lock-on/areplay.bin" 27 | #define SK_ROM "/usr/local/home/.genplus/lock-on/sk.bin" 28 | #define SK_UPMEM "/usr/local/home/.genplus/lock-on/sk2chip.bin" 29 | #define CD_BIOS_US "/usr/local/home/.genplus/bios/bios_CD_U.bin" 30 | #define CD_BIOS_EU "/usr/local/home/.genplus/bios/bios_CD_E.bin" 31 | #define CD_BIOS_JP "/usr/local/home/.genplus/bios/bios_CD_J.bin" 32 | #define MD_BIOS "/usr/local/home/.genplus/bios/bios_MD.bin" 33 | #define MS_BIOS_US "/usr/local/home/.genplus/bios/bios_U.sms" 34 | #define MS_BIOS_EU "/usr/local/home/.genplus/bios/bios_E.sms" 35 | #define MS_BIOS_JP "/usr/local/home/.genplus/bios/bios_J.sms" 36 | #define GG_BIOS "/usr/local/home/.genplus/bios/bios.gg" 37 | 38 | #endif /* _OSD_H_ */ 39 | -------------------------------------------------------------------------------- /gcw0/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef _UTILS_H_ 2 | #define _UTILS_H_ 3 | 4 | /* Function prototypes */ 5 | void create_default_directories(void); 6 | char* get_save_directory(void); 7 | char* gcw0_get_key_name(int keycode); 8 | char *get_file_name(char *full_path); 9 | #endif /* _UTILS_H_ */ 10 | 11 | -------------------------------------------------------------------------------- /gx/fileio/file_load.h: -------------------------------------------------------------------------------- 1 | /* 2 | * file_load.c 3 | * 4 | * File loading support 5 | * 6 | * Copyright Eke-Eke (2008-2014) 7 | * 8 | * Redistribution and use of this code or any derivative works are permitted 9 | * provided that the following conditions are met: 10 | * 11 | * - Redistributions may not be sold, nor may they be used in a commercial 12 | * product or activity. 13 | * 14 | * - Redistributions that are modified from the original source must include the 15 | * complete source code, including the source code for all components used by a 16 | * binary built from the modified sources. However, as a special exception, the 17 | * source code distributed need not include anything that is normally distributed 18 | * (in either source or binary form) with the major components (compiler, kernel, 19 | * and so on) of the operating system on which the executable runs, unless that 20 | * component itself accompanies the executable. 21 | * 22 | * - Redistributions must reproduce the above copyright notice, this list of 23 | * conditions and the following disclaimer in the documentation and/or other 24 | * materials provided with the distribution. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 27 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 28 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 29 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 30 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 31 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 32 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 33 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 34 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 35 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | * POSSIBILITY OF SUCH DAMAGE. 37 | * 38 | ****************************************************************************************/ 39 | 40 | #ifndef _FILE_FAT_H 41 | #define _FILE_FAT_H 42 | 43 | /* suppported load devices */ 44 | typedef enum 45 | { 46 | TYPE_SD = 0, 47 | #ifdef HW_RVL 48 | TYPE_USB, 49 | #endif 50 | TYPE_DVD, 51 | TYPE_RECENT 52 | }DEVTYPES; 53 | 54 | /* supported file types */ 55 | typedef enum 56 | { 57 | FILETYPE_MD = 0, 58 | FILETYPE_CD, 59 | FILETYPE_MS, 60 | FILETYPE_GG, 61 | FILETYPE_SG, 62 | FILETYPE_MAX 63 | }FILETYPES; 64 | 65 | 66 | extern char *GetCurrentDirectory(void); 67 | extern int OpenDirectory(int device, int type); 68 | extern int UpdateDirectory(bool go_up, char *filename); 69 | extern int ParseDirectory(void); 70 | extern int LoadFile(int selection); 71 | 72 | extern char rom_filename[256]; 73 | 74 | #endif 75 | -------------------------------------------------------------------------------- /gx/fileio/file_slot.h: -------------------------------------------------------------------------------- 1 | /* 2 | * file_slot.c 3 | * 4 | * FAT and Memory Card SRAM/Savestate files managment 5 | * 6 | * Copyright Eke-Eke (2008-2014), based on original code from Softdev (2006) 7 | * 8 | * Redistribution and use of this code or any derivative works are permitted 9 | * provided that the following conditions are met: 10 | * 11 | * - Redistributions may not be sold, nor may they be used in a commercial 12 | * product or activity. 13 | * 14 | * - Redistributions that are modified from the original source must include the 15 | * complete source code, including the source code for all components used by a 16 | * binary built from the modified sources. However, as a special exception, the 17 | * source code distributed need not include anything that is normally distributed 18 | * (in either source or binary form) with the major components (compiler, kernel, 19 | * and so on) of the operating system on which the executable runs, unless that 20 | * component itself accompanies the executable. 21 | * 22 | * - Redistributions must reproduce the above copyright notice, this list of 23 | * conditions and the following disclaimer in the documentation and/or other 24 | * materials provided with the distribution. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 27 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 28 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 29 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 30 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 31 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 32 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 33 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 34 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 35 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | * POSSIBILITY OF SUCH DAMAGE. 37 | * 38 | ****************************************************************************************/ 39 | 40 | #ifndef _FILE_SLOT_H 41 | #define _FILE_SLOT_H 42 | 43 | typedef struct 44 | { 45 | int valid; 46 | u16 year; 47 | u8 month; 48 | u8 day; 49 | u8 hour; 50 | u8 min; 51 | } t_slot; 52 | 53 | extern void slot_autoload(int slot, int device); 54 | extern void slot_autosave(int slot, int device); 55 | extern void slot_autodetect(int slot, int device, t_slot *ptr); 56 | extern int slot_delete(int slot, int device); 57 | extern int slot_load(int slot, int device); 58 | extern int slot_save(int slot, int device); 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /gx/fileio/fileio.h: -------------------------------------------------------------------------------- 1 | /* 2 | * fileio.c 3 | * 4 | * Load a normal file, or ZIP/GZ archive into ROM buffer. 5 | * Returns loaded ROM size (zero if an error occured). 6 | * 7 | * Copyright Eke-Eke (2007-2014), based on original work from Softdev (2006) 8 | * 9 | * Redistribution and use of this code or any derivative works are permitted 10 | * provided that the following conditions are met: 11 | * 12 | * - Redistributions may not be sold, nor may they be used in a commercial 13 | * product or activity. 14 | * 15 | * - Redistributions that are modified from the original source must include the 16 | * complete source code, including the source code for all components used by a 17 | * binary built from the modified sources. However, as a special exception, the 18 | * source code distributed need not include anything that is normally distributed 19 | * (in either source or binary form) with the major components (compiler, kernel, 20 | * and so on) of the operating system on which the executable runs, unless that 21 | * component itself accompanies the executable. 22 | * 23 | * - Redistributions must reproduce the above copyright notice, this list of 24 | * conditions and the following disclaimer in the documentation and/or other 25 | * materials provided with the distribution. 26 | * 27 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 28 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 29 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 30 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 31 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 32 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 33 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 34 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 35 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 36 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 37 | * POSSIBILITY OF SUCH DAMAGE. 38 | * 39 | ****************************************************************************************/ 40 | 41 | #ifndef _FILEIO_H_ 42 | #define _FILEIO_H_ 43 | 44 | /* Function prototypes */ 45 | int load_archive(char *filename, unsigned char *buffer, int maxsize, char *extension); 46 | 47 | #endif /* _FILEIO_H_ */ 48 | -------------------------------------------------------------------------------- /gx/fileio/history.h: -------------------------------------------------------------------------------- 1 | /* 2 | * history.c 3 | * 4 | * Generic ROM history list managment 5 | * 6 | * Copyright Eke-Eke (2008-2012), based on original code from Martin Disibio (2008) 7 | * 8 | * Redistribution and use of this code or any derivative works are permitted 9 | * provided that the following conditions are met: 10 | * 11 | * - Redistributions may not be sold, nor may they be used in a commercial 12 | * product or activity. 13 | * 14 | * - Redistributions that are modified from the original source must include the 15 | * complete source code, including the source code for all components used by a 16 | * binary built from the modified sources. However, as a special exception, the 17 | * source code distributed need not include anything that is normally distributed 18 | * (in either source or binary form) with the major components (compiler, kernel, 19 | * and so on) of the operating system on which the executable runs, unless that 20 | * component itself accompanies the executable. 21 | * 22 | * - Redistributions must reproduce the above copyright notice, this list of 23 | * conditions and the following disclaimer in the documentation and/or other 24 | * materials provided with the distribution. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 27 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 28 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 29 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 30 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 31 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 32 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 33 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 34 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 35 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | * POSSIBILITY OF SUCH DAMAGE. 37 | * 38 | ****************************************************************************************/ 39 | 40 | #ifndef _HISTORY_H 41 | #define _HISTORY_H 42 | 43 | #include "filesel.h" 44 | 45 | #define NUM_HISTORY_ENTRIES (10) 46 | 47 | /**************************************************************************** 48 | * ROM Play History 49 | * 50 | ****************************************************************************/ 51 | typedef struct 52 | { 53 | char filepath[MAXJOLIET]; 54 | char filename[MAXJOLIET]; 55 | u8 filetype; 56 | } t_history_entry; 57 | 58 | typedef struct 59 | { 60 | t_history_entry entries[NUM_HISTORY_ENTRIES]; 61 | } t_history; 62 | 63 | extern t_history history; 64 | extern void history_add_file(char *filepath, char *filename, u8 filetype); 65 | extern void history_save(void); 66 | extern void history_load(void); 67 | extern void history_default(void); 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /gx/gui/cheats.h: -------------------------------------------------------------------------------- 1 | /* 2 | * cheats.c 3 | * 4 | * Genesis Plus GX Cheats menu 5 | * 6 | * Copyright Eke-Eke (2010-2014) 7 | * 8 | * Redistribution and use of this code or any derivative works are permitted 9 | * provided that the following conditions are met: 10 | * 11 | * - Redistributions may not be sold, nor may they be used in a commercial 12 | * product or activity. 13 | * 14 | * - Redistributions that are modified from the original source must include the 15 | * complete source code, including the source code for all components used by a 16 | * binary built from the modified sources. However, as a special exception, the 17 | * source code distributed need not include anything that is normally distributed 18 | * (in either source or binary form) with the major components (compiler, kernel, 19 | * and so on) of the operating system on which the executable runs, unless that 20 | * component itself accompanies the executable. 21 | * 22 | * - Redistributions must reproduce the above copyright notice, this list of 23 | * conditions and the following disclaimer in the documentation and/or other 24 | * materials provided with the distribution. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 27 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 28 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 29 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 30 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 31 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 32 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 33 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 34 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 35 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | * POSSIBILITY OF SUCH DAMAGE. 37 | * 38 | ****************************************************************************************/ 39 | 40 | #ifndef _CHEATS_H 41 | #define _CHEATS_H 42 | 43 | #define CHEATS_UPDATE() ROMCheatUpdate() 44 | 45 | extern void CheatMenu(void); 46 | extern void CheatLoad(void); 47 | extern void RAMCheatUpdate(void); 48 | extern void ROMCheatUpdate(void); 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /gx/gui/filesel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * filesel.c 3 | * 4 | * File Browser 5 | * 6 | * Copyright Eke-Eke (2009-2014) 7 | * 8 | * Redistribution and use of this code or any derivative works are permitted 9 | * provided that the following conditions are met: 10 | * 11 | * - Redistributions may not be sold, nor may they be used in a commercial 12 | * product or activity. 13 | * 14 | * - Redistributions that are modified from the original source must include the 15 | * complete source code, including the source code for all components used by a 16 | * binary built from the modified sources. However, as a special exception, the 17 | * source code distributed need not include anything that is normally distributed 18 | * (in either source or binary form) with the major components (compiler, kernel, 19 | * and so on) of the operating system on which the executable runs, unless that 20 | * component itself accompanies the executable. 21 | * 22 | * - Redistributions must reproduce the above copyright notice, this list of 23 | * conditions and the following disclaimer in the documentation and/or other 24 | * materials provided with the distribution. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 27 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 28 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 29 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 30 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 31 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 32 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 33 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 34 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 35 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | * POSSIBILITY OF SUCH DAMAGE. 37 | * 38 | ****************************************************************************************/ 39 | 40 | #ifndef _FILESEL_H 41 | #define _FILESEL_H 42 | 43 | #define MAXJOLIET 256 44 | #define MAXFILES 1000 45 | 46 | /* Filelist structure */ 47 | typedef struct 48 | { 49 | u8 flags; 50 | char filename[MAXJOLIET]; 51 | }FILEENTRIES; 52 | 53 | /* Globals */ 54 | extern int FileSelector(int type); 55 | extern void ClearSelector(u32 max); 56 | extern FILEENTRIES filelist[MAXFILES]; 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /gx/gui/font.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * font.c 3 | * 4 | * IPL font engine (using GX rendering) 5 | * 6 | * Copyright Eke-Eke (2009-2016) 7 | * 8 | * Redistribution and use of this code or any derivative works are permitted 9 | * provided that the following conditions are met: 10 | * 11 | * - Redistributions may not be sold, nor may they be used in a commercial 12 | * product or activity. 13 | * 14 | * - Redistributions that are modified from the original source must include the 15 | * complete source code, including the source code for all components used by a 16 | * binary built from the modified sources. However, as a special exception, the 17 | * source code distributed need not include anything that is normally distributed 18 | * (in either source or binary form) with the major components (compiler, kernel, 19 | * and so on) of the operating system on which the executable runs, unless that 20 | * component itself accompanies the executable. 21 | * 22 | * - Redistributions must reproduce the above copyright notice, this list of 23 | * conditions and the following disclaimer in the documentation and/or other 24 | * materials provided with the distribution. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 27 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 28 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 29 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 30 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 31 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 32 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 33 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 34 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 35 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | * POSSIBILITY OF SUCH DAMAGE. 37 | * 38 | ****************************************************************************************/ 39 | 40 | #ifndef _FONT_H 41 | #define _FONT_H 42 | 43 | extern int FONT_Init(void); 44 | extern void FONT_Shutdown(void); 45 | extern int FONT_write(char *string, int size, int x, int y, int max_width, GXColor color); 46 | extern int FONT_writeCenter(char *string, int size, int x1, int x2, int y, GXColor color); 47 | extern int FONT_alignRight(char *string, int size, int x, int y, GXColor color); 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /gx/gui/menu.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/gui/menu.c -------------------------------------------------------------------------------- /gx/gui/menu.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * menu.c 3 | * 4 | * Genesis Plus GX menus 5 | * 6 | * Copyright Eke-Eke (2009-2016) 7 | * 8 | * Redistribution and use of this code or any derivative works are permitted 9 | * provided that the following conditions are met: 10 | * 11 | * - Redistributions may not be sold, nor may they be used in a commercial 12 | * product or activity. 13 | * 14 | * - Redistributions that are modified from the original source must include the 15 | * complete source code, including the source code for all components used by a 16 | * binary built from the modified sources. However, as a special exception, the 17 | * source code distributed need not include anything that is normally distributed 18 | * (in either source or binary form) with the major components (compiler, kernel, 19 | * and so on) of the operating system on which the executable runs, unless that 20 | * component itself accompanies the executable. 21 | * 22 | * - Redistributions must reproduce the above copyright notice, this list of 23 | * conditions and the following disclaimer in the documentation and/or other 24 | * materials provided with the distribution. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 27 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 28 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 29 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 30 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 31 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 32 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 33 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 34 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 35 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | * POSSIBILITY OF SUCH DAMAGE. 37 | * 38 | ****************************************************************************************/ 39 | 40 | #ifndef _MENU_H 41 | #define _MENU_H 42 | 43 | extern void mainmenu(void); 44 | extern void (*reload)(void); 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /gx/gx_audio.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * gx_audio.c 3 | * 4 | * Genesis Plus GX audio support 5 | * 6 | * Copyright Eke-Eke (2007-2015), based on original work from Softdev (2006) 7 | * 8 | * Redistribution and use of this code or any derivative works are permitted 9 | * provided that the following conditions are met: 10 | * 11 | * - Redistributions may not be sold, nor may they be used in a commercial 12 | * product or activity. 13 | * 14 | * - Redistributions that are modified from the original source must include the 15 | * complete source code, including the source code for all components used by a 16 | * binary built from the modified sources. However, as a special exception, the 17 | * source code distributed need not include anything that is normally distributed 18 | * (in either source or binary form) with the major components (compiler, kernel, 19 | * and so on) of the operating system on which the executable runs, unless that 20 | * component itself accompanies the executable. 21 | * 22 | * - Redistributions must reproduce the above copyright notice, this list of 23 | * conditions and the following disclaimer in the documentation and/or other 24 | * materials provided with the distribution. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 27 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 28 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 29 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 30 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 31 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 32 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 33 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 34 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 35 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | * POSSIBILITY OF SUCH DAMAGE. 37 | * 38 | ****************************************************************************************/ 39 | 40 | #ifndef _GC_AUDIO_H_ 41 | #define _GC_AUDIO_H_ 42 | 43 | extern u32 audioSync; 44 | 45 | extern void gx_audio_Init(void); 46 | extern void gx_audio_Shutdown(void); 47 | extern void gx_audio_Start(void); 48 | extern void gx_audio_Stop(void); 49 | extern int gx_audio_Update(int status); 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /gx/gx_input.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * gx_input.c 3 | * 4 | * Genesis Plus GX input support 5 | * 6 | * Copyright Eke-Eke (2007-2015) 7 | * 8 | * Redistribution and use of this code or any derivative works are permitted 9 | * provided that the following conditions are met: 10 | * 11 | * - Redistributions may not be sold, nor may they be used in a commercial 12 | * product or activity. 13 | * 14 | * - Redistributions that are modified from the original source must include the 15 | * complete source code, including the source code for all components used by a 16 | * binary built from the modified sources. However, as a special exception, the 17 | * source code distributed need not include anything that is normally distributed 18 | * (in either source or binary form) with the major components (compiler, kernel, 19 | * and so on) of the operating system on which the executable runs, unless that 20 | * component itself accompanies the executable. 21 | * 22 | * - Redistributions must reproduce the above copyright notice, this list of 23 | * conditions and the following disclaimer in the documentation and/or other 24 | * materials provided with the distribution. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 27 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 28 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 29 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 30 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 31 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 32 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 33 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 34 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 35 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | * POSSIBILITY OF SUCH DAMAGE. 37 | * 38 | ****************************************************************************************/ 39 | 40 | #ifndef _GC_INPUT_H_ 41 | #define _GC_INPUT_H_ 42 | 43 | #define osd_input_update() gx_input_UpdateEmu() 44 | 45 | /* max. supported inputs */ 46 | #ifdef HW_RVL 47 | #define MAX_INPUTS 8 48 | #else 49 | #define MAX_INPUTS 4 50 | #endif 51 | 52 | /* Configurable keys */ 53 | #define MAX_KEYS 8 54 | 55 | 56 | /* Key configuration structure */ 57 | typedef struct 58 | { 59 | s8 device; 60 | u8 port; 61 | u8 padtype; 62 | } t_input_config; 63 | 64 | 65 | extern void gx_input_Init(void); 66 | extern int gx_input_FindDevices(void); 67 | extern void gx_input_SetDefault(void); 68 | extern void gx_input_Config(u8 chan, u8 device, u8 type); 69 | extern void gx_input_UpdateEmu(void); 70 | extern void gx_input_UpdateMenu(void); 71 | 72 | #endif 73 | -------------------------------------------------------------------------------- /gx/images/Banner_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Banner_bottom.png -------------------------------------------------------------------------------- /gx/images/Banner_main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Banner_main.png -------------------------------------------------------------------------------- /gx/images/Banner_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Banner_top.png -------------------------------------------------------------------------------- /gx/images/Bg_credits.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Bg_credits.png -------------------------------------------------------------------------------- /gx/images/Bg_intro_c1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Bg_intro_c1.png -------------------------------------------------------------------------------- /gx/images/Bg_intro_c2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Bg_intro_c2.png -------------------------------------------------------------------------------- /gx/images/Bg_intro_c3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Bg_intro_c3.png -------------------------------------------------------------------------------- /gx/images/Bg_intro_c4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Bg_intro_c4.png -------------------------------------------------------------------------------- /gx/images/Bg_layer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Bg_layer.png -------------------------------------------------------------------------------- /gx/images/Bg_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Bg_overlay.png -------------------------------------------------------------------------------- /gx/images/Browser_dir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Browser_dir.png -------------------------------------------------------------------------------- /gx/images/Button_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Button_arrow.png -------------------------------------------------------------------------------- /gx/images/Button_arrow_over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Button_arrow_over.png -------------------------------------------------------------------------------- /gx/images/Button_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Button_delete.png -------------------------------------------------------------------------------- /gx/images/Button_delete_over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Button_delete_over.png -------------------------------------------------------------------------------- /gx/images/Button_digit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Button_digit.png -------------------------------------------------------------------------------- /gx/images/Button_digit_over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Button_digit_over.png -------------------------------------------------------------------------------- /gx/images/Button_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Button_down.png -------------------------------------------------------------------------------- /gx/images/Button_down_over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Button_down_over.png -------------------------------------------------------------------------------- /gx/images/Button_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Button_icon.png -------------------------------------------------------------------------------- /gx/images/Button_icon_over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Button_icon_over.png -------------------------------------------------------------------------------- /gx/images/Button_icon_sm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Button_icon_sm.png -------------------------------------------------------------------------------- /gx/images/Button_icon_sm_over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Button_icon_sm_over.png -------------------------------------------------------------------------------- /gx/images/Button_load.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Button_load.png -------------------------------------------------------------------------------- /gx/images/Button_load_over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Button_load_over.png -------------------------------------------------------------------------------- /gx/images/Button_save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Button_save.png -------------------------------------------------------------------------------- /gx/images/Button_save_over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Button_save_over.png -------------------------------------------------------------------------------- /gx/images/Button_sm_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Button_sm_blue.png -------------------------------------------------------------------------------- /gx/images/Button_sm_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Button_sm_grey.png -------------------------------------------------------------------------------- /gx/images/Button_sm_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Button_sm_yellow.png -------------------------------------------------------------------------------- /gx/images/Button_special.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Button_special.png -------------------------------------------------------------------------------- /gx/images/Button_special_over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Button_special_over.png -------------------------------------------------------------------------------- /gx/images/Button_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Button_text.png -------------------------------------------------------------------------------- /gx/images/Button_text_over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Button_text_over.png -------------------------------------------------------------------------------- /gx/images/Button_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Button_up.png -------------------------------------------------------------------------------- /gx/images/Button_up_over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Button_up_over.png -------------------------------------------------------------------------------- /gx/images/CD_access_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/CD_access_off.png -------------------------------------------------------------------------------- /gx/images/CD_access_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/CD_access_on.png -------------------------------------------------------------------------------- /gx/images/CD_ready_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/CD_ready_off.png -------------------------------------------------------------------------------- /gx/images/CD_ready_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/CD_ready_on.png -------------------------------------------------------------------------------- /gx/images/Cart_gg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Cart_gg.png -------------------------------------------------------------------------------- /gx/images/Cart_md.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Cart_md.png -------------------------------------------------------------------------------- /gx/images/Cart_ms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Cart_ms.png -------------------------------------------------------------------------------- /gx/images/Cart_sg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Cart_sg.png -------------------------------------------------------------------------------- /gx/images/Crosshair_p1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Crosshair_p1.png -------------------------------------------------------------------------------- /gx/images/Crosshair_p2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Crosshair_p2.png -------------------------------------------------------------------------------- /gx/images/Ctrl_4wayplay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Ctrl_4wayplay.png -------------------------------------------------------------------------------- /gx/images/Ctrl_activator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Ctrl_activator.png -------------------------------------------------------------------------------- /gx/images/Ctrl_config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Ctrl_config.png -------------------------------------------------------------------------------- /gx/images/Ctrl_gamepad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Ctrl_gamepad.png -------------------------------------------------------------------------------- /gx/images/Ctrl_graphic_board.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Ctrl_graphic_board.png -------------------------------------------------------------------------------- /gx/images/Ctrl_justifiers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Ctrl_justifiers.png -------------------------------------------------------------------------------- /gx/images/Ctrl_lightphaser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Ctrl_lightphaser.png -------------------------------------------------------------------------------- /gx/images/Ctrl_mastertap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Ctrl_mastertap.png -------------------------------------------------------------------------------- /gx/images/Ctrl_menacer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Ctrl_menacer.png -------------------------------------------------------------------------------- /gx/images/Ctrl_mouse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Ctrl_mouse.png -------------------------------------------------------------------------------- /gx/images/Ctrl_none.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Ctrl_none.png -------------------------------------------------------------------------------- /gx/images/Ctrl_pad2b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Ctrl_pad2b.png -------------------------------------------------------------------------------- /gx/images/Ctrl_pad3b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Ctrl_pad3b.png -------------------------------------------------------------------------------- /gx/images/Ctrl_pad6b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Ctrl_pad6b.png -------------------------------------------------------------------------------- /gx/images/Ctrl_pad_auto.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Ctrl_pad_auto.png -------------------------------------------------------------------------------- /gx/images/Ctrl_paddle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Ctrl_paddle.png -------------------------------------------------------------------------------- /gx/images/Ctrl_sportspad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Ctrl_sportspad.png -------------------------------------------------------------------------------- /gx/images/Ctrl_teamplayer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Ctrl_teamplayer.png -------------------------------------------------------------------------------- /gx/images/Ctrl_xe_1ap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Ctrl_xe_1ap.png -------------------------------------------------------------------------------- /gx/images/Frame_s1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Frame_s1.png -------------------------------------------------------------------------------- /gx/images/Frame_s1_title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Frame_s1_title.png -------------------------------------------------------------------------------- /gx/images/Frame_s2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Frame_s2.png -------------------------------------------------------------------------------- /gx/images/Frame_s2_title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Frame_s2_title.png -------------------------------------------------------------------------------- /gx/images/Frame_s3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Frame_s3.png -------------------------------------------------------------------------------- /gx/images/Frame_throbber.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Frame_throbber.png -------------------------------------------------------------------------------- /gx/images/Key_A_gcn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Key_A_gcn.png -------------------------------------------------------------------------------- /gx/images/Key_A_wii.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Key_A_wii.png -------------------------------------------------------------------------------- /gx/images/Key_B_gcn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Key_B_gcn.png -------------------------------------------------------------------------------- /gx/images/Key_B_wii.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Key_B_wii.png -------------------------------------------------------------------------------- /gx/images/Key_DPAD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Key_DPAD.png -------------------------------------------------------------------------------- /gx/images/Key_L_gcn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Key_L_gcn.png -------------------------------------------------------------------------------- /gx/images/Key_Minus_wii.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Key_Minus_wii.png -------------------------------------------------------------------------------- /gx/images/Key_Plus_wii.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Key_Plus_wii.png -------------------------------------------------------------------------------- /gx/images/Key_R_gcn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Key_R_gcn.png -------------------------------------------------------------------------------- /gx/images/Load_cd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Load_cd.png -------------------------------------------------------------------------------- /gx/images/Load_gg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Load_gg.png -------------------------------------------------------------------------------- /gx/images/Load_md.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Load_md.png -------------------------------------------------------------------------------- /gx/images/Load_ms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Load_ms.png -------------------------------------------------------------------------------- /gx/images/Load_recent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Load_recent.png -------------------------------------------------------------------------------- /gx/images/Load_sg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Load_sg.png -------------------------------------------------------------------------------- /gx/images/Main_cheats.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Main_cheats.png -------------------------------------------------------------------------------- /gx/images/Main_file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Main_file.png -------------------------------------------------------------------------------- /gx/images/Main_load.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Main_load.png -------------------------------------------------------------------------------- /gx/images/Main_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Main_logo.png -------------------------------------------------------------------------------- /gx/images/Main_options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Main_options.png -------------------------------------------------------------------------------- /gx/images/Main_play_gcn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Main_play_gcn.png -------------------------------------------------------------------------------- /gx/images/Main_play_wii.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Main_play_wii.png -------------------------------------------------------------------------------- /gx/images/Main_quit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Main_quit.png -------------------------------------------------------------------------------- /gx/images/Main_reset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Main_reset.png -------------------------------------------------------------------------------- /gx/images/Main_showinfo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Main_showinfo.png -------------------------------------------------------------------------------- /gx/images/Main_takeshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Main_takeshot.png -------------------------------------------------------------------------------- /gx/images/Option_ctrl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Option_ctrl.png -------------------------------------------------------------------------------- /gx/images/Option_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Option_menu.png -------------------------------------------------------------------------------- /gx/images/Option_sound.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Option_sound.png -------------------------------------------------------------------------------- /gx/images/Option_system.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Option_system.png -------------------------------------------------------------------------------- /gx/images/Option_video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Option_video.png -------------------------------------------------------------------------------- /gx/images/Overlay_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Overlay_bar.png -------------------------------------------------------------------------------- /gx/images/Snap_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Snap_empty.png -------------------------------------------------------------------------------- /gx/images/Star_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Star_empty.png -------------------------------------------------------------------------------- /gx/images/Star_full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/Star_full.png -------------------------------------------------------------------------------- /gx/images/ctrl_classic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/ctrl_classic.png -------------------------------------------------------------------------------- /gx/images/ctrl_gamecube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/ctrl_gamecube.png -------------------------------------------------------------------------------- /gx/images/ctrl_nunchuk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/ctrl_nunchuk.png -------------------------------------------------------------------------------- /gx/images/ctrl_option_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/ctrl_option_off.png -------------------------------------------------------------------------------- /gx/images/ctrl_option_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/ctrl_option_on.png -------------------------------------------------------------------------------- /gx/images/ctrl_wiimote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/ctrl_wiimote.png -------------------------------------------------------------------------------- /gx/images/generic_point.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/images/generic_point.png -------------------------------------------------------------------------------- /gx/osd.h: -------------------------------------------------------------------------------- 1 | /*************************************************/ 2 | /* port specific stuff should be put there */ 3 | /*************************************************/ 4 | 5 | #ifndef _OSD_H_ 6 | #define _OSD_H_ 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | #ifdef HW_RVL 21 | #include 22 | #include 23 | #include "vi_encoder.h" 24 | #endif 25 | 26 | #include "gx_input.h" 27 | #include "gx_audio.h" 28 | #include "gx_video.h" 29 | #include "file_load.h" 30 | #include "cheats.h" 31 | 32 | #include "config.h" 33 | #include "fileio.h" 34 | 35 | #define DEFAULT_PATH "/genplus" 36 | 37 | /*************************************************/ 38 | /* required by Genesis Plus GX core */ 39 | /*************************************************/ 40 | #define CD_BIOS_US config.sys_rom[0] 41 | #define CD_BIOS_EU config.sys_rom[1] 42 | #define CD_BIOS_JP config.sys_rom[2] 43 | #define MD_BIOS config.sys_rom[3] 44 | #define MS_BIOS_US config.sys_rom[4] 45 | #define MS_BIOS_EU config.sys_rom[5] 46 | #define MS_BIOS_JP config.sys_rom[6] 47 | #define GG_BIOS config.sys_rom[7] 48 | #define GG_ROM config.sys_rom[8] 49 | #define AR_ROM config.sys_rom[9] 50 | #define SK_ROM config.sys_rom[10] 51 | #define SK_UPMEM config.sys_rom[11] 52 | 53 | #define CD_BRAM_US "/genplus/saves/cd/scd_U.brm" 54 | #define CD_BRAM_EU "/genplus/saves/cd/scd_E.brm" 55 | #define CD_BRAM_JP "/genplus/saves/cd/scd_J.brm" 56 | #define CART_BRAM "/genplus/saves/cd/cart.brm" 57 | 58 | /*********************************************************/ 59 | /* implemented by Genesis Plus GX core (GC/Wii specific) */ 60 | /*********************************************************/ 61 | 62 | /* 32 bytes aligned sound buffers (8 samples alignment) */ 63 | #define ALIGN_SND 0xfffffff8 64 | 65 | /* use Wii DVD LED to indicate when virtual CD tray is open */ 66 | #ifdef HW_RVL 67 | #define CD_TRAY_CALLBACK *(u32*)0xcd0000c0 = (*(u32*)0xcd0000c0 & ~0x20) | ((cdd.status == CD_OPEN) << 5); 68 | #endif 69 | 70 | /*************************************************/ 71 | 72 | #define VERSION "Genesis Plus GX 1.7.5" 73 | 74 | #define VIDEO_WAIT 0x01 75 | #define AUDIO_WAIT 0x02 76 | #define VIDEO_UPDATE 0x04 77 | #define AUDIO_UPDATE 0x08 78 | 79 | /* globals */ 80 | extern void legal(void); 81 | extern double get_framerate(void); 82 | extern void reloadrom(void); 83 | extern void shutdown(void); 84 | extern u32 Shutdown; 85 | extern u32 ConfigRequested; 86 | 87 | #endif /* _OSD_H_ */ 88 | -------------------------------------------------------------------------------- /gx/sounds/button_over.pcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/sounds/button_over.pcm -------------------------------------------------------------------------------- /gx/sounds/button_select.pcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/sounds/button_select.pcm -------------------------------------------------------------------------------- /gx/sounds/intro.pcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/sounds/intro.pcm -------------------------------------------------------------------------------- /gx/utils/oggplayer.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/utils/oggplayer.c -------------------------------------------------------------------------------- /gx/utils/oggplayer.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/gx/utils/oggplayer.h -------------------------------------------------------------------------------- /gx/utils/vi_encoder.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * vi_encoder.c 3 | * 4 | * Wii Audio/Video Encoder support 5 | * 6 | * Copyright (C) 2009 Eke-Eke, with some code from libogc (C) Hector Martin 7 | * 8 | * Redistribution and use in source and binary forms, with or without modification, 9 | * are permitted provided that the following conditions are met: 10 | * 11 | * 1. Redistributions of source code must retain the above copyright notice, 12 | * this list of conditions and the following disclaimer. 13 | * 14 | * 2. Redistributions in binary form must reproduce the above copyright notice, 15 | * this list of conditions and the following disclaimer in the documentation and/or 16 | * other materials provided with the distribution. 17 | * 18 | * 3. The name of the author may not be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * 33 | ****************************************************************************************/ 34 | #ifdef HW_RVL 35 | 36 | typedef enum 37 | { 38 | VI_GM_0_1=1, 39 | VI_GM_0_2, 40 | VI_GM_0_3, 41 | VI_GM_0_4, 42 | VI_GM_0_5, 43 | VI_GM_0_6, 44 | VI_GM_0_7, 45 | VI_GM_0_8, 46 | VI_GM_0_9, 47 | VI_GM_1_0, 48 | VI_GM_1_1, 49 | VI_GM_1_2, 50 | VI_GM_1_3, 51 | VI_GM_1_4, 52 | VI_GM_1_5, 53 | VI_GM_1_6, 54 | VI_GM_1_7, 55 | VI_GM_1_8, 56 | VI_GM_1_9, 57 | VI_GM_2_0, 58 | VI_GM_2_1, 59 | VI_GM_2_2, 60 | VI_GM_2_3, 61 | VI_GM_2_4, 62 | VI_GM_2_5, 63 | VI_GM_2_6, 64 | VI_GM_2_7, 65 | VI_GM_2_8, 66 | VI_GM_2_9, 67 | VI_GM_3_0 68 | } VIGamma; 69 | 70 | extern void VIDEO_SetGamma(VIGamma gamma); 71 | extern void VIDEO_SetTrapFilter(bool enable); 72 | 73 | 74 | #endif 75 | -------------------------------------------------------------------------------- /libretro/Makefile.common: -------------------------------------------------------------------------------- 1 | GENPLUS_SRC_DIR := $(CORE_DIR)/core \ 2 | $(CORE_DIR)/core/z80 \ 3 | $(CORE_DIR)/core/m68k \ 4 | $(CORE_DIR)/core/ntsc \ 5 | $(CORE_DIR)/core/sound \ 6 | $(CORE_DIR)/core/input_hw \ 7 | $(CORE_DIR)/core/cd_hw \ 8 | $(CORE_DIR)/core/cart_hw \ 9 | $(CORE_DIR)/core/cart_hw/svp 10 | 11 | SOURCES_C = $(foreach dir,$(GENPLUS_SRC_DIR),$(wildcard $(dir)/*.c)) \ 12 | $(foreach dir,$(TREMOR_SRC_DIR),$(wildcard $(dir)/*.c)) \ 13 | $(LIBRETRO_DIR)/libretro.c 14 | 15 | SOURCES_C += $(LIBRETRO_DIR)/scrc32.c 16 | 17 | INCFLAGS += $(foreach dir,$(GENPLUS_SRC_DIR),-I$(dir)) -I$(LIBRETRO_DIR) 18 | -------------------------------------------------------------------------------- /libretro/debian/changelog: -------------------------------------------------------------------------------- 1 | libretro-genesisplusgx (1.7.4-0ubuntu3) UNRELEASED; urgency=low 2 | 3 | * Updated to latest git. 4 | * Debian folder from hunterk PPA to upstream 5 | * Updated debian package and fixed lintian errors/warnings 6 | 7 | -- Sérgio Benjamim Mon, 14 Jul 2014 22:40:00 -0300 8 | 9 | 10 | libretro-genesisplusgx (1.7.4-0ubuntu2) UNRELEASED; urgency=low 11 | 12 | * Updated to latest git. 13 | 14 | -- Hunter Kaller (hizzlekizzle) Wed, 12 Mar 2014 13:24:59 -0500 15 | -------------------------------------------------------------------------------- /libretro/debian/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /libretro/debian/control: -------------------------------------------------------------------------------- 1 | Source: libretro-genesisplusgx 2 | Section: otherosfs 3 | Priority: extra 4 | Maintainer: Hunter Kaller (hizzlekizzle) 5 | Build-Depends: debhelper (>= 9), zlib1g-dev 6 | Standards-Version: 3.9.5 7 | Homepage: https://code.google.com/p/genplus-gx 8 | Vcs-Git: git://github.com/libretro/Genesis-Plus-GX.git 9 | Vcs-Browser: https://github.com/libretro/Genesis-Plus-GX 10 | 11 | Package: libretro-genesisplusgx 12 | Architecture: any 13 | Depends: ${shlibs:Depends}, ${misc:Depends}, libretro-core-info 14 | Description: Libretro wrapper for Genesis Plus GX 15 | This wrapper makes Genesis Plus GX API compatible with libretro, thus allowing 16 | its use with libretro frontends, such as RetroArch. 17 | . 18 | Genesis Plus GX is an open-source Sega 8/16 bit emulator focused on accuracy 19 | and portability. Initially ported and developed on Gamecube / Wii consoles 20 | only through libogc / devkitPPC, it is now available on many other platforms 21 | through various frontends. 22 | . 23 | The source code, originally based on Genesis Plus 1.3 by Charles MacDonald, has 24 | been heavily modified & enhanced, with respect to initial goals and design, in 25 | order to improve the accuracy of emulation, implementing new features and 26 | adding support for extra peripherals, cartridge & systems hardware. 27 | . 28 | The result is that Genesis Plus GX is now more a continuation of the original 29 | project than a simple port, providing very accurate emulation and 100% 30 | compatibility with Genesis / Mega Drive, Sega/Mega CD, Master System, Game Gear 31 | & SG-1000 released software (including all unlicensed or pirate known dumps), 32 | also emulating backwards compatibility modes when available. 33 | -------------------------------------------------------------------------------- /libretro/debian/dirs: -------------------------------------------------------------------------------- 1 | usr/lib/libretro 2 | -------------------------------------------------------------------------------- /libretro/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | # Copyright (C) 2011-2015 Hunter Kaller 4 | # Copyright (C) 2014, 2015 Sergio Benjamim 5 | 6 | # This program is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation; either version 2, or (at your option) 9 | # any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, write to the Free Software Foundation, 18 | # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | 20 | # Uncomment this to turn on verbose mode. 21 | #export DH_VERBOSE=1 22 | 23 | %: 24 | dh $@ --parallel 25 | 26 | ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH) 27 | 28 | override_dh_auto_build: 29 | ifeq ($(ARCH),armhf) 30 | $(MAKE) -f Makefile.libretro platform="armv hardfloat" 31 | else 32 | $(MAKE) -f Makefile.libretro 33 | endif 34 | 35 | override_dh_auto_install: 36 | cp *.so debian/libretro-*/usr/lib/libretro/ 37 | 38 | override_dh_auto_clean: 39 | $(MAKE) -f Makefile.libretro clean 40 | -------------------------------------------------------------------------------- /libretro/debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /libretro/jni/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | WANT_CRC32 := 1 6 | 7 | CORE_DIR := ../.. 8 | 9 | TREMOR_SRC_DIR := $(CORE_DIR)/core/tremor 10 | LIBRETRO_DIR := .. 11 | 12 | LOCAL_MODULE := retro 13 | 14 | ifeq ($(TARGET_ARCH),arm) 15 | LOCAL_CFLAGS += -DANDROID_ARM -D_ARM_ASSEM_ 16 | LOCAL_ARM_MODE := arm 17 | endif 18 | 19 | include $(LIBRETRO_DIR)/Makefile.common 20 | 21 | LOCAL_SRC_FILES := $(SOURCES_C) 22 | 23 | LOCAL_C_INCLUDES = $(foreach dir,$(GENPLUS_SRC_DIR),$(LOCAL_PATH)/$(dir)) \ 24 | $(LOCAL_PATH)/$(TREMOR_SRC_DIR) \ 25 | $(LOCAL_PATH)/$(LIBRETRO_DIR) 26 | 27 | LOCAL_CFLAGS += -ffast-math -O2 -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 28 | 29 | include $(BUILD_SHARED_LIBRARY) 30 | -------------------------------------------------------------------------------- /libretro/jni/Application.mk: -------------------------------------------------------------------------------- 1 | APP_ABI := all 2 | -------------------------------------------------------------------------------- /libretro/link.T: -------------------------------------------------------------------------------- 1 | { 2 | global: retro_*; 3 | local: *; 4 | }; 5 | 6 | -------------------------------------------------------------------------------- /libretro/msvc/msvc-2003-xbox1.bat: -------------------------------------------------------------------------------- 1 | @SET VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE 2 | @SET VCINSTALLDIR=C:\Program Files\Microsoft Visual Studio .NET 2003 3 | @SET FrameworkDir=C:\WINDOWS\Microsoft.NET\Framework 4 | @SET FrameworkVersion=v1.1.4322 5 | @SET FrameworkSDKDir=C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1 6 | @rem Root of Visual Studio common files. 7 | 8 | @if "%VSINSTALLDIR%"=="" goto Usage 9 | @if "%VCINSTALLDIR%"=="" set VCINSTALLDIR=%VSINSTALLDIR% 10 | 11 | @rem 12 | @rem Root of Visual Studio ide installed files. 13 | @rem 14 | @set DevEnvDir=%VSINSTALLDIR% 15 | 16 | @rem 17 | @rem Root of Visual C++ installed files. 18 | @rem 19 | @set MSVCDir=%VCINSTALLDIR%\VC7 20 | 21 | @rem 22 | @echo Setting environment for using Microsoft Visual Studio .NET 2003 tools. 23 | @echo (If you have another version of Visual Studio or Visual C++ installed and wish 24 | @echo to use its tools from the command line, run vcvars32.bat for that version.) 25 | @rem 26 | 27 | @REM %VCINSTALLDIR%\Common7\Tools dir is added only for real setup. 28 | 29 | @set PATH=%DevEnvDir%;%MSVCDir%\BIN;%VCINSTALLDIR%\Common7\Tools;%VCINSTALLDIR%\Common7\Tools\bin\prerelease;%VCINSTALLDIR%\Common7\Tools\bin;%FrameworkSDKDir%\bin;%FrameworkDir%\%FrameworkVersion%;%PATH%; 30 | @set INCLUDE=%MSVCDir%\ATLMFC\INCLUDE;%MSVCDir%\INCLUDE;%FrameworkSDKDir%\include;%INCLUDE%;%XDK%\xbox\include 31 | @set LIB=%MSVCDir%\ATLMFC\LIB;%MSVCDir%\LIB;%MSVCDir%\PlatformSDK\lib;%XDK%\lib;%XDK%\xbox\lib;%LIB% 32 | 33 | @goto end 34 | 35 | :Usage 36 | 37 | @echo. VSINSTALLDIR variable is not set. 38 | @echo. 39 | @echo SYNTAX: %0 40 | 41 | @goto end 42 | 43 | :end 44 | 45 | devenv /clean Release_LTCG msvc-2003-xbox1.sln 46 | devenv /build Release_LTCG msvc-2003-xbox1.sln 47 | exit 48 | -------------------------------------------------------------------------------- /libretro/msvc/msvc-2003-xbox1.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 8.00 2 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "msvc-2003-xbox1", "msvc-2003-xbox1/msvc-2003-xbox1.vcproj", "{C0C3EF9B-2D9B-44D1-A83F-3617D8BA3421}" 3 | ProjectSection(ProjectDependencies) = postProject 4 | EndProjectSection 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfiguration) = preSolution 8 | Debug = Debug 9 | Profile = Profile 10 | Profile_FastCap = Profile_FastCap 11 | Release = Release 12 | Release_LTCG = Release_LTCG 13 | EndGlobalSection 14 | GlobalSection(ProjectConfiguration) = postSolution 15 | {C0C3EF9B-2D9B-44D1-A83F-3617D8BA3421}.Debug.ActiveCfg = Debug|Xbox 16 | {C0C3EF9B-2D9B-44D1-A83F-3617D8BA3421}.Debug.Build.0 = Debug|Xbox 17 | {C0C3EF9B-2D9B-44D1-A83F-3617D8BA3421}.Profile.ActiveCfg = Profile|Xbox 18 | {C0C3EF9B-2D9B-44D1-A83F-3617D8BA3421}.Profile.Build.0 = Profile|Xbox 19 | {C0C3EF9B-2D9B-44D1-A83F-3617D8BA3421}.Profile_FastCap.ActiveCfg = Profile_FastCap|Xbox 20 | {C0C3EF9B-2D9B-44D1-A83F-3617D8BA3421}.Profile_FastCap.Build.0 = Profile_FastCap|Xbox 21 | {C0C3EF9B-2D9B-44D1-A83F-3617D8BA3421}.Release.ActiveCfg = Release|Xbox 22 | {C0C3EF9B-2D9B-44D1-A83F-3617D8BA3421}.Release.Build.0 = Release|Xbox 23 | {C0C3EF9B-2D9B-44D1-A83F-3617D8BA3421}.Release_LTCG.ActiveCfg = Release_LTCG|Xbox 24 | {C0C3EF9B-2D9B-44D1-A83F-3617D8BA3421}.Release_LTCG.Build.0 = Release_LTCG|Xbox 25 | EndGlobalSection 26 | GlobalSection(ExtensibilityGlobals) = postSolution 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityAddIns) = postSolution 29 | EndGlobalSection 30 | EndGlobal 31 | -------------------------------------------------------------------------------- /libretro/msvc/msvc-2010-360.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genesis-next-msvc-2010-360", "msvc-2010-360\msvc-2010-360.vcxproj", "{00CE82EC-E948-4BB6-B726-23BF1571B05A}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | CodeAnalysis|Xbox 360 = CodeAnalysis|Xbox 360 9 | Debug|Xbox 360 = Debug|Xbox 360 10 | Profile_FastCap|Xbox 360 = Profile_FastCap|Xbox 360 11 | Profile|Xbox 360 = Profile|Xbox 360 12 | Release_LTCG|Xbox 360 = Release_LTCG|Xbox 360 13 | Release|Xbox 360 = Release|Xbox 360 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {00CE82EC-E948-4BB6-B726-23BF1571B05A}.CodeAnalysis|Xbox 360.ActiveCfg = CodeAnalysis|Xbox 360 17 | {00CE82EC-E948-4BB6-B726-23BF1571B05A}.CodeAnalysis|Xbox 360.Build.0 = CodeAnalysis|Xbox 360 18 | {00CE82EC-E948-4BB6-B726-23BF1571B05A}.CodeAnalysis|Xbox 360.Deploy.0 = CodeAnalysis|Xbox 360 19 | {00CE82EC-E948-4BB6-B726-23BF1571B05A}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360 20 | {00CE82EC-E948-4BB6-B726-23BF1571B05A}.Debug|Xbox 360.Build.0 = Debug|Xbox 360 21 | {00CE82EC-E948-4BB6-B726-23BF1571B05A}.Debug|Xbox 360.Deploy.0 = Debug|Xbox 360 22 | {00CE82EC-E948-4BB6-B726-23BF1571B05A}.Profile_FastCap|Xbox 360.ActiveCfg = Profile_FastCap|Xbox 360 23 | {00CE82EC-E948-4BB6-B726-23BF1571B05A}.Profile_FastCap|Xbox 360.Build.0 = Profile_FastCap|Xbox 360 24 | {00CE82EC-E948-4BB6-B726-23BF1571B05A}.Profile_FastCap|Xbox 360.Deploy.0 = Profile_FastCap|Xbox 360 25 | {00CE82EC-E948-4BB6-B726-23BF1571B05A}.Profile|Xbox 360.ActiveCfg = Profile|Xbox 360 26 | {00CE82EC-E948-4BB6-B726-23BF1571B05A}.Profile|Xbox 360.Build.0 = Profile|Xbox 360 27 | {00CE82EC-E948-4BB6-B726-23BF1571B05A}.Profile|Xbox 360.Deploy.0 = Profile|Xbox 360 28 | {00CE82EC-E948-4BB6-B726-23BF1571B05A}.Release_LTCG|Xbox 360.ActiveCfg = Release_LTCG|Xbox 360 29 | {00CE82EC-E948-4BB6-B726-23BF1571B05A}.Release_LTCG|Xbox 360.Build.0 = Release_LTCG|Xbox 360 30 | {00CE82EC-E948-4BB6-B726-23BF1571B05A}.Release_LTCG|Xbox 360.Deploy.0 = Release_LTCG|Xbox 360 31 | {00CE82EC-E948-4BB6-B726-23BF1571B05A}.Release|Xbox 360.ActiveCfg = Release|Xbox 360 32 | {00CE82EC-E948-4BB6-B726-23BF1571B05A}.Release|Xbox 360.Build.0 = Release|Xbox 360 33 | {00CE82EC-E948-4BB6-B726-23BF1571B05A}.Release|Xbox 360.Deploy.0 = Release|Xbox 360 34 | EndGlobalSection 35 | GlobalSection(SolutionProperties) = preSolution 36 | HideSolutionNode = FALSE 37 | EndGlobalSection 38 | EndGlobal 39 | -------------------------------------------------------------------------------- /libretro/msvc/msvc-2010.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "msvc-2010", "msvc-2010/msvc-2010.vcxproj", "{29DF2EE7-2930-4BD3-8AC5-81A2534ACC99}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Release|Win32 = Release|Win32 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {29DF2EE7-2930-4BD3-8AC5-81A2534ACC99}.Debug|Win32.ActiveCfg = Debug|Win32 13 | {29DF2EE7-2930-4BD3-8AC5-81A2534ACC99}.Debug|Win32.Build.0 = Debug|Win32 14 | {29DF2EE7-2930-4BD3-8AC5-81A2534ACC99}.Release|Win32.ActiveCfg = Release|Win32 15 | {29DF2EE7-2930-4BD3-8AC5-81A2534ACC99}.Release|Win32.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /libretro/msvc/msvc-2010/libretro.def: -------------------------------------------------------------------------------- 1 | LIBRARY "msvc-2010" 2 | EXPORTS 3 | retro_set_environment 4 | retro_set_video_refresh 5 | retro_set_audio_sample 6 | retro_set_audio_sample_batch 7 | retro_set_input_poll 8 | retro_set_input_state 9 | retro_init 10 | retro_deinit 11 | retro_api_version 12 | retro_get_system_info 13 | retro_get_system_av_info 14 | retro_set_controller_port_device 15 | retro_reset 16 | retro_run 17 | retro_serialize_size 18 | retro_serialize 19 | retro_unserialize 20 | retro_cheat_reset 21 | retro_cheat_set 22 | retro_load_game 23 | retro_load_game_special 24 | retro_unload_game 25 | retro_get_region 26 | retro_get_memory_data 27 | retro_get_memory_size 28 | -------------------------------------------------------------------------------- /libretro/osd.h: -------------------------------------------------------------------------------- 1 | #ifndef _OSD_H 2 | #define _OSD_H 3 | 4 | #ifdef _MSC_VER 5 | #include 6 | typedef unsigned char bool; 7 | #define strncasecmp _strnicmp 8 | #endif 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #define MAX_INPUTS 8 15 | #define MAX_KEYS 8 16 | #define MAXPATHLEN 1024 17 | 18 | #ifndef TRUE 19 | #define TRUE 1 20 | #endif 21 | 22 | #ifndef FALSE 23 | #define FALSE 0 24 | #endif 25 | 26 | #ifndef M_PI 27 | #define M_PI 3.1415926535897932385 28 | #endif 29 | 30 | #include "scrc32.h" 31 | 32 | #define CHEATS_UPDATE() ROMCheatUpdate() 33 | 34 | typedef struct 35 | { 36 | int8 device; 37 | uint8 port; 38 | uint8 padtype; 39 | } t_input_config; 40 | 41 | struct 42 | { 43 | char version[16]; 44 | uint8 hq_fm; 45 | uint8 filter; 46 | uint8 psgBoostNoise; 47 | uint8 dac_bits; 48 | uint8 ym2413; 49 | uint8 mono; 50 | int16 psg_preamp; 51 | int16 fm_preamp; 52 | int16 lp_range; 53 | int16 low_freq; 54 | int16 high_freq; 55 | int16 lg; 56 | int16 mg; 57 | int16 hg; 58 | uint8 system; 59 | uint8 region_detect; 60 | uint8 master_clock; 61 | uint8 vdp_mode; 62 | uint8 force_dtack; 63 | uint8 addr_error; 64 | uint8 bios; 65 | uint8 lock_on; 66 | uint8 overscan; 67 | uint8 aspect_ratio; 68 | uint8 ntsc; 69 | uint8 lcd; 70 | uint8 gg_extra; 71 | uint8 render; 72 | t_input_config input[MAX_INPUTS]; 73 | uint8 invert_mouse; 74 | uint8 gun_cursor; 75 | } config; 76 | 77 | extern char GG_ROM[256]; 78 | extern char AR_ROM[256]; 79 | extern char SK_ROM[256]; 80 | extern char SK_UPMEM[256]; 81 | extern char GG_BIOS[256]; 82 | extern char MD_BIOS[256]; 83 | extern char CD_BIOS_EU[256]; 84 | extern char CD_BIOS_US[256]; 85 | extern char CD_BIOS_JP[256]; 86 | extern char MS_BIOS_US[256]; 87 | extern char MS_BIOS_EU[256]; 88 | extern char MS_BIOS_JP[256]; 89 | 90 | extern void osd_input_update(void); 91 | extern int load_archive(char *filename, unsigned char *buffer, int maxsize, char *extension); 92 | extern void ROMCheatUpdate(void); 93 | 94 | #endif /* _OSD_H */ 95 | -------------------------------------------------------------------------------- /libretro/scrc32.h: -------------------------------------------------------------------------------- 1 | #ifndef _S_CRC32_H 2 | #define _S_CRC32_H 3 | 4 | unsigned long crc32(unsigned long crc, const unsigned char *buf, unsigned int len); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /psp2/config.c: -------------------------------------------------------------------------------- 1 | 2 | #include "osd.h" 3 | 4 | t_config config; 5 | 6 | void set_config_defaults(void) 7 | { 8 | int i; 9 | 10 | /* sound options */ 11 | config.psg_preamp = 150; 12 | config.fm_preamp = 100; 13 | config.hq_fm = 0; 14 | config.psgBoostNoise = 1; 15 | config.filter = 1; 16 | config.low_freq = 200; 17 | config.high_freq = 8000; 18 | config.lg = 1.0; 19 | config.mg = 1.0; 20 | config.hg = 1.0; 21 | config.lp_range = 0x9999; /* 0.6 in 16.16 fixed point */ 22 | config.dac_bits = 14; 23 | config.ym2413 = 2; /* = AUTO (0 = always OFF, 1 = always ON) */ 24 | config.mono = 0; 25 | 26 | /* system options */ 27 | config.system = 0; /* = AUTO (or SYSTEM_SG, SYSTEM_MARKIII, SYSTEM_SMS, SYSTEM_SMS2, SYSTEM_GG, SYSTEM_MD) */ 28 | config.region_detect = 0; /* = AUTO (1 = USA, 2 = EUROPE, 3 = JAPAN/NTSC, 4 = JAPAN/PAL) */ 29 | config.vdp_mode = 0; /* = AUTO (1 = NTSC, 2 = PAL) */ 30 | config.master_clock = 0; /* = AUTO (1 = NTSC, 2 = PAL) */ 31 | config.force_dtack = 0; 32 | config.addr_error = 1; 33 | config.bios = 0; 34 | config.lock_on = 0; /* = OFF (can be TYPE_SK, TYPE_GG & TYPE_AR) */ 35 | config.ntsc = 0; 36 | config.lcd = 0; /* 0.8 fixed point */ 37 | 38 | /* display options */ 39 | config.overscan = 0; /* 3 = all borders (0 = no borders , 1 = vertical borders only, 2 = horizontal borders only) */ 40 | config.gg_extra = 0; /* 1 = show extended Game Gear screen (256x192) */ 41 | config.render = 0; /* 1 = double resolution output (only when interlaced mode 2 is enabled) */ 42 | 43 | /* controllers options */ 44 | input.system[0] = SYSTEM_GAMEPAD; 45 | input.system[1] = SYSTEM_GAMEPAD; 46 | config.gun_cursor[0] = 1; 47 | config.gun_cursor[1] = 1; 48 | config.invert_mouse = 0; 49 | for (i=0;i 2 | #include 3 | #include 4 | 5 | #include 6 | #include 7 | #include "psplib/pl_snd.h" 8 | #include "psplib/video.h" 9 | #include "psplib/pl_psp.h" 10 | #include "psplib/ctrl.h" 11 | #include 12 | 13 | #include "menu.h" 14 | #include "emumain.h" 15 | 16 | 17 | PSP2_MODULE_INFO(0,1,PSP_APP_NAME) 18 | //PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER) 19 | 20 | static void ExitCallback(void* arg) 21 | { 22 | ExitPSP = 1; 23 | } 24 | 25 | int main(int argc,char *argv[]) 26 | { 27 | /* Initialize PSP */ 28 | pl_psp_init("ux0:/data/GenesisPlusGXVita/"); 29 | pl_snd_init(SOUND_SAMPLES, 1); 30 | pspCtrlInit(); 31 | pspVideoInit(); 32 | 33 | /* Initialize callbacks */ 34 | pl_psp_register_callback(PSP_EXIT_CALLBACK, 35 | ExitCallback, 36 | NULL); 37 | pl_psp_start_callback_thread(); 38 | 39 | /* Start emulation */ 40 | InitMenu(); 41 | DisplayMenu(); 42 | TrashMenu(); 43 | 44 | /* Release PSP resources */ 45 | pl_snd_shutdown(); 46 | pspVideoShutdown(); 47 | pl_psp_shutdown(); 48 | 49 | return(0); 50 | } 51 | -------------------------------------------------------------------------------- /psp2/main.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _MAIN_H_ 3 | #define _MAIN_H_ 4 | 5 | #define MAX_INPUTS 8 6 | 7 | extern int debug_on; 8 | extern int log_error; 9 | extern int sdl_input_update(void); 10 | 11 | #endif /* _MAIN_H_ */ 12 | -------------------------------------------------------------------------------- /psp2/menu.h: -------------------------------------------------------------------------------- 1 | #ifndef _MENU_H 2 | #define _MENU_H 3 | 4 | void InitMenu(); 5 | void DisplayMenu(); 6 | void TrashMenu(); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /psp2/osd.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _OSD_H_ 3 | #define _OSD_H_ 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #include 11 | 12 | #include "shared.h" 13 | #include "config.h" 14 | #include "error.h" 15 | #include "unzip.h" 16 | #include "fileio.h" 17 | 18 | extern void osd_input_update(void); 19 | 20 | 21 | #define GG_ROM "./ggenie.bin" 22 | #define AR_ROM "./areplay.bin" 23 | #define SK_ROM "./sk.bin" 24 | #define SK_UPMEM "./sk2chip.bin" 25 | #define CD_BIOS_US "./bios_CD_U.bin" 26 | #define CD_BIOS_EU "./bios_CD_E.bin" 27 | #define CD_BIOS_JP "./bios_CD_J.bin" 28 | #define MD_BIOS "./bios_MD.bin" 29 | #define MS_BIOS_US "./bios_U.sms" 30 | #define MS_BIOS_EU "./bios_E.sms" 31 | #define MS_BIOS_JP "./bios_J.sms" 32 | #define GG_BIOS "./bios.gg" 33 | 34 | #endif /* _OSD_H_ */ 35 | -------------------------------------------------------------------------------- /sdl/README.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frangarcj/Genesis-Plus-GX/e4832483699a09d98a07e92cb18ec9f1967519b4/sdl/README.txt -------------------------------------------------------------------------------- /sdl/config.c: -------------------------------------------------------------------------------- 1 | 2 | #include "osd.h" 3 | 4 | t_config config; 5 | 6 | 7 | void set_config_defaults(void) 8 | { 9 | int i; 10 | 11 | /* sound options */ 12 | config.psg_preamp = 150; 13 | config.fm_preamp = 100; 14 | config.hq_fm = 1; 15 | config.psgBoostNoise = 1; 16 | config.filter = 1; 17 | config.low_freq = 200; 18 | config.high_freq = 8000; 19 | config.lg = 1.0; 20 | config.mg = 1.0; 21 | config.hg = 1.0; 22 | config.lp_range = 0x9999; /* 0.6 in 16.16 fixed point */ 23 | config.dac_bits = 14; 24 | config.ym2413 = 2; /* = AUTO (0 = always OFF, 1 = always ON) */ 25 | config.mono = 0; 26 | 27 | /* system options */ 28 | config.system = 0; /* = AUTO (or SYSTEM_SG, SYSTEM_MARKIII, SYSTEM_SMS, SYSTEM_SMS2, SYSTEM_GG, SYSTEM_MD) */ 29 | config.region_detect = 0; /* = AUTO (1 = USA, 2 = EUROPE, 3 = JAPAN/NTSC, 4 = JAPAN/PAL) */ 30 | config.vdp_mode = 0; /* = AUTO (1 = NTSC, 2 = PAL) */ 31 | config.master_clock = 0; /* = AUTO (1 = NTSC, 2 = PAL) */ 32 | config.force_dtack = 0; 33 | config.addr_error = 1; 34 | config.bios = 0; 35 | config.lock_on = 0; /* = OFF (can be TYPE_SK, TYPE_GG & TYPE_AR) */ 36 | config.ntsc = 0; 37 | config.lcd = 0; /* 0.8 fixed point */ 38 | 39 | /* display options */ 40 | config.overscan = 0; /* 3 = all borders (0 = no borders , 1 = vertical borders only, 2 = horizontal borders only) */ 41 | config.gg_extra = 0; /* 1 = show extended Game Gear screen (256x192) */ 42 | config.render = 0; /* 1 = double resolution output (only when interlaced mode 2 is enabled) */ 43 | 44 | /* controllers options */ 45 | input.system[0] = SYSTEM_GAMEPAD; 46 | input.system[1] = SYSTEM_GAMEPAD; 47 | config.gun_cursor[0] = 1; 48 | config.gun_cursor[1] = 1; 49 | config.invert_mouse = 0; 50 | for (i=0;i 6 | #include 7 | #include 8 | #include 9 | 10 | #include 11 | #include 12 | 13 | #include "shared.h" 14 | #include "main.h" 15 | #include "config.h" 16 | #include "error.h" 17 | #include "unzip.h" 18 | #include "fileio.h" 19 | 20 | #define osd_input_update sdl_input_update 21 | 22 | #define GG_ROM "./ggenie.bin" 23 | #define AR_ROM "./areplay.bin" 24 | #define SK_ROM "./sk.bin" 25 | #define SK_UPMEM "./sk2chip.bin" 26 | #define CD_BIOS_US "./bios_CD_U.bin" 27 | #define CD_BIOS_EU "./bios_CD_E.bin" 28 | #define CD_BIOS_JP "./bios_CD_J.bin" 29 | #define MD_BIOS "./bios_MD.bin" 30 | #define MS_BIOS_US "./bios_U.sms" 31 | #define MS_BIOS_EU "./bios_E.sms" 32 | #define MS_BIOS_JP "./bios_J.sms" 33 | #define GG_BIOS "./bios.gg" 34 | 35 | #endif /* _OSD_H_ */ 36 | -------------------------------------------------------------------------------- /sdl/readme-sdl.txt: -------------------------------------------------------------------------------- 1 | Compile with MinGW. 2 | You will also need to install the SDL library (http://www.libsdl.org/). 3 | Zlib is required for zipped rom support. 4 | 5 | Please distribute required dlls with the executable. --------------------------------------------------------------------------------