I wonder if anyone here is familiar with fceux's source code. I'm curious how it draws things. You see, for quite a while fceux and cavestory were the only games that didn't made my computer freeze. I want to steal from their code the rendering part and do something for myself.
I think its rendering involves a number of files (PPU, palettes, windows/SDL specific display stuff, probably some other stuff).
You haven't explained what you're looking for very well, or why you need help finding it. What have you tried already? Could you not find what you need by looking for files with "PPU", "video", or "display"?
Also, if you're looking for an example to learn how to write an NES renderer, FCEUX is probably not a good teaching example. Its code it big and crusty because it's very old and has seen a lot of changes over the years.
From his original post it doesn't look like he's interested in the NES aspect at all, only in how the program handles video output, but I can't say for sure.
tokumaru is a good mindreader, I admit that.
I haven't tried anything yet. But next few days are going to be a rush, I guess. Just waiting for somebody to say "Yes, I looked inside fceux's sources! And even understood something!", to annoy him with questions later...
I was under the impression that FCEUX uses SDL. I'm not actually familiar with FCEUX's source, but I have used SDL myself for video and audio output. I used this tutorial:
http://lazyfoo.net/SDL_tutorials/You'll probably have to share more details of what you're wanting to do, to get more specific help.
The primary build uses native Win32 stuff, but there is an alternative SDL build.
I actually quite like SDL. I've used it in several of my own projects.
As for FCEUX, I occasionally look at its source code, but I haven't worked on it enough to understand more than a few isolated things. I dunno how many people you'd be able to find who have deep knowledge of it on-hand; there are active maintainers but it's a very slow burn, so most questions are probably not in anyone's ready set of knowledge to share.
By the way, I'm also interested in how SDL renders stuff. The part that isn't about OpenGL. Last time I opened it's source, I was lost in all those folders for every operating system and every architecture in existence. Unix way. Wish there was a little file telling what directory stands for what.
I just want to get a good and minimalistic example of rendering stuff with winapi. I guess I just can't read documentation, since I always just steal others code and rewrite it for my needs. Microsoft's documentation is a torture for me.
I suspect that fceux may do some tiny optimisations, since all images it works with are paletted. This may be useful for me.
I hope nobody is mind me creating threads only I care about and don't letting them sink.
It was DirectDraw7 in both Cave Story and fceux. I didn't had to look inside sources for that, just in options. Rendering isn't too deep inside, I managed to find it somewhere, probably, I don't remember.
New question is: How to develop a simple DirectDraw application? Is it a good idea to develop something in a deprecated api? Maybe it's not, I don't care, it's the only one what still works.
I don't have VisualStudio installed. I tried, it worked one month and then asked for free registration. Fuck them. I'll try older versions from torrents, maybe I will be more lucky with them. Maybe somebody will recommend me, which version of VisualStudio should I install?
I don't have headers. Maybe I will use ones from MinGW, even fasm have them, so it's not that much of a problem. Maybe I will extract imports directly from ddraw.dll, tools that come with TinyC can do that.
I don't have examples. Maybe I will find some in some tutorial on the internet.
I don't have documentation. MSDN is chaos, I don't want to go there;_; I wonder if I'll find or somebody shares offline docs. I just prefere offline.
I don't really have time, but I'll steal some.
Thank everyone in advance for all replies you may or may not leave, I really appreciate them even if I don't say so or if they aren't that useful. Err. Yes.
Nintendulator also uses DirectDraw7 - if it doesn't crash on your system, its graphics code will probably be slightly easier for you to read (though not to copy verbatim, unless you intend to license your code under GPLv2).