When I first got my hands on Mini Metro, it was over at the GOG.com. And I got dreadful Microsoft Visual C++ Runtime Library: Runtime Error!
Going through forums brought nothing useful so I contacted GOGs customer service. They’ve gave me a list of troubleshooting steps and I religiously went through all of them (even a strange suggestion to create a virtual screen?!). As nothing was really solved, it was the time to get out the big guns. In this case it was asking developers at Dinosaur Polo Club for help.
From them I got two steps. One was to install Visual C++ Runtime (different than what GOG guys suggested) and/or to try non-Galaxy build (Galaxy is GOG’s attempt to be Steam). Already fed up with all the runtimes I’ve installed so far, I tried non-Galaxy build first and it worked flawlessly. Problem solved!
After a few hours spent building subway, I was tempted by the other C++ runtime suggested. Would that make my GOG Metro work? Yes, I got another build from Dino guys, but that was just a zip file. Call me spoiled, but I prefer actual installations. And GOG has that. So I ran Visual Studio 2012 runtime and GOG’s Mini Metro started working.
However, that was not without cost - drivers for my Asus touchpad stopped working. As soon as I reinstalled drivers, GOG’s Mini Metro stopped working. Well, since I really needed touchpad drivers so I can have touchpad disabled (if you own Asus N56VJ you’ll understand), I just unpacked Dino’s build over GOG’s and called it a day.
Two things became obvious from this. One is that Dinosaur Polo Club has an excellent support and they didn’t even blink before giving me essentially another copy of a game. Yes, since it is a DRM-free build it doesn’t really matter if I have one or two or million of them - but that is exactly why DRM-free games are awesome - support doesn’t need to go through hoops to give you another copy.
Another is that allowing the use of GOG’s Galaxy client requires a bit of magic in the game and that magic is invasive enough to make game not work. I don’t know any details on what exactly went wrong there but Galaxy seems to need a bit of growing up.
I don’t play often nor I have a long gaming sessions anymore. Yes, I do throw occasional multiplayer game with my kids but but solo-plays are rare and far between. Most of the games I buy are the old ones I get for nostalgic reasons; rarely I buy a new game. Yep, definitely, I’m getting old.
However, these holidays one game peeked my curiosity. Same as with FTL, something simply “clicked” and, with reasonable $10, at GoG.com I saw no reason not to try it out. And boy, is this game fun.
Premise is easy - you create a subway lines to keep various shapes moving to their destination. With time your city grows, you get more lines to deal with, and eventually you fail. If you got emotionally connected to your town, you can continue playing even after you lose or you can decide to call it quits. Game is as simple as you can probably make it to still be interesting. But it is a loads of fun.
And game is completely DRM and Internet free. It might be just a pet peeve of mine but I hate when game requires Internet for no good reason (yes Starcraft II, I am looking at you) and when I cannot play game on whichever computer I feel like. Yes, DRM can be done right - Torchlight II is a nice example of a game that is minimally invasive. But there is something better than a well implemented DRM and that is no DRM at all. And any game that treats its users fairly, deserves to be bought.
For my NAS’ e-mail report I wanted to display NAS4Free version. While uname does give quite a few options, none of them returned all the details I could see on the Status page. And this is where open source shines - source code to the rescue!
Quick investigation has shown that all necessary details are in [util.inc](https://github.com/nas4free/nas4free/blob/master/etc/inc/util.inc). There in get_product_name function I’ve found the first hint - set of prd.* files in /etc directory. Those files get built with the OS and have all the details needed.
To keep a long story short, this is what I’ve decided upon:
For one pet project, I decided to use Microchip’s PIC16LF1559. as it was close to perfect as far as my needs went in that particular scenario. So I got all parts, soldered it onto the board and it almost worked perfectly.
Single thing that gave me trouble was light detection. It seemed as if ADC converter was giving me nonsense. I check and rechecked my code multiple times as this was the first time I’ve dealt with this chip. It took me a while before I remembered to check errata sheet. And, lo and behold, there was an known issue: “AN20 is not internally connected to the ADC bus when AD2CON0’s CHS bit select the pin.” And guess which pin I decided to use for light sensor?
Initialization of ADC is something that will slightly vary with application but what follows is a reasonable starting point:
ADCOMCONbits.ADFM =1;//right-justified
ADCOMCONbits.ADCS =0b111;//Frc (clock derived from A/D RC oscillator)
ADCOMCONbits.ADPREF =0b00;//Vref is Vdd
AD2CON0bits.CHS =20;//select AN20
AAD2CHbits.CH20 =1;//AN20 is connected to ADC2
This will nicely work around the issue by using AN20 on the secondary channel. Not an ideal situation but it was ok in my case as I had no other plans for secondary channel anyhow.
Reading a value is a bit different than when dealing with a usual, single-channel, setup:
uint16_tgetAdcValue(void){
AD2CON0bits.ADON =1;//Turn on ADC
AD2CON0bits.GO =1;while(AD2CON0bits.GO_nDONE){nop();}//Wait for A/D convert complete
AD2CON0bits.ADON =0;//Turn off ADCif(AADSTATbits.AD2CONV){return AD2RES1;}else{return AD2RES0;}}
For my purpose it made sense to turn on/off ADC as needed - for some other scenarios it might be better just to leave it always on. But interesting bit comes when reading a value - ADC saves it interleaved between two registers: AD2RES0 and AD2RES1. Code simply had to make sure to read correct one.
And this, slightly roundabout process, finally got the project working.
This is pretty much just a maintenance release of VHD Attach. No new features are present but some old bugs have been squashed. One that plenty people might have found annoying is erroneous removal of the ReFS integrity stream on NTFS drives. This makes sense when you try to create virtual disk on ReFS but has no place when dealing with NTFS.
Also registration to handle both .vhd and .vhdx is added. As this is option not turned on by default on Windows 10, not many people actually noticed it missing, but a few did. And finally there is a fix for the dreaded NullReferenceException when OpenWithProgids is not present. Neither of these really affect many systems, but it did affect some.
This is most probably the last release without the auto-upgrade functionality. I have always been proponent of software not phoning home and not making the internet connection whenever it pleases; it just seemed rude to me. However, it seems that normal people generally don’t mind, assuming it is done discretely, and it does solve my e-mail nightmare. Probably 95% percent e-mail error reports I get are due to the use of the old versions and users simply not being aware of the fix.
I am still thinking how exactly to do it and how to impact users as little as possible, considering both startup time and privacy as concerns, but do it I will. :)
As always, download is available on the program page.