Holy shit May 24th, 2014 by b-knox

20140524-003949-2389779.jpg

Holy shit I got a modular. Holy shit I got a new phone. Holy shit I can post about my modular with my phone holy shit.

DASM and the Atari 2600 VCS February 19th, 2014 by b-knox

I went through a bit of hell getting a ROM to compile.

dasm pitches.asm -f3 -opitches.bin

It was the -f that I was missing (that and my .asm wasn’t setup right). The -f3 makes it output a raw binary without a loading memory address header. The commodore computers use that head to tell them where to start loading a program into memory. Cartridge based systems usually always start at the same place so the header would be misinterpreted as code and bork ass.

Jeez. Not only is the system limited to 128 bytes of RAM on the top half of the zero page $80, but you can’t read from the TIA chip either. It’s write only. Keep track of that stuff yourself, k?

Now a bunch of related links :
2600 Specifications
Paul Slocum’s 2600 music guide
boomlinde macros
VCS Programming this one has links for DASM, VCS.H and MACRO.H
1st thing i got to compile

bouncing gumtard September 2nd, 2013 by b-knox


Time for another music vid! :D

I was cleaning up some deprecated and antiquated script files after refactoring them into a new one. Then I did something dumb. rm objectname* which included my new script I had worked on for about 4 hours. There is no undo for rm in the command line. This is not the first time this has happened to me. The lesson here, according to many linux msg boreds, is to learn not to do that or quit. I figured there has to be a way to backup deleted files.

If you have root access I suggest you install trash-cl, but if you are on a shared hosting account like I am this might be of help to you.

I decided to create a command called tr which is short for trash. I created a directory for the trash mkdir ~/.trash and in .bash_profile I added this code –
move_to_trash() {
CWD="`pwd`"
CWD="${CWD##/*/}"
if [ "$CWD" == ".trash" ]
then
rm -fr ~/.trash/*
else
mv -i $1 ~/.trash/
fi
}
alias tr=move_to_trash

After saving your update you can source ~/.bash_profile and see if it’s working without reconnecting with the server. You can tr files just like you would rm them, except they are actually moved to the .trash directory. If you want to empty the .trash then cd ~/.trash and run tr. All gone! Maybe in a future version I’ll add recursive rm behaviours.

They’ll tell you this is a bad idea; that it creates a bad habit; that you should respect the power of rm and pay better attention to what you’re doing. That’s recockulous. Accidents happen. Especially with a fist full similarly named files.

Now here is a related video! :D

Between 17 professional programmers on IRC late one night, I stumbled across not only this problem, but the solution to it as well. The tricky part is that it’s a recursive process. You have to pipe to hell and back!?!? Maybe . . .

this gets you the number of lines in all php files
cat **/*.php | wc -l

this one lists all the files and their line counts
wc -l `find . -name \*.php`

Sweet! Battle of the Bits is over 30,000 lines of code! Did I do that?

props to jangler and wollymammoth

10 PRINT is a cute new book January 5th, 2013 by b-knox

Published last November, ’10 PRINT CHR$(205.5+RND(1)); : GOTO 10′ (yes, that is the entire official title) is an interesting traipse through all things related to running this one line program on a Commodore 64. Watch what it does when you RUN it –

Somewhere in the mid 80′s, I discovered those two slash characters could generate a maze like screen when I started manually entering them continuously. I had my own version of this program memorized, typing it in on occasion. It was three lines and not one, more often on the VIC20 instead, but the same program nonetheless.

The book’s website has a free PDF version for download. I didn’t exactly read the whole thing, but at least perused each page. Being someone who grew up on Commodore machines when they were still on the market, this book might be much more interesting to non-advanced users or younger generations curious about 8bit cpmuting. There’s a lot of interesting history, variations, and notes on randomness. But at times, it seems to read rather theoretical instead of definitive.

Chapter 55 discusses creating a port of this program to the Atari 2600 (or VCS) and I would have loved to see more assembly language on the subject. Perhaps reading it in a purely technical matter would be much more useful (and briefer) for me. I am probably not the ideal audience here. I’m not concerned with generality when it comes to 8bit computers. I want raw, applicable codes.

C64_Petscii_Chartspage 27 – Mentioned as a ‘quirk’, several character graphics repeated in the character ROM is actually an efficient design.  By default, most Commodore computers are in ‘unshifted mode’ meaning there are no lower case characters available which makes room for more graphical characters.  When ‘shifted mode’ is enabled the computer references the 2nd half of the character ROM.  Then on page 185, they mention that POKE 53272,23 switches the C64 to lower case text mode.  It’s not a ‘quirk’.  This thing is published by MIT?  Are these 10 authors computer scientists?  …and I won’t even get into the difference between PRINT CHR$() and directly writing to screen RAM with a POKE.

page 195 – Microsoft accepted the $25k deal for their BASIC instead of $3/unit royalty thinking that Commodore would hire them to update when they developed new computers.  Jack Tramiel, founder of Commodore, saved some pennies by never doing so, keeping the BASIC ROM down to 8kb.  The C64 could have had a whole new gambit of BASIC functions covering access to the SID and VIC-II chips responsible for sound and video respectively.  Both of those chips are much more powerful and difficult to program with BASIC POKE statements than their predecessor, the VIC chip, which handled both.  CBM BASIC’s updates were done internally at Commodore, correcting memory pointers so it would work on the architectures over a few generations of machines. (source; it also claims BASIC was sold for $10k)

I liked all the pictures! :D

Laura Palmer the drink December 11th, 2012 by b-knox

I was perusing a bar’s cocktail menu and saw a drink named Laura Palmer. The ingredients include Maker’s Mark whiskey, fresh sour mix, orange bitters and a cherry. Interesting combo, I would definitely give it a try. The cherry is more of a callback to Audrey Horn and that tie a cherry stem into a knot in your mouth trick than Laura Palmer. Oh well.

Ok, but is this drink really a thing? So I snooped around. I found someone describing a “citrusy/vodka” drink. Perhaps they meant this : equal parts tequila, triple sec, vodka with pineapple juice and lemon. I would try that also.

And then there is another camp on the Laura Palmer drink and that’s an extension of the Arnold Palmer which is a virgin drink made of equal parts ice tea and lemonade. All these recipes call for a dark liquor like spiced rum or Jagermeister. But these type of drinks have yet another name : the Schwarzenegger or the Californian Arnold Palmer. Obscure drinks named after household words, names and celebrities are likely to vary greatly. The Schwarzenegger can also be dark rum, brandy and a dash of lime juice. And to really round it out, here’s the Arnie Palmer : a shot of vodka, fill with lemonade, splash in some ice tea.

I tried to find a video of Laura Palmer and Donna Hayward doing a shot at the bar with them two studs, whats-his-name and Buck. I remember it being a dark liquid, but am not sure. I did, however, find this awesome Sesame Street parody of Twin Peaks though!!

Regardless which route you go should you have a Twin Peaks party, you might not want to try this drink –

Nintendo History Info Porn November 12th, 2012 by b-knox

Today, in my inbox, I found this wonderful infographic by Chloe Carter.  Yes, it has the ‘Offical B-Knox Seal’ of approval!  I always thought Mario had to be more popular than Mickey Mouse!!!


Created by: MBAOnline.com

Mandelbrot went 3D November 10th, 2012 by b-knox

It never occurred to me, but tis it is a brilliant idea to flip and extrude the world’s favorite fractal into a new dimension. This new incarnation is known as a mandelbulb. There seems to be a single tool people are using to explore this wonder of spatial modeling : MandelBulber and guessing by the manual, you could waste a few nights away exploring the terrain.

Here are some images I found online –

But the best images are on the Mandelbubler website in the Cream of the Crop Gallery.

I didn’t credit anyone’s work because I am lazy.  Sorry, internets.

Lucas Films + Disney = wtf November 1st, 2012 by b-knox

Ok, it’s not so ‘wtf’ as all that. Lucas is tired and the prequel trilogy was, well, it is what it is. We have no idea what’s in store for episode vii in 2015, or the rest of the next trilogy for that matter. But, if I read it right, Lucas’s sole role will be that of creative consultant. Not writer, director, or even producer. Can the Disney seal of quality assure us all that new Star Wars video productions will be better?

There are countless things that I am curious about, but there are no straight answers. The only thing that’s obvious is Lucas is stepping down to the tune of $4 billion in cash and Disney stock. Disney keeps freaking me out. I didn’t even know they own Marvel Movies already! Can we expect Jedi in the next Avengers film?

There’s some kind of live action Star Wars television getting started. But what I’d really like to see is Maniac Mansion and Day of the Tentacle turned into movies! That’s right, Lucas Films includes all kinds of subsidiaries including Lucas Arts, the creators of some classic home computer video games. Maybe they could do something with the Monkey Island series too. Wait, that’s called Pirates of the Caribbean. :P