annotate simple_console.txt @ 43:6e7bfe83d2b0

Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
author Michael Pavone <pavone@retrodev.com>
date Sat, 27 Aug 2016 22:38:31 -0700
parents 351a0d0cce3b
children 51672bd41cdd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1 Key:
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2 1 = literal 1 bit
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3 0 = literal 0 bit
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4 O = opcode bit
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5 D = destination register bit
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6 A = source A register bit
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7 B = source B register bit
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9 DDDD AAAA BBBB OOOO
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11 0: ldim
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12 D = destination reg
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13 A and B form 8-bit immediate value
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14 1: ldimh
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15 D = destination reg
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16 A and B form 8-bit immediate value
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17 2: ld8
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18 3: ld16
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19 4: str8
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20 5: str16
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21 6: add
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22 7: adc
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23 8: and
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24 9: or
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25 A: xor
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26 B: lsl
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27 C: lsr
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28 D: asr
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
29 E: bcc
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30 F: single source
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
33
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
34 DDDD AAAA OOOO 1111
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
35
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
36 single source
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
37
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
38 0: mov
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
39 1: neg
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
40 2: not
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
41 3: cmp
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
42 4: call
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
43 A = register containing pointer to function
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
44 D = register that will store PC value
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
45 5: swap
43
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
46 6: longjmp
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
47 A = register containing pointer to function
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
48 D = register containing new code segment value
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
49 7: ini
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
50 8: outi
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
51 9: addi
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
52 A: andi
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
53 B: ori
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
54 C: xori
0
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
55 D: ls[lr]i
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
56 MSB of AAAA determines direction
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
57 LS 3 bits determines magnitude
2
6204c81e2933 Revert changes to handling of immediate versions of bitwise instructions. Replace asri with cmpi.
Michael Pavone <pavone@retrodev.com>
parents: 0
diff changeset
58 E: cmpi
0
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
59 F: single reg
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
60
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
61
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
62 DDDD OOOO 1111 1111
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
63
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
64 0: reti - return from interrupt, D = register to restore from uer
43
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
65 1: trapi
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
66 2: getepc
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
67 3: setepc
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
68 4: getepch
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
69 5: setepch
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
70 6: getesr
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
71 7: setesr
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
72 8: getenum
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
73 9: setenum
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
74 A: getuer
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
75 B: setuer
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
76 C: getvbr
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
77 D: setvbr
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
78 E: getdatabanks
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
79 F: setdatabanks
0
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
80
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
81
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
82 Registers:
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
83
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
84 r0 - r12 : general purpose
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
85 r13 : technically general purpose, but canonically the stack register
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
86 r14 : PC
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
87 r15 : status register
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
88
3
08b69e3f9f17 Fleshed out the video hardware design somewhat
Michael Pavone <pavone@retrodev.com>
parents: 2
diff changeset
89 Special Registers
08b69e3f9f17 Fleshed out the video hardware design somewhat
Michael Pavone <pavone@retrodev.com>
parents: 2
diff changeset
90 epc - Exception PC - Stores PC value to resume to when entering an exception handler
43
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
91 epch - High 7-bits of PC
3
08b69e3f9f17 Fleshed out the video hardware design somewhat
Michael Pavone <pavone@retrodev.com>
parents: 2
diff changeset
92 esr - Exception SR - same as above, but for SR
08b69e3f9f17 Fleshed out the video hardware design somewhat
Michael Pavone <pavone@retrodev.com>
parents: 2
diff changeset
93 eur - Exceptuion User Reg - reg for temporary storage of a reg in a handler, intended to be used for the stack pointer
08b69e3f9f17 Fleshed out the video hardware design somewhat
Michael Pavone <pavone@retrodev.com>
parents: 2
diff changeset
94 enum - Exception Number - holds the number of the most recent exception
43
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
95 databanks - Holds the upper bytes used for data accesses (MSB = byte for upper half of memory space, LSB = byte for lower half of memory space)
3
08b69e3f9f17 Fleshed out the video hardware design somewhat
Michael Pavone <pavone@retrodev.com>
parents: 2
diff changeset
96
0
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
97 IO: Ports
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
98
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
99 0: Controller 1
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
100 1: Controller 2
27
351a0d0cce3b Updated spec to make the 3rd and 4th controller IO ports as reserved
Michael Pavone <pavone@retrodev.com>
parents: 25
diff changeset
101 2: Reserved
351a0d0cce3b Updated spec to make the 3rd and 4th controller IO ports as reserved
Michael Pavone <pavone@retrodev.com>
parents: 25
diff changeset
102 3: Reserved
0
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
103
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
104 4: Channel A Freq
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
105 Load value for a 16-bit down-counter
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
106 Polarity of output is switched on transition from 1 to 0
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
107 Value is loaded on cycles where counter is 0
43
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
108 Special case value of 0 in this register forces polarity to positive, useful for PCM playback
0
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
109 5: Channel B Freq
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
110 6: Channel C Freq
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
111 7: Channel D Freq
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
112
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
113 8: Channel A/B Vol
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
114 9: Channel C/D Vol
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
115
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
116 A: Timer Freq
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
117 B: "Serial" Debug Port
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
118
43
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
119 C: Framebuffer start offset : Read Vertical Position
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
120 D: Graphics mode : Read Horizontal Position
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
121 EDVP PSSS SSEE EEEF
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
122 E = 0 display disabled, 1 display enabled
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
123 D = 0 4 bpp, 1 8bpp
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
124 F = 0 front buffer is lower 64K, 1 front buffer is upper 64K
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
125 P = palette select
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
126 S = blanked lines at start of frame
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
127 E = blanked lines at end of frame
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
128 E: CRAM update port : Read Status
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
129 1st write determines destination and length
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
130 DDDD DDDD LLLL LLLL
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
131 Next L writes are written to D and subsequent addresses
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
132
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
133 F: Reserved
3
08b69e3f9f17 Fleshed out the video hardware design somewhat
Michael Pavone <pavone@retrodev.com>
parents: 2
diff changeset
134
08b69e3f9f17 Fleshed out the video hardware design somewhat
Michael Pavone <pavone@retrodev.com>
parents: 2
diff changeset
135
43
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
136 Video Hardware:
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
137 128KB of VRAM organized into two 64KB linear framebuffers
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
138 Pixels are 4bpp or 8bbp in chunky format
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
139 256 words of 16-bit CRAM
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
140 In 4bpp mode, P field of graphics mode selects one of 4, 16 color palettes
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
141 S and E fields of mode allow hardware letter boxing, effectively increasing the length of vblank
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
142 F field selects which 64KB framebuffer is used for the active display
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
143 Active buffer is inaccessible to CPU, but CPU has free reign over inactive buffer
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
144 H-Counter goes from 0-415 and then wraps back to zero
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
145 V-Counter goes from 0-261 and then wraps back to zero
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
146 V-Counter increments when H-Counter wraps
3
08b69e3f9f17 Fleshed out the video hardware design somewhat
Michael Pavone <pavone@retrodev.com>
parents: 2
diff changeset
147
43
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
148 Memory Map
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
149 23-bit address space
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
150 $0 - $3FFFFF - ROM
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
151 $400000 - $4FFFFF - 128K RAM, mirrored every 128KB
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
152 $500000 - $6FFFFF - Reserved
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
153 $700000 - $7FFFFF - 64KB VRAM back buffer, mirrored every 64KB
3
08b69e3f9f17 Fleshed out the video hardware design somewhat
Michael Pavone <pavone@retrodev.com>
parents: 2
diff changeset
154
08b69e3f9f17 Fleshed out the video hardware design somewhat
Michael Pavone <pavone@retrodev.com>
parents: 2
diff changeset
155
08b69e3f9f17 Fleshed out the video hardware design somewhat
Michael Pavone <pavone@retrodev.com>
parents: 2
diff changeset
156 26.112 MHZ Clock
08b69e3f9f17 Fleshed out the video hardware design somewhat
Michael Pavone <pavone@retrodev.com>
parents: 2
diff changeset
157 Dot Clock Divider 4
43
6e7bfe83d2b0 Changed the design to vastly simplify the video hardware and support a 23-bit address space on the CPU
Michael Pavone <pavone@retrodev.com>
parents: 27
diff changeset
158 CPU Clock Divider 4 (assuming 1 cycle/instruction, 1 for 4 cycles/instruction)
3
08b69e3f9f17 Fleshed out the video hardware design somewhat
Michael Pavone <pavone@retrodev.com>
parents: 2
diff changeset
159 Audio Timer Divider 34
08b69e3f9f17 Fleshed out the video hardware design somewhat
Michael Pavone <pavone@retrodev.com>
parents: 2
diff changeset
160 Audio Output Divider 544
25
fb14515266f4 Implemented timer and timer interrupts. Added get/setvbr instructions. Fixed assembler bug. Moved mnemonics into a separate source file
Michael Pavone <pavone@retrodev.com>
parents: 5
diff changeset
161 Interrupt Timer Divider 32
3
08b69e3f9f17 Fleshed out the video hardware design somewhat
Michael Pavone <pavone@retrodev.com>
parents: 2
diff changeset
162
08b69e3f9f17 Fleshed out the video hardware design somewhat
Michael Pavone <pavone@retrodev.com>
parents: 2
diff changeset
163 Alternatively 13.056 Mhz clock and cut the dividers in half
0
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
164
7e44f7d5810b Initial commit. CPU working well enough for simple hello world program.
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
165