Half Way Through Jim Butterfield's Book, What Next?

Building your first 6502-based project? We'll help you get started here.
User avatar
barrym95838
Posts: 2056
Joined: 30 Jun 2013
Location: Sacramento, CA, USA

Re: Half Way Through Jim Butterfield's Book, What Next?

Post by barrym95838 »

BigDumbDinosaur wrote:
At least you guys had reference manuals to work with. When I started with the 6502, manuals had yet to be written. I worked off typewritten notes gotten from MOS Technology.
I'll bet you're one of those guys who used to walk to school in the snow back in the day. :wink:
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)
User avatar
BillO
Posts: 1038
Joined: 12 Dec 2008
Location: Canada

Re: Half Way Through Jim Butterfield's Book, What Next?

Post by BillO »

barrym95838 wrote:
I'll bet you're one of those guys who used to walk to school in the snow back in the day. :wink:
Didn't we all. Up hill both ways too.
Bill
User avatar
BigDumbDinosaur
Posts: 9426
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: Half Way Through Jim Butterfield's Book, What Next?

Post by BigDumbDinosaur »

BigEd wrote:
I think learning by doing is the best way for most people, it's a question of how much support you get, how much confidence you have, and how much effort it then takes.
Being motivated to learn is essential as well. :D
x86?  We ain't got no x86.  We don't NEED no stinking x86!
whartung
Posts: 1004
Joined: 13 Dec 2003

Re: Half Way Through Jim Butterfield's Book, What Next?

Post by whartung »

barrym95838 wrote:
BigDumbDinosaur wrote:
At least you guys had reference manuals to work with. When I started with the 6502, manuals had yet to be written. I worked off typewritten notes gotten from MOS Technology.
I'll bet you're one of those guys who used to walk to school in the snow back in the day. :wink:
Back in BDDs day, he only has 0's to work with, they hadn't invented the 1's yet.
User avatar
barrym95838
Posts: 2056
Joined: 30 Jun 2013
Location: Sacramento, CA, USA

Re: Half Way Through Jim Butterfield's Book, What Next?

Post by barrym95838 »

whartung wrote:
Back in BDDs day, he only has 0's to work with, they hadn't invented the 1's yet.
I have recently been able to conclude that Base 1 arithmetic can present some unique challenges.
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)
User avatar
BigDumbDinosaur
Posts: 9426
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: Half Way Through Jim Butterfield's Book, What Next?

Post by BigDumbDinosaur »

barrym95838 wrote:
BigDumbDinosaur wrote:
At least you guys had reference manuals to work with. When I started with the 6502, manuals had yet to be written. I worked off typewritten notes gotten from MOS Technology.
I'll bet you're one of those guys who used to walk to school in the snow back in the day. :wink:
A couple of times I did while I was in high school when I overslept and missed the bus. It was a 1.9 mile walk to get there. :D
whartung wrote:
Back in BDDs day, he only has 0's to work with, they hadn't invented the 1's yet.
I tried to file a patent on 1s but someone beat me to it.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
BillO
Posts: 1038
Joined: 12 Dec 2008
Location: Canada

Re: Half Way Through Jim Butterfield's Book, What Next?

Post by BillO »

BigEd wrote:
I think learning by doing is the best way for most people, it's a question of how much support you get, how much confidence you have, and how much effort it then takes.
I agree. When I learned it was by doing, but there was little support for it. It was a hobby so was low on the importance scale to those around me. There were no clubs nearby, no others in my circle that were interested, and certainly nothing like 6502.org. This place is gold. Good support, like what is available from this site, should help bolster confidence and bring motivation.
Bill
User avatar
cbmeeks
Posts: 1254
Joined: 17 Aug 2005
Location: Soddy-Daisy, TN USA
Contact:

Re: Half Way Through Jim Butterfield's Book, What Next?

Post by cbmeeks »

BigDumbDinosaur wrote:
barrym95838 wrote:
BigDumbDinosaur wrote:
At least you guys had reference manuals to work with. When I started with the 6502, manuals had yet to be written. I worked off typewritten notes gotten from MOS Technology.
I'll bet you're one of those guys who used to walk to school in the snow back in the day. :wink:
A couple of times I did while I was in high school when I overslept and missed the bus. It was a 1.9 mile walk to get there. :D
whartung wrote:
Back in BDDs day, he only has 0's to work with, they hadn't invented the 1's yet.
I tried to file a patent on 1s but someone beat me to it.

OT...sorry...but that made me chuckle.

I used to have an uncle that joked about how old he was. The joke would be:

Me: "James, what's your SSN?"
Uncle James: "One."

LOL

Of course, I had to have a bit of fun about how old I am to my granddaughter. She's convinced I rode a horse-n-buggy to school. lol
Cat; the other white meat.
JimBoyd
Posts: 931
Joined: 05 May 2017

Re: Half Way Through Jim Butterfield's Book, What Next?

Post by JimBoyd »

barrym95838 wrote:
I have recently been able to conclude that Base 1 arithmetic can present some unique challenges.
You didn't by any chance set BASE to one while using Forth?
User avatar
barrym95838
Posts: 2056
Joined: 30 Jun 2013
Location: Sacramento, CA, USA

Re: Half Way Through Jim Butterfield's Book, What Next?

Post by barrym95838 »

JimBoyd wrote:
You didn't by any chance set BASE to one while using Forth?
Not exactly, but I get the gist of your train of thought. 8)
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)
JimBoyd
Posts: 931
Joined: 05 May 2017

Re: Half Way Through Jim Butterfield's Book, What Next?

Post by JimBoyd »

GARTHWILSON wrote:
Yep. This is definitely a contact sport. :lol:
Does that mean I'm an athlete? :D
User avatar
BitWise
In Memoriam
Posts: 996
Joined: 02 Mar 2004
Location: Berkshire, UK
Contact:

Re: Half Way Through Jim Butterfield's Book, What Next?

Post by BitWise »

JimBoyd wrote:
GARTHWILSON wrote:
Yep. This is definitely a contact sport. :lol:
Does that mean I'm an athlete? :D
No but you may occasionally get athletes foot.
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
JimBoyd
Posts: 931
Joined: 05 May 2017

Re: Half Way Through Jim Butterfield's Book, What Next?

Post by JimBoyd »

load81 wrote:
Dr Jefyll wrote:
Are you doing any assembly language coding of your own?
Yes, albeit simple stuff like changing boarder colors to simulate a phosopor display. Right now I'm writing a faux BSoD program for the C64. It's just a gag: a two byte memory address generated at random and a fake processor error. This is requiring me to figure out how to get a random number. (I haven't figured that out, yet.) The errors will be humorous. "Zero page has been eaten by a grue," that sort of thing.
If you're still interested in an 8 bit random number generator for the Commodore 64, here is a tip from the June 1986 issue of Ahoy! magazine.
Initialize voice 3 of the SID chip:

Code: Select all

LDA #$FF
STA $D40F
LDA #$80
STA $D412
Read the random number:

Code: Select all

LDA $D41B
JimBoyd
Posts: 931
Joined: 05 May 2017

Re: Half Way Through Jim Butterfield's Book, What Next?

Post by JimBoyd »

Concerning the tip I provided, I don't know how random the value will be or how the VICE simulator stacks up to the real Commodore 64 SID chip concerning the randomness of the output.

Code: Select all

// do the following once to initialize the generator.
LDA #$FF      // set SID's voice three frequency
STA $D40F     // high byte to maximum
LDA #$80 
STA $D412     // set the noise waveform
   .
   .
   .
LDA $D41B     // read the value of the waveform
              // as often as needed.
   .
   .
   .
White Flame
Posts: 704
Joined: 24 Jul 2012

Re: Half Way Through Jim Butterfield's Book, What Next?

Post by White Flame »

Here's also a fully software 0-255 8-bit PRNG, keeping a seed around and setting the accumulator to the next random number:

Code: Select all

        lda seed
        beq doEor
         asl
         beq noEor ;if the input was $80, skip the EOR
         bcc noEor
doEor:    eor #$1d
noEor:  sta seed
The code can be smaller if a 1-255 output range is fine. There are wider PRNGs and other variants there as well.
Post Reply