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 323 subscribers
  • Views 538 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…

  • jc2048
    0 jc2048 over 4 years ago

    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 about FPGA design.

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

    As to the design itself, this would be my first go at a system block diagram based on what you've said so far

     

     

     

    Here the LCD data gets latched into the FPGA and stored in row/column sequence in an internal memory. Unless you know the two sides won't run past each other, you'd use a pair of buffers, writing to one and reading from the other. You'd then pick it out of the memory at the appropriate times to fit with the output syncs that you'd generate. The colour outputs would then go to video rate DACs [Digital to Analogue Converters]. Sometimes converters can drive cables, but if not you'd need video buffers to do it. The syncs might manage with a logic line-driver (depends what the display is - that would work with VGA, but not necessarily with other analogue monitors). You have to work out how you would get the appropriate output syncs from the LCD clock. You'll find everything simpler if you can lock the output to the LCD signals so that input and output sides are timing related to each other [perhaps by multiplying the LCD clock, since it sounds like the output will have to run on a higher clock rate].

     

    The DACs and cable drivers would be best on a pcb [they'll need careful layout]. Since it's only 4-bits for each of the colours, it's possible that you might get away with something quick-and-dirty like using resistors followed by a buffer to make your own DAC. Might be worth a try, though don't pin your hopes on it.

     

    First step, if you're serious about this, is to determine the timing of the LCD drive. You need to sketch out the sync timing, orientation, blanking periods and number of pixels. Then you need to decide what output display you'd use and its capabilities [as in what mode you'd use it in and whether it could work in a way that related well to the LCD]. Then you'd need to consider how you'd piece together a prototype and then start work on the design of the FPGA.

     

    There's no reason why you couldn't do all that, but it's quite an involved project to do from a standing start if you haven't done any of that before. Do you have any experience with designing with logic chips? If you could do a design for this with CMOS logic and an SRAM, then you could certainly manage the FPGA design [since 'coding' an FPGA is really a disguised way of doing logic design], but if you come from a coding background you would find it more difficult since you'd be learning to do logic design. Unlike processor coding, FPGAs are best programmed with the underlying hardware very much in mind [perhaps think of it like doing very low level assembly programming, with timing so critical that you're counting processor cycles, and with multiple threads all executing simultaneously and having to interact with each other]. It's not as difficult as I make it sound, but you do need a somewhat different mindset from processor coding.

     

    If you're unsure, I'd encourage you to go for the roadtest and (if you were successful) work through the Altera teaching material. That way you'd find out if you were suited to FPGA design and you'd have a nice development board to work with that could easily cope with what you want to do here.

    • Cancel
    • Up +1 Down
    • Reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • 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
  • 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 jc2048

    A lot to digest!

    Do you have any experience with designing with logic chips?

    Nope! Very green to pretty much every aspect of this. My experience consists of being a web dev and knowing how to solder smaller electronics (working on a Consolized MVS system and installing (soldering) a 3DS capture board for the same person I'm trying to figure out the NGPC capture for).

     

    I have tried to read/watch some FPGA documentation in the past, though I still didn't quite understand things.

     

    Hoping there might be something out there that would be easy enough to setup/program that I could muddle through it. Essentially 'baby's first FPGA' :-P

    • Cancel
    • Up +1 Down
    • Reply
    • Verify 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
>
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