[mednafen] 01/03: Imported Upstream version 0.9.38.3+dfsg

Stephen Kitt skitt at moszumanska.debian.org
Mon Mar 9 22:57:31 UTC 2015


This is an automated email from the git hooks/post-receive script.

skitt pushed a commit to branch master
in repository mednafen.

commit 9a7d2389effb255851e7deba9c8bcfdd451f369d
Author: Stephen Kitt <steve at sk2.org>
Date:   Mon Mar 9 23:41:57 2015 +0100

    Imported Upstream version 0.9.38.3+dfsg
---
 ChangeLog                       | 22 ++++++++++++++++++++++
 Documentation/gb.html           |  2 +-
 Documentation/gba.html          |  2 +-
 Documentation/gg.html           |  2 +-
 Documentation/lynx.html         |  2 +-
 Documentation/md.html           |  2 +-
 Documentation/mednafen.html     |  2 +-
 Documentation/modules.def       |  2 +-
 Documentation/nes.html          |  2 +-
 Documentation/netplay.html      |  2 +-
 Documentation/ngp.html          |  2 +-
 Documentation/pce.html          |  2 +-
 Documentation/pce_fast.html     |  2 +-
 Documentation/pcfx.html         |  2 +-
 Documentation/psx.html          |  2 +-
 Documentation/sms.html          |  2 +-
 Documentation/snes.html         |  2 +-
 Documentation/vb.html           |  2 +-
 Documentation/wswan.html        |  2 +-
 TODO                            |  3 +++
 configure                       |  2 +-
 configure.ac                    |  2 +-
 src/drivers/main.cpp            |  7 +------
 src/drivers/video.cpp           | 12 +++++++-----
 src/drivers/video.h             |  2 --
 src/hw_cpu/c68k/c68kmac.inc     |  4 ++--
 src/md/vdp.cpp                  | 16 ++++++++--------
 src/mednafen.cpp                |  7 ++++++-
 src/nes/boards/fme7.cpp         |  2 +-
 src/netplay.cpp                 |  6 ++++++
 src/psx/cdc.cpp                 | 14 ++++++++++++--
 src/psx/gpu.cpp                 |  2 +-
 src/psx/notes/PROBLEMATIC-GAMES |  3 +++
 src/psx/notes/PSX-TODO          |  8 --------
 src/psx/psx.cpp                 |  2 +-
 src/tests.cpp                   | 19 +++++++++++++++++++
 36 files changed, 112 insertions(+), 57 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 52bb471..a388d0e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+-- 0.9.38.3: --
+
+March 4, 2015:
+	NES: Fixed mapper 69 IRQ acknowledge behavior, per tip from tepples.
+
+February 24, 2015:
+	MD: Fixed an out-of-bounds array access in the 68K emulation code.
+
+	Avoid passing NULL to memcpy() in netplay.cpp.
+
+	MD: Fixed some code doing misaligned memory writes in vdp.cpp.
+
+February 23, 2015:
+	Avoid blitting to the screen when visibility is lost(i.e. window is minimized), to reduce CPU usage and to prevent memory usage from skyrocketing on
+	Windows under certain conditions.
+
+February 22, 2015:
+	PSX: Tweaked non-logical CD seek emulation to fix lockups in some versions of "Tomb Raider".
+
+February 17, 2015:
+	PSX: Fixed Justifier and GunCon x position being off when setting "psx.h_overscan" is set to "0".
+
 -- 0.9.38.2: --
 
 February 15, 2015:
diff --git a/Documentation/gb.html b/Documentation/gb.html
index dacfa7b..8fc82e2 100644
--- a/Documentation/gb.html
+++ b/Documentation/gb.html
@@ -9,7 +9,7 @@
  <body>
   <center><h1><img alt="Mednafen" src="mednafen.png" width="696" height="204"></h1></center>
   <center><h1>Game Boy (Color) Documentation</h1></center>
-  <center><i>Last updated February 16, 2015<br>Valid as of 0.9.38.2</i></center>
+  <center><i>Last updated March  4, 2015<br>Valid as of 0.9.38.3</i></center>
  <p></p>
  <b>Table of Contents:</b>
  <ul><li><a href="#Introduction">Introduction</a><ul></ul></li><li><a href="#Default+Key+Assignments">Default Key Assignments</a><ul></ul></li><li><a href="#Settings+Reference">Settings Reference</a><ul></ul></li></ul><hr width="100%">
diff --git a/Documentation/gba.html b/Documentation/gba.html
index 6c0e682..b5d4eb0 100644
--- a/Documentation/gba.html
+++ b/Documentation/gba.html
@@ -9,7 +9,7 @@
  <body>
   <center><h1><img alt="Mednafen" src="mednafen.png" width="696" height="204"></h1></center>
   <center><h1>Game Boy Advance Documentation</h1></center>
-  <center><i>Last updated February 16, 2015<br>Valid as of 0.9.38.2</i></center>
+  <center><i>Last updated March  4, 2015<br>Valid as of 0.9.38.3</i></center>
  <p></p>
  <b>Table of Contents:</b>
  <ul><li><a href="#Introduction">Introduction</a><ul><li><a href="#Introduction%01BIOS">BIOS</a><ul></ul></li><li><a href="#Introduction%01Custom+Palettes">Custom Palettes</a><ul></ul></li><li><a href="#Introduction%01Backup+Memory+Type">Backup Memory Type</a><ul></ul></li></ul></li><li><a href="#Default+Key+Assignments">Default Key Assignments</a><ul></ul></li><li><a href="#Settings+Reference">Settings Reference</a><ul></ul></li></ul><hr width="100%">
diff --git a/Documentation/gg.html b/Documentation/gg.html
index 4fd5789..7b247ae 100644
--- a/Documentation/gg.html
+++ b/Documentation/gg.html
@@ -9,7 +9,7 @@
  <body>
   <center><h1><img alt="Mednafen" src="mednafen.png" width="696" height="204"></h1></center>
   <center><h1>Sega Game Gear Documentation</h1></center>
-  <center><i>Last updated February 16, 2015<br>Valid as of 0.9.38.2</i></center>
+  <center><i>Last updated March  4, 2015<br>Valid as of 0.9.38.3</i></center>
  <p></p>
  <b>Table of Contents:</b>
  <ul><li><a href="#Introduction">Introduction</a><ul></ul></li><li><a href="#Settings+Reference">Settings Reference</a><ul></ul></li></ul><hr width="100%">
diff --git a/Documentation/lynx.html b/Documentation/lynx.html
index 9b9d9c9..04468cf 100644
--- a/Documentation/lynx.html
+++ b/Documentation/lynx.html
@@ -9,7 +9,7 @@
  <body>
   <center><h1><img alt="Mednafen" src="mednafen.png" width="696" height="204"></h1></center>
   <center><h1>Atari Lynx Documentation</h1></center>
-  <center><i>Last updated February 16, 2015<br>Valid as of 0.9.38.2</i></center>
+  <center><i>Last updated March  4, 2015<br>Valid as of 0.9.38.3</i></center>
  <p></p>
  <b>Table of Contents:</b>
  <ul><li><a href="#Introduction">Introduction</a><ul></ul></li><li><a href="#Default+Key+Assignments">Default Key Assignments</a><ul></ul></li><li><a href="#Settings+Reference">Settings Reference</a><ul></ul></li></ul><hr width="100%">
diff --git a/Documentation/md.html b/Documentation/md.html
index 71874f3..f90ff7f 100644
--- a/Documentation/md.html
+++ b/Documentation/md.html
@@ -9,7 +9,7 @@
  <body>
   <center><h1><img alt="Mednafen" src="mednafen.png" width="696" height="204"></h1></center>
   <center><h1>Sega Genesis/MegaDrive Documentation</h1></center>
-  <center><i>Last updated February 16, 2015<br>Valid as of 0.9.38.2</i></center>
+  <center><i>Last updated March  4, 2015<br>Valid as of 0.9.38.3</i></center>
  <p></p>
  <b>Table of Contents:</b>
  <ul><li><a href="#Introduction">Introduction</a><ul></ul></li><li><a href="#Settings+Reference">Settings Reference</a><ul></ul></li></ul><hr width="100%">
diff --git a/Documentation/mednafen.html b/Documentation/mednafen.html
index b15f225..20bf2b4 100644
--- a/Documentation/mednafen.html
+++ b/Documentation/mednafen.html
@@ -9,7 +9,7 @@
  <body>
   <center><h1><img alt="Mednafen" src="mednafen.png" width="696" height="204"></h1></center>
   <center><h1>General Documentation</h1></center>
-  <center><i>Last updated February 16, 2015<br>Valid as of 0.9.38.2</i></center>
+  <center><i>Last updated March  4, 2015<br>Valid as of 0.9.38.3</i></center>
  <p></p>
  <b>Table of Contents:</b>
  <ul><li><a href="#Introduction">Introduction</a><ul><li><a href="#Section_base_directory">Base Directory</a><ul></ul></li></ul></li><li><a href="#Core+Features">Core Features</a><ul><li><a href="#Section_cdrom_emulation">CD Emulation</a><ul><li><a href="#Core+Features%01CD+Emulation%01Compact+Disc+Images">Compact Disc Images</a><ul></ul></li><li><a href="#Section_multicd_games">Multiple-CD Games</a><ul></ul></li><li><a href="#Section_cdg">CD+G</a><ul></ul></li><li><a href="#Section_phot [...]
diff --git a/Documentation/modules.def b/Documentation/modules.def
index d1a93b9..058980c 100644
--- a/Documentation/modules.def
+++ b/Documentation/modules.def
@@ -1,4 +1,4 @@
-0.9.38.2
+0.9.38.3
 nes
 Nintendo Entertainment System/Famicom
 256
diff --git a/Documentation/nes.html b/Documentation/nes.html
index 66a25db..445e44b 100644
--- a/Documentation/nes.html
+++ b/Documentation/nes.html
@@ -9,7 +9,7 @@
  <body>
   <center><h1><img alt="Mednafen" src="mednafen.png" width="696" height="204"></h1></center>
   <center><h1>Nintendo Entertainment System/Famicom Documentation</h1></center>
-  <center><i>Last updated February 16, 2015<br>Valid as of 0.9.38.2</i></center>
+  <center><i>Last updated March  4, 2015<br>Valid as of 0.9.38.3</i></center>
  <p></p>
  <b>Table of Contents:</b>
  <ul><li><a href="#Introduction">Introduction</a><ul><li><a href="#Introduction%01Custom+Palettes">Custom Palettes</a><ul></ul></li><li><a href="#Introduction%01Input">Input</a><ul><li><a href="#Introduction%01Input%01Zapper">Zapper</a><ul></ul></li></ul></li><li><a href="#Introduction%01File+Formats">File Formats</a><ul><li><a href="#Introduction%01File+Formats%01iNES+Format">iNES Format</a><ul></ul></li><li><a href="#Introduction%01File+Formats%01UNIF">UNIF</a><ul></ul></li></ul></li>< [...]
diff --git a/Documentation/netplay.html b/Documentation/netplay.html
index 7f0f3f6..db83f51 100644
--- a/Documentation/netplay.html
+++ b/Documentation/netplay.html
@@ -9,7 +9,7 @@
  <body>
   <center><h1><img alt="Mednafen" src="mednafen.png" width="696" height="204"></h1></center>
   <center><h1>Netplay Documentation</h1></center>
-  <center><i>Last updated February 16, 2015<br>Valid as of 0.9.38.2</i></center>
+  <center><i>Last updated March  4, 2015<br>Valid as of 0.9.38.3</i></center>
  <p></p>
  <b>Table of Contents:</b>
  <ul><li><a href="#Introduction">Introduction</a><ul></ul></li><li><a href="#Setting+up+the+Server">Setting up the Server</a><ul></ul></li><li><a href="#Using+Mednafen%27s+netplay+console">Using Mednafen's netplay console</a><ul></ul></li></ul><hr width="100%">
diff --git a/Documentation/ngp.html b/Documentation/ngp.html
index b56d76c..7d756e4 100644
--- a/Documentation/ngp.html
+++ b/Documentation/ngp.html
@@ -9,7 +9,7 @@
  <body>
   <center><h1><img alt="Mednafen" src="mednafen.png" width="696" height="204"></h1></center>
   <center><h1>Neo Geo Pocket (Color) Documentation</h1></center>
-  <center><i>Last updated February 16, 2015<br>Valid as of 0.9.38.2</i></center>
+  <center><i>Last updated March  4, 2015<br>Valid as of 0.9.38.3</i></center>
  <p></p>
  <b>Table of Contents:</b>
  <ul><li><a href="#Introduction">Introduction</a><ul></ul></li><li><a href="#Default+Key+Assignments">Default Key Assignments</a><ul></ul></li><li><a href="#Settings+Reference">Settings Reference</a><ul></ul></li></ul><hr width="100%">
diff --git a/Documentation/pce.html b/Documentation/pce.html
index c9b722d..4ba1a3b 100644
--- a/Documentation/pce.html
+++ b/Documentation/pce.html
@@ -9,7 +9,7 @@
  <body>
   <center><h1><img alt="Mednafen" src="mednafen.png" width="696" height="204"></h1></center>
   <center><h1>PC Engine/TurboGrafx 16 (CD)/SuperGrafx Documentation</h1></center>
-  <center><i>Last updated February 16, 2015<br>Valid as of 0.9.38.2</i></center>
+  <center><i>Last updated March  4, 2015<br>Valid as of 0.9.38.3</i></center>
  <p></p>
  <b>Table of Contents:</b>
  <ul><li><a href="#Introduction">Introduction</a><ul></ul></li><li><a href="#Custom+Palettes">Custom Palettes</a><ul></ul></li><li><a href="#Default+Key+Assignments">Default Key Assignments</a><ul></ul></li><li><a href="#Advanced+Usage">Advanced Usage</a><ul><li><a href="#Advanced+Usage%01Accidental+Soft+Resets">Accidental Soft Resets</a><ul></ul></li><li><a href="#Advanced+Usage%01Sprite+Flickering">Sprite Flickering</a><ul></ul></li><li><a href="#Advanced+Usage%01Obnoxious+Sound+Effect [...]
diff --git a/Documentation/pce_fast.html b/Documentation/pce_fast.html
index 6c9df7c..f312508 100644
--- a/Documentation/pce_fast.html
+++ b/Documentation/pce_fast.html
@@ -9,7 +9,7 @@
  <body>
   <center><h1><img alt="Mednafen" src="mednafen.png" width="696" height="204"></h1></center>
   <center><h1>PC Engine (CD)/TurboGrafx 16 (CD)/SuperGrafx Documentation</h1></center>
-  <center><i>Last updated February 16, 2015<br>Valid as of 0.9.38.2</i></center>
+  <center><i>Last updated March  4, 2015<br>Valid as of 0.9.38.3</i></center>
  <p></p>
  <b>Table of Contents:</b>
  <ul><li><a href="#Introduction">Introduction</a><ul></ul></li><li><a href="#Settings+Reference">Settings Reference</a><ul></ul></li></ul><hr width="100%">
diff --git a/Documentation/pcfx.html b/Documentation/pcfx.html
index ea142ab..83e0d51 100644
--- a/Documentation/pcfx.html
+++ b/Documentation/pcfx.html
@@ -9,7 +9,7 @@
  <body>
   <center><h1><img alt="Mednafen" src="mednafen.png" width="696" height="204"></h1></center>
   <center><h1>PC-FX Documentation</h1></center>
-  <center><i>Last updated February 16, 2015<br>Valid as of 0.9.38.2</i></center>
+  <center><i>Last updated March  4, 2015<br>Valid as of 0.9.38.3</i></center>
  <p></p>
  <b>Table of Contents:</b>
  <ul><li><a href="#Introduction">Introduction</a><ul></ul></li><li><a href="#Section_firmware_bios">Firmware/BIOS</a><ul></ul></li><li><a href="#Default+Key+Assignments">Default Key Assignments</a><ul></ul></li><li><a href="#Settings+Reference">Settings Reference</a><ul></ul></li></ul><hr width="100%">
diff --git a/Documentation/psx.html b/Documentation/psx.html
index e5f3c69..c68f2bd 100644
--- a/Documentation/psx.html
+++ b/Documentation/psx.html
@@ -9,7 +9,7 @@
  <body>
   <center><h1><img alt="Mednafen" src="mednafen.png" width="696" height="204"></h1></center>
   <center><h1>Sony PlayStation Documentation</h1></center>
-  <center><i>Last updated February 16, 2015<br>Valid as of 0.9.38.2</i></center>
+  <center><i>Last updated March  4, 2015<br>Valid as of 0.9.38.3</i></center>
  <p></p>
  <b>Table of Contents:</b>
  <ul><li><a href="#Section_intro">Introduction</a><ul></ul></li><li><a href="#Section_firmware_bios">Firmware/BIOS</a><ul></ul></li><li><a href="#Analog+Sticks+Range+Issues">Analog Sticks Range Issues</a><ul></ul></li><li><a href="#Section_multitap">Multitap Usage</a><ul></ul></li><li><a href="#Settings+Reference">Settings Reference</a><ul></ul></li></ul><hr width="100%">
diff --git a/Documentation/sms.html b/Documentation/sms.html
index e95fc5c..452fef4 100644
--- a/Documentation/sms.html
+++ b/Documentation/sms.html
@@ -9,7 +9,7 @@
  <body>
   <center><h1><img alt="Mednafen" src="mednafen.png" width="696" height="204"></h1></center>
   <center><h1>Sega Master System Documentation</h1></center>
-  <center><i>Last updated February 16, 2015<br>Valid as of 0.9.38.2</i></center>
+  <center><i>Last updated March  4, 2015<br>Valid as of 0.9.38.3</i></center>
  <p></p>
  <b>Table of Contents:</b>
  <ul><li><a href="#Introduction">Introduction</a><ul></ul></li><li><a href="#Settings+Reference">Settings Reference</a><ul></ul></li></ul><hr width="100%">
diff --git a/Documentation/snes.html b/Documentation/snes.html
index 0a121aa..8e1faf4 100644
--- a/Documentation/snes.html
+++ b/Documentation/snes.html
@@ -9,7 +9,7 @@
  <body>
   <center><h1><img alt="Mednafen" src="mednafen.png" width="696" height="204"></h1></center>
   <center><h1>Super Nintendo Entertainment System/Super Famicom Documentation</h1></center>
-  <center><i>Last updated February 16, 2015<br>Valid as of 0.9.38.2</i></center>
+  <center><i>Last updated March  4, 2015<br>Valid as of 0.9.38.3</i></center>
  <p></p>
  <b>Table of Contents:</b>
  <ul><li><a href="#Introduction">Introduction</a><ul></ul></li><li><a href="#Default+Key+Assignments">Default Key Assignments</a><ul></ul></li><li><a href="#Settings+Reference">Settings Reference</a><ul></ul></li></ul><hr width="100%">
diff --git a/Documentation/vb.html b/Documentation/vb.html
index 8bfeeec..5c3eb03 100644
--- a/Documentation/vb.html
+++ b/Documentation/vb.html
@@ -9,7 +9,7 @@
  <body>
   <center><h1><img alt="Mednafen" src="mednafen.png" width="696" height="204"></h1></center>
   <center><h1>Virtual Boy Documentation</h1></center>
-  <center><i>Last updated February 16, 2015<br>Valid as of 0.9.38.2</i></center>
+  <center><i>Last updated March  4, 2015<br>Valid as of 0.9.38.3</i></center>
  <p></p>
  <b>Table of Contents:</b>
  <ul><li><a href="#Introduction">Introduction</a><ul></ul></li><li><a href="#Settings+Reference">Settings Reference</a><ul></ul></li></ul><hr width="100%">
diff --git a/Documentation/wswan.html b/Documentation/wswan.html
index 1e24417..ea3a657 100644
--- a/Documentation/wswan.html
+++ b/Documentation/wswan.html
@@ -9,7 +9,7 @@
  <body>
   <center><h1><img alt="Mednafen" src="mednafen.png" width="696" height="204"></h1></center>
   <center><h1>WonderSwan Documentation</h1></center>
-  <center><i>Last updated February 16, 2015<br>Valid as of 0.9.38.2</i></center>
+  <center><i>Last updated March  4, 2015<br>Valid as of 0.9.38.3</i></center>
  <p></p>
  <b>Table of Contents:</b>
  <ul><li><a href="#Introduction">Introduction</a><ul></ul></li><li><a href="#Default+Key+Assignments">Default Key Assignments</a><ul></ul></li><li><a href="#Game-specific+Emulation+Hacks">Game-specific Emulation Hacks</a><ul></ul></li><li><a href="#Settings+Reference">Settings Reference</a><ul></ul></li></ul><hr width="100%">
diff --git a/TODO b/TODO
index 6e3b539..d6d0ce6 100644
--- a/TODO
+++ b/TODO
@@ -97,6 +97,9 @@ Backup memory:
 	Create a backup of the non-volatile memory(save-RAM) file the first time it is overwritten/replaced since emulator
 	startup(incidentally, in cases other than for PSX, this first time will generally occur on emulator exit).
 
+SNES:
+	src/ppu/render/oam.cpp:161:40: runtime error: index 32 out of bounds for type 'unsigned char [32]'
+
 PCE_FAST:
 	MWR latching!
 
diff --git a/configure b/configure
index e94e130..2577665 100755
--- a/configure
+++ b/configure
@@ -4328,7 +4328,7 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
 #
 # Avoid trailing and leading zeroes in the decimal version components to avoid confusing not-so-learned people.
 #
-MEDNAFEN_VERSION='0.9.38.2'
+MEDNAFEN_VERSION='0.9.38.3'
 MEDNAFEN_VERSION_NUMERIC=0x000938
 
 ac_aux_dir=
diff --git a/configure.ac b/configure.ac
index 36b4ac1..a541445 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,7 +6,7 @@ AC_CONFIG_MACRO_DIR([m4])
 #
 # Avoid trailing and leading zeroes in the decimal version components to avoid confusing not-so-learned people.
 #
-MEDNAFEN_VERSION='0.9.38.2'
+MEDNAFEN_VERSION='0.9.38.3'
 MEDNAFEN_VERSION_NUMERIC=0x000938
 
 AC_CANONICAL_HOST
diff --git a/src/drivers/main.cpp b/src/drivers/main.cpp
index b9ee0c7..36b5408 100644
--- a/src/drivers/main.cpp
+++ b/src/drivers/main.cpp
@@ -589,7 +589,7 @@ static void MakeMednafenArgsStruct(void)
  for(sit = settings->begin(); sit != settings->end(); sit++)
  {
   MDFN_Internal_Args[x].name = strdup(sit->second.name);
-  MDFN_Internal_Args[x].description = _(sit->second.desc->description);
+  MDFN_Internal_Args[x].description = sit->second.desc->description ? _(sit->second.desc->description) : NULL;
   MDFN_Internal_Args[x].var = NULL;
   MDFN_Internal_Args[x].subs = (void *)HokeyPokeyFallDown;
   MDFN_Internal_Args[x].substype = SUBSTYPE_FUNCTION;
@@ -1293,11 +1293,6 @@ void PumpWrap(void)
 			{
 			 SendCEvent_to_GT(CEVT_SET_INPUT_FOCUS, (char*)0 + (bool)event.active.gain, NULL);
 			}
-
-			if(event.active.state & SDL_APPACTIVE)
-			{
-			 VideoAppActive((bool)(event.active.gain));
-			}
 			break;
 
    case SDL_SYSWMEVENT: break;
diff --git a/src/drivers/video.cpp b/src/drivers/video.cpp
index a89833b..b41fc9e 100644
--- a/src/drivers/video.cpp
+++ b/src/drivers/video.cpp
@@ -1129,11 +1129,6 @@ void BlitRaw(MDFN_Surface *src, const MDFN_Rect *src_rect, const MDFN_Rect *dest
   MarkNeedBBClear();
 }
 
-void VideoAppActive(bool gain)
-{
- //printf("AppActive: %u\n", gain);
-}
-
 static bool IsInternalMessageActive(void)
 {
  return(MDFND_GetTime() < howlong);
@@ -1375,6 +1370,13 @@ void BlitScreen(MDFN_Surface *msurface, const MDFN_Rect *DisplayRect, const int3
 
  if(!screen) return;
 
+ //
+ // Reduce CPU usage when minimized, and prevent OpenGL memory quasi-leaks on Windows(though I have the feeling there's a
+ // cleaner less-racey way to prevent that memory leak problem).
+ //
+ if(!(SDL_GetAppState() & SDL_APPACTIVE))
+  return;
+
  if(NeedClear)
  {
   uint32 ct = MDFND_GetTime();
diff --git a/src/drivers/video.h b/src/drivers/video.h
index 908a360..7b11a99 100644
--- a/src/drivers/video.h
+++ b/src/drivers/video.h
@@ -14,8 +14,6 @@ int32 Video_PtoV_J(const int32 inv, const bool axis, const bool scr_scale);
 
 void BlitScreen(MDFN_Surface *, const MDFN_Rect *DisplayRect, const int32 *LineWidths, const int InterlaceField, const bool take_ssnapshot);
 
-void VideoAppActive(bool gain);
-
 int VideoResize(int nw, int nh);
 
 void VideoShowMessage(char *text);
diff --git a/src/hw_cpu/c68k/c68kmac.inc b/src/hw_cpu/c68k/c68kmac.inc
index b20c9cb..bf3bd29 100644
--- a/src/hw_cpu/c68k/c68kmac.inc
+++ b/src/hw_cpu/c68k/c68kmac.inc
@@ -193,8 +193,8 @@ static INLINE u32 C68k_Read_Long(c68k_struc *cpu, u32 adr)
     PC += 2;                \
                             \
     adr += (s32)((s8)(ext));                            \
-    if (ext & 0x0800) adr += (s32) CPU->D[ext >> 12];   \
-    else adr += (s32)((s16)(CPU->D[ext >> 12]));        \
+    if (ext & 0x0800) adr += (s32) CPU->DA[ext >> 12];  \
+    else adr += (s32)((s16)(CPU->DA[ext >> 12]));       \
 }
 
 #define GET_CCR                                     \
diff --git a/src/md/vdp.cpp b/src/md/vdp.cpp
index 18722ae..93357b1 100644
--- a/src/md/vdp.cpp
+++ b/src/md/vdp.cpp
@@ -785,13 +785,13 @@ void MDVDP::StateAction(StateMem *sm, const unsigned load, const bool data_only)
 #define DRAW_COLUMN(ATTR, LINE) \
     atex = atex_table[(ATTR >> 13) & 7]; \
     src = &bg_pattern_cache[(ATTR & 0x1FFF) << 4 | (LINE)]; \
-    *dst++ = (*src++ | atex); \
-    *dst++ = (*src++ | atex); \
+    MDFN_ennsb<uint32, false>(dst++, (*src++ | atex)); \
+    MDFN_ennsb<uint32, false>(dst++, (*src++ | atex)); \
     ATTR >>= 16; \
     atex = atex_table[(ATTR >> 13) & 7]; \
     src = &bg_pattern_cache[(ATTR & 0x1FFF) << 4 | (LINE)]; \
-    *dst++ = (*src++ | atex); \
-    *dst++ = (*src++ | atex);
+    MDFN_ennsb<uint32, false>(dst++, (*src++ | atex)); \
+    MDFN_ennsb<uint32, false>(dst++, (*src++ | atex));
 
 /* Draw a single 16-pixel column */
 #define DRAW_COLUMN_IM2(ATTR, LINE) \
@@ -799,15 +799,15 @@ void MDVDP::StateAction(StateMem *sm, const unsigned load, const bool data_only)
     offs = (ATTR & 0x03FF) << 5 | (ATTR & 0x1800) << 4 | (LINE); \
     if(ATTR & 0x1000) offs ^= 0x10; \
     src = &bg_pattern_cache[offs]; \
-    *dst++ = (*src++ | atex); \
-    *dst++ = (*src++ | atex); \
+    MDFN_ennsb<uint32, false>(dst++, (*src++ | atex)); \
+    MDFN_ennsb<uint32, false>(dst++, (*src++ | atex)); \
     ATTR >>= 16; \
     atex = atex_table[(ATTR >> 13) & 7]; \
     offs = (ATTR & 0x03FF) << 5 | (ATTR & 0x1800) << 4 | (LINE); \
     if(ATTR & 0x1000) offs ^= 0x10; \
     src = &bg_pattern_cache[offs]; \
-    *dst++ = (*src++ | atex); \
-    *dst++ = (*src++ | atex);
+    MDFN_ennsb<uint32, false>(dst++, (*src++ | atex)); \
+    MDFN_ennsb<uint32, false>(dst++, (*src++ | atex));
 
 /*
     gcc complains about this:
diff --git a/src/mednafen.cpp b/src/mednafen.cpp
index 810d806..0424928 100644
--- a/src/mednafen.cpp
+++ b/src/mednafen.cpp
@@ -575,8 +575,13 @@ static void PrintDiscsLayout(std::vector<CDIF *> *ifaces)
 
     eff_lt = track;
 
-    MDFN_printf(_("Track %2d, LBA: %6d  %s%s\n"),
+    uint8 m, s, f;
+
+    CDUtility::LBA_to_AMSF(toc.tracks[track].lba, &m, &s, &f);
+
+    MDFN_printf(_("Track %2d, MSF: %02d:%02d:%02d, LBA: %6d  %s%s\n"),
 		track,
+		m, s, f,
 		toc.tracks[track].lba,
 		(toc.tracks[track].control & 0x4) ? "DATA" : "AUDIO",
 		(track < toc.first_track || track > toc.last_track) ? _(" (Hidden)") : "");
diff --git a/src/nes/boards/fme7.cpp b/src/nes/boards/fme7.cpp
index 93c390f..8cf27d6 100644
--- a/src/nes/boards/fme7.cpp
+++ b/src/nes/boards/fme7.cpp
@@ -134,7 +134,7 @@ static DECLFW(Mapper69_write)
                 case 0xb: PRGRegs[2] = V & 0x3F; SyncPRG(); break;
                 case 0xc: Mirroring = V & 0x3; SyncMirroring(); break;
 
-             case 0xd:IRQa=V; if(!(V&0x80)) X6502_IRQEnd(MDFN_IQEXT); break;
+             case 0xd:IRQa=V; X6502_IRQEnd(MDFN_IQEXT); break;
              case 0xe:IRQCount&=0xFF00;IRQCount|=V;break;
              case 0xf:IRQCount&=0x00FF;IRQCount|=V<<8;break;
              }
diff --git a/src/netplay.cpp b/src/netplay.cpp
index 86ebc4e..fb02804 100644
--- a/src/netplay.cpp
+++ b/src/netplay.cpp
@@ -1027,6 +1027,9 @@ void Netplay_Update(const uint32 PortDevIdx[], uint8* const PortData[], const ui
 
    for(unsigned x = 0, wpos = 1; x < NumPorts; x++)
    {
+    if(!PortLen[x])
+     continue;
+
     memcpy(PreNPPortDataPortData[x].data(), PortData[x], PortLen[x]);
 
     auto n = PortVtoLVMap[x];
@@ -1079,6 +1082,9 @@ void Netplay_PostProcess(const uint32 PortDevIdx[], uint8* const PortData[], con
  //
  for(unsigned x = 0; x < NumPorts; x++)
  {
+  if(!PortLen[x])
+   continue;
+
   assert(PostEmulatePortData[x].size() == PortLen[x]);
   assert(PreNPPortDataPortData[x].size() == PortLen[x]);
 
diff --git a/src/psx/cdc.cpp b/src/psx/cdc.cpp
index 8c0ea01..ed24d85 100644
--- a/src/psx/cdc.cpp
+++ b/src/psx/cdc.cpp
@@ -1140,8 +1140,18 @@ pscpu_timestamp_t PS_CDC::Update(const pscpu_timestamp_t timestamp)
     else if(DriveStatus == DS_SEEKING)
     {
      CurSector = SeekTarget;
-     Cur_CDIF->ReadRawSectorPWOnly(pwbuf, CurSector, false);
-     DecodeSubQ(pwbuf);
+
+     //
+     // CurSector + x for "Tomb Raider"'s sake, as it relies on behavior that we can't emulate very well without a more accurate CD drive
+     // emulation model.
+     //
+     for(int x = -1; x >= -16; x--)
+     {
+      //printf("%d\n", CurSector + x);
+      Cur_CDIF->ReadRawSectorPWOnly(pwbuf, CurSector + x, false);
+      if(DecodeSubQ(pwbuf))
+       break;
+     }
 
      DriveStatus = StatusAfterSeek;
 
diff --git a/src/psx/gpu.cpp b/src/psx/gpu.cpp
index 4adb508..7b885b0 100644
--- a/src/psx/gpu.cpp
+++ b/src/psx/gpu.cpp
@@ -154,7 +154,7 @@ void PS_GPU::FillVideoParams(MDFNGI* gi)
  // For Justifier and Guncon.
  //
  gi->mouse_scale_x = (float)gi->lcm_width / gi->nominal_width;
- gi->mouse_offs_x = 0;
+ gi->mouse_offs_x = (float)(2800 - gi->lcm_width) / 2;
 
  gi->mouse_scale_y = 1.0;
  gi->mouse_offs_y = LineVisFirst;
diff --git a/src/psx/notes/PROBLEMATIC-GAMES b/src/psx/notes/PROBLEMATIC-GAMES
index b76d66b..f8ad908 100644
--- a/src/psx/notes/PROBLEMATIC-GAMES
+++ b/src/psx/notes/PROBLEMATIC-GAMES
@@ -119,3 +119,6 @@ MLB 99
 
 Wu-Tang - Shaolin Style
 	Requires proper handling of the case of CD-DA playing into the leadout area.
+
+Tomb Raider
+	Relies on low-level CD drive behavior in regards to Q subchannel data(read via GetlocP) after a SeekP.
diff --git a/src/psx/notes/PSX-TODO b/src/psx/notes/PSX-TODO
index 48a415d..67abfd3 100644
--- a/src/psx/notes/PSX-TODO
+++ b/src/psx/notes/PSX-TODO
@@ -1,13 +1,5 @@
 ***Major issues***
 
-Tomb Raider(PAL)
-	(reported, and confirmed) "was fighting Tomb Raider PAL this night, when you get out of pool in Lara's home the game
-	bugs out: issues GetlocP, waits for it to complete and expects seek to be NOT complete (i.e. older location)"
-	Thoughts on emulating:
-		CalcSpinupTime()
-		DS_SPINUP
-		StatusAfterSpinup	ORRR we could scrap that StatusAfter* idea and have some kind of fancy function callback system...
-
 Monkey Hero
 	Locks up shortly after title screen.  It's straddling a framebuffer write command's parameters across two linked-list
 	blocks(2 words at the end of the first block, and 1 word at the beginning of the next block).  AFAIK, this construct will only
diff --git a/src/psx/psx.cpp b/src/psx/psx.cpp
index 2f490fe..fa1b6a0 100644
--- a/src/psx/psx.cpp
+++ b/src/psx/psx.cpp
@@ -1496,7 +1496,7 @@ static void DiscSanityChecks(void)
 
    if(!did_check)
    {
-    throw MDFN_Error(0, _("Disc %zu of %zu: No valid Q subchannel ADR_CURPOS data preset at lba 0-15?!"), i + 1, cdifs->size());
+    throw MDFN_Error(0, _("Disc %zu of %zu: No valid Q subchannel ADR_CURPOS data present at lba 0-15?!"), i + 1, cdifs->size());
    }
   }
  }
diff --git a/src/tests.cpp b/src/tests.cpp
index 6e423d2..b0db69c 100644
--- a/src/tests.cpp
+++ b/src/tests.cpp
@@ -831,6 +831,23 @@ static void RunExceptionTests(void)
  assert(z == 32);
 }
 
+std::vector<int> stltests_vec[2];
+
+static void NO_INLINE NO_CLONE RunSTLTests_Sub0(int v)
+{
+ stltests_vec[0].assign(v, v);
+}
+
+static void RunSTLTests(void)
+{
+ assert(stltests_vec[0] == stltests_vec[1]);
+ RunSTLTests_Sub0(0);
+ assert(stltests_vec[0] == stltests_vec[1]);
+ RunSTLTests_Sub0(1);
+ RunSTLTests_Sub0(0);
+ assert(stltests_vec[0] == stltests_vec[1]);
+}
+
 static void LZCount_Test(void)
 {
  for(uint32 i = 0, x = 0; i < 33; i++, x = (x << 1) + 1)
@@ -1296,6 +1313,8 @@ bool MDFN_RunMathTests(void)
 
  //RunThreadTests();
 
+ RunSTLTests();
+
  LZCount_Test();
 
  sha1_test();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mednafen.git



More information about the Pkg-games-commits mailing list