Difference between revisions of "LB-6802-01"
Jump to navigation
Jump to search
Blwikiadmin (talk | contribs) |
Blwikiadmin (talk | contribs) |
||
Line 94: | Line 94: | ||
* [https://archive.org/details/How_to_Program_and_Interface_the_6800_By_Andrew_C_Staugaard_1980/page/260/mode/2up How to Program and Interface the 6800 By Andrew C. Staugaard, Jr. 1980] | * [https://archive.org/details/How_to_Program_and_Interface_the_6800_By_Andrew_C_Staugaard_1980/page/260/mode/2up How to Program and Interface the 6800 By Andrew C. Staugaard, Jr. 1980] | ||
* [http://www.8bit-era.cz/6800.html#addr8-desc 6800 instruction set] | * [http://www.8bit-era.cz/6800.html#addr8-desc 6800 instruction set] | ||
+ | |||
+ | * [http://www.retrotechnology.com/restore/smithbug.html SMITHBUG] is a debugger similar to MIKBUG | ||
+ | ** Examine/Edit memory | ||
+ | ** Disassembly code | ||
+ | ** Download S record (V2) | ||
+ | ** Run code | ||
+ | * FIG-Forth - Forth language | ||
+ | * Combined SMITHBUG and FIG-Forth build | ||
+ | |||
+ | === SmithBUG Builds for SIMPLE-MC6802 CPU Card === | ||
+ | |||
+ | * Pre-built software | ||
+ | ** [https://github.com/land-boards/lb-boards/tree/master/RetroCPUs/SIMPLE-6802/SOFTWARE/SMITHBUG/SMITHBUG_4K SMITHBUG 4KB build] | ||
+ | ** [https://github.com/land-boards/lb-boards/tree/master/RetroCPUs/SIMPLE-6802/SOFTWARE/SMITHBUG/SMITHBUG_8K SMITHBUG 8KB build] | ||
+ | ** [https://github.com/land-boards/lb-boards/tree/master/RetroCPUs/SIMPLE-6802/SOFTWARE/SMITHBUG SMITHBUG 16KB build] | ||
+ | |||
+ | ==== Building Code ==== | ||
+ | |||
+ | * Uses a68 assembler | ||
+ | ** Command line makes S-Record output | ||
+ | * Use srec_cat to shift from EPROM absolute addresses to 0x0000 as HEX file | ||
+ | |||
+ | ==== 4KB Build ==== | ||
+ | |||
+ | <pre> | ||
+ | A68 SMITHBUG_SIMPLE-6802_F000.ASM -l SMITHBUG_SIMPLE-6802_F000.LST -s SMITHBUG_SIMPLE-6802_F000.S | ||
+ | srec_cat SMITHBUG_SIMPLE-6802_F000.s -offset - -minimum-addr SMITHBUG_SIMPLE-6802_F000.s -o smithbug_F000.hex -Intel | ||
+ | </pre> | ||
+ | |||
+ | ==== 8KB Build ==== | ||
+ | |||
+ | <pre> | ||
+ | A68 SMITHBUG_SIMPLE-6802_E000.ASM -l SMITHBUG_SIMPLE-6802_E000.LST -s SMITHBUG_SIMPLE-6802_E000.S | ||
+ | srec_cat SMITHBUG_SIMPLE-6802_E000.s -offset - -minimum-addr SMITHBUG_SIMPLE-6802_E000.s -o smithbug_E000.hex -Intel | ||
+ | </pre> | ||
+ | |||
+ | ==== 16KB Build ==== | ||
+ | |||
+ | * Used with 27SF256 parts | ||
+ | ** 2nd half of EPROM unused | ||
+ | |||
+ | <pre> | ||
+ | A68 SMITHBUG_SIMPLE-6802_C000.ASM -l SMITHBUG_SIMPLE-6802_C000.LST -s SMITHBUG_SIMPLE-6802_C000.S | ||
+ | srec_cat SMITHBUG_SIMPLE-6802_C000.s -offset - -minimum-addr SMITHBUG_SIMPLE-6802_C000.s -o smithbug_C000.hex -Intel | ||
+ | </pre> | ||
+ | |||
+ | ==== SmithBUG Commands ==== | ||
+ | |||
+ | <pre> | ||
+ | ; V VIEW MEMORY | ||
+ | ; E CHANGE MEMORY | ||
+ | ; I FILL MEMORY | ||
+ | ; M MOVE MEMORY | ||
+ | ; D DISASSEMBLE CODE | ||
+ | ; G GO TO PROGRAM | ||
+ | ; R PRINT | ||
+ | ; @ ASCII CONVERSION | ||
+ | ; H PRINTER ON | ||
+ | ; J JUMP TO TARGET PROGRAM | ||
+ | ; F FIND | ||
+ | ; Q HARDWARE LOCATION | ||
+ | ; T TRACE PROGRAM | ||
+ | ; 1 BREAKPOINT ONE | ||
+ | ; 2 BREAKPOINT TWO | ||
+ | ; K CONTINUE AFTER BREAK | ||
+ | ; & S1 LOAD PROGRAM | ||
+ | ; * HARDWARE LOCATION (TBA) | ||
+ | ; O ECHO ON | ||
+ | ; N ECHO OFF | ||
+ | </pre> | ||
+ | |||
+ | === FIGFORTH in RAM === | ||
+ | |||
+ | * [https://www.corshamtech.com/tech-tips/fig-forth-for-6800/ Corsham Tech FIG-Forth 68 page] | ||
+ | * [https://github.com/douggilliland/Retro-Computers/tree/master/6800/fig-FORTH/figForth_SmithBUG FIGFORTH GitHub] | ||
+ | ** Enter command to srecord loader | ||
+ | <pre> | ||
+ | & | ||
+ | </pre> | ||
+ | * Using TermTerm, File, Send File | ||
+ | * Send [https://github.com/douggilliland/Retro-Computers/blob/master/6800/fig-FORTH/figForth_SmithBUG/fig-FORTH_6800.s19 fig-FORTH_6800.s19] | ||
+ | * Type S9 to exit srecord loader | ||
+ | * Type J 1000 to jump to address 0x1000 | ||
+ | * Responds with | ||
+ | |||
+ | <pre> | ||
+ | Forth-68 | ||
+ | 1 1 + . 2 OK | ||
+ | </pre> | ||
+ | |||
+ | * [https://github.com/douggilliland/Retro-Computers/tree/master/6800/fig-FORTH#readme FIG-Forth-68 Commands] | ||
+ | ** Type VLIST to get list og built-ins | ||
+ | |||
+ | <pre> | ||
+ | TASK FORTH NOOP VLIST TRIAD INDEX LIST ? . D. D.R .R #S # SIGN #> <# | ||
+ | SPACES WHILE ELSE IF REPEAT AGAIN END UNTIL +LOOP LOOP DO THEN ENDIF BEGIN | ||
+ | BACK FORGET ' R/W HI LO BLOCK_READ BLOCK_WRITE ?DISC --> LOAD MESSAGE .LINE | ||
+ | (LINE) BLOCK BUFFER DR1 DR0 EMPTY-BUFFERS UPDATE +BUF PREV USE DABS ABS M/MOD | ||
+ | */ */MOD MOD / /MOD * S->D COLD ABORT QUIT ( DEFINITIONS VOCABULARY IMMEDIATE | ||
+ | INTERPRET DLITERAL LITERAL [COMPILE] CREATE ID. ERROR (ABORT) -FIND NUMBER (NUMBER) | ||
+ | WORD PAD HOLD BLANKS ERASE FILL QUERY EXPECT ?STACK ." (.") -TRAILING TYPE | ||
+ | COUNT DOES> <BUILDS ;CODE (:CODE) DECIMAL HEX SMUDGE ] [ COMPILE ?LOADING ?CSP | ||
+ | ?PAIRS ?EXEC ?COMP ?ERROR !CSP PFA NFA CFA LFA LATEST TRAVERSE -DUP MAX MIN | ||
+ | SPACE ROT > < = - C, , ALLOT HERE 2+ 1+ COLUMNS HLD R# CSP FLD DPL | ||
+ | BASE STATE CURRENT CONTEXT OFFSET SCR OUT IN BLK VOC-LINK DP FENCE WARNING | ||
+ | WIDTH TIB R0 S0 +ORIGIN B/SCR B/BUF LIMIT FIRST BL 3 2 1 0 USER VARIABLE | ||
+ | CONSTANT ; : C! ! C@ @ TOGGLE +! DUP SWAP DROP OVER DMINUS MINUS D+ + | ||
+ | 0< 0= R R> >R LEAVE ;S RP! SP! SP@ XOR OR AND U/ U* CMOVE CR ?TERMINAL | ||
+ | KEY EMIT ENCLOSE (FIND) DIGIT I (DO) (+LOOP) (LOOP) 0BRANCH BRANCH EXECUTE LIT OK | ||
+ | </pre> | ||
+ | |||
+ | === SMITHBUG and FIGFORTH in ROM === | ||
+ | |||
+ | * Combines SMITHBUG and FIGFORTH in ROM | ||
+ | ** [https://github.com/land-boards/lb-boards/blob/master/RetroCPUs/SIMPLE-6802/SOFTWARE/SMITHBUG_FORTH/SMITHBUG_FORTH_SIMPLE-FC.hex Hex file] | ||
+ | * [https://github.com/land-boards/lb-boards/blob/master/RetroCPUs/SIMPLE-6802/SOFTWARE/SMITHBUG_FORTH/SMITHBUG_FORTH_SIMPLE-6802_C000.ASM Combined Source code] | ||
+ | ** SMITHBUG in ROM from 0xC000-0xCFFF | ||
+ | ** FIGFORTH in ROM from 0xD000-0xEFFF | ||
+ | ** Vectors are at top of ROM from 0xFFF8-0xFFFF | ||
+ | * Fixes in FIG-Forth to get it to run from ROM | ||
+ | ** The comments in the file indicated it could be run from ROM but the stack pointed to ORIG which is in ROM | ||
+ | ** Fixed addresses of stack and I/O pointer to get it to work from ROM | ||
+ | * [https://github.com/land-boards/lb-boards/tree/master/RetroCPUs/SIMPLE-6802/SOFTWARE/SMITHBUG_FORTH SMITHBUG and FIGFORTH in ROM GitHub] | ||
+ | * Assemble | ||
+ | <PRE> | ||
+ | A68 SMITHBUG_FORTH_SIMPLE-6802_C000.ASM -l SMITHBUG_FORTH_SIMPLE-6802_C000.LST -s SMITHBUG_FORTH_SIMPLE-6802_C000.S | ||
+ | 6800/6801 Cross-Assembler (Portable) Ver 3.5! | ||
+ | Copyright (c) 1985 William C. Colley, III | ||
+ | fixes for LCC/Windows and improvement by HRJ Aug 26 2019 | ||
+ | A68 source_file | -l list_file | | -o/-s object_file | | ||
+ | |||
+ | No Errors | ||
+ | </PRE> | ||
+ | |||
+ | * Edit out RAM at top | ||
+ | * Make hex file | ||
+ | |||
+ | <PRE> | ||
+ | srec_cat SMITHBUG_FORTH_SIMPLE-6802_C000.s -offset - -minimum-addr SMITHBUG_FORTH_SIMPLE-6802_C000.s -o SMITHBUG_FORTH_SIMPLE-FC.hex -Intel | ||
+ | srec_cat: SMITHBUG_FORTH_SIMPLE-6802_C000.s: 1: warning: no header record | ||
+ | srec_cat: SMITHBUG_FORTH_SIMPLE-6802_C000.s: 1: warning: no header record | ||
+ | </PRE> | ||
+ | |||
+ | * Boots to SMITHBUG | ||
+ | * Type J D000 to run Fig-Forth '''or''' | ||
+ | * Type 4 to run Forth | ||
+ | |||
+ | === TinyBASIC === | ||
+ | |||
+ | * [https://github.com/land-boards/lb-boards/tree/master/RetroCPUs/SIMPLE-6802/SOFTWARE/TinyBASIC TinyBASIC GitHub] | ||
+ | * [https://github.com/douggilliland/Retro-Computers/blob/master/6800/TinyBASIC/Pittman-TinyBASIC/README.mediawiki TINY BASIC User Manual] | ||
+ | ** [https://github.com/douggilliland/Retro-Computers/blob/master/6800/TinyBASIC/Pittman-TinyBASIC/TINY%20BASIC%20User%20Manual.pdf TINY BASIC User Manual PDF] | ||
+ | * Load using & | ||
+ | ** Character/line delays 1 mSec | ||
+ | * Send [https://github.com/land-boards/lb-boards/blob/master/RetroCPUs/SIMPLE-6802/SOFTWARE/TinyBASIC/TB_6800.s TB_6800.s file] | ||
+ | * Run using J 0100 | ||
== Mechanicals == | == Mechanicals == |
Revision as of 18:10, 11 September 2024
Features
- 68B02 CPU
- 1.8432 MHz clock
- MC6802 is fully compatible with MC6800 but without messy two-phase clocking
Memory Map
- 0x0000-0x7FFF 32KB SRAM
- 0x8000-0xBFFF Serial (68B50 ACIA)
- 0xC000-0xFFFF 16KB EPROM
Design
CPU
MC6800 Block Diagram
Bus Timing
Power Supervisor/Reset
PLD
- ATF16V8B part
- TL866ii Plus Programmer
PLD Listing
Name LB-6802-01_PLD; Partno ATF16V8B; Date 08/24/24; Revision 01; Designer DOUG G; Company LAND BOARDS LLC; Assembly LB680201_U2; Location Rustbelt, US; Device G16V8; /* */ /* Control inputs */ PIN 1 = CLK; PIN 2 = CPUA12; PIN 3 = CPUA13; PIN 4 = CPUA14; PIN 5 = CPUA15; PIN 6 = CPUREAD; PIN 7 = VPB; /* Added as wire on Rev 1 PCB */ PIN 8 = VPA; PIN 9 = VDA; /* Address Decode and Chip Select outputs */ PIN 12 = !ROMCS; PIN 13 = !IOCS; PIN 14 = !MEMRD; PIN 16 = !RAMCS; PIN 18 = RDY; ROMCS = CPUA15 & CPUA14 & VPB; RAMCS = !CPUA15 & VPB /* 0x0000-0x7FFF 32KB SRAM */ # CPUA15 & !CPUA14 & !CPUA13 & VPB; /* 0x8000-0x9FFF Free (8KB */ IOCS = CPUA15 & !CPUA14 & CPUA13 & VPB; /* 0xA000-0xBFFF Serial (ACIA) */ RDY = VPB; MEMRD = CPUREAD & VPB;
Backplane Connector
Software
- Simple-6802 Software
- How to Program and Interface the 6800 By Andrew C. Staugaard, Jr. 1980
- 6800 instruction set
- SMITHBUG is a debugger similar to MIKBUG
- Examine/Edit memory
- Disassembly code
- Download S record (V2)
- Run code
- FIG-Forth - Forth language
- Combined SMITHBUG and FIG-Forth build
SmithBUG Builds for SIMPLE-MC6802 CPU Card
- Pre-built software
Building Code
- Uses a68 assembler
- Command line makes S-Record output
- Use srec_cat to shift from EPROM absolute addresses to 0x0000 as HEX file
4KB Build
A68 SMITHBUG_SIMPLE-6802_F000.ASM -l SMITHBUG_SIMPLE-6802_F000.LST -s SMITHBUG_SIMPLE-6802_F000.S srec_cat SMITHBUG_SIMPLE-6802_F000.s -offset - -minimum-addr SMITHBUG_SIMPLE-6802_F000.s -o smithbug_F000.hex -Intel
8KB Build
A68 SMITHBUG_SIMPLE-6802_E000.ASM -l SMITHBUG_SIMPLE-6802_E000.LST -s SMITHBUG_SIMPLE-6802_E000.S srec_cat SMITHBUG_SIMPLE-6802_E000.s -offset - -minimum-addr SMITHBUG_SIMPLE-6802_E000.s -o smithbug_E000.hex -Intel
16KB Build
- Used with 27SF256 parts
- 2nd half of EPROM unused
A68 SMITHBUG_SIMPLE-6802_C000.ASM -l SMITHBUG_SIMPLE-6802_C000.LST -s SMITHBUG_SIMPLE-6802_C000.S srec_cat SMITHBUG_SIMPLE-6802_C000.s -offset - -minimum-addr SMITHBUG_SIMPLE-6802_C000.s -o smithbug_C000.hex -Intel
SmithBUG Commands
; V VIEW MEMORY ; E CHANGE MEMORY ; I FILL MEMORY ; M MOVE MEMORY ; D DISASSEMBLE CODE ; G GO TO PROGRAM ; R PRINT ; @ ASCII CONVERSION ; H PRINTER ON ; J JUMP TO TARGET PROGRAM ; F FIND ; Q HARDWARE LOCATION ; T TRACE PROGRAM ; 1 BREAKPOINT ONE ; 2 BREAKPOINT TWO ; K CONTINUE AFTER BREAK ; & S1 LOAD PROGRAM ; * HARDWARE LOCATION (TBA) ; O ECHO ON ; N ECHO OFF
FIGFORTH in RAM
- Corsham Tech FIG-Forth 68 page
- FIGFORTH GitHub
- Enter command to srecord loader
&
- Using TermTerm, File, Send File
- Send fig-FORTH_6800.s19
- Type S9 to exit srecord loader
- Type J 1000 to jump to address 0x1000
- Responds with
Forth-68 1 1 + . 2 OK
- FIG-Forth-68 Commands
- Type VLIST to get list og built-ins
TASK FORTH NOOP VLIST TRIAD INDEX LIST ? . D. D.R .R #S # SIGN #> <# SPACES WHILE ELSE IF REPEAT AGAIN END UNTIL +LOOP LOOP DO THEN ENDIF BEGIN BACK FORGET ' R/W HI LO BLOCK_READ BLOCK_WRITE ?DISC --> LOAD MESSAGE .LINE (LINE) BLOCK BUFFER DR1 DR0 EMPTY-BUFFERS UPDATE +BUF PREV USE DABS ABS M/MOD */ */MOD MOD / /MOD * S->D COLD ABORT QUIT ( DEFINITIONS VOCABULARY IMMEDIATE INTERPRET DLITERAL LITERAL [COMPILE] CREATE ID. ERROR (ABORT) -FIND NUMBER (NUMBER) WORD PAD HOLD BLANKS ERASE FILL QUERY EXPECT ?STACK ." (.") -TRAILING TYPE COUNT DOES> <BUILDS ;CODE (:CODE) DECIMAL HEX SMUDGE ] [ COMPILE ?LOADING ?CSP ?PAIRS ?EXEC ?COMP ?ERROR !CSP PFA NFA CFA LFA LATEST TRAVERSE -DUP MAX MIN SPACE ROT > < = - C, , ALLOT HERE 2+ 1+ COLUMNS HLD R# CSP FLD DPL BASE STATE CURRENT CONTEXT OFFSET SCR OUT IN BLK VOC-LINK DP FENCE WARNING WIDTH TIB R0 S0 +ORIGIN B/SCR B/BUF LIMIT FIRST BL 3 2 1 0 USER VARIABLE CONSTANT ; : C! ! C@ @ TOGGLE +! DUP SWAP DROP OVER DMINUS MINUS D+ + 0< 0= R R> >R LEAVE ;S RP! SP! SP@ XOR OR AND U/ U* CMOVE CR ?TERMINAL KEY EMIT ENCLOSE (FIND) DIGIT I (DO) (+LOOP) (LOOP) 0BRANCH BRANCH EXECUTE LIT OK
SMITHBUG and FIGFORTH in ROM
- Combines SMITHBUG and FIGFORTH in ROM
- Combined Source code
- SMITHBUG in ROM from 0xC000-0xCFFF
- FIGFORTH in ROM from 0xD000-0xEFFF
- Vectors are at top of ROM from 0xFFF8-0xFFFF
- Fixes in FIG-Forth to get it to run from ROM
- The comments in the file indicated it could be run from ROM but the stack pointed to ORIG which is in ROM
- Fixed addresses of stack and I/O pointer to get it to work from ROM
- SMITHBUG and FIGFORTH in ROM GitHub
- Assemble
A68 SMITHBUG_FORTH_SIMPLE-6802_C000.ASM -l SMITHBUG_FORTH_SIMPLE-6802_C000.LST -s SMITHBUG_FORTH_SIMPLE-6802_C000.S 6800/6801 Cross-Assembler (Portable) Ver 3.5! Copyright (c) 1985 William C. Colley, III fixes for LCC/Windows and improvement by HRJ Aug 26 2019 A68 source_file | -l list_file | | -o/-s object_file | No Errors
- Edit out RAM at top
- Make hex file
srec_cat SMITHBUG_FORTH_SIMPLE-6802_C000.s -offset - -minimum-addr SMITHBUG_FORTH_SIMPLE-6802_C000.s -o SMITHBUG_FORTH_SIMPLE-FC.hex -Intel srec_cat: SMITHBUG_FORTH_SIMPLE-6802_C000.s: 1: warning: no header record srec_cat: SMITHBUG_FORTH_SIMPLE-6802_C000.s: 1: warning: no header record
- Boots to SMITHBUG
- Type J D000 to run Fig-Forth or
- Type 4 to run Forth
TinyBASIC
- TinyBASIC GitHub
- TINY BASIC User Manual
- Load using &
- Character/line delays 1 mSec
- Send TB_6800.s file
- Run using J 0100
Mechanicals
Checkout
Rev 1
- Power supply noise trips voltage monitor
- Change C2 capacitor to 100 uF
- [LB-BKOUT-01#NOP_Tester|NOP Tester] worked