Difference between revisions of "PicoVGA01"

From Land Boards Wiki
Jump to navigation Jump to search
(26 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
[[File:tindie-mediums.png|link=https://www.tindie.com/products/land_boards/picovga-card/]]
 +
 +
<video type="youtube">vfxayfrZSjY</video>
 +
 
[[file:PicoVGA01_P1080468-720px.jpg]]
 
[[file:PicoVGA01_P1080468-720px.jpg]]
  
 
== PicoVGA ==
 
== PicoVGA ==
 
<video type="youtube">wX1IPa3Q0LU</video>
 
  
 
[http://www.breatharian.eu/hw/picovga/index_en.html PicoVGA] uses a Raspberry Pi Pico to drive a VGA/TV display. PicoVGA was designed by Miroslav Nemecek.
 
[http://www.breatharian.eu/hw/picovga/index_en.html PicoVGA] uses a Raspberry Pi Pico to drive a VGA/TV display. PicoVGA was designed by Miroslav Nemecek.
Line 13: Line 15:
 
== Features ==
 
== Features ==
  
* Raspberry Pi Pico
+
* [[Raspberry Pi Pico]]
 
** Automatic overclocking of processor
 
** Automatic overclocking of processor
 
** Library uses the 2nd core, main program uses 1st core
 
** Library uses the 2nd core, main program uses 1st core
Line 21: Line 23:
 
** Automatic configuration video mode timings
 
** Automatic configuration video mode timings
 
** Composite sync
 
** Composite sync
* Video formats
+
** Video formats
** 1 base layer and 3 overlay layers with transparency
+
*** 1 base layer and 3 overlay layers with transparency
** 30 frame buffer formats: graphics, tiles, text, special
+
*** 30 frame buffer formats: graphics, tiles, text, special
** Colour palettes
+
*** Colour palettes
** Screen split into segments of different formats
+
*** Screen split into segments of different formats
** RLE compression
+
*** RLE compression
** Transparency with selectable key colour
+
*** Transparency with selectable key colour
** Hardware sprites
+
*** Hardware sprites
** Output layers to different color bits (color planes)
+
*** Output layers to different color bits (color planes)
 
* PWM mono audio output
 
* PWM mono audio output
 +
** 3.5mm stereo jack
 
* Joystick connector(s)
 
* Joystick connector(s)
** [[JOYPAD]] or 9-pin "Atari" Joystick
+
** [[JOYPAD]] or
* Fits into 100x76mm extruded aluminum enclosure
+
** 9-pin "Atari" Joystick
 +
* 99.5x69.5mm card
 +
** Fits into [https://www.ebay.com/sch/i.html?_from=R40&_trksid=p2334524.m570.l1313&_nkw=100+76+35+enclosure&_sacat=0&LH_TitleDesc=0&_osacat=0&_odkw=10076+enclosure&LH_PrefLoc=2 100x76x35mm extruded aluminum enclosure]
 
* (4) 4-40 mounting holes
 
* (4) 4-40 mounting holes
 +
* [https://hackaday.io/project/186747-picovga-with-joystick-build Hackaday page]
  
 
== Connectors ==
 
== Connectors ==
Line 319: Line 325:
 
</pre>
 
</pre>
  
==== JOYPAD configured as Atari Joystick with DB-9 ====
+
==== Rev 1 JOYPAD configured as Atari Joystick with DB-9 ====
  
 
[[file:PicoVGA_JOYPAD_P18499-720px.jpg]]
 
[[file:PicoVGA_JOYPAD_P18499-720px.jpg]]
 +
 +
==== Rev 2 JOYPAD configured as Atari Joystick with DB-9 ====
 +
 +
[[file:PicoVGA01_JOYPAD-Rev2_P18581-720px.jpg]]
  
 
==== Atari Joystick ====
 
==== Atari Joystick ====
Line 585: Line 595:
 
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.
 
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.
  
* [https://github.com/Panda381/PicoVGA PicoVGA GitHub repository]
+
=== Download UF2 ===
* [https://github.com/land-boards/RasPiPico/tree/main/PicoVGA Our PicoVGA GitHub repository]
+
 
 +
* Remove power (both USB B and USB Micro cable)
 +
* Hold down boot button while plugging in USB Micro cable
 +
* Release boot button
 +
* Pico drive will appear on computer
 +
* Drag/drop the .uf2 file to the drive
 +
* Card will reboot and run downloaded code
 +
 
 +
=== Build Template ===
 +
 
 +
* Requires C++ SDK
 +
* Can be used as a baseline for new code development
 +
* [https://github.com/land-boards/RasPiPico/tree/main/PicoVGA/Build_Template Code template in GitHub]
 +
* Arduino style setup() and loop() functions
 +
* Source code in [https://github.com/land-boards/RasPiPico/tree/main/PicoVGA/Build_Template/src src folder]
 +
** [https://github.com/land-boards/RasPiPico/blob/main/PicoVGA/Build_Template/src/main.cpp main.cpp file]
 +
* Type x to run batch files for build
 +
* Build results
 +
 
 +
<pre>
 +
  text    data    bss    dec    hex filename
 +
  12192      28    980  13200    3390 build/program.elf
 +
</pre>
  
 
=== PicoVGA examples ===
 
=== PicoVGA examples ===
  
 +
* [https://github.com/Panda381/PicoVGA PicoVGA GitHub repository]
 +
* [https://github.com/land-boards/RasPiPico/tree/main/PicoVGA Our PicoVGA GitHub repository]
 
* ProgramNameJP = [[JOYPAD]] version of the programs
 
* ProgramNameJP = [[JOYPAD]] version of the programs
 
** [[JOYPAD]] has 3 more buttons than the JoyStick
 
** [[JOYPAD]] has 3 more buttons than the JoyStick
Line 598: Line 632:
 
<pre>
 
<pre>
 
Ants - card game
 
Ants - card game
keyboard control: 'J' left, 'L' right, space select, 'D' discard, 'H' help, 'Q' quit
+
      keyboard control: 'J' left, 'L' right, space select, 'D' discard, 'H' help, 'Q' quit
  
 
AntsJP - card game
 
AntsJP - card game
JoyPad control: left, right, centerFire=select, upperLeft=discard, Fire=help move, upperRight=quit
+
        JoyPad control: left, right, centerFire=select, upperLeft=discard, Fire=help move, upperRight=quit
 
 
 
AntsJS - card game
 
AntsJS - card game
JoyStick control: left, right, Up=select, down=discard, 'H'=help move, Fire=quit
+
        JoyStick control: left, right, Up=select, down=discard, 'H'=help move, Fire=quit
  
 
Balloons - sprite demo, floating balloons
 
Balloons - sprite demo, floating balloons
Line 613: Line 647:
  
 
Eggs - game of Eggs+Chickens+Hens, variant of the Reversi game
 
Eggs - game of Eggs+Chickens+Hens, variant of the Reversi game
keyboard control: 'L' right, 'I' up, 'J' left, 'K' down, 'H' help, 'Q' quit, 'P' 2 players, 'D' demo, space stone, Enter ok
+
      keyboard control: 'L' right, 'I' up, 'J' left, 'K' down, 'H' help, 'Q' quit, 'P' 2 players, 'D' demo, space stone, Enter ok
  
 
EggsJP - game of Eggs+Chickens+Hens, variant of the Reversi game
 
EggsJP - game of Eggs+Chickens+Hens, variant of the Reversi game
  JoyPad control: right, up, left, down, fire=help, upperRight=quit, centerFire=stone, upperLeft=ok
+
        JoyPad control: right, up, left, down, fire=help, upperRight=quit, centerFire=stone, upperLeft=ok
  keyboard control: 'P' 2 players, 'D' demo
+
        keyboard control: 'P' 2 players, 'D' demo
  
 
EggsJS - game of Eggs+Chickens+Hens, variant of the Reversi game
 
EggsJS - game of Eggs+Chickens+Hens, variant of the Reversi game
  JoyStick control: right, up, left, down, Fire=stone
+
        JoyStick control: right, up, left, down, Fire=stone
  keyboard control: 'H'=help, Enter=ok, 'Q'=quit, 'P' 2 players, 'D' demo
+
        keyboard control: 'H'=help, Enter=ok, 'Q'=quit, 'P' 2 players, 'D' demo
  
 
Fifteen - game
 
Fifteen - game
keyboard control: 'L' right, 'I' up, 'J' left, 'K' down, 'Q' new game
+
          keyboard control: 'L' right, 'I' up, 'J' left, 'K' down, 'Q' new game
  
 
FifteenJP - game
 
FifteenJP - game
    JoyStick control: right, up, left, down, upperRight=new game
+
            JoyPad control: right, up, left, down, upperRight=new game
  
 
FifteenJS - game
 
FifteenJS - game
    JoyPad control: right, up, left, down, Fire=new game
+
            JoyStick control: right, up, left, down, Fire=new game
  
 
Flag - animation of flag fluttering in the wind
 
Flag - animation of flag fluttering in the wind
  
 
Ghost Racing - car racing game, racing with player's ghost copy, demonstration of 3D perspective projection
 
Ghost Racing - car racing game, racing with player's ghost copy, demonstration of 3D perspective projection
keyboard control: 'I' gear up, 'K' gear down, 'J' turn left, 'L' turn right
+
              keyboard control: 'I' gear up, 'K' gear down, 'J' turn left, 'L' turn right
  
 
Ghost RacingJP - car racing game, racing with player's ghost copy, demonstration of 3D perspective projection
 
Ghost RacingJP - car racing game, racing with player's ghost copy, demonstration of 3D perspective projection
JoyPad control: up=shift gear up, down=shift gear down, left=turn left, right=turn right
+
                JoyPad control: up=shift gear up, down=shift gear down, left=turn left, right=turn right
  
 
Ghost RacingJS - car racing game, racing with player's ghost copy, demonstration of 3D perspective projection
 
Ghost RacingJS - car racing game, racing with player's ghost copy, demonstration of 3D perspective projection
JoyStick control: up=shift gear up, down=shift gear down, left=turn left, right=turn right
+
                JoyStick control: up=shift gear up, down=shift gear down, left=turn left, right=turn right
  
 
Ginger House - picture fairy tale book
 
Ginger House - picture fairy tale book
keyboard control: 'J' previous page, 'L' next page
+
              keyboard control: 'J' previous page, 'L' next page
  
 
Ginger HouseJP - picture fairy tale book
 
Ginger HouseJP - picture fairy tale book
JoyPad control: left=previous page, right=next page
+
                JoyPad control: left=previous page, right=next page
  
 
Ginger HouseJS - picture fairy tale book
 
Ginger HouseJS - picture fairy tale book
JoyStick control: left=previous page, right=next page
+
                JoyStick control: left=previous page, right=next page
  
 
Hello - simple demonstration, print text "Hello world!" on the screen
 
Hello - simple demonstration, print text "Hello world!" on the screen
Line 659: Line 693:
  
 
Life - game, reproducing cells
 
Life - game, reproducing cells
keyboard control: 'L' right, 'I' up, 'J' left, 'K' down, 'C' copy, 'V' paste, 'D' clear,
+
      keyboard control: 'L' right, 'I' up, 'J' left, 'K' down, 'C' copy, 'V' paste, 'D' clear,
space flip state, Enter run life, 0..9 select slot
+
      space flip state, Enter run life, 0..9 select slot
  
 
LifeJP - game, reproducing cells
 
LifeJP - game, reproducing cells
JoyPad control: right=right, up=up, left=left, dowb=down, upperLeft=copy, Fire=paste, centerFire=flip state,  
+
        JoyPad control: right=right, up=up, left=left, dowb=down, upperLeft=copy, Fire=paste, centerFire=flip state,  
UpperRight=run life
+
        UpperRight=run life
keyboard control: 'D' clear, 0..9 select slot
+
keyboard control: 'D' clear, 0..9 select slot
  
 
LifeJS - game, reproducing cells
 
LifeJS - game, reproducing cells
JoyStick control: right=right, up=up, left=left, dowb=down, Fire=flip state,  
+
        JoyStick control: right=right, up=up, left=left, dowb=down, Fire=flip state,  
keyboard control: 'D' clear, 0..9 select slot, 'C'=copy, 'V'=paste, Enter=run life
+
        keyboard control: 'D' clear, 0..9 select slot, 'C'=copy, 'V'=paste, Enter=run life
  
 
Lines - moving line patterns
 
Lines - moving line patterns
  
 
Mandelbrot - fractal pattern generator
 
Mandelbrot - fractal pattern generator
keyboard control: 'E' up, 'S' left, 'D' right, 'X' down, 'Q' zoom in, 'A' zoom out,
+
            keyboard control: 'E' up, 'S' left, 'D' right, 'X' down, 'Q' zoom in, 'A' zoom out,
'L' low resolution 132x100, 'M' medium resolution 264x200, 'H' high resolution 528x400,
+
            'L' low resolution 132x100, 'M' medium resolution 264x200, 'H' high resolution 528x400,
'I' integer arithmetics, 'F' float arithmetics, 'B' double arithmetics,
+
            'I' integer arithmetics, 'F' float arithmetics, 'B' double arithmetics,
'O' decrease number of steps, 'P' increase number of steps, 'U' increase system clock,
+
            'O' decrease number of steps, 'P' increase number of steps, 'U' increase system clock,
'T' decrease system clock, space redraw
+
            'T' decrease system clock, space redraw
  
 
MandelbrotJP - fractal pattern generator
 
MandelbrotJP - fractal pattern generator
JoyPad control: Up, left, right, down, Fire zoom in, upper left zoom out,
+
              JoyPad control: Up, left, right, down, Fire zoom in, upper left zoom out,
keyboard control: 'L' low resolution 132x100, 'M' medium resolution 264x200, 'H' high resolution 528x400,
+
              keyboard control: 'L' low resolution 132x100, 'M' medium resolution 264x200, 'H' high resolution 528x400,
'I' integer arithmetics, 'F' float arithmetics, 'B' double arithmetics,
+
              'I' integer arithmetics, 'F' float arithmetics, 'B' double arithmetics,
'O' decrease number of steps, 'P' increase number of steps, 'U' increase system clock,
+
              'O' decrease number of steps, 'P' increase number of steps, 'U' increase system clock,
'T' decrease system clock, space redraw
+
              'T' decrease system clock, space redraw
  
 
MandelbrotJS - fractal pattern generator
 
MandelbrotJS - fractal pattern generator
JoyStick control: Up, left, right, down, Fire zoom in  
+
              JoyStick control: Up, left, right, down, Fire zoom in  
keyboard control: 'A' zoom out,
+
              keyboard control: 'A' zoom out,
'L' low resolution 132x100, 'M' medium resolution 264x200, 'H' high resolution 528x400,
+
              'L' low resolution 132x100, 'M' medium resolution 264x200, 'H' high resolution 528x400,
'I' integer arithmetics, 'F' float arithmetics, 'B' double arithmetics,
+
              'I' integer arithmetics, 'F' float arithmetics, 'B' double arithmetics,
'O' decrease number of steps, 'P' increase number of steps, 'U' increase system clock,
+
              'O' decrease number of steps, 'P' increase number of steps, 'U' increase system clock,
'T' decrease system clock, space redraw
+
              'T' decrease system clock, space redraw
  
 
Matrix Rain - simulation of Matrix code rain
 
Matrix Rain - simulation of Matrix code rain
  
 
Maze - game, simple maze with maze generator
 
Maze - game, simple maze with maze generator
keyboard control: 'J' left, 'I' up, 'L' right, 'K' down, 'H' help (show door)
+
      keyboard control: 'J' left, 'I' up, 'L' right, 'K' down, 'H' help (show door)
  
 
MazeJP - game, simple maze with maze generator
 
MazeJP - game, simple maze with maze generator
JoyPad control: left, up, right, down, upperRight=help (show door)
+
        JoyPad control: left, up, right, down, upperRight=help (show door)
  
 
MazeJS - game, simple maze with maze generator
 
MazeJS - game, simple maze with maze generator
JoyStick control: left, up, right, down, Fire=help (show door)
+
        JoyStick control: left, up, right, down, Fire=help (show door)
  
 
Monoscope - test of various graphic modes
 
Monoscope - test of various graphic modes
keyboard control: '0'..'9', 'A'..'U' select videomode
+
            keyboard control: '0'..'9', 'A'..'U' select videomode
  
 
Oscilloscope - demo oscilloscope simulator
 
Oscilloscope - demo oscilloscope simulator
  
 
Pacman - game of popular Pac-man
 
Pacman - game of popular Pac-man
keyboard control: 'J' left, 'I' up, 'L' right, 'K' down, 'A' pause
+
        keyboard control: 'J' left, 'I' up, 'L' right, 'K' down, 'A' pause
  
 
PacmanJP - game of popular Pac-man
 
PacmanJP - game of popular Pac-man
JoyPad control: left, up, right, down, upper right pause
+
          JoyPad control: left, up, right, down, upper right pause
 +
 
 +
PacmanJS - game of popular Pac-man
 +
          JoyStick control: left, up, right, down, Fire=pause
  
 
Pi - calculate Pi at 4800 digits
 
Pi - calculate Pi at 4800 digits
Line 724: Line 761:
  
 
Sokoban - game with 3000 puzzles and with their solutions
 
Sokoban - game with 3000 puzzles and with their solutions
keyboard control: 'L' right, 'I' up, 'J' left, 'K' down, 'H' help (solution),
+
          keyboard control: 'L' right, 'I' up, 'J' left, 'K' down, 'H' help (solution),
'R' restart scene, 'Q' previous level, 'W' next level, 'P' info
+
          'R' restart scene, 'Q' previous level, 'W' next level, 'P' info
  
 
SokobanJP - game with 3000 puzzles and with their solutions
 
SokobanJP - game with 3000 puzzles and with their solutions
JoyPad control: right, up, left, down, upperLeft=previous level, fire=next level, uppperRight=restart scene,  
+
            JoyPad control: right, up, left, down, upperLeft=previous level, fire=next level, uppperRight=restart scene,  
keyboard 'H' help (solution), 'P' info
+
            keyboard 'H' help (solution), 'P' info
  
 
SokobanJS - game with 3000 puzzles and with their solutions
 
SokobanJS - game with 3000 puzzles and with their solutions
JoyStick control: right, up, left, down, Fire=restart scene,  
+
            JoyStick control: right, up, left, down, Fire=restart scene,  
'Q' previous level, 'W' next level, 'P' info
+
            'Q' previous level, 'W' next level, 'P' info
keyboard 'H' help (solution), 'P' info
+
            keyboard 'H' help (solution), 'P' info
  
 
Spheres - draw random spheres
 
Spheres - draw random spheres
Line 741: Line 778:
  
 
Tetris - game
 
Tetris - game
keyboard control: 'L' right, 'I' turn, 'J' left, 'K' drop, 'A' pause
+
        keyboard control: 'L' right, 'I' turn, 'J' left, 'K' drop, 'A' pause
  
 
TetrisJP - game
 
TetrisJP - game
JoyPad control: right, center fire turn, left, down = drop, upper right = pause
+
          JoyPad control: right, center fire turn, left, down = drop, upper right = pause
  
 
TetrisJS - game
 
TetrisJS - game
JoyStick control: right, up turn, left, down = drop, Fire = pause
+
          JoyStick control: right, up turn, left, down = drop, Fire = pause
  
 
Train - puzzle game with 50 levels and with their solutions
 
Train - puzzle game with 50 levels and with their solutions
keyboard control: 'L' right, 'I' up, 'J' left, 'K' down, 'H' help (solution), Enter OK, Esc escape, BS backspace
+
        keyboard control: 'L' right, 'I' up, 'J' left, 'K' down, 'H' help (solution), Enter OK, Esc escape, BS backspace
  
 
TrainJP - puzzle game with 50 levels and with their solutions
 
TrainJP - puzzle game with 50 levels and with their solutions
JoyPad control: right, up, left, down, centerFire=OK, upperLeft=escape, fire=backspace, upperRight=help (solution),  
+
          JoyPad control: right, up, left, down, centerFire=OK, upperLeft=escape, fire=backspace, upperRight=help (solution),  
  
 
TrainJS - puzzle game with 50 levels and with their solutions
 
TrainJS - puzzle game with 50 levels and with their solutions
JoyStick control: right, up, left, down, Fire=OK,  
+
          JoyStick control: right, up, left, down, Fire=OK,  
Esc=escape, BS=backspace, 'H'=help (solution),  
+
          Esc=escape, BS=backspace, 'H'=help (solution),  
  
 
Twister - deformable block covered with 4 textures
 
Twister - deformable block covered with 4 textures
Line 763: Line 800:
 
Water surface - simulation of a rippling water surface
 
Water surface - simulation of a rippling water surface
 
</pre>
 
</pre>
 +
 +
<video type="youtube">wX1IPa3Q0LU</video>
  
 
== Assembly Sheet ==
 
== Assembly Sheet ==
  
 
* [[PicoVGA01 Rev 1 Assembly Sheet]]
 
* [[PicoVGA01 Rev 1 Assembly Sheet]]

Revision as of 11:57, 21 August 2022

Tindie-mediums.png

PicoVGA01 P1080468-720px.jpg

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

Features

  • Raspberry Pi Pico
    • Automatic overclocking of processor
    • Library uses the 2nd core, main program uses 1st core
  • VGA
    • 8-bit output in R:G:B 3:3:2 format (256 colors)
    • VGA progressive output up to 1280x960 resolution
    • Automatic configuration video mode timings
    • Composite sync
    • Video formats
      • 1 base layer and 3 overlay layers with transparency
      • 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)
  • PWM mono audio output
    • 3.5mm stereo jack
  • Joystick connector(s)
    • JOYPAD or
    • 9-pin "Atari" Joystick
  • 99.5x69.5mm card
  • (4) 4-40 mounting holes
  • Hackaday page

Connectors

J1/J3 Pico Breakout Headers

  • 2 of 1x20 headers

PicoVGA1 J1 J3.PNG

Pico Pin Use

  • 8 spare pins
  • JOYPAD has more buttons than Atari Joystick (8 vs 5)
Pico Pin Pico Signal PicoMite Pico Pin Pico Signal PicoMite DB-9 JOYSTICK
1 GP0 BLU_LO 40 VBUS USB_PWR
2 GP1 BLU_HI 39 VSYS 5V
3 GND GND 38 GND GND
4 GP2 GRN_LO 37 VEN3 VEN3
5 GP3 GRN_MID 36 V3OUT +3.3V J6-7 NOT USED
6 GP4 GRN_HI 35 ADCREF ADCREF
7 GP5 RED_LO 34 GP28 SPARE
8 GND GND 33 GND GND
9 GP6 RED_MID 32 GP27 JOYPAD_UP
10 GP7 RED_HI 31 GP26 JOYPAD_UPPER_RIGHT J6-5 PADDLEB
11 GP8 CSYNC 30 RUN RUN
12 GP9 SPARE 29 GP22 JOYPAD_DOWN J6-9 PADDLEA
13 GND GND 28 GND GND
14 GP10 SPARE 27 GP21 JOYPAD_CENTER_FIRE J6-4 RIGHT
15 GP11 SPARE 26 GP20 JOYPAD_LEFT J6-3 LEFT
16 GP12 SPARE 25 AUDIO AUDIO_MONO
17 GP13 SPARE 24 GP18 JOYPAD_FIRE J6-2 DOWN
18 GND GND 23 GND GND J6-8 GND
19 GP14 SPARE 22 GP17 JOYPAD_RIGHT J6-6 FIRE
20 GP15 SPARE 21 GP16 JOYPAD_UPPER_LEFT J6-1 UP

J2 - Mono Audio

  • 3.5mm stereo jack
  • Use with external amplified speakers
  • Mono signal on both speakers

PicoVGA1 Audio J2.PNG

J4 - 5V USB B

  • Power the card in an enclosure
  • 5V power
  • Full-size USB B
  • No USB signals

PicoVGA1 DC J4.PNG

J5 - JOYPAD

P1826-CROPPED-720PX.jpg

  • Land Boards JOYPAD card
  • Optional 1x12 Header matches pinout of JOYPAD card
    • 8 switches
      • Up, Down, Left, Right, Fire, Center Fire, Upper Left, Upper Right
  • JOYPAD card can be built without pull-up resistors
  • 1:1 cable between PicoVGA01 and JOYPAD cards
    • Can use 10 pin Dupont housings (don't need VCC connections)

RasPiPico VGA J5 JOYPAD.PNG

// Init the JoyPad pins
// #define PB_UL 16		// Upper Left pushbutton
// #define PB_RT 17		// Right direction
// #define PB_FR 18		// Fire
// #define PB_LT 20		// Left direction
// #define PB_CF 21		// Center Fire
// #define PB_DN 22		// Down direction
// #define PB_UR 26		// Upper right
// #define PB_UP 27		// Up direction

J6 - Joystick (DB-9)

RasPiPico VGA J6 JOYSTICK.PNG


// Atari Joystick DB-9 pushbutton to Pico pin mapping
#define PB_UP 16		// Up direction
#define PB_DN 18		// Down direction
#define PB_LT 20		// Left direction
#define PB_RT 21		// Right direction
#define PB_FR 17		// Fire

Rev 1 JOYPAD configured as Atari Joystick with DB-9

PicoVGA JOYPAD P18499-720px.jpg

Rev 2 JOYPAD configured as Atari Joystick with DB-9

PicoVGA01 JOYPAD-Rev2 P18581-720px.jpg

Atari Joystick

  • Tested/works
  • Atari Joystick pinout

Atari joystick pinout.png

Amazon Atari Joystick.PNG

MSX Joystick

  • Incompatible?

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

J7 - 3.3V

  • 1x2 header
  • Additional power pins for external use

PicoVGA1 3V J7.PNG

Schematic

Connector Views

  • Joystick/power

PicoVGA01 P1080474-720px.jpg

  • VGA/audio

PicoVGA01 P1080475-720px.jpg

Enclosure

  • 99.5mmx69.5mm outline
    • Board is designed to fit into Aluminum Project Box Enclosure DIY 100*76*35mm - ebay search
    • VGA, 3.5mm Audio on one end
    • USB B (Power), JoyStick DB-9 on the opposite end

PicoVGA01 Mechanicals

PicoVGA01 Mechs.PNG

Prototype Build Hardware

PicoVGA P1080432-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

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

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.

Download UF2

  • Remove power (both USB B and USB Micro cable)
  • Hold down boot button while plugging in USB Micro cable
  • Release boot button
  • Pico drive will appear on computer
  • Drag/drop the .uf2 file to the drive
  • Card will reboot and run downloaded code

Build Template

   text    data     bss     dec     hex filename
  12192      28     980   13200    3390 build/program.elf

PicoVGA examples

Ants - card game
       keyboard control: 'J' left, 'L' right, space select, 'D' discard, 'H' help, 'Q' quit

AntsJP - card game
         JoyPad control: left, right, centerFire=select, upperLeft=discard, Fire=help move, upperRight=quit
	
AntsJS - card game
         JoyStick control: left, right, Up=select, down=discard, 'H'=help move, Fire=quit

Balloons - sprite demo, floating balloons

Draw - draw graphics demo

Earth - rotating Earth globe

Eggs - game of Eggs+Chickens+Hens, variant of the Reversi game
       keyboard control: 'L' right, 'I' up, 'J' left, 'K' down, 'H' help, 'Q' quit, 'P' 2 players, 'D' demo, space stone, Enter ok

EggsJP - game of Eggs+Chickens+Hens, variant of the Reversi game
         JoyPad control: right, up, left, down, fire=help, upperRight=quit, centerFire=stone, upperLeft=ok
         keyboard control: 'P' 2 players, 'D' demo

EggsJS - game of Eggs+Chickens+Hens, variant of the Reversi game
         JoyStick control: right, up, left, down, Fire=stone
         keyboard control: 'H'=help, Enter=ok, 'Q'=quit, 'P' 2 players, 'D' demo

Fifteen - game
          keyboard control: 'L' right, 'I' up, 'J' left, 'K' down, 'Q' new game

FifteenJP - game
            JoyPad control: right, up, left, down, upperRight=new game

FifteenJS - game
            JoyStick control: right, up, left, down, Fire=new game

Flag - animation of flag fluttering in the wind

Ghost Racing - car racing game, racing with player's ghost copy, demonstration of 3D perspective projection
               keyboard control: 'I' gear up, 'K' gear down, 'J' turn left, 'L' turn right

Ghost RacingJP - car racing game, racing with player's ghost copy, demonstration of 3D perspective projection
                 JoyPad control: up=shift gear up, down=shift gear down, left=turn left, right=turn right

Ghost RacingJS - car racing game, racing with player's ghost copy, demonstration of 3D perspective projection
                 JoyStick control: up=shift gear up, down=shift gear down, left=turn left, right=turn right

Ginger House - picture fairy tale book
               keyboard control: 'J' previous page, 'L' next page

Ginger HouseJP - picture fairy tale book
                 JoyPad control: left=previous page, right=next page

Ginger HouseJS - picture fairy tale book
                 JoyStick control: left=previous page, right=next page

Hello - simple demonstration, print text "Hello world!" on the screen

Hypno - hypnotizing rotating pattern

Level Meter - demo of music volume level indication

Life - game, reproducing cells
       keyboard control: 'L' right, 'I' up, 'J' left, 'K' down, 'C' copy, 'V' paste, 'D' clear,
       space flip state, Enter run life, 0..9 select slot

LifeJP - game, reproducing cells
         JoyPad control: right=right, up=up, left=left, dowb=down, upperLeft=copy, Fire=paste, centerFire=flip state, 
         UpperRight=run life
	 keyboard control: 'D' clear, 0..9 select slot

LifeJS - game, reproducing cells
         JoyStick control: right=right, up=up, left=left, dowb=down, Fire=flip state, 
         keyboard control: 'D' clear, 0..9 select slot, 'C'=copy, 'V'=paste, Enter=run life

Lines - moving line patterns

Mandelbrot - fractal pattern generator
             keyboard control: 'E' up, 'S' left, 'D' right, 'X' down, 'Q' zoom in, 'A' zoom out,
             'L' low resolution 132x100, 'M' medium resolution 264x200, 'H' high resolution 528x400,
             'I' integer arithmetics, 'F' float arithmetics, 'B' double arithmetics,
             'O' decrease number of steps, 'P' increase number of steps, 'U' increase system clock,
             'T' decrease system clock, space redraw

MandelbrotJP - fractal pattern generator
               JoyPad control: Up, left, right, down, Fire zoom in, upper left zoom out,
               keyboard control: 'L' low resolution 132x100, 'M' medium resolution 264x200, 'H' high resolution 528x400,
              'I' integer arithmetics, 'F' float arithmetics, 'B' double arithmetics,
              'O' decrease number of steps, 'P' increase number of steps, 'U' increase system clock,
              'T' decrease system clock, space redraw

MandelbrotJS - fractal pattern generator
               JoyStick control: Up, left, right, down, Fire zoom in 
               keyboard control: 'A' zoom out,
               'L' low resolution 132x100, 'M' medium resolution 264x200, 'H' high resolution 528x400,
               'I' integer arithmetics, 'F' float arithmetics, 'B' double arithmetics,
               'O' decrease number of steps, 'P' increase number of steps, 'U' increase system clock,
               'T' decrease system clock, space redraw

Matrix Rain - simulation of Matrix code rain

Maze - game, simple maze with maze generator
       keyboard control: 'J' left, 'I' up, 'L' right, 'K' down, 'H' help (show door)

MazeJP - game, simple maze with maze generator
         JoyPad control: left, up, right, down, upperRight=help (show door)

MazeJS - game, simple maze with maze generator
         JoyStick control: left, up, right, down, Fire=help (show door)

Monoscope - test of various graphic modes
            keyboard control: '0'..'9', 'A'..'U' select videomode

Oscilloscope - demo oscilloscope simulator

Pacman - game of popular Pac-man
         keyboard control: 'J' left, 'I' up, 'L' right, 'K' down, 'A' pause

PacmanJP - game of popular Pac-man
           JoyPad control: left, up, right, down, upper right pause

PacmanJS - game of popular Pac-man
           JoyStick control: left, up, right, down, Fire=pause

Pi - calculate Pi at 4800 digits

Pixels - random pixels

Raytrace - ray tracing 3D demonstration of mirror spheres

Sokoban - game with 3000 puzzles and with their solutions
          keyboard control: 'L' right, 'I' up, 'J' left, 'K' down, 'H' help (solution),
          'R' restart scene, 'Q' previous level, 'W' next level, 'P' info

SokobanJP - game with 3000 puzzles and with their solutions
            JoyPad control: right, up, left, down, upperLeft=previous level, fire=next level, uppperRight=restart scene, 
            keyboard 'H' help (solution), 'P' info

SokobanJS - game with 3000 puzzles and with their solutions
            JoyStick control: right, up, left, down, Fire=restart scene, 
            'Q' previous level, 'W' next level, 'P' info
            keyboard 'H' help (solution), 'P' info

Spheres - draw random spheres

Spots - draw random dot spots

Tetris - game
         keyboard control: 'L' right, 'I' turn, 'J' left, 'K' drop, 'A' pause

TetrisJP - game
           JoyPad control: right, center fire turn, left, down = drop, upper right = pause

TetrisJS - game
           JoyStick control: right, up turn, left, down = drop, Fire = pause

Train - puzzle game with 50 levels and with their solutions
        keyboard control: 'L' right, 'I' up, 'J' left, 'K' down, 'H' help (solution), Enter OK, Esc escape, BS backspace

TrainJP - puzzle game with 50 levels and with their solutions
          JoyPad control: right, up, left, down, centerFire=OK, upperLeft=escape, fire=backspace, upperRight=help (solution), 

TrainJS - puzzle game with 50 levels and with their solutions
          JoyStick control: right, up, left, down, Fire=OK, 
          Esc=escape, BS=backspace, 'H'=help (solution), 

Twister - deformable block covered with 4 textures

Water surface - simulation of a rippling water surface

Assembly Sheet