├── .gitignore ├── README.md ├── diagrams ├── circuit_diagram.fzz ├── circuit_diagram_bb.jpg ├── circuit_diagram_bb_sm.jpg └── circuit_diagram_bom.html ├── display_graphics.asm ├── graphics ├── prince_of_persia.piskel └── prince_of_persia.png ├── media ├── color_bars.jpg ├── color_bars_sm.jpg ├── full_setup.jpg ├── full_setup_sm.jpg ├── prince_of_persia.jpg ├── prince_of_persia_sm.jpg ├── vectron_64_focus_1.jpg ├── vectron_64_focus_1_sm.jpg ├── vectron_64_focus_2.jpg ├── vectron_64_focus_2_sm.jpg ├── vectron_vga.gif ├── vectron_vga.jpg ├── vectron_vga.mp4 ├── vectron_vga_short.gif └── vectron_vga_sm.jpg └── sram_vectron_simulator ├── README.md └── sram_vectron_simulator.ino /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.list 3 | *.out 4 | hex.txt 5 | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Vectron VGA 2 | 3 | Vectron VGA generates a 640x480@60Hz 3-bit color VGA signal and is designed to interface with the [Vectron 64](https://github.com/nickbild/vectron_64) 6502-CPU based breadboard computer. It was built with 7400-series integrated circuits. The display is continually refreshed by the contents of a 32KB SRAM chip (1 byte per pixel) that can be updated via random access during active display operation. 4 | 5 | The interface can also be used by other devices, such as Arduino microcontroller dev boards ([example here](https://github.com/nickbild/vectron_vga/tree/master/sram_vectron_simulator)). 6 | 7 | The effective resolution is reduced to 160x120@60Hz, because anything higher just isn't retro enough for me. :) This also reduces the VRAM requirements and processing overhead of screen updates as an added benefit. 8 | 9 |

10 | 11 |

12 | 13 | ## How It Works 14 | 15 | Frequency dividing flip-flops reduce the 25.175 MHz clock four-fold to 6.29375 MHz. This causes each pixel to be repeated 4 times on the horizontal axis. Each vertical line is also repeated 4 times to reduce the resolution to 160x120, while still generating a standard 640x480 VGA signal. The crystal oscillator and frequency divider are soldered onto perfboard -- I don't trust breadboards at that speed -- and the 6.29375 MHz signal is fed into the breadboards. 16 | 17 | The clock drives a counter that keeps track of the current horizontal pixel position (visible region or not), and through a number of magnitude comparators and line buffers generates a horizontal sync signal and horizontal blanking periods. During the visible portion of the scan line, the current pixel position is translated into an address in a 32KB SRAM chip. The data at that address is converted to analog signals via voltage dividing resistors and sent to the red, green, and blue VGA inputs. 18 | 19 | The SRAM address is determined by storing a starting address in a pair of octal flip-flops, then clocking a pixel offset counter, starting from the end of the horizontal blanking period, by the system clock. The starting address and offset are added to determine the SRAM address of the current pixel. Every 4 horizontal lines, 160 is added to the starting address. 20 | 21 | A vertical line counter is clocked at the end of each horizontal line. As with the horizontal counter, a number of magnitude comparators and line buffers are used to generate a vertical sync signal and vertical blanking periods. 22 | 23 | A flip-flop and series of line buffers allow rapid toggling between "display" mode and "programming" mode for updates to the display. Each pixel can be individually addressed and updated at will via the interface. Using the interface is quite simple on the software side. For the 6502, updating a single pixel looks like this: 24 | 25 | ```asm 26 | ; Set VGA generator to "program" mode. 27 | lda #$01 28 | sta $00F8 29 | 30 | ; Load data to VRAM. 31 | lda #$00 32 | sta $0006 ; Clock lower address flip-flop. 33 | lda #$14 34 | sta $0007 ; Clock upper address flip-flop. 35 | lda #$01 36 | sta $0005 ; Clock data flip-flop. 37 | lda $00F9 ; Pulse SRAM write enable pin. 38 | 39 | ; Set VGA generator to "display" mode. 40 | lda #$01 41 | sta $00F8 42 | ``` 43 | 44 | I also have a working example for Arduino boards [here](https://github.com/nickbild/vectron_vga/tree/master/sram_vectron_simulator). 45 | 46 | If you would like more details than are provided in this high-level overview, see the circuit diagram in the [Media section](https://github.com/nickbild/vectron_vga#media). 47 | 48 | ## Media 49 | 50 | YouTube video: 51 | https://www.youtube.com/watch?v=riF9NnIJbLo 52 | 53 | Circuit diagram: 54 | 55 | ![circuit_diagram](https://raw.githubusercontent.com/nickbild/vectron_vga/master/diagrams/circuit_diagram_bb_sm.jpg) 56 | 57 | [Fritzing Download](https://github.com/nickbild/vectron_vga/raw/master/diagrams/circuit_diagram.fzz) 58 | 59 | You may notice some free space on a few of the breadboards. You may be able to tighten the design a bit, but I had to space things out to prevent serious electromagnetic interference issues. If any of the high speed switching lines (e.g. address and data) run parallel to one another over long distances, you'll get pixels that randomly flicker and other visual anomalies. Space things out and keep high speed lines short and it'll be a nice stable image generated. 60 | 61 | Prince of Persia title screen: 62 | 63 | ![prince_of_persia](https://raw.githubusercontent.com/nickbild/vectron_vga/master/media/prince_of_persia_sm.jpg) 64 | 65 | Color bars test, showing all 8 glorious colors. 66 | 67 | ![color_bars](https://raw.githubusercontent.com/nickbild/vectron_vga/master/media/color_bars_sm.jpg) 68 | 69 | 6502 code to generate color bars [is here](https://github.com/nickbild/vectron_vga/blob/master/display_graphics.asm). 70 | 71 | Full setup (Vectron 64 on the left): 72 | 73 | ![full_setup](https://raw.githubusercontent.com/nickbild/vectron_vga/master/media/full_setup_sm.jpg) 74 | 75 | Vectron VGA: 76 | 77 | ![full_setup](https://raw.githubusercontent.com/nickbild/vectron_vga/master/media/vectron_vga_sm.jpg) 78 | 79 | ## Bill of Materials 80 | 81 | - 9 x 2.2kΩ Resistor 82 | - 3 x 357Ω Resistor 83 | - 3 x 100Ω Resistor 84 | - 1 x 220Ω Resistor 85 | - 20 x SN74LS682N 86 | - 12 x SN74LS244N 87 | - 5 x SN74LS74AN 88 | - 7 x SN74HCT32N 89 | - 5 x SN74LS245N 90 | - 8 x SN74LS161A 91 | - 8 x SN74LS283N 92 | - 9 x SN74LS273N 93 | - 2 x SN74HCT374N 94 | - 1 x SN74LS08N 95 | - 3 x SN74LS04N 96 | - 1 x CY7C199-55PC 32KB SRAM 97 | - 1 x 25.175 MHz Crystal Oscillator 98 | - 1 x VGA breakout board 99 | - 14 x Full size breadboards 100 | - 3 x Half size breadboards 101 | - 1 x Perfboard 102 | - Sprinkle capacitors liberally 103 | - Miscellaneous wires 104 | 105 | ## About the Author 106 | 107 | [Nick A. Bild, MS](https://nickbild79.firebaseapp.com/#!/) 108 | -------------------------------------------------------------------------------- /diagrams/circuit_diagram.fzz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nickbild/vectron_vga/bd94c7b8e63fbf45b39ea0350c750b48a680105b/diagrams/circuit_diagram.fzz -------------------------------------------------------------------------------- /diagrams/circuit_diagram_bb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nickbild/vectron_vga/bd94c7b8e63fbf45b39ea0350c750b48a680105b/diagrams/circuit_diagram_bb.jpg -------------------------------------------------------------------------------- /diagrams/circuit_diagram_bb_sm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nickbild/vectron_vga/bd94c7b8e63fbf45b39ea0350c750b48a680105b/diagrams/circuit_diagram_bb_sm.jpg -------------------------------------------------------------------------------- /diagrams/circuit_diagram_bom.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Fritzing Bill of Materials 6 | 28 | 29 | 30 | 31 |

Bill of Materials: circuit_diagram.fzz

32 |

/Users/nickbild/working/vectron_vga/diagrams/circuit_diagram.fzz

33 |

Tuesday, May 26 2020, 19:32:33

34 | 35 |

Assembly List

36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 |
LabelPart TypeProperties
R12.2kΩ Resistortolerance ±5%; resistance 2.2kΩ; pin spacing 400 mil; package THT; bands 4
R22.2kΩ Resistortolerance ±5%; resistance 2.2kΩ; pin spacing 400 mil; package THT; bands 4
R32.2kΩ Resistortolerance ±5%; resistance 2.2kΩ; pin spacing 400 mil; package THT; bands 4
R42.2kΩ Resistortolerance ±5%; resistance 2.2kΩ; pin spacing 400 mil; package THT; bands 4
R52.2kΩ Resistortolerance ±5%; resistance 2.2kΩ; pin spacing 400 mil; package THT; bands 4
R62.2kΩ Resistortolerance ±5%; resistance 2.2kΩ; pin spacing 400 mil; package THT; bands 4
R72.2kΩ Resistortolerance ±5%; resistance 2.2kΩ; pin spacing 400 mil; package THT; bands 4
R82.2kΩ Resistortolerance ±5%; resistance 2.2kΩ; pin spacing 400 mil; package THT; bands 4
R92.2kΩ Resistortolerance ±5%; resistance 2.2kΩ; pin spacing 400 mil; package THT; bands 4
R10357Ω Resistortolerance ±5%; resistance 357Ω; pin spacing 400 mil; package THT; bands 4
R11357Ω Resistortolerance ±5%; resistance 357Ω; pin spacing 400 mil; package THT; bands 4
R12357Ω Resistortolerance ±5%; resistance 357Ω; pin spacing 400 mil; package THT; bands 4
R13100Ω Resistortolerance ±5%; resistance 100Ω; pin spacing 400 mil; package THT; bands 4
R14100Ω Resistortolerance ±5%; resistance 100Ω; pin spacing 400 mil; package THT; bands 4
R15100Ω Resistortolerance ±5%; resistance 100Ω; pin spacing 400 mil; package THT; bands 4
R16220Ω Resistortolerance ±5%; resistance 220Ω; pin spacing 400 mil; package THT; bands 4
U1SN74LS682Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS682N; pins 20; package DIP (Dual Inline) [THT]
U2SN74LS682Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS682N; pins 20; package DIP (Dual Inline) [THT]
U3SN74LS244Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS244N; pins 20; package DIP (Dual Inline) [THT]
U4SN74LS244Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS244N; pins 20; package DIP (Dual Inline) [THT]
U5SN74LS74ANhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS74AN; pins 14; package DIP (Dual Inline) [THT]
U6SN74HCT32Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74HCT32N; pins 14; package DIP (Dual Inline) [THT]
U7SN74LS682Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS682N; pins 20; package DIP (Dual Inline) [THT]
U8SN74LS682Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS682N; pins 20; package DIP (Dual Inline) [THT]
U9SN74HCT32Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74HCT32N; pins 14; package DIP (Dual Inline) [THT]
U10SN74LS245Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS245N; pins 20; package DIP (Dual Inline) [THT]
U11SN74LS682Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS682N; pins 20; package DIP (Dual Inline) [THT]
U12SN74LS682Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS682N; pins 20; package DIP (Dual Inline) [THT]
U13SN74LS682Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS682N; pins 20; package DIP (Dual Inline) [THT]
U14SN74LS682Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS682N; pins 20; package DIP (Dual Inline) [THT]
U15SN74LS245Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS245N; pins 20; package DIP (Dual Inline) [THT]
U16SN74LS244Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS244N; pins 20; package DIP (Dual Inline) [THT]
U17SN74LS74ANhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS74AN; pins 14; package DIP (Dual Inline) [THT]
U18SN74LS682Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS682N; pins 20; package DIP (Dual Inline) [THT]
U19SN74LS682Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS682N; pins 20; package DIP (Dual Inline) [THT]
U20SN74LS161Ahole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS161A; pins 16; package DIP (Dual Inline) [THT]
U21SN74LS161Ahole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS161A; pins 16; package DIP (Dual Inline) [THT]
U22SN74HCT32Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74HCT32N; pins 14; package DIP (Dual Inline) [THT]
U23SN74LS161Ahole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS161A; pins 16; package DIP (Dual Inline) [THT]
U24SN74LS244Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS244N; pins 20; package DIP (Dual Inline) [THT]
U25SN74LS161Ahole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS161A; pins 16; package DIP (Dual Inline) [THT]
U26SN74LS161Ahole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS161A; pins 16; package DIP (Dual Inline) [THT]
U27SN74LS682Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS682N; pins 20; package DIP (Dual Inline) [THT]
U28SN74LS682Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS682N; pins 20; package DIP (Dual Inline) [THT]
U29SN74LS244Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS244N; pins 20; package DIP (Dual Inline) [THT]
U30SN74HCT32Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74HCT32N; pins 14; package DIP (Dual Inline) [THT]
U31SN74LS74ANhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS74AN; pins 14; package DIP (Dual Inline) [THT]
U32SN74LS161Ahole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS161A; pins 16; package DIP (Dual Inline) [THT]
U33SN74LS283Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS283N; pins 16; package DIP (Dual Inline) [THT]
U34SN74LS283Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS283N; pins 16; package DIP (Dual Inline) [THT]
U35SN74LS283Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS283N; pins 16; package DIP (Dual Inline) [THT]
U36SN74LS283Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS283N; pins 16; package DIP (Dual Inline) [THT]
U37SN74LS682Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS682N; pins 20; package DIP (Dual Inline) [THT]
U38SN74LS682Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS682N; pins 20; package DIP (Dual Inline) [THT]
U39SN74LS273Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS273N; pins 20; package DIP (Dual Inline) [THT]
U40SN74LS273Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS273N; pins 20; package DIP (Dual Inline) [THT]
U43SN74HCT374Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74HCT374N; pins 20; package DIP (Dual Inline) [THT]
U44SN74HCT374Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74HCT374N; pins 20; package DIP (Dual Inline) [THT]
U45SN74LS74ANhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS74AN; pins 14; package DIP (Dual Inline) [THT]
U46SN74HCT32Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74HCT32N; pins 14; package DIP (Dual Inline) [THT]
U47SN74LS244Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS244N; pins 20; package DIP (Dual Inline) [THT]
U48SN74LS245Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS245N; pins 20; package DIP (Dual Inline) [THT]
U49SN74LS245Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS245N; pins 20; package DIP (Dual Inline) [THT]
U50SN74LS245Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS245N; pins 20; package DIP (Dual Inline) [THT]
U51SN74LS682Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS682N; pins 20; package DIP (Dual Inline) [THT]
U52SN74LS682Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS682N; pins 20; package DIP (Dual Inline) [THT]
U53SN74LS08Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS08N; pins 14; package DIP (Dual Inline) [THT]
U54SN74LS04Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS04N; pins 14; package DIP (Dual Inline) [THT]
U55SN74LS74ANhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS74AN; pins 14; package DIP (Dual Inline) [THT]
U56CY7C199-55PChole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label CY7C199-55PC; pins 28; package DIP (Dual Inline) [THT]
U57SN74LS244Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS244N; pins 20; package DIP (Dual Inline) [THT]
U58SN74LS244Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS244N; pins 20; package DIP (Dual Inline) [THT]
U59SN74LS244Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS244N; pins 20; package DIP (Dual Inline) [THT]
U60SN74LS244Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS244N; pins 20; package DIP (Dual Inline) [THT]
U61SN74LS244Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS244N; pins 20; package DIP (Dual Inline) [THT]
U62SN74LS273Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS273N; pins 20; package DIP (Dual Inline) [THT]
U63SN74LS161Ahole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS161A; pins 16; package DIP (Dual Inline) [THT]
U64SN74LS161Ahole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS161A; pins 16; package DIP (Dual Inline) [THT]
U65SN74LS273Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS273N; pins 20; package DIP (Dual Inline) [THT]
U66SN74LS283Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS283N; pins 16; package DIP (Dual Inline) [THT]
U67SN74LS283Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS283N; pins 16; package DIP (Dual Inline) [THT]
U68SN74LS283Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS283N; pins 16; package DIP (Dual Inline) [THT]
U69SN74LS283Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS283N; pins 16; package DIP (Dual Inline) [THT]
U70SN74LS273Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS273N; pins 20; package DIP (Dual Inline) [THT]
U71SN74LS273Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS273N; pins 20; package DIP (Dual Inline) [THT]
U72SN74LS273Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS273N; pins 20; package DIP (Dual Inline) [THT]
U73SN74LS273Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS273N; pins 20; package DIP (Dual Inline) [THT]
U74SN74LS273Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS273N; pins 20; package DIP (Dual Inline) [THT]
U75SN74LS04Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS04N; pins 14; package DIP (Dual Inline) [THT]
U76SN74LS244Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS244N; pins 20; package DIP (Dual Inline) [THT]
U77SN74LS682Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS682N; pins 20; package DIP (Dual Inline) [THT]
U78SN74LS682Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS682N; pins 20; package DIP (Dual Inline) [THT]
U79SN74LS682Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS682N; pins 20; package DIP (Dual Inline) [THT]
U80SN74HCT32Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74HCT32N; pins 14; package DIP (Dual Inline) [THT]
U81SN74HCT32Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74HCT32N; pins 14; package DIP (Dual Inline) [THT]
U82SN74LS04Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS04N; pins 14; package DIP (Dual Inline) [THT]
U83SN74LS682Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS682N; pins 20; package DIP (Dual Inline) [THT]
XTAL1Crystaltype crystal; package SMD; frequency 25 MHz
441 |

Shopping List

442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 |
AmountPart TypeProperties
92.2kΩ Resistortolerance ±5%; resistance 2.2kΩ; pin spacing 400 mil; package THT; bands 4
3357Ω Resistortolerance ±5%; resistance 357Ω; pin spacing 400 mil; package THT; bands 4
3100Ω Resistortolerance ±5%; resistance 100Ω; pin spacing 400 mil; package THT; bands 4
1220Ω Resistortolerance ±5%; resistance 220Ω; pin spacing 400 mil; package THT; bands 4
20SN74LS682Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS682N; pins 20; package DIP (Dual Inline) [THT]
12SN74LS244Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS244N; pins 20; package DIP (Dual Inline) [THT]
5SN74LS74ANhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS74AN; pins 14; package DIP (Dual Inline) [THT]
7SN74HCT32Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74HCT32N; pins 14; package DIP (Dual Inline) [THT]
5SN74LS245Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS245N; pins 20; package DIP (Dual Inline) [THT]
8SN74LS161Ahole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS161A; pins 16; package DIP (Dual Inline) [THT]
8SN74LS283Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS283N; pins 16; package DIP (Dual Inline) [THT]
9SN74LS273Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS273N; pins 20; package DIP (Dual Inline) [THT]
2SN74HCT374Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74HCT374N; pins 20; package DIP (Dual Inline) [THT]
1SN74LS08Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS08N; pins 14; package DIP (Dual Inline) [THT]
3SN74LS04Nhole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label SN74LS04N; pins 14; package DIP (Dual Inline) [THT]
1CY7C199-55PChole size 1.0mm,0.508mm; pin spacing 300mil; true; chip label CY7C199-55PC; pins 28; package DIP (Dual Inline) [THT]
1Crystaltype crystal; package SMD; frequency 25 MHz
522 |


Exported with Fritzing 0.9.3- http://fritzing.org

523 | 524 | 525 | -------------------------------------------------------------------------------- /display_graphics.asm: -------------------------------------------------------------------------------- 1 | ;;;; 2 | ; Display image on Vectron 64 VGA generator. 3 | ; Nick Bild - nick.bild@gmail.com 4 | ; https://github.com/nickbild/vectron_vga 5 | ; 6 | ; Reserved memory: 7 | ; 8 | ; $0002 - 16-bit counter low bits. 9 | ; $0003 - 16-bit counter high bits. 10 | ; 11 | ; $0005 - VRAM data clock. 12 | ; $0006 - VRAM lower address clock. 13 | ; $0007 - VRAM upper address clock. 14 | ; $00F8 - VGA mode - program or display. 15 | ; $00F9 - VRAM write enable (WE) pin. 16 | ; 17 | ; $0100-$01FF - 6502 stack 18 | ; 19 | ; $FFFA - NMI IRQ Vector 20 | ; $FFFB - NMI IRQ Vector 21 | ; $FFFC - Reset Vector - Stores start address of this ROM. 22 | ; $FFFD - Reset Vector 23 | ; $FFFE - IRQ Vector - Keyboard ISR address. 24 | ; $FFFF - IRQ Vector 25 | ;;;; 26 | 27 | processor 6502 28 | 29 | ; Named variables in RAM. 30 | ORG $0002 31 | 32 | CounterLow 33 | .byte #$00 34 | CounterHigh 35 | .byte #$00 36 | 37 | ; Start at beginning of ROM. 38 | StartExe ORG $8000 39 | ; Initialize counter. 40 | lda #$A0 41 | sta CounterLow 42 | lda #$00 43 | sta CounterHigh 44 | 45 | ; Set VGA generator to "program" mode. 46 | lda #$01 47 | sta $00F8 48 | 49 | ;;;; 50 | ;; Load data to VRAM. 51 | ;;;; 52 | 53 | LoadMemory1 54 | lda CounterLow 55 | sta $0006 ; Clock lower address. 56 | lda CounterHigh 57 | sta $0007 ; Clock upper address. 58 | lda #$01 59 | sta $0005 ; Clock data. 60 | lda $00F9 ; Pulse WE. 61 | 62 | ; 16 bit counter increment. 63 | inc CounterLow 64 | bne skipHighInc1 65 | inc CounterHigh 66 | skipHighInc1 67 | 68 | lda CounterHigh 69 | cmp #$05 ; Next 8 lines (1280 pixels). 70 | bne LoadMemory1 71 | 72 | LoadMemory2 73 | lda CounterLow 74 | sta $0006 ; Clock lower address. 75 | lda CounterHigh 76 | sta $0007 ; Clock upper address. 77 | lda #$02 78 | sta $0005 ; Clock data. 79 | lda $00F9 ; Pulse WE. 80 | 81 | ; 16 bit counter increment. 82 | inc CounterLow 83 | bne skipHighInc2 84 | inc CounterHigh 85 | skipHighInc2 86 | 87 | lda CounterHigh 88 | cmp #$0A ; Next 8 lines (1280 pixels). 89 | bne LoadMemory2 90 | 91 | LoadMemory3 92 | lda CounterLow 93 | sta $0006 ; Clock lower address. 94 | lda CounterHigh 95 | sta $0007 ; Clock upper address. 96 | lda #$03 97 | sta $0005 ; Clock data. 98 | lda $00F9 ; Pulse WE. 99 | 100 | ; 16 bit counter increment. 101 | inc CounterLow 102 | bne skipHighInc3 103 | inc CounterHigh 104 | skipHighInc3 105 | 106 | lda CounterHigh 107 | cmp #$0F ; Next 8 lines (1280 pixels). 108 | bne LoadMemory3 109 | 110 | LoadMemory4 111 | lda CounterLow 112 | sta $0006 ; Clock lower address. 113 | lda CounterHigh 114 | sta $0007 ; Clock upper address. 115 | lda #$04 116 | sta $0005 ; Clock data. 117 | lda $00F9 ; Pulse WE. 118 | 119 | ; 16 bit counter increment. 120 | inc CounterLow 121 | bne skipHighInc4 122 | inc CounterHigh 123 | skipHighInc4 124 | 125 | lda CounterHigh 126 | cmp #$14 ; Next 8 lines (1280 pixels). 127 | bne LoadMemory4 128 | 129 | LoadMemory5 130 | lda CounterLow 131 | sta $0006 ; Clock lower address. 132 | lda CounterHigh 133 | sta $0007 ; Clock upper address. 134 | lda #$05 135 | sta $0005 ; Clock data. 136 | lda $00F9 ; Pulse WE. 137 | 138 | ; 16 bit counter increment. 139 | inc CounterLow 140 | bne skipHighInc5 141 | inc CounterHigh 142 | skipHighInc5 143 | 144 | lda CounterHigh 145 | cmp #$19 ; Next 8 lines (1280 pixels). 146 | bne LoadMemory5 147 | 148 | LoadMemory6 149 | lda CounterLow 150 | sta $0006 ; Clock lower address. 151 | lda CounterHigh 152 | sta $0007 ; Clock upper address. 153 | lda #$06 154 | sta $0005 ; Clock data. 155 | lda $00F9 ; Pulse WE. 156 | 157 | ; 16 bit counter increment. 158 | inc CounterLow 159 | bne skipHighInc6 160 | inc CounterHigh 161 | skipHighInc6 162 | 163 | lda CounterHigh 164 | cmp #$1E ; Next 8 lines (1280 pixels). 165 | bne LoadMemory6 166 | 167 | LoadMemory7 168 | lda CounterLow 169 | sta $0006 ; Clock lower address. 170 | lda CounterHigh 171 | sta $0007 ; Clock upper address. 172 | lda #$07 173 | sta $0005 ; Clock data. 174 | lda $00F9 ; Pulse WE. 175 | 176 | ; 16 bit counter increment. 177 | inc CounterLow 178 | bne skipHighInc7 179 | inc CounterHigh 180 | skipHighInc7 181 | 182 | lda CounterHigh 183 | cmp #$23 ; Next 8 lines (1280 pixels). 184 | bne LoadMemory7 185 | 186 | LoadMemory8 187 | lda CounterLow 188 | sta $0006 ; Clock lower address. 189 | lda CounterHigh 190 | sta $0007 ; Clock upper address. 191 | lda #$00 192 | sta $0005 ; Clock data. 193 | lda $00F9 ; Pulse WE. 194 | 195 | ; 16 bit counter increment. 196 | inc CounterLow 197 | bne skipHighInc8 198 | inc CounterHigh 199 | skipHighInc8 200 | 201 | lda CounterHigh 202 | cmp #$28 ; Next 8 lines (1280 pixels). 203 | bne LoadMemory8 204 | 205 | LoadMemory9 206 | lda CounterLow 207 | sta $0006 ; Clock lower address. 208 | lda CounterHigh 209 | sta $0007 ; Clock upper address. 210 | lda #$07 211 | sta $0005 ; Clock data. 212 | lda $00F9 ; Pulse WE. 213 | 214 | ; 16 bit counter increment. 215 | inc CounterLow 216 | bne skipHighInc9 217 | inc CounterHigh 218 | skipHighInc9 219 | 220 | lda CounterHigh 221 | cmp #$2D ; Next 8 lines (1280 pixels). 222 | bne LoadMemory9 223 | 224 | LoadMemory10 225 | lda CounterLow 226 | sta $0006 ; Clock lower address. 227 | lda CounterHigh 228 | sta $0007 ; Clock upper address. 229 | lda #$06 230 | sta $0005 ; Clock data. 231 | lda $00F9 ; Pulse WE. 232 | 233 | ; 16 bit counter increment. 234 | inc CounterLow 235 | bne skipHighInc10 236 | inc CounterHigh 237 | skipHighInc10 238 | 239 | lda CounterHigh 240 | cmp #$32 ; Next 8 lines (1280 pixels). 241 | bne LoadMemory10 242 | 243 | LoadMemory11 244 | lda CounterLow 245 | sta $0006 ; Clock lower address. 246 | lda CounterHigh 247 | sta $0007 ; Clock upper address. 248 | lda #$05 249 | sta $0005 ; Clock data. 250 | lda $00F9 ; Pulse WE. 251 | 252 | ; 16 bit counter increment. 253 | inc CounterLow 254 | bne skipHighInc11 255 | inc CounterHigh 256 | skipHighInc11 257 | 258 | lda CounterHigh 259 | cmp #$37 ; Next 8 lines (1280 pixels). 260 | bne LoadMemory11 261 | 262 | LoadMemory12 263 | lda CounterLow 264 | sta $0006 ; Clock lower address. 265 | lda CounterHigh 266 | sta $0007 ; Clock upper address. 267 | lda #$04 268 | sta $0005 ; Clock data. 269 | lda $00F9 ; Pulse WE. 270 | 271 | ; 16 bit counter increment. 272 | inc CounterLow 273 | bne skipHighInc12 274 | inc CounterHigh 275 | skipHighInc12 276 | 277 | lda CounterHigh 278 | cmp #$3C ; Next 8 lines (1280 pixels). 279 | bne LoadMemory12 280 | 281 | LoadMemory13 282 | lda CounterLow 283 | sta $0006 ; Clock lower address. 284 | lda CounterHigh 285 | sta $0007 ; Clock upper address. 286 | lda #$03 287 | sta $0005 ; Clock data. 288 | lda $00F9 ; Pulse WE. 289 | 290 | ; 16 bit counter increment. 291 | inc CounterLow 292 | bne skipHighInc13 293 | inc CounterHigh 294 | skipHighInc13 295 | 296 | lda CounterHigh 297 | cmp #$41 ; Next 8 lines (1280 pixels). 298 | bne LoadMemory13 299 | 300 | LoadMemory14 301 | lda CounterLow 302 | sta $0006 ; Clock lower address. 303 | lda CounterHigh 304 | sta $0007 ; Clock upper address. 305 | lda #$02 306 | sta $0005 ; Clock data. 307 | lda $00F9 ; Pulse WE. 308 | 309 | ; 16 bit counter increment. 310 | inc CounterLow 311 | bne skipHighInc14 312 | inc CounterHigh 313 | skipHighInc14 314 | 315 | lda CounterHigh 316 | cmp #$46 ; Next 8 lines (1280 pixels). 317 | bne LoadMemory14 318 | 319 | LoadMemory15 320 | lda CounterLow 321 | sta $0006 ; Clock lower address. 322 | lda CounterHigh 323 | sta $0007 ; Clock upper address. 324 | lda #$01 325 | sta $0005 ; Clock data. 326 | lda $00F9 ; Pulse WE. 327 | 328 | ; 16 bit counter increment. 329 | inc CounterLow 330 | bne skipHighInc15 331 | inc CounterHigh 332 | skipHighInc15 333 | 334 | lda CounterHigh 335 | cmp #$50 ; Next 8 lines (1280 pixels). 336 | bne LoadMemory15 337 | 338 | ; Set VGA generator to "display" mode. 339 | lda #$00 340 | sta $00F8 341 | 342 | MainLoop 343 | jmp MainLoop 344 | 345 | ; Store the location of key program sections. 346 | ORG $FFFC 347 | ResetVector 348 | .word StartExe ; Start of execution. 349 | -------------------------------------------------------------------------------- /graphics/prince_of_persia.piskel: -------------------------------------------------------------------------------- 1 | {"modelVersion":2,"piskel":{"name":"pp","description":"","fps":12,"height":120,"width":160,"layers":["{\"name\":\"Layer 1\",\"opacity\":1,\"frameCount\":1,\"chunks\":[{\"layout\":[[0]],\"base64PNG\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAAc3ElEQVR4Xu1d63rktg5LHrJ9yD0PmfPJa6oQDJCUZyabJu2fbsa2LFEQCV4kv398fHy8qf/+lr/+6B/f//f+huJ6f1//PoQDcvv719vbr7/f3uL/LLwfcb1AzPsEYAju1/nE+bcSHv72k65LAP718fZGMjtweP4WABy/jX/Hfz/m+mXVDUH882MJwCH08d/HEPTb29tP/nsHgCgnlhnL8VtfZwM7FuEFgPhj/PtcrYfQT/AFbvG3n3S9DcBfb2/DPMfCnQAbk3HK98dcDwCihYV//9aA/wFwMRR2gcHKHTJbgHW2ELzwxwDsr49VDrzAWgBE8iw4IPIX5C7Mdb7z3/9jhwMtBJoZ4M4hN5bZj+KIj3LAn+RkoIMQDsMY/w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teVbyTB8NFumSTD+//jP7DYl2NZblXWKBMHBVgBn7JvsZjYjsFmuwlJZ0ni/wcFmIlgOyFsQ6fvj4ndJ6kzPiKuBPM8G5JAiMCRwGcGgd87kBLDXn9lQZuvsNqcICWOrP5RrKhz6dGgDmPh6aw5U38cTAJyEU0Y+23D5fBiaDFi0KZjIucs2iHJnWM3ha/ItFAyYARMEtx2oidwTttgQfQQvuTDDfKwVIIFXPYJRJAh+P0lAgMEAMOUhtmxwC5BZfBhDUIhlYGJQ78uAFOheRA6DaBCLw0OOAwOsmHxQaEIU9eQBoOlfB7DSBEnoGPDaNnXudplScb9EacCqDA8fRH/wAX0PLO1BYWVCpPWrQSq5dQMa7l/vxqDuKdCzUgr6AjjKxvgWEZv7hgOj9AkleSD9wi6n6CajqfuZe+HcAebmHP+sOk8ycQnlgSstcuMj5g6pIuYCTQcDcjYou3bue8TvGV1V7u+VeqFEXTSsquhcqgNeR67PiascBCwAiULBSA+OCfE6fE7gEdZhTJPV8NkzirKQhFmFGZCCbVn0LMMR71TPleBNnhGOKyzhRMzVikLzYlSefzZma96o/fROMZjj+DaBAk7uoYBOIXgDrYmOF0PA9bPI7/WHhVAtCaQAbIyTZ/JTxhontyP8QUcEVryY4ZiFJxUUnVCoOOxhNVYWX6plM+yhTwOENNvNVewx2BqOiDe6Z7z5eBUIXXuplQlj7kQasAKJiSRkXzO7PgFIBunud3/HM/qui1O88XjVfy3gLDvh/tT15odxqz4sAAAAASUVORK5CYII=\"}]}"],"hiddenFrames":[]}} -------------------------------------------------------------------------------- /graphics/prince_of_persia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nickbild/vectron_vga/bd94c7b8e63fbf45b39ea0350c750b48a680105b/graphics/prince_of_persia.png -------------------------------------------------------------------------------- /media/color_bars.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nickbild/vectron_vga/bd94c7b8e63fbf45b39ea0350c750b48a680105b/media/color_bars.jpg -------------------------------------------------------------------------------- /media/color_bars_sm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nickbild/vectron_vga/bd94c7b8e63fbf45b39ea0350c750b48a680105b/media/color_bars_sm.jpg -------------------------------------------------------------------------------- /media/full_setup.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nickbild/vectron_vga/bd94c7b8e63fbf45b39ea0350c750b48a680105b/media/full_setup.jpg -------------------------------------------------------------------------------- /media/full_setup_sm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nickbild/vectron_vga/bd94c7b8e63fbf45b39ea0350c750b48a680105b/media/full_setup_sm.jpg -------------------------------------------------------------------------------- /media/prince_of_persia.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nickbild/vectron_vga/bd94c7b8e63fbf45b39ea0350c750b48a680105b/media/prince_of_persia.jpg -------------------------------------------------------------------------------- /media/prince_of_persia_sm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nickbild/vectron_vga/bd94c7b8e63fbf45b39ea0350c750b48a680105b/media/prince_of_persia_sm.jpg -------------------------------------------------------------------------------- /media/vectron_64_focus_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nickbild/vectron_vga/bd94c7b8e63fbf45b39ea0350c750b48a680105b/media/vectron_64_focus_1.jpg -------------------------------------------------------------------------------- /media/vectron_64_focus_1_sm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nickbild/vectron_vga/bd94c7b8e63fbf45b39ea0350c750b48a680105b/media/vectron_64_focus_1_sm.jpg -------------------------------------------------------------------------------- /media/vectron_64_focus_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nickbild/vectron_vga/bd94c7b8e63fbf45b39ea0350c750b48a680105b/media/vectron_64_focus_2.jpg -------------------------------------------------------------------------------- /media/vectron_64_focus_2_sm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nickbild/vectron_vga/bd94c7b8e63fbf45b39ea0350c750b48a680105b/media/vectron_64_focus_2_sm.jpg -------------------------------------------------------------------------------- /media/vectron_vga.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nickbild/vectron_vga/bd94c7b8e63fbf45b39ea0350c750b48a680105b/media/vectron_vga.gif -------------------------------------------------------------------------------- /media/vectron_vga.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nickbild/vectron_vga/bd94c7b8e63fbf45b39ea0350c750b48a680105b/media/vectron_vga.jpg -------------------------------------------------------------------------------- /media/vectron_vga.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nickbild/vectron_vga/bd94c7b8e63fbf45b39ea0350c750b48a680105b/media/vectron_vga.mp4 -------------------------------------------------------------------------------- /media/vectron_vga_short.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nickbild/vectron_vga/bd94c7b8e63fbf45b39ea0350c750b48a680105b/media/vectron_vga_short.gif -------------------------------------------------------------------------------- /media/vectron_vga_sm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nickbild/vectron_vga/bd94c7b8e63fbf45b39ea0350c750b48a680105b/media/vectron_vga_sm.jpg -------------------------------------------------------------------------------- /sram_vectron_simulator/README.md: -------------------------------------------------------------------------------- 1 | This simulates sending signals from the Vectron 64 for rapid iteration. The working sequence is then used with the Vectron 64. 2 | -------------------------------------------------------------------------------- /sram_vectron_simulator/sram_vectron_simulator.ino: -------------------------------------------------------------------------------- 1 | /**** 2 | * Nick Bild 3 | * nick.bild@gmail.com 4 | * Simulate signals before implementing on Vectron 64. 5 | ****/ 6 | 7 | #include 8 | 9 | const byte screen_data[19200] PROGMEM = { 10 | 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,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1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 129 | 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0 130 | }; 131 | 132 | void setup() { 133 | pinMode(2, OUTPUT); 134 | pinMode(3, OUTPUT); 135 | pinMode(4, OUTPUT); 136 | pinMode(5, OUTPUT); 137 | pinMode(6, OUTPUT); 138 | pinMode(7, OUTPUT); 139 | pinMode(8, OUTPUT); 140 | pinMode(9, OUTPUT); 141 | 142 | pinMode(A0, OUTPUT); // Lower address clock. 143 | pinMode(A1, OUTPUT); // Upper address clock. 144 | pinMode(A2, OUTPUT); // Data clock. 145 | pinMode(A3, OUTPUT); // WE 146 | pinMode(A4, OUTPUT); // Mode clock (program = data0 high; monitor output = data1 low) 147 | 148 | digitalWrite(A0, 1); 149 | digitalWrite(A1, 1); 150 | digitalWrite(A2, 1); 151 | digitalWrite(A3, 1); 152 | digitalWrite(A4, 1); 153 | 154 | Serial.begin(9600); 155 | } 156 | 157 | int i = 0; 158 | int val = 0; 159 | 160 | void loop() { 161 | // Program mode. 162 | digitalWrite(2, 1); 163 | digitalWrite(A4, 0); 164 | delayMicroseconds(2); 165 | digitalWrite(A4, 1); 166 | 167 | 168 | 169 | for (int c=0; c<120; c++) { 170 | for (int r=0; r<160; r++) { 171 | 172 | i = r + ((c+1)*160); 173 | 174 | // Lower address. 175 | digitalWrite(2, bitRead(i,0)); 176 | digitalWrite(3, bitRead(i,1)); 177 | digitalWrite(4, bitRead(i,2)); 178 | digitalWrite(5, bitRead(i,3)); 179 | digitalWrite(6, bitRead(i,4)); 180 | digitalWrite(7, bitRead(i,5)); 181 | digitalWrite(8, bitRead(i,6)); 182 | digitalWrite(9, bitRead(i,7)); 183 | 184 | digitalWrite(A0, 0); 185 | delayMicroseconds(3); 186 | digitalWrite(A0, 1); 187 | 188 | // Upper address. 189 | digitalWrite(2, bitRead(i,8)); 190 | digitalWrite(3, bitRead(i,9)); 191 | digitalWrite(4, bitRead(i,10)); 192 | digitalWrite(5, bitRead(i,11)); 193 | digitalWrite(6, bitRead(i,12)); 194 | digitalWrite(7, bitRead(i,13)); 195 | digitalWrite(8, bitRead(i,14)); 196 | digitalWrite(9, bitRead(i,15)); 197 | 198 | digitalWrite(A1, 0); 199 | delayMicroseconds(3); 200 | digitalWrite(A1, 1); 201 | 202 | // Data. 203 | val = pgm_read_byte_near(screen_data + ((160*c)+r)); 204 | 205 | // white = 0 206 | // purple = 1 207 | // black = 2 208 | // teal = 3 209 | 210 | if (val == 0) { 211 | digitalWrite(2, 1); 212 | digitalWrite(3, 1); 213 | digitalWrite(4, 1); 214 | } else if (val == 1) { 215 | digitalWrite(2, 1); 216 | digitalWrite(3, 0); 217 | digitalWrite(4, 1); 218 | } else if (val == 2) { 219 | digitalWrite(2, 0); 220 | digitalWrite(3, 0); 221 | digitalWrite(4, 0); 222 | } else if (val == 3) { 223 | digitalWrite(2, 0); 224 | digitalWrite(3, 1); 225 | digitalWrite(4, 1); 226 | } 227 | 228 | digitalWrite(A2, 0); 229 | delayMicroseconds(3); 230 | digitalWrite(A2, 1); 231 | 232 | // WE pulse. 233 | digitalWrite(A3, 0); // WE 234 | delay(1); 235 | digitalWrite(A3, 1); // WE 236 | delay(1); 237 | } 238 | } 239 | 240 | 241 | Serial.println("Done writing."); 242 | 243 | // Display mode. 244 | digitalWrite(2, 0); 245 | digitalWrite(A4, 0); 246 | delayMicroseconds(2); 247 | digitalWrite(A4, 1); 248 | 249 | delay(99999999); 250 | 251 | } 252 | --------------------------------------------------------------------------------