Results 1 to 8 of 8

Thread: Compiling emulador Gens on MS Visual c++ Help, please!

  1. #1
    Senior Member
    Join Date
    Apr 2003
    Posts
    109

    Compiling emulador Gens on MS Visual c++ Help, please!

    Hi there ppl!

    I must say this before, im no expert once so ever on C++, and i just wanna "play" a little, nothing serious has that is not and it wont be my area of intervention ever

    But has this for hobbie, dont blame newbies for trying to imitate Pro´s :P, i have this problem when trying to compile the Genesis emulator Gens:

    Heres the errors:


    Genesis Project\Gens\G_ddraw.cpp(19) : error C2146: syntax error : missing ';' before identifier 'lpDD'
    Genesis Project\Gens\G_ddraw.cpp(19) : error C2501: 'LPDIRECTDRAW4' : missing storage-class or type specifiers
    Genesis Project\Gens\G_ddraw.cpp(19) : fatal error C1004: unexpected end of file found
    Error executing cl.exe.

    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    And here is the code...if i need to be more specific, please, let me know!


    LPDIRECTDRAW4 lpDD;
    LPDIRECTDRAW lpDD_Init;
    LPDIRECTDRAWSURFACE4 lpDDS_Primary;
    LPDIRECTDRAWSURFACE4 lpDDS_Flip;
    LPDIRECTDRAWSURFACE4 lpDDS_Back;
    LPDIRECTDRAWSURFACE4 lpDDS_Blit;
    LPDIRECTDRAWCLIPPER lpDDC_Clipper;


    If you need the hole code i can make a Print Screen or you guys can find it at http://www.zophar.net/genesis.html


    Im sorry if this is lost time for you guys, but, i really whanted this to work! ( i know i always have the emu ), but this is like...totaly diferent


    Thanx!
    Owmen

  2. #2
    Just Another Geek
    Join Date
    Jul 2002
    Location
    Rotterdam, Netherlands
    Posts
    3,401

    Re: Compiling emulador Gens on MS Visual c++ Help, please!

    Originally posted here by Owmen
    Genesis Project\Gens\G_ddraw.cpp(19) : error C2146: syntax error : missing ';' before identifier 'lpDD'
    This usually indicates there's a problem before the line it's reporting.
    It could be anything; a missed quote; bad comments; or indeed a semicolon missing.
    Look at the lines before the error.

    Also check if you have all the header files needed (it's those #include thingies at the beginning ).
    Oliver's Law:
    Experience is something you don't get until just after you need it.

  3. #3
    Antionline Herpetologist
    Join Date
    Aug 2001
    Posts
    1,165
    What compiler/OS are you using? This has to be compiled under Windows. And if you want to compile without a lot of changing the code, you have to use VC.

    EDIT: Oops! Didn't read the title . The first error is just a missing semicolon on the previous line. But the next one is a little trickier. Are you sure you have the DirectX SDK installed?

    Cheers,
    cgkanchi
    Buy the Snakes of India book, support research and education (sorry the website has been discontinued)
    My blog: http://biology000.blogspot.com

  4. #4
    Just Another Geek
    Join Date
    Jul 2002
    Location
    Rotterdam, Netherlands
    Posts
    3,401
    cgkanchi: I think he's really using Visual C++.

    Owmen: Just though of something. The DIRECTDRAW kinda stuck. You may need to install the DirectX SDK. Isn't there something mentioned in the docs? Look for requirements and/or dependencies.
    Oliver's Law:
    Experience is something you don't get until just after you need it.

  5. #5
    Senior Member
    Join Date
    Aug 2003
    Posts
    1,018
    I'm sorry, but aren't emulators for the purpose of running games on your computer that you can download from pretty much any ROM site...?

    and i just wanna "play" a little, nothing serious
    So are you saying that you are going to crack open your own genesis cartridges? How else are you going to test your emulator? Donwload someone elses ROMS? Doesn't that somehow imply that illegal activity, on some level, is going to take place?

    This has nothing to do with programming security... on the other hand, it has much to do with illegal activity, which , IMHO, doesn't belong on the front page?

    Maybe a mod will move this into GCC if you ask nice?

  6. #6
    Antionline Herpetologist
    Join Date
    Aug 2001
    Posts
    1,165
    groovicus,
    As a former emulator user, I know that there are a few legal "demo" ROMs available just for the purpose of testing your emulator. Sirdice, I edited it and then noticed that you said the exact same thing in your next post :/ .

    Cheers,
    cgkanchi
    Buy the Snakes of India book, support research and education (sorry the website has been discontinued)
    My blog: http://biology000.blogspot.com

  7. #7
    Senior Member
    Join Date
    Aug 2003
    Posts
    1,018
    I'm not arguing that... although I'm sure his actual intentions would be a good debate. ( I didn't flat out accuse him of any wrong doing)

    My argument is that it doesn't belong in programming security... if anything, code review would be more appropriate???

  8. #8
    Senior Member
    Join Date
    Apr 2003
    Posts
    109
    I just got home from work! wow, this generated a small debate, relax! Hum, from the beguining ( sorry for the english :\ ).

    Im not playing illegal roms, i have some demos my cousin made along time ago when he was at college, before he became a very busy guy even for helping me out with this :\, making me come here and ask for help.
    Im not gonna play Genesis Roms or open/scamble my own Genesis cartidriges.
    When i said "play" i ment, play with the emulator, with V C++.
    I dont know much about this, really, and i found this emulator made with ASM and C++ so i have the progs here from my cousin old college days so, i tough on doing something with this.
    Im gonna checkout the options and then report what all came up with, the material is, a PIII, OS XP Pro, DirectX 9.0b Runtime User...hum, newbie..:P, what is SDK? hum, im gonna check the microsoft site, and MS Visual C++, in the instalation/compilation file it says this:


    You need Visual C++ 6.0 with the DirectX 7.0 Runtime library and NASM installed
    in the root directory of the drive where you've checked out Gens (\nasm) to
    compile Gens project (NASM in included in the sources package, you just need
    to move it in the root directory).

    Gens uses the Starcream 680x0 library emulation for the genesis and Sega CD
    68000 CPU emulation, the core has been customised and optimised for Gens.

    Gens project is structured as follow :

    - Gens directory contains all gens sources except the CPU cores.
    - Main68k directory contains the sources for the main 68000 (genesis 68000).
    - Sub68k directory contains the sources for the sub 68000 (Sega CD 68000).
    - z80 directory contains the sources for the Z80 cpu (genesis).

    I used 2 68000 cores for speed reasons :
    - No context swap required.
    - Each core is optimised for its function.

    Here's the step to follow to compile succefully the win32 vesion of Gens :

    - Be sure to have VC (Visual C++) 6.0 with the DirectX 7.0 Runtime library installed.
    - Open the Main68k project (DSW file) with VC, build star.exe then close the project.
    - Open the Sub68k project with VC, build star.exe then close the project.
    - Exec the comp_m68k.bat file.
    - Exec the comp_s68k.bat file.
    - Open the Gens project with VC and build gens.exe, that's all

    Gens.exe file is normally build in the gens\release directory.
    To uses netplay features, Gens requires kailleraclient.dll, the file should be in
    the same directory as gens.exe

    I guess ( i guess only ) that i have all that necessary, right?

    Thanx for the patience ppl!
    Owmen

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •