Open Source Scan Convertor

Man, this month has hurt the wallet. Earlier in the month I replaced my second monitor for work, because I haven't spent money in a while and I wanted something new and shiny - I really should replace the disks in our NAS but that's just plain not shiny. One of these days!

Boo!Anyway, I found a guy on Gumtree selling a Framemeister for dirt cheap, so I shot him a message and... was too late. Bummer, it was about half-price! He did still have a last-gen OSSC though, including the audio board, which assuming I could still find somewhere to get the audio board from would still be at a pretty steep discount, so I went ahead and bought it. He threw in a SCART cable for a SNES, and it arrived Friday last week. I managed to botch the audio board install (I am not as steady-handed as I used to be!) but I am certain I can repair it, so for the time being I have to use the 3.5mm output on it still.

I am absolutely rapt in the OSSC. It came with a Logitech Harmony remote, which isn't quite perfect for our TV but does the job on controlling the OSSC well. The living room TV supports Line4x and Line5x modes well, though I think Line4x looks the best once you force it to the correct aspect ratio. The cheap cables I'm using use the composite video line for sync, which results in some noise (diagonal lines) on solid colors, but it's still a dramatic improvement over using the TV's internal scaler.

Regrettably, the battery in Sabriena's Super Mario World cartridge appears to be on the way out and our save games were gone... but that's just an opportunity to start anew!

I also bought a SCART cable for the PS1, which wasn't terribly expensive (I didn't buy a good one, yet) and came yesterday. And finally, I found a pretty great deal on a Japanese Mega Drive which didn't get here in time for the weekend. I'm also in the process of arranging for a guy in Bairnsdale to mod my N64, but I need to wait on that as I've spent a bit too much money lately. :( I had considered looking into something like a TDA8391 IC to make a simple Composite/S-video to RGB decoder to feed the OSSC, but realistically I'm not sure it's worth it. They're terribly difficult to find (there's one supplier selling them for about $30USD each, plus shipping), I don't entirely know what I'm doing with it, and right now the only consoles I have that aren't capable of RGB out is the N64. In the future, I'd like to get an Atari, a C64, and an NES, but realistically I would never play an Atari, and probably not very often play the C64. The NES can likewise be RGB-modded to a much greater effect, so it seems silly worrying about feeding an inferior signal to the OSSC.

Anyway, back to the PS1, the cheap SCART cable is very tight, so I'm not going to unplug it very many times - I'll just leave it plugged into the modded PS1. Picture quality is pretty good for such a cheap cable, and the 2D games on the PS1 have aged extremely well. Castlevania: Symphony of the Night is utterly gorgeous on the OSSC. The screens that run in 480i/576i don't look so shit hot, because I get to pick from either the OSSC's bob-deinterlacing, or I can pass it through to the TV to deal with, with the OSSC being sharper but having the "shimmer" due to unstable clocks. Not sure if I can adjust that out.

Update - 2018-04-22: After buying a scalpel at Spotlight and summoning up some courage, I lifted pins 9, 10, and 11 on the IT6613 (the HDMI transmitter), slid the audio board in underneath and soldered the pins to the appropriate place on the audio board, and it works! A moment of panic as the audio clipped like shit on my PC monitor's HDMI input, but it works fine on the TV. I made a post on the OSSC support forums to find out if there's anything I should worry about here, but at the moment I'm satisfied it's working, and really very happy with it overall.

Update - 2018-04-23: Awoke this morning to a post by one of the mods (I think) on the VGP forums, asking if I'd tried something other than the SNES. I was only slightly aware of the SNES "jitter" problem, but hadn't thought anything of it because the monitor syncs to video flawlessly. However it was a good idea, so this morning before work I connected my PSX up to the PC monitor and it sounds excellent... so mystery solved I guess?

Horsham, VIC, Australia fwaggle

Published:


Modified:


Filed under:


Location:

Horsham, VIC, Australia

Navigation: Older Entry

Gotta Go Fast!

Well, I had some downtime today and decided to smash out a small script to mirror the static maps from Google I'm using, because frankly Google don't render them fast enough for my liking (he says, tongue-in-cheek, chortling). The script itself is pretty ugly, but at this point it does the job:

grep -r 'Location:' fwaggle.org/content/ | cut -d ':' -f 3 | sed -e 's/^[[:space:]]*//' | sort | uniq | while read loc; do \
lochash=$(echo -n "$loc" | sha256); \
filepath="files.fwaggle.org/maps/${lochash}.png"
if [ ! -f "$filepath" ]; then \
echo "Mirroring map for $loc"; \
wget -o /dev/null "https://maps.googleapis.com/maps/api/staticmap?center=$loc&size=240x110&zoom=3&maptype=roadmap&markers=color:blue%7Clabel:S%7C$loc" -O "$filepath"; \
sleep 5; \
fi; \
done

The sleep 5 is probably not entirely necessary, but I decided to add it anyway to ensure I don't get banned from Google Maps. If you can't read the above, basically I take the SHA-256 hash of each location, and if I don't already have an image with that name, I grab a copy of the map. This script takes place before my images are rsynced to my files.fwaggle.org domain.

How to get those into Pelican though? It turned out that was a bit more involved, as Pelican's Jinja templater doesn't contain any sort of hashing filter by default. It turns out it's not terribly difficult to write a filter plugin for Pelican, so I did that. I'll probably open-source it properly outside of my site's source, but for now here's the entirety of the plugin's plugin/hash/__init__.py:

from pelican import signals
from hashlib import sha256

def hash_256(input):
    return sha256(input).hexdigest()

def add_filter(pelican):
    pelican.env.filters.update({'hash_256': hash_256})

def register():
    signals.generator_init.connect(add_filter)

Then the template code is super simple:

<img src="//files.fwaggle.org/maps/{{ article.location | hash_256 }}.png" alt="{{ article.location }}" />

After making some other tweaks (like locally mirroring one of the fonts I use because fonts.gstatic.com was slow to respond also), Pingdom thinks I have the fastest website they've ever seen (rounding errors on percentages notwithstanding):

Faster than 100% of websites!

That's the entire page load time, from a hot-cache at Cloudflare. Results from their other monitoring locations are similar, as long as Cloudflare's cache is still active, which I abuse the shit out of their page rules to ensure that happens as much as my use of their free plan will let me. Of course on a cold cache they get progressively worse in times the further away from Sydney you get. I like the fact that I can't tell it apart from my slow-ass local server most of the time!

Update - 2018-04-20: I slightly modified the plugin code, pushed it to GitHub and imported it as a submodule just on the off chance it's useful to someone else.

Horsham, VIC, Australia fwaggle

Published:


Modified:


Filed under:


Location:

Horsham, VIC, Australia

Navigation: Older Entry Newer Entry

New Monitor Day!

A few months back I decided it was time to replace the piece of shit 32" LCD TV I was using as a monitor with something decent, as it was getting hard to look at and I was quite sure I was giving myself eye strain just using it for work. I ended up spending too much, opting for a 1440p, 144Hz IPS monitor which is pretty nice, really. I've been very happy with it since I've had it.

However, using the 900p LCD as a second screen (for monitoring/alerts for work) has been less than stellar. Next to the IPS, whatever 10-year-old panel is in that thing looked positively awful, and text was quite difficult to read on it as well. Furthermore, on Linux at least, using two screens with two different DPIs is still a terrible experience, even in 2018.

Sabriena and Duncan both replaced their 900p monitors with 1080p units, which we were able to buy locally. They're Acer G246HL - not amazing (60Hz and TN panels), but still a dramatic upgrade from what they had. I'm pretty happy with them, my only complaint would be there's no built-in speakers on the models that they got... not a problem for Sabriena, but we'll have to buy speakers for Duncan in the near future.

For me though, I wanted only a few things: exactly 27" viewable area, and 1440p, so that I would have the same DPI. And then I figured I wanted an IPS panel, so they looked at least reasonably close to each other. The next major requirement was cheap, because I'd already spent too much on one monitor.

Friday I found the ViewSonic VA2719-2K was on sale again at one of my preferred local retailers, so I decided to place an order, and it came yesterday. Other than needing to sit it on a motherboard box to get it at my preferred height, I don't really have any complaints about it. I figure when the budget recovers a little bit I'd like to get a dual monitor stand anyway, so I can put up with the box for now.

Horsham, VIC, Australia fwaggle

Published:


Modified:

Never

Filed under:


Location:

Horsham, VIC, Australia

Navigation: Older Entry Newer Entry

Laptop - back in action!

The SSD in my laptop (an 80GB Intel unit of questionable age that I was gifted by a friend) has started showing some alarming issues (errors in dmesg) so it was time to do something about it. I'd been meaning to get another SSD for my desktop (it currently having the 500GB SSD from my laptop for quite some time) so that I could put the SSD back in it, specifically I wanted to put the image back on the SSD that I took from it using dd as there is commercial software on there that I can't reinstall, that I haven't finished reverse-engineering yet.

So I bit the bullet and ordered an SSD Monday night (Labour day) and ordered an SSD for my desktop, and it arrived Wednesday (PCCG continue to impress). I spent Wednesday night reinstalling Windows on my desktop, and set aside a 50GB partition for Linux for work, and installed that. Everything looked good for Thursday, so I went to work as usual, then after work I disconnected all the drives from the desktop (because I've made that fucking mistake before), hooked up the old SSD and the hard drive with the disk image on it. Booted up Ubuntu on a USB stick (which proved to be a mistake because Linux is missing SIGINFO so you have to guess how long dd has left based off write speeds).

So far so good, despite running off the end of it (as it's a 750GB with 500GB worth of partitions on it), stuck that in my laptop and it fired right up and began the arduous task of updating Windows. Sweet!

Hook everything back up on my desktop and Windows started up, thought nothing of it, ate dinner and so on. Then for some reason I rebooted my desktop and noted that the grub menu wasn't appearing. Uh oh.

Turns out when my desktop's new SSD was reinstalled, it picked Windows' UEFI loader instead of grub. Then Windows, in a very borg moment, seems to have decided to "repair" my drive and restore it's own loader everywhere. I spent a while trying to understand how the fuck to reinstall grub to UEFI from a USB thumbdrive, and in the end I just wanted to go to bed so I just reinstalled Linux just to get it ready for work again today.

Quite happy with the performance of the laptop though, considering it's age. I did make one tweak - disabling Turbo Boost as I'm no longer gaming on it and it significantly reduces the fan noise not having it on, at little appreciable difference in performance from my perspective.

Horsham, VIC, Australia fwaggle

Published:


Modified:

Never

Filed under:


Location:

Horsham, VIC, Australia

Navigation: Older Entry Newer Entry