Recent Updates Toggle Comment Threads | Keyboard Shortcuts

  • BrainwreckedTech 9:36 pm on March 6, 2013 Permalink | Reply  

    Dump UUID and LABEL Info For Mounted Partitions 

    While a good backup plan is a must, one thing I just caught myself doing is running those backup without storing the filesystem label or UUID. Normally, this really doesn’t matter as the minor convenience of not having to change /etc/fstab wouldn’t be worth the hassle.

    However, in the case of system partitions, this can save a lot of time. With the increasing preference of using UUIDs or labels in boot loader configurations (especially GRUB2), restoring the UUID and/or label to their original value means you can instantly boot into a restored system once recovery is complete.

    Of course, simply putting a couple of files into the root of each drive by hand wasn’t good enough for me. I had to go and automate it. In order to avoid writing to devices that might cause a catastrophe (like the individual devices in software RAID), I queried and parsed the output from the df command. I then used /proc/mounts to find out where the device was mounted (since the output of df is dynamically spaced).

    for dev in `df -h | grep ^/dev | cut -d\  -f1 | cut -d/ -f3`; do
      loc=`cat /proc/mounts | grep $dev | cut -d\  -f2`
      lsblk -fn -o UUID /dev/$dev > $loc/.uuid
      lsblk -fn -o LABEL /dev/$dev > $loc/.label
    done
    
     
  • BrainwreckedTech 3:17 am on January 27, 2013 Permalink | Reply  

    Making Your Own Arch Linux Repository 

    I now have my own Arch Linux repository. I plan on sharing this repository soon, but…you know…sleep.

    The script relies heavily upon the AUR, which does 95% of the work for you. It also requires you to add your own repository to pacman for the times when AUR packages depend on other AUR packages.

    [aurpb]
    SigLevel = TrustAll
    Server = file:///repo/aurpb/$arch
    

    UPDATE 2013-02-03: Implemented package signing.

    1. Follow the directions at ArchWiki’s GnuPG page to set up and register a key.
    2. Use pacman-key --import ~/.gnupg to import the key you just created into pacman on your build machine.
    3. Use pacman-key -lsign [key-id] so that pacman will trust the key.
    4. You’re going to get sick and tired of entering your key’s passphrase as your package list grows, so set up the gpg-agent.

    By default, the script instructs makepkg to remove all packages that had to be installed to build the package. If you are running a dedicated box (or a virtual machine) to build packages and want to keep the build and run-time dependencies, change makepkg -src to makepkg -sc and save yourself some time

    As mentioned earlier, AUR packages sometimes rely on other AUR packages. In these instances, you just have to make sure you list the dependencies first. The script will update the repo database upon a successful build and refresh pacman, allowing the dependency to be installed from your own repository.

    The problems left over after that usually stem from lesser-maintained packages not keeping up with changes to Arch or Linux in general. For that, you can create a shell script that, if found, will allow you to make changes to the files found in the tar.gz file before sicking makepkg on it. I had to do this for avant-window-navigator-bzr and awn-extras-applets-bzr.

    UPDATE 2013-02-04: There was a slight bug in my logic. I assumed that only numbers would be found for version-related info inside PKGBUILDs. Turns out some PKGBUILDs use variables, and that threw off everything. Scoured packer’s source code and found out about AUR’s RPC.

    UPDATE 2013-02-13: Script now tells you what version you currently have built. Now has nicer-looking output. Fixed incorrect usage of repo-remove. Fixed bug where packages were removed in error (e.g. rm lightdm-* removes all packages that begin with lightdm, not just lightdm itself.) If package is not found in the AUR, a pacman search (pacman -Ss) is performed to let you know if the package got moved to the official repos.

    UPDATE 2013-02-16: Broke some functionality off into functions for easier reading. Script will now delete packages and remove them from the repo database if it detects that a package is not in the AUR but present in the official repos.

    UPDATE 2013-02-24: Added architecture detection. Added ability to compile for multiple arches without changing config. Added precaution to not attempt compilation of lib32 packages when target arch is i686. Changed expected directory structure. Under $repdir should be $repnms and under $repnms should be build and arch (i686, x86_64) directories. Added rsync to remote host. TODO: Allow for multiple repos in one go (hence reponms and not reponam).

    UPDATE 2013-03-02: Code now posted to GitHub. The First Real Commit adds a skip to package moving and repo database addition if the package is never successfully built. (These commands would just fail harmlessly before.) Also added a check to to see if the PKGBUILD can be built for the target arch. (Again, commands would just fail harmlessly if the package couldn’t be built.)

    https://github.com/BrainwreckedTech/aurpb

     
  • BrainwreckedTech 8:09 pm on October 11, 2012 Permalink | Reply
    Tags: avidemux, , filmdint, framerate, , lossless, , , NTSC, progressive, pullup, softpulldown, , telecine, , x264   

    Getting the Best Results From MPlayer and Mixed Telecined & Progressive Video 

    This post is years in the making.  Not that I’ve spent the entirety of those years working on this problem, or even the entirety of my spare time.  This is just one of those things that I’ve relentlessly banged my head up against until I couldn’t take anymore, only to have it nag me somewhere down the line and pick it back up again.

    For the longest time, I could not for the life of me process video that was mixed telecine and progressive without having the resulting video end up longer than the original.  The immediate problem is that A/V sync starts out fine but then drifts to whatever the time difference is between the two videos.  I eventually discovered soundstretch, which can adjust tempo (play time) without affecting pitch, but then that introduces the problem of calculating the time difference as a percentage (and the rounding errors involved in that), re-coding an already-lossy audio stream, and the time it can take to process one-to-two hours of uncompressed WAV data.

    While I did have most of that down, it was just too much time.

    (More …)

     
  • BrainwreckedTech 3:38 pm on September 28, 2012 Permalink | Reply  

    Apologies to Feed and E-Mail Subcribers 

    Early morning on September 28, I went through all of my posts to add and fix lead-in pictures. Along the way, I noticed some posts were uncategorized, and also fixed that. It seems that latter action caused some old posts to re-surface as new posts, even though the original publishing date remained the same.

    This “uncategorization” stems from the legacy of this blog, which initially used categories but switched to tags. The “category” functionality is used by the P2P Theme to distinguish between a blog post and a status update. If a post remains “uncategorized” weird things happen when you go to edit the entry in-line, hence the impetus to change the category.

     
  • BrainwreckedTech 9:39 pm on August 27, 2012 Permalink | Reply
    Tags: , miku, project diva, project diva 2nd, psp, , , , vocaloid   

    REVIEW: Project Diva 2nd 

    Project Diva 2nd# CoverProject Diva 2nd♯

    ★★★★☆

     
    PSP only

    I am a 35-year-old North American male, so what the hell am I doing playing a Japanese import PSP game whose target audience is people half my age and whose main attraction is mashing buttons to music sung by (mostly) underage (mostly) girls? For me, I think the hook is obvious. Not only am I fan of Rock Band, I’m also a fan of Japanese quirkiness and also happen to be a fan of the Vocaloids. So what do you do when one of your favorite console games completely bungles its hand-held port and someone else comes along with another spin on mashing buttons to music, including some other stuff you happen to like, on a system whose games are region-free?

    If you need to know what a Vocaloid is, Wikipedia is a friend that can get you started. If you want to know what veered me into Vocaloid territory, I would have to tell you to thank Valve and Ellen McLain for GLaDOS. By making a humans sound like a computer, you’re bound to pique the interest of people using computer software that tries to sound human, and you get Miku singing a translated version of Still Alive, which at first listen could be mistaken as an official translation of the song. After that, I stumbled upon Caramelldansen, and as with any meme like this people are going to incorporate their favorite characters into it, including Vocaloids. The nail in the coffin, though, was Love Is War, an actual full-fledged song, reminiscent of Linkin Park, using Vocaloid as it was intended. Being fully subbed in Kanji, Romaji and English helped greatly.

    (Lest you think English users are being totally ignored: English is harder to pronunciate, thus harder for a computer to pull off, thus the popularity problem. It’s become much better in recent years.

    Enough digressions! Let’s talk game play. (More …)

     
  • BrainwreckedTech 12:28 am on August 19, 2012 Permalink | Reply
    Tags: deathsmiles ii x, , f2p, gotham city imposters, , japan import, mmo, multi-player, rpg, shmup, shooter, single-player, , trouble witches neo, , , xbox live arcade   

    (Mostly) Asian Persuasion (3 XBLA + 1 F2P MMO mini-review) 

    It’s been a long time.  How have you been?  I’ve been really busy….playing video games.  So much so that I realize there was a 2-month gap in my posts.  Well, I guess if I had nothing better to write about during that time, I should indulge you with some of the things that have pilfered my free time.

    Something that came to mind while writing these mini-reviews is the argument over whether or not the Japanese video gaming industry is declining.  I came to the realization that the answer is both yes and no — the mainstream industry is rotting while the small devs and indies are picking up the ball.  Just like it is here in the States.  Hence, the title of the article and the inclusion of one non-Asian game.

    Deathsmiles II X

    Deathsmiles II X First up is Deathsmiles II X.  If you’re unfamiliar with bullet hell shmups, I suggest you also take a look at Triggerheart Exelica as well.

    The fun in the Deathsmiles series isn’t beating the game — that’s relatively easy with unlimited continues and 3 selectable difficulties for each stage.  The challenge is in mastering the scoring system.  Of course part of that mastery lies in playing on the hardest setting and not getting hit, but haven’t we had enough insanely difficult games where getting anywhere is next to impossible?

    The devs certainly thought so and have toned down things a bit in this incarnation. The slowdown in Deathsmiles II X is more prevalent. Getting the true final boss Pigeon Blood Jitterbug in DS2X is a snap.  Level  1 (Easy) can now be selected all the way through the game instead of just 3 stages.  And the penalty to your item counts for getting hit is slashed in half — from 50% is DS1 to 25% in DS2.

    Just because penalties and hoops have been reduced doesn’t mean getting billions of points is any easier.  A hit is still ultra-damning to your final score and finishing off each boss with the homing shot to get Jitterbug leaves you wide open.  You’ll have to work for your 6 billion point achievement, and you’ll have to work even more if you want to score anywhere near 150 billion point mark of the top players on the leader board.

    One thing to note with this game is that Cave experimented with 3D with Deathsmiles II.  Cave is well-known for some of the most gorgeous 2D sprite-based shooters, and they didn’t quite pull it off graphics-wise with Deathsmiles II.  However, with 720P the 3D of DS2 gets a B.  (Compared to the lower-res arcade version which gets a C by comparison.)

    Speaking of Arcade, that mode is a little messed up on the 360 version.  Initially Cave wasn’t even going to bother, but decided to try and stuff it in at the last minute.  Whereas as the the new 360 and Arrange modes have more slowdown than the original arcade version, the Arcade version on the 360 has less.  The incoming enemy markers are also missing.  And there are no leader boards.

    The biggest ding against this game comes on its price tag of $30. I don’t suppose the fact that this was a retail disc release in Japan makes that pill any easier to swallow.  Especially seeing as how we get absolutely ZERO translation.  That’s  right — ZERO translation. Whatever you see in English in this game was already in English.  Brush up on your Google-fu.

    Afterthought: You may opt to go for the original Deathsmiles NA release, which can be picked up used on Amazon for as little as $19 including shipping.

    Trouble Witches Neo

    Trouble Witches NeoNext up is Trouble Witches Neo.  If it isn’t obvious by now, I’m a schmup fan.  (More precisely, a previously-dormant schmup fan.)  As with Deathsmiles, beating the game is no sweat on Easy with unlimited continues.  The challenge is the high score.

    One thing to note is that this game has HORRENDOUS English voice acting.  Consider half of your $15 purchase to be the entertainment value you can derive from that alone.  Here’s the kicker:  You’re going to HAVE to play with the English voice acting if you want to know what the bosses are saying since there are no English subtitles if you chose to enable the original JP voice acting.

    The most interesting thing about this game is that it started life on the PC and its creator is very anti-Touhou.  Aside from that?  There’s actually a tutorial and a this game is translated, so it might be an easier pill to swallow than Deathsmiles II X.  Then again, this game brings back the difficulty that DS2X leaves out, meaning beginners aren’t going to be able to count the continues with their fingers and toes alone.

    Gotham City Impostors

    Gotham City ImpostorsHey, we’re still shooting things here, but at least it’s not a shmup and the characters are actually able enter into legal agreements!  The best way to describe Gotham City Impostors is with an analogy: GCI is to Call of Duty multi-player as Outlaw Golf is to Tiger Woods PGA Tour.  In other words, a completely farcical take on the genre that has a surprising amount of depth and thought put into it that can actually put the big guy to shame.

    The back story makes no sense — a variant of Joker Gas is turning people into Batman and Joker wannabes — and serves little more than to give a flimsy excuse to set up team of Bats and Jokerz.  There are pre-defined load-outs for Medic, Scout, Soldier, and what-not, but you can either tweak these to your liking or roll your own.  (One of the common ones I saw was a mostly-Soldier load-out save for the megaphone — a soldier that could be a healer in a pinch.)

    It’s hard NOT to like this game unless you like to take your games too seriously.  If so, please stick with your Call of Duties and Halos.

    Dungeon Fighter Online

    Dungeon Fighter OnlineThe final entry, and the game I’m currently playing, is Dungeon Fighter Online.  Take Final Fight (or Streets of Rage), then add swords, guns, magic, a juggle-happy combo system, a fantasy setting, RPG elements, and some MMO.

    Did I mention that it’s Free 2 Play, and that you really don’t have to party with anyone if you don’t want to (though it helps if you do)?

    Dungeon Fighter Online has taught me where Phantasy Star Universe has failed so hard.  While both games have you running “dungeons” over and over again, DFO actually gives you a reason to do so (even if it’s something as simple as collecting items, defeating a certain number of a particular enemy, or clearing harder difficulty levels).  DFO’s dungeons are more organized in difficulty, meaning you’re not running all over the game world for harder missions as you level up.  (Counterpoint: Sometimes you’ll be running all over the world for quests pertaining to a particular dungeon.)  While the organized dungeons all but eliminate the need for a centralized party system, DFO has one anyway, as well as a centralized auction system.  And lastly, there’s always some special event (common in F2P), unlike Sega and PSU.

    One word of warning: Although the game is very keyboard-centric, and the game itself does include a bit of game pad support, you may wish to use a program like Joystick 2 Mouse to map a controller to keyboard presses and/or mouse movements yourself.  Reason being: The game itself only supports one joystick, leaving out any secondary joystick and/or D-pad you might have.

     
  • BrainwreckedTech 12:06 am on August 19, 2012 Permalink | Reply
    Tags: , , , , , ,   

    HOWTO: Get NVIDIA On Linux To Use Custom Resolutions Over DVI 

    NVIDIA LogoLinux Logo Half

    You want something easy? Cut the EDID pin on a VGA cable, hook up your monitor, configure xorg.conf to whateve resolution you want, and call it a day.

    You want something scary? Do the same with a DVI or HDMI cable and witness the NVIDIA driver do everything in its power keep you from falling down and skinning your knees like you’re 2 years old.

    The problem stems from the fact that digital flat panels have one native resolution. Well, actually, this would be a problem if these monitors didn’t have internal scalers. So now the problem becomes: What device scales better — your NVIDIA GPU or your flat panel? Chances are most people wouldn’t be able to tell. Some might be annoyed that their flat panel just steches everything without regard to aspect ratio.

    But what if you actually want to run at a “non-native” resolution because you’re using an HDTV whose actual native resolution is 1368×768, whose actual native resolution is never reported at all, but reports the max 1920×1080 as it’s native resolution?

    Here’s the slew of options you need:

    Option “UseEDID” “False”
    Tells the driver not to use modes that the display device reports it can use
    Option “UseEDIDFreqs” “False”
    Tells the driver to ignore frequency ranges reported over EDID.
    Option “ExactModeTimingsDVI” “True”
    IMPORTANT! Tells the driver to use timings as-is. Otherwise, it tries to find a best-fit resolution instead. If you leave EDID enabled while connected to an HDTV, you’ll get a 1368×768 resolution scaled to 1920×1080 resolution. If you disable EDID modes, the driver will fall back to 640×480 and then reject your custom resolution as being too large.
    ModeValidation NoDFPNativeResolutionCheck
    Tells the drive not to check resolutions agains the reported native resolution. This comes into play when UseEDID is false since the driver will fall back on 640×480 and then reject your custom resolution as too large.
    ModeValidation other
    Nothing special to note here as these would be used even if you were using a VGA connection.
    Section "Device"
    	Identifier	"DVI0"
    	Option		"UseDisplayDevice"	"DFP-0"
    	Driver		"nvidia"
    	Option		"UseEDID"		"False"
    	Option		"UseEDIDFreqs"		"False"
    	Option		"ExactModeTimingsDVI"	"True"
    	Option		"ModeValidation"	"NoDFPNativeResolutionCheck, NoEdidModes, NoMaxPClkCheck, NoVertRefreshCheck, NoHorizSyncCheck, NoEdidMaxPClkCheck"
    	Option		"NoLogo"		"True"
    	Option		"DPI"			"144 x 144"
    EndSection
    
     
  • BrainwreckedTech 3:09 am on July 26, 2012 Permalink | Reply
    Tags: code snippets, cut, , dbus_session_bus_address, environment, environment variables, grep, , proc, sort   

    Desktop-Agnostic Detection of DBus Sessions 

    Linux Logo Here’s a little gem I came up after a few hours of brain-wracking.

    The goal involves the scripts I use to have my computers communicate with the file server about which updates they need, and to nag the user (me) about available updates.  After some time, I realized that a user-based approach wasn’t ideal.  Besides the fact that each user needs a tab entry in cron on each computer, and that you can be logged in at multiple computers at one time (which really isn’t a good idea if /home is being shared over NFS), aren’t updates a system thing anyway?  Why depend on a user being logged in, when part of the convenience is having your updates already downloaded for you?

    The problem then becomes, “How do I notify any active users on the system about available updates?”  I solved this initially by using a script I could call upon starting my desktop environment that would dump the DBUS_SESSION_BUS_ADDRESS variable into a file in my home directory.  But now I needed a way for the root user to do it.  I saw code snippets where people searched the names of common desktop binaries, but I wanted a desktop-agnostic solution that would work no matter which desktop you were using or what your chosen desktop does in the future with the names of its binaries.

    (More …)

     
  • BrainwreckedTech 8:00 pm on June 20, 2012 Permalink | Reply
    Tags: , dfo, , , , neople, nexon, , plugins, ,   

    Dungeon Fighter Online Won’t Launch After Re-Installing Windows 

    You know what I like about keeping my games on another drive?  Most of the time, you don’t have to re-install games to run them.  Steam is a great example, as running steam.exe directly on a fresh installation of Windows will prompt you that Steam isn’t setup and that it will re-launch itself to do so.

    Dungeon Fighter Online, however, does something funky. (More …)

     
  • BrainwreckedTech 10:56 am on June 14, 2012 Permalink | Reply
    Tags: , compatibility settings, display scaling, dp, , , , vista, , , xp   

    Correcting Blurry Display Scaling Under High DPI Settings 

    Windows Vista Logo In pre-Vista Windows land, using a DPI setting higher than the default 96 was like inviting a clumsy person to stand next to your china cabinet.  Something was going to break, you just didn’t know what.  Thankfully it was usually something minor.  The most common defect that cropped up were programs that would size their text boxes and other elements by pixels.  Any programmer that gives two shits about their code knows not to do that.  But hey, this is Windows, the Easy Dev Land where All Are Welcome, so code quality is all over the place, even from sources that you would expect to know better.

    To address the issue, Microsoft introduced a flag in the application manifest called dpiAware.  If this flag is not set, Windows will render the application at 96 DPI and then bitmap-scale the entire window up to your specified DPI.  The place that this really sucks is in games, which really don’t need to be hampered by unnecessary scaling as it is.  Nonetheless, a game that doesn’t set dpiAware and tries to run inside a window at 640×480 will render at 960×720 when using a DPI of 144.  On a 1368×768 screen, that doesn’t leave much room.

    Chances are you’re using programs that all make an effort to be DPI-independent.  Some notable exceptions exist (Apple iTunes for Windows) but barring those exceptions, you may wish to completely forgo Display Scaling and leave it up to the application to worry about DPI.

    Step 1: Open regedit and navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Persisted and HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers.  Here you will find any Compatibility settings that you my have already set.  Feel free to clear out all the individual entries.  (You may wish to keep the ones under Layers that say ELEVATECREATEPROCESS as those are the ones that you or the programs themselves have set to run as an Administrator.)

    Step 2: Right-click the desktop, select Personalize at the bottom of the menu, then click on Display in the left-hand column in the window that appears, then click Set Custom DPI Size from the new options that appear in the left-hand column, then check the box that says Use XP Style DPI Scaling, then click OK, then click Apply.  Log off and then back in for the settings to be applied.

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel
Follow

Get every new post delivered to your Inbox.

Join 33 other followers