Wednesday, October 31, 2018

Happy Halloween

Sure, we live in an upside-down surreal hellscape.  We inhabit the darkest and dumbest timeline, where my collection of H. P. Lovecraft stories has been rendered unreadable since they describe such idyllic worlds.  In this so-called reality, even the most gruesome and psychologically-scarring Halloween celebrations are nowhere near as frightening as reading the news.

...But I'll be damned if I'm not going to craft decorations and carve jack-o-lanterns!  These are joyous moments, not to be surrendered!  We will not cede agency over the spooky and/or cute stuff that surrounds our tiny corner of this planet.


Tonight, we fight to reclaim fiction.  Our myths, our ghost stories, our haunted houses deserve better than to be novel distractions from a heartless dominion.
On November 6th, we fight to reclaim non-fiction.  Our streets, our states, our nation deserve better than to be further befouled by power-hungry and hate-fueled madmen.

Happy Halloween, may it bring you glimpses of a more idyllic world, and may we claw our way there together.

Wednesday, September 19, 2018

Late Late Thirties

So, the last of the thirties is upon me.  In hex, that's "27".  In binary, no new bits are needed, so really by all accounts except for base-10, there's nothing scary going on numerically.  Anyway, here's a brief post to celebrate that another trip around the sun has gone by and I'm still here.

Firstly, a dad joke.  I'm not a dad, unless cats count, but still.  I'm middle-aged and appreciate cheesy humor.
My family got together recently and celebrated a bunch of fall birthdays.  I made the amateur mistake of giving others gifts I myself wanted to receive -- I didn't bring anything.
(That's an entirely true story, but I still want to sincerely thank my various relatives!)

Secondly, something the aforementioned cats gave me today.  I saw a magic trick!

I was feisting with Autumn using a flyswatter (we buy them actual cat toys; it's not our fault they prefer mundane objects and trash) and she ran around the corner.  Immediately she came back around and pounced the flyswatter again, except she had magically turned into Book!  I had to do a double-take and everything, it was pretty spectacular.

Magic trick not pictured, since I didn't know it was coming.

These two mostly get along now, but for a good while there was no chance whatsoever that one of them could magically turn into the other without at least a big hiss giving it away.  Little Autumn's big temper has come a long way, and her bigger-but-younger brother is comfortable enough to do silly things like this now.

Life around here is pretty nice.  One could drive himself crazy thinking about politics or even his own age, but taking it easy and maybe having a nice drink later seems like a much better plan.

Wednesday, July 25, 2018

BIOS Cheat Code: SVM on Lenovo Legion Y720T

Occasionally I post things so specific I wonder if anybody but a future me will ever find them helpful or even mildly interesting.  This is perhaps the most esoteric one yet.

I recently got a nice new desktop computer.  Normally I wouldn't bother mentioning the make and model but it's relevant: this is a Lenovo Legion Y720T-34ASU.  It's a big beefy machine with much more plentiful and faster CPUs and GPUs than I've ever owned.  It's ridiculous how much computing power this thing has.

Also ridiculous is that the BIOS disables (and doesn't even surface an option for) virtualization.  KVM, SVM, AMD-V, whatever you call it, the tech is present in the CPUs but unable to be tapped due to an embarrassing and idiotic oversight by Lenovo.  For Lenovo's part, they claim that with Windows 10 Pro, virtualization can be enabled anyway.  I wouldn't know; the first thing I did with this computer was to put Linux on it so that it would actually be useful.  Regardless, omitting this BIOS setting in any modern computer borders on criminal neglect.

Now, I don't need to run VMs very often, so it took me a while to run into and trip over this oversight.  A flurry of posts and attempted support calls later, I had resigned to running VMs remotely on my old beater computer, and doing the old-fashioned X11 remote display routine.  Made me shake my head, but in a pinch, if I needed a virtual machine, I could deal with it.

Then, this morning, there was a reply on a BIOS hacking forum I'd posted to.  Some very clever and kind person figured out, somehow, a way to bypass the limited BIOS interface and enable SVM by force.  They'd done this sort of thing before, enabling locked-away features on various hardware.  I'm hoping this person can teach me to fish, so to speak, because I'd really love to know how they figured this out.

Here is the discussion where all this took place:
https://www.bios-mods.com/forum/Thread-Request-Bios-unlock-for-Lenovo-Legion-Y720T-34ASU

For the sake of multi-basket egg distribution, here are the steps:
  • use a Lenovo Legion Y720T-34ASU (AMD)!  (any other model is a risk I would not take!)
  • extract genius239's rar file to a FAT-formatted USB stick (most are already formatted this way)
    • verify the USB drive contains EFI/BOOT/BOOTX64.EFI folders and file
    • (if that rar becomes unavailable, search for how to make a GRUB EFI Shell bootdisk)
  • reboot and hit f12 at the Lenovo splash screen to enter the boot menu
  • choose your USB drive, UEFI mode (not legacy)
  • at the prompt, enter "setup_var 0x145 0x01" (no quotes, zeroes)
  • that's it!  ctrl+alt+del and boot normally.
And just like that, I could run 64-bit VMs at full speed.  (Or, you know, at all, in VirtualBox's case.)

It's still on Lenovo to deliver a BIOS update that fixes this properly.  Changing any BIOS setting or popping the CMOS battery will clear this change and it will have to be re-applied (which is actually good news to anyone who messes up and gets into trouble, but still).

Wednesday, July 04, 2018

Thursday, June 21, 2018

The Smell

Chunky Milk Productions strikes again!  We made a movie in a weekend, our fourth in as many years.  And this time, we made the "best of" screening, and even won Best Use of Line.   :^)



For way more behind-the-scenes rambling than any sane person would ever read, and for various downloads etc, visit my personal website:
https://penduin.net/48hfp/2018

Our drawn category was "silent film", and the required elements this year were:
  • An illustrator named Sonny or Sunny
  • The line "I wish I knew"
  • A tie (of any sort)
...We won Best Use of Line with a silent movie.  That's exactly the weird sort of thing I love about these projects, and it felt pretty sweet to pick up an award, even such a minor one.

Monday, June 11, 2018

End of Another Era

Today the internet as we know it begins its official retirement from being a powerful tool of individual voices.  It is being actively repurposed to serve instead as a tool of late-capitalist and autocratic forces.

Not that the internet hasn't been in decline as it is.  Not that long ago, nobody could even take a stab at how many significant entities there were on the internet.  Every university, every business, every city, every artist, every enthusiast.  Protocols kept springing up - telnet, email, usenet, FTP, gopher, IRC, HTTP -- there were many ways to use the internet.  Now, you can count off a small handful of for-profit companies and account for an enormous percentage of the internet, both in terms of traffic and ownership.  Non-HTTP (well, HTTPS now) traffic is actively blocked as some kind of scary unknown.  Where there was once a young and curious power widely distributed to anybody with some basic technical chops, there are now giant silos of control, a select few in charge of nearly everything.

Today, the (ill-gotten, illegitimate, incompetent) US government has made the situation much, much worse.

ISPs, gatekeepers of the final mile of the internet, are now free to return to the corrupt practices they were dabbling in before the FCC's Net Neutrality rules were enacted just a few years ago.  Comcast (or any internet service provider, but they are the ones who bought the current, illegitimate FCC) can now treat any internet traffic any way they like.  Somebody tries using a competing service like Amazon Prime or Netflix?  Maybe slow those streams down, unless somebody pays a little extra.  Somebody's going to a site which compares service across various providers?  It's legal now to send them a censored or altered version of the site.  Somebody's accessing a blog which points out the devious practices ISPs are now allowed to employ?  Maybe just return a 404 Not Found instead.  All legal as of today.

ISPs will tell you people like me are chicken little, crying about a non-falling sky.  We had years of no Net Neutrality rules before and everything was fine!  (Well, during those years, the diversity and distribution of information and leverage on the internet dried up, consolidating into the few giants we have now...)  If I was crying wolf about Citizens United, saying a great deal of money will now be spent lying to us, then I'm doing it again now.  Nah, we don't need regulations protecting citizens from greedy monopolies.  How silly!


I've become less and less convinced that even sweeping electoral victories will be able to wrest democracy back from the GOP - authoritarians do not play by the rules, and we've seen over and again the willingness to lie, cheat, and steal every seat, every gerrymandered district, every judicial appointment, every drop of power to the point where there are essentially no legitimate positions or institutions left.  I'm not sure how that can be repaired.  "Money is speech" really did a number on this nation; I'm an optimist at heart but I have a hard time imagining a full recovery.  One thing that hadn't been systematically corrupted was the internet; damaged though it may have been, there was still technically a level playing field, some small venue in life where money did not have a direct exchange rate with power.  Until today.

The US House of Representatives could still put the kibosh on all this and restore Net Neutrality.  86% of the US population is in favor of those protections.  It's not even partisan.  In this day and age!  86%.  But, that would require several Republicans to do their job, and represent the will of their constituents.  I've called mine, and I hope you'll call yours, begging to restore Title II protections and Net Neutrality, but I'm not going to hold my breath.  We know what we're dealing with here.  An irredeemably-corrupt party at the apex of their hostile takeover of what once resembled a republic.  Even with the most inept leadership imaginable, they've managed to chop up and sell off the entire government to the top bidders.  The internet, though a big deal to me, was just one tiny part of all this.

Of some small consolation is that when the United States is officially over, when every last drop of jingoist marketing value has been squeezed from its corpse, I'll at least still live in Minnseota, which is a beautiful place.  We've got our troubles too, but I think we might pull through, more or less intact.  My also-beautiful home state of Wisconsin has got an uphill battle, as it was the testing grounds for the national GOP takeover, but we're already starting to see the rats flee the sinking ship there.  Wisconsinites are no slouches, and you can't fool all of the people all of the time.  It will be tough, and there is a huge amount of damage to be undone, but I hope and think they'll figure things out too.

Things are likely to get worse before they get better, but my hope is that in that time, as more of the voting public will have grown up having active gunman drills in school where I had tornado drills, as the racists and the homophobes and the other piles of fear and ignorance die off, maybe we can overwhelmingly and legitimately get rid of the currently-invincible, infinite-money-wielding autocratic fascists after all.  I just hope there's something left to save.

Tuesday, February 13, 2018

Game Jam

I made a game last weekend!  It's stupidly hard (and just plain stupid) but I'm a certain fashion of proud of it.

It began with an email I skimmed and ignored last week.  Itch (an indie-friendly gaming site and distribution platform, think Steam but with no real entry barriers) frequently hosts game jams, which are week- or weekend-long (and other durations I'm sure) events where a genre is chosen and game makers are encouraged to quickly build a new game, optionally around some given theme(s).  One-mechanic games were on the docket this time.  I generally don't have time to participate in these jams, so I paid it no mind.

Then a work buddy of mine had a case of beer on which the word "Escape" was written, split by the seam in the cardboard.  He jokingly said we needed to make a game about an ape escaping.  We had some fun chatting about that.  There could be fruits or something to collect, but you would be scolded for doing so.  "Why would you waste time collecting stuff when you should have been escaping?"  Each level could just be the displayed image, with a corresponding bit map of which pixels are grab-able.  With the one-mechanic idea freshly ignored in my brain, the ape could constantly swing his arms, and you could swap which hand he was gripping with using one key or button.  ...This could almost work out.

It's Kim's busy season (beginning of the year, accounting) so she was going to be working Saturday.  That left me plenty of time, should I choose to spend it not sleeping.

Well that was that.  Surely I'm a quick enough programmer to make a one-button game about Esc the Ape escaping!  The event kicked off, and the themes announced were "water", "capitalism", and "man versus machine".  ...Well, that was fine, those themes are optional anyway.

Kim to the rescue, as usual.  I talked to her about this ridiculous plan, and without even knowing the themes, she had a suggestion. "The ape could be collecting anything, even coins.  What does an ape need with a gold coin?"  And there it was.  I could even slap a mild capitalism theme onto this thing.

Anyway, I had already developed some rudimentary code to help turn my scribbles into animations and games.  So I made some scribbles...




...and, with a day-plus of programming, turned them into this game!  Enjoy!


https://itch.io/jam/omgjam3/rate/223986


[ afterward... ]
I got some great feedback.  Fellow indie developers are a great audience, and willing to find good nuggets even in rushed, sloppy work like this.  :^)

[ even more afterward... ]
The people who ran the game jam streamed themselves playing all of the entries.  Couldn't make it past my first level, but I have to credit them for trying.  :^)
https://www.twitch.tv/videos/228848222?t=00h51m03s

Wednesday, January 10, 2018

How to Fix: Firefox 57+ Status Bar


I used to use an extension called Status-4-Evar, which did a lot of neat things.  Mozilla has been ruining Firefox's status bar for a long time, and this extension let us get it back the way we wanted.  For me, I want an area of the screen where URLs and status text can appear, but does not vanish or move depending on where my cursor is.  I also don't want it to overlap with useful page real estate.  Basically everything the new Chrome-style corner status bubble is, I do not want.  Recently, Mozilla made more changes which make Status-4-Evar incompatible with new versions.

Many people would prefer to have their downloads and other extension icons down in the bottom bar as well.  That's where I used to have them, but it doesn't bother me terribly to have them up in the top bar instead.

This fix addresses only my consistent-status-area concern, not the icon stuff.  There are solutions out there which re-position and re-purpose the bookmark toolbar and let icons live there.  This is a much simpler and admittedly less-flexible hack.

Credit where it's due; I started with this:
https://github.com/MatMoul/firefox-gui-chrome-css/blob/master/chrome/userChrome.css

My solution is to create "~/.mozilla/firefox/(my profile)/chrome/userChrome.css" containing:
#browser-bottombox {
 height: 1.4em;
 border-top: solid thin #505050;
}
.browserContainer>statuspanel {
 left: 4px !important; bottom: 2px;
 transition-duration: 0s !important;
 transition-delay: 0s !important;
}
.browserContainer>statuspanel>.statuspanel-inner>.statuspanel-label {
 margin-left: 0px !important;
 border: none !important;
 padding: 0px !important;
 background: rgb(0,0,0,0) !important;
 color: silver !important;
}

window[inFullscreen="true"] #browser-bottombox {
 display:none !important;
}
window[inFullscreen="true"] .browserContainer>statuspanel[type="overLink"] .statuspanel-label {
 display:none !important;
}

Your mileage may vary, and unless you use a dark theme (like I do) you'll probably want something other than color: silver for the actual status bar text.

Mozilla, get your house in order.  Let us customize our browser; you are not Google or Apple, that is why we like you.

Tuesday, January 09, 2018

Arcade Sticks and MAME and Key Events, Oh My

This is a solution so simple I feel very silly for not thinking of it sooner.

from a virtual console: (as in ctrl+alt+f1 etc)
    xinit /usr/games/mame -- :1


So my actual problem, for anyone who's curious, is that while using MAME to play some arcade games, my window manager (spectrwm) was capturing the "Alt" key (player 1's second button by default) and doing whatever actions alt+this and alt+that were bound to, depending on what other buttons (keys) were being pressed.

"Just remap the buttons" is a common answer, and not a bad one in many situations.  But the keyboard I use when playing arcade games is this big ol' thing:
It looks and feels like and is in fact built from arcade joystick hardware, but for maximum compatibility it acts like a keyboard when plugged into a computer.  It does indeed support remapping its "keys", but I'm running linux for cripe's sake, there had to be a better way.

I started down this logical path:  VirtualBox (virtual machine container; think VMware but open) steals the entire keyboard so that Alt and other modifier keys end up going to the virtual machines it runs, rather than the host.  Now and then, I get trapped on a certain screen for a moment because I can't just alt+number my way to another one.  It's a mildly annoying but useful feature.  MAME, the software I use to run old arcade games, doesn't seem to have any such option, but it really ought to.

VirtualBox and MAME are both open, so I could dive into the code and see how the keyboard grabbing is done in the former, and possibly graft it into the latter.  I imagine the abstractions used in each case are quite different, but I bet given time I (or someone) could figure it out without too much hassle.

But if I'm going to dive into code, maybe there was something simpler I could do.  Spectrwm, my window manager, is tiny compared to VirtualBox or MAME.  It does almost nothing, which is why I like it.  One of the things it does manage is the ability to assign special behaviour to certain programs.  (It calls these special cases "quirks".)  Perhaps I could dig in there and have it ignore all hotkeys when a certain program (mame) is active.

Then it hit me, again, that I'm running linux, for cripe's sake.  Just because I'm using spectrwm on my X server doesn't mean I can't run another X server with no window manager at all.  And sure enough, if I fire up a second instance of X thusly:
    xinit /usr/games/mame -- :1
...then I have a completely isolated X running only MAME, and can switch between it and my main X session anytime.  For me, this is the best of all worlds.  I can keep up spectrwm and mame updated without having to manage any local patches, and I can mash any combination of those big joystick buttons without any unintended behaviour.

Some keyword search phrases, for any future schmucks having similar trouble:
  • mame grab alt key
  • mame spectrwm keys
  • mame window manager keys
  • wrap x keyboard events
  • linux x grab all keys
  • mame grab keys like virtualbox