annotate defs/mc09.d @ 3202:04f3ef62b7bb

mc09: revise defs file to remove stuff that's not needed by this port
author Neal Crook <foofoobedoo@gmail.com>
date Sun, 04 Jun 2017 17:52:41 +0100
parents f248546159b7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3116
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
1 IFNE MC09.D-1
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
2 MC09.D SET 1
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
3
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
4 ********************************************************************
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
5 * mc09.d - NitrOS-9 System Definitions for the Multicomp09
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
6 *
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
7 * When the primary boot loader passes control to the "track34" code
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
8 * the system memory map looks like this:
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
9 *
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
10 * $0000----> ==================================
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
11 * | |
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
12 * | |
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
13 * | RAM |
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
14 * | |
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
15 * | |
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
16 * $FFD0---->|==================================|
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
17 * | I/O |
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
18 * $FFE0---->|==================================|
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
19 * | RAM |
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
20 * |==================================|
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
21 * $FFFF---->
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
22 *
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
23 * The exception vectors at $FFF2 and onwards are initialised to vector to RAM
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
24 * as per coco1, just as krn expects. Specifically:
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
25 *
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
26 * $FFF2 holds vector to $0100 for SWI3
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
27 * $FFF4 holds vector to $0103 for SWI2
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
28 * $FFF6 holds vector to $010F for FIRQ
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
29 * $FFF8 holds vector to $010C for IRQ
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
30 * $FFFA holds vector to $0106 for SWI
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
31 * $FFFC holds vector to $0109 for NMI
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
32 *
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
33 * The 16-location I/O space and the interrupt hook-up are described below.
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
34 *
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
35 * $Id$
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
36 *
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
37 * Edt/Rev YYYY/MM/DD Modified by
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
38 * Comment
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
39 * ------------------------------------------------------------------
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
40 * 0.1 2015/10/17 Neal Crook. Tidy-up for first commit.
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
41 *
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
42 NAM Multicomp09Defs
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
43 IFEQ Level-1
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
44 TTL NitrOS-9 System Definitions for the Multicomp09
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
45 ELSE
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
46 IFEQ Level-2
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
47 TTL NitrOS-9 Level 2 System Type Definitions
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
48 ELSE
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
49 IFEQ Level-3
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
50 TTL NitrOS-9 Level 3 System Type Definitions
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
51 ENDC
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
52 ENDC
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
53 ENDC
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
54
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
55
3202
04f3ef62b7bb mc09: revise defs file to remove stuff that's not needed by this port
Neal Crook <foofoobedoo@gmail.com>
parents: 3200
diff changeset
56 ********************************************************************
3116
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
57 * CPU Type Definitions
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
58 *
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
59 Color SET 1
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
60 Color3 SET 2
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
61 IFEQ Level-1
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
62 CPUType SET Color
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
63 ELSE
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
64 CPUType SET Color3
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
65 ENDC
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
66
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
67
3202
04f3ef62b7bb mc09: revise defs file to remove stuff that's not needed by this port
Neal Crook <foofoobedoo@gmail.com>
parents: 3200
diff changeset
68 ********************************************************************
3116
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
69 * Clock Speed Type Definitions
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
70 *
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
71 OneMHz EQU 1
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
72 TwoMHz EQU 2
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
73 IFEQ CPUType-Color
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
74 CPUSpeed SET OneMHz
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
75 ELSE
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
76 CPUSpeed SET TwoMHz
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
77 ENDC
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
78
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
79
3202
04f3ef62b7bb mc09: revise defs file to remove stuff that's not needed by this port
Neal Crook <foofoobedoo@gmail.com>
parents: 3200
diff changeset
80 ********************************************************************
3116
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
81 * Power Line Frequency Definitions
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
82 * Multicomp09 has no dependency on power line frequency but setting
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
83 * it to Hz50 is the simplest way to make TkPerSec 50, which is important
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
84 * [NAC HACK 2015Aug31] actually no need to change it - gets applied at
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
85 * command line in modules/makefile to generate a 50Hz and 60Hz version.
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
86 *
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
87 Hz50 EQU 50 Assemble clock for 50 hz power
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
88 Hz60 EQU 60 Assemble clock for 60 hz power
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
89 IFNDEF PwrLnFrq
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
90 PwrLnFrq SET Hz50 Set to Appropriate freq
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
91 ENDC
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
92
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
93
3202
04f3ef62b7bb mc09: revise defs file to remove stuff that's not needed by this port
Neal Crook <foofoobedoo@gmail.com>
parents: 3200
diff changeset
94 ********************************************************************
3116
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
95 * Ticks per second
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
96 *
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
97 IFNDEF TkPerSec
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
98 IFEQ PwrLnFrq-Hz50
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
99 TkPerSec SET 50
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
100 ELSE
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
101 TkPerSec SET 60
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
102 ENDC
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
103 ENDC
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
104
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
105
3202
04f3ef62b7bb mc09: revise defs file to remove stuff that's not needed by this port
Neal Crook <foofoobedoo@gmail.com>
parents: 3200
diff changeset
106 ********************************************************************
3116
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
107 * Special character Bit position equates
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
108 *
3202
04f3ef62b7bb mc09: revise defs file to remove stuff that's not needed by this port
Neal Crook <foofoobedoo@gmail.com>
parents: 3200
diff changeset
109 * [NAC HACK 2017Jun04] used in level1/modules/sysgo.asm
3116
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
110 SHIFTBIT EQU %00000001
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
111
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
112
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
113 ********************************************************************
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
114 * Multicomp09 Interrupts:
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
115 *
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
116 * NMI - wired to single-step logic
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
117 * FIRQ - (currently) unused
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
118 * IRQ - wired to timer interrupt, VDU/KBD virtual ACIA and serial
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
119 * ports 1 and 2.
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
120
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
121 ********************************************************************
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
122 * Multicomp09 I/O space is $FFD0-$FFDF (16 locations). The equates
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
123 * below describe the I/O registers.
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
124
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
125 ********************************************************************
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
126 * VDU/KBD (VIRTUAL ACIA)
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
127 VDUSTA EQU $FFD0
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
128 VDUDAT EQU $FFD1
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
129
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
130 * SERIAL PORT 1
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
131 UARTSTA1 EQU $FFD2
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
132 UARTDAT1 EQU $FFD3
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
133
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
134 * SERIAL PORT 2
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
135 UARTSTA2 EQU $FFD4
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
136 UARTDAT2 EQU $FFD5
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
137
3118
ef66bdab9b45 mc09: Add mc09rtc command and GPIO registers defs in mc09.d
Neal Crook <foofoobedoo@gmail.com>
parents: 3116
diff changeset
138 ********************************************************************
3116
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
139 * GPIO device
3118
ef66bdab9b45 mc09: Add mc09rtc command and GPIO registers defs in mc09.d
Neal Crook <foofoobedoo@gmail.com>
parents: 3116
diff changeset
140 * SEE VHDL HEADER FOR PROG GUIDE
3116
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
141 GPIOADR EQU $FFD6
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
142 GPIODAT EQU $FFD7
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
143
3118
ef66bdab9b45 mc09: Add mc09rtc command and GPIO registers defs in mc09.d
Neal Crook <foofoobedoo@gmail.com>
parents: 3116
diff changeset
144 * values supported by GPIOADR register
ef66bdab9b45 mc09: Add mc09rtc command and GPIO registers defs in mc09.d
Neal Crook <foofoobedoo@gmail.com>
parents: 3116
diff changeset
145 GPDAT0 EQU 0
ef66bdab9b45 mc09: Add mc09rtc command and GPIO registers defs in mc09.d
Neal Crook <foofoobedoo@gmail.com>
parents: 3116
diff changeset
146 GPDDR1 EQU 1
ef66bdab9b45 mc09: Add mc09rtc command and GPIO registers defs in mc09.d
Neal Crook <foofoobedoo@gmail.com>
parents: 3116
diff changeset
147 GPDAT2 EQU 2
ef66bdab9b45 mc09: Add mc09rtc command and GPIO registers defs in mc09.d
Neal Crook <foofoobedoo@gmail.com>
parents: 3116
diff changeset
148 GPDDR3 EQU 3
ef66bdab9b45 mc09: Add mc09rtc command and GPIO registers defs in mc09.d
Neal Crook <foofoobedoo@gmail.com>
parents: 3116
diff changeset
149
ef66bdab9b45 mc09: Add mc09rtc command and GPIO registers defs in mc09.d
Neal Crook <foofoobedoo@gmail.com>
parents: 3116
diff changeset
150
3116
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
151 ********************************************************************
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
152 * SDCARD CONTROL REGISTERS
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
153 * SEE VHDL HEADER FOR PROG GUIDE
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
154 SDDATA EQU $FFD8
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
155 SDCTL EQU $FFD9
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
156 SDLBA0 EQU $FFDA
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
157 SDLBA1 EQU $FFDB
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
158 SDLBA2 EQU $FFDC
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
159
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
160 ********************************************************************
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
161 * 50Hz TIMER INTERRUPT
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
162 * TIMER (READ/WRITE)
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
163 *
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
164 * AT RESET, THE TIMER IS DISABLED AND THE INTERRUPT IS DEASSERTED. TIMER READS AS 0.
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
165 * BIT[1] IS READ/WRITE, TIMER ENABLE.
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
166 * BIT[7] IS READ/WRITE-1-TO-CLEAR, INTERRUPT.
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
167 *
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
168 * IN AN ISR THE TIMER CAN BE SERVICED BY PERFORMING AN INC ON ITS ADDRESS
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
169 *
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
170 * READ WRITE COMMENT
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
171 * N/A $02 ENABLE TIMER
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
172 * $00 $01 TIMER WAS/REMAINS DISABLED. N=0.
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
173 * $02 $03 TIMER WAS/REMAINS ENABLED, NO INTERRUPT. N=0.
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
174 * $80 $81 TIMER WAS/REMAINS DISABLED, OLD PENDING INTERRUPT CLEARED. N=1.
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
175 * $82 $83 TIMER WAS/REMAINS DISABLED, OLD PENDING INTERRUPT CLEARED. N=1.
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
176 *
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
177 TIMER EQU $FFDD
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
178
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
179 ********************************************************************
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
180 * MEM_MAPPER2 CONTROL REGISTERS
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
181 * MMUADR (WRITE-ONLY)
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
182 * 7 - ROMDIS (RESET TO 0)
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
183 * 6 - TR
3158
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
184 * 5 - MMUEN (RESET TO 0)
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
185 * 4 - NMI
3116
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
186 * 3:0 - MAPSEL
3158
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
187 *
3116
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
188 * MMUDAT (WRITE-ONLY)
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
189 * 7 - WRPROT
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
190 * 6:0 - PHYSICAL BLOCK FOR CURRENT MAPSEL
3158
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
191 *
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
192 *
3200
f248546159b7 defs: Expand comments around KrnBlk
Neal Crook <foofoobedoo@gmail.com>
parents: 3196
diff changeset
193 * For NitrOS-9 Level 2, want a fixed 512byte region of r/w memory
3158
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
194 * at the top of the address space. There is no space to provide
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
195 * an enable for this behaviour (which I call FRT for FixedRamTop)
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
196 * and so some special magic is used, as follows:
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
197 *
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
198 * IF ROMDIS=1 & MMUEN=1 then a write with b4=0 (see NMI behaviour
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
199 * below) and b7=0 and b5=1 does NOT enable the ROM but actually
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
200 * sets FRT=1. Any write with MMUEN=0 sets FRT=0 again. In summary:
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
201 *
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
202 * Current Action End State
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
203 * -----------------+-------------+-----------------
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
204 * ROMDIS MMUEn FRT ROMDIS MMUEn ROMDIS MMUEn FRT
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
205 * x x x RESET 0 0 0
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
206 * x x x 0 1 0 1 x
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
207 * x x x 1 1 1 1 x
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
208 * x x x x 0 x 0 0
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
209 * 1 1 x 0 1 1 1 1
3116
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
210
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
211 MMUADR EQU $FFDE
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
212 MMUDAT EQU $FFDF
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
213
3158
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
214 * BIT-FIELDS
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
215 MMUADR_ROMDIS EQU $80 0 after reset, 1 when OS boots. Leave at 1.
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
216 MMUADR_TR EQU $40 0 after reset, 0 when OS boots. 0=user, 1=sys
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
217 MMUADR_MMUEN EQU $20 0 after reset, 1 when OS boots. Leave at 1.
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
218 MMUADR_NMI EQU $10 0 after reset, 0 when OS boots. Do not write 1.
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
219 MMUADR_MAPSEL EQU $0f last-written value is UNDEFINED.
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
220 * the only two useful values for the upper nibble
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
221 MMU_TR0 EQU (MMUADR_ROMDIS|MMUADR_MMUEN)
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
222 MMU_TR1 EQU (MMUADR_ROMDIS|MMUADR_MMUEN|MMUADR_TR)
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
223 * one-time write to enable FRT
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
224 MMU_TR0FRT EQU (MMUADR_MMUEN)
927ba5ebc06e mc09 l2: move MMU bit-field defines to defs file.
Neal Crook <foofoobedoo@gmail.com>
parents: 3118
diff changeset
225 MMU_TR1FRT EQU (MMUADR_MMUEN|MMUADR_TR)
3116
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
226
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
227
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
228 ********************************************************************
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
229 * Coco stuff that's needed to allow other files to compile
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
230
3202
04f3ef62b7bb mc09: revise defs file to remove stuff that's not needed by this port
Neal Crook <foofoobedoo@gmail.com>
parents: 3200
diff changeset
231 * [NAC HACK 2017Jun04] needed by level1/modules/boot_sdc.asm
3116
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
232 DPort SET $FF40 Disk controller base address
3202
04f3ef62b7bb mc09: revise defs file to remove stuff that's not needed by this port
Neal Crook <foofoobedoo@gmail.com>
parents: 3200
diff changeset
233 * [NAC HACK 2017Jun04] needed by level1/modules/sysgo.asm
3116
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
234 PIA0Base EQU $FF00
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
235 PIA1Base EQU $FF20
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
236
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
237
3202
04f3ef62b7bb mc09: revise defs file to remove stuff that's not needed by this port
Neal Crook <foofoobedoo@gmail.com>
parents: 3200
diff changeset
238 ********************************************************************
04f3ef62b7bb mc09: revise defs file to remove stuff that's not needed by this port
Neal Crook <foofoobedoo@gmail.com>
parents: 3200
diff changeset
239 * Needed for building generic tools (eg cobbler.asm)
3184
cbf1ad3c46b1 Add boot track params to dragon.d and mc09.d
Tormod Volden <debian.tormod@gmail.com>
parents: 3158
diff changeset
240 Bt.Size EQU $1080 Maximum size of bootfile
3196
1021e0cdddd6 mc09: Fix up Bt.Start (different between Level 1 and Level 2)
Neal Crook <foofoobedoo@gmail.com>
parents: 3195
diff changeset
241 Bt.Track EQU 34 Boot track
3184
cbf1ad3c46b1 Add boot track params to dragon.d and mc09.d
Tormod Volden <debian.tormod@gmail.com>
parents: 3158
diff changeset
242 Bt.Sec EQU 0 Start LSN of boot area on boot track
cbf1ad3c46b1 Add boot track params to dragon.d and mc09.d
Tormod Volden <debian.tormod@gmail.com>
parents: 3158
diff changeset
243
3116
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
244
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
245 IFEQ Level-1
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
246
3202
04f3ef62b7bb mc09: revise defs file to remove stuff that's not needed by this port
Neal Crook <foofoobedoo@gmail.com>
parents: 3200
diff changeset
247 ********************************************************************
3116
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
248 *
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
249 * NitrOS-9 Level 1 Section
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
250 *
3202
04f3ef62b7bb mc09: revise defs file to remove stuff that's not needed by this port
Neal Crook <foofoobedoo@gmail.com>
parents: 3200
diff changeset
251 ********************************************************************
3116
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
252
3196
1021e0cdddd6 mc09: Fix up Bt.Start (different between Level 1 and Level 2)
Neal Crook <foofoobedoo@gmail.com>
parents: 3195
diff changeset
253 * Needed for boot
1021e0cdddd6 mc09: Fix up Bt.Start (different between Level 1 and Level 2)
Neal Crook <foofoobedoo@gmail.com>
parents: 3195
diff changeset
254 Bt.Start EQU $EE00 Address of boot track in memory
1021e0cdddd6 mc09: Fix up Bt.Start (different between Level 1 and Level 2)
Neal Crook <foofoobedoo@gmail.com>
parents: 3195
diff changeset
255
3116
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
256 HW.Page SET $FF Device descriptor hardware page
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
257
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
258 ELSE
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
259
3202
04f3ef62b7bb mc09: revise defs file to remove stuff that's not needed by this port
Neal Crook <foofoobedoo@gmail.com>
parents: 3200
diff changeset
260 ********************************************************************
3116
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
261 *
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
262 * NitrOS-9 Level 2 Section
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
263 *
3202
04f3ef62b7bb mc09: revise defs file to remove stuff that's not needed by this port
Neal Crook <foofoobedoo@gmail.com>
parents: 3200
diff changeset
264 ********************************************************************
3116
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
265
3196
1021e0cdddd6 mc09: Fix up Bt.Start (different between Level 1 and Level 2)
Neal Crook <foofoobedoo@gmail.com>
parents: 3195
diff changeset
266 * Needed for boot
1021e0cdddd6 mc09: Fix up Bt.Start (different between Level 1 and Level 2)
Neal Crook <foofoobedoo@gmail.com>
parents: 3195
diff changeset
267 Bt.Start EQU $ED00 Address of boot track in memory
1021e0cdddd6 mc09: Fix up Bt.Start (different between Level 1 and Level 2)
Neal Crook <foofoobedoo@gmail.com>
parents: 3195
diff changeset
268
3202
04f3ef62b7bb mc09: revise defs file to remove stuff that's not needed by this port
Neal Crook <foofoobedoo@gmail.com>
parents: 3200
diff changeset
269 ********************************************************************
3116
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
270 * Dynamic Address Translator Definitions
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
271 *
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
272 DAT.BlCt EQU 8 D.A.T. blocks/address space
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
273 DAT.BlSz EQU (256/DAT.BlCt)*256 D.A.T. block size
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
274 DAT.ImSz EQU DAT.BlCt*2 D.A.T. Image size
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
275 DAT.Addr EQU -(DAT.BlSz/256) D.A.T. MSB Address bits
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
276 DAT.Task EQU $FF91 Task Register address
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
277 DAT.TkCt EQU 32 Number of DAT Tasks
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
278 DAT.Regs EQU $FFA0 DAT Block Registers base address
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
279 DAT.Free EQU $333E Free Block Number
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
280 DAT.BlMx EQU $3F Maximum Block number
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
281 DAT.BMSz EQU $40 Memory Block Map size
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
282 DAT.WrPr EQU 0 no write protect
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
283 DAT.WrEn EQU 0 no write enable
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
284 SysTask EQU 0 Coco System Task number
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
285 IOAddr EQU $7F
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
286 ROMCount EQU 1 number of blocks of ROM (High RAM Block)
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
287 RAMCount EQU 1 initial blocks of RAM
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
288 MoveBlks EQU DAT.BlCt-ROMCount-2 Block numbers used for copies
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
289 BlockTyp EQU 1 chk only first bytes of RAM block
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
290 ByteType EQU 2 chk entire block of RAM
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
291 Limited EQU 1 chk only upper memory for ROM modules
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
292 UnLimitd EQU 2 chk all NotRAM for modules
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
293 * NOTE: this check assumes any NotRAM with a module will
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
294 * always start with $87CD in first two bytes of block
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
295 RAMCheck EQU BlockTyp chk only beg bytes of block
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
296 ROMCheck EQU Limited chk only upper few blocks for ROM
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
297
3202
04f3ef62b7bb mc09: revise defs file to remove stuff that's not needed by this port
Neal Crook <foofoobedoo@gmail.com>
parents: 3200
diff changeset
298 ********************************************************************
3116
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
299 * Hardware addresses
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
300 *
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
301
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
302 HW.Page SET $07 Device descriptor hardware page
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
303
3200
f248546159b7 defs: Expand comments around KrnBlk
Neal Crook <foofoobedoo@gmail.com>
parents: 3196
diff changeset
304 * KrnBlk defines the block number of the 8K RAM block that is mapped to
f248546159b7 defs: Expand comments around KrnBlk
Neal Crook <foofoobedoo@gmail.com>
parents: 3196
diff changeset
305 * the top of CPU address space ($E000-$FFFF) for the system process, and
f248546159b7 defs: Expand comments around KrnBlk
Neal Crook <foofoobedoo@gmail.com>
parents: 3196
diff changeset
306 * which holds the Kernel. The top 2 pages of this CPU address space ($FFE0-
f248546159b7 defs: Expand comments around KrnBlk
Neal Crook <foofoobedoo@gmail.com>
parents: 3196
diff changeset
307 * $FFFF) has two special properties. Firstly, it contains the I/O space.
f248546159b7 defs: Expand comments around KrnBlk
Neal Crook <foofoobedoo@gmail.com>
parents: 3196
diff changeset
308 * Secondly, the parts that contain RAM map are not affected by the DAT
f248546159b7 defs: Expand comments around KrnBlk
Neal Crook <foofoobedoo@gmail.com>
parents: 3196
diff changeset
309 * mappings but, instead, *always* map that RAM to a fixed RAM block
f248546159b7 defs: Expand comments around KrnBlk
Neal Crook <foofoobedoo@gmail.com>
parents: 3196
diff changeset
310 * (KrnBlk). When a user process is mapped in, and requests enough memory,
f248546159b7 defs: Expand comments around KrnBlk
Neal Crook <foofoobedoo@gmail.com>
parents: 3196
diff changeset
311 * it will end up with its own block assigned for CPU address space $E000-
f248546159b7 defs: Expand comments around KrnBlk
Neal Crook <foofoobedoo@gmail.com>
parents: 3196
diff changeset
312 * $FFFF but the top of the address space is unusable by the user process:
f248546159b7 defs: Expand comments around KrnBlk
Neal Crook <foofoobedoo@gmail.com>
parents: 3196
diff changeset
313 * it still contains the I/O and the bit of RAM that's mapped to KrnBlk.
f248546159b7 defs: Expand comments around KrnBlk
Neal Crook <foofoobedoo@gmail.com>
parents: 3196
diff changeset
314 * Usually, the value of KrnBlk is fixed for a particular hardware design;
f248546159b7 defs: Expand comments around KrnBlk
Neal Crook <foofoobedoo@gmail.com>
parents: 3196
diff changeset
315 * For mc09 it is always $07.
3195
6eb2edad80d8 L2: Introduce symbol KrnBlk to define kernel block number
Neal Crook <foofoobedoo@gmail.com>
parents: 3184
diff changeset
316 KrnBlk SET $07
3116
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
317
174eb9eda7b1 New port "mc09" for Multicomp09, an FPGA-based 6809 machine
Neal Crook <foofoobedoo@gmail.com>
parents:
diff changeset
318 ENDC
3195
6eb2edad80d8 L2: Introduce symbol KrnBlk to define kernel block number
Neal Crook <foofoobedoo@gmail.com>
parents: 3184
diff changeset
319 ENDC