Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. Let's make a Pi Pico 2 powered video card.

Let's make a Pi Pico 2 powered video card.

Scheduled Pinned Locked Moved Uncategorized
retrocomputing
144 Posts 30 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • gloriouscow@oldbytes.spaceG gloriouscow@oldbytes.space

    Despite my fundamental lack of electronics background, I'm probably better equipped to make a bespoke CGA card than most people on the planet. At least that's my internal pep talk.

    anachronistjohn@zia.ioA This user is from outside of this forum
    anachronistjohn@zia.ioA This user is from outside of this forum
    anachronistjohn@zia.io
    wrote last edited by
    #9
    @gloriouscow Perhaps your project would be a good starting point for a modern PCIe text only video card that can be remotely accessed. I’m surprised that something like that for servers doesn’t exist, except for ridiculously expensive devices.
    gloriouscow@oldbytes.spaceG 1 Reply Last reply
    0
    • gloriouscow@oldbytes.spaceG gloriouscow@oldbytes.space
      • I've written a cycle accurate CGA emulation
      • I've made a working simulation of the CGA in a digital logic simulator
      • I've reproduced 80% of the original CGA PCB in KiCad (I really need to finish that)
      • I've captured digital logic traces from the CGA running demanding demoscene productions
      • I am intimately familiar with the ISA bus and bus timings
      • I've designed several PCBs in KiCad already and some of them even worked

      ...so why not?

      gloriouscow@oldbytes.spaceG This user is from outside of this forum
      gloriouscow@oldbytes.spaceG This user is from outside of this forum
      gloriouscow@oldbytes.space
      wrote last edited by
      #10

      This project will live on a breadboard for a while. The first milestone should be emitting some sort of test pattern on a standalone circuit to a real CGA monitor.

      To do this we need to control five pins to start - the colors red, green, and blue (we'll ignore intensity, or pin it high), and the two sync signals, horizontal and vertical.

      gloriouscow@oldbytes.spaceG 1 Reply Last reply
      0
      • gloriouscow@oldbytes.spaceG gloriouscow@oldbytes.space

        This project will live on a breadboard for a while. The first milestone should be emitting some sort of test pattern on a standalone circuit to a real CGA monitor.

        To do this we need to control five pins to start - the colors red, green, and blue (we'll ignore intensity, or pin it high), and the two sync signals, horizontal and vertical.

        gloriouscow@oldbytes.spaceG This user is from outside of this forum
        gloriouscow@oldbytes.spaceG This user is from outside of this forum
        gloriouscow@oldbytes.space
        wrote last edited by
        #11

        To simulate the OSC pin, I will program another Pico to just generate a 14.3181818 clock.

        "What's my purpose?"

        "You generate a clock."

        gloriouscow@oldbytes.spaceG petrillic@hachyderm.ioP jennyfluff@chitter.xyzJ bytex64@awesome.gardenB 4 Replies Last reply
        0
        • gloriouscow@oldbytes.spaceG gloriouscow@oldbytes.space

          To simulate the OSC pin, I will program another Pico to just generate a 14.3181818 clock.

          "What's my purpose?"

          "You generate a clock."

          gloriouscow@oldbytes.spaceG This user is from outside of this forum
          gloriouscow@oldbytes.spaceG This user is from outside of this forum
          gloriouscow@oldbytes.space
          wrote last edited by
          #12

          Internally, the Pico will run MartyPC's CGA emulation, including my implementation of the Motorola 6845.

          To cheat a bit, we'll tweak it a bit so it starts up with the register values pre-set for the PC's 80 column text mode, so it won't require programmatic set up.

          gloriouscow@oldbytes.spaceG 1 Reply Last reply
          0
          • anachronistjohn@zia.ioA anachronistjohn@zia.io
            @gloriouscow Perhaps your project would be a good starting point for a modern PCIe text only video card that can be remotely accessed. I’m surprised that something like that for servers doesn’t exist, except for ridiculously expensive devices.
            gloriouscow@oldbytes.spaceG This user is from outside of this forum
            gloriouscow@oldbytes.spaceG This user is from outside of this forum
            gloriouscow@oldbytes.space
            wrote last edited by
            #13

            @AnachronistJohn Isn't that what stuff like iDRAC does?

            anachronistjohn@zia.ioA 1 Reply Last reply
            0
            • gloriouscow@oldbytes.spaceG gloriouscow@oldbytes.space

              Internally, the Pico will run MartyPC's CGA emulation, including my implementation of the Motorola 6845.

              To cheat a bit, we'll tweak it a bit so it starts up with the register values pre-set for the PC's 80 column text mode, so it won't require programmatic set up.

              gloriouscow@oldbytes.spaceG This user is from outside of this forum
              gloriouscow@oldbytes.spaceG This user is from outside of this forum
              gloriouscow@oldbytes.space
              wrote last edited by
              #14

              This wasn't just a spur of the moment decision. I think ultimately, GlyphBlaster just makes more sense as an ISA card rather than being limited to living in the font ROM socket, and I've always wanted to make my own ISA card.

              Designs for ISA cards in KiCad can be found all over the place, but they usually have other people's projects on them.

              One thing I worked on previously is making a clean ISA card template in KiCad that you could start a new ISA card project with.

              Credit to @tubetime as I basically took his EGA card project and scraped everything off of it, keeping the edge connector, and IO plate engineering drawings.

              Link Preview Image
              gloriouscow@oldbytes.spaceG tubetime@mastodon.socialT 2 Replies Last reply
              0
              • gloriouscow@oldbytes.spaceG gloriouscow@oldbytes.space

                This wasn't just a spur of the moment decision. I think ultimately, GlyphBlaster just makes more sense as an ISA card rather than being limited to living in the font ROM socket, and I've always wanted to make my own ISA card.

                Designs for ISA cards in KiCad can be found all over the place, but they usually have other people's projects on them.

                One thing I worked on previously is making a clean ISA card template in KiCad that you could start a new ISA card project with.

                Credit to @tubetime as I basically took his EGA card project and scraped everything off of it, keeping the edge connector, and IO plate engineering drawings.

                Link Preview Image
                gloriouscow@oldbytes.spaceG This user is from outside of this forum
                gloriouscow@oldbytes.spaceG This user is from outside of this forum
                gloriouscow@oldbytes.space
                wrote last edited by
                #15

                I own a lot of ISA cards and I took measurements from several video cards, and there's no real standard - things vary a lot. You'll notice on this particular layout, the board edge dips down to give the most usable real estate after the end of the 8-bit ISA edge connector.

                Unfortunately this means you can't plug an an original IBM CGA into your AT. We'll probably want to avoid that limitation. With a Pico replacing most of the logic on the board I don't really think we're going to need a full-length card in the first place.

                gloriouscow@oldbytes.spaceG polpo@chaos.socialP 2 Replies Last reply
                0
                • gloriouscow@oldbytes.spaceG gloriouscow@oldbytes.space

                  To simulate the OSC pin, I will program another Pico to just generate a 14.3181818 clock.

                  "What's my purpose?"

                  "You generate a clock."

                  petrillic@hachyderm.ioP This user is from outside of this forum
                  petrillic@hachyderm.ioP This user is from outside of this forum
                  petrillic@hachyderm.io
                  wrote last edited by
                  #16

                  @gloriouscow can you just use a PIO for that?

                  gloriouscow@oldbytes.spaceG 1 Reply Last reply
                  0
                  • petrillic@hachyderm.ioP petrillic@hachyderm.io

                    @gloriouscow can you just use a PIO for that?

                    gloriouscow@oldbytes.spaceG This user is from outside of this forum
                    gloriouscow@oldbytes.spaceG This user is from outside of this forum
                    gloriouscow@oldbytes.space
                    wrote last edited by
                    #17

                    @petrillic That's the plan, overclock to 315MHz, then just have a PIO running to twiddle a GPIO every 11 cycles.

                    1 Reply Last reply
                    0
                    • gloriouscow@oldbytes.spaceG gloriouscow@oldbytes.space

                      @AnachronistJohn Isn't that what stuff like iDRAC does?

                      anachronistjohn@zia.ioA This user is from outside of this forum
                      anachronistjohn@zia.ioA This user is from outside of this forum
                      anachronistjohn@zia.io
                      wrote last edited by
                      #18
                      @gloriouscow Sorta, but iDRAC / iLo / IPMI are proprietary (there are some attempts to make an open replacement for the software), insecure, expensive and require an additional machine / network to access it. This would likely also require an additional machine, but it’d be so much more flexible.

                      Plus, it’d be cool as hell to output / capture composite video or CGA line doubled to VGA.
                      1 Reply Last reply
                      0
                      • gloriouscow@oldbytes.spaceG gloriouscow@oldbytes.space

                        I own a lot of ISA cards and I took measurements from several video cards, and there's no real standard - things vary a lot. You'll notice on this particular layout, the board edge dips down to give the most usable real estate after the end of the 8-bit ISA edge connector.

                        Unfortunately this means you can't plug an an original IBM CGA into your AT. We'll probably want to avoid that limitation. With a Pico replacing most of the logic on the board I don't really think we're going to need a full-length card in the first place.

                        gloriouscow@oldbytes.spaceG This user is from outside of this forum
                        gloriouscow@oldbytes.spaceG This user is from outside of this forum
                        gloriouscow@oldbytes.space
                        wrote last edited by
                        #19

                        On GlyphBlaster currently, I fight a lot with bus contention between the two ARM cores. Embassy, the USB-CDC connection and the network stack live on Core 0, whereas GlyphBlaster's video routines run on Core 1, so you might assume they could run independently.

                        gloriouscow@oldbytes.spaceG 1 Reply Last reply
                        0
                        • gloriouscow@oldbytes.spaceG gloriouscow@oldbytes.space

                          On GlyphBlaster currently, I fight a lot with bus contention between the two ARM cores. Embassy, the USB-CDC connection and the network stack live on Core 0, whereas GlyphBlaster's video routines run on Core 1, so you might assume they could run independently.

                          gloriouscow@oldbytes.spaceG This user is from outside of this forum
                          gloriouscow@oldbytes.spaceG This user is from outside of this forum
                          gloriouscow@oldbytes.space
                          wrote last edited by
                          #20

                          But they still contend for the same flash - if I add some intensive video effect, I can starve Core 0 and it will stop responding to network requests or my USB debugging session.

                          The solution is to tag routines on Core 1 with #[unsafe(link_section = ".data.ram_func")] to force it to run out of RAM instead of flash, but this compounds my already dire RAM situation.

                          gloriouscow@oldbytes.spaceG 1 Reply Last reply
                          0
                          • gloriouscow@oldbytes.spaceG gloriouscow@oldbytes.space

                            But they still contend for the same flash - if I add some intensive video effect, I can starve Core 0 and it will stop responding to network requests or my USB debugging session.

                            The solution is to tag routines on Core 1 with #[unsafe(link_section = ".data.ram_func")] to force it to run out of RAM instead of flash, but this compounds my already dire RAM situation.

                            gloriouscow@oldbytes.spaceG This user is from outside of this forum
                            gloriouscow@oldbytes.spaceG This user is from outside of this forum
                            gloriouscow@oldbytes.space
                            wrote last edited by
                            #21

                            With a full board though, we could have a separate microcontroller that just handles the Wi-Fi. Maybe another RP2350? Maybe an ESP32? STM32 lol? I don't know. Worry about that later.

                            gloriouscow@oldbytes.spaceG polpo@chaos.socialP 2 Replies Last reply
                            0
                            • gloriouscow@oldbytes.spaceG gloriouscow@oldbytes.space

                              With a full board though, we could have a separate microcontroller that just handles the Wi-Fi. Maybe another RP2350? Maybe an ESP32? STM32 lol? I don't know. Worry about that later.

                              gloriouscow@oldbytes.spaceG This user is from outside of this forum
                              gloriouscow@oldbytes.spaceG This user is from outside of this forum
                              gloriouscow@oldbytes.space
                              wrote last edited by
                              #22

                              We'll definitely be using an RP2350B directly instead of soldering on a Pico 2 board. But I guess it's okay to still call this a Pico.

                              We basically double the number of available GPIO pins, meaning I no longer have to make compromises. Light pen? Sure. Capture every address line? You betcha. QSPI PSRAM? All day long.

                              Raspberry Pi is nice enough to provide a reference KiCad project, so you can more or less copy and paste a RP2350 into your project.

                              Link Preview Image
                              kroc@oldbytes.spaceK gloriouscow@oldbytes.spaceG 2 Replies Last reply
                              0
                              • gloriouscow@oldbytes.spaceG gloriouscow@oldbytes.space

                                To simulate the OSC pin, I will program another Pico to just generate a 14.3181818 clock.

                                "What's my purpose?"

                                "You generate a clock."

                                jennyfluff@chitter.xyzJ This user is from outside of this forum
                                jennyfluff@chitter.xyzJ This user is from outside of this forum
                                jennyfluff@chitter.xyz
                                wrote last edited by
                                #23

                                @gloriouscow glad we're not at the state of vibe hardware yet where we need to convince it to actually do that

                                1 Reply Last reply
                                0
                                • gloriouscow@oldbytes.spaceG gloriouscow@oldbytes.space

                                  We'll definitely be using an RP2350B directly instead of soldering on a Pico 2 board. But I guess it's okay to still call this a Pico.

                                  We basically double the number of available GPIO pins, meaning I no longer have to make compromises. Light pen? Sure. Capture every address line? You betcha. QSPI PSRAM? All day long.

                                  Raspberry Pi is nice enough to provide a reference KiCad project, so you can more or less copy and paste a RP2350 into your project.

                                  Link Preview Image
                                  kroc@oldbytes.spaceK This user is from outside of this forum
                                  kroc@oldbytes.spaceK This user is from outside of this forum
                                  kroc@oldbytes.space
                                  wrote last edited by
                                  #24

                                  @gloriouscow If you're making a whole ISA card, then you're overlapping with #PicoMEM, #PicoGUS, and #PicoIDE which could be a good place to steal from / ask about!

                                  gloriouscow@oldbytes.spaceG 1 Reply Last reply
                                  0
                                  • kroc@oldbytes.spaceK kroc@oldbytes.space

                                    @gloriouscow If you're making a whole ISA card, then you're overlapping with #PicoMEM, #PicoGUS, and #PicoIDE which could be a good place to steal from / ask about!

                                    gloriouscow@oldbytes.spaceG This user is from outside of this forum
                                    gloriouscow@oldbytes.spaceG This user is from outside of this forum
                                    gloriouscow@oldbytes.space
                                    wrote last edited by
                                    #25

                                    @Kroc Oh, believe me, I know all those guys (hi @polpo) and they've been a huge help already in making GlyphBlaster so far.

                                    kroc@oldbytes.spaceK polpo@chaos.socialP 2 Replies Last reply
                                    0
                                    • gloriouscow@oldbytes.spaceG gloriouscow@oldbytes.space

                                      We'll definitely be using an RP2350B directly instead of soldering on a Pico 2 board. But I guess it's okay to still call this a Pico.

                                      We basically double the number of available GPIO pins, meaning I no longer have to make compromises. Light pen? Sure. Capture every address line? You betcha. QSPI PSRAM? All day long.

                                      Raspberry Pi is nice enough to provide a reference KiCad project, so you can more or less copy and paste a RP2350 into your project.

                                      Link Preview Image
                                      gloriouscow@oldbytes.spaceG This user is from outside of this forum
                                      gloriouscow@oldbytes.spaceG This user is from outside of this forum
                                      gloriouscow@oldbytes.space
                                      wrote last edited by
                                      #26

                                      Okay, first priority - let's make our Pico OSC pin simulator.

                                      Raspberry Pi has a very nice Pico development plugin for Visual Studio Code. We just choose "New Rust Project," name it, and click create.

                                      Link Preview Image
                                      gloriouscow@oldbytes.spaceG 1 Reply Last reply
                                      0
                                      • gloriouscow@oldbytes.spaceG gloriouscow@oldbytes.space

                                        Okay, first priority - let's make our Pico OSC pin simulator.

                                        Raspberry Pi has a very nice Pico development plugin for Visual Studio Code. We just choose "New Rust Project," name it, and click create.

                                        Link Preview Image
                                        gloriouscow@oldbytes.spaceG This user is from outside of this forum
                                        gloriouscow@oldbytes.spaceG This user is from outside of this forum
                                        gloriouscow@oldbytes.space
                                        wrote last edited by
                                        #27

                                        This gives you an rp-hal project, and GlyphBlaster is currently written against Embassy, and I don't really feel like rewriting all the overclocking code, so I'm just going to switch this to Embassy too and copy-paste that stuff.

                                        I would like to thank FreddyV of PicoMEM for giving me the tips on how to stably overclock a Pico. It requires tweaking the on-board flash timings in a way I never would have figured out for myself.

                                        The key do doing this in Embassy is this bit:


                                        const PICO_SYS_CLOCK_HZ: u32 = 300_000_000;
                                        const FLASH_QMI_TIMING_UPDATE_THRESHOLD_HZ: u32 = 280_000_000;
                                        const FLASH_QMI_TIMING_HIGH_SPEED_HZ: u32 = 380_000_000;
                                        const OVERCLOCK_FLASH_QMI_CLKDIV: u8 = if PICO_SYS_CLOCK_HZ > FLASH_QMI_TIMING_HIGH_SPEED_HZ {
                                        4
                                        } else {
                                        3
                                        };
                                        const OVERCLOCK_FLASH_QMI_RXDELAY: u8 = if PICO_SYS_CLOCK_HZ > FLASH_QMI_TIMING_HIGH_SPEED_HZ {
                                        4
                                        } else {
                                        3
                                        };

                                        //...

                                        let timing = embassy_rp::pac::QMI.mem(0).timing();
                                        timing.modify(|w| {
                                        w.set_clkdiv(OVERCLOCK_FLASH_QMI_CLKDIV);
                                        w.set_rxdelay(OVERCLOCK_FLASH_QMI_RXDELAY);
                                        });
                                        gloriouscow@oldbytes.spaceG 1 Reply Last reply
                                        0
                                        • gloriouscow@oldbytes.spaceG gloriouscow@oldbytes.space

                                          @Kroc Oh, believe me, I know all those guys (hi @polpo) and they've been a huge help already in making GlyphBlaster so far.

                                          kroc@oldbytes.spaceK This user is from outside of this forum
                                          kroc@oldbytes.spaceK This user is from outside of this forum
                                          kroc@oldbytes.space
                                          wrote last edited by
                                          #28

                                          @gloriouscow With your graphics card, all that's needed is an Pico 8086 emulator and you've got an "Oops, all Pico!" IBM PC 😛

                                          gloriouscow@oldbytes.spaceG 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups