Jump to content

yorel

Members+
  • Posts

    29
  • Joined

  • Last visited

yorel's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. yorel

    A demo game

    ok, thx i will see in this file. I don't want you to correct all my errors, just give me an idea what kind of error it is, just what you do for the first one. Thanks a lot.
  2. yorel

    A demo game

    I tried ||. mmm i will retry... The waranty message on the post 17 of this section http://www.1emulation.com/forums/index.php...11entry189957
  3. yorel

    A demo game

    A stupid question about Notepad programmer : How do you make a 'or' in a "while" or in a "if" ? i tried |, ||, or, v ? The 'help' don't help me... Stephen : Have you an idea about my waranty message ? Sometimes, Notepad say nothing and make the file ds.gba. Nb: i changed the main file.
  4. yorel

    A demo game

    Ok, For the file on windows, we have to add "#pragma comment(lib, "wsock32.lib")" after all the 'include'. Jl
  5. yorel

    A demo game

    It was not funny to copy all ( it takes me a lot of time ) but there were too many errors and "makefile and me", we are not good friend. Thanks a lot for the windows file, i try it tomorrow.
  6. i'm actually on my home pc ( 350Mz, 98... ) I do a rebuild tomorrow (8h30 for me in belgium ^^ ) at the university. the warnings are all the same. I have two times the first one and five or six the second one. I have no more errors, so i have a beautiful "ds.gba" file. EDIT : So, here all the warnings message but i doubt that it will be very usefull. > "make" main.c c:/Projects/HelloWorld/source/main.c:809: warning: 'struct sockaddr' declared inside parameter list c:/Projects/HelloWorld/source/main.c:809: warning: its scope is only this definition or declaration, which is probably not what you want c:/Projects/HelloWorld/source/main.c:869: warning: 'struct sockaddr' declared inside parameter list c:/Projects/HelloWorld/source/main.c:922: warning: 'struct sockaddr' declared inside parameter list c:/Projects/HelloWorld/source/main.c: In function 'main': c:/Projects/HelloWorld/source/main.c:1082: warning: type-punning to incomplete type might break strict-aliasing rules c:/Projects/HelloWorld/source/main.c:1082: warning: passing argument 2 of 'bind' from incompatible pointer type c:/Projects/HelloWorld/source/main.c:1110: warning: type-punning to incomplete type might break strict-aliasing rules c:/Projects/HelloWorld/source/main.c:1110: warning: passing argument 5 of 'sendto' from incompatible pointer type c:/Projects/HelloWorld/source/main.c:1118: warning: type-punning to incomplete type might break strict-aliasing rules c:/Projects/HelloWorld/source/main.c:1118: warning: passing argument 5 of 'recvfrom' from incompatible pointer type c:/Projects/HelloWorld/source/main.c:1177: warning: type-punning to incomplete type might break strict-aliasing rules c:/Projects/HelloWorld/source/main.c:1177: warning: passing argument 5 of 'sendto' from incompatible pointer type c:/Projects/HelloWorld/source/main.c:1187: warning: type-punning to incomplete type might break strict-aliasing rules c:/Projects/HelloWorld/source/main.c:1187: warning: passing argument 5 of 'sendto' from incompatible pointer type arm-elf-g++ -g -mthumb-interwork -mno-fpu -L/c/devkitPro/PAlib/lib -specs=ds_arm9.specs main.o wifi_arm7.o -Lc:/devkitPro/PAlib//lib -lpa9 -L/c/devkitPro/libnds/lib -lnds9 -o build.elf Nintendo DS rom tool 1.24 - Oct 19 2005 20:26:11 by Rafael Vuijk (aka DarkFader) built... HelloWorld.ds.gba dsbuild 1.21 - Oct 19 2005 using default loader > Process Exit Code: 0 > Time Taken: 00:08 The code is in the 'little demo game topic'. I send it to sgstair@akkit.org, too.
  7. yorel

    A demo game

    Of course, i know but i had a lot of problems with that and with the makefile. I speak of them before yesterday. i try this solution ( only two files ) and it seems to work. I have only the two 'waranty' messages i told you today and a beautiful ".ds.gba" file. I remember that i had the first waranty message for the normal lib, too... so... If you want, i will send you my projects tomorrow. I will try something before. If you have files for the pc side ( for example ) i like to have a copy.
  8. I have one more question : How can i do to delete these 'warning' message : 1°) c:/.../main.c:809: warning: 'struct sockaddr' declared inside parameter list c:/.../main.c:809: warning: its scope is only this definition or declaration, which is probably not what you want int bind(int socket,const struct sockaddr * addr, int addr_len) {;}; 2°) c:/.../main.c:1187: warning: type-punning to incomplete type might break strict-aliasing rules c:/.../main.c:1187: warning: passing argument 5 of 'sendto' from incompatible pointer type int sendto(int socket, const void * data, int sendlength, int flags, const struct sockaddr * addr, int addr_len) {... }; ... sendto(sock,sendbuf,strlen(sendbuf),0,(struct sockaddr *)&sain,sizeof(sain));
  9. yorel

    A demo game

    Space for pc program. Aie AIe Aie... am I able to do this ??? #include <winsock2.h> #include <windows.h> #include <Stdio.h> #include <stdlib.h> //#include <iostream.h> #pragma comment(lib, "wsock32.lib") int main(int argc, char * argv[]) { SOCKET sock; srand(GetTickCount()); printf("----------------------------------\n"); printf("Little game version 0.0000001\n"); printf("----------------------------------\n"); { WSADATA d; int i; i=WSAStartup(0x0002,&d); if(i==0) { printf("Winsock 2.0 initialized correctly...\n"); } else { printf("Winsock failed to init.\n"); return 0; } } sock=socket(AF_INET,SOCK_DGRAM,0); sockaddr_in sain; sain.sin_family=AF_INET; sain.sin_addr.S_un.S_addr=ADDR_ANY; sain.sin_port=htons(8888); if(bind(sock,(sockaddr *)&sain,sizeof(sain))) { printf("bind() error!\n"); closesocket(sock); return 0; } char incomingbuf[1024]; char outgoingbuf[1024]; int datalen; int sain_len; sockaddr_in sender; DWORD err; int a=0; printf("L'ordinateur est en train d'attendre la réception d'un message.\n"); printf("Apuyer sur 0 pour l'arrêter.\n"); printf("\n"); printf("\n"); while(0) //a<1000) { sain_len=sizeof(sender); datalen=recvfrom(sock,incomingbuf,1023,0,(sockaddr *)&sender,&sain_len); if(datalen>0) { incomingbuf[datalen]=0; printf("UDP Datagram from %i.%i.%i.%i:%i\n",sender.sin_addr.S_un.S_un_b.s_b1,sender.sin_addr.S_un.S_un_b.s_b2,sender.si n_addr.S_un.S_un_b.s_b3,sender.sin_addr.S_un.S_un_b.s_b4,ntohs(sender.sin_port)); printf("Received '%s' [%i]\n",incomingbuf,datalen); } else { err=WSAGetLastError(); Sleep(1); } printf("Valuer de a : %s \n",a); a++; } printf("Il nous faut maintenant envoyer l'obstacle.\n"); printf("Apuyer sur 0 pour l'arrêter.\n"); wsprintf(outgoingbuf,"%s|rnd=%i",incomingbuf,rand()&0xFF); printf("Sent back: '%s' [%i]\n",outgoingbuf,strlen(outgoingbuf)); printf("\n"); printf("\n"); while(a<1000) { sendto(sock,outgoingbuf,strlen(outgoingbuf)+1,0,(sockaddr *)&sender,sizeof(sender)); a++; } a=0; printf("L'ordinateur est en train d'attendre la réception d'un message de réussite ou d'échec au jeu.\n"); printf("Apuyer sur 0 pour l'arrêter.\n"); printf("\n"); printf("\n"); while(0) //a<1000) { sain_len=sizeof(sender); datalen=recvfrom(sock,incomingbuf,1023,0,(sockaddr *)&sender,&sain_len); if(datalen>0) { incomingbuf[datalen]=0; printf("UDP Datagram from %i.%i.%i.%i:%i\n",sender.sin_addr.S_un.S_un_b.s_b1,sender.sin_addr.S_un.S_un_b.s_b2,sender.si n_addr.S_un.S_un_b.s_b3,sender.sin_addr.S_un.S_un_b.s_b4,ntohs(sender.sin_port)); printf("Received '%s' [%i]\n",incomingbuf,datalen); } else { err=WSAGetLastError(); Sleep(1); } printf("Valuer de a : %s \n",a); a++; } /*while(1) { sain_len=sizeof(sender); datalen=recvfrom(sock,incomingbuf,1023,0,(sockaddr *)&sender,&sain_len); printf("vache 3\n"); if(datalen>0) { wsprintf(outgoingbuf,"%s|rnd=%i",incomingbuf,rand()&0xFF); printf("Sent back: '%s' [%i]\n",outgoingbuf,strlen(outgoingbuf)); sendto(sock,outgoingbuf,strlen(outgoingbuf)+1,0,(sockaddr *)&sender,sizeof(sender)); incomingbuf[datalen]=0; printf("UDP Datagram from %i.%i.%i.%i:%i\n",sender.sin_addr.S_un.S_un_b.s_b1,sender.sin_addr.S_un.S_un_b.s_b2,sender.si n_addr.S_un.S_un_b.s_b3,sender.sin_addr.S_un.S_un_b.s_b4,ntohs(sender.sin_port)); printf("Received '%s' [%i]\n",incomingbuf,datalen); } else { err=WSAGetLastError(); Sleep(1); } }*/ closesocket(sock); return 0; }
  10. Euh... you have to look your-self where the files are installed... or to use Norton and its tools...
  11. Indeed, i change the struct sockadress_in of file and these errors have vanished... for others... Bouh Bouh Bouh... i'm going to try an other solution. i have to do a conversation between a PC and a DS... Jl
  12. i have some problem with the file sgIP_sockets.c of the lib source. I'm trying to compile ( devkitpro ) but some errors with pointers appear... it is said : "In file included from c:/Projects/HelloWorld/source/main.c:8: C:\...\source\sgIP_sockets.c:81: warning: 'struct sockaddr_in' declared inside parameter list C:\...\source\sgIP_sockets.c:81: warning: its scope is only this definition or declaration, which is probably not what you want C:\...\source\sgIP_sockets.c: In function 'bind': C:\...\source\sgIP_sockets.c:89: error: dereferencing pointer to incomplete type C:\...\source\sgIP_sockets.c:90: error: dereferencing pointer to incomplete type" I have the same type of problem in function 'sendto' and recvfrom. I have tried some possibility but none seem to work... The code : int bind(int socket, struct sockaddr_in *addr, int addr_len) { ... retval=sgIP_UDP_Bind((sgIP_Record_UDP *)socketlist[socket].conn_ptr, ((struct sockaddr_in *)addr)->sin_port, //PROB HERE ((struct sockaddr_in *)addr)->sin_addr.s_addr); // PROB HERE } The function sgi^p_UDP_Bind is : int sgIP_UDP_Bind(sgIP_Record_UDP * rec, int srcport, unsigned long srcip) I have tried a cast, &, *... i don't find.
  13. Just, I forgot to speak about the firmware version. Be carry about that ! You have surely a old firmware. Make the test.
  14. Ok, well. For 'wifi me' solution. You will need to have : A GBA flash card (50 euro) A PCI/PCMIA WIFI card (30 euro) like these ones on this site : http://ralink.rapla.net/ I have : -Xport 2.0B ( Charmed labs ) -Belkin F5D7000 You dl and install all the files of this web site : http://users.belgacom.net/bn967347/download.htm Attention, put the file wifime in 'data' in wmb !!! ( read instructions ) You put the file you want to test on your DS on the flash card with the software sold with your flash card. ! "ds.gba" file ! You open a "DOS window", you search the file wmb.exe with the command "cd Name_of_the_directory_you_want_enter" and "dir". Then, you write "wmb.exe -data wifime". You go on your DS, you go in "download menu". Normaly, you will have the possibility to dl 'Firefly'. Click Yes... It dl the files to make the application on the flash card starts correctly. ( in other case, you will have two white screen on your ds... sometimes only one... ) Ok ?
  15. Need informations ? http://www.aaronrogers.com/nintendods/index.php Pass me -> need some materials,... Flash me -> some problems ? Wifi me -> You put the ds.gba file on your gba flash cart and you dl wifime on your ds via WMB. ( so you need a correct Wifi card ). ok ?
×
×
  • Create New...