Page 1 of 1
New to 6502-Got a book, but what next?
Posted: Tue Apr 15, 2025 5:14 pm
by djsb
Hello,
I'm new to the 6502 and have just bought a used copy of '6502 assembly language programming (2nd Ed)- Lance A Leventhal'.
I have some experience with PIC microcontrollers (assembly and CCS C compiler) so I understand some of the basics. I'd like to use SDCC C compiler and Oshonsoft 6502 BASIC compiler and simulator IDE as well.
I'm wondering if it's best to learn about the 6502 using an emulator (SYMON maybe)to start with? As a hardware tech I'm eager to start using a real system, but I want to start with the simplest one I can find/build first. I've had a quick look at the Neo6502 and can see it being useful, but it kind of muddies the water with the PI PICO RP2040 being used as an emulator for the peripherals needed by the 6502.
Can anyone recommend a kit I can build on a PCB or a breadboard or stripboard? I can design my own PCB in KiCad if necessary. Thanks.
Re: New to 6502-Got a book, but what next?
Posted: Tue Apr 15, 2025 5:43 pm
by BigEd
Welcome! I'd recommend the easy6502 tutorial (has an emulator built in, all in a web page) as a first step. You will outgrow it, but you will learn a lot. And I'd recommend Grant Searle's "Simple 6502 - my own design". Both are easy to find with a web search.
Re: New to 6502-Got a book, but what next?
Posted: Tue Apr 15, 2025 6:16 pm
by djsb
Thanks. Will the Searle design work with the 65C02? Are the 6850/68B50 ACIA chips still available? Same with the ROM and RAM chips?
Re: New to 6502-Got a book, but what next?
Posted: Tue Apr 15, 2025 6:36 pm
by enso1
For me, using assembly with a 6502 is where the fun is! It is simple enough that you can remember most instructions...
Re: New to 6502-Got a book, but what next?
Posted: Tue Apr 15, 2025 6:40 pm
by GARTHWILSON
Thanks. Will the Searle design work with the 65C02?
Without looking at it in detail again, I'm not aware of any reason it would not. I'm glad you're mentioning the 65c02 though, as it will give you quite a few advantages, both hardware and software. Be sure to go through the 6502 Primer which was written years ago to address the things that kept coming up on the forum (and keeps getting updated). It's mostly about hardware, but has a few pages about software as well. The simple 6502 computer diagrammed at the end is actually simpler than Grant Searl's, and yet more capable. FWIW, I'm not fond of the 6850, especially as it doesn't even have its own baud-rate generator. Regardless, you'll find plenty of support here. Welcome.
Re: New to 6502-Got a book, but what next?
Posted: Tue Apr 15, 2025 7:22 pm
by plasmo
The first question for newcomers is whether you have a PROM programmer? If yes, you have lots of options; if no and don’t plan to buy one, you maybe limited to PIC/arduino/pi-assisted approaches. If you are familiar with CPLD and have programmer for CPLD, you have different set of options; finally there are zero programmer designs, but probably more complicated than new 6502 users can handle.
Bill
PS, welcome!
Re: New to 6502-Got a book, but what next?
Posted: Tue Apr 15, 2025 8:04 pm
by djsb
I've got an XGecu T48(TL866-3G) programmer. So I should be OK. I also hang out on EEVBLOG now and then (same user name).
Re: New to 6502-Got a book, but what next?
Posted: Tue Apr 15, 2025 9:24 pm
by BigDumbDinosaur
I'm new to the 6502 and have just bought a used copy of '6502 assembly language programming (2nd Ed)- Lance A Leventhal'.
Welcome to 6502 land.
Dr. Leventhal’s tome has long been a standard (though dated) reference work on the 6502 family ( I “wore out” the copy I bought in 1978). His books are geared more toward those who already have some assembly language familiarity and are interested in a specific MPU. You should expect that some of what is in his work makes assumptions about what you know.
Another Leventhal publication that may be useful to you is “6502 Assembly Language Subroutines,” which presents a lot of practical algorithms for such things as string handling, binary and decimal arithmetic, I/O routines, etc.. As with “6502 Assembly Language Programming,” the subroutines book is dated and makes assumptions about prior knowledge. It also doesn’t present anything on taking advantage of the 65C02’s improved instruction set.
A book that we recommend you obtain is the Eyes & Lichty 6502 programming manual, which is an official WDC publication. Unlike the Leventhal books, Eyes & Lichty assumes little about the reader’s prior knowledge of assembly language principles, and extensively covers the three major permutations of the 6502 family (NMOS, CMOS and the 65C816).
I have some experience with PIC microcontrollers (assembly and CCS C compiler) so I understand some of the basics. I'd like to use SDCC C compiler and Oshonsoft 6502 BASIC compiler and simulator IDE as well.
If you are going to really get down-and-dirty with the 65C02, you need to find yourself a good macro-assembler and get fluent in the 6502 dialect. Your assembler choices will, of course, depend on the operating system running your workstation. I use the Kowalski editor/assembler/simulator, which runs on MS Windows. I have no love for Billy-ware, but the Kowalski package has been extensively updated by Daryl Rictor (forum member 8Bit) to a point that I recommend it as a first choice (I wrote the entire firmware—14,000+ lines of code—for my 65C816-powered POC computer with the Kowalski package). Among other things, it can do cycle-correct simulation of the 6502 family (including the 65C816), complete with a basic I/O console, and support syntactically-compliant assembly language.
I'm wondering if it's best to learn about the 6502 using an emulator (SYMON maybe)to start with?
Working with a simulator such as SYMON (which is not an emulator) would make it easier for you to get comfortable with the 6502 assembly language. You can focus on the language and not get bogged down with hardware matters. That said, my opinion is the simulation in the aforementioned Kowalski package is better than that of SYMON—pick yer poison!
As a hardware tech I'm eager to start using a real system, but I want to start with the simplest one I can find/build first. I've had a quick look at the Neo6502 and can see it being useful, but it kind of muddies the water with the PI PICO RP2040 being used as an emulator for the peripherals needed by the 6502.
I recommend you look at Garth’s 6502 primer pages, especially the schematic he presents. It’s a fairly basic design, but capable of doing more than just converting electricity into heat. The Searle design is okay, but I don’t recommend the 6850—no bit rate generator, as Garth notes.
However, if you aren’t up to speed on 6502 assembly language, scratch-building something is going to be quite the challenge, since you will have to write firmware to make it work, and until you have firmware, you don’t know for sure the hardware design is correct. Debugging software on an already-functional system is one thing. Trying to debug on a new hardware design running new firmware can be overwhelming for a first-timer. At least if you use Garth’s circuit you will have a reasonable assurance that it will function if properly built.
I suggest you first focus on learning the 6502 assembly language, after which you can set your sights on building some hardware.
Re: New to 6502-Got a book, but what next?
Posted: Wed Apr 16, 2025 3:51 am
by barnacle
A couple of thoughts:
- the Symon emulator works very well; it's recently been updated to fix a couple of bugs and to provide a 'step over' functionality to continue past a jsr without having to set a breakpoint. Recommended.
- Grant's design works well with the wdc65c02 _but_ you need to pull the BE pin high or nothing will happen! That's a specific to the WDC part. The 68b50 is a very easy part to drive.
- I have designs for PCBs for a handful of variants of Grant's design; if you want I can point to them.
- my workflow _was_ assemble to hex, dump to my homebrew programmer, program an eeprom, rinse and repeat... but with a minor change to the serial part address the Symon works very well and saves a lot of time!
Neil
Re: New to 6502-Got a book, but what next?
Posted: Wed Apr 16, 2025 5:05 am
by djsb
Thanks everyone. Some good advice and links. I'll concentrate on learning some of the assembly code first. Thanks.