Page 1 of 2 12 LastLast
Results 1 to 15 of 17

Thread: DLLs and emuparadise header project...

  1. #1
    Join Date
    Apr 2005
    Location
    Pennsylvania, USA
    Posts
    520
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default DLLs and emuparadise header project...

    I have a tut on it but it dosn't go into much explaining... And i from what i've seen, it might not even work. Anyone wanna take a stab at it here so we could add it to documentation or perhaps a header?






    I'm also thinking about working on an emuparadise project where we'll all make our own header (or series of headers) for functions and classes we find useful that would be then included in this group. Now i know if i start this project alot of people will be picking at other people's codes that will be included in the headers. Just like my keyboard and mouse IOS classes and functions and the thread function i made. (The reson people would probably complain is because i called functions through my functions that we already had but mine are for the lazy person...) Basically i don't want comments against one's code unless you know how to write the same thing with less code so it's more efficiant. I'm not 100 % sure i want to go through with this and start this project but for now we can assume that i will... If i don't host this project i'm sure some one else would take the headache i'm expecting to come admining this... lol

    Basically, what i have in mind is one header or even a folder for each member that posts here and after we're finished with the headers we'll zip them up and make them part of our little standard code here. Now, i don't plan to make a due date, but i'd like to have us just organize the code and when we think we're finished (if this takes less than a month to complete, i'll consider it a failure) we will just zip (or rar) them up then upload them some where, or maybe i could host it. I don't know, yet...

    My goals in this project:
    -To have network as stream objects like cin and cout (only it'll support wide hopefully)
    -Simple image printing (i really would like everything to be standard library but i think we'll have to make an exception for this... Let's limit this to OpenGL or Direct X...)
    -Heavy Comments on each function and a TXT or HTM(L) files that explain each object and function in MSDN's format.
    -Cordinates system (Wide hopefully) for console or even files
    -Irregular window drawing (like triangle windows or such)
    -Always on top
    -Mouse moving and/or disabling (makes games, especially full screen games, much easier to play without falling to the desktop)
    -Zip (or rar) compressor and decompressor during runtime. (Basically, things like wave or mp3 from inside an archive during runtime.)
    -Dynamic Variable editing (I know it can be done and i know it's also a danger for corruption, but basically it's to make things like trainers for games which can be used as development tools if you're working on a game, for anyone who makes games should know the value of this and love the added security so they can easily do all this without worry of removing parameter functions from the main function.)
    -Images without windows (i know this can be done, i have the source code of "neko" which does this... but it'd take a bit for me to disect the code and find out exactly how they did this... I can say though that it probably only works for icon files.)

    I know not all of the above will be done but i'd like most of it to be. When you're done you can just submit your header (or folder) and it'll be added. I'd like for you to be sure that's all you want to add first so we don't have to ammend it.

  2. #2
    Join Date
    Feb 2005
    Location
    Limbo
    Posts
    3,706
    Thanks
    0
    Thanked 2 Times in 2 Posts
    EP Points
    10

    Default

    Well, I'll say that some of the above are not too reasonable, some are impossible (not just practically impossible, but theorethically impossible), some are vaguely specified, and some others I can help with. Those would be image handling and RAR files. The former can't be done in standard C (well, obviously ), but pretty easy with OpenGL. I'll post code later.

  3. #3
    Join Date
    May 2002
    Location
    Méxique
    Posts
    10,738
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Switch to JAVA...

    Ooooooooooh...

    I kill myself...

    No, don't mind me, I know this forum is basically just for C++ nuts (points at Kohlrahkhkhkh), I just feel... Alienated...



    If I knew how to do that schtuff, I'd be in... Hats off... All three of 'em...

  4. #4
    Join Date
    Apr 2005
    Location
    Pennsylvania, USA
    Posts
    520
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I've been looking into java. A bit... boring, no offence. lol Plus you have the other level of indirection thing. I'd only use it for applets. lol

    Which ones are theoretically impossible? Other than the variable sharing... Cause i've seen every one of those things done. As for unspecification, i mean just what's on the list.Chances are since all of this stuff is really done for us, on the objectives list i've posted, it's all going to be headers that basically do alot of the code for us. I'll make an example of what i mean below.

    Download Links:
    Links are hidden from guests. Please register to be able to view these links. The above code is an example of what i hope to see done with some of the graphics GL code, irregular window drawing, deffinately internet, and anything else we see fit. Anyone who has ever created multiple threads, should know the value of this by now. Alot of code out there should've been developed with the "DUH factor" in mind. Too much code out there has parameters that 9 times out of 10 are going to be true, null, false, or some other commonly used number or value. Why type that over and over and over again. Also projects like this can greatly simplify other APIs like the internet. I've looked into an internet API, it's not pretty. It tells you all the things you have to do, rather than giving you a class and explaining why each parts are needed, instead they sit there and give you peice by peice and tell little stories of why and such when some people would rather just download a class or function to do all that for us. Some of this stuff should already be done for us. I mean, jeeze. The part say "bits need to be reversed for URL interpretation" or somthing like that. Well, then, why wasn't that included in the declaration of the object/function to begin with? It could have saved us ALOT of time reading. If it must be done, why make us do it when since it has to be done, it should be standard? That's the kind of stuff i'm hoping to eliminate with this project. Alot of the common sence code which is always the same, or simplifying many function calls down to one. Examples 1 and 2 are perfect examples of the stuff i'm talking about.

    In case anyone's working on the internet streams thing at the moment, i'm going to say exactly the kind of stuff i'm looking for cause this is probably the most complicated of what i hope to have in the project. Also, because as lengthy as some of the tutorials are and complicated, i myself have it last on my to do list, still with top wishes to having done. Learning winsock is like learning a whole new programming language, if you know what i mean. i know there are many types of methods, but try to have at least TCP and UDP. We will want to specify ports, have localization(like looking on own computer if a drive name is specified rather than DNS or IP), and automatically reverse DNSs to IPs, but without reversing an IP to DNS. We're going to want functions like waitforsingleconnection(PORT, METHOD), waitforconnectionfrom(IP, PORT, METHOD), waitforgroupofconnections(numberofconnections, PORT, METHOD), counters for how many connections are made, an array of chars or somthing that we can access from a class or somthing that stores the IP addresses of the clients. Also we're going to want a connecttoserver(IP, PORT, METHOD) and a connecttoanotherclient(IP, PORT, METHOD). Now if you make seperate objects for the protocols like UDP and TCP, you can eliminate the METHOD, but that's pretty much as far as anyone would want. Now, i've been looking things over, since direct x is windows only, and apparently winsock is the only other internet thing out there that grants such on windows, we're going to have to stick to windows API and i will stress winsock over direct x, simply because not only is it documented winsock is "better", but direct x isn't standard. If, you do find a cross platform standard, try that. Also, my knowledge i've found after posting this, TCP only supports 1 connection per port at a time, but is more sure to get there. Also, rumor has it that either TCP or UDP is unstable to the point that sometimes packets arrive out of order. If you can, make a function to fix that, but make it optional. Perhaps something we could define in a constructor when we declare the object that we want to use it or not? Just incase it slows down packets. If you find any fixes for any problems, like packet order, wait time, or such, try not to include them automatically cause they're also known to create new bugs. Try to make them false and to make them true, create seperate functions for each to make them true, or back to false again.

    Basically, this project is to simplify lots of code, but not be buggy at the same time. And those working on it, do us all a favor and test your code before moving on. I'm sure for the internet thing, you can get me to be a beta tester, as long as i'm compiling the program on my end.

  5. #5
    Join Date
    Feb 2005
    Location
    Limbo
    Posts
    3,706
    Thanks
    0
    Thanked 2 Times in 2 Posts
    EP Points
    10

    Default

    Quote Originally Posted by kohlrak
    -Irregular window drawing (like triangle windows or such)
    -Always on top
    -Dynamic Variable editing (I know it can be done and i know it's also a danger for corruption, but basically it's to make things like trainers for games which can be used as development tools if you're working on a game, for anyone who makes games should know the value of this and love the added security so they can easily do all this without worry of removing parameter functions from the main function.)
    -Images without windows (i know this can be done, i have the source code of "neko" which does this... but it'd take a bit for me to disect the code and find out exactly how they did this... I can say though that it probably only works for icon files.)
    The above probably requires extensive knowledge of the Windows API, something I do not have.
    -Cordinates system (Wide hopefully) for console or even files
    Now, what the hell is this? I mean, wide coordinates? Even in files? Unless you're smoking something, you probably simply mean cursor positioning. Again, this is API dependant, here's a gotoxy function for Windows.
    Download Links:
    Links are hidden from guests. Please register to be able to view these links.
    -Mouse moving and/or disabling (makes games, especially full screen games, much easier to play without falling to the desktop)
    Well, it's somewhere in WinAPI, again, unless you use another window manager, and then you'll find it there, possibly.

    Download Links:
    Links are hidden from guests. Please register to be able to view these links. Well, here's some RAR compression and whatnot. There are more detailed examples in the package that can be downloaded from the WinRAR site, along with UnRAR.dll. I won't give explanations on what's exactly what, since it's either basic syntax, or it's detailed in the documentation of the unrar.dll, and therefore I do not remember it not. Supposedly the above code works, opens a RAR file and extracts it. It wouldn't take much now to extract only a single file (yep, the whole archive needs to be processed), and then read stuff from it, possibly removing it afterwards.
    -Simple image printing (i really would like everything to be standard library but i think we'll have to make an exception for this... Let's limit this to OpenGL or Direct X...)
    Well, I'd post my drawing functions, but OpenGL's hardly the simplest way for this. SDL or PTK (I believe those were the names) provide much easier 2D drawing, but having never used them, not much I can help with that.

    Download Links:
    Links are hidden from guests. Please register to be able to view these links.
    Have you considered using macros? They do simply that, replace text. So, in some compilers, printf is implemented as a macro, so:

    #define printf(stuff) fprintf(stdout,stuff)

    So, you could do the same for those other functions as well.
    I'd like to add that, chances are, if something needs six arguments, they're needed for a reason.
    Well, the WinAPI might be an exception, MS likes to waste lines of code.
    Last edited by pkt-zer0; 28th-November-2005 at 21:45.

  6. #6
    Join Date
    Apr 2005
    Location
    One OS to rule them all...
    Posts
    756
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    Nice idea.
    What about some custom EP skins, like Alien, Military (yes...they somehow go together), Retro, 60's, Psychedelic, etc? $2.95, charged to your mobile phone...heh
    C code makes me dizzy.......errrrrrrrr...

  7. #7
    Join Date
    Feb 2005
    Location
    Limbo
    Posts
    3,706
    Thanks
    0
    Thanked 2 Times in 2 Posts
    EP Points
    10

    Default

    Quote Originally Posted by hardc0regamer
    C code makes me dizzy.......errrrrrrrr...
    I can do much worse. The following code compiles correctly, and prints a nice little christmas song to the screen. As I've said, it's entirely valid, ANSI-C code.
    Download Links:
    Links are hidden from guests. Please register to be able to view these links.

  8. #8
    Join Date
    Apr 2005
    Location
    Pennsylvania, USA
    Posts
    520
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Daaaaaaaaamn pkt.... That looks like ASM or somthing. ANd it's not COMPLETELY valid...

    --------------------Configuration: Cpp1 - Win32 Debug--------------------
    Compiling...
    Cpp1.cpp
    C:\Documents and Settings\Kohlrak\Debug\Debug\Debug\Debug\Cpp1.cpp( 2) : error C2065: 't' : undeclared identifier
    C:\Documents and Settings\Kohlrak\Debug\Debug\Debug\Debug\Cpp1.cpp( 2) : error C2065: '_' : undeclared identifier
    C:\Documents and Settings\Kohlrak\Debug\Debug\Debug\Debug\Cpp1.cpp( 2) : error C2065: 'a' : undeclared identifier
    C:\Documents and Settings\Kohlrak\Debug\Debug\Debug\Debug\Cpp1.cpp( 2) : error C2448: '<Unknown>' : function-style initializer appears to be a function definition
    C:\Documents and Settings\Kohlrak\Debug\Debug\Debug\Debug\Cpp1.cpp( 2) : fatal error C1004: unexpected end of file found
    Error executing cl.exe.

    Cpp1.exe - 5 error(s), 0 warning(s)
    I know it's a C++ compiler, but everything's backwords compatable.

    And thanks for the code, i'll get started on the weekend. I gotta do a project for school now so when i can get a break or get it done (probably weekend) i'll shorten it into the header. As for the six function thing... Chances are, if it needs 6 parameters, it's most likely in the windows API. lol

    unrar.h in that one code is... Could you send it to me and all it's dependencies? Or is that on the winrar site along with the DLL?

    (As for macros, i'd like to be able to put this stuff in a namepsace also. I don't think you can namespace macros.)

  9. #9
    Join Date
    Feb 2005
    Location
    Limbo
    Posts
    3,706
    Thanks
    0
    Thanked 2 Times in 2 Posts
    EP Points
    10

    Default

    Quote Originally Posted by kohlrak
    Daaaaaaaaamn pkt.... That looks like ASM or somthing. ANd it's not COMPLETELY valid...
    I know it's a C++ compiler, but everything's backwords compatable.
    It's completely valid, as I've said.

    The only warning the compiler throwed is a missing newline at the end of file.
    MS's compiler does not even fully comply to the C++ standard. There are differences between C and C++ anyway, the latter is stricter on some points (I believe you can't get away with not specifying function prototypes, whereas in C you could even give 3 arguments to a function that required 4. Sure, the behaviour could be pretty random, but it could be done. Not in C++.)
    Anyhow, you could've compiled it as a .c file instead of .cpp. Or compile it as C++ code, but to do that you also have to specify it as such:

    extern "C" { .....code..... }

    unrar.h in that one code is... Could you send it to me and all it's dependencies? Or is that on the winrar site along with the DLL?
    http://www.rarlab.com/rar_add.htm
    I got the stuff from here originally.

    (As for macros, i'd like to be able to put this stuff in a namepsace also. I don't think you can namespace macros.)
    Pshaw. You could split it into separate headers, and only include them if you need them. Namespaces don't do much more than that, either. And it is a waste of processing power to call a function when all that is being done is a few arguments getting replaced by default values.

  10. #10
    Join Date
    Apr 2005
    Location
    Pennsylvania, USA
    Posts
    520
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Odd, i get the errors even when i use extern C.

  11. #11
    Join Date
    Feb 2005
    Location
    Limbo
    Posts
    3,706
    Thanks
    0
    Thanked 2 Times in 2 Posts
    EP Points
    10

    Default

    Quote Originally Posted by kohlrak
    Odd, i get the errors even when i use extern C.
    Well, that code probably exploits every possibility of the C language, so I wouldn't really bet on it that it'd compile as C++ code.
    Change the file extension to .c, and compile it then. If even that doesn't work, use a decent compiler, like GCC. It's free, even.

  12. #12
    Join Date
    Apr 2005
    Location
    Pennsylvania, USA
    Posts
    520
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    GCC is for cross platform things like mac and stuff. I've been looking for it for a while now. I can't find it. I'd like to use it to make GBA games and such.

  13. #13
    Join Date
    Feb 2005
    Location
    Limbo
    Posts
    3,706
    Thanks
    0
    Thanked 2 Times in 2 Posts
    EP Points
    10

    Default

    Quote Originally Posted by kohlrak
    GCC is for cross platform things like mac and stuff. I've been looking for it for a while now. I can't find it. I'd like to use it to make GBA games and such.
    http://gcc.gnu.org/mirrors.html
    Just type GCC in Google, simple as that.
    BTW, you're pretty far from making GBA games, since that uses a different architechture altogether, that could take some time to learn.

  14. #14
    Join Date
    Apr 2005
    Location
    Pennsylvania, USA
    Posts
    520
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    It's still C++. In the end, everything is converted to the right order. Right now i'd be happy to have a hello world program on the GBA.

    EDIT: jeeze... Can't they just make a folder called "current release" or somthing? Or perhaps point us in the right direction? o.O
    Last edited by kohlrak; 30th-November-2005 at 21:00.

  15. #15
    Join Date
    Jan 2005
    Posts
    88
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by kohlrak
    It's still C++. In the end, everything is converted to the right order. Right now i'd be happy to have a hello world program on the GBA.
    Starting to program on the GBA is a bit harder than starting on the PC. The GBA hardware is controlled by several memory registers. It is up to we programmers to build our systems around these registers as we see fit. Normally, it takes knowledge of the GBA graphics modes and a homegrown string blitting function to put text on the screen, but now there are a few good libraries out there to simplify things.

Posting Permissions

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

We are the oldest retro gaming forum on the internet. The goal of our community is the complete preservation of all retro video games. Started in 2001 as EmuParadise Forums, our community has grown over the past 18 years into one of the biggest gaming platforms on the internet.

Social