Friday, March 23, 2018

Atari Flashback 8 Gold with wired joystick

I got an atari Flashback 8 Gold at a thrift store but without the wireless joystick controllers that have the reset buttons on them. How do you get back to the menu?

I tried everything I could think of, but couldn't figure it out without finding a manual on the internet.





You hold down on the joystick and press the SELECT button on the console.

I guess it would've been too hard to add another button on the console itself. 8-)

My only complaint now is that they don't have auto-repeat in the selection menu. I hate having to waggle the joystick right a bunch of times to get to the end of the list. (It's a pretty long list).

Other than that, it's sweet.

Thursday, March 22, 2018

Legion of Doom or Artful Aardvark background

I've been using 17.10 Artful Aardvark for a while now and I couldn't figure out what that picture on the background was supposed to be.

I kept thinking, what is this thing that looks like the Legion of Doom headquarters?

I realized that it's supposed to be an Aardvark.

Friday, March 2, 2018

Pausing with sleep for 1/100 of a second

So I wanted have a script pause for 1/100 of a second using sleep, but it seemed to have a bit of overhead.

A little bash script to test it says that I should sleep for about 0.0084 seconds to get an effective 0.01 second delay.

It's a little tricky to get those bash one-liners right with ifs and having to put semicolons in just the right places to parse correctly.


This is with Ubuntu 17.10.


Also, why don't we measure how much overhead there actually is for a "sleep 0" command.

A lua5.3 one-liner is:


and why don't we try it with bash with a sleep 0:

Monday, January 22, 2018

Ejecting / Closing cd tray from the Keyboard Ubuntu 17.10


I was fiddling with the keyboard buttons and found the "stop" multimedia button on my dell keyboard would eject the cd tray. It's actually a dvd-rw drive but I'll always think of it as a "cd drive".

If you press stop, it will eject the tray, but pressing it again won't close the tray.

That seems horribly asymmetric.

What to do? The command "eject -t" will close your cd drive so why not add that to my keyboard settings.

So I just add a new custom shortcut in Settings/Devices/Keyboard, name it "CD Close", set the command to "eject -t" and bind it to "Shift+Eject".




Since it's a custom keystroke, you don't get the neat little graphic "eject" symbol in the On Screen Display.

Why don't they give the user the option of having a custom graphic symbol to display also? Oh well, I guess you can't have everything.




While I was fiddling, I thought, why not convert my "back" button to a screenshot command since I use that all the time:




and my suspend custom shortcut:

Thursday, January 18, 2018

Netcat weirdness - 72 byte errors


I thought I'd take a closer look at what was happening with my netcat problem.

I ran a cmp on the files to see just what was happening.


cmp -l /media/sdk1/BACKUP_2018_01_15_BY_USB /media/sdk1/BACKUP_2018_01_15_BY_NETWORK
 10056230615   5   0
 10056230616 152  25
 10056230617 264 351
 10056230618 151  57
 10056230619  14 205
 10056230620 357 125
 10056230621 156   0
 10056230622 326  32
...

(Oh and if those "bytes" look weird, cmp outputs the bytes in octal...go figure. cmp prints the byte offset in decimal and the byte itself in octal)


and what's weird is that the error blocks are 72 bytes in length. (I think that's the length of an ethernet frame)

and even more strange is that the error blocks are always the same exact data. Above you can see the sequence 0,25,351,57 etc...
That's the same 72 byte sequence in each error block.

I loaded the output into LibreOffice Calc and graphed it:

So out of 250GB of data, there are around 432 bytes different, 6 blocks of 72 (72*6=432).



Column H and I are just =CHAR(OCT2DEC(B1)) and = CHAR(OCT2DEC(C1)) copied downward.




I actually did the copy over the network twice and got different results:



(edit: I thought it was a realtek 8169 but it's actually a Marvell Yukon)

The sending network card is a Marvell Yukon (D-Link DGE-530T) using the skge driver running under Knoppix 8.1.

Wednesday, January 17, 2018

Netcat weirdness - corruption

I thought I'd try to image a hard drive over the local network.

I boot knoppix on each system, figure out the ip address with ifconfig and then


nc -l 5000 | pv > /media/sdc1/MY_IMAGE_FILE

and on the system to be imaged:

dd if=/dev/sda | pv | nc -N 192.168.1.1 5000


I like to pipe it through pv so I can see what's happening.

I've got a 250GB hard drive so at around 20MB/sec it takes a while, 250E9 / 20e6 / 60 / 60 = 3.47 hours.

But when I check it with md5sum I get different results. Very strange. I thought that TCP connections were supposed to be error corrected.

I do an image directly to a usb drive and the md5sums match.

netstat -s
nstat

gives a lot of statistics,

I see quite a few errors, maybe the network card or switch is acting up. This is the kind of thing that drives you crazy.

Wednesday, January 3, 2018

Year end totals

I think I've been pretty consistent:

2.5 million steps in a year, no wonder my shoes look beat up.

Not quite amish level though.