mirror of
https://github.com/libretro/beetle-wswan-libretro.git
synced 2025-03-01 04:25:37 +00:00
Remove Mednafen VB - now has its own standalone repo
This commit is contained in:
parent
cfcc7e18ae
commit
0665a11ebb
20
Makefile
20
Makefile
@ -135,26 +135,6 @@ HW_SOUND_SOURCES += $(MEDNAFEN_DIR)/hw_sound/gb_apu/Gb_Apu.cpp \
|
||||
$(MEDNAFEN_DIR)/hw_sound/gb_apu/Gb_Oscs.cpp
|
||||
EXTRA_CORE_INCDIR = -I$(MEDNAFEN_DIR)/hw_sound/ -I$(MEDNAFEN_DIR)/include/blip
|
||||
TARGET_NAME := mednafen_$(core)_libretro
|
||||
else ifeq ($(core), vb)
|
||||
core = vb
|
||||
NEED_BPP = 32
|
||||
NEED_BLIP = 1
|
||||
WANT_NEW_API = 1
|
||||
NEED_STEREO_SOUND = 1
|
||||
CORE_DEFINE := -DWANT_VB_EMU
|
||||
CORE_DIR := $(MEDNAFEN_DIR)/vb
|
||||
|
||||
CORE_SOURCES := $(CORE_DIR)/input.cpp \
|
||||
$(CORE_DIR)/timer.cpp \
|
||||
$(CORE_DIR)/vb.cpp \
|
||||
$(CORE_DIR)/vip.cpp \
|
||||
$(CORE_DIR)/vsu.cpp
|
||||
|
||||
LIBRETRO_SOURCES_C := $(MEDNAFEN_DIR)/hw_cpu/v810/fpu-new/softfloat.c
|
||||
HW_CPU_SOURCES += $(MEDNAFEN_DIR)/hw_cpu/v810/v810_cpu.cpp \
|
||||
$(MEDNAFEN_DIR)/hw_cpu/v810/v810_cpuD.cpp
|
||||
EXTRA_CORE_INCDIR = -I$(MEDNAFEN_DIR)/hw_sound/ -I$(MEDNAFEN_DIR)/include/blip
|
||||
TARGET_NAME := mednafen_$(core)_libretro
|
||||
else ifeq ($(core), pcfx)
|
||||
core = pcfx
|
||||
NEED_BPP = 32
|
||||
|
@ -140,26 +140,6 @@ HW_SOUND_SOURCES := $(MEDNAFEN_DIR)/hw_sound/gb_apu/Gb_Apu.cpp \
|
||||
$(MEDNAFEN_DIR)/hw_sound/gb_apu/Gb_Oscs.cpp
|
||||
EXTRA_CORE_INCDIR = $(MEDNAFEN_DIR)/hw_sound/ $(MEDNAFEN_DIR)/include/blip
|
||||
TARGET_NAME := mednafen_$(core)_libretro
|
||||
else ifeq ($(core), vb)
|
||||
core = vb
|
||||
NEED_BPP = 32
|
||||
WANT_NEW_API = 1
|
||||
NEED_BLIP = 1
|
||||
NEED_STEREO_SOUND = 1
|
||||
CORE_DEFINE := -DWANT_VB_EMU
|
||||
CORE_DIR := $(MEDNAFEN_DIR)/vb
|
||||
|
||||
CORE_SOURCES := $(CORE_DIR)/input.cpp \
|
||||
$(CORE_DIR)/timer.cpp \
|
||||
$(CORE_DIR)/vb.cpp \
|
||||
$(CORE_DIR)/vip.cpp \
|
||||
$(CORE_DIR)/vsu.cpp
|
||||
|
||||
LIBRETRO_SOURCES_C := $(MEDNAFEN_DIR)/hw_cpu/v810/fpu-new/softfloat.c
|
||||
HW_CPU_SOURCES := $(MEDNAFEN_DIR)/hw_cpu/v810/v810_cpu.cpp \
|
||||
$(MEDNAFEN_DIR)/hw_cpu/v810/v810_cpuD.cpp
|
||||
EXTRA_CORE_INCDIR = $(MEDNAFEN_DIR)/hw_sound/ $(MEDNAFEN_DIR)/include/blip
|
||||
TARGET_NAME := mednafen_$(core)_libretro
|
||||
else ifeq ($(core), pcfx)
|
||||
core = pcfx
|
||||
NEED_BPP = 32
|
||||
|
111
libretro.cpp
111
libretro.cpp
@ -129,20 +129,6 @@ static bool is_pal = false;
|
||||
#define FB_WIDTH 512
|
||||
#define FB_HEIGHT 512
|
||||
|
||||
#elif defined(WANT_VB_EMU)
|
||||
#define MEDNAFEN_CORE_NAME_MODULE "vb"
|
||||
#define MEDNAFEN_CORE_NAME "Mednafen VB"
|
||||
#define MEDNAFEN_CORE_VERSION "v0.9.36"
|
||||
#define MEDNAFEN_CORE_EXTENSIONS "vb|vboy|bin"
|
||||
#define MEDNAFEN_CORE_TIMING_FPS 50.27
|
||||
#define MEDNAFEN_CORE_GEOMETRY_BASE_W (game->nominal_width)
|
||||
#define MEDNAFEN_CORE_GEOMETRY_BASE_H (game->nominal_height)
|
||||
#define MEDNAFEN_CORE_GEOMETRY_MAX_W 384
|
||||
#define MEDNAFEN_CORE_GEOMETRY_MAX_H 224
|
||||
#define MEDNAFEN_CORE_GEOMETRY_ASPECT_RATIO (4.0 / 3.0)
|
||||
#define FB_WIDTH 384
|
||||
#define FB_HEIGHT 224
|
||||
|
||||
#elif defined(WANT_PCFX_EMU)
|
||||
#define MEDNAFEN_CORE_NAME_MODULE "pcfx"
|
||||
#define MEDNAFEN_CORE_NAME "Mednafen PC-FX"
|
||||
@ -285,47 +271,6 @@ static void check_variables(void)
|
||||
else if (strcmp(var.value, "disabled") == 0)
|
||||
setting_gba_hle = 0;
|
||||
}
|
||||
#elif defined (WANT_VB_EMU)
|
||||
var.key = "vb_color_mode";
|
||||
|
||||
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
|
||||
{
|
||||
if (strcmp(var.value, "black & red") == 0)
|
||||
{
|
||||
setting_vb_lcolor = 0xFF0000;
|
||||
setting_vb_rcolor = 0x000000;
|
||||
}
|
||||
else if (strcmp(var.value, "black & white") == 0)
|
||||
{
|
||||
setting_vb_lcolor = 0xFFFFFF;
|
||||
setting_vb_rcolor = 0x000000;
|
||||
}
|
||||
log_cb(RETRO_LOG_INFO, "[%s]: Palette changed: %s .\n", mednafen_core_str, var.value);
|
||||
}
|
||||
|
||||
var.key = "vb_anaglyph_preset";
|
||||
|
||||
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
|
||||
{
|
||||
|
||||
|
||||
if (strcmp(var.value, "disabled") == 0)
|
||||
setting_vb_anaglyph_preset = 0;
|
||||
else if (strcmp(var.value, "red & blue") == 0)
|
||||
setting_vb_anaglyph_preset = 1;
|
||||
else if (strcmp(var.value, "red & cyan") == 0)
|
||||
setting_vb_anaglyph_preset = 2;
|
||||
else if (strcmp(var.value, "red & electric cyan") == 0)
|
||||
setting_vb_anaglyph_preset = 3;
|
||||
else if (strcmp(var.value, "red & green") == 0)
|
||||
setting_vb_anaglyph_preset = 4;
|
||||
else if (strcmp(var.value, "green & magenta") == 0)
|
||||
setting_vb_anaglyph_preset = 5;
|
||||
else if (strcmp(var.value, "yellow & blue") == 0)
|
||||
setting_vb_anaglyph_preset = 6;
|
||||
|
||||
log_cb(RETRO_LOG_INFO, "[%s]: Palette changed: %s .\n", mednafen_core_str, var.value);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -359,12 +304,6 @@ static uint16_t input_buf;
|
||||
#define MAX_BUTTONS 14
|
||||
static uint8_t input_buf[MAX_PLAYERS][2];
|
||||
|
||||
#elif defined(WANT_VB_EMU)
|
||||
|
||||
#define MAX_PLAYERS 1
|
||||
#define MAX_BUTTONS 14
|
||||
static uint16_t input_buf[MAX_PLAYERS];
|
||||
|
||||
#elif defined(WANT_PCFX_EMU)
|
||||
|
||||
#define MAX_PLAYERS 2
|
||||
@ -399,9 +338,6 @@ static void hookup_ports(bool force)
|
||||
// Possible endian bug ...
|
||||
for (unsigned i = 0; i < MAX_PLAYERS; i++)
|
||||
currgame->SetInput(i, "gamepad", &input_buf[i][0]);
|
||||
#elif defined(WANT_VB_EMU)
|
||||
// Possible endian bug ...
|
||||
currgame->SetInput(0, "gamepad", &input_buf[0]);
|
||||
#else
|
||||
// Possible endian bug ...
|
||||
currgame->SetInput(0, "gamepad", &input_buf[0]);
|
||||
@ -434,10 +370,6 @@ bool retro_load_game(const struct retro_game_info *info)
|
||||
check_variables();
|
||||
#endif
|
||||
|
||||
#if defined(WANT_VB_EMU)
|
||||
check_variables();
|
||||
#endif
|
||||
|
||||
game = MDFNI_LoadGame(MEDNAFEN_CORE_NAME_MODULE, info->path);
|
||||
if (!game)
|
||||
return false;
|
||||
@ -619,41 +551,6 @@ static void update_input(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
#elif defined(WANT_VB_EMU)
|
||||
input_buf[0] = 0;
|
||||
static unsigned map[] = {
|
||||
RETRO_DEVICE_ID_JOYPAD_A,
|
||||
RETRO_DEVICE_ID_JOYPAD_B,
|
||||
RETRO_DEVICE_ID_JOYPAD_R,
|
||||
RETRO_DEVICE_ID_JOYPAD_L,
|
||||
RETRO_DEVICE_ID_JOYPAD_L2, //right d-pad UP
|
||||
RETRO_DEVICE_ID_JOYPAD_R3, //right d-pad RIGHT
|
||||
RETRO_DEVICE_ID_JOYPAD_RIGHT, //left d-pad
|
||||
RETRO_DEVICE_ID_JOYPAD_LEFT, //left d-pad
|
||||
RETRO_DEVICE_ID_JOYPAD_DOWN, //left d-pad
|
||||
RETRO_DEVICE_ID_JOYPAD_UP, //left d-pad
|
||||
RETRO_DEVICE_ID_JOYPAD_START,
|
||||
RETRO_DEVICE_ID_JOYPAD_SELECT,
|
||||
RETRO_DEVICE_ID_JOYPAD_R2, //right d-pad LEFT
|
||||
RETRO_DEVICE_ID_JOYPAD_L3, //right d-pad DOWN
|
||||
};
|
||||
|
||||
for (unsigned j = 0; j < MAX_PLAYERS; j++)
|
||||
{
|
||||
for (unsigned i = 0; i < MAX_BUTTONS; i++)
|
||||
input_buf[j] |= map[i] != -1u &&
|
||||
input_state_cb(j, RETRO_DEVICE_JOYPAD, 0, map[i]) ? (1 << i) : 0;
|
||||
|
||||
#ifdef MSB_FIRST
|
||||
union {
|
||||
uint8_t b[2];
|
||||
uint16_t s;
|
||||
} u;
|
||||
u.s = input_buf[j];
|
||||
input_buf[j] = u.b[0] | u.b[1] << 8;
|
||||
#endif
|
||||
}
|
||||
|
||||
#elif defined(WANT_PCFX_EMU)
|
||||
input_buf[0] = input_buf[1] = 0;
|
||||
static unsigned map[] = {
|
||||
@ -892,14 +789,6 @@ void retro_set_environment(retro_environment_t cb)
|
||||
{ NULL, NULL },
|
||||
};
|
||||
cb(RETRO_ENVIRONMENT_SET_VARIABLES, (void*)vars);
|
||||
#elif defined(WANT_VB_EMU)
|
||||
static const struct retro_variable vars[] = {
|
||||
{ "vb_anaglyph_preset", "Anaglyph preset (restart); disabled|red & blue|red & cyan|red & electric cyan|red & green|green & magenta|yellow & blue" },
|
||||
{ "vb_color_mode", "Palette (restart); black & red|black & white" },
|
||||
{ NULL, NULL },
|
||||
};
|
||||
cb(RETRO_ENVIRONMENT_SET_VARIABLES, (void*)vars);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
# dummy
|
@ -1,78 +0,0 @@
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| One of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined.
|
||||
*----------------------------------------------------------------------------*/
|
||||
#ifdef LSB_FIRST
|
||||
#define LITTLEENDIAN
|
||||
#else
|
||||
#define BIGENDIAN
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| The macro `BITS64' can be defined to indicate that 64-bit integer types are
|
||||
| supported by the compiler.
|
||||
*----------------------------------------------------------------------------*/
|
||||
#define BITS64
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Each of the following `typedef's defines the most convenient type that holds
|
||||
| integers of at least as many bits as specified. For example, `uint8' should
|
||||
| be the most convenient type that can hold unsigned integers of as many as
|
||||
| 8 bits. The `flag' type must be able to hold either a 0 or 1. For most
|
||||
| implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed
|
||||
| to the same as `int'.
|
||||
*----------------------------------------------------------------------------*/
|
||||
typedef char flag;
|
||||
typedef uint8_t uint8;
|
||||
typedef int8_t int8;
|
||||
typedef uint16_t uint16;
|
||||
typedef int16_t int16;
|
||||
typedef uint32_t uint32;
|
||||
typedef int32_t int32;
|
||||
|
||||
#ifdef BITS64
|
||||
typedef uint64_t uint64;
|
||||
typedef int64_t int64;
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Each of the following `typedef's defines a type that holds integers
|
||||
| of _exactly_ the number of bits specified. For instance, for most
|
||||
| implementation of C, `bits16' and `sbits16' should be `typedef'ed to
|
||||
| `unsigned short int' and `signed short int' (or `short int'), respectively.
|
||||
*----------------------------------------------------------------------------*/
|
||||
typedef uint8_t bits8;
|
||||
typedef int8_t sbits8;
|
||||
typedef uint16_t bits16;
|
||||
typedef int16_t sbits16;
|
||||
typedef uint32_t bits32;
|
||||
typedef int32_t sbits32;
|
||||
#ifdef BITS64
|
||||
typedef uint64_t bits64;
|
||||
typedef int64_t sbits64;
|
||||
#endif
|
||||
|
||||
#ifdef BITS64
|
||||
/*----------------------------------------------------------------------------
|
||||
| The `LIT64' macro takes as its argument a textual integer literal and
|
||||
| if necessary ``marks'' the literal as having a 64-bit integer type.
|
||||
| For example, the GNU C Compiler (`gcc') requires that 64-bit literals be
|
||||
| appended with the letters `LL' standing for `long long', which is `gcc's
|
||||
| name for the 64-bit integer type. Some compilers may allow `LIT64' to be
|
||||
| defined as the identity macro: `#define LIT64( a ) a'.
|
||||
*----------------------------------------------------------------------------*/
|
||||
#define LIT64( a ) a##LL
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| The macro `INLINE' can be used before functions that should be inlined. If
|
||||
| a compiler does not support explicit inlining, this macro should be defined
|
||||
| to be `static'.
|
||||
*----------------------------------------------------------------------------*/
|
||||
//#define INLINE extern inline
|
||||
#define INLINE static inline
|
@ -1,45 +0,0 @@
|
||||
|
||||
/*============================================================================
|
||||
|
||||
This C header file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic
|
||||
Package, Release 2b.
|
||||
|
||||
Written by John R. Hauser. This work was made possible in part by the
|
||||
International Computer Science Institute, located at Suite 600, 1947 Center
|
||||
Street, Berkeley, California 94704. Funding was partially provided by the
|
||||
National Science Foundation under grant MIP-9311980. The original version
|
||||
of this code was written as part of a project to build a fixed-point vector
|
||||
processor in collaboration with the University of California at Berkeley,
|
||||
overseen by Profs. Nelson Morgan and John Wawrzynek. More information
|
||||
is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
|
||||
arithmetic/SoftFloat.html'.
|
||||
|
||||
THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has
|
||||
been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
|
||||
RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
|
||||
AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
|
||||
COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
|
||||
EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
|
||||
INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR
|
||||
OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
|
||||
|
||||
Derivative works are acceptable, even for commercial purposes, so long as
|
||||
(1) the source code for the derivative work includes prominent notice that
|
||||
the work is derivative, and (2) the source code includes prominent notice with
|
||||
these four paragraphs for those parts of this code that are retained.
|
||||
|
||||
=============================================================================*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Include common integer types and flags.
|
||||
*----------------------------------------------------------------------------*/
|
||||
#include "mednafen-gcc.h"
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Symbolic Boolean literals.
|
||||
*----------------------------------------------------------------------------*/
|
||||
enum {
|
||||
FALSE = 0,
|
||||
TRUE = 1
|
||||
};
|
||||
|
@ -1,627 +0,0 @@
|
||||
|
||||
/*============================================================================
|
||||
|
||||
This C source fragment is part of the SoftFloat IEC/IEEE Floating-point
|
||||
Arithmetic Package, Release 2b.
|
||||
|
||||
Written by John R. Hauser. This work was made possible in part by the
|
||||
International Computer Science Institute, located at Suite 600, 1947 Center
|
||||
Street, Berkeley, California 94704. Funding was partially provided by the
|
||||
National Science Foundation under grant MIP-9311980. The original version
|
||||
of this code was written as part of a project to build a fixed-point vector
|
||||
processor in collaboration with the University of California at Berkeley,
|
||||
overseen by Profs. Nelson Morgan and John Wawrzynek. More information
|
||||
is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
|
||||
arithmetic/SoftFloat.html'.
|
||||
|
||||
THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has
|
||||
been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
|
||||
RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
|
||||
AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
|
||||
COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
|
||||
EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
|
||||
INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR
|
||||
OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
|
||||
|
||||
Derivative works are acceptable, even for commercial purposes, so long as
|
||||
(1) the source code for the derivative work includes prominent notice that
|
||||
the work is derivative, and (2) the source code includes prominent notice with
|
||||
these four paragraphs for those parts of this code that are retained.
|
||||
|
||||
=============================================================================*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Shifts `a' right by the number of bits given in `count'. If any nonzero
|
||||
| bits are shifted off, they are ``jammed'' into the least significant bit of
|
||||
| the result by setting the least significant bit to 1. The value of `count'
|
||||
| can be arbitrarily large; in particular, if `count' is greater than 32, the
|
||||
| result will be either 0 or 1, depending on whether `a' is zero or nonzero.
|
||||
| The result is stored in the location pointed to by `zPtr'.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
INLINE void shift32RightJamming( bits32 a, int16 count, bits32 *zPtr )
|
||||
{
|
||||
bits32 z;
|
||||
|
||||
if ( count == 0 ) {
|
||||
z = a;
|
||||
}
|
||||
else if ( count < 32 ) {
|
||||
z = ( a>>count ) | ( ( a<<( ( - count ) & 31 ) ) != 0 );
|
||||
}
|
||||
else {
|
||||
z = ( a != 0 );
|
||||
}
|
||||
*zPtr = z;
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Shifts the 64-bit value formed by concatenating `a0' and `a1' right by the
|
||||
| number of bits given in `count'. Any bits shifted off are lost. The value
|
||||
| of `count' can be arbitrarily large; in particular, if `count' is greater
|
||||
| than 64, the result will be 0. The result is broken into two 32-bit pieces
|
||||
| which are stored at the locations pointed to by `z0Ptr' and `z1Ptr'.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
INLINE void
|
||||
shift64Right(
|
||||
bits32 a0, bits32 a1, int16 count, bits32 *z0Ptr, bits32 *z1Ptr )
|
||||
{
|
||||
bits32 z0, z1;
|
||||
int8 negCount = ( - count ) & 31;
|
||||
|
||||
if ( count == 0 ) {
|
||||
z1 = a1;
|
||||
z0 = a0;
|
||||
}
|
||||
else if ( count < 32 ) {
|
||||
z1 = ( a0<<negCount ) | ( a1>>count );
|
||||
z0 = a0>>count;
|
||||
}
|
||||
else {
|
||||
z1 = ( count < 64 ) ? ( a0>>( count & 31 ) ) : 0;
|
||||
z0 = 0;
|
||||
}
|
||||
*z1Ptr = z1;
|
||||
*z0Ptr = z0;
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Shifts the 64-bit value formed by concatenating `a0' and `a1' right by the
|
||||
| number of bits given in `count'. If any nonzero bits are shifted off, they
|
||||
| are ``jammed'' into the least significant bit of the result by setting the
|
||||
| least significant bit to 1. The value of `count' can be arbitrarily large;
|
||||
| in particular, if `count' is greater than 64, the result will be either 0
|
||||
| or 1, depending on whether the concatenation of `a0' and `a1' is zero or
|
||||
| nonzero. The result is broken into two 32-bit pieces which are stored at
|
||||
| the locations pointed to by `z0Ptr' and `z1Ptr'.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
INLINE void
|
||||
shift64RightJamming(
|
||||
bits32 a0, bits32 a1, int16 count, bits32 *z0Ptr, bits32 *z1Ptr )
|
||||
{
|
||||
bits32 z0, z1;
|
||||
int8 negCount = ( - count ) & 31;
|
||||
|
||||
if ( count == 0 ) {
|
||||
z1 = a1;
|
||||
z0 = a0;
|
||||
}
|
||||
else if ( count < 32 ) {
|
||||
z1 = ( a0<<negCount ) | ( a1>>count ) | ( ( a1<<negCount ) != 0 );
|
||||
z0 = a0>>count;
|
||||
}
|
||||
else {
|
||||
if ( count == 32 ) {
|
||||
z1 = a0 | ( a1 != 0 );
|
||||
}
|
||||
else if ( count < 64 ) {
|
||||
z1 = ( a0>>( count & 31 ) ) | ( ( ( a0<<negCount ) | a1 ) != 0 );
|
||||
}
|
||||
else {
|
||||
z1 = ( ( a0 | a1 ) != 0 );
|
||||
}
|
||||
z0 = 0;
|
||||
}
|
||||
*z1Ptr = z1;
|
||||
*z0Ptr = z0;
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Shifts the 96-bit value formed by concatenating `a0', `a1', and `a2' right
|
||||
| by 32 _plus_ the number of bits given in `count'. The shifted result is
|
||||
| at most 64 nonzero bits; these are broken into two 32-bit pieces which are
|
||||
| stored at the locations pointed to by `z0Ptr' and `z1Ptr'. The bits shifted
|
||||
| off form a third 32-bit result as follows: The _last_ bit shifted off is
|
||||
| the most-significant bit of the extra result, and the other 31 bits of the
|
||||
| extra result are all zero if and only if _all_but_the_last_ bits shifted off
|
||||
| were all zero. This extra result is stored in the location pointed to by
|
||||
| `z2Ptr'. The value of `count' can be arbitrarily large.
|
||||
| (This routine makes more sense if `a0', `a1', and `a2' are considered
|
||||
| to form a fixed-point value with binary point between `a1' and `a2'. This
|
||||
| fixed-point value is shifted right by the number of bits given in `count',
|
||||
| and the integer part of the result is returned at the locations pointed to
|
||||
| by `z0Ptr' and `z1Ptr'. The fractional part of the result may be slightly
|
||||
| corrupted as described above, and is returned at the location pointed to by
|
||||
| `z2Ptr'.)
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
INLINE void
|
||||
shift64ExtraRightJamming(
|
||||
bits32 a0,
|
||||
bits32 a1,
|
||||
bits32 a2,
|
||||
int16 count,
|
||||
bits32 *z0Ptr,
|
||||
bits32 *z1Ptr,
|
||||
bits32 *z2Ptr
|
||||
)
|
||||
{
|
||||
bits32 z0, z1, z2;
|
||||
int8 negCount = ( - count ) & 31;
|
||||
|
||||
if ( count == 0 ) {
|
||||
z2 = a2;
|
||||
z1 = a1;
|
||||
z0 = a0;
|
||||
}
|
||||
else {
|
||||
if ( count < 32 ) {
|
||||
z2 = a1<<negCount;
|
||||
z1 = ( a0<<negCount ) | ( a1>>count );
|
||||
z0 = a0>>count;
|
||||
}
|
||||
else {
|
||||
if ( count == 32 ) {
|
||||
z2 = a1;
|
||||
z1 = a0;
|
||||
}
|
||||
else {
|
||||
a2 |= a1;
|
||||
if ( count < 64 ) {
|
||||
z2 = a0<<negCount;
|
||||
z1 = a0>>( count & 31 );
|
||||
}
|
||||
else {
|
||||
z2 = ( count == 64 ) ? a0 : ( a0 != 0 );
|
||||
z1 = 0;
|
||||
}
|
||||
}
|
||||
z0 = 0;
|
||||
}
|
||||
z2 |= ( a2 != 0 );
|
||||
}
|
||||
*z2Ptr = z2;
|
||||
*z1Ptr = z1;
|
||||
*z0Ptr = z0;
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Shifts the 64-bit value formed by concatenating `a0' and `a1' left by the
|
||||
| number of bits given in `count'. Any bits shifted off are lost. The value
|
||||
| of `count' must be less than 32. The result is broken into two 32-bit
|
||||
| pieces which are stored at the locations pointed to by `z0Ptr' and `z1Ptr'.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
INLINE void
|
||||
shortShift64Left(
|
||||
bits32 a0, bits32 a1, int16 count, bits32 *z0Ptr, bits32 *z1Ptr )
|
||||
{
|
||||
|
||||
*z1Ptr = a1<<count;
|
||||
*z0Ptr =
|
||||
( count == 0 ) ? a0 : ( a0<<count ) | ( a1>>( ( - count ) & 31 ) );
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Shifts the 96-bit value formed by concatenating `a0', `a1', and `a2' left
|
||||
| by the number of bits given in `count'. Any bits shifted off are lost.
|
||||
| The value of `count' must be less than 32. The result is broken into three
|
||||
| 32-bit pieces which are stored at the locations pointed to by `z0Ptr',
|
||||
| `z1Ptr', and `z2Ptr'.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
INLINE void
|
||||
shortShift96Left(
|
||||
bits32 a0,
|
||||
bits32 a1,
|
||||
bits32 a2,
|
||||
int16 count,
|
||||
bits32 *z0Ptr,
|
||||
bits32 *z1Ptr,
|
||||
bits32 *z2Ptr
|
||||
)
|
||||
{
|
||||
bits32 z0, z1, z2;
|
||||
int8 negCount;
|
||||
|
||||
z2 = a2<<count;
|
||||
z1 = a1<<count;
|
||||
z0 = a0<<count;
|
||||
if ( 0 < count ) {
|
||||
negCount = ( ( - count ) & 31 );
|
||||
z1 |= a2>>negCount;
|
||||
z0 |= a1>>negCount;
|
||||
}
|
||||
*z2Ptr = z2;
|
||||
*z1Ptr = z1;
|
||||
*z0Ptr = z0;
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Adds the 64-bit value formed by concatenating `a0' and `a1' to the 64-bit
|
||||
| value formed by concatenating `b0' and `b1'. Addition is modulo 2^64, so
|
||||
| any carry out is lost. The result is broken into two 32-bit pieces which
|
||||
| are stored at the locations pointed to by `z0Ptr' and `z1Ptr'.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
INLINE void
|
||||
add64(
|
||||
bits32 a0, bits32 a1, bits32 b0, bits32 b1, bits32 *z0Ptr, bits32 *z1Ptr )
|
||||
{
|
||||
bits32 z1;
|
||||
|
||||
z1 = a1 + b1;
|
||||
*z1Ptr = z1;
|
||||
*z0Ptr = a0 + b0 + ( z1 < a1 );
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Adds the 96-bit value formed by concatenating `a0', `a1', and `a2' to the
|
||||
| 96-bit value formed by concatenating `b0', `b1', and `b2'. Addition is
|
||||
| modulo 2^96, so any carry out is lost. The result is broken into three
|
||||
| 32-bit pieces which are stored at the locations pointed to by `z0Ptr',
|
||||
| `z1Ptr', and `z2Ptr'.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
INLINE void
|
||||
add96(
|
||||
bits32 a0,
|
||||
bits32 a1,
|
||||
bits32 a2,
|
||||
bits32 b0,
|
||||
bits32 b1,
|
||||
bits32 b2,
|
||||
bits32 *z0Ptr,
|
||||
bits32 *z1Ptr,
|
||||
bits32 *z2Ptr
|
||||
)
|
||||
{
|
||||
bits32 z0, z1, z2;
|
||||
int8 carry0, carry1;
|
||||
|
||||
z2 = a2 + b2;
|
||||
carry1 = ( z2 < a2 );
|
||||
z1 = a1 + b1;
|
||||
carry0 = ( z1 < a1 );
|
||||
z0 = a0 + b0;
|
||||
z1 += carry1;
|
||||
z0 += ( z1 < carry1 );
|
||||
z0 += carry0;
|
||||
*z2Ptr = z2;
|
||||
*z1Ptr = z1;
|
||||
*z0Ptr = z0;
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Subtracts the 64-bit value formed by concatenating `b0' and `b1' from the
|
||||
| 64-bit value formed by concatenating `a0' and `a1'. Subtraction is modulo
|
||||
| 2^64, so any borrow out (carry out) is lost. The result is broken into two
|
||||
| 32-bit pieces which are stored at the locations pointed to by `z0Ptr' and
|
||||
| `z1Ptr'.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
INLINE void
|
||||
sub64(
|
||||
bits32 a0, bits32 a1, bits32 b0, bits32 b1, bits32 *z0Ptr, bits32 *z1Ptr )
|
||||
{
|
||||
|
||||
*z1Ptr = a1 - b1;
|
||||
*z0Ptr = a0 - b0 - ( a1 < b1 );
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Subtracts the 96-bit value formed by concatenating `b0', `b1', and `b2' from
|
||||
| the 96-bit value formed by concatenating `a0', `a1', and `a2'. Subtraction
|
||||
| is modulo 2^96, so any borrow out (carry out) is lost. The result is broken
|
||||
| into three 32-bit pieces which are stored at the locations pointed to by
|
||||
| `z0Ptr', `z1Ptr', and `z2Ptr'.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
INLINE void
|
||||
sub96(
|
||||
bits32 a0,
|
||||
bits32 a1,
|
||||
bits32 a2,
|
||||
bits32 b0,
|
||||
bits32 b1,
|
||||
bits32 b2,
|
||||
bits32 *z0Ptr,
|
||||
bits32 *z1Ptr,
|
||||
bits32 *z2Ptr
|
||||
)
|
||||
{
|
||||
bits32 z0, z1, z2;
|
||||
int8 borrow0, borrow1;
|
||||
|
||||
z2 = a2 - b2;
|
||||
borrow1 = ( a2 < b2 );
|
||||
z1 = a1 - b1;
|
||||
borrow0 = ( a1 < b1 );
|
||||
z0 = a0 - b0;
|
||||
z0 -= ( z1 < borrow1 );
|
||||
z1 -= borrow1;
|
||||
z0 -= borrow0;
|
||||
*z2Ptr = z2;
|
||||
*z1Ptr = z1;
|
||||
*z0Ptr = z0;
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Multiplies `a' by `b' to obtain a 64-bit product. The product is broken
|
||||
| into two 32-bit pieces which are stored at the locations pointed to by
|
||||
| `z0Ptr' and `z1Ptr'.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
INLINE void mul32To64( bits32 a, bits32 b, bits32 *z0Ptr, bits32 *z1Ptr )
|
||||
{
|
||||
bits16 aHigh, aLow, bHigh, bLow;
|
||||
bits32 z0, zMiddleA, zMiddleB, z1;
|
||||
|
||||
aLow = a;
|
||||
aHigh = a>>16;
|
||||
bLow = b;
|
||||
bHigh = b>>16;
|
||||
z1 = ( (bits32) aLow ) * bLow;
|
||||
zMiddleA = ( (bits32) aLow ) * bHigh;
|
||||
zMiddleB = ( (bits32) aHigh ) * bLow;
|
||||
z0 = ( (bits32) aHigh ) * bHigh;
|
||||
zMiddleA += zMiddleB;
|
||||
z0 += ( ( (bits32) ( zMiddleA < zMiddleB ) )<<16 ) + ( zMiddleA>>16 );
|
||||
zMiddleA <<= 16;
|
||||
z1 += zMiddleA;
|
||||
z0 += ( z1 < zMiddleA );
|
||||
*z1Ptr = z1;
|
||||
*z0Ptr = z0;
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Multiplies the 64-bit value formed by concatenating `a0' and `a1' by `b'
|
||||
| to obtain a 96-bit product. The product is broken into three 32-bit pieces
|
||||
| which are stored at the locations pointed to by `z0Ptr', `z1Ptr', and
|
||||
| `z2Ptr'.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
INLINE void
|
||||
mul64By32To96(
|
||||
bits32 a0,
|
||||
bits32 a1,
|
||||
bits32 b,
|
||||
bits32 *z0Ptr,
|
||||
bits32 *z1Ptr,
|
||||
bits32 *z2Ptr
|
||||
)
|
||||
{
|
||||
bits32 z0, z1, z2, more1;
|
||||
|
||||
mul32To64( a1, b, &z1, &z2 );
|
||||
mul32To64( a0, b, &z0, &more1 );
|
||||
add64( z0, more1, 0, z1, &z0, &z1 );
|
||||
*z2Ptr = z2;
|
||||
*z1Ptr = z1;
|
||||
*z0Ptr = z0;
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Multiplies the 64-bit value formed by concatenating `a0' and `a1' to the
|
||||
| 64-bit value formed by concatenating `b0' and `b1' to obtain a 128-bit
|
||||
| product. The product is broken into four 32-bit pieces which are stored at
|
||||
| the locations pointed to by `z0Ptr', `z1Ptr', `z2Ptr', and `z3Ptr'.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
INLINE void
|
||||
mul64To128(
|
||||
bits32 a0,
|
||||
bits32 a1,
|
||||
bits32 b0,
|
||||
bits32 b1,
|
||||
bits32 *z0Ptr,
|
||||
bits32 *z1Ptr,
|
||||
bits32 *z2Ptr,
|
||||
bits32 *z3Ptr
|
||||
)
|
||||
{
|
||||
bits32 z0, z1, z2, z3;
|
||||
bits32 more1, more2;
|
||||
|
||||
mul32To64( a1, b1, &z2, &z3 );
|
||||
mul32To64( a1, b0, &z1, &more2 );
|
||||
add64( z1, more2, 0, z2, &z1, &z2 );
|
||||
mul32To64( a0, b0, &z0, &more1 );
|
||||
add64( z0, more1, 0, z1, &z0, &z1 );
|
||||
mul32To64( a0, b1, &more1, &more2 );
|
||||
add64( more1, more2, 0, z2, &more1, &z2 );
|
||||
add64( z0, z1, 0, more1, &z0, &z1 );
|
||||
*z3Ptr = z3;
|
||||
*z2Ptr = z2;
|
||||
*z1Ptr = z1;
|
||||
*z0Ptr = z0;
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Returns an approximation to the 32-bit integer quotient obtained by dividing
|
||||
| `b' into the 64-bit value formed by concatenating `a0' and `a1'. The
|
||||
| divisor `b' must be at least 2^31. If q is the exact quotient truncated
|
||||
| toward zero, the approximation returned lies between q and q + 2 inclusive.
|
||||
| If the exact quotient q is larger than 32 bits, the maximum positive 32-bit
|
||||
| unsigned integer is returned.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
static bits32 estimateDiv64To32( bits32 a0, bits32 a1, bits32 b )
|
||||
{
|
||||
bits32 b0, b1;
|
||||
bits32 rem0, rem1, term0, term1;
|
||||
bits32 z;
|
||||
|
||||
if ( b <= a0 ) return 0xFFFFFFFF;
|
||||
b0 = b>>16;
|
||||
z = ( b0<<16 <= a0 ) ? 0xFFFF0000 : ( a0 / b0 )<<16;
|
||||
mul32To64( b, z, &term0, &term1 );
|
||||
sub64( a0, a1, term0, term1, &rem0, &rem1 );
|
||||
while ( ( (sbits32) rem0 ) < 0 ) {
|
||||
z -= 0x10000;
|
||||
b1 = b<<16;
|
||||
add64( rem0, rem1, b0, b1, &rem0, &rem1 );
|
||||
}
|
||||
rem0 = ( rem0<<16 ) | ( rem1>>16 );
|
||||
z |= ( b0<<16 <= rem0 ) ? 0xFFFF : rem0 / b0;
|
||||
return z;
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Returns an approximation to the square root of the 32-bit significand given
|
||||
| by `a'. Considered as an integer, `a' must be at least 2^31. If bit 0 of
|
||||
| `aExp' (the least significant bit) is 1, the integer returned approximates
|
||||
| 2^31*sqrt(`a'/2^31), where `a' is considered an integer. If bit 0 of `aExp'
|
||||
| is 0, the integer returned approximates 2^31*sqrt(`a'/2^30). In either
|
||||
| case, the approximation returned lies strictly within +/-2 of the exact
|
||||
| value.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
static bits32 estimateSqrt32( int16 aExp, bits32 a )
|
||||
{
|
||||
static const bits16 sqrtOddAdjustments[] = {
|
||||
0x0004, 0x0022, 0x005D, 0x00B1, 0x011D, 0x019F, 0x0236, 0x02E0,
|
||||
0x039C, 0x0468, 0x0545, 0x0631, 0x072B, 0x0832, 0x0946, 0x0A67
|
||||
};
|
||||
static const bits16 sqrtEvenAdjustments[] = {
|
||||
0x0A2D, 0x08AF, 0x075A, 0x0629, 0x051A, 0x0429, 0x0356, 0x029E,
|
||||
0x0200, 0x0179, 0x0109, 0x00AF, 0x0068, 0x0034, 0x0012, 0x0002
|
||||
};
|
||||
int8 index;
|
||||
bits32 z;
|
||||
|
||||
index = ( a>>27 ) & 15;
|
||||
if ( aExp & 1 ) {
|
||||
z = 0x4000 + ( a>>17 ) - sqrtOddAdjustments[ index ];
|
||||
z = ( ( a / z )<<14 ) + ( z<<15 );
|
||||
a >>= 1;
|
||||
}
|
||||
else {
|
||||
z = 0x8000 + ( a>>17 ) - sqrtEvenAdjustments[ index ];
|
||||
z = a / z + z;
|
||||
z = ( 0x20000 <= z ) ? 0xFFFF8000 : ( z<<15 );
|
||||
if ( z <= a ) return (bits32) ( ( (sbits32) a )>>1 );
|
||||
}
|
||||
return ( ( estimateDiv64To32( a, 0, z ) )>>1 ) + ( z>>1 );
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Returns the number of leading 0 bits before the most-significant 1 bit of
|
||||
| `a'. If `a' is zero, 32 is returned.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
static int8 countLeadingZeros32( bits32 a )
|
||||
{
|
||||
static const int8 countLeadingZerosHigh[] = {
|
||||
8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
};
|
||||
int8 shiftCount;
|
||||
|
||||
shiftCount = 0;
|
||||
if ( a < 0x10000 ) {
|
||||
shiftCount += 16;
|
||||
a <<= 16;
|
||||
}
|
||||
if ( a < 0x1000000 ) {
|
||||
shiftCount += 8;
|
||||
a <<= 8;
|
||||
}
|
||||
shiftCount += countLeadingZerosHigh[ a>>24 ];
|
||||
return shiftCount;
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Returns 1 if the 64-bit value formed by concatenating `a0' and `a1' is
|
||||
| equal to the 64-bit value formed by concatenating `b0' and `b1'. Otherwise,
|
||||
| returns 0.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
INLINE flag eq64( bits32 a0, bits32 a1, bits32 b0, bits32 b1 )
|
||||
{
|
||||
|
||||
return ( a0 == b0 ) && ( a1 == b1 );
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Returns 1 if the 64-bit value formed by concatenating `a0' and `a1' is less
|
||||
| than or equal to the 64-bit value formed by concatenating `b0' and `b1'.
|
||||
| Otherwise, returns 0.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
INLINE flag le64( bits32 a0, bits32 a1, bits32 b0, bits32 b1 )
|
||||
{
|
||||
|
||||
return ( a0 < b0 ) || ( ( a0 == b0 ) && ( a1 <= b1 ) );
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Returns 1 if the 64-bit value formed by concatenating `a0' and `a1' is less
|
||||
| than the 64-bit value formed by concatenating `b0' and `b1'. Otherwise,
|
||||
| returns 0.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
INLINE flag lt64( bits32 a0, bits32 a1, bits32 b0, bits32 b1 )
|
||||
{
|
||||
|
||||
return ( a0 < b0 ) || ( ( a0 == b0 ) && ( a1 < b1 ) );
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Returns 1 if the 64-bit value formed by concatenating `a0' and `a1' is not
|
||||
| equal to the 64-bit value formed by concatenating `b0' and `b1'. Otherwise,
|
||||
| returns 0.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
INLINE flag ne64( bits32 a0, bits32 a1, bits32 b0, bits32 b1 )
|
||||
{
|
||||
|
||||
return ( a0 != b0 ) || ( a1 != b1 );
|
||||
|
||||
}
|
||||
|
@ -1,242 +0,0 @@
|
||||
|
||||
/*============================================================================
|
||||
|
||||
This C source fragment is part of the SoftFloat IEC/IEEE Floating-point
|
||||
Arithmetic Package, Release 2b.
|
||||
|
||||
Written by John R. Hauser. This work was made possible in part by the
|
||||
International Computer Science Institute, located at Suite 600, 1947 Center
|
||||
Street, Berkeley, California 94704. Funding was partially provided by the
|
||||
National Science Foundation under grant MIP-9311980. The original version
|
||||
of this code was written as part of a project to build a fixed-point vector
|
||||
processor in collaboration with the University of California at Berkeley,
|
||||
overseen by Profs. Nelson Morgan and John Wawrzynek. More information
|
||||
is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
|
||||
arithmetic/SoftFloat.html'.
|
||||
|
||||
THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has
|
||||
been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
|
||||
RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
|
||||
AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
|
||||
COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
|
||||
EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
|
||||
INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR
|
||||
OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
|
||||
|
||||
Derivative works are acceptable, even for commercial purposes, so long as
|
||||
(1) the source code for the derivative work includes prominent notice that
|
||||
the work is derivative, and (2) the source code includes prominent notice with
|
||||
these four paragraphs for those parts of this code that are retained.
|
||||
|
||||
=============================================================================*/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Underflow tininess-detection mode, statically initialized to default value.
|
||||
| (The declaration in `softfloat.h' must match the `int8' type here.)
|
||||
*----------------------------------------------------------------------------*/
|
||||
int8 float_detect_tininess = float_tininess_after_rounding;
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Raises the exceptions specified by `flags'. Floating-point traps can be
|
||||
| defined here if desired. It is currently not possible for such a trap
|
||||
| to substitute a result value. If traps are not implemented, this routine
|
||||
| should be simply `float_exception_flags |= flags;'.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
void float_raise( int8 flags )
|
||||
{
|
||||
|
||||
float_exception_flags |= flags;
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Internal canonical NaN format.
|
||||
*----------------------------------------------------------------------------*/
|
||||
typedef struct {
|
||||
flag sign;
|
||||
bits32 high, low;
|
||||
} commonNaNT;
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| The pattern for a default generated single-precision NaN.
|
||||
*----------------------------------------------------------------------------*/
|
||||
enum {
|
||||
float32_default_nan = 0xFFFFFFFF
|
||||
};
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Returns 1 if the single-precision floating-point value `a' is a NaN;
|
||||
| otherwise returns 0.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
flag float32_is_nan( float32 a )
|
||||
{
|
||||
|
||||
return ( 0xFF000000 < (bits32) ( a<<1 ) );
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Returns 1 if the single-precision floating-point value `a' is a signaling
|
||||
| NaN; otherwise returns 0.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
flag float32_is_signaling_nan( float32 a )
|
||||
{
|
||||
|
||||
return ( ( ( a>>22 ) & 0x1FF ) == 0x1FE ) && ( a & 0x003FFFFF );
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Returns the result of converting the single-precision floating-point NaN
|
||||
| `a' to the canonical NaN format. If `a' is a signaling NaN, the invalid
|
||||
| exception is raised.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
static commonNaNT float32ToCommonNaN( float32 a )
|
||||
{
|
||||
commonNaNT z;
|
||||
|
||||
if ( float32_is_signaling_nan( a ) ) float_raise( float_flag_invalid );
|
||||
z.sign = a>>31;
|
||||
z.low = 0;
|
||||
z.high = a<<9;
|
||||
return z;
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Returns the result of converting the canonical NaN `a' to the single-
|
||||
| precision floating-point format.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
static float32 commonNaNToFloat32( commonNaNT a )
|
||||
{
|
||||
|
||||
return ( ( (bits32) a.sign )<<31 ) | 0x7FC00000 | ( a.high>>9 );
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Takes two single-precision floating-point values `a' and `b', one of which
|
||||
| is a NaN, and returns the appropriate NaN result. If either `a' or `b' is a
|
||||
| signaling NaN, the invalid exception is raised.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
static float32 propagateFloat32NaN( float32 a, float32 b )
|
||||
{
|
||||
flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN;
|
||||
|
||||
aIsNaN = float32_is_nan( a );
|
||||
aIsSignalingNaN = float32_is_signaling_nan( a );
|
||||
bIsNaN = float32_is_nan( b );
|
||||
bIsSignalingNaN = float32_is_signaling_nan( b );
|
||||
a |= 0x00400000;
|
||||
b |= 0x00400000;
|
||||
if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise( float_flag_invalid );
|
||||
if ( aIsNaN ) {
|
||||
return ( aIsSignalingNaN & bIsNaN ) ? b : a;
|
||||
}
|
||||
else {
|
||||
return b;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| The pattern for a default generated double-precision NaN. The `high' and
|
||||
| `low' values hold the most- and least-significant bits, respectively.
|
||||
*----------------------------------------------------------------------------*/
|
||||
enum {
|
||||
float64_default_nan_high = 0xFFFFFFFF,
|
||||
float64_default_nan_low = 0xFFFFFFFF
|
||||
};
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Returns 1 if the double-precision floating-point value `a' is a NaN;
|
||||
| otherwise returns 0.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
flag float64_is_nan( float64 a )
|
||||
{
|
||||
|
||||
return
|
||||
( 0xFFE00000 <= (bits32) ( a.high<<1 ) )
|
||||
&& ( a.low || ( a.high & 0x000FFFFF ) );
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Returns 1 if the double-precision floating-point value `a' is a signaling
|
||||
| NaN; otherwise returns 0.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
flag float64_is_signaling_nan( float64 a )
|
||||
{
|
||||
|
||||
return
|
||||
( ( ( a.high>>19 ) & 0xFFF ) == 0xFFE )
|
||||
&& ( a.low || ( a.high & 0x0007FFFF ) );
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Returns the result of converting the double-precision floating-point NaN
|
||||
| `a' to the canonical NaN format. If `a' is a signaling NaN, the invalid
|
||||
| exception is raised.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
static commonNaNT float64ToCommonNaN( float64 a )
|
||||
{
|
||||
commonNaNT z;
|
||||
|
||||
if ( float64_is_signaling_nan( a ) ) float_raise( float_flag_invalid );
|
||||
z.sign = a.high>>31;
|
||||
shortShift64Left( a.high, a.low, 12, &z.high, &z.low );
|
||||
return z;
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Returns the result of converting the canonical NaN `a' to the double-
|
||||
| precision floating-point format.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
static float64 commonNaNToFloat64( commonNaNT a )
|
||||
{
|
||||
float64 z;
|
||||
|
||||
shift64Right( a.high, a.low, 12, &z.high, &z.low );
|
||||
z.high |= ( ( (bits32) a.sign )<<31 ) | 0x7FF80000;
|
||||
return z;
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Takes two double-precision floating-point values `a' and `b', one of which
|
||||
| is a NaN, and returns the appropriate NaN result. If either `a' or `b' is a
|
||||
| signaling NaN, the invalid exception is raised.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
static float64 propagateFloat64NaN( float64 a, float64 b )
|
||||
{
|
||||
flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN;
|
||||
|
||||
aIsNaN = float64_is_nan( a );
|
||||
aIsSignalingNaN = float64_is_signaling_nan( a );
|
||||
bIsNaN = float64_is_nan( b );
|
||||
bIsSignalingNaN = float64_is_signaling_nan( b );
|
||||
a.high |= 0x00080000;
|
||||
b.high |= 0x00080000;
|
||||
if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise( float_flag_invalid );
|
||||
if ( aIsNaN ) {
|
||||
return ( aIsSignalingNaN & bIsNaN ) ? b : a;
|
||||
}
|
||||
else {
|
||||
return b;
|
||||
}
|
||||
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,141 +0,0 @@
|
||||
|
||||
/*============================================================================
|
||||
|
||||
This C header file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic
|
||||
Package, Release 2b.
|
||||
|
||||
Written by John R. Hauser. This work was made possible in part by the
|
||||
International Computer Science Institute, located at Suite 600, 1947 Center
|
||||
Street, Berkeley, California 94704. Funding was partially provided by the
|
||||
National Science Foundation under grant MIP-9311980. The original version
|
||||
of this code was written as part of a project to build a fixed-point vector
|
||||
processor in collaboration with the University of California at Berkeley,
|
||||
overseen by Profs. Nelson Morgan and John Wawrzynek. More information
|
||||
is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
|
||||
arithmetic/SoftFloat.html'.
|
||||
|
||||
THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has
|
||||
been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
|
||||
RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
|
||||
AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
|
||||
COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
|
||||
EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
|
||||
INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR
|
||||
OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
|
||||
|
||||
Derivative works are acceptable, even for commercial purposes, so long as
|
||||
(1) the source code for the derivative work includes prominent notice that
|
||||
the work is derivative, and (2) the source code includes prominent notice with
|
||||
these four paragraphs for those parts of this code that are retained.
|
||||
|
||||
=============================================================================*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Software IEC/IEEE floating-point types.
|
||||
*----------------------------------------------------------------------------*/
|
||||
typedef uint32 float32;
|
||||
typedef struct {
|
||||
uint32 high, low;
|
||||
} float64;
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Software IEC/IEEE floating-point underflow tininess-detection mode.
|
||||
*----------------------------------------------------------------------------*/
|
||||
extern int8 float_detect_tininess;
|
||||
enum {
|
||||
float_tininess_after_rounding = 0,
|
||||
float_tininess_before_rounding = 1
|
||||
};
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Software IEC/IEEE floating-point rounding mode.
|
||||
*----------------------------------------------------------------------------*/
|
||||
extern int8 float_rounding_mode;
|
||||
enum {
|
||||
float_round_nearest_even = 0,
|
||||
float_round_to_zero = 1,
|
||||
float_round_down = 2,
|
||||
float_round_up = 3
|
||||
};
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Software IEC/IEEE floating-point exception flags.
|
||||
*----------------------------------------------------------------------------*/
|
||||
extern int8 float_exception_flags;
|
||||
enum {
|
||||
float_flag_inexact = 1,
|
||||
float_flag_underflow = 2,
|
||||
float_flag_overflow = 4,
|
||||
float_flag_divbyzero = 8,
|
||||
float_flag_invalid = 16
|
||||
};
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Routine to raise any or all of the software IEC/IEEE floating-point
|
||||
| exception flags.
|
||||
*----------------------------------------------------------------------------*/
|
||||
void float_raise( int8 );
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Software IEC/IEEE integer-to-floating-point conversion routines.
|
||||
*----------------------------------------------------------------------------*/
|
||||
float32 int32_to_float32( int32 );
|
||||
float64 int32_to_float64( int32 );
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Software IEC/IEEE single-precision conversion routines.
|
||||
*----------------------------------------------------------------------------*/
|
||||
int32 float32_to_int32( float32 );
|
||||
int32 float32_to_int32_round_to_zero( float32 );
|
||||
float64 float32_to_float64( float32 );
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Software IEC/IEEE single-precision operations.
|
||||
*----------------------------------------------------------------------------*/
|
||||
float32 float32_round_to_int( float32 );
|
||||
float32 float32_add( float32, float32 );
|
||||
float32 float32_sub( float32, float32 );
|
||||
float32 float32_mul( float32, float32 );
|
||||
float32 float32_div( float32, float32 );
|
||||
float32 float32_rem( float32, float32 );
|
||||
float32 float32_sqrt( float32 );
|
||||
char float32_eq( float32, float32 );
|
||||
char float32_le( float32, float32 );
|
||||
char float32_lt( float32, float32 );
|
||||
char float32_eq_signaling( float32, float32 );
|
||||
char float32_le_quiet( float32, float32 );
|
||||
char float32_lt_quiet( float32, float32 );
|
||||
char float32_is_signaling_nan( float32 );
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Software IEC/IEEE double-precision conversion routines.
|
||||
*----------------------------------------------------------------------------*/
|
||||
int32 float64_to_int32( float64 );
|
||||
int32 float64_to_int32_round_to_zero( float64 );
|
||||
float32 float64_to_float32( float64 );
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Software IEC/IEEE double-precision operations.
|
||||
*----------------------------------------------------------------------------*/
|
||||
float64 float64_round_to_int( float64 );
|
||||
float64 float64_add( float64, float64 );
|
||||
float64 float64_sub( float64, float64 );
|
||||
float64 float64_mul( float64, float64 );
|
||||
float64 float64_div( float64, float64 );
|
||||
float64 float64_rem( float64, float64 );
|
||||
float64 float64_sqrt( float64 );
|
||||
char float64_eq( float64, float64 );
|
||||
char float64_le( float64, float64 );
|
||||
char float64_lt( float64, float64 );
|
||||
char float64_eq_signaling( float64, float64 );
|
||||
char float64_le_quiet( float64, float64 );
|
||||
char float64_lt_quiet( float64, float64 );
|
||||
char float64_is_signaling_nan( float64 );
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,359 +0,0 @@
|
||||
////////////////////////////////////////////////////////////////
|
||||
// Defines for the V810 CPU
|
||||
|
||||
#ifndef V810_CPU_H_
|
||||
#define V810_CPU_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "fpu-new/softfloat.h"
|
||||
|
||||
typedef int32 v810_timestamp_t;
|
||||
|
||||
#define V810_FAST_MAP_SHIFT 16
|
||||
#define V810_FAST_MAP_PSIZE (1 << V810_FAST_MAP_SHIFT)
|
||||
#define V810_FAST_MAP_TRAMPOLINE_SIZE 1024
|
||||
|
||||
// Exception codes
|
||||
enum
|
||||
{
|
||||
ECODE_TRAP_BASE = 0xFFA0,
|
||||
ECODE_INVALID_OP = 0xFF90,
|
||||
ECODE_ZERO_DIV = 0xFF80, // Integer divide by 0
|
||||
ECODE_FIV = 0xFF70, // Floating point invalid operation
|
||||
ECODE_FZD = 0xFF68, // Floating point zero division
|
||||
ECODE_FOV = 0xFF64, // Floating point overflow
|
||||
//#define ECODE_FUD 0xFF62 // Floating point underflow(unused on V810)
|
||||
//#define ECODE_FPR 0xFF61 // Floating point precision degradation(unused on V810)
|
||||
ECODE_FRO = 0xFF60 // Floating point reserved operand
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
INVALID_OP_HANDLER_ADDR = 0xFFFFFF90, // Invalid opcode/instruction code!
|
||||
ZERO_DIV_HANDLER_ADDR = 0xFFFFFF80, // Integer divide by 0 exception
|
||||
FPU_HANDLER_ADDR = 0xFFFFFF60, // FPU exception
|
||||
TRAP_HANDLER_BASE = 0xFFFFFFA0 // TRAP instruction
|
||||
};
|
||||
|
||||
//System Register Defines (these are the only valid system registers!)
|
||||
#define EIPC 0 //Exeption/Interupt PC
|
||||
#define EIPSW 1 //Exeption/Interupt PSW
|
||||
|
||||
#define FEPC 2 //Fatal Error PC
|
||||
#define FEPSW 3 //Fatal Error PSW
|
||||
|
||||
#define ECR 4 //Exception Cause Register
|
||||
#define PSW 5 //Program Status Word
|
||||
#define PIR 6 //Processor ID Register
|
||||
#define TKCW 7 //Task Controll Word
|
||||
#define CHCW 24 //Cashe Controll Word
|
||||
#define ADDTRE 25 //ADDTRE
|
||||
|
||||
//PSW Specifics
|
||||
#define PSW_IA 0xF0000 // All Interupt bits...
|
||||
#define PSW_I3 0x80000
|
||||
#define PSW_I2 0x40000
|
||||
#define PSW_I1 0x20000
|
||||
#define PSW_I0 0x10000
|
||||
|
||||
#define PSW_NP 0x08000
|
||||
#define PSW_EP 0x04000
|
||||
|
||||
#define PSW_AE 0x02000
|
||||
|
||||
#define PSW_ID 0x01000
|
||||
|
||||
#define PSW_FRO 0x00200 // Floating point reserved operand(set on denormal, NaN, or indefinite)
|
||||
#define PSW_FIV 0x00100 // Floating point invalid operation(set when trying to convert a number too large to an (un)signed integer)
|
||||
|
||||
#define PSW_FZD 0x00080 // Floating point divide by zero
|
||||
#define PSW_FOV 0x00040 // Floating point overflow
|
||||
#define PSW_FUD 0x00020 // Floating point underflow
|
||||
#define PSW_FPR 0x00010 // Floating point precision degradation
|
||||
|
||||
#define PSW_CY 0x00008
|
||||
#define PSW_OV 0x00004
|
||||
#define PSW_S 0x00002
|
||||
#define PSW_Z 0x00001
|
||||
|
||||
//condition codes
|
||||
#define COND_V 0
|
||||
#define COND_C 1
|
||||
#define COND_Z 2
|
||||
#define COND_NH 3
|
||||
#define COND_S 4
|
||||
#define COND_T 5
|
||||
#define COND_LT 6
|
||||
#define COND_LE 7
|
||||
#define COND_NV 8
|
||||
#define COND_NC 9
|
||||
#define COND_NZ 10
|
||||
#define COND_H 11
|
||||
#define COND_NS 12
|
||||
#define COND_F 13
|
||||
#define COND_GE 14
|
||||
#define COND_GT 15
|
||||
|
||||
#define TESTCOND_V (S_REG[PSW]&PSW_OV)
|
||||
|
||||
#define TESTCOND_L (S_REG[PSW]&PSW_CY)
|
||||
#define TESTCOND_C TESTCOND_L
|
||||
|
||||
#define TESTCOND_E (S_REG[PSW]&PSW_Z)
|
||||
#define TESTCOND_Z TESTCOND_E
|
||||
|
||||
#define TESTCOND_NH ( (S_REG[PSW]&PSW_Z) || (S_REG[PSW]&PSW_CY) )
|
||||
#define TESTCOND_N (S_REG[PSW]&PSW_S)
|
||||
#define TESTCOND_S TESTCOND_N
|
||||
|
||||
#define TESTCOND_LT ( (!!(S_REG[PSW]&PSW_S)) ^ (!!(S_REG[PSW]&PSW_OV)) )
|
||||
#define TESTCOND_LE ( ((!!(S_REG[PSW]&PSW_S)) ^ (!!(S_REG[PSW]&PSW_OV))) || (S_REG[PSW]&PSW_Z) )
|
||||
#define TESTCOND_NV (!(S_REG[PSW]&PSW_OV))
|
||||
|
||||
#define TESTCOND_NL (!(S_REG[PSW]&PSW_CY))
|
||||
#define TESTCOND_NC TESTCOND_NL
|
||||
|
||||
#define TESTCOND_NE (!(S_REG[PSW]&PSW_Z))
|
||||
#define TESTCOND_NZ TESTCOND_NE
|
||||
|
||||
#define TESTCOND_H ( !((S_REG[PSW]&PSW_Z) || (S_REG[PSW]&PSW_CY)) )
|
||||
#define TESTCOND_P (!(S_REG[PSW] & PSW_S))
|
||||
#define TESTCOND_NS TESTCOND_P
|
||||
|
||||
#define TESTCOND_GE (!((!!(S_REG[PSW]&PSW_S))^(!!(S_REG[PSW]&PSW_OV))))
|
||||
#define TESTCOND_GT (! (((!!(S_REG[PSW]&PSW_S))^(!!(S_REG[PSW]&PSW_OV))) || (S_REG[PSW]&PSW_Z)) )
|
||||
|
||||
// Tag layout
|
||||
// Bit 0-21: TAG31-TAG10
|
||||
// Bit 22-23: Validity bits(one for each 4-byte subblock)
|
||||
// Bit 24-27: NECRV("Reserved")
|
||||
// Bit 28-31: 0
|
||||
|
||||
typedef enum
|
||||
{
|
||||
V810_EMU_MODE_FAST = 0,
|
||||
V810_EMU_MODE_ACCURATE = 1,
|
||||
_V810_EMU_MODE_COUNT
|
||||
} V810_Emu_Mode;
|
||||
|
||||
//
|
||||
// WARNING: Do NOT instantiate this class in multiple threads in such a way that both threads can be inside a method of this class at the same time.
|
||||
// To fix this, you'll need to put locks or something(re-engineer it to use state passed in through pointers) around the SoftFloat code.
|
||||
//
|
||||
|
||||
|
||||
class V810
|
||||
{
|
||||
public:
|
||||
|
||||
V810();
|
||||
~V810();
|
||||
|
||||
// Pass TRUE for vb_mode if we're emulating a VB-specific enhanced V810 CPU core
|
||||
bool Init(V810_Emu_Mode mode, bool vb_mode);
|
||||
void Kill(void);
|
||||
|
||||
void SetInt(int level);
|
||||
|
||||
void SetMemWriteBus32(uint8 A, bool value);
|
||||
void SetMemReadBus32(uint8 A, bool value);
|
||||
|
||||
void SetMemReadHandlers(uint8 MDFN_FASTCALL (*read8)(v810_timestamp_t &, uint32), uint16 MDFN_FASTCALL (*read16)(v810_timestamp_t &, uint32), uint32 MDFN_FASTCALL (*read32)(v810_timestamp_t &, uint32));
|
||||
void SetMemWriteHandlers(void MDFN_FASTCALL (*write8)(v810_timestamp_t &, uint32, uint8), void MDFN_FASTCALL (*write16)(v810_timestamp_t &, uint32, uint16), void MDFN_FASTCALL (*write32)(v810_timestamp_t &, uint32, uint32));
|
||||
|
||||
void SetIOReadHandlers(uint8 MDFN_FASTCALL (*read8)(v810_timestamp_t &, uint32), uint16 MDFN_FASTCALL (*read16)(v810_timestamp_t &, uint32), uint32 MDFN_FASTCALL (*read32)(v810_timestamp_t &, uint32));
|
||||
void SetIOWriteHandlers(void MDFN_FASTCALL (*write8)(v810_timestamp_t &, uint32, uint8), void MDFN_FASTCALL (*write16)(v810_timestamp_t &, uint32, uint16), void MDFN_FASTCALL (*write32)(v810_timestamp_t &, uint32, uint32));
|
||||
|
||||
// Length specifies the number of bytes to map in, at each location specified by addresses[] (for mirroring)
|
||||
uint8 *SetFastMap(uint32 addresses[], uint32 length, unsigned int num_addresses, const char *name);
|
||||
|
||||
INLINE void ResetTS(v810_timestamp_t new_base_timestamp)
|
||||
{
|
||||
assert(next_event_ts > v810_timestamp);
|
||||
|
||||
next_event_ts -= (v810_timestamp - new_base_timestamp);
|
||||
v810_timestamp = new_base_timestamp;
|
||||
}
|
||||
|
||||
INLINE void SetEventNT(const v810_timestamp_t timestamp)
|
||||
{
|
||||
next_event_ts = timestamp;
|
||||
}
|
||||
|
||||
INLINE v810_timestamp_t GetEventNT(void)
|
||||
{
|
||||
return(next_event_ts);
|
||||
}
|
||||
|
||||
v810_timestamp_t Run(int32 MDFN_FASTCALL (*event_handler)(const v810_timestamp_t timestamp));
|
||||
void Exit(void);
|
||||
|
||||
void Reset(void);
|
||||
|
||||
int StateAction(StateMem *sm, int load, int data_only);
|
||||
|
||||
#ifdef WANT_DEBUGGER
|
||||
void CheckBreakpoints(void (*callback)(int type, uint32 address, uint32 value, unsigned int len), uint16 MDFN_FASTCALL (*peek16)(const v810_timestamp_t, uint32), uint32 MDFN_FASTCALL (*peek32)(const v810_timestamp_t, uint32));
|
||||
void SetCPUHook(void (*newhook)(const v810_timestamp_t timestamp, uint32 PC), void (*new_ADDBT)(uint32, uint32, uint32));
|
||||
#endif
|
||||
uint32 GetPC(void);
|
||||
void SetPC(uint32);
|
||||
|
||||
uint32 GetPR(const unsigned int which);
|
||||
void SetPR(const unsigned int which, uint32 value);
|
||||
|
||||
uint32 GetSR(const unsigned int which);
|
||||
void SetSR(const unsigned int which, uint32 value);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Make sure P_REG[] is the first variable/array in this class, so non-zerfo offset encoding(at assembly level) isn't necessary to access it.
|
||||
uint32 P_REG[32]; // Program registers pr0-pr31
|
||||
uint32 S_REG[32]; // System registers sr0-sr31
|
||||
uint32 PC;
|
||||
uint8 *PC_ptr;
|
||||
uint8 *PC_base;
|
||||
|
||||
uint32 IPendingCache;
|
||||
void RecalcIPendingCache(void);
|
||||
|
||||
public:
|
||||
v810_timestamp_t v810_timestamp; // Will never be less than 0.
|
||||
|
||||
private:
|
||||
v810_timestamp_t next_event_ts;
|
||||
|
||||
enum
|
||||
{
|
||||
LASTOP_NORMAL = 0,
|
||||
LASTOP_LOAD = 1,
|
||||
LASTOP_STORE = 2,
|
||||
LASTOP_IN = 3,
|
||||
LASTOP_OUT = 4,
|
||||
LASTOP_HEAVY_MATH = 5
|
||||
};
|
||||
|
||||
V810_Emu_Mode EmuMode;
|
||||
bool VBMode;
|
||||
|
||||
void Run_Fast(int32 MDFN_FASTCALL (*event_handler)(const v810_timestamp_t timestamp)) NO_INLINE;
|
||||
void Run_Accurate(int32 MDFN_FASTCALL (*event_handler)(const v810_timestamp_t timestamp)) NO_INLINE;
|
||||
|
||||
#ifdef WANT_DEBUGGER
|
||||
void Run_Fast_Debug(int32 MDFN_FASTCALL (*event_handler)(const v810_timestamp_t timestamp)) NO_INLINE;
|
||||
void Run_Accurate_Debug(int32 MDFN_FASTCALL (*event_handler)(const v810_timestamp_t timestamp)) NO_INLINE;
|
||||
#endif
|
||||
|
||||
uint8 MDFN_FASTCALL (*MemRead8)(v810_timestamp_t ×tamp, uint32 A);
|
||||
uint16 MDFN_FASTCALL (*MemRead16)(v810_timestamp_t ×tamp, uint32 A);
|
||||
uint32 MDFN_FASTCALL (*MemRead32)(v810_timestamp_t ×tamp, uint32 A);
|
||||
|
||||
void MDFN_FASTCALL (*MemWrite8)(v810_timestamp_t ×tamp, uint32 A, uint8 V);
|
||||
void MDFN_FASTCALL (*MemWrite16)(v810_timestamp_t ×tamp, uint32 A, uint16 V);
|
||||
void MDFN_FASTCALL (*MemWrite32)(v810_timestamp_t ×tamp, uint32 A, uint32 V);
|
||||
|
||||
uint8 MDFN_FASTCALL (*IORead8)(v810_timestamp_t ×tamp, uint32 A);
|
||||
uint16 MDFN_FASTCALL (*IORead16)(v810_timestamp_t ×tamp, uint32 A);
|
||||
uint32 MDFN_FASTCALL (*IORead32)(v810_timestamp_t ×tamp, uint32 A);
|
||||
|
||||
void MDFN_FASTCALL (*IOWrite8)(v810_timestamp_t ×tamp, uint32 A, uint8 V);
|
||||
void MDFN_FASTCALL (*IOWrite16)(v810_timestamp_t ×tamp, uint32 A, uint16 V);
|
||||
void MDFN_FASTCALL (*IOWrite32)(v810_timestamp_t ×tamp, uint32 A, uint32 V);
|
||||
|
||||
bool MemReadBus32[256]; // Corresponding to the upper 8 bits of the memory address map.
|
||||
bool MemWriteBus32[256];
|
||||
|
||||
int32 lastop; // Set to -1 on FP/MUL/DIV, 0x100 on LD, 0x200 on ST, 0x400 on in, 0x800 on out, and the actual opcode * 2(or >= 0) on everything else.
|
||||
|
||||
#define LASTOP_LD 0x100
|
||||
#define LASTOP_ST 0x200
|
||||
#define LASTOP_IN 0x400
|
||||
#define LASTOP_OUT 0x800
|
||||
|
||||
enum
|
||||
{
|
||||
HALT_NONE = 0,
|
||||
HALT_HALT = 1,
|
||||
HALT_FATAL_EXCEPTION = 2
|
||||
};
|
||||
|
||||
uint8 Halted;
|
||||
|
||||
bool Running;
|
||||
|
||||
int ilevel;
|
||||
|
||||
bool in_bstr;
|
||||
uint16 in_bstr_to;
|
||||
|
||||
bool bstr_subop(v810_timestamp_t ×tamp, int sub_op, int arg1);
|
||||
void fpu_subop(v810_timestamp_t ×tamp, int sub_op, int arg1, int arg2);
|
||||
|
||||
void Exception(uint32 handler, uint16 eCode);
|
||||
|
||||
// Caching-related:
|
||||
typedef struct
|
||||
{
|
||||
uint32 tag;
|
||||
uint32 data[2];
|
||||
bool data_valid[2];
|
||||
} V810_CacheEntry_t;
|
||||
|
||||
V810_CacheEntry_t Cache[128];
|
||||
|
||||
// Bitstring variables.
|
||||
uint32 src_cache;
|
||||
uint32 dst_cache;
|
||||
bool have_src_cache, have_dst_cache;
|
||||
|
||||
uint8 *FastMap[(1ULL << 32) / V810_FAST_MAP_PSIZE];
|
||||
std::vector<void *> FastMapAllocList;
|
||||
|
||||
|
||||
#ifdef WANT_DEBUGGER
|
||||
void (*CPUHook)(const v810_timestamp_t timestamp, uint32 PC);
|
||||
void (*ADDBT)(uint32 old_PC, uint32 new_PC, uint32);
|
||||
#endif
|
||||
|
||||
|
||||
// For CacheDump and CacheRestore
|
||||
void CacheOpMemStore(v810_timestamp_t ×tamp, uint32 A, uint32 V);
|
||||
uint32 CacheOpMemLoad(v810_timestamp_t ×tamp, uint32 A);
|
||||
|
||||
void CacheClear(v810_timestamp_t ×tamp, uint32 start, uint32 count);
|
||||
void CacheDump(v810_timestamp_t ×tamp, const uint32 SA);
|
||||
void CacheRestore(v810_timestamp_t ×tamp, const uint32 SA);
|
||||
|
||||
uint32 RDCACHE(v810_timestamp_t ×tamp, uint32 addr);
|
||||
//
|
||||
// End caching related
|
||||
//
|
||||
|
||||
uint16 RDOP(v810_timestamp_t ×tamp, uint32 addr, uint32 meow = 2);
|
||||
void SetFlag(uint32 n, bool condition);
|
||||
void SetSZ(uint32 value);
|
||||
|
||||
void SetSREG(v810_timestamp_t ×tamp, unsigned int which, uint32 value);
|
||||
uint32 GetSREG(unsigned int which);
|
||||
|
||||
|
||||
bool IsSubnormal(uint32 fpval);
|
||||
void FPU_Math_Template(float32 (*func)(float32, float32), uint32 arg1, uint32 arg2);
|
||||
void FPU_DoException(void);
|
||||
bool CheckFPInputException(uint32 fpval);
|
||||
bool FPU_DoesExceptionKillResult(void);
|
||||
void SetFPUOPNonFPUFlags(uint32 result);
|
||||
|
||||
|
||||
uint32 BSTR_RWORD(v810_timestamp_t ×tamp, uint32 A);
|
||||
void BSTR_WWORD(v810_timestamp_t ×tamp, uint32 A, uint32 V);
|
||||
bool Do_BSTR_Search(v810_timestamp_t ×tamp, const int inc_mul, unsigned int bit_test);
|
||||
|
||||
|
||||
uint8 DummyRegion[V810_FAST_MAP_PSIZE + V810_FAST_MAP_TRAMPOLINE_SIZE];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,385 +0,0 @@
|
||||
/* V810 Emulator
|
||||
*
|
||||
* Copyright (C) 2006 David Tucker
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
//////////////////////////////////////////////////////////
|
||||
// CPU Debug routines
|
||||
|
||||
//what do we realy need?
|
||||
//#include <stdio.h>
|
||||
//#include <stdlib.h>
|
||||
//#include <string.h>
|
||||
//#include <ctype.h>
|
||||
|
||||
#include "mednafen/mednafen.h"
|
||||
#include "v810_opt.h"
|
||||
#include "v810_cpu.h"
|
||||
#include "v810_cpuD.h"
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Defines
|
||||
|
||||
//Structure to store an element in our linked list
|
||||
// used to dynamicaly dissasemble a rom
|
||||
typedef struct dasms {
|
||||
int offset;
|
||||
uint32 PC;
|
||||
uint32 jump;
|
||||
struct dasms * nextElement;
|
||||
} dasmS;
|
||||
|
||||
typedef struct {
|
||||
int addr_mode; // Addressing mode
|
||||
const char * opname; // Opcode name (string)
|
||||
} operation;
|
||||
|
||||
static const operation optable[80] = {
|
||||
{ AM_I, "mov " }, // 0x00
|
||||
{ AM_I, "add " }, // 0x01
|
||||
{ AM_I, "sub " }, // 0x02
|
||||
{ AM_I, "cmp " }, // 0x03
|
||||
{ AM_I, "shl " }, // 0x04
|
||||
{ AM_I, "shr " }, // 0x05
|
||||
{ AM_I, "jmp " }, // 0x06
|
||||
{ AM_I, "sar " }, // 0x07
|
||||
{ AM_I, "mul " }, // 0x08
|
||||
{ AM_I, "div " }, // 0x09
|
||||
{ AM_I, "mulu " }, // 0x0A
|
||||
{ AM_I, "divu " }, // 0x0B
|
||||
{ AM_I, "or " }, // 0x0C
|
||||
{ AM_I, "and " }, // 0x0D
|
||||
{ AM_I, "xor " }, // 0x0E
|
||||
{ AM_I, "not " }, // 0x0F
|
||||
|
||||
{ AM_II, "mov " }, // 0x10 // Imediate
|
||||
{ AM_II, "add " }, // 0x11
|
||||
{ AM_II, "setf " }, // 0x12
|
||||
{ AM_II, "cmp " }, // 0x13
|
||||
{ AM_II, "shl " }, // 0x14
|
||||
{ AM_II, "shr " }, // 0x15
|
||||
{0x8000|AM_IX,"ei " }, // 0x16 // EI(VB only)
|
||||
{ AM_II, "sar " }, // 0x17
|
||||
{ AM_II, "trap " }, // 0x18
|
||||
|
||||
{ AM_IX, "reti " }, // 0x19 //BRKRETI
|
||||
{ AM_IX, "halt " }, // 0x1A //STBY
|
||||
|
||||
{AM_UDEF, "??? " }, // 0x1B // Unknown
|
||||
{ AM_II, "ldsr " }, // 0x1C
|
||||
{ AM_II, "stsr " }, // 0x1D
|
||||
{0x8000|AM_IX,"di " }, // 0x1E // DI(VB only)
|
||||
{AM_BSTR, "BSTR " }, // 0x1F // Special Bit String Instructions
|
||||
|
||||
{AM_UDEF, "??? " }, // 0x20 // Unknown // This is a fudg on our part
|
||||
{AM_UDEF, "??? " }, // 0x21 // Unknown // We have 6 and 7 bit instructions
|
||||
{AM_UDEF, "??? " }, // 0x22 // Unknown // this is filld in by the Conditional Branch Instructions
|
||||
{AM_UDEF, "??? " }, // 0x23 // Unknown
|
||||
{AM_UDEF, "??? " }, // 0x24 // Unknown
|
||||
{AM_UDEF, "??? " }, // 0x25 // Unknown
|
||||
{AM_UDEF, "??? " }, // 0x26 // Unknown
|
||||
{AM_UDEF, "??? " }, // 0x27 // Unknown
|
||||
|
||||
{ AM_V, "movea" }, // 0x28
|
||||
{ AM_V, "addi " }, // 0x29
|
||||
{ AM_IV, "jr " }, // 0x2A
|
||||
{ AM_IV, "jal " }, // 0x2B
|
||||
{ AM_V, "ori " }, // 0x2C
|
||||
{ AM_V, "andi " }, // 0x2D
|
||||
{ AM_V, "xori " }, // 0x2E
|
||||
{ AM_V, "movhi" }, // 0x2F
|
||||
|
||||
{ AM_VIa, "ld.b " }, // 0x30
|
||||
{ AM_VIa, "ld.h " }, // 0x31
|
||||
{AM_UDEF, "??? " }, // 0x32 // Unknown
|
||||
{ AM_VIa, "ld.w " }, // 0x33
|
||||
{ AM_VIb, "st.b " }, // 0x34
|
||||
{ AM_VIb, "st.h " }, // 0x35
|
||||
{AM_UDEF, "??? " }, // 0x36 // Unknown
|
||||
{ AM_VIb, "st.w " }, // 0x37
|
||||
{ AM_VIa, "in.b " }, // 0x38
|
||||
{ AM_VIa, "in.h " }, // 0x39
|
||||
{ AM_VIa, "caxi " }, // 0x3A
|
||||
{ AM_VIa, "in.w " }, // 0x3B
|
||||
{ AM_VIb, "out.b" }, // 0x3C
|
||||
{ AM_VIb, "out.h" }, // 0x3D
|
||||
{ AM_FPP, "FPP " }, // 0x3E //Floating Point Instruction, Special Case
|
||||
{ AM_VIb, "out.w" }, // 0x3F
|
||||
|
||||
{ AM_III, "bv " }, // 0x40
|
||||
{ AM_III, "bl " }, // 0x41 //BC 0x41
|
||||
{ AM_III, "be " }, // 0x42 //BZ 0x42
|
||||
{ AM_III, "bnh " }, // 0x43
|
||||
{ AM_III, "bn " }, // 0x44
|
||||
{ AM_III, "br " }, // 0x45
|
||||
{ AM_III, "blt " }, // 0x46
|
||||
{ AM_III, "ble " }, // 0x47
|
||||
{ AM_III, "bnv " }, // 0x48
|
||||
{ AM_III, "bnl " }, // 0x49 //BNC 0x49
|
||||
{ AM_III, "bne " }, // 0x4A //BNZ 0x4A
|
||||
{ AM_III, "bh " }, // 0x4B
|
||||
{ AM_III, "bp " }, // 0x4C
|
||||
{ AM_III, "nop " }, // 0x4D
|
||||
{ AM_III, "bge " }, // 0x4E
|
||||
{ AM_III, "bgt " } // 0x4F
|
||||
};
|
||||
// All instructions greater than 0x50 are undefined (this should not be posible of cource)
|
||||
|
||||
|
||||
//Structure for holding the SubOpcodes, Same as above, without the InsType.
|
||||
typedef struct {
|
||||
const char * opname; // Opcode name (string)
|
||||
} suboperation;
|
||||
|
||||
|
||||
// Bit String Subopcodes
|
||||
static const suboperation bssuboptable[16] = {
|
||||
{ "SCH0BSU" }, // 0x00
|
||||
{ "SCH0BSD" }, // 0x01
|
||||
{ "SCH1BSU" }, // 0x02
|
||||
{ "SCH1BSD" }, // 0x03
|
||||
{ "BError4" }, // 0x04 // Unknown
|
||||
{ "BError5" }, // 0x05 // Unknown
|
||||
{ "BError6" }, // 0x06 // Unknown
|
||||
{ "BError7" }, // 0x07 // Unknown
|
||||
{ "ORBSU " }, // 0x08
|
||||
{ "ANDBSU " }, // 0x09
|
||||
{ "XORBSU " }, // 0x0A
|
||||
{ "MOVBSU " }, // 0x0B
|
||||
{ "ORNBSU " }, // 0x0C
|
||||
{ "ANDNBSU" }, // 0x0D
|
||||
{ "XORNBSU" }, // 0x0E
|
||||
{ "NOTBSU " } // 0x0F
|
||||
};
|
||||
|
||||
// Floating Point Subopcodes
|
||||
static const suboperation fpsuboptable[16] = {
|
||||
{ "cmpf.s " }, // 0x00
|
||||
{ "FError1" }, // 0x01 // Unknown
|
||||
{ "cvt.ws " }, // 0x02
|
||||
{ "cvt.sw " }, // 0x03
|
||||
{ "addf.s " }, // 0x04
|
||||
{ "subf.s " }, // 0x05
|
||||
{ "mulf.s " }, // 0x06
|
||||
{ "divf.s " }, // 0x07
|
||||
|
||||
{ "FError8" }, // 0x08 // Invalid
|
||||
{ "FError9" }, // 0x09 // Invalid
|
||||
{ "FErrorA" }, // 0x0A // Invalid
|
||||
{ "FErrorB" }, // 0x0B // Invalid
|
||||
{ "FErrorC" }, // 0x0C // Invalid
|
||||
{ "FErrorD" }, // 0x0D // Invalid
|
||||
{ "FErrorE" }, // 0x0E // Invalid
|
||||
{ "FErrorF" } // 0x0F // Invalid
|
||||
};
|
||||
|
||||
static const suboperation fpsuboptable_vb[16] = {
|
||||
{ "cmpf.s " }, // 0x00
|
||||
{ "FError1" }, // 0x01 // Unknown
|
||||
{ "cvt.ws " }, // 0x02
|
||||
{ "cvt.sw " }, // 0x03
|
||||
{ "addf.s " }, // 0x04
|
||||
{ "subf.s " }, // 0x05
|
||||
{ "mulf.s " }, // 0x06
|
||||
{ "divf.s " }, // 0x07
|
||||
{ "XB" }, // 0x08 // undocumented
|
||||
{ "XH" }, // 0x09 // undocumented //VFishing???
|
||||
{ "REV" }, // 0x0A // undocumented
|
||||
{ "trnc.sw" }, // 0x0B
|
||||
{ "MPYHW" }, // 0x0C // undocumented
|
||||
{ "FErrorD" }, // 0x0D // Unknown
|
||||
{ "FErrorE" }, // 0x0E // Unknown
|
||||
{ "FErrorF" } // 0x0F // Unknown
|
||||
};
|
||||
|
||||
static const char *pretty_preg_names[32] =
|
||||
{
|
||||
"r0", "r1", "hsp", "sp", "gp", "tp", "r6", "r7",
|
||||
"r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
|
||||
"r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
|
||||
"r24", "r25", "r26", "r27", "r28", "r29", "r30", "lp",
|
||||
};
|
||||
|
||||
static const char *pretty_sreg_names[32] =
|
||||
{
|
||||
"sr0(eipc)", "sr1(eipsw)", "sr2(fepc)", "sr3(fepsw)", "sr4(ecr)", "sr5(psw)", "sr6(pir)", "sr7(tkcw)",
|
||||
"sr8(invalid)", "sr9(invalid)", "sr10(invalid)", "sr11(invalid)", "sr12(invalid)", "sr13(invalid)",
|
||||
"sr14(invalid)", "sr15(invalid)", "sr16(invalid)", "sr17(invalid)", "sr18(invalid)", "sr19(invalid)",
|
||||
"sr20(invalid)", "sr21(invalid)", "sr22(invalid)", "sr23(invalid)",
|
||||
"sr24(chcw)", "sr25(adtre)", "sr26(invalid)", "sr27(invalid)", "sr28(invalid)", "sr29(invalid)", "sr30(invalid)",
|
||||
"sr31(invalid)"
|
||||
};
|
||||
|
||||
void v810_dis(uint32 &tPC, int num, char *buf, uint16 (*rhword)(uint32), bool vbmode)
|
||||
{
|
||||
int lowB, highB, lowB2, highB2; // up to 4 bytes for instruction (either 16 or 32 bits)
|
||||
int opcode, arg1, arg2, arg3;
|
||||
int i = 0;
|
||||
|
||||
buf[0] = 0;
|
||||
|
||||
for(i = 0; i< num; i++)
|
||||
{
|
||||
const uint16 hw0 = rhword(tPC);
|
||||
const uint16 hw1 = rhword(tPC + 2);
|
||||
|
||||
lowB = hw0 & 0xFF;
|
||||
highB = hw0 >> 8;
|
||||
|
||||
lowB2 = hw1 & 0xFF;
|
||||
highB2 = hw1 >> 8;
|
||||
|
||||
opcode = highB >> 2;
|
||||
if((highB & 0xE0) == 0x80) // Special opcode format for
|
||||
opcode = (highB >> 1); // type III instructions.
|
||||
|
||||
if((opcode > 0x4F) | (opcode < 0)) {
|
||||
//Error Invalid opcode!
|
||||
sprintf(&buf[strlen(buf)], "0x%04x", hw0);
|
||||
tPC += 2;
|
||||
}
|
||||
|
||||
int am = optable[opcode].addr_mode;
|
||||
|
||||
if((am & 0x8000) && !vbmode)
|
||||
am = AM_UDEF;
|
||||
|
||||
am &= ~0x8000;
|
||||
|
||||
switch(am) {
|
||||
case AM_I: // Do the same Ither way =)
|
||||
arg1 = (lowB >> 5) + ((highB & 0x3) << 3);
|
||||
arg2 = (lowB & 0x1F);
|
||||
if (opcode == JMP) {
|
||||
sprintf(&buf[strlen(buf)],"%s [%s]", optable[opcode].opname, pretty_preg_names[arg2]);
|
||||
} else {
|
||||
sprintf(&buf[strlen(buf)],"%s %s, %s", optable[opcode].opname, pretty_preg_names[arg2], pretty_preg_names[arg1]);
|
||||
}
|
||||
tPC += 2; // 16 bit instruction
|
||||
break;
|
||||
case AM_II:
|
||||
arg1 = (lowB >> 5) + ((highB & 0x3) << 3);
|
||||
arg2 = (lowB & 0x1F);
|
||||
if(opcode == LDSR) {
|
||||
sprintf(&buf[strlen(buf)],"%s %s, %s", optable[opcode].opname, pretty_preg_names[arg1], pretty_sreg_names[arg2]);
|
||||
} else if(opcode == STSR) {
|
||||
sprintf(&buf[strlen(buf)],"%s %s, %s", optable[opcode].opname, pretty_sreg_names[arg2], pretty_preg_names[arg1]);
|
||||
} else if(opcode == ADD_I || opcode == CMP_I) {
|
||||
sprintf(&buf[strlen(buf)],"%s %d, %s", optable[opcode].opname, sign_5(arg2), pretty_preg_names[arg1]);
|
||||
} else {
|
||||
sprintf(&buf[strlen(buf)],"%s %d, %s", optable[opcode].opname, arg2, pretty_preg_names[arg1]);
|
||||
}
|
||||
tPC += 2; // 16 bit instruction
|
||||
break;
|
||||
case AM_III:
|
||||
arg1 = ((highB & 0x1) << 8) + (lowB & 0xFE);
|
||||
if(opcode == NOP)
|
||||
sprintf(&buf[strlen(buf)],"%s", optable[opcode].opname);
|
||||
else
|
||||
sprintf(&buf[strlen(buf)],"%s %08x", optable[opcode].opname, tPC + sign_9(arg1));
|
||||
tPC += 2; // 16 bit instruction
|
||||
break;
|
||||
case AM_IV:
|
||||
arg1 = ((highB & 0x3) << 24) + (lowB << 16) + (highB2 << 8) + lowB2;
|
||||
|
||||
sprintf(&buf[strlen(buf)],"%s %08x", optable[opcode].opname, tPC + sign_26(arg1));
|
||||
|
||||
tPC += 4; // 32 bit instruction
|
||||
break;
|
||||
case AM_V:
|
||||
arg1 = (lowB >> 5) + ((highB & 0x3) << 3);
|
||||
arg2 = (lowB & 0x1F);
|
||||
arg3 = (highB2 << 8) + lowB2;
|
||||
|
||||
// TODO: What would be the best way to disassemble the MOVEA instruction?
|
||||
//if(opcode == MOVEA)
|
||||
// sprintf(&buf[strlen(buf)],"%s 0x%X, %s, %s", optable[opcode].opname, (uint32)(int32)(int16)(uint16)arg3, pretty_preg_names[arg2], pretty_preg_names[arg1] );
|
||||
//else
|
||||
sprintf(&buf[strlen(buf)],"%s 0x%X, %s, %s", optable[opcode].opname, arg3, pretty_preg_names[arg2], pretty_preg_names[arg1] );
|
||||
tPC += 4; // 32 bit instruction
|
||||
break;
|
||||
case AM_VIa: // Mode6 form1
|
||||
arg1 = (lowB >> 5) + ((highB & 0x3) << 3);
|
||||
arg2 = (lowB & 0x1F);
|
||||
arg3 = (highB2 << 8) + lowB2;
|
||||
|
||||
if(!arg3) // Don't bother printing offset if it's 0
|
||||
sprintf(&buf[strlen(buf)],"%s [%s], %s", optable[opcode].opname, pretty_preg_names[arg2], pretty_preg_names[arg1]);
|
||||
else if(sign_16(arg3) >= 0) // Make disassembly prettier if it's a positive offset
|
||||
sprintf(&buf[strlen(buf)],"%s 0x%04x[%s], %s", optable[opcode].opname, sign_16(arg3), pretty_preg_names[arg2], pretty_preg_names[arg1]);
|
||||
else
|
||||
sprintf(&buf[strlen(buf)],"%s %d[%s], %s", optable[opcode].opname, sign_16(arg3), pretty_preg_names[arg2], pretty_preg_names[arg1]);
|
||||
|
||||
tPC += 4; // 32 bit instruction
|
||||
break;
|
||||
case AM_VIb: // Mode6 form2
|
||||
arg1 = (lowB >> 5) + ((highB & 0x3) << 3);
|
||||
arg2 = (lowB & 0x1F);
|
||||
arg3 = (highB2 << 8) + lowB2; // whats the order??? 2,3,1 or 1,3,2
|
||||
|
||||
if(!arg3) // Don't bother printing offset if it's 0
|
||||
sprintf(&buf[strlen(buf)],"%s %s, [%s]", optable[opcode].opname, pretty_preg_names[arg1], pretty_preg_names[arg2]);
|
||||
else if(sign_16(arg3) >= 0) // Make disassembly prettier if it's a positive offset
|
||||
sprintf(&buf[strlen(buf)],"%s %s, 0x%04x[%s]", optable[opcode].opname, pretty_preg_names[arg1], sign_16(arg3), pretty_preg_names[arg2]);
|
||||
else
|
||||
sprintf(&buf[strlen(buf)],"%s %s, %d[%s]", optable[opcode].opname, pretty_preg_names[arg1], sign_16(arg3), pretty_preg_names[arg2]);
|
||||
tPC += 4; // 32 bit instruction
|
||||
break;
|
||||
case AM_VII: // Unhandled
|
||||
sprintf(&buf[strlen(buf)],"0x%2x 0x%2x 0x%2x 0x%2x", lowB, highB, lowB2, highB2);
|
||||
tPC +=4; // 32 bit instruction
|
||||
break;
|
||||
case AM_VIII: // Unhandled
|
||||
sprintf(&buf[strlen(buf)],"0x%2x 0x%2x 0x%2x 0x%2x", lowB, highB, lowB2, highB2);
|
||||
tPC += 4; // 32 bit instruction
|
||||
break;
|
||||
case AM_IX:
|
||||
arg1 = (lowB & 0x1); // Mode ID, Ignore for now
|
||||
sprintf(&buf[strlen(buf)],"%s", optable[opcode].opname);
|
||||
tPC += 2; // 16 bit instruction
|
||||
break;
|
||||
case AM_BSTR: // Bit String Subopcodes
|
||||
arg1 = (lowB >> 5) + ((highB & 0x3) << 3);
|
||||
arg2 = (lowB & 0x1F);
|
||||
if(arg2 > 15) {
|
||||
sprintf(&buf[strlen(buf)],"BError");
|
||||
} else {
|
||||
//sprintf(&buf[strlen(buf)],"%s, $%d", bssuboptable[arg2].opname,arg1);
|
||||
sprintf(&buf[strlen(buf)], "%s", bssuboptable[arg2].opname);
|
||||
}
|
||||
tPC += 2; // 16 bit instruction
|
||||
break;
|
||||
case AM_FPP: // Floating Point Subcode
|
||||
arg1 = (lowB >> 5) + ((highB & 0x3) << 3);
|
||||
arg2 = (lowB & 0x1F);
|
||||
arg3 = (highB2 >> 2);
|
||||
|
||||
if(arg3 > 15) {
|
||||
sprintf(&buf[strlen(buf)],"(Invalid FPU: 0x%02x)", arg3);
|
||||
} else {
|
||||
sprintf(&buf[strlen(buf)],"%s %s, %s", (vbmode ? fpsuboptable_vb[arg3].opname : fpsuboptable[arg3].opname), pretty_preg_names[arg2], pretty_preg_names[arg1]);
|
||||
}
|
||||
tPC += 4; // 32 bit instruction
|
||||
break;
|
||||
case AM_UDEF: // Invalid opcode.
|
||||
default: // Invalid opcode.
|
||||
sprintf(&buf[strlen(buf)],"0x%04x", hw0);
|
||||
tPC += 2;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
////////////////////////////////////////////////////////////////
|
||||
// Defines for the V810 CPU debug
|
||||
|
||||
#ifndef V810_CPU_D_H_
|
||||
#define V810_CPU_D_H_
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
#include "v810_opt.h"
|
||||
|
||||
// Dissasemble num lines of code starting at tPC (If tPC == -1 start at PC)
|
||||
void v810_dis(uint32 &PC, int num, char *, uint16 (*rhword)(uint32), bool vbmode = false);
|
||||
|
||||
#endif
|
||||
|
@ -1,72 +0,0 @@
|
||||
#define DO_MOV_AM(); DO_AM_I();
|
||||
#define DO_ADD_AM(); DO_AM_I();
|
||||
#define DO_SUB_AM(); DO_AM_I();
|
||||
#define DO_CMP_AM(); DO_AM_I();
|
||||
#define DO_SHL_AM(); DO_AM_I();
|
||||
#define DO_SHR_AM(); DO_AM_I();
|
||||
#define DO_JMP_AM(); DO_AM_I();
|
||||
#define DO_SAR_AM(); DO_AM_I();
|
||||
#define DO_MUL_AM(); DO_AM_I();
|
||||
#define DO_DIV_AM(); DO_AM_I();
|
||||
#define DO_MULU_AM(); DO_AM_I();
|
||||
#define DO_DIVU_AM(); DO_AM_I();
|
||||
#define DO_OR_AM(); DO_AM_I();
|
||||
#define DO_AND_AM(); DO_AM_I();
|
||||
#define DO_XOR_AM(); DO_AM_I();
|
||||
#define DO_NOT_AM(); DO_AM_I();
|
||||
#define DO_MOV_I_AM(); DO_AM_II();
|
||||
#define DO_ADD_I_AM(); DO_AM_II();
|
||||
#define DO_SETF_AM(); DO_AM_II();
|
||||
#define DO_CMP_I_AM(); DO_AM_II();
|
||||
#define DO_SHL_I_AM(); DO_AM_II();
|
||||
#define DO_SHR_I_AM(); DO_AM_II();
|
||||
#define DO_EI_AM(); DO_AM_II();
|
||||
#define DO_SAR_I_AM(); DO_AM_II();
|
||||
#define DO_TRAP_AM(); DO_AM_II();
|
||||
#define DO_RETI_AM(); DO_AM_IX();
|
||||
#define DO_HALT_AM(); DO_AM_IX();
|
||||
#define DO_LDSR_AM(); DO_AM_II();
|
||||
#define DO_STSR_AM(); DO_AM_II();
|
||||
#define DO_DI_AM(); DO_AM_II();
|
||||
#define DO_BSTR_AM(); DO_AM_BSTR();
|
||||
#define DO_MOVEA_AM(); DO_AM_V();
|
||||
#define DO_ADDI_AM(); DO_AM_V();
|
||||
#define DO_JR_AM(); DO_AM_IV();
|
||||
#define DO_JAL_AM(); DO_AM_IV();
|
||||
#define DO_ORI_AM(); DO_AM_V();
|
||||
#define DO_ANDI_AM(); DO_AM_V();
|
||||
#define DO_XORI_AM(); DO_AM_V();
|
||||
#define DO_MOVHI_AM(); DO_AM_V();
|
||||
#define DO_LD_B_AM(); DO_AM_VIa();
|
||||
#define DO_LD_H_AM(); DO_AM_VIa();
|
||||
#define DO_LD_W_AM(); DO_AM_VIa();
|
||||
#define DO_ST_B_AM(); DO_AM_VIb();
|
||||
#define DO_ST_H_AM(); DO_AM_VIb();
|
||||
#define DO_ST_W_AM(); DO_AM_VIb();
|
||||
#define DO_IN_B_AM(); DO_AM_VIa();
|
||||
#define DO_IN_H_AM(); DO_AM_VIa();
|
||||
#define DO_CAXI_AM(); DO_AM_VIa();
|
||||
#define DO_IN_W_AM(); DO_AM_VIa();
|
||||
#define DO_OUT_B_AM(); DO_AM_VIb();
|
||||
#define DO_OUT_H_AM(); DO_AM_VIb();
|
||||
#define DO_FPP_AM(); DO_AM_FPP();
|
||||
#define DO_OUT_W_AM(); DO_AM_VIb();
|
||||
#define DO_BV_AM(); DO_AM_III();
|
||||
#define DO_BL_AM(); DO_AM_III();
|
||||
#define DO_BE_AM(); DO_AM_III();
|
||||
#define DO_BNH_AM(); DO_AM_III();
|
||||
#define DO_BN_AM(); DO_AM_III();
|
||||
#define DO_BR_AM(); DO_AM_III();
|
||||
#define DO_BLT_AM(); DO_AM_III();
|
||||
#define DO_BLE_AM(); DO_AM_III();
|
||||
#define DO_BNV_AM(); DO_AM_III();
|
||||
#define DO_BNL_AM(); DO_AM_III();
|
||||
#define DO_BNE_AM(); DO_AM_III();
|
||||
#define DO_BH_AM(); DO_AM_III();
|
||||
#define DO_BP_AM(); DO_AM_III();
|
||||
#define DO_NOP_AM(); DO_AM_III();
|
||||
#define DO_BGE_AM(); DO_AM_III();
|
||||
#define DO_BGT_AM(); DO_AM_III();
|
||||
|
||||
|
||||
#define DO_INVALID_AM(); DO_AM_UDEF();
|
@ -1,36 +0,0 @@
|
||||
|
||||
&&op_MOV, &&op_MOV, &&op_ADD, &&op_ADD, &&op_SUB, &&op_SUB, &&op_CMP, &&op_CMP,
|
||||
&&op_SHL, &&op_SHL, &&op_SHR, &&op_SHR, &&op_JMP, &&op_JMP, &&op_SAR, &&op_SAR,
|
||||
&&op_MUL, &&op_MUL, &&op_DIV, &&op_DIV, &&op_MULU, &&op_MULU, &&op_DIVU, &&op_DIVU,
|
||||
&&op_OR, &&op_OR, &&op_AND, &&op_AND, &&op_XOR, &&op_XOR, &&op_NOT, &&op_NOT,
|
||||
&&op_MOV_I, &&op_MOV_I, &&op_ADD_I, &&op_ADD_I, &&op_SETF, &&op_SETF, &&op_CMP_I, &&op_CMP_I,
|
||||
&&op_SHL_I, &&op_SHL_I, &&op_SHR_I, &&op_SHR_I, &&op_EI, &&op_EI, &&op_SAR_I, &&op_SAR_I,
|
||||
&&op_TRAP, &&op_TRAP, &&op_RETI, &&op_RETI, &&op_HALT, &&op_HALT, &&op_INVALID, &&op_INVALID,
|
||||
&&op_LDSR, &&op_LDSR, &&op_STSR, &&op_STSR, &&op_DI, &&op_DI, &&op_BSTR, &&op_BSTR,
|
||||
&&op_BV, &&op_BL, &&op_BE, &&op_BNH, &&op_BN, &&op_BR, &&op_BLT, &&op_BLE,
|
||||
&&op_BNV, &&op_BNL, &&op_BNE, &&op_BH, &&op_BP, &&op_NOP, &&op_BGE, &&op_BGT,
|
||||
&&op_MOVEA, &&op_MOVEA, &&op_ADDI, &&op_ADDI, &&op_JR, &&op_JR, &&op_JAL, &&op_JAL,
|
||||
&&op_ORI, &&op_ORI, &&op_ANDI, &&op_ANDI, &&op_XORI, &&op_XORI, &&op_MOVHI, &&op_MOVHI,
|
||||
&&op_LD_B, &&op_LD_B, &&op_LD_H, &&op_LD_H, &&op_INVALID, &&op_INVALID, &&op_LD_W, &&op_LD_W,
|
||||
&&op_ST_B, &&op_ST_B, &&op_ST_H, &&op_ST_H, &&op_INVALID, &&op_INVALID, &&op_ST_W, &&op_ST_W,
|
||||
&&op_IN_B, &&op_IN_B, &&op_IN_H, &&op_IN_H, &&op_CAXI, &&op_CAXI, &&op_IN_W, &&op_IN_W,
|
||||
&&op_OUT_B, &&op_OUT_B, &&op_OUT_H, &&op_OUT_H, &&op_FPP, &&op_FPP, &&op_OUT_W, &&op_OUT_W,
|
||||
|
||||
&&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID,
|
||||
&&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID,
|
||||
&&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID,
|
||||
&&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID,
|
||||
&&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID,
|
||||
&&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID,
|
||||
&&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID,
|
||||
&&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID,
|
||||
|
||||
&&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID,
|
||||
&&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID,
|
||||
&&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID,
|
||||
&&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID,
|
||||
&&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID,
|
||||
&&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID,
|
||||
&&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID,
|
||||
&&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INVALID, &&op_INT_HANDLER
|
||||
|
@ -1,281 +0,0 @@
|
||||
switch(opcode)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
goto op_MOV;
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
goto op_ADD;
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
goto op_SUB;
|
||||
break;
|
||||
case 6:
|
||||
case 7:
|
||||
goto op_CMP;
|
||||
break;
|
||||
case 8:
|
||||
case 9:
|
||||
goto op_SHL;
|
||||
break;
|
||||
case 10:
|
||||
case 11:
|
||||
goto op_SHR;
|
||||
break;
|
||||
case 12:
|
||||
case 13:
|
||||
goto op_JMP;
|
||||
break;
|
||||
case 14:
|
||||
case 15:
|
||||
goto op_SAR;
|
||||
break;
|
||||
case 16:
|
||||
case 17:
|
||||
goto op_MUL;
|
||||
break;
|
||||
case 18:
|
||||
case 19:
|
||||
goto op_DIV;
|
||||
break;
|
||||
case 20:
|
||||
case 21:
|
||||
goto op_MULU;
|
||||
break;
|
||||
case 22:
|
||||
case 23:
|
||||
goto op_DIVU;
|
||||
break;
|
||||
case 24:
|
||||
case 25:
|
||||
goto op_OR;
|
||||
break;
|
||||
case 26:
|
||||
case 27:
|
||||
goto op_AND;
|
||||
break;
|
||||
case 28:
|
||||
case 29:
|
||||
goto op_XOR;
|
||||
break;
|
||||
case 30:
|
||||
case 31:
|
||||
goto op_NOT;
|
||||
break;
|
||||
case 32:
|
||||
case 33:
|
||||
goto op_MOV_I;
|
||||
break;
|
||||
case 34:
|
||||
case 35:
|
||||
goto op_ADD_I;
|
||||
break;
|
||||
case 36:
|
||||
case 37:
|
||||
goto op_SETF;
|
||||
break;
|
||||
case 38:
|
||||
case 39:
|
||||
goto op_CMP_I;
|
||||
break;
|
||||
case 40:
|
||||
case 41:
|
||||
goto op_SHL_I;
|
||||
break;
|
||||
case 42:
|
||||
case 43:
|
||||
goto op_SHR_I;
|
||||
break;
|
||||
case 44:
|
||||
case 45:
|
||||
goto op_EI;
|
||||
break;
|
||||
case 46:
|
||||
case 47:
|
||||
goto op_SAR_I;
|
||||
break;
|
||||
case 48:
|
||||
case 49:
|
||||
goto op_TRAP;
|
||||
break;
|
||||
case 50:
|
||||
case 51:
|
||||
goto op_RETI;
|
||||
break;
|
||||
case 52:
|
||||
case 53:
|
||||
goto op_HALT;
|
||||
break;
|
||||
case 54:
|
||||
case 55:
|
||||
goto op_INVALID;
|
||||
break;
|
||||
case 56:
|
||||
case 57:
|
||||
goto op_LDSR;
|
||||
break;
|
||||
case 58:
|
||||
case 59:
|
||||
goto op_STSR;
|
||||
break;
|
||||
case 60:
|
||||
case 61:
|
||||
goto op_DI;
|
||||
break;
|
||||
case 62:
|
||||
case 63:
|
||||
goto op_BSTR;
|
||||
break;
|
||||
case 64:
|
||||
goto op_BV;
|
||||
break;
|
||||
case 65:
|
||||
goto op_BL;
|
||||
break;
|
||||
case 66:
|
||||
goto op_BE;
|
||||
break;
|
||||
case 67:
|
||||
goto op_BNH;
|
||||
break;
|
||||
case 68:
|
||||
goto op_BN;
|
||||
break;
|
||||
case 69:
|
||||
goto op_BR;
|
||||
break;
|
||||
case 70:
|
||||
goto op_BLT;
|
||||
break;
|
||||
case 71:
|
||||
goto op_BLE;
|
||||
break;
|
||||
case 72:
|
||||
goto op_BNV;
|
||||
break;
|
||||
case 73:
|
||||
goto op_BNL;
|
||||
break;
|
||||
case 74:
|
||||
goto op_BNE;
|
||||
break;
|
||||
case 75:
|
||||
goto op_BH;
|
||||
break;
|
||||
case 76:
|
||||
goto op_BP;
|
||||
break;
|
||||
case 77:
|
||||
goto op_NOP;
|
||||
break;
|
||||
case 78:
|
||||
goto op_BGE;
|
||||
break;
|
||||
case 79:
|
||||
goto op_BGT;
|
||||
break;
|
||||
case 80:
|
||||
case 81:
|
||||
goto op_MOVEA;
|
||||
break;
|
||||
case 82:
|
||||
case 83:
|
||||
goto op_ADDI;
|
||||
break;
|
||||
case 84:
|
||||
case 85:
|
||||
goto op_JR;
|
||||
break;
|
||||
case 86:
|
||||
case 87:
|
||||
goto op_JAL;
|
||||
break;
|
||||
case 88:
|
||||
case 89:
|
||||
goto op_ORI;
|
||||
break;
|
||||
case 90:
|
||||
case 91:
|
||||
goto op_ANDI;
|
||||
break;
|
||||
case 92:
|
||||
case 93:
|
||||
goto op_XORI;
|
||||
break;
|
||||
case 94:
|
||||
case 95:
|
||||
goto op_MOVHI;
|
||||
break;
|
||||
case 96:
|
||||
case 97:
|
||||
goto op_LD_B;
|
||||
break;
|
||||
case 98:
|
||||
case 99:
|
||||
goto op_LD_H;
|
||||
break;
|
||||
case 100:
|
||||
case 101:
|
||||
goto op_INVALID;
|
||||
break;
|
||||
case 102:
|
||||
case 103:
|
||||
goto op_LD_W;
|
||||
break;
|
||||
case 104:
|
||||
case 105:
|
||||
goto op_ST_B;
|
||||
break;
|
||||
case 106:
|
||||
case 107:
|
||||
goto op_ST_H;
|
||||
break;
|
||||
case 108:
|
||||
case 109:
|
||||
goto op_INVALID;
|
||||
break;
|
||||
case 110:
|
||||
case 111:
|
||||
goto op_ST_W;
|
||||
break;
|
||||
case 112:
|
||||
case 113:
|
||||
goto op_IN_B;
|
||||
break;
|
||||
case 114:
|
||||
case 115:
|
||||
goto op_IN_H;
|
||||
break;
|
||||
case 116:
|
||||
case 117:
|
||||
goto op_CAXI;
|
||||
break;
|
||||
case 118:
|
||||
case 119:
|
||||
goto op_IN_W;
|
||||
break;
|
||||
case 120:
|
||||
case 121:
|
||||
goto op_OUT_B;
|
||||
break;
|
||||
case 122:
|
||||
case 123:
|
||||
goto op_OUT_H;
|
||||
break;
|
||||
case 124:
|
||||
case 125:
|
||||
goto op_FPP;
|
||||
break;
|
||||
case 126:
|
||||
case 127:
|
||||
goto op_OUT_W;
|
||||
break;
|
||||
case 255:
|
||||
goto op_INT_HANDLER;
|
||||
break;
|
||||
default:
|
||||
goto op_INVALID;
|
||||
break;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,170 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// File: v810_opt.h
|
||||
//
|
||||
// Description: Defines used in v810_dis.cpp
|
||||
//
|
||||
|
||||
#ifndef V810_OPT_H_
|
||||
#define V810_OPT_H_
|
||||
|
||||
#define sign_26(num) ((uint32)sign_x_to_s32(26, num))
|
||||
#define sign_16(num) ((uint32)(int16)(num))
|
||||
#define sign_14(num) ((uint32)sign_x_to_s32(14, num))
|
||||
#define sign_12(num) ((uint32)sign_x_to_s32(12, num))
|
||||
#define sign_9(num) ((uint32)sign_x_to_s32(9, num))
|
||||
#define sign_8(_value) ((uint32)(int8)(_value))
|
||||
#define sign_5(num) ((uint32)sign_x_to_s32(5, num))
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
// Define Modes
|
||||
#define AM_I 0x01
|
||||
#define AM_II 0x02
|
||||
#define AM_III 0x03
|
||||
#define AM_IV 0x04
|
||||
#define AM_V 0x05
|
||||
#define AM_VIa 0x06 // Mode6 form1
|
||||
#define AM_VIb 0x0A // Mode6 form2
|
||||
#define AM_VII 0x07
|
||||
#define AM_VIII 0x08
|
||||
#define AM_IX 0x09
|
||||
#define AM_BSTR 0x0B // Bit String Instructions
|
||||
#define AM_FPP 0x0C // Floating Point Instructions
|
||||
#define AM_UDEF 0x0D // Unknown/Undefined Instructions
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
// Table of Instructions Address Modes
|
||||
|
||||
static const int addr_mode[80] = {
|
||||
AM_I, AM_I, AM_I, AM_I, AM_I, AM_I, AM_I, AM_I,
|
||||
AM_I, AM_I, AM_I, AM_I, AM_I, AM_I, AM_I, AM_I,
|
||||
AM_II, AM_II, AM_II, AM_II, AM_II, AM_II, AM_II, AM_II,
|
||||
AM_II, AM_IX, AM_IX, AM_UDEF, AM_II, AM_II, AM_II, AM_BSTR,
|
||||
AM_UDEF, AM_UDEF, AM_UDEF, AM_UDEF, AM_UDEF, AM_UDEF, AM_UDEF, AM_UDEF,
|
||||
AM_V, AM_V, AM_IV, AM_IV, AM_V, AM_V, AM_V, AM_V,
|
||||
AM_VIa, AM_VIa, AM_UDEF, AM_VIa, AM_VIb, AM_VIb, AM_UDEF, AM_VIb,
|
||||
AM_VIa, AM_VIa, AM_VIa, AM_VIa, AM_VIb, AM_VIb, AM_FPP, AM_VIb,
|
||||
AM_III, AM_III, AM_III, AM_III, AM_III, AM_III, AM_III, AM_III,
|
||||
AM_III, AM_III, AM_III, AM_III, AM_III, AM_III, AM_III, AM_III
|
||||
};
|
||||
// All instructions greater than 0x50 are undefined (this should not be posible of cource)
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
// Opcodes for V810 Instruction set
|
||||
#define MOV 0x00
|
||||
#define ADD 0x01
|
||||
#define SUB 0x02
|
||||
#define CMP 0x03
|
||||
#define SHL 0x04
|
||||
#define SHR 0x05
|
||||
#define JMP 0x06
|
||||
#define SAR 0x07
|
||||
#define MUL 0x08
|
||||
#define DIV 0x09
|
||||
#define MULU 0x0A
|
||||
#define DIVU 0x0B
|
||||
#define OR 0x0C
|
||||
#define AND 0x0D
|
||||
#define XOR 0x0E
|
||||
#define NOT 0x0F
|
||||
#define MOV_I 0x10
|
||||
#define ADD_I 0x11
|
||||
#define SETF 0x12
|
||||
#define CMP_I 0x13
|
||||
#define SHL_I 0x14
|
||||
#define SHR_I 0x15
|
||||
#define EI 0x16
|
||||
#define SAR_I 0x17
|
||||
#define TRAP 0x18
|
||||
#define RETI 0x19
|
||||
#define HALT 0x1A
|
||||
//0x1B
|
||||
#define LDSR 0x1C
|
||||
#define STSR 0x1D
|
||||
#define DI 0x1E
|
||||
#define BSTR 0x1F //Special Bit String Inst
|
||||
//0x20 - 0x27 // Lost to Branch Instructions
|
||||
#define MOVEA 0x28
|
||||
#define ADDI 0x29
|
||||
#define JR 0x2A
|
||||
#define JAL 0x2B
|
||||
#define ORI 0x2C
|
||||
#define ANDI 0x2D
|
||||
#define XORI 0x2E
|
||||
#define MOVHI 0x2F
|
||||
#define LD_B 0x30
|
||||
#define LD_H 0x31
|
||||
//0x32
|
||||
#define LD_W 0x33
|
||||
#define ST_B 0x34
|
||||
#define ST_H 0x35
|
||||
//0x36
|
||||
#define ST_W 0x37
|
||||
#define IN_B 0x38
|
||||
#define IN_H 0x39
|
||||
#define CAXI 0x3A
|
||||
#define IN_W 0x3B
|
||||
#define OUT_B 0x3C
|
||||
#define OUT_H 0x3D
|
||||
#define FPP 0x3E //Special Float Inst
|
||||
#define OUT_W 0x3F
|
||||
|
||||
|
||||
// Branch Instructions ( Extended opcode only for Branch command)
|
||||
// Common instrcutions commented out
|
||||
|
||||
#define BV 0x40
|
||||
#define BL 0x41
|
||||
#define BE 0x42
|
||||
#define BNH 0x43
|
||||
#define BN 0x44
|
||||
#define BR 0x45
|
||||
#define BLT 0x46
|
||||
#define BLE 0x47
|
||||
#define BNV 0x48
|
||||
#define BNL 0x49
|
||||
#define BNE 0x4A
|
||||
#define BH 0x4B
|
||||
#define BP 0x4C
|
||||
#define NOP 0x4D
|
||||
#define BGE 0x4E
|
||||
#define BGT 0x4F
|
||||
|
||||
//#define BC 0x41
|
||||
//#define BZ 0x42
|
||||
//#define BNC 0x49
|
||||
//#define BNZ 0x4A
|
||||
|
||||
// Bit String Subopcodes
|
||||
#define SCH0BSU 0x00
|
||||
#define SCH0BSD 0x01
|
||||
#define SCH1BSU 0x02
|
||||
#define SCH1BSD 0x03
|
||||
|
||||
#define ORBSU 0x08
|
||||
#define ANDBSU 0x09
|
||||
#define XORBSU 0x0A
|
||||
#define MOVBSU 0x0B
|
||||
#define ORNBSU 0x0C
|
||||
#define ANDNBSU 0x0D
|
||||
#define XORNBSU 0x0E
|
||||
#define NOTBSU 0x0F
|
||||
|
||||
|
||||
// Floating Point Subopcodes
|
||||
#define CMPF_S 0x00
|
||||
|
||||
#define CVT_WS 0x02
|
||||
#define CVT_SW 0x03
|
||||
#define ADDF_S 0x04
|
||||
#define SUBF_S 0x05
|
||||
#define MULF_S 0x06
|
||||
#define DIVF_S 0x07
|
||||
#define XB 0x08
|
||||
#define XH 0x09
|
||||
#define REV 0x0A
|
||||
#define TRNC_SW 0x0B
|
||||
#define MPYHW 0x0C
|
||||
|
||||
#endif //DEFINE_H
|
||||
|
@ -73,9 +73,6 @@ extern MDFNGI EmulatedPCFX;
|
||||
#elif defined WANT_NGP_EMU
|
||||
extern MDFNGI EmulatedNGP;
|
||||
#define MDFNGI_CORE &EmulatedNGP
|
||||
#elif defined WANT_VB_EMU
|
||||
extern MDFNGI EmulatedVB;
|
||||
#define MDFNGI_CORE &EmulatedVB
|
||||
#elif defined WANT_WSWAN_EMU
|
||||
extern MDFNGI EmulatedWSwan;
|
||||
#define MDFNGI_CORE &EmulatedWSwan
|
||||
|
@ -25,10 +25,6 @@
|
||||
uint32_t setting_ngp_language = 0;
|
||||
#elif defined(WANT_GBA_EMU)
|
||||
uint32_t setting_gba_hle = 1;
|
||||
#elif defined(WANT_VB_EMU)
|
||||
uint32_t setting_vb_lcolor=0xFF0000;
|
||||
uint32_t setting_vb_rcolor=0x000000;
|
||||
uint32_t setting_vb_anaglyph_preset=0;
|
||||
#endif
|
||||
|
||||
bool MDFN_SaveSettings(const char *path)
|
||||
@ -38,15 +34,7 @@ bool MDFN_SaveSettings(const char *path)
|
||||
|
||||
uint64 MDFN_GetSettingUI(const char *name)
|
||||
{
|
||||
#if defined(WANT_VB_EMU)
|
||||
if (!strcmp("vb.anaglyph.lcolor", name))
|
||||
{
|
||||
fprintf(stderr, "Setting UI: %s=%x\n", name, setting_vb_lcolor);
|
||||
return setting_vb_lcolor;
|
||||
}
|
||||
if (!strcmp("vb.anaglyph.rcolor", name))
|
||||
return setting_vb_rcolor;
|
||||
#elif defined(WANT_PCFX_EMU)
|
||||
#if defined(WANT_PCFX_EMU)
|
||||
if (!strcmp("pcfx.cdspeed", name))
|
||||
return 2;
|
||||
if (!strcmp("pcfx.slend", name))
|
||||
@ -78,10 +66,7 @@ uint64 MDFN_GetSettingUI(const char *name)
|
||||
|
||||
int64 MDFN_GetSettingI(const char *name)
|
||||
{
|
||||
#if defined(WANT_VB_EMU)
|
||||
if (!strcmp("vb.anaglyph.preset", name))
|
||||
return setting_vb_anaglyph_preset;
|
||||
#elif defined(WANT_PCFX_EMU)
|
||||
#if defined(WANT_PCFX_EMU)
|
||||
if (!strcmp("pcfx.cpu_emulation", name))
|
||||
return 2;
|
||||
#elif defined(WANT_WSWAN_EMU)
|
||||
@ -117,12 +102,7 @@ bool MDFN_GetSettingB(const char *name)
|
||||
/* LIBRETRO */
|
||||
if (!strcmp("libretro.cd_load_into_ram", name))
|
||||
return 0;
|
||||
#if defined(WANT_VB_EMU)
|
||||
if (!strcmp("vb.instant_display_hack", name))
|
||||
return 1;
|
||||
if (!strcmp("vb.allow_draw_skip", name))
|
||||
return 1;
|
||||
#elif defined(WANT_PCFX_EMU)
|
||||
#if defined(WANT_PCFX_EMU)
|
||||
if (!strcmp("pcfx.disable_softreset", name))
|
||||
return 0; /* TODO - make configurable */
|
||||
if (!strcmp("pcfx.disable_softreset", name))
|
||||
|
@ -14,10 +14,6 @@ extern uint32_t setting_pce_keepaspect;
|
||||
extern uint32_t setting_ngp_language;
|
||||
#elif defined(WANT_GBA_EMU)
|
||||
extern uint32_t setting_gba_hle;
|
||||
#elif defined(WANT_VB_EMU)
|
||||
extern uint32_t setting_vb_lcolor;
|
||||
extern uint32_t setting_vb_rcolor;
|
||||
extern uint32_t setting_vb_anaglyph_preset;
|
||||
#endif
|
||||
|
||||
bool MDFN_LoadSettings(const char *path, const char *section = NULL, bool override = false);
|
||||
|
@ -1,10 +0,0 @@
|
||||
AUTOMAKE_OPTIONS = subdir-objects
|
||||
DEFS = -DLOCALEDIR=\"$(datadir)/locale\" @DEFS@ @MATH_OPTIMIZER_FLAGS@ -fno-strict-aliasing
|
||||
DEFAULT_INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/intl -I$(top_srcdir)
|
||||
|
||||
noinst_LIBRARIES = libvb.a
|
||||
libvb_a_SOURCES = vb.cpp timer.cpp input.cpp vip.cpp vsu.cpp
|
||||
|
||||
if WANT_DEBUGGER
|
||||
libvb_a_SOURCES += debug.cpp
|
||||
endif
|
@ -1,607 +0,0 @@
|
||||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
@WANT_DEBUGGER_TRUE@am__append_1 = debug.cpp
|
||||
subdir = src/vb
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_gcc_option.m4 \
|
||||
$(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/fcntl-o.m4 \
|
||||
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc2.m4 \
|
||||
$(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \
|
||||
$(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intl.m4 \
|
||||
$(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax.m4 \
|
||||
$(top_srcdir)/m4/inttypes-pri.m4 \
|
||||
$(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \
|
||||
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
|
||||
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
|
||||
$(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \
|
||||
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
|
||||
$(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \
|
||||
$(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \
|
||||
$(top_srcdir)/m4/threadlib.m4 $(top_srcdir)/m4/uintmax_t.m4 \
|
||||
$(top_srcdir)/m4/visibility.m4 $(top_srcdir)/m4/wchar_t.m4 \
|
||||
$(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \
|
||||
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/include/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
ARFLAGS = cru
|
||||
AM_V_AR = $(am__v_AR_$(V))
|
||||
am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_AR_0 = @echo " AR " $@;
|
||||
AM_V_at = $(am__v_at_$(V))
|
||||
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_at_0 = @
|
||||
libvb_a_AR = $(AR) $(ARFLAGS)
|
||||
libvb_a_LIBADD =
|
||||
am__libvb_a_SOURCES_DIST = vb.cpp timer.cpp input.cpp vip.cpp vsu.cpp \
|
||||
debug.cpp
|
||||
@WANT_DEBUGGER_TRUE@am__objects_1 = debug.$(OBJEXT)
|
||||
am_libvb_a_OBJECTS = vb.$(OBJEXT) timer.$(OBJEXT) input.$(OBJEXT) \
|
||||
vip.$(OBJEXT) vsu.$(OBJEXT) $(am__objects_1)
|
||||
libvb_a_OBJECTS = $(am_libvb_a_OBJECTS)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
AM_V_lt = $(am__v_lt_$(V))
|
||||
am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_lt_0 = --silent
|
||||
LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
AM_V_CXX = $(am__v_CXX_$(V))
|
||||
am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_CXX_0 = @echo " CXX " $@;
|
||||
CXXLD = $(CXX)
|
||||
CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
|
||||
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CXXLD = $(am__v_CXXLD_$(V))
|
||||
am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_CXXLD_0 = @echo " CXXLD " $@;
|
||||
AM_V_GEN = $(am__v_GEN_$(V))
|
||||
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
SOURCES = $(libvb_a_SOURCES)
|
||||
DIST_SOURCES = $(am__libvb_a_SOURCES_DIST)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
ALSA_CFLAGS = @ALSA_CFLAGS@
|
||||
ALSA_LIBS = @ALSA_LIBS@
|
||||
AMTAR = @AMTAR@
|
||||
AM_CFLAGS = @AM_CFLAGS@
|
||||
AM_CXXFLAGS = @AM_CXXFLAGS@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CCAS = @CCAS@
|
||||
CCASDEPMODE = @CCASDEPMODE@
|
||||
CCASFLAGS = @CCASFLAGS@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEFS = -DLOCALEDIR=\"$(datadir)/locale\" @DEFS@ @MATH_OPTIMIZER_FLAGS@ -fno-strict-aliasing
|
||||
DEPDIR = @DEPDIR@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GBA_EXTRA_FLAGS = @GBA_EXTRA_FLAGS@
|
||||
GENCAT = @GENCAT@
|
||||
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
|
||||
GLIBC2 = @GLIBC2@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GMSGFMT_015 = @GMSGFMT_015@
|
||||
GREP = @GREP@
|
||||
HAVE_ASPRINTF = @HAVE_ASPRINTF@
|
||||
HAVE_NEWLOCALE = @HAVE_NEWLOCALE@
|
||||
HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
|
||||
HAVE_SNPRINTF = @HAVE_SNPRINTF@
|
||||
HAVE_VISIBILITY = @HAVE_VISIBILITY@
|
||||
HAVE_WPRINTF = @HAVE_WPRINTF@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLBISON = @INTLBISON@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_DEFAULT_VERBOSITY = @INTL_DEFAULT_VERBOSITY@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
|
||||
JACK_CFLAGS = @JACK_CFLAGS@
|
||||
JACK_LIBS = @JACK_LIBS@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@
|
||||
LIBCDIO_LIBS = @LIBCDIO_LIBS@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBINTL = @LIBINTL@
|
||||
LIBMULTITHREAD = @LIBMULTITHREAD@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBPTH = @LIBPTH@
|
||||
LIBPTH_PREFIX = @LIBPTH_PREFIX@
|
||||
LIBS = @LIBS@
|
||||
LIBTHREAD = @LIBTHREAD@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBC = @LTLIBC@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LTLIBPTH = @LTLIBPTH@
|
||||
LTLIBTHREAD = @LTLIBTHREAD@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MATH_OPTIMIZER_FLAGS = @MATH_OPTIMIZER_FLAGS@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MMX_CFLAGS = @MMX_CFLAGS@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGFMT_015 = @MSGFMT_015@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
POSUB = @POSUB@
|
||||
PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
|
||||
RANLIB = @RANLIB@
|
||||
SDL_CFLAGS = @SDL_CFLAGS@
|
||||
SDL_CONFIG = @SDL_CONFIG@
|
||||
SDL_LIBS = @SDL_LIBS@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
SNDFILE_CFLAGS = @SNDFILE_CFLAGS@
|
||||
SNDFILE_LIBS = @SNDFILE_LIBS@
|
||||
SNES_EXTRA_CXXFLAGS = @SNES_EXTRA_CXXFLAGS@
|
||||
SNES_EXTRA_FLAGS = @SNES_EXTRA_FLAGS@
|
||||
SSE2_CFLAGS = @SSE2_CFLAGS@
|
||||
SSE3_CFLAGS = @SSE3_CFLAGS@
|
||||
SSE_CFLAGS = @SSE_CFLAGS@
|
||||
STRIP = @STRIP@
|
||||
TRIO_CFLAGS = @TRIO_CFLAGS@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
WARNING_FLAGS = @WARNING_FLAGS@
|
||||
WINDRES = @WINDRES@
|
||||
WOE32 = @WOE32@
|
||||
WOE32DLL = @WOE32DLL@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
XGETTEXT_015 = @XGETTEXT_015@
|
||||
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
|
||||
XMKMF = @XMKMF@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
lt_ECHO = @lt_ECHO@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
AUTOMAKE_OPTIONS = subdir-objects
|
||||
DEFAULT_INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/intl -I$(top_srcdir)
|
||||
noinst_LIBRARIES = libvb.a
|
||||
libvb_a_SOURCES = vb.cpp timer.cpp input.cpp vip.cpp vsu.cpp \
|
||||
$(am__append_1)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .lo .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/vb/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu src/vb/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
libvb.a: $(libvb_a_OBJECTS) $(libvb_a_DEPENDENCIES)
|
||||
$(AM_V_at)-rm -f libvb.a
|
||||
$(AM_V_AR)$(libvb_a_AR) libvb.a $(libvb_a_OBJECTS) $(libvb_a_LIBADD)
|
||||
$(AM_V_at)$(RANLIB) libvb.a
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/input.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timer.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vb.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vip.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsu.Po@am__quote@
|
||||
|
||||
.cpp.o:
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
||||
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
|
||||
|
||||
.cpp.obj:
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
|
||||
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.cpp.lo:
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
|
||||
@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
|
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LIBRARIES)
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool clean-noinstLIBRARIES ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags uninstall uninstall-am
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
@ -1,702 +0,0 @@
|
||||
/* Mednafen - Multi-system Emulator
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "vb.h"
|
||||
#include <mednafen/hw_cpu/v810/v810_cpuD.h>
|
||||
#include <string.h>
|
||||
#include <trio/trio.h>
|
||||
#include <stdarg.h>
|
||||
#include <iconv.h>
|
||||
|
||||
#include "debug.h"
|
||||
#include "timer.h"
|
||||
//#include "input.h"
|
||||
#include "vip.h"
|
||||
#include "vsu.h"
|
||||
#include "timer.h"
|
||||
|
||||
namespace MDFN_IEN_VB
|
||||
{
|
||||
|
||||
extern V810 *VB_V810;
|
||||
extern VSU *VB_VSU;
|
||||
|
||||
static void (*CPUHook)(uint32);
|
||||
static void (*BPCallB)(uint32 PC) = NULL;
|
||||
static void (*LogFunc)(const char *, const char *);
|
||||
bool VB_LoggingOn = FALSE;
|
||||
|
||||
typedef struct __VB_BPOINT {
|
||||
uint32 A[2];
|
||||
int type;
|
||||
bool logical;
|
||||
} VB_BPOINT;
|
||||
|
||||
static std::vector<VB_BPOINT> BreakPointsPC, BreakPointsRead, BreakPointsWrite;
|
||||
static bool FoundBPoint = 0;
|
||||
|
||||
|
||||
#if 0
|
||||
static int BTIndex = 0;
|
||||
static uint32 BTEntries[16];
|
||||
|
||||
static void AddBranchTrace(uint32 old_PC, uint32 new_PC, uint32 special)
|
||||
{
|
||||
if(BTEntries[(BTIndex - 1) & 0xF] == new_PC) return;
|
||||
|
||||
BTEntries[BTIndex] = new_PC;
|
||||
BTIndex = (BTIndex + 1) & 0xF;
|
||||
}
|
||||
|
||||
std::vector<std::string> VBDBG_GetBranchTrace(void)
|
||||
{
|
||||
std::vector<std::string> ret;
|
||||
|
||||
for(int x = 0; x < 16; x++)
|
||||
{
|
||||
char *tmps = trio_aprintf("%08X", BTEntries[(x + BTIndex) & 0xF]);
|
||||
ret.push_back(std::string(tmps));
|
||||
free(tmps);
|
||||
}
|
||||
return(ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
struct BTEntry
|
||||
{
|
||||
uint32 from;
|
||||
uint32 to;
|
||||
uint32 branch_count;
|
||||
uint32 ecode;
|
||||
};
|
||||
|
||||
#define NUMBT 24
|
||||
static BTEntry BTEntries[NUMBT];
|
||||
static int BTIndex = 0;
|
||||
|
||||
static void AddBranchTrace(uint32 from, uint32 to, uint32 ecode)
|
||||
{
|
||||
BTEntry *prevbt = &BTEntries[(BTIndex + NUMBT - 1) % NUMBT];
|
||||
|
||||
//if(BTEntries[(BTIndex - 1) & 0xF] == PC) return;
|
||||
|
||||
if(prevbt->from == from && prevbt->to == to && prevbt->ecode == ecode && prevbt->branch_count < 0xFFFFFFFF)
|
||||
prevbt->branch_count++;
|
||||
else
|
||||
{
|
||||
BTEntries[BTIndex].from = from;
|
||||
BTEntries[BTIndex].to = to;
|
||||
BTEntries[BTIndex].ecode = ecode;
|
||||
BTEntries[BTIndex].branch_count = 1;
|
||||
|
||||
BTIndex = (BTIndex + 1) % NUMBT;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
std::vector<BranchTraceResult> VBDBG_GetBranchTrace(void)
|
||||
{
|
||||
BranchTraceResult tmp;
|
||||
std::vector<BranchTraceResult> ret;
|
||||
|
||||
for(int x = 0; x < NUMBT; x++)
|
||||
{
|
||||
const BTEntry *bt = &BTEntries[(x + BTIndex) % NUMBT];
|
||||
|
||||
tmp.count = bt->branch_count;
|
||||
trio_snprintf(tmp.from, sizeof(tmp.from), "%08x", bt->from);
|
||||
trio_snprintf(tmp.to, sizeof(tmp.to), "%08x", bt->to);
|
||||
|
||||
tmp.code[0] = 0;
|
||||
|
||||
switch(bt->ecode)
|
||||
{
|
||||
case 0: break;
|
||||
default: trio_snprintf(tmp.code, sizeof(tmp.code), "e");
|
||||
break;
|
||||
|
||||
case 0xFFF0: // Reset
|
||||
trio_snprintf(tmp.code, sizeof(tmp.code), "R");
|
||||
break;
|
||||
|
||||
case 0xFFD0: // NMI
|
||||
trio_snprintf(tmp.code, sizeof(tmp.code), "NMI");
|
||||
break;
|
||||
|
||||
case 0xFFC0: // Address trap
|
||||
trio_snprintf(tmp.code, sizeof(tmp.code), "ADTR");
|
||||
break;
|
||||
|
||||
case 0xFFA0 ... 0xFFBF: // TRAP
|
||||
trio_snprintf(tmp.code, sizeof(tmp.code), "TRAP");
|
||||
break;
|
||||
|
||||
case 0xFF90: // Illegal/invalid instruction code
|
||||
trio_snprintf(tmp.code, sizeof(tmp.code), "ILL");
|
||||
break;
|
||||
|
||||
case 0xFF80: // Zero division
|
||||
trio_snprintf(tmp.code, sizeof(tmp.code), "ZD");
|
||||
break;
|
||||
|
||||
case 0xFF70:
|
||||
trio_snprintf(tmp.code, sizeof(tmp.code), "FIV"); // FIV
|
||||
break;
|
||||
|
||||
case 0xFF68:
|
||||
trio_snprintf(tmp.code, sizeof(tmp.code), "FZD"); // FZD
|
||||
break;
|
||||
|
||||
case 0xFF64:
|
||||
trio_snprintf(tmp.code, sizeof(tmp.code), "FOV"); // FOV
|
||||
break;
|
||||
|
||||
case 0xFF62:
|
||||
trio_snprintf(tmp.code, sizeof(tmp.code), "FUD"); // FUD
|
||||
break;
|
||||
|
||||
case 0xFF61:
|
||||
trio_snprintf(tmp.code, sizeof(tmp.code), "FPR"); // FPR
|
||||
break;
|
||||
|
||||
case 0xFF60:
|
||||
trio_snprintf(tmp.code, sizeof(tmp.code), "FRO"); // FRO
|
||||
break;
|
||||
|
||||
case 0xFE00 ... 0xFEFF:
|
||||
trio_snprintf(tmp.code, sizeof(tmp.code), "INT%d", (bt->ecode >> 4) & 0xF);
|
||||
break;
|
||||
}
|
||||
|
||||
ret.push_back(tmp);
|
||||
}
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
||||
void VBDBG_CheckBP(int type, uint32 address, unsigned int len)
|
||||
{
|
||||
std::vector<VB_BPOINT>::iterator bpit, bpit_end;
|
||||
|
||||
if(type == BPOINT_READ || type == BPOINT_IO_READ)
|
||||
{
|
||||
bpit = BreakPointsRead.begin();
|
||||
bpit_end = BreakPointsRead.end();
|
||||
}
|
||||
else if(type == BPOINT_WRITE || type == BPOINT_IO_WRITE)
|
||||
{
|
||||
bpit = BreakPointsWrite.begin();
|
||||
bpit_end = BreakPointsWrite.end();
|
||||
}
|
||||
else
|
||||
return;
|
||||
|
||||
for(; bpit != bpit_end; bpit++)
|
||||
{
|
||||
uint32 tmp_address = address;
|
||||
uint32 tmp_len = len;
|
||||
|
||||
while(tmp_len--)
|
||||
{
|
||||
if(tmp_address >= bpit->A[0] && tmp_address <= bpit->A[1])
|
||||
{
|
||||
FoundBPoint = TRUE;
|
||||
break;
|
||||
}
|
||||
tmp_address++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static uint16 MDFN_FASTCALL MemPeek8(v810_timestamp_t timestamp, uint32 A)
|
||||
{
|
||||
uint8 ret;
|
||||
|
||||
// TODO: VB_InDebugPeek(implement elsewhere)
|
||||
VB_InDebugPeek++;
|
||||
ret = MemRead8(timestamp, A);
|
||||
VB_InDebugPeek--;
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
static uint16 MDFN_FASTCALL MemPeek16(v810_timestamp_t timestamp, uint32 A)
|
||||
{
|
||||
uint16 ret;
|
||||
|
||||
// TODO: VB_InDebugPeek(implement elsewhere)
|
||||
VB_InDebugPeek++;
|
||||
ret = MemRead16(timestamp, A);
|
||||
VB_InDebugPeek--;
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
static void CPUHandler(uint32 PC)
|
||||
{
|
||||
std::vector<VB_BPOINT>::iterator bpit;
|
||||
|
||||
// FIXME/TODO: Call ForceEventUpdates() somewhere
|
||||
|
||||
for(bpit = BreakPointsPC.begin(); bpit != BreakPointsPC.end(); bpit++)
|
||||
{
|
||||
if(PC >= bpit->A[0] && PC <= bpit->A[1])
|
||||
{
|
||||
FoundBPoint = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
VB_V810->CheckBreakpoints(VBDBG_CheckBP, MemPeek16, NULL);
|
||||
|
||||
if(FoundBPoint)
|
||||
{
|
||||
BPCallB(PC);
|
||||
FoundBPoint = 0;
|
||||
}
|
||||
|
||||
if(CPUHook)
|
||||
CPUHook(PC);
|
||||
}
|
||||
|
||||
static void RedoCPUHook(void)
|
||||
{
|
||||
bool HappyTest;
|
||||
|
||||
HappyTest = VB_LoggingOn || BreakPointsPC.size() || BreakPointsRead.size() || BreakPointsWrite.size();
|
||||
|
||||
void (*cpuh)(uint32);
|
||||
|
||||
cpuh = HappyTest ? CPUHandler : CPUHook;
|
||||
|
||||
VB_V810->SetCPUHook(cpuh, cpuh ? AddBranchTrace : NULL);
|
||||
}
|
||||
|
||||
void VBDBG_FlushBreakPoints(int type)
|
||||
{
|
||||
std::vector<VB_BPOINT>::iterator bpit;
|
||||
|
||||
if(type == BPOINT_READ)
|
||||
BreakPointsRead.clear();
|
||||
else if(type == BPOINT_WRITE)
|
||||
BreakPointsWrite.clear();
|
||||
else if(type == BPOINT_PC)
|
||||
BreakPointsPC.clear();
|
||||
|
||||
RedoCPUHook();
|
||||
}
|
||||
|
||||
void VBDBG_AddBreakPoint(int type, unsigned int A1, unsigned int A2, bool logical)
|
||||
{
|
||||
VB_BPOINT tmp;
|
||||
|
||||
tmp.A[0] = A1;
|
||||
tmp.A[1] = A2;
|
||||
tmp.type = type;
|
||||
|
||||
if(type == BPOINT_READ)
|
||||
BreakPointsRead.push_back(tmp);
|
||||
else if(type == BPOINT_WRITE)
|
||||
BreakPointsWrite.push_back(tmp);
|
||||
else if(type == BPOINT_PC)
|
||||
BreakPointsPC.push_back(tmp);
|
||||
|
||||
RedoCPUHook();
|
||||
}
|
||||
|
||||
static uint16 dis_readhw(uint32 A)
|
||||
{
|
||||
int32 timestamp = 0;
|
||||
return(MemPeek16(timestamp, A));
|
||||
}
|
||||
|
||||
void VBDBG_Disassemble(uint32 &a, uint32 SpecialA, char *TextBuf)
|
||||
{
|
||||
return(v810_dis(a, 1, TextBuf, dis_readhw));
|
||||
}
|
||||
|
||||
uint32 VBDBG_MemPeek(uint32 A, unsigned int bsize, bool hl, bool logical)
|
||||
{
|
||||
uint32 ret = 0;
|
||||
int32 ws = 0;
|
||||
|
||||
for(unsigned int i = 0; i < bsize; i++)
|
||||
{
|
||||
A &= 0xFFFFFFFF;
|
||||
//ret |= mem_peekbyte(A, ws) << (i * 8);
|
||||
ret |= MemRead8(ws, A) << (i * 8);
|
||||
A++;
|
||||
}
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
static void GetAddressSpaceBytes(const char *name, uint32 Address, uint32 Length, uint8 *Buffer)
|
||||
{
|
||||
if(!strcmp(name, "cpu"))
|
||||
{
|
||||
while(Length--)
|
||||
{
|
||||
*Buffer = MemPeek8(0, Address);
|
||||
|
||||
Address++;
|
||||
Buffer++;
|
||||
}
|
||||
}
|
||||
else if(!strncmp(name, "vsuwd", 5))
|
||||
{
|
||||
const unsigned int which = name[5] - '0';
|
||||
|
||||
while(Length--)
|
||||
{
|
||||
*Buffer = VB_VSU->PeekWave(which, Address);
|
||||
|
||||
Address++;
|
||||
Buffer++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void PutAddressSpaceBytes(const char *name, uint32 Address, uint32 Length, uint32 Granularity, bool hl, const uint8 *Buffer)
|
||||
{
|
||||
if(!strcmp(name, "cpu"))
|
||||
{
|
||||
while(Length--)
|
||||
{
|
||||
int32 dummy_ts = 0;
|
||||
|
||||
MemWrite8(dummy_ts, Address, *Buffer);
|
||||
|
||||
Address++;
|
||||
Buffer++;
|
||||
}
|
||||
}
|
||||
else if(!strncmp(name, "vsuwd", 5))
|
||||
{
|
||||
const unsigned int which = name[5] - '0';
|
||||
|
||||
while(Length--)
|
||||
{
|
||||
VB_VSU->PokeWave(which, Address, *Buffer);
|
||||
|
||||
Address++;
|
||||
Buffer++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint32 VBDBG_GetRegister(const std::string &name, std::string *special)
|
||||
{
|
||||
if(name == "PC")
|
||||
{
|
||||
return(VB_V810->GetPC());
|
||||
}
|
||||
const char *thestring = name.c_str();
|
||||
|
||||
if(!strncmp(thestring, "PR", 2))
|
||||
{
|
||||
return(VB_V810->GetPR(atoi(thestring + 2)));
|
||||
}
|
||||
else if(!strcmp(thestring, "HSP"))
|
||||
return(VB_V810->GetPR(2));
|
||||
else if(!strcmp(thestring, "SP"))
|
||||
return(VB_V810->GetPR(3));
|
||||
else if(!strcmp(thestring, "GP"))
|
||||
return(VB_V810->GetPR(4));
|
||||
else if(!strcmp(thestring, "TP"))
|
||||
return(VB_V810->GetPR(5));
|
||||
else if(!strcmp(thestring, "LP"))
|
||||
return(VB_V810->GetPR(31));
|
||||
else if(!strcmp(thestring, "TStamp"))
|
||||
return(VB_V810->v810_timestamp);
|
||||
else if(!strncmp(thestring, "SR", 2))
|
||||
{
|
||||
int which_one = atoi(thestring + 2);
|
||||
uint32 val = VB_V810->GetSR(which_one);
|
||||
|
||||
if(special && which_one == PSW)
|
||||
{
|
||||
char buf[256];
|
||||
snprintf(buf, 256, "Z: %d, S: %d, OV: %d, CY: %d, ID: %d, AE: %d, EP: %d, NP: %d, IA: %2d",
|
||||
(int)(bool)(val & PSW_Z), (int)(bool)(val & PSW_S), (int)(bool)(val & PSW_OV), (int)(bool)(val & PSW_CY),
|
||||
(int)(bool)(val & PSW_ID), (int)(bool)(val & PSW_AE), (int)(bool)(val & PSW_EP), (int)(bool)(val & PSW_NP),
|
||||
(val & PSW_IA) >> 16);
|
||||
*special = std::string(buf);
|
||||
}
|
||||
return(val);
|
||||
}
|
||||
uint32 val = 0;
|
||||
|
||||
return(val);
|
||||
}
|
||||
|
||||
void VBDBG_SetRegister(const std::string &name, uint32 value)
|
||||
{
|
||||
if(name == "PC")
|
||||
{
|
||||
VB_V810->SetPC(value & ~1);
|
||||
return;
|
||||
}
|
||||
|
||||
const char *thestring = name.c_str();
|
||||
|
||||
if(!strncmp(thestring, "PR", 2))
|
||||
{
|
||||
VB_V810->SetPR(atoi(thestring + 2), value);
|
||||
}
|
||||
else if(!strcmp(thestring, "HSP"))
|
||||
VB_V810->SetPR(2, value);
|
||||
else if(!strcmp(thestring, "SP"))
|
||||
VB_V810->SetPR(3, value);
|
||||
else if(!strcmp(thestring, "GP"))
|
||||
VB_V810->SetPR(4, value);
|
||||
else if(!strcmp(thestring, "TP"))
|
||||
VB_V810->SetPR(5, value);
|
||||
else if(!strcmp(thestring, "LP"))
|
||||
VB_V810->SetPR(31, value);
|
||||
else if(!strncmp(thestring, "SR", 2))
|
||||
{
|
||||
VB_V810->SetSR(atoi(thestring + 2), value);
|
||||
}
|
||||
}
|
||||
|
||||
void VBDBG_SetCPUCallback(void (*callb)(uint32 PC))
|
||||
{
|
||||
CPUHook = callb;
|
||||
RedoCPUHook();
|
||||
}
|
||||
|
||||
void VBDBG_SetBPCallback(void (*callb)(uint32 PC))
|
||||
{
|
||||
BPCallB = callb;
|
||||
}
|
||||
|
||||
void VBDBG_DoLog(const char *type, const char *format, ...)
|
||||
{
|
||||
if(LogFunc)
|
||||
{
|
||||
char *temp;
|
||||
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
|
||||
temp = trio_vaprintf(format, ap);
|
||||
LogFunc(type, temp);
|
||||
free(temp);
|
||||
|
||||
va_end(ap);
|
||||
}
|
||||
}
|
||||
|
||||
void VBDBG_SetLogFunc(void (*func)(const char *, const char *))
|
||||
{
|
||||
LogFunc = func;
|
||||
|
||||
VB_LoggingOn = func ? TRUE : FALSE;
|
||||
|
||||
if(VB_LoggingOn)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
RedoCPUHook();
|
||||
}
|
||||
|
||||
static RegType V810Regs[] =
|
||||
{
|
||||
{ 0, "PC", "Program Counter", 4 },
|
||||
{ 0, "PR1", "Program Register 1", 4 },
|
||||
{ 0, "HSP", "Program Register 2(Handler Stack Pointer)", 4 },
|
||||
{ 0, "SP", "Program Register 3(Stack Pointer)", 4 },
|
||||
{ 0, "GP", "Program Register 4(Global Pointer)", 4 },
|
||||
{ 0, "TP", "Program Register 5(Text Pointer)", 4 },
|
||||
{ 0, "PR6", "Program Register 6", 4 },
|
||||
{ 0, "PR7", "Program Register 7", 4 },
|
||||
{ 0, "PR8", "Program Register 8", 4 },
|
||||
{ 0, "PR9", "Program Register 9", 4 },
|
||||
{ 0, "PR10", "Program Register 10", 4 },
|
||||
{ 0, "PR11", "Program Register 11", 4 },
|
||||
{ 0, "PR12", "Program Register 12", 4 },
|
||||
{ 0, "PR13", "Program Register 13", 4 },
|
||||
{ 0, "PR14", "Program Register 14", 4 },
|
||||
{ 0, "PR15", "Program Register 15", 4 },
|
||||
{ 0, "PR16", "Program Register 16", 4 },
|
||||
{ 0, "PR17", "Program Register 17", 4 },
|
||||
{ 0, "PR18", "Program Register 18", 4 },
|
||||
{ 0, "PR19", "Program Register 19", 4 },
|
||||
{ 0, "PR20", "Program Register 20", 4 },
|
||||
{ 0, "PR21", "Program Register 21", 4 },
|
||||
{ 0, "PR22", "Program Register 22", 4 },
|
||||
{ 0, "PR23", "Program Register 23", 4 },
|
||||
{ 0, "PR24", "Program Register 24", 4 },
|
||||
{ 0, "PR25", "Program Register 25", 4 },
|
||||
{ 0, "PR26", "Program Register 26(String Dest Bit Offset)", 4 },
|
||||
{ 0, "PR27", "Program Register 27(String Source Bit Offset)", 4 },
|
||||
{ 0, "PR28", "Program Register 28(String Length)", 4 },
|
||||
{ 0, "PR29", "Program Register 29(String Dest)", 4 },
|
||||
{ 0, "PR30", "Program Register 30(String Source)", 4 },
|
||||
{ 0, "LP", "Program Register 31(Link Pointer)", 4 },
|
||||
{ 0, "SR0", "Exception/Interrupt PC", 4 },
|
||||
{ 0, "SR1", "Exception/Interrupt PSW", 4 },
|
||||
{ 0, "SR2", "Fatal Error PC", 4 },
|
||||
{ 0, "SR3", "Fatal Error PSW", 4 },
|
||||
{ 0, "SR4", "Exception Cause Register", 4 },
|
||||
{ 0, "SR5", "Program Status Word", 4 },
|
||||
{ 0, "SR6", "Processor ID Register", 4 },
|
||||
{ 0, "SR7", "Task Control Word", 4 },
|
||||
{ 0, "SR24", "Cache Control Word", 4 },
|
||||
{ 0, "SR25", "Address Trap Register", 4 },
|
||||
|
||||
//{ 0, "IPEND", "Interrupts Pending", 2 },
|
||||
//{ 0, "IMASK", "Interrupt Mask", 2 },
|
||||
//{ 0, "TCTRL", "Timer Control", 2 },
|
||||
//{ 0, "TPRD", "Timer Period", 2 },
|
||||
//{ 0, "TCNTR", "Timer Counter", 3 },
|
||||
|
||||
{ 0, "TStamp", "Timestamp", 3 },
|
||||
{ 0, "", "", 0 },
|
||||
};
|
||||
|
||||
|
||||
static RegGroupType V810RegsGroup =
|
||||
{
|
||||
NULL,
|
||||
V810Regs,
|
||||
NULL,
|
||||
NULL,
|
||||
VBDBG_GetRegister,
|
||||
VBDBG_SetRegister,
|
||||
};
|
||||
|
||||
static uint32 MISC_GetRegister(const unsigned int id, char *special, const uint32 special_len)
|
||||
{
|
||||
return(TIMER_GetRegister(id, special, special_len));
|
||||
}
|
||||
|
||||
static void MISC_SetRegister(const unsigned int id, const uint32 value)
|
||||
{
|
||||
TIMER_SetRegister(id, value);
|
||||
}
|
||||
|
||||
|
||||
static RegType Regs_Misc[] =
|
||||
{
|
||||
{ TIMER_GSREG_TCR, "TCR", "Timer Control Register", 1 },
|
||||
{ TIMER_GSREG_DIVCOUNTER, "DivCounter", "Timer Clock Divider Counter", 2 },
|
||||
{ TIMER_GSREG_RELOAD_VALUE, "ReloadValue", "Timer Reload Value", 2 },
|
||||
{ TIMER_GSREG_COUNTER, "Counter", "Timer Counter Value", 2 },
|
||||
{ 0, "", "", 0 },
|
||||
};
|
||||
|
||||
static RegGroupType RegsGroup_Misc =
|
||||
{
|
||||
"Misc",
|
||||
Regs_Misc,
|
||||
MISC_GetRegister,
|
||||
MISC_SetRegister
|
||||
};
|
||||
|
||||
|
||||
static RegType Regs_VIP[] =
|
||||
{
|
||||
{ VIP_GSREG_IPENDING, "IPending", "Interrupts Pending", 2 },
|
||||
{ VIP_GSREG_IENABLE, "IEnable", "Interrupts Enabled", 2 },
|
||||
|
||||
{ VIP_GSREG_DPCTRL, "DPCTRL", "DPCTRL", 2 },
|
||||
|
||||
{ VIP_GSREG_BRTA, "BRTA", "BRTA", 1 },
|
||||
{ VIP_GSREG_BRTB, "BRTB", "BRTB", 1 },
|
||||
{ VIP_GSREG_BRTC, "BRTC", "BRTC", 1 },
|
||||
{ VIP_GSREG_REST, "REST", "REST", 1 },
|
||||
{ VIP_GSREG_FRMCYC, "FRMCYC", "FRMCYC", 1 },
|
||||
{ VIP_GSREG_XPCTRL, "XPCTRL", "XPCTRL", 2 },
|
||||
|
||||
{ VIP_GSREG_SPT0, "SPT0", "SPT0", 2 },
|
||||
{ VIP_GSREG_SPT1, "SPT1", "SPT1", 2 },
|
||||
{ VIP_GSREG_SPT2, "SPT2", "SPT2", 2 },
|
||||
{ VIP_GSREG_SPT3, "SPT3", "SPT3", 2 },
|
||||
|
||||
{ VIP_GSREG_GPLT0, "GPLT0", "GPLT0", 1 },
|
||||
{ VIP_GSREG_GPLT1, "GPLT1", "GPLT1", 1 },
|
||||
{ VIP_GSREG_GPLT2, "GPLT2", "GPLT2", 1 },
|
||||
{ VIP_GSREG_GPLT3, "GPLT3", "GPLT3", 1 },
|
||||
|
||||
{ VIP_GSREG_JPLT0, "JPLT0", "JPLT0", 1 },
|
||||
{ VIP_GSREG_JPLT1, "JPLT1", "JPLT1", 1 },
|
||||
{ VIP_GSREG_JPLT2, "JPLT2", "JPLT2", 1 },
|
||||
{ VIP_GSREG_JPLT3, "JPLT3", "JPLT3", 1 },
|
||||
|
||||
{ VIP_GSREG_BKCOL, "BKCOL", "BKCOL", 1 },
|
||||
|
||||
{ 0, "", "", 0 },
|
||||
};
|
||||
|
||||
static RegGroupType RegsGroup_VIP =
|
||||
{
|
||||
"VIP",
|
||||
Regs_VIP,
|
||||
VIP_GetRegister,
|
||||
VIP_SetRegister
|
||||
};
|
||||
|
||||
|
||||
bool VBDBG_Init(void)
|
||||
{
|
||||
MDFNDBG_AddRegGroup(&V810RegsGroup);
|
||||
MDFNDBG_AddRegGroup(&RegsGroup_Misc);
|
||||
MDFNDBG_AddRegGroup(&RegsGroup_VIP);
|
||||
|
||||
ASpace_Add(GetAddressSpaceBytes, PutAddressSpaceBytes, "cpu", "CPU Physical", 32);
|
||||
// ASpace_Add(GetAddressSpaceBytes, PutAddressSpaceBytes, "ram", "RAM", 21);
|
||||
|
||||
|
||||
for(int x = 0; x < 5; x++)
|
||||
{
|
||||
AddressSpaceType newt;
|
||||
char tmpname[128], tmpinfo[128];
|
||||
|
||||
trio_snprintf(tmpname, 128, "vsuwd%d", x);
|
||||
trio_snprintf(tmpinfo, 128, "VSU Wave Data %d", x);
|
||||
|
||||
memset(&newt, 0, sizeof(AddressSpaceType));
|
||||
|
||||
newt.GetAddressSpaceBytes = GetAddressSpaceBytes;
|
||||
newt.PutAddressSpaceBytes = PutAddressSpaceBytes;
|
||||
|
||||
newt.name = strdup(tmpname);
|
||||
newt.long_name = strdup(tmpinfo);
|
||||
newt.TotalBits = 5;
|
||||
newt.NP2Size = 0;
|
||||
newt.IsSegmented = FALSE;
|
||||
newt.SegmentBits = 0;
|
||||
newt.OffsetBits = 0;
|
||||
newt.BitsOverlapped = 0;
|
||||
|
||||
newt.IsWave = TRUE;
|
||||
newt.WaveFormat = ASPACE_WFMT_UNSIGNED;
|
||||
newt.WaveBits = 6;
|
||||
ASpace_Add(newt); //PSG_GetAddressSpaceBytes, PSG_PutAddressSpaceBytes, tmpname, tmpinfo, 5);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
#ifndef __VB_DEBUG_H
|
||||
#define __VB_DEBUG_H
|
||||
|
||||
namespace MDFN_IEN_VB
|
||||
{
|
||||
|
||||
void VBDBG_FlushBreakPoints(int type);
|
||||
void VBDBG_AddBreakPoint(int type, unsigned int A1, unsigned int A2, bool logical);
|
||||
void VBDBG_Disassemble(uint32 &a, uint32 SpecialA, char *);
|
||||
|
||||
uint32 VBDBG_MemPeek(uint32 A, unsigned int bsize, bool hl, bool logical);
|
||||
uint32 VBDBG_GetRegister(const std::string &name, std::string *special);
|
||||
void VBDBG_SetRegister(const std::string &name, uint32 value);
|
||||
|
||||
void VBDBG_SetCPUCallback(void (*callb)(uint32 PC));
|
||||
void VBDBG_SetBPCallback(void (*callb)(uint32 PC));
|
||||
|
||||
std::vector<BranchTraceResult> VBDBG_GetBranchTrace(void);
|
||||
|
||||
void VBDBG_CheckBP(int type, uint32 address, unsigned int len);
|
||||
|
||||
void VBDBG_SetLogFunc(void (*func)(const char *, const char *));
|
||||
|
||||
void VBDBG_DoLog(const char *type, const char *format, ...);
|
||||
|
||||
|
||||
extern bool VB_LoggingOn;
|
||||
|
||||
bool VBDBG_Init(void);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
@ -1,228 +0,0 @@
|
||||
/* Mednafen - Multi-system Emulator
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "vb.h"
|
||||
#include "input.h"
|
||||
|
||||
namespace MDFN_IEN_VB
|
||||
{
|
||||
static bool InstantReadHack;
|
||||
|
||||
static bool IntPending;
|
||||
|
||||
static uint8 *data_ptr;
|
||||
|
||||
static uint16 PadData;
|
||||
static uint16 PadLatched;
|
||||
|
||||
static uint8 SCR;
|
||||
static uint16 SDR;
|
||||
|
||||
#define SCR_S_ABT_DIS 0x01
|
||||
#define SCR_SI_STAT 0x02
|
||||
#define SCR_HW_SI 0x04
|
||||
#define SCR_SOFT_CLK 0x10
|
||||
|
||||
#define SCR_PARA_SI 0x20
|
||||
#define SCR_K_INT_INH 0x80
|
||||
|
||||
static uint32 ReadBitPos;
|
||||
static int32 ReadCounter;
|
||||
|
||||
static v810_timestamp_t last_ts;
|
||||
|
||||
void VBINPUT_Init(void)
|
||||
{
|
||||
InstantReadHack = true;
|
||||
}
|
||||
|
||||
void VBINPUT_SetInstantReadHack(bool enabled)
|
||||
{
|
||||
InstantReadHack = enabled;
|
||||
}
|
||||
|
||||
|
||||
void VBINPUT_SetInput(int port, const char *type, void *ptr)
|
||||
{
|
||||
data_ptr = (uint8 *)ptr;
|
||||
}
|
||||
|
||||
uint8 VBINPUT_Read(v810_timestamp_t ×tamp, uint32 A)
|
||||
{
|
||||
uint8 ret = 0;
|
||||
|
||||
|
||||
VBINPUT_Update(timestamp);
|
||||
|
||||
//if(((A & 0xFF) == 0x10 || (A & 0xFF) == 0x14))
|
||||
// printf("Read %d\n", timestamp);
|
||||
|
||||
//if(((A & 0xFF) == 0x10 || (A & 0xFF) == 0x14) && ReadCounter > 0)
|
||||
//{
|
||||
// printf("Input port read during hardware transfer: %08x %d\n", A, timestamp);
|
||||
//}
|
||||
|
||||
switch(A & 0xFF)
|
||||
{
|
||||
case 0x10: if(InstantReadHack)
|
||||
ret = PadData;
|
||||
else
|
||||
ret = SDR & 0xFF;
|
||||
break;
|
||||
|
||||
case 0x14: if(InstantReadHack)
|
||||
ret = PadData >> 8;
|
||||
else
|
||||
ret = SDR >> 8;
|
||||
break;
|
||||
|
||||
case 0x28: ret = SCR | (0x40 | 0x08 | SCR_HW_SI);
|
||||
if(ReadCounter > 0)
|
||||
ret |= SCR_SI_STAT;
|
||||
break;
|
||||
}
|
||||
|
||||
// printf("Input Read: %08x %02x\n", A, ret);
|
||||
VB_SetEvent(VB_EVENT_INPUT, (ReadCounter > 0) ? (timestamp + ReadCounter) : VB_EVENT_NONONO);
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
void VBINPUT_Write(v810_timestamp_t ×tamp, uint32 A, uint8 V)
|
||||
{
|
||||
VBINPUT_Update(timestamp);
|
||||
|
||||
//printf("Input write: %d, %08x %02x\n", timestamp, A, V);
|
||||
switch(A & 0xFF)
|
||||
{
|
||||
case 0x28:
|
||||
if((V & SCR_HW_SI) && !(SCR & SCR_S_ABT_DIS) && ReadCounter <= 0)
|
||||
{
|
||||
//printf("Start Read: %d\n", timestamp);
|
||||
PadLatched = PadData;
|
||||
ReadBitPos = 0;
|
||||
ReadCounter = 640;
|
||||
}
|
||||
|
||||
if(V & SCR_S_ABT_DIS)
|
||||
{
|
||||
ReadCounter = 0;
|
||||
ReadBitPos = 0;
|
||||
}
|
||||
|
||||
if(V & SCR_K_INT_INH)
|
||||
{
|
||||
IntPending = false;
|
||||
VBIRQ_Assert(VBIRQ_SOURCE_INPUT, IntPending);
|
||||
}
|
||||
|
||||
SCR = V & (0x80 | 0x20 | 0x10 | 1);
|
||||
break;
|
||||
}
|
||||
|
||||
VB_SetEvent(VB_EVENT_INPUT, (ReadCounter > 0) ? (timestamp + ReadCounter) : VB_EVENT_NONONO);
|
||||
}
|
||||
|
||||
void VBINPUT_Frame(void)
|
||||
{
|
||||
PadData = (MDFN_de16lsb(data_ptr) << 2) | 0x2;
|
||||
}
|
||||
|
||||
v810_timestamp_t VBINPUT_Update(const v810_timestamp_t timestamp)
|
||||
{
|
||||
int32 clocks = timestamp - last_ts;
|
||||
|
||||
if(ReadCounter > 0)
|
||||
{
|
||||
ReadCounter -= clocks;
|
||||
|
||||
while(ReadCounter <= 0)
|
||||
{
|
||||
SDR &= ~(1 << ReadBitPos);
|
||||
SDR |= PadLatched & (1 << ReadBitPos);
|
||||
|
||||
ReadBitPos++;
|
||||
if(ReadBitPos < 16)
|
||||
ReadCounter += 640;
|
||||
else
|
||||
{
|
||||
//printf("Read End: %d\n", timestamp);
|
||||
if(!(SCR & SCR_K_INT_INH))
|
||||
{
|
||||
//printf("Input IRQ: %d\n", timestamp);
|
||||
IntPending = true;
|
||||
VBIRQ_Assert(VBIRQ_SOURCE_INPUT, IntPending);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
last_ts = timestamp;
|
||||
|
||||
return((ReadCounter > 0) ? (timestamp + ReadCounter) : VB_EVENT_NONONO);
|
||||
}
|
||||
|
||||
void VBINPUT_ResetTS(void)
|
||||
{
|
||||
last_ts = 0;
|
||||
}
|
||||
|
||||
void VBINPUT_Power(void)
|
||||
{
|
||||
last_ts = 0;
|
||||
PadData = 0;
|
||||
PadLatched = 0;
|
||||
SDR = 0;
|
||||
SCR = 0;
|
||||
ReadBitPos = 0;
|
||||
ReadCounter = 0;
|
||||
IntPending = false;
|
||||
|
||||
VBIRQ_Assert(VBIRQ_SOURCE_INPUT, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
int VBINPUT_StateAction(StateMem *sm, int load, int data_only)
|
||||
{
|
||||
SFORMAT StateRegs[] =
|
||||
{
|
||||
SFVAR(PadData),
|
||||
SFVAR(PadLatched),
|
||||
SFVAR(SCR),
|
||||
SFVAR(SDR),
|
||||
SFVAR(ReadBitPos),
|
||||
SFVAR(ReadCounter),
|
||||
SFVAR(IntPending),
|
||||
SFEND
|
||||
};
|
||||
|
||||
int ret = MDFNSS_StateAction(sm, load, data_only, StateRegs, "INPUT");
|
||||
|
||||
if(load)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
#ifndef __VB_INPUT_H
|
||||
#define __VB_INPUT_H
|
||||
|
||||
namespace MDFN_IEN_VB
|
||||
{
|
||||
|
||||
void VBINPUT_Init(void);
|
||||
void VBINPUT_SetInstantReadHack(bool);
|
||||
|
||||
void VBINPUT_SetInput(int port, const char *type, void *ptr);
|
||||
|
||||
uint8 VBINPUT_Read(v810_timestamp_t ×tamp, uint32 A);
|
||||
|
||||
void VBINPUT_Write(v810_timestamp_t ×tamp, uint32 A, uint8 V);
|
||||
|
||||
void VBINPUT_Frame(void);
|
||||
int VBINPUT_StateAction(StateMem *sm, int load, int data_only);
|
||||
|
||||
int32 VBINPUT_Update(const int32 timestamp);
|
||||
void VBINPUT_ResetTS(void);
|
||||
|
||||
|
||||
void VBINPUT_Power(void);
|
||||
|
||||
|
||||
int VBINPUT_StateAction(StateMem *sm, int load, int data_only);
|
||||
|
||||
}
|
||||
#endif
|
@ -1,254 +0,0 @@
|
||||
/* Mednafen - Multi-system Emulator
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "vb.h"
|
||||
#include "timer.h"
|
||||
|
||||
namespace MDFN_IEN_VB
|
||||
{
|
||||
|
||||
#define TC_TENABLE 0x01
|
||||
#define TC_ZSTAT 0x02
|
||||
#define TC_ZSTATCLR 0x04
|
||||
#define TC_TIMZINT 0x08
|
||||
#define TC_TCLKSEL 0x10
|
||||
|
||||
static uint8 TimerControl;
|
||||
static uint16 TimerReloadValue;
|
||||
static uint16 TimerCounter;
|
||||
static int32 TimerDivider;
|
||||
static v810_timestamp_t TimerLastTS;
|
||||
static bool TimerStatus, TimerStatusShadow;
|
||||
static bool ReloadPending;
|
||||
|
||||
v810_timestamp_t TIMER_Update(v810_timestamp_t timestamp)
|
||||
{
|
||||
int32 run_time = timestamp - TimerLastTS;
|
||||
|
||||
if(TimerControl & TC_TENABLE)
|
||||
{
|
||||
TimerDivider -= run_time;
|
||||
while(TimerDivider <= 0)
|
||||
{
|
||||
if(!TimerCounter || ReloadPending)
|
||||
{
|
||||
TimerCounter = TimerReloadValue;
|
||||
ReloadPending = false;
|
||||
}
|
||||
|
||||
if(TimerCounter)
|
||||
TimerCounter--;
|
||||
|
||||
if(!TimerCounter || TimerStatus)
|
||||
{
|
||||
TimerStatusShadow = TimerStatus = true;
|
||||
}
|
||||
|
||||
VBIRQ_Assert(VBIRQ_SOURCE_TIMER, TimerStatusShadow && (TimerControl & TC_TIMZINT));
|
||||
TimerDivider += (TimerControl & TC_TCLKSEL) ? 500 : 2000;
|
||||
}
|
||||
}
|
||||
|
||||
TimerLastTS = timestamp;
|
||||
|
||||
return((TimerControl & TC_TENABLE) ? (timestamp + TimerDivider) : VB_EVENT_NONONO);
|
||||
}
|
||||
|
||||
void TIMER_ResetTS(void)
|
||||
{
|
||||
TimerLastTS = 0;
|
||||
}
|
||||
|
||||
uint8 TIMER_Read(const v810_timestamp_t ×tamp, uint32 A)
|
||||
{
|
||||
uint8 ret = 0;
|
||||
|
||||
//if(A <= 0x1C)
|
||||
//printf("Read: %d, %08x\n", timestamp, A);
|
||||
TIMER_Update(timestamp);
|
||||
|
||||
switch(A & 0xFF)
|
||||
{
|
||||
case 0x18: ret = TimerCounter;
|
||||
break;
|
||||
|
||||
case 0x1C: ret = TimerCounter >> 8;
|
||||
break;
|
||||
|
||||
case 0x20: ret = TimerControl | (0xE0 | TC_ZSTATCLR) | (TimerStatus ? TC_ZSTAT : 0);
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
void TIMER_Write(const v810_timestamp_t ×tamp, uint32 A, uint8 V)
|
||||
{
|
||||
if(A & 0x3)
|
||||
{
|
||||
puts("HWCtrl Bogus Write?");
|
||||
return;
|
||||
}
|
||||
|
||||
TIMER_Update(timestamp);
|
||||
|
||||
//if((A & 0xFF) <= 0x1C)
|
||||
//printf("Write: %d, %08x %02x\n", timestamp, A, V);
|
||||
|
||||
switch(A & 0xFF)
|
||||
{
|
||||
case 0x18: TimerReloadValue &= 0xFF00;
|
||||
TimerReloadValue |= V;
|
||||
ReloadPending = true;
|
||||
break;
|
||||
|
||||
case 0x1C: TimerReloadValue &= 0x00FF;
|
||||
TimerReloadValue |= V << 8;
|
||||
ReloadPending = true;
|
||||
break;
|
||||
|
||||
case 0x20: if(V & TC_ZSTATCLR)
|
||||
{
|
||||
if((TimerControl & TC_TENABLE) && TimerCounter == 0)
|
||||
{
|
||||
//puts("Faulty Z-Stat-Clr");
|
||||
}
|
||||
else
|
||||
{
|
||||
TimerStatus = false;
|
||||
}
|
||||
TimerStatusShadow = false;
|
||||
}
|
||||
if((V & TC_TENABLE) && !(TimerControl & TC_TENABLE))
|
||||
{
|
||||
//TimerCounter = TimerReloadValue;
|
||||
TimerDivider = (V & TC_TCLKSEL) ? 500 : 2000;
|
||||
}
|
||||
TimerControl = V & (0x10 | 0x08 | 0x01);
|
||||
|
||||
if(!(TimerControl & TC_TIMZINT))
|
||||
TimerStatus = TimerStatusShadow = false;
|
||||
|
||||
VBIRQ_Assert(VBIRQ_SOURCE_TIMER, TimerStatusShadow && (TimerControl & TC_TIMZINT));
|
||||
|
||||
if(TimerControl & TC_TENABLE)
|
||||
VB_SetEvent(VB_EVENT_TIMER, timestamp + TimerDivider);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void TIMER_Power(void)
|
||||
{
|
||||
TimerLastTS = 0;
|
||||
|
||||
TimerCounter = 0xFFFF;
|
||||
TimerReloadValue = 0xFFFF;
|
||||
TimerDivider = 2000; //2150; //2000;
|
||||
|
||||
TimerStatus = false;
|
||||
TimerStatusShadow = false;
|
||||
TimerControl = 0;
|
||||
|
||||
ReloadPending = false;
|
||||
|
||||
VBIRQ_Assert(VBIRQ_SOURCE_TIMER, false);
|
||||
}
|
||||
|
||||
int TIMER_StateAction(StateMem *sm, int load, int data_only)
|
||||
{
|
||||
SFORMAT StateRegs[] =
|
||||
{
|
||||
SFVAR(TimerCounter),
|
||||
SFVAR(TimerReloadValue),
|
||||
SFVAR(TimerDivider),
|
||||
SFVAR(TimerStatus),
|
||||
SFVAR(TimerStatusShadow),
|
||||
SFVAR(TimerControl),
|
||||
SFVAR(ReloadPending),
|
||||
SFEND
|
||||
};
|
||||
|
||||
int ret = MDFNSS_StateAction(sm, load, data_only, StateRegs, "TIMER");
|
||||
|
||||
if(load)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
uint32 TIMER_GetRegister(const unsigned int id, char *special, const uint32 special_len)
|
||||
{
|
||||
uint32 ret = 0xDEADBEEF;
|
||||
|
||||
switch(id)
|
||||
{
|
||||
case TIMER_GSREG_TCR:
|
||||
ret = TimerControl;
|
||||
if(special)
|
||||
trio_snprintf(special, special_len, "TEnable: %d, TimZInt: %d, TClkSel: %d(%.3f KHz)",
|
||||
(int)(bool)(ret & TC_TENABLE),
|
||||
(int)(bool)(ret & TC_TIMZINT),
|
||||
(int)(bool)(ret & TC_TCLKSEL),
|
||||
(double)VB_MASTER_CLOCK / ((ret & TC_TCLKSEL) ? 500 : 2000) / 1000 );
|
||||
break;
|
||||
|
||||
case TIMER_GSREG_DIVCOUNTER:
|
||||
ret = TimerDivider;
|
||||
break;
|
||||
|
||||
case TIMER_GSREG_RELOAD_VALUE:
|
||||
ret = TimerReloadValue;
|
||||
break;
|
||||
|
||||
case TIMER_GSREG_COUNTER:
|
||||
ret = TimerCounter;
|
||||
break;
|
||||
|
||||
}
|
||||
return(ret);
|
||||
}
|
||||
|
||||
void TIMER_SetRegister(const unsigned int id, const uint32 value)
|
||||
{
|
||||
switch(id)
|
||||
{
|
||||
case TIMER_GSREG_TCR:
|
||||
TimerControl = value & (TC_TENABLE | TC_TIMZINT | TC_TCLKSEL);
|
||||
break;
|
||||
|
||||
case TIMER_GSREG_DIVCOUNTER:
|
||||
TimerDivider = value % ((TimerControl & TC_TCLKSEL) ? 500 : 2000);
|
||||
break;
|
||||
|
||||
case TIMER_GSREG_RELOAD_VALUE:
|
||||
TimerReloadValue = value;
|
||||
break;
|
||||
|
||||
case TIMER_GSREG_COUNTER:
|
||||
TimerCounter = value;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
#ifndef __MDFN_VB_TIMER_H
|
||||
#define __MDFN_VB_TIMER_H
|
||||
|
||||
namespace MDFN_IEN_VB
|
||||
{
|
||||
|
||||
v810_timestamp_t TIMER_Update(v810_timestamp_t timestamp);
|
||||
void TIMER_ResetTS(void);
|
||||
uint8 TIMER_Read(const v810_timestamp_t ×tamp, uint32 A);
|
||||
void TIMER_Write(const v810_timestamp_t ×tamp, uint32 A, uint8 V);
|
||||
|
||||
void TIMER_Power(void);
|
||||
|
||||
int TIMER_StateAction(StateMem *sm, int load, int data_only);
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
TIMER_GSREG_TCR,
|
||||
TIMER_GSREG_DIVCOUNTER,
|
||||
TIMER_GSREG_RELOAD_VALUE,
|
||||
TIMER_GSREG_COUNTER,
|
||||
};
|
||||
|
||||
uint32 TIMER_GetRegister(const unsigned int id, char *special, const uint32 special_len);
|
||||
void TIMER_SetRegister(const unsigned int id, const uint32 value);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
@ -1,61 +0,0 @@
|
||||
#ifndef __VB_VB_H
|
||||
#define __VB_VB_H
|
||||
|
||||
#include <mednafen/mednafen.h>
|
||||
#include <mednafen/hw_cpu/v810/v810_cpu.h>
|
||||
#include <mednafen/masmem.h>
|
||||
#include <trio/trio.h>
|
||||
|
||||
namespace MDFN_IEN_VB
|
||||
{
|
||||
|
||||
enum
|
||||
{
|
||||
VB3DMODE_ANAGLYPH = 0,
|
||||
VB3DMODE_CSCOPE = 1,
|
||||
VB3DMODE_SIDEBYSIDE = 2,
|
||||
VB3DMODE_OVERUNDER = 3,
|
||||
VB3DMODE_VLI,
|
||||
VB3DMODE_HLI
|
||||
};
|
||||
|
||||
#define VB_MASTER_CLOCK 20000000.0
|
||||
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
VB_EVENT_VIP = 0,
|
||||
VB_EVENT_TIMER,
|
||||
VB_EVENT_INPUT,
|
||||
// VB_EVENT_COMM
|
||||
};
|
||||
|
||||
#define VB_EVENT_NONONO 0x7fffffff
|
||||
|
||||
void VB_SetEvent(const int type, const v810_timestamp_t next_timestamp);
|
||||
|
||||
|
||||
#define VBIRQ_SOURCE_INPUT 0
|
||||
#define VBIRQ_SOURCE_TIMER 1
|
||||
#define VBIRQ_SOURCE_EXPANSION 2
|
||||
#define VBIRQ_SOURCE_COMM 3
|
||||
#define VBIRQ_SOURCE_VIP 4
|
||||
|
||||
void VBIRQ_Assert(int source, bool assert);
|
||||
|
||||
void VB_ExitLoop(void);
|
||||
|
||||
|
||||
uint8 MDFN_FASTCALL MemRead8(v810_timestamp_t ×tamp, uint32 A);
|
||||
uint16 MDFN_FASTCALL MemRead16(v810_timestamp_t ×tamp, uint32 A);
|
||||
|
||||
void MDFN_FASTCALL MemWrite8(v810_timestamp_t ×tamp, uint32 A, uint8 V);
|
||||
void MDFN_FASTCALL MemWrite16(v810_timestamp_t ×tamp, uint32 A, uint16 V);
|
||||
|
||||
|
||||
|
||||
extern int32 VB_InDebugPeek;
|
||||
}
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
@ -1,71 +0,0 @@
|
||||
#ifndef __VB_VIP_H
|
||||
#define __VB_VIP_H
|
||||
|
||||
namespace MDFN_IEN_VB
|
||||
{
|
||||
|
||||
bool VIP_Init(void);
|
||||
void VIP_Power(void);
|
||||
|
||||
void VIP_SetInstantDisplayHack(bool);
|
||||
void VIP_SetAllowDrawSkip(bool);
|
||||
void VIP_Set3DMode(uint32 mode, bool reverse, uint32 prescale, uint32 sbs_separation);
|
||||
void VIP_SetParallaxDisable(bool disabled);
|
||||
void VIP_SetDefaultColor(uint32 default_color);
|
||||
void VIP_SetAnaglyphColors(uint32 lcolor, uint32 rcolor); // R << 16, G << 8, B << 0
|
||||
|
||||
v810_timestamp_t MDFN_FASTCALL VIP_Update(const v810_timestamp_t timestamp);
|
||||
void VIP_ResetTS(void);
|
||||
|
||||
void VIP_StartFrame(EmulateSpecStruct *espec);
|
||||
|
||||
uint8 VIP_Read8(v810_timestamp_t ×tamp, uint32 A);
|
||||
uint16 VIP_Read16(v810_timestamp_t ×tamp, uint32 A);
|
||||
|
||||
|
||||
void VIP_Write8(v810_timestamp_t ×tamp, uint32 A, uint8 V);
|
||||
void VIP_Write16(v810_timestamp_t ×tamp, uint32 A, uint16 V);
|
||||
|
||||
|
||||
|
||||
int VIP_StateAction(StateMem *sm, int load, int data_only);
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
VIP_GSREG_IPENDING = 0, // Current pending interrupt(bits)
|
||||
VIP_GSREG_IENABLE,
|
||||
|
||||
VIP_GSREG_DPCTRL,
|
||||
|
||||
VIP_GSREG_BRTA,
|
||||
VIP_GSREG_BRTB,
|
||||
VIP_GSREG_BRTC,
|
||||
VIP_GSREG_REST,
|
||||
VIP_GSREG_FRMCYC,
|
||||
VIP_GSREG_XPCTRL,
|
||||
|
||||
VIP_GSREG_SPT0,
|
||||
VIP_GSREG_SPT1,
|
||||
VIP_GSREG_SPT2,
|
||||
VIP_GSREG_SPT3,
|
||||
|
||||
VIP_GSREG_GPLT0,
|
||||
VIP_GSREG_GPLT1,
|
||||
VIP_GSREG_GPLT2,
|
||||
VIP_GSREG_GPLT3,
|
||||
|
||||
VIP_GSREG_JPLT0,
|
||||
VIP_GSREG_JPLT1,
|
||||
VIP_GSREG_JPLT2,
|
||||
VIP_GSREG_JPLT3,
|
||||
|
||||
VIP_GSREG_BKCOL,
|
||||
};
|
||||
|
||||
uint32 VIP_GetRegister(const unsigned int id, char *special, const uint32 special_len);
|
||||
void VIP_SetRegister(const unsigned int id, const uint32 value);
|
||||
|
||||
|
||||
}
|
||||
#endif
|
@ -1,474 +0,0 @@
|
||||
#include "vb.h"
|
||||
|
||||
#define BGM_AFFINE 0x2
|
||||
#define BGM_OBJ 0x3
|
||||
|
||||
|
||||
static void DrawBG(uint8 *target, uint16 RealY, bool lr, uint8 bgmap_base_raw, bool overplane, uint16 overplane_char, uint32 SourceX, uint32 SourceY, uint32 scx, uint32 scy, uint16 DestX, uint16 DestY, uint16 DestWidth, uint16 DestHeight)
|
||||
{
|
||||
const uint16 *CHR16 = CHR_RAM;
|
||||
const uint16 *BGMap = DRAM;
|
||||
uint32 BGMap_Base = bgmap_base_raw << 12;
|
||||
int32 start_x, final_x;
|
||||
const uint32 bgsc_overplane = DRAM[overplane_char];
|
||||
const uint32 BGMap_XCount = 1 << scx;
|
||||
const uint32 BGMap_YCount = 1 << scy;
|
||||
const uint32 SourceX_Size = 512 * BGMap_XCount;
|
||||
const uint32 SourceY_Size = 512 * BGMap_YCount;
|
||||
const uint32 SourceX_Mask = overplane ? 0x1FFF : (SourceX_Size - 1);
|
||||
const uint32 SourceY_Mask = overplane ? 0x1FFF : (SourceY_Size - 1);
|
||||
|
||||
if((uint16)(RealY - DestY) > DestHeight)
|
||||
return;
|
||||
|
||||
//printf("%d, %d, %d, %d\n", overplane, srcXSize, srcYSize, bgmap_base_raw);
|
||||
|
||||
DestX = sign_10_to_s16(DestX);
|
||||
|
||||
if(DestX & 0x8000)
|
||||
SourceX -= DestX;
|
||||
|
||||
start_x = (int16)DestX;
|
||||
final_x = (int16)DestX + DestWidth;
|
||||
|
||||
if(start_x < 0)
|
||||
start_x = 0;
|
||||
|
||||
if(final_x > 383)
|
||||
final_x = 383;
|
||||
|
||||
if(start_x > final_x)
|
||||
return;
|
||||
|
||||
// Optimization:
|
||||
SourceY &= SourceY_Mask;
|
||||
BGMap_Base |= (((SourceY >> 3) & 0x3F) * 0x40) | (((SourceY << 3) & ~0xFFF) << scx);
|
||||
|
||||
for(int x = start_x; x <= final_x; x++)
|
||||
{
|
||||
uint32 bgsc;
|
||||
uint32 char_no;
|
||||
uint32 palette_selector;
|
||||
uint32 hflip_xor;
|
||||
uint32 vflip_xor;
|
||||
|
||||
SourceX &= SourceX_Mask;
|
||||
|
||||
bgsc = bgsc_overplane;
|
||||
|
||||
if(SourceX < SourceX_Size && SourceY < SourceY_Size)
|
||||
bgsc = BGMap[(BGMap_Base | ((SourceX << 3) & ~0xFFF) | ((SourceX >> 3) & 0x3F)) & 0xFFFF];
|
||||
|
||||
char_no = bgsc & 0x7FF;
|
||||
palette_selector = bgsc >> 14;
|
||||
hflip_xor = (bgsc & 0x2000) ? 7 : 0; //(((int32)bgsc << 18) >> 31) & 0x7;
|
||||
vflip_xor = (bgsc & 0x1000) ? 7 : 0; //(((int32)bgsc << 19) >> 31) & 0x7;
|
||||
|
||||
unsigned int char_sub_y = vflip_xor ^ (SourceY & 0x7);
|
||||
|
||||
if(!(SourceX & 7) && (x + 7) <= final_x)
|
||||
{
|
||||
uint32 pixels = CHR16[char_no * 8 + char_sub_y];
|
||||
|
||||
#if 0
|
||||
unsigned int char_sub_x;
|
||||
uint8 *sub_target = target + x + 8;
|
||||
|
||||
for(int sub_x = -8; sub_x < 0; sub_x++)
|
||||
{
|
||||
if(pixels & 3) sub_target[sub_x] = GPLT_Cache[palette_selector][pixels & 3];
|
||||
pixels >>= 2;
|
||||
}
|
||||
#endif
|
||||
|
||||
if(bgsc & 0x2000)
|
||||
{
|
||||
if((pixels >> 14) & 3) target[0 + x] = GPLT_Cache[palette_selector][(pixels >> 14) & 3];
|
||||
if((pixels >> 12) & 3) target[1 + x] = GPLT_Cache[palette_selector][(pixels >> 12) & 3];
|
||||
if((pixels >> 10) & 3) target[2 + x] = GPLT_Cache[palette_selector][(pixels >> 10) & 3];
|
||||
if((pixels >> 8) & 3) target[3 + x] = GPLT_Cache[palette_selector][(pixels >> 8) & 3];
|
||||
if((pixels >> 6) & 3) target[4 + x] = GPLT_Cache[palette_selector][(pixels >> 6) & 3];
|
||||
if((pixels >> 4) & 3) target[5 + x] = GPLT_Cache[palette_selector][(pixels >> 4) & 3];
|
||||
if((pixels >> 2) & 3) target[6 + x] = GPLT_Cache[palette_selector][(pixels >> 2) & 3];
|
||||
if((pixels >> 0) & 3) target[7 + x] = GPLT_Cache[palette_selector][(pixels >> 0) & 3];
|
||||
}
|
||||
else
|
||||
{
|
||||
if((pixels >> 0) & 3) target[0 + x] = GPLT_Cache[palette_selector][(pixels >> 0) & 3];
|
||||
if((pixels >> 2) & 3) target[1 + x] = GPLT_Cache[palette_selector][(pixels >> 2) & 3];
|
||||
if((pixels >> 4) & 3) target[2 + x] = GPLT_Cache[palette_selector][(pixels >> 4) & 3];
|
||||
if((pixels >> 6) & 3) target[3 + x] = GPLT_Cache[palette_selector][(pixels >> 6) & 3];
|
||||
if((pixels >> 8) & 3) target[4 + x] = GPLT_Cache[palette_selector][(pixels >> 8) & 3];
|
||||
if((pixels >> 10) & 3) target[5 + x] = GPLT_Cache[palette_selector][(pixels >> 10) & 3];
|
||||
if((pixels >> 12) & 3) target[6 + x] = GPLT_Cache[palette_selector][(pixels >> 12) & 3];
|
||||
if((pixels >> 14) & 3) target[7 + x] = GPLT_Cache[palette_selector][(pixels >> 14) & 3];
|
||||
}
|
||||
|
||||
x += 7;
|
||||
SourceX += 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
unsigned int char_sub_x;
|
||||
|
||||
char_sub_x = hflip_xor ^ (SourceX & 0x7);
|
||||
|
||||
uint8 pixel = (CHR16[char_no * 8 + char_sub_y] >> (char_sub_x * 2)) & 0x3;
|
||||
|
||||
if(pixel)
|
||||
target[x] = GPLT_Cache[palette_selector][pixel]; //target[x] = (GPLT[palette_selector] >> (pixel * 2)) & 0x3;
|
||||
SourceX++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void DrawAffine(uint8 *target, uint16 RealY, bool lr, uint32 ParamBase, uint32 BGMap_Base, bool OverplaneMode, uint16 OverplaneChar, uint32 scx, uint32 scy,
|
||||
uint16 DestX, uint16 DestY, uint16 DestWidth, uint16 DestHeight)
|
||||
{
|
||||
const uint16 *CHR16 = CHR_RAM;
|
||||
const uint16 *BGMap = DRAM;
|
||||
|
||||
const uint32 BGMap_XCount = 1 << scx;
|
||||
const uint32 BGMap_YCount = 1 << scy;
|
||||
const uint32 SourceX_Size = 512 * BGMap_XCount;
|
||||
const uint32 SourceY_Size = 512 * BGMap_YCount;
|
||||
|
||||
const uint16 *param_ptr = &DRAM[(ParamBase + 8 * (RealY - DestY)) & 0xFFFF];
|
||||
int16 mx = param_ptr[0], mp = (ParallaxDisabled ? 0 : param_ptr[1]), my = param_ptr[2], dx = param_ptr[3], dy = param_ptr[4];
|
||||
|
||||
uint32 SourceX, SourceY;
|
||||
uint32 SourceX_Mask, SourceY_Mask;
|
||||
|
||||
int32 start_x, final_x;
|
||||
const uint32 bgsc_overplane = DRAM[OverplaneChar];
|
||||
|
||||
|
||||
DestX = sign_10_to_s16(DestX);
|
||||
|
||||
if((uint16)(RealY - DestY) > DestHeight)
|
||||
return;
|
||||
|
||||
SourceX = (int32)mx << 6;
|
||||
SourceY = (int32)my << 6;
|
||||
|
||||
if(DestX & 0x8000)
|
||||
{
|
||||
SourceX += dx * (65536 - DestX);
|
||||
SourceY += dy * (65536 - DestX);
|
||||
}
|
||||
|
||||
if(mp >= 0 && lr)
|
||||
{
|
||||
SourceX += dx * mp;
|
||||
SourceY += dy * mp;
|
||||
}
|
||||
else if(mp < 0 && !lr)
|
||||
{
|
||||
SourceX += dx * -mp;
|
||||
SourceY += dy * -mp;
|
||||
}
|
||||
|
||||
if(OverplaneMode)
|
||||
{
|
||||
SourceX_Mask = 0x3FFFFFF; //(((uint32)SourceX_Size << 9) * 2) - 1;
|
||||
SourceY_Mask = 0x3FFFFFF; //(((uint32)SourceY_Size << 9) * 2) - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
SourceX_Mask = ((uint32)SourceX_Size << 9) - 1;
|
||||
SourceY_Mask = ((uint32)SourceY_Size << 9) - 1;
|
||||
}
|
||||
|
||||
start_x = (int16)DestX;
|
||||
final_x = (int16)DestX + DestWidth;
|
||||
|
||||
if(start_x < 0)
|
||||
start_x = 0;
|
||||
|
||||
if(final_x > 383)
|
||||
final_x = 383;
|
||||
|
||||
if(dy == 0) // Optimization for no rotation.
|
||||
{
|
||||
SourceY &= SourceY_Mask;
|
||||
|
||||
if(SourceY >= (SourceY_Size << 9))
|
||||
return;
|
||||
|
||||
BGMap_Base |= (((SourceY >> 6) & ~0xFFF) << scx) | (((SourceY >> 12) & 0x3F) * 0x40);
|
||||
for(int x = start_x; x <= final_x; x++)
|
||||
{
|
||||
uint32 bgsc;
|
||||
uint32 hflip_xor;
|
||||
uint32 vflip_xor;
|
||||
uint32 pixel = 0;
|
||||
|
||||
SourceX &= SourceX_Mask;
|
||||
|
||||
bgsc = bgsc_overplane;
|
||||
|
||||
if(SourceX < (SourceX_Size << 9))
|
||||
bgsc = BGMap[(BGMap_Base | ((SourceX >> 6) & ~0xFFF) | ((SourceX >> 12) & 0x3F)) & 0xFFFF];
|
||||
|
||||
//hflip_xor = bgsc & 0x2000 ? 0xE : 0;
|
||||
//vflip_xor = bgsc & 0x1000 ? 0x7 : 0;
|
||||
hflip_xor = ((int32)(bgsc << 18) >> 30) & 0xE;
|
||||
vflip_xor = ((int32)(bgsc << 19) >> 31) & 0x7;
|
||||
|
||||
unsigned int char_sub_y = vflip_xor ^ ((SourceY >> 9) & 0x7);
|
||||
unsigned int char_sub_x = hflip_xor ^ ((SourceX >> 8) & 0xE);
|
||||
|
||||
pixel = (CHR16[((bgsc & 0x7FF) * 8) | char_sub_y] >> char_sub_x) & 0x3;
|
||||
|
||||
if(pixel)
|
||||
target[x] = GPLT_Cache[bgsc >> 14][pixel];
|
||||
|
||||
SourceX += dx;
|
||||
}
|
||||
}
|
||||
else
|
||||
for(int x = start_x; x <= final_x; x++)
|
||||
{
|
||||
uint32 bgsc;
|
||||
uint32 char_no;
|
||||
uint32 palette_selector;
|
||||
uint32 hflip_xor;
|
||||
uint32 vflip_xor;
|
||||
uint8 pixel = 0;
|
||||
|
||||
SourceX &= SourceX_Mask;
|
||||
SourceY &= SourceY_Mask;
|
||||
|
||||
bgsc = bgsc_overplane;
|
||||
|
||||
if(SourceX < (SourceX_Size << 9) && SourceY < (SourceY_Size << 9))
|
||||
{
|
||||
uint32 m_index = ((SourceX >> 6) & ~0xFFF) + (((SourceY >> 6) & ~0xFFF) << scx);
|
||||
uint32 sub_index = ((SourceX >> 12) & 0x3F) + (((SourceY >> 12) & 0x3F) * 0x40);
|
||||
|
||||
bgsc = BGMap[(BGMap_Base | m_index | sub_index) & 0xFFFF];
|
||||
|
||||
//bgsc = BGMap[(BGMapBase + (SourceX >> 12) + (SourceY >> 12) * (SourceX_Size >> 3)) & 0xFFFF ];
|
||||
}
|
||||
char_no = bgsc & 0x7FF;
|
||||
palette_selector = bgsc >> 14;
|
||||
hflip_xor = bgsc & 0x2000 ? 7 : 0; //(((int32)bgsc << 18) >> 31) & 0x7;
|
||||
vflip_xor = bgsc & 0x1000 ? 7 : 0; //(((int32)bgsc << 19) >> 31) & 0x7;
|
||||
|
||||
unsigned int char_sub_y = vflip_xor ^ ((SourceY >> 9) & 0x7);
|
||||
unsigned int char_sub_x = hflip_xor ^ ((SourceX >> 9) & 0x7);
|
||||
|
||||
pixel = (CHR16[char_no * 8 + char_sub_y] >> (char_sub_x * 2)) & 0x3;
|
||||
|
||||
if(pixel)
|
||||
target[x] = GPLT_Cache[palette_selector][pixel];
|
||||
|
||||
SourceX += dx;
|
||||
SourceY += dy;
|
||||
}
|
||||
}
|
||||
|
||||
static int obj_search_which;
|
||||
|
||||
static void DrawOBJ(uint8 *fb[2], uint16 Y, bool lron[2])
|
||||
{
|
||||
const uint16 *CHR16 = CHR_RAM;
|
||||
|
||||
int32 start_oam;
|
||||
int32 end_oam;
|
||||
|
||||
start_oam = SPT[obj_search_which];
|
||||
|
||||
end_oam = 1023;
|
||||
if(obj_search_which)
|
||||
end_oam = SPT[obj_search_which - 1];
|
||||
|
||||
int32 oam = start_oam;
|
||||
do
|
||||
{
|
||||
const uint16 *oam_ptr = &DRAM[(0x1E000 + (oam * 8)) >> 1];
|
||||
const uint32 jy = oam_ptr[2];
|
||||
const uint32 tile_y = (Y - jy) & 0xFF; // I think this mask is right. See: http://www.planetvb.com/modules/newbb/viewtopic.php?topic_id=3797&forum=2
|
||||
|
||||
if(tile_y >= 8)
|
||||
continue;
|
||||
|
||||
uint32 jx = oam_ptr[0];
|
||||
uint32 jp = ParallaxDisabled ? 0 : (oam_ptr[1] & 0x3FFF);
|
||||
uint32 palette_selector = oam_ptr[3] >> 14;
|
||||
uint32 vflip_xor = (oam_ptr[3] & 0x1000) ? 7 : 0;
|
||||
uint32 char_sub_y = vflip_xor ^ tile_y;
|
||||
bool jlron[2] = { (bool)(oam_ptr[1] & 0x8000), (bool)(oam_ptr[1] & 0x4000) };
|
||||
uint32 char_no = oam_ptr[3] & 0x7FF;
|
||||
const uint32 pixels_save = CHR16[char_no * 8 + char_sub_y];
|
||||
|
||||
for(int lr = 0; lr < 2; lr++)
|
||||
{
|
||||
if(!(jlron[lr] & lron[lr]))
|
||||
continue;
|
||||
|
||||
uint32 pixels = pixels_save;
|
||||
int32 x = sign_x_to_s32(10, (jx + (lr ? jp : -jp))); // It may actually be 9, TODO?
|
||||
|
||||
if(x >= -7 && x < 384) // Make sure we always keep the pitch of our 384x8 buffer large enough(with padding before and after the visible space)
|
||||
{
|
||||
uint8 *target = &fb[lr][x];
|
||||
|
||||
if(oam_ptr[3] & 0x2000)
|
||||
{
|
||||
target += 7;
|
||||
|
||||
for(int meow = 8; meow; meow--)
|
||||
{
|
||||
if(pixels & 3)
|
||||
*target = JPLT_Cache[palette_selector][pixels & 3];
|
||||
target--;
|
||||
pixels >>= 2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(int meow = 8; meow; meow--)
|
||||
{
|
||||
if(pixels & 3)
|
||||
*target = JPLT_Cache[palette_selector][pixels & 3];
|
||||
target++;
|
||||
pixels >>= 2;
|
||||
}
|
||||
}
|
||||
#if 0
|
||||
if(oam_ptr[3] & 0x2000)
|
||||
{
|
||||
if((pixels >> 14) & 3) fb[lr][0 + x] = JPLT_Cache[palette_selector][(pixels >> 14) & 3];
|
||||
if((pixels >> 12) & 3) fb[lr][1 + x] = JPLT_Cache[palette_selector][(pixels >> 12) & 3];
|
||||
if((pixels >> 10) & 3) fb[lr][2 + x] = JPLT_Cache[palette_selector][(pixels >> 10) & 3];
|
||||
if((pixels >> 8) & 3) fb[lr][3 + x] = JPLT_Cache[palette_selector][(pixels >> 8) & 3];
|
||||
if((pixels >> 6) & 3) fb[lr][4 + x] = JPLT_Cache[palette_selector][(pixels >> 6) & 3];
|
||||
if((pixels >> 4) & 3) fb[lr][5 + x] = JPLT_Cache[palette_selector][(pixels >> 4) & 3];
|
||||
if((pixels >> 2) & 3) fb[lr][6 + x] = JPLT_Cache[palette_selector][(pixels >> 2) & 3];
|
||||
if((pixels >> 0) & 3) fb[lr][7 + x] = JPLT_Cache[palette_selector][(pixels >> 0) & 3];
|
||||
}
|
||||
else
|
||||
{
|
||||
if((pixels >> 0) & 3) fb[lr][0 + x] = JPLT_Cache[palette_selector][(pixels >> 0) & 3];
|
||||
if((pixels >> 2) & 3) fb[lr][1 + x] = JPLT_Cache[palette_selector][(pixels >> 2) & 3];
|
||||
if((pixels >> 4) & 3) fb[lr][2 + x] = JPLT_Cache[palette_selector][(pixels >> 4) & 3];
|
||||
if((pixels >> 6) & 3) fb[lr][3 + x] = JPLT_Cache[palette_selector][(pixels >> 6) & 3];
|
||||
if((pixels >> 8) & 3) fb[lr][4 + x] = JPLT_Cache[palette_selector][(pixels >> 8) & 3];
|
||||
if((pixels >> 10) & 3) fb[lr][5 + x] = JPLT_Cache[palette_selector][(pixels >> 10) & 3];
|
||||
if((pixels >> 12) & 3) fb[lr][6 + x] = JPLT_Cache[palette_selector][(pixels >> 12) & 3];
|
||||
if((pixels >> 14) & 3) fb[lr][7 + x] = JPLT_Cache[palette_selector][(pixels >> 14) & 3];
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
} while( (oam = (oam - 1) & 1023) != end_oam);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void VIP_DrawBlock(uint8 block_no, uint8 *fb_l, uint8 *fb_r)
|
||||
{
|
||||
for(int y = 0; y < 8; y++)
|
||||
{
|
||||
memset(fb_l + y * 512, BKCOL, 384);
|
||||
memset(fb_r + y * 512, BKCOL, 384);
|
||||
}
|
||||
|
||||
obj_search_which = 3;
|
||||
|
||||
for(int world = 31; world >= 0; world--)
|
||||
{
|
||||
const uint16 *world_ptr = &DRAM[(0x1D800 + world * 0x20) >> 1];
|
||||
|
||||
uint32 bgmap_base = world_ptr[0] & 0xF;
|
||||
bool end = world_ptr[0] & 0x40;
|
||||
bool over = world_ptr[0] & 0x80;
|
||||
uint32 scy = (world_ptr[0] >> 8) & 3;
|
||||
uint32 scx = (world_ptr[0] >> 10) & 3;
|
||||
uint32 bgm = (world_ptr[0] >> 12) & 3;
|
||||
bool lron[2] = { (bool)(world_ptr[0] & 0x8000), (bool)(world_ptr[0] & 0x4000) };
|
||||
|
||||
uint16 gx = sign_11_to_s16(world_ptr[1]);
|
||||
uint16 gp = ParallaxDisabled ? 0 : sign_9_to_s16(world_ptr[2]);
|
||||
uint16 gy = sign_11_to_s16(world_ptr[3]);
|
||||
uint16 mx = world_ptr[4];
|
||||
uint16 mp = ParallaxDisabled ? 0 : sign_9_to_s16(world_ptr[5]);
|
||||
uint16 my = world_ptr[6];
|
||||
uint16 window_width = sign_11_to_s16(world_ptr[7]);
|
||||
uint16 window_height = (world_ptr[8] & 0x3FF);
|
||||
uint32 param_base = (world_ptr[9] & 0xFFF0);
|
||||
uint16 overplane_char = world_ptr[10];
|
||||
|
||||
if(end)
|
||||
break;
|
||||
|
||||
if(((512 << scx) + (512 << scy)) > 4096)
|
||||
{
|
||||
printf("BG Size too large for world: %d(scx=%d, scy=%d)\n", world, scx, scy);
|
||||
}
|
||||
|
||||
// if(world != 2)
|
||||
// continue;
|
||||
|
||||
// if(block_no == 8)
|
||||
// printf("World: %d; gx: %d, gp: %d, gy: %d, mx: %d, mp: %d, my: %d, window_width: %d, window_height: %d\n", world, gx, gp, gy, mx, mp, my, window_width, window_height);
|
||||
|
||||
for(int y = 0; y < 8; y++)
|
||||
{
|
||||
uint8 *fb[2] = { &fb_l[y * 512], &fb_r[y * 512] };
|
||||
|
||||
if(bgm == BGM_OBJ)
|
||||
{
|
||||
if(!lron[0] || !lron[1])
|
||||
printf("Bad OBJ World? %d(%d/%d) %d~%d\n", world, lron[0], lron[1], SPT[obj_search_which], obj_search_which ? (SPT[obj_search_which - 1] + 1) : 0);
|
||||
|
||||
DrawOBJ(fb, (block_no * 8) + y, lron);
|
||||
}
|
||||
else if(bgm == BGM_AFFINE)
|
||||
{
|
||||
//if(((block_no * 8) + y) == 128)
|
||||
// printf("Draw affine: %d %d\n", gx, gp);
|
||||
for(int lr = 0; lr < 2; lr++)
|
||||
{
|
||||
if(lron[lr])
|
||||
{
|
||||
DrawAffine(fb[lr], (block_no * 8) + y, lr, param_base, bgmap_base * 4096, over, overplane_char, scx, scy,
|
||||
gx + (lr ? gp : -gp), gy, window_width, window_height);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
for(int lr = 0; lr < 2; lr++)
|
||||
{
|
||||
uint16 srcX, srcY;
|
||||
uint16 RealY = (block_no * 8) + y;
|
||||
uint16 DestX;
|
||||
uint16 DestY;
|
||||
|
||||
srcX = mx + (lr ? mp : -mp);
|
||||
srcY = my + (RealY - gy);
|
||||
|
||||
DestX = gx + (lr ? gp : -gp);
|
||||
DestY = gy;
|
||||
|
||||
if(lron[lr])
|
||||
{
|
||||
if(bgm == 1) // HBias
|
||||
srcX += (int16)DRAM[(param_base + (((RealY - DestY) * 2) | lr)) & 0xFFFF];
|
||||
|
||||
DrawBG(fb[lr], RealY, lr, bgmap_base, over, overplane_char, (int32)(int16)srcX, (int32)(int16)srcY, scx, scy, DestX, DestY, window_width, window_height);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(bgm == BGM_OBJ)
|
||||
if(obj_search_which)
|
||||
obj_search_which--;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,520 +0,0 @@
|
||||
/* Mednafen - Multi-system Emulator
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "vb.h"
|
||||
#include "vsu.h"
|
||||
|
||||
static const unsigned int Tap_LUT[8] = { 15 - 1, 11 - 1, 14 - 1, 5 - 1, 9 - 1, 7 - 1, 10 - 1, 12 - 1 };
|
||||
|
||||
VSU::VSU(Blip_Buffer *bb_l, Blip_Buffer *bb_r)
|
||||
{
|
||||
sbuf[0] = bb_l;
|
||||
sbuf[1] = bb_r;
|
||||
|
||||
Synth.volume(1.0 / 6 / 2);
|
||||
}
|
||||
|
||||
VSU::~VSU()
|
||||
{
|
||||
for(int ch = 0; ch < 6; ch++)
|
||||
{
|
||||
for(int lr = 0; lr < 2; lr++)
|
||||
last_output[ch][lr] = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void VSU::Power(void)
|
||||
{
|
||||
SweepControl = 0;
|
||||
SweepModCounter = 0;
|
||||
SweepModClockDivider = 1;
|
||||
|
||||
for(int ch = 0; ch < 6; ch++)
|
||||
{
|
||||
IntlControl[ch] = 0;
|
||||
LeftLevel[ch] = 0;
|
||||
RightLevel[ch] = 0;
|
||||
Frequency[ch] = 0;
|
||||
EnvControl[ch] = 0;
|
||||
RAMAddress[ch] = 0;
|
||||
|
||||
EffFreq[ch] = 0;
|
||||
Envelope[ch] = 0;
|
||||
WavePos[ch] = 0;
|
||||
FreqCounter[ch] = 0;
|
||||
IntervalCounter[ch] = 0;
|
||||
EnvelopeCounter[ch] = 0;
|
||||
|
||||
EffectsClockDivider[ch] = 4800;
|
||||
IntervalClockDivider[ch] = 4;
|
||||
EnvelopeClockDivider[ch] = 4;
|
||||
|
||||
LatcherClockDivider[ch] = 120;
|
||||
}
|
||||
|
||||
|
||||
NoiseLatcherClockDivider = 120;
|
||||
NoiseLatcher = 0;
|
||||
|
||||
memset(WaveData, 0, sizeof(WaveData));
|
||||
memset(ModData, 0, sizeof(ModData));
|
||||
|
||||
last_ts = 0;
|
||||
}
|
||||
|
||||
void VSU::Write(int32 timestamp, uint32 A, uint8 V)
|
||||
{
|
||||
A &= 0x7FF;
|
||||
|
||||
Update(timestamp);
|
||||
|
||||
//printf("VSU Write: %d, %08x %02x\n", timestamp, A, V);
|
||||
|
||||
if(A < 0x280)
|
||||
WaveData[A >> 7][(A >> 2) & 0x1F] = V & 0x3F;
|
||||
else if(A < 0x400)
|
||||
{
|
||||
//if(A >= 0x300)
|
||||
// printf("Modulation mirror write? %08x %02x\n", A, V);
|
||||
ModData[(A >> 2) & 0x1F] = V;
|
||||
}
|
||||
else if(A < 0x600)
|
||||
{
|
||||
int ch = (A >> 6) & 0xF;
|
||||
|
||||
//if(ch < 6)
|
||||
//printf("Ch: %d, Reg: %d, Value: %02x\n", ch, (A >> 2) & 0xF, V);
|
||||
|
||||
if(ch > 5)
|
||||
{
|
||||
if(A == 0x580 && (V & 1))
|
||||
{
|
||||
//puts("STOP, HAMMER TIME");
|
||||
for(int i = 0; i < 6; i++)
|
||||
IntlControl[i] &= ~0x80;
|
||||
}
|
||||
}
|
||||
else
|
||||
switch((A >> 2) & 0xF)
|
||||
{
|
||||
case 0x0: IntlControl[ch] = V & ~0x40;
|
||||
|
||||
if(V & 0x80)
|
||||
{
|
||||
EffFreq[ch] = Frequency[ch];
|
||||
if(ch == 5)
|
||||
FreqCounter[ch] = 10 * (2048 - EffFreq[ch]);
|
||||
else
|
||||
FreqCounter[ch] = 2048 - EffFreq[ch];
|
||||
IntervalCounter[ch] = (V & 0x1F) + 1;
|
||||
EnvelopeCounter[ch] = (EnvControl[ch] & 0x7) + 1;
|
||||
|
||||
if(ch == 4)
|
||||
{
|
||||
SweepModCounter = (SweepControl >> 4) & 7;
|
||||
SweepModClockDivider = (SweepControl & 0x80) ? 8 : 1;
|
||||
ModWavePos = 0;
|
||||
}
|
||||
|
||||
WavePos[ch] = 0;
|
||||
|
||||
if(ch == 5)
|
||||
lfsr = 1;
|
||||
|
||||
//if(!(IntlControl[ch] & 0x80))
|
||||
// Envelope[ch] = (EnvControl[ch] >> 4) & 0xF;
|
||||
|
||||
EffectsClockDivider[ch] = 4800;
|
||||
IntervalClockDivider[ch] = 4;
|
||||
EnvelopeClockDivider[ch] = 4;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x1: LeftLevel[ch] = (V >> 4) & 0xF;
|
||||
RightLevel[ch] = (V >> 0) & 0xF;
|
||||
break;
|
||||
|
||||
case 0x2: Frequency[ch] &= 0xFF00;
|
||||
Frequency[ch] |= V << 0;
|
||||
EffFreq[ch] &= 0xFF00;
|
||||
EffFreq[ch] |= V << 0;
|
||||
break;
|
||||
|
||||
case 0x3: Frequency[ch] &= 0x00FF;
|
||||
Frequency[ch] |= (V & 0x7) << 8;
|
||||
EffFreq[ch] &= 0x00FF;
|
||||
EffFreq[ch] |= (V & 0x7) << 8;
|
||||
break;
|
||||
|
||||
case 0x4: EnvControl[ch] &= 0xFF00;
|
||||
EnvControl[ch] |= V << 0;
|
||||
|
||||
Envelope[ch] = (V >> 4) & 0xF;
|
||||
break;
|
||||
|
||||
case 0x5: EnvControl[ch] &= 0x00FF;
|
||||
if(ch == 4)
|
||||
EnvControl[ch] |= (V & 0x73) << 8;
|
||||
else if(ch == 5)
|
||||
EnvControl[ch] |= (V & 0x73) << 8;
|
||||
else
|
||||
EnvControl[ch] |= (V & 0x03) << 8;
|
||||
break;
|
||||
|
||||
case 0x6: RAMAddress[ch] = V & 0xF;
|
||||
break;
|
||||
|
||||
case 0x7: if(ch == 4)
|
||||
{
|
||||
SweepControl = V;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
INLINE void VSU::CalcCurrentOutput(int ch, int &left, int &right)
|
||||
{
|
||||
if(!(IntlControl[ch] & 0x80))
|
||||
{
|
||||
left = right = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
int WD;
|
||||
int l_ol, r_ol;
|
||||
|
||||
if(ch == 5)
|
||||
WD = NoiseLatcher; //(NoiseLatcher << 6) - NoiseLatcher;
|
||||
else
|
||||
{
|
||||
if(RAMAddress[ch] > 4)
|
||||
WD = 0;
|
||||
else
|
||||
WD = WaveData[RAMAddress[ch]][WavePos[ch]]; // - 0x20;
|
||||
}
|
||||
l_ol = Envelope[ch] * LeftLevel[ch];
|
||||
if(l_ol)
|
||||
{
|
||||
l_ol >>= 3;
|
||||
l_ol += 1;
|
||||
}
|
||||
|
||||
r_ol = Envelope[ch] * RightLevel[ch];
|
||||
if(r_ol)
|
||||
{
|
||||
r_ol >>= 3;
|
||||
r_ol += 1;
|
||||
}
|
||||
|
||||
left = WD * l_ol;
|
||||
right = WD * r_ol;
|
||||
}
|
||||
|
||||
void VSU::Update(int32 timestamp)
|
||||
{
|
||||
//puts("VSU Start");
|
||||
int left, right;
|
||||
|
||||
for(int ch = 0; ch < 6; ch++)
|
||||
{
|
||||
int32 clocks = timestamp - last_ts;
|
||||
int32 running_timestamp = last_ts;
|
||||
|
||||
// Output sound here
|
||||
CalcCurrentOutput(ch, left, right);
|
||||
Synth.offset_inline(running_timestamp, left - last_output[ch][0], sbuf[0]);
|
||||
Synth.offset_inline(running_timestamp, right - last_output[ch][1], sbuf[1]);
|
||||
last_output[ch][0] = left;
|
||||
last_output[ch][1] = right;
|
||||
|
||||
if(!(IntlControl[ch] & 0x80))
|
||||
continue;
|
||||
|
||||
while(clocks > 0)
|
||||
{
|
||||
int32 chunk_clocks = clocks;
|
||||
|
||||
if(chunk_clocks > EffectsClockDivider[ch])
|
||||
chunk_clocks = EffectsClockDivider[ch];
|
||||
|
||||
if(ch == 5)
|
||||
{
|
||||
if(chunk_clocks > NoiseLatcherClockDivider)
|
||||
chunk_clocks = NoiseLatcherClockDivider;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(EffFreq[ch] >= 2040)
|
||||
{
|
||||
if(chunk_clocks > LatcherClockDivider[ch])
|
||||
chunk_clocks = LatcherClockDivider[ch];
|
||||
}
|
||||
else
|
||||
{
|
||||
if(chunk_clocks > FreqCounter[ch])
|
||||
chunk_clocks = FreqCounter[ch];
|
||||
}
|
||||
}
|
||||
|
||||
if(ch == 5 && chunk_clocks > NoiseLatcherClockDivider)
|
||||
chunk_clocks = NoiseLatcherClockDivider;
|
||||
|
||||
FreqCounter[ch] -= chunk_clocks;
|
||||
while(FreqCounter[ch] <= 0)
|
||||
{
|
||||
if(ch == 5)
|
||||
{
|
||||
int feedback = ((lfsr >> 7) & 1) ^ ((lfsr >> Tap_LUT[(EnvControl[5] >> 12) & 0x7]) & 1);
|
||||
lfsr = ((lfsr << 1) & 0x7FFF) | feedback;
|
||||
|
||||
FreqCounter[ch] += 10 * (2048 - EffFreq[ch]);
|
||||
}
|
||||
else
|
||||
{
|
||||
FreqCounter[ch] += 2048 - EffFreq[ch];
|
||||
WavePos[ch] = (WavePos[ch] + 1) & 0x1F;
|
||||
}
|
||||
}
|
||||
|
||||
LatcherClockDivider[ch] -= chunk_clocks;
|
||||
while(LatcherClockDivider[ch] <= 0)
|
||||
LatcherClockDivider[ch] += 120;
|
||||
|
||||
if(ch == 5)
|
||||
{
|
||||
NoiseLatcherClockDivider -= chunk_clocks;
|
||||
if(!NoiseLatcherClockDivider)
|
||||
{
|
||||
NoiseLatcherClockDivider = 120;
|
||||
NoiseLatcher = ((lfsr & 1) << 6) - (lfsr & 1);
|
||||
}
|
||||
}
|
||||
|
||||
EffectsClockDivider[ch] -= chunk_clocks;
|
||||
while(EffectsClockDivider[ch] <= 0)
|
||||
{
|
||||
EffectsClockDivider[ch] += 4800;
|
||||
|
||||
IntervalClockDivider[ch]--;
|
||||
while(IntervalClockDivider[ch] <= 0)
|
||||
{
|
||||
IntervalClockDivider[ch] += 4;
|
||||
|
||||
if(IntlControl[ch] & 0x20)
|
||||
{
|
||||
IntervalCounter[ch]--;
|
||||
if(!IntervalCounter[ch])
|
||||
{
|
||||
IntlControl[ch] &= ~0x80;
|
||||
}
|
||||
}
|
||||
|
||||
EnvelopeClockDivider[ch]--;
|
||||
while(EnvelopeClockDivider[ch] <= 0)
|
||||
{
|
||||
EnvelopeClockDivider[ch] += 4;
|
||||
|
||||
if(EnvControl[ch] & 0x0100) // Enveloping enabled?
|
||||
{
|
||||
EnvelopeCounter[ch]--;
|
||||
if(!EnvelopeCounter[ch])
|
||||
{
|
||||
EnvelopeCounter[ch] = (EnvControl[ch] & 0x7) + 1;
|
||||
|
||||
if(EnvControl[ch] & 0x0008) // Grow
|
||||
{
|
||||
if(Envelope[ch] < 0xF || (EnvControl[ch] & 0x200))
|
||||
Envelope[ch] = (Envelope[ch] + 1) & 0xF;
|
||||
}
|
||||
else // Decay
|
||||
{
|
||||
if(Envelope[ch] > 0 || (EnvControl[ch] & 0x200))
|
||||
Envelope[ch] = (Envelope[ch] - 1) & 0xF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // end while(EnvelopeClockDivider[ch] <= 0)
|
||||
} // end while(IntervalClockDivider[ch] <= 0)
|
||||
|
||||
if(ch == 4)
|
||||
{
|
||||
SweepModClockDivider--;
|
||||
while(SweepModClockDivider <= 0)
|
||||
{
|
||||
SweepModClockDivider += (SweepControl & 0x80) ? 8 : 1;
|
||||
|
||||
if(((SweepControl >> 4) & 0x7) && (EnvControl[ch] & 0x4000))
|
||||
{
|
||||
if(SweepModCounter)
|
||||
SweepModCounter--;
|
||||
|
||||
if(!SweepModCounter)
|
||||
{
|
||||
SweepModCounter = (SweepControl >> 4) & 0x7;
|
||||
|
||||
if(EnvControl[ch] & 0x1000) // Modulation
|
||||
{
|
||||
if(ModWavePos < 32 || (EnvControl[ch] & 0x2000))
|
||||
{
|
||||
ModWavePos &= 0x1F;
|
||||
|
||||
EffFreq[ch] = (EffFreq[ch] + (int8)ModData[ModWavePos]);
|
||||
if(EffFreq[ch] < 0)
|
||||
{
|
||||
//puts("Underflow");
|
||||
EffFreq[ch] = 0;
|
||||
}
|
||||
else if(EffFreq[ch] > 0x7FF)
|
||||
{
|
||||
//puts("Overflow");
|
||||
EffFreq[ch] = 0x7FF;
|
||||
}
|
||||
ModWavePos++;
|
||||
}
|
||||
//puts("Mod");
|
||||
}
|
||||
else // Sweep
|
||||
{
|
||||
int32 delta = EffFreq[ch] >> (SweepControl & 0x7);
|
||||
int32 NewFreq = EffFreq[ch] + ((SweepControl & 0x8) ? delta : -delta);
|
||||
|
||||
//printf("Sweep(%d): Old: %d, New: %d\n", ch, EffFreq[ch], NewFreq);
|
||||
|
||||
if(NewFreq < 0)
|
||||
EffFreq[ch] = 0;
|
||||
else if(NewFreq > 0x7FF)
|
||||
{
|
||||
//EffFreq[ch] = 0x7FF;
|
||||
IntlControl[ch] &= ~0x80;
|
||||
}
|
||||
else
|
||||
EffFreq[ch] = NewFreq;
|
||||
}
|
||||
}
|
||||
}
|
||||
} // end while(SweepModClockDivider <= 0)
|
||||
} // end if(ch == 4)
|
||||
} // end while(EffectsClockDivider[ch] <= 0)
|
||||
clocks -= chunk_clocks;
|
||||
running_timestamp += chunk_clocks;
|
||||
|
||||
// Output sound here too.
|
||||
CalcCurrentOutput(ch, left, right);
|
||||
Synth.offset_inline(running_timestamp, left - last_output[ch][0], sbuf[0]);
|
||||
Synth.offset_inline(running_timestamp, right - last_output[ch][1], sbuf[1]);
|
||||
last_output[ch][0] = left;
|
||||
last_output[ch][1] = right;
|
||||
}
|
||||
}
|
||||
last_ts = timestamp;
|
||||
//puts("VSU End");
|
||||
}
|
||||
|
||||
void VSU::EndFrame(int32 timestamp)
|
||||
{
|
||||
Update(timestamp);
|
||||
last_ts = 0;
|
||||
}
|
||||
|
||||
int VSU::StateAction(StateMem *sm, int load, int data_only)
|
||||
{
|
||||
SFORMAT StateRegs[] =
|
||||
{
|
||||
SFARRAY(IntlControl, 6),
|
||||
SFARRAY(LeftLevel, 6),
|
||||
SFARRAY(RightLevel, 6),
|
||||
|
||||
SFARRAY16(Frequency, 6),
|
||||
SFARRAY16(EnvControl, 6),
|
||||
SFARRAY(RAMAddress, 6),
|
||||
SFVAR(SweepControl),
|
||||
|
||||
SFARRAY(&WaveData[0][0], 5 * 0x20),
|
||||
SFARRAY(ModData, 0x20),
|
||||
|
||||
SFARRAY32(EffFreq, 6),
|
||||
SFARRAY32(Envelope, 6),
|
||||
|
||||
SFARRAY32(WavePos, 6),
|
||||
|
||||
SFVAR(ModWavePos),
|
||||
|
||||
SFARRAY32(LatcherClockDivider, 6),
|
||||
SFARRAY32(FreqCounter, 6),
|
||||
SFARRAY32(IntervalCounter, 6),
|
||||
SFARRAY32(EnvelopeCounter, 6),
|
||||
|
||||
SFVAR(SweepModCounter),
|
||||
|
||||
SFARRAY32(EffectsClockDivider, 6),
|
||||
SFARRAY32(IntervalClockDivider, 6),
|
||||
SFARRAY32(EnvelopeClockDivider, 6),
|
||||
|
||||
SFVAR(SweepModClockDivider),
|
||||
|
||||
SFVAR(NoiseLatcherClockDivider),
|
||||
SFVAR(NoiseLatcher),
|
||||
SFVAR(lfsr),
|
||||
SFEND
|
||||
};
|
||||
|
||||
int ret = MDFNSS_StateAction(sm, load, data_only, StateRegs, "VSU");
|
||||
|
||||
|
||||
if(load)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
||||
|
||||
uint8 VSU::PeekWave(const unsigned int which, uint32 Address)
|
||||
{
|
||||
assert(which <= 4);
|
||||
|
||||
Address &= 0x1F;
|
||||
|
||||
return(WaveData[which][Address]);
|
||||
}
|
||||
|
||||
void VSU::PokeWave(const unsigned int which, uint32 Address, uint8 value)
|
||||
{
|
||||
assert(which <= 4);
|
||||
|
||||
Address &= 0x1F;
|
||||
|
||||
WaveData[which][Address] = value & 0x3F;
|
||||
}
|
||||
|
||||
uint8 VSU::PeekModWave(uint32 Address)
|
||||
{
|
||||
Address &= 0x1F;
|
||||
return(ModData[Address]);
|
||||
}
|
||||
|
||||
void VSU::PokeModWave(uint32 Address, uint8 value)
|
||||
{
|
||||
Address &= 0x1F;
|
||||
|
||||
ModData[Address] = value & 0xFF;
|
||||
}
|
@ -1,81 +0,0 @@
|
||||
#ifndef __VB_VSU_H
|
||||
#define __VB_VSU_H
|
||||
|
||||
#include <blip/Blip_Buffer.h>
|
||||
|
||||
class VSU
|
||||
{
|
||||
public:
|
||||
|
||||
VSU(Blip_Buffer *bb_l, Blip_Buffer *bb_r);
|
||||
~VSU();
|
||||
|
||||
void Power(void);
|
||||
|
||||
void Write(int32 timestamp, uint32 A, uint8 V);
|
||||
|
||||
void EndFrame(int32 timestamp);
|
||||
|
||||
int StateAction(StateMem *sm, int load, int data_only);
|
||||
|
||||
uint8 PeekWave(const unsigned int which, uint32 Address);
|
||||
void PokeWave(const unsigned int which, uint32 Address, uint8 value);
|
||||
|
||||
uint8 PeekModWave(uint32 Address);
|
||||
void PokeModWave(uint32 Address, uint8 value);
|
||||
|
||||
private:
|
||||
|
||||
void CalcCurrentOutput(int ch, int &left, int &right);
|
||||
|
||||
void Update(int32 timestamp);
|
||||
|
||||
uint8 IntlControl[6];
|
||||
uint8 LeftLevel[6];
|
||||
uint8 RightLevel[6];
|
||||
uint16 Frequency[6];
|
||||
uint16 EnvControl[6]; // Channel 5/6 extra functionality tacked on too.
|
||||
|
||||
uint8 RAMAddress[6];
|
||||
|
||||
uint8 SweepControl;
|
||||
|
||||
uint8 WaveData[5][0x20];
|
||||
|
||||
uint8 ModData[0x20];
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
int32 EffFreq[6];
|
||||
int32 Envelope[6];
|
||||
|
||||
int32 WavePos[6];
|
||||
int32 ModWavePos;
|
||||
|
||||
int32 LatcherClockDivider[6];
|
||||
|
||||
int32 FreqCounter[6];
|
||||
int32 IntervalCounter[6];
|
||||
int32 EnvelopeCounter[6];
|
||||
int32 SweepModCounter;
|
||||
|
||||
int32 EffectsClockDivider[6];
|
||||
int32 IntervalClockDivider[6];
|
||||
int32 EnvelopeClockDivider[6];
|
||||
int32 SweepModClockDivider;
|
||||
|
||||
int32 NoiseLatcherClockDivider;
|
||||
uint32 NoiseLatcher;
|
||||
|
||||
uint32 lfsr;
|
||||
|
||||
int32 last_output[6][2];
|
||||
int32 last_ts;
|
||||
|
||||
Blip_Buffer *sbuf[2];
|
||||
Blip_Synth<blip_good_quality, 1024> Synth;
|
||||
Blip_Synth<blip_med_quality, 1024> NoiseSynth;
|
||||
};
|
||||
|
||||
#endif
|
@ -1 +0,0 @@
|
||||
# dummy
|
@ -1 +0,0 @@
|
||||
# dummy
|
@ -1 +0,0 @@
|
||||
# dummy
|
@ -1 +0,0 @@
|
||||
# dummy
|
@ -1 +0,0 @@
|
||||
# dummy
|
@ -1 +0,0 @@
|
||||
# dummy
|
@ -1,633 +0,0 @@
|
||||
# Makefile.in generated by automake 1.11.6 from Makefile.am.
|
||||
# src/vb/Makefile. Generated from Makefile.in by configure.
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
|
||||
# Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
|
||||
|
||||
am__make_dryrun = \
|
||||
{ \
|
||||
am__dry=no; \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
||||
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
||||
*) \
|
||||
for am__flg in $$MAKEFLAGS; do \
|
||||
case $$am__flg in \
|
||||
*=*|--*) ;; \
|
||||
*n*) am__dry=yes; break;; \
|
||||
esac; \
|
||||
done;; \
|
||||
esac; \
|
||||
test $$am__dry = yes; \
|
||||
}
|
||||
pkgdatadir = $(datadir)/mednafen
|
||||
pkgincludedir = $(includedir)/mednafen
|
||||
pkglibdir = $(libdir)/mednafen
|
||||
pkglibexecdir = $(libexecdir)/mednafen
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = x86_64-unknown-linux-gnu
|
||||
host_triplet = x86_64-unknown-linux-gnu
|
||||
target_triplet = x86_64-unknown-linux-gnu
|
||||
am__append_1 = debug.cpp
|
||||
subdir = src/vb
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_gcc_option.m4 \
|
||||
$(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/fcntl-o.m4 \
|
||||
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc2.m4 \
|
||||
$(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \
|
||||
$(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intl.m4 \
|
||||
$(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax.m4 \
|
||||
$(top_srcdir)/m4/inttypes-pri.m4 \
|
||||
$(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \
|
||||
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
|
||||
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
|
||||
$(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \
|
||||
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
|
||||
$(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \
|
||||
$(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \
|
||||
$(top_srcdir)/m4/threadlib.m4 $(top_srcdir)/m4/uintmax_t.m4 \
|
||||
$(top_srcdir)/m4/visibility.m4 $(top_srcdir)/m4/wchar_t.m4 \
|
||||
$(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \
|
||||
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/include/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
ARFLAGS = cru
|
||||
AM_V_AR = $(am__v_AR_$(V))
|
||||
am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_AR_0 = @echo " AR " $@;
|
||||
AM_V_at = $(am__v_at_$(V))
|
||||
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_at_0 = @
|
||||
libvb_a_AR = $(AR) $(ARFLAGS)
|
||||
libvb_a_LIBADD =
|
||||
am__libvb_a_SOURCES_DIST = vb.cpp timer.cpp input.cpp vip.cpp vsu.cpp \
|
||||
debug.cpp
|
||||
am__objects_1 = debug.$(OBJEXT)
|
||||
am_libvb_a_OBJECTS = vb.$(OBJEXT) timer.$(OBJEXT) input.$(OBJEXT) \
|
||||
vip.$(OBJEXT) vsu.$(OBJEXT) $(am__objects_1)
|
||||
libvb_a_OBJECTS = $(am_libvb_a_OBJECTS)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
AM_V_lt = $(am__v_lt_$(V))
|
||||
am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_lt_0 = --silent
|
||||
LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
AM_V_CXX = $(am__v_CXX_$(V))
|
||||
am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_CXX_0 = @echo " CXX " $@;
|
||||
CXXLD = $(CXX)
|
||||
CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
|
||||
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CXXLD = $(am__v_CXXLD_$(V))
|
||||
am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_CXXLD_0 = @echo " CXXLD " $@;
|
||||
AM_V_GEN = $(am__v_GEN_$(V))
|
||||
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
SOURCES = $(libvb_a_SOURCES)
|
||||
DIST_SOURCES = $(am__libvb_a_SOURCES_DIST)
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = ${SHELL} /home/squarepusher/Downloads/mednafen/missing --run aclocal-1.11
|
||||
ALLOCA =
|
||||
ALSA_CFLAGS =
|
||||
ALSA_LIBS = -lasound -lm -ldl -lpthread
|
||||
AMTAR = $${TAR-tar}
|
||||
AM_CFLAGS = -fsigned-char -Wall -Winline -Wshadow -Wempty-body -Wignored-qualifiers -fno-fast-math -fno-unsafe-math-optimizations -fno-aggressive-loop-optimizations -fomit-frame-pointer -finline-limit=6000 --param large-function-growth=800 --param inline-unit-growth=175 --param max-inline-insns-single=10000 -fno-strict-overflow
|
||||
AM_CXXFLAGS = -fsigned-char -Wall -Winline -Wshadow -Wempty-body -Wignored-qualifiers -fno-fast-math -fno-unsafe-math-optimizations -fno-aggressive-loop-optimizations -fomit-frame-pointer -finline-limit=6000 --param large-function-growth=800 --param inline-unit-growth=175 --param max-inline-insns-single=10000 -fno-strict-overflow
|
||||
AM_DEFAULT_VERBOSITY = 1
|
||||
AR = ar
|
||||
AUTOCONF = ${SHELL} /home/squarepusher/Downloads/mednafen/missing --run autoconf
|
||||
AUTOHEADER = ${SHELL} /home/squarepusher/Downloads/mednafen/missing --run autoheader
|
||||
AUTOMAKE = ${SHELL} /home/squarepusher/Downloads/mednafen/missing --run automake-1.11
|
||||
AWK = gawk
|
||||
BUILD_INCLUDED_LIBINTL = no
|
||||
CATOBJEXT = .gmo
|
||||
CC = gcc
|
||||
CCAS = gcc
|
||||
CCASDEPMODE = depmode=gcc3
|
||||
CCASFLAGS = -g -O2
|
||||
CCDEPMODE = depmode=gcc3
|
||||
CFLAGS = -g -O2
|
||||
CFLAG_VISIBILITY = -fvisibility=hidden
|
||||
CPP = gcc -E
|
||||
CPPFLAGS =
|
||||
CXX = g++
|
||||
CXXCPP = g++ -E
|
||||
CXXDEPMODE = depmode=gcc3
|
||||
CXXFLAGS = -g -O2
|
||||
CYGPATH_W = echo
|
||||
DATADIRNAME = share
|
||||
DEFS = -DLOCALEDIR=\"$(datadir)/locale\" -DHAVE_CONFIG_H -fno-strict-aliasing
|
||||
DEPDIR = .deps
|
||||
DLLTOOL = false
|
||||
DSYMUTIL =
|
||||
DUMPBIN =
|
||||
ECHO_C =
|
||||
ECHO_N = -n
|
||||
ECHO_T =
|
||||
EGREP = /usr/bin/grep -E
|
||||
EXEEXT =
|
||||
FGREP = /usr/bin/grep -F
|
||||
GBA_EXTRA_FLAGS = -fno-unit-at-a-time
|
||||
GENCAT = gencat
|
||||
GETTEXT_MACRO_VERSION = 0.18
|
||||
GLIBC2 = yes
|
||||
GLIBC21 = yes
|
||||
GMSGFMT = /usr/bin/msgfmt
|
||||
GMSGFMT_015 = /usr/bin/msgfmt
|
||||
GREP = /usr/bin/grep
|
||||
HAVE_ASPRINTF = 1
|
||||
HAVE_NEWLOCALE = 1
|
||||
HAVE_POSIX_PRINTF = 1
|
||||
HAVE_SNPRINTF = 1
|
||||
HAVE_VISIBILITY = 1
|
||||
HAVE_WPRINTF = 0
|
||||
INSTALL = /usr/bin/install -c
|
||||
INSTALL_DATA = ${INSTALL} -m 644
|
||||
INSTALL_PROGRAM = ${INSTALL}
|
||||
INSTALL_SCRIPT = ${INSTALL}
|
||||
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
|
||||
INSTOBJEXT = .mo
|
||||
INTLBISON = bison
|
||||
INTLLIBS =
|
||||
INTLOBJS =
|
||||
INTL_DEFAULT_VERBOSITY = 1
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX =
|
||||
INTL_MACOSX_LIBS =
|
||||
JACK_CFLAGS =
|
||||
JACK_LIBS = -ljack -lpthread
|
||||
LD = /usr/bin/ld -m elf_x86_64
|
||||
LDFLAGS =
|
||||
LIBCDIO_CFLAGS =
|
||||
LIBCDIO_LIBS = -lcdio -lm
|
||||
LIBICONV =
|
||||
LIBINTL =
|
||||
LIBMULTITHREAD = -lpthread
|
||||
LIBOBJS =
|
||||
LIBPTH =
|
||||
LIBPTH_PREFIX =
|
||||
LIBS = -lsndfile -lcdio -lm -lz -lz -lasound -lm -ldl -lpthread -ljack -lpthread
|
||||
LIBTHREAD =
|
||||
LIBTOOL = $(SHELL) $(top_builddir)/libtool
|
||||
LIPO =
|
||||
LN_S = ln -s
|
||||
LTLIBC = -lc
|
||||
LTLIBICONV =
|
||||
LTLIBINTL =
|
||||
LTLIBMULTITHREAD = -lpthread
|
||||
LTLIBOBJS =
|
||||
LTLIBPTH =
|
||||
LTLIBTHREAD =
|
||||
MAKEINFO = ${SHELL} /home/squarepusher/Downloads/mednafen/missing --run makeinfo
|
||||
MANIFEST_TOOL = :
|
||||
MKDIR_P = /usr/bin/mkdir -p
|
||||
MMX_CFLAGS = -mmmx
|
||||
MSGFMT = /usr/bin/msgfmt
|
||||
MSGFMT_015 = /usr/bin/msgfmt
|
||||
MSGMERGE = /usr/bin/msgmerge
|
||||
NM = /usr/bin/nm -B
|
||||
NMEDIT =
|
||||
OBJDUMP = objdump
|
||||
OBJEXT = o
|
||||
OTOOL =
|
||||
OTOOL64 =
|
||||
PACKAGE = mednafen
|
||||
PACKAGE_BUGREPORT =
|
||||
PACKAGE_NAME =
|
||||
PACKAGE_STRING =
|
||||
PACKAGE_TARNAME =
|
||||
PACKAGE_URL =
|
||||
PACKAGE_VERSION =
|
||||
PATH_SEPARATOR = :
|
||||
PKG_CONFIG = /usr/bin/pkg-config
|
||||
PKG_CONFIG_LIBDIR =
|
||||
PKG_CONFIG_PATH =
|
||||
POSUB = po
|
||||
PRI_MACROS_BROKEN = 0
|
||||
RANLIB = ranlib
|
||||
SDL_CFLAGS = -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
|
||||
SDL_CONFIG = /usr/bin/sdl-config
|
||||
SDL_LIBS = -L/usr/lib -lSDL -lpthread
|
||||
SED = /usr/bin/sed
|
||||
SET_MAKE =
|
||||
SHELL = /bin/sh
|
||||
SNDFILE_CFLAGS =
|
||||
SNDFILE_LIBS = -lsndfile
|
||||
SNES_EXTRA_CXXFLAGS =
|
||||
SNES_EXTRA_FLAGS = -Wno-unused -Wno-inline -Wno-shadow -Wno-sign-compare -Wno-ignored-qualifiers -Wno-uninitialized -Wno-parentheses -Wno-switch
|
||||
SNES_PERF_EXTRA_CXXFLAGS = -funswitch-loops -fpredictive-commoning -fgcse-after-reload -ftree-vectorize -fipa-cp-clone -fno-stack-protector
|
||||
SNES_PERF_EXTRA_FLAGS = -Wno-unused -Wno-inline -Wno-shadow -Wno-sign-compare -Wno-ignored-qualifiers -Wno-uninitialized -Wno-parentheses -Wno-switch
|
||||
SSE2_CFLAGS = -msse2
|
||||
SSE3_CFLAGS = -msse3
|
||||
SSE_CFLAGS = -msse
|
||||
STRIP = strip
|
||||
TRIO_CFLAGS =
|
||||
USE_INCLUDED_LIBINTL = no
|
||||
USE_NLS = yes
|
||||
VERSION = 0.9.33.3
|
||||
WARNING_FLAGS = -Wall -Winline -Wshadow -Wempty-body -Wignored-qualifiers
|
||||
WINDRES =
|
||||
WOE32 = no
|
||||
WOE32DLL = no
|
||||
XGETTEXT = /usr/bin/xgettext
|
||||
XGETTEXT_015 = /usr/bin/xgettext
|
||||
XGETTEXT_EXTRA_OPTIONS =
|
||||
abs_builddir = /home/squarepusher/Downloads/mednafen/src/vb
|
||||
abs_srcdir = /home/squarepusher/Downloads/mednafen/src/vb
|
||||
abs_top_builddir = /home/squarepusher/Downloads/mednafen
|
||||
abs_top_srcdir = /home/squarepusher/Downloads/mednafen
|
||||
ac_ct_AR = ar
|
||||
ac_ct_CC = gcc
|
||||
ac_ct_CXX = g++
|
||||
ac_ct_DUMPBIN =
|
||||
am__include = include
|
||||
am__leading_dot = .
|
||||
am__quote =
|
||||
am__tar = $${TAR-tar} chof - "$$tardir"
|
||||
am__untar = $${TAR-tar} xf -
|
||||
bindir = ${exec_prefix}/bin
|
||||
build = x86_64-unknown-linux-gnu
|
||||
build_alias =
|
||||
build_cpu = x86_64
|
||||
build_os = linux-gnu
|
||||
build_vendor = unknown
|
||||
builddir = .
|
||||
datadir = ${datarootdir}
|
||||
datarootdir = ${prefix}/share
|
||||
docdir = ${datarootdir}/doc/${PACKAGE}
|
||||
dvidir = ${docdir}
|
||||
exec_prefix = ${prefix}
|
||||
host = x86_64-unknown-linux-gnu
|
||||
host_alias =
|
||||
host_cpu = x86_64
|
||||
host_os = linux-gnu
|
||||
host_vendor = unknown
|
||||
htmldir = ${docdir}
|
||||
includedir = ${prefix}/include
|
||||
infodir = ${datarootdir}/info
|
||||
install_sh = ${SHELL} /home/squarepusher/Downloads/mednafen/install-sh
|
||||
libdir = ${exec_prefix}/lib
|
||||
libexecdir = ${exec_prefix}/libexec
|
||||
localedir = ${datarootdir}/locale
|
||||
localstatedir = ${prefix}/var
|
||||
mandir = ${datarootdir}/man
|
||||
mkdir_p = /usr/bin/mkdir -p
|
||||
oldincludedir = /usr/include
|
||||
pdfdir = ${docdir}
|
||||
prefix = /usr/local
|
||||
program_transform_name = s,x,x,
|
||||
psdir = ${docdir}
|
||||
sbindir = ${exec_prefix}/sbin
|
||||
sharedstatedir = ${prefix}/com
|
||||
srcdir = .
|
||||
sysconfdir = ${prefix}/etc
|
||||
target = x86_64-unknown-linux-gnu
|
||||
target_alias =
|
||||
target_cpu = x86_64
|
||||
target_os = linux-gnu
|
||||
target_vendor = unknown
|
||||
top_build_prefix = ../../
|
||||
top_builddir = ../..
|
||||
top_srcdir = ../..
|
||||
AUTOMAKE_OPTIONS = subdir-objects
|
||||
DEFAULT_INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/intl -I$(top_srcdir)
|
||||
noinst_LIBRARIES = libvb.a
|
||||
libvb_a_SOURCES = vb.cpp timer.cpp input.cpp vip.cpp vsu.cpp \
|
||||
$(am__append_1)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .lo .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/vb/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu src/vb/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
libvb.a: $(libvb_a_OBJECTS) $(libvb_a_DEPENDENCIES) $(EXTRA_libvb_a_DEPENDENCIES)
|
||||
$(AM_V_at)-rm -f libvb.a
|
||||
$(AM_V_AR)$(libvb_a_AR) libvb.a $(libvb_a_OBJECTS) $(libvb_a_LIBADD)
|
||||
$(AM_V_at)$(RANLIB) libvb.a
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
include ./$(DEPDIR)/debug.Po
|
||||
include ./$(DEPDIR)/input.Po
|
||||
include ./$(DEPDIR)/timer.Po
|
||||
include ./$(DEPDIR)/vb.Po
|
||||
include ./$(DEPDIR)/vip.Po
|
||||
include ./$(DEPDIR)/vsu.Po
|
||||
|
||||
.cpp.o:
|
||||
$(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
||||
$(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
$(am__mv) $$depbase.Tpo $$depbase.Po
|
||||
# $(AM_V_CXX)source='$<' object='$@' libtool=no \
|
||||
# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
|
||||
# $(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ $<
|
||||
|
||||
.cpp.obj:
|
||||
$(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
|
||||
$(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
|
||||
$(am__mv) $$depbase.Tpo $$depbase.Po
|
||||
# $(AM_V_CXX)source='$<' object='$@' libtool=no \
|
||||
# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
|
||||
# $(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.cpp.lo:
|
||||
$(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
|
||||
$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
$(am__mv) $$depbase.Tpo $$depbase.Plo
|
||||
# $(AM_V_CXX)source='$<' object='$@' libtool=yes \
|
||||
# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
|
||||
# $(AM_V_CXX_no)$(LTCXXCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LIBRARIES)
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool clean-noinstLIBRARIES ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags uninstall uninstall-am
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
@ -1,10 +0,0 @@
|
||||
AUTOMAKE_OPTIONS = subdir-objects
|
||||
DEFS = -DLOCALEDIR=\"$(datadir)/locale\" @DEFS@ -fno-strict-aliasing
|
||||
DEFAULT_INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/intl -I$(top_srcdir)
|
||||
|
||||
noinst_LIBRARIES = libvb.a
|
||||
libvb_a_SOURCES = vb.cpp timer.cpp input.cpp vip.cpp vsu.cpp
|
||||
|
||||
if WANT_DEBUGGER
|
||||
libvb_a_SOURCES += debug.cpp
|
||||
endif
|
@ -1,633 +0,0 @@
|
||||
# Makefile.in generated by automake 1.11.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
|
||||
# Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__make_dryrun = \
|
||||
{ \
|
||||
am__dry=no; \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
||||
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
||||
*) \
|
||||
for am__flg in $$MAKEFLAGS; do \
|
||||
case $$am__flg in \
|
||||
*=*|--*) ;; \
|
||||
*n*) am__dry=yes; break;; \
|
||||
esac; \
|
||||
done;; \
|
||||
esac; \
|
||||
test $$am__dry = yes; \
|
||||
}
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
@WANT_DEBUGGER_TRUE@am__append_1 = debug.cpp
|
||||
subdir = src/vb
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_gcc_option.m4 \
|
||||
$(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/fcntl-o.m4 \
|
||||
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc2.m4 \
|
||||
$(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \
|
||||
$(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intl.m4 \
|
||||
$(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax.m4 \
|
||||
$(top_srcdir)/m4/inttypes-pri.m4 \
|
||||
$(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \
|
||||
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
|
||||
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
|
||||
$(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \
|
||||
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
|
||||
$(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \
|
||||
$(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \
|
||||
$(top_srcdir)/m4/threadlib.m4 $(top_srcdir)/m4/uintmax_t.m4 \
|
||||
$(top_srcdir)/m4/visibility.m4 $(top_srcdir)/m4/wchar_t.m4 \
|
||||
$(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \
|
||||
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/include/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
ARFLAGS = cru
|
||||
AM_V_AR = $(am__v_AR_@AM_V@)
|
||||
am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
|
||||
am__v_AR_0 = @echo " AR " $@;
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
libvb_a_AR = $(AR) $(ARFLAGS)
|
||||
libvb_a_LIBADD =
|
||||
am__libvb_a_SOURCES_DIST = vb.cpp timer.cpp input.cpp vip.cpp vsu.cpp \
|
||||
debug.cpp
|
||||
@WANT_DEBUGGER_TRUE@am__objects_1 = debug.$(OBJEXT)
|
||||
am_libvb_a_OBJECTS = vb.$(OBJEXT) timer.$(OBJEXT) input.$(OBJEXT) \
|
||||
vip.$(OBJEXT) vsu.$(OBJEXT) $(am__objects_1)
|
||||
libvb_a_OBJECTS = $(am_libvb_a_OBJECTS)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
AM_V_CXX = $(am__v_CXX_@AM_V@)
|
||||
am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
|
||||
am__v_CXX_0 = @echo " CXX " $@;
|
||||
CXXLD = $(CXX)
|
||||
CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
|
||||
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
|
||||
am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
|
||||
am__v_CXXLD_0 = @echo " CXXLD " $@;
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
SOURCES = $(libvb_a_SOURCES)
|
||||
DIST_SOURCES = $(am__libvb_a_SOURCES_DIST)
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
ALSA_CFLAGS = @ALSA_CFLAGS@
|
||||
ALSA_LIBS = @ALSA_LIBS@
|
||||
AMTAR = @AMTAR@
|
||||
AM_CFLAGS = @AM_CFLAGS@
|
||||
AM_CXXFLAGS = @AM_CXXFLAGS@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CCAS = @CCAS@
|
||||
CCASDEPMODE = @CCASDEPMODE@
|
||||
CCASFLAGS = @CCASFLAGS@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEFS = -DLOCALEDIR=\"$(datadir)/locale\" @DEFS@ -fno-strict-aliasing
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GBA_EXTRA_FLAGS = @GBA_EXTRA_FLAGS@
|
||||
GENCAT = @GENCAT@
|
||||
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
|
||||
GLIBC2 = @GLIBC2@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GMSGFMT_015 = @GMSGFMT_015@
|
||||
GREP = @GREP@
|
||||
HAVE_ASPRINTF = @HAVE_ASPRINTF@
|
||||
HAVE_NEWLOCALE = @HAVE_NEWLOCALE@
|
||||
HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
|
||||
HAVE_SNPRINTF = @HAVE_SNPRINTF@
|
||||
HAVE_VISIBILITY = @HAVE_VISIBILITY@
|
||||
HAVE_WPRINTF = @HAVE_WPRINTF@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLBISON = @INTLBISON@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_DEFAULT_VERBOSITY = @INTL_DEFAULT_VERBOSITY@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
|
||||
JACK_CFLAGS = @JACK_CFLAGS@
|
||||
JACK_LIBS = @JACK_LIBS@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@
|
||||
LIBCDIO_LIBS = @LIBCDIO_LIBS@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBINTL = @LIBINTL@
|
||||
LIBMULTITHREAD = @LIBMULTITHREAD@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBPTH = @LIBPTH@
|
||||
LIBPTH_PREFIX = @LIBPTH_PREFIX@
|
||||
LIBS = @LIBS@
|
||||
LIBTHREAD = @LIBTHREAD@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBC = @LTLIBC@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LTLIBPTH = @LTLIBPTH@
|
||||
LTLIBTHREAD = @LTLIBTHREAD@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MMX_CFLAGS = @MMX_CFLAGS@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGFMT_015 = @MSGFMT_015@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
POSUB = @POSUB@
|
||||
PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
|
||||
RANLIB = @RANLIB@
|
||||
SDL_CFLAGS = @SDL_CFLAGS@
|
||||
SDL_CONFIG = @SDL_CONFIG@
|
||||
SDL_LIBS = @SDL_LIBS@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
SNDFILE_CFLAGS = @SNDFILE_CFLAGS@
|
||||
SNDFILE_LIBS = @SNDFILE_LIBS@
|
||||
SNES_EXTRA_CXXFLAGS = @SNES_EXTRA_CXXFLAGS@
|
||||
SNES_EXTRA_FLAGS = @SNES_EXTRA_FLAGS@
|
||||
SNES_PERF_EXTRA_CXXFLAGS = @SNES_PERF_EXTRA_CXXFLAGS@
|
||||
SNES_PERF_EXTRA_FLAGS = @SNES_PERF_EXTRA_FLAGS@
|
||||
SSE2_CFLAGS = @SSE2_CFLAGS@
|
||||
SSE3_CFLAGS = @SSE3_CFLAGS@
|
||||
SSE_CFLAGS = @SSE_CFLAGS@
|
||||
STRIP = @STRIP@
|
||||
TRIO_CFLAGS = @TRIO_CFLAGS@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
WARNING_FLAGS = @WARNING_FLAGS@
|
||||
WINDRES = @WINDRES@
|
||||
WOE32 = @WOE32@
|
||||
WOE32DLL = @WOE32DLL@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
XGETTEXT_015 = @XGETTEXT_015@
|
||||
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
AUTOMAKE_OPTIONS = subdir-objects
|
||||
DEFAULT_INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/intl -I$(top_srcdir)
|
||||
noinst_LIBRARIES = libvb.a
|
||||
libvb_a_SOURCES = vb.cpp timer.cpp input.cpp vip.cpp vsu.cpp \
|
||||
$(am__append_1)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .lo .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/vb/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu src/vb/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
libvb.a: $(libvb_a_OBJECTS) $(libvb_a_DEPENDENCIES) $(EXTRA_libvb_a_DEPENDENCIES)
|
||||
$(AM_V_at)-rm -f libvb.a
|
||||
$(AM_V_AR)$(libvb_a_AR) libvb.a $(libvb_a_OBJECTS) $(libvb_a_LIBADD)
|
||||
$(AM_V_at)$(RANLIB) libvb.a
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/input.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timer.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vb.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vip.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsu.Po@am__quote@
|
||||
|
||||
.cpp.o:
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
||||
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
|
||||
|
||||
.cpp.obj:
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
|
||||
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.cpp.lo:
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
|
||||
@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LIBRARIES)
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool clean-noinstLIBRARIES ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags uninstall uninstall-am
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
@ -1,681 +0,0 @@
|
||||
/* Mednafen - Multi-system Emulator
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "vb.h"
|
||||
#include <mednafen/hw_cpu/v810/v810_cpuD.h>
|
||||
#include <string.h>
|
||||
#include <trio/trio.h>
|
||||
#include <stdarg.h>
|
||||
#include <iconv.h>
|
||||
|
||||
#include "debug.h"
|
||||
#include "timer.h"
|
||||
//#include "input.h"
|
||||
#include "vip.h"
|
||||
#include "vsu.h"
|
||||
#include "timer.h"
|
||||
|
||||
namespace MDFN_IEN_VB
|
||||
{
|
||||
|
||||
extern V810 *VB_V810;
|
||||
extern VSU *VB_VSU;
|
||||
|
||||
static void RedoCPUHook(void);
|
||||
static void (*CPUHook)(uint32, bool bpoint) = NULL;
|
||||
static bool CPUHookContinuous = false;
|
||||
static void (*LogFunc)(const char *, const char *);
|
||||
bool VB_LoggingOn = FALSE;
|
||||
|
||||
typedef struct __VB_BPOINT {
|
||||
uint32 A[2];
|
||||
int type;
|
||||
bool logical;
|
||||
} VB_BPOINT;
|
||||
|
||||
static std::vector<VB_BPOINT> BreakPointsPC, BreakPointsRead, BreakPointsWrite;
|
||||
static bool FoundBPoint = 0;
|
||||
|
||||
struct BTEntry
|
||||
{
|
||||
uint32 from;
|
||||
uint32 to;
|
||||
uint32 branch_count;
|
||||
uint32 ecode;
|
||||
bool valid;
|
||||
};
|
||||
|
||||
#define NUMBT 24
|
||||
static BTEntry BTEntries[NUMBT];
|
||||
static int BTIndex;
|
||||
static bool BTEnabled;
|
||||
|
||||
static void AddBranchTrace(uint32 from, uint32 to, uint32 ecode)
|
||||
{
|
||||
BTEntry *prevbt = &BTEntries[(BTIndex + NUMBT - 1) % NUMBT];
|
||||
|
||||
//if(BTEntries[(BTIndex - 1) & 0xF] == PC) return;
|
||||
|
||||
if(prevbt->from == from && prevbt->to == to && prevbt->ecode == ecode && prevbt->branch_count < 0xFFFFFFFF && prevbt->valid)
|
||||
prevbt->branch_count++;
|
||||
else
|
||||
{
|
||||
BTEntries[BTIndex].from = from;
|
||||
BTEntries[BTIndex].to = to;
|
||||
BTEntries[BTIndex].ecode = ecode;
|
||||
BTEntries[BTIndex].branch_count = 1;
|
||||
BTEntries[BTIndex].valid = true;
|
||||
|
||||
BTIndex = (BTIndex + 1) % NUMBT;
|
||||
}
|
||||
}
|
||||
|
||||
void VBDBG_EnableBranchTrace(bool enable)
|
||||
{
|
||||
BTEnabled = enable;
|
||||
if(!enable)
|
||||
{
|
||||
BTIndex = 0;
|
||||
memset(BTEntries, 0, sizeof(BTEntries));
|
||||
}
|
||||
|
||||
RedoCPUHook();
|
||||
}
|
||||
|
||||
std::vector<BranchTraceResult> VBDBG_GetBranchTrace(void)
|
||||
{
|
||||
BranchTraceResult tmp;
|
||||
std::vector<BranchTraceResult> ret;
|
||||
|
||||
for(int x = 0; x < NUMBT; x++)
|
||||
{
|
||||
const BTEntry *bt = &BTEntries[(x + BTIndex) % NUMBT];
|
||||
|
||||
if(!bt->valid)
|
||||
continue;
|
||||
|
||||
tmp.count = bt->branch_count;
|
||||
trio_snprintf(tmp.from, sizeof(tmp.from), "%08x", bt->from);
|
||||
trio_snprintf(tmp.to, sizeof(tmp.to), "%08x", bt->to);
|
||||
|
||||
tmp.code[0] = 0;
|
||||
|
||||
switch(bt->ecode)
|
||||
{
|
||||
case 0: break;
|
||||
default: trio_snprintf(tmp.code, sizeof(tmp.code), "e");
|
||||
break;
|
||||
|
||||
case 0xFFF0: // Reset
|
||||
trio_snprintf(tmp.code, sizeof(tmp.code), "R");
|
||||
break;
|
||||
|
||||
case 0xFFD0: // NMI
|
||||
trio_snprintf(tmp.code, sizeof(tmp.code), "NMI");
|
||||
break;
|
||||
|
||||
case 0xFFC0: // Address trap
|
||||
trio_snprintf(tmp.code, sizeof(tmp.code), "ADTR");
|
||||
break;
|
||||
|
||||
case 0xFFA0 ... 0xFFBF: // TRAP
|
||||
trio_snprintf(tmp.code, sizeof(tmp.code), "TRAP");
|
||||
break;
|
||||
|
||||
case 0xFF90: // Illegal/invalid instruction code
|
||||
trio_snprintf(tmp.code, sizeof(tmp.code), "ILL");
|
||||
break;
|
||||
|
||||
case 0xFF80: // Zero division
|
||||
trio_snprintf(tmp.code, sizeof(tmp.code), "ZD");
|
||||
break;
|
||||
|
||||
case 0xFF70:
|
||||
trio_snprintf(tmp.code, sizeof(tmp.code), "FIV"); // FIV
|
||||
break;
|
||||
|
||||
case 0xFF68:
|
||||
trio_snprintf(tmp.code, sizeof(tmp.code), "FZD"); // FZD
|
||||
break;
|
||||
|
||||
case 0xFF64:
|
||||
trio_snprintf(tmp.code, sizeof(tmp.code), "FOV"); // FOV
|
||||
break;
|
||||
|
||||
case 0xFF62:
|
||||
trio_snprintf(tmp.code, sizeof(tmp.code), "FUD"); // FUD
|
||||
break;
|
||||
|
||||
case 0xFF61:
|
||||
trio_snprintf(tmp.code, sizeof(tmp.code), "FPR"); // FPR
|
||||
break;
|
||||
|
||||
case 0xFF60:
|
||||
trio_snprintf(tmp.code, sizeof(tmp.code), "FRO"); // FRO
|
||||
break;
|
||||
|
||||
case 0xFE00 ... 0xFEFF:
|
||||
trio_snprintf(tmp.code, sizeof(tmp.code), "INT%d", (bt->ecode >> 4) & 0xF);
|
||||
break;
|
||||
}
|
||||
|
||||
ret.push_back(tmp);
|
||||
}
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
||||
void VBDBG_CheckBP(int type, uint32 address, uint32 value, unsigned int len)
|
||||
{
|
||||
std::vector<VB_BPOINT>::iterator bpit, bpit_end;
|
||||
|
||||
if(type == BPOINT_READ || type == BPOINT_IO_READ)
|
||||
{
|
||||
bpit = BreakPointsRead.begin();
|
||||
bpit_end = BreakPointsRead.end();
|
||||
}
|
||||
else if(type == BPOINT_WRITE || type == BPOINT_IO_WRITE)
|
||||
{
|
||||
bpit = BreakPointsWrite.begin();
|
||||
bpit_end = BreakPointsWrite.end();
|
||||
}
|
||||
else
|
||||
return;
|
||||
|
||||
for(; bpit != bpit_end; bpit++)
|
||||
{
|
||||
uint32 tmp_address = address;
|
||||
uint32 tmp_len = len;
|
||||
|
||||
while(tmp_len--)
|
||||
{
|
||||
if(tmp_address >= bpit->A[0] && tmp_address <= bpit->A[1])
|
||||
{
|
||||
FoundBPoint = TRUE;
|
||||
break;
|
||||
}
|
||||
tmp_address++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static uint16 MDFN_FASTCALL MemPeek8(v810_timestamp_t timestamp, uint32 A)
|
||||
{
|
||||
uint8 ret;
|
||||
|
||||
// TODO: VB_InDebugPeek(implement elsewhere)
|
||||
VB_InDebugPeek++;
|
||||
ret = MemRead8(timestamp, A);
|
||||
VB_InDebugPeek--;
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
static uint16 MDFN_FASTCALL MemPeek16(v810_timestamp_t timestamp, uint32 A)
|
||||
{
|
||||
uint16 ret;
|
||||
|
||||
// TODO: VB_InDebugPeek(implement elsewhere)
|
||||
VB_InDebugPeek++;
|
||||
ret = MemRead16(timestamp, A);
|
||||
VB_InDebugPeek--;
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
static void CPUHandler(const v810_timestamp_t timestamp, uint32 PC)
|
||||
{
|
||||
std::vector<VB_BPOINT>::iterator bpit;
|
||||
|
||||
for(bpit = BreakPointsPC.begin(); bpit != BreakPointsPC.end(); bpit++)
|
||||
{
|
||||
if(PC >= bpit->A[0] && PC <= bpit->A[1])
|
||||
{
|
||||
FoundBPoint = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
VB_V810->CheckBreakpoints(VBDBG_CheckBP, MemPeek16, NULL);
|
||||
|
||||
CPUHookContinuous |= FoundBPoint;
|
||||
|
||||
if(CPUHook && CPUHookContinuous)
|
||||
{
|
||||
ForceEventUpdates(timestamp);
|
||||
CPUHook(PC, FoundBPoint);
|
||||
}
|
||||
|
||||
FoundBPoint = false;
|
||||
}
|
||||
|
||||
static void RedoCPUHook(void)
|
||||
{
|
||||
VB_V810->SetCPUHook((CPUHook || VB_LoggingOn || BreakPointsPC.size() || BreakPointsRead.size() || BreakPointsWrite.size()) ? CPUHandler : NULL,
|
||||
BTEnabled ? AddBranchTrace : NULL);
|
||||
}
|
||||
|
||||
void VBDBG_FlushBreakPoints(int type)
|
||||
{
|
||||
std::vector<VB_BPOINT>::iterator bpit;
|
||||
|
||||
if(type == BPOINT_READ)
|
||||
BreakPointsRead.clear();
|
||||
else if(type == BPOINT_WRITE)
|
||||
BreakPointsWrite.clear();
|
||||
else if(type == BPOINT_PC)
|
||||
BreakPointsPC.clear();
|
||||
|
||||
RedoCPUHook();
|
||||
}
|
||||
|
||||
void VBDBG_AddBreakPoint(int type, unsigned int A1, unsigned int A2, bool logical)
|
||||
{
|
||||
VB_BPOINT tmp;
|
||||
|
||||
tmp.A[0] = A1;
|
||||
tmp.A[1] = A2;
|
||||
tmp.type = type;
|
||||
|
||||
if(type == BPOINT_READ)
|
||||
BreakPointsRead.push_back(tmp);
|
||||
else if(type == BPOINT_WRITE)
|
||||
BreakPointsWrite.push_back(tmp);
|
||||
else if(type == BPOINT_PC)
|
||||
BreakPointsPC.push_back(tmp);
|
||||
|
||||
RedoCPUHook();
|
||||
}
|
||||
|
||||
static uint16 dis_readhw(uint32 A)
|
||||
{
|
||||
int32 timestamp = 0;
|
||||
return(MemPeek16(timestamp, A));
|
||||
}
|
||||
|
||||
void VBDBG_Disassemble(uint32 &a, uint32 SpecialA, char *TextBuf)
|
||||
{
|
||||
return(v810_dis(a, 1, TextBuf, dis_readhw, true));
|
||||
}
|
||||
|
||||
uint32 VBDBG_MemPeek(uint32 A, unsigned int bsize, bool hl, bool logical)
|
||||
{
|
||||
uint32 ret = 0;
|
||||
int32 ws = 0;
|
||||
|
||||
for(unsigned int i = 0; i < bsize; i++)
|
||||
{
|
||||
A &= 0xFFFFFFFF;
|
||||
//ret |= mem_peekbyte(A, ws) << (i * 8);
|
||||
ret |= MemRead8(ws, A) << (i * 8);
|
||||
A++;
|
||||
}
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
static void GetAddressSpaceBytes(const char *name, uint32 Address, uint32 Length, uint8 *Buffer)
|
||||
{
|
||||
if(!strcmp(name, "cpu"))
|
||||
{
|
||||
while(Length--)
|
||||
{
|
||||
*Buffer = MemPeek8(0, Address);
|
||||
|
||||
Address++;
|
||||
Buffer++;
|
||||
}
|
||||
}
|
||||
else if(!strncmp(name, "vsuwd", 5))
|
||||
{
|
||||
const unsigned int which = name[5] - '0';
|
||||
|
||||
while(Length--)
|
||||
{
|
||||
*Buffer = VB_VSU->PeekWave(which, Address);
|
||||
|
||||
Address++;
|
||||
Buffer++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void PutAddressSpaceBytes(const char *name, uint32 Address, uint32 Length, uint32 Granularity, bool hl, const uint8 *Buffer)
|
||||
{
|
||||
if(!strcmp(name, "cpu"))
|
||||
{
|
||||
while(Length--)
|
||||
{
|
||||
int32 dummy_ts = 0;
|
||||
|
||||
MemWrite8(dummy_ts, Address, *Buffer);
|
||||
|
||||
Address++;
|
||||
Buffer++;
|
||||
}
|
||||
}
|
||||
else if(!strncmp(name, "vsuwd", 5))
|
||||
{
|
||||
const unsigned int which = name[5] - '0';
|
||||
|
||||
while(Length--)
|
||||
{
|
||||
VB_VSU->PokeWave(which, Address, *Buffer);
|
||||
|
||||
Address++;
|
||||
Buffer++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint32 VBDBG_GetRegister(const std::string &name, std::string *special)
|
||||
{
|
||||
if(name == "PC")
|
||||
{
|
||||
return(VB_V810->GetPC());
|
||||
}
|
||||
const char *thestring = name.c_str();
|
||||
|
||||
if(!strncmp(thestring, "PR", 2))
|
||||
{
|
||||
return(VB_V810->GetPR(atoi(thestring + 2)));
|
||||
}
|
||||
else if(!strcmp(thestring, "HSP"))
|
||||
return(VB_V810->GetPR(2));
|
||||
else if(!strcmp(thestring, "SP"))
|
||||
return(VB_V810->GetPR(3));
|
||||
else if(!strcmp(thestring, "GP"))
|
||||
return(VB_V810->GetPR(4));
|
||||
else if(!strcmp(thestring, "TP"))
|
||||
return(VB_V810->GetPR(5));
|
||||
else if(!strcmp(thestring, "LP"))
|
||||
return(VB_V810->GetPR(31));
|
||||
else if(!strcmp(thestring, "TStamp"))
|
||||
return(VB_V810->v810_timestamp);
|
||||
else if(!strncmp(thestring, "SR", 2))
|
||||
{
|
||||
int which_one = atoi(thestring + 2);
|
||||
uint32 val = VB_V810->GetSR(which_one);
|
||||
|
||||
if(special && which_one == PSW)
|
||||
{
|
||||
char buf[256];
|
||||
trio_snprintf(buf, 256, "Z: %d, S: %d, OV: %d, CY: %d, ID: %d, AE: %d, EP: %d, NP: %d, IA: %2d",
|
||||
(int)(bool)(val & PSW_Z), (int)(bool)(val & PSW_S), (int)(bool)(val & PSW_OV), (int)(bool)(val & PSW_CY),
|
||||
(int)(bool)(val & PSW_ID), (int)(bool)(val & PSW_AE), (int)(bool)(val & PSW_EP), (int)(bool)(val & PSW_NP),
|
||||
(val & PSW_IA) >> 16);
|
||||
*special = std::string(buf);
|
||||
}
|
||||
return(val);
|
||||
}
|
||||
uint32 val = 0;
|
||||
|
||||
return(val);
|
||||
}
|
||||
|
||||
void VBDBG_SetRegister(const std::string &name, uint32 value)
|
||||
{
|
||||
if(name == "PC")
|
||||
{
|
||||
VB_V810->SetPC(value & ~1);
|
||||
return;
|
||||
}
|
||||
|
||||
const char *thestring = name.c_str();
|
||||
|
||||
if(!strncmp(thestring, "PR", 2))
|
||||
{
|
||||
VB_V810->SetPR(atoi(thestring + 2), value);
|
||||
}
|
||||
else if(!strcmp(thestring, "HSP"))
|
||||
VB_V810->SetPR(2, value);
|
||||
else if(!strcmp(thestring, "SP"))
|
||||
VB_V810->SetPR(3, value);
|
||||
else if(!strcmp(thestring, "GP"))
|
||||
VB_V810->SetPR(4, value);
|
||||
else if(!strcmp(thestring, "TP"))
|
||||
VB_V810->SetPR(5, value);
|
||||
else if(!strcmp(thestring, "LP"))
|
||||
VB_V810->SetPR(31, value);
|
||||
else if(!strncmp(thestring, "SR", 2))
|
||||
{
|
||||
VB_V810->SetSR(atoi(thestring + 2), value);
|
||||
}
|
||||
}
|
||||
|
||||
void VBDBG_SetCPUCallback(void (*callb)(uint32 PC, bool bpoint), bool continuous)
|
||||
{
|
||||
CPUHook = callb;
|
||||
CPUHookContinuous = continuous;
|
||||
RedoCPUHook();
|
||||
}
|
||||
|
||||
void VBDBG_DoLog(const char *type, const char *format, ...)
|
||||
{
|
||||
if(LogFunc)
|
||||
{
|
||||
char *temp;
|
||||
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
|
||||
temp = trio_vaprintf(format, ap);
|
||||
LogFunc(type, temp);
|
||||
free(temp);
|
||||
|
||||
va_end(ap);
|
||||
}
|
||||
}
|
||||
|
||||
void VBDBG_SetLogFunc(void (*func)(const char *, const char *))
|
||||
{
|
||||
LogFunc = func;
|
||||
|
||||
VB_LoggingOn = func ? TRUE : FALSE;
|
||||
|
||||
if(VB_LoggingOn)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
RedoCPUHook();
|
||||
}
|
||||
|
||||
static RegType V810Regs[] =
|
||||
{
|
||||
{ 0, "PC", "Program Counter", 4 },
|
||||
{ 0, "PR1", "Program Register 1", 4 },
|
||||
{ 0, "HSP", "Program Register 2(Handler Stack Pointer)", 4 },
|
||||
{ 0, "SP", "Program Register 3(Stack Pointer)", 4 },
|
||||
{ 0, "GP", "Program Register 4(Global Pointer)", 4 },
|
||||
{ 0, "TP", "Program Register 5(Text Pointer)", 4 },
|
||||
{ 0, "PR6", "Program Register 6", 4 },
|
||||
{ 0, "PR7", "Program Register 7", 4 },
|
||||
{ 0, "PR8", "Program Register 8", 4 },
|
||||
{ 0, "PR9", "Program Register 9", 4 },
|
||||
{ 0, "PR10", "Program Register 10", 4 },
|
||||
{ 0, "PR11", "Program Register 11", 4 },
|
||||
{ 0, "PR12", "Program Register 12", 4 },
|
||||
{ 0, "PR13", "Program Register 13", 4 },
|
||||
{ 0, "PR14", "Program Register 14", 4 },
|
||||
{ 0, "PR15", "Program Register 15", 4 },
|
||||
{ 0, "PR16", "Program Register 16", 4 },
|
||||
{ 0, "PR17", "Program Register 17", 4 },
|
||||
{ 0, "PR18", "Program Register 18", 4 },
|
||||
{ 0, "PR19", "Program Register 19", 4 },
|
||||
{ 0, "PR20", "Program Register 20", 4 },
|
||||
{ 0, "PR21", "Program Register 21", 4 },
|
||||
{ 0, "PR22", "Program Register 22", 4 },
|
||||
{ 0, "PR23", "Program Register 23", 4 },
|
||||
{ 0, "PR24", "Program Register 24", 4 },
|
||||
{ 0, "PR25", "Program Register 25", 4 },
|
||||
{ 0, "PR26", "Program Register 26(String Dest Bit Offset)", 4 },
|
||||
{ 0, "PR27", "Program Register 27(String Source Bit Offset)", 4 },
|
||||
{ 0, "PR28", "Program Register 28(String Length)", 4 },
|
||||
{ 0, "PR29", "Program Register 29(String Dest)", 4 },
|
||||
{ 0, "PR30", "Program Register 30(String Source)", 4 },
|
||||
{ 0, "LP", "Program Register 31(Link Pointer)", 4 },
|
||||
{ 0, "SR0", "Exception/Interrupt PC", 4 },
|
||||
{ 0, "SR1", "Exception/Interrupt PSW", 4 },
|
||||
{ 0, "SR2", "Fatal Error PC", 4 },
|
||||
{ 0, "SR3", "Fatal Error PSW", 4 },
|
||||
{ 0, "SR4", "Exception Cause Register", 4 },
|
||||
{ 0, "SR5", "Program Status Word", 4 },
|
||||
{ 0, "SR6", "Processor ID Register", 4 },
|
||||
{ 0, "SR7", "Task Control Word", 4 },
|
||||
{ 0, "SR24", "Cache Control Word", 4 },
|
||||
{ 0, "SR25", "Address Trap Register", 4 },
|
||||
|
||||
//{ 0, "IPEND", "Interrupts Pending", 2 },
|
||||
//{ 0, "IMASK", "Interrupt Mask", 2 },
|
||||
//{ 0, "TCTRL", "Timer Control", 2 },
|
||||
//{ 0, "TPRD", "Timer Period", 2 },
|
||||
//{ 0, "TCNTR", "Timer Counter", 3 },
|
||||
|
||||
{ 0, "TStamp", "Timestamp", 3 },
|
||||
{ 0, "", "", 0 },
|
||||
};
|
||||
|
||||
|
||||
static RegGroupType V810RegsGroup =
|
||||
{
|
||||
NULL,
|
||||
V810Regs,
|
||||
NULL,
|
||||
NULL,
|
||||
VBDBG_GetRegister,
|
||||
VBDBG_SetRegister,
|
||||
};
|
||||
|
||||
static uint32 MISC_GetRegister(const unsigned int id, char *special, const uint32 special_len)
|
||||
{
|
||||
return(TIMER_GetRegister(id, special, special_len));
|
||||
}
|
||||
|
||||
static void MISC_SetRegister(const unsigned int id, const uint32 value)
|
||||
{
|
||||
TIMER_SetRegister(id, value);
|
||||
}
|
||||
|
||||
|
||||
static RegType Regs_Misc[] =
|
||||
{
|
||||
{ TIMER_GSREG_TCR, "TCR", "Timer Control Register", 1 },
|
||||
{ TIMER_GSREG_DIVCOUNTER, "DivCounter", "Timer Clock Divider Counter", 2 },
|
||||
{ TIMER_GSREG_RELOAD_VALUE, "ReloadValue", "Timer Reload Value", 2 },
|
||||
{ TIMER_GSREG_COUNTER, "Counter", "Timer Counter Value", 2 },
|
||||
{ 0, "", "", 0 },
|
||||
};
|
||||
|
||||
static RegGroupType RegsGroup_Misc =
|
||||
{
|
||||
"Misc",
|
||||
Regs_Misc,
|
||||
MISC_GetRegister,
|
||||
MISC_SetRegister
|
||||
};
|
||||
|
||||
|
||||
static RegType Regs_VIP[] =
|
||||
{
|
||||
{ VIP_GSREG_IPENDING, "IPending", "Interrupts Pending", 2 },
|
||||
{ VIP_GSREG_IENABLE, "IEnable", "Interrupts Enabled", 2 },
|
||||
|
||||
{ VIP_GSREG_DPCTRL, "DPCTRL", "DPCTRL", 2 },
|
||||
|
||||
{ VIP_GSREG_BRTA, "BRTA", "BRTA", 1 },
|
||||
{ VIP_GSREG_BRTB, "BRTB", "BRTB", 1 },
|
||||
{ VIP_GSREG_BRTC, "BRTC", "BRTC", 1 },
|
||||
{ VIP_GSREG_REST, "REST", "REST", 1 },
|
||||
{ VIP_GSREG_FRMCYC, "FRMCYC", "FRMCYC", 1 },
|
||||
{ VIP_GSREG_XPCTRL, "XPCTRL", "XPCTRL", 2 },
|
||||
|
||||
{ VIP_GSREG_SPT0, "SPT0", "SPT0", 2 },
|
||||
{ VIP_GSREG_SPT1, "SPT1", "SPT1", 2 },
|
||||
{ VIP_GSREG_SPT2, "SPT2", "SPT2", 2 },
|
||||
{ VIP_GSREG_SPT3, "SPT3", "SPT3", 2 },
|
||||
|
||||
{ VIP_GSREG_GPLT0, "GPLT0", "GPLT0", 1 },
|
||||
{ VIP_GSREG_GPLT1, "GPLT1", "GPLT1", 1 },
|
||||
{ VIP_GSREG_GPLT2, "GPLT2", "GPLT2", 1 },
|
||||
{ VIP_GSREG_GPLT3, "GPLT3", "GPLT3", 1 },
|
||||
|
||||
{ VIP_GSREG_JPLT0, "JPLT0", "JPLT0", 1 },
|
||||
{ VIP_GSREG_JPLT1, "JPLT1", "JPLT1", 1 },
|
||||
{ VIP_GSREG_JPLT2, "JPLT2", "JPLT2", 1 },
|
||||
{ VIP_GSREG_JPLT3, "JPLT3", "JPLT3", 1 },
|
||||
|
||||
{ VIP_GSREG_BKCOL, "BKCOL", "BKCOL", 1 },
|
||||
|
||||
{ 0, "", "", 0 },
|
||||
};
|
||||
|
||||
static RegGroupType RegsGroup_VIP =
|
||||
{
|
||||
"VIP",
|
||||
Regs_VIP,
|
||||
VIP_GetRegister,
|
||||
VIP_SetRegister
|
||||
};
|
||||
|
||||
|
||||
bool VBDBG_Init(void)
|
||||
{
|
||||
BTEnabled = false;
|
||||
BTIndex = 0;
|
||||
memset(BTEntries, 0, sizeof(BTEntries));
|
||||
|
||||
MDFNDBG_AddRegGroup(&V810RegsGroup);
|
||||
MDFNDBG_AddRegGroup(&RegsGroup_Misc);
|
||||
MDFNDBG_AddRegGroup(&RegsGroup_VIP);
|
||||
|
||||
ASpace_Add(GetAddressSpaceBytes, PutAddressSpaceBytes, "cpu", "CPU Physical", 32);
|
||||
// ASpace_Add(GetAddressSpaceBytes, PutAddressSpaceBytes, "ram", "RAM", 21);
|
||||
|
||||
|
||||
for(int x = 0; x < 5; x++)
|
||||
{
|
||||
AddressSpaceType newt;
|
||||
char tmpname[128], tmpinfo[128];
|
||||
|
||||
trio_snprintf(tmpname, 128, "vsuwd%d", x);
|
||||
trio_snprintf(tmpinfo, 128, "VSU Wave Data %d", x);
|
||||
|
||||
memset(&newt, 0, sizeof(AddressSpaceType));
|
||||
|
||||
newt.GetAddressSpaceBytes = GetAddressSpaceBytes;
|
||||
newt.PutAddressSpaceBytes = PutAddressSpaceBytes;
|
||||
|
||||
newt.name = strdup(tmpname);
|
||||
newt.long_name = strdup(tmpinfo);
|
||||
newt.TotalBits = 5;
|
||||
newt.NP2Size = 0;
|
||||
|
||||
newt.IsWave = TRUE;
|
||||
newt.WaveFormat = ASPACE_WFMT_UNSIGNED;
|
||||
newt.WaveBits = 6;
|
||||
ASpace_Add(newt); //PSG_GetAddressSpaceBytes, PSG_PutAddressSpaceBytes, tmpname, tmpinfo, 5);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
#ifndef __VB_DEBUG_H
|
||||
#define __VB_DEBUG_H
|
||||
|
||||
namespace MDFN_IEN_VB
|
||||
{
|
||||
|
||||
void VBDBG_FlushBreakPoints(int type);
|
||||
void VBDBG_AddBreakPoint(int type, unsigned int A1, unsigned int A2, bool logical);
|
||||
void VBDBG_Disassemble(uint32 &a, uint32 SpecialA, char *);
|
||||
|
||||
uint32 VBDBG_MemPeek(uint32 A, unsigned int bsize, bool hl, bool logical);
|
||||
uint32 VBDBG_GetRegister(const std::string &name, std::string *special);
|
||||
void VBDBG_SetRegister(const std::string &name, uint32 value);
|
||||
|
||||
void VBDBG_SetCPUCallback(void (*callb)(uint32 PC, bool bpoint), bool continuous);
|
||||
|
||||
void VBDBG_EnableBranchTrace(bool enable);
|
||||
std::vector<BranchTraceResult> VBDBG_GetBranchTrace(void);
|
||||
|
||||
void VBDBG_CheckBP(int type, uint32 address, uint32 value, unsigned int len);
|
||||
|
||||
void VBDBG_SetLogFunc(void (*func)(const char *, const char *));
|
||||
|
||||
void VBDBG_DoLog(const char *type, const char *format, ...);
|
||||
|
||||
|
||||
extern bool VB_LoggingOn;
|
||||
|
||||
bool VBDBG_Init(void);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
@ -1,228 +0,0 @@
|
||||
/* Mednafen - Multi-system Emulator
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "vb.h"
|
||||
#include "input.h"
|
||||
|
||||
namespace MDFN_IEN_VB
|
||||
{
|
||||
static bool InstantReadHack;
|
||||
|
||||
static bool IntPending;
|
||||
|
||||
static uint8 *data_ptr;
|
||||
|
||||
static uint16 PadData;
|
||||
static uint16 PadLatched;
|
||||
|
||||
static uint8 SCR;
|
||||
static uint16 SDR;
|
||||
|
||||
#define SCR_S_ABT_DIS 0x01
|
||||
#define SCR_SI_STAT 0x02
|
||||
#define SCR_HW_SI 0x04
|
||||
#define SCR_SOFT_CLK 0x10
|
||||
|
||||
#define SCR_PARA_SI 0x20
|
||||
#define SCR_K_INT_INH 0x80
|
||||
|
||||
static uint32 ReadBitPos;
|
||||
static int32 ReadCounter;
|
||||
|
||||
static v810_timestamp_t last_ts;
|
||||
|
||||
void VBINPUT_Init(void)
|
||||
{
|
||||
InstantReadHack = true;
|
||||
}
|
||||
|
||||
void VBINPUT_SetInstantReadHack(bool enabled)
|
||||
{
|
||||
InstantReadHack = enabled;
|
||||
}
|
||||
|
||||
|
||||
void VBINPUT_SetInput(int port, const char *type, void *ptr)
|
||||
{
|
||||
data_ptr = (uint8 *)ptr;
|
||||
}
|
||||
|
||||
uint8 VBINPUT_Read(v810_timestamp_t ×tamp, uint32 A)
|
||||
{
|
||||
uint8 ret = 0;
|
||||
|
||||
|
||||
VBINPUT_Update(timestamp);
|
||||
|
||||
//if(((A & 0xFF) == 0x10 || (A & 0xFF) == 0x14))
|
||||
// printf("Read %d\n", timestamp);
|
||||
|
||||
//if(((A & 0xFF) == 0x10 || (A & 0xFF) == 0x14) && ReadCounter > 0)
|
||||
//{
|
||||
// printf("Input port read during hardware transfer: %08x %d\n", A, timestamp);
|
||||
//}
|
||||
|
||||
switch(A & 0xFF)
|
||||
{
|
||||
case 0x10: if(InstantReadHack)
|
||||
ret = PadData;
|
||||
else
|
||||
ret = SDR & 0xFF;
|
||||
break;
|
||||
|
||||
case 0x14: if(InstantReadHack)
|
||||
ret = PadData >> 8;
|
||||
else
|
||||
ret = SDR >> 8;
|
||||
break;
|
||||
|
||||
case 0x28: ret = SCR | (0x40 | 0x08 | SCR_HW_SI);
|
||||
if(ReadCounter > 0)
|
||||
ret |= SCR_SI_STAT;
|
||||
break;
|
||||
}
|
||||
|
||||
// printf("Input Read: %08x %02x\n", A, ret);
|
||||
VB_SetEvent(VB_EVENT_INPUT, (ReadCounter > 0) ? (timestamp + ReadCounter) : VB_EVENT_NONONO);
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
void VBINPUT_Write(v810_timestamp_t ×tamp, uint32 A, uint8 V)
|
||||
{
|
||||
VBINPUT_Update(timestamp);
|
||||
|
||||
//printf("Input write: %d, %08x %02x\n", timestamp, A, V);
|
||||
switch(A & 0xFF)
|
||||
{
|
||||
case 0x28:
|
||||
if((V & SCR_HW_SI) && !(SCR & SCR_S_ABT_DIS) && ReadCounter <= 0)
|
||||
{
|
||||
//printf("Start Read: %d\n", timestamp);
|
||||
PadLatched = PadData;
|
||||
ReadBitPos = 0;
|
||||
ReadCounter = 640;
|
||||
}
|
||||
|
||||
if(V & SCR_S_ABT_DIS)
|
||||
{
|
||||
ReadCounter = 0;
|
||||
ReadBitPos = 0;
|
||||
}
|
||||
|
||||
if(V & SCR_K_INT_INH)
|
||||
{
|
||||
IntPending = false;
|
||||
VBIRQ_Assert(VBIRQ_SOURCE_INPUT, IntPending);
|
||||
}
|
||||
|
||||
SCR = V & (0x80 | 0x20 | 0x10 | 1);
|
||||
break;
|
||||
}
|
||||
|
||||
VB_SetEvent(VB_EVENT_INPUT, (ReadCounter > 0) ? (timestamp + ReadCounter) : VB_EVENT_NONONO);
|
||||
}
|
||||
|
||||
void VBINPUT_Frame(void)
|
||||
{
|
||||
PadData = (MDFN_de16lsb(data_ptr) << 2) | 0x2;
|
||||
}
|
||||
|
||||
v810_timestamp_t VBINPUT_Update(const v810_timestamp_t timestamp)
|
||||
{
|
||||
int32 clocks = timestamp - last_ts;
|
||||
|
||||
if(ReadCounter > 0)
|
||||
{
|
||||
ReadCounter -= clocks;
|
||||
|
||||
while(ReadCounter <= 0)
|
||||
{
|
||||
SDR &= ~(1 << ReadBitPos);
|
||||
SDR |= PadLatched & (1 << ReadBitPos);
|
||||
|
||||
ReadBitPos++;
|
||||
if(ReadBitPos < 16)
|
||||
ReadCounter += 640;
|
||||
else
|
||||
{
|
||||
//printf("Read End: %d\n", timestamp);
|
||||
if(!(SCR & SCR_K_INT_INH))
|
||||
{
|
||||
//printf("Input IRQ: %d\n", timestamp);
|
||||
IntPending = true;
|
||||
VBIRQ_Assert(VBIRQ_SOURCE_INPUT, IntPending);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
last_ts = timestamp;
|
||||
|
||||
return((ReadCounter > 0) ? (timestamp + ReadCounter) : VB_EVENT_NONONO);
|
||||
}
|
||||
|
||||
void VBINPUT_ResetTS(void)
|
||||
{
|
||||
last_ts = 0;
|
||||
}
|
||||
|
||||
void VBINPUT_Power(void)
|
||||
{
|
||||
last_ts = 0;
|
||||
PadData = 0;
|
||||
PadLatched = 0;
|
||||
SDR = 0;
|
||||
SCR = 0;
|
||||
ReadBitPos = 0;
|
||||
ReadCounter = 0;
|
||||
IntPending = false;
|
||||
|
||||
VBIRQ_Assert(VBIRQ_SOURCE_INPUT, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
int VBINPUT_StateAction(StateMem *sm, int load, int data_only)
|
||||
{
|
||||
SFORMAT StateRegs[] =
|
||||
{
|
||||
SFVAR(PadData),
|
||||
SFVAR(PadLatched),
|
||||
SFVAR(SCR),
|
||||
SFVAR(SDR),
|
||||
SFVAR(ReadBitPos),
|
||||
SFVAR(ReadCounter),
|
||||
SFVAR(IntPending),
|
||||
SFEND
|
||||
};
|
||||
|
||||
int ret = MDFNSS_StateAction(sm, load, data_only, StateRegs, "INPUT");
|
||||
|
||||
if(load)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
#ifndef __VB_INPUT_H
|
||||
#define __VB_INPUT_H
|
||||
|
||||
namespace MDFN_IEN_VB
|
||||
{
|
||||
|
||||
void VBINPUT_Init(void);
|
||||
void VBINPUT_SetInstantReadHack(bool);
|
||||
|
||||
void VBINPUT_SetInput(int port, const char *type, void *ptr);
|
||||
|
||||
uint8 VBINPUT_Read(v810_timestamp_t ×tamp, uint32 A);
|
||||
|
||||
void VBINPUT_Write(v810_timestamp_t ×tamp, uint32 A, uint8 V);
|
||||
|
||||
void VBINPUT_Frame(void);
|
||||
int VBINPUT_StateAction(StateMem *sm, int load, int data_only);
|
||||
|
||||
int32 VBINPUT_Update(const int32 timestamp);
|
||||
void VBINPUT_ResetTS(void);
|
||||
|
||||
|
||||
void VBINPUT_Power(void);
|
||||
|
||||
|
||||
int VBINPUT_StateAction(StateMem *sm, int load, int data_only);
|
||||
|
||||
}
|
||||
#endif
|
@ -1,254 +0,0 @@
|
||||
/* Mednafen - Multi-system Emulator
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "vb.h"
|
||||
#include "timer.h"
|
||||
|
||||
namespace MDFN_IEN_VB
|
||||
{
|
||||
|
||||
#define TC_TENABLE 0x01
|
||||
#define TC_ZSTAT 0x02
|
||||
#define TC_ZSTATCLR 0x04
|
||||
#define TC_TIMZINT 0x08
|
||||
#define TC_TCLKSEL 0x10
|
||||
|
||||
static uint8 TimerControl;
|
||||
static uint16 TimerReloadValue;
|
||||
static uint16 TimerCounter;
|
||||
static int32 TimerDivider;
|
||||
static v810_timestamp_t TimerLastTS;
|
||||
static bool TimerStatus, TimerStatusShadow;
|
||||
static bool ReloadPending;
|
||||
|
||||
v810_timestamp_t TIMER_Update(v810_timestamp_t timestamp)
|
||||
{
|
||||
int32 run_time = timestamp - TimerLastTS;
|
||||
|
||||
if(TimerControl & TC_TENABLE)
|
||||
{
|
||||
TimerDivider -= run_time;
|
||||
while(TimerDivider <= 0)
|
||||
{
|
||||
if(!TimerCounter || ReloadPending)
|
||||
{
|
||||
TimerCounter = TimerReloadValue;
|
||||
ReloadPending = false;
|
||||
}
|
||||
|
||||
if(TimerCounter)
|
||||
TimerCounter--;
|
||||
|
||||
if(!TimerCounter || TimerStatus)
|
||||
{
|
||||
TimerStatusShadow = TimerStatus = true;
|
||||
}
|
||||
|
||||
VBIRQ_Assert(VBIRQ_SOURCE_TIMER, TimerStatusShadow && (TimerControl & TC_TIMZINT));
|
||||
TimerDivider += (TimerControl & TC_TCLKSEL) ? 500 : 2000;
|
||||
}
|
||||
}
|
||||
|
||||
TimerLastTS = timestamp;
|
||||
|
||||
return((TimerControl & TC_TENABLE) ? (timestamp + TimerDivider) : VB_EVENT_NONONO);
|
||||
}
|
||||
|
||||
void TIMER_ResetTS(void)
|
||||
{
|
||||
TimerLastTS = 0;
|
||||
}
|
||||
|
||||
uint8 TIMER_Read(const v810_timestamp_t ×tamp, uint32 A)
|
||||
{
|
||||
uint8 ret = 0;
|
||||
|
||||
//if(A <= 0x1C)
|
||||
//printf("Read: %d, %08x\n", timestamp, A);
|
||||
TIMER_Update(timestamp);
|
||||
|
||||
switch(A & 0xFF)
|
||||
{
|
||||
case 0x18: ret = TimerCounter;
|
||||
break;
|
||||
|
||||
case 0x1C: ret = TimerCounter >> 8;
|
||||
break;
|
||||
|
||||
case 0x20: ret = TimerControl | (0xE0 | TC_ZSTATCLR) | (TimerStatus ? TC_ZSTAT : 0);
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
void TIMER_Write(const v810_timestamp_t ×tamp, uint32 A, uint8 V)
|
||||
{
|
||||
if(A & 0x3)
|
||||
{
|
||||
puts("HWCtrl Bogus Write?");
|
||||
return;
|
||||
}
|
||||
|
||||
TIMER_Update(timestamp);
|
||||
|
||||
//if((A & 0xFF) <= 0x1C)
|
||||
//printf("Write: %d, %08x %02x\n", timestamp, A, V);
|
||||
|
||||
switch(A & 0xFF)
|
||||
{
|
||||
case 0x18: TimerReloadValue &= 0xFF00;
|
||||
TimerReloadValue |= V;
|
||||
ReloadPending = true;
|
||||
break;
|
||||
|
||||
case 0x1C: TimerReloadValue &= 0x00FF;
|
||||
TimerReloadValue |= V << 8;
|
||||
ReloadPending = true;
|
||||
break;
|
||||
|
||||
case 0x20: if(V & TC_ZSTATCLR)
|
||||
{
|
||||
if((TimerControl & TC_TENABLE) && TimerCounter == 0)
|
||||
{
|
||||
//puts("Faulty Z-Stat-Clr");
|
||||
}
|
||||
else
|
||||
{
|
||||
TimerStatus = false;
|
||||
}
|
||||
TimerStatusShadow = false;
|
||||
}
|
||||
if((V & TC_TENABLE) && !(TimerControl & TC_TENABLE))
|
||||
{
|
||||
//TimerCounter = TimerReloadValue;
|
||||
TimerDivider = (V & TC_TCLKSEL) ? 500 : 2000;
|
||||
}
|
||||
TimerControl = V & (0x10 | 0x08 | 0x01);
|
||||
|
||||
if(!(TimerControl & TC_TIMZINT))
|
||||
TimerStatus = TimerStatusShadow = false;
|
||||
|
||||
VBIRQ_Assert(VBIRQ_SOURCE_TIMER, TimerStatusShadow && (TimerControl & TC_TIMZINT));
|
||||
|
||||
if(TimerControl & TC_TENABLE)
|
||||
VB_SetEvent(VB_EVENT_TIMER, timestamp + TimerDivider);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void TIMER_Power(void)
|
||||
{
|
||||
TimerLastTS = 0;
|
||||
|
||||
TimerCounter = 0xFFFF;
|
||||
TimerReloadValue = 0xFFFF;
|
||||
TimerDivider = 2000; //2150; //2000;
|
||||
|
||||
TimerStatus = false;
|
||||
TimerStatusShadow = false;
|
||||
TimerControl = 0;
|
||||
|
||||
ReloadPending = false;
|
||||
|
||||
VBIRQ_Assert(VBIRQ_SOURCE_TIMER, false);
|
||||
}
|
||||
|
||||
int TIMER_StateAction(StateMem *sm, int load, int data_only)
|
||||
{
|
||||
SFORMAT StateRegs[] =
|
||||
{
|
||||
SFVAR(TimerCounter),
|
||||
SFVAR(TimerReloadValue),
|
||||
SFVAR(TimerDivider),
|
||||
SFVAR(TimerStatus),
|
||||
SFVAR(TimerStatusShadow),
|
||||
SFVAR(TimerControl),
|
||||
SFVAR(ReloadPending),
|
||||
SFEND
|
||||
};
|
||||
|
||||
int ret = MDFNSS_StateAction(sm, load, data_only, StateRegs, "TIMER");
|
||||
|
||||
if(load)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
uint32 TIMER_GetRegister(const unsigned int id, char *special, const uint32 special_len)
|
||||
{
|
||||
uint32 ret = 0xDEADBEEF;
|
||||
|
||||
switch(id)
|
||||
{
|
||||
case TIMER_GSREG_TCR:
|
||||
ret = TimerControl;
|
||||
if(special)
|
||||
trio_snprintf(special, special_len, "TEnable: %d, TimZInt: %d, TClkSel: %d(%.3f KHz)",
|
||||
(int)(bool)(ret & TC_TENABLE),
|
||||
(int)(bool)(ret & TC_TIMZINT),
|
||||
(int)(bool)(ret & TC_TCLKSEL),
|
||||
(double)VB_MASTER_CLOCK / ((ret & TC_TCLKSEL) ? 500 : 2000) / 1000 );
|
||||
break;
|
||||
|
||||
case TIMER_GSREG_DIVCOUNTER:
|
||||
ret = TimerDivider;
|
||||
break;
|
||||
|
||||
case TIMER_GSREG_RELOAD_VALUE:
|
||||
ret = TimerReloadValue;
|
||||
break;
|
||||
|
||||
case TIMER_GSREG_COUNTER:
|
||||
ret = TimerCounter;
|
||||
break;
|
||||
|
||||
}
|
||||
return(ret);
|
||||
}
|
||||
|
||||
void TIMER_SetRegister(const unsigned int id, const uint32 value)
|
||||
{
|
||||
switch(id)
|
||||
{
|
||||
case TIMER_GSREG_TCR:
|
||||
TimerControl = value & (TC_TENABLE | TC_TIMZINT | TC_TCLKSEL);
|
||||
break;
|
||||
|
||||
case TIMER_GSREG_DIVCOUNTER:
|
||||
TimerDivider = value % ((TimerControl & TC_TCLKSEL) ? 500 : 2000);
|
||||
break;
|
||||
|
||||
case TIMER_GSREG_RELOAD_VALUE:
|
||||
TimerReloadValue = value;
|
||||
break;
|
||||
|
||||
case TIMER_GSREG_COUNTER:
|
||||
TimerCounter = value;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
#ifndef __MDFN_VB_TIMER_H
|
||||
#define __MDFN_VB_TIMER_H
|
||||
|
||||
namespace MDFN_IEN_VB
|
||||
{
|
||||
|
||||
v810_timestamp_t TIMER_Update(v810_timestamp_t timestamp);
|
||||
void TIMER_ResetTS(void);
|
||||
uint8 TIMER_Read(const v810_timestamp_t ×tamp, uint32 A);
|
||||
void TIMER_Write(const v810_timestamp_t ×tamp, uint32 A, uint8 V);
|
||||
|
||||
void TIMER_Power(void) MDFN_COLD;
|
||||
|
||||
int TIMER_StateAction(StateMem *sm, int load, int data_only);
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
TIMER_GSREG_TCR,
|
||||
TIMER_GSREG_DIVCOUNTER,
|
||||
TIMER_GSREG_RELOAD_VALUE,
|
||||
TIMER_GSREG_COUNTER,
|
||||
};
|
||||
|
||||
uint32 TIMER_GetRegister(const unsigned int id, char *special, const uint32 special_len);
|
||||
void TIMER_SetRegister(const unsigned int id, const uint32 value);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
1068
mednafen/vb/vb.cpp
1068
mednafen/vb/vb.cpp
File diff suppressed because it is too large
Load Diff
@ -1,63 +0,0 @@
|
||||
#ifndef __VB_VB_H
|
||||
#define __VB_VB_H
|
||||
|
||||
#include <mednafen/mednafen.h>
|
||||
#include <mednafen/hw_cpu/v810/v810_cpu.h>
|
||||
#include <mednafen/masmem.h>
|
||||
#include <trio/trio.h>
|
||||
|
||||
namespace MDFN_IEN_VB
|
||||
{
|
||||
|
||||
enum
|
||||
{
|
||||
VB3DMODE_ANAGLYPH = 0,
|
||||
VB3DMODE_CSCOPE = 1,
|
||||
VB3DMODE_SIDEBYSIDE = 2,
|
||||
VB3DMODE_OVERUNDER = 3,
|
||||
VB3DMODE_VLI,
|
||||
VB3DMODE_HLI
|
||||
};
|
||||
|
||||
#define VB_MASTER_CLOCK 20000000.0
|
||||
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
VB_EVENT_VIP = 0,
|
||||
VB_EVENT_TIMER,
|
||||
VB_EVENT_INPUT,
|
||||
// VB_EVENT_COMM
|
||||
};
|
||||
|
||||
#define VB_EVENT_NONONO 0x7fffffff
|
||||
|
||||
void VB_SetEvent(const int type, const v810_timestamp_t next_timestamp);
|
||||
|
||||
|
||||
#define VBIRQ_SOURCE_INPUT 0
|
||||
#define VBIRQ_SOURCE_TIMER 1
|
||||
#define VBIRQ_SOURCE_EXPANSION 2
|
||||
#define VBIRQ_SOURCE_COMM 3
|
||||
#define VBIRQ_SOURCE_VIP 4
|
||||
|
||||
void VBIRQ_Assert(int source, bool assert);
|
||||
|
||||
void VB_ExitLoop(void);
|
||||
|
||||
void ForceEventUpdates(const v810_timestamp_t timestamp);
|
||||
|
||||
|
||||
uint8 MDFN_FASTCALL MemRead8(v810_timestamp_t ×tamp, uint32 A);
|
||||
uint16 MDFN_FASTCALL MemRead16(v810_timestamp_t ×tamp, uint32 A);
|
||||
|
||||
void MDFN_FASTCALL MemWrite8(v810_timestamp_t ×tamp, uint32 A, uint8 V);
|
||||
void MDFN_FASTCALL MemWrite16(v810_timestamp_t ×tamp, uint32 A, uint16 V);
|
||||
|
||||
|
||||
|
||||
extern int32 VB_InDebugPeek;
|
||||
}
|
||||
|
||||
#endif
|
1687
mednafen/vb/vip.cpp
1687
mednafen/vb/vip.cpp
File diff suppressed because it is too large
Load Diff
@ -1,71 +0,0 @@
|
||||
#ifndef __VB_VIP_H
|
||||
#define __VB_VIP_H
|
||||
|
||||
namespace MDFN_IEN_VB
|
||||
{
|
||||
|
||||
bool VIP_Init(void) MDFN_COLD;
|
||||
void VIP_Power(void) MDFN_COLD;
|
||||
|
||||
void VIP_SetInstantDisplayHack(bool);
|
||||
void VIP_SetAllowDrawSkip(bool);
|
||||
void VIP_Set3DMode(uint32 mode, bool reverse, uint32 prescale, uint32 sbs_separation);
|
||||
void VIP_SetParallaxDisable(bool disabled);
|
||||
void VIP_SetDefaultColor(uint32 default_color);
|
||||
void VIP_SetAnaglyphColors(uint32 lcolor, uint32 rcolor); // R << 16, G << 8, B << 0
|
||||
|
||||
v810_timestamp_t MDFN_FASTCALL VIP_Update(const v810_timestamp_t timestamp);
|
||||
void VIP_ResetTS(void);
|
||||
|
||||
void VIP_StartFrame(EmulateSpecStruct *espec);
|
||||
|
||||
uint8 VIP_Read8(v810_timestamp_t ×tamp, uint32 A);
|
||||
uint16 VIP_Read16(v810_timestamp_t ×tamp, uint32 A);
|
||||
|
||||
|
||||
void VIP_Write8(v810_timestamp_t ×tamp, uint32 A, uint8 V);
|
||||
void VIP_Write16(v810_timestamp_t ×tamp, uint32 A, uint16 V);
|
||||
|
||||
|
||||
|
||||
int VIP_StateAction(StateMem *sm, int load, int data_only);
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
VIP_GSREG_IPENDING = 0, // Current pending interrupt(bits)
|
||||
VIP_GSREG_IENABLE,
|
||||
|
||||
VIP_GSREG_DPCTRL,
|
||||
|
||||
VIP_GSREG_BRTA,
|
||||
VIP_GSREG_BRTB,
|
||||
VIP_GSREG_BRTC,
|
||||
VIP_GSREG_REST,
|
||||
VIP_GSREG_FRMCYC,
|
||||
VIP_GSREG_XPCTRL,
|
||||
|
||||
VIP_GSREG_SPT0,
|
||||
VIP_GSREG_SPT1,
|
||||
VIP_GSREG_SPT2,
|
||||
VIP_GSREG_SPT3,
|
||||
|
||||
VIP_GSREG_GPLT0,
|
||||
VIP_GSREG_GPLT1,
|
||||
VIP_GSREG_GPLT2,
|
||||
VIP_GSREG_GPLT3,
|
||||
|
||||
VIP_GSREG_JPLT0,
|
||||
VIP_GSREG_JPLT1,
|
||||
VIP_GSREG_JPLT2,
|
||||
VIP_GSREG_JPLT3,
|
||||
|
||||
VIP_GSREG_BKCOL,
|
||||
};
|
||||
|
||||
uint32 VIP_GetRegister(const unsigned int id, char *special, const uint32 special_len);
|
||||
void VIP_SetRegister(const unsigned int id, const uint32 value);
|
||||
|
||||
|
||||
}
|
||||
#endif
|
@ -1,474 +0,0 @@
|
||||
#include "vb.h"
|
||||
|
||||
#define BGM_AFFINE 0x2
|
||||
#define BGM_OBJ 0x3
|
||||
|
||||
|
||||
static void DrawBG(uint8 *target, uint16 RealY, bool lr, uint8 bgmap_base_raw, bool overplane, uint16 overplane_char, uint32 SourceX, uint32 SourceY, uint32 scx, uint32 scy, uint16 DestX, uint16 DestY, uint16 DestWidth, uint16 DestHeight)
|
||||
{
|
||||
const uint16 *CHR16 = CHR_RAM;
|
||||
const uint16 *BGMap = DRAM;
|
||||
uint32 BGMap_Base = bgmap_base_raw << 12;
|
||||
int32 start_x, final_x;
|
||||
const uint32 bgsc_overplane = DRAM[overplane_char];
|
||||
const uint32 BGMap_XCount = 1 << scx;
|
||||
const uint32 BGMap_YCount = 1 << scy;
|
||||
const uint32 SourceX_Size = 512 * BGMap_XCount;
|
||||
const uint32 SourceY_Size = 512 * BGMap_YCount;
|
||||
const uint32 SourceX_Mask = overplane ? 0x1FFF : (SourceX_Size - 1);
|
||||
const uint32 SourceY_Mask = overplane ? 0x1FFF : (SourceY_Size - 1);
|
||||
|
||||
if((uint16)(RealY - DestY) > DestHeight)
|
||||
return;
|
||||
|
||||
//printf("%d, %d, %d, %d\n", overplane, srcXSize, srcYSize, bgmap_base_raw);
|
||||
|
||||
DestX = sign_10_to_s16(DestX);
|
||||
|
||||
if(DestX & 0x8000)
|
||||
SourceX -= DestX;
|
||||
|
||||
start_x = (int16)DestX;
|
||||
final_x = (int16)DestX + DestWidth;
|
||||
|
||||
if(start_x < 0)
|
||||
start_x = 0;
|
||||
|
||||
if(final_x > 383)
|
||||
final_x = 383;
|
||||
|
||||
if(start_x > final_x)
|
||||
return;
|
||||
|
||||
// Optimization:
|
||||
SourceY &= SourceY_Mask;
|
||||
BGMap_Base |= (((SourceY >> 3) & 0x3F) * 0x40) | (((SourceY << 3) & ~0xFFF) << scx);
|
||||
|
||||
for(int x = start_x; x <= final_x; x++)
|
||||
{
|
||||
uint32 bgsc;
|
||||
uint32 char_no;
|
||||
uint32 palette_selector;
|
||||
uint32 hflip_xor;
|
||||
uint32 vflip_xor;
|
||||
|
||||
SourceX &= SourceX_Mask;
|
||||
|
||||
bgsc = bgsc_overplane;
|
||||
|
||||
if(SourceX < SourceX_Size && SourceY < SourceY_Size)
|
||||
bgsc = BGMap[(BGMap_Base | ((SourceX << 3) & ~0xFFF) | ((SourceX >> 3) & 0x3F)) & 0xFFFF];
|
||||
|
||||
char_no = bgsc & 0x7FF;
|
||||
palette_selector = bgsc >> 14;
|
||||
hflip_xor = (bgsc & 0x2000) ? 7 : 0; //(((int32)bgsc << 18) >> 31) & 0x7;
|
||||
vflip_xor = (bgsc & 0x1000) ? 7 : 0; //(((int32)bgsc << 19) >> 31) & 0x7;
|
||||
|
||||
unsigned int char_sub_y = vflip_xor ^ (SourceY & 0x7);
|
||||
|
||||
if(!(SourceX & 7) && (x + 7) <= final_x)
|
||||
{
|
||||
uint32 pixels = CHR16[char_no * 8 + char_sub_y];
|
||||
|
||||
#if 0
|
||||
unsigned int char_sub_x;
|
||||
uint8 *sub_target = target + x + 8;
|
||||
|
||||
for(int sub_x = -8; sub_x < 0; sub_x++)
|
||||
{
|
||||
if(pixels & 3) sub_target[sub_x] = GPLT_Cache[palette_selector][pixels & 3];
|
||||
pixels >>= 2;
|
||||
}
|
||||
#endif
|
||||
|
||||
if(bgsc & 0x2000)
|
||||
{
|
||||
if((pixels >> 14) & 3) target[0 + x] = GPLT_Cache[palette_selector][(pixels >> 14) & 3];
|
||||
if((pixels >> 12) & 3) target[1 + x] = GPLT_Cache[palette_selector][(pixels >> 12) & 3];
|
||||
if((pixels >> 10) & 3) target[2 + x] = GPLT_Cache[palette_selector][(pixels >> 10) & 3];
|
||||
if((pixels >> 8) & 3) target[3 + x] = GPLT_Cache[palette_selector][(pixels >> 8) & 3];
|
||||
if((pixels >> 6) & 3) target[4 + x] = GPLT_Cache[palette_selector][(pixels >> 6) & 3];
|
||||
if((pixels >> 4) & 3) target[5 + x] = GPLT_Cache[palette_selector][(pixels >> 4) & 3];
|
||||
if((pixels >> 2) & 3) target[6 + x] = GPLT_Cache[palette_selector][(pixels >> 2) & 3];
|
||||
if((pixels >> 0) & 3) target[7 + x] = GPLT_Cache[palette_selector][(pixels >> 0) & 3];
|
||||
}
|
||||
else
|
||||
{
|
||||
if((pixels >> 0) & 3) target[0 + x] = GPLT_Cache[palette_selector][(pixels >> 0) & 3];
|
||||
if((pixels >> 2) & 3) target[1 + x] = GPLT_Cache[palette_selector][(pixels >> 2) & 3];
|
||||
if((pixels >> 4) & 3) target[2 + x] = GPLT_Cache[palette_selector][(pixels >> 4) & 3];
|
||||
if((pixels >> 6) & 3) target[3 + x] = GPLT_Cache[palette_selector][(pixels >> 6) & 3];
|
||||
if((pixels >> 8) & 3) target[4 + x] = GPLT_Cache[palette_selector][(pixels >> 8) & 3];
|
||||
if((pixels >> 10) & 3) target[5 + x] = GPLT_Cache[palette_selector][(pixels >> 10) & 3];
|
||||
if((pixels >> 12) & 3) target[6 + x] = GPLT_Cache[palette_selector][(pixels >> 12) & 3];
|
||||
if((pixels >> 14) & 3) target[7 + x] = GPLT_Cache[palette_selector][(pixels >> 14) & 3];
|
||||
}
|
||||
|
||||
x += 7;
|
||||
SourceX += 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
unsigned int char_sub_x;
|
||||
|
||||
char_sub_x = hflip_xor ^ (SourceX & 0x7);
|
||||
|
||||
uint8 pixel = (CHR16[char_no * 8 + char_sub_y] >> (char_sub_x * 2)) & 0x3;
|
||||
|
||||
if(pixel)
|
||||
target[x] = GPLT_Cache[palette_selector][pixel]; //target[x] = (GPLT[palette_selector] >> (pixel * 2)) & 0x3;
|
||||
SourceX++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void DrawAffine(uint8 *target, uint16 RealY, bool lr, uint32 ParamBase, uint32 BGMap_Base, bool OverplaneMode, uint16 OverplaneChar, uint32 scx, uint32 scy,
|
||||
uint16 DestX, uint16 DestY, uint16 DestWidth, uint16 DestHeight)
|
||||
{
|
||||
const uint16 *CHR16 = CHR_RAM;
|
||||
const uint16 *BGMap = DRAM;
|
||||
|
||||
const uint32 BGMap_XCount = 1 << scx;
|
||||
const uint32 BGMap_YCount = 1 << scy;
|
||||
const uint32 SourceX_Size = 512 * BGMap_XCount;
|
||||
const uint32 SourceY_Size = 512 * BGMap_YCount;
|
||||
|
||||
const uint16 *param_ptr = &DRAM[(ParamBase + 8 * (RealY - DestY)) & 0xFFFF];
|
||||
int16 mx = param_ptr[0], mp = (ParallaxDisabled ? 0 : param_ptr[1]), my = param_ptr[2], dx = param_ptr[3], dy = param_ptr[4];
|
||||
|
||||
uint32 SourceX, SourceY;
|
||||
uint32 SourceX_Mask, SourceY_Mask;
|
||||
|
||||
int32 start_x, final_x;
|
||||
const uint32 bgsc_overplane = DRAM[OverplaneChar];
|
||||
|
||||
|
||||
DestX = sign_10_to_s16(DestX);
|
||||
|
||||
if((uint16)(RealY - DestY) > DestHeight)
|
||||
return;
|
||||
|
||||
SourceX = (int32)mx << 6;
|
||||
SourceY = (int32)my << 6;
|
||||
|
||||
if(DestX & 0x8000)
|
||||
{
|
||||
SourceX += dx * (65536 - DestX);
|
||||
SourceY += dy * (65536 - DestX);
|
||||
}
|
||||
|
||||
if(mp >= 0 && lr)
|
||||
{
|
||||
SourceX += dx * mp;
|
||||
SourceY += dy * mp;
|
||||
}
|
||||
else if(mp < 0 && !lr)
|
||||
{
|
||||
SourceX += dx * -mp;
|
||||
SourceY += dy * -mp;
|
||||
}
|
||||
|
||||
if(OverplaneMode)
|
||||
{
|
||||
SourceX_Mask = 0x3FFFFFF; //(((uint32)SourceX_Size << 9) * 2) - 1;
|
||||
SourceY_Mask = 0x3FFFFFF; //(((uint32)SourceY_Size << 9) * 2) - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
SourceX_Mask = ((uint32)SourceX_Size << 9) - 1;
|
||||
SourceY_Mask = ((uint32)SourceY_Size << 9) - 1;
|
||||
}
|
||||
|
||||
start_x = (int16)DestX;
|
||||
final_x = (int16)DestX + DestWidth;
|
||||
|
||||
if(start_x < 0)
|
||||
start_x = 0;
|
||||
|
||||
if(final_x > 383)
|
||||
final_x = 383;
|
||||
|
||||
if(dy == 0) // Optimization for no rotation.
|
||||
{
|
||||
SourceY &= SourceY_Mask;
|
||||
|
||||
if(SourceY >= (SourceY_Size << 9))
|
||||
return;
|
||||
|
||||
BGMap_Base |= (((SourceY >> 6) & ~0xFFF) << scx) | (((SourceY >> 12) & 0x3F) * 0x40);
|
||||
for(int x = start_x; x <= final_x; x++)
|
||||
{
|
||||
uint32 bgsc;
|
||||
uint32 hflip_xor;
|
||||
uint32 vflip_xor;
|
||||
uint32 pixel = 0;
|
||||
|
||||
SourceX &= SourceX_Mask;
|
||||
|
||||
bgsc = bgsc_overplane;
|
||||
|
||||
if(SourceX < (SourceX_Size << 9))
|
||||
bgsc = BGMap[(BGMap_Base | ((SourceX >> 6) & ~0xFFF) | ((SourceX >> 12) & 0x3F)) & 0xFFFF];
|
||||
|
||||
//hflip_xor = bgsc & 0x2000 ? 0xE : 0;
|
||||
//vflip_xor = bgsc & 0x1000 ? 0x7 : 0;
|
||||
hflip_xor = ((int32)(bgsc << 18) >> 30) & 0xE;
|
||||
vflip_xor = ((int32)(bgsc << 19) >> 31) & 0x7;
|
||||
|
||||
unsigned int char_sub_y = vflip_xor ^ ((SourceY >> 9) & 0x7);
|
||||
unsigned int char_sub_x = hflip_xor ^ ((SourceX >> 8) & 0xE);
|
||||
|
||||
pixel = (CHR16[((bgsc & 0x7FF) * 8) | char_sub_y] >> char_sub_x) & 0x3;
|
||||
|
||||
if(pixel)
|
||||
target[x] = GPLT_Cache[bgsc >> 14][pixel];
|
||||
|
||||
SourceX += dx;
|
||||
}
|
||||
}
|
||||
else
|
||||
for(int x = start_x; x <= final_x; x++)
|
||||
{
|
||||
uint32 bgsc;
|
||||
uint32 char_no;
|
||||
uint32 palette_selector;
|
||||
uint32 hflip_xor;
|
||||
uint32 vflip_xor;
|
||||
uint8 pixel = 0;
|
||||
|
||||
SourceX &= SourceX_Mask;
|
||||
SourceY &= SourceY_Mask;
|
||||
|
||||
bgsc = bgsc_overplane;
|
||||
|
||||
if(SourceX < (SourceX_Size << 9) && SourceY < (SourceY_Size << 9))
|
||||
{
|
||||
uint32 m_index = ((SourceX >> 6) & ~0xFFF) + (((SourceY >> 6) & ~0xFFF) << scx);
|
||||
uint32 sub_index = ((SourceX >> 12) & 0x3F) + (((SourceY >> 12) & 0x3F) * 0x40);
|
||||
|
||||
bgsc = BGMap[(BGMap_Base | m_index | sub_index) & 0xFFFF];
|
||||
|
||||
//bgsc = BGMap[(BGMapBase + (SourceX >> 12) + (SourceY >> 12) * (SourceX_Size >> 3)) & 0xFFFF ];
|
||||
}
|
||||
char_no = bgsc & 0x7FF;
|
||||
palette_selector = bgsc >> 14;
|
||||
hflip_xor = bgsc & 0x2000 ? 7 : 0; //(((int32)bgsc << 18) >> 31) & 0x7;
|
||||
vflip_xor = bgsc & 0x1000 ? 7 : 0; //(((int32)bgsc << 19) >> 31) & 0x7;
|
||||
|
||||
unsigned int char_sub_y = vflip_xor ^ ((SourceY >> 9) & 0x7);
|
||||
unsigned int char_sub_x = hflip_xor ^ ((SourceX >> 9) & 0x7);
|
||||
|
||||
pixel = (CHR16[char_no * 8 + char_sub_y] >> (char_sub_x * 2)) & 0x3;
|
||||
|
||||
if(pixel)
|
||||
target[x] = GPLT_Cache[palette_selector][pixel];
|
||||
|
||||
SourceX += dx;
|
||||
SourceY += dy;
|
||||
}
|
||||
}
|
||||
|
||||
static int obj_search_which;
|
||||
|
||||
static void DrawOBJ(uint8 *fb[2], uint16 Y, bool lron[2])
|
||||
{
|
||||
const uint16 *CHR16 = CHR_RAM;
|
||||
|
||||
int32 start_oam;
|
||||
int32 end_oam;
|
||||
|
||||
start_oam = SPT[obj_search_which];
|
||||
|
||||
end_oam = 1023;
|
||||
if(obj_search_which)
|
||||
end_oam = SPT[obj_search_which - 1];
|
||||
|
||||
int32 oam = start_oam;
|
||||
do
|
||||
{
|
||||
const uint16 *oam_ptr = &DRAM[(0x1E000 + (oam * 8)) >> 1];
|
||||
const uint32 jy = oam_ptr[2];
|
||||
const uint32 tile_y = (Y - jy) & 0xFF; // I think this mask is right. See: http://www.planetvb.com/modules/newbb/viewtopic.php?topic_id=3797&forum=2
|
||||
|
||||
if(tile_y >= 8)
|
||||
continue;
|
||||
|
||||
uint32 jx = oam_ptr[0];
|
||||
uint32 jp = ParallaxDisabled ? 0 : (oam_ptr[1] & 0x3FFF);
|
||||
uint32 palette_selector = oam_ptr[3] >> 14;
|
||||
uint32 vflip_xor = (oam_ptr[3] & 0x1000) ? 7 : 0;
|
||||
uint32 char_sub_y = vflip_xor ^ tile_y;
|
||||
bool jlron[2] = { (bool)(oam_ptr[1] & 0x8000), (bool)(oam_ptr[1] & 0x4000) };
|
||||
uint32 char_no = oam_ptr[3] & 0x7FF;
|
||||
const uint32 pixels_save = CHR16[char_no * 8 + char_sub_y];
|
||||
|
||||
for(int lr = 0; lr < 2; lr++)
|
||||
{
|
||||
if(!(jlron[lr] & lron[lr]))
|
||||
continue;
|
||||
|
||||
uint32 pixels = pixels_save;
|
||||
int32 x = sign_x_to_s32(10, (jx + (lr ? jp : -jp))); // It may actually be 9, TODO?
|
||||
|
||||
if(x >= -7 && x < 384) // Make sure we always keep the pitch of our 384x8 buffer large enough(with padding before and after the visible space)
|
||||
{
|
||||
uint8 *target = &fb[lr][x];
|
||||
|
||||
if(oam_ptr[3] & 0x2000)
|
||||
{
|
||||
target += 7;
|
||||
|
||||
for(int meow = 8; meow; meow--)
|
||||
{
|
||||
if(pixels & 3)
|
||||
*target = JPLT_Cache[palette_selector][pixels & 3];
|
||||
target--;
|
||||
pixels >>= 2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(int meow = 8; meow; meow--)
|
||||
{
|
||||
if(pixels & 3)
|
||||
*target = JPLT_Cache[palette_selector][pixels & 3];
|
||||
target++;
|
||||
pixels >>= 2;
|
||||
}
|
||||
}
|
||||
#if 0
|
||||
if(oam_ptr[3] & 0x2000)
|
||||
{
|
||||
if((pixels >> 14) & 3) fb[lr][0 + x] = JPLT_Cache[palette_selector][(pixels >> 14) & 3];
|
||||
if((pixels >> 12) & 3) fb[lr][1 + x] = JPLT_Cache[palette_selector][(pixels >> 12) & 3];
|
||||
if((pixels >> 10) & 3) fb[lr][2 + x] = JPLT_Cache[palette_selector][(pixels >> 10) & 3];
|
||||
if((pixels >> 8) & 3) fb[lr][3 + x] = JPLT_Cache[palette_selector][(pixels >> 8) & 3];
|
||||
if((pixels >> 6) & 3) fb[lr][4 + x] = JPLT_Cache[palette_selector][(pixels >> 6) & 3];
|
||||
if((pixels >> 4) & 3) fb[lr][5 + x] = JPLT_Cache[palette_selector][(pixels >> 4) & 3];
|
||||
if((pixels >> 2) & 3) fb[lr][6 + x] = JPLT_Cache[palette_selector][(pixels >> 2) & 3];
|
||||
if((pixels >> 0) & 3) fb[lr][7 + x] = JPLT_Cache[palette_selector][(pixels >> 0) & 3];
|
||||
}
|
||||
else
|
||||
{
|
||||
if((pixels >> 0) & 3) fb[lr][0 + x] = JPLT_Cache[palette_selector][(pixels >> 0) & 3];
|
||||
if((pixels >> 2) & 3) fb[lr][1 + x] = JPLT_Cache[palette_selector][(pixels >> 2) & 3];
|
||||
if((pixels >> 4) & 3) fb[lr][2 + x] = JPLT_Cache[palette_selector][(pixels >> 4) & 3];
|
||||
if((pixels >> 6) & 3) fb[lr][3 + x] = JPLT_Cache[palette_selector][(pixels >> 6) & 3];
|
||||
if((pixels >> 8) & 3) fb[lr][4 + x] = JPLT_Cache[palette_selector][(pixels >> 8) & 3];
|
||||
if((pixels >> 10) & 3) fb[lr][5 + x] = JPLT_Cache[palette_selector][(pixels >> 10) & 3];
|
||||
if((pixels >> 12) & 3) fb[lr][6 + x] = JPLT_Cache[palette_selector][(pixels >> 12) & 3];
|
||||
if((pixels >> 14) & 3) fb[lr][7 + x] = JPLT_Cache[palette_selector][(pixels >> 14) & 3];
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
} while( (oam = (oam - 1) & 1023) != end_oam);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void VIP_DrawBlock(uint8 block_no, uint8 *fb_l, uint8 *fb_r)
|
||||
{
|
||||
for(int y = 0; y < 8; y++)
|
||||
{
|
||||
memset(fb_l + y * 512, BKCOL, 384);
|
||||
memset(fb_r + y * 512, BKCOL, 384);
|
||||
}
|
||||
|
||||
obj_search_which = 3;
|
||||
|
||||
for(int world = 31; world >= 0; world--)
|
||||
{
|
||||
const uint16 *world_ptr = &DRAM[(0x1D800 + world * 0x20) >> 1];
|
||||
|
||||
uint32 bgmap_base = world_ptr[0] & 0xF;
|
||||
bool end = world_ptr[0] & 0x40;
|
||||
bool over = world_ptr[0] & 0x80;
|
||||
uint32 scy = (world_ptr[0] >> 8) & 3;
|
||||
uint32 scx = (world_ptr[0] >> 10) & 3;
|
||||
uint32 bgm = (world_ptr[0] >> 12) & 3;
|
||||
bool lron[2] = { (bool)(world_ptr[0] & 0x8000), (bool)(world_ptr[0] & 0x4000) };
|
||||
|
||||
uint16 gx = sign_11_to_s16(world_ptr[1]);
|
||||
uint16 gp = ParallaxDisabled ? 0 : sign_9_to_s16(world_ptr[2]);
|
||||
uint16 gy = sign_11_to_s16(world_ptr[3]);
|
||||
uint16 mx = world_ptr[4];
|
||||
uint16 mp = ParallaxDisabled ? 0 : sign_9_to_s16(world_ptr[5]);
|
||||
uint16 my = world_ptr[6];
|
||||
uint16 window_width = sign_11_to_s16(world_ptr[7]);
|
||||
uint16 window_height = (world_ptr[8] & 0x3FF);
|
||||
uint32 param_base = (world_ptr[9] & 0xFFF0);
|
||||
uint16 overplane_char = world_ptr[10];
|
||||
|
||||
if(end)
|
||||
break;
|
||||
|
||||
if(((512 << scx) + (512 << scy)) > 4096)
|
||||
{
|
||||
printf("BG Size too large for world: %d(scx=%d, scy=%d)\n", world, scx, scy);
|
||||
}
|
||||
|
||||
// if(world != 2)
|
||||
// continue;
|
||||
|
||||
// if(block_no == 8)
|
||||
// printf("World: %d; gx: %d, gp: %d, gy: %d, mx: %d, mp: %d, my: %d, window_width: %d, window_height: %d\n", world, gx, gp, gy, mx, mp, my, window_width, window_height);
|
||||
|
||||
for(int y = 0; y < 8; y++)
|
||||
{
|
||||
uint8 *fb[2] = { &fb_l[y * 512], &fb_r[y * 512] };
|
||||
|
||||
if(bgm == BGM_OBJ)
|
||||
{
|
||||
if(!lron[0] || !lron[1])
|
||||
printf("Bad OBJ World? %d(%d/%d) %d~%d\n", world, lron[0], lron[1], SPT[obj_search_which], obj_search_which ? (SPT[obj_search_which - 1] + 1) : 0);
|
||||
|
||||
DrawOBJ(fb, (block_no * 8) + y, lron);
|
||||
}
|
||||
else if(bgm == BGM_AFFINE)
|
||||
{
|
||||
//if(((block_no * 8) + y) == 128)
|
||||
// printf("Draw affine: %d %d\n", gx, gp);
|
||||
for(int lr = 0; lr < 2; lr++)
|
||||
{
|
||||
if(lron[lr])
|
||||
{
|
||||
DrawAffine(fb[lr], (block_no * 8) + y, lr, param_base, bgmap_base * 4096, over, overplane_char, scx, scy,
|
||||
gx + (lr ? gp : -gp), gy, window_width, window_height);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
for(int lr = 0; lr < 2; lr++)
|
||||
{
|
||||
uint16 srcX, srcY;
|
||||
uint16 RealY = (block_no * 8) + y;
|
||||
uint16 DestX;
|
||||
uint16 DestY;
|
||||
|
||||
srcX = mx + (lr ? mp : -mp);
|
||||
srcY = my + (RealY - gy);
|
||||
|
||||
DestX = gx + (lr ? gp : -gp);
|
||||
DestY = gy;
|
||||
|
||||
if(lron[lr])
|
||||
{
|
||||
if(bgm == 1) // HBias
|
||||
srcX += (int16)DRAM[(param_base + (((RealY - DestY) * 2) | lr)) & 0xFFFF];
|
||||
|
||||
DrawBG(fb[lr], RealY, lr, bgmap_base, over, overplane_char, (int32)(int16)srcX, (int32)(int16)srcY, scx, scy, DestX, DestY, window_width, window_height);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(bgm == BGM_OBJ)
|
||||
if(obj_search_which)
|
||||
obj_search_which--;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,524 +0,0 @@
|
||||
/* Mednafen - Multi-system Emulator
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "vb.h"
|
||||
#include "vsu.h"
|
||||
|
||||
static const unsigned int Tap_LUT[8] = { 15 - 1, 11 - 1, 14 - 1, 5 - 1, 9 - 1, 7 - 1, 10 - 1, 12 - 1 };
|
||||
|
||||
VSU::VSU(Blip_Buffer *bb_l, Blip_Buffer *bb_r)
|
||||
{
|
||||
sbuf[0] = bb_l;
|
||||
sbuf[1] = bb_r;
|
||||
|
||||
Synth.volume(1.0 / 6 / 2);
|
||||
|
||||
for(int ch = 0; ch < 6; ch++)
|
||||
{
|
||||
for(int lr = 0; lr < 2; lr++)
|
||||
last_output[ch][lr] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
VSU::~VSU()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void VSU::Power(void)
|
||||
{
|
||||
SweepControl = 0;
|
||||
SweepModCounter = 0;
|
||||
SweepModClockDivider = 1;
|
||||
|
||||
for(int ch = 0; ch < 6; ch++)
|
||||
{
|
||||
IntlControl[ch] = 0;
|
||||
LeftLevel[ch] = 0;
|
||||
RightLevel[ch] = 0;
|
||||
Frequency[ch] = 0;
|
||||
EnvControl[ch] = 0;
|
||||
RAMAddress[ch] = 0;
|
||||
|
||||
EffFreq[ch] = 0;
|
||||
Envelope[ch] = 0;
|
||||
WavePos[ch] = 0;
|
||||
FreqCounter[ch] = 0;
|
||||
IntervalCounter[ch] = 0;
|
||||
EnvelopeCounter[ch] = 0;
|
||||
|
||||
EffectsClockDivider[ch] = 4800;
|
||||
IntervalClockDivider[ch] = 4;
|
||||
EnvelopeClockDivider[ch] = 4;
|
||||
|
||||
LatcherClockDivider[ch] = 120;
|
||||
}
|
||||
|
||||
|
||||
NoiseLatcherClockDivider = 120;
|
||||
NoiseLatcher = 0;
|
||||
|
||||
memset(WaveData, 0, sizeof(WaveData));
|
||||
memset(ModData, 0, sizeof(ModData));
|
||||
|
||||
last_ts = 0;
|
||||
}
|
||||
|
||||
void VSU::Write(int32 timestamp, uint32 A, uint8 V)
|
||||
{
|
||||
A &= 0x7FF;
|
||||
|
||||
Update(timestamp);
|
||||
|
||||
//printf("VSU Write: %d, %08x %02x\n", timestamp, A, V);
|
||||
|
||||
if(A < 0x280)
|
||||
WaveData[A >> 7][(A >> 2) & 0x1F] = V & 0x3F;
|
||||
else if(A < 0x400)
|
||||
{
|
||||
//if(A >= 0x300)
|
||||
// printf("Modulation mirror write? %08x %02x\n", A, V);
|
||||
ModData[(A >> 2) & 0x1F] = V;
|
||||
}
|
||||
else if(A < 0x600)
|
||||
{
|
||||
int ch = (A >> 6) & 0xF;
|
||||
|
||||
//if(ch < 6)
|
||||
//printf("Ch: %d, Reg: %d, Value: %02x\n", ch, (A >> 2) & 0xF, V);
|
||||
|
||||
if(ch > 5)
|
||||
{
|
||||
if(A == 0x580 && (V & 1))
|
||||
{
|
||||
//puts("STOP, HAMMER TIME");
|
||||
for(int i = 0; i < 6; i++)
|
||||
IntlControl[i] &= ~0x80;
|
||||
}
|
||||
}
|
||||
else
|
||||
switch((A >> 2) & 0xF)
|
||||
{
|
||||
case 0x0: IntlControl[ch] = V & ~0x40;
|
||||
|
||||
if(V & 0x80)
|
||||
{
|
||||
EffFreq[ch] = Frequency[ch];
|
||||
if(ch == 5)
|
||||
FreqCounter[ch] = 10 * (2048 - EffFreq[ch]);
|
||||
else
|
||||
FreqCounter[ch] = 2048 - EffFreq[ch];
|
||||
IntervalCounter[ch] = (V & 0x1F) + 1;
|
||||
EnvelopeCounter[ch] = (EnvControl[ch] & 0x7) + 1;
|
||||
|
||||
if(ch == 4)
|
||||
{
|
||||
SweepModCounter = (SweepControl >> 4) & 7;
|
||||
SweepModClockDivider = (SweepControl & 0x80) ? 8 : 1;
|
||||
ModWavePos = 0;
|
||||
}
|
||||
|
||||
WavePos[ch] = 0;
|
||||
|
||||
if(ch == 5) // Not sure if this is correct.
|
||||
lfsr = 1;
|
||||
|
||||
//if(!(IntlControl[ch] & 0x80))
|
||||
// Envelope[ch] = (EnvControl[ch] >> 4) & 0xF;
|
||||
|
||||
EffectsClockDivider[ch] = 4800;
|
||||
IntervalClockDivider[ch] = 4;
|
||||
EnvelopeClockDivider[ch] = 4;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x1: LeftLevel[ch] = (V >> 4) & 0xF;
|
||||
RightLevel[ch] = (V >> 0) & 0xF;
|
||||
break;
|
||||
|
||||
case 0x2: Frequency[ch] &= 0xFF00;
|
||||
Frequency[ch] |= V << 0;
|
||||
EffFreq[ch] &= 0xFF00;
|
||||
EffFreq[ch] |= V << 0;
|
||||
break;
|
||||
|
||||
case 0x3: Frequency[ch] &= 0x00FF;
|
||||
Frequency[ch] |= (V & 0x7) << 8;
|
||||
EffFreq[ch] &= 0x00FF;
|
||||
EffFreq[ch] |= (V & 0x7) << 8;
|
||||
break;
|
||||
|
||||
case 0x4: EnvControl[ch] &= 0xFF00;
|
||||
EnvControl[ch] |= V << 0;
|
||||
|
||||
Envelope[ch] = (V >> 4) & 0xF;
|
||||
break;
|
||||
|
||||
case 0x5: EnvControl[ch] &= 0x00FF;
|
||||
if(ch == 4)
|
||||
EnvControl[ch] |= (V & 0x73) << 8;
|
||||
else if(ch == 5)
|
||||
{
|
||||
EnvControl[ch] |= (V & 0x73) << 8;
|
||||
lfsr = 1;
|
||||
}
|
||||
else
|
||||
EnvControl[ch] |= (V & 0x03) << 8;
|
||||
break;
|
||||
|
||||
case 0x6: RAMAddress[ch] = V & 0xF;
|
||||
break;
|
||||
|
||||
case 0x7: if(ch == 4)
|
||||
{
|
||||
SweepControl = V;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
INLINE void VSU::CalcCurrentOutput(int ch, int &left, int &right)
|
||||
{
|
||||
if(!(IntlControl[ch] & 0x80))
|
||||
{
|
||||
left = right = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
int WD;
|
||||
int l_ol, r_ol;
|
||||
|
||||
if(ch == 5)
|
||||
WD = NoiseLatcher; //(NoiseLatcher << 6) - NoiseLatcher;
|
||||
else
|
||||
{
|
||||
if(RAMAddress[ch] > 4)
|
||||
WD = 0;
|
||||
else
|
||||
WD = WaveData[RAMAddress[ch]][WavePos[ch]]; // - 0x20;
|
||||
}
|
||||
l_ol = Envelope[ch] * LeftLevel[ch];
|
||||
if(l_ol)
|
||||
{
|
||||
l_ol >>= 3;
|
||||
l_ol += 1;
|
||||
}
|
||||
|
||||
r_ol = Envelope[ch] * RightLevel[ch];
|
||||
if(r_ol)
|
||||
{
|
||||
r_ol >>= 3;
|
||||
r_ol += 1;
|
||||
}
|
||||
|
||||
left = WD * l_ol;
|
||||
right = WD * r_ol;
|
||||
}
|
||||
|
||||
void VSU::Update(int32 timestamp)
|
||||
{
|
||||
//puts("VSU Start");
|
||||
int left, right;
|
||||
|
||||
for(int ch = 0; ch < 6; ch++)
|
||||
{
|
||||
int32 clocks = timestamp - last_ts;
|
||||
int32 running_timestamp = last_ts;
|
||||
|
||||
// Output sound here
|
||||
CalcCurrentOutput(ch, left, right);
|
||||
Synth.offset_inline(running_timestamp, left - last_output[ch][0], sbuf[0]);
|
||||
Synth.offset_inline(running_timestamp, right - last_output[ch][1], sbuf[1]);
|
||||
last_output[ch][0] = left;
|
||||
last_output[ch][1] = right;
|
||||
|
||||
if(!(IntlControl[ch] & 0x80))
|
||||
continue;
|
||||
|
||||
while(clocks > 0)
|
||||
{
|
||||
int32 chunk_clocks = clocks;
|
||||
|
||||
if(chunk_clocks > EffectsClockDivider[ch])
|
||||
chunk_clocks = EffectsClockDivider[ch];
|
||||
|
||||
if(ch == 5)
|
||||
{
|
||||
if(chunk_clocks > NoiseLatcherClockDivider)
|
||||
chunk_clocks = NoiseLatcherClockDivider;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(EffFreq[ch] >= 2040)
|
||||
{
|
||||
if(chunk_clocks > LatcherClockDivider[ch])
|
||||
chunk_clocks = LatcherClockDivider[ch];
|
||||
}
|
||||
else
|
||||
{
|
||||
if(chunk_clocks > FreqCounter[ch])
|
||||
chunk_clocks = FreqCounter[ch];
|
||||
}
|
||||
}
|
||||
|
||||
if(ch == 5 && chunk_clocks > NoiseLatcherClockDivider)
|
||||
chunk_clocks = NoiseLatcherClockDivider;
|
||||
|
||||
FreqCounter[ch] -= chunk_clocks;
|
||||
while(FreqCounter[ch] <= 0)
|
||||
{
|
||||
if(ch == 5)
|
||||
{
|
||||
int feedback = ((lfsr >> 7) & 1) ^ ((lfsr >> Tap_LUT[(EnvControl[5] >> 12) & 0x7]) & 1) ^ 1;
|
||||
lfsr = ((lfsr << 1) & 0x7FFF) | feedback;
|
||||
|
||||
FreqCounter[ch] += 10 * (2048 - EffFreq[ch]);
|
||||
}
|
||||
else
|
||||
{
|
||||
FreqCounter[ch] += 2048 - EffFreq[ch];
|
||||
WavePos[ch] = (WavePos[ch] + 1) & 0x1F;
|
||||
}
|
||||
}
|
||||
|
||||
LatcherClockDivider[ch] -= chunk_clocks;
|
||||
while(LatcherClockDivider[ch] <= 0)
|
||||
LatcherClockDivider[ch] += 120;
|
||||
|
||||
if(ch == 5)
|
||||
{
|
||||
NoiseLatcherClockDivider -= chunk_clocks;
|
||||
if(!NoiseLatcherClockDivider)
|
||||
{
|
||||
NoiseLatcherClockDivider = 120;
|
||||
NoiseLatcher = ((lfsr & 1) << 6) - (lfsr & 1);
|
||||
}
|
||||
}
|
||||
|
||||
EffectsClockDivider[ch] -= chunk_clocks;
|
||||
while(EffectsClockDivider[ch] <= 0)
|
||||
{
|
||||
EffectsClockDivider[ch] += 4800;
|
||||
|
||||
IntervalClockDivider[ch]--;
|
||||
while(IntervalClockDivider[ch] <= 0)
|
||||
{
|
||||
IntervalClockDivider[ch] += 4;
|
||||
|
||||
if(IntlControl[ch] & 0x20)
|
||||
{
|
||||
IntervalCounter[ch]--;
|
||||
if(!IntervalCounter[ch])
|
||||
{
|
||||
IntlControl[ch] &= ~0x80;
|
||||
}
|
||||
}
|
||||
|
||||
EnvelopeClockDivider[ch]--;
|
||||
while(EnvelopeClockDivider[ch] <= 0)
|
||||
{
|
||||
EnvelopeClockDivider[ch] += 4;
|
||||
|
||||
if(EnvControl[ch] & 0x0100) // Enveloping enabled?
|
||||
{
|
||||
EnvelopeCounter[ch]--;
|
||||
if(!EnvelopeCounter[ch])
|
||||
{
|
||||
EnvelopeCounter[ch] = (EnvControl[ch] & 0x7) + 1;
|
||||
|
||||
if(EnvControl[ch] & 0x0008) // Grow
|
||||
{
|
||||
if(Envelope[ch] < 0xF || (EnvControl[ch] & 0x200))
|
||||
Envelope[ch] = (Envelope[ch] + 1) & 0xF;
|
||||
}
|
||||
else // Decay
|
||||
{
|
||||
if(Envelope[ch] > 0 || (EnvControl[ch] & 0x200))
|
||||
Envelope[ch] = (Envelope[ch] - 1) & 0xF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // end while(EnvelopeClockDivider[ch] <= 0)
|
||||
} // end while(IntervalClockDivider[ch] <= 0)
|
||||
|
||||
if(ch == 4)
|
||||
{
|
||||
SweepModClockDivider--;
|
||||
while(SweepModClockDivider <= 0)
|
||||
{
|
||||
SweepModClockDivider += (SweepControl & 0x80) ? 8 : 1;
|
||||
|
||||
if(((SweepControl >> 4) & 0x7) && (EnvControl[ch] & 0x4000))
|
||||
{
|
||||
if(SweepModCounter)
|
||||
SweepModCounter--;
|
||||
|
||||
if(!SweepModCounter)
|
||||
{
|
||||
SweepModCounter = (SweepControl >> 4) & 0x7;
|
||||
|
||||
if(EnvControl[ch] & 0x1000) // Modulation
|
||||
{
|
||||
if(ModWavePos < 32 || (EnvControl[ch] & 0x2000))
|
||||
{
|
||||
ModWavePos &= 0x1F;
|
||||
|
||||
EffFreq[ch] = (EffFreq[ch] + (int8)ModData[ModWavePos]);
|
||||
if(EffFreq[ch] < 0)
|
||||
{
|
||||
//puts("Underflow");
|
||||
EffFreq[ch] = 0;
|
||||
}
|
||||
else if(EffFreq[ch] > 0x7FF)
|
||||
{
|
||||
//puts("Overflow");
|
||||
EffFreq[ch] = 0x7FF;
|
||||
}
|
||||
ModWavePos++;
|
||||
}
|
||||
//puts("Mod");
|
||||
}
|
||||
else // Sweep
|
||||
{
|
||||
int32 delta = EffFreq[ch] >> (SweepControl & 0x7);
|
||||
int32 NewFreq = EffFreq[ch] + ((SweepControl & 0x8) ? delta : -delta);
|
||||
|
||||
//printf("Sweep(%d): Old: %d, New: %d\n", ch, EffFreq[ch], NewFreq);
|
||||
|
||||
if(NewFreq < 0)
|
||||
EffFreq[ch] = 0;
|
||||
else if(NewFreq > 0x7FF)
|
||||
{
|
||||
//EffFreq[ch] = 0x7FF;
|
||||
IntlControl[ch] &= ~0x80;
|
||||
}
|
||||
else
|
||||
EffFreq[ch] = NewFreq;
|
||||
}
|
||||
}
|
||||
}
|
||||
} // end while(SweepModClockDivider <= 0)
|
||||
} // end if(ch == 4)
|
||||
} // end while(EffectsClockDivider[ch] <= 0)
|
||||
clocks -= chunk_clocks;
|
||||
running_timestamp += chunk_clocks;
|
||||
|
||||
// Output sound here too.
|
||||
CalcCurrentOutput(ch, left, right);
|
||||
Synth.offset_inline(running_timestamp, left - last_output[ch][0], sbuf[0]);
|
||||
Synth.offset_inline(running_timestamp, right - last_output[ch][1], sbuf[1]);
|
||||
last_output[ch][0] = left;
|
||||
last_output[ch][1] = right;
|
||||
}
|
||||
}
|
||||
last_ts = timestamp;
|
||||
//puts("VSU End");
|
||||
}
|
||||
|
||||
void VSU::EndFrame(int32 timestamp)
|
||||
{
|
||||
Update(timestamp);
|
||||
last_ts = 0;
|
||||
}
|
||||
|
||||
int VSU::StateAction(StateMem *sm, int load, int data_only)
|
||||
{
|
||||
SFORMAT StateRegs[] =
|
||||
{
|
||||
SFARRAY(IntlControl, 6),
|
||||
SFARRAY(LeftLevel, 6),
|
||||
SFARRAY(RightLevel, 6),
|
||||
|
||||
SFARRAY16(Frequency, 6),
|
||||
SFARRAY16(EnvControl, 6),
|
||||
SFARRAY(RAMAddress, 6),
|
||||
SFVAR(SweepControl),
|
||||
|
||||
SFARRAY(&WaveData[0][0], 5 * 0x20),
|
||||
SFARRAY(ModData, 0x20),
|
||||
|
||||
SFARRAY32(EffFreq, 6),
|
||||
SFARRAY32(Envelope, 6),
|
||||
|
||||
SFARRAY32(WavePos, 6),
|
||||
|
||||
SFVAR(ModWavePos),
|
||||
|
||||
SFARRAY32(LatcherClockDivider, 6),
|
||||
SFARRAY32(FreqCounter, 6),
|
||||
SFARRAY32(IntervalCounter, 6),
|
||||
SFARRAY32(EnvelopeCounter, 6),
|
||||
|
||||
SFVAR(SweepModCounter),
|
||||
|
||||
SFARRAY32(EffectsClockDivider, 6),
|
||||
SFARRAY32(IntervalClockDivider, 6),
|
||||
SFARRAY32(EnvelopeClockDivider, 6),
|
||||
|
||||
SFVAR(SweepModClockDivider),
|
||||
|
||||
SFVAR(NoiseLatcherClockDivider),
|
||||
SFVAR(NoiseLatcher),
|
||||
SFVAR(lfsr),
|
||||
SFEND
|
||||
};
|
||||
|
||||
int ret = MDFNSS_StateAction(sm, load, data_only, StateRegs, "VSU");
|
||||
|
||||
|
||||
if(load)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
||||
|
||||
uint8 VSU::PeekWave(const unsigned int which, uint32 Address)
|
||||
{
|
||||
assert(which <= 4);
|
||||
|
||||
Address &= 0x1F;
|
||||
|
||||
return(WaveData[which][Address]);
|
||||
}
|
||||
|
||||
void VSU::PokeWave(const unsigned int which, uint32 Address, uint8 value)
|
||||
{
|
||||
assert(which <= 4);
|
||||
|
||||
Address &= 0x1F;
|
||||
|
||||
WaveData[which][Address] = value & 0x3F;
|
||||
}
|
||||
|
||||
uint8 VSU::PeekModWave(uint32 Address)
|
||||
{
|
||||
Address &= 0x1F;
|
||||
return(ModData[Address]);
|
||||
}
|
||||
|
||||
void VSU::PokeModWave(uint32 Address, uint8 value)
|
||||
{
|
||||
Address &= 0x1F;
|
||||
|
||||
ModData[Address] = value & 0xFF;
|
||||
}
|
@ -1,81 +0,0 @@
|
||||
#ifndef __VB_VSU_H
|
||||
#define __VB_VSU_H
|
||||
|
||||
#include <blip/Blip_Buffer.h>
|
||||
|
||||
class VSU
|
||||
{
|
||||
public:
|
||||
|
||||
VSU(Blip_Buffer *bb_l, Blip_Buffer *bb_r) MDFN_COLD;
|
||||
~VSU() MDFN_COLD;
|
||||
|
||||
void Power(void) MDFN_COLD;
|
||||
|
||||
void Write(int32 timestamp, uint32 A, uint8 V);
|
||||
|
||||
void EndFrame(int32 timestamp);
|
||||
|
||||
int StateAction(StateMem *sm, int load, int data_only);
|
||||
|
||||
uint8 PeekWave(const unsigned int which, uint32 Address);
|
||||
void PokeWave(const unsigned int which, uint32 Address, uint8 value);
|
||||
|
||||
uint8 PeekModWave(uint32 Address);
|
||||
void PokeModWave(uint32 Address, uint8 value);
|
||||
|
||||
private:
|
||||
|
||||
void CalcCurrentOutput(int ch, int &left, int &right);
|
||||
|
||||
void Update(int32 timestamp);
|
||||
|
||||
uint8 IntlControl[6];
|
||||
uint8 LeftLevel[6];
|
||||
uint8 RightLevel[6];
|
||||
uint16 Frequency[6];
|
||||
uint16 EnvControl[6]; // Channel 5/6 extra functionality tacked on too.
|
||||
|
||||
uint8 RAMAddress[6];
|
||||
|
||||
uint8 SweepControl;
|
||||
|
||||
uint8 WaveData[5][0x20];
|
||||
|
||||
uint8 ModData[0x20];
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
int32 EffFreq[6];
|
||||
int32 Envelope[6];
|
||||
|
||||
int32 WavePos[6];
|
||||
int32 ModWavePos;
|
||||
|
||||
int32 LatcherClockDivider[6];
|
||||
|
||||
int32 FreqCounter[6];
|
||||
int32 IntervalCounter[6];
|
||||
int32 EnvelopeCounter[6];
|
||||
int32 SweepModCounter;
|
||||
|
||||
int32 EffectsClockDivider[6];
|
||||
int32 IntervalClockDivider[6];
|
||||
int32 EnvelopeClockDivider[6];
|
||||
int32 SweepModClockDivider;
|
||||
|
||||
int32 NoiseLatcherClockDivider;
|
||||
uint32 NoiseLatcher;
|
||||
|
||||
uint32 lfsr;
|
||||
|
||||
int32 last_output[6][2];
|
||||
int32 last_ts;
|
||||
|
||||
Blip_Buffer *sbuf[2];
|
||||
Blip_Synth<blip_good_quality, 1024> Synth;
|
||||
Blip_Synth<blip_med_quality, 1024> NoiseSynth;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,47 +0,0 @@
|
||||
@SET VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE
|
||||
@SET VCINSTALLDIR=C:\Program Files\Microsoft Visual Studio .NET 2003
|
||||
@SET FrameworkDir=C:\WINDOWS\Microsoft.NET\Framework
|
||||
@SET FrameworkVersion=v1.1.4322
|
||||
@SET FrameworkSDKDir=C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1
|
||||
@rem Root of Visual Studio common files.
|
||||
|
||||
@if "%VSINSTALLDIR%"=="" goto Usage
|
||||
@if "%VCINSTALLDIR%"=="" set VCINSTALLDIR=%VSINSTALLDIR%
|
||||
|
||||
@rem
|
||||
@rem Root of Visual Studio ide installed files.
|
||||
@rem
|
||||
@set DevEnvDir=%VSINSTALLDIR%
|
||||
|
||||
@rem
|
||||
@rem Root of Visual C++ installed files.
|
||||
@rem
|
||||
@set MSVCDir=%VCINSTALLDIR%\VC7
|
||||
|
||||
@rem
|
||||
@echo Setting environment for using Microsoft Visual Studio .NET 2003 tools.
|
||||
@echo (If you have another version of Visual Studio or Visual C++ installed and wish
|
||||
@echo to use its tools from the command line, run vcvars32.bat for that version.)
|
||||
@rem
|
||||
|
||||
@REM %VCINSTALLDIR%\Common7\Tools dir is added only for real setup.
|
||||
|
||||
@set PATH=%DevEnvDir%;%MSVCDir%\BIN;%VCINSTALLDIR%\Common7\Tools;%VCINSTALLDIR%\Common7\Tools\bin\prerelease;%VCINSTALLDIR%\Common7\Tools\bin;%FrameworkSDKDir%\bin;%FrameworkDir%\%FrameworkVersion%;%PATH%;
|
||||
@set INCLUDE=%MSVCDir%\ATLMFC\INCLUDE;%MSVCDir%\INCLUDE;%FrameworkSDKDir%\include;%INCLUDE%;%XDK%\xbox\include
|
||||
@set LIB=%MSVCDir%\ATLMFC\LIB;%MSVCDir%\LIB;%MSVCDir%\PlatformSDK\lib;%XDK%\lib;%XDK%\xbox\lib;%LIB%
|
||||
|
||||
@goto end
|
||||
|
||||
:Usage
|
||||
|
||||
@echo. VSINSTALLDIR variable is not set.
|
||||
@echo.
|
||||
@echo SYNTAX: %0
|
||||
|
||||
@goto end
|
||||
|
||||
:end
|
||||
|
||||
devenv /clean Release_LTCG msvc-2003-xbox1.sln
|
||||
devenv /build Release_LTCG msvc-2003-xbox1.sln
|
||||
exit
|
@ -1,30 +0,0 @@
|
||||
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", "{8FD514E6-2E2A-4599-99B1-9A413535492F}"
|
||||
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
|
||||
{8FD514E6-2E2A-4599-99B1-9A413535492F}.Debug.ActiveCfg = Debug|Xbox
|
||||
{8FD514E6-2E2A-4599-99B1-9A413535492F}.Debug.Build.0 = Debug|Xbox
|
||||
{8FD514E6-2E2A-4599-99B1-9A413535492F}.Profile.ActiveCfg = Profile|Xbox
|
||||
{8FD514E6-2E2A-4599-99B1-9A413535492F}.Profile.Build.0 = Profile|Xbox
|
||||
{8FD514E6-2E2A-4599-99B1-9A413535492F}.Profile_FastCap.ActiveCfg = Profile_FastCap|Xbox
|
||||
{8FD514E6-2E2A-4599-99B1-9A413535492F}.Profile_FastCap.Build.0 = Profile_FastCap|Xbox
|
||||
{8FD514E6-2E2A-4599-99B1-9A413535492F}.Release.ActiveCfg = Release|Xbox
|
||||
{8FD514E6-2E2A-4599-99B1-9A413535492F}.Release.Build.0 = Release|Xbox
|
||||
{8FD514E6-2E2A-4599-99B1-9A413535492F}.Release_LTCG.ActiveCfg = Release_LTCG|Xbox
|
||||
{8FD514E6-2E2A-4599-99B1-9A413535492F}.Release_LTCG.Build.0 = Release_LTCG|Xbox
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
@ -1,427 +0,0 @@
|
||||
<?xml version="1.0" encoding="windows-1250"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="msvc-2003-xbox1"
|
||||
ProjectGUID="{8FD514E6-2E2A-4599-99B1-9A413535492F}"
|
||||
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=""$(SolutionDir)\msvc-2003-xbox1";"$(SolutionDir)\..\..\";"$(SolutionDir)\..\..\mednafen";"$(SolutionDir)\..\..\mednafen\include";"$(SolutionDir)\..\..\mednafen\cdrom";"$(SolutionDir)\..\..\mednafen\sound";"$(SolutionDir)\..\..\mednafen\pce_fast";"$(SolutionDir)\..\..\mednafen\hw_cpu";"$(SolutionDir)\..\..\mednafen\include\blip";"$(SolutionDir)\..\..\mednafen\hw_sound";"$(SolutionDir)\..\..\mednafen\hw_misc""
|
||||
PreprocessorDefinitions="_DEBUG;_XBOX;_LIB;WANT_VB_EMU;WANT_32BPP;SIZEOF_DOUBLE=8;MEDNAFEN_VERSION=0.9.28;MPC_FIXED_POINT;__LIBRETRO__;_LOW_ACCURACY;WANT_STEREO_SOUND;FRONTEND_SUPPORTS_RGB565;MEDNAFEN_VERSION_NUMERIC=926;WANT_CRC32;LSB_FIRST;BYTE_ORDER=LITTLE_ENDIAN;WANT_NEW_API"
|
||||
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)/msvc-2003-xbox1.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=""$(SolutionDir)\msvc-2003-xbox1";"$(SolutionDir)\..\..\";"$(SolutionDir)\..\..\mednafen";"$(SolutionDir)\..\..\mednafen\include";"$(SolutionDir)\..\..\mednafen\cdrom";"$(SolutionDir)\..\..\mednafen\sound";"$(SolutionDir)\..\..\mednafen\pce_fast";"$(SolutionDir)\..\..\mednafen\hw_cpu";"$(SolutionDir)\..\..\mednafen\include\blip";"$(SolutionDir)\..\..\mednafen\hw_sound";"$(SolutionDir)\..\..\mednafen\hw_misc""
|
||||
PreprocessorDefinitions="NDEBUG;_XBOX;PROFILE;_LIB;WANT_VB_EMU;WANT_32BPP;SIZEOF_DOUBLE=8;MEDNAFEN_VERSION=0.9.28;MPC_FIXED_POINT;__LIBRETRO__;_LOW_ACCURACY;WANT_STEREO_SOUND;FRONTEND_SUPPORTS_RGB565;MEDNAFEN_VERSION_NUMERIC=926;WANT_CRC32;LSB_FIRST;BYTE_ORDER=LITTLE_ENDIAN;WANT_NEW_API"
|
||||
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)/msvc-2003-xbox1.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=""$(SolutionDir)\msvc-2003-xbox1";"$(SolutionDir)\..\..\";"$(SolutionDir)\..\..\mednafen";"$(SolutionDir)\..\..\mednafen\include";"$(SolutionDir)\..\..\mednafen\cdrom";"$(SolutionDir)\..\..\mednafen\sound";"$(SolutionDir)\..\..\mednafen\pce_fast";"$(SolutionDir)\..\..\mednafen\hw_cpu";"$(SolutionDir)\..\..\mednafen\include\blip";"$(SolutionDir)\..\..\mednafen\hw_sound";"$(SolutionDir)\..\..\mednafen\hw_misc""
|
||||
PreprocessorDefinitions="NDEBUG;_XBOX;PROFILE;FASTCAP;_LIB;WANT_VB_EMU;WANT_32BPP;SIZEOF_DOUBLE=8;MEDNAFEN_VERSION=0.9.28;MPC_FIXED_POINT;__LIBRETRO__;_LOW_ACCURACY;WANT_STEREO_SOUND;FRONTEND_SUPPORTS_RGB565;MEDNAFEN_VERSION_NUMERIC=926;WANT_CRC32;LSB_FIRST;BYTE_ORDER=LITTLE_ENDIAN;WANT_NEW_API"
|
||||
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)/msvc-2003-xbox1.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=""$(SolutionDir)\msvc-2003-xbox1";"$(SolutionDir)\..\..\";"$(SolutionDir)\..\..\mednafen";"$(SolutionDir)\..\..\mednafen\include";"$(SolutionDir)\..\..\mednafen\cdrom";"$(SolutionDir)\..\..\mednafen\sound";"$(SolutionDir)\..\..\mednafen\pce_fast";"$(SolutionDir)\..\..\mednafen\hw_cpu";"$(SolutionDir)\..\..\mednafen\include\blip";"$(SolutionDir)\..\..\mednafen\hw_sound";"$(SolutionDir)\..\..\mednafen\hw_misc""
|
||||
PreprocessorDefinitions="NDEBUG;_XBOX;_LIB;WANT_VB_EMU;WANT_32BPP;SIZEOF_DOUBLE=8;MEDNAFEN_VERSION=0.9.28;MPC_FIXED_POINT;__LIBRETRO__;_LOW_ACCURACY;WANT_STEREO_SOUND;FRONTEND_SUPPORTS_RGB565;MEDNAFEN_VERSION_NUMERIC=926;WANT_CRC32;LSB_FIRST;BYTE_ORDER=LITTLE_ENDIAN;WANT_NEW_API"
|
||||
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)/msvc-2003-xbox1.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=""$(SolutionDir)\msvc-2003-xbox1";"$(SolutionDir)\..\..\";"$(SolutionDir)\..\..\mednafen";"$(SolutionDir)\..\..\mednafen\include";"$(SolutionDir)\..\..\mednafen\cdrom";"$(SolutionDir)\..\..\mednafen\sound";"$(SolutionDir)\..\..\mednafen\pce_fast";"$(SolutionDir)\..\..\mednafen\hw_cpu";"$(SolutionDir)\..\..\mednafen\include\blip";"$(SolutionDir)\..\..\mednafen\hw_sound";"$(SolutionDir)\..\..\mednafen\hw_misc""
|
||||
PreprocessorDefinitions="NDEBUG;_XBOX;LTCG;_LIB;WANT_VB_EMU;WANT_32BPP;SIZEOF_DOUBLE=8;MEDNAFEN_VERSION=0.9.28;MPC_FIXED_POINT;__LIBRETRO__;_LOW_ACCURACY;WANT_STEREO_SOUND;FRONTEND_SUPPORTS_RGB565;MEDNAFEN_VERSION_NUMERIC=926;WANT_CRC32;LSB_FIRST;BYTE_ORDER=LITTLE_ENDIAN;WANT_NEW_API"
|
||||
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)/msvc-2003-xbox1.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}">
|
||||
<File
|
||||
RelativePath="..\..\..\libretro.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\scrc32.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\stubs.cpp">
|
||||
</File>
|
||||
<Filter
|
||||
Name="mednafen"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\..\..\mednafen\endian.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\mednafen\error.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\mednafen\file.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\mednafen\FileStream.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\mednafen\FileWrapper.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\mednafen\general.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\mednafen\math_ops.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\mednafen\md5.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\mednafen\mednafen.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\mednafen\MemoryStream.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\mednafen\mempatcher.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\mednafen\okiadpcm.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\mednafen\settings.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\mednafen\state.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\mednafen\Stream.cpp">
|
||||
</File>
|
||||
<Filter
|
||||
Name="trio"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\..\..\mednafen\trio\trio.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="..\..\..\mednafen\trio\triostr.c">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="sound"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\..\..\mednafen\sound\Blip_Buffer.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\mednafen\sound\Stereo_Buffer.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="vb"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\..\..\mednafen\vb\input.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\mednafen\vb\timer.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\mednafen\vb\vb.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\mednafen\vb\vip.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\mednafen\vb\vsu.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="hw_cpu"
|
||||
Filter="">
|
||||
<Filter
|
||||
Name="v810"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\..\..\mednafen\hw_cpu\v810\v810_cpu.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\mednafen\hw_cpu\v810\v810_cpuD.cpp">
|
||||
</File>
|
||||
<Filter
|
||||
Name="fpu-new"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\..\..\mednafen\hw_cpu\v810\fpu-new\softfloat.c">
|
||||
<FileConfiguration
|
||||
Name="Debug|Xbox">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Profile|Xbox">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Profile_FastCap|Xbox">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Xbox">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release_LTCG|Xbox">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="video"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\..\..\mednafen\video\surface.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="cpu_test"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\..\..\mednafen\cputest\cputest.c">
|
||||
<FileConfiguration
|
||||
Name="Debug|Xbox">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Profile|Xbox">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Profile_FastCap|Xbox">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Xbox">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release_LTCG|Xbox">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
@ -1,249 +0,0 @@
|
||||
// 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
|
@ -1,124 +0,0 @@
|
||||
@echo off
|
||||
|
||||
@echo Setting environment for using Microsoft Visual Studio 2010 x86 tools.
|
||||
|
||||
@call :GetVSCommonToolsDir
|
||||
@if "%VS100COMNTOOLS%"=="" goto error_no_VS100COMNTOOLSDIR
|
||||
|
||||
@call "%VS100COMNTOOLS%VCVarsQueryRegistry.bat" 32bit No64bit
|
||||
|
||||
@if "%VSINSTALLDIR%"=="" goto error_no_VSINSTALLDIR
|
||||
@if "%FrameworkDir32%"=="" goto error_no_FrameworkDIR32
|
||||
@if "%FrameworkVersion32%"=="" goto error_no_FrameworkVer32
|
||||
@if "%Framework35Version%"=="" goto error_no_Framework35Version
|
||||
|
||||
@set FrameworkDir=%FrameworkDir32%
|
||||
@set FrameworkVersion=%FrameworkVersion32%
|
||||
|
||||
@if not "%WindowsSdkDir%" == "" (
|
||||
@set "PATH=%WindowsSdkDir%bin\NETFX 4.0 Tools;%WindowsSdkDir%bin;%PATH%"
|
||||
@set "INCLUDE=%WindowsSdkDir%include;%INCLUDE%"
|
||||
@set "LIB=%WindowsSdkDir%lib;%LIB%"
|
||||
)
|
||||
|
||||
@rem
|
||||
@rem Root of Visual Studio IDE installed files.
|
||||
@rem
|
||||
@set DevEnvDir=%VSINSTALLDIR%Common7\IDE\
|
||||
|
||||
@rem PATH
|
||||
@rem ----
|
||||
@if exist "%VSINSTALLDIR%Team Tools\Performance Tools" (
|
||||
@set "PATH=%VSINSTALLDIR%Team Tools\Performance Tools;%PATH%"
|
||||
)
|
||||
@if exist "%ProgramFiles%\HTML Help Workshop" set PATH=%ProgramFiles%\HTML Help Workshop;%PATH%
|
||||
@if exist "%ProgramFiles(x86)%\HTML Help Workshop" set PATH=%ProgramFiles(x86)%\HTML Help Workshop;%PATH%
|
||||
@if exist "%VCINSTALLDIR%VCPackages" set PATH=%VCINSTALLDIR%VCPackages;%PATH%
|
||||
@set PATH=%FrameworkDir%%Framework35Version%;%PATH%
|
||||
@set PATH=%FrameworkDir%%FrameworkVersion%;%PATH%
|
||||
@set PATH=%VSINSTALLDIR%Common7\Tools;%PATH%
|
||||
@if exist "%VCINSTALLDIR%BIN" set PATH=%VCINSTALLDIR%BIN;%PATH%
|
||||
@set PATH=%DevEnvDir%;%PATH%
|
||||
|
||||
@if exist "%VSINSTALLDIR%VSTSDB\Deploy" (
|
||||
@set "PATH=%VSINSTALLDIR%VSTSDB\Deploy;%PATH%"
|
||||
)
|
||||
|
||||
@if not "%FSHARPINSTALLDIR%" == "" (
|
||||
@set "PATH=%FSHARPINSTALLDIR%;%PATH%"
|
||||
)
|
||||
|
||||
@rem INCLUDE
|
||||
@rem -------
|
||||
@if exist "%VCINSTALLDIR%ATLMFC\INCLUDE" set INCLUDE=%VCINSTALLDIR%ATLMFC\INCLUDE;%INCLUDE%
|
||||
@if exist "%VCINSTALLDIR%INCLUDE" set INCLUDE=%VCINSTALLDIR%INCLUDE;%INCLUDE%
|
||||
|
||||
@rem LIB
|
||||
@rem ---
|
||||
@if exist "%VCINSTALLDIR%ATLMFC\LIB" set LIB=%VCINSTALLDIR%ATLMFC\LIB;%LIB%
|
||||
@if exist "%VCINSTALLDIR%LIB" set LIB=%VCINSTALLDIR%LIB;%LIB%
|
||||
|
||||
@rem LIBPATH
|
||||
@rem -------
|
||||
@if exist "%VCINSTALLDIR%ATLMFC\LIB" set LIBPATH=%VCINSTALLDIR%ATLMFC\LIB;%LIBPATH%
|
||||
@if exist "%VCINSTALLDIR%LIB" set LIBPATH=%VCINSTALLDIR%LIB;%LIBPATH%
|
||||
@set LIBPATH=%FrameworkDir%%Framework35Version%;%LIBPATH%
|
||||
@set LIBPATH=%FrameworkDir%%FrameworkVersion%;%LIBPATH%
|
||||
|
||||
@goto end
|
||||
|
||||
@REM -----------------------------------------------------------------------
|
||||
:GetVSCommonToolsDir
|
||||
@set VS100COMNTOOLS=
|
||||
@call :GetVSCommonToolsDirHelper32 HKLM > nul 2>&1
|
||||
@if errorlevel 1 call :GetVSCommonToolsDirHelper32 HKCU > nul 2>&1
|
||||
@if errorlevel 1 call :GetVSCommonToolsDirHelper64 HKLM > nul 2>&1
|
||||
@if errorlevel 1 call :GetVSCommonToolsDirHelper64 HKCU > nul 2>&1
|
||||
@exit /B 0
|
||||
|
||||
:GetVSCommonToolsDirHelper32
|
||||
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Microsoft\VisualStudio\SxS\VS7" /v "10.0"') DO (
|
||||
@if "%%i"=="10.0" (
|
||||
@SET "VS100COMNTOOLS=%%k"
|
||||
)
|
||||
)
|
||||
@if "%VS100COMNTOOLS%"=="" exit /B 1
|
||||
@SET "VS100COMNTOOLS=%VS100COMNTOOLS%Common7\Tools\"
|
||||
@exit /B 0
|
||||
|
||||
:GetVSCommonToolsDirHelper64
|
||||
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7" /v "10.0"') DO (
|
||||
@if "%%i"=="10.0" (
|
||||
@SET "VS100COMNTOOLS=%%k"
|
||||
)
|
||||
)
|
||||
@if "%VS100COMNTOOLS%"=="" exit /B 1
|
||||
@SET "VS100COMNTOOLS=%VS100COMNTOOLS%Common7\Tools\"
|
||||
@exit /B 0
|
||||
|
||||
@REM -----------------------------------------------------------------------
|
||||
:error_no_VS100COMNTOOLSDIR
|
||||
@echo ERROR: Cannot determine the location of the VS Common Tools folder.
|
||||
@goto end
|
||||
|
||||
:error_no_VSINSTALLDIR
|
||||
@echo ERROR: Cannot determine the location of the VS installation.
|
||||
@goto end
|
||||
|
||||
:error_no_FrameworkDIR32
|
||||
@echo ERROR: Cannot determine the location of the .NET Framework 32bit installation.
|
||||
@goto end
|
||||
|
||||
:error_no_FrameworkVer32
|
||||
@echo ERROR: Cannot determine the version of the .NET Framework 32bit installation.
|
||||
@goto end
|
||||
|
||||
:error_no_Framework35Version
|
||||
@echo ERROR: Cannot determine the .NET Framework 3.5 version.
|
||||
@goto end
|
||||
|
||||
:end
|
||||
|
||||
msbuild msvc-2010-360.sln /p:Configuration=Release_LTCG /target:clean
|
||||
msbuild msvc-2010-360.sln /p:Configuration=Release_LTCG
|
||||
exit
|
@ -1,32 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "msvc-2010-360", "msvc-2010-360\msvc-2010-360.vcxproj", "{38462FE9-E3FC-4336-B241-50F5599C537B}"
|
||||
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
|
||||
{38462FE9-E3FC-4336-B241-50F5599C537B}.CodeAnalysis|Xbox 360.ActiveCfg = CodeAnalysis|Xbox 360
|
||||
{38462FE9-E3FC-4336-B241-50F5599C537B}.CodeAnalysis|Xbox 360.Build.0 = CodeAnalysis|Xbox 360
|
||||
{38462FE9-E3FC-4336-B241-50F5599C537B}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360
|
||||
{38462FE9-E3FC-4336-B241-50F5599C537B}.Debug|Xbox 360.Build.0 = Debug|Xbox 360
|
||||
{38462FE9-E3FC-4336-B241-50F5599C537B}.Profile_FastCap|Xbox 360.ActiveCfg = Profile_FastCap|Xbox 360
|
||||
{38462FE9-E3FC-4336-B241-50F5599C537B}.Profile_FastCap|Xbox 360.Build.0 = Profile_FastCap|Xbox 360
|
||||
{38462FE9-E3FC-4336-B241-50F5599C537B}.Profile|Xbox 360.ActiveCfg = Profile|Xbox 360
|
||||
{38462FE9-E3FC-4336-B241-50F5599C537B}.Profile|Xbox 360.Build.0 = Profile|Xbox 360
|
||||
{38462FE9-E3FC-4336-B241-50F5599C537B}.Release_LTCG|Xbox 360.ActiveCfg = Release_LTCG|Xbox 360
|
||||
{38462FE9-E3FC-4336-B241-50F5599C537B}.Release_LTCG|Xbox 360.Build.0 = Release_LTCG|Xbox 360
|
||||
{38462FE9-E3FC-4336-B241-50F5599C537B}.Release|Xbox 360.ActiveCfg = Release|Xbox 360
|
||||
{38462FE9-E3FC-4336-B241-50F5599C537B}.Release|Xbox 360.Build.0 = Release|Xbox 360
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
@ -1,288 +0,0 @@
|
||||
<?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="..\..\..\libretro.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\cputest\cputest.c" />
|
||||
<ClCompile Include="..\..\..\mednafen\endian.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\error.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\file.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\FileStream.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\FileWrapper.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\general.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\hw_cpu\v810\fpu-new\softfloat.c">
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='CodeAnalysis|Xbox 360'">CompileAsCpp</CompileAs>
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">CompileAsCpp</CompileAs>
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Profile|Xbox 360'">CompileAsCpp</CompileAs>
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Profile_FastCap|Xbox 360'">CompileAsCpp</CompileAs>
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_LTCG|Xbox 360'">CompileAsCpp</CompileAs>
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">CompileAsCpp</CompileAs>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\hw_cpu\v810\v810_cpu.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\hw_cpu\v810\v810_cpuD.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\math_ops.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\md5.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\mednafen.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\MemoryStream.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\mempatcher.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\okiadpcm.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\settings.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\sound\Blip_Buffer.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\sound\Stereo_Buffer.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\state.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\Stream.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\trio\trio.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="..\..\..\mednafen\trio\triostr.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="..\..\..\mednafen\vb\input.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\vb\timer.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\vb\vb.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\vb\vip.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\vb\vsu.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\video\Deinterlacer.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\video\surface.cpp" />
|
||||
<ClCompile Include="..\..\..\scrc32.cpp" />
|
||||
<ClCompile Include="..\..\..\stubs.cpp" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{38462FE9-E3FC-4336-B241-50F5599C537B}</ProjectGuid>
|
||||
<Keyword>Xbox360Proj</Keyword>
|
||||
</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)msvc-2010-360$(TargetExt)</OutputFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='CodeAnalysis|Xbox 360'">
|
||||
<OutputFile>$(OutDir)msvc-2010-360$(TargetExt)</OutputFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Profile|Xbox 360'">
|
||||
<OutputFile>$(OutDir)msvc-2010-360$(TargetExt)</OutputFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Profile_FastCap|Xbox 360'">
|
||||
<OutputFile>$(OutDir)msvc-2010-360$(TargetExt)</OutputFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">
|
||||
<OutputFile>$(OutDir)msvc-2010-360$(TargetExt)</OutputFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_LTCG|Xbox 360'">
|
||||
<OutputFile>$(OutDir)msvc-2010-360$(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;_LIB;MSB_FIRST;WANT_VB_EMU;WANT_32BPP;SIZEOF_DOUBLE=8;MEDNAFEN_VERSION=0.9.26;MPC_FIXED_POINT;__LIBRETRO__;_LOW_ACCURACY;WANT_STEREO_SOUND;FRONTEND_SUPPORTS_RGB565;PSS_STYLE=2;MEDNAFEN_VERSION_NUMERIC=926;BYTE_ORDER=1;%(PreprocessorDefinitions);WANT_NEW_API</PreprocessorDefinitions>
|
||||
<CallAttributedProfiling>Callcap</CallAttributedProfiling>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\..\..\;$(SolutionDir)\..\..\mednafen;$(SolutionDir)\..\..\mednafen\cdrom;$(SolutionDir)\..\..\mednafen\include;$(SolutionDir)\..\..\mednafen\sound;$(SolutionDir)\..\..\mednafen\ngp;$(SolutionDir)\..\..\mednafen\hw_cpu;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</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;_LIB;MSB_FIRST;WANT_VB_EMU;WANT_32BPP;SIZEOF_DOUBLE=8;MEDNAFEN_VERSION=0.9.26;MPC_FIXED_POINT;__LIBRETRO__;_LOW_ACCURACY;WANT_STEREO_SOUND;FRONTEND_SUPPORTS_RGB565;PSS_STYLE=2;MEDNAFEN_VERSION_NUMERIC=926;BYTE_ORDER=1;%(PreprocessorDefinitions);WANT_NEW_API</PreprocessorDefinitions>
|
||||
<CallAttributedProfiling>Callcap</CallAttributedProfiling>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\..\..\;$(SolutionDir)\..\..\mednafen;$(SolutionDir)\..\..\mednafen\cdrom;$(SolutionDir)\..\..\mednafen\include;$(SolutionDir)\..\..\mednafen\sound;$(SolutionDir)\..\..\mednafen\ngp;$(SolutionDir)\..\..\mednafen\hw_cpu;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</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;PROFILE;_LIB;MSB_FIRST;WANT_VB_EMU;WANT_32BPP;SIZEOF_DOUBLE=8;MEDNAFEN_VERSION=0.9.26;MPC_FIXED_POINT;__LIBRETRO__;_LOW_ACCURACY;WANT_STEREO_SOUND;FRONTEND_SUPPORTS_RGB565;PSS_STYLE=2;MEDNAFEN_VERSION_NUMERIC=926;BYTE_ORDER=1;%(PreprocessorDefinitions);WANT_NEW_API</PreprocessorDefinitions>
|
||||
<CallAttributedProfiling>Callcap</CallAttributedProfiling>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\..\..\;$(SolutionDir)\..\..\mednafen;$(SolutionDir)\..\..\mednafen\cdrom;$(SolutionDir)\..\..\mednafen\include;$(SolutionDir)\..\..\mednafen\sound;$(SolutionDir)\..\..\mednafen\ngp;$(SolutionDir)\..\..\mednafen\hw_cpu;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</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;PROFILE;FASTCAP;_LIB;MSB_FIRST;WANT_VB_EMU;WANT_32BPP;SIZEOF_DOUBLE=8;MEDNAFEN_VERSION=0.9.26;MPC_FIXED_POINT;__LIBRETRO__;_LOW_ACCURACY;WANT_STEREO_SOUND;FRONTEND_SUPPORTS_RGB565;PSS_STYLE=2;MEDNAFEN_VERSION_NUMERIC=926;BYTE_ORDER=1;%(PreprocessorDefinitions);WANT_NEW_API</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\..\..\;$(SolutionDir)\..\..\mednafen;$(SolutionDir)\..\..\mednafen\cdrom;$(SolutionDir)\..\..\mednafen\include;$(SolutionDir)\..\..\mednafen\sound;$(SolutionDir)\..\..\mednafen\ngp;$(SolutionDir)\..\..\mednafen\hw_cpu;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</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;_LIB;MSB_FIRST;WANT_VB_EMU;WANT_32BPP;SIZEOF_DOUBLE=8;MEDNAFEN_VERSION=0.9.26;MPC_FIXED_POINT;__LIBRETRO__;_LOW_ACCURACY;WANT_STEREO_SOUND;FRONTEND_SUPPORTS_RGB565;PSS_STYLE=2;MEDNAFEN_VERSION_NUMERIC=926;BYTE_ORDER=1;%(PreprocessorDefinitions);WANT_NEW_API</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\..\..\;$(SolutionDir)\..\..\mednafen;$(SolutionDir)\..\..\mednafen\cdrom;$(SolutionDir)\..\..\mednafen\include;$(SolutionDir)\..\..\mednafen\sound;$(SolutionDir)\..\..\mednafen\ngp;$(SolutionDir)\..\..\mednafen\hw_cpu;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</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;LTCG;_LIB;MSB_FIRST;WANT_VB_EMU;WANT_32BPP;SIZEOF_DOUBLE=8;MEDNAFEN_VERSION=0.9.26;MPC_FIXED_POINT;__LIBRETRO__;_LOW_ACCURACY;WANT_STEREO_SOUND;FRONTEND_SUPPORTS_RGB565;PSS_STYLE=2;MEDNAFEN_VERSION_NUMERIC=926;BYTE_ORDER=1;%(PreprocessorDefinitions);WANT_NEW_API</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\..\..\;$(SolutionDir)\..\..\mednafen;$(SolutionDir)\..\..\mednafen\cdrom;$(SolutionDir)\..\..\mednafen\include;$(SolutionDir)\..\..\mednafen\sound;$(SolutionDir)\..\..\mednafen\ngp;$(SolutionDir)\..\..\mednafen\hw_cpu;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
@ -1,141 +0,0 @@
|
||||
<?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\mednafen">
|
||||
<UniqueIdentifier>{7e2d28e1-7dea-4830-b6d9-eda0e7a17ecd}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\mednafen\hw_cpu">
|
||||
<UniqueIdentifier>{861b7018-2e33-4135-85a7-7c4a0c4a3b07}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\mednafen\sound">
|
||||
<UniqueIdentifier>{1e91b900-1745-439d-9376-bc26074e1010}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\mednafen\video">
|
||||
<UniqueIdentifier>{82077d1a-8197-4b2f-8098-2818f64b525d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\mednafen\trio">
|
||||
<UniqueIdentifier>{35dd6f7d-5243-42fb-bf3b-66ae5808c1da}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\mednafen\vb">
|
||||
<UniqueIdentifier>{582ed0f8-b1c4-43b6-a8a4-02539d97db13}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\mednafen\hw_cpu\v810">
|
||||
<UniqueIdentifier>{afa6bd7f-be1b-4547-9472-e2023e15c6f4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\mednafen\hw_cpu\v810\fpu-new">
|
||||
<UniqueIdentifier>{3e634eaf-5bc6-4067-b223-18448d4686c8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\mednafen\cputest">
|
||||
<UniqueIdentifier>{d6b5ad30-82b7-4bd6-8c63-7af9e1ea40d3}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\mednafen\Stream.cpp">
|
||||
<Filter>Source Files\mednafen</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\endian.cpp">
|
||||
<Filter>Source Files\mednafen</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\error.cpp">
|
||||
<Filter>Source Files\mednafen</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\file.cpp">
|
||||
<Filter>Source Files\mednafen</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\FileStream.cpp">
|
||||
<Filter>Source Files\mednafen</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\FileWrapper.cpp">
|
||||
<Filter>Source Files\mednafen</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\general.cpp">
|
||||
<Filter>Source Files\mednafen</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\math_ops.cpp">
|
||||
<Filter>Source Files\mednafen</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\md5.cpp">
|
||||
<Filter>Source Files\mednafen</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\mednafen.cpp">
|
||||
<Filter>Source Files\mednafen</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\MemoryStream.cpp">
|
||||
<Filter>Source Files\mednafen</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\mempatcher.cpp">
|
||||
<Filter>Source Files\mednafen</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\okiadpcm.cpp">
|
||||
<Filter>Source Files\mednafen</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\settings.cpp">
|
||||
<Filter>Source Files\mednafen</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\state.cpp">
|
||||
<Filter>Source Files\mednafen</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\sound\Blip_Buffer.cpp">
|
||||
<Filter>Source Files\mednafen\sound</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\stubs.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\libretro.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\scrc32.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\video\surface.cpp">
|
||||
<Filter>Source Files\mednafen\video</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\video\Deinterlacer.cpp">
|
||||
<Filter>Source Files\mednafen\video</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\trio\triostr.c">
|
||||
<Filter>Source Files\mednafen\trio</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\trio\trio.c">
|
||||
<Filter>Source Files\mednafen\trio</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\sound\Stereo_Buffer.cpp">
|
||||
<Filter>Source Files\mednafen\sound</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\hw_cpu\v810\fpu-new\softfloat.c">
|
||||
<Filter>Source Files\mednafen\hw_cpu\v810\fpu-new</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\hw_cpu\v810\v810_cpuD.cpp">
|
||||
<Filter>Source Files\mednafen\hw_cpu\v810</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\hw_cpu\v810\v810_cpu.cpp">
|
||||
<Filter>Source Files\mednafen\hw_cpu\v810</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\cputest\cputest.c">
|
||||
<Filter>Source Files\mednafen\cputest</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\vb\input.cpp">
|
||||
<Filter>Source Files\mednafen\vb</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\vb\timer.cpp">
|
||||
<Filter>Source Files\mednafen\vb</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\vb\vb.cpp">
|
||||
<Filter>Source Files\mednafen\vb</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\vb\vip.cpp">
|
||||
<Filter>Source Files\mednafen\vb</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\vb\vsu.cpp">
|
||||
<Filter>Source Files\mednafen\vb</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -1,124 +0,0 @@
|
||||
@echo off
|
||||
|
||||
@echo Setting environment for using Microsoft Visual Studio 2010 x86 tools.
|
||||
|
||||
@call :GetVSCommonToolsDir
|
||||
@if "%VS100COMNTOOLS%"=="" goto error_no_VS100COMNTOOLSDIR
|
||||
|
||||
@call "%VS100COMNTOOLS%VCVarsQueryRegistry.bat" 32bit No64bit
|
||||
|
||||
@if "%VSINSTALLDIR%"=="" goto error_no_VSINSTALLDIR
|
||||
@if "%FrameworkDir32%"=="" goto error_no_FrameworkDIR32
|
||||
@if "%FrameworkVersion32%"=="" goto error_no_FrameworkVer32
|
||||
@if "%Framework35Version%"=="" goto error_no_Framework35Version
|
||||
|
||||
@set FrameworkDir=%FrameworkDir32%
|
||||
@set FrameworkVersion=%FrameworkVersion32%
|
||||
|
||||
@if not "%WindowsSdkDir%" == "" (
|
||||
@set "PATH=%WindowsSdkDir%bin\NETFX 4.0 Tools;%WindowsSdkDir%bin;%PATH%"
|
||||
@set "INCLUDE=%WindowsSdkDir%include;%INCLUDE%"
|
||||
@set "LIB=%WindowsSdkDir%lib;%LIB%"
|
||||
)
|
||||
|
||||
@rem
|
||||
@rem Root of Visual Studio IDE installed files.
|
||||
@rem
|
||||
@set DevEnvDir=%VSINSTALLDIR%Common7\IDE\
|
||||
|
||||
@rem PATH
|
||||
@rem ----
|
||||
@if exist "%VSINSTALLDIR%Team Tools\Performance Tools" (
|
||||
@set "PATH=%VSINSTALLDIR%Team Tools\Performance Tools;%PATH%"
|
||||
)
|
||||
@if exist "%ProgramFiles%\HTML Help Workshop" set PATH=%ProgramFiles%\HTML Help Workshop;%PATH%
|
||||
@if exist "%ProgramFiles(x86)%\HTML Help Workshop" set PATH=%ProgramFiles(x86)%\HTML Help Workshop;%PATH%
|
||||
@if exist "%VCINSTALLDIR%VCPackages" set PATH=%VCINSTALLDIR%VCPackages;%PATH%
|
||||
@set PATH=%FrameworkDir%%Framework35Version%;%PATH%
|
||||
@set PATH=%FrameworkDir%%FrameworkVersion%;%PATH%
|
||||
@set PATH=%VSINSTALLDIR%Common7\Tools;%PATH%
|
||||
@if exist "%VCINSTALLDIR%BIN" set PATH=%VCINSTALLDIR%BIN;%PATH%
|
||||
@set PATH=%DevEnvDir%;%PATH%
|
||||
|
||||
@if exist "%VSINSTALLDIR%VSTSDB\Deploy" (
|
||||
@set "PATH=%VSINSTALLDIR%VSTSDB\Deploy;%PATH%"
|
||||
)
|
||||
|
||||
@if not "%FSHARPINSTALLDIR%" == "" (
|
||||
@set "PATH=%FSHARPINSTALLDIR%;%PATH%"
|
||||
)
|
||||
|
||||
@rem INCLUDE
|
||||
@rem -------
|
||||
@if exist "%VCINSTALLDIR%ATLMFC\INCLUDE" set INCLUDE=%VCINSTALLDIR%ATLMFC\INCLUDE;%INCLUDE%
|
||||
@if exist "%VCINSTALLDIR%INCLUDE" set INCLUDE=%VCINSTALLDIR%INCLUDE;%INCLUDE%
|
||||
|
||||
@rem LIB
|
||||
@rem ---
|
||||
@if exist "%VCINSTALLDIR%ATLMFC\LIB" set LIB=%VCINSTALLDIR%ATLMFC\LIB;%LIB%
|
||||
@if exist "%VCINSTALLDIR%LIB" set LIB=%VCINSTALLDIR%LIB;%LIB%
|
||||
|
||||
@rem LIBPATH
|
||||
@rem -------
|
||||
@if exist "%VCINSTALLDIR%ATLMFC\LIB" set LIBPATH=%VCINSTALLDIR%ATLMFC\LIB;%LIBPATH%
|
||||
@if exist "%VCINSTALLDIR%LIB" set LIBPATH=%VCINSTALLDIR%LIB;%LIBPATH%
|
||||
@set LIBPATH=%FrameworkDir%%Framework35Version%;%LIBPATH%
|
||||
@set LIBPATH=%FrameworkDir%%FrameworkVersion%;%LIBPATH%
|
||||
|
||||
@goto end
|
||||
|
||||
@REM -----------------------------------------------------------------------
|
||||
:GetVSCommonToolsDir
|
||||
@set VS100COMNTOOLS=
|
||||
@call :GetVSCommonToolsDirHelper32 HKLM > nul 2>&1
|
||||
@if errorlevel 1 call :GetVSCommonToolsDirHelper32 HKCU > nul 2>&1
|
||||
@if errorlevel 1 call :GetVSCommonToolsDirHelper64 HKLM > nul 2>&1
|
||||
@if errorlevel 1 call :GetVSCommonToolsDirHelper64 HKCU > nul 2>&1
|
||||
@exit /B 0
|
||||
|
||||
:GetVSCommonToolsDirHelper32
|
||||
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Microsoft\VisualStudio\SxS\VS7" /v "10.0"') DO (
|
||||
@if "%%i"=="10.0" (
|
||||
@SET "VS100COMNTOOLS=%%k"
|
||||
)
|
||||
)
|
||||
@if "%VS100COMNTOOLS%"=="" exit /B 1
|
||||
@SET "VS100COMNTOOLS=%VS100COMNTOOLS%Common7\Tools\"
|
||||
@exit /B 0
|
||||
|
||||
:GetVSCommonToolsDirHelper64
|
||||
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7" /v "10.0"') DO (
|
||||
@if "%%i"=="10.0" (
|
||||
@SET "VS100COMNTOOLS=%%k"
|
||||
)
|
||||
)
|
||||
@if "%VS100COMNTOOLS%"=="" exit /B 1
|
||||
@SET "VS100COMNTOOLS=%VS100COMNTOOLS%Common7\Tools\"
|
||||
@exit /B 0
|
||||
|
||||
@REM -----------------------------------------------------------------------
|
||||
:error_no_VS100COMNTOOLSDIR
|
||||
@echo ERROR: Cannot determine the location of the VS Common Tools folder.
|
||||
@goto end
|
||||
|
||||
:error_no_VSINSTALLDIR
|
||||
@echo ERROR: Cannot determine the location of the VS installation.
|
||||
@goto end
|
||||
|
||||
:error_no_FrameworkDIR32
|
||||
@echo ERROR: Cannot determine the location of the .NET Framework 32bit installation.
|
||||
@goto end
|
||||
|
||||
:error_no_FrameworkVer32
|
||||
@echo ERROR: Cannot determine the version of the .NET Framework 32bit installation.
|
||||
@goto end
|
||||
|
||||
:error_no_Framework35Version
|
||||
@echo ERROR: Cannot determine the .NET Framework 3.5 version.
|
||||
@goto end
|
||||
|
||||
:end
|
||||
|
||||
msbuild msvc-2010.sln /p:Configuration=Release /target:clean
|
||||
msbuild msvc-2010.sln /p:Configuration=Release
|
||||
exit
|
@ -1,20 +0,0 @@
|
||||
|
||||
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", "{38462FE9-E3FC-4336-B241-50F5599C537B}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{38462FE9-E3FC-4336-B241-50F5599C537B}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{38462FE9-E3FC-4336-B241-50F5599C537B}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{38462FE9-E3FC-4336-B241-50F5599C537B}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{38462FE9-E3FC-4336-B241-50F5599C537B}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
@ -1,27 +0,0 @@
|
||||
LIBRARY "msvc-2010"
|
||||
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
|
@ -1,137 +0,0 @@
|
||||
<?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="..\..\..\libretro.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\cputest\cputest.c">
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\endian.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\error.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\file.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\FileStream.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\FileWrapper.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\general.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\hw_cpu\v810\fpu-new\softfloat.c">
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\hw_cpu\v810\v810_cpu.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\hw_cpu\v810\v810_cpuD.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\math_ops.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\md5.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\mednafen.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\MemoryStream.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\mempatcher.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\okiadpcm.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\settings.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\sound\Blip_Buffer.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\sound\Stereo_Buffer.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\state.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\Stream.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\trio\trio.c">
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsC</CompileAs>
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\trio\triostr.c">
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsC</CompileAs>
|
||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\vb\input.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\vb\timer.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\vb\vb.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\vb\vip.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\vb\vsu.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\video\Deinterlacer.cpp" />
|
||||
<ClCompile Include="..\..\..\mednafen\video\surface.cpp" />
|
||||
<ClCompile Include="..\..\..\scrc32.cpp" />
|
||||
<ClCompile Include="..\..\..\stubs.cpp" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{38462FE9-E3FC-4336-B241-50F5599C537B}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</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'">
|
||||
<OutputFile>$(OutDir)msvc-2010-360$(TargetExt)</OutputFile>
|
||||
<OutDir>$(SolutionDir)msvc-2010\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutputFile>$(OutDir)msvc-2010-360$(TargetExt)</OutputFile>
|
||||
<OutDir>$(SolutionDir)msvc-2010\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<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;_WIN32;_LIB;LSB_FIRST;WANT_VB_EMU;WANT_32BPP;SIZEOF_DOUBLE=8;MEDNAFEN_VERSION=0.9.26;MPC_FIXED_POINT;__LIBRETRO__;_LOW_ACCURACY;WANT_STEREO_SOUND;FRONTEND_SUPPORTS_RGB565;PSS_STYLE=2;MEDNAFEN_VERSION_NUMERIC=926;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;WANT_NEW_API;INLINE=_inline</PreprocessorDefinitions>
|
||||
<CallAttributedProfiling>Callcap</CallAttributedProfiling>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\..\..\;$(SolutionDir)\..\..\mednafen;$(SolutionDir)\..\..\mednafen\cdrom;$(SolutionDir)\..\..\mednafen\include;$(SolutionDir)\..\..\mednafen\sound;$(SolutionDir)\..\..\mednafen\ngp;$(SolutionDir)\..\..\mednafen\hw_cpu;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ModuleDefinitionFile>libretro.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<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;_WIN32;_LIB;LSB_FIRST;WANT_VB_EMU;WANT_32BPP;SIZEOF_DOUBLE=8;MEDNAFEN_VERSION=0.9.26;MPC_FIXED_POINT;__LIBRETRO__;_LOW_ACCURACY;WANT_STEREO_SOUND;FRONTEND_SUPPORTS_RGB565;PSS_STYLE=2;MEDNAFEN_VERSION_NUMERIC=926;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;WANT_NEW_API;INLINE=_inline</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\..\..\;$(SolutionDir)\..\..\mednafen;$(SolutionDir)\..\..\mednafen\cdrom;$(SolutionDir)\..\..\mednafen\include;$(SolutionDir)\..\..\mednafen\sound;$(SolutionDir)\..\..\mednafen\ngp;$(SolutionDir)\..\..\mednafen\hw_cpu;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<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>
|
@ -1,141 +0,0 @@
|
||||
<?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\mednafen">
|
||||
<UniqueIdentifier>{7e2d28e1-7dea-4830-b6d9-eda0e7a17ecd}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\mednafen\hw_cpu">
|
||||
<UniqueIdentifier>{861b7018-2e33-4135-85a7-7c4a0c4a3b07}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\mednafen\sound">
|
||||
<UniqueIdentifier>{1e91b900-1745-439d-9376-bc26074e1010}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\mednafen\video">
|
||||
<UniqueIdentifier>{82077d1a-8197-4b2f-8098-2818f64b525d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\mednafen\trio">
|
||||
<UniqueIdentifier>{35dd6f7d-5243-42fb-bf3b-66ae5808c1da}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\mednafen\vb">
|
||||
<UniqueIdentifier>{582ed0f8-b1c4-43b6-a8a4-02539d97db13}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\mednafen\hw_cpu\v810">
|
||||
<UniqueIdentifier>{afa6bd7f-be1b-4547-9472-e2023e15c6f4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\mednafen\hw_cpu\v810\fpu-new">
|
||||
<UniqueIdentifier>{3e634eaf-5bc6-4067-b223-18448d4686c8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\mednafen\cputest">
|
||||
<UniqueIdentifier>{de301952-1bd0-4099-9eb8-44dc31bd2a08}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\mednafen\Stream.cpp">
|
||||
<Filter>Source Files\mednafen</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\endian.cpp">
|
||||
<Filter>Source Files\mednafen</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\error.cpp">
|
||||
<Filter>Source Files\mednafen</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\file.cpp">
|
||||
<Filter>Source Files\mednafen</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\FileStream.cpp">
|
||||
<Filter>Source Files\mednafen</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\FileWrapper.cpp">
|
||||
<Filter>Source Files\mednafen</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\general.cpp">
|
||||
<Filter>Source Files\mednafen</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\math_ops.cpp">
|
||||
<Filter>Source Files\mednafen</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\md5.cpp">
|
||||
<Filter>Source Files\mednafen</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\mednafen.cpp">
|
||||
<Filter>Source Files\mednafen</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\MemoryStream.cpp">
|
||||
<Filter>Source Files\mednafen</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\mempatcher.cpp">
|
||||
<Filter>Source Files\mednafen</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\okiadpcm.cpp">
|
||||
<Filter>Source Files\mednafen</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\settings.cpp">
|
||||
<Filter>Source Files\mednafen</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\state.cpp">
|
||||
<Filter>Source Files\mednafen</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\sound\Blip_Buffer.cpp">
|
||||
<Filter>Source Files\mednafen\sound</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\stubs.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\libretro.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\scrc32.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\video\surface.cpp">
|
||||
<Filter>Source Files\mednafen\video</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\video\Deinterlacer.cpp">
|
||||
<Filter>Source Files\mednafen\video</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\trio\triostr.c">
|
||||
<Filter>Source Files\mednafen\trio</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\trio\trio.c">
|
||||
<Filter>Source Files\mednafen\trio</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\sound\Stereo_Buffer.cpp">
|
||||
<Filter>Source Files\mednafen\sound</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\hw_cpu\v810\fpu-new\softfloat.c">
|
||||
<Filter>Source Files\mednafen\hw_cpu\v810\fpu-new</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\hw_cpu\v810\v810_cpuD.cpp">
|
||||
<Filter>Source Files\mednafen\hw_cpu\v810</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\hw_cpu\v810\v810_cpu.cpp">
|
||||
<Filter>Source Files\mednafen\hw_cpu\v810</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\vb\input.cpp">
|
||||
<Filter>Source Files\mednafen\vb</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\vb\timer.cpp">
|
||||
<Filter>Source Files\mednafen\vb</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\vb\vb.cpp">
|
||||
<Filter>Source Files\mednafen\vb</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\vb\vip.cpp">
|
||||
<Filter>Source Files\mednafen\vb</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\vb\vsu.cpp">
|
||||
<Filter>Source Files\mednafen\vb</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\mednafen\cputest\cputest.c">
|
||||
<Filter>Source Files\mednafen\cputest</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
Loading…
x
Reference in New Issue
Block a user