element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • More
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • More
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • More
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • More
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
FPGA
  • Technologies
  • More
FPGA
Forum Neo Geo Pocket Color Video Out (DAC/FPGA)
  • Blog
  • Forum
  • Documents
  • Events
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
FPGA requires membership for participation - click to join
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 19 replies
  • Answers 11 answers
  • Subscribers 325 subscribers
  • Views 557 views
  • Users 0 members are here
  • retro gaming
  • dac
  • fpga
  • digital-to analog converter
  • video games
Related

Neo Geo Pocket Color Video Out (DAC/FPGA)

kragit
kragit over 4 years ago

Hi everyone!

 

Looking to achieve RGB analog video out on a Neo Geo Pocket Color. No known mods currently exist for this. There are single digit K2_VIDEOs out in the wild that achieve this, but I believe these were made by SNK themselves for internal use only. Other people have apparently gotten video out with FPGAs, but no one has publicly documented it.

 

Here are the LCD signals as printed on the board & additional information from someone who's apparently achieved this:

 

I've done it with a small FPGA. The LCD signals can't be simpler: R0~3 is 4bit red, G0~3 is 4bit green, B0~3 is 4bit blue, DOTCLK is the pixel clock, SPL is horizontal sync, SPS is frame sync.
[...]
It can't be done by just wiring a scart cable to the board, you have to buffer and convert the color data from the NGPC, then do digital to analog conversion if you want analog RGB output.

 

I'm venturing into the FPGA scene for this with no past experience with FPGAs and a rudimentary understanding of digital electronics (I can follow guides, solder, etc. I built a CMVS this way).

 

Any help would be appreciated. Thanks!

  • Reply
  • Cancel
  • Cancel

Top Replies

  • johnbeetem
    johnbeetem over 4 years ago in reply to kragit +4 suggested

    Adam Kragt wrote:

     

    Appreciate the info! The biggest thing is just trying to figure out where to start as a total beginner.

    With FPGAs, start by copying a tutorial design exactly.  FPGA tools have a steep learning…

  • jc2048
    jc2048 over 4 years ago +3 suggested

    You might consider applying for this roadtest

     

    https://www.element14.com/community/roadTests/1796/l/Terasic-P0082-DE0-Nano-FPGA-Development-Kit

     

    That would get you some kit to use and an opportunity to learn…

  • johnbeetem
    johnbeetem over 4 years ago +3 suggested

    These are general comments about FPGAs and VGA output and probably not all that helpful for the NPGC, but here goes anyway.

     

    There are a number of FPGA boards out there that support VGA graphics, and some…

Parents
  • johnbeetem
    0 johnbeetem over 4 years ago

    These are general comments about FPGAs and VGA output and probably not all that helpful for the NPGC, but here goes anyway.

     

    There are a number of FPGA boards out there that support VGA graphics, and some have tutorials available.  Gadget Factory's Papilio boards are very nice and have a VGA "wing".  It's not clear whether it's 8 or 64 colors.  The older through-hole version has 8 colors, but the photo of the SMT version at the link has enough resistors to do 64.  They both use resistors to make a "poor man's" DAC, which can probably get you up to 4 bits per color.  There's sample code around to generate VGA output -- I think it's VHDL.  (I like Verilog better.)

     

    The LOGI-PI and LOGI-Bone boards have a pretty powerful FPGA and you can get a LOGI-Edu adapter with VGA output (512 colors, I think).  The boards can be used stand-alone but you need an external programmer.

     

    Another nifty board is the Nandland Go Board, which has built-in VGA.  The FPGA on that board is pretty small, but it has the advantage that you can use open-source tools instead of the far more complex vendor tools.  The Go Board doesn't have much RAM -- just the small amount in the FPGA itself -- so it's probably no good for your NPGC project.

     

    I don't know what availability is these days for these boards.  I haven't done VGA output myself.  I plan to one of these days, since I have all those boards.  Just need more time!

     

    Hope this helps and/or inspires.

    • Cancel
    • Up +3 Down
    • Reply
    • Verify Answer
    • Reject Answer
    • Cancel
Reply
  • johnbeetem
    0 johnbeetem over 4 years ago

    These are general comments about FPGAs and VGA output and probably not all that helpful for the NPGC, but here goes anyway.

     

    There are a number of FPGA boards out there that support VGA graphics, and some have tutorials available.  Gadget Factory's Papilio boards are very nice and have a VGA "wing".  It's not clear whether it's 8 or 64 colors.  The older through-hole version has 8 colors, but the photo of the SMT version at the link has enough resistors to do 64.  They both use resistors to make a "poor man's" DAC, which can probably get you up to 4 bits per color.  There's sample code around to generate VGA output -- I think it's VHDL.  (I like Verilog better.)

     

    The LOGI-PI and LOGI-Bone boards have a pretty powerful FPGA and you can get a LOGI-Edu adapter with VGA output (512 colors, I think).  The boards can be used stand-alone but you need an external programmer.

     

    Another nifty board is the Nandland Go Board, which has built-in VGA.  The FPGA on that board is pretty small, but it has the advantage that you can use open-source tools instead of the far more complex vendor tools.  The Go Board doesn't have much RAM -- just the small amount in the FPGA itself -- so it's probably no good for your NPGC project.

     

    I don't know what availability is these days for these boards.  I haven't done VGA output myself.  I plan to one of these days, since I have all those boards.  Just need more time!

     

    Hope this helps and/or inspires.

    • Cancel
    • Up +3 Down
    • Reply
    • Verify Answer
    • Reject Answer
    • Cancel
Children
  • jc2048
    0 jc2048 over 4 years ago in reply to johnbeetem

    I'm a dunderhead! Thanks for pointing that out - I should have realised that there would be boards out there that could already do this; FPGAs and VGA are a very natural fit.

     

    The Papilo board has an 'Arcade Megawing' available that has 4-bit per colour.

     

    http://papilio.cc/index.php?n=Papilio.ArcadeMegaWing

     

    The method is the same as on the Nandland Go board - a cheap and cheerful (pseudo) current-mode DAC, with the currents summed by the termination resistor at the other end of the cable. Presumably, the output pins are set permanently high and then turned on and off with the tristate. Given that the VGA interface can be so simple - just a bunch of resistors and a connector (which you could do by just 'bird's nesting' the resistors between the connector and the header for the IO pins) - it would make for a possible proposal for the roadtest coming up. Generating some colour bars as a test card on the screen would then just be a matter of implementing some counters and a bit of decoding in the FPGA and it would show off the board's potential as a development platform quite nicely.

     

    With your experience, you'd be able to throw together something basic in a hour or two. Perhaps you could find the time - it would be a nice FPGA project to have here on e14.

    • Cancel
    • Up +3 Down
    • Reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Jan Cumps
    0 Jan Cumps over 4 years ago in reply to jc2048

    The Xess XuLA2 has an example (for VGA for its a plug-in board with the resistors DAC and vga connector)

    The VHDL code is published on github.

     

    I have that VGA plug-in. I haven't tested it yet.

    • Cancel
    • Up +3 Down
    • Reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Jan Cumps
    0 Jan Cumps over 4 years ago in reply to Jan Cumps

    If anyone in the road test decides to build a VGA implementation, I'll try to play along.

    Not in the roadtest area itself - I'm using a Xilinx FPGA and the roadtest is an Altera initiative.

    Maybe in the FPGA group here on e14...

    • Cancel
    • Up +2 Down
    • Reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • kragit
    0 kragit over 4 years ago in reply to johnbeetem

    Appreciate the info! The biggest thing is just trying to figure out where to start as a total beginner.

    • Cancel
    • Up +1 Down
    • Reply
    • Verify Answer
    • Cancel
  • johnbeetem
    0 johnbeetem over 4 years ago in reply to kragit

    Adam Kragt wrote:

     

    Appreciate the info! The biggest thing is just trying to figure out where to start as a total beginner.

    With FPGAs, start by copying a tutorial design exactly.  FPGA tools have a steep learning curve -- "The Cliffs of Insanity" is how I put it.  By copying a tutorial exactly you reduce the dozens of things that can go wrong down to something more reasonable.  Once you have something working, you can modify it to produce the design you really want.

     

    With the exception of Lattice iCE40, FPGA internal bit stream formats are undocumented which means that there have been very few open-source tools developed despite the interest of many people in doing so.  You're mostly much stuck with "free-as-in-beer" vendor tools.  Here's one of my periodic screeds on the subject: Taming the Wild Bitstream

     

    A really good way to get started is to download the free vendor tools and try them out.  I mostly use Xilinx, but a lot of people prefer Altera.  You can then make sure you can work through tutorials and produce bitstreams and see if this is going to be something you're interested in before even buying a development board.

    • Cancel
    • Up +4 Down
    • Reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Jan Cumps
    0 Jan Cumps over 4 years ago in reply to Jan Cumps

    I've been playing with the VGA project.

    I don't have a video cable handy at the moment. As a test I've probed the HSYNC and VSYNC.

     

     

    HSYNC and Green 4:

    • Cancel
    • Up +2 Down
    • Reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • jc2048
    0 jc2048 over 4 years ago in reply to Jan Cumps

    Very good. The HSYNCs look overly wide to me and there's no blanking at the end of the line, but you can fiddle around with all that once you see it on the screen. What next? Asteroids in VHDL would be impressive!

     

    And it's a chance to show off your new scope. Which model is it? Should I be envious?

    • Cancel
    • Up +2 Down
    • Reply
    • Verify Answer
    • Cancel
  • Jan Cumps
    0 Jan Cumps over 4 years ago in reply to jc2048
    The HSYNCs look overly wide to me and there's no blanking at the end of the line

    I'll have to read-up on the VGA signal, but I believe there should be blanking.

    From the Xess doco:

     

    And it's a chance to show off your new scope. Which model is it? Should I be envious?

    Yay Tektronix  TBS2102TBS2102 100 MHz 2 channel Yes please

     

     

    • Cancel
    • Up +2 Down
    • Reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Jan Cumps
    0 Jan Cumps over 4 years ago in reply to jc2048

    Jon Clift wrote:

     

    ... there's no blanking at the end of the line ...

    Yes, I'll have to recheck the design:

    • Cancel
    • Up +2 Down
    • Reply
    • Verify Answer
    • Cancel
  • Jan Cumps
    0 Jan Cumps over 4 years ago in reply to Jan Cumps

    I have now loaded a real image to RAM, and it looks ok now (edit: no I see the blackout for vsync but not yet for hsync end)

     

    Yellow: horizontal sync

    Blue: vertical sync

    Magenta: one of the video signals

     

    The capture below is triggered on the vertical sync, and shows blanking before and after.

     

    This one shows the same signals, zoomed out to show multiple vsyncs:

    • Cancel
    • Up +2 Down
    • Reply
    • Verify Answer
    • Reject Answer
    • Cancel
Element14

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2022 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube