Retrocomputing with the 6502

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: Retrocomputing with the 6502

Post by sje »

Isn't it the case that most dedicated unit companies that once used Z80 CPUs eventually switched over to the 6502 and its relatives? I vaguely recall a quote from one of the Spracklens mentioning that they thought the 6502 was much better than the Z80 for chess programming. Perhaps another reason is that at the time a Z80 was selling for US$150, a 6502 could be had for about a fifth of the price.

In the Old Days I spent too much time on 8080/Z80 machinery and if I only knew then what I know now, it would have been a different story.

--------

I spent some time recently looking at freeware 6502 assemblers on the net. There are plenty of them, but none that work the way I'd like to see (e.g., portable source, correct operation, high capacity, ease of use, macros, and scoping). So I'm going to write my own. Hopefully I'll have it done before my MicroKIM shows up on my doorstep.

One idea to try is to connect some of the MicroKIM expansion header programmable output signals to my four channel 100 MHz oscilloscope. I could use the "ProcessNode" routine entry to toggle the scope's external trigger and have the scope's probes hooked up to entry/exit toggled output signals connected to various other routines. Another idea is to output the high order bits of A/B to a pair of D/A converters and view its waveform. A similar trick looking at a free running X/Y graph of the upper vs lower bits of the program counter may be worth trying.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

6502 opcodes

Post by sje »

I've started my little 6502 assembler project and I've had the program produce a 6502 opcode decoding list as a test. The easily program readable list is available at:

http://homepage.mac.com/chessnotation/6502decode

The assembler will include a disassembly service, and I'm thinking of using it on the PROM contents from a few 6502 based dedicated chess machines. I guess that's okay as I don't recall signing a "no reverse engineering" End User License Agreement when I purchased any Fidelity, Novag, or Saitek machine.

Here's a snippet from my program's disassember output from scanning part of the KIM-1's ROMs:

Code: Select all

1800 a9ad   lda #$ad
1802 8eec17 stx $17ec
1805 203219 jsr $1932
1808 a927   lda #$27
180a 8d4217 sta $1742
180d a9bf   lda #$bf
180f 8d4317 sta $1743
1812 a264   ldx #$64
1814 a916   lda #$16
1816 207a19 jsr $197a
1819 ca     dex
181a d0f8   bne $1814
181c a92a   lda #$2a
181e 207a19 jsr $197a
1821 adf917 lda $17f9
1824 206119 jsr $1961
1827 adf517 lda $17f5
182a 205e19 jsr $195e