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

    This may seem overly ambitious - but I have an ace up my sleeve.

    I have all the decoding PALs from a Seequa Chameleon on sitting on my desk. Including one that just decodes address ranges AF000-B0000, B0000-C0000 and produces an active-low chip select. And including another that decodes all the CGA's IO ranges.

    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
    #4

    It's cheating, yes. But it's an amazing shortcut to be able to leverage those. They can be replaced later with GALs or some other kind of modern CPLD.

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

      It's cheating, yes. But it's an amazing shortcut to be able to leverage those. They can be replaced later with GALs or some other kind of modern CPLD.

      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
      #5

      A CGA card does not need a crystal - thanks to IBM's penny-pinching design decisions, the entire system crystal was tuned for an NTSC display, driving a master clock of 14.31818MHz.

      This clock was delivered to the ISA bus via the OSC pin.

      Deep in your modern PC, somewhere in the guts of its highly integrated chipset, there's a clock ticking away at this frequency.

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

        A CGA card does not need a crystal - thanks to IBM's penny-pinching design decisions, the entire system crystal was tuned for an NTSC display, driving a master clock of 14.31818MHz.

        This clock was delivered to the ISA bus via the OSC pin.

        Deep in your modern PC, somewhere in the guts of its highly integrated chipset, there's a clock ticking away at this frequency.

        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
        #6

        14.31818MHz is not a transcendental number. It happens to be 315/22.

        Thanks to @polpo for pointing out if I'm already overclocking my Pico 2's to 300MHz, I might as well go to 315.

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

          14.31818MHz is not a transcendental number. It happens to be 315/22.

          Thanks to @polpo for pointing out if I'm already overclocking my Pico 2's to 300MHz, I might as well go to 315.

          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
          #7

          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.

          gloriouscow@oldbytes.spaceG anachronistjohn@zia.ioA 2 Replies Last reply
          0
          • 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.

            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
            #8
            • 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 jrsharp@mastodon.sdf.orgJ 2 Replies Last reply
            0
            • 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
                                          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