It is currently Fri Oct 20, 2017 8:22 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 721 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8 ... 49  Next
Author Message
 Post subject:
PostPosted: Sat Mar 05, 2011 5:37 am 
Online

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19112
Location: NE Indiana, USA (NTSC)
koitsu wrote:
tepples wrote:
Don't use (Windows|Linux|Mac OS X) at all? That almost sounds like console fanboys on Slashdot ... I hope I misunderstood you.

This isn't what I said / what I intended. I said if you're using a graphics API or subsystem layer (example: Allegro), and it does not offer proper documentation outlining how the waiting methodology works, or the author cannot explain it, do not use the API/subsystem.

Yeah, I ditched Allegro for SDL when I found out how likely Allegro's Mac graphics code is to break across Xcode upgrades and how little effort Canonical put into making sure sound still worked when PulseAudio was running, compared to SDL.

Quote:
This is in no way shape or form the same as "do not use {insert OS here}". There is no way I would advocate the latter; I am a vehement opponent of OS advocacy and a strong proponent of use-whatever-OS-suits-your-needs.

I was just worried that you had meant "If Windows is broken, don't port your game to Windows. If Linux is broken, don't port your game to Linux." But with SDL broken and Allegro broken, is there even a good framework that would save me from having to download the 1.5 GB Windows SDK and code in raw DX?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 07, 2011 6:36 am 
Offline

Joined: Sat Jun 12, 2010 8:05 pm
Posts: 14
Quote:
But with SDL broken and Allegro broken, is there even a good framework that would save me from having to download the 1.5 GB Windows SDK and code in raw DX?


SFML?

If thats broken too...dunno what to do then.
And mingw+ some other stuff should be fine for Windows development. (used it before for some Windows stuff using OpenGL).

I have to wonder how you got this 1.5GB download claim ;) Last time I checked, a TDM-GCC compiler+headers package was 20MB, though you might need to hax the DX9 SDK a bit for it to even link against the libs. Or you can use GetProcAddress() I guess...


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 07, 2011 6:53 am 
Online

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19112
Location: NE Indiana, USA (NTSC)
mudlord wrote:
I have to wonder how you got this 1.5GB download claim ;)

Microsoft's web site.

Quote:
Last time I checked, a TDM-GCC compiler+headers package was 20MB

So far, I have used MinGW to compile C++. But some people on Slashdot insist that if you're using MinGW or another GCC-based tool to compile for Windows, you're Doing It Wrong. See, for example, this discussion.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 07, 2011 7:41 am 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 3192
Location: Mountain View, CA, USA
I'm not really sure what to say to you guys about SDL or Allegro. I know I've used SDL applications on Win32 which do vsync correctly and *do not* take up tons of CPU time, so it's possible that indeed some VBL magic is going on behind the scenes (within the DX layer, not within SDL itself). Possibly the apps I've used which use SDL are using the newer high-performance version that uses D3D instead (which definitely does VBL syncing properly/differently, that's been confirmed by lots of people).

Again, if push comes to shove, make your main while(1) loop call sleep() with a long duration. This should definitely help -- the important part is not to leave the loop spinning for no reason.

I advocate a longer sleep duration than 1 second though; sleep(1) might sound good at first, but ask yourself why the loop has to iterate every 1 second when you know the loop does nothing other than sleep. Pick a larger value; 3600 or something sounds fine to me. Please don't blindly try to max it out (e.g. sleep(99999999999999); or some such nonsense) given that there's not necessarily a way to guarantee per architecture and operating system what the maximum permitted value is (some define it as "int", others "unsigned int", etc... you get the point). 3600 (1 hour) seems pretty good, IMHO.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 07, 2011 7:51 am 
Online
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3943
There's also the 4MB version of the DirectX 9 SDK that I threw together because I was sick of downloading the huge version. Just the INCLUDE and LIB files, nothing else. Many programs that use DirectX will build fine on Visual C++ 6.0.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 07, 2011 8:54 am 
Offline

Joined: Sat Jun 12, 2010 8:05 pm
Posts: 14
tepples wrote:
Microsoft's web site


Oh, never realised it was that big...

Quote:
So far, I have used MinGW to compile C++. But some people on Slashdot insist that if you're using MinGW or another GCC-based tool to compile for Windows, you're Doing It Wrong™


I don't believe its doing it wrong at all. I guess by thier logic, even Pelles C is wrong because its not MS's lovechild. :roll:



Dwedit wrote:
There's also the 4MB version of the DirectX 9 SDK that I threw together because I was sick of downloading the huge version. Just the INCLUDE and LIB files, nothing else. Many programs that use DirectX will build fine on Visual C++ 6.0.


All I can say: YAY? Wanted something like this for years, thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 07, 2011 9:01 am 
Offline

Joined: Sat May 08, 2010 9:31 am
Posts: 225
OK I learned my lesson and I promise that when I have finished successfully implement the APU, will study a better way that don't stress much the host CPU. For the moment I think that the sleep() that I use is a good compromise. In my defense I can only say that this is my first project in C, my first emulator and is also the first time that I have to do with graphics routine, SDL and compilers. Thank you all for your valuable suggestions. :)


Top
 Profile  
 
 Post subject: Version 0.19
PostPosted: Fri Jun 03, 2011 3:49 am 
Offline

Joined: Sat May 08, 2010 9:31 am
Posts: 225
Changelog:
0.19
complete APU emulation.
This is my first attempt with sdl sound and perhaps there may be some bugs. For now, without the implementation of frameskip, the emulator has to work 100% for not having problems with sound skip and crackle.
Changed the structure of the code and now the emu takes less than 100Kb.
Correct many many many bugs.


Top
 Profile  
 
 Post subject: Version 0.20
PostPosted: Fri Jun 03, 2011 4:21 pm 
Offline

Joined: Sat May 08, 2010 9:31 am
Posts: 225
Changelog:
0.20
Implemented illegal opcode 0x80 for the "Beauty and the Beast (E) [!].nes" rom


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 03, 2011 6:18 pm 
Offline

Joined: Fri Apr 29, 2011 9:44 pm
Posts: 267
In Beauty and the Beast in my emu, the screen jumps up and down wildly. Did you have a similar issue?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 04, 2011 1:15 am 
Offline

Joined: Sat May 08, 2010 9:31 am
Posts: 225
no, my problem was that without the opcode 0x80, when I pressed the A button to jump, the emulator crashed.


Top
 Profile  
 
 Post subject: Version 0.21
PostPosted: Sun Jun 05, 2011 8:34 am 
Offline

Joined: Sat May 08, 2010 9:31 am
Posts: 225
Changelog:
0.21
Correct some bugs in the MMC3 (NTSC and PAL) and now
all the roms that I'have tried works well.


Top
 Profile  
 
 Post subject: Version 0.22
PostPosted: Thu Jun 30, 2011 12:07 am 
Offline

Joined: Sat May 08, 2010 9:31 am
Posts: 225
Changelog:
0.22
Implemented all illegal opcode.
Rewrite from scratch MMC3 emulation and now really work with every rom that I've tested (for two weeks I've tryed all 5118 MMC3 GoodNES roms including Blargg mmc3 test) except for few bootleg and some chinese roms (why??).
Implemented fix for young indiana jones chronicles (thx James).


Top
 Profile  
 
 Post subject: Version 0.23
PostPosted: Sat Jul 09, 2011 6:14 am 
Offline

Joined: Sat May 08, 2010 9:31 am
Posts: 225
Changelog:
0.23
Implemented the save on file for the PRG Ram battery packed.
Rewrite MMC1 emulation and tested with all GoodNES MMC1 roms.
Now work without glitches the MMC3 chinese roms that in the previous version had problems (Aladdin 2 (Unl), Bing Kuang Ji Dan Zi - Flighty Chicken (Ch), Chu Han Zheng Ba - The War Between Chu & Han (Ch) an many others).


Top
 Profile  
 
 Post subject: Version 0.24
PostPosted: Wed Jul 13, 2011 3:34 am 
Offline

Joined: Sat May 08, 2010 9:31 am
Posts: 225
Changelog:
0.24
Implemented emulation of mappers MMC2, MMC4, ColorDreams and Camerica.
Correct a little bug and now "Time Lord (U) [!].nes" work without glitches.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 721 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8 ... 49  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group