Yahtzee!

•August 13, 2022 • Leave a Comment
Yahtzee! Game Board
Yahtzee! Game Board

Here’s a question I’ve been curious about for ages and would like to ask those into retro-computing and/or older folks as myself: How many of you have a BASICA version of the Yahtzee game in your collection? How many of you have this specific one (pictured and linked)? I’m really curious to know how far it was distributed!

Here’s the back story:

In the second trimester of my high school’s Advanced Graphic Arts class (Junior year, Fall 1983 / Winter 1984), we got an IBM 5150 PC (with IBM PC-DOS 1.1) installed in the classroom for typesetting. While it beat setting type by hand, if you ever had the experience of working with a typesetter, you know how difficult and slow it was to type in text for brochures, flyers, game rosters, news articles, and stories and then having to fix errors (spelling, grammatical, wrong font, or point size). The IBM helped with the typing because text could be saved, edited, and resent over the serial port with the added bonus of the school newspaper and literature magazine submitting their stories on floppies to us.

Compugraphics CompuWriter phototypesetter
Compugraphics CompuWriter phototypesetter

It wasn’t until the next school year though, Vocational Graphic Arts, a two-hour class for all three trimesters, that I really got to play with the 5150 which got upgraded to a dual-floppy 5160 and PC-DOS 2.1. Two IBM PCjr’s with color monitors – one had a Microsoft green-eyed mouse – were also added to the classroom.

Somewhere along the way, a pair of floppy disks appeared. One had an executable chess game (it cheated) and the other with four BASICA games, one of which was Yahtzee. Mr. Sams (the teacher) and us played Yahtzee all the time, until one day when the floppy disk slipped down between the wall and the countertop. There was no possibility of retrieval and it’s probably still there to this day.

Thankfully, I had printed out the code listings for all four games a few weeks prior and being the only person in the class who even knew what BASIC was, Mr. Sams tasked me with getting the games back. He missed his Yahtzee! He also had a suggestion for me…

So, I spent the next few days of class time (or weeks since I didn’t have a computer at home) typing in the source code. I also added a bit of color to the Othello and Yahtzee games, a “NO – NO – BEAVER – – TRY AGAIN” error message to Yahtzee and, per Mr. Sams’ request, a cheat to the Yahtzee game so he could beat Trent.

Skip forward four years and I’m teaching an introductory course to programming with Pascal at the local community college and one of my students asked if I could help him after-hours. So, one night I drove out to Panther Lake, met him and his wife, and went over the issues he was having.

Afterwards, I’m getting ready to leave when he says he wants to show me this Yahtzee game program. He starts it up and I grow suspicious as the recognizable instruction text displays followed by the game board. I sit down and purposely trigger the error message – “NO – NO – BEAVER – – TRY AGAIN” – and then the cheat. I then break and look at the source code and sure enough, there’s my name! Someone from my high school had made a copy of the game floppy and it was now out in the wild! One of the coolest experiences in my programming career, ever!

(Interestingly enough, I met my former student again at karaoke some twenty years later.)

So, if you’ve gotten this far, thanks for reading and as I wrote already, I’m really, really curious to see how far in the wild my co-creation made it.

How to improve network speed in Windows 10 by increasing IRPStackSize

•March 19, 2021 • Leave a Comment

This is a summary of the good parts from the excellent article written by Mark Kaelin over on Techpublic.

The default network configuration settings in Microsoft Windows 10 are notorious for being programmed to what are considered safe, stable values. Predictably, safe and stable does not always equal fast and high-performance, especially with regard to network connections.

This tutorial shows you how to edit the Windows 10 Registry file to change an obscure setting known as IRPStackSize. Increasing that parameter’s value should considerably increase the overall network performance of your Windows 10 personal computer.

The I/O Request Packet Stack Size (IRPStackSize) refers to how many 36-byte receive buffers your computer can use simultaneously. A larger number of buffers means your computer can handle more data simultaneously, which, in theory, should make your computer perform more efficiently.

While there is little official Microsoft documentation concerning this parameter, the default setting is 15, which is adequate for most normal speed (10 Mbps) network connections. The maximum number is limited to 50, and Microsoft warns that choosing values in the 33 to 38 range can cause stability issues. For our example, we are going to increase the value to 32.

How to improve network speed in Windows 10 by increasing IRPStackSize

Open a command prompt with Administrator access.

At the prompt, query the registry to see if this value already exists and set with a value: of 32 (0x20)

reg query HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters /v IRPStackSize

If it does not exist or has a smaller number then 0x20 (decimal 32), use the following command to add or change it:

reg add HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters /v IRPStackSize /t REG_DWORD /d 32 /f

Verify the value took using the previous “reg query” command.

reg query HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters /v IRPStackSize

To complete the change, reboot your PC. For extra measure, verify the value took using the previous “reg query” command.

Enable Windows Help Files (*.HLP) in Windows 10 (64-bit)

•March 16, 2021 • Leave a Comment

The first step is to download Windows8.1-KB917607-x64.msu.
Next, open a PowerShell prompt with Administrator access and change to your download location.
From the command prompt, extract the contents of the Microsoft Software Update (MSU) to a new folder:

md ContentMSU
expand Windows8.1-KB917607-x64.msu -F:* ContentMSU

Next, expand the contents of the Cabinet (CAB) file to its own folder:

md ContentMSU\ContentCAB
expand ContentMSU\Windows8.1-KB917607-x64.cab -F:* ContentMSU\ContentCAB

If you’re curious, get a directory listing of the existing files before replacing them:

dir "$ENV:SystemRoot\winhlp32*", "$ENV:SystemRoot\en-us\winhlp32*"

Take ownership of the original MultiLanguage User Interface (MUI) file and rename it so you have a backup:

takeown /f "$ENV:SystemRoot\en-us\winhlp32.exe.mui"
icacls "$ENV:SystemRoot\en-us\winhlp32.exe.mui" /grant Administrators:F
ren "$ENV:SystemRoot\en-us\winhlp32.exe.mui" winhlp32.exe.mui.w10

Copy the replacement MUI file from the Cabinet to it’s new location:

cd ContentMSU\ContentCAB\amd64_microsoft-windows-winhstb.resources_31bf3856ad364e35_6.3.9600.20470_en-us_c3a9a33a1aee3495
copy -Force winhlp32.exe.mui "$ENV:SystemRoot\en-us\winhlp32.exe.mui"

Repeat the same steps for the Windows Help executable:

takeown /f "$ENV:SystemRoot\winhlp32.exe"
icacls "$ENV:SystemRoot\winhlp32.exe" /grant Administrators:F
ren "$ENV:SystemRoot\winhlp32.exe" winhlp32.exe.w10

cd ..\amd64_microsoft-windows-winhstb_31bf3856ad364e35_6.3.9600.20470_none_1a54d9f2f676f6c2
copy -Force winhlp32.exe "$ENV:SystemRoot\winhlp32.exe"

Take a look at the new and old files:

dir "$ENV:SystemRoot\winhlp32*", "$ENV:SystemRoot\en-us\winhlp32*"

Now you can open Windows Help files in Windows 10.

Setting Up a Raspberry Pi Desktop 400

•December 19, 2020 • 1 Comment

How to install Ubuntu Desktop on Raspberry Pi 4

How to install Visual Studio Code on a Raspberry Pi 4 in minutes

Hint: Open a Terminal window and execute the following lines:

sudo -s

. <( wget -O – https://code.headmelted.com/installers/apt.sh )

Installing .NET Core on Linux ARM64

How to fix nVidia HDMI color issues

•August 31, 2019 • Leave a Comment

For the last few days, the colors on my Windows PC have been muted (e.g. what should be white was washed out) except for the mouse cursor which was still a vibrant, white.

As the video shows (for nVidia cards), create a new resolution and manually drop the screen refresh rate down from 60 Hz to 59.999 Hz.

How to fix Nvidia HDMI colour issues

Is Windows 10 going into sleep mode after a few minutes?

•August 31, 2019 • Leave a Comment

Even with “High performance” selected as the power option and “Put the computer to sleep: Never”, I found my desktop still going to sleep after a few minutes of inactivity. Here’s how I fixed it:

  1. Open a command shell (or PowerShell) window with Administrative rights;
  2. From the command line,

    reg add "HKLM\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\238C9FA8-0AAD-41ED-83F4-97BE242C8F20\7bc4a2f9-d8fc-4469-b07b-33eb785aaca0" /v Attributes /t REG_DWORD /d 2

     

  3. From the Start Menu, go to “Power & Sleep” and click on “Additional power settings”;
  4. Click “Change Plan Settings” for the current power plan;
  5. Click “Change Advanced Power Settings”;
  6. Click on “Sleep”;
  7. Select the new, visible “System unattended sleep timeout” option and set its value to “0 minutes”;
  8. Restart the computer.

Alex Januszkiewicz’s Article On AutoCad Accuracy

•August 26, 2019 • Leave a Comment

Alex Januszkiewicz’s Article On AutoCad Accuracy1
http://www.oocities.org/wpsmoke/accuracy/accuracy.html

Many designers using CAD today don’t fully realize the magnitude of accuracy provided by AutoCAD. Often in the past I could hear polemics, where Intergraph IGDS and Microstation users were “proving” that “their” software is better in all respects, one of them being accuracy. This was never the truth, as even in its infancy, in early eighties, AutoCAD was using double precision floating numbers to store and process DWG data, where IGDS was using 32 bit integer cube to define space positioning of its elements.

Read on, and once you are through, download SOLAR.DWG and go on your interplanetary trip to witness AutoCAD accuracy 🙂

How much more precise is double precision number than 32 bit integer?

Double precision number uses 64 bits (8 bytes) to represent single floating point number, twice as much as 32 bit integer. Of these 64 bits, one is used for sign, 11 are used for exponent and 52 are used to define mantissa

Graphical representation of such 64 bit number would be:

S EEEEEEEEEEE FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

where:

S – sign bit, 1 means negative, 0 positive
E – each E means one bit of exponent. 11 bit number can represent values from -1022 to 1023
F – each F represents one bit of a mantissa. 52 bit mantissa can represent 4503599627370496 fractions.

32 bit integer cube can represent 4294967296 discrete points in each of three directions.

Below is a translation of what these numbers will mean to processing and storage of CAD entities.

If you try to do a drawing that extends 4 km in each direction, Microstation’s 32 bit format will limit your accuracy to 0.001 mm. The same size AutoCAD drawing can be drawn with an accuracy of 0.000000001 mm, that is one million times more accurate.

One could say “a certain level of accuracy is high enough and more is overkill, so what?”. But be aware that with almost EVERY geometrical operation performed on an entity, the accuracy is reduced. When entities are moved, rotated, scaled and stretched etc., complex mathematical transformations are being applied to their geometry. The results are stored back in the drawing database in AutoCAD with double precision floating point accuracy and in Microstation with 32 bit integer accuracy. Both math transformation and storage, are REDUCING accuracy of a drawing. Where an AutoCAD user can safely ignore 3 or 4 significant digit reduction in accuracy on the drawing that has been modified many times over the years (it still has 12 precise digits), the same cannot be said about Microstation that has maximum of 10 precise digits and loses 3 of them in complex processing.

To showcase the power of AutoCAD, Autodesk included in earlier releases of AutoCAD (up to R12 I think) the simple, yet very impressive, 2D drawing file SOLAR.DWG (drawn in 1983 by John Walker, co-founder of Autodesk). You can download this file below (when you finish reading ;).

I will always remember my first “interplanetary” DWG travel that I did in 1985, after learning how to zoom:

  • After you open the drawing, you are looking at whole solar system from outer space, drawn to scale in kilometers as DWG units.
  • Zooming into blob at the center reveals inner solar system with few orbits, 3-rd of them being Earth’s, Sun in the center.
  • On Earth orbit you can see small flickering dot. Zoom in on it, the larger circle is Moon’s orbit around Earth, the dot in the middle is Earth.
  • On Moon’s orbit you can see flickering dot. Zoom in on it, it’s Moon.
  • On Moon you can see flickering dot. Zoom in on it, you will see the crater.
  • Near the crater (200 meters from it) you can see small green item. Zoom on it, it’s LEM, landing module that brought Neil Armstrong and his colleagues to the Moon.
  • On the leg of LEM you can see 30cm plaque. Zoom in on it and you can read the message: HERE MEN FROM THE PLANET EARTH FIRST SET FOOT UPON THE MOON etc. signed by the three astronauts and President Nixon.

One day, when I have some time I’ll add solar.dwg screen shots to this web page.

Now download SOLAR.ZIP2 (4kb zipped which becomes SOLAR.DWG unzipped ..don’t worry, it’s just 10kB, in 1985 my computer had 20MB hard disk and “huge” CAD files where 200kB). So start your (CAD) engine up and take off on your interplanetary trip. Let me know how it went when you come back. (Sadly this is no longer possible. The Creator in his infinite wisdom has taken Jack to be by His side. -AJ)

For Microstation accuracy believers, with all their tools starting with “ACCU”, for accurate I propose the following form of treatment:

Try to replicate SOLAR.DWG (drawn on AutoCAD in 1983!!!), make it into SOLAR.DGN with today’s latest Microstation. The 20 year old, 64 bit double precision DWG, can have everything in Solar System positioned with accuracy of few millimeters (you can read 3.7mm text on a plaque). While with DGN, the smallest item that can be drawn in this drawing (showing orbit of Pluto, 11916840000 km diameter) is a 3 kilometers line, both endpoints being positioned with 3 kilometer “accuracy” in X,Y and Z direction.

Alex Januszkiewicz
alexj@intelcad.com
President / Principal Programmer
IntelCAD Systems / DWG Data Recovery Services

PS. Do I have any Microstation background to on which to base these kinds of discussions? Even though I spent the last 15 years programming mostly for AutoCAD, I did a lot of MDL development for Microstation, PDS and Frameworks clients over last 10 years. To this date I develop, from time to time, commercial grade, complex MDL programs, on site of a large company in Calgary that uses both AutoCAD and Microstation/PDS. I know Microstation and its DGN format in and out.

AutoCAD ® is a registered trademark of Autodesk, Microstation ® is a registered trademark of Bentley

Copyright (c) 1999-2001, IntelCAD Systems. The material on this page cannot be published in any form without written permission from IntelCAD Systems.


1 This article is archived here by me before it disappears entirely from the Internet.

2 Due to WordPress limitations and my refusal to link to outside file hosts, here’s the SOLAR.ZIP file in Base64. Double-click the below paragraph and decode it:
UEsDBBQAAAAIAAMuZywBPlWO0xAAADQoAAAJAAAAc29sYXIuZHdnxZoLXEzb/sDXVNOkPCpRXhmSR01RkqK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Bsn95c5tXiiie5U/8rlu3TR1Dfmura5rUUry3GeTRJOa/tCkvCtFznalyUaVTqHKP00bNxO7kZFxcAbuTbu9rKcifn7GirQGnbEZi+6VNZWeMcyO2F/cf9XVl3J/cxt9Dq8hePMkx8dJLiZLc34fkfYrPzt+YO3Wfzk2CQ0r+xiDNW0i8VRReCoxhCMNxeOhaDwdMh4PRePpkvF4KBqPScbjoWg8fTIeD0XjscjwHxT8Y0DGvaColy4AxbugaBdDMtIFxbkYkWEXKOhiDbTpbnAnzj43OLWy16xBxfrHGwY++z9QSwECFAAUAAAACAADLmcsAT5VjtMQAAA0KAAACQAAAAAAAAAAACAAtoEAAAAAc29sYXIuZHdnUEsFBgAAAAABAAEANwAAAPoQAAAAAA==

CsvHelper

•August 20, 2019 • Leave a Comment

The NuGET package (CsvHelper) is extremely powerful and incredibly easy to use:

Step 1: Create your .NET object

public class Contact
{
public int ContactId { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string Address { get; set; }
public string CityStateZipCode { get; set; }
public string PhoneNumber { get; set; }
public DateTime DateOfBirth { get; set; }
public decimal GrossPay { get; set; }
public decimal NetPay { get; set; }
}

Step 2: Get your CSV file

"ContactId","FirstName","LastName","Address","CityStateZipCode","PhoneNumber","DateOfBirth","GrossPay","NetPay"
"1","MICHAEL","SMITH","123 6TH AVE","TACOMA, WA 98406","(360) 337-4443","1/1/1970","125000.00","81250.00"
"2","JUSTIN","THOMAS","123 BAY ST","PORT ORCHARD, WA 98366","(360) 337-4711","1/1/1990","65000.00","42250.00"
"3","JANE","DOE","123 OLD BELFAIR HWY","BELFAIR, WA 98528","(360) 337-4467","1/1/1980","82136.00","53388.40"
"4","WILLIAM","JONES","5501 WERNER RD","BREMERTON, WA 98312","(360) 337-4413","1/1/2000","16384.00","10649.60"

Step 3: Read the CSV into a list of objects

public static List<Contact> GetContacts(string csvFileName)
{
using (TextReader txt = new StreamReader(csvFileName))
{
using (var csv = new CsvReader(txt))
{
var contacts = csv.GetRecords();
return contacts.ToList();
}
}
}

Bonus: It handles dynamic and anonymous types!

// Dynamic
var records = csv.GetRecords<dynamic>();

// Using anonymous type for the class definition
var anonymousTypeDefinition = {
Id = default(int),
Name = string.Empty,
MyClass = new MyClass()
};

var records = csv.GetRecords(anonymousTypeDefinition);

ref: CSV Parsing In .NET Core – .NET Core Tutorials

Activate Windows Photo Viewer on Windows 10

•August 17, 2019 • Leave a Comment

As I much prefer the Windows Photo Viewer, here’s a guide to activating it on Windows 10 via the helpful folks at How To Geek. All credit goes to them; I’m simply saving it here for my reference.

Step One: Enable Photo Viewer in the Registry

You can use the registry files available from How To Geek or if you don’t trust outside sources, copy and save the following to a UTF-8 registry file (.reg):

Windows Registry Editor Version 5.00

; created by Walter Glenn
; for How-To Geek
; article: https://www.howtogeek.com/225844/how-to-make-windows-photo-viewer-your-default-image-viewer-on-windows-10/

[HKEY_CLASSES_ROOT\Applications\photoviewer.dll]

[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell]

[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell\open]
"MuiVerb"="@photoviewer.dll,-3043"

[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell\open\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,72,00,75,00,\
6e,00,64,00,6c,00,6c,00,33,00,32,00,2e,00,65,00,78,00,65,00,20,00,22,00,25,\
00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,\
25,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,20,00,50,00,68,00,6f,\
00,74,00,6f,00,20,00,56,00,69,00,65,00,77,00,65,00,72,00,5c,00,50,00,68,00,\
6f,00,74,00,6f,00,56,00,69,00,65,00,77,00,65,00,72,00,2e,00,64,00,6c,00,6c,\
00,22,00,2c,00,20,00,49,00,6d,00,61,00,67,00,65,00,56,00,69,00,65,00,77,00,\
5f,00,46,00,75,00,6c,00,6c,00,73,00,63,00,72,00,65,00,65,00,6e,00,20,00,25,\
00,31,00,00,00

[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell\open\DropTarget]
"Clsid"="{FFE2A43C-56B9-4bf5-9A79-CC6D4285608A}"

[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell\print]

[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell\print\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,72,00,75,00,\
6e,00,64,00,6c,00,6c,00,33,00,32,00,2e,00,65,00,78,00,65,00,20,00,22,00,25,\
00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,\
25,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,20,00,50,00,68,00,6f,\
00,74,00,6f,00,20,00,56,00,69,00,65,00,77,00,65,00,72,00,5c,00,50,00,68,00,\
6f,00,74,00,6f,00,56,00,69,00,65,00,77,00,65,00,72,00,2e,00,64,00,6c,00,6c,\
00,22,00,2c,00,20,00,49,00,6d,00,61,00,67,00,65,00,56,00,69,00,65,00,77,00,\
5f,00,46,00,75,00,6c,00,6c,00,73,00,63,00,72,00,65,00,65,00,6e,00,20,00,25,\
00,31,00,00,00

[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell\print\DropTarget]
"Clsid"="{60fd46de-f830-4894-a628-6fa81bc0190d}"

With the registry file saved, find it in Windows Explorer, right-click, and select “Merge”.

Step Two: Set Windows Photo Viewer as Your Default Image Viewer

For any image file type (e.g. PNG, GIF, JPG, TIF, etc.), right-click on one of each type, select “Open With >” and pick “Choose Another App”.

In the “How do you want to open this file?” dialog, select “Windows Photo Viewer” and check the “”Always use this app to open files”.

Vintage Apple Software Repositories

•May 6, 2019 • 1 Comment

A summary from Where to Find & Download Old Mac OS Software