Living with ARM for a week

So after the crazed purchase I made a few weeks ago, I returned from Japan, and was able to unbox and use the machine I’d been wanting for a while, a non x86 Windows laptop!

The NovaGo has a Snapdragon 835, and my phone, the ASUS ROG phone has the 845. Yes for this week, my cellphone actually has the stronger processor than my computer. Honestly this is almost an unthinkable situation! Although I haven’t been using my phone as a desktop substitute this week. It’s amazing how MS screwed up 10 on the phones, and Continium.

By default it comes crippled with this ‘S’ mode Windows, which hearkens back to the Windows RT launch, with the difference that it’s a quick trip to the application store to unlock Windows 10 Professional. It’s a free download as it should be, and it doesn’t even require a reboot!

Build quality isn’t so bad, the screen folds all the way back to make the machine into a ‘tablet’ although I don’t like that mode so much, it just feels wrong to wrap a keyboard around a monitor. However if you have rambunctious young kids, it’s great as when someone went running by me flailing their arms around like a while animal, when they struck the laptop the screen could easily fold back 180 degrees. Yay.

My first thing to do after setting up Office and VMWare VDI was to install the Linux subsystem, and Ubuntu. it’s exactly the same as it is on x86_64, which is great. And this let’s me have the best of both worlds, just like x86_64. As much as I dislike stumbling around with that aborted child of Pascal & Fortran (Python) at least I can run it under (mostly) Linux to get something close to like the production environment.

The C/C++ compiler is actually all cross tools. I wanted CLI only stuff because I like torturing myself, and it required a few GB of downloads. The good news is that the latest Windows 10 SDK does support GDI/CLI apps, so no crazy SDK hacking required, unlike back in the Windows RT days. Oddly enough the Taskforce 87 interpreter runs fine, but nothing else does.

I did a horrible job at hacking up SDL 1.2 to at least run (kind of, the audio doesn’t work, and it’s all WinDB *EDIT I got it fixed!!!) I got a few things up and running, including DOSBox and FrontVM. One thing that greatly helps is that i386 binaries ‘just work’. Honestly you wouldn’t even know you are running them when you are. Which made hunting down the ARM64 version of Chromium Edge kind of difficult to find. There really needs to be a more apparent way to tell them apart, if anything for battery efficiency.

As pictured, SQL Server 4.21a runs just fine, again you wouldn’t even notice. Same for Visual C++ 1.0 & FORTRAN PowerStation 1.0.

Again the audio in my crap SDL build doesn’t work, so DOSBox is silent, and without Direct X, the text mode is tiny. Oh also, there is no OpenGL in this version of Windows dev kit for some reason. Running ssystem is ungodly slow. Also the default optimizations seems to be Os, optimize for space, and on this ASUS I have to say /Ox is way way faster. DooM is quite playable on DOSBox when build with /Ox, unlike /Os.

For me, I spend most of my day to day in Office, and VMWare VDI, connecting to secure networks. So I’m just one step above a terminal. Which I guess is kind of sad, but this machine more than fills that roll for me. The 120GB of storage is tight. This isn’t a development machine persay, nor is it something to download tonnes of data to, it’s a lightweight machine where it’s strength is the built in 4G modem, and when running ARM software the longer battery life. To me the biggest drawback is that the keyboard isn’t backlit. Even though I touch type, I didn’t realize how much I’d grown used to it for casual use.

I guess it’s a hard toss up from this and a PINEBOOK Pro, I think most readers here would prefer the Pinebook, for all it’s openness, although I still like the idea of being able to copy over the Win32s version of Lemmings, and it just running. For me I kind of like this thing, although once I switch back to an x86_64 with more memory, better GPU and disk options, maybe this just feels like some kids toy.

Neko98 ARM!

I don’t know how I didn’t think of this, but I also ported Neko98! Although the STL is having an issue with the ‘control panel’ so Neko is on autopilot.

This app can’t run on your PC

As for the emulation, it is 32bit only, so expect to see this stupid message quite a bit. The neckbeard is a nice touch though.

Also built into the thing is a cell modem. I guess it’s really not a surprise as the 835 really is a cellphone SOC. I have a ‘wifi egg’ as they are called here, a WiFi hotspot with unlimited internet from CLS, which is on the old 4G network. I popped the SIM in, and it picked up the APN settings on it’s own and I was connected in under a minute. I have to say that it’s about time that SIM cards have this stuff programmed into them for a plug & play experience. And thankfully the ASUS is unlocked, although from what I understand these were sold in the USA bundled with some cell service plans.

For anyone with one of these rare machines that cares to play along you can find my built stuff on my ‘vpsland’ archive:

https://vpsland.superglobalmegacorp.com/install/Windows10-ARM/

And the f2c/dungeon build along with the C/C++ compiler is in the aptly named dungeon-2.5.6-ARM(32bit)-win32.zip file.

On the road to the Outer Worlds, aka thanks for the ‘soft’ regions

I fired up Fallout 76, after all the $100 subscription nonsense to poke around, and yeah it’s still boring and empty. So It’s the 25th in Asia so I figured this was a great time to catch the launch and play the latest Obsidian opus, The Outer Worlds. Since I’m still in Hong Kong it’s restricted to the PS4 only? I mean sure, I have one, but I want to play it on the PC. Well at least I can select another region, say USA, and boom I can now choose between Game Stop (Are they still around, I thought they went bust?), Epic (LOL) or Microsoft’s game store (I thought they gave up after Games for Windows Live?). Anyways I’ll take the Microsoft one, shame it’s not on steam, I guess it’s one of those Epic things.

So clicking on the Windows Store, it’ll instantly let me choose where I want to be (Wasn’t that an old slogan, where do you want to go today?), and thankfully I can just choose. They have 香港 (Hong Kong) & 澳门 (Macau), 繁體中文 (Traditional Chinese) or American English!

So nice of them to let me just choose! I go for the English as few things recognize the 2nd official language of Hong Kong (English), but I don’t care about censorship, mainland sensibilities, or anything to that effect. Great. Now time to pay, let me get out my credit card and…

Denied! Turns out they finally fixed the ‘feature’ that you could put in any random valid American address, and use any international credit card, and it’d just work! So you now need a valid mailing address. Or option 2, the more fun one is to buy a gift card on some shady place like E-bay, and try to get a gift card that’ll just email you the code after the auction, and hope that they are legit, as it’s all too easy money for them.

$100 USD card for about $65 USD! What could go wrong? Everything!

I went for some card that was closer to par value, and bought it expecting basically nothing, instead within 5 minutes of the auction ending as I’m paying they are sending me an email begging me to pay… Great so probably money wasted. I don’t hear anything back for the next hour, and just give it up as a bad choice, but at least it’s not a lot of money.

I wake up the next day, and behold I get the code, and much to my amazement, it activates! A few hours later and it’s installed!

I see Microsoft has some game pass thing, which sounds interesting but I need a ‘guarantor’ or something as a funding backup, my credit and out of country paypal /credit card is no good. Ugh what a PITA.

I’ve played the game for a few minutes, and my first impression is that the colour palette is just so wide, and the worlds feel so lush, it makes Fallout 76’s brown worlds just fell so lifeless unlike the vibrancy from the Outer Worlds. NPC’s are back, and what a difference that makes. Simply looking up and seeing the red rings of the first planet is just amazing, granted Fallout is doomed to being on earth, but it just doesn’t feel anywhere as magical. That said, TOW definitely feels more Jules Verne / 1860’s steam punk to Fallout’s 1950’s nuclear family, nuclear fallout.

I’d give it a recommendation in the brief few minutes I’ve played, it’s worth the hoops to jump through.

Using BCP to export data from SQL Server 2016 to SQL Server 4.21

Once more again I’m confronted with a situation where I needed a SQL, but I don’t have direct access to the data. The machine I’m able to run some stuff on is not only insanely out of date (yay!) but doesn’t have enough disk space for even something like SQL Server 2000.

Enter SQL 4.21a

I “installed” 4.21a on this 32bit 2003 server in much the same way I transplanted 4.21a onto Windows 10. However I did use the srvany utility to load up the SQL Server service, much like how I used it to run an instance of Qemu in the background elsewhere. Now I have my intermediary SQL Server running like a normal service, and set a password for the SA user.

Now for the fun.

First be sure to set your target database for ‘bulk/load’ and I’d also set it for ‘truncate log on checkpoint’. If you don’t set the bulk/load then you cannot BCP data into the database.

Using the SQL Explorer tool I could view the tables I wanted, and export them as ‘SQL CREATE’ giving me the table layout. I then quickly converted them into something acceptable for 4.21a. Now it’s a matter of establishing a connection to the old server from the new.

First I tested with the ISQL command. I needed to copy the DLLs DBMSSOCN.DLL & NTWDBLIB.DLL into the directory to get the command to fire up. Since my strategy here is to do a BCP dump/BCP load the first thing I need to do is purge the data.

isql -Usa -PPASSWORD -S192.168.1.42 -Q"delete network.dbo.firewall_mapping"

This of course assumes that the server address is 192.168.1.42 and that in this case I’m deleting the firewall_mapping table from the network database. If you’ve made it this far that means we are 1/4th of the way there!

I found this ‘one trick’ to get the BCP command from the SQL 4.21a tools to connect to the 2016 server and dump the table as a trusted connection. I’m not sure how much longer this kind of thing will work, but I was pretty amazed it did. I didn’t even bother trying to see if the 4.21a BCP tool could read a 2016 BCP dump. Maybe it would if you keep the formatting the same, but I find ‘like to like’ much easier. I renamed the old BCP.EXE to BCP42.EXE so that they won’t collide in any way causing weirdness. At the same time I run them from a directory that is NOT in the system path.

bcp42 "[Network Database].[dbo].[firewall_rules]" out c:\temp\1.csv -t, -r= -P

The notation looks weird, as my source database name has a space in it. This initially caused endless frustration, but it was just a matter of using the fully qualified name, which is in quotes

"[database].[role].[table]"

I set the field delimiter as a comma, and the row terminator as an equal sign. I tried not setting it but I was getting ‘spiraling data’ as it was not picking up the end of row correctly at first.

The first time you run the BCP without a format file it’ll walk you through the specifics of the fields. I just blindly accepted the defaults, and saved the file as firewall_rules.fmt . Now on subsequent runs, I can run the export like this, which uses the saved formatting:

bcp42 "[Network Database].[dbo].[firewall_rules]" out c:\temp\1.csv -t, -r= -P -ffirewall_rules.fmt

Great so if everything is going well, we have no exported our data! Now the next step is to import the data into our old server. Since we have that format file, this “should” go pretty smoothly. Notice the server is an IP address which implicitly has it connecting by TCP sockets, not named pipes. As such there is no implicit ‘Trusted connection” as there was when talking to the local 2016 server.

bcp42 network.dbo.firewall_rules in c:\temp\1.csv -Usa -PPASSWORD -S192.168.1.42 -t, -r= -ffirewall_rules.fmt

Naturally change PASSWORD to whatever password you have for the SA user.

Starting copy...
1000 rows sent to SQL Server.

1892 rows copied.
Network packet size (bytes): 512
Clock Time (ms.): total =   2216 Avg =      1 (853.79 rows per sec.)

And there you have it, all being well you’ll see the program update every 1,000 rows as it inserts data.

Originally I wanted to use the data transformation wizard thing (whatever they renamed DTS to) however the ODBC is limited to the newer .NET 4 stuff, which won’t use the old SQL Server 6.5 ODBC drivers. I really didn’t think the SQL Server 4.21a BCP command to work on a modern server against a new(ish) version of SQL Server, but it did!

I guess you could neaten it up with a command file to drop tables/re-create if you wanted, or at the least delete data/checkpoint and set the load options, dump/load data, and then turn off the load state for the database. I’m not doing reports or anything fancy, just visualizing data as they say.

Although things like ODBC have drifted out, it’s still kind of interesting that ancient BCP can still communicate over named pipes as an implicit trust.

Early MSDN CD’s on archive.org

I ran across this, and thought it was cool. These CD’s are getting harder and harder to find, and unless you want the old physical disks, getting ISO images is, of course the next best thing.

Granted these disks replaced the much older Microsoft Programmer’s Library. The new CD’s use a Windows based search & interface program removing the clunky old MS-DOS program that made it feel like trying to view the world through a straw. (Although the up side of the MS-DOS version is that you could easily dump the video RAM and save the contents to plain text).

And in this brave new post Windows 3.0 centric world of Microsoft just about everything regarding OS/2 was dumped, and the seeding of Win32 via Windows NT had started.

Naturally after winning this war, Microsoft withdrew many low end products and just couldn’t compete with the tidalwave that was GNU/Linux.

At any rate for the curious kids down the road that want to see what all the fuss was with Win16, and how Windows 3.0 had changed the landscape removing the force of IBM it’s worth a look.

Microsoft XENIX 286 BASIC Compiler

(This is a guest post by Antoni Sawicki aka Tenox)

I have recently acquired this artifact:

It’s the Microsoft BASIC compiler for XENIX 286 Operating System. Compiler as opposed to just BASIC interpreter, it can produce executable a.out files, similar to C compiler for example.  

Carefully removed the shrink wrap. Inside were couple of 5.25″ floppies, registration card and a manual:

Interestingly the 32 year old disks read just fine on a first attempt. I need to start backing up important files to 5.25″ floppy disks as they seem to outlast everything else.

Thanks to efforts of Michal Necasek from OS/2 Museum now you can run Microsoft XENIX 286 in Virtual Box

The disks can be installed in to XENIX running on Vbox following a few simple steps:

tar xvf /dev/fd0
./msinstall /dev/fd0

Upon installation you invoke the compiler like this:

bascom demo.bas
./a.out

And it produced an a.out executable which worked perfectly fine.

It’s fun to write BASIC code in vi editor, which I just realized I never done before.

Curiously the compiler also worked on the brand spanking new Xenix 2018, or rather I should call it Open Server 6, which you can download here.

The BASIC compiler is available for download from my archive along with the manual in pdf.

Compiling Microsoft Word 1.1a for Windows

A while back, Microsoft had famously released the source code to Word for Windows 1.1a (and OS/2 as well!), to some fanfare.

People were excited, but then kind of dismayed as they couldn’t really do much with it.  Oddly enough the source code release really didn’t have any notes on how to build it, although everything needed is included.  I went looking for information on how to build Word to see why it keeps doing weird things on WineVDM, and I came across this thread on betaarchive: 

https://www.betaarchive.com/forum/viewtopic.php?t=31096

Special props to yksoft1 for getting it to build in the first place, and Ringding for noticing that the OS/2 supplied compiler binaries can be re-bound to run under MS-DOS using a MS-DOS Extender.

So I went ahead and fired up Qemu and within an hour I had done it!

Word 1.1a compiled and on Windows 2.11

Well this is great fun, and all, but there isn’t a heck of a lof of people with Windows 2.x around anymore.  And of course Word 1.1a really wanted to have 2.11 or higher.  It has some hooks for what would be Windows 3.0 although I think it was much more.  Although it certainly doesn’t want to run (unmodified) under debug release 1.14.

So now that the world has gone beyond Win16 OS’s what can you do?

Well the tip of  WineVDM will run it!

Word 1.1a on Windows 10 using WineVDM

So now there is some new life for this old word processor.

Another fun thing in Word 1.1a is that it has an early implementation of MDI letting you view and work with several documents at once.  Naturally you would need a massive monitor, which we all have today.  Although people tend to just launch more than one copy of Word to accomplish this.

Early MDI

So now on my 64bit machine I can not only play with the source to Word, but I can run it at unimaginable resolutions on my modern machine!

So while out today I found a Windows RT Surface for $25

I had to pay another $15 for the charger.  I should have run away, but I’m a sucker.

Yes, there are basically NO apps, but thanks to this little guide

QuakeWorld on Windows RT

I was able to port over some trivial stuff, the usual things like hello world, Infocom Interpreter, a f2c build of Dungeon, then I went with something I’d been messing around an old GDI driver for WinQuake that builds with the NT 3.5 SDK (finally got it!).  So with a few minor tweeks here it is cross compiled from my x86_64 to the surface.

Last time I talked about the Surface was nearly 6 years ago…  The platform’s fate was pretty much sealed on day one.  With no open Win32 API it shunned traditional devs, and with some completely new and insane model it was such a hurdle for new devs, why put so much effort into such an old tired company like Microsoft?

I figured for the price of a good lunch it’d be a fun toy.

Too bad the speakers don’t work though.

I know the window on Windows 8.1 apps is closing soon.  I should put something together for the dead platform.  Maybe for phone too.  But for tonight, it was kinda fun doing a copy/paste attack to then run unsigned EXE’s on the device.

I might upload the tool chain later, but at the moment getting Visual Studio 2012 Ultimate is a breeze.

Reading older SQL Server 6.5 books online

So as part of my fun day job stuff involves moving data around and from time to time, there is that proverbial server in the corner (in this case it’s even physical!) and in this case I needed to move stuff into an old version of SQL Server as I needed to remember how to use the older BCP syntax.  Obviously I guess I could have just installed 6.5 into a VM, did the SQL transfer, then the whole upgrade to 7/2000 and up to something modern, but per requirements I needed to check data in the middle, so the quickest way is to just BCP it out into something human readable, and BCP it into something new.

SQL Server Books Online on Windows 10

So it turns out the books are easily copied off the install CD, and just run the viewer application directly.  And even better the ‘massive and optional’ install of all the online documentation turns out to be absolutely trivial by modern standards.

08/27/2018  12:33 PM           457,780 SQLBOOKS.AUX
08/27/2018  12:33 PM         1,163,078 SQLBOOKS.CAC
08/27/2018  01:33 PM                28 SQLBOOKS.flt
08/27/2018  01:33 PM                79 SQLBOOKS.hst
08/27/2018  12:33 PM               766 SQLBOOKS.ICO
08/27/2018  12:33 PM           238,252 SQLBOOKS.IDX
08/27/2018  12:33 PM           118,805 SQLBOOKS.KWD
08/27/2018  12:33 PM        10,193,094 SQLBOOKS.MVB
               8 File(s)     12,171,882 bytes

As you can see it’s really not that much in the world of terabyte disks.  Anyways just copy out all the SQLBOOKS* files and then from the binn directory grab the INFOVIEW program.  To view the books just run “INFOVIEW SQLBOOKS.MVB” and you’ll be set!

Some of the other older tools like Visual C++ 4.x also use this InfoViewer format, and you can copy all the other associated files, in the off chance you want to keep this ancient stuff handy.

WineVDM 0.5.0 released!

This version has MANY issues fixed, and is capable of running more and more Win16 software on Win64 based OS’s.

Printing on paper!

One of the more exciting things is that as long as I do a print setup first, I can actually print on a new printer from MS Word 2.0c!

You can download it from the releases page here:

https://github.com/otya128/winevdm/releases/tag/v0.5.0