Page 3 of 3
Re: Half Way Through Jim Butterfield's Book, What Next?
Posted: Tue Nov 27, 2018 8:51 pm
by barrym95838
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.

Re: Half Way Through Jim Butterfield's Book, What Next?
Posted: Tue Nov 27, 2018 9:14 pm
by BillO
I'll bet you're one of those guys who used to walk to school in the snow back in the day.

Didn't we all. Up hill both ways too.
Re: Half Way Through Jim Butterfield's Book, What Next?
Posted: Tue Nov 27, 2018 9:32 pm
by BigDumbDinosaur
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.

Re: Half Way Through Jim Butterfield's Book, What Next?
Posted: Tue Nov 27, 2018 10:18 pm
by whartung
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.

Back in BDDs day, he only has 0's to work with, they hadn't invented the 1's yet.
Re: Half Way Through Jim Butterfield's Book, What Next?
Posted: Wed Nov 28, 2018 12:54 am
by barrym95838
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.
Re: Half Way Through Jim Butterfield's Book, What Next?
Posted: Wed Nov 28, 2018 2:54 am
by BigDumbDinosaur
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.

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.
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.
Re: Half Way Through Jim Butterfield's Book, What Next?
Posted: Wed Nov 28, 2018 2:00 pm
by BillO
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.
Re: Half Way Through Jim Butterfield's Book, What Next?
Posted: Wed Nov 28, 2018 2:52 pm
by cbmeeks
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.

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.
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
Re: Half Way Through Jim Butterfield's Book, What Next?
Posted: Wed Nov 28, 2018 9:29 pm
by JimBoyd
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?
Re: Half Way Through Jim Butterfield's Book, What Next?
Posted: Thu Nov 29, 2018 2:32 am
by barrym95838
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.

Re: Half Way Through Jim Butterfield's Book, What Next?
Posted: Sun Dec 02, 2018 11:12 pm
by JimBoyd
Yep. This is definitely a contact sport.

Does that mean I'm an athlete?

Re: Half Way Through Jim Butterfield's Book, What Next?
Posted: Mon Dec 03, 2018 9:48 am
by BitWise
Yep. This is definitely a contact sport.

Does that mean I'm an athlete?

No but you may occasionally get athletes foot.
Re: Half Way Through Jim Butterfield's Book, What Next?
Posted: Sun Jun 09, 2019 1:21 am
by JimBoyd
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:
Re: Half Way Through Jim Butterfield's Book, What Next?
Posted: Thu Jun 13, 2019 10:02 pm
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.
.
.
.
Re: Half Way Through Jim Butterfield's Book, What Next?
Posted: Mon Jul 01, 2019 5:54 am
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.