[SDL/SDL2] merged SDL1 and SDL2 files

This commit is contained in:
Clownacy 2016-11-03 15:20:25 +00:00
parent 36414ffa41
commit 4cea68fa10
22 changed files with 13 additions and 2817 deletions

4
.gitignore vendored
View File

@ -4,7 +4,7 @@ psp2/*.velf
psp2/build_vita/*
psp2/*.a
sdl/gen_sdl
sdl/gen_sdl2
sdl/build_sdl
sdl2/gen_sdl2
sdl2/build_sdl2
sdl/build_sdl2

View File

@ -33,7 +33,7 @@ CFLAGS = `sdl-config --cflags` -march=i686 -O6 -fomit-frame-pointer -Wall -Wn
DEFINES = -DLSB_FIRST -DUSE_16BPP_RENDERING -DUSE_LIBTREMOR -DMAXROMSIZE=33554432
SRCDIR = ../core
INCLUDES = -I$(SRCDIR) -I$(SRCDIR)/z80 -I$(SRCDIR)/m68k -I$(SRCDIR)/sound -I$(SRCDIR)/input_hw -I$(SRCDIR)/cart_hw -I$(SRCDIR)/cart_hw/svp -I$(SRCDIR)/cd_hw -I$(SRCDIR)/ntsc -I$(SRCDIR)/tremor -I$(SRCDIR)/../sdl
INCLUDES = -I$(SRCDIR) -I$(SRCDIR)/z80 -I$(SRCDIR)/m68k -I$(SRCDIR)/sound -I$(SRCDIR)/input_hw -I$(SRCDIR)/cart_hw -I$(SRCDIR)/cart_hw/svp -I$(SRCDIR)/cd_hw -I$(SRCDIR)/ntsc -I$(SRCDIR)/tremor -I$(SRCDIR)/../sdl -I$(SRCDIR)/../sdl/sdl1
LIBS = `sdl-config --libs` -lz -lm
OBJDIR = ./build_sdl
@ -169,6 +169,9 @@ $(OBJDIR)/%.o : $(SRCDIR)/tremor/%.c
$(OBJDIR)/%.o : $(SRCDIR)/../sdl/%.c $(SRCDIR)/../sdl/%.h
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
$(OBJDIR)/%.o : $(SRCDIR)/../sdl/sdl1/%.c $(SRCDIR)/../sdl/sdl1/%.h
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
ifeq ($(OS),Windows_NT)
$(OBJDIR)/icon.o :
windres $(SRCDIR)/../sdl/icon.rc $@

View File

@ -33,7 +33,7 @@ CFLAGS = `sdl2-config --cflags` -march=i686 -O6 -fomit-frame-pointer -Wall -W
DEFINES = -DLSB_FIRST -DUSE_16BPP_RENDERING -DUSE_LIBTREMOR -DMAXROMSIZE=33554432
SRCDIR = ../core
INCLUDES = -I$(SRCDIR) -I$(SRCDIR)/z80 -I$(SRCDIR)/m68k -I$(SRCDIR)/sound -I$(SRCDIR)/input_hw -I$(SRCDIR)/cart_hw -I$(SRCDIR)/cart_hw/svp -I$(SRCDIR)/cd_hw -I$(SRCDIR)/ntsc -I$(SRCDIR)/tremor -I$(SRCDIR)/../sdl2
INCLUDES = -I$(SRCDIR) -I$(SRCDIR)/z80 -I$(SRCDIR)/m68k -I$(SRCDIR)/sound -I$(SRCDIR)/input_hw -I$(SRCDIR)/cart_hw -I$(SRCDIR)/cart_hw/svp -I$(SRCDIR)/cd_hw -I$(SRCDIR)/ntsc -I$(SRCDIR)/tremor -I$(SRCDIR)/../sdl -I$(SRCDIR)/../sdl/sdl2
LIBS = `sdl2-config --libs` -lz -lm
OBJDIR = ./build_sdl2
@ -166,12 +166,15 @@ $(OBJDIR)/%.o : $(SRCDIR)/tremor/%.c $(SRCDIR)/tremor/%.h
$(OBJDIR)/%.o : $(SRCDIR)/tremor/%.c
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
$(OBJDIR)/%.o : $(SRCDIR)/../sdl2/%.c $(SRCDIR)/../sdl2/%.h
$(OBJDIR)/%.o : $(SRCDIR)/../sdl/%.c $(SRCDIR)/../sdl/%.h
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
$(OBJDIR)/%.o : $(SRCDIR)/../sdl/sdl2/%.c $(SRCDIR)/../sdl/sdl2/%.h
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
ifeq ($(OS),Windows_NT)
$(OBJDIR)/icon.o :
windres $(SRCDIR)/../sdl2/icon.rc $@
windres $(SRCDIR)/../sdl/icon.rc $@
endif
pack :

View File

@ -9,7 +9,7 @@ PLEASE DO NOT DISTRIBUTE WIN32 BINARIES WITHOUT THIS NOTICE.
END USERS SHOULD PREFERABLY USE LIBRETRO PORT WITH RETROARCH.
----------------------------------------------------------------------------
Genesis Plus (Windows Port)
Genesis Plus (SDL Port)
----------------------------------------------------------------------------
based on the original version 1.3

View File

@ -1,694 +0,0 @@
--------------------
Genesis Plus History
--------------------
All recent changes were backported from the GX version (Gamecube/Wii port), maintained by Eke-Eke.
Please look at http://code.google.com/p/genplus-gx/ for more infos.
---------------------------------------------------------------------------------------------------------
Genesis Plus GX 1.7.4 (21/06/2013) (Eke-Eke)
---------------------------------------------------------------------------------------------------------
[Core/SCD]
---------------
* fixed access to read-only registers on Main-CPU side ("Batman Returns" platform level freeze)
* fixed & improved emulation of PRG-RAM write protection register ("Lunar Eternal Blue" japanese version freeze)
* improved SUB & MAIN-CPU synchronization ("Dracula Unleashed" freeze when using US Model 2 BIOS)
* improved CPU polling detection
* improved CDD emulation & added CD drive access time for SEEK command ("Panic!/Switch" intro missing scene)
* added missing reinitialization of MAIN-CPU PRG-RAM bank on reset
* added .OGG audio tracks support through LIBTREMOR
[Core/Sound]
---------------
* fixed YM2612 configurable DAC depth emulation
* improved Low-Pass filter
* added optional "MONO" output mode
[Core/VDP]
---------------
* fixed FIFO access timings when using invalid write code value ("Clue" menu)
* fixed DMA Copy with undocumented code value ("Fatal Labyrinth" end sequence)
* minor code fixes & optimizations
[Core/CPU]
---------------
* optimized 68k stack read/write functions
* fixed broken 68k address error emulation
* fixed 68k interrupt behavior (prevents interrupts from being executed multiple time when 68k is halted)
* fixed Z80 registers initial state, added proper initialization when using PBC (verified on real hardware by Charles McDonald)
[Core/MD]
---------------
* fixed SRAM incompatibilities between BIG ENDIAN & LITTLE ENDIAN platforms (note: this breaks old .srm files with LITTLE ENDIAN platform ports)
* added support for a few recently dumped unlicensed games
* added auto-detection of byte-swapped ROM files
---------------------------------------------------------------------------------------------------------
Genesis Plus GX 1.7.3 (26/11/2012) (Eke-Eke)
---------------------------------------------------------------------------------------------------------
no win32/SDL port changes
---------------------------------------------------------------------------------------------------------
Genesis Plus GX 1.7.2 (24/11/2012) (Eke-Eke)
---------------------------------------------------------------------------------------------------------
[Core/SCD]
---------------
* added default TOC for Shadow of the Beast II (prevent hangs when audio tracks are missing)
* fixed CD-DA fader muting
* fixed PCM channels panning on reset
* fixed backup RAM file management when using disc swap with Mode 1 cartridge
* incremented CD drive read latency: fixes Space Adventure Cobra (freeze when opening coffin at 2nd morgue scene)
* improved CDD emulation accuracy: fixes Snatcher (freeze at the end of Act 2) & various CD player bugs
* improved MAIN-SUB memory map mirroring in SCD mode (verified on real hardware by Charles McDonald)
* implemented cycle-accurate "stopwatch" register emulation
[Core/Sound]
---------------
* fixed broken PSG noise frequency
* fixed incorrect Game Gear PSG stereo emulation
* implemented cycle-accurate Game Gear PSG stereo
[Core/VDP]
---------------
* fixed broken VDP DMA from SVP ROM latency (graphic errors in Virtua Racing)
[Core/MD]
---------------
* added Super Mario World 64 (unlicensed) cartridge hardware emulation
[Core/Input]
---------------
* added automatic detection for CD games with Justifier/Menacer support
* improved Justifier/Menacer emulation
---------------------------------------------------------------------------------------------------------
Genesis Plus GX 1.7.1 (13/10/2012) (Eke-Eke)
---------------------------------------------------------------------------------------------------------
[Core/SCD]
---------------
* added support for CUE files
* added CD-DA tracks emulation (needs CUE+BIN or ISO+WAV images)
* added CD fader emulation
* added CDD "Fast FW" & "Fast RW" commands emulation
* improved CDD TOC emulation (random freezes in Sonic CD, Switch/Panic, Final Fight CD and probably many others)
* improved PCM chip synchronization with SUB-CPU (missing speeches in Willy Beamish)
* fixed PCM chip emulation (random hangs in Snatcher, missing sound effects in Switch/Panic, Final Fight CD, Wonderdog...)
* fixed Word-RAM memory mode on soft-reset (missing logo gfx effects)
* fixed SUB-CPU access to unused areas when using PC-relative instructions (Final Fight CD first boss random crash)
* fixed CPU idle loop detection on memory mode register access (Pugsy CD first boss slowdown)
* fixed Mode 1 emulation (cartridge boot mode)
[Core/Sound]
---------------
* replaced FIR resampler by Blip Buffer for FM resampling
* modified SN76489 core for use of Blip Buffer
* improved PSG & FM chips synchronization using Blip Buffer
* added Game Gear PSG stereo support
* fixed SG-1000 specific PSG noise
* fixed YM2612 LFO AM waveform (California Games surfing event)
* fixed YM2612 phase precision
* minor optimizations to YM2612 core
[Core/Game Gear]
---------------
* added support for CJ Elephant Fugitive (recently released by SMS Power)
* added Game Gear extended screen option
[Core/Genesis]
---------------
* added support for a few recently dumped (but unreleased) games
[Core/General]
---------------
* improved ROM & CD image file loading
* various code cleanup
---------------------------------------------------------------------------------------------------------
Genesis Plus GX 1.7.0 (01/07/2012) (Eke-Eke)
---------------------------------------------------------------------------------------------------------
[Core/SCD]
---------------
* added Mega CD / Sega CD hardware emulation (incl. Sub 68K, CDD, CDC, PCM, GFX rotation/scaling, etc)
* added .ISO & .BIN CD image file support
* added 512K backup cartridge RAM support
* added savestate support for CD games
NOTES:
~~~~~~
* to play CD games, original BIOS ROM files are required in /genplus/bios/ directory: unzip & rename them to bios_CD_U.bin, bios_CD_E.bin, bios_CD_J.bin
* CD audio tracks (CD-DA) are not supported (yet)
[Core/CPU]
---------------
* modified 68k core for Mega CD / Sega CD support
* optimized 68k core using prebuild const tables
[Core/VDP]
---------------
* improved DMA accuracy
* improved accuracy of nametables register & VSRAM writes during HBLANK: fixes "The Adventures of Batman & Robin" (graphical issues during 2nd Boss fight).
* added support for 8-bit VRAM writes with undocumented code value (verified on real hardware by Nemesis)
[Core/Sound]
---------------
* improved synchronization between SN76489 & YM2162 cores.
* improved accuracy of SN76489 core timings.
[Core/MD]
---------------
* added support for some recently dumped unlicensed games.
* improved emulation of 32k bankswitch hardware used by a few unlicensed games.
* fixed behavior of Z80 banked reads from 68k RAM (verified on real hardware).
* fixed support for 128K Pro Action Replay ROM.
[Core/MS]
---------------
* added support for all recent korean ROM dumps by SMS Power.
* added emulation of korean multi-game mapper (4-Pak All Action)
* added pseudo-random RAM pattern initialization on Mark-III and Japanese Master System (fixes "Alibaba and 40 Thieves" & "Block Hole")
* added port $3E emulation & internal BOOTROM support (Master System & Game Gear only).
[Core/General]
---------------
* added an option to set VDP mode (PAL/NTSC) independently from console region.
* added an option to select original system master clock frequency (PAL/NTSC/AUTO), emulation will run at selected frequency when VSYNC is disabled.
* fixed 68k context loading/saving (Sol Deace).
* fixed C89 incompatibilities for better portability.
* removed use of "long int" type for portability on 64-bit platforms.
* moved savestate zlib compression out of emulation core (for ports that don't use it).
* various optimizations.
[Gamecube/Wii]
---------------
* removed ROM load device selection from Load Menu: default ROM device must now be configured in menu settings.
* added specific load buttons, browsers & saved paths for each systems, this also fixes slowdowns caused by screenshot loading when browsing from slow devices.
* added support for left/right buttons as page up/down keys in ROM browsers
* added right analog stick as default "return to menu" key for Gamecube controllers
* added alternate remappable menu key combo for Gamecube controllers
* added an option to disable VSYNC (emulator is synced with audio hardware instead of video).
* added an option to boot system from "BIOS", with or without cartridge.
* added Master System & Game Gear "BIOS" support (files should be named bios_U.sms, bios_J.sms, bios_E.sms & bios.gg and copied to /genplus/bios directory).
* replaced "Hard Reset" button by a Soft Reset for systems having a Reset button (Mega Drive / Genesis & Master System)
* State & SRAM files are now only compressed when saving to Gamecube Memory Cards
* various fixes & cleanup.
* compiled with devkitPPC r26 & libogc 1.8.11.
[Gamecube]
----------
* improved progressive mode support when component cable is detected (hold B during startup to switch menu video mode configuration)
---------------------------------------------------------------------------------------------------------
[07/08/2011] version 1.6.0 (Eke-Eke)
---------------------------------------------------------------------------------------------------------
[Core/Sound]
---------------
* added YM2413 emulation in Master System compatibility mode.
* fixed SN76489 noise boost initialization.
* minor YM2612 core optimizations.
[Core/VDP]
---------------
* added accurate emulation of SG-1000, Master System (315-5124, 315-5246) & Game Gear VDP.
* added support for all TMS9918 rendering modes.
* improved Mega Drive VDP timings accuracy in Master System Compatibility mode.
* fixed color palette initialization.
* fixed shifted sprites rendering in Mode 4.
* modified pixel rendering support (pixel depth is now forced at compilation time).
[Core/CPU]
---------------
* optimized 68k core (rewrote 68k interrupt handling, removed multiple CPU types support & unused code) for 5~8% speed improvment
[Core/IO]
---------------
* added accurate emulation of Master System (315-5216, 315-5237, 315-5297) & Game Gear I/O controllers.
* added Terebi Oekaki tablet emulation.
* improved Mouse emulation (fixes mouse support in Cannon Fodder).
* improved Justifier emulation (fixes gun support in Lethal Enforcers 2).
* improved 6-Buttons control pad emulation (fixes Duke Nukem 3D)
* modified lightgun emulation to use common key inputs for all devices.
* 2-buttons controller is now picked by default for Master System games.
[Core/MD]
---------------
* added copy-protection hardware emulation for some new dumped games (Tiny Toon Adventures 3, Mighty Morphin Power Rangers & The Battle of Red Cliffs).
* added Game Toshokan in EEPROM database (verified on real cartridge).
* fixed Micro Machines 2 - Turbo Tournament EEPROM size (verified on real cartridge).
* modified SRAM banswitch hardware emulation to be more compatible with some hacks.
[Core/MS]
---------------
* added Cyborg Z to Korean mapper database.
[Core/GG]
---------------
* added 93C46 EEPROM emulation (Majors Pro Baseball, World Series Baseball & World Series Baseball 95).
[Core/General]
---------------
* added support for .mdx ROM format.
* added Game Gear & SG-1000 ROM support.
* added accurate emulation of SG-1000, Master System (I, II) & Game Gear hardware models for 100% compatibility.
* updated to new Genesis Plus license (see http://cgfm2.emuviews.com/)
* removed DOS port
* various code cleanup.
---------------------------------------------------------------------------------------------------------
[31/03/2011] version 1.5.0 (Eke-Eke)
---------------------------------------------------------------------------------------------------------
[Core/VDP]
---------------
* added support for Master System compatibility mode (Z80 ports access mode), incl. Mode 5 rendering.
* added Mode 4 rendering for both Genesis & Master System modes.
* added alternate BG planes rendering functions (should be faster on PPC architectures).
[Core/IO]
---------------
* added support for Master System compatibility mode (Z80 ports access mode).
* added Master System peripherals emulation (Control Pad, Paddle, Sports Pad & Light Phaser).
* added XE-1AP (analog controller) emulation.
* added Activator emulation.
[Core/Extra]
---------------
* added support for all known Master System cartridge mappers.
* added copy-protection hardware emulation for a few MD unlicensed games: fixes 777 Casino (crash when talking to bunny girls).
(NB: most of those unlicensed games seem to have been already patched by ROM dumpers, main purpose is documenting them)
* added support for Top Shooter arcade board controller. (A=Shoot, B=Bet, C/RIGHT=Coins, START=Start, hold UP on startup to enter service mode)
* improved King of Fighters 98 mapper emulation (registers address decoding is now 100% accurate)
* fixed Game Genie when several codes affect same ROM address.
* fixed EEPROM types for Brian Lara Cricket & NBA Jam TE (verified on real cartridges)
[Core/General]
---------------
* added Master System compatibility mode emulation (automatically enabled when loading ROM file with .sms extension).
* improved savestate stability & compatibility (support for old 1.4.x savestates is preserved)
* various code cleanup & comments.
---------------------------------------------------------------------------------------------------------
[04/12/2010] version 1.4.1 (Eke-Eke)
---------------------------------------------------------------------------------------------------------
[Core/Sound]
---------------
* implemented Blargg's blip buffer in SN76489 core (all channels are now lineary interpolated)
[Core/VDP]
---------------
* improved 2-cell vscroll emulation accuracy, as verified on real hardware (Gynoug, Cutie Suzuki no Ringside Angel, Formula One, Kawasaki Superbike Challenge)
* improved VBLANK flag accuracy, as observed on real hardware.
* improved DMA operations accuracy, writes are now performed on a scanline basis: fixes Gaiares (flickering title screen).
* improved DMA Fill timing accuracy.
* fixed DMA with bad code values: fixes Williams Arcade Classics (corrupted gfx after soft reset).
* fixed horizontal resolution changes during HBLANK: fixes Bugs Bunny in Double Trouble (2nd stage).
* fixed Vertical Counter in interlace mode 1, as observed on real hardware.
* fixed horizontal border width, as observed on real hardware.
* various code improvments & optimizations.
[Core/CPU]
---------------
* fixed state of Z80 registers on reset (sound issues with Defender & Defender 2 in Williams Arcade Classics)
* implemented 68k undocumented flags behavior for DIVU/DIVS instructions (Bloodshot / Battle Frenzy)
[Core/Extra]
---------------
* improved emulation of copy-protection hardware found in some unlicensed cartridges (Mulan, Pocket Monsters II).
* enabled simultaneous use of multitap & J-CART (Super Skidmarks 6-player mode)
* improved savestate format: added DMA, SVP, cartridge mapping & internal registers state informations
* improved unlicensed ROM mappers emulation
* added Chinese Fighters III mapper support
* added Top Fighter mapper support
* fixed Barver Battle Saga mapper support
* fixed cartridge hardware soft-reset (Game Genie, SVP, ...)
* fixed Game Genie registers byte reads
----------------------------------------------------------------------------------------------------------------------------------------------------
[06/30/10] version 1.4.0 (Eke-Eke)
----------------------------------------------------------------------------------------------------------------------------------------------------
[Core/Sound]
* completely rewrote sound processing/mixing: sound chips are now clocked with exact output framerate
to ensure 100% smooth video & audio playback, with no lag or skipping, while rendering an accurate number
of samples per frame and keeping PSG & FM chips in sync.
* improved PSG & FM chips synchronization with CPU execution (fixed point precision).
* improved YM2612 core general accuracy (SSG-EG, CSM mode,...) (based upon Nemesis recent tests on real hardware)
* improved YM2612 LFO emulation accuracy: fixes "Spider-Man & Venom : Separation Anxiety" (intro)
* fixed YM2612 bug with Timer B: fixes "Langrisser Hikari II"/"Der Langrisser II" (Sega logo)
* fixed YM2612 context saving/loading.
* fixed YM2612 state on reset.
* removed outdated & less accurate Gens YM2612 core
* added configurable YM2612 DAC resolution emulation.
* added configurable & faster FIR resampler (thanks to Blargg & AamirM), removed libsamplerate support.
* added configurable Low-Pass filtering
* added configurable 3-Band Equalizer (thanks to Neil C).
* added an option to boost SN76489 Noise Channel.
* adjusted SN76489 cut-off frequency.
[Core/VDP]
* added support for CRAM writes during horizontal blanking (Striker, Zero the Kamikaze Squirrel,...)
* added support for 2-Cell vertical scrolling in Interlaced 2 mode
* added support for some undocumented mode register bits
* added proper emulation of HV Counter latch: fixes Sunset Riders intro
* added pixel-accurate emulation of mid-line display on/off (Nigel Mansell World Championship PAL, Ren & Stimpy's Invention PAL,...)
* improved FIFO timings accuracy: fixes Sol Deace intro
* improved sprite masking accuracy (thanks to Nemesis for his test program)
* improved sprites processing accuracy: fixes (un)masked sprites in Mickey Mania (3D level), Sonic 2 (VS mode).
* improved HBLANK flag timing accuracy: fixes Mega Turrican (Sky level)
* improved horizontal blanking & HINT/VINT occurence timing accuracy, as measured on real hardware.
* improved HCounter accuracy in 40-cell mode, as measured on real hardware.
* improved color accuracy in VDP highlight mode to match results observed on real hardware
[Core/CPU]
* updated Z80 core to last version (fixes interrupt Mode 0 timing and some BIT instructions).
* fixed some Z80 instructions timing.
* improved Z80 interrupt accuracy
* improved 68k accuracy (initial Reset timing + auto-vectored interrupts handling).
* improved 68k timing accuracy for DIVU/DVIS (thanks to Jorge Cwik) & MULU/MULS instructions.
* improved Z80 & 68k cpu execution/synchronization accuracy by using Master Clock as common reference (now run exactly 3420 M-Cycles per line).
* modified Z80 & 68k cores to directly use external cycle count instead of intermediate counters.
[Core/Extra]
* added Game Genie hardware emulation (Game Genie ROM is now fully supported).
* added Action Replay hardware emulation (Action replay ROM is now fully supported).
* added S&K "Lock-On" hardware emulation (you can "lock" any games to Sonic & Knuckles).
* added Cartridge "hot swap" feature.
* added missing EEPROM support in some games.
* added accurate TMSS emulation (VDP lock-out)
* fixed Realtec mapper emulation: fixes missing sound in Balloon Boy / Funny World.
* fixed lightgun auto-detection: fixes default cursor position in Lethal Enforcers II.
* lots of code cleanup, bugfixes & optimization.
----------------------------------------------------------------------------------------------------------------------------------------------------
[12/14/08] version 1.3.0 (Eke-Eke)
----------------------------------------------------------------------------------------------------------------------------------------------------
* YM2612 bugfixes (MAME core):
.fixed EG Decay->Substain transition when SL & DR are minimals: fix tracks #3 and #9 in "Mega Turrican"
.fixed a bug in SSG-EG emulation code: fix Level 1 music in "Alisia Dragoon"
.modified SSG-EG Decay End Level: fix some sound effects (ChainSaw, Zap...) in "Beavis & Butthead"
.improved Detune overflow accuracy: fix very high frequency sounds in many games
.fixed registers 0x20-0x26 Reset state: fix intro music in "B.O.B"
.reverted incorrect fix with KEY ON: fix "Flamethrower" sound effect in "Alien 3" and many others
* adjusted HCounter values: fixes line flickering in "Sonic 3D" bonus stage
* adjusted VINT timing: fixes hang-up in "V.R Troopers"
* improved HBLANK flag accuracy: fixes line flickering in "Gouketsuji Ichizoku"
* fixed broken Z80 access to WRAM: fixes hang-up in "Mamono Hunter Youko"
* modified JCART emulation: fixes corrupted tracks logo in "Micro Machines 2"
* added Blargg's NTSC Filters support (NTSC video artifacts emulation)
* optimized VDP rendering core, rewrote 68k interface (memory handlers, cycle execution, interrupts): greatly improved emulation speed
----------------------------------------------------------------------------------------------------------------------------------------------------
[08/26/08] (Eke-Eke)
----------------------------------------------------------------------------------------------------------------------------------------------------
* YM2612(MAME): fixed LFO phase update for CH3 special mode: fix sound effects in Warlock & Aladdin (thanks to AamirM)
* YM2612(MAME): fixed EG attenuation level on "KEY ON": fix Ecco 2's splash sound
* YM2612(MAME): fixed SSG-EG emulation: fix Bubba'n Stix (Track 5) and many others
* YM2612(MAME): replaced sample interpolation with libsamplerate support, High Quality mode is now more accurate
* implemented cycle-accurate HINT timings: every timing sensitive games/demos are now *finally* working fine
* fixed a bug affecting CRAM/VSRAM DMA timings
* fixed Sprite Attribute Table address mask for VRAM writes
* improved accuracy of 68k access to Z80: fix music in Pacman 2 when entering PAUSE menu
* disabled "Address Error" emulation when UMK3 hack is loaded: fix game crashing after a round ends up
* added support for some more unlicensed games: Pocket Monster, King of Fighter 98, Soul Blade (credits to Haze)
* improved Menacer emulation: fix lightgun support in Body Count & T2: The Arcade Game
* added Konami Justifier emulation: fix lightgun support in Lethal Enforcers 1 & 2
* added Sega Mouse emulation (Populous 2, Body Count, Shangai 2, Fun'n Games, ...)
----------------------------------------------------------------------------------------------------------------------------------------------------
[07/16/08] (Eke-Eke)
----------------------------------------------------------------------------------------------------------------------------------------------------
* adjusted (again) HINT timings: fix Double Dragon 2 (game freezed), hopefully does not break anything else
* fixed broken EEPROM support for Codemaster games
* modified input update timings: fix Dungeons & Dragons * Warriors of the Eternal Sun (thanks to Notaz)
* added support for "Ultimate Mortal Kombat Trilogy" hack (max. size supported is 10MBytes)
* added (VERY) preliminar support for PICO roms (credits to Notaz for his documentation)
* improved YM2612 emulation (credits to Nemesis for his tests on real hardware):
.implemented phase overflow emulation: improved fix for special music instrument used in Comix Zone, Flashback, Ariel, Shaq Fu...
.improved SSG-EG emulation in MAME core (also based on additional code from Alone Coder)
.improved Timers emulation accuracy
.improved Enveloppe Generator accuracy
.fixed Channel 3 CSM mode emulation
.implemented sample interpolation in MAME core to emulate the chip at original frequency (HQ YM2612 mode, from gens)
----------------------------------------------------------------------------------------------------------------------------------------------------
[06/01/08] (Eke-Eke)
----------------------------------------------------------------------------------------------------------------------------------------------------
* improved HCounter accuracy: fix graphic glitches in "Striker (Europe)"
* improved HINT timing accuracy: fix flickering in "Zero The Kamikaze Squirrel (USA)"
* improved rendering accuracy when backdrop color is modified during HBLANK (Road Rash I/II/III)
* fixed broken Game Genie support
----------------------------------------------------------------------------------------------------------------------------------------------------
[04/19/08] (Eke-Eke)
----------------------------------------------------------------------------------------------------------------------------------------------------
* modified VINT timings a little bit: fix lockup during Desert Strike's intro
* corrected 68k interrupts handling: fix graphic glitches in Darius II/Sagaia
----------------------------------------------------------------------------------------------------------------------------------------------------
[04/06/08] (Eke-Eke)
----------------------------------------------------------------------------------------------------------------------------------------------------
* updated SVP core: fix some perspective issues in Virtua Racing (thanks to Notaz)
* added internal SAT update during VRAM Fill: fix unmasked sprites during Battletech's intro
* fixed m68k core issues with gcc 4.2.3: fix Xperts, Lemmings 2, M1 Abrams Battle Tank
* forced YM2612 Enveloppe update: fix intro music in Batman&Robin (thanks to Aamir)
----------------------------------------------------------------------------------------------------------------------------------------------------
[03/01/08] (Eke-Eke)
----------------------------------------------------------------------------------------------------------------------------------------------------
* added SVP emulation: Virtua Racing is now emulated (big thanks to Notaz and TascoDeluxe)
* fixed VDP registers behaviour when VDP Mode 4 is enabled: fix Bass Masters Classic Pro, Captain Planet & The Planeeters
* corrected a bug in DMA Fill operation: fix James Pond 3, Rockman World/Megaman Willy Wars (corrupted VRAM)
* corrected typo errors in CPU cycle counters update: fix optiom screen music in "College Slam" and probably others games.
* added preliminary support of undocumented YM2612 bug: fixes soundtracks of Shaq Fu, Spiderman, Comix Zone, Ariel and some others
* added support for mappers & copy protection devices used in many unlicensed/pirate cartridges (see cart_hw.c for details)
* rewrote memory handlers for better modularity and some (little) speedup
* reduced Savestate size
----------------------------------------------------------------------------------------------------------------------------------------------------
[01/07/08] (Eke-Eke)
----------------------------------------------------------------------------------------------------------------------------------------------------
* fixed interleaved rom detection: roms with .smd extension should now work fine
* fixed a recently introduced bug in VDP registers writes: fixes bad colors in Toy Story (intro)
* updated list of games using EEPROM: added Sports Talk Baseball (internal memory check fixed) and Brian Lara Cricket
* fixed VINT flag update when VINT is disabled: fixes NCAA College Football
* adjusted DMA timings in H32 mode: fixes flickering in Out of this World, Kawasaki Superbike Challenge & Formula One
* adjusted line rendering and HBLANK timings: fixes flickering in Nigel Mansell's World Championship Racing, Deadly Moves/Power Athlete
* fixed unmapped ROM reads through Z80 Bank: fixes Zombie High (Proto)
* added support for custom ROM/RAM mapping used by Game no Kanzume Otokuyou
----------------------------------------------------------------------------------------------------------------------------------------------------
[12/28/07] (Eke-Eke)
----------------------------------------------------------------------------------------------------------------------------------------------------
* many sourcecode cleanup and optimization
* completely rewrote EEPROM emulation: now support all known EEPROM types (24C01-24C65) and mappers (Sega, Acclaim, EA, Codemasters)
used in a few games (now use internal game database) as external RAM. This should at least fix save support in the following games:
. NBA Jam (alternate Acclaim mapper)
. College Slam, Frank Thomas Big Hurt Baseball (24C65 type)
. NHLPA Hockey 93, Rings of Power (EA mapper)
. Micro Machines serie, Brian Lara Cricket 96/Shane Warne Cricket (Codemasters mapper)
* external RAM is now initialized to 0xFF by default: fix Micromachines 2, Dino Dini Soccer
* fixed SRAM 16-bits memory handlers: fix some Sega Sports and EA Sports games (NFL95, NBA Action 95, NHL97, NHL98,...)
* modified WRITE_xxx & READ_xxx macros for better portability and faster memory access on BIG ENDIAN platform
* completely rewrote BIG ENDIAN support in render.c and vdp.c: rendering should be a little faster
* rewrote ROM bankswitch emulation (Super Street Fighter II): ROM access are faster, using memory pointers instead of reading ROM copy from ARAM
* fixed leftmost Window/PlaneA column render and implemented Window bug (as described by Charles Mc Donald)
* improved "Sprite Limit" and "Sprite Collision" detection accuracy
* modified RGB565 Color Palette to use the full available color range (0-31;0-63)
* implemented "cycle accurate" HV Interrupt timings: fix Sesame's Street Counting Cafe, Legend of Galahad (intro)
* improved VDP access timings accuracy (added FIFO emulation): fix Double Clutch
* improved DMA timings accuracy: fix Winter Olympics (E), Arch Rivals and probably more
* fixed HCounter again: Road Rash serie (I,II,III) don't need timing hacks anymore
* fixed VCounter in Interlaced 2 mode: fix Combat Cars "VS-Mode"
* improved Interlaced 2 mode (double resolution) rendering: Sonic 2, Combat Cars ("VS-Modes") look far better
* added TMSS BIOS support (optional)
* rewrote part of the YM2162 MAME's core: fixed internal FM timers handling, removed non-YM2612 emulation code and unused multiple cpu support
* implemented "cycle accurate" FM timers & sound samples rendering
* improved Z80 Interrupt timing accuracy: fix Sonic 3 music slowdowns
* updated Z80 & 68000 cores to last MAME versions
* improved Soft Reset emulation: X-Men 2 and Eternal Champions (random character selection) now work more like on real hardware.
* added full overscan emulation (vertical & horizontal borders) for "pixel perfect" aspect ratio (tested against a real genesis)
----------------------------------------------------------------------------------------------------------------------------------------------------
[07/20/07] (Eke-Eke)
----------------------------------------------------------------------------------------------------------------------------------------------------
* corrected TeamPlayer support: fix multiplayer in Gauntlet 4 (Sept. version), Pengo and a lot of others
* added J-Cart support: enable multiplayer in Codemasters games (Pete Sampras, Micromachines games, Super Skidmarks)
* added serial EEPROM autodetection: fix games with bad SRAM informations in header (NBA Jam TE)
* added SVP faking: display 2D graphics in Virtua Racing (the game is however still unplayable)
* added support for more internal IO registers: fixe some unlicensed games (Wisdom Tree games...)
* added preliminary support for unmapped protection device: fix some unlicensed games with special built-in hardware (Squirell King, Lion King 2...)
* added "Soft Reset" combo (in game, use L+Z triggers): this should be like pressing the RESET button on a real Genesis and this is required
in some games to enable special features or even complete the game (ex: X-Men).
----------------------------------------------------------------------------------------------------------------------------------------------------
[06/21/07] (Eke-Eke)
----------------------------------------------------------------------------------------------------------------------------------------------------
* added Multitap support (EA 4-Way Play and Sega Teamplayer): allowed up to four players in games supporting those peripherals
* added partial Sega Menacer lightgun support (use Analog Stick): automatically set when detecting the 6-in-1 Menacer game
----------------------------------------------------------------------------------------------------------------------------------------------------
[05/18/07] (Eke-Eke)
----------------------------------------------------------------------------------------------------------------------------------------------------
* you can now switch between FM cores without reseting the game. FM registers value are automatically restored when switching.
* removed the previous VINT timings modification because it brokes some games (Rocket Knight, Thunderforce III,...)
* added automatic Timing configuration (VDP latency, VINT timing & alternate Line Timing) at game loading, based upon specific romname detection.
This means you can still modify some of these options afterwards but they are now automatically set/unset when loading a game which need
special timing fixes. These fixes are also automatically desactivated when the current game doesn't need them.
For information, games that are actually detected and need special timings to run properly are:
.Legend of Galahad & Road Rash series (single line not rendered properly)
.Sesame Street Counting Cafe (don't boot)
.Chaos Engine/Soldiers of Fortune (graphic glitches on scrolling)
----------------------------------------------------------------------------------------------------------------------------------------------------
[05/08/07] (Eke-Eke)
----------------------------------------------------------------------------------------------------------------------------------------------------
* VINT timings are now a little more accurate: fixes Sesame's Street Counting Cafe
* SN76496 MAX_OUTPUT back to normal
* modified FB_WNOISE value in SN76496 core according to John Kortink's last informations
* added support for Maxim's PSG core, same as used in SMSPLUS (it becomes the default PSG core)
* updated FM core to the latest MAME version
* corrected DAC output level (fixes voices and some special FX being too low)
* added support for Gens YM2612 (FM) core (MAME's one still remains default FM core)
* added configurable preamplification for each sound cores (see Emulator Options)
* added some other configurable sound options (boost overall volume, FM improvment for Gens YM2612)
----------------------------------------------------------------------------------------------------------------------------------------------------
[04/11/07] (Eke-Eke)
----------------------------------------------------------------------------------------------------------------------------------------------------
* corrected MAX_OUTPUT value in SN76496 core: fix PSG sound (SFX) volume
----------------------------------------------------------------------------------------------------------------------------------------------------
[03/17/07] (Eke-Eke)
----------------------------------------------------------------------------------------------------------------------------------------------------
* added an option to enable alternate line rendering timing (fix single line error in Road Rash series and Legend of Galahad's Intro)
* Color RAM update now always reset color 0 to border color (fix color glitches in Mortal Kombat,...) (thanks to Noop's for the idea)
----------------------------------------------------------------------------------------------------------------------------------------------------
[03/09/07] (Eke-Eke)
----------------------------------------------------------------------------------------------------------------------------------------------------
* modified HV counter tables (fix graphic glitches in Skitchin's sky, Lotus 2 Recs, Panorama Cotton, Dashin Desperados & maybe more)
* completely rewrote DMA timings emulation so that it works for all games (no more cpu freezing)
* added all DMA tranfer rates handling for each three DMA modes and added dma busy flag emulation
* modified interrupts handling on VDP register #0 and #1 writes (fix Lemmings status bar)
* added VDP RAM write latency (fix Chaos Engine/Soldier of Fortune gfx glitches)
* modified FM timers handling a bit (fix Vectorman2 music)
* corrected Sprite Limit rendering (fix Sonic 1 & Micromachines 2 title screens)
* corrected IO Registers writes (fix Decap' Attack controls, no more need for alternate input)
* corrected 6 Buttons Pad emulation (fix 6buttons detection in Mortal Kombat 3, Comix Zone and other 6-buttons compatible games)
* modified sound mixing a bit according to Generator sourcecode (FM and PSG ratios seems more correct)
----------------------------------------------------------------------------------------------------------------------------------------------------
[02/07/07] (Eke-Eke)
----------------------------------------------------------------------------------------------------------------------------------------------------
* fixed fm timers (fix missing music in Castle of Illusion, Quackshot, Undead Line, Wonderboy in Monster Lair, Cal 50, Turbo Outrun, Thundeforce 4 and maybe more)
* added complete EEPROM emulation (save support now works fine in Wonderboy5, Megaman Willy Wars, NBA Jam...) (credits to Notaz, adapted from Picodrive code)
* added preliminar dma timing emulation (fix bottom screen in Legend of Galahad) (credits to Notaz, adapted from Picodrive code)
* hack: clear Vint pending after Hint (INT level 4) acknowledge (fix Fatal Rewind)
* hack: modify read_bus16 to return a random value (fake fetch) (fix Time Killers)
* modified cpu execution timings, with more correct hblank and interrupts timing (fix ISS Deluxe, Double Dragon 2 and certainly more) (Based on Gens code)
* modified busreq mechanism: better synchro between z80 & 68k (no need to dejitter anymore) (Based on Gens code)
* added sprite collision detection (fix Strider 2)
* modified dma fill operation for big endian platform (fix Contra Hardcorps gfx garbage)
----------------------------------------------------------------------------------------------------------------------------------------------------
[05/25/03] (Charles MacDonald)
----------------------------------------------------------------------------------------------------------------------------------------------------
* Fixed a typo that made Z80 banked access to the VDP registers always fail.
----------------------------------------------------------------------------------------------------------------------------------------------------
[05/17/03] (Charles MacDonald)
----------------------------------------------------------------------------------------------------------------------------------------------------
* Modified the rendering code to handle unaligned longword access to memory.
----------------------------------------------------------------------------------------------------------------------------------------------------
[04/20/03] (Charles MacDonald)
----------------------------------------------------------------------------------------------------------------------------------------------------
* Modified 68000 emulator to prevent 'tas.b $mem' from writing data back
after a read (fixes Gargoyles).
* Fixed bug in 68000 emulator to swap order of words written for address
register indirect pre-decremented writes (fixes Jim Power graphics).
* Added support for 240-line displays (for Super Skidmarks).
* Rewrote part of the interrupt handling (fixes some raster effects).
* Removed sprite collision detection code (never really worked).
* Optimized sprite rendering inner loop.
----------------------------------------------------------------------------------------------------------------------------------------------------
[04/13/03] (Charles MacDonald)
----------------------------------------------------------------------------------------------------------------------------------------------------
* Finished up memory map for VDP DMA V-bus reads.
* Fixed handling of 68000 writes to I/O chip at even addresses.
* Fixed bit 7 handling of control register in I/O chip.
* Finished up Z80 memory map.
* Added code to handle Genesis hardware lock-ups.
* Removed some faulty code from the 68000 memory map handlers.
----------------------------------------------------------------------------------------------------------------------------------------------------
[03/22/03] (Charles MacDonald)
----------------------------------------------------------------------------------------------------------------------------------------------------
* Completed implementation of Z80 banked memory handlers.

View File

@ -1,146 +0,0 @@
DISCLAIMER:
THIS IS A VERY BASIC & UNSTABLE PORT WHICH ONLY PURPOSE
IS TO SHOW HOW TO USE GENESIS PLUS GX CORE & INTERFACE IT
WITH SDL2 IN PARTICULAR. BUILDS ARE NOT MEANT TO BE REALLY
USED FOR ANYTHING ELSE BUT EASIER CORE DEBUGGING ON WINDOWS.
PLEASE DO NOT DISTRIBUTE WIN32 BINARIES WITHOUT THIS NOTICE.
END USERS SHOULD PREFERABLY USE LIBRETRO PORT WITH RETROARCH.
----------------------------------------------------------------------------
Genesis Plus (SDL2 Port)
----------------------------------------------------------------------------
based on the original version 1.3
by Charles Mac Donald
WWW: http://cgfm2.emuviews.com
version 1.7.4
backported from Genesis Plus GX
by Eke-Eke
WWW: http://code.google.com/p/genplus-gx
E-mail: ekeeke31@gmail.com
What's New
----------
see CHANGELOG.txt
Features
---------
* accurate emulation of SG-1000, Mark-III, Master System (I & II), Game Gear, Genesis / Mega Drive, Sega / Mega CD hardware models (incl. backwards compatibility modes)
* NTSC (60Hz) & PAL (50Hz) video hardware emulation
* accurate CDD, CDC & GFX chip emulation (Sega/Mega CD)
* CD-DA fader emulation (Sega/Mega CD)
* Mode 1 cartridge support (Sega/Mega CD)
* highly accurate 68000 & Z80 CPU emulation
* highly accurate VDP emulation (all rendering modes, mid-line changes, undocumented registers,…) & timings (HBLANK, DMA, FIFO, HV interrupts,…)
* sample-accurate YM2612,YM2413, PSG, & PCM emulation (all sound chips are running at the original frequency)
* cycle-accurate chip synchronization (68000s/Z80/YM2612/PSG/PCM)
* high-quality audio resampling using Blip Buffer
* basic hardware latency emulation (VDP/68k, Z80/68k)
* full overscan area emulation (horizontal & vertical color borders)
* optional Game Gear extended screen mode
* internal BOOT ROM support (Master System, Genesis / Mega Drive, Sega / Mega CD)
* optional TMSS hardware emulation (Genesis / Mega Drive)
* support for Blargg's software NTSC filters
* preliminary PICO emulation
* support for raw (.bin, .gen, .md, .sms, .gg & .sg) and interleaved (.smd & .mdx) ROM files
* support for CUE+BIN, ISO+OGG & ISO+WAV CD image files
* 2-buttons, 3-buttons & 6-buttons controllers emulation
* Sega Team Player & EA 4-Way Play multitaps emulation
* Sega Mouse emulation
* Sega Paddle Control & Sports Pad analog emulation
* Terebi Oekaki tablet emulation
* Sega Light Phaser, Menacer & Justifiers lightgun emulation
* Sega Activator & XE-1AP analog controller emulation
* SVP DSP (Virtua Racing) emulation
* J-Cart adapter (Micro Machines & Pete Sampras series, Super Skidmarks) emulation
* Backup RAM (max. 64KB), I2C (24Cxx), SPI (95xxx) & MicroWire (93C46) EEPROMs emulation
* Sega/Mega CD RAM cart (max. 512KB) emulation
* “official” ROM bankswitch hardware (Super Street Fighter 2) emulation
* “official” backup RAM bankswitch hardware (Phantasy Star 4, Legend of Thor, Sonic the Hedgehog 3) emulation
* support for all known unlicensed/pirate cartridges bankswitch & copy protection hardware
* emulation of all known Master System & Game Gear cartridge “mappers” (incl. unlicensed Korean ones)
* Game Genie & Action Replay hardware emulation
* Sonic & Knuckles “Lock-On” hardware emulation
* support for ROM image up to 10MB (Ultimate MK3 hack)
Usage
-----
The Windows version runs windowed in a 16-bit desktop with 48Hz sound using SDL but
without joystick support.
Controls
-----
Arrow Keys - Directional pad
A/Q,S,D,F - buttons A, B(1), C(2), START
W,X,C,V - buttons X, Y, Z, MODE if 6-buttons controller is enabled
Tab - Hard Reset
Esc - Exit program
F2 - Toggle Fullscreen/Windowed mode
F4 - Toggle Audio (Turbo mode must be disabled first)
F6 - Toggle Turbo mode (Audio must be disabled first)
F7 - Load Savestate (game.gpz)
F8 - Save Savestate (game.gpz)
F9 - Toggle VDP mode: PAL(50hz)/NTSC(60hz)
F10 - Soft Reset
F11 - Toggle Border emulation
F12 - Toggle Player # (test only)
The mouse is used for lightguns, Sega Mouse, PICO & Terebi Oekaki tablet (automatically detected when loading supported game).
A SRAM file (game.srm) is automatically saved on exit and loaded on startup.
Credits
--------
Core(s) improvements & additional features by Eke-Eke
Original code by Charles MacDonald
Original Z80 core by Juergen Buchmueller
Original Musashi 68k core by Karl Stenerud
Original YM2612/YM2413 cores by Jarek Burczynski & Tatsuyuki Satoh
Original SN76489 core by Maxim
Original SVP core by Notaz
Blip Buffer & NTSC Video filter libraries by Shay Green (Blargg)
3-Band EQ implementation by Neil C
TREMOR VORBIS decoding library by Xiph.org
Zlib by Jean-Loup Gailly & Mark Adler
Aknowledgements
----------------
The following emulator authors: Bart Trzynadlowski, Steve Snake, Stef, Notaz, AamirM
The regular people at spritesmind.net and smspower.org.
The MAME team for the CPU and sound chip emulators.
Nemesis for the researches on the YM2612 and VDP.
Tasco Deluxe for the documentation of Realtec mapper.
Haze for the reverse-engineering of many unlicensed games protection.

View File

@ -1,55 +0,0 @@
#include "osd.h"
t_config config;
void set_config_defaults(void)
{
int i;
/* sound options */
config.psg_preamp = 150;
config.fm_preamp = 100;
config.hq_fm = 1;
config.psgBoostNoise = 1;
config.filter = 1;
config.low_freq = 200;
config.high_freq = 8000;
config.lg = 1.0;
config.mg = 1.0;
config.hg = 1.0;
config.lp_range = 0x9999; /* 0.6 in 16.16 fixed point */
config.dac_bits = 14;
config.ym2413 = 2; /* = AUTO (0 = always OFF, 1 = always ON) */
config.mono = 0;
/* system options */
config.system = 0; /* = AUTO (or SYSTEM_SG, SYSTEM_MARKIII, SYSTEM_SMS, SYSTEM_SMS2, SYSTEM_GG, SYSTEM_MD) */
config.region_detect = 0; /* = AUTO (1 = USA, 2 = EUROPE, 3 = JAPAN/NTSC, 4 = JAPAN/PAL) */
config.vdp_mode = 0; /* = AUTO (1 = NTSC, 2 = PAL) */
config.master_clock = 0; /* = AUTO (1 = NTSC, 2 = PAL) */
config.force_dtack = 0;
config.addr_error = 1;
config.bios = 0;
config.lock_on = 0; /* = OFF (can be TYPE_SK, TYPE_GG & TYPE_AR) */
config.ntsc = 0;
config.lcd = 0; /* 0.8 fixed point */
/* display options */
config.overscan = 0; /* 3 = all borders (0 = no borders , 1 = vertical borders only, 2 = horizontal borders only) */
config.gg_extra = 0; /* 1 = show extended Game Gear screen (256x192) */
config.render = 0; /* 1 = double resolution output (only when interlaced mode 2 is enabled) */
/* controllers options */
input.system[0] = SYSTEM_GAMEPAD;
input.system[1] = SYSTEM_GAMEPAD;
config.gun_cursor[0] = 1;
config.gun_cursor[1] = 1;
config.invert_mouse = 0;
for (i=0;i<MAX_INPUTS;i++)
{
/* autodetected control pad type */
config.input[i].padtype = DEVICE_PAD2B | DEVICE_PAD3B | DEVICE_PAD6B;
}
}

View File

@ -1,54 +0,0 @@
#ifndef _CONFIG_H_
#define _CONFIG_H_
/****************************************************************************
* Config Option
*
****************************************************************************/
typedef struct
{
uint8 padtype;
} t_input_config;
typedef struct
{
uint8 hq_fm;
uint8 filter;
uint8 psgBoostNoise;
uint8 dac_bits;
uint8 ym2413;
int16 psg_preamp;
int16 fm_preamp;
uint32 lp_range;
int16 low_freq;
int16 high_freq;
int16 lg;
int16 mg;
int16 hg;
uint8 mono;
uint8 system;
uint8 region_detect;
uint8 vdp_mode;
uint8 master_clock;
uint8 force_dtack;
uint8 addr_error;
uint8 bios;
uint8 lock_on;
uint8 hot_swap;
uint8 invert_mouse;
uint8 gun_cursor[2];
uint8 overscan;
uint8 gg_extra;
uint8 ntsc;
uint8 lcd;
uint8 render;
t_input_config input[MAX_INPUTS];
} t_config;
/* Global variables */
extern t_config config;
extern void set_config_defaults(void);
#endif /* _CONFIG_H_ */

View File

@ -1,37 +0,0 @@
/*
error.c --
Error logging
*/
#include "osd.h"
#ifdef LOGERROR
static FILE *error_log;
#endif
void error_init(void)
{
#ifdef LOGERROR
error_log = fopen("error.log","w");
#endif
}
void error_shutdown(void)
{
#ifdef LOGERROR
if(error_log) fclose(error_log);
#endif
}
void error(char *format, ...)
{
#ifdef LOGERROR
if (log_error)
{
va_list ap;
va_start(ap, format);
if(error_log) vfprintf(error_log, format, ap);
va_end(ap);
}
#endif
}

View File

@ -1,10 +0,0 @@
#ifndef _ERROR_H_
#define _ERROR_H_
/* Function prototypes */
void error_init(void);
void error_shutdown(void);
void error(char *format, ...);
#endif /* _ERROR_H_ */

View File

@ -1,158 +0,0 @@
/*
* fileio.c
*
* Load a normal file, or ZIP/GZ archive into ROM buffer.
* Returns loaded ROM size (zero if an error occured)
*
*
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Charles Mac Donald
* modified by Eke-Eke (Genesis Plus GX)
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met:
*
* - Redistributions may not be sold, nor may they be used in a commercial
* product or activity.
*
* - Redistributions that are modified from the original source must include the
* complete source code, including the source code for all components used by a
* binary built from the modified sources. However, as a special exception, the
* source code distributed need not include anything that is normally distributed
* (in either source or binary form) with the major components (compiler, kernel,
* and so on) of the operating system on which the executable runs, unless that
* component itself accompanies the executable.
*
* - Redistributions must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************************/
#include "shared.h"
#include <zlib.h>
static int check_zip(char *filename);
int load_archive(char *filename, unsigned char *buffer, int maxsize, char *extension)
{
int size = 0;
if(check_zip(filename))
{
unz_file_info info;
int ret = 0;
char fname[256];
/* Attempt to open the archive */
unzFile *fd = unzOpen(filename);
if (!fd) return 0;
/* Go to first file in archive */
ret = unzGoToFirstFile(fd);
if(ret != UNZ_OK)
{
unzClose(fd);
return 0;
}
/* Get file informations and update filename */
ret = unzGetCurrentFileInfo(fd, &info, fname, 256, NULL, 0, NULL, 0);
if(ret != UNZ_OK)
{
unzClose(fd);
return 0;
}
/* Compressed filename extension */
if (extension)
{
strncpy(extension, &fname[strlen(fname) - 3], 3);
extension[3] = 0;
}
/* Open the file for reading */
ret = unzOpenCurrentFile(fd);
if(ret != UNZ_OK)
{
unzClose(fd);
return 0;
}
/* Retrieve uncompressed file size */
size = info.uncompressed_size;
if(size > maxsize)
{
size = maxsize;
}
/* Read (decompress) the file */
ret = unzReadCurrentFile(fd, buffer, size);
if(ret != size)
{
unzCloseCurrentFile(fd);
unzClose(fd);
return 0;
}
/* Close the current file */
ret = unzCloseCurrentFile(fd);
if(ret != UNZ_OK)
{
unzClose(fd);
return 0;
}
/* Close the archive */
ret = unzClose(fd);
if(ret != UNZ_OK) return 0;
}
else
{
/* Open file */
gzFile gd = gzopen(filename, "rb");
if (!gd) return 0;
/* Read file data */
size = gzread(gd, buffer, maxsize);
/* filename extension */
if (extension)
{
strncpy(extension, &filename[strlen(filename) - 3], 3);
extension[3] = 0;
}
/* Close file */
gzclose(gd);
}
/* Return loaded ROM size */
return size;
}
/*
Verifies if a file is a ZIP archive or not.
Returns: 1= ZIP archive, 0= not a ZIP archive
*/
static int check_zip(char *filename)
{
uint8 buf[2];
FILE *fd = fopen(filename, "rb");
if(!fd) return (0);
fread(buf, 2, 1, fd);
fclose(fd);
if(memcmp(buf, "PK", 2) == 0) return (1);
return (0);
}

View File

@ -1,48 +0,0 @@
/*
* fileio.c
*
* Load a normal file, or ZIP/GZ archive.
* Returns loaded ROM size (zero if an error occured)
*
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Charles Mac Donald
* modified by Eke-Eke (Genesis Plus GX)
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met:
*
* - Redistributions may not be sold, nor may they be used in a commercial
* product or activity.
*
* - Redistributions that are modified from the original source must include the
* complete source code, including the source code for all components used by a
* binary built from the modified sources. However, as a special exception, the
* source code distributed need not include anything that is normally distributed
* (in either source or binary form) with the major components (compiler, kernel,
* and so on) of the operating system on which the executable runs, unless that
* component itself accompanies the executable.
*
* - Redistributions must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************************/
#ifndef _FILEIO_H_
#define _FILEIO_H_
/* Function prototypes */
extern int load_archive(char *filename, unsigned char *buffer, int maxsize, char *extension);
#endif /* _FILEIO_H_ */

View File

@ -1 +0,0 @@
MAINICON ICON "md.ico"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

View File

@ -1,35 +0,0 @@
#ifndef _OSD_H_
#define _OSD_H_
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <time.h>
#include <SDL.h>
#include <stdlib.h>
#include "shared.h"
#include "main.h"
#include "config.h"
#include "error.h"
#include "unzip.h"
#include "fileio.h"
#define osd_input_update sdl_input_update
#define GG_ROM "./ggenie.bin"
#define AR_ROM "./areplay.bin"
#define SK_ROM "./sk.bin"
#define SK_UPMEM "./sk2chip.bin"
#define CD_BIOS_US "./bios_CD_U.bin"
#define CD_BIOS_EU "./bios_CD_E.bin"
#define CD_BIOS_JP "./bios_CD_J.bin"
#define MD_BIOS "./bios_MD.bin"
#define MS_BIOS_US "./bios_U.sms"
#define MS_BIOS_EU "./bios_E.sms"
#define MS_BIOS_JP "./bios_J.sms"
#define GG_BIOS "./bios.gg"
#endif /* _OSD_H_ */

View File

@ -1,5 +0,0 @@
Compile with MinGW.
You will also need to install the SDL library (http://www.libsdl.org/).
Zlib is required for zipped rom support.
Please distribute required dlls with the executable.

File diff suppressed because it is too large Load Diff

View File

@ -1,273 +0,0 @@
/* unzip.h -- IO for uncompress .zip files using zlib
Version 0.15 beta, Mar 19th, 1998,
Copyright (C) 1998 Gilles Vollant
This unzip package allow extract file from .ZIP file, compatible with PKZip 2.04g
WinZip, InfoZip tools and compatible.
Encryption and multi volume ZipFile (span) are not supported.
Old compressions used by old PKZip 1.x are not supported
THIS IS AN ALPHA VERSION. AT THIS STAGE OF DEVELOPPEMENT, SOMES API OR STRUCTURE
CAN CHANGE IN FUTURE VERSION !!
I WAIT FEEDBACK at mail info@winimage.com
Visit also http://www.winimage.com/zLibDll/unzip.htm for evolution
Condition of use and distribution are the same than zlib :
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
/* for more info about .ZIP format, see
ftp://ftp.cdrom.com/pub/infozip/doc/appnote-970311-iz.zip
PkWare has also a specification at :
ftp://ftp.pkware.com/probdesc.zip */
#ifndef _unz_H
#define _unz_H
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _ZLIB_H
#include "zlib.h"
#endif
#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP)
/* like the STRICT of WIN32, we define a pointer that cannot be converted
from (void*) without cast */
typedef struct TagunzFile__ { int unused; } unzFile__;
typedef unzFile__ *unzFile;
#else
typedef voidp unzFile;
#endif
#define UNZ_OK (0)
#define UNZ_END_OF_LIST_OF_FILE (-100)
#define UNZ_ERRNO (Z_ERRNO)
#define UNZ_EOF (0)
#define UNZ_PARAMERROR (-102)
#define UNZ_BADZIPFILE (-103)
#define UNZ_INTERNALERROR (-104)
#define UNZ_CRCERROR (-105)
/* tm_unz contain date/time info */
typedef struct tm_unz_s
{
uInt tm_sec; /* seconds after the minute - [0,59] */
uInt tm_min; /* minutes after the hour - [0,59] */
uInt tm_hour; /* hours since midnight - [0,23] */
uInt tm_mday; /* day of the month - [1,31] */
uInt tm_mon; /* months since January - [0,11] */
uInt tm_year; /* years - [1980..2044] */
} tm_unz;
/* unz_global_info structure contain global data about the ZIPfile
These data comes from the end of central dir */
typedef struct unz_global_info_s
{
uLong number_entry; /* total number of entries in
the central dir on this disk */
uLong size_comment; /* size of the global comment of the zipfile */
} unz_global_info;
/* unz_file_info contain information about a file in the zipfile */
typedef struct unz_file_info_s
{
uLong version; /* version made by 2 bytes */
uLong version_needed; /* version needed to extract 2 bytes */
uLong flag; /* general purpose bit flag 2 bytes */
uLong compression_method; /* compression method 2 bytes */
uLong dosDate; /* last mod file date in Dos fmt 4 bytes */
uLong crc; /* crc-32 4 bytes */
uLong compressed_size; /* compressed size 4 bytes */
uLong uncompressed_size; /* uncompressed size 4 bytes */
uLong size_filename; /* filename length 2 bytes */
uLong size_file_extra; /* extra field length 2 bytes */
uLong size_file_comment; /* file comment length 2 bytes */
uLong disk_num_start; /* disk number start 2 bytes */
uLong internal_fa; /* internal file attributes 2 bytes */
uLong external_fa; /* external file attributes 4 bytes */
tm_unz tmu_date;
} unz_file_info;
extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1,
const char* fileName2,
int iCaseSensitivity));
/*
Compare two filename (fileName1,fileName2).
If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi
or strcasecmp)
If iCaseSenisivity = 0, case sensitivity is defaut of your operating system
(like 1 on Unix, 2 on Windows)
*/
extern unzFile ZEXPORT unzOpen OF((const char *path));
/*
Open a Zip file. path contain the full pathname (by example,
on a Windows NT computer "c:\\zlib\\zlib111.zip" or on an Unix computer
"zlib/zlib111.zip".
If the zipfile cannot be opened (file don't exist or in not valid), the
return value is NULL.
Else, the return value is a unzFile Handle, usable with other function
of this unzip package.
*/
extern int ZEXPORT unzClose OF((unzFile file));
/*
Close a ZipFile opened with unzipOpen.
If there is files inside the .Zip opened with unzOpenCurrentFile (see later),
these files MUST be closed with unzipCloseCurrentFile before call unzipClose.
return UNZ_OK if there is no problem. */
extern int ZEXPORT unzGetGlobalInfo OF((unzFile file,
unz_global_info *pglobal_info));
/*
Write info about the ZipFile in the *pglobal_info structure.
No preparation of the structure is needed
return UNZ_OK if there is no problem. */
extern int ZEXPORT unzGetGlobalComment OF((unzFile file,
char *szComment,
uLong uSizeBuf));
/*
Get the global comment string of the ZipFile, in the szComment buffer.
uSizeBuf is the size of the szComment buffer.
return the number of byte copied or an error code <0
*/
/***************************************************************************/
/* Unzip package allow you browse the directory of the zipfile */
extern int ZEXPORT unzGoToFirstFile OF((unzFile file));
/*
Set the current file of the zipfile to the first file.
return UNZ_OK if there is no problem
*/
extern int ZEXPORT unzGoToNextFile OF((unzFile file));
/*
Set the current file of the zipfile to the next file.
return UNZ_OK if there is no problem
return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
*/
extern int ZEXPORT unzLocateFile OF((unzFile file,
const char *szFileName,
int iCaseSensitivity));
/*
Try locate the file szFileName in the zipfile.
For the iCaseSensitivity signification, see unzStringFileNameCompare
return value :
UNZ_OK if the file is found. It becomes the current file.
UNZ_END_OF_LIST_OF_FILE if the file is not found
*/
extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file,
unz_file_info *pfile_info,
char *szFileName,
uLong fileNameBufferSize,
void *extraField,
uLong extraFieldBufferSize,
char *szComment,
uLong commentBufferSize));
/*
Get Info about the current file
if pfile_info!=NULL, the *pfile_info structure will contain somes info about
the current file
if szFileName!=NULL, the filemane string will be copied in szFileName
(fileNameBufferSize is the size of the buffer)
if extraField!=NULL, the extra field information will be copied in extraField
(extraFieldBufferSize is the size of the buffer).
This is the Central-header version of the extra field
if szComment!=NULL, the comment string of the file will be copied in szComment
(commentBufferSize is the size of the buffer)
*/
/***************************************************************************/
/* for reading the content of the current zipfile, you can open it, read data
from it, and close it (you can close it before reading all the file)
*/
extern int ZEXPORT unzOpenCurrentFile OF((unzFile file));
/*
Open for reading data the current file in the zipfile.
If there is no error, the return value is UNZ_OK.
*/
extern int ZEXPORT unzCloseCurrentFile OF((unzFile file));
/*
Close the file in zip opened with unzOpenCurrentFile
Return UNZ_CRCERROR if all the file was read but the CRC is not good
*/
extern int ZEXPORT unzReadCurrentFile OF((unzFile file,
voidp buf,
unsigned len));
/*
Read bytes from the current file (opened by unzOpenCurrentFile)
buf contain buffer where data must be copied
len the size of buf.
return the number of byte copied if somes bytes are copied
return 0 if the end of file was reached
return <0 with error code if there is an error
(UNZ_ERRNO for IO error, or zLib error for uncompress error)
*/
extern z_off_t ZEXPORT unztell OF((unzFile file));
/*
Give the current position in uncompressed data
*/
extern int ZEXPORT unzeof OF((unzFile file));
/*
return 1 if the end of file was reached, 0 elsewhere
*/
extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file,
voidp buf,
unsigned len));
/*
Read extra field from the current file (opened by unzOpenCurrentFile)
This is the local-header version of the extra field (sometimes, there is
more info in the local-header version than in the central-header)
if buf==NULL, it return the size of the local extra field
if buf!=NULL, len is the size of the buffer, the extra header is copied in
buf.
the return value is the number of bytes copied in buf, or (if <0)
the error code
*/
#ifdef __cplusplus
}
#endif
#endif /* _unz_H */