|
|
|||||||
| Home | About Us | Register | FAQ | Members List | Calendar | Mark Forums Read |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#361 (permalink) | |
|
Emu author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Sep 2006
Location: VisualC
Posts: 796
|
Quote:
__________________
Emulator development blog |
|
|
|
|
|
|
#363 (permalink) |
|
Emu author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Sep 2006
Location: VisualC
Posts: 796
|
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 |
|
|
|
|
|
#364 (permalink) |
|
Plugin author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jul 2007
Location: Nulle part
Posts: 542
|
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.
__________________
No pity for n00bs here !
Last edited by NHervé; July 4th, 2008 at 22:56. Reason: Automerged Doublepost |
|
|
|
|
|
#365 (permalink) |
|
Plugin author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jul 2007
Location: Nulle part
Posts: 542
|
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
__________________
No pity for n00bs here !
Last edited by NHervé; July 10th, 2008 at 19:14. |
|
|
|
|
|
#366 (permalink) |
|
Plugin author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jul 2007
Location: Nulle part
Posts: 542
|
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.
__________________
No pity for n00bs here !
|
|
|
|
|
|
#367 (permalink) | |
|
Emu author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Sep 2006
Location: VisualC
Posts: 796
|
Quote:
Code:
if(!(MMU.DMACrt[proc][num]&(1<<25)))
MMU.DMAStartTime[proc][num] = 0;
__________________
Emulator development blog |
|
|
|
|
|
|
#368 (permalink) |
|
Plugin author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jul 2007
Location: Nulle part
Posts: 542
|
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.
__________________
No pity for n00bs here !
|
|
|
|
|
|
#369 (permalink) |
|
Emu author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Sep 2006
Location: VisualC
Posts: 796
|
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 |
|
|
|
|
|
#371 (permalink) |
|
Plugin author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jul 2007
Location: Nulle part
Posts: 542
|
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").
__________________
No pity for n00bs here !
|
|
|
|
|
|
#376 (permalink) |
|
Plugin author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jul 2007
Location: Nulle part
Posts: 542
|
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.
__________________
No pity for n00bs here !
|
|
|
|
|
|
#377 (permalink) |
|
Plugin author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jul 2007
Location: Nulle part
Posts: 542
|
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.
__________________
No pity for n00bs here !
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|