Geek

Merry Christmas

Last year Chris Otto wrote a text adventure style version of Dan Fogelberg’s Same Old Lang Syne. I like it a lot, so here it is.

Welcome to SAME OLD LANG SYNE: THE I.F. EXPERIENCE
Original implementers: Dan Fogelberg, Infocom.
Release 1.0 / Serial number 122416 / Post 2100.0

It is Christmas Eve, and a light snow is falling. You have been dispatched to acquire whipping cream for Irish coffee…

Grocery store
The holiday hustle and bustle is going at full steam. Carts squeak urgently across the floor. You smell gingerbread. Departments include fresh foods, a bakery, and, in the back, frozen and refrigerated foods.

>GO TO BACK OF STORE

Back of grocery store
The eggnog and apple cider have been well-raided. Scanning the shelves for whipping cream, you notice someone in your peripheral vision. She is wearing a blue coat and standing in front of a case of frozen desserts. Your heart skips a beat.

>WALK OVER TO WOMAN

You are now standing behind her, as she continues to examine the frozen pies. Without thinking, you gently touch her coat sleeve. She spins around, a bit startled, looking exactly as she did at age 20. After a short moment of confusion, she recognizes you, her eyes opening wide. The two of you move simultaneously for a hug. But, as you do, half the items in her purse spill to the floor.

>PICK UP ITEMS

Laughing, the two of you crouch and pick the items off the floor. The scene seems absurd to both of you, and you can’t stop laughing. You get a few odd looks from other hurried customers, which only feeds your laughter. Tears form in the corner of your eye.

After composing herself, she adds an apple pie to her cart. “I should go pay for all this,” she says.

>GO TO CHECKOUT

Grocery store checkout
You head up front together. The groceries are totaled up and bagged. The two of you make small talk, and the conversation lags a bit.

>WAIT

Time passes.

Through the big glass window at the front of the store, you see that it’s still snowing. The groceries are bagged up, and she’s ready to go.

>SAY SOMETHING

“Do you have time for a drink or two?” you ask.

She smiles. That old smile. “Absolutely.”

>EXIT STORE

In front of grocery store
You carry her bag as the two of you exit the store. The street continues to the north and south.

>GO NORTH

Northern end of street
You see two bars, but they are both closed. It is Christmas Eve, after all.

>GO SOUTH

In front of grocery store
The snow picks up a little.

>GO SOUTH

Southern end of street
Another closed bar. But there is also a six-pack store, still open.

>ENTER SIX-PACK STORE, BUY SIX-PACK, EXIT SIX-PACK STORE

Done.
Done.
Done.

“We should get out of the snow,” she says. “Let’s drink it in my car.”

>GO TO HER CAR

Inside car
You set the groceries in the back. The two of you sit up front. Snowflakes plop upon the windshield.

She hands you a beer and opens one for herself.

“To our youthful innocence,” she says.

>DRINK

Your score has gone up by one point.

>PROPOSE TOAST

“And to now,” you say, tapping her bottle with your own. You both take a sip.

Your score has gone up by one point.

The two of you are silent.

>REACH BEYOND EMPTINESS

You don’t how how to do that.

>WAIT

Time passes and snow falls as the two of you drink. The conversation turns to how your lives are now. She tells you that she married an architect; he keeps her warm and safe and dry. But then she pauses, clearly leaving something out. She never did like to lie.

>LOOK INTO HER EYES

They are the bright blue eyes you remember so well.

>SAY SOMETHING

“The years have been a friend to you,” you say. “You look great.”

Her blue eyes flash. You know that flash, but aren’t sure what it means this time. Doubt? Gratitude?

>WAIT

Time passes. The moment is lost.

“Your career must be going really well,” she says. “I see your records in the store all the time.”

You lapse into your standard reply: The audiences are heaven, and life on the road is hell.

More beers are cracked open.

>PROPOSE ANOTHER TOAST

You drink again to innocence, and again to now. Bottles are tapped and tilted upward.

Your score has gone up by two points.

>REACH BEYOND EMPTINESS

You don’t how how to do that.

>WAIT

Time passes.

You are on your last bottles now. She glances at her bottle. “Last toast, I guess,” she says, looking at you. “This one to innocence … and time.”

>DRINK

“Should old acquaintance be forgot,” you sing, and then you finish off your beer. She giggles.

Your score has gone up by two points.

It grows silent.

>EXAMINE BOTTLES

There are six empty beer bottles. You are starting to feel tired.

>SAY SOMETHING

What do you want to say?

>ANYTHING

You don’t have anything left to say.

“Well, it is Christmas Eve,” she says, finally. “I should be going. But it was so good to see you.”

She leans over and gives you a kiss.

“Merry Christmas,” you both say, simultaneously. You laugh again.

>GET OUT OF CAR

In front of grocery store

The store is closed now. There are only a few cars parked here. You stand and watch the tail lights of her car as she drives away. You start to feel a little lightheaded. You close your eyes…

…School, many years ago…

It is a beautiful autumn afternoon. The two of you are on the campus quad, parting ways. Sunlight pours through the golden leaves as she walks away from you, never glancing back. This is a familiar pain.

In front of grocery store

You are standing here alone. The snow has turned to rain.

 

https://www.youtube.com/watch?v=OYIWeow6W14

 

 

PC Partner motherboard

Being the caring gentleperson that I am, I had to rescue the motherboard and power supply from this ex-PC.

P1140193r

Yea, I guess someone used it for a step, then lied to the boss and told him it had fried.

Because there’s nothing wrong with the motherboard, the PSU, or the memory DIMM that was kicking around loose inside the box.

This looks like a nice little motherboard for someone like me. It’s old enough to still have floppy drive support and new enough to have USB. It has an RS-232 serial port* as well.

But nowhere on this motherboard is there a part number of any type.

The BIOS is also not at all useful. CLE266-8235/M-6A6LUPREC-00 tells me the motherboard uses a Via Technologies CLE266 North Bridge and a VT8235 South Bridge, but this is not a Via motherboard, it’s a PC Partner. So with some more googling, turns out it’s a CLE266M-A68M800 (download the manual).

* The manual claims that there are two serial ports. On this motherboard, the RS-232 line driver and the header for COM2 is not fitted, so you’re out of luck there.

Reading mask PROMs

So I’m messing around with a Burroughs TD831 terminal which uses a 6800 processor, 8 kilobytes of DRAM and 16 kilobytes of mask PROM.

The PROMs are fairly typical of the era, in that the chip select lines are also programmable. So you program the first one in a bank of four to have two active low chip selects, the middle two ones to have an active low and an active high, as well as the reverse, and the fourth one to have two active high chip selects. That way you can run address lines into the chip selects and four PROMs act like one PROM four times the size, effectively.

How I figured this out: the PROMs have 24 pins, the largest 24 pin PROM is a 2732. Told my EXPRO that’s what they were, not much joy. Went down to 2716s, and that gave data out of one of each bank of four PROMs. I figured that this means the devices are similar to for example the 82S191. So it was time to write some code.

I was lazy and just told the code that the three potential chip select lines were address lines. This gave me a 16 kilobyte per PROM dump, three quarters of which is blank Looking at how the banks were located in the 16 kilobyte address space makes it look like pin 21 (A10 on the 82S191) is an active high Chip Select, while pin 20 is A10 and pins 19 and 18 are the programmable Chip Selects.

I suppose I can rewrite my code to map things that way, but I should be able to paste my dumps together into something that can be disassembled. If ever I am arsed to do that.

But if you are here on a quest to restore one of these things to life, I think I have given you everything you need in order to be enlightened.

Edit: You might notice that I did change the code and re-dump the ROMs in nice neat 2k binaries.

Prepping

Prepping (i.e. making sure you have enough essential stuff stored away to tide you through a difficult time) is always a good idea. Now is a good time to start.

“Now” is an especially good time to start prepping for Day Zero. Here are some good ideas, except go light on the rice and dried beans (you need water to cook those) and buy water, not empty containers.

Successful prepping revolves around buying more of the kind of stuff you’d buy anyway, and then rotating it. Day Zero is not going to go full-on Zombie Apocalypse on us (we all hope) but the supply chain might be slow due to people having to queue for water, rather than being at work. If you also have to queue for water, and maybe go to work*, taking the time out to go to the shop will be a luxury. So shop now.

But don’t go out and buy a ton of freeze-dried Bear Grylls stuff you’ll end up never using and throwing away, just get extra stock of the tinned stuff you normally get, stick some extra chicken or mince or steaks if you can afford it in the freezer, that kind of stuff.

Remember to keep your plastic grocery bags, you’re going to need them :-/

Also, waterless hand cleaner and bleach. Paper plates might not be a bad idea either. A fellow student, back in the early nineties, kept his plate in his fridge so he only had to wash it once a week. He was just lazy, but if water’s scarce, it could work.

Start thinking about food recipes that need little water. I made this one the other night, it’s pretty damn good.

And have a Plan B. Always have a Plan B.

*Although how one can be expected to work when the toilets don’t flush is beyond me. Note that this also applies to the staff at your friendly local grocery store. Which brings us back to the point — shop now.

iexplore.vbs

iexplore.vbs is a nasty little virus (actually, not so little, the executable is over 5 megabytes) that infects USB devices.

How do I know this? The kid’s memstick was acting funny and while checking it out the virus jumped onto my home machine, from there onto my memstick, and I spotted it before it could jump to my work machine.

It moves all your files into a hidden directory, then makes a link to itself in the root of your memstick, with the same name as the memstick volume name.

So basically, if you see a link to your memstick inside your memstick, stop, don’t click on it.

If you’re not using Windows Commander, you’re on your own. Otherwise, navigate to your memstick and in the DOS prompt line at the bottom, type cd “ALT255” (hold down ALT, type 255 on the keypad, release ALT). This should put you in the hidden directory (unless your flavour of the virus called it something else, in which case, open CMD, dir/ah > file.txt, open file.txt in a hex editor, check what the directory is called).

Once Windows Commander is displaying the hidden directory, open CMD, dir/ah, attrib -h -s *.*, and erase those three files. Then use Windows Commander to copy your files back down. And don’t forget to delete the link and the hidden directory as well.

As far as I can tell, BICBW, if you remove all USB devices and reboot your PC, the virus does not stay resident on your PC — it’s USB only. But that could also just be the settings on my machine.

Infocom copy protection

The first copy protection scheme I cracked on my Apple ][ was that of Zork. It wasn’t that difficult, the data prologue bits were changed from D5 AA AD to D5 AA BC. Copying the disk involved patching the standard copy program COPYA and then editing the disk so that it could read itself.

But today I’m interested in the IBM PC version of Zork. Like the Apple ][ version, the disk could not be copied by the standard tool (in this case diskcopy) but Copy II PC worked just fine. Interestingly, the disk allowed you to make one copy of the game for backup purposes.

The weak point of copy protected disks is that the standard BIOS must be able to read the first bit of the disk. This code is then executed to read the “uncopyable” part of the disk. Anyone can read the first sector, disassemble it, and work out how to read the rest of the disk. Granted, this process is sometimes extremely difficult. Not so in the case of Zork.

On the IBM PC, the BIOS reads track 0 sector 1 into segment 0, offset 7C00 and jumps to it.

0000:7C00 FA     CLI                   Disable interrupts

The first thing after disabling the interrupts (which is pretty standard) is to change the pointer (at 0000:0078) to the disk controller parameter block to point at the first location after this actual code, 0000:7C79.

0000:7C01 2BC0   SUB AX,AX             AX=0
0000:7C03 8ED8   MOV DS,AX             DS=AX=0
0000:7C05 BB7800 MOV BX,0078           DISK_POINTER, points to parameter block
0000:7C08 B97900 MOV CX,0079
0000:7C0B BAC007 MOV DX,07C0
0000:7C0E 8B37   MOV SI,[BX]           Save current pointer at 0000:0078 in SI
0000:7C10 8B7F02 MOV DI,[BX+02]        Save current pointer at 0000:007A in DI
0000:7C13 890F   MOV [BX],CX           0000:0078 = 0079
0000:7C15 895702 MOV [BX+02],DX        0000:007A = 07C0

0000:7C18 8CC8   MOV AX,CS
0000:7C1A 8ED8   MOV DS,AX             Set DS = CS

; Set stack to 0000:7C00               Fairly standard
0000:7C1C BA0000 MOV DX,0000
0000:7C1F 8ED2   MOV SS,DX
0000:7C21 BB007C MOV BX,7C00
0000:7C24 8BE3   MOV SP,BX

0000:7C26 FB     STI                   Enable interrupts
0000:7C27 B86000 MOV AX,0060
0000:7C2A 8ED8   MOV DS,AX             Set DS and ES to 0x0060
0000:7C2C 8EC0   MOV ES,AX

; Reset disk drive (AH=0)
0000:7C2E 2BC0   SUB AX,AX AX=0
0000:7C30 2BD2   SUB DX,DX DX=0
0000:7C32 CD13   INT 13

0000:7C34 BA0300 MOV DX,0003           DX=3
0000:7C37 2BDB   SUB BX,BX             BX=0
0000:7C39 B501   MOV CH,01             CH=1
0000:7C3B 52     PUSH DX               Save DX
0000:7C3C B101   MOV CL,01             CL=1
0000:7C3E 51     PUSH CX               Save CX (= 0101)
0000:7C3F 2BD2   SUB DX,DX             DX=0
0000:7C41 B80402 MOV AX,0204           AH=2, AL=4
0000:7C44 CD13   INT 13

INT 13 with AH=2 reads AL (=4) sectors from cylinder CH (=1), sector CL (=1) of head/drive DX (0/0) into ES:BX (0060:0000). This read uses the new parameter block further down, which differs from the standard parameter block in that it specifies 1024 byte sectors, four sectors per track.

0000:7C46 721C   JB 7C64               If INT13 returns error, print "ILL" and halt
0000:7C48 59     POP CX                Restore CX (I don't think INT13 corrupts CX, so I don't know why)
0000:7C49 FEC5   INC CH                Next cylinder
0000:7C4B 81C30010 ADD BX,1000         Move data pointer 4 kb ahead
0000:7C4F 5A     POP DX                Track (cylinder) counter, started at 3...
0000:7C50 4A     DEC DX                ...2...1...
0000:7C51 75E8   JNZ 7C3B              Loop back unless 0

So we have now read three tracks of four sectors of 1024 bytes each into 0060:0000, 0060:1000 and 0060:2000.

; Restore disk controller parameter block pointer
0000:7C53 2BC0   SUB AX,AX               AX=0
0000:7C55 8ED8   MOV DS,AX               DX=0
0000:7C57 BB7800 MOV BX,0078             BX=0078
0000:7C5A 8937   MOV [BX],SI
0000:7C5C 897F02 MOV [BX+02],DI
0000:7C5F 06     PUSH ES
0000:7C60 2BC0   SUB AX,AX
0000:7C62 50     PUSH AX
0000:7C63 CB     RETF                    POP IP = 0, POP CS = ES

RETF pulls an instruction pointer and code segment from the stack, and execution moves there (0060:0000).

; ERROR
0000:7C64 2BDB   SUB BX,BX               BX=0
0000:7C66 B049   MOV AL,49
0000:7C68 B40E   MOV AH,0E
0000:7C6A CD10   INT 10                  AH=0E, teletype output, 49 "I"
0000:7C6C B04C   MOV AL,4C
0000:7C6E B40E   MOV AH,0E
0000:7C70 CD10   INT 10                  "L"
0000:7C72 B04C   MOV AL,4C
0000:7C74 B40E   MOV AH,0E
0000:7C76 CD10   INT 10                  "L"
0000:7C78 F4     HLT

0000:7C79 CF 02 25 03 04 2A FF 50 F6 19 04

This is the modified parameter block, 03 = 1024 bytes/sector (normally 2 = 512 bytes/sector) , 04 = 4 sectors per track (normally 8).
Of course MSDOS diskcopy barfs at 1024 byte sectors and there’s your copy protection.

ZORKTOOLS will rewrite the 4×1024 byte sectors to 8×512 byte sectors and patch the bootloader to match.

This… is stupid

(IMO, of course. And Geek Alert)

MFJ-949E

This is the switch and tuner schematic for an MFJ-949E Versa Tuner II. Great little unit, with a built-in dummy load. It has a switch that selects the dummy load, then the three antenna connectors in pass-through mode, then the three antenna connectors through the matching network, and then the dummy load again… through the matching network.

Which means that if you want to tune into the dummy load, you have to use the setting all the way to the left, or you have to adjust the tuner to match the dummy load to the rig, using the switch setting on the right.

Now why would you need to match a 50 ohm dummy load to your rig? Insane. The dummy load switch setting on the right should connect straight to the dummy load, not via the tuner.

I have a soldering iron, I can fix it.

40 Years

https://youtu.be/yHfLyMAHrQE

Dankie Oom Gielie.

Virgin no more

Windows30

I installed Windows 3.0 for the first time today* From seven 720 kilobyte stiffy** disks. And it worked first time.

 

* Windows 3.1, I’ve installed countless times. Windows 3.0, never.

** Yea that’s what we call them here.