<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[ChipMusic.org - Can anyone create an unsigned 4-bit audio ripper for SEGA consoles?]]></title>
	<link rel="self" href="https://chipmusic.org:80/forums/feed/atom/topic/16913/"/>
	<updated>2015-08-24T18:19:15Z</updated>
	<generator>PunBB</generator>
	<id>https://chipmusic.org/forums/topic/16913/can-anyone-create-an-unsigned-4bit-audio-ripper-for-sega-consoles/</id>
		<entry>
			<title type="html"><![CDATA[Re: Can anyone create an unsigned 4-bit audio ripper for SEGA consoles?]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/233831/#p233831"/>
			<content type="html"><![CDATA[<p>I figured it out! Apparently Genesis games actually do use 8-bit samples, but I was always setting it at &quot;Default endianess&quot;, when it should be &quot;No endianess&quot;, so it probably usually guessed the wrong endianess. And the Master System game I tried with the Python script actually does seem to work, as I looked more closely and I could find the samples I was looking for. It still has the frequency problem, but it might also be an endianess issue, as it&#039;s set to &quot;Big endian&quot;. Now my sample-ripping crisis has finally been solved! <img src="https://chipmusic.org/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[turboboy215]]></name>
				<uri>https://chipmusic.org/turboboy215</uri>
			</author>
			<updated>2015-08-24T18:19:15Z</updated>
			<id>https://chipmusic.org/forums/post/233831/#p233831</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can anyone create an unsigned 4-bit audio ripper for SEGA consoles?]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/233126/#p233126"/>
			<content type="html"><![CDATA[<p>SMS and GG samples are played on the 76489 PSG, set all 3 channels&nbsp; Tone=$00 and feeding the 4bit Vol regs with the sample data. So while there is a little bit of a de facto standard; being software controlled, leaves the methods up to the programmer. <br />&nbsp; At SMS Power is a good doc on the 76489, <a href="http://www.smspower.org/Development/SN76489?from=Development.PSG#HowTheSN76489MakesSound" target="_blank">http://www.smspower.org/Development/SN7 &#133; MakesSound</a><br />Yogi</p>]]></content>
			<author>
				<name><![CDATA[yogi]]></name>
				<uri>https://chipmusic.org/yogi</uri>
			</author>
			<updated>2015-07-31T00:53:44Z</updated>
			<id>https://chipmusic.org/forums/post/233126/#p233126</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can anyone create an unsigned 4-bit audio ripper for SEGA consoles?]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/233125/#p233125"/>
			<content type="html"><![CDATA[<p>Update: I just found out that the script actually worked with a Game Gear game I tried (Krusty&#039;s Fun House). However, I had no avail with another game, and any Genesis games I tried, indicating they are nonlinear.<br />&quot;This sounds like something I could look into. But the comment in the source code of that script is a dead giveaway, from one word: &quot;nonlinear&quot;. Nothing would stop you from extracting the sound data if you know the format of it and where it&#039;s located, but non-linear means that the amplitude steps are not evenly spaced. In other words, you need to know the conversion curve of the SMS/GG DAC in order to restore the original audio from the sample data. This is all fine and well, but requires additional research on the hardware if it&#039;s not already documented somewhere.&quot;<br />What I was asking for was a program that would function like the &quot;Import Raw Data&quot; feature in Audacity (which, as I said, can read the data from the games I want just fine, but can&#039;t get to the right bitrate), except importing unsigned 4-bit. It&#039;s open-source, so maybe you could use code from that, but modified to import 4-bit. In fact, the program could be a plugin for Audacity.<br />&quot;And likewise, it&#039;s impossible to know the correct sample playback rate without figuring out what the ROM is actually doing.&quot;<br />That wouldn&#039;t be a problem - you could rip the ROM at a chosen frequency. I stated an editable frequency in the requirements.<br />&quot;And yes, that Cannon fodder sample playback is horrible. Thank you for reminding me of this. I&#039;ve now uploaded a video with the audio reconstructed from a ROM rip, in case you are interested.&quot;<br />Thank you very much for that!</p>]]></content>
			<author>
				<name><![CDATA[turboboy215]]></name>
				<uri>https://chipmusic.org/turboboy215</uri>
			</author>
			<updated>2015-07-30T23:33:04Z</updated>
			<id>https://chipmusic.org/forums/post/233125/#p233125</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can anyone create an unsigned 4-bit audio ripper for SEGA consoles?]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/233103/#p233103"/>
			<content type="html"><![CDATA[<p>This sounds like something I could look into. But the comment in the source code of that script is a dead giveaway, from one word: &quot;nonlinear&quot;. Nothing would stop you from extracting the sound data if you know the format of it and where it&#039;s located, but non-linear means that the amplitude steps are not evenly spaced. In other words, you need to know the conversion curve of the SMS/GG DAC in order to restore the original audio from the sample data. This is all fine and well, but requires additional research on the hardware if it&#039;s not already documented somewhere. And likewise, it&#039;s impossible to know the correct sample playback rate without figuring out what the ROM is actually doing.</p><p>And yes, that Cannon fodder sample playback is horrible. Thank you for reminding me of this. I&#039;ve now uploaded a video with the audio reconstructed from a ROM rip, in case you are interested.</p><p><div class="embed_video"><iframe width="560" height="340" src="https://www.youtube.com/embed/dKjTCSikTus" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div><br /><a href="https://www.youtube.com/watch?v=dKjTCSikTus" target="_blank">https://www.youtube.com/watch?v=dKjTCSikTus</a></p><p>However, the Cannon Fodder audio as played back by the ROM always reminded of a version of Forever Young that V/Vm did for a Playstation commercial that never got aired. My own favorite theory is that they left the audio playback that way as some sort of homage to that commercial, although it&#039;s more likely that that&#039;s not the case.</p><p><div class="embed_video"><iframe width="560" height="340" src="https://www.youtube.com/embed/MyuvhcvVxD8" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div><br /><a href="https://www.youtube.com/watch?v=MyuvhcvVxD8" target="_blank">https://www.youtube.com/watch?v=MyuvhcvVxD8</a></p>]]></content>
			<author>
				<name><![CDATA[nitro2k01]]></name>
				<uri>https://chipmusic.org/nitro2k01</uri>
			</author>
			<updated>2015-07-30T07:37:14Z</updated>
			<id>https://chipmusic.org/forums/post/233103/#p233103</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can anyone create an unsigned 4-bit audio ripper for SEGA consoles?]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/233100/#p233100"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>turboboy215 wrote:</cite><blockquote><p> - Must not be a Perl script.</p></blockquote></div><p>Lol!</p>]]></content>
			<author>
				<name><![CDATA[jefftheworld]]></name>
				<uri>https://chipmusic.org/jefftheworld</uri>
			</author>
			<updated>2015-07-30T05:45:52Z</updated>
			<id>https://chipmusic.org/forums/post/233100/#p233100</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Can anyone create an unsigned 4-bit audio ripper for SEGA consoles?]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/233096/#p233096"/>
			<content type="html"><![CDATA[<p>As you can see from my other post (<a href="http://chipmusic.org/forums/topic/16824/incomplete-list-of-gbgbc-games-to-use-pcm-samples/" target="_blank">http://chipmusic.org/forums/topic/16824 &#133; m-samples/</a>), I have become fascinated with PCM samples on the Game Boy and Game Boy Color. However, that doesn&#039;t mean that samples from other old consoles are interesting as well (although much less so), such as the NES, SNES, and SEGA consoles before the Saturn.<br />I want to rip samples from many of these games. Most people use Audacity to do so by using its &quot;Import Raw Data&quot; function at an 8-bit unsigned PCM, but they don&#039;t realize that there&#039;s a MAJOR problem with this method.<br />You see, Audacity, and other audio editors, only go down to 8-bit. While it technically CAN read 4-bit samples at 8-bit, it either has to play at the original frequency but double speed and an octave higher, or at the right speed and pitch, but in even worse quality than in-game (e.g. it&#039;s supposed to be at 8000hz, but imported as 4000hz), when it should be the exact opposite. Most people do the second one, and don&#039;t notice the glaring flaw, probably because it sounds so degraded in-game. I mean, you call THIS &quot;restored&quot;? <a href="http://youtube.com/watch?v=wFwbfN18x0I" target="_blank">http://youtube.com/watch?v=wFwbfN18x0I</a><br />A few months ago, I found this Python script: <br /><a href="http://forums.nesdev.com/viewtopic.php?t=6557" target="_blank">http://forums.nesdev.com/viewtopic.php?t=6557</a> It solves the problem PERFECTLY for NES raw audio and GB/GBC, but it doesn&#039;t work with anything else. In fact, inside the script, it says:<br />&quot;Limitations: Master System/Game Gear nonlinear samples are not<br />supported.&quot;<br />The lack of a PROPER way to extract 4-bit samples from SEGA Master System, Game Gear, Genesis, and CD games is really irratating me. There are only a few Genesis games that actually use 8-bit samples (most games use 4-bit non-linear), such as the original Sonic the Hedgehog, Earthworm Jim 2 (NOT the first one), and Comix Zone. I know this because of the frequency in Audacity.<br />I have also searched online for help, and I found two forums (http://stackoverflow.com/questions/2059014/converting-raw-audio-data-to-wav-with-scripting, and <a href="http://stackoverflow.com/questions/26000779/converting-from-4-bit-raw-audio-to-wav-or-another-output-format)," target="_blank">http://stackoverflow.com/questions/2600 &#133; t-format),</a> but neither of them give an answer.<br />Can someone make a program that will import unsigned 4-bit audio correctly, so I can PROPERLY extract the samples from these SEGA consoles? <br />The program must follow the following rules:<br /> - Must run on Windows 8.1 64-bit (unless it&#039;s a 16-bit MS-DOS program, where I can run it with DOSbox).<br /> - Must include the source code if not a Python script.<br /> - Must not be a Perl script.<br /> - Must allow editable frequency.<br />Thank you.</p>]]></content>
			<author>
				<name><![CDATA[turboboy215]]></name>
				<uri>https://chipmusic.org/turboboy215</uri>
			</author>
			<updated>2015-07-30T03:16:30Z</updated>
			<id>https://chipmusic.org/forums/post/233096/#p233096</id>
		</entry>
</feed>
