This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

Nes output

Nes output
by on (#39257)
Hi guys, I'm wondering how you handle the graphic output of your emulators.
For example, do you create a bitmap and fill it, then render on screen, or do you use some graphic API (like SDL, or too complex OpenGL), or other?

I want to continue the development of my emulator, but I want to do it under windows (xp) and doesn't know how to manage (low-level) bitmap and images.


by on (#39258)
I'm no emulator writer, but I would probably plot the pixels myself to an offscreen buffer (to ensure accuracy), then use DirectX to display it.

by on (#39264)
In my emulator I draw each pixel to a bitmap buffer the size of the NES screen. When a full frame has been drawn, this buffer is flipped to the "screen" the user sees. Pretty much the way most modern PC programs can do it. I'm not really sure what you are asking though.

Are you using Direct X? Allegro? SDL? You have to use some library to interface with the computer video and sound hardware. They usually have their own ways to go about Video and bitmaps.

It's very easy and straight forward to implement a double buffer system for drawing and drawing to a single pixel is not hard at all. I hope this emulator isn't your first big program. You shouldn't need to ask about how to draw a pixel. ;)