Jump to content


  • Posts

  • Joined

  • Last visited

ttursas's Achievements


Newbie (1/14)



  1. Here's our dswifilib enabled multiplayer (single player coming after we get multiplayer fully working) shooter game, Wright Flight (project name): http://users.tkk.fi/~vhelin/nintendoDS.html The game is quite incomplete, but currently you can shoot and damage the other players, collide with the backgrounds, and uhh configure the keys, on the fly. Anyway, a new release will be out this weekend, and I'll post more updates when I release new versions, to this forum: http://forum.gbadev.org/viewtopic.php?p=104817#104817
  2. It works! I guess... And I hope it does work tomorrow as well... Anyway, I disabled all dynamic memory allocations from the sgIP_Config.h, and made wHeapAllocInit() to use a static buffer. Could be fixed prettier, but this works for me. Yay!
  3. Seems that on the ARM9 side when it gets an IPC_FIFO_NOT_EMPTY interrupt (after sending that one UDP packet to my PC server), and calls Wifi_Sync() in the interrupt handler, the game just freezes. What can happen in Wifi_Sync() that makes the program freeze? It never returns from that while-loop? Why? It's hard to say what the code does... Out of memory error? Have to take a look at how libnds handles the interrupts, but here's mine: void irqHandler(void) { if (REG_IF & BIT_IE_T3) { // handle timer 3 Wifi_Timer(50); // end IRQ_CHECK |= BIT_IE_T3; REG_IF |= BIT_IE_T3; } if (REG_IF & BIT_IE_IPC_FIFO_NOT_EMPTY) { // handle IPC FIFO not empty u32 i = REG_IPCFIFORECV; if (i == 0x87654321) Wifi_Sync(); // end IRQ_CHECK |= BIT_IE_IPC_FIFO_NOT_EMPTY; REG_IF |= BIT_IE_IPC_FIFO_NOT_EMPTY; } if (REG_IF & BIT_IE_VBI) { // handle vblank // end IRQ_CHECK |= BIT_IE_VBI; REG_IF |= BIT_IE_VBI; } }
  4. Hehee, I got it working! Plugged both my DS (via Wifi) and my PC to D-Link DI-524 (my wireless router), and addressed the server on my PC using its IP. Both are now under 192.168.0.*... So TetattDS has now network play with 0.3b in my local configuration. When I had my PC outside DI-524, but connected to my ADSL model (and DI-524 is connected to my ADSL modem as well), it didn't work. 0.3a didn't work no matter how I had configured the cables... Also wifi_example1 works with my UDP code, but unfortunately my own game freezes when it has sent its first UDP packet... Have to investigate it more, but now this is really progressing. Thanks for TetattDS, also, I got a bit addicted to it while testing dswifilib...
  5. Got TetattDS to work with 0.3b! I guess this is a problem with my D-Link DI-524 as I plugged both my PC and DS into it (DS via wifi, ofcourse), and addressed my PC directly using its IP, and the game works. If my PC is outside DI-524, then it doesn't work. Also wifi_example1 works perfectly with my UDP code plugged into it, if PC and DS are both in 192.168.0.* under DI-524. With 0.3a this didn't work either. Now back to my own game, it sends one UDP and the PC recieves it, and at the very same moment the PC recieves the UDP packet my DS freezes. sendto() on the DS returns 1 (one byte payload there), so the freezing comes later. Perhaps the interrupts get fuxored? More investigations needed... But looks pretty good so far...
  6. Just tested dswifilib 0.3b, but it doesn't seem to solve my problem. I managed to send one UDP packet to my server and my game would freeze. Also tried TetattDS, and plugged 0.3b into it, but it couldn't connect to the server either I had running in my local loop. Any ideas? I'll continue my investigations with 0.3b...
  7. I just tested TetattDS (a nice game, BTW! ), and dswifilib 0.3b, but it didn't work. I mean, the game couldn't connect to the server. Everything compiled just fine under Linux... Damn. I hoped that 0.3b would solve my problems, but so far 0.3b has worked worse than 0.3a. With 0.3a I could send those 12 UDP packets using the supplied wifi_example1 as my basis. With 0.3b I managed to send one, but that would freeze my own application. Ugh... You wouldn't happen to have a TetattDS-server running somewhere?
  8. Thanks! I'll check it out tomorrow... I can see from Stephen's Weblog that he's found some memory allocation related bugs. Could be that if I waited for 0.3b my wifi code might start working... Anyway, meanwhile I'll check out tetattds and do more testing.
  9. I'd use it for testing. But I've added some UDP code to that wifilib_example, and can for some reason send only 12 UDP packets after which dswifilib just starts to return -1 from sendto()... A real working client-server combination would be nice, so I could really be 100% sure that it really works at least somewhere. If not at my home, then there would be something wrong in my local network, I guess.
  10. Also plugged my Linux box to the D-Link DI-524 wireless router directly, so that both DS and the PC were under the same local network. Fiddled with the port settings in D-Link, and used the PC's IP address directly when sending the UDP packets instead of its human readable name, but still got the same behaviour. 12 packets go through, after that sendto() gives -1. Am I sending the packets too fast (one 2 byte packet every second frame)? Could my 64bit Athlon X2 4400+ be the culprit (i.e., DevKitARM has fully been tested with it)? Argh, anything?
  11. Has anyone got sources for such combination? Just a simple UDP client that runs in DS, and a server that works on Linux or Windows... If you have sources for such a software (I don't care what it does as long as it really works, and sends packets from the client to the server, and possibly even back), please let me know, and email me the sources! I need to know if my local Wifi-network is plain broken... Or is my DevKitARM fuxored? Or is it just that I suck at coding.
  12. I copied my network code (connectionless UDP sendto) to wifi_example1, but it doesn't work much better: I can send exactly 12 UDP packets (2 byte payloads each), and after that nothing comes through. After I restart wifi_example1 I can again send those 12 UDP packets... And this is with the latest sources, and just adding that UDP code to your wifi_example1. Augh... Tried both my old blue DS and the new white DS lite, but the result was the same. And TCP doesn't connect to my Linux machine at all. I have opened the ports I use in my router, and that shouldn't be the reason. When I look at the lights on the router I can see that the DS doesn't send anything after those 12 UDP packets that reach my server program. Any ideas? It's weird because in wifi_example1 you make a TCP connection to www.akkit.org and read and display some data, and it works perfectly fine (looped the thing 20 times in a row a couple of times). I don't think it's my UDP code, because it works 100% on my Linux machine, and the UDP client code is just a couple of lines. Sometimes the client doesn't start giving errors and succeeds sending lots of UDP packets, but none of them come through. The router lights blink, and looks like it is recieving the data, but nothing comes through to my server. I guess the packets might be broken somehow, and the router just drops them, as it's very quiet on my ADSL modem side. Anyway, because www.akkit.org works fine there might be a problem with dswifilib and my local configuration? I have a DI-524 wireless router connected to my ADSL modem, and my Linux box is also connected to that ADSL box. What could cause such behaviour? I wish I had a remote UDP server machine so I could do testing outside the local loop, but no... Mario Kart works just fine, but how come I can send just 12 UDP packets to my local server, and after that sendto() gives -1?
  13. If I read my debug output correctly the ARM9 side doesn't fail sending the UDP packet (added some debug stuff to sendto()). But what happens next? I changed the ARM7 side of my program to your wifi_example1's ARM7 side (plus libnds7), but no help there. If I change the ARM9 init to that init in the example my app just gets stuck with a black screen... For some reason I cannot use my 3D stuff with libnds9. Might be the libnds's interrupt handling, don't know yet, but got to find out. I did some testing and couldn't make malloc() and free() to break (lots of malloc()s, free()s, and memory writes and reads, and verified that there was no data corruption). Also my own memory manager passed the tests...
  14. I did some testing and couldn't make malloc() and free() to break (lots of malloc()s, free()s, and memory writes and reads). Also my own memory manager passed the tests...
  15. It was too hot in Turkey (the worst day was +48C) for serious dev'ing, and we were busy getting cheated all the time by the locals (the Turkish sense of humor, or greed, I guess, never going back anyway). But I found out that if I compiled the same sources under Windows, I could always send one UDP packet from NDS to Windows, and then the NDS game got frozen. Weird. Same DevKitARM but different result. Next I'll check malloc() and free(), and do other testing (like add some debugging stuff to dswifi)...
  • Create New...