DX Question - Snes9x, How'd they do that?

Started by
7 comments, last by pimstead 22 years, 8 months ago
This question refrences some of the interfaces used in the SNES emulator Snes9x. This emu is written for windows using DX. The thing that is cool about this emu is that it employs a menu that you can have appear using esc and when you do it resizes the client area. It also uses a number of windows dialog boxes for configuration purposes. All of this stuff appears to be standard windows api offerings, not some custom directX code that all runs while the program is in fullscreen mode. My question is how do they do it? Thanks for the help.
Advertisement
Basically there are two main parts to the program one is the windows/graphic interface (the stuff ya see) the other is the console CPU emulation (the program that acts like the CPU of the console, Snes in your case) So basically the program runs and acts like a SNES then all the calls to draw graphics are interfaced with DirectX/Windows and boom ya have a Win32 Snes Emulator. (Not an easy program to create!!!)
We are here just like this,It really doesn't matter why.The world is here like it is,'We could laugh we could cry.Is it good or is it bad,Wright or maybe wrong?There's no use of being sad,Without a purpose within a song.
Hi, thanks for the reply. However, i understand how the emu works. I was wondering how they get menus and dialog boxes in a fullscreen directX application. Information on that area would be helpful.
Why not check out the sourcecode? You can download it from sourceforge (linked through www.zsnes.com). I wouldn''t know of a better reference.
sometimes i forget why i even come to this site...
Snes9x (which is dos-based, last time I checked) uses Allegro, which has a limited number of windows-like controls.
Snes9x is a Snes emulator that runs on windows and is a windows program. Hence the 9x part of Snes9x. The program is written using WinAPI and DirectX and can run in windowed mode or fullscreen mode.

I was hoping I could get a reply from someone that has actually used Snes9x in one of it''s recent revisions / and or / has actually read my questions. Only one person has commented on windows controls even though they are talking about DOS and allegro which is way off the mark.

I would appreciate help on how they use a menu and dialog boxes in fullscreen DirectX mode. And no, they do NOT make their source code available (Snes9x is not ZSNES).

Thanks for anyone else who helps.
Snes9x is windows based if I remember right. What I think he''s asking... I think I got this right.

In the fullscreen mode, the menu bar disappears (File, Options etc...). By hitting escape the menu bar reappears on the screen. Hitting escape again, will make it disappear.

Now, I don''t know much about win32 yet so I don''t know how to do that with the actual menu bar control. But it shouldn''t be too hard to create your own menu bar.

I know only that which I know, but I do not know what I know.
To get the dialog messages to work you just need to call them like you would usually. But you need to pass in the hWnd of the Dx window. This will show the dialog box in full screen. I imagine that the menus work the same. Just pass in the hWnd of the Dx window or the instince of it. I hope this helps you a little bit.

Minerjr

This topic is closed to new replies.

Advertisement