beginners' 6502 articles in the works
Re: beginners' 6502 articles in the works
Garth - good work! You've pulled together lots of useful experience and references there.
Dajgoro - Jeff Tranter wrote a couple of articles about cc65 bringup on his replica1 recently which might help you.
Cheers
Ed
Dajgoro - Jeff Tranter wrote a couple of articles about cc65 bringup on his replica1 recently which might help you.
Cheers
Ed
Re: beginners' 6502 articles in the works
Very good article indeed.
In the address decoding page, you could probably add a timing diagram with phi2, address lines and
how the setup times etc add up (what you now explain in words).
Is it not normally the capital Phi letter? You're using the lower case phi letter, which looks
strange to me. In fact in your diagram it indeed is the capital phi.
anecdotal evidence: that the VIA needs CS before Phi2 is the reason it does not work out of the
box on the C64, where the address bus is shared with the video chip (using phi1). So you had to
delay the rising edge of phi2 a bit.
On the memory map page you start using 6502 opcodes, but knowing them is not a prerequisite.
Ok, maybe be implicit because why build a 6502 computer without knowing it...
Maybe a kind of side box explaining say that :'"STA" means "STore Accumulator", storing the
general purpose accumulator register to a memory address given by the addressing mode', or
what "LDX" and "TSX" mean. Would introduce some of the basics in a simple way, for those
that just "walk by"
On 74xx timing, for example a Philipps 74ALS138 has 22ns max prop. delay - twice as fast as 'LS.
On the mistery pins: the /SO pin was used in the commodore floppies (VC1541 and relatives, not
the older PET drives though) to check if a byte was ready to be read from the input shift registers,
resp. when it was ready to put another byte on the output shift register. Here is an excerpt from
the VC1541 ROM. Note the BVC at $F4D4
; read sector
F4D1 20 0A F5 JSR $F50A
F4D4 50 FE BVC $F4D4
F4D6 B8 CLV
F4D7 AD 01 1C LDA $1C01
F4DA 91 30 STA ($30),Y
F4DC C8 INY
F4DD D0 F5 BNE $F4D4
On the wirewrap page you may want to (and are hereby allowed to
show the picture I
give on this page: http://www.6502.org/users/andre/csa/vdc/index.html with a comparison
of the very first version of my video card (as not to do it) and how it compares to
today's custom-made board. It DID work though!
In the I/O ICs you could mention that it's pretty easy to even add intel-like I/O ICs like
the 16550 UART by creating /RD and /WR from Phi2 and R/-W. Also Intel-compatible Ethernet
chips have been connected directly to the 6502 bus, as well as USB ICs, for example here
http://www.6502.org/users/andre/csa/usb/index.html (shameless self-plug
And maybe a warning that the 6551 control lines are internally connected with internal state, which you might
not want, so better look at the datasheet.
For the displays, even if you would not recommend it anymore, you could mention that even the
first PCs used 6845 (compatible with 6545) based video cards and those were used in the PET
(and the Apple??) for example.
Great read! Thanks for sharing!
In the address decoding page, you could probably add a timing diagram with phi2, address lines and
how the setup times etc add up (what you now explain in words).
Is it not normally the capital Phi letter? You're using the lower case phi letter, which looks
strange to me. In fact in your diagram it indeed is the capital phi.
anecdotal evidence: that the VIA needs CS before Phi2 is the reason it does not work out of the
box on the C64, where the address bus is shared with the video chip (using phi1). So you had to
delay the rising edge of phi2 a bit.
On the memory map page you start using 6502 opcodes, but knowing them is not a prerequisite.
Ok, maybe be implicit because why build a 6502 computer without knowing it...
Maybe a kind of side box explaining say that :'"STA" means "STore Accumulator", storing the
general purpose accumulator register to a memory address given by the addressing mode', or
what "LDX" and "TSX" mean. Would introduce some of the basics in a simple way, for those
that just "walk by"
On 74xx timing, for example a Philipps 74ALS138 has 22ns max prop. delay - twice as fast as 'LS.
On the mistery pins: the /SO pin was used in the commodore floppies (VC1541 and relatives, not
the older PET drives though) to check if a byte was ready to be read from the input shift registers,
resp. when it was ready to put another byte on the output shift register. Here is an excerpt from
the VC1541 ROM. Note the BVC at $F4D4
; read sector
F4D1 20 0A F5 JSR $F50A
F4D4 50 FE BVC $F4D4
F4D6 B8 CLV
F4D7 AD 01 1C LDA $1C01
F4DA 91 30 STA ($30),Y
F4DC C8 INY
F4DD D0 F5 BNE $F4D4
On the wirewrap page you may want to (and are hereby allowed to
give on this page: http://www.6502.org/users/andre/csa/vdc/index.html with a comparison
of the very first version of my video card (as not to do it) and how it compares to
today's custom-made board. It DID work though!
In the I/O ICs you could mention that it's pretty easy to even add intel-like I/O ICs like
the 16550 UART by creating /RD and /WR from Phi2 and R/-W. Also Intel-compatible Ethernet
chips have been connected directly to the 6502 bus, as well as USB ICs, for example here
http://www.6502.org/users/andre/csa/usb/index.html (shameless self-plug
And maybe a warning that the 6551 control lines are internally connected with internal state, which you might
not want, so better look at the datasheet.
For the displays, even if you would not recommend it anymore, you could mention that even the
first PCs used 6845 (compatible with 6545) based video cards and those were used in the PET
(and the Apple??) for example.
Great read! Thanks for sharing!
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content: http://6502.org/users/andre/
Re: beginners' 6502 articles in the works
BigEd wrote:
Dajgoro - Jeff Tranter wrote a couple of articles about cc65 bringup on his replica1 recently which might help you.Ed
Re: beginners' 6502 articles in the works
I was hoping his patch to fixup for Replica1 would shed some light on that. But I didn't investigate.
Re: beginners' 6502 articles in the works
It does, but a tutorial would be still appreciated...
Re: beginners' 6502 articles in the works
Did you check the docs? There's a chapter on customising for a new target.
Edit: I've only used the assembler, in target=none mode.
Edit: I've only used the assembler, in target=none mode.
Re: beginners' 6502 articles in the works
Thanks, that is helpful, i looked for that lots of times, but i was unable to find it...
But anyway there could be some mention of this in this beginners tutorials...
But anyway there could be some mention of this in this beginners tutorials...
Re: beginners' 6502 articles in the works
Chris Ward also re-targeted CC65 for his system. His code can be found here:
http://www.chrisward.org.uk/6502/files/cc65-lib.zip
There are batch files that control the build process using the Windows (DOS) version of CC65.
Daryl
http://www.chrisward.org.uk/6502/files/cc65-lib.zip
There are batch files that control the build process using the Windows (DOS) version of CC65.
Daryl
- GARTHWILSON
- Forum Moderator
- Posts: 8774
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: beginners' 6502 articles in the works
fachat wrote:
Very good article indeed.
In the address decoding page, you could probably add a timing diagram with phi2, address lines and
how the setup times etc add up (what you now explain in words).
In the address decoding page, you could probably add a timing diagram with phi2, address lines and
how the setup times etc add up (what you now explain in words).
Quote:
Is it not normally the capital Phi letter? You're using the lower case phi letter, which looks
strange to me. In fact in your diagram it indeed is the capital phi.
strange to me. In fact in your diagram it indeed is the capital phi.
Quote:
anecdotal evidence: that the VIA needs CS before Phi2 is the reason it does not work out of the
box on the C64, where the address bus is shared with the video chip (using phi1). So you had to
delay the rising edge of phi2 a bit.
box on the C64, where the address bus is shared with the video chip (using phi1). So you had to
delay the rising edge of phi2 a bit.
Quote:
On the memory map page you start using 6502 opcodes, but knowing them is not a prerequisite.
Ok, maybe be implicit because why build a 6502 computer without knowing it...
Maybe a kind of side box explaining say that :'"STA" means "STore Accumulator", storing the
general purpose accumulator register to a memory address given by the addressing mode', or
what "LDX" and "TSX" mean. Would introduce some of the basics in a simple way, for those
that just "walk by"
Ok, maybe be implicit because why build a 6502 computer without knowing it...
Maybe a kind of side box explaining say that :'"STA" means "STore Accumulator", storing the
general purpose accumulator register to a memory address given by the addressing mode', or
what "LDX" and "TSX" mean. Would introduce some of the basics in a simple way, for those
that just "walk by"
Quote:
On 74xx timing, for example a Philipps 74ALS138 has 22ns max prop. delay - twice as fast as 'LS.
Quote:
On the mistery pins: the /SO pin was used in the commodore floppies [...]
Quote:
On the wirewrap page you may want to (and are hereby allowed to
show the picture I
give on this page: http://www.6502.org/users/andre/csa/vdc/index.html with a comparison
of the very first version of my video card (as not to do it) and how it compares to
today's custom-made board. It DID work though!
give on this page: http://www.6502.org/users/andre/csa/vdc/index.html with a comparison
of the very first version of my video card (as not to do it) and how it compares to
today's custom-made board. It DID work though!
Quote:
In the I/O ICs you could mention that it's pretty easy to even add intel-like I/O ICs like
the 16550 UART by creating /RD and /WR from Phi2 and R/-W.
the 16550 UART by creating /RD and /WR from Phi2 and R/-W.
Quote:
Also Intel-compatible Ethernet
chips have been connected directly to the 6502 bus, as well as USB ICs, for example here
http://www.6502.org/users/andre/csa/usb/index.html (shameless self-plug
chips have been connected directly to the 6502 bus, as well as USB ICs, for example here
http://www.6502.org/users/andre/csa/usb/index.html (shameless self-plug
Quote:
And maybe a warning that the 6551 control lines are internally connected with internal state, which you might
not want, so better look at the datasheet.
not want, so better look at the datasheet.
Quote:
For the displays, even if you would not recommend it anymore, you could mention that even the
first PCs used 6845 (compatible with 6545) based video cards and those were used in the PET
(and the Apple??) for example.
first PCs used 6845 (compatible with 6545) based video cards and those were used in the PET
(and the Apple??) for example.
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
Re: beginners' 6502 articles in the works
Hi Garth - two small comments: your home page doesn't yet link to your new work, and the head post of this thread doesn't either. Worth updating?
Cheers
Ed
Cheers
Ed
- GARTHWILSON
- Forum Moderator
- Posts: 8774
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: beginners' 6502 articles in the works
Near the bottom of my home page it says,
New (4/27/12): 6502 PRIMER: Building your own 6502 computer
I'll go put the link in the head post of the topic now.
New (4/27/12): 6502 PRIMER: Building your own 6502 computer
I'll go put the link in the head post of the topic now.
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
Re: beginners' 6502 articles in the works
Oh, I see, yes. I had noticed it was on your Links page (which is also splendid) - but from the appearance of the top row on the Primer index page, I'd assumed you'd intended that top row always to be a three-part list. In other words, that the Primer was a first-class feature together with the Links. My mistake.
Cheers
Ed
Cheers
Ed
- BigDumbDinosaur
- Posts: 9428
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: beginners' 6502 articles in the works
fachat wrote:
Is it not normally the capital Phi letter? You're using the lower case phi letter, which looks
strange to me. In fact in your diagram it indeed is the capital phi.
strange to me. In fact in your diagram it indeed is the capital phi.
BTW, I've taken a quick look at Garth's stuff. Lots of excellent stuff to help the 6502 beginner realize success with his/her first project. Good job, Garth!
Last edited by BigDumbDinosaur on Sun Apr 29, 2012 5:55 pm, edited 1 time in total.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: beginners' 6502 articles in the works
Capital Phi should be Φ in your HTML. Maybe this letter: Φ
See this test page - each browser will show it differently. Don't try to specify font information in HTML, that's a bad idea.
Cheers
Ed
Edit: I see BDD is using 'LATIN CAPITAL LETTER O WITH STROKE' (Ø - test page)
Edit: maybe Φ and Ø respectively will be widely supported.
See this test page - each browser will show it differently. Don't try to specify font information in HTML, that's a bad idea.
Cheers
Ed
Edit: I see BDD is using 'LATIN CAPITAL LETTER O WITH STROKE' (Ø - test page)
Edit: maybe Φ and Ø respectively will be widely supported.
Last edited by BigEd on Sun Apr 29, 2012 6:07 pm, edited 2 times in total.
- BigDumbDinosaur
- Posts: 9428
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: beginners' 6502 articles in the works
GARTHWILSON wrote:
Near the bottom of my home page it says,
New (4/27/12): 6502 PRIMER: Building your own 6502 computer
I'll go put the link in the head post of the topic now.
New (4/27/12): 6502 PRIMER: Building your own 6502 computer
I'll go put the link in the head post of the topic now.
In a website that I am building about my SBC endeavors, I present a similar rationale, as follows:
- Why the W65C816S processor? Aren't 65xx processors obsolete?
Good questions! I chose the W65C816S for several reasons:
- Familiarity. I have been writing assembly language programs for the 65xx family almost since its inception. Needless to say, I have a large body of accumulated knowledge that can be easily transferred to the '816. Why start from scratch with a different processor and incur a huge learning curve?
Performance. The '816 can get a lot done as measured in wall clock time. Typically, an '816 running at 20 MHz can execute between 3 million and 10 million instructions per second (MIPS). That's very good for a design that was conceived in the early 1980s, in fact, better than most of its contemporaries. Also, interrupt latency is very low, much lower than comparable designs, such as the Motorola 68000 family. In fact, using the proper programming techniques, interrupt latency can be as low as two machine cycles.
Adaptability. The '816 uses the same basic bus architecture as the rest of the 65xx family, which makes it "hobby-friendly" and thus highly adaptable to a variety of devices. The '816 also includes some hardware management signals that are not present on the eight bit family members. These signals can ease the complication of adapting non-65xx family peripheral silicon, as well as improve overall system stability.
Scalability. As it has a fully static CMOS core, the performance of the '816 is in direct proportion to the phase-two (Ø2) clock rate. In fact, Ø2 can be halted in either phase and the '816 will indefinitely maintain its state.
Reentrancy. The '816 has some special hardware stack instructions, such as LDA (1,S),Y, that facilitate the creation of fully reentrant subroutines, as well as simplified parameter passing via the stack.
Cost. The '816 can be readily obtained from sources such as Jameco and Mouser for less than ten US dollars. Other parts, such as I/O chips and glue logic, are also inexpensive and readily available.
As for the question of obsolescence, both the W65C02S and W65C816S are in current production and are found in numerous products, often as part of a microcontroller or other custom device. You are probably using the 'C02 or '816 every day without knowing it, as these processors are at the core of many consumer products (my microwave oven has a 65C02 in its controller). The 65xx family is even found in some medical devices, such as implantable defibrillators.
So the Why? is Why not? and no, the 65xx family isn't at all obsolete. - Familiarity. I have been writing assembly language programs for the 65xx family almost since its inception. Needless to say, I have a large body of accumulated knowledge that can be easily transferred to the '816. Why start from scratch with a different processor and incur a huge learning curve?
x86? We ain't got no x86. We don't NEED no stinking x86!