Emuforums.com

Go Back   Emuforums.com > Handheld Emulation > DeSmuME Discussion
Home Register Downloads FAQ Members List Calendar Arcade Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
Old July 3rd, 2008   #361 (permalink)
Emu author
 
shashClp's Avatar
 
Join Date: Sep 2006
Location: VisualC
Posts: 1,054
Quote:
Originally Posted by NHervé View Post
Shash : before, DeSmuME was written in C++. Why did you rewrite it to pure C ? I always thought that C++ was faster.
I didn't, my 3D core was written in C++ (and still is on my build, with the texture cache being C++ and the math helpers being C++ also), and my build uses C++. I don't know the exact reasons to loose such a large amount of time porting it over C (maybe due to most know machines have at least a C compiler, maybe due to author preference, don't know), but it was done by the Desmume team (CyberwarriorX, Guillaume, etc), not me, and it's something I definitely don't support.
__________________
Emulator development blog
shashClp is offline   Reply With Quote

Advertisement [Remove Advertisement]
Old July 4th, 2008   #362 (permalink)
Plugin author
 
Luigi__'s Avatar
 
Join Date: Jul 2007
Location: Peach__'s castle
Posts: 704
Ah, okay. Do you think C++ is faster than C ?
__________________
If you're wondering where Mario__ is, he is currently saving Peach__ once again.
Luigi__ is offline   Reply With Quote
Old July 4th, 2008   #363 (permalink)
Emu author
 
shashClp's Avatar
 
Join Date: Sep 2006
Location: VisualC
Posts: 1,054
Quote:
Originally Posted by NHervé View Post
Ah, okay. Do you think C++ is faster than C ?
They should be comparable as long as you don't abuse certain stuff (mainly abstract classes and other stuff that can only be resolved during runtime). I mainly code C++ because I'm more productive with it. I've coded on C for almost a decade, but now I prefer C++.
__________________
Emulator development blog
shashClp is offline   Reply With Quote
Old July 4th, 2008   #364 (permalink)
Plugin author
 
Luigi__'s Avatar
 
Join Date: Jul 2007
Location: Peach__'s castle
Posts: 704
Okay.

After some debugging on Worms2, I noticed it's always reading/writing to some IRQ/timer related I/O regs (namely IME, IE, IF, TM0CNT_L, TM1CNT_H). So I think the problem COULD be related to timers/IRQs, this isn't sure at all, it needs more debugging, especially on which proc is this happening and also what values are read/written.
__________________
If you're wondering where Mario__ is, he is currently saving Peach__ once again.

Last edited by Luigi__; July 4th, 2008 at 22:56. Reason: Automerged Doublepost
Luigi__ is offline   Reply With Quote
Old July 10th, 2008   #365 (permalink)
Plugin author
 
Luigi__'s Avatar
 
Join Date: Jul 2007
Location: Peach__'s castle
Posts: 704
Some news :

Before releasing Mod 4, I'll be focused on fixing Rayman DS. The game works, but instead of the "press start" screen, there's a black screen, and when I press Start, the game does strange things, like overwriting data at some memory locations. For the black screen, I noticed that the game sends data to the 3D core and all of these data seem valid, except the vertex coordinates that are always zero (don't know why, it needs more debugging).

Anyway, I've fixed one of the big bugs of Mario Party : the players were "not fully visible", even almost invisible. After doing some logging, I noticed that the game was changing material colors for each vertex. I thought that it wasn't allowed in OpenGL. While searching a way to do this, I found the official description page for glMaterial. I read there that OpenGL allows, just like the DS, to call glMaterial between glBegin and glEnd in order to set a material color per vertex.
The bug was that the 3D core was stopping and resuming vertex list at each glMaterial call. Try drawing some geometry with OpenGL, and calling glEnd and glBegin between each vertex. OpenGL won't draw anything. Here the problem was the same. So I modified the 3D core to don't stop vertex list at each glMaterial call, and then the characters in Mario Party now look correct.
There're still some bugs in this game : some lighting bugs, and the star being badly placed and giant !
Here're two shots of Mario Party, I let you guess which one is the fixed one. :P
Attached Images
File Type: jpg marioparty1.JPG (33.2 KB, 82 views)
File Type: jpg marioparty2.JPG (41.4 KB, 86 views)
__________________
If you're wondering where Mario__ is, he is currently saving Peach__ once again.

Last edited by Luigi__; July 10th, 2008 at 19:14.
Luigi__ is offline   Reply With Quote
Old July 16th, 2008   #366 (permalink)
Plugin author
 
Luigi__'s Avatar
 
Join Date: Jul 2007
Location: Peach__'s castle
Posts: 704
I found an interesting thing with Rayman DS : this game uses DMAs in Repeat mode, and DeSmuME doesn't seem to support this feature. I'll try to implement it, maybe it's the cause of the vertices with zero-coords, data overwriting and a lot of other strange memory operations.
__________________
If you're wondering where Mario__ is, he is currently saving Peach__ once again.
Luigi__ is offline   Reply With Quote
Old July 16th, 2008   #367 (permalink)
Emu author
 
shashClp's Avatar
 
Join Date: Sep 2006
Location: VisualC
Posts: 1,054
Quote:
Originally Posted by NHervé View Post
I found an interesting thing with Rayman DS : this game uses DMAs in Repeat mode, and DeSmuME doesn't seem to support this feature. I'll try to implement it, maybe it's the cause of the vertices with zero-coords, data overwriting and a lot of other strange memory operations.
Afaik, it's supported. Source code reference (line 2838-2839):

Code:
if(!(MMU.DMACrt[proc][num]&(1<<25)))
        MMU.DMAStartTime[proc][num] = 0;
__________________
Emulator development blog
shashClp is offline   Reply With Quote
Old July 16th, 2008   #368 (permalink)
Plugin author
 
Luigi__'s Avatar
 
Join Date: Jul 2007
Location: Peach__'s castle
Posts: 704
Did you check it with a homebrew or any other sort of test ?
It seems that the DMAs are stopped when word count has been reached, no matter if they're in repeat mode. The code you're showing only sets start mode to 0 (start immediately) if DMA isn't in repeat mode.
__________________
If you're wondering where Mario__ is, he is currently saving Peach__ once again.
Luigi__ is offline   Reply With Quote
Old July 16th, 2008   #369 (permalink)
Emu author
 
shashClp's Avatar
 
Join Date: Sep 2006
Location: VisualC
Posts: 1,054
That's because DMA on mode zero, start only when the control word is written. Repeat mode is only meant for DMAs on VBlank/timers/etc, which is why it is reset to immediate mode: this way, it won't repeat. Thus my code shows that repeat is correctly emulated, afaik. You're free to prove me wrong, though, but I don't recommend you re-implementing things that already work based only on assumptions.
__________________
Emulator development blog
shashClp is offline   Reply With Quote
Old July 16th, 2008   #370 (permalink)
Plugin author
 
Luigi__'s Avatar
 
Join Date: Jul 2007
Location: Peach__'s castle
Posts: 704
Okay, I believe you, I tried changing some things, but it didn't solve anything, so I reverted my changes.
__________________
If you're wondering where Mario__ is, he is currently saving Peach__ once again.
Luigi__ is offline   Reply With Quote
Old July 19th, 2008   #371 (permalink)
Plugin author
 
Luigi__'s Avatar
 
Join Date: Jul 2007
Location: Peach__'s castle
Posts: 704
Hi ! What do you think if 3D renderer was having its own thread ?
This could work, since it only requires synch with VBlank when swapping rendering buffers. (this synch is missing and this causes 3D screens to be reversed when there're 3D graphics on both screens).
I think this would give some speed-up, even if minor (at least on dual-cores), but I would like to do this mainly for accuracy purposes (correct gfx fifo (render queue) and irq emulation, synch on VBlank, would fix "Mario&Sonic at the Olympic Games").
__________________
If you're wondering where Mario__ is, he is currently saving Peach__ once again.
Luigi__ is offline   Reply With Quote
Old August 28th, 2008   #372 (permalink)
Registered User
 
Join Date: Nov 2007
Location: NZ
Posts: 12
NHervé,

Why don't you join the official desmume team? wouldn't it be better than releasing a seperate mod?
Normmatt is offline   Reply With Quote
Old August 28th, 2008   #373 (permalink)
Registered User
 
dreampeppers99's Avatar
 
Join Date: Jul 2006
Location: you know...
Posts: 504
Yes, Normatt saids all!!!
__________________
The Empyrean
dreampeppers99 is offline   Reply With Quote
Old August 30th, 2008   #374 (permalink)
Plugin author
 
Luigi__'s Avatar
 
Join Date: Jul 2007
Location: Peach__'s castle
Posts: 704
I'm wondering if I'll do this.
__________________
If you're wondering where Mario__ is, he is currently saving Peach__ once again.
Luigi__ is offline   Reply With Quote
Old August 31st, 2008   #375 (permalink)
Registered User
 
Join Date: Nov 2007
Location: NZ
Posts: 12
If you do be sure you join the official irc channel on freenode #desmume
Normmatt is offline   Reply With Quote
Old October 26th, 2008   #376 (permalink)
Plugin author
 
Luigi__'s Avatar
 
Join Date: Jul 2007
Location: Peach__'s castle
Posts: 704
Hi. I decided to give up DeSmuME dev for two reasons :

1. We don't know what happened to Martin, maybe he's having troubles with Nintendo. I don't want to have such troubles.
2. As said later (by Refraction), this isn't my area of expertise. I'm only able to fix small bugs. RRR2 was beginner's luck. I couldn't even fix Mario Kart, Rayman DS or Worms 2, after hours of trying random stuff and looking at the opcode flow in the disassemblers. For example, NSMB mini-games were easy to fix, but I missed it. I realized it once Shash fixed them.
__________________
If you're wondering where Mario__ is, he is currently saving Peach__ once again.
Luigi__ is offline   Reply With Quote
Old October 29th, 2008   #377 (permalink)
Plugin author
 
Luigi__'s Avatar
 
Join Date: Jul 2007
Location: Peach__'s castle
Posts: 704
Anyway, I'll give an idea of me for Mario Kart.
Maybe the problem is the inaccurate emulation of the SWI 3 (delay loop). Maybe the game uses it to sync the ARM7 with the ARM9 before starting. But DeSmuME doesn't emulate it accurately at all, so the ARM7 will never be synced and the game will never start.
__________________
If you're wondering where Mario__ is, he is currently saving Peach__ once again.
Luigi__ is offline   Reply With Quote
Old 2 Weeks Ago   #378 (permalink)
Registered User
 
Join Date: Aug 2002
Location: germany
Posts: 44
Haw, does that mean there's also no more Mod 4 to come? :-|
__________________
Specs:
Intel Core2Quad Q6600 @ 2400MHz, OC’d to 3400MHz (+ Scythe Mugen) - Abit IP35 Pro - 2x 1GB Corsair XMS2 DHX DDR2-800 (4-4-4-12-T1) - NesteQ EECS 7001 700W PSU - Gigabyte nVidia Geforce 8800GTS (G92-512MB) - Creative Soundblaster X-Fi Xtreme Music - 2x Western Digital (Caviar SE WD800JD) 80GB @ RAID0 - Windows Vista Business 32bit (+SP1)
Engeljaeger is offline   Reply With Quote
Old 2 Weeks Ago   #379 (permalink)
Registered User
 
Lex_Light's Avatar
 
Join Date: Aug 2008
Location: Spain
Posts: 701
Use recent Revisions, these work perfectly with almost every DS game.
__________________
AMD Athlon XP 2200+ (1,81 GHz), 1,25 GB of Ram, nVidia GeForce MX/MX 400. (Yes, it's an old computer).
Sorry for my english, I'm Spanish.
Please, read the rules of Emuforums before posting. Thanks.
Quote:
Originally Posted by Lex_Light View Post
Because nobody wants to get your thread closed (and some reports, even BAN!).
Page to download roms and isos for free.
Lex_Light is offline   Reply With Quote
Old 2 Weeks Ago   #380 (permalink)
iDeaS Bug Catcher
 
D1M1TR1's Avatar
 
Join Date: Aug 2008
Location: France
Posts: 67
These mods were made a long time ago, and as DeSmuME is no longer that slow and broken (whereas Luigi__ became a developper), there's no point in continuing these mods...
__________________
My computer specs:
OS: Vista Ultimate x86
CPU: Intel Core 2 Duo E6750 @2.66Ghz - 2GB of DDR2 RAM
GPU: NVIDIA GeForce 8800 GTS 512

My recommended settings for iDeaS:
DirectSound 1.0.1.4 beta: 22050 Hz - Stereo - Synchronize - buffer of 7 seconds
OpenGL 3D: disable Shaders and Fog (maybe Software Lights) unless stated otherwise.
D1M1TR1 is online now   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 15:04.

© 2006 - 2008 Emu Forums | About Emu Forums | Legal | A member of the Crowdgather Forum Community


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5