Sunday, December 13, 2009

Whoo hoo

So, I got this Star Wars themed Laser Tag set from a rummage sale awhile back. One of the guns, didn't make a sound regularly when fired. You could score hits, but no sound. Kind of annoying.

About a month ago, I took it apart but couldn't figure out what was wrong with it, so I left it apart on my desk.

Today, I decided to glance at it again. While looking at it, I noticed an old speaker I had saved from some other device stuck to a metal bar on my desk. I thought, what the heck, lets hook it up and see if the speaker is bad. So I hooked it up temporarily and sure enough, it made a nice sound when fired. Rip out the old speaker, put in the 'new' and presto! A working gun once again.

YAY!

Thursday, December 3, 2009

DING DING DING!

So that website I posted got me to the right place, now I just need to 'understand' how it does what it does. Program is working... YAY! Learned a bunch of stuff about C#

Tuesday, December 1, 2009

So close I can taste it

SO I'm trying to export some data in C# to XML and my class has a couple of list classes in them and its really annoying. This page (http://www.codeproject.com/kb/xml/xml_generic_list.aspx) got me REALLY close. It outputs ONE record of five... not sure why yet.

Starting to really annoy me....

Sunday, November 29, 2009

Why is it...

that whenever I want to avoid something, I can find 1000 things to distract me, yet when I actually feel motivated about something 1000 things come up that prevent me from doing what needs to be done?

Friday, November 27, 2009

What exactly is Particle Board?

Some people call this wood...

Dictionary.com defines it this way:

any of various composition boards formed from small particles of wood, as flakes or shavings, tightly compressed and bonded together with a resin.
--------------------------------------------------------------------------------
Origin:
1955–60

Wikipedia has an article on it here: http://en.wikipedia.org/wiki/Particle_board

This crap should NEVER have been invented. It is the worst crap you can use to create anything that you would normally use wood for. It breaks easily, can't pound a nail through it without first drilling a hole otherwise it will pretty much shatter, nail pounded into it will pull out easily, and pretty much anything made with it will need to be replaced within 5 years (or at least you wish you would replace it that soon).

Unfortunately for me, I still own a printer stand that came with a desk I purchased back in 1989... 20 years... seems pretty good. I'm using it now as a TV stand and am just too lazy to replace it with the kind of stand it should have. The desk went to the fire pit long ago, along with a couple of entertainment centers.

Some genius decided it would be a good idea to make cabinet drawers out of it. I'm currently working on replacing the 4th drawer. There are still 14 more to be replaced, however, they are not bad enough to warrent my attention yet... one crisis at a time please :)

Should you ever have a chance to choice between particle board and plywood or, cost allowing, solid wood. Go with the plywood or solid wood if you can afford it. Avoid particle board at all costs...

Been an even longer while... :(

So, growing up I used to think that it would bite living out in the country. But now, everytime I walk outside in the dark and see the stars I think it is truely the best place to live.

No cars constantly driving by, no street lights, no smog. Just clear night air where you can see the vastness of space....

Ahhhhhhhh....

Sunday, August 16, 2009

Been awhile

So, its been a little bit since I last posted and I thought I would catch you up on whats up.

1) I was at my buddy's house and he had the exact same problem with his Wii that I did so I used repair proceedure #1 on it and PRESTO it works again. Good timing on me being there.

2) Bored as heck. Really want to try and figure out some cool stuff to do, just not very motivated.

3) I have some cool ideas on things to make, just don't have the resources to build them just yet. (need a plasma cutter, steel 'bender', concrete mixer, and other stuff) :)

Sounds like tons of fun doesn't it? Wish you were here?

Monday, June 8, 2009

Repair Procedure Number 1

So, I wanted to try out Wii Punch Out which I borrowed from a friend of mine, when I noticed that the Wii wouldn't turn on. No light, nothing.

So I unplugged it and left it that way for a few. Still nothing. Put a tester on the power supply, nothing. DOH

The internet says there is a 3amp fuse to replace. Not on mine (not visible anyway). So my friend and I open it up. Again, nothing that looks like a fuse. There was one device that seemed like it might be a resettable fuse, but no reset button.

I decided to just forget about it and go ahead and order a new one. We put it back together and plugged it in one more time to double check it. Presto it worked!

In thinking about it, when we took it apart, we had to slam it down on the bench pretty hard to get it out of the case. So, I'm thinking that the 'resettable' fuse got reset when I did that.

Go old Repair Procedure Number 1... HIT IT!

Sunday, April 12, 2009

Ramblings

Life is a beach.  You never know what will wash up on the shore, what someone will lose in the sand for you to find or what lurks beneath the sand to kill you.

Tuesday, March 10, 2009

One more Applesoft Program

I wrote this as two programs so long ago, I don't remember how they work :)

I thought for sure that I lost these, but stumbled across them today so I wanted to post them here for posterity.  I espcially like version 2.

If I get really ambitious I might try to write version 2 into assembly... not sure I remember assembly quite that well yet (I can read it well enough, but can I still write it???)

 1   TEXT : HOME
 2   ?  "Lo Res Graphics Fun by Gregg"
 5   ? "Which Version 1 or 2 (3 to quit): ";: GET K$
 6   IF K$ = "2" THEN 10
 7   IF K$ = "1" THEN 510
 8   IF K$ = "3" THEN HOME : ? "Bye!" : END
 9   GOTO 1
 10  TEXT : HOME : GR :T = 0:X = 1:Y = 38:C1 = 1:Z = 0:C2 = 2:XX = 0:YY = 0
 12 X1 = 19:Y1 = 20:C3 = 4
 13 X2 = 19:Y2 = 20:C4 = 6
 15  VTAB 22: PRINT "HIT ESC TO EXIT"
 20  COLOR= C1: HLIN X,Y AT X: HLIN X,Y AT Y: VLIN X,Y AT X: VLIN X,Y AT Y
 30 X = X + 1:Y = Y - 1:T = T + 1: IF T = 9 THEN XX = 1:YY = 38:Z = 1
 40  IF X = 20 THEN X = 1:Y = 38:C1 = C1 + 2: IF C1 > 15 THEN C1 = 1
 50  IF Z <  > 1 THEN 80
 60  COLOR= C2: HLIN XX,YY AT XX: HLIN XX,YY AT YY: VLIN XX,YY AT YY: VLIN XX,YY AT XX
 70 XX = XX + 1:YY = YY - 1: IF XX = 20 THEN XX = 1:YY = 38:C2 = C2 + 2: IF C2 > 14 THEN C2 = 2
 80  COLOR= C3: HLIN X1,Y1 AT X1: HLIN X1,Y1 AT Y1: VLIN X1,Y1 AT X1: VLIN X1,Y1 AT Y1
 90 X1 = X1 - 1:Y1 = Y1 + 1:
 100  IF X1 = 0 THEN X1 = 19:Y1 = 20:C3 = C3 + 2: IF C3 > 15 THEN C3 = 1
 105  IF Z <  > 1 THEN 20
 110  COLOR= C4: HLIN Y2,X2 AT X2: HLIN Y2,X2 AT Y2: VLIN Y2,X2 AT X2: VLIN Y2,X2 AT Y2
 120 X2 = X2 - 1:Y2 = Y2 + 1
 130  IF X2 = 0 THEN X2 = 19:Y2 = 20:C4 = C4 + 2: IF C4 > 15 THEN C4 = 1
 200 K =  PEEK ( - 16384): IF K <  > 155 THEN 20
 210  POKE  - 16368,0: TEXT : HOME : GOTO 1

 510  TEXT : HOME : GR :T = 0:X = 1:Y = 38:C1 = 1:Z = 0:C2 = 2:XX = 0:YY = 0
 520  COLOR= C1: HLIN X,Y AT X: HLIN X,Y AT Y: VLIN X,Y AT X: VLIN X,Y AT Y
 530 X = X + 1:Y = Y - 1:T = T + 1: IF T = 9 THEN XX = 1:YY = 38:Z = 1
 540  IF X = 39 THEN X = 1:Y = 38:C1 = C1 + 2: IF C1 > 15 THEN C1 = 1
 550  IF Z <  > 1 THEN 520
 560  COLOR= C2: HLIN XX,YY AT XX: HLIN XX,YY AT YY: VLIN XX,YY AT YY: VLIN XX,YY AT XX
 570 XX = XX + 1:YY = YY - 1: IF XX = 39 THEN XX = 1:YY = 38:C2 = C2 + 2: IF C2 > 14 THEN C2 = 2
 580  VTAB 22: PRINT "HIT 'ESC' TO EXIT":K =  PEEK ( - 16384): IF K <  > 155 THEN 520
 590  POKE  - 16368,0: TEXT : HOME : GOTO 1

Assembly is Fun!

It has been a LONG time since I seriously wrote any 6502 Assembly code, but I used to do it all the time.  I would write it out on paper first then type it in once I had it where I thought I wanted it.  Paper made it alot easier to see everything all at once (due to the tiny screens in the old days).  I think I still have a page or two of hand written code.  If I find it I'll scan and post it just for fun.

So, I was playing with this site: http://www.6502asm.com/

And decided to take an old Apple ][ Assembly program I wrote EONS ago and adapt it to work on that site.  Got it to work pretty well and even submitted it for their examples page.  I do have a Game Of Life I wrote once that I want to try and adapt, but not today :)

If you write anything cool, let me know.

Wednesday, March 4, 2009

Yawn

Tired, so tired. Not sleeping much (and haven't been for about a year). Most of it is because of work... oh well. Maybe someday it will get better (or I'll win the lottery... yah right).

So awhile ago I found this site: http://www.calormen.com/Applesoft/

Its fun to sometimes play with.

Go ahead and put this code in there:

10 TEXT : HOME : INPUT "NUMBER OF POINTS:";A: HCOLOR= 3
20 HGR : POKE -16302,0
30 FOR T1 = 0 TO (2 * 3.14) - .001 STEP ((2 * 3.14) / A)
40 FOR T2 = T1 + (2 * 3.14) / A TO (2 * 3.14) - .001 STEP (2 * 3.14) / A
50 HPLOT ( COS (T1) * 95 + 127),( SIN (T1) * 95 + 95) TO ( COS (T2) * 95 + 127),( SIN (T2) * 95 + 95)
60 NEXT
70 NEXT
80 GET A$
90 GOTO 10

or This one

10 TEXT
20 HOME
30 INPUT "Enter a number from 1 to 8:";N
40 IF N > 0 AND N < 8 THEN F = 128
50 E = 0
60 K = 4 ^ N
70 FOR X = 1 TO N
80 U = F
90 F = - E / 2
100 E = U / 2
110 NEXT
120 HGR
130 HCOLOR= 3
140 X = 80
150 Y = 70
160 HPLOT X,Y
170 FOR M = 1 TO K
180 Z = M
190 X = X + F
200 Y = Y + E
210 HPLOT TO X,Y
220 FOR A = 0 TO 1
230 Z = Z / 2
240 Q = INT (Z)
250 A = Z - Q
260 NEXT
270 A = (Q / 2 = INT (Q / 2)) * 2 - 1
280 U = F
290 F = A * E
300 E = - A * U
310 NEXT
320 GOTO 10

I sent several of my programs to the guy that wrote it so hopefully he includes them in his 'sample' list. Especially the last one I sent him... its pretty cool.

Saturday, February 28, 2009

Here is some old code for you...

The Apple ][ computer didn't have super fancy graphics.  They had a portion of memory mapped to the graphic screen.  Since I don't really feel like trying to explain it here because others have done it far better than I could read this: http://en.wikipedia.org/wiki/Apple_II_graphics   Specifically the Hires Graphics section.

Now, I had a need to be able to scroll the Hires Screen left or right.  Thanks to a series of articles by David Lubar in Creative Computing called The Graph Paper (October 1982 -> March 1983) and an article called Lookup Tables (March 1982) I had a very good understanding of how each byte in memory made up the picture that was displayed so I wrote the following code using the SC Macro Assembler.  This version of the code did the scroll left.

The 'Lookup Table' allowed me to access each line of the hires screen directly and in order (since the screen was 'interlaced').

BTW, comments are for losers. :)

1000        .OR $6000
1010        .TF SCROLLLEFT
1020        .LIST OFF
1030        JMP HERE
1040 TABLHI .HS 2024282C3034383C
1050        .HS 2024282C3034383C
1060        .HS 2125292D3135393D 
1070        .HS 2125292D3135393D
1080        .HS 22262A2E32363A3E
1090        .HS 22262A2E32363A3E
1100        .HS 23272B2F33373B3F
1110        .HS 23272B2F33373B3F
1120        .HS 2024282C3034383C 
1130        .HS 2024282C3034383C
1140        .HS 2125292D3135393D 
1150        .HS 2125292D3135393D
1160        .HS 22262A2E32363A3E
1170        .HS 22262A2E32363A3E 
1180        .HS 23272B2F33373B3F
1190        .HS 23272B2F33373B3F
1200        .HS 2024282C3034383C 
1210        .HS 2024282C3034383C
1220        .HS 2125292D3135393D
1230        .HS 2125292D3135393D
1240        .HS 22262A2E32363A3E 
1250        .HS 22262A2E32363A3E
1260        .HS 23272B2F33373B3F
1270        .HS 23272B2F33373B3F
1280 TABLLO .HS 0000000000000000
1290        .HS 8080808080808080
1300        .HS 0000000000000000
1310        .HS 8080808080808080
1320        .HS 0000000000000000 
1330        .HS 8080808080808080 
1340        .HS 0000000000000000
1350        .HS 8080808080808080
1360        .HS 2828282828282828
1370        .HS A8A8A8A8A8A8A8A8
1380        .HS 2828282828282828
1390        .HS A8A8A8A8A8A8A8A8 
1400        .HS 2828282828282828 
1410        .HS A8A8A8A8A8A8A8A8 
1420        .HS 2828282828282828 
1430        .HS A8A8A8A8A8A8A8A8 
1440        .HS 5050505050505050
1450        .HS D0D0D0D0D0D0D0D0
1460        .HS 5050505050505050 
1470        .HS D0D0D0D0D0D0D0D0 
1480        .HS 5050505050505050 
1490        .HS D0D0D0D0D0D0D0D0
1500        .HS 5050505050505050 
1510        .HS D0D0D0D0D0D0D0D0 
1520 HERE   STA $C050 
1530        STA $C057
1540        STA $C054
1550        STA $C052
1560        LDX #$00
1570 A7     LDA TABLLO,X  
1580        STA $F0
1590        LDA TABLHI,X
1600        STA $F1
1610        CLC
1620        LDY #$27
1630 A6     LDA ($F0),Y
1640        ROL
1650        BCC A1
1660        ROR
1670        BCC A2
1680        SEC
1690        ROR
1710        JMP A3
1720 A2     ROL
1730        CLC
1740        ROR
1750        SEC
1760        ROR
1770        JMPA3
1780 A1     ROR
1790        BCC A4
1800        ROL
1810        SEC
1820        ROR
1830 A4     ROR
1840 A3     STA ($F0),Y
1850        ROR
1860        DEY
1870        BMI A5
1880        ROL
1890        JMP A6
1900 A5     INX
1910        CPX #$C0
1920        BNE A7
1930        RTS

And the code to scroll right looks like this:

1000        .OR $6000
1010        .TF SCROLLRGHT
1020        .LIST OFF
1030        JMP HERE
1040 TABLHI .HS 2024282C3034383C
1050        .HS 2024282C3034383C
1060        .HS 2125292D3135393D 
1070        .HS 2125292D3135393D
1080        .HS 22262A2E32363A3E
1090        .HS 22262A2E32363A3E
1100        .HS 23272B2F33373B3F
1110        .HS 23272B2F33373B3F
1120        .HS 2024282C3034383C 
1130        .HS 2024282C3034383C
1140        .HS 2125292D3135393D 
1150        .HS 2125292D3135393D
1160        .HS 22262A2E32363A3E
1170        .HS 22262A2E32363A3E 
1180        .HS 23272B2F33373B3F
1190        .HS 23272B2F33373B3F
1200        .HS 2024282C3034383C 
1210        .HS 2024282C3034383C
1220        .HS 2125292D3135393D
1230        .HS 2125292D3135393D
1240        .HS 22262A2E32363A3E 
1250        .HS 22262A2E32363A3E
1260        .HS 23272B2F33373B3F
1270        .HS 23272B2F33373B3F
1280 TABLLO .HS 0000000000000000
1290        .HS 8080808080808080
1300        .HS 0000000000000000
1310        .HS 8080808080808080
1320        .HS 0000000000000000 
1330        .HS 8080808080808080 
1340        .HS 0000000000000000
1350        .HS 8080808080808080
1360        .HS 2828282828282828
1370        .HS A8A8A8A8A8A8A8A8
1380        .HS 2828282828282828
1390        .HS A8A8A8A8A8A8A8A8 
1400        .HS 2828282828282828 
1410        .HS A8A8A8A8A8A8A8A8 
1420        .HS 2828282828282828 
1430        .HS A8A8A8A8A8A8A8A8 
1440        .HS 5050505050505050
1450        .HS D0D0D0D0D0D0D0D0
1460        .HS 5050505050505050 
1470        .HS D0D0D0D0D0D0D0D0 
1480        .HS 5050505050505050 
1490        .HS D0D0D0D0D0D0D0D0
1500        .HS 5050505050505050 
1510        .HS D0D0D0D0D0D0D0D0 
1520 HERE   STA $C050 
1530        STA $C057
1540        STA $C054
1550        STA $C052
1560        LDX #$00
1570 A7     LDA TABLLO,X  
1580        STA $F0
1590        LDA TABLHI,X
1600        STA $F1
1610        CLC
1620        LDY #$00
1630 A6     LDA ($F0),Y
1640        ROL
1650        BCC A1
1660        ROL
1670        BCC A2
1680        SEC
1690        ROR
1700        SEC
1710        BCS A3
1720 A2     SEC
1730        ROR
1740        CLC
1750        BCC A3
1760 A1     ROL
1770        BCC A4
1780        CLC
1790        ROR
1800        SEC
1810        BCS A3
1820 A4     CLC
1830        ROR
1840        CLC
1850 A3     STA ($F0),Y
1860        ROR
1870        INY
1880        CPY #$28
1890        BEQ A5
1900        ROL
1910        JMP A6
1920 A5     INX
1930        CPX #$C0
1940        BNE A7
1950        RTS

The code is very close but there are some important differences (like line 1620, 00 starts on the left of the line and #27 starts on the right of the line).

Now, you may ask, Why did I bother posting this?  Because I could and I felt like sharing.  I do have some old notebook pages I found with some hand written code on them that I'm going to scan in and post here at some point in the near future.

A Definition? Maybe later...

So, a number of years ago, I was in this writing class and the assignment was to pick a word and write a creative definition for it. Below is what I submitted (which got me a "Clever! 4.0" out of a possible 4.0 points)


A definition? Maybe later...
By Me

Possibly the most destructive activity in the U.S.A today.

Requires little to no effort to be effective.

One can do it any time of the day or night.

Creative methods can be used to justify the results.

Rarely can one escape once the habit is formed.

Always easier to allow it to continue than to reverse it effects.

Students learn it in school from their classmates.

Teachers despise it for they are aware of its destructiveness.

Into the blackness time is cast.

No reason is too small to allow its propagation.

Anyone may be its slave.

Tomorrow will be different but that can wait.

I am caught in its eternal web.

One has only to do nothing to participate.

Not until I become the master will its grip be broke.

Procrastination, the act, tendency or habit of postponing.

Ah, the old days...

So, long ago I was deep into Apple ][ computers. I could hand code assembly directly into the monitor (until I got my hands on SC Macro Assembler).. A time when Boot Code tracing was the best way to get into the guts of a game and when windows were things you looked out of.

My buddy and I would figure out some cool piece of code and then share it. Each of us trying to be better than the other.

Once I figure out an easy way to link to some of the stuff we wrote, I'll post links to .bin files that will run in any Apple ][ emulator. Sure, its not up to today's standards but for the time it was pretty cool (20+ years ago!).

I miss the simplicity of the code & operating systems. Today's OSes just have way too much bloat.
Ah well... everything must pass to dust eventually

Thursday, February 26, 2009

I'm not the man you think I am...

So, this isn't something that I really enjoy. I've never been one to write my thoughts down, mostly because I thought it was a bit on the 'fruity' side but also because I don't like to leave a paper trail ;)

I've never had alot to say in the public as I've always been a private guy. When I do share my thoughts its with my friends and family.

So, now you ask, why the heck am I here doing it now? Why should you listen to me? What could I possibly have to say?

The short answer: Nothing so go away.

The not short but not long answer: I don't feel that I have anything really important to say. I just needed a place to vent, but also a place to write down some of the ideas I have so that when someone comes out with a product that uses my idea I can say SEE! I thought of that YEARS ago... :)

What You'll find here: From time to time I will post my frustrations. I'll post ideas that I think are cool. I might even post some code here and there (new, old, moldy, in any language I find amusing).

If you don't like what I have to say, too bad, deal with it, or just go somewhere else. I don't want to hear your thoughts on my thoughts. If I want your opinion, I'll give it to you.

Why that title and description?

"Pentium Prime"

This title came from the old days when I had a Dual P90 running Windows NT. I was on IRC and I saw alot of people that had a message display when they left. So I thought to myself, what the heck could I say that sounded cool? I came up with "And the sun sets on Pentium Prime, hopefully to rise again...". Pentium Prime referring to the Dual P90, which at the time, was an awesome box. I guess I just always liked the sound of it.

"From our minds to your brain, whether you like it or not."

If you haven't figured it out, I'm being condescending to you, the reader. :) I'm implying that while we the authors have Minds (implying that we are highly intelligent, which of course we are), you the reader just have a brain (which allows you to breath but not think very well). If you don't like the implication, we don't really care. Hey, its all in fun right? If you can't have fun, then there is no point in existing.
Copyright Realm Laboratories, LLC