Difference between revisions of "PicoVGA01"

From Land Boards Wiki
Jump to navigation Jump to search
Line 124: Line 124:
 
{| class="wikitable"
 
{| class="wikitable"
 
! Pico Pin
 
! Pico Pin
 +
! GPIO
 
! Signal Name
 
! Signal Name
 
! Color
 
! Color
Line 130: Line 131:
 
|-
 
|-
 
| 1
 
| 1
 +
| GP0
 
| B3
 
| B3
 
| BLU
 
| BLU
Line 136: Line 138:
 
|-
 
|-
 
| 2
 
| 2
 +
| GP1
 
| B4
 
| B4
 
| BLU
 
| BLU
Line 142: Line 145:
 
|-
 
|-
 
| 3
 
| 3
 +
| GND
 
| GND
 
| GND
 
| BRN
 
| BRN
Line 148: Line 152:
 
|-
 
|-
 
| 4
 
| 4
 +
| GP2
 
| G3
 
| G3
 
| GRN
 
| GRN
Line 154: Line 159:
 
|-
 
|-
 
| 5
 
| 5
 +
| GP3
 
| G4
 
| G4
 
| GRN
 
| GRN
Line 160: Line 166:
 
|-
 
|-
 
| 6
 
| 6
 +
| GP4
 
| G5
 
| G5
 
| GRN
 
| GRN
Line 166: Line 173:
 
|-
 
|-
 
| 7
 
| 7
 +
| GP5
 
| R2
 
| R2
 
| RED
 
| RED
Line 172: Line 180:
 
|-
 
|-
 
| 9
 
| 9
 +
| GP6
 
| R3
 
| R3
 
| RED
 
| RED
Line 178: Line 187:
 
|-
 
|-
 
| 10
 
| 10
 +
| GP7
 
| R4
 
| R4
 
| RED
 
| RED
Line 184: Line 194:
 
|-
 
|-
 
| 11
 
| 11
 +
| GP8
 
| CSYNC
 
| CSYNC
 
| GRY
 
| GRY
 
| VGAX49
 
| VGAX49
 
| 17
 
| 17
|-
 
| 23
 
| GND
 
| GRN
 
| AUD-FILT
 
| 2
 
|-
 
| 25
 
| AUDIO
 
| GRY
 
| AUD-FILT
 
| 1 or 3
 
|-
 
| 28
 
| GND
 
| BLK
 
| JOYPAD
 
| 11
 
 
|-
 
|-
 
| 21
 
| 21
 
| GP16
 
| GP16
 +
|
 
| BRN
 
| BRN
 
| JOYPAD
 
| JOYPAD
Line 215: Line 209:
 
| 22
 
| 22
 
| GP17
 
| GP17
 +
|
 
| ORG
 
| ORG
 
| JOYPAD
 
| JOYPAD
 
| 9
 
| 9
 +
|-
 +
| 23
 +
| GND
 +
| GND
 +
| GRN
 +
| AUD-FILT
 +
| 2
 
|-
 
|-
 
| 24
 
| 24
 
| GP18
 
| GP18
 +
|
 
| YEL
 
| YEL
 
| JOYPAD
 
| JOYPAD
 
| 8
 
| 8
 +
|-
 +
| 25
 +
| GP19
 +
| AUDIO
 +
| GRY
 +
| AUD-FILT
 +
| 1 or 3
 
|-
 
|-
 
| 26
 
| 26
 
| GP20
 
| GP20
 +
|
 
| GRN
 
| GRN
 
| JOYPAD
 
| JOYPAD
Line 233: Line 244:
 
| 27
 
| 27
 
| GP21
 
| GP21
 +
|
 
| BLU
 
| BLU
 
| JOYPAD
 
| JOYPAD
 
| 6
 
| 6
 +
|-
 +
| 28
 +
| GND
 +
| GND
 +
| BLK
 +
| JOYPAD
 +
| 11
 
|-
 
|-
 
| 29
 
| 29
 
| GP22
 
| GP22
 +
|
 
| VIO
 
| VIO
 
| JOYPAD
 
| JOYPAD
Line 245: Line 265:
 
| 31
 
| 31
 
| GP26
 
| GP26
 +
|
 
| GRY
 
| GRY
 
| JOYPAD
 
| JOYPAD
Line 251: Line 272:
 
| 32
 
| 32
 
| GP27
 
| GP27
 +
|
 
| WHT
 
| WHT
 
| JOYPAD
 
| JOYPAD

Revision as of 16:42, 18 July 2022

PicoVGA FRONT 3D.png

PicoVGA

PicoVGA uses a Raspberry Pi Pico to drive a VGA/TV display. PicoVGA was designed by Miroslav Nemecek.

The RP2040 processor contains 264 KB of RAM. This is not much for higher resolution image output and therefore RAM needs to be very sparing. In technical practice and for retro games (the processor does not have the power for more advanced games), 8-bit graphics output in R3G3B2 format (i.e. red 3 bits, green 3 bits and blue 2 bits) is fully sufficient. Output in 16 or 24 bits is not meaningful in normal practice, as the Raspberry Pico does not have enough memory or power to provide such large amounts of data in areas other than short demos. Using the dithering technique, interesting display results can be achieved even with 8-bit output.

PicoVGA diagram.jpg

Software

The PicoVGA library is written in C/C++ and allows output from the Raspberry Pico to a VGA monitor or PAL/NTSC TV, with a focus on ease of use in technical and gaming applications. It provides 4 graphic overlay layers with transparency, nearly 30 frame buffer formats that can be freely combined with each other, making do with limited RAM memory size. The limitation of output to 8 bits also contributes to RAM saving.

Features

  • 1 base layer and 3 overlay layers with transparency
  • 8-bit output in R3G 3:3:2 format
  • VGA progressive output up to 1280x960 resolution
  • TV output in PAL or NTSC interlaced mode
  • 30 frame buffer formats: graphics, tiles, text, special
  • Colour palettes
  • Screen split into segments of different formats
  • RLE compression
  • Transparency with selectable key colour
  • Hardware sprites
  • Output layers to different color bits (color planes)
  • Automatic configuration video mode timings
  • Automatic overclocking of processor
  • Library uses the 2nd core, main program uses 1st core
  • PWM mono audio output
  • Joystick connector(S)

Connectors

J1/J3 Pico breakout

J2 - Mono Audio

J4 - 5V USB B

J5 - Joystick

  • 1x12 Header matches pinout of JOYPAD card

RasPiPico VGA J5 JOYPAD.PNG

Joystick (DB-9)

RasPiPico VGA J6 JOYSTICK.PNG

MSX Joystick Schematic Circuit 382px.png

  1. UP
  2. DOWN
  3. LEFT
  4. RIGHT
  5. +VCC
  6. BUTTON I
  7. BUTTON II
  8. BUTTON COMMON
  9. GND
// #define PB_RT 16
// #define PB_LT 17
// #define PB_CF 18
// #define PB_DN 20
// #define PB_UR 21
//	keyboard control: 
//		'L' right, RT - BRN - RIGHT
//		'I' turn, CF - YEL - CENTER FIRE ROTATE
//		'J' left, LF - ORG - LEFT
//		'K' drop, DN - BLU - DOWN
//		'A' pause UR - GRY - UPPER RIGHT

Prototype Hardware

PicoVGA P18425-720px.jpg

Raspberry Pi Pico Breakout Card

RasPiPico.PNG

VGA Adapter Card

VGAX49 P901-cropped-720px.jpg

RasPiPico VGA J1.PNG

RasPiPico VGA Wiring.PNG

Audio Filter Card

RasPiPico AUDIO Wiring.PNG

Joy Stick (JoyPad)

P1826-CROPPED-720PX.jpg

Prototype Build Wiring

Pico Pin GPIO Signal Name Color Dest Pin
1 GP0 B3 BLU VGAX49 13
2 GP1 B4 BLU VGAX49 12
3 GND GND BRN VGAX49 20
4 GP2 G3 GRN VGAX49 8
5 GP3 G4 GRN VGAX49 7
6 GP4 G5 GRN VGAX49 6
7 GP5 R2 RED VGAX49 3
9 GP6 R3 RED VGAX49 2
10 GP7 R4 RED VGAX49 1
11 GP8 CSYNC GRY VGAX49 17
21 GP16 BRN JOYPAD 10
22 GP17 ORG JOYPAD 9
23 GND GND GRN AUD-FILT 2
24 GP18 YEL JOYPAD 8
25 GP19 AUDIO GRY AUD-FILT 1 or 3
26 GP20 GRN JOYPAD 7
27 GP21 BLU JOYPAD 6
28 GND GND BLK JOYPAD 11
29 GP22 VIO JOYPAD 5
31 GP26 GRY JOYPAD 4
32 GP27 WHT JOYPAD 3