0:03 this is a raspberry pi pico it's not
0:05 like the other raspberry pi's it doesn't
0:07 run linux or any desktop operating
0:10 system but it does have otg usb and can
0:13 generate a clean vga signal
0:15 so this four dollar microcontroller
0:16 board is only a few parts away from
0:18 being a full computer comparable with
0:20 something from the 1980s
0:23 all you do is plug a usb hub in here and
0:24 wire up a vga connector with some
0:28 resistor dividers to the gpios
0:28 i thought
0:30 what if you attach this to a
0:33 retroprocessor like the 6502
0:35 with the pi pico in the design we no
0:37 longer need a clock generator reset
0:41 timers address logic gpio chips or roms
0:43 we don't need any chip programmers
0:45 either the pi pico is programmed with
0:47 uf2 which is simply copying a file over
0:49 a usb cable
0:51 you don't even need special software
0:52 just the copy command from your
0:54 operating system
0:56 i suppose a case could be made that we
0:59 don't need the 6502 either
1:01 but then we wouldn't have a 6502
1:05 i eventually got the design down to a pi
1:10 pico 6502 64k of ram and 12 glue chips
1:12 this is for a retro computer with vga
1:15 video pwm audio expansion slots and
1:18 support for usb keyboards mice joysticks
1:21 and mass storage devices
1:22 you can see everything on the breadboard here
1:23 here
1:25 these are all through-hole parts but
1:27 available in surface mount packaging as well
1:28 well
1:31 there's two pi picos here
1:32 the second one is acting as a debug
1:34 probe and console port but isn't
1:35 strictly necessary
1:37 it's connected to my development system
1:41 over usb which also powers everything
1:44 the vga cable is actually the end of a
1:47 vga2 hdmi converter
1:48 the pi pico is able to provide accurate
1:51 vga timings so hdmi output is perfect
1:54 with no added frame buffer lag even on
1:56 cheap adapters
1:58 but the real gem here is the usb host controller
1:59 controller
2:02 no more grungy ps2 keyboards and clumsy
2:05 sd cards just plug ordinary usb devices
2:07 straight into this hub
2:08 there's nothing special about the hub
2:10 but you might need an adapter cable to
2:12 fit it to the pipe picot
2:14 but with usb and vga wired up i can
2:16 write a lot of the pi pico software so i did
2:18 did
2:20 computers of this era typically had
2:22 software called a monitor not to be
2:24 confused with the monitor of your
2:26 terminal which was a cathode ray tube
2:28 monitors replaced panels of blinking
2:30 lights and switches as many computers
2:33 transitioned from core memory to the ram
2:34 and rom we used today
2:36 typically the monitor runs on the main
2:38 cpu but the pico computer has its
2:41 monitor on the dma controller the serial
2:44 port on the pi pico gives us access to
2:46 the monitor at all times
2:48 here it is in minicom
2:50 the primary function of a monitor is to
2:52 inspect and modify memory so having it
2:54 functional while bringing up the dma
2:56 controller should be handy
2:58 typing in an address will show the
3:00 memory contents
3:16 here my keyboard is recognized for some
3:17 reason it indicates it can send mouse
3:24 anyhow
3:36 okay uh mouse
3:48 for some reason this mouse indicates it
3:51 can send keyword reports but i've never
3:52 seen it do so
3:54 i'm just putting events to standard out
3:57 for testing
3:59 left click right click and
4:00 and
4:29 yep looks great
4:32 the analog data is all 8-bit so looks
4:33 like the mouse reports are going to be
4:50 i was able to see an sd card in a card
4:52 reader too i haven't tried reading files
5:03 now let's look at vga output what you're
5:05 looking at here is the terminal emulator
5:06 running on the pi pico
5:08 so there's two ways to access the
5:10 monitor over the serial port or with the
5:13 usb keyboard and vga display
5:15 i think this is the first color ansi
5:17 terminal emulator for the pi pico this
5:19 isn't the primary input and output for
5:21 the main computer though it's just a
5:24 conveniently built in terminal pressing
5:26 scroll lock on the keyboard switches the
5:28 terminal on and off
5:30 turning it off we can see a mock-up of
5:32 the low-res 40 column mode with the
5:35 commodore petsky font
5:36 of course the final video system will
5:38 have graphics sprites and parallax
5:40 scrolling but a character mode is
5:42 sufficient to keep things visually
5:43 interesting during this part of development
5:45 development
5:48 you've seen both graphics resolutions a
5:51 high-res 640 by 480 and the low-res 320
5:53 by 240.
5:55 either of these can be letterboxed to
5:57 16x9 and output 720p
5:59 720p
6:01 it doesn't matter if you have an ibm
6:04 8513 from 1987
6:06 or modern widescreen lcd the pico
6:08 computer output is very easy to work with
6:13 however it does not and will not support
6:16 old televisions to be clear it could but
6:18 that's a lot of work i won't be doing
6:20 because there's already plenty of retro
6:22 video hardware for the 6502 that
6:24 supports televisions that's what the
6:30 let's bring up the monitor and graphics
6:32 system simultaneously for the next bit
6:34 this is easy enough since the monitor is
6:37 always available on the serial port
6:40 video memory has its own 64k separate
6:43 from the 6502 64k of memory
6:46 the dma controller will be able to move
6:48 data between usb storage
6:52 video memory and 6502 memory
6:54 although dma is not working yet we can
6:56 manually modify video memory with the
6:58 monitor i've worked out an address and
7:04 hello world
7:05 now imagine using the same technique to
7:09 load a 6502 program into ram
7:11 that's all for now some of my design
7:12 notes are included in the github
7:15 repository link in the description i'll
7:17 make videos explaining each section as i
7:18 bring it up
7:20 if you want to learn about the design
7:21 and operation or see how i deal with the
7:24 unexpected hit that subscribe button