From e16ec7973fc94a48472e348003a32e95e3394757 Mon Sep 17 00:00:00 2001
From: Jason Flatt <jflatt@cox.net>
Date: Wed, 31 Jan 2024 07:48:37 -0800
Subject: [PATCH 1/3] Sync 0.262

---
 org.mamedev.MAME.metainfo.xml | 1 +
 org.mamedev.MAME.yaml         | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/org.mamedev.MAME.metainfo.xml b/org.mamedev.MAME.metainfo.xml
index 85ddac0..8aafda4 100644
--- a/org.mamedev.MAME.metainfo.xml
+++ b/org.mamedev.MAME.metainfo.xml
@@ -27,6 +27,7 @@
   <url type="homepage">https://www.mamedev.org</url>
   <launchable type="desktop-id">org.mamedev.MAME.desktop</launchable>
   <releases>
+    <release version="0.262" date="2024-01-31"/>
     <release version="0.261" date="2023-11-29"/>
     <release version="0.260" date="2023-10-25"/>
     <release version="0.259" date="2023-09-29"/>
diff --git a/org.mamedev.MAME.yaml b/org.mamedev.MAME.yaml
index 4a922a7..0133484 100644
--- a/org.mamedev.MAME.yaml
+++ b/org.mamedev.MAME.yaml
@@ -59,8 +59,8 @@ modules:
       - cp -r samples/ ${FLATPAK_DEST}/share/mame/
     sources:
       - type: archive
-        url: https://github.com/mamedev/mame/archive/refs/tags/mame0261.tar.gz
-        sha256: 51d5ce1563897709ceb7a924c31a70cc5ff2bec466aab8d0cc9ff3cc72b38899
+        url: https://github.com/mamedev/mame/archive/refs/tags/mame0262.tar.gz
+        sha256: 64e482f3dd13be4e91c5dfa076fb7a71f450f2879118c6ae452b0037b661aaae
       - type: file
         path: mame16x16.png
       - type: file

From 84c5aa4f6face4b72c56da567162bcd807eef5a1 Mon Sep 17 00:00:00 2001
From: Jason Flatt <jflatt@cox.net>
Date: Wed, 31 Jan 2024 08:28:40 -0800
Subject: [PATCH 2/3] Update floppy patch

---
 floppy.patch | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/floppy.patch b/floppy.patch
index b80d0a2..d188473 100644
--- a/floppy.patch
+++ b/floppy.patch
@@ -1,40 +1,40 @@
 diff --git a/src/devices/imagedev/floppy.cpp b/src/devices/imagedev/floppy.cpp
-index 3c00336d..cda94d92 100644
+index b0a520a0..7f733635 100644
 --- a/src/devices/imagedev/floppy.cpp
 +++ b/src/devices/imagedev/floppy.cpp
-@@ -1707,9 +1707,10 @@ void floppy_sound_device::sound_stream_update(sound_stream &stream, std::vector<
+@@ -1709,9 +1709,11 @@ void floppy_sound_device::sound_stream_update(sound_stream &stream, std::vector<
  		{
- 			idx = m_spin_playback_sample;
- 			sampleend = m_sample[idx].data.size();
--			out = m_sample[idx].data[m_spin_samplepos++];
--
+ 			m_idx = m_spin_playback_sample;
+ 			sampleend = m_sample[m_idx].data.size();
+-			out = m_sample[m_idx].data[m_spin_samplepos++];
+ 
 -			if (m_spin_samplepos >= sampleend)
 +			m_spin_samplepos++;
 +			if (m_spin_samplepos < sampleend)
-+				out = m_sample[idx].data[m_spin_samplepos];
++				out = m_sample[m_idx].data[m_spin_samplepos];
 +			else
  			{
  				// Motor sample has completed
  				switch (m_spin_playback_sample)
-@@ -1763,7 +1764,8 @@ void floppy_sound_device::sound_stream_update(sound_stream &stream, std::vector<
- 			idx = m_step_base + m_seek_playback_sample;
- 			sampleend = m_sample[idx].data.size();
+@@ -1765,7 +1767,8 @@ void floppy_sound_device::sound_stream_update(sound_stream &stream, std::vector<
+ 			m_idx = m_step_base + m_seek_playback_sample;
+ 			sampleend = m_sample[m_idx].data.size();
  			// Mix it into the stream value
--			out += m_sample[idx].data[(int)m_seek_samplepos];
+-			out += m_sample[m_idx].data[(int)m_seek_samplepos];
 +			if (m_seek_samplepos < sampleend)
-+				out += m_sample[idx].data[(int)m_seek_samplepos];
++				out += m_sample[m_idx].data[(int)m_seek_samplepos];
  			// By adding different values than 1, we can change the playback speed
  			// This will be used to adjust the seek sound
  			m_seek_samplepos += m_seek_pitch;
-@@ -1781,8 +1783,10 @@ void floppy_sound_device::sound_stream_update(sound_stream &stream, std::vector<
- 				sampleend = m_sample[idx].data.size();
+@@ -1783,8 +1786,10 @@ void floppy_sound_device::sound_stream_update(sound_stream &stream, std::vector<
+ 				sampleend = m_sample[m_idx].data.size();
  
  				// Mix it into the stream value
--				out += m_sample[idx].data[m_step_samplepos++];
+-				out += m_sample[m_idx].data[m_step_samplepos++];
 -				if (m_step_samplepos >= sampleend)
 +				m_step_samplepos++;
 +				if (m_step_samplepos < sampleend)
-+					out += m_sample[idx].data[m_step_samplepos];
++					out += m_sample[m_idx].data[m_step_samplepos];
 +				else
  				{
  					// Step sample done

From 15001351418f012db30ef690a1a01ef1cff272fd Mon Sep 17 00:00:00 2001
From: Jason Flatt <jflatt@cox.net>
Date: Wed, 31 Jan 2024 08:57:10 -0800
Subject: [PATCH 3/3] Add developer_name tag

---
 org.mamedev.MAME.metainfo.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/org.mamedev.MAME.metainfo.xml b/org.mamedev.MAME.metainfo.xml
index 8aafda4..8c4e294 100644
--- a/org.mamedev.MAME.metainfo.xml
+++ b/org.mamedev.MAME.metainfo.xml
@@ -7,6 +7,7 @@
   <summary>
     MAME is a multi-purpose emulation framework.
   </summary>
+  <developer_name>MAMEDev and contributors</developer_name>
   <description>
     <p>
         MAME&apos;s purpose is to preserve decades of software history. As electronic technology continues to rush