tag:blogger.com,1999:blog-6845625574553920830Tue, 31 Mar 2015 00:26:18 +0000ubuntumodpixel shadersf4HandBrakeCRTbsnestutorialRetroArcharcadeSNESemulatorStreet Fighter 4comparisonssnesDIYGUIemulationfighter stickx264cglenovopad hacksensibeatx120ePPASNES emulatorbeginner's guidefixintrepid ibexmonitorshaderssf464-bitGTKLucid LynxMacandroidaudiophilehow tomaverick meerkatn64nvidiaoverscanqt4repositoryreviewvirtualboxAspire OneCyanogen ModGHBHQ2xLinuxSFxTSony PVMcolor profilecompilecustomdeberrorfiltersfrontendglslhackhandbrakeCLIhiganhornhtc onekeyboardlibretrolibsnesmario kart wiimodel swapnatty narwhalnetatalkpsy-rdpsy-trellispsychovisualquantalreplacementretrosd card readerstagesteamsvntrackpadwindowsxBRyasm240p3-point bilinear32-bit3603dfx5.1AEAsus VG248QECLI wrapperCanonicalDell Mini 9Diablo 3Diablo IIIEDIDG4TVGizmoGizmo5Google VoiceGoogle Voice SearchHLSLHTPCHandBrakeGTKKDEKMSKubuntuLinux Mint 12Metroid: Other MNESOS XPSNRPowerMizerRGBRippedWireSCARTSIPSSIMSony BVMSuper NintendoTVUbuntuOneVNCVP8WebMX-Rite i1 Display ProX-forwardingX11XRGB-Mini FramemeisterXquartzZSNESaceradvanced optionsafpalgorithmalphaambient occlusionampanaloganti-bluraspireoneaudio technicaautomatedbackendbacklightbackloadedbaconbarkeeper's friendbaselinebashbetabinarybinary driverbloomblue shellbluetoothborderlands 2brokenbtrfsbuffalobuildbump mapbyuucabinetcameracgwgchallengecheatcheat enginecheaterscherry mx bluechromiumchrono triggercloudcodecscompizcompression driverconsolecontrollercrimson echoescrt-royalecx4cydiad-padd250-xdareddasdeb binarydispcalGUIditheringdsp1bdsp3efiepic 4Gexperimentextractface-fixingfilterfilthypantsflames of eternityflybackforce closefree callsfreezesfusiongHandBrakegameboygameboy advancegameboy colorgenesisgrubh.264handbrake dependencies listhapphardyharlequinhigh profileinstallerintel hd4000interlacinginterpolationipodisoj-pacjapanesejauntykarmiclaunchpadlp120m7mamemechanicalmega man xmencodermicroswitchmodelinemouse pointer integrationmoveset swapmultipass shadernanoneotecnestopianetbooknetflixnetworknightliesnintendonormal maponeiric ocelotoptimizedpbuilderpermission fixphoenix guiphotoshopproblemprogrammingpunch outpurple picturesqtHBrecallregion-lockedrestoreretrace linessambasaved filesscriptscrollseleniumsharesharingskinningslowsoftmodspeakerspecial chipsqueezesrmsshstopped workingstreet fighterstrobesubwoofersurround soundswaptemplatethinkpadtomeetrackpointtrustytubeturntabletyrquakeultimarcultimateunlimited itemsunlockunresponsiveupgradeupsusb geckovalvevanillavideo qualityvp-20wall of shameweavingwifiwiiwindows 8winewirelessx265xrandrxsessionyoutubezeitgeistFilthy Pants: A Computer Bloghttp://filthypants.blogspot.com/noreply@blogger.com (Hunter K.)Blogger159125tag:blogger.com,1999:blog-6845625574553920830.post-3068768313758498805Tue, 17 Mar 2015 12:59:00 +00002015-03-20T13:28:30.913-07:00monitorretroSony PVMHow to Adjust Focus on Sony PVM MonitorI just scored a Sony PVM 20m2u monitor the other day and found that the picture was extremely sharp at the edges but slightly soft toward the center, which indicates that it was a bit out of focus. There is no focus setting in the service menu (accessible by pressing the degauss and enter buttons on the front, btw), as it is a physical characteristic that must be adjusted by turning a pot inside the monitor guts, just like on an arcade monitor.<br /><br />With most(?) arcade monitors, the focus pot is located on the flyback transformer, along with the screen pot that controls the voltage to the electron guns. If you remove the outside case of your PVM and look in from the left (there's a big circuit board thing blocking view from the right), you should see the flyback, which is the big black piece of plastic with wires coming out of it that lead to the neckboard:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-GLE23daIUV8/VQgj_GbK5hI/AAAAAAAACpA/2xbb06QU1LA/s1600/IMG_20150315_151742.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-GLE23daIUV8/VQgj_GbK5hI/AAAAAAAACpA/2xbb06QU1LA/s1600/IMG_20150315_151742.jpg" height="320" width="181" /></a></div>There are no easily accessible pots to turn on this flyback, but it is connected to a small white board above and behind it, right against the back panel with all of the inputs (which I did not remove), and that board has our focus pot:<br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-Mn6lNFo0iSA/VQgj_MEeVnI/AAAAAAAACo8/AoSqEPmEHQY/s1600/IMG_20150315_151714.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto; text-align: center;"><img border="0" src="http://1.bp.blogspot.com/-Mn6lNFo0iSA/VQgj_MEeVnI/AAAAAAAACo8/AoSqEPmEHQY/s1600/IMG_20150315_151714.jpg" height="320" width="181" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">The focus pot, viewed from the back of the monitor</td></tr></tbody></table>You'll want to turn this pot very slightly while the monitor is running until you have a more uniform sharpness all over. It's nice that they moved it off of the flyback, actually, even though it made it a little harder to track down because it can be scary messing with such a high-voltage component while the monitor is running.<br /><br /><b><span style="color: red;">UPDATE (03/20/2015):</span></b> Someone in the comments asked for shots of it running, so here you go (click thumbnails to embiggen):<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-H0asa1birRQ/VQyAoIT5sgI/AAAAAAAACpY/35dAY7A9MYs/s1600/ddp1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-H0asa1birRQ/VQyAoIT5sgI/AAAAAAAACpY/35dAY7A9MYs/s1600/ddp1.png" height="320" width="181" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-BT6SIWRuOtg/VQyAoD2bhuI/AAAAAAAACpU/_sVCwFI_xug/s1600/ddp2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-BT6SIWRuOtg/VQyAoD2bhuI/AAAAAAAACpU/_sVCwFI_xug/s1600/ddp2.png" height="320" width="193" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-gnf3PzX9fgw/VQyAoJFLaMI/AAAAAAAACpc/zz9dVWt0z5s/s1600/menu.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-gnf3PzX9fgw/VQyAoJFLaMI/AAAAAAAACpc/zz9dVWt0z5s/s1600/menu.png" height="229" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-AlcjwH3adpY/VQyApYZsXFI/AAAAAAAACpk/IMTYp6wLaiA/s1600/mmx.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-AlcjwH3adpY/VQyApYZsXFI/AAAAAAAACpk/IMTYp6wLaiA/s1600/mmx.png" height="315" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-4h1CIFD9tKE/VQyAp21OiMI/AAAAAAAACps/KBntmDvJzig/s1600/sf2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-4h1CIFD9tKE/VQyAp21OiMI/AAAAAAAACps/KBntmDvJzig/s1600/sf2.png" height="301" width="320" /></a></div>These are all extreme closeups, since I figured that's what people are mostly interested in. These were taken with my HTC One m7 with a Playstation 2 hooked up over component cables. The first 2 are Dodonpachi Daioujou in TATE (notice the vertical scanlines), followed by a menu shot, Mega Man X Collection and Street Fighter Anniversary Edition.<br /><br />As you can see, the scanlines are very crisp and "sterile," though not as much as on a 31 kHz CRT monitor (see the pics <a href="http://filthypants.blogspot.com/2014/03/tvs-and-retro-gaming-emulation.html">at the bottom of this post</a> for comparison). For "240p" non-interlaced content, the PVM sits somewhere between that extreme and a regular SD/CGA TV or monitor, where the gaps between scanlines are almost nonexistent in bright areas.http://filthypants.blogspot.com/2015/03/how-to-adjust-focus-on-sony-pvm-monitor.htmlnoreply@blogger.com (Hunter K.)4tag:blogger.com,1999:blog-6845625574553920830.post-5028701380591329330Thu, 01 Jan 2015 04:38:00 +00002014-12-31T20:38:09.629-08:003-point bilinearemulationn64N64 3-Point Texture Filtering in mupen64plus-libretroThe Nintendo 64 console used a lot of weird hardware that contributed to its distinct look. For example, N64s used bilinear filtering when scaling some textures, similar to how modern GPUs handle texture resizing, but instead of using 4 sampling points like modern hardware, the N64 only used 3 (current texel, upper-left and bottom-right). This caused textures to have a distinctive, hexagonal "rupee" shape:<br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-CtItUNa88ds/VKS_Onmg1sI/AAAAAAAACh8/yPgzX8yJ8SE/s1600/ocarinaoftime003_zps24bd2b97.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://1.bp.blogspot.com/-CtItUNa88ds/VKS_Onmg1sI/AAAAAAAACh8/yPgzX8yJ8SE/s1600/ocarinaoftime003_zps24bd2b97.png" height="240" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Image taken by TrekkiesUnite118 on the Sega-16 forums; see the texture pattern on the wall.</td></tr></tbody></table>When emulating an N64, if you use modern 4-sample bilinear filtering, those textures don't render properly, which can lead to ugly artifacts, like the jagged texture under these stairs in Kakariko Village:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-QmUHuy_qokE/VKTGY1XCMEI/AAAAAAAACiI/OaXDTrOs6Jk/s1600/4wwtS6o.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-QmUHuy_qokE/VKTGY1XCMEI/AAAAAAAACiI/OaXDTrOs6Jk/s1600/4wwtS6o.png" height="240" width="320" /></a></div>Way back in 2010, <a href="http://forum.devmaster.net/t/bilin-filtering-with-3-samples/18338/14">there was a discussion on the devmaster forums about reproducing this 3-point sampling in software with some great screenshots and code samples</a>. Then, a couple of years later, <a href="http://www.emutalk.net/threads/54215-Emulating-Nintendo-64-3-sample-Bilinear-Filtering-using-Shaders">ArthurCarvalho posted an HLSL shader that performed the same function on the Emutalk forums</a>.<br /><br />Skip to 2014 and my friend aliaspider, author of the awesome GTU shader and the guy responsible for porting RetroArch to the PSP (among many other things), ported this HLSL code to GLSL and <a href="https://github.com/libretro/mupen64plus-libretro/blob/master/mupen64plus-video-glide64mk2/src/Glitch64/OGLEScombiner.cpp">plopped it into the rendering code for the libretro fork of mupen64plus</a>, where it is applied on a per-texture basis. This clears up many of the texture artifacts typical of N64 emulation and provides that familiar, pointy-textured look:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-omsksyhBiaQ/VKTNdBJ3XLI/AAAAAAAACiU/KWBB-cDwEWU/s1600/6z3L7Rh.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-omsksyhBiaQ/VKTNdBJ3XLI/AAAAAAAACiU/KWBB-cDwEWU/s1600/6z3L7Rh.png" height="240" width="320" /></a></div>To my knowledge, no other N64 emulators have implemented this texture filtering option at the time of this writing.http://filthypants.blogspot.com/2014/12/n64-3-point-texture-filtering-in.htmlnoreply@blogger.com (Hunter K.)2tag:blogger.com,1999:blog-6845625574553920830.post-4831309283492996317Thu, 06 Nov 2014 03:56:00 +00002014-11-09T13:12:38.431-08:00240parcadeCRTEDIDKMSmodelineCreating a Custom EDID for Arcade MonitorSince I got my arcade cabinet up and running with my J-PAC-connected PC running RetroArch, the last finishing touch I wanted was to make it boot directly to the right resolution in a text-mode console and launch RetroArch in KMS mode, which provides the lowest latency and best experience. This ended up being easier than I expected, but it did require some steps I hadn't messed with in the past.<br /><br />First thing you'll need is a working modeline. I created an ultra-wide 1920x240/60 modeline using <a href="http://xtiming.sourceforge.net/cgi-bin/xtiming.pl">this online calculator</a>. Using a wide resolution like this leverages the natural blurriness of CRTs to hide fractional scaling artifacts on the horizontal axis, while the 240 vertical resolution allows perfect 1:1 scaling on the vertical axis. This provides a beautiful, "pixel-perfect" image for a large variety of games, including my favorites--Capcom's CPS-1/2.<br /><br />This is the resulting modeline (negative sync options added by me):<br /><blockquote class="tr_bq"><span style="color: lime;">Modeline "1920x240@60" 31.96 1920 1952 2072 2104 240 245 248 253 -HSync -VSync</span></blockquote>I recommend testing your modeline out in a standard desktop environment using xrandr first, since it's pretty low-stakes. If something messes up, you just reboot and everything goes back to normal.<br /><br />Once you've verified that your modeline works, you're ready to create your custom EDID. There are several good writeups about the process online, but I found <a href="http://unix.stackexchange.com/questions/97023/how-to-make-edid">this one</a> most helpful. I won't rehash all the steps here, but you essentially just copy the appropriate files from the kernel tree and modify/rename one of the existing EDID source files (I used 1024x768.S) with the values from your modeline (I named mine 1920x240.S).<br /><br />Here's the important part (i.e., license boilerplate removed for brevity; it's standard GPL2) from mine:<br /><blockquote class="tr_bq"><span style="color: lime;">/* EDID */<br />#define VERSION 1<br />#define REVISION 3<br />/* Display */<br />#define CLOCK 31960 /* kHz */<br />#define XPIX 1920<br />#define YPIX 240<br />#define XY_RATIO XY_RATIO_4_3<br />#define XBLANK 184<br />#define YBLANK 13<br />#define XOFFSET 32<br />#define XPULSE 120<br />#define YOFFSET (63+5)<br />#define YPULSE (63+3)<br />#define DPI 72<br />#define VFREQ 60 /* Hz */<br />#define TIMING_NAME "Ultrawide"<br />#define ESTABLISHED_TIMING2_BITS 0x08 /* Bit 3 -&gt; 1024x768 @60 Hz */<br />#define HSYNC_POL 0<br />#define VSYNC_POL 0<br />#define CRC 0xf7<br />#include "edid.S"</span></blockquote><div>Next, compile your source files, which should leave you with 1920x240.bin and 1920x240.bin.ihex (the *.ihex one is unneeded, AFAICT). Open 1920x240.bin with the <span style="font-family: Courier New, Courier, monospace;">edid-decode</span> utility (available from the standard Ubuntu repos) and it should tell you something about the checksum being wrong (assuming you're making your own; mine already has the corrected checksum). Reopen your custom *.S and replace the existing, incorrect checksum where it says "#define CRC [whatever]" with the value it says it <i>should</i> have and then re-compile. It shouldn't complain this time.<br /><br /><a href="http://www.mediafire.com/download/o3le49a23979unc/1920x240.bin">Here's my compiled 1920x240.bin EDID</a>, which should work for any standard-res 15 khz arcade monitor.</div><div><br /></div><div>Once you have your shiny new EDID *.bin file, you'll need to create a new directory in /lib/firmware called 'edid,' which will require elevated privileges:</div><blockquote class="tr_bq"><span style="color: lime;">sudo mkdir /lib/firmware/edid</span></blockquote><div>Then copy your *.bin file into it.</div><div><br /></div><div>Next, you'll need to create a file named drm-kms-helper.conf, which contains only one line:</div><blockquote class="tr_bq"><span style="color: lime;">options drm_kms_helper edid_firmware=edid/1920x240.bin</span></blockquote><div>and move it into your /etc/modprobe.d/ directory (again, needs elevated privs). Of course, you'll need to replace '1920x240.bin' with whatever you've named yours.</div><div><br /></div><div>At this point, your custom EDID should be usable by your system, so a reboot will get you the desired resolution.&nbsp;If something goes wrong and you need to revert, just delete /etc/modprobe.d/drm-kms-helper.conf and it will put everything back the way it was.</div><div><br /></div><div>If--like me--you'd like to go all the way and boot to a command line (instead of a standard GUI environment) that uses the new res, you'll want to edit your /etc/default/grub (needs elevated privs again) and replace the line:</div><blockquote class="tr_bq"><span style="color: lime;">GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"</span></blockquote><div>with</div><blockquote class="tr_bq"><span style="color: lime;">GRUB_CMDLINE_LINUX_DEFAULT="text"</span></blockquote><div>Then run 'sudo update-grub' to put it into effect. Now, on subsequent reboots, it won't try to load an X-Server and desktop environment and will instead go straight to console.</div><div><br /></div><div>Finally, I don't plan on having a keyboard connected to my cabinet all the time (kinda kills the mood, y'know?), so I wanted it to login to my user account automatically. To do this, edit /etc/init/tty1.conf in a text editor and comment out the last line:</div><blockquote class="tr_bq"><span style="color: lime;">#exec /sbin/getty -8 38400 tty1</span></blockquote><div>and add this below it instead:</div><blockquote class="tr_bq"><span style="color: lime;">exec /bin/login -f <i>username</i> &lt; /dev/tty1 &gt; /dev/tty1 2&gt;&amp;1</span></blockquote><div>Replace 'username' with the name of the user account you want to login automatically. And, if you want to have it load a frontend--like RetroArch--as soon as it finishes logging in, you can add the launch command to the end of that user account's ~/.bashrc file.</div>http://filthypants.blogspot.com/2014/11/creating-custom-edid-for-arcade-monitor.htmlnoreply@blogger.com (Hunter K.)6tag:blogger.com,1999:blog-6845625574553920830.post-7963125040659679006Mon, 03 Nov 2014 21:32:00 +00002014-11-03T13:32:32.979-08:00arcadeCRTflybackmonitorneotecretrace linesNeotec 2515c Flyback Transformer ProblemI got my new JAMMA-compatible arcade cabinet up and running with MAME via RetroArch, but I noticed that the screen is blurry and has these weird, diagonal-ish horizontal lines going across the top half of the screen:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-OXCJhwnSAn8/VFfxqv_P5DI/AAAAAAAACfQ/iaJrYfgIK34/s1600/IMG_20141102_211841%5B1%5D.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-OXCJhwnSAn8/VFfxqv_P5DI/AAAAAAAACfQ/iaJrYfgIK34/s1600/IMG_20141102_211841%5B1%5D.jpg" height="181" width="320" /></a></div>After digging around online, it seems these are known as retrace lines, and they occur when the flyback transformer is applying too much voltage to the screen. This behavior is typically accompanied by excessive brightness, as well. Normally, the solution to this would be to find the 'screen' knob on the flyback itself and turn it down just a bit until the lines go away.<br /><br />However, I also learned that my specific monitor, a Neotec 2515c, is notorious for failing flyback transformers, and the issue becomes more pronounced as the monitor warms up. It also causes the image to get excessively blurry over time, to the point that small text becomes unreadable and bright colors turn into a smeary mess.<br /><br />On the bright side of this being a super-common issue is that replacements can be found pretty cheaply, like <a href="http://www.twistedquarter.com/index.php?main_page=product_info&amp;cPath=206_209&amp;products_id=1099">this one from Twisted Quarter ($25 for one at the time of this writing)</a>, and they're pretty easy to replace, since they're expected to fail over time. In fact, next to leaky/fried capacitors, a dicky flyback is one of the most common problems a CRT display can face.<br /><br />Nevertheless, fixing it means performing surgery on a CRT, which is home to many capacitors and high-voltage loads, so it's not for the faint of heart. I intend on tapping some local expertise to prepare for the task and will post some pics as I move forward.<br /><br />In the meantime, I'm just going to keep my cabinet turned off unless I'm actually playing something to keep minimize the issue when I'm using it.http://filthypants.blogspot.com/2014/11/neotec-2515c-flyback-transformer-problem.htmlnoreply@blogger.com (Hunter K.)0tag:blogger.com,1999:blog-6845625574553920830.post-7166097875780322506Mon, 03 Nov 2014 18:12:00 +00002014-11-05T20:09:49.200-08:00arcadecabinetemulationj-pacmameRetroArchstreet fighterultimarcHooking a PC to my Arcade CabinetAs I mentioned <a href="http://filthypants.blogspot.com/2014/10/my-super-punch-out-arcade-cabinet.html">at the end of my previous post</a>, I traded my Super Punch Out!! cabinet for a generic Dynamo cab that I intend to drop a Street Fighter II Turbo: Hyper Fighting board into at some point. In the meantime, I decided to hook up a PC for use with emulators, specifically MAME via the RetroArch frontend.<br /><br />As with my <a href="http://filthypants.blogspot.com/2014/03/tvs-and-retro-gaming-emulation.html">TVs and Retro Gaming</a> post, this subject ended up being more complex than I anticipated, and the information available online is incomplete and often takes place on forums with poorly hosted pics, etc. So, I thought I'd share my experience here in the hope that others can avoid any potentially costly mistakes.<br /><br />First off, it's important to realize what an arcade cabinet really is: a low-res tube television in a giant wooden box with some lights and speakers, not unlike <a href="https://www.google.com/search?q=console+tv&amp;safe=off&amp;es_sm=122&amp;source=lnms&amp;tbm=isch&amp;sa=X&amp;ei=z41XVNfRKsyhgwTvv4SYDA&amp;ved=0CAgQ_AUoAQ&amp;biw=1704&amp;bih=860">one of those old console TVs</a>. The major difference is that arcade monitors use an RGB connection, which--as stated in my TVs and Retro Gaming post--is the cream of the crop for video quality. That stated, if you don't already own a cabinet and you live in PAL land, you could build yourself a big wooden box and drop a SCART-capable CRT into it and have much the same results with a VGA-to-SCART adapter. To do the same thing in NTSC regions, you would need a TV with "component" (aka YPbPr) video inputs and a VGA-to-component adapter. If you decide to go this route, you'll be able to achieve a pixel-perfect arcade picture on your boxed TV using emulation, but you won't be able to connect actual arcade boards. You'll also need to take care that your PC is outputting a 15 khz horizontal sync rate video signal, which can be difficult to achieve with standard PC components (more on this later).<br /><br />I wanted to be able to connect actual boards, so I went with an actual arcade cabinet, which adheres to the <a href="http://en.wikipedia.org/wiki/Japan_Amusement_Machinery_Manufacturers_Association#Connector_standards">JAMMA video and connector standards</a>. If you decide to go down this path, I strongly recommend going JAMMA-compatible, rather than using some funky custom cabinet (e.g., a Punch Out!! / Play Choice 10 cabinet...), as it will make switching among boards--and your PC--much easier. That was the entire purpose of the JAMMA standards, after all.<br /><br />The JAMMA connector standard supports 2 players, each with an 8-way joystick (i.e., 4 switches per) and 4 buttons each (a start button and 3 action buttons&nbsp;for each). This is plenty of inputs for most games, but not for the 6-button fighting games that became popular toward the end of the arcade era. The JAMMA standard was extended to accommodate these additional inputs--sometimes known as JAMMA+--but this limitation to the original standard is important to keep in mind.<br /><br />So, assuming you have a JAMMA/+-compatible cabinet and monitor, you have some other decisions to make. For controls, you have a number of options, including: 1.) dropping in the guts of a pair of USB joysticks, like the Mad Catz TE/SE arcade sticks, which are well-supported on PC, 2.) use the guts of a pre-made PC-to-arcade control panel, like those from X-Arcade, 3.) use a purpose-built control interface board, like Toodles' <a href="http://www.focusattack.com/toodles-cthulhu-multi-console-pcb/">Cthulhu board</a> or Ultimarc's <a href="http://www.ultimarc.com/ipac1.html">I-PAC2/4</a> boards, or 4.) piggyback off the existing control panel connection to your cabinet's JAMMA connector via Ultimarc's <a href="http://www.ultimarc.com/jpac.html">J-PAC</a> interface, which is what I chose:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-3bYCDYNaHmg/VFeY1UHsL-I/AAAAAAAACeY/MK-3h2RsuR8/s1600/IMG_20141031_155914%5B1%5D.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-3bYCDYNaHmg/VFeY1UHsL-I/AAAAAAAACeY/MK-3h2RsuR8/s1600/IMG_20141031_155914%5B1%5D.jpg" height="181" width="320" /></a></div><br />The J-PAC allows you to keep the same controls whether you're on PC or actual arcade board, so you're not having to mess with a bunch of quick-disconnects every time you want to switch between the two. Moreover, the J-PAC is designed to block out incompatible video signals via the red jumpers. On a standard CGA arcade monitor, you'll want to leave only the bottom, 15 khz jumper and remove the other one, which comes defaulting to 31 khz (i.e., VGA standard, and potentially dangerous for some arcade monitors).<br /><br />While the J-PAC is an excellent piece of kit, they have made a few design decisions that are...strange, to say the least, and you should be aware of them ahead of time. First, and possibly most importantly, J-PAC boards no longer come with a micro-USB port, but it seems none of the marketing shots on the websites of Ultimarc or resellers reflects this. Instead, all you get is some empty solder pads where the port should be:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-W1Mp073wid8/VFeaaZG33nI/AAAAAAAACek/dPBjNLuykrw/s1600/IMG_20141031_161006%5B1%5D.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-W1Mp073wid8/VFeaaZG33nI/AAAAAAAACek/dPBjNLuykrw/s1600/IMG_20141031_161006%5B1%5D.jpg" height="320" width="181" /></a></div>Instead, they run the USB signal through the left-hand PS/2 port, so you can either connect the board to your PC using a PS/2 Male-to-Male cable, which I certainly don't have on-hand, or use a PS/2-to-USB adapter like this one (note: only "dumb," i.e., non-active, adapters will work):<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-FpiRAq9Btnw/VFebNpvr4hI/AAAAAAAACes/mo_2RikGIOc/s1600/IMG_20141031_160949%5B1%5D.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-FpiRAq9Btnw/VFebNpvr4hI/AAAAAAAACes/mo_2RikGIOc/s1600/IMG_20141031_160949%5B1%5D.jpg" height="320" width="181" /></a></div>in conjunction with a USB-A-male-to-USB-A-male cable, which is extremely uncommon and, again, I certainly did not have one on-hand. So, since I had to order something anyway, I went with a PS/2 Male-to-Male cable, since PS/2 is a stream protocol and doesn't have the limitation of USB polling rates.<br /><br />The other strange choice is on the VGA port. Instead of attaching a VGA female port, as you might expect from monitors and so forth, they have attached a VGA male port, which means you can't use a normal VGA cable and must instead use a VGA extension cable (i.e., with one male end and one female end). This choice is made stranger still by pairing the male VGA port with *female* thumbscrew ports, which means you can't attach a normal extension cable without first removing the thumbscrew ports, which is the only thing holding the VGA port's faceplate to the board! After digging around in your cabinet for your lost faceplate, you can flip the thumbscrew ports around and screw the male ends into your VGA extension cable's female thumbscrew ports, but the on-board port gets in the way of the screws turning and basically makes it a big pain in the ass.<br /><br />Andy, if you read this: please switch to a female VGA port, or at least fix the thumbscrew/faceplate issue. It's quite frustrating.<br /><br />Anyway, once that's all done, you'll also need to attach your additional buttons--that is, the 3 kick buttons for each player--to the handy screw terminals on the left-hand side of the J-PAC. Ultimarc has given us 5 additional inputs per player (conveniently labeled 1SW4, 1SW5, etc.), as well as unpowered speaker ports (powered speaker ports would have been nice, of course, but it's a limitation of the JAMMA connector's power draw, apparently) and a couple of grounds. I was pleased to find that I didn't need to actually hook anything up to the provided grounds, as the existing common-ground that was already daisy-chained across my control panel buttons worked just fine. This will reduce the amount of fiddling with disconnects necessary when switching to an actual arcade board from the J-PAC.<br /><br />As a result of the unpowered speaker ports, you'll need to either cannibalize the amplifier out of some cheap computer speakers and attach your cabinet's speakers to it, or else simply drop some computer speakers, amplifier and all, into your cabinet and call it a day, which is what I decided to do. It doesn't sound awesome, but it's passable.<br /><br />You'll also have to decide how and where to house your PC components within the cabinet. Arcade cabinets have a substantial amount of empty space inside of them, particularly down around the coin door, but none of it is really easily accessible unless you can remove the entire back of your cabinet. On mine, the back does not remove easily, &nbsp;other than a small access hatch for servicing the monitor, so I stuck my PC components in there, below the monitor cage, beside the cabinet's own power supply:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-zG1Wd47-nS8/VFpLRfCqQmI/AAAAAAAACfw/pCZtxcIa2rk/s1600/IMG_20141104_191629%5B1%5D.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-zG1Wd47-nS8/VFpLRfCqQmI/AAAAAAAACfw/pCZtxcIa2rk/s1600/IMG_20141104_191629%5B1%5D.jpg" height="181" width="320" /></a></div>As you can see, I also rigged up an extra arcade pushbutton I had lying around to serve as the PC power switch.<br /><br />Speaking of the cabinet's power supply, Ultimarc's own <a href="http://www.ultimarc.com/jpac2.html">J-PAC installation instructions</a> recommend completely disconnecting your cabinet's power supply from the JAMMA connector and only leaving it connected to the monitor. This is good advice for very old cabinets/power supplies, which can burn out over time if they don't see a load in the proper places. It was also good advice in case you plugged your J-PAC into the JAMMA connector upside-down, but&nbsp;<a href="http://forum.arcadecontrols.com/index.php/topic,35810.msg1163210.html#msg1163210">this evidently isn't a problem anymore due to changes in the circuitry</a>. I've also screenshotted Andy's post about it in case that link dies at some point:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-co8TbTiHDoY/VFeloS9theI/AAAAAAAACe4/6zt8AhFaa4A/s1600/jpac-ss.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-co8TbTiHDoY/VFeloS9theI/AAAAAAAACe4/6zt8AhFaa4A/s1600/jpac-ss.png" height="143" width="320" /></a></div><div class="separator" style="clear: both; text-align: left;">Once you have everything installed and situated, you can power on your cabinet and PC and see how it treats you. As long as your J-PAC only has the 15 khz jumper attached, you can rest assured that your precious monitor will be safe, though it's likely you won't get a picture at this point due to incompatible sync in the signal. Instead, you'll just get a crazy image that looks kinda like trying to watch the scrambled premium channels on old analog cable TV.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">If you're absolutely certain you can make the correct, non-damaging signal, you can skip the J-PAC and use a "dumb" VGA-to-arcade-RGB adapter like this one:</div><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-TAlnTSWVrpM/VFpMBWHaJkI/AAAAAAAACf4/oZA42Pv29No/s1600/IMG_20141104_191932%5B1%5D.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-TAlnTSWVrpM/VFpMBWHaJkI/AAAAAAAACf4/oZA42Pv29No/s1600/IMG_20141104_191932%5B1%5D.jpg" height="320" width="181" /></a></div><div class="separator" style="clear: both; text-align: left;">Either way, to get an image to show up, you'll need to use a compatible resolution and sync. On Windows this is achieved through a piece of software known as Soft15khz. In Linux, you can make it happen with the xrandr utility or by adding a custom modeline to your xorg.conf file (which probably doesn't even exist anymore; you'll have to create one from scratch, which is a bit of a hassle). You can also use a custom EDID, which is nice because it works with KMS consoles, but <strike>you'll have to recompile your kernel</strike>, nvm, you can specify custom EDIDs from GRUB (<a href="http://filthypants.blogspot.com/2014/11/creating-custom-edid-for-arcade-monitor.html">see this post for details</a>). I went with the xrandr method, and I used a custom resolution of 1920x240. This aspect ratio may seem crazy, but CRTs don't really care what kind of horizontal resolution you feed them, so you can use a super-wide resolution like this and it will make fractional (i.e., non-integer) horizontal resolutions all look fine. 1920 also happens to be exactly 5x the 384 horizontal resolution of CPS-1/2, so Street Fighter games will be perfect. The JAMMA video standard calls for negative composite sync, so any custom modelines you create using modeline calculators (<a href="http://xtiming.sourceforge.net/cgi-bin/xtiming.pl">like this one</a>) will need to end with "-HSync -VSync" in order for your monitor to sync up properly.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">Once you finally get a picture, it should look something like this:</div><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-jJKaed5IXgY/VFe1yxIMHAI/AAAAAAAACfE/OAr-HCxJsn8/s1600/IMG_20141102_203745%5B1%5D.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-jJKaed5IXgY/VFe1yxIMHAI/AAAAAAAACfE/OAr-HCxJsn8/s1600/IMG_20141102_203745%5B1%5D.jpg" height="320" width="181" /></a></div><div class="separator" style="clear: both; text-align: left;">And that's pretty much it. I purchased an old marquee from eBay for $25 (it has some scratches, but it matches the cabinet's condition, so all the better) and printed out the bezel artwork from <a href="http://www.arcadeartwork.org/index.php?/category/181">some high-res scans I found online</a>. You can buy professionally printed repros for the bezel art, marquees and control panel overlays (CPOs), but they tend to cost as much as old stock for something as relatively new and common as Street Fighter games.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">It's also worth noting that it's illegal to actually charge money to play games on a MAME machine, and you have to pay some taxes and be licensed to even accept quarters for any arcade game, so you'll need to hook up an extra button that goes to the coin mech to give yourself credits.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">I have some additional woes with my monitor (including a failing flyback transformer, which causes the screen to get blurry, overbright and show horizontal retrace lines toward the top of the screen), which I will cover in another post, as they don't really relate to the subject at hand.</div>http://filthypants.blogspot.com/2014/11/hooking-pc-to-my-arcade-cabinet.htmlnoreply@blogger.com (Hunter K.)0tag:blogger.com,1999:blog-6845625574553920830.post-3449768668797645286Fri, 03 Oct 2014 16:33:00 +00002014-10-23T10:05:26.297-07:00arcadenintendopunch outrestoreMy Super Punch Out!! Arcade CabinetI just came into possession of an arcade cabinet. It's a genuine Nintendo Super Punch-Out!! cabinet from 1984 (i.e., almost as old as me).<br /><br />Here it is, in its new (temporary) home on my covered back patio:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-BrfSKoICJzM/VC7I6NyZuwI/AAAAAAAACa8/k4dZSeHiyfs/s1600/IMG_20140929_110154.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-BrfSKoICJzM/VC7I6NyZuwI/AAAAAAAACa8/k4dZSeHiyfs/s1600/IMG_20140929_110154.jpg" height="320" width="181" /></a></div>&nbsp;The marquee is in good condition with just a few scratches and the speakers are still intact, surprisingly. The monitors look pretty terrible in that shot, but don't worry: that's not burn-in, just dirt and cigarette tar scuzz. The paint/vinyl on the sides has some cracking/chipping at the bottom and there's significant warping to the first few layers of plywood on top, but otherwise, it's pretty much intact, if dirty. Here's a shot of the inside, full of leaves:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-R3OT9Hm5Rpc/VC7I6O0s7ZI/AAAAAAAACa0/64XQk5zzdes/s1600/IMG_20140929_110213.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-R3OT9Hm5Rpc/VC7I6O0s7ZI/AAAAAAAACa0/64XQk5zzdes/s1600/IMG_20140929_110213.jpg" height="320" width="181" /></a></div>&nbsp;After applying equal parts rubbing alcohol and elbow grease, I got the dirt scum off the monitors to reveal some light-to-moderate burn-in on both monitors.<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-oju9wLJiopI/VC7I6GzQM8I/AAAAAAAACa4/QXWks58bo_g/s1600/IMG_20140929_170524.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-oju9wLJiopI/VC7I6GzQM8I/AAAAAAAACa4/QXWks58bo_g/s1600/IMG_20140929_170524.jpg" height="320" width="181" /></a></div>&nbsp;But really, it's not so bad considering this old gal had nearly 50,000 games played on her, according to the analog counter inside (that's more than $10k in quarters; pretty good ROI!):<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-aVIBgDaJJss/VC7I6kf5UoI/AAAAAAAACbA/-oW82VXYabE/s1600/IMG_20140929_170550.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-aVIBgDaJJss/VC7I6kf5UoI/AAAAAAAACbA/-oW82VXYabE/s1600/IMG_20140929_170550.jpg" height="181" width="320" /></a></div>&nbsp;The cabinet also came with a piece of smoked plexi that goes in front of the monitors (not pictured in the first image), and this plexi was covered with the same dirt/tar scum that coated the monitors, so it needed a deep-cleaning, as well. During the process, I took a before/after shot to illustrate how thick and nasty that stuff really was (ignore the basset hound on the floor fishing for belly-rubs):<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-LvaGxswi1F4/VC7I7G8uN8I/AAAAAAAACbU/Kf90VXVwEqo/s1600/IMG_20140929_173121.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-LvaGxswi1F4/VC7I7G8uN8I/AAAAAAAACbU/Kf90VXVwEqo/s1600/IMG_20140929_173121.jpg" height="320" width="181" /></a></div>Between the coating on the monitors and the coating on the plexi, I doubt anyone would have been able to tell whether it were turned on or not.<br /><br />I haven't had a chance to get inside and poke around yet, but I plan to check the monitors' capacitors to see if they've leaked and/or dried out, which would necessitate recapping them, and I intend to pull the actual game boards and see if they've suffered any corrosion from on-board batteries. If all is well there, I'll try to actually plug it in--which will require attaching a new plug to the currently-bare wire-ends--and see if the transformer and power supply are still functional. I will also take apart and clean the coin doors, since they're a little janky, as well.<br /><br />I'll update this post as I learn more :)<br /><br /><b><span style="color: red;">Update1:</span></b><br />I opened it up and was pleased to find that the batteries didn't seem to be terribly corroded:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-fAQ4ILMItDk/VDA1w2S4ugI/AAAAAAAACb0/MYCPrkF6-NA/s1600/IMG_20141004_080208.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-fAQ4ILMItDk/VDA1w2S4ugI/AAAAAAAACb0/MYCPrkF6-NA/s1600/IMG_20141004_080208.jpg" height="181" width="320" /></a></div>I fitted a new plug onto the end of the bare wires, threw in some fresh batteries and powered it on. Everything seems to fire up okay, though there's not a lot of action:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-HIJEqnkEfyU/VDA2BXHM6XI/AAAAAAAACb8/zc7rIhlFU3g/s1600/IMG_20141004_124250.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-HIJEqnkEfyU/VDA2BXHM6XI/AAAAAAAACb8/zc7rIhlFU3g/s1600/IMG_20141004_124250.jpg" height="320" width="181" /></a></div>At this point, I'm not sure if have a dicky connection to the board, a dead board or wiped eproms (their UV windows are uncovered and it's pretty bright inside my cabinet, due to the missing control panel). I know a guy who has an identical machine--in much better condition--who has offered to test the board for me, so that will be my next step, I think. In the meantime, I'll continue sprucing things up cosmetically.<br /><br /><b><span style="color: red;">Update2:</span></b><br />I drove my board out to test it in the aforementioned known-working cabinet and the results were less-than-great but better-than-bad:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-aGRJiRgaHy4/VDfpvfc7oLI/AAAAAAAACck/YRs-aF_vxek/s1600/IMG_20141009_152312.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-aGRJiRgaHy4/VDfpvfc7oLI/AAAAAAAACck/YRs-aF_vxek/s1600/IMG_20141009_152312.jpg" height="320" width="181" /></a></div>The picture is blurry and there's a lot of glare on the plexi, but what you're looking at is some garbled graphics (no movement and no sound, unfortunately) and one perfectly-rendered '0'. This suggests to me that the board basically works--that is, it's not totally dead--but my eproms indeed need to be verified and my cabinet needs some more work to get even this far. I also need to go through and check all of my edge connectors and make sure the solder joints are secure and, if not, reflow them.<br /><br />For the eproms, I'm hoping to borrow a USB programmer from a computer engineering professor at the university where I work. If that doesn't pan out, I can get one on eBay for $40.<br /><br /><b><span style="color: red;">Update3:</span></b><br />It was looking like getting SPO!! working was going to be more involved and expensive than I was really hoping to get into, and I didn't want to risk ruining a board that could actually make a collector very happy, so I traded the boards and cabinet to a really swell collector named Marv for this dandy of a JAMMA cabinet:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-TtTUKrxdNOM/VEkyz71JpXI/AAAAAAAACdo/MVl8QSfOlVE/s1600/IMG_20141019_121622.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-TtTUKrxdNOM/VEkyz71JpXI/AAAAAAAACdo/MVl8QSfOlVE/s1600/IMG_20141019_121622.jpg" height="320" width="181" /></a></div>This is actually much more appropriate for my uses, since I can drop JAMMA boards in with ease (I intend to purchase a SF2: Hyper Fighting CPS-1 board in the near future) and, with the help of a J-PAC board, drop a MAME PC in with little-to-no modification. I'll be posting about this process soon.http://filthypants.blogspot.com/2014/10/my-super-punch-out-arcade-cabinet.htmlnoreply@blogger.com (Hunter K.)1tag:blogger.com,1999:blog-6845625574553920830.post-5599842052838737921Sat, 23 Aug 2014 01:58:00 +00002014-08-22T19:01:34.599-07:00buffalocontrollerreviewSNEStomeeTomee SNES Retro Controller ReviewI've been re-acquiring some old gaming consoles lately and it seems official SNES controllers are getting pretty expensive these days, commanding $15-20 at the time of this writing. I already had one official controller but wanted to get a second controller on the offhand chance anyone wanted to play a 2-player game. I wasn't too keen on paying the full price for an official one, so figured I'd try out the Tomee SNES controllers, which are super-cheap and readily available (i.e., no eBay; I got a <a href="http://www.amazon.com/Generic-2x-TWO-Super-Nintendo-Controller/dp/B002KJ02ZC/ref=sr_1_1?s=videogames&amp;ie=UTF8&amp;qid=1408756992&amp;sr=1-1&amp;keywords=snes+controller">2-pack for ~$7 on Amazon</a>).<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-xDo8o7OMLRI/U_f1N78xR7I/AAAAAAAACYM/3s0X3Bdi4rE/s1600/IMG_20140822_183218.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-xDo8o7OMLRI/U_f1N78xR7I/AAAAAAAACYM/3s0X3Bdi4rE/s1600/IMG_20140822_183218.jpg" height="181" width="320" /></a></div>To be clear: at a price of $3.50 each, these controllers are totally worth the money. They're functional and have a look and feel that's reminiscent of the official SNES controllers. I plugged them up and was able to play games just fine.<br /><br />However, the plastic feels a bit flimsy and the d-pad is shaped a bit differently from the official Nintendo controller's (it's significantly fatter than the Nintendo version; Nintendo on top, Tomee below):<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-kmRrEHU4EdE/U_fuQvoqn0I/AAAAAAAACXk/BrUkb5i7oo4/s1600/IMG_20140822_180814.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-kmRrEHU4EdE/U_fuQvoqn0I/AAAAAAAACXk/BrUkb5i7oo4/s1600/IMG_20140822_180814.jpg" height="181" width="320" /></a></div>The four face buttons are also slightly different size and sit taller, though that's a pretty minor issue, IMO (Tomee on the left, official Nintendo on the right; the pic's blurry because my camera kept focusing on my hand instead of the controllers...):<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-O_JNuMBZVT8/U_fvMJBztRI/AAAAAAAACXw/G-zTVMDwbhk/s1600/IMG_20140822_181011.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-O_JNuMBZVT8/U_fvMJBztRI/AAAAAAAACXw/G-zTVMDwbhk/s1600/IMG_20140822_181011.jpg" height="181" width="320" /></a></div>The L/R buttons are significantly sharper-edged and clickier, though they rarely get used in games anyway, so it's also not a big deal. Perhaps more important is the fact that the Tomee controllers are thicker/fatter and don't taper the way Nintendo controllers do, which messes with the overall feel and ergonomics quite a bit (official Nintendo on the left, Tomee on the right):<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-tYE14Qj75EA/U_fvoaNqVnI/AAAAAAAACX4/lE8YKfse5jo/s1600/IMG_20140822_181052.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-tYE14Qj75EA/U_fvoaNqVnI/AAAAAAAACX4/lE8YKfse5jo/s1600/IMG_20140822_181052.jpg" height="181" width="320" /></a></div>The start/select buttons are much mushier than the official controller's and they're extremely prone to getting wedged under the controller face, which is more annoying than detrimental. Both of my d-pads also have an odd quirk whereby pressing down-left with a bit too much force will trigger all directions simultaneously. This can have some pretty hilarious results in games that weren't programmed to expect it, lol.<br /><br />Overall, I think these controllers are a great value for someone who wants to do some casual playing or, in my case, just wants a second controller on-hand for the rare occasion that a friend/guest wants to throw down on some multiplayer action. If you're serious about your gaming, though, you'll want to have an official controller, which is more reliable, more comfortable and built to last.<br /><br />If you're planning to use an SNES-to-USB adapter to use a real controller with an emulator, I suggest looking instead at the <a href="http://www.amazon.com/Buffalo-Classic-USB-Gamepad-PC/dp/B002B9XB0E">Buffalo Classic USB Gamepad</a>, the price of which varies from around $12-20. This controller feels significantly more solid than the Tomee and actually feels extremely similar to a new official Nintendo SNES controller in weight and button-feel. Here's a (shitty) picture of mine next to one of the Tomees for comparison:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-ar61QCtPFHs/U_fyLlQfFlI/AAAAAAAACYA/vHylRzxPjKE/s1600/IMG_20140822_181432.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-ar61QCtPFHs/U_fyLlQfFlI/AAAAAAAACYA/vHylRzxPjKE/s1600/IMG_20140822_181432.jpg" height="181" width="320" /></a></div><br />http://filthypants.blogspot.com/2014/08/tomee-snes-retro-controller-review.htmlnoreply@blogger.com (Hunter K.)0tag:blogger.com,1999:blog-6845625574553920830.post-7281524974507171240Thu, 21 Aug 2014 22:56:00 +00002014-08-21T15:56:56.538-07:00camerahtc onem7purple picturesHTC One M7 Purple Camera ProblemThe camera is one of the main reasons I purchased an HTC One (M7), with its awesome low-light performance, so I was really bummed when my pictures started getting a weird purple tint around the edges. The problem got progressively worse, to the point that the camera was essentially unusable:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-jodnKtsmzg4/U_Z2V40rKoI/AAAAAAAACXY/8wFOkQAh6Cc/s1600/IMAG0175.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-jodnKtsmzg4/U_Z2V40rKoI/AAAAAAAACXY/8wFOkQAh6Cc/s1600/IMAG0175.jpg" height="181" width="320" /></a></div>So, I did some digging online and, while my case is abnormally serious, the purple picture problem seems to be a common issue for HTC Ones that were manufactured early on in their product run (I preordered mine and got it right at launch). No one is exactly sure what causes the problem, but people suspect it's related to heat, either in the phone itself or specifically at the "ultrapixel" camera sensor. Either way, replacing the camera module supposedly fixes it, and there have been reports of individuals sending their phones in for other warranty issues and getting them back with newer camera modules, whether they reported purple pics or not.<br /><br />In my case, I went down to the local Sprint affiliate and inquired about a camera replacement. The tech started an insurance report and found that 'camera takes purple pictures' was one of the pre-defined claims, so he was able to order a refurbished phone for me on the spot at no cost (not even an insurance deductible!). A couple days later, I received my new phone and its camera works as well as I remembered. I'll update this post if it starts showing the same issues.http://filthypants.blogspot.com/2014/08/htc-one-m7-purple-camera-problem.htmlnoreply@blogger.com (Hunter K.)4tag:blogger.com,1999:blog-6845625574553920830.post-6449108197795159195Fri, 18 Jul 2014 20:56:00 +00002014-07-18T13:56:31.781-07:003dfxCRTcrt-royalen64pixel shaderRetroArchCRT-Royale and 3dfx ShadersTwo fairly new shaders have popped up that are worth mentioning: TroggleMonkey's CRT-Royale and leilei's 3dfx. They're both available in Cg format in <a href="https://github.com/libretro/common-shaders">libretro's common-shaders github repo</a>, though CRT-Royale utilizes some advanced features that aren't available in RetroArch v1.0.0.2 (the most recent release at the time of this writing).<br /><br />CRT-Royale is particularly exciting for me because TroggleMonkey managed to overcome some issues with shadow-mask emulation that I thought were totally intractable at current common resolutions (i.e., 1080p). The result is some really great phosphor emulation at reasonable scale factors, along with all of the bells and whistles users have come to expect from CRT shaders, including "halation"/glow, bob-deinterlacing support and curvature, along with a ton of options that are unique to this shader.<br /><br />I'm not going to cover many of them here because it would take forever to get screenshots and there's not much point when TroggleMonkey has included a very informative README with the code, along with support for RetroArch's new runtime parameter support (so you can see the effect of your changes in real-time). However, I thought the shadow mask stuff was super-cool and deserved some closeups. Here's a shot of the shader with default settings (as always, click to embiggen):<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-ZPfEm86JOXM/U8mHtqoLmoI/AAAAAAAACTY/LTPjHss6StY/s1600/default.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-ZPfEm86JOXM/U8mHtqoLmoI/AAAAAAAACTY/LTPjHss6StY/s1600/default.png" height="240" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div>First, we'll look at my favorite effect, the in-line shadow mask (called slot-mask in the code):<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-MG1L3iiUuWw/U8mEP6PwR8I/AAAAAAAACSM/f91JUSkFaCY/s1600/in-line.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-MG1L3iiUuWw/U8mEP6PwR8I/AAAAAAAACSM/f91JUSkFaCY/s1600/in-line.png" height="240" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-UjuBNviwCo0/U8mEP77SbsI/AAAAAAAACSI/itvLOdT3xxQ/s1600/in-line-big.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-UjuBNviwCo0/U8mEP77SbsI/AAAAAAAACSI/itvLOdT3xxQ/s1600/in-line-big.png" height="320" width="320" /></a></div>This is the same configuration I was shooting for with my PhosphorLUT shader, and you can see that the configuration of the phosphors has that familiar vertical, staggered orientation:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-CKMMX12v2cI/U8mFXPqHCtI/AAAAAAAACSY/hjeyZr4lORg/s1600/TileableLinearSlotMaskTall15Wide9And4d5Horizontal9d14VerticalSpacing.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-CKMMX12v2cI/U8mFXPqHCtI/AAAAAAAACSY/hjeyZr4lORg/s1600/TileableLinearSlotMaskTall15Wide9And4d5Horizontal9d14VerticalSpacing.png" height="320" width="320" /></a></div>Next, we have the very similar aperture grille:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-w8AOpuCxf6g/U8mFnEFjazI/AAAAAAAACSs/q6Orq9eBHbE/s1600/aperture-grille.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-w8AOpuCxf6g/U8mFnEFjazI/AAAAAAAACSs/q6Orq9eBHbE/s1600/aperture-grille.png" height="240" width="320" /></a></div><div style="text-align: center;">&nbsp;<a href="http://3.bp.blogspot.com/-a3jQpJtisMw/U8mFnCD8jhI/AAAAAAAACSk/7oFRhPdhmHs/s1600/aperture-grille-big.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="http://3.bp.blogspot.com/-a3jQpJtisMw/U8mFnCD8jhI/AAAAAAAACSk/7oFRhPdhmHs/s1600/aperture-grille-big.png" height="319" width="320" /></a></div>The main difference between this and the in-line slot mask is that it doesn't have the slight staggering (only really visible in the closeups and at super-huge resolutions). In closeup of the LUT, you can see that it just removes the crossbars between triads:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-CFp5FrSB-8k/U8mFm_IrxYI/AAAAAAAACSg/hqnKl2itSrM/s1600/TileableLinearApertureGrille15Wide8And5d5Spacing.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-CFp5FrSB-8k/U8mFm_IrxYI/AAAAAAAACSg/hqnKl2itSrM/s1600/TileableLinearApertureGrille15Wide8And5d5Spacing.png" height="320" width="320" /></a></div>Last, we have the dot-triad shadow mask (called "shadow-mask-EDP" in the code), which was common on CRT computer monitors:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-ort_v-8dsqU/U8mGqPf966I/AAAAAAAACTE/euJCl_FBSt0/s1600/triad.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="http://2.bp.blogspot.com/-ort_v-8dsqU/U8mGqPf966I/AAAAAAAACTE/euJCl_FBSt0/s1600/triad.png" height="240" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-0e9GRENYKhA/U8mGpyMhu-I/AAAAAAAACTA/rnzXaWUfxvw/s1600/triad-big.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-0e9GRENYKhA/U8mGpyMhu-I/AAAAAAAACTA/rnzXaWUfxvw/s1600/triad-big.png" height="319" width="320" /></a></div>&nbsp;As you can see, it looks very similar to <a href="http://1.bp.blogspot.com/-LzfkseJ3ycM/UzeM3d-CwrI/AAAAAAAAB94/U9-4UbGTGEw/s1600/IMAG0077.jpg">the high-res shots I took of my Compaq CRT monitor</a>&nbsp;(from my <a href="http://filthypants.blogspot.com/2014/03/tvs-and-retro-gaming-emulation.html">emulation/TV</a> post). And here's the dot-triad blown up:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-xQtJh3kHFCg/U8mGpwvwqWI/AAAAAAAACS8/Ma9CEL2sQF4/s1600/TileableLinearShadowMaskEDP.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="http://1.bp.blogspot.com/-xQtJh3kHFCg/U8mGpwvwqWI/AAAAAAAACS8/Ma9CEL2sQF4/s1600/TileableLinearShadowMaskEDP.png" height="320" width="320" /></a></div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">The other shader I wanted to show is leilei's 3dfx shader, which tries to mimic the effects of a 3dfx GPU, known for some distinctive dithering among other things. In addition to obvious applications like RetroArch's Quake core, Nintendo's N64 also used a GPU that was very similar to a 3dfx, which makes it appropriate for RA's Mupen64plus core. When run at low-ish internal resolutions and paired with RetroArch's per-texture 3-point filtering, you can get a pretty good approximation of what N64s looked like.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">Here are some shots of the shader at 320x240 and 640x480 (i.e., native and double res, respectively):</div>Native res:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-S6To4Ls81SE/U8mJB1t0B7I/AAAAAAAACTk/qmFwjGorPdA/s1600/native.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-S6To4Ls81SE/U8mJB1t0B7I/AAAAAAAACTk/qmFwjGorPdA/s1600/native.png" height="224" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-uLpL8jGo-_8/U8mJCX087AI/AAAAAAAACTs/8MXQD2ZG440/s1600/peach-native-big.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-uLpL8jGo-_8/U8mJCX087AI/AAAAAAAACTs/8MXQD2ZG440/s1600/peach-native-big.png" height="320" width="320" /></a></div><div class="separator" style="clear: both; text-align: left;">Double internal res:</div><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-SIOlbE20f6A/U8mJB5gK1XI/AAAAAAAACTo/jv7LjPzQpU4/s1600/480.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="http://4.bp.blogspot.com/-SIOlbE20f6A/U8mJB5gK1XI/AAAAAAAACTo/jv7LjPzQpU4/s1600/480.png" height="224" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/--_QgBsxjOAs/U8mJB5PjVCI/AAAAAAAACTg/BdlH3RiyySs/s1600/peach-480-big.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/--_QgBsxjOAs/U8mJB5PjVCI/AAAAAAAACTg/BdlH3RiyySs/s1600/peach-480-big.png" height="320" width="320" /></a></div>&nbsp;As you can see, the doubled res looks significantly sharper, but the scanlines are thinner and less pronounced (and twice as many of them) relative to the native res. I also like native res because it makes HUD/menu items look a little less "pasted-on":<br />Native res:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-OUy3or_K4eY/U8mJl4NcbrI/AAAAAAAACUE/MoE70GdlQgo/s1600/native-star-big.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="http://4.bp.blogspot.com/-OUy3or_K4eY/U8mJl4NcbrI/AAAAAAAACUE/MoE70GdlQgo/s1600/native-star-big.png" height="168" width="320" /></a></div><div class="separator" style="clear: both; text-align: left;">Doubled internal res:</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-eMrbJBuZgrE/U8mJl9g5-CI/AAAAAAAACUA/_n_QJXV75DM/s1600/480-star-big.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-eMrbJBuZgrE/U8mJl9g5-CI/AAAAAAAACUA/_n_QJXV75DM/s1600/480-star-big.png" height="168" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;"><br /></div>http://filthypants.blogspot.com/2014/07/crt-royale-and-3dfx-shaders.htmlnoreply@blogger.com (Hunter K.)24tag:blogger.com,1999:blog-6845625574553920830.post-8538139989783535886Fri, 20 Jun 2014 13:40:00 +00002014-10-10T12:12:53.288-07:00comparisonHQ2xpixel shadershaderxBRTrue Hq2x Shader Comparison With xBR<b><span style="color: red;">Background</span></b><br />I was shocked to learn recently that the shader I and others have long called Hq2x is/was actually a misnamed port of another shader entirely! guest.r originally put out a 2.0 scale shader with a suffix "HqFilter," which stands for a part of the color blending code. Over time, this shader was ported to a million different emulators (including the official Metal Slug PC releases) and, at some point, the name got confused with another popular emulation upscaling algorithm, Hq2x. As CPU filters have been supplanted over time with GPU shaders, no one seemed to notice that <i><b>no true shader port of the classic Hqnx algorithm--in any scale--existed in any language</b></i>. <span style="color: red;">EDIT</span>: looks like <a href="http://web.archive.org/web/20050204021247/http://www.shadertech.com/shaders/stsummer04/JaewonJung-src.zip">there was an attempt to port it back in 2005</a> but it never caught on because it was incomplete and had some bugs, but it's something.<br /><br />Fast-forward to a few weeks ago, when a shader programmer named Armada brought this up in RetroArch's IRC channel. He shared some pics of the "Hq4x" shader in the common-shaders repo (which itself was based on the old XML shader in bsnes' gitorious repo, which in turn was based on guest.r's ePSXe shader) and an identical pic taken using a CPU-filter version of Hq4x. The differences were obvious and indisputable:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-7gIEiVvhepQ/U6RmNt0di6I/AAAAAAAACKQ/pDOwOSbCaRk/s1600/comparison.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-7gIEiVvhepQ/U6RmNt0di6I/AAAAAAAACKQ/pDOwOSbCaRk/s1600/comparison.png" height="144" width="320" /></a></div>I started digging through old forum posts and it turns out that <a href="http://www.razyboard.com/system/morethread-hq2x-4x-5x-pete_bernert-266904-5329219-0.html">several people had noticed this over the years</a>, but no one ever posted any comparison pics or were able to backup their suspicion in any way.<br /><br />Armada and I did find that there was an old DOSBox renderer called OpenGL-Hq that was at least a step in the right direction, being a hardware-accelerated implementation of the Hqnx algorithm, and it was helpful insofar as it demonstrated how the algorithm can use an external lookup texture for the detection. However, it was not particularly applicable to modern shader language, so Armada set out to port directly from the CPU filter's C implementation.<br /><br />After some intense work, which included <a href="https://github.com/Armada651/hqx-lut-generator">creating a program to generate the LUTs that Hqnx bases its calculations on</a>, Armada completed <a href="https://github.com/Armada651/hqx-shader">his shader port</a>&nbsp;(also copied into&nbsp;<a href="https://github.com/libretro/common-shaders/tree/master/hqnx">the common-shaders repo</a>) and it works beautifully! Incidentally, the requirement for LUTs means that a true Hqnx port wasn't even possible until fairly recently, as SSNES/RetroArch is/was the first emulator (that I know of, at least) to support LUTs in shaders.<br /><br /><b><span style="color: red;">Comparison Shots</span></b><br />If you've read over my previous comparison of Hyllian's xBR vs Hqnx, xBR won by a landslide in pretty much every comparison, which is no surprise because it wasn't really an apples-to-apples comparison. That in mind, here are updated pics that show a true comparison between the two algorithms (2xBR shader first, Hq2x shader right after and Hq2x CPU filter third):<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-YztBuZJOsGI/T1Jg4DK0N7I/AAAAAAAABJ8/7HkM-Zy1N7M/s1600/2xBR.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-YztBuZJOsGI/T1Jg4DK0N7I/AAAAAAAABJ8/7HkM-Zy1N7M/s1600/2xBR.png" height="280" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-FgRCH2udeI4/U626j1aj6oI/AAAAAAAACNI/D7nMg1nsFg4/s1600/RetroArch-0627-133111.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-FgRCH2udeI4/U626j1aj6oI/AAAAAAAACNI/D7nMg1nsFg4/s1600/RetroArch-0627-133111.png" height="280" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-ybxf6wpgVtQ/U6Rq-HXDk_I/AAAAAAAACKg/LDzWJS6tP38/s1600/cpu-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-ybxf6wpgVtQ/U6Rq-HXDk_I/AAAAAAAACKg/LDzWJS6tP38/s1600/cpu-1.png" height="280" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-fXxb2kgGVw0/T1Jg4llWFVI/AAAAAAAABKE/2IavHRlL6sU/s1600/2xBRbig.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-fXxb2kgGVw0/T1Jg4llWFVI/AAAAAAAABKE/2IavHRlL6sU/s1600/2xBRbig.png" height="319" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-POArWgqsx3A/U626oFBXpyI/AAAAAAAACNQ/Fr9D1WJLzew/s1600/smwbig.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-POArWgqsx3A/U626oFBXpyI/AAAAAAAACNQ/Fr9D1WJLzew/s1600/smwbig.png" height="291" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-QgQ-wFFUp8U/U6RrDDE-T1I/AAAAAAAACKo/EfMvvA4mtRI/s1600/cpu-1big.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-QgQ-wFFUp8U/U6RrDDE-T1I/AAAAAAAACKo/EfMvvA4mtRI/s1600/cpu-1big.png" height="283" width="320" /></a></div><div class="separator" style="clear: both; text-align: justify;"><span style="text-align: left;">The first thing you'll notice in those Super Mario World shots is that Hq2x does a great job of killing the jaggies. Much better, in fact, than ScaleHQ from the other comparison, and almost as good as xBR. There are a couple of rough edges (Yoshi's nose is a good example), but Hq2x is also *very* fast, so reasonable tradeoffs here. Hq2x does completely ignore the light texture blobs in the ground, leaving them as hard-edged rectangles, while xBR turns them into ovals. You can also see some slight lingering differences between the Hq2x CPU filter and the Hq2x shader, where the shader actually does a significantly better job of handling various detections</span><span style="text-align: left;">.</span></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-tv4HvofQPnE/T1K6WXH8KCI/AAAAAAAABLs/-WbjOWeO9T4/s1600/xBRsmall.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-tv4HvofQPnE/T1K6WXH8KCI/AAAAAAAABLs/-WbjOWeO9T4/s1600/xBRsmall.png" height="279" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-1uu-jfof7UA/U626xkhC6lI/AAAAAAAACNY/yWUTNqyBnI0/s1600/RetroArch-0627-133231.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-1uu-jfof7UA/U626xkhC6lI/AAAAAAAACNY/yWUTNqyBnI0/s1600/RetroArch-0627-133231.png" height="280" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-JpkWyh_x92w/U6RsAD0JUYI/AAAAAAAACKw/jMNpdbHHh2g/s1600/cpu-2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-JpkWyh_x92w/U6RsAD0JUYI/AAAAAAAACKw/jMNpdbHHh2g/s1600/cpu-2.png" height="280" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-LGqw3s_ZejE/T1K6UVXl4nI/AAAAAAAABLk/TCYs5b3zPh8/s1600/xBRbig.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-LGqw3s_ZejE/T1K6UVXl4nI/AAAAAAAABLk/TCYs5b3zPh8/s1600/xBRbig.png" height="320" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-_mO26Gkwirw/U6263i-O1FI/AAAAAAAACNg/gc1ck-2-3bE/s1600/ewj1-big.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-_mO26Gkwirw/U6263i-O1FI/AAAAAAAACNg/gc1ck-2-3bE/s1600/ewj1-big.png" height="299" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-6FKimp8bhQk/U6RsEl5R8nI/AAAAAAAACK4/gj_Hqk5KP1E/s1600/cpu-2big.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-6FKimp8bhQk/U6RsEl5R8nI/AAAAAAAACK4/gj_Hqk5KP1E/s1600/cpu-2big.png" height="245" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-hqn_CDq5-Lk/T1KtX1UtxoI/AAAAAAAABLM/ITm_X7QYXbE/s1600/xBR-2-small.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-hqn_CDq5-Lk/T1KtX1UtxoI/AAAAAAAABLM/ITm_X7QYXbE/s1600/xBR-2-small.png" height="280" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-hZ2RdyptjA0/U626-gdD8RI/AAAAAAAACNo/5wbM4epWGyg/s1600/RetroArch-0627-133155.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-hZ2RdyptjA0/U626-gdD8RI/AAAAAAAACNo/5wbM4epWGyg/s1600/RetroArch-0627-133155.png" height="280" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-HgUuW6R11GI/U6RsILnpIaI/AAAAAAAACLA/YbL3sYJ7Zng/s1600/cpu-3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-HgUuW6R11GI/U6RsILnpIaI/AAAAAAAACLA/YbL3sYJ7Zng/s1600/cpu-3.png" height="280" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-HJQlQ8kATME/T1KtWjnWI9I/AAAAAAAABLE/JouM7UVpWak/s1600/xBR-2-big.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-HJQlQ8kATME/T1KtWjnWI9I/AAAAAAAABLE/JouM7UVpWak/s1600/xBR-2-big.png" height="320" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-wA-L4qJ4rl8/U627C8FmhhI/AAAAAAAACNw/T9d4B93HQfE/s1600/ewj2-big.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-wA-L4qJ4rl8/U627C8FmhhI/AAAAAAAACNw/T9d4B93HQfE/s1600/ewj2-big.png" height="320" width="304" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-8Y8JEVBFvkw/U6RsLgFJtjI/AAAAAAAACLI/vMyo39nwUcM/s1600/cpu-3big.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-8Y8JEVBFvkw/U6RsLgFJtjI/AAAAAAAACLI/vMyo39nwUcM/s1600/cpu-3big.png" height="320" width="315" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">On these digitized shots from Earthworm Jim 1 and 2, though, the comparison sort of falls apart. xBR is able to spot the jaggies and smooth them out while Hq2x doesn't spot any patterns at all, due to them being outside of its LUT's detection matrix.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">It's also worth looking at how the algorithms differ in handling text. For this comparison, I included the two extremes of xBR's corner detection, with the 'a' variant as the most rounded and the 'c' variant as the most square:</div><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-TwNywaPZgIM/U6Rv9DbOSaI/AAAAAAAACLc/n8Dn4zO6hww/s1600/hq2x-cpu.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-TwNywaPZgIM/U6Rv9DbOSaI/AAAAAAAACLc/n8Dn4zO6hww/s1600/hq2x-cpu.png" height="280" width="320" /></a>&nbsp;</div><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-HJ4gVMGBT8Q/U627MYYTrHI/AAAAAAAACN4/CtKZ6KkfbXA/s1600/text.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-HJ4gVMGBT8Q/U627MYYTrHI/AAAAAAAACN4/CtKZ6KkfbXA/s1600/text.png" height="280" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-tKlFBxAvtMg/U6Rv9Md8vrI/AAAAAAAACLY/WSsGY9LZvUs/s1600/xbr-a.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-tKlFBxAvtMg/U6Rv9Md8vrI/AAAAAAAACLY/WSsGY9LZvUs/s1600/xbr-a.png" height="280" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-StM2F00wOcE/U6Rv9vbUy0I/AAAAAAAACLs/TK4Mj27GmT4/s1600/xbr-c.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-StM2F00wOcE/U6Rv9vbUy0I/AAAAAAAACLs/TK4Mj27GmT4/s1600/xbr-c.png" height="280" width="320" /></a></div><div class="separator" style="clear: both; text-align: left;">In this comparison, Hq2x is essentially indistinguishable from xBR's 'c' variant, insofar as the text is concerned. The xBR 'a' variant is of course substantially more bubbly, which may be desirable for some games.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;"><b><span style="color: red;">Conclusion</span></b></div><div class="separator" style="clear: both; text-align: left;">My previous comparison wasn't really a fair fight, and I apologize to Mr. Steppin for misrepresenting his algorithm. This is a much better comparison of the algorithms, and in ideal conditions, Hq2x is almost identical to xBR in smoothing while running much faster. However, in other cases--particularly digitized artwork--limitations in Hq2x's pattern detection can leave some images completely unsmoothed.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">The speed of Hq2x makes it attractive for certain use-cases, such as mobile, where performance is still of the utmost importance and xBR either doesn't hit full speed at all or else drains your battery. xBR, on the other hand, can handle a greater variety of images and is more likely to produce a pleasing image with the digitized artwork that became more common in the PSX era.</div>http://filthypants.blogspot.com/2014/06/true-hq2x-shader-comparison-with-xbr.htmlnoreply@blogger.com (Hunter K.)24tag:blogger.com,1999:blog-6845625574553920830.post-3506315933421624940Sat, 10 May 2014 00:18:00 +00002014-05-09T17:18:44.363-07:00color profiledispcalGUItrustyubuntuX-Rite i1 Display ProUsing X-Rite i1 Display Pro with Ubuntu Trusty 14.04As mentioned in a previous post, I borrowed an X-Rite i1 Display Pro color calibration device from my job recently and have been calibrating every display I can get my hands on :P<br /><br />This proved to be a bit of an issue on my various Ubuntu-powered machines, though, as the packages for dispcalGUI that are in the Trusty repos don't support the device yet! I discovered this when the program repeatedly failed with:<br /><blockquote class="tr_bq"><span style="color: lime;">new_disprd() failed with 'Instrument Access Failed'</span></blockquote>When trying to figure out what was going wrong, I opened up a terminal and ran the '<span style="color: lime;">dispcal</span>' program directly (that is, without the GUI) with the <span style="color: lime;">-D5</span> debugging switch, which gave a little more information:<br /><blockquote class="tr_bq"><span style="color: lime;">init_inst returned 'Hardware Failure' (External EEPRrom checksum doesn't match)<br />new_disprd failed because init_inst failed<br />dispcal: Error - new_disprd() failed with 'Instrument Access Failed'</span></blockquote>Evidently, the EEPRrom checksums can't be trusted and the newer version knows to ignore them, so go download the new version from <a href="http://dispcalgui.hoech.net/">the dispcalGUI website</a> (I recommend scrolling down to the 'conventional installation' section, which has debs instead of fooling around with the default 'zero installation' business they point you toward).<br /><br />With the new package, you should be able to use your device without any problems.http://filthypants.blogspot.com/2014/05/using-x-rite-i1-display-pro-with-ubuntu.htmlnoreply@blogger.com (Hunter K.)0tag:blogger.com,1999:blog-6845625574553920830.post-3239643112389971338Fri, 09 May 2014 00:58:00 +00002014-05-09T16:35:23.626-07:00anti-blurAsus VG248QEbacklightcolor profilemonitorstrobeAsus VG248QE Calibrated Color ProfilesOut of the box, the <a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16824236313">Asus VG248QE</a> 144 Hz monitor has absolutely terrible color reproduction, but it doesn't have to be that way forever. I borrowed an <a href="http://www.amazon.com/X-Rite-EODIS3-i1Display-Pro/dp/B0055MBQOW">X-Rite i1 Display Pro</a> color calibration device from my job and used it to make some calibrated color profiles, which I'm happy to share with others who have this otherwise awesome monitor.<br /><br />I had been using <a href="http://www.mediafire.com/download/068zxihsm88vmr5/ASUS+VG248QE+AMD.icm">this color profile</a>, which I found somewhere online (I don't remember where), but I made my own profiles for using <a href="http://www.mediafire.com/download/x0p8fxukn6hdknz/VG248QE-120hz.icm">120 Hz refresh rate</a>&nbsp;instead of 144 Hz, one for using a <a href="http://www.mediafire.com/download/wnckadfxgl3t3he/VG248QE-strobe120.icm">strobed backlight for anti-blur 60 Hz</a>. and another calibrated at half brightness (not sure if this matters) for <a href="http://www.mediafire.com/download/c1f650so0cpm7c3/VG248QE-half-brightness.icm">black-frame-insertion</a>. <strike>For both of these profiles, my monitor had a built-in brightness setting of 24 and contrast of 53, just FYI</strike>. EDIT: I just set the monitor to the factory default 'standard' profile to keep things simple.<br /><br />Also of potential interest, the dispcalGUI software suite includes a measurement of display latency, which was 15 ms for 120 Hz and 23 ms for 120 Hz with strobed backlight. I assume the increased latency was caused by the duration of the backlight blanking.http://filthypants.blogspot.com/2014/05/asus-vg248qe-calibrated-color-profiles.htmlnoreply@blogger.com (Hunter K.)0tag:blogger.com,1999:blog-6845625574553920830.post-7600217386613724440Sat, 26 Apr 2014 19:37:00 +00002014-04-26T12:37:55.373-07:00bsnescx4higanmega man xSNESspecial chipCx4 SNES Special Chip Image DownloadSince byuu added low-level emulation support for the various special chips found in SNES games into bsnes/higan, anyone wanting to play those games has needed an image of the chips to go along with their ROMs. Most of the common SNES special chip images are available from <a href="http://www.caitsith2.com/snes/dsp/">caitsith2's SNES hardware page</a>, except for the Cx4 image used in Mega Man X 2 and 3. Byuu is confident that the contents of the Cx4 image are non-copyrightable (it's just math tables) and hosted a copy of it on his own site for some time but that seems to be either down or missing since his various website overhauls, so I figured I'd host it here, from my mediafire account:<div>http://www.mediafire.com/download/9747o707ciq4lh8/cx4.rom</div>http://filthypants.blogspot.com/2014/04/cx4-snes-special-chip-image-download.htmlnoreply@blogger.com (Hunter K.)1tag:blogger.com,1999:blog-6845625574553920830.post-314516512448719968Wed, 23 Apr 2014 02:35:00 +00002014-04-22T19:36:42.957-07:00codecscomparisonx264x265A Brief Look at x265 vs x264The next-gen open-source video codec known as x265 (h.265 / HEVC) is starting to gain some traction, since it is now included in the popular FFmpeg utility and its various derivatives, so I figured I'd do some poking around and see how it compares with the ubiquitous x264 (h.264 / AVC). <i>NOTE</i>: x265 is still extremely new and unoptimized, while x264 is mature and stable, so this isn't really a fair fight just yet.<br /><br />For this comparison, I downscaled a 720p video to 480p with both codecs. For x264, I used a CRF value of 21, high profile, 'medium' quality preset with a 'film' tuning (these settings were chose for simplicity rather than quality). For x265, I used an RF value of 21, 'medium' quality preset with 'ssim' tuning.<br /><br />During the encoding, x264 used all 8 of my AMD Bulldozer cores at approximately 95% utilization, with an average encoding speed of ~75 fps. In comparison, x265 reached only approx. 65% CPU utilization, with an average encoding speed of just 12 fps.<br /><br />As expected, the videos were comparable in quality, with a slight edge going to x264 (maybe related to differences in my settings, or maybe differences in the codecs, themselves; I'm not sure and didn't delve deep enough to find out), as you can see in these sample shots (click for full size, which is still pretty small):<br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-D7yOHVVU3YA/U1cb1qx2XYI/AAAAAAAACAk/0nq3qKHXZZU/s1600/x264.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://4.bp.blogspot.com/-D7yOHVVU3YA/U1cb1qx2XYI/AAAAAAAACAk/0nq3qKHXZZU/s1600/x264.jpg" height="179" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">x264</td></tr></tbody></table><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-gLIYll-BUZI/U1ccAZWIqmI/AAAAAAAACAs/3QY9CkFrqoU/s1600/x265.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://4.bp.blogspot.com/-gLIYll-BUZI/U1ccAZWIqmI/AAAAAAAACAs/3QY9CkFrqoU/s1600/x265.jpg" height="179" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">x265</td></tr></tbody></table><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-SiZbKPKVTHM/U1ccGw6M-NI/AAAAAAAACA0/fIMbH66IJGA/s1600/x264-2.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://3.bp.blogspot.com/-SiZbKPKVTHM/U1ccGw6M-NI/AAAAAAAACA0/fIMbH66IJGA/s1600/x264-2.jpg" height="179" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">x264</td></tr></tbody></table><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-_1s_WrKyLzU/U1ccLWSJGGI/AAAAAAAACA8/qMHc3-oEGbE/s1600/x265-2.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://4.bp.blogspot.com/-_1s_WrKyLzU/U1ccLWSJGGI/AAAAAAAACA8/qMHc3-oEGbE/s1600/x265-2.jpg" height="179" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">x265</td></tr></tbody></table>However, underlying that slightly better quality, x264 used roughly 47% more bits per second to encode. That is, x265 had a final bitrate of 624 kbps vs x264's 919 kbps.<br /><br />So, x265 already produces a significantly more efficient encoding than x264 but the processing power required for that encoding is much greater (roughly one-sixth the framerate). Moreover, <b><i>de</i></b>coding is all done on the CPU right now, as no GPUs have built-in decoder chips for h.265, so that means greater power usage and shorter battery life when viewing.<br /><br />x265 is already impressive in efficiency but the drawbacks of increased computational costs in both encoding and decoding and drastically slower encoding speeds make it currently unattractive to me. I'll be keeping a close eye on development, though, since it's only a matter of time before the tradeoffs are corrected (improvements in the codec), negated (implementation of hardware encoding/decoding) or rendered moot (improvements in general computation power). After all, it wasn't so long ago that x264 was considered immature, unoptimized and poorly supported in hardware vs xvid / ASP. ;)http://filthypants.blogspot.com/2014/04/a-brief-look-at-x265-vs-x264.htmlnoreply@blogger.com (Hunter K.)2tag:blogger.com,1999:blog-6845625574553920830.post-7097551083761268909Thu, 10 Apr 2014 19:09:00 +00002014-04-24T08:47:04.989-07:00cgCRTinterlacingpixel shaderRetroArchInterlacing Shader for CRTsIn the comments of my <a href="http://filthypants.blogspot.com/2014/03/tvs-and-retro-gaming-emulation.html">TVs and Retro Gaming</a> post, GPDP and Monroe88 mentioned the need for a shader that would take a 480p signal from an emulator and either add 100% black scanlines on "240p" content or blank alternating fields each frame. In other words, they needed a shader that would interlace the default progressive signal, which would allow them to run their displays at 480p for all retro console emulation instead of having to switch back and forth between 320x240 (most games for NES, SNES, Genesis/Mega Drive etc.) and 640x480 (for games that utilized the added lines of resolution that interlacing provided, such as 2-player mode in Sonic 2, SNES' R.P.M. Racing, and tons of PSX games).<br /><br />So, here's the shader in RetroArch-compatible Cg format:<br /><blockquote class="tr_bq"><span style="color: lime; font-family: Courier New, Courier, monospace;">/* COMPATIBILITY<br /> - HLSL compilers<br /> - Cg compilers<br />*/<br />/*<br /> Interlacing<br /> Author: hunterk<br /> License: Public domain<br />*/<br />struct input<br />{<br /> float2 video_size;<br /> float2 texture_size;<br /> float2 output_size;<br /> float frame_count;<br /> float frame_direction;<br /> float frame_rotation;<br /> sampler2D texture : TEXUNIT0;<br />};<br />void main_vertex<br />(<br /> float4 position : POSITION,<br /> out float4 oPosition : POSITION,<br /> uniform float4x4 modelViewProj,<br /> float4 color : COLOR,<br /> out float4 oColor : COLOR,<br /> float2 texCoord : TEXCOORD,<br /> out float2 oTexCoord : TEXCOORD,<br /> uniform input IN<br />)<br />{<br /> oPosition = mul(modelViewProj, position);<br /> oColor = color;<br /> oTexCoord = texCoord;<br /> }<br />float4 main_fragment (in float2 texCoord : TEXCOORD, uniform input IN) : COLOR<br />{<br />float4 res = tex2D(IN.texture, texCoord);<br />float y = 0.0;<br />// assume anything with a vertical resolution greater than 400 lines is interlaced<br />if (IN.video_size.y &gt; 400.0) y = IN.texture_size.y * texCoord.y + IN.frame_count;<br />else<br />y = 2.0 * IN.texture_size.y * texCoord.y;<br />if (fmod(y, 2.0) &gt; 0.99999) return res;<br />else<br />return float4(0.0);<br />}</span></blockquote><pre><span style="font-family: Arial, Helvetica, sans-serif; white-space: normal;">It has two branching 'if' statements, which is horrible for performance in shaders, but this one is simple enough--and only needs to run at 2x--that it shouldn't matter.</span></pre><pre><span style="font-family: Arial, Helvetica, sans-serif; white-space: normal;"><br /></span></pre><pre><span style="font-family: Arial, Helvetica, sans-serif; white-space: normal;"><span style="color: red;">UPDATE</span>: In the comments, Monroe88 mentioned another very useful shader for use with 31 kHz CRT monitors: <a href="http://code.google.com/p/interpolation-shaders/downloads/detail?name=TVoutTweaks.cg">aliaspider's TVoutTweaks</a>, which lets you add some nice effects, such as composite color correction and horizontal bandwidth (blends things like SNES' pseudo-hires transparency and other dithering effects), which will make the image a little closer to a 15 kHz TV. See Monroe88's comment below for more info and a pic.</span></pre>http://filthypants.blogspot.com/2014/04/interlacing-shader-for-crts.htmlnoreply@blogger.com (Hunter K.)6tag:blogger.com,1999:blog-6845625574553920830.post-706292785168373079Sun, 30 Mar 2014 03:39:00 +00002014-11-14T11:48:43.381-08:00consoleCRTemulatorretroRGBSCARTSNESSony BVMSony PVMTVXRGB-Mini FramemeisterTVs and Retro Gaming / Emulation<b><span style="color: red; font-size: large;">INTRODUCTION</span></b><br /><br />Retro gaming is a hobby of mine and, as I started looking into hooking my retro consoles up to modern displays, I found a bunch of incomplete information and dead links scattered among various enthusiast forums, along with misunderstandings and oft-repeated misinformation. So, after diving down the rabbit hole and exploring a bunch of different options, I decided to post my findings in the hopes of saving others from making any costly, avoidable mistakes.<br /><br /><span style="color: red; font-size: large;"><b>THE ISSUES</b></span><br /><br />I have a big LCD HDTV with a HTPC connected that I use for watching videos and playing emulated games, and I can use various shaders to achieve an aesthetically satisfying approximation of how my retro games looked on CRT TVs. However, there are a number of reasons to use the real hardware instead of emulation, such as emulation accuracy deficiencies--which can render some games unplayable or unenjoyable--and/or latency concerns.<br /><div><br /></div><div>Sadly, modern displays like my HDTV make retro consoles look like absolute crap and can create/exacerbate latency issues, as they recognize the consoles' double-strike/"240p" signal as 480i(nterlaced)--and rightly so, since standard NTSC signals are always 480i regardless of how they're presented; the 240p standard was not created until decades later and even then it wasn't referring to the signal from retro consoles--and attempt to deinterlace them. This adds at least 1-2 frames (16-32 ms) of latency as the deinterlacer tries to combine 2 sets of fields to create a full picture, and that's before the signal even reaches the TV's upscaling circuit, which then adds even more latency (how much is added by the scaler can vary wildly from display to display).</div><div><br /></div><div>To avoid this whole mess, we have a couple of options:</div><div><br /></div><div><span style="color: red; font-size: large;"><b>DIGITAL VS ANALOG</b></span></div><div><br /></div><div>If you really want to use your big, digital HDTV but want to minimize latency, you'll want to sidestep the deinterlacing/slow-scaling issue by plugging your console into an external line-doubler/scaler. The cadillac in this area is the <a href="http://junkerhq.net/xrgb/index.php/XRGB-mini_FRAMEMEISTER">XRGB-Mini Framemeister</a>, which is a Japanese import and <a href="http://www.amazon.com/DP3913515-Framemeister-Micomsoft-Upscaler-Japan/dp/B006H39XJS/">costs an arm and a leg</a>&nbsp;(about $475 at the time of this writing). This sexy lady will take your "240p" input, double the lines to a true progressive signal and then upscale it to an HD resolution that gets piped to your HDTV via HDMI, all essentially laglessly (it adds ~1.5 frames of latency according to Fudoh from the shmups forum). It will even add in a scanline effect, if you want. If, like me, you don't have $500 to piss away on this sort of thing--awesome as it may be--there are some <a href="http://www.amazon.com/Composite-S-video-Audio-HDMI-Converter/dp/B003NS0UUQ">cheap Chinese boxes</a> that can handle the upscaling and deinterlacing (but not the scanline effect) at a slightly lower quality and substantially lower price. This seems like a good compromise to me, though the loss of scanlines is unfortunate. However, if your upscaler has a VGA output (<a href="http://www.ebay.com/sch/i.html?_from=R40&amp;_trksid=m570.l2736&amp;_nkw=CGA%2FEGA%2FYUV">like these</a>) and your HDTV also has a VGA input, you can put a separate scanline generator, like the <a href="http://arcadeforge.net/SLG3000:::3.html">SLG-3000</a>&nbsp;or <a href="http://godlikecontrols.com/">Toodles' T-SLG</a>, in between and get close to the same quality as the XRGB-Mini for much cheaper.<br /><br />Another consideration, though, is that the XRGB-Mini also accepts RGB/SCART signals (see the 'Analog Signals' section below for more details), while the cheaper models like the one linked above only accept composite and S-video. :(<br /><br /><b><span style="color: red;">UPDATE:</span></b> I actually did purchase an XRGB-Mini recently and it's beautiful. I highly recommend it and think it's well-worth the money for an enthusiast.<br /><br />It's also worth noting that any of these upscalers will give you an extremely sharp picture, similar to what you get from unfiltered emulation with nearest neighbor scaling (i.e., super-sharp/pointy pixel edges), so this option is ideal for the pixel fetishists out there but may not be desirable to old-schoolers who grew up playing on crappy little CRT TVs.</div><div><br /></div><div>If you chose to go the digital route, congratulations: you're done! Your upscaler is providing you with the finest picture available. However, you might still want to read the rest of the information here, as some of it may be useful to you anyway, particularly the parts about analog signal quality.</div><div><br /></div><div>Personally, those digital, super-sharp pixels never looked good to me. I'm a big fan of the way CRT TVs look and how they handle those low-res images, so I am/was forced to purchase an analog CRT. Even on an old analog display, though, we still want to keep our picture as nice as possible, which brings us to our next concern:</div><div><br /></div><div><b><span style="color: red; font-size: large;">ANALOG SIGNALS</span></b></div><div><br /></div><div>As far as analog signals are concerned, the top of the heap is <a href="http://en.wikipedia.org/wiki/Component_video#RGB_analog_component_video">RGB</a>, meaning you get an isolated signal for each color, which provides a crisp, clear picture when they're all combined. Just below that is <a href="http://en.wikipedia.org/wiki/S-Video">S-video</a>, which separates the luma signal (brightness information only; produces a black and white picture) from the chroma (color; R, G and B all together) signal so they don't interfere with each other. Far below that we have <a href="http://en.wikipedia.org/wiki/Composite_video">composite</a>--the familiar yellow RCA jacks--which combines chroma and luma into a single signal where interference between the two (known as chroma/luma "crosstalk") significantly degrades the picture. Slightly below composite(!), we have <a href="http://en.wikipedia.org/wiki/RF_modulator">RF</a>, which takes the signal and encodes it into the same format used in over-the-air broadcasts (and you know how good those tend to look...). You can compare how these signals differ in quality by loading up an emulator with Blargg's NTSC filter, which has presets to emulate RGB, S-video, composite and RF.</div><div><br /></div><div><b><span style="color: red; font-size: large;">MATCHING INPUTS TO SIGNALS</span></b></div><div><br /></div><div>In the USA, high-quality inputs, such as component and S-video, are not commonly found outside of large (24" and up), high-priced televisions, such as Sony's Wega line, so if you have a big house and plenty of room (and a strong back), you'll probably want to go for a real hoss of a TV with plenty of inputs. Sadly, most small CRT TVs have only coaxial/RF and *maybe* composite/RCA, which means your picture will always look pretty crummy. I lucked out and found an Apex 14" model with an integrated DVD player that also has S-video, which is good enough quality for me, so my retro consoles are now covered.</div><div><br /></div><div>If--like me--you are satisfied with the quality of S-video <i>and will only be hooking retro consoles up to your analog CRT</i>, congratulations: you're done! If, however, you are a super-picky "videophile" and you think S-video is only fit for unwashed plebs and/or you want to hook your PC up to your CRT, there's more to consider:</div><div><br /></div><div><b><span style="color: red; font-size: large;">THE MANY FACES OF RGB</span></b></div><div><br /></div><div>Within the <a href="http://en.wikipedia.org/wiki/Component_video#RGB_analog_component_video">RGB family</a>, there are about a million different subsets that each serve their own purpose. For TVs in the USA/NTSC world, we have <a href="http://en.wikipedia.org/wiki/Component_video#Luma-based_analog_component_video">"component" video</a> (terrible, vague name, btw), which is also referred to by the color space it occupies, <a href="http://en.wikipedia.org/wiki/YPbPr">YPbPr</a>. For PCs, we have <a href="http://en.wikipedia.org/wiki/VGA_connector">VGA</a>, which uses the familiar--typically blue--15-pin connector. For European/PAL-land TVs, we have 21-pin <a href="http://en.wikipedia.org/wiki/SCART">SCART</a>.</div><div><div><br /></div><div>Note: Europeans are lucky enough to have SCART as a standard input for CRT televisions, and many retro consoles--SNES, for example--can output this standard directly. This is a pure RGB signal and will provide the cleanest, most crisp analog picture around. HOWEVER!!, Japanese SCART (also known as JP-21 pin) and European SCART have a different pinout and, as such,&nbsp;<u>are not compatible</u>, even though they have the same connector. If you want to use a Japanese/NTSC JP-21 pin cable with a European/PAL TV with a Euro-SCART input, you will need a pin converter&nbsp;<a href="http://www.retrogamingcables.co.uk/european-scart-to-japanese-scart-converter.html">like this one</a>. The aforementioned XRGB-Mini, as a Japanese device, does not require such a converter.</div></div><div><br /></div><div>Aside from SCART, it's generally pretty difficult to get RGB from retro consoles, but <a href="http://retrorgb.com/systems.html">it's usually possible if you're determined enough</a>.</div><div><br /></div><div>Now, even though all of these signals and connectors are technically RGB, they are incompatible with each other due to differing sync methods and signal frequencies, which means you'll need a display that is compatible with the signal and has jacks available. This brings us to:</div><div><br /></div><div><b><span style="color: red; font-size: large;">15 KHZ VS 31 KHZ DISPLAYS</span></b></div><div><br /></div><div>One of the major limiting factors in a CRT is the <a href="http://en.wikipedia.org/wiki/Horizontal_scan_rate">horizontal scan rate</a>, which is the frequency at which a display can move the electron gun from the left side of the display to the right and back again. CRT monitors, like the kind you would find attached to a crummy old Packard Bell computer, have a high horiz. scan rate of 31 kHz, while NTSC TVs have a comparatively low scan rate of 15 kHz. Furthermore, devices that expect the high scan rate of 31 kHz displays and send a high-resolution signal are not compatible with--and can actually damage--displays with the lower scan rate if connected. On the other hand, 31 kHz monitors can be coaxed into displaying a "240p" signal using driver hacks like <a href="http://mame.3feetunder.com/windows-ati-crt-emudriver/">CRT_EmuDriver</a>&nbsp;or xrandr and/or custom xorg.conf modelines (<span style="color: red;">for some excellent info on getting 240p in Windows, see Monroe88's comments after the post</span>). This will produce the highest-quality image possible with an emulator:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-BghN8Iq3HBs/Uzd2nZmujOI/AAAAAAAAB8s/9Q4wjdgZ9TM/s1600/pc-vga-240p-15khz-3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-BghN8Iq3HBs/Uzd2nZmujOI/AAAAAAAAB8s/9Q4wjdgZ9TM/s1600/pc-vga-240p-15khz-3.jpg" height="181" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-hdGiYPJRsWM/Uzd2nbuTkwI/AAAAAAAAB8w/BfcignkHe1c/s1600/pc-vga-240p-31khz-2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-hdGiYPJRsWM/Uzd2nbuTkwI/AAAAAAAAB8w/BfcignkHe1c/s1600/pc-vga-240p-31khz-2.jpg" height="181" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-3g42l3vwOO4/Uzd2nDJ9F1I/AAAAAAAAB8o/1mVYHA6-mqg/s1600/pc-vga-240p-31khz.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-3g42l3vwOO4/Uzd2nDJ9F1I/AAAAAAAAB8o/1mVYHA6-mqg/s1600/pc-vga-240p-31khz.jpg" height="181" width="320" /></a></div>The drawback to this setup is that each system you want to emulate needs to render in exactly its native resolution or else it looks like shit, with misshapen pixels and inconsistent scrolling everywhere. The specialized <a href="https://code.google.com/p/groovyarcade/">Groovy Arcade</a> distro automates some of this, but you may still have to use your monitor's hardware calibration controls to get the image to fit/center properly. I found the constant tweaking to be a tremendous pain in my ass and not really worth it.<br /><br />If you're in linux, here's how you can force your monitor to act like an NTSC TV (type into a terminal from an X-session desktop):<br /><blockquote class="tr_bq"><span style="color: #93c47d;">xrandr -q</span></blockquote>This will tell you which display you're using and which modes are available by default. My display was hooked up to DVI-0 via a DVI-to-VGA adapter.<br /><blockquote class="tr_bq"><span style="color: #93c47d;">xrandr --newmode "240p" 5.979 320 332 368 380 240 242 246 263 +CSync<br />xrandr --addmode DVI-0 240p</span></blockquote>(replace DVI-0 with whatever your card reports)<br /><blockquote class="tr_bq"><span style="color: #93c47d;">xrandr --output DVI-0 --mode 240p</span></blockquote>Some older video cards (like my Radeon X600 pictured below) for PCs will have an S-video output next to their conventional VGA and/or DVI outputs, which allows them to connect directly to a standard 15 kHz TV with S-video input:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-NuBWCBwrltI/Uzl3tj0eaoI/AAAAAAAAB_I/z4WDcJN_qSE/s1600/IMAG0055_1.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-NuBWCBwrltI/Uzl3tj0eaoI/AAAAAAAAB_I/z4WDcJN_qSE/s1600/IMAG0055_1.jpg" height="200" width="144" /></a></div><br />This is very convenient, but it comes at a price: the card presents an 800x600 resolution to the PC and then crunches that down to 480i (that is, a standard NTSC signal), and it *cannot* be convinced to do anything else under&nbsp;<b>any circumstances</b> (AFAIK). This output looks pretty good, but it's not nearly as crisp as the VGA 240p 31 kHz image, obviously:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-g7RJi0tsdf4/Uzd4G8DM8vI/AAAAAAAAB9I/mpo1IDmJphg/s1600/IMAG0051.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-g7RJi0tsdf4/Uzd4G8DM8vI/AAAAAAAAB9I/mpo1IDmJphg/s1600/IMAG0051.jpg" height="181" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-U4AWQrQo2bk/Uzd4Gypna2I/AAAAAAAAB9E/MPh8g7H_AAs/s1600/IMAG0053.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-U4AWQrQo2bk/Uzd4Gypna2I/AAAAAAAAB9E/MPh8g7H_AAs/s1600/IMAG0053.jpg" height="181" width="320" /></a></div>On the other hand, it is only slightly worse than a direct S-video connection from console to 15 kHz TV:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-J8KPKXoVjbQ/Uzd5vxn5T5I/AAAAAAAAB9g/XdjwEHwlw1s/s1600/IMAG0067.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-J8KPKXoVjbQ/Uzd5vxn5T5I/AAAAAAAAB9g/XdjwEHwlw1s/s1600/IMAG0067.jpg" height="181" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-3tYvxc3DH3A/Uzd5r37XL0I/AAAAAAAAB9Y/cDeMoVFqvgM/s1600/IMAG0068.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-3tYvxc3DH3A/Uzd5r37XL0I/AAAAAAAAB9Y/cDeMoVFqvgM/s1600/IMAG0068.jpg" height="181" width="320" /></a></div>While S-video will always be slightly blurrier than RGB, the 15 kHz display is simply not capable of producing an image as high-quality as the 31 kHz display's due to its lower resolution and larger, chunkier phosphors. If you have a TV with component/YPbPr jacks, you can use a VGA-to-component transcoder box--like <a href="http://www.amazon.com/Monoprice-108668-VGA-Inch-Component-Converter/dp/B009GUQIPG">this one</a>--to keep a clean RGB signal from your PC to the TV. Since it's a 'transcoder,' you shouldn't suffer any signal degradation, ideally.<br /><br /><b><span style="color: red;">UPDATE (11/14/14)</span></b>: Here's a pic of a PC hooked up to a 15 kHz display (an arcade monitor, to be specific) via RGB:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-CWyc3VCabVA/VGZbh3SpE4I/AAAAAAAACgI/bFerF6fVkp0/s1600/PC-RGB-15khz.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-CWyc3VCabVA/VGZbh3SpE4I/AAAAAAAACgI/bFerF6fVkp0/s1600/PC-RGB-15khz.png" height="204" width="320" /></a></div>The photo kinda sucks and doesn't really do it justice, but you can see that the space between scanlines is much less pronounced vs the 31 kHz monitor. There's also no NTSC color changes like you see in the S-Video shots, for better or for worse. Anyway, back to the original post...<br /><br />Sometimes you want to use your actual retro consoles rather than emulating on a PC--particularly in cases where emulation quality is still relatively poor, such as Sega Saturn or Dreamcast--but you still want to get the highest quality possible, which brings us to:<br /><br /><b><span style="color: red; font-size: large;">BROADCAST MONITORS</span></b><br /><br /><a href="http://retrorgb.com/rgbmonitors.html">Broadcast monitors</a> are high-resolution CRTs that were used by video professionals, such as broadcasters and video editors, to preview high-quality signals during the production process. They cost thousands of dollars new but are now cheap as dirt (relatively), since those professions have moved on to digital/HD signals and formats. Sony's PVM and BVM series of monitors are the most well-known and sought-after among retro gamers and, as such, often command a higher price than some similar products from other manufacturers. Nevertheless, the *VMs and other similar broadcast monitors tend to come with a variety of high-quality inputs, including one or more RGB equivalents (though often with separate sync, which can <a href="http://www.retrogamingcables.co.uk/sony-pvm-scart-converter-bnc.html">require conversion from, say, SCART</a>). Another nice thing about these monitors is that they tend to come with nice, flat sides, unlike most TVs, which allows them to be rolled onto their sides easily for TATE mode games, like shooters.<br /><br />Broadcast monitors are available in sizes up to 30" or so, though models that large are extremely hard to find and tend to be quite expensive, even now, due to their rarity. They are also very expensive to ship, due to their weight, which means many of the auctions on eBay are local-pickup-only (and tend to be in California...). The smaller models of 20" or less are much more common, and can usually be had for between $200 and $300 dollars at the time of this writing. A direct RGB connection from a console to one of these monitors <a href="http://retrorgb.com/rgbmonitors.html">should produce a picture as glorious</a> as the aforementioned PC-VGA-to-240p-31-kHz setup, only without the hassles of modelines, hacked drivers, etc. Unfortunately, I don't have such a monitor, so I can't share any pictures :(<br /><br />In the cases of either the 31 kHz or broadcast monitors, I personally find the image to be a bit sterile and actually prefer the 15 kHz option. I have opted to use the S-video-out on my video card for the convenience it provides, and the quality degradation is only about as bad as choosing bilinear vs nearest neighbor scaling in an emulator (i.e., fine for me, unbearable for perfectionists and pixel-lovers).<br /><br />Anyway, here are some more PC-VGA-to-240p-31-kHz pics :D<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-FjJzD8Yk8mg/UzeM3fw-9MI/AAAAAAAAB-A/Egov8IqG7gM/s1600/IMAG0075.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-FjJzD8Yk8mg/UzeM3fw-9MI/AAAAAAAAB-A/Egov8IqG7gM/s1600/IMAG0075.jpg" height="181" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-LzfkseJ3ycM/UzeM3d-CwrI/AAAAAAAAB94/U9-4UbGTGEw/s1600/IMAG0077.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-LzfkseJ3ycM/UzeM3d-CwrI/AAAAAAAAB94/U9-4UbGTGEw/s1600/IMAG0077.jpg" height="181" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-8_ibEH6-_OU/UzeM22N0TzI/AAAAAAAAB9w/YjezR13wJAU/s1600/IMAG0083.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-8_ibEH6-_OU/UzeM22N0TzI/AAAAAAAAB9w/YjezR13wJAU/s1600/IMAG0083.jpg" height="181" width="320" /></a></div><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-0XIXdS5Ahys/UzeM4YpihyI/AAAAAAAAB98/5whcnOXsLlU/s1600/IMAG0092.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://4.bp.blogspot.com/-0XIXdS5Ahys/UzeM4YpihyI/AAAAAAAAB98/5whcnOXsLlU/s1600/IMAG0092.jpg" height="181" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Good detail shot of the scanlines and the black gaps visible between.</td></tr></tbody></table><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><img border="0" src="http://3.bp.blogspot.com/-C4eRk-32U5s/UzeM5WmtvDI/AAAAAAAAB-M/feVY2lanxPY/s1600/IMAG0093.jpg" height="181" style="margin-left: auto; margin-right: auto;" width="320" /></td></tr><tr><td class="tr-caption" style="text-align: center;">This is what happens to SNES pseudo-hires transparency (bsnes) for some reason :/</td></tr></tbody></table><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-C4eRk-32U5s/UzeM5WmtvDI/AAAAAAAAB-M/feVY2lanxPY/s1600/IMAG0093.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"></a><br /></div><a href="http://3.bp.blogspot.com/-C4eRk-32U5s/UzeM5WmtvDI/AAAAAAAAB-M/feVY2lanxPY/s1600/IMAG0093.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"></a><br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-6OeD7J5Ofv0/UzeM6dmIJ6I/AAAAAAAAB-Y/67fD6ivjLk8/s1600/IMAG0094.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-6OeD7J5Ofv0/UzeM6dmIJ6I/AAAAAAAAB-Y/67fD6ivjLk8/s1600/IMAG0094.jpg" height="181" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-8PMn5t1ZGS4/UzeM7ZEj_bI/AAAAAAAAB-g/0PrStxBk6RY/s1600/IMAG0097.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-8PMn5t1ZGS4/UzeM7ZEj_bI/AAAAAAAAB-g/0PrStxBk6RY/s1600/IMAG0097.jpg" height="181" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-7WA78wNVhK8/UzeM74JZCxI/AAAAAAAAB-o/Zi325zDgcSE/s1600/IMAG0099.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-7WA78wNVhK8/UzeM74JZCxI/AAAAAAAAB-o/Zi325zDgcSE/s1600/IMAG0099.jpg" height="181" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-igLGlFSOM5Y/UzeM8pRWwMI/AAAAAAAAB-w/HsRX5GYdBqw/s1600/IMAG0100.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-igLGlFSOM5Y/UzeM8pRWwMI/AAAAAAAAB-w/HsRX5GYdBqw/s1600/IMAG0100.jpg" height="181" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-G1R9bPy_PGU/UzeM9TMlGJI/AAAAAAAAB-4/nouK9_2bWPA/s1600/IMAG0102.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-G1R9bPy_PGU/UzeM9TMlGJI/AAAAAAAAB-4/nouK9_2bWPA/s1600/IMAG0102.jpg" height="181" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">Some other considerations that I will add to this post soon: CRTs for 480p and higher consoles (PS2, Dreamcast, 360, etc.), 31 kHz at 1024x768 (shaders vs the real thing), I plan to add a decision-making flowchart with approximate costs at some point, as well.</div></div>http://filthypants.blogspot.com/2014/03/tvs-and-retro-gaming-emulation.htmlnoreply@blogger.com (Hunter K.)17tag:blogger.com,1999:blog-6845625574553920830.post-4091609459776041052Fri, 21 Mar 2014 19:49:00 +00002014-03-22T10:42:14.870-07:00analogn64replacementRepairing/Replacing N64 Analog StickI recently purchased a small CRT TV and have been hooking my old consoles up to it, and I noticed the analog stick on my N64 controller was in pretty rough shape. The deadzone was gigantic and it was affecting my performance in some games, so I decided to look into repairing or replacing it with a new stick.<br /><br />I settled on <a href="http://www.amazon.com/Redesigned-REPLACEMENT-Joystick-Controller-Thumbstick/dp/B009MRZAUC">this replacement stick</a>, available for $11 from Amazon at the time of this writing.<br /><br />The replacement process is very easy and takes only a few minutes, with no special tools required other than a small philips-head screwdriver, though a flathead screwdriver and some needlenose pliers will make the job easier.<br /><br />To start, just flip over the controller and remove the 7 large screws on the back, then remove the 2 small screws next to the memory card / rumble slot (they're easy to miss/forget):<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-HMyld4-fqsw/Uy3LT3pGeiI/AAAAAAAAB8Q/m2jN1uxWfVI/s1600/IMAG0012_1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-HMyld4-fqsw/Uy3LT3pGeiI/AAAAAAAAB8Q/m2jN1uxWfVI/s1600/IMAG0012_1.jpg" height="320" width="317" /></a></div>You should then be able to lift the back panel off, which should reveal something like this:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-0vGJRu-NZxA/Uy3IataujvI/AAAAAAAAB7k/o17xr2ZMA_I/s1600/IMAG0013_2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-0vGJRu-NZxA/Uy3IataujvI/AAAAAAAAB7k/o17xr2ZMA_I/s1600/IMAG0013_2.jpg" height="214" width="320" /></a></div>The circuit board and rubber membrane for the Z-button are held down with little plastic clips on the sides of the analog stick assembly, so unclip the board and set the rubber membrane somewhere safe.<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-d6UT17FQXJk/Uy3IlcLYxsI/AAAAAAAAB7s/8AdVJUkNDow/s1600/IMAG0015_1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-d6UT17FQXJk/Uy3IlcLYxsI/AAAAAAAAB7s/8AdVJUkNDow/s1600/IMAG0015_1.jpg" height="320" width="255" /></a></div>The R and L buttons are just sitting in their homes, held in by a tiny plastic peg-in-hole system, so you may wish to remove them at this time, as well, just to get them out of your way:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-KddG0IsSHtI/Uy3IsAdccPI/AAAAAAAAB70/Yl5aYIxXyPE/s1600/IMAG0014_1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-KddG0IsSHtI/Uy3IsAdccPI/AAAAAAAAB70/Yl5aYIxXyPE/s1600/IMAG0014_1.jpg" height="227" width="320" /></a></div>Next, remove the 4 small screws that hold the analog stick assembly in place (in my case, 3 silver screws on the sides and and bottom, and 1 black screw in the middle) and lift the assembly out. It will still be connected to the PCB by a connector, which you should be able to slide out (pictured below):<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-Ep4id0uTbfw/Uy3I7_RvXCI/AAAAAAAAB78/Tyk09cOzC3o/s1600/IMAG0016_1.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://2.bp.blogspot.com/-Ep4id0uTbfw/Uy3I7_RvXCI/AAAAAAAAB78/Tyk09cOzC3o/s1600/IMAG0016_1.jpg" height="320" width="317" /></a></div><br />Mine was very stubborn and required holding the connector housing in place with my fingers while prying with a flathead screwdriver, alternately loosening the sides until it popped out.<br /><br />Once it's out, you just do the steps in reverse. The connector assembly was the biggest hassle and required some squeezing with my needlenose pliers before it would snap into place. The wires on the connector are pretty small, so make sure you don't accidentally damage them while squeezing, and don't rip the connector housing off of the PCB!<br /><br />I had an additional screw left over (the middle black one from the analog stick assembly; it's actually part of the OEM stick assembly), but I just stuck it into the hole they left in the new analog stick, even though it doesn't thread into anything.<br /><br />And here's the finished product:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-6wqIsQmLYKQ/Uy3JR5MKUQI/AAAAAAAAB8E/ZXOA6K725U8/s1600/IMAG0018_1.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-6wqIsQmLYKQ/Uy3JR5MKUQI/AAAAAAAAB8E/ZXOA6K725U8/s1600/IMAG0018_1.jpg" height="320" width="230" /></a></div>This stick is more like a Gamecube or Xbox 360 analog stick than the OEM N64 sticks, and as such feels much sturdier. The movement is also largely frictionless, unlike the OEM sticks, which makes it superior for games like Mario Party that really wear out the OEMs (and your palms). On the other hand, the sensitivity is really high and it's difficult to do precise aiming on games like Goldeneye and Perfect Dark, as the reticle tends to jump around a bit when you try to zero in on a small target (like a head...). For this reason, I will likely keep at least 1 controller with the OEM-style stick around for that sort of thing.http://filthypants.blogspot.com/2014/03/repairingreplacing-n64-analog-stick.htmlnoreply@blogger.com (Hunter K.)1tag:blogger.com,1999:blog-6845625574553920830.post-4285427117694886431Fri, 08 Nov 2013 13:16:00 +00002013-11-08T11:08:25.504-08:00audio technicaaudiophilelp120turntableAT LP120-USB Turntable ModI got a sweet deal on an Audio Technica LP120-USB turntable from Essex, a place that sells factory rejects, refurbs, and other "almost new" products at a steep discount. The dust cover was busted up*, so I assumed that was why it was there. Unfortunately, it also exhibited some infuriating behavior whereby the left channel would randomly cut out, though I didn't discover this until much later. :(<br /><br />I suspected the internal preamp was the most likely culprit, so I followed <a href="http://forums.stevehoffman.tv/threads/audio-technica-at-lp120-preamp-removal-detailed-instructions-video.318596/">this tutorial</a> describing how to bypass the preamp entirely and push the untouched phono signal straight out to the RCA cables (which I may replace with jacks soon, instead). Honestly, there's not much too it. You just cut out the board and splice up the RCA cables directly to the red/white/ground wires.<br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody><tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-SYZQJFexdKs/Un02ig2bg_I/AAAAAAAAB54/rmkU410dS5k/s1600/IMAG0007_2.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="http://3.bp.blogspot.com/-SYZQJFexdKs/Un02ig2bg_I/AAAAAAAAB54/rmkU410dS5k/s320/IMAG0007_2.jpg" width="201" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">The removed preamp board.</td></tr></tbody></table><br />I was pleasantly surprised when, in addition to fixing my channel dropout problem, the sound quality seems considerably better in the high frequency range. This improvement is why most people do the mod in the first place, and the above link contains some pre-mod and post-mod recordings to help potential modders decide if the improvement is worth their time and effort. I could not distinguish between the two recordings in ABX testing, but the difference in person is easily noticeable. For example, the natural crackles and pops on the records were very subtle and difficult to hear pre-mod but are easily audible post-mod. This may not sound like a particularly positive development, but it's unsettling to think that I was losing that much sound off the top before.<br /><br />*I was able to piece everything back together with some super glue, but you can also purchase them new from Audio Technica (you can email their customer service) for around $30.http://filthypants.blogspot.com/2013/11/at-lp120-usb-turntable-mod.htmlnoreply@blogger.com (Hunter K.)0tag:blogger.com,1999:blog-6845625574553920830.post-1500028513601451176Wed, 06 Nov 2013 19:29:00 +00002013-11-06T11:29:05.676-08:00bsneshiganpixel shaderQuark Shaders for Higan/bsnes v093+As of v093, Higan (previously known as bsnes) includes a new shader format based on OpenGL 3.3 / GLSL 1.5. This format is nice, powerful and roughly as flexible as RetroArch's Cg support. Hyllian, aliaspider and I set to work converting many of the most popular shaders to the new format, available from the <a href="https://github.com/hizzlekizzle/quark-shaders">Quark Shader</a> Github repo.<br /><br />If you're not familiar with git, you can download the full repo by clicking on the 'Download ZIP' button in the right-hand margin.<br /><br />To use these shaders, place the entire *.shader directory into your Video Shaders directory. One caveat: the handful of shaders that utilize motion blur won't work with v093, but should be functional with v094+.http://filthypants.blogspot.com/2013/11/quark-shaders-for-higanbsnes-v093.htmlnoreply@blogger.com (Hunter K.)9tag:blogger.com,1999:blog-6845625574553920830.post-6237988521187128794Mon, 14 Oct 2013 14:59:00 +00002014-06-02T05:53:55.776-07:00libretroRetroArchshaderRetroArch Overlay BordersRetroArch has long had support for fun borders/backgrounds that can fill the unused black space on HDTVs using a specially crafted shader combined with an image, <a href="http://filthypants.blogspot.com/2012/09/background-shader-for-retroarch.html">as described in a previous post</a>. However, this system can be finicky and it isn't very forgiving of different screen sizes and aspect ratios. There is another way to achieve a similar outcome, though, using RetroArch's built-in overlay system.<br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-nG-AenvX2fs/UlwGD8srelI/AAAAAAAAB5c/SFE7BS-hlfs/s1600/RetroArch-1014-091514.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://2.bp.blogspot.com/-nG-AenvX2fs/UlwGD8srelI/AAAAAAAAB5c/SFE7BS-hlfs/s320/RetroArch-1014-091514.png" height="180" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Gameboy border pictured with Harlequin's Gameboy shader</td></tr></tbody></table><div>This system was designed to provide onscreen touch controls for the Android and iOS ports of RetroArch, but we can use the same hooks on PC to display our borders. All you have to do is add this to the bottom of your retroarch.cfg:<br /><blockquote class="tr_bq"><span style="font-family: Courier New, Courier, monospace;">input_overlay = "/path/to/overlay.cfg"</span></blockquote><div>You can also load overlays directly from the in-game RGUI menu under Settings &gt; Overlay Options.</div><div><br /></div><div>The overlay.cfg file is extremely simple, containing only 4 short lines (you can either copy these into a blank text file yourself or use the one I include in the download at the bottom of the post):</div><div><blockquote class="tr_bq"><span style="font-family: Courier New, Courier, monospace;">overlays = 1<br />overlay0_overlay = border.png<br />overlay0_descs = 0<br />overlay0_fullscreen = true</span>&nbsp;</blockquote></div><div>This file tells RetroArch that there will only be 1 overlay, which image to load as the border (in this case, border.png, located in the same directory as the overlay.cfg), that there will be no buttons attached to the overlay (that is, for touchscreen controls) and that it will take up the full screen, including any black space.</div><div><br /></div><div>In addition to these border effects, you can also use this system to apply semi-transparent overlay effects, such as scanlines, which can be useful in very low-power settings, such as on Raspberry Pis, homebrew-capable Nintendo Wiis or older cell phones that can't handle even lightweight scanline shaders. Even some MAME "rgb" effects can be used with this system with minor modification.</div><div><br /></div><div>This system will work fine with the borders from my previous post, and here's a bunch more (formatted for 1920x1200 displays) from <a href="https://www.dropbox.com/s/89ufa3v2te6i3uf/borders.zip">NeoGaf user richisawesome</a>.</div><div><br /></div><div>Here is the download (contains border.cfg, two example borders and an integer scale Cg shader, though the shader should not be necessary now that you can force integer scaling through RGUI):</div><div><a href="http://www.mediafire.com/download/1fpa407519jg2hu/overlay-borders.zip">http://www.mediafire.com/download/1fpa407519jg2hu/overlay-borders.zip</a><br /><br /><b><span style="color: red;">UPDATE (06/02/2014):</span></b> You can also check out <a href="https://github.com/libretro/common-overlays">RetroArch's overlay repository on github</a>.</div></div>http://filthypants.blogspot.com/2013/10/retroarch-overlay-borders.htmlnoreply@blogger.com (Hunter K.)7tag:blogger.com,1999:blog-6845625574553920830.post-2689607153363998826Tue, 16 Jul 2013 22:38:00 +00002013-07-16T15:38:51.163-07:00borderlands 2errorfixsteamFix for "Failed to start game (app already running)" error - Steam I got a fancy new 144 hz monitor the other day and was messing with some settings on Borderlands 2 to push it up past 60 fps but after poking around a bit, I couldn't load the game and instead got this error:<br /><blockquote class="tr_bq"><span style="color: red;">Failed to start game (app already running)...</span></blockquote>I looked online and found a number of potential fixes, none of which worked for me, including the ill-advised "run Steam as an administrator." -_-<br /><br />Thankfully, someone mentioned that they had also been using the graphics enhancement program SweetFX before getting the error. Removing all of the SweetFX files cleared it up for me, as well.<br /><br />Here is a list of all of the files used by SweetFX (found in the Borderlands 2 Binaries\Win32 directory, in my case):<br /><blockquote class="tr_bq"><span style="color: red;">d3d9.dll<br />d3d9.fx<br />dxgi.dll<br />dxgi.fx<br />injector.ini<br />SweetFX readme.txt<br />SweetFX_preset.txt<br />SweetFX_settings.txt<br />and the SweetFX folder</span></blockquote>Move/delete these files/folders from your executable's folder and you should be set.http://filthypants.blogspot.com/2013/07/fix-for-failed-to-start-game-app.htmlnoreply@blogger.com (Hunter K.)0tag:blogger.com,1999:blog-6845625574553920830.post-6257994456649173911Sat, 29 Jun 2013 22:45:00 +00002013-06-29T15:46:14.896-07:00chromiumfixubuntuyoutubeFix for Youtube error: 'This video is currently unavailable' - Ubuntu ChromiumThankfully, this one's an easy fix and will presumably apply to other browsers and operating systems, as well.<br /><br />I've been using Chromium as my browser for a while and everything has been great until recently, when some youtube videos wouldn't play reliably and instead would show the error:<br /><blockquote class="tr_bq"><div style="text-align: center;"><span style="color: red;">This video is currently unavailable.</span></div><div style="text-align: center;"><span style="color: red;">Learn more</span></div></blockquote>This is apparently caused by being enrolled in Youtube's HTML5 video trial. You can enroll/unenroll from the program by visiting <a href="http://www.youtube.com/html5">this link</a>.<br /><br />I had forgotten I was even using HTML5 video, so I never even considered this could be the problem. Once I unenrolled, everything works fine again. Of course, YMMV.http://filthypants.blogspot.com/2013/06/fix-for-youtube-error-this-video-is.htmlnoreply@blogger.com (Hunter K.)2tag:blogger.com,1999:blog-6845625574553920830.post-4628822153713746544Tue, 25 Jun 2013 01:14:00 +00002013-08-13T18:46:15.236-07:00ditheringpixel shaderDedithering Pixel ShadersDithering, as it applies to pixel art, is a pattern made up of two or more colors of pixels arranged in a pattern (usually a checkerboard or dotted line) that, when viewed on a CRT television, will blend together, resulting in an average of the adjacent colors. This allows an image to display more colors, perceptually, than may be technically possible to show otherwise, and was also frequently used to produce a transparency effect. Unfortunately, when such dithering is viewed on a modern LCD monitor or TV, the color blending never happens and we're left with ugly checkerboards all over the place. Even worse, pixel art upscaling-interpolation algorithms such as HQx and xBR tend to have a really rough time with dithering.<br /><br />Recently, though, several different folks all independently developed their own solutions to the dithering problem using pixel shaders. Here are the raw images to which we'll be applying the shaders:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-AIivWjR1hQI/UcjpG89G4BI/AAAAAAAABzE/oq2Hxb3CZxY/s1600/al-raw.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="224" src="http://1.bp.blogspot.com/-AIivWjR1hQI/UcjpG89G4BI/AAAAAAAABzE/oq2Hxb3CZxY/s320/al-raw.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-2m_S6sVn8mw/UcjpHEmvuGI/AAAAAAAABzM/GBxFEPW_C0A/s1600/k-raw.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="298" src="http://2.bp.blogspot.com/-2m_S6sVn8mw/UcjpHEmvuGI/AAAAAAAABzM/GBxFEPW_C0A/s320/k-raw.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-c0ixFPMSxEs/UcjpG6JcORI/AAAAAAAABzI/tyuzZHnd1Eo/s1600/mj-raw.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="224" src="http://2.bp.blogspot.com/-c0ixFPMSxEs/UcjpG6JcORI/AAAAAAAABzI/tyuzZHnd1Eo/s320/mj-raw.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-xsvNT44_TEg/UcjpHgb1kRI/AAAAAAAABzY/VZaj1laAysI/s1600/xmen-raw.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="224" src="http://1.bp.blogspot.com/-xsvNT44_TEg/UcjpHgb1kRI/AAAAAAAABzY/VZaj1laAysI/s320/xmen-raw.png" width="320" /></a></div>Three of these games are for Sega Genesis, which relied on dithering extensively, and the other is from an SNES game that uses "pseudo-hires transparency," which functioned similar to dithering insofar as the artists expected the vertical lines to be blended together by a CRT TV.<br /><br /><b><span style="color: red; font-size: large;">CBOD</span></b><br />First off, we'll look at coastkid's CBOD shader, which uses three shader passes of 4-pixel blur using various threshold values. It can be a bit blurry but does an impressive job of smoothing out the dithering, particularly with regards to vertical dithering patterns, with which the other shaders often have trouble:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-p-MI_41aPz4/Ucjqu6vO10I/AAAAAAAABzw/m4cgKYOKFxM/s1600/al-cbod.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="224" src="http://4.bp.blogspot.com/-p-MI_41aPz4/Ucjqu6vO10I/AAAAAAAABzw/m4cgKYOKFxM/s320/al-cbod.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-vFvApZ9SNew/UcjquwM7-ZI/AAAAAAAABzs/stMdhqBfbD8/s1600/k-cbod.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="298" src="http://1.bp.blogspot.com/-vFvApZ9SNew/UcjquwM7-ZI/AAAAAAAABzs/stMdhqBfbD8/s320/k-cbod.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-I-gvmxvFc20/Ucjqu_lR8hI/AAAAAAAABzo/-DFyhJ6YCX0/s1600/mj-cbod.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="224" src="http://1.bp.blogspot.com/-I-gvmxvFc20/Ucjqu_lR8hI/AAAAAAAABzo/-DFyhJ6YCX0/s320/mj-cbod.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/--EO3rITBYeU/UcjqvQU9hiI/AAAAAAAAB0A/JoMfHQ8_Jhg/s1600/xmen-cbod.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="224" src="http://2.bp.blogspot.com/--EO3rITBYeU/UcjqvQU9hiI/AAAAAAAAB0A/JoMfHQ8_Jhg/s320/xmen-cbod.png" width="320" /></a></div><b><span style="color: red; font-size: large;">GTU</span></b><br />Next up, we have aliaspider's GTU shader, which uses a "pixel bandwidth" variable to determine how much horizontal blurring should occur. This shader also includes light scanlines (which can be lightened or eliminated entirely by manipulating variables within the shader) and gamma correction, making it a one-stop option for people who want the benefits of CRT blending, color and scanlines without any heavy-handed phosphor emulation, etc. Its handling of pseudo-hires transparency is particularly nice:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-QDUeVJr7r_A/UcjrmEoiafI/AAAAAAAAB0U/I7mdGIJ0sHQ/s1600/al-gtu.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="224" src="http://3.bp.blogspot.com/-QDUeVJr7r_A/UcjrmEoiafI/AAAAAAAAB0U/I7mdGIJ0sHQ/s320/al-gtu.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-ndradn91G4s/Ucjrl5Vr3HI/AAAAAAAAB0M/ruSPPt73pRI/s1600/k-gtu.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="280" src="http://1.bp.blogspot.com/-ndradn91G4s/Ucjrl5Vr3HI/AAAAAAAAB0M/ruSPPt73pRI/s320/k-gtu.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-5p5zP0WkfHA/UcjrmDKNbpI/AAAAAAAAB0Q/LSMrzPF3GpI/s1600/mj-gtu.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="224" src="http://4.bp.blogspot.com/-5p5zP0WkfHA/UcjrmDKNbpI/AAAAAAAAB0Q/LSMrzPF3GpI/s320/mj-gtu.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-WklmR1zAGhc/Ucjrmr_pF_I/AAAAAAAAB0g/WeYpzRrZFt8/s1600/xmen-gtu.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="224" src="http://4.bp.blogspot.com/-WklmR1zAGhc/Ucjrmr_pF_I/AAAAAAAAB0g/WeYpzRrZFt8/s320/xmen-gtu.png" width="320" /></a></div>For reference, the SNES shot used a bandwidth of 512 while the Genesis shots used a bandwidth of 320.<br /><br /><b><span style="color: red; font-size: large;">MDAPT</span></b><br />The last shader is Sp00kyFox's MDAPT, which stands for 'merge dithering and pseudo transparency.' This shader <strike>uses a modified version of Hyllian's DDT shader's detection code to identify</strike>&nbsp;identifies dithering patterns and then replaces them with an average of the component colors (I was mistaken; the algorithm is all Sp00kyFox's)&nbsp;. MDAPT is especially interesting because it is intended to run at 1x to smooth out dithering silently--so to speak--followed by another upscaling shader. On its own, here's how it handles our dithering example images:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-3reaa0KO-0I/Ucjsunxjy9I/AAAAAAAAB00/h52w5SWOH1s/s1600/al-mdapt.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="224" src="http://3.bp.blogspot.com/-3reaa0KO-0I/Ucjsunxjy9I/AAAAAAAAB00/h52w5SWOH1s/s320/al-mdapt.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-I4uQaoMR4U0/Ucjsut_GxkI/AAAAAAAAB0w/cZVE2IO6HTE/s1600/k-mdapt.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="298" src="http://2.bp.blogspot.com/-I4uQaoMR4U0/Ucjsut_GxkI/AAAAAAAAB0w/cZVE2IO6HTE/s320/k-mdapt.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-1KofBnXy39s/UcjsuhPFfsI/AAAAAAAAB04/0vVaYt5bWdc/s1600/mj-mdapt.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="224" src="http://4.bp.blogspot.com/-1KofBnXy39s/UcjsuhPFfsI/AAAAAAAAB04/0vVaYt5bWdc/s320/mj-mdapt.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-tjL-Aq2YSYI/UcjsvKc05wI/AAAAAAAAB1A/Uf-wlUjaYyw/s1600/xmen-mdapt.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="224" src="http://3.bp.blogspot.com/-tjL-Aq2YSYI/UcjsvKc05wI/AAAAAAAAB1A/Uf-wlUjaYyw/s320/xmen-mdapt.png" width="320" /></a></div>Unfortunately, it sometimes has a few false-positives (notice the '200' in the next shot), but nothing too terrible:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-NbKsQ79SxbU/UcjtQYsA-HI/AAAAAAAAB1Q/xLbwMdkfedA/s1600/smw-mdapt.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="298" src="http://4.bp.blogspot.com/-NbKsQ79SxbU/UcjtQYsA-HI/AAAAAAAAB1Q/xLbwMdkfedA/s320/smw-mdapt.png" width="320" /></a></div><a href="http://forum.themaister.net/viewtopic.php?pid=3521#p3521">When paired with some other shaders</a>, aliaspider was able to use MDAPT to produce some pseudo-hires transparency upscaling that is nothing short of magical:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-eoPGYaiygAY/Ucjt1HW954I/AAAAAAAAB1Y/jlCuw-PJvZ8/s1600/RetroArch-0624-193950.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="298" src="http://4.bp.blogspot.com/-eoPGYaiygAY/Ucjt1HW954I/AAAAAAAAB1Y/jlCuw-PJvZ8/s320/RetroArch-0624-193950.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-s57Fu0pNt48/Ucjt1f-nivI/AAAAAAAAB1c/u0mE-U80XpI/s1600/RetroArch-0624-194722.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="298" src="http://4.bp.blogspot.com/-s57Fu0pNt48/Ucjt1f-nivI/AAAAAAAAB1c/u0mE-U80XpI/s320/RetroArch-0624-194722.png" width="320" /></a></div>You can check out a couple more shots from aliaspider <a href="http://imgur.com/a/DUx8M#8">here</a>.<br /><br />Of these shaders, <a href="https://github.com/libretro/common-shaders/tree/master/Dithering">MDAPT</a> and <a href="https://dl.dropboxusercontent.com/u/8913813/retroarch/cbod_shader_v1.zip">CBOD</a> are available in Cg format, while <a href="https://interpolation-shaders.googlecode.com/files/GTUv031-multipass.shader">GTU</a> is in XML/GLSL formathttp://filthypants.blogspot.com/2013/06/dedithering-pixel-shaders.htmlnoreply@blogger.com (Hunter K.)0tag:blogger.com,1999:blog-6845625574553920830.post-1153380401789356863Tue, 11 Jun 2013 21:10:00 +00002013-07-10T07:48:23.983-07:00customhtc onetemplateHTC One Back Template for DIY Case ArtworkI got a<a href="http://www.amazon.com/gp/product/B00CML640A"> super-cheap, clear hardshell case</a>&nbsp;(price seems to have gone up since I bought it...) for my HTC One and was interested in making some custom art to put between the case and the phone. I wasn't able to find any templates readily available online, so I spent a little bit of time with a flatbed scanner and whipped one up myself: <span style="color: red;">EDIT</span>: turns out that Google resamples images -_- so just taking this image will not work as-is. You'll need to keep the same resolution (i.e., pixels by pixels) but set it to 200 DPI. Or, just download <a href="http://www.mediafire.com/download/lqlgu3165dsd56r/htc-one-template.png">this one</a>.<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-qleLvhvkIvs/UbeSCaFai4I/AAAAAAAABw0/Oae33pvIuss/s1600/htc-one-template.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-qleLvhvkIvs/UbeSCaFai4I/AAAAAAAABw0/Oae33pvIuss/s320/htc-one-template.png" width="173" /></a></div><br />Note: I make no guarantees about the applicability of this template to your own case. It worked for me and I hope you find it useful, as well. The biggest potential issue would be with the cutaways for the power and volume buttons, which are pretty large on my case, but it should be easy to remove them if your case doesn't have them.<br /><br />Here's how it looks when it's all finished:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-EmlDt9PBOGI/UbhuBZ3jxpI/AAAAAAAABxE/VxwaHboVZeU/s1600/IMG_20130612_074350_1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/-EmlDt9PBOGI/UbhuBZ3jxpI/AAAAAAAABxE/VxwaHboVZeU/s320/IMG_20130612_074350_1.jpg" width="233" /></a></div>Sorry about the weird picture. I didn't have another camera on hand, and there weren't any good mirrors at work, so I had to just use the reflection from an old hard drive platter...<br /><br />EDIT: Here's a slightly better picture:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-8jog2ZhD3NQ/UbnF71pJoXI/AAAAAAAABxY/us0YVg4hmdM/s1600/beemocasephoto.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/-8jog2ZhD3NQ/UbnF71pJoXI/AAAAAAAABxY/us0YVg4hmdM/s320/beemocasephoto.png" width="223" /></a></div><div class="separator" style="clear: both; text-align: left;">I made this BMO design along with a couple of other Adventure Time designs, ready to print:</div><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-gqnIsQyyAn8/UcCb7re-LLI/AAAAAAAAByk/1qNThPiLnJs/s1600/print.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-gqnIsQyyAn8/UcCb7re-LLI/AAAAAAAAByk/1qNThPiLnJs/s320/print.png" width="243" /></a></div><div class="separator" style="clear: both; text-align: left;">Best show on television.</div>http://filthypants.blogspot.com/2013/06/htc-one-back-template-for-diy-case.htmlnoreply@blogger.com (Hunter K.)6tag:blogger.com,1999:blog-6845625574553920830.post-8374061706079751737Fri, 31 May 2013 14:39:00 +00002013-05-31T07:39:01.490-07:00cydiarepositorySetting up a Cydia RepositoryFor RetroArch v0.9.9, the new star platform for support is/was iOS via jailbreak, so we needed to set up a Cydia repository for people to pull down the app. I followed <a href="http://www.iphonemodding.com/forum/showthread.php?2264-How-to-create-a-Cydia-Repository">this guide</a>, which was helpful, but there were a few important deficiencies that required additional work. I'm going to cover those issues here.<br /><br />First off, the directory structure described in the guide, with 'apps' and 'uploads' is unnecessary. All you need is a directory that contains your Packages.gz file and a subdirectory named 'deb' that holds your package. If you keep the directory structure from the guide, your Cydia URL will be http://yoursite.com/cydia/upload, which is tacky.<br /><br />More importantly, if you follow the guide, your app will not install to the /Applications directory of your iOS device, and any *.info files will be broken, which was very bad news for RetroArch. To fix this, I followed <a href="http://www.ijailbreak.com/cydia/the-ultimate-tutorial-for-creating-a-cydia-repository-covering-everything-a-z/">this guide</a>, the important parts from which I will summarize here:<br /><br />First, you'll need to take create a new directory with the same name as your application--in my case, RetroArch. Then, inside that directory, create another new directory named Applications and one named DEBIAN. In the DEBIAN directory, place your '<a href="http://www.iphonemodding.com/forum/showthread.php?p=23401#post23401">control</a>' file, which contains information about your application, and in the Applications directory, place your compiled application (in my case RetroArch.app).<br /><br />At this point, you're ready to bundle your application using dpkg:<br /><blockquote class="tr_bq">dpkg -b [your.app.name]</blockquote>Once your deb is created, you can delete the directory structure and then create your Packages.gz:<br /><blockquote class="tr_bq">dpkg-scanpackages -m . /dev/null | gzip -9c &gt;Packages.gz</blockquote>Create a directory called 'deb' and drop your deb bundle into it and you should be all set.http://filthypants.blogspot.com/2013/05/setting-up-cydia-repository.htmlnoreply@blogger.com (Hunter K.)0