mirror of https://github.com/bsnes-emu/bsnes.git
Update to bsnes v023 release.
I've recently fixed a bug in bsnes that I feel is serious enough to warrant a new release, even though little else has changed. I attempted to build this release with MinGW, but ran into problems with profiling and JMA support, so this release was built with Visual C++ once again. Changelog: - Fixed serious bug in S-SMP incw and decw instructions -- fixes sound bug in Emerald Dragon - Added Nach's MinGW fixes -- can now be compiled with MinGW/GCC3 or MinGW/GCC4 - Fixed const char* cast warnings in GCC 4.2, thanks to [vEX] for the feedback - Updated source to use latest libraries for libco, libui, etc. - Added new advanced options to adjust aspect ratio correction - Cleaned up source code a bit
This commit is contained in:
parent
becf122aaa
commit
c9ca01fe20
24
readme.txt
24
readme.txt
|
@ -1,8 +1,8 @@
|
|||
bsnes
|
||||
Version 0.022
|
||||
Version 0.023
|
||||
Author: byuu
|
||||
|
||||
|
||||
--------
|
||||
General:
|
||||
--------
|
||||
bsnes is a Super Nintendo / Super Famicom emulator that began on
|
||||
|
@ -13,16 +13,22 @@ http://byuu.org/
|
|||
|
||||
Please see license.txt for important licensing information.
|
||||
|
||||
--------------
|
||||
Shortcut Keys:
|
||||
--------------
|
||||
Esc - Toggle menubar visibility
|
||||
F11 - Toggle fullscreen
|
||||
|
||||
------------------
|
||||
Known Limitations:
|
||||
------------------
|
||||
S-CPU
|
||||
- Invalid DMA / HDMA transfers (eg WRAM<>WRAM) not fully emulated
|
||||
- Invalid DMA / HDMA transfers not fully emulated
|
||||
- Multiply / Divide register delays not implemented
|
||||
|
||||
S-PPU
|
||||
- Uses scanline-based renderer. This is very inaccurate, but very few games
|
||||
rely on mid-scanline writes to function correctly
|
||||
- Uses scanline-based renderer. This is very inaccurate, but few (if any)
|
||||
games rely on mid-scanline writes to function correctly
|
||||
- Does not support FirstSprite+Y priority
|
||||
- OAM / CGRAM accesses during active display not supported correctly
|
||||
- RTO flags are not calculated on frames that are skipped when frameskipping
|
||||
|
@ -31,10 +37,10 @@ S-PPU
|
|||
Turning frameskipping off will allow RTO flag calculation on every frame
|
||||
|
||||
Hardware Bugs
|
||||
- CPUr1 HDMA crashing bug not emulated
|
||||
- CPU<>APU communication bus conflicts not emulated
|
||||
|
||||
- S-CPU.r1 HDMA crashing bug not emulated
|
||||
- S-CPU<>S-SMP communication bus conflicts not emulated
|
||||
|
||||
---------------------
|
||||
Unsupported Hardware:
|
||||
---------------------
|
||||
SA-1
|
||||
|
@ -79,7 +85,7 @@ Flash cartridge used by BS-X, as well as some standalone games by Asciisoft
|
|||
Super Gameboy
|
||||
Cartridge passthrough used for playing Gameboy games
|
||||
|
||||
|
||||
------------------------
|
||||
Unsupported Controllers:
|
||||
------------------------
|
||||
Mouse
|
||||
|
|
21
src/Makefile
21
src/Makefile
|
@ -70,7 +70,18 @@ endif
|
|||
ifeq ($(PLATFORM),win-mingw-lui)
|
||||
OS = win
|
||||
CC = mingw32-gcc
|
||||
CFLAGS = -O3 -fomit-frame-pointer -ffast-math -DPLATFORM_WIN -DCOMPILER_GCC -DPROCESSOR_X86 -DUI_LUI
|
||||
CFLAGS = -mwindows -O3 -fomit-frame-pointer -DPLATFORM_WIN -DCOMPILER_GCC -DPROCESSOR_X86 -DUI_LUI
|
||||
AS = nasm
|
||||
ASFLAGS = -f win32 -DWIN32
|
||||
LIBS = -ld3d9 -lddraw -ldsound -ldinput8 -ldxguid -luuid -lkernel32 -luser32 -lgdi32 -lshell32 -lwinmm -lcomdlg32 -lcomctl32
|
||||
LIBCO = libco_x86
|
||||
LIBUI = libui_win
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),win-mingw4-lui)
|
||||
OS = win
|
||||
CC = mingw32-gcc-sjlj
|
||||
CFLAGS = -mwindows -O3 -fomit-frame-pointer -DPLATFORM_WIN -DCOMPILER_GCC -DPROCESSOR_X86 -DUI_LUI
|
||||
AS = nasm
|
||||
ASFLAGS = -f win32 -DWIN32
|
||||
LIBS = -ld3d9 -lddraw -ldsound -ldinput8 -ldxguid -luuid -lkernel32 -luser32 -lgdi32 -lshell32 -lwinmm -lcomdlg32 -lcomctl32
|
||||
|
@ -98,6 +109,14 @@ CARGS = -c $< -o $@
|
|||
DEFINE = -D
|
||||
endif
|
||||
|
||||
ifeq ($(CC),mingw32-gcc-sjlj)
|
||||
OUT = -obsnes
|
||||
CPP = mingw32-g++-sjlj
|
||||
OBJ = o
|
||||
CARGS = -c $< -o $@
|
||||
DEFINE = -D
|
||||
endif
|
||||
|
||||
ifeq ($(CC),cl)
|
||||
OUT = /Febsnes
|
||||
CPP = cl
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#define BSNES_VERSION "0.022.03"
|
||||
#define BSNES_VERSION "0.023"
|
||||
#define BSNES_TITLE "bsnes v" BSNES_VERSION
|
||||
|
||||
#define MEMCORE bMemBus
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include <new>
|
||||
|
||||
#if defined(PLATFORM_WIN)
|
||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
#include <io.h>
|
||||
#include <direct.h>
|
||||
#include <shlobj.h>
|
||||
|
@ -37,7 +37,7 @@
|
|||
#define va_copy(dst, src) ((dst) = (src))
|
||||
#endif
|
||||
|
||||
#if defined(PLATFORM_WIN)
|
||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
#define getcwd _getcwd
|
||||
#define ftruncate _chsize
|
||||
#define mkdir _mkdir
|
||||
|
@ -48,7 +48,7 @@
|
|||
static char *realpath(const char *file_name, char *resolved_name) {
|
||||
return _fullpath(resolved_name, file_name, PATH_MAX);
|
||||
}
|
||||
#elif defined(PLATFORM_X)
|
||||
#else
|
||||
#define mkdir(path) (mkdir)(path, 0755);
|
||||
#endif
|
||||
|
||||
|
@ -93,13 +93,13 @@ typedef int64_t int64;
|
|||
//userpath(output) retrieves path to user's home folder
|
||||
//output must be at least as large as PATH_MAX
|
||||
|
||||
#if defined(PLATFORM_WIN)
|
||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
static char *userpath(char *output) {
|
||||
strcpy(output, "."); //failsafe
|
||||
SHGetFolderPath(0, CSIDL_APPDATA | CSIDL_FLAG_CREATE, 0, 0, output);
|
||||
return output;
|
||||
}
|
||||
#elif defined(PLATFORM_X)
|
||||
#else
|
||||
static char *userpath(char *output) {
|
||||
strcpy(output, "."); //failsafe
|
||||
struct passwd *userinfo = getpwuid(getuid());
|
||||
|
@ -139,14 +139,10 @@ T z = x;
|
|||
y = z;
|
||||
}
|
||||
|
||||
#ifdef min
|
||||
#undef min
|
||||
#endif
|
||||
#define min(x, y) (((x) < (y)) ? (x) : (y))
|
||||
|
||||
#ifdef max
|
||||
#undef max
|
||||
#endif
|
||||
#define max(x, y) (((x) > (y)) ? (x) : (y))
|
||||
|
||||
template<int min, int max, typename T> inline T minmax(const T x) {
|
||||
|
@ -173,6 +169,8 @@ enum { b = 1U << (bits - 1), m = (1U << bits) - 1 };
|
|||
return ((x & m) ^ b) - b;
|
||||
}
|
||||
|
||||
//bit shifting functions are deprecated
|
||||
|
||||
template<int n, typename T> inline T rol(const T x) {
|
||||
enum { s = (sizeof(T) << 3) - n };
|
||||
return (x << n) | (x >> s);
|
||||
|
|
|
@ -61,14 +61,14 @@ tclr_addr_a(0x4e, &~) {
|
|||
5:op_writeaddr(dp, rd $1 regs.a);
|
||||
}
|
||||
|
||||
incw_dp(0x3a, rd++),
|
||||
decw_dp(0x1a, rd--) {
|
||||
incw_dp(0x3a, ++),
|
||||
decw_dp(0x1a, --) {
|
||||
1:dp = op_readpc();
|
||||
2:rd = op_readdp(dp);
|
||||
$1;
|
||||
rd$1;
|
||||
3:op_writedp(dp++, rd);
|
||||
4:rd += op_readdp(dp) << 8;
|
||||
5:op_write(dp, rd >> 8);
|
||||
5:op_writedp(dp, rd >> 8);
|
||||
regs.p.n = !!(rd & 0x8000);
|
||||
regs.p.z = (rd == 0);
|
||||
}
|
||||
|
|
|
@ -212,7 +212,7 @@ void sSMP::op_incw_dp() {
|
|||
rd++;
|
||||
op_writedp(dp++, rd);
|
||||
rd += op_readdp(dp) << 8;
|
||||
op_write(dp, rd >> 8);
|
||||
op_writedp(dp, rd >> 8);
|
||||
regs.p.n = !!(rd & 0x8000);
|
||||
regs.p.z = (rd == 0);
|
||||
}
|
||||
|
@ -223,7 +223,7 @@ void sSMP::op_decw_dp() {
|
|||
rd--;
|
||||
op_writedp(dp++, rd);
|
||||
rd += op_readdp(dp) << 8;
|
||||
op_write(dp, rd >> 8);
|
||||
op_writedp(dp, rd >> 8);
|
||||
regs.p.n = !!(rd & 0x8000);
|
||||
regs.p.z = (rd == 0);
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ struct Video {
|
|||
static IntegerSetting synchronize;
|
||||
static IntegerSetting fullscreen;
|
||||
static IntegerSetting multiplier, aspect_correction, region;
|
||||
static IntegerSetting aspect_ntsc_x, aspect_ntsc_y, aspect_pal_x, aspect_pal_y;
|
||||
static IntegerSetting hardware_filter, software_filter;
|
||||
static IntegerSetting frameskip;
|
||||
static IntegerSetting use_vram;
|
||||
|
@ -40,10 +41,19 @@ IntegerSetting Video::multiplier(&config_file, "video.multiplier", "Video output
|
|||
"2 = 2x (~512x448)\n"
|
||||
"etc.",
|
||||
IntegerSetting::Decimal, 2);
|
||||
IntegerSetting Video::aspect_correction(&config_file, "video.aspect_correction", "Correct video aspect ratio", IntegerSetting::Boolean, true);
|
||||
IntegerSetting Video::aspect_correction(&config_file, "video.aspect_correction",
|
||||
"Correct video aspect ratio\n"
|
||||
"Formula: width = width * video.aspect_<region>_x / video.aspect_<region>_y",
|
||||
IntegerSetting::Boolean, true);
|
||||
IntegerSetting Video::region(&config_file, "video.region", "Video output region\n"
|
||||
"0 = NTSC, 1 = PAL",
|
||||
IntegerSetting::Decimal, 0);
|
||||
|
||||
IntegerSetting Video::aspect_ntsc_x(&config_file, "video.aspect_ntsc_x", "", IntegerSetting::Decimal, 54);
|
||||
IntegerSetting Video::aspect_ntsc_y(&config_file, "video.aspect_ntsc_y", "", IntegerSetting::Decimal, 47);
|
||||
IntegerSetting Video::aspect_pal_x (&config_file, "video.aspect_pal_x", "", IntegerSetting::Decimal, 32);
|
||||
IntegerSetting Video::aspect_pal_y (&config_file, "video.aspect_pal_y", "", IntegerSetting::Decimal, 23);
|
||||
|
||||
IntegerSetting Video::hardware_filter(&config_file, "video.hardware_filter", "Video hardware filter\n"
|
||||
"0 = Point\n"
|
||||
"1 = Linear\n",
|
||||
|
|
|
@ -16,10 +16,10 @@ uint multiplier = minmax<1, 5>(uint(config::video.multiplier));
|
|||
width *= multiplier;
|
||||
height *= multiplier;
|
||||
if(config::video.aspect_correction == true) {
|
||||
if(config::video.region == 0) {
|
||||
width = uint( double(width) * 54.0 / 47.0 ); //NTSC
|
||||
} else {
|
||||
width = uint( double(width) * 32.0 / 23.0 ); //PAL
|
||||
if(config::video.region == 0) { //NTSC
|
||||
width = uint( double(width) * double(config::video.aspect_ntsc_x) / double(config::video.aspect_ntsc_y) );
|
||||
} else { //PAL
|
||||
width = uint( double(width) * double(config::video.aspect_pal_x) / double(config::video.aspect_pal_y) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ ui::ControlGroup group;
|
|||
|
||||
menu.create(*this);
|
||||
menu_file.create(menu, "File");
|
||||
menu_file_load.create(menu_file, "Load Cartridge");
|
||||
menu_file_load.create(menu_file, "Load Cartridge ...");
|
||||
menu_file_unload.create(menu_file, "Unload");
|
||||
menu_file_sep1.create(menu_file);
|
||||
menu_file_reset.create(menu_file, "Reset");
|
||||
|
@ -216,7 +216,7 @@ ui::ControlGroup group;
|
|||
menu_settings_speedreg.finish();
|
||||
|
||||
menu_settings_sep3.create(menu_settings);
|
||||
menu_settings_config.create(menu_settings, "Configuration");
|
||||
menu_settings_config.create(menu_settings, "Configuration ...");
|
||||
menu_settings.finish();
|
||||
|
||||
menu_misc.create(menu, "Misc");
|
||||
|
|
Loading…
Reference in New Issue