Merge pull request #3 from libretro/master

Libretro port for merging in main project (Xbox 1/360/PS3/Wii/Raspberry Pi/PC Win32/Linux)
This commit is contained in:
ekeeke 2012-08-22 13:49:36 -07:00
commit 1baaad3bcc
19 changed files with 3513 additions and 0 deletions

196
Makefile.libretro Normal file
View File

@ -0,0 +1,196 @@
NTSC = 0
DEBUG = 0
LOGSOUND = 0
GENPLUS_SRC_DIR := source
LIBRETRO_DIR := libretro
ifeq ($(platform),)
platform = unix
ifeq ($(shell uname -a),)
platform = win
else ifneq ($(findstring MINGW,$(shell uname -a)),)
platform = win
else ifneq ($(findstring Darwin,$(shell uname -a)),)
platform = osx
else ifneq ($(findstring win,$(shell uname -a)),)
platform = win
endif
endif
# system platform
system_platform = unix
ifeq ($(shell uname -a),)
EXE_EXT = .exe
system_platform = win
else ifneq ($(findstring Darwin,$(shell uname -a)),)
system_platform = osx
else ifneq ($(findstring MINGW,$(shell uname -a)),)
system_platform = win
endif
ifeq ($(platform), unix)
TARGET := libretro.so
fpic := -fPIC
SHARED := -shared -Wl,--version-script=libretro/link.T -Wl,--no-undefined -lz
ENDIANNESS_DEFINES := -DLSB_FIRST
PLATFORM_DEFINES := -DHAVE_ZLIB
else ifeq ($(platform), osx)
TARGET := libretro.dylib
fpic := -fPIC
SHARED := -dynamiclib -lz
ENDIANNESS_DEFINES := -DLSB_FIRST
PLATFORM_DEFINES := -DHAVE_ZLIB
else ifeq ($(platform), sncps3)
TARGET := libretro_ps3.a
CC = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
AR = $(CELL_SDK)/host-win32/sn/bin/ps3snarl.exe
PLATFORM_DEFINES := -D__CELLOS_LV2 -DALT_RENDER
else ifeq ($(platform), ps3)
TARGET := libretro_ps3.a
CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
AR = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ar.exe
PLATFORM_DEFINES := -D__CELLOS_LV2 -DALT_RENDER
else ifeq ($(platform), psl1ght)
TARGET := libretro_psl1ght.a$(EXE_EXT)
CC = $(PS3DEV)/ppu/bin/ppu-gcc$(EXE_EXT)
AR = $(PS3DEV)/ppu/bin/ppu-ar$(EXE_EXT)
PLATFORM_DEFINES := -D__CELLOS_LV2 -DALT_RENDER
else ifeq ($(platform), xenon)
TARGET := libretro_xenon360.a
CC = xenon-gcc$(EXE_EXT)
AR = xenon-ar$(EXE_EXT)
PLATFORM_DEFINES := -D__LIBXENON__ -DALT_RENDER
else ifeq ($(platform), wii)
TARGET := libretro_wii.a
CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc$(EXE_EXT)
AR = $(DEVKITPPC)/bin/powerpc-eabi-ar$(EXE_EXT)
PLATFORM_DEFINES := -DGEKKO -mrvl -mcpu=750 -meabi -mhard-float -DALT_RENDER
else
TARGET := retro.dll
CC = gcc
SHARED := -shared -static-libgcc -static-libstdc++ -Wl,--version-script=libretro/link.T -Wl,--no-undefined -lz
ENDIANNESS_DEFINES := -DLSB_FIRST
PLATFORM_DEFINES := -DHAVE_ZLIB
endif
ifeq ($(NTSC), 1)
CFLAGS += -DUSE_NTSC
endif
ifeq ($(DEBUG), 1)
CFLAGS += -O0 -g
else
CFLAGS += -O3 -DNDEBUG
endif
LIBRETRO_SRC := $(GENPLUS_SRC_DIR)/genesis.c \
$(GENPLUS_SRC_DIR)/vdp_ctrl.c \
$(GENPLUS_SRC_DIR)/vdp_render.c \
$(GENPLUS_SRC_DIR)/system.c \
$(GENPLUS_SRC_DIR)/io_ctrl.c \
$(GENPLUS_SRC_DIR)/loadrom.c \
$(GENPLUS_SRC_DIR)/mem68k.c \
$(GENPLUS_SRC_DIR)/state.c \
$(GENPLUS_SRC_DIR)/memz80.c \
$(GENPLUS_SRC_DIR)/membnk.c \
$(GENPLUS_SRC_DIR)/input_hw/activator.c \
$(GENPLUS_SRC_DIR)/input_hw/gamepad.c \
$(GENPLUS_SRC_DIR)/input_hw/input.c \
$(GENPLUS_SRC_DIR)/input_hw/lightgun.c \
$(GENPLUS_SRC_DIR)/input_hw/mouse.c \
$(GENPLUS_SRC_DIR)/input_hw/paddle.c \
$(GENPLUS_SRC_DIR)/input_hw/sportspad.c \
$(GENPLUS_SRC_DIR)/input_hw/teamplayer.c \
$(GENPLUS_SRC_DIR)/input_hw/xe_a1p.c \
$(GENPLUS_SRC_DIR)/input_hw/terebi_oekaki.c \
$(GENPLUS_SRC_DIR)/cd_hw/cd_cart.c \
$(GENPLUS_SRC_DIR)/cd_hw/cdc.c \
$(GENPLUS_SRC_DIR)/cd_hw/cdd.c \
$(GENPLUS_SRC_DIR)/cd_hw/gfx.c \
$(GENPLUS_SRC_DIR)/cd_hw/pcm.c \
$(GENPLUS_SRC_DIR)/cd_hw/scd.c \
$(GENPLUS_SRC_DIR)/cart_hw/areplay.c \
$(GENPLUS_SRC_DIR)/cart_hw/md_cart.c \
$(GENPLUS_SRC_DIR)/cart_hw/sms_cart.c \
$(GENPLUS_SRC_DIR)/cart_hw/gg_eeprom.c \
$(GENPLUS_SRC_DIR)/cart_hw/md_eeprom.c \
$(GENPLUS_SRC_DIR)/cart_hw/ggenie.c \
$(GENPLUS_SRC_DIR)/cart_hw/sram.c \
$(GENPLUS_SRC_DIR)/cart_hw/svp/ssp16.c \
$(GENPLUS_SRC_DIR)/cart_hw/svp/svp.c \
$(GENPLUS_SRC_DIR)/ntsc/md_ntsc.c \
$(GENPLUS_SRC_DIR)/ntsc/sms_ntsc.c \
$(GENPLUS_SRC_DIR)/sound/Fir_Resampler.c \
$(GENPLUS_SRC_DIR)/sound/eq.c \
$(GENPLUS_SRC_DIR)/sound/sound.c \
$(GENPLUS_SRC_DIR)/sound/ym2612.c \
$(GENPLUS_SRC_DIR)/sound/ym2413.c \
$(GENPLUS_SRC_DIR)/sound/sn76489.c \
$(GENPLUS_SRC_DIR)/sound/blip.c \
$(GENPLUS_SRC_DIR)/z80/z80.c \
$(GENPLUS_SRC_DIR)/m68k/m68kcpu.c \
$(GENPLUS_SRC_DIR)/m68k/s68kcpu.c \
$(LIBRETRO_DIR)/libretro.c
LIBRETRO_OBJ := $(LIBRETRO_SRC:.c=.o)
ifeq ($(LOGSOUND), 1)
LIBRETRO_CFLAGS := -DLOGSOUND
endif
ifeq ($(platform), sncps3)
CODE_DEFINES =
else
CODE_DEFINES = -std=gnu99
endif
DEFINES :=
CFLAGS += $(fpic) $(DEFINES) $(CODE_DEFINES)
LIBRETRO_CFLAGS += -I$(GENPLUS_SRC_DIR) \
-I$(GENPLUS_SRC_DIR)/sound \
-I$(GENPLUS_SRC_DIR)/input_hw \
-I$(GENPLUS_SRC_DIR)/cart_hw \
-I$(GENPLUS_SRC_DIR)/cd_hw \
-I$(GENPLUS_SRC_DIR)/cart_hw/svp \
-I$(GENPLUS_SRC_DIR)/m68k \
-I$(GENPLUS_SRC_DIR)/z80 \
-I$(GENPLUS_SRC_DIR)/ntsc \
-I$(LIBRETRO_DIR) \
-DUSE_15BPP_RENDERING \
$(ENDIANNESS_DEFINES) \
$(PLATFORM_DEFINES) \
-DINLINE="static inline" \
-D__LIBRETRO__
LIBRETRO_LIBS := -lm
all: $(TARGET)
%.o: %.c
$(CC) -o $@ -c $< $(CFLAGS) $(LIBRETRO_CFLAGS)
$(TARGET): $(LIBRETRO_OBJ)
ifeq ($(platform), sncps3)
$(AR) rcs $@ $(LIBRETRO_OBJ)
else ifeq ($(platform), ps3)
$(AR) rcs $@ $(LIBRETRO_OBJ)
else ifeq ($(platform), psl1ght)
$(AR) rcs $@ $(LIBRETRO_OBJ)
else ifeq ($(platform), xenon)
$(AR) rcs $@ $(LIBRETRO_OBJ)
else ifeq ($(platform), wii)
$(AR) rcs $@ $(LIBRETRO_OBJ)
else
$(CC) -o $(TARGET) $(fpic) $(LIBRETRO_OBJ) $(LIBRETRO_LIBS) $(SHARED)
endif
clean:
rm -f $(LIBRETRO_OBJ)
rm -f $(TARGET)
.PHONY: clean

62
libretro/jni/Android.mk Normal file
View File

@ -0,0 +1,62 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
GENPLUS_SRC_DIR := ../src
LIBRETRO_DIR := ../libretro
LOCAL_MODULE := libretro
LOCAL_SRC_FILES := $(GENPLUS_SRC_DIR)/genesis.c \
$(GENPLUS_SRC_DIR)/vdp_ctrl.c \
$(GENPLUS_SRC_DIR)/vdp_render.c \
$(GENPLUS_SRC_DIR)/system.c \
$(GENPLUS_SRC_DIR)/io_ctrl.c \
$(GENPLUS_SRC_DIR)/loadrom.c \
$(GENPLUS_SRC_DIR)/mem68k.c \
$(GENPLUS_SRC_DIR)/state.c \
$(GENPLUS_SRC_DIR)/memz80.c \
$(GENPLUS_SRC_DIR)/membnk.c \
$(GENPLUS_SRC_DIR)/input_hw/activator.c \
$(GENPLUS_SRC_DIR)/input_hw/gamepad.c \
$(GENPLUS_SRC_DIR)/input_hw/input.c \
$(GENPLUS_SRC_DIR)/input_hw/lightgun.c \
$(GENPLUS_SRC_DIR)/input_hw/mouse.c \
$(GENPLUS_SRC_DIR)/input_hw/paddle.c \
$(GENPLUS_SRC_DIR)/input_hw/sportspad.c \
$(GENPLUS_SRC_DIR)/input_hw/teamplayer.c \
$(GENPLUS_SRC_DIR)/input_hw/xe_a1p.c \
$(GENPLUS_SRC_DIR)/input_hw/terebi_oekaki.c \
$(GENPLUS_SRC_DIR)/cart_hw/areplay.c \
$(GENPLUS_SRC_DIR)/cart_hw/md_cart.c \
$(GENPLUS_SRC_DIR)/cart_hw/sms_cart.c \
$(GENPLUS_SRC_DIR)/cart_hw/gg_eeprom.c \
$(GENPLUS_SRC_DIR)/cart_hw/md_eeprom.c \
$(GENPLUS_SRC_DIR)/cart_hw/ggenie.c \
$(GENPLUS_SRC_DIR)/cart_hw/sram.c \
$(GENPLUS_SRC_DIR)/cart_hw/svp/ssp16.c \
$(GENPLUS_SRC_DIR)/cart_hw/svp/svp.c \
$(GENPLUS_SRC_DIR)/ntsc/md_ntsc.c \
$(GENPLUS_SRC_DIR)/ntsc/sms_ntsc.c \
$(GENPLUS_SRC_DIR)/sound/Fir_Resampler.c \
$(GENPLUS_SRC_DIR)/sound/eq.c \
$(GENPLUS_SRC_DIR)/sound/sound.c \
$(GENPLUS_SRC_DIR)/sound/ym2612.c \
$(GENPLUS_SRC_DIR)/sound/ym2413.c \
$(GENPLUS_SRC_DIR)/sound/sn76489.c \
$(GENPLUS_SRC_DIR)/sound/blip.c \
$(GENPLUS_SRC_DIR)/z80/z80.c \
$(GENPLUS_SRC_DIR)/m68k/m68kcpu.c \
$(LIBRETRO_DIR)/libretro.c
LOCAL_C_INCLUDES = $(LOCAL_PATH)/$(GENPLUS_SRC_DIR) \
$(LOCAL_PATH)/$(GENPLUS_SRC_DIR)/sound \
$(LOCAL_PATH)/$(GENPLUS_SRC_DIR)/input_hw \
$(LOCAL_PATH)/$(GENPLUS_SRC_DIR)/cart_hw \
$(LOCAL_PATH)/$(GENPLUS_SRC_DIR)/cart_hw/svp \
$(LOCAL_PATH)/$(GENPLUS_SRC_DIR)/m68k \
$(LOCAL_PATH)/$(GENPLUS_SRC_DIR)/z80 \
$(LOCAL_PATH)/$(GENPLUS_SRC_DIR)/ntsc \
$(LOCAL_PATH)/$(LIBRETRO_DIR)
LOCAL_CFLAGS = -DINLINE=inline -DUSE_15BPP_RENDERING -DLSB_FIRST -D__LIBRETRO__
include $(BUILD_SHARED_LIBRARY)

1080
libretro/libretro.c Normal file

File diff suppressed because it is too large Load Diff

333
libretro/libretro.h Executable file
View File

@ -0,0 +1,333 @@
#ifndef LIBRETRO_H__
#define LIBRETRO_H__
#include <stdint.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#else
#if defined(_MSC_VER) && !defined(__cplusplus)
#define bool unsigned char
#define true 1
#define false 0
#else
#include <stdbool.h>
#endif
#endif
#define RETRO_API_VERSION 1
#define RETRO_DEVICE_MASK 0xff
#define RETRO_DEVICE_NONE 0
#define RETRO_DEVICE_JOYPAD 1
#define RETRO_DEVICE_MOUSE 2
#define RETRO_DEVICE_KEYBOARD 3
#define RETRO_DEVICE_LIGHTGUN 4
#define RETRO_DEVICE_ANALOG 5
#define RETRO_DEVICE_JOYPAD_MULTITAP ((1 << 8) | RETRO_DEVICE_JOYPAD)
#define RETRO_DEVICE_LIGHTGUN_SUPER_SCOPE ((1 << 8) | RETRO_DEVICE_LIGHTGUN)
#define RETRO_DEVICE_LIGHTGUN_JUSTIFIER ((2 << 8) | RETRO_DEVICE_LIGHTGUN)
#define RETRO_DEVICE_LIGHTGUN_JUSTIFIERS ((3 << 8) | RETRO_DEVICE_LIGHTGUN)
#define RETRO_DEVICE_ID_JOYPAD_B 0
#define RETRO_DEVICE_ID_JOYPAD_Y 1
#define RETRO_DEVICE_ID_JOYPAD_SELECT 2
#define RETRO_DEVICE_ID_JOYPAD_START 3
#define RETRO_DEVICE_ID_JOYPAD_UP 4
#define RETRO_DEVICE_ID_JOYPAD_DOWN 5
#define RETRO_DEVICE_ID_JOYPAD_LEFT 6
#define RETRO_DEVICE_ID_JOYPAD_RIGHT 7
#define RETRO_DEVICE_ID_JOYPAD_A 8
#define RETRO_DEVICE_ID_JOYPAD_X 9
#define RETRO_DEVICE_ID_JOYPAD_L 10
#define RETRO_DEVICE_ID_JOYPAD_R 11
#define RETRO_DEVICE_ID_JOYPAD_L2 12
#define RETRO_DEVICE_ID_JOYPAD_R2 13
#define RETRO_DEVICE_ID_JOYPAD_L3 14
#define RETRO_DEVICE_ID_JOYPAD_R3 15
#define RETRO_DEVICE_INDEX_ANALOG_LEFT 0
#define RETRO_DEVICE_INDEX_ANALOG_RIGHT 1
#define RETRO_DEVICE_ID_ANALOG_X 0
#define RETRO_DEVICE_ID_ANALOG_Y 1
#define RETRO_DEVICE_ID_MOUSE_X 0
#define RETRO_DEVICE_ID_MOUSE_Y 1
#define RETRO_DEVICE_ID_MOUSE_LEFT 2
#define RETRO_DEVICE_ID_MOUSE_RIGHT 3
#define RETRO_DEVICE_ID_LIGHTGUN_X 0
#define RETRO_DEVICE_ID_LIGHTGUN_Y 1
#define RETRO_DEVICE_ID_LIGHTGUN_TRIGGER 2
#define RETRO_DEVICE_ID_LIGHTGUN_CURSOR 3
#define RETRO_DEVICE_ID_LIGHTGUN_TURBO 4
#define RETRO_DEVICE_ID_LIGHTGUN_PAUSE 5
#define RETRO_DEVICE_ID_LIGHTGUN_START 6
#define RETRO_REGION_NTSC 0
#define RETRO_REGION_PAL 1
#define RETRO_MEMORY_MASK 0xff
#define RETRO_MEMORY_SAVE_RAM 0
#define RETRO_MEMORY_RTC 1
#define RETRO_MEMORY_SYSTEM_RAM 2
#define RETRO_MEMORY_VIDEO_RAM 3
#define RETRO_MEMORY_SNES_BSX_RAM ((1 << 8) | RETRO_MEMORY_SAVE_RAM)
#define RETRO_MEMORY_SNES_BSX_PRAM ((2 << 8) | RETRO_MEMORY_SAVE_RAM)
#define RETRO_MEMORY_SNES_SUFAMI_TURBO_A_RAM ((3 << 8) | RETRO_MEMORY_SAVE_RAM)
#define RETRO_MEMORY_SNES_SUFAMI_TURBO_B_RAM ((4 << 8) | RETRO_MEMORY_SAVE_RAM)
#define RETRO_MEMORY_SNES_GAME_BOY_RAM ((5 << 8) | RETRO_MEMORY_SAVE_RAM)
#define RETRO_MEMORY_SNES_GAME_BOY_RTC ((6 << 8) | RETRO_MEMORY_RTC)
#define RETRO_GAME_TYPE_BSX 0x101
#define RETRO_GAME_TYPE_BSX_SLOTTED 0x102
#define RETRO_GAME_TYPE_SUFAMI_TURBO 0x103
#define RETRO_GAME_TYPE_SUPER_GAME_BOY 0x104
// Environment commands.
#define RETRO_ENVIRONMENT_SET_ROTATION 1 // const unsigned * --
// Sets screen rotation of graphics.
// Is only implemented if rotation can be accelerated by hardware.
// Valid values are 0, 1, 2, 3, which rotates screen by 0, 90, 180, 270 degrees
// counter-clockwise respectively.
//
#define RETRO_ENVIRONMENT_GET_OVERSCAN 2 // bool * --
// Boolean value whether or not the implementation should use overscan, or crop away overscan.
//
#define RETRO_ENVIRONMENT_GET_CAN_DUPE 3 // bool * --
// Boolean value whether or not RetroArch supports frame duping,
// passing NULL to video frame callback.
//
#define RETRO_ENVIRONMENT_GET_VARIABLE 4 // struct retro_variable * --
// Interface to aquire user-defined information from environment
// that cannot feasibly be supported in a multi-system way.
// Mostly used for obscure,
// specific features that the user can tap into when neseccary.
//
#define RETRO_ENVIRONMENT_SET_VARIABLES 5 // const struct retro_variable * --
// Allows an implementation to signal the environment
// which variables it might want to check for later using GET_VARIABLE.
// 'data' points to an array of retro_variable structs terminated by a { NULL, NULL } element.
// retro_variable::value should contain a human readable description of the key.
//
#define RETRO_ENVIRONMENT_SET_MESSAGE 6 // const struct retro_message * --
// Sets a message to be displayed in implementation-specific manner for a certain amount of 'frames'.
// Should not be used for trivial messages, which should simply be logged to stderr.
#define RETRO_ENVIRONMENT_SHUTDOWN 7 // N/A (NULL) --
// Requests the frontend to shutdown.
// Should only be used if game has a specific
// way to shutdown the game from a menu item or similar.
//
#define RETRO_ENVIRONMENT_SET_PERFORMANCE_LEVEL 8
// const unsigned * --
// Gives a hint to the frontend how demanding this implementation
// is on a system. E.g. reporting a level of 2 means
// this implementation should run decently on all frontends
// of level 2 and up.
//
// It can be used by the frontend to potentially warn
// about too demanding implementations.
//
// The levels are "floating", but roughly defined as:
// 1: Low-powered devices such as Raspberry Pi, smart phones, tablets, etc.
// 2: Medium-spec consoles, such as PS3/360, with sub-par CPUs.
// 3: Modern desktop/laptops with reasonably powerful CPUs.
// 4: High-end desktops with very powerful CPUs.
//
// This function can be called on a per-game basis,
// as certain games an implementation can play might be
// particularily demanding.
// If called, it should be called in retro_load_game().
//
#define RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY 9
// const char ** --
// Returns the "system" directory of the frontend.
// This directory can be used to store system specific ROMs such as BIOSes, configuration data, etc.
// The returned value can be NULL.
// If so, no such directory is defined,
// and it's up to the implementation to find a suitable directory.
//
#define RETRO_ENVIRONMENT_SET_PIXEL_FORMAT 10
// const enum retro_pixel_format * --
// Sets the internal pixel format used by the implementation.
// The default pixel format is RETRO_PIXEL_FORMAT_XRGB1555.
// If the call returns false, the frontend does not support this pixel format.
// This function should be called inside retro_load_game() or retro_get_system_av_info().
enum retro_pixel_format
{
RETRO_PIXEL_FORMAT_0RGB1555 = 0, // 0RGB1555, native endian. 0 bit must be set to 0.
RETRO_PIXEL_FORMAT_XRGB8888 // XRGB8888, native endian. X bits are ignored.
};
struct retro_message
{
const char *msg; // Message to be displayed.
unsigned frames; // Duration in frames of message.
};
struct retro_system_info
{
const char *library_name; // Descriptive name of library. Should not contain any version numbers, etc.
const char *library_version; // Descriptive version of core.
const char *valid_extensions; // A string listing probably rom extensions the core will be able to load, separated with pipe.
// I.e. "bin|rom|iso".
// Typically used for a GUI to filter out extensions.
bool need_fullpath; // If true, retro_load_game() is guaranteed to provide a valid pathname in retro_game_info::path.
// ::data and ::size are both invalid.
// If false, ::data and ::size are guaranteed to be valid, but ::path might not be valid.
// This is typically set to true for libretro implementations that must load from file.
// Implementations should strive for setting this to false, as it allows the frontend to perform patching, etc.
bool block_extract; // If true, the frontend is not allowed to extract any archives before loading the real ROM.
// Necessary for certain libretro implementations that load games from zipped archives.
};
struct retro_game_geometry
{
unsigned base_width; // Nominal video width of game.
unsigned base_height; // Nominal video height of game.
unsigned max_width; // Maximum possible width of game.
unsigned max_height; // Maximum possible height of game.
float aspect_ratio; // Nominal aspect ratio of game. If aspect_ratio is <= 0.0,
// an aspect ratio of base_width / base_height is assumed.
// A frontend could override this setting if desired.
};
struct retro_system_timing
{
double fps; // FPS of video content.
double sample_rate; // Sampling rate of audio.
};
struct retro_system_av_info
{
struct retro_game_geometry geometry;
struct retro_system_timing timing;
};
struct retro_variable
{
const char *key; // Variable to query in RETRO_ENVIRONMENT_GET_VARIABLE.
// If NULL, obtains the complete environment string if more complex parsing is necessary.
// The environment string is formatted as key-value pairs delimited by semicolons as so:
// "key1=value1;key2=value2;..."
const char *value; // Value to be obtained. If key does not exist, it is set to NULL.
};
struct retro_game_info
{
const char *path; // Path to game, UTF-8 encoded. Usually used as a reference.
// May be NULL if rom was loaded from stdin or similar.
// retro_system_info::need_fullpath guaranteed that this path is valid.
const void *data; // Memory buffer of loaded game. Will be NULL if need_fullpath was set.
size_t size; // Size of memory buffer.
const char *meta; // String of implementation specific meta-data.
};
// Callbacks
//
// Environment callback. Gives implementations a way of performing uncommon tasks. Extensible.
typedef bool (*retro_environment_t)(unsigned cmd, void *data);
// Render a frame. Pixel format is 15-bit 0RGB1555 native endian unless changed (see RETRO_ENVIRONMENT_SET_PIXEL_FORMAT).
// Width and height specify dimensions of buffer.
// Pitch specifices length in bytes between two lines in buffer.
typedef void (*retro_video_refresh_t)(const void *data, unsigned width, unsigned height, size_t pitch);
// Renders a single audio frame. Should only be used if implementation generates a single sample at a time.
// Format is signed 16-bit native endian.
typedef void (*retro_audio_sample_t)(int16_t left, int16_t right);
// Renders multiple audio frames in one go. One frame is defined as a sample of left and right channels, interleaved.
// I.e. int16_t buf[4] = { l, r, l, r }; would be 2 frames.
// Only one of the audio callbacks must ever be used.
typedef size_t (*retro_audio_sample_batch_t)(const int16_t *data, size_t frames);
// Polls input.
typedef void (*retro_input_poll_t)(void);
// Queries for input for player 'port'. device will be masked with RETRO_DEVICE_MASK.
// Specialization of devices such as RETRO_DEVICE_JOYPAD_MULTITAP that have been set with retro_set_controller_port_device()
// will still use the higher level RETRO_DEVICE_JOYPAD to request input.
typedef int16_t (*retro_input_state_t)(unsigned port, unsigned device, unsigned index, unsigned id);
// Sets callbacks. retro_set_environment() is guaranteed to be called before retro_init().
// The rest of the set_* functions are guaranteed to have been called before the first call to retro_run() is made.
void retro_set_environment(retro_environment_t);
void retro_set_video_refresh(retro_video_refresh_t);
void retro_set_audio_sample(retro_audio_sample_t);
void retro_set_audio_sample_batch(retro_audio_sample_batch_t);
void retro_set_input_poll(retro_input_poll_t);
void retro_set_input_state(retro_input_state_t);
// Library global initialization/deinitialization.
void retro_init(void);
void retro_deinit(void);
// Must return RETRO_API_VERSION. Used to validate ABI compatibility when the API is revised.
unsigned retro_api_version(void);
// Gets statically known system info. Pointers provided in *info must be statically allocated.
// Can be called at any time, even before retro_init().
void retro_get_system_info(struct retro_system_info *info);
// Gets information about system audio/video timings and geometry.
// Can be called only after retro_load_game() has successfully completed.
void retro_get_system_av_info(struct retro_system_av_info *info);
// Sets device to be used for player 'port'.
void retro_set_controller_port_device(unsigned port, unsigned device);
// Resets the current game.
void retro_reset(void);
// Runs the game for one video frame.
// During retro_run(), input_poll callback must be called at least once.
//
// If a frame is not rendered for reasons where a game "dropped" a frame,
// this still counts as a frame, and retro_run() should explicitly dupe a frame if GET_CAN_DUPE returns true.
// In this case, the video callback can take a NULL argument for data.
void retro_run(void);
// Returns the amount of data the implementation requires to serialize internal state (save states).
// Beetween calls to retro_load_game() and retro_unload_game(), the returned size is never allowed to be larger than a previous returned value, to
// ensure that the frontend can allocate a save state buffer once.
size_t retro_serialize_size(void);
// Serializes internal state. If failed, or size is lower than retro_serialize_size(), it should return false, true otherwise.
bool retro_serialize(void *data, size_t size);
bool retro_unserialize(const void *data, size_t size);
void retro_cheat_reset(void);
void retro_cheat_set(unsigned index, bool enabled, const char *code);
// Loads a game.
bool retro_load_game(const struct retro_game_info *game);
// Loads a "special" kind of game. Should not be used except in extreme cases.
bool retro_load_game_special(
unsigned game_type,
const struct retro_game_info *info, size_t num_info
);
// Unloads a currently loaded game.
void retro_unload_game(void);
// Gets region of game.
unsigned retro_get_region(void);
// Gets region of memory.
void *retro_get_memory_data(unsigned id);
size_t retro_get_memory_size(unsigned id);
#ifdef __cplusplus
}
#endif
#endif

5
libretro/link.T Normal file
View File

@ -0,0 +1,5 @@
{
global: retro_*;
local: *;
};

View File

@ -0,0 +1,30 @@
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "msvc-2003-xbox1", "msvc-2003-xbox1/msvc-2003-xbox1.vcproj", "{C0C3EF9B-2D9B-44D1-A83F-3617D8BA3421}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
Profile = Profile
Profile_FastCap = Profile_FastCap
Release = Release
Release_LTCG = Release_LTCG
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{C0C3EF9B-2D9B-44D1-A83F-3617D8BA3421}.Debug.ActiveCfg = Debug|Xbox
{C0C3EF9B-2D9B-44D1-A83F-3617D8BA3421}.Debug.Build.0 = Debug|Xbox
{C0C3EF9B-2D9B-44D1-A83F-3617D8BA3421}.Profile.ActiveCfg = Profile|Xbox
{C0C3EF9B-2D9B-44D1-A83F-3617D8BA3421}.Profile.Build.0 = Profile|Xbox
{C0C3EF9B-2D9B-44D1-A83F-3617D8BA3421}.Profile_FastCap.ActiveCfg = Profile_FastCap|Xbox
{C0C3EF9B-2D9B-44D1-A83F-3617D8BA3421}.Profile_FastCap.Build.0 = Profile_FastCap|Xbox
{C0C3EF9B-2D9B-44D1-A83F-3617D8BA3421}.Release.ActiveCfg = Release|Xbox
{C0C3EF9B-2D9B-44D1-A83F-3617D8BA3421}.Release.Build.0 = Release|Xbox
{C0C3EF9B-2D9B-44D1-A83F-3617D8BA3421}.Release_LTCG.ActiveCfg = Release_LTCG|Xbox
{C0C3EF9B-2D9B-44D1-A83F-3617D8BA3421}.Release_LTCG.Build.0 = Release_LTCG|Xbox
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,453 @@
<?xml version="1.0" encoding="windows-1250"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="msvc-2003-xbox1"
ProjectGUID="{C0C3EF9B-2D9B-44D1-A83F-3617D8BA3421}"
RootNamespace="msvc-2003-xbox1"
Keyword="XboxProj">
<Platforms>
<Platform
Name="Xbox"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Xbox"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
ConfigurationType="4"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\..\source&quot;;&quot;$(SolutionDir)\..\..\source\cd_hw&quot;;&quot;$(SolutionDir)\..\..\source\cart_hw&quot;;&quot;$(SolutionDir)\..\..\source\sound&quot;;&quot;$(SolutionDir)\..\..\source\z80&quot;;&quot;$(SolutionDir)\..\..\&quot;;&quot;$(SolutionDir)&quot;;&quot;$(SolutionDir)\..\..\source\m68k&quot;;&quot;$(SolutionDir)\..\..\source\input_hw&quot;;&quot;$(SolutionDir)\..\..\source\cart_hw\svp&quot;;&quot;$(SolutionDir)\..\..\source\ntsc&quot;;&quot;$(SolutionDir)\..\..\libretro&quot;;&quot;$(SolutionDir)\msvc-2003-xbox1&quot;"
PreprocessorDefinitions="_DEBUG;_XBOX;_XBOX1;_LIB;__LIBRETRO__;LSB_FIRST;USE_15BPP_RENDERING;INLINE=static _inline;__restrict="
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="1"
UsePrecompiledHeader="0"
PrecompiledHeaderFile="$(OutDir)/$(ProjectName).pch"
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="4"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)/libretro_xdk.lib"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
</Configuration>
<Configuration
Name="Profile|Xbox"
OutputDirectory="Profile"
IntermediateDirectory="Profile"
ConfigurationType="4"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="3"
OmitFramePointers="TRUE"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\..\source&quot;;&quot;$(SolutionDir)\..\..\source\cd_hw&quot;;&quot;$(SolutionDir)\..\..\source\cart_hw&quot;;&quot;$(SolutionDir)\..\..\source\sound&quot;;&quot;$(SolutionDir)\..\..\source\z80&quot;;&quot;$(SolutionDir)\..\..\&quot;;&quot;$(SolutionDir)&quot;;&quot;$(SolutionDir)\..\..\source\m68k&quot;;&quot;$(SolutionDir)\..\..\source\input_hw&quot;;&quot;$(SolutionDir)\..\..\source\cart_hw\svp&quot;;&quot;$(SolutionDir)\..\..\source\ntsc&quot;;&quot;$(SolutionDir)\..\..\libretro&quot;;&quot;$(SolutionDir)\msvc-2003-xbox1&quot;"
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;PROFILE;_LIB;__LIBRETRO__;LSB_FIRST;USE_15BPP_RENDERING;INLINE=static _inline;__restrict="
StringPooling="TRUE"
RuntimeLibrary="0"
BufferSecurityCheck="TRUE"
EnableFunctionLevelLinking="TRUE"
EnableEnhancedInstructionSet="1"
UsePrecompiledHeader="0"
PrecompiledHeaderFile="$(OutDir)/$(ProjectName).pch"
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)/libretro_xdk.lib"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
</Configuration>
<Configuration
Name="Profile_FastCap|Xbox"
OutputDirectory="Profile_FastCap"
IntermediateDirectory="Profile_FastCap"
ConfigurationType="4"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="3"
OmitFramePointers="TRUE"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\..\source&quot;;&quot;$(SolutionDir)\..\..\source\cd_hw&quot;;&quot;$(SolutionDir)\..\..\source\cart_hw&quot;;&quot;$(SolutionDir)\..\..\source\sound&quot;;&quot;$(SolutionDir)\..\..\source\z80&quot;;&quot;$(SolutionDir)\..\..\&quot;;&quot;$(SolutionDir)&quot;;&quot;$(SolutionDir)\..\..\source\m68k&quot;;&quot;$(SolutionDir)\..\..\source\input_hw&quot;;&quot;$(SolutionDir)\..\..\source\cart_hw\svp&quot;;&quot;$(SolutionDir)\..\..\source\ntsc&quot;;&quot;$(SolutionDir)\..\..\libretro&quot;;&quot;$(SolutionDir)\msvc-2003-xbox1&quot;"
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;PROFILE;FASTCAP;_LIB;__LIBRETRO__;LSB_FIRST;USE_15BPP_RENDERING;INLINE=static _inline;__restrict="
StringPooling="TRUE"
RuntimeLibrary="0"
BufferSecurityCheck="TRUE"
EnableFunctionLevelLinking="TRUE"
EnableEnhancedInstructionSet="1"
UsePrecompiledHeader="0"
PrecompiledHeaderFile="$(OutDir)/$(ProjectName).pch"
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="3"
FastCAP="TRUE"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)/libretro_xdk.lib"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
</Configuration>
<Configuration
Name="Release|Xbox"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="4"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="3"
OmitFramePointers="TRUE"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\..\source&quot;;&quot;$(SolutionDir)\..\..\source\cd_hw&quot;;&quot;$(SolutionDir)\..\..\source\cart_hw&quot;;&quot;$(SolutionDir)\..\..\source\sound&quot;;&quot;$(SolutionDir)\..\..\source\z80&quot;;&quot;$(SolutionDir)\..\..\&quot;;&quot;$(SolutionDir)&quot;;&quot;$(SolutionDir)\..\..\source\m68k&quot;;&quot;$(SolutionDir)\..\..\source\input_hw&quot;;&quot;$(SolutionDir)\..\..\source\cart_hw\svp&quot;;&quot;$(SolutionDir)\..\..\source\ntsc&quot;;&quot;$(SolutionDir)\..\..\libretro&quot;;&quot;$(SolutionDir)\msvc-2003-xbox1&quot;"
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;_LIB;__LIBRETRO__;LSB_FIRST;USE_15BPP_RENDERING;INLINE=static _inline;__restrict="
StringPooling="TRUE"
RuntimeLibrary="0"
BufferSecurityCheck="TRUE"
EnableFunctionLevelLinking="TRUE"
EnableEnhancedInstructionSet="1"
UsePrecompiledHeader="0"
PrecompiledHeaderFile="$(OutDir)/$(ProjectName).pch"
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)/libretro_xdk.lib"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
</Configuration>
<Configuration
Name="Release_LTCG|Xbox"
OutputDirectory="Release_LTCG"
IntermediateDirectory="Release_LTCG"
ConfigurationType="4"
CharacterSet="2"
WholeProgramOptimization="TRUE">
<Tool
Name="VCCLCompilerTool"
Optimization="3"
OmitFramePointers="TRUE"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\..\source&quot;;&quot;$(SolutionDir)\..\..\source\cd_hw&quot;;&quot;$(SolutionDir)\..\..\source\cart_hw&quot;;&quot;$(SolutionDir)\..\..\source\sound&quot;;&quot;$(SolutionDir)\..\..\source\z80&quot;;&quot;$(SolutionDir)\..\..\&quot;;&quot;$(SolutionDir)&quot;;&quot;$(SolutionDir)\..\..\source\m68k&quot;;&quot;$(SolutionDir)\..\..\source\input_hw&quot;;&quot;$(SolutionDir)\..\..\source\cart_hw\svp&quot;;&quot;$(SolutionDir)\..\..\source\ntsc&quot;;&quot;$(SolutionDir)\..\..\libretro&quot;;&quot;$(SolutionDir)\msvc-2003-xbox1&quot;"
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;LTCG;_LIB;__LIBRETRO__;LSB_FIRST;USE_15BPP_RENDERING;INLINE=static _inline;__restrict="
StringPooling="TRUE"
RuntimeLibrary="0"
BufferSecurityCheck="TRUE"
EnableFunctionLevelLinking="TRUE"
EnableEnhancedInstructionSet="1"
UsePrecompiledHeader="0"
PrecompiledHeaderFile="$(OutDir)/$(ProjectName).pch"
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)/libretro_xdk.lib"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
<Filter
Name="libretro"
Filter="">
<File
RelativePath="..\..\libretro.c">
</File>
</Filter>
<Filter
Name="source"
Filter="">
<File
RelativePath="..\..\..\source\genesis.c">
</File>
<File
RelativePath="..\..\..\source\io_ctrl.c">
</File>
<File
RelativePath="..\..\..\source\loadrom.c">
</File>
<File
RelativePath="..\..\..\source\mem68k.c">
</File>
<File
RelativePath="..\..\..\source\membnk.c">
</File>
<File
RelativePath="..\..\..\source\memz80.c">
</File>
<File
RelativePath="..\..\..\source\state.c">
</File>
<File
RelativePath="..\..\..\source\system.c">
</File>
<File
RelativePath="..\..\..\source\vdp_ctrl.c">
</File>
<File
RelativePath="..\..\..\source\vdp_render.c">
</File>
<Filter
Name="cd_hw"
Filter="">
<File
RelativePath="..\..\..\source\cd_hw\cd_cart.c">
</File>
<File
RelativePath="..\..\..\source\cd_hw\cdc.c">
</File>
<File
RelativePath="..\..\..\source\cd_hw\cdd.c">
</File>
<File
RelativePath="..\..\..\source\cd_hw\gfx.c">
</File>
<File
RelativePath="..\..\..\source\cd_hw\pcm.c">
</File>
<File
RelativePath="..\..\..\source\cd_hw\scd.c">
</File>
</Filter>
<Filter
Name="cart_hw"
Filter="">
<File
RelativePath="..\..\..\source\cart_hw\areplay.c">
</File>
<File
RelativePath="..\..\..\source\cart_hw\gg_eeprom.c">
</File>
<File
RelativePath="..\..\..\source\cart_hw\ggenie.c">
</File>
<File
RelativePath="..\..\..\source\cart_hw\md_cart.c">
</File>
<File
RelativePath="..\..\..\source\cart_hw\md_eeprom.c">
</File>
<File
RelativePath="..\..\..\source\cart_hw\sms_cart.c">
</File>
<File
RelativePath="..\..\..\source\cart_hw\sram.c">
</File>
<Filter
Name="svp"
Filter="">
<File
RelativePath="..\..\..\source\cart_hw\svp\ssp16.c">
</File>
<File
RelativePath="..\..\..\source\cart_hw\svp\svp.c">
</File>
</Filter>
</Filter>
<Filter
Name="sound"
Filter="">
<File
RelativePath="..\..\..\source\sound\blip.c">
</File>
<File
RelativePath="..\..\..\source\sound\eq.c">
</File>
<File
RelativePath="..\..\..\source\sound\Fir_Resampler.c">
</File>
<File
RelativePath="..\..\..\source\sound\sn76489.c">
</File>
<File
RelativePath="..\..\..\source\sound\sound.c">
</File>
<File
RelativePath="..\..\..\source\sound\ym2413.c">
</File>
<File
RelativePath="..\..\..\source\sound\ym2612.c">
</File>
</Filter>
<Filter
Name="z80"
Filter="">
<File
RelativePath="..\..\..\source\z80\z80.c">
</File>
</Filter>
<Filter
Name="input_hw"
Filter="">
<File
RelativePath="..\..\..\source\input_hw\activator.c">
</File>
<File
RelativePath="..\..\..\source\input_hw\gamepad.c">
</File>
<File
RelativePath="..\..\..\source\input_hw\input.c">
</File>
<File
RelativePath="..\..\..\source\input_hw\lightgun.c">
</File>
<File
RelativePath="..\..\..\source\input_hw\mouse.c">
</File>
<File
RelativePath="..\..\..\source\input_hw\paddle.c">
</File>
<File
RelativePath="..\..\..\source\input_hw\sportspad.c">
</File>
<File
RelativePath="..\..\..\source\input_hw\teamplayer.c">
</File>
<File
RelativePath="..\..\..\source\input_hw\terebi_oekaki.c">
</File>
<File
RelativePath="..\..\..\source\input_hw\xe_a1p.c">
</File>
</Filter>
<Filter
Name="ntsc"
Filter="">
<File
RelativePath="..\..\..\source\ntsc\md_ntsc.c">
</File>
<File
RelativePath="..\..\..\source\ntsc\sms_ntsc.c">
</File>
</Filter>
<Filter
Name="m68k"
Filter="">
<File
RelativePath="..\..\..\source\m68k\m68kcpu.c">
<FileConfiguration
Name="Debug|Xbox">
<Tool
Name="VCCLCompilerTool"
CompileAs="1"/>
</FileConfiguration>
<FileConfiguration
Name="Profile|Xbox">
<Tool
Name="VCCLCompilerTool"
CompileAs="1"/>
</FileConfiguration>
<FileConfiguration
Name="Profile_FastCap|Xbox">
<Tool
Name="VCCLCompilerTool"
CompileAs="1"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Xbox">
<Tool
Name="VCCLCompilerTool"
CompileAs="1"/>
</FileConfiguration>
<FileConfiguration
Name="Release_LTCG|Xbox">
<Tool
Name="VCCLCompilerTool"
CompileAs="1"/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\..\source\m68k\s68kcpu.c">
<FileConfiguration
Name="Debug|Xbox">
<Tool
Name="VCCLCompilerTool"
CompileAs="1"/>
</FileConfiguration>
<FileConfiguration
Name="Profile|Xbox">
<Tool
Name="VCCLCompilerTool"
CompileAs="1"/>
</FileConfiguration>
<FileConfiguration
Name="Profile_FastCap|Xbox">
<Tool
Name="VCCLCompilerTool"
CompileAs="1"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Xbox">
<Tool
Name="VCCLCompilerTool"
CompileAs="1"/>
</FileConfiguration>
<FileConfiguration
Name="Release_LTCG|Xbox">
<Tool
Name="VCCLCompilerTool"
CompileAs="1"/>
</FileConfiguration>
</File>
</Filter>
</Filter>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
</Filter>
<File
RelativePath=".\ReadMe.txt">
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -0,0 +1,249 @@
// ISO C9x compliant stdint.h for Microsoft Visual Studio
// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
//
// Copyright (c) 2006-2008 Alexander Chemeris
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form 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.
//
// 3. The name of the author may be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 __RARCH_STDINT_H
#define __RARCH_STDINT_H
#if _MSC_VER && (_MSC_VER < 1600)
//pre-MSVC 2010 needs an implementation of stdint.h
#if _MSC_VER > 1000
#pragma once
#endif
#include <limits.h>
// For Visual Studio 6 in C++ mode and for many Visual Studio versions when
// compiling for ARM we should wrap <wchar.h> include with 'extern "C++" {}'
// or compiler give many errors like this:
// error C2733: second C linkage of overloaded function 'wmemchr' not allowed
#ifdef __cplusplus
extern "C" {
#endif
# include <wchar.h>
#ifdef __cplusplus
}
#endif
// Define _W64 macros to mark types changing their size, like intptr_t.
#ifndef _W64
# if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
# define _W64 __w64
# else
# define _W64
# endif
#endif
// 7.18.1 Integer types
// 7.18.1.1 Exact-width integer types
// Visual Studio 6 and Embedded Visual C++ 4 doesn't
// realize that, e.g. char has the same size as __int8
// so we give up on __intX for them.
#if (_MSC_VER < 1300)
typedef signed char int8_t;
typedef signed short int16_t;
typedef signed int int32_t;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
#else
typedef signed __int8 int8_t;
typedef signed __int16 int16_t;
typedef signed __int32 int32_t;
typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t;
#endif
typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
// 7.18.1.2 Minimum-width integer types
typedef int8_t int_least8_t;
typedef int16_t int_least16_t;
typedef int32_t int_least32_t;
typedef int64_t int_least64_t;
typedef uint8_t uint_least8_t;
typedef uint16_t uint_least16_t;
typedef uint32_t uint_least32_t;
typedef uint64_t uint_least64_t;
// 7.18.1.3 Fastest minimum-width integer types
typedef int8_t int_fast8_t;
typedef int16_t int_fast16_t;
typedef int32_t int_fast32_t;
typedef int64_t int_fast64_t;
typedef uint8_t uint_fast8_t;
typedef uint16_t uint_fast16_t;
typedef uint32_t uint_fast32_t;
typedef uint64_t uint_fast64_t;
// 7.18.1.4 Integer types capable of holding object pointers
#ifdef _WIN64 // [
typedef signed __int64 intptr_t;
typedef unsigned __int64 uintptr_t;
#else // _WIN64 ][
typedef _W64 signed int intptr_t;
typedef _W64 unsigned int uintptr_t;
#endif // _WIN64 ]
// 7.18.1.5 Greatest-width integer types
typedef int64_t intmax_t;
typedef uint64_t uintmax_t;
// 7.18.2 Limits of specified-width integer types
#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259
// 7.18.2.1 Limits of exact-width integer types
#define INT8_MIN ((int8_t)_I8_MIN)
#define INT8_MAX _I8_MAX
#define INT16_MIN ((int16_t)_I16_MIN)
#define INT16_MAX _I16_MAX
#define INT32_MIN ((int32_t)_I32_MIN)
#define INT32_MAX _I32_MAX
#define INT64_MIN ((int64_t)_I64_MIN)
#define INT64_MAX _I64_MAX
#define UINT8_MAX _UI8_MAX
#define UINT16_MAX _UI16_MAX
#define UINT32_MAX _UI32_MAX
#define UINT64_MAX _UI64_MAX
// 7.18.2.2 Limits of minimum-width integer types
#define INT_LEAST8_MIN INT8_MIN
#define INT_LEAST8_MAX INT8_MAX
#define INT_LEAST16_MIN INT16_MIN
#define INT_LEAST16_MAX INT16_MAX
#define INT_LEAST32_MIN INT32_MIN
#define INT_LEAST32_MAX INT32_MAX
#define INT_LEAST64_MIN INT64_MIN
#define INT_LEAST64_MAX INT64_MAX
#define UINT_LEAST8_MAX UINT8_MAX
#define UINT_LEAST16_MAX UINT16_MAX
#define UINT_LEAST32_MAX UINT32_MAX
#define UINT_LEAST64_MAX UINT64_MAX
// 7.18.2.3 Limits of fastest minimum-width integer types
#define INT_FAST8_MIN INT8_MIN
#define INT_FAST8_MAX INT8_MAX
#define INT_FAST16_MIN INT16_MIN
#define INT_FAST16_MAX INT16_MAX
#define INT_FAST32_MIN INT32_MIN
#define INT_FAST32_MAX INT32_MAX
#define INT_FAST64_MIN INT64_MIN
#define INT_FAST64_MAX INT64_MAX
#define UINT_FAST8_MAX UINT8_MAX
#define UINT_FAST16_MAX UINT16_MAX
#define UINT_FAST32_MAX UINT32_MAX
#define UINT_FAST64_MAX UINT64_MAX
// 7.18.2.4 Limits of integer types capable of holding object pointers
#ifdef _WIN64 // [
# define INTPTR_MIN INT64_MIN
# define INTPTR_MAX INT64_MAX
# define UINTPTR_MAX UINT64_MAX
#else // _WIN64 ][
# define INTPTR_MIN INT32_MIN
# define INTPTR_MAX INT32_MAX
# define UINTPTR_MAX UINT32_MAX
#endif // _WIN64 ]
// 7.18.2.5 Limits of greatest-width integer types
#define INTMAX_MIN INT64_MIN
#define INTMAX_MAX INT64_MAX
#define UINTMAX_MAX UINT64_MAX
// 7.18.3 Limits of other integer types
#ifdef _WIN64 // [
# define PTRDIFF_MIN _I64_MIN
# define PTRDIFF_MAX _I64_MAX
#else // _WIN64 ][
# define PTRDIFF_MIN _I32_MIN
# define PTRDIFF_MAX _I32_MAX
#endif // _WIN64 ]
#define SIG_ATOMIC_MIN INT_MIN
#define SIG_ATOMIC_MAX INT_MAX
#ifndef SIZE_MAX // [
# ifdef _WIN64 // [
# define SIZE_MAX _UI64_MAX
# else // _WIN64 ][
# define SIZE_MAX _UI32_MAX
# endif // _WIN64 ]
#endif // SIZE_MAX ]
// WCHAR_MIN and WCHAR_MAX are also defined in <wchar.h>
#ifndef WCHAR_MIN // [
# define WCHAR_MIN 0
#endif // WCHAR_MIN ]
#ifndef WCHAR_MAX // [
# define WCHAR_MAX _UI16_MAX
#endif // WCHAR_MAX ]
#define WINT_MIN 0
#define WINT_MAX _UI16_MAX
#endif // __STDC_LIMIT_MACROS ]
// 7.18.4 Limits of other integer types
#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260
// 7.18.4.1 Macros for minimum-width integer constants
#define INT8_C(val) val##i8
#define INT16_C(val) val##i16
#define INT32_C(val) val##i32
#define INT64_C(val) val##i64
#define UINT8_C(val) val##ui8
#define UINT16_C(val) val##ui16
#define UINT32_C(val) val##ui32
#define UINT64_C(val) val##ui64
// 7.18.4.2 Macros for greatest-width integer constants
#define INTMAX_C INT64_C
#define UINTMAX_C UINT64_C
#endif // __STDC_CONSTANT_MACROS ]
#else
//sanity for everything else
#include <stdint.h>
#endif
#endif

View File

@ -0,0 +1,32 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genesis-next-msvc-2010-360", "msvc-2010-360/msvc-2010-360.vcxproj", "{00CE82EC-E948-4BB6-B726-23BF1571B05A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
CodeAnalysis|Xbox 360 = CodeAnalysis|Xbox 360
Debug|Xbox 360 = Debug|Xbox 360
Profile_FastCap|Xbox 360 = Profile_FastCap|Xbox 360
Profile|Xbox 360 = Profile|Xbox 360
Release_LTCG|Xbox 360 = Release_LTCG|Xbox 360
Release|Xbox 360 = Release|Xbox 360
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{00CE82EC-E948-4BB6-B726-23BF1571B05A}.CodeAnalysis|Xbox 360.ActiveCfg = CodeAnalysis|Xbox 360
{00CE82EC-E948-4BB6-B726-23BF1571B05A}.CodeAnalysis|Xbox 360.Build.0 = CodeAnalysis|Xbox 360
{00CE82EC-E948-4BB6-B726-23BF1571B05A}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360
{00CE82EC-E948-4BB6-B726-23BF1571B05A}.Debug|Xbox 360.Build.0 = Debug|Xbox 360
{00CE82EC-E948-4BB6-B726-23BF1571B05A}.Profile_FastCap|Xbox 360.ActiveCfg = Profile_FastCap|Xbox 360
{00CE82EC-E948-4BB6-B726-23BF1571B05A}.Profile_FastCap|Xbox 360.Build.0 = Profile_FastCap|Xbox 360
{00CE82EC-E948-4BB6-B726-23BF1571B05A}.Profile|Xbox 360.ActiveCfg = Profile|Xbox 360
{00CE82EC-E948-4BB6-B726-23BF1571B05A}.Profile|Xbox 360.Build.0 = Profile|Xbox 360
{00CE82EC-E948-4BB6-B726-23BF1571B05A}.Release_LTCG|Xbox 360.ActiveCfg = Release_LTCG|Xbox 360
{00CE82EC-E948-4BB6-B726-23BF1571B05A}.Release_LTCG|Xbox 360.Build.0 = Release_LTCG|Xbox 360
{00CE82EC-E948-4BB6-B726-23BF1571B05A}.Release|Xbox 360.ActiveCfg = Release|Xbox 360
{00CE82EC-E948-4BB6-B726-23BF1571B05A}.Release|Xbox 360.Build.0 = Release|Xbox 360
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,310 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="CodeAnalysis|Xbox 360">
<Configuration>CodeAnalysis</Configuration>
<Platform>Xbox 360</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Xbox 360">
<Configuration>Debug</Configuration>
<Platform>Xbox 360</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Profile|Xbox 360">
<Configuration>Profile</Configuration>
<Platform>Xbox 360</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Profile_FastCap|Xbox 360">
<Configuration>Profile_FastCap</Configuration>
<Platform>Xbox 360</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Xbox 360">
<Configuration>Release</Configuration>
<Platform>Xbox 360</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release_LTCG|Xbox 360">
<Configuration>Release_LTCG</Configuration>
<Platform>Xbox 360</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\source\cart_hw\areplay.c" />
<ClCompile Include="..\..\..\source\cart_hw\ggenie.c" />
<ClCompile Include="..\..\..\source\cart_hw\gg_eeprom.c" />
<ClCompile Include="..\..\..\source\cart_hw\md_cart.c" />
<ClCompile Include="..\..\..\source\cart_hw\md_eeprom.c" />
<ClCompile Include="..\..\..\source\cart_hw\sms_cart.c" />
<ClCompile Include="..\..\..\source\cart_hw\sram.c" />
<ClCompile Include="..\..\..\source\cart_hw\svp\ssp16.c" />
<ClCompile Include="..\..\..\source\cart_hw\svp\svp.c" />
<ClCompile Include="..\..\..\source\cd_hw\cdc.c" />
<ClCompile Include="..\..\..\source\cd_hw\cdd.c" />
<ClCompile Include="..\..\..\source\cd_hw\cd_cart.c" />
<ClCompile Include="..\..\..\source\cd_hw\gfx.c" />
<ClCompile Include="..\..\..\source\cd_hw\pcm.c" />
<ClCompile Include="..\..\..\source\cd_hw\scd.c" />
<ClCompile Include="..\..\..\source\genesis.c" />
<ClCompile Include="..\..\..\source\input_hw\activator.c" />
<ClCompile Include="..\..\..\source\input_hw\gamepad.c" />
<ClCompile Include="..\..\..\source\input_hw\input.c" />
<ClCompile Include="..\..\..\source\input_hw\lightgun.c" />
<ClCompile Include="..\..\..\source\input_hw\mouse.c" />
<ClCompile Include="..\..\..\source\input_hw\paddle.c" />
<ClCompile Include="..\..\..\source\input_hw\sportspad.c" />
<ClCompile Include="..\..\..\source\input_hw\teamplayer.c" />
<ClCompile Include="..\..\..\source\input_hw\terebi_oekaki.c" />
<ClCompile Include="..\..\..\source\input_hw\xe_a1p.c" />
<ClCompile Include="..\..\..\source\io_ctrl.c" />
<ClCompile Include="..\..\..\source\loadrom.c" />
<ClCompile Include="..\..\..\source\m68k\m68kcpu.c">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='CodeAnalysis|Xbox 360'">CompileAsC</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">CompileAsC</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Profile|Xbox 360'">CompileAsC</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Profile_FastCap|Xbox 360'">CompileAsC</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">CompileAsC</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_LTCG|Xbox 360'">CompileAsC</CompileAs>
</ClCompile>
<ClCompile Include="..\..\..\source\m68k\s68kcpu.c">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='CodeAnalysis|Xbox 360'">CompileAsC</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">CompileAsC</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Profile|Xbox 360'">CompileAsC</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Profile_FastCap|Xbox 360'">CompileAsC</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">CompileAsC</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_LTCG|Xbox 360'">CompileAsC</CompileAs>
</ClCompile>
<ClCompile Include="..\..\..\source\mem68k.c" />
<ClCompile Include="..\..\..\source\membnk.c" />
<ClCompile Include="..\..\..\source\memz80.c" />
<ClCompile Include="..\..\..\source\ntsc\md_ntsc.c" />
<ClCompile Include="..\..\..\source\ntsc\sms_ntsc.c" />
<ClCompile Include="..\..\..\source\sound\blip.c" />
<ClCompile Include="..\..\..\source\sound\eq.c" />
<ClCompile Include="..\..\..\source\sound\Fir_Resampler.c" />
<ClCompile Include="..\..\..\source\sound\sn76489.c" />
<ClCompile Include="..\..\..\source\sound\sound.c" />
<ClCompile Include="..\..\..\source\sound\ym2413.c" />
<ClCompile Include="..\..\..\source\sound\ym2612.c" />
<ClCompile Include="..\..\..\source\state.c" />
<ClCompile Include="..\..\..\source\system.c" />
<ClCompile Include="..\..\..\source\vdp_ctrl.c" />
<ClCompile Include="..\..\..\source\vdp_render.c" />
<ClCompile Include="..\..\..\source\z80\z80.c" />
<ClCompile Include="..\..\libretro.c">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='CodeAnalysis|Xbox 360'">CompileAsC</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">CompileAsC</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Profile|Xbox 360'">CompileAsC</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Profile_FastCap|Xbox 360'">CompileAsC</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">CompileAsC</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_LTCG|Xbox 360'">CompileAsC</CompileAs>
</ClCompile>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{00CE82EC-E948-4BB6-B726-23BF1571B05A}</ProjectGuid>
<Keyword>Xbox360Proj</Keyword>
<ProjectName>genesis-next-msvc-2010-360</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='CodeAnalysis|Xbox 360'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Profile|Xbox 360'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Profile_FastCap|Xbox 360'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_LTCG|Xbox 360'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='CodeAnalysis|Xbox 360'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Profile|Xbox 360'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Profile_FastCap|Xbox 360'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release_LTCG|Xbox 360'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">
<OutputFile>$(OutDir)libretro_xdk360$(TargetExt)</OutputFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='CodeAnalysis|Xbox 360'">
<OutputFile>$(OutDir)libretro_xdk360$(TargetExt)</OutputFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Profile|Xbox 360'">
<OutputFile>$(OutDir)libretro_xdk360$(TargetExt)</OutputFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Profile_FastCap|Xbox 360'">
<OutputFile>$(OutDir)libretro_xdk360$(TargetExt)</OutputFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">
<OutputFile>$(OutDir)libretro_xdk360$(TargetExt)</OutputFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_LTCG|Xbox 360'">
<OutputFile>$(OutDir)libretro_xdk360$(TargetExt)</OutputFile>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<Optimization>Disabled</Optimization>
<ExceptionHandling>false</ExceptionHandling>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
<PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PreprocessorDefinitions>_DEBUG;_XBOX;_XBOX360;_LIB;INLINE=static _inline;__attribute__=;__inline__=_inline;__extension__=;USE_15BPP_RENDERING;__LIBRETRO__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CallAttributedProfiling>Callcap</CallAttributedProfiling>
<AdditionalIncludeDirectories>$(SolutionDir)\..\..\libretro;$(SolutionDir)\..\..\source;$(SolutionDir)\..\..\source\m68k;$(SolutionDir)\..\..\source\sound;$(SolutionDir)\..\..\source\cart_hw;$(SolutionDir)\..\..\source\cart_hw\svp;$(SolutionDir)\..\..\source\input_hw;$(SolutionDir)\..\..\source\ntsc;$(SolutionDir)\..\..\source\z80;$(SolutionDir)\..\..\source\cd_hw;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='CodeAnalysis|Xbox 360'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<Optimization>Disabled</Optimization>
<ExceptionHandling>false</ExceptionHandling>
<MinimalRebuild>true</MinimalRebuild>
<PREfast>AnalyzeOnly</PREfast>
<BufferSecurityCheck>false</BufferSecurityCheck>
<PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PreprocessorDefinitions>_DEBUG;_XBOX;_XBOX360;_LIB;%(PreprocessorDefinitions);INLINE=static _inline;__attribute__=;__inline__=_inline;__extension__=;USE_15BPP_RENDERING;__LIBRETRO__</PreprocessorDefinitions>
<CallAttributedProfiling>Callcap</CallAttributedProfiling>
<AdditionalIncludeDirectories>$(SolutionDir)\..\..\libretro;$(SolutionDir)\..\..\source;$(SolutionDir)\..\..\source\m68k;$(SolutionDir)\..\..\source\sound;$(SolutionDir)\..\..\source\cart_hw;$(SolutionDir)\..\..\source\cart_hw\svp;$(SolutionDir)\..\..\source\input_hw;$(SolutionDir)\..\..\source\ntsc;$(SolutionDir)\..\..\source\z80;$(SolutionDir)\..\..\source\cd_hw;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Profile|Xbox 360'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>Full</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<ExceptionHandling>false</ExceptionHandling>
<StringPooling>true</StringPooling>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<BufferSecurityCheck>false</BufferSecurityCheck>
<PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>NDEBUG;_XBOX;_XBOX360;PROFILE;_LIB;__LIBRETRO__;USE_15BPP_RENDERING;INLINE=static _inline;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CallAttributedProfiling>Callcap</CallAttributedProfiling>
<AdditionalIncludeDirectories>$(SolutionDir)\..\..\libretro;$(SolutionDir)\..\..\source;$(SolutionDir)\..\..\source\m68k;$(SolutionDir)\..\..\source\sound;$(SolutionDir)\..\..\source\cart_hw;$(SolutionDir)\..\..\source\cart_hw\svp;$(SolutionDir)\..\..\source\input_hw;$(SolutionDir)\..\..\source\ntsc;$(SolutionDir)\..\..\source\z80;$(SolutionDir)\..\..\source\cd_hw;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>false</EnableCOMDATFolding>
<IgnoreSpecificDefaultLibraries>xapilib.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Profile_FastCap|Xbox 360'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>Full</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<ExceptionHandling>false</ExceptionHandling>
<StringPooling>true</StringPooling>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CallAttributedProfiling>Fastcap</CallAttributedProfiling>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<BufferSecurityCheck>false</BufferSecurityCheck>
<PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>NDEBUG;_XBOX;_XBOX360;PROFILE;FASTCAP;_LIB;__LIBRETRO__;USE_15BPP_RENDERING;INLINE=static _inline;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)\..\..\libretro;$(SolutionDir)\..\..\source;$(SolutionDir)\..\..\source\m68k;$(SolutionDir)\..\..\source\sound;$(SolutionDir)\..\..\source\cart_hw;$(SolutionDir)\..\..\source\cart_hw\svp;$(SolutionDir)\..\..\source\input_hw;$(SolutionDir)\..\..\source\ntsc;$(SolutionDir)\..\..\source\z80;$(SolutionDir)\..\..\source\cd_hw;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>false</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>Full</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<StringPooling>true</StringPooling>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<ExceptionHandling>false</ExceptionHandling>
<BufferSecurityCheck>false</BufferSecurityCheck>
<PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>NDEBUG;_XBOX;_XBOX360;_LIB;INLINE=static _inline;__inline__=_inline;__extension__=;USE_15BPP_RENDERING;__LIBRETRO__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)\..\..\libretro;$(SolutionDir)\..\..\source;$(SolutionDir)\..\..\source\m68k;$(SolutionDir)\..\..\source\sound;$(SolutionDir)\..\..\source\cart_hw;$(SolutionDir)\..\..\source\cart_hw\svp;$(SolutionDir)\..\..\source\input_hw;$(SolutionDir)\..\..\source\ntsc;$(SolutionDir)\..\..\source\z80;$(SolutionDir)\..\..\source\cd_hw;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_LTCG|Xbox 360'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>Full</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<StringPooling>true</StringPooling>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<ExceptionHandling>false</ExceptionHandling>
<BufferSecurityCheck>false</BufferSecurityCheck>
<PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>NDEBUG;_XBOX;_XBOX360;LTCG;_LIB;INLINE=static _inline;__inline__=_inline;__extension__=;USE_15BPP_RENDERING;__LIBRETRO__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)\..\..\libretro;$(SolutionDir)\..\..\source;$(SolutionDir)\..\..\source\m68k;$(SolutionDir)\..\..\source\sound;$(SolutionDir)\..\..\source\cart_hw;$(SolutionDir)\..\..\source\cart_hw\svp;$(SolutionDir)\..\..\source\input_hw;$(SolutionDir)\..\..\source\ntsc;$(SolutionDir)\..\..\source\z80;$(SolutionDir)\..\..\source\cd_hw;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,186 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Source Files\m68k">
<UniqueIdentifier>{c0268b8d-1c7d-44d5-ae67-e3e365c991b7}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\sound">
<UniqueIdentifier>{c3d17076-e795-431e-b50f-7606c81367b9}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\cart_hw">
<UniqueIdentifier>{5351583e-dbd9-4060-8497-6ddfd31e3666}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\input_hw">
<UniqueIdentifier>{943f2af4-23b4-43eb-b9cd-91cc7af172c5}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\z80">
<UniqueIdentifier>{ff45bed3-12a9-437d-ac34-7e83518ba624}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\cart_hw\svp">
<UniqueIdentifier>{f0c37c57-d905-4002-a129-5b9ffc907c05}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\libretro">
<UniqueIdentifier>{2f0a4c83-ad74-4742-baef-35fafdca0e67}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\ntsc">
<UniqueIdentifier>{c90aed8d-25e3-439e-acec-f66acc8b4c0d}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\cd_hw">
<UniqueIdentifier>{d8d4356b-c678-422e-aa12-9f52ba60fdbc}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\source\vdp_render.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\genesis.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\io_ctrl.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\loadrom.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\mem68k.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\membnk.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\memz80.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\state.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\system.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\vdp_ctrl.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\z80\z80.c">
<Filter>Source Files\z80</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\sound\ym2612.c">
<Filter>Source Files\sound</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\sound\blip.c">
<Filter>Source Files\sound</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\sound\eq.c">
<Filter>Source Files\sound</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\sound\Fir_Resampler.c">
<Filter>Source Files\sound</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\sound\sn76489.c">
<Filter>Source Files\sound</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\sound\sound.c">
<Filter>Source Files\sound</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\sound\ym2413.c">
<Filter>Source Files\sound</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\ntsc\sms_ntsc.c">
<Filter>Source Files\ntsc</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\ntsc\md_ntsc.c">
<Filter>Source Files\ntsc</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\m68k\s68kcpu.c">
<Filter>Source Files\m68k</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\m68k\m68kcpu.c">
<Filter>Source Files\m68k</Filter>
</ClCompile>
<ClCompile Include="..\..\libretro.c">
<Filter>Source Files\libretro</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\input_hw\xe_a1p.c">
<Filter>Source Files\input_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\input_hw\activator.c">
<Filter>Source Files\input_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\input_hw\gamepad.c">
<Filter>Source Files\input_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\input_hw\input.c">
<Filter>Source Files\input_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\input_hw\lightgun.c">
<Filter>Source Files\input_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\input_hw\mouse.c">
<Filter>Source Files\input_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\input_hw\paddle.c">
<Filter>Source Files\input_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\input_hw\sportspad.c">
<Filter>Source Files\input_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\input_hw\teamplayer.c">
<Filter>Source Files\input_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\input_hw\terebi_oekaki.c">
<Filter>Source Files\input_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\cart_hw\sram.c">
<Filter>Source Files\cart_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\cart_hw\areplay.c">
<Filter>Source Files\cart_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\cart_hw\gg_eeprom.c">
<Filter>Source Files\cart_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\cart_hw\ggenie.c">
<Filter>Source Files\cart_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\cart_hw\md_cart.c">
<Filter>Source Files\cart_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\cart_hw\md_eeprom.c">
<Filter>Source Files\cart_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\cart_hw\sms_cart.c">
<Filter>Source Files\cart_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\cart_hw\svp\svp.c">
<Filter>Source Files\cart_hw\svp</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\cart_hw\svp\ssp16.c">
<Filter>Source Files\cart_hw\svp</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\cd_hw\cd_cart.c">
<Filter>Source Files\cd_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\cd_hw\cdc.c">
<Filter>Source Files\cd_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\cd_hw\cdd.c">
<Filter>Source Files\cd_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\cd_hw\gfx.c">
<Filter>Source Files\cd_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\cd_hw\pcm.c">
<Filter>Source Files\cd_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\cd_hw\scd.c">
<Filter>Source Files\cd_hw</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "msvc-2010", "msvc-2010/msvc-2010.vcxproj", "{29DF2EE7-2930-4BD3-8AC5-81A2534ACC99}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{29DF2EE7-2930-4BD3-8AC5-81A2534ACC99}.Debug|Win32.ActiveCfg = Debug|Win32
{29DF2EE7-2930-4BD3-8AC5-81A2534ACC99}.Debug|Win32.Build.0 = Debug|Win32
{29DF2EE7-2930-4BD3-8AC5-81A2534ACC99}.Release|Win32.ActiveCfg = Release|Win32
{29DF2EE7-2930-4BD3-8AC5-81A2534ACC99}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,27 @@
LIBRARY "libretro-prboom msvc2010"
EXPORTS
retro_set_environment
retro_set_video_refresh
retro_set_audio_sample
retro_set_audio_sample_batch
retro_set_input_poll
retro_set_input_state
retro_init
retro_deinit
retro_api_version
retro_get_system_info
retro_get_system_av_info
retro_set_controller_port_device
retro_reset
retro_run
retro_serialize_size
retro_serialize
retro_unserialize
retro_cheat_reset
retro_cheat_set
retro_load_game
retro_load_game_special
retro_unload_game
retro_get_region
retro_get_memory_data
retro_get_memory_size

View File

@ -0,0 +1,137 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\source\cart_hw\areplay.c" />
<ClCompile Include="..\..\..\source\cart_hw\ggenie.c" />
<ClCompile Include="..\..\..\source\cart_hw\gg_eeprom.c" />
<ClCompile Include="..\..\..\source\cart_hw\md_cart.c" />
<ClCompile Include="..\..\..\source\cart_hw\md_eeprom.c" />
<ClCompile Include="..\..\..\source\cart_hw\sms_cart.c" />
<ClCompile Include="..\..\..\source\cart_hw\sram.c" />
<ClCompile Include="..\..\..\source\cart_hw\svp\ssp16.c" />
<ClCompile Include="..\..\..\source\cart_hw\svp\svp.c" />
<ClCompile Include="..\..\..\source\cd_hw\cdc.c" />
<ClCompile Include="..\..\..\source\cd_hw\cdd.c" />
<ClCompile Include="..\..\..\source\cd_hw\cd_cart.c" />
<ClCompile Include="..\..\..\source\cd_hw\gfx.c" />
<ClCompile Include="..\..\..\source\cd_hw\pcm.c" />
<ClCompile Include="..\..\..\source\cd_hw\scd.c" />
<ClCompile Include="..\..\..\source\genesis.c" />
<ClCompile Include="..\..\..\source\input_hw\activator.c" />
<ClCompile Include="..\..\..\source\input_hw\gamepad.c" />
<ClCompile Include="..\..\..\source\input_hw\input.c" />
<ClCompile Include="..\..\..\source\input_hw\lightgun.c" />
<ClCompile Include="..\..\..\source\input_hw\mouse.c" />
<ClCompile Include="..\..\..\source\input_hw\paddle.c" />
<ClCompile Include="..\..\..\source\input_hw\sportspad.c" />
<ClCompile Include="..\..\..\source\input_hw\teamplayer.c" />
<ClCompile Include="..\..\..\source\input_hw\terebi_oekaki.c" />
<ClCompile Include="..\..\..\source\input_hw\xe_a1p.c" />
<ClCompile Include="..\..\..\source\io_ctrl.c" />
<ClCompile Include="..\..\..\source\loadrom.c" />
<ClCompile Include="..\..\..\source\m68k\m68kcpu.c" />
<ClCompile Include="..\..\..\source\m68k\s68kcpu.c" />
<ClCompile Include="..\..\..\source\mem68k.c" />
<ClCompile Include="..\..\..\source\membnk.c" />
<ClCompile Include="..\..\..\source\memz80.c" />
<ClCompile Include="..\..\..\source\ntsc\md_ntsc.c" />
<ClCompile Include="..\..\..\source\ntsc\sms_ntsc.c" />
<ClCompile Include="..\..\..\source\sound\blip.c" />
<ClCompile Include="..\..\..\source\sound\eq.c" />
<ClCompile Include="..\..\..\source\sound\Fir_Resampler.c" />
<ClCompile Include="..\..\..\source\sound\sn76489.c" />
<ClCompile Include="..\..\..\source\sound\sound.c" />
<ClCompile Include="..\..\..\source\sound\ym2413.c" />
<ClCompile Include="..\..\..\source\sound\ym2612.c" />
<ClCompile Include="..\..\..\source\state.c" />
<ClCompile Include="..\..\..\source\system.c" />
<ClCompile Include="..\..\..\source\vdp_ctrl.c" />
<ClCompile Include="..\..\..\source\vdp_render.c" />
<ClCompile Include="..\..\..\source\z80\z80.c" />
<ClCompile Include="..\..\libretro.c" />
<ClCompile Include="..\..\scrc32.c" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{29DF2EE7-2930-4BD3-8AC5-81A2534ACC99}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>msvc2010</RootNamespace>
<ProjectName>genesis-next-msvc-2010</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<TargetName>libretro</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>libretro</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MSVC2010_EXPORTS;_CRT_SECURE_NO_WARNINGS;INLINE=static _inline;__inline__=_inline;__extension__=;LSB_FIRST;__LIBRETRO__;USE_15BPP_RENDERING;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)/../../source;$(SolutionDir)/../../utils/zlib;$(SolutionDir)/../../source/cart_hw/svp;$(SolutionDir)/../../libretro;$(SolutionDir)/../../source/m68k;$(SolutionDir)/../../source/z80;$(SolutionDir)/../../source/input_hw;$(SolutionDir)/../../source/cart_hw;$(SolutionDir)/../../source/sound;$(SolutionDir)/../../source/ntsc;$(SolutionDir)/../../source/cd_hw;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ModuleDefinitionFile>libretro.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MSVC2010_EXPORTS;_CRT_SECURE_NO_WARNINGS;INLINE=static _inline;__inline__=_inline;__extension__=;LSB_FIRST;__LIBRETRO__;USE_15BPP_RENDERING;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)/../../source;$(SolutionDir)/../../utils/zlib;$(SolutionDir)/../../source/cart_hw/svp;$(SolutionDir)/../../libretro;$(SolutionDir)/../../source/m68k;$(SolutionDir)/../../source/z80;$(SolutionDir)/../../source/input_hw;$(SolutionDir)/../../source/cart_hw;$(SolutionDir)/../../source/sound;$(SolutionDir)/../../source/ntsc;$(SolutionDir)/../../source/cd_hw;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>libretro.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,193 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="Source Files\z80">
<UniqueIdentifier>{e0f9ca3b-df0f-4cf9-bde1-9fa3c945b0df}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\m68k">
<UniqueIdentifier>{0605ef1a-d898-494c-a898-8f06000646ae}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\cart_hw">
<UniqueIdentifier>{8b373848-96f7-4410-a466-5d7cb6866b0f}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\cart_hw\svp">
<UniqueIdentifier>{ea37a461-94f4-40e3-91a8-2b254b94f547}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\input_hw">
<UniqueIdentifier>{becebb08-7987-4fe3-8ee0-dd47889d4996}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\ntsc">
<UniqueIdentifier>{e66cf784-cb76-4a70-a2e0-327a3b4c96eb}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\sound">
<UniqueIdentifier>{39a1110f-2062-4e3c-9f43-aca63cc20cda}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\libretro">
<UniqueIdentifier>{95e90e29-1915-4f70-b6e0-50b9dace48cf}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\cd_hw">
<UniqueIdentifier>{eba4b43d-dbd8-4170-9853-e3234db6dfc0}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\source\cart_hw\svp\svp.c">
<Filter>Source Files\cart_hw\svp</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\cart_hw\svp\ssp16.c">
<Filter>Source Files\cart_hw\svp</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\cart_hw\sram.c">
<Filter>Source Files\cart_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\cart_hw\areplay.c">
<Filter>Source Files\cart_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\cart_hw\gg_eeprom.c">
<Filter>Source Files\cart_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\cart_hw\ggenie.c">
<Filter>Source Files\cart_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\cart_hw\md_cart.c">
<Filter>Source Files\cart_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\cart_hw\md_eeprom.c">
<Filter>Source Files\cart_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\cart_hw\sms_cart.c">
<Filter>Source Files\cart_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\input_hw\xe_a1p.c">
<Filter>Source Files\input_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\input_hw\activator.c">
<Filter>Source Files\input_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\input_hw\gamepad.c">
<Filter>Source Files\input_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\input_hw\input.c">
<Filter>Source Files\input_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\input_hw\lightgun.c">
<Filter>Source Files\input_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\input_hw\mouse.c">
<Filter>Source Files\input_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\input_hw\paddle.c">
<Filter>Source Files\input_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\input_hw\sportspad.c">
<Filter>Source Files\input_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\input_hw\teamplayer.c">
<Filter>Source Files\input_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\input_hw\terebi_oekaki.c">
<Filter>Source Files\input_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\libretro.c">
<Filter>Source Files\libretro</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\m68k\s68kcpu.c">
<Filter>Source Files\m68k</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\m68k\m68kcpu.c">
<Filter>Source Files\m68k</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\ntsc\sms_ntsc.c">
<Filter>Source Files\ntsc</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\ntsc\md_ntsc.c">
<Filter>Source Files\ntsc</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\sound\ym2612.c">
<Filter>Source Files\sound</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\sound\blip.c">
<Filter>Source Files\sound</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\sound\eq.c">
<Filter>Source Files\sound</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\sound\Fir_Resampler.c">
<Filter>Source Files\sound</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\sound\sn76489.c">
<Filter>Source Files\sound</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\sound\sound.c">
<Filter>Source Files\sound</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\sound\ym2413.c">
<Filter>Source Files\sound</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\z80\z80.c">
<Filter>Source Files\z80</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\vdp_render.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\genesis.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\io_ctrl.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\loadrom.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\mem68k.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\membnk.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\memz80.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\state.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\system.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\vdp_ctrl.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\cd_hw\scd.c">
<Filter>Source Files\cd_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\cd_hw\cd_cart.c">
<Filter>Source Files\cd_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\cd_hw\cdc.c">
<Filter>Source Files\cd_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\cd_hw\cdd.c">
<Filter>Source Files\cd_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\cd_hw\gfx.c">
<Filter>Source Files\cd_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\..\source\cd_hw\pcm.c">
<Filter>Source Files\cd_hw</Filter>
</ClCompile>
<ClCompile Include="..\..\scrc32.c">
<Filter>Source Files\libretro</Filter>
</ClCompile>
</ItemGroup>
</Project>

114
libretro/osd.h Normal file
View File

@ -0,0 +1,114 @@
#ifndef _OSD_H
#define _OSD_H
#ifdef _MSC_VER
#include <stdio.h>
typedef unsigned char bool;
#define strncasecmp _strnicmp
#endif
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#define MAX_INPUTS 8
#define MAX_KEYS 8
#define MAXPATHLEN 1024
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef M_PI
#define M_PI 3.1415926535897932385
#endif
typedef struct
{
int8 device;
uint8 port;
uint8 padtype;
} t_input_config;
typedef struct
{
char version[16];
uint8 hq_fm;
uint8 filter;
uint8 psgBoostNoise;
uint8 dac_bits;
uint8 ym2413;
int16 psg_preamp;
int16 fm_preamp;
int16 lp_range;
int16 low_freq;
int16 high_freq;
int16 lg;
int16 mg;
int16 hg;
float rolloff;
uint8 system;
uint8 region_detect;
uint8 master_clock;
uint8 vdp_mode;
uint8 force_dtack;
uint8 addr_error;
uint8 tmss;
uint8 bios;
uint8 lock_on;
uint8 hot_swap;
uint8 invert_mouse;
uint8 gun_cursor[2];
uint8 overscan;
uint8 ntsc;
uint8 vsync;
uint8 render;
uint8 tv_mode;
uint8 bilinear;
uint8 aspect;
int16 xshift;
int16 yshift;
int16 xscale;
int16 yscale;
t_input_config input[MAX_INPUTS];
uint16 pad_keymap[4][MAX_KEYS];
uint8 autoload;
uint8 autocheat;
uint8 s_auto;
uint8 s_default;
uint8 s_device;
uint8 l_device;
uint8 bg_overlay;
int16 screen_w;
float bgm_volume;
float sfx_volume;
char lastdir[4][2][MAXPATHLEN];
} t_config;
/* Global data */
t_config config;
extern char GG_ROM[256];
extern char AR_ROM[256];
extern char SK_ROM[256];
extern char SK_UPMEM[256];
extern char GG_BIOS[256];
extern char CD_BIOS_EU[256];
extern char CD_BIOS_US[256];
extern char CD_BIOS_JP[256];
extern char MS_BIOS_US[256];
extern char MS_BIOS_EU[256];
extern char MS_BIOS_JP[256];
extern int16 soundbuffer[3068];
#define VERSION "Genesis Plus GX 1.7.0 (libretro)"
void osd_input_update(void);
int load_archive(char *filename, unsigned char *buffer, int maxsize, char *extension);
#endif /* _OSD_H */

79
libretro/scrc32.c Normal file
View File

@ -0,0 +1,79 @@
#ifndef _S_CRC32_H
#define _S_CRC32_H
static const unsigned long crc_table[256] = {
0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L,
0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L,
0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L,
0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL,
0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L,
0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L,
0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L,
0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL,
0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L,
0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL,
0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L,
0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L,
0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L,
0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL,
0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL,
0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L,
0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL,
0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L,
0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L,
0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L,
0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL,
0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L,
0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L,
0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL,
0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L,
0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L,
0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L,
0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L,
0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L,
0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL,
0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL,
0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L,
0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L,
0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL,
0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL,
0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L,
0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL,
0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L,
0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL,
0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L,
0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL,
0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L,
0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L,
0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL,
0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L,
0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L,
0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L,
0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L,
0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L,
0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L,
0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL,
0x2d02ef8dL
};
#define DO1_CRC32(buf) crc = crc_table[((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8);
#define DO2_CRC32(buf) DO1_CRC32(buf); DO1_CRC32(buf);
#define DO4_CRC32(buf) DO2_CRC32(buf); DO2_CRC32(buf);
#define DO8_CRC32(buf) DO4_CRC32(buf); DO4_CRC32(buf);
unsigned long crc32(unsigned long crc, const unsigned char *buf, unsigned int len)
{
if (buf == 0) return 0L;
crc = crc ^ 0xffffffffL;
while (len >= 8)
{
DO8_CRC32(buf);
len -= 8;
}
if (len) do {
DO1_CRC32(buf);
} while (--len);
return crc ^ 0xffffffffL;
}
#endif

6
libretro/scrc32.h Normal file
View File

@ -0,0 +1,6 @@
#ifndef _S_CRC32_H
#define _S_CRC32_H
unsigned long crc32(unsigned long crc, const unsigned char *buf, unsigned int len);
#endif

View File

@ -84,6 +84,7 @@ void blip_add( blip_buffer_t* s, int clocks, int delta )
int blip_clocks_needed( const blip_buffer_t* s, int samples )
{
/* Fixed-point number of samples needed in addition to those in buffer */
int fixed_needed = samples * time_unit - s->offset;