Skip to content

Commit

Permalink
Update Mednafen to 1.26.1
Browse files Browse the repository at this point in the history
  • Loading branch information
clobber committed Nov 14, 2020
1 parent 0f2cccb commit 542b95c
Show file tree
Hide file tree
Showing 59 changed files with 40,611 additions and 4,397 deletions.
2 changes: 1 addition & 1 deletion Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.25.0</string>
<string>1.26.1</string>
<key>NSPrincipalClass</key>
<string>OEGameCoreController</string>
<key>OEGameCoreClass</key>
Expand Down
8 changes: 4 additions & 4 deletions Mednafen.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -4749,9 +4749,9 @@
OTHER_CFLAGS = (
"-fwrapv",
"-DHAVE_MKDIR",
"-DMEDNAFEN_VERSION=\\\"1.25.0-UNSTABLE\\\"",
"-DMEDNAFEN_VERSION=\\\"1.26.1\\\"",
"-DPACKAGE=\\\"mednafen\\\"",
"-DMEDNAFEN_VERSION_NUMERIC=0x00102500",
"-DMEDNAFEN_VERSION_NUMERIC=0x00102601",
"-DPSS_STYLE=1",
"-DMPC_FIXED_POINT",
"-DARCH_X86",
Expand Down Expand Up @@ -4815,9 +4815,9 @@
OTHER_CFLAGS = (
"-fwrapv",
"-DHAVE_MKDIR",
"-DMEDNAFEN_VERSION=\\\"1.25.0-UNSTABLE\\\"",
"-DMEDNAFEN_VERSION=\\\"1.26.1\\\"",
"-DPACKAGE=\\\"mednafen\\\"",
"-DMEDNAFEN_VERSION_NUMERIC=0x00102500",
"-DMEDNAFEN_VERSION_NUMERIC=0x00102601",
"-DPSS_STYLE=1",
"-DMPC_FIXED_POINT",
"-DARCH_X86",
Expand Down
2,481 changes: 1,888 additions & 593 deletions mednafen/Makefile.in

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion mednafen/apple2/apple2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1450,7 +1450,7 @@ static void Load(GameFile* gf)
{
const std::string& giotype = gio_cfg[1];

if(gio_cfg.size() != (2 + (giotype == "gamepad" || giotype == "joystick")))
if(gio_cfg.size() != (unsigned)(2 + (giotype == "gamepad" || giotype == "joystick")))
throw MDFN_Error(0, _("Too many arguments for \"%s\" setting in MAI file."), "gameio");
else
{
Expand Down
4 changes: 2 additions & 2 deletions mednafen/apple2/disk2.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,7 @@ static void LoadAFD(Stream* sp, FloppyDisk* disk)
{
const uint8 header_magic[7] = { 'M', 'D', 'F', 'N', 'A', 'F', 'D' };
uint8 header[16];
uint32 version;
uint32 version MDFN_NOWARN_UNUSED;
bool bigendian;
if(sp->read(header, 16, false) != 16 || memcmp(header, header_magic, sizeof(header_magic)))
Expand Down Expand Up @@ -1840,7 +1840,7 @@ static void SetEverModified(FloppyDisk* disk)
disk->ever_modified = true;
}
static bool GetClearDiskDirty(FloppyDisk* disk)
static MDFN_NOWARN_UNUSED bool GetClearDiskDirty(FloppyDisk* disk)
{
bool ret = disk->dirty;
Expand Down
2 changes: 1 addition & 1 deletion mednafen/apple2/video.inc
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ static NO_INLINE void Tick(void)
if(text)
{
uint8 fd = FontData[((ram_data & 0x3F) << 3) | (VCounter & 0x7)];
bool invert = !(ram_data & 0x80) & (!(ram_data & 0x40) | !flashything);
bool invert = (!(ram_data & 0x80)) & (!(ram_data & 0x40) | !flashything);

if(invert)
fd ^= 0x7F;
Expand Down
18 changes: 18 additions & 0 deletions mednafen/cdrom/scsicd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,21 @@
** 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

/*
When changing CD read timing(throughput, and startup/seek delay), be sure to test:
4 in 1 Super CD (check for stuck note when starting "Gate of Thunder")
Downtown Nekketsu Monogatari (with text speed set to fast, quickly enter and exit store and listen to ADPCM playback for glitches)
Galaxy Fraulein Yuna HuVideo CD
It Came from the Desert
John Madden Duo Football
Kuusou Kagaku Sekai Gulliver Boy
Magical Fantasy Adventure: Popful Mail (third cutscene, check for glitches and hang)
Mirai Shonen Conan (check for hang after boat sinking cutscene)
Sherlock Holmes Consulting Detective
*/

#include <mednafen/mednafen.h>
#include <mednafen/cdrom/CDInterface.h>
#include <trio/trio.h>
Expand Down Expand Up @@ -1939,6 +1954,7 @@ static void DoREADBase(uint32 sa, uint32 sc)
uint32 Offset = sa - toc.tracks[Track].lba; //Cur_CDIF->GetTrackStartPositionLBA(Track);
SCSILog("SCSI", "Read: start=0x%08x(track=%d, offs=0x%08x), cnt=0x%08x", sa, Track, Offset, sc);
}
//const uint32 PrevSectorAddr = SectorAddr;

SectorAddr = sa;
SectorCount = sc;
Expand All @@ -1947,6 +1963,8 @@ static void DoREADBase(uint32 sa, uint32 sc)
Cur_CDIF->HintReadSector(sa); //, sa + sc);

CDReadTimer = (uint64)((WhichSystem == SCSICD_PCE) ? 8 : 1) * 2048 * System_Clock / CD_DATA_TRANSFER_RATE;
//printf("%d\n", SectorAddr - PrevSectorAddr);
//TODO?: CDReadTimer = (double)((WhichSystem == SCSICD_PCE) ? ((PrevSectorAddr == SectorAddr) ? 0.5 : 8) : 1) * 2048 * System_Clock / CD_DATA_TRANSFER_RATE;
}
else
{
Expand Down
4 changes: 2 additions & 2 deletions mednafen/compress/GZFileStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ uint64 GZFileStream::read(void *data, uint64 count, bool error_on_eof)
throw MDFN_Error(0, _("Error reading from opened file \"%s\": %s"), path_save.c_str(), errstring);
}

const uint64 read_count_u64 = (std::make_unsigned<decltype(read_count)>::type)read_count;
const uint64 read_count_u64 = (std::make_unsigned<std::remove_const<decltype(read_count)>::type>::type)read_count;

if(read_count_u64 != count && error_on_eof)
throw MDFN_Error(0, _("Error reading from opened file \"%s\": %s"), path_save.c_str(), _("Unexpected EOF"));
Expand Down Expand Up @@ -210,7 +210,7 @@ void GZFileStream::flush(void)
void GZFileStream::write(const void *data, uint64 count)
{
const auto write_count = gzwrite(gzp, data, count);
const uint64 write_count_u64 = (std::make_unsigned<decltype(write_count)>::type)write_count;
const uint64 write_count_u64 = (std::make_unsigned<std::remove_const<decltype(write_count)>::type>::type)write_count;

if(write_count_u64 != count)
{
Expand Down
Loading

0 comments on commit 542b95c

Please sign in to comment.