Emuforums.com

Go Back   Emuforums.com > Handheld Emulation > DeSmuME Discussion
About Us Register FAQ Members List Calendar Mark Forums Read

Login to remove all ads!
Reply
 
LinkBack Thread Tools Display Modes
Old May 1st, 2008   #281 (permalink)
Emu author
 
shashClp's Avatar
 
Join Date: Sep 2006
Location: VisualC
Posts: 687
Quote:
Originally Posted by RockmanForte View Post
(...) Some people work on the emulator then gave up and release source which is sad.
If you're talking about me, you should check this, if not, sorry for the assumption :P
__________________
Emulator development blog
shashClp is online now   Reply With Quote
Old May 1st, 2008   #282 (permalink)
Plugin author
 
NHervé's Avatar
 
Join Date: Jul 2007
Location: Nulle part
Posts: 413
I don't want to give up. I want to make of this the perfect emu, which can run all games without any bug and fast. But when it'll be, Nintendo surely had release the next-generation handheld, maybe DS II. Making a perfect emu takes a long time.
__________________
Pcsx2 is great emulator and Megapad is great pad plugin !!!
NHervé is offline   Reply With Quote
Old May 1st, 2008   #283 (permalink)
Rockman fan
 
RockmanForte's Avatar
 
Join Date: May 2002
Location: Earth!
Posts: 3,729
Quote:
Originally Posted by shashClp View Post
If you're talking about me, you should check this, if not, sorry for the assumption :P
Don't worry. I am not talking about you. I have every news on my note. To my point of view, you are doing just fine.

Quote:
Originally Posted by NHervé View Post
I don't want to give up. I want to make of this the perfect emu, which can run all games without any bug and fast. But when it'll be, Nintendo surely had release the next-generation handheld, maybe DS II. Making a perfect emu takes a long time.
Great! Then don't give it up.

Yes, there is no maybe. There is planning for next update of DS this summer.
__________________


CASE: EagleTech Sidewinder Gaming Tower Case w/420W Power Supply Black
OS: Windows XP Professional X64
CPU: Intel core 2 Duo Processor E8400 (2x 3.0GHz/6MB L2 Cache/1333FSB)
Processor Cooling: Thermaltake V1 CPU Cooling Fan System Kit Silent & Overclocking Proof
Graphics Card: NVIDIA GeForce 8800GT 512MB w/DVI + TV Out Video
Memory: 2048GB [1024GB X2] DDR2-800 PC6400 Memory Module Corsair-Value or Major Brand
Sound Card: 3D Premium Surround Sound Onboard
RockmanForte is offline   Reply With Quote
Old May 3rd, 2008   #284 (permalink)
Plugin author
 
NHervé's Avatar
 
Join Date: Jul 2007
Location: Nulle part
Posts: 413
Well, all VRAM handling should be rewritten...
In NSMB, the mini-games have bad sprites due to faulty VRAM handling...
I found how do they work :
They map the bank D as BOBJ and I as <Disabled> and write the sprite data in BOBJ, then they map bank D as LCD and bank I as BOBJ, and write in BOBJ some data for the pause buttons, and finally map bank D as BOBJ and I as LCD. When I press A (pause), the bank D gets mapped as LCD and the bank I as BOBJ.

So I can say that the sprite data must be at 0x06860000 (LCD+0x60000, bank D) and button data must be at 0x068A0000 (LCD+0xA0000, bank I).
__________________
Pcsx2 is great emulator and Megapad is great pad plugin !!!
NHervé is offline   Reply With Quote
Old May 4th, 2008   #285 (permalink)
Plugin author
 
NHervé's Avatar
 
Join Date: Jul 2007
Location: Nulle part
Posts: 413
I was reading the earlier posts...
When I talked about the RRR2 bug in the 3D core, Shash said it was not the 3D core. It was the 3D core, because the game sends the 3D commands in big-endian (ie : 0x1B000000 instead of 0x0000001B). The 3D core was designed for standard commands (0x0000001B), because of the NOPs being before the cmd, the 3D core was not shifting the command container and missing the command. After that it was interpreting the params as commands and was being completely messed up. Stupid bug, but not so simple to find.
__________________
Pcsx2 is great emulator and Megapad is great pad plugin !!!
NHervé is offline   Reply With Quote
Old May 10th, 2008   #286 (permalink)
Plugin author
 
NHervé's Avatar
 
Join Date: Jul 2007
Location: Nulle part
Posts: 413
Mod 3 is out !!! Don't wait anymore !!! Come download it !!!
__________________
Pcsx2 is great emulator and Megapad is great pad plugin !!!
NHervé is offline   Reply With Quote
Old May 10th, 2008   #287 (permalink)
Emu author
 
shashClp's Avatar
 
Join Date: Sep 2006
Location: VisualC
Posts: 687
Your fix for the depth clearing is faulty, it basically pushes the maximum depth to an unreasonable distance, with a maximum of 511, when the farthest distance on openGL after the modelview projection is 1, thus it will fail on any case of an .nds abusing it.
__________________
Emulator development blog
shashClp is online now   Reply With Quote
Old May 10th, 2008   #288 (permalink)
Eric Cartmenez
 
dreampeppers99's Avatar
 
Join Date: Jul 2006
Location: Brazil
Posts: 362
shashClp always seeing every thing...

NHervé good job
__________________
OS: Windows XP Professional SP2 (32bits)
CPU: Athlon XP 2400+ (2.0 Ghz)
Graphics Card: ATI X1650 Pro 512MB
Memory: 1GB DDR
dreampeppers99 is offline   Reply With Quote
Old May 10th, 2008   #289 (permalink)
Registered User
 
Join Date: Jan 2008
Location: Anti-Japanese
Posts: 6
Wonderful job! FF4DS could play now,but the speed is too slow......
Still can't play DQ4DS,BTW.
__________________
I'm Waiting For Further PSP Emulation!
Core 2 Duo T7100 1.8G
1G DDRII 667
Geforce 8400MG
refia is offline   Reply With Quote
Old May 10th, 2008   #290 (permalink)
Plugin author
 
NHervé's Avatar
 
Join Date: Jul 2007
Location: Nulle part
Posts: 413
Shash : I see you don't waste your time, the first thing you did when you saw the mod 3 is looking at the sources.
My depth fix is accurate, compared to Nocash specs, and it is correct.
You're wrong, I did the operation for the max possible depth (0x7FFF, not 0x7FFFF as it is in your source : 0x7FFF = 32767; 0x7FFFF=524287; that differ a lot), the result is giving 0xFFFFFF, which is divided by (1<<24)(=0x1000000), so the result CANNOT overflow 1.0 .
Check your code :
The good func (mine) is :
Code:
void NDS_glClearDepth(unsigned long v)
{
	u32 depth24b;

	v		&= 0x7FFF;
	depth24b = (v*0x200)+((v+1)/0x8000)*0x1FF;

	glClearDepth(depth24b / ((float)(1<<24)));
}
whereas your func is :
Code:
void NDS_glClearDepth(unsigned long v)
{
	u32 depth24b;

	if(beginCalled)
		glEnd();

	v		&= 0x7FFFF;
	depth24b = (v*0x200)+((v+1)/0x8000);

	// Using 23 instead of 24 fixes SM 64 DS
	glClearDepth(depth24b / ((float)(1<<23)));

	if(beginCalled)
		glBegin(vtxFormat);
}
As you can see, in your func, the depth is ANDed with 0x7FFFF instead of 0x7FFF, so your final depth overflows on informations about CLRIMAGE_OFFSET, that are garbage in this case. You got Mario64 to render correct with your hack that consists into dividing the final depth by (1<<23) instead of (1<<24), but some games could render incorrect on your code, whereas they will render correct on my code, because your final depth will contain garbage.
Check here :
Specifications
Quote:
4000354h - CLEAR_DEPTH - Clear Depth Register (W)
0-14 Clear Depth (0..7FFFh) (usually 7FFFh = most distant)
15 Not used
16-31 See Port 4000356h, CLRIMAGE_OFFSET


The 15bit Depth is expanded to 24bit as "X=(X*200h)+((X+1)/8000h)*1FFh".
__________________
Pcsx2 is great emulator and Megapad is great pad plugin !!!
NHervé is offline   Reply With Quote
Old May 10th, 2008   #291 (permalink)
Emu author
 
shashClp's Avatar
 
Join Date: Sep 2006
Location: VisualC
Posts: 687
Ouch, I stand corrected, I don't know why I ignored the nocash documentation when I implemented, good find

Btw, of course I look first at the sources, I'm a coder, I'm way more interested on code than final result XD
__________________
Emulator development blog
shashClp is online now   Reply With Quote
Old May 10th, 2008   #292 (permalink)
Plugin author
 
NHervé's Avatar
 
Join Date: Jul 2007
Location: Nulle part
Posts: 413
You didn't ignore totally the Nocash doc when you implemented it.
Your operation to convert the depth to 24-bit is almost the same as on Nocash doc.
Anyway it's great you recognized it. Don't forget to credit me when you'll commit your correct fix to your CVS.
__________________
Pcsx2 is great emulator and Megapad is great pad plugin !!!
NHervé is offline   Reply With Quote
Old May 10th, 2008   #293 (permalink)
Big DBZ fan
 
ShadowPlayer's Avatar
 
Join Date: Dec 2007
Location: Kastel Stafilic,Croatia
Posts: 360
great work NHerve,just keep it up

Pokemon Diamond is still not playable but I get this error message(see screenshot)
Attached Images
File Type: png dg.png (10.3 KB, 23 views)
__________________
DBZ FOREVER
ShadowPlayer is offline   Reply With Quote
Old May 10th, 2008   #294 (permalink)
Plugin author
 
NHervé's Avatar
 
Join Date: Jul 2007
Location: Nulle part
Posts: 413
Shash : just another thing : your code to support flipped-repeat textures work great, but there's a simpler way to do this. Look at the SetupTexture func found in opengl_collector_3Demu.c (I use this func in my core), it simply uses GL_MIRRORED_REPEAT.

ShadowPlayer : strange problem indeed. I think the problem is the emu returning a wrong value (unsupported I/O port or unaligned read, they are badly supported even if marked OK by ArmWrestler) and this value being loaded to PC. The value being wrong, PC gets wrong too, and the emu executes the content of a memory region that's not meant to contain code, but data.
__________________
Pcsx2 is great emulator and Megapad is great pad plugin !!!

Last edited by NHervé; May 10th, 2008 at 21:00. Reason: Automerged Doublepost
NHervé is offline   Reply With Quote
Old May 10th, 2008   #295 (permalink)
LET'S GO!! COME ON!!
 
Hard core Rikki's Avatar
 
Join Date: May 2004
Location: Perpetual Hawaii
Posts: 4,910
Not to sound like an a**, but some of this technical exchange might be more appropriate in private messagery or IRC. Just a note.
__________________
< My deviantART || GENERALEMU || XTEMU || Webcomics
VBA-M || @ES <(^_^)> <(^_^)>


Hard core Rikki is offline   Reply With Quote
Old May 10th, 2008   #296 (permalink)
Emu author
 
shashClp's Avatar
 
Join Date: Sep 2006
Location: VisualC
Posts: 687
Quote:
Originally Posted by NHervé View Post
Shash : just another thing : your code to support flipped-repeat textures work great, but there's a simpler way to do this. Look at the SetupTexture func found in opengl_collector_3Demu.c (I use this func in my core), it simply uses GL_MIRRORED_REPEAT.
I'll check it. I searched for an extension that did that, but didn't found it (or only some Matrox hardware supported it, I can't remember). I guess I'm forgetting the fixed pipeline after moving to shaders :P

Quote:
Originally Posted by Hard core Rikki View Post
Not to sound like an a**, but some of this technical exchange might be more appropriate in private messagery or IRC. Just a note.
Why, having some technical and intelligent discussion is forbidden in a release thread? Not to sound like an a** too, but I prefer this over messages with "LOL" all over or "Mmm ***". This being a NHervé's thread without any violation of the rules, I can't see any proble
__________________
Emulator development blog
shashClp is online now   Reply With Quote
Old May 10th, 2008   #297 (permalink)
Plugin author
 
NHervé's Avatar
 
Join Date: Jul 2007
Location: Nulle part
Posts: 413
Shash : GL_MIRRORED_REPEAT is defined in glext.h . Apparently, you don't need anything other.
I'm currently working on unaligned LDRs, I got ArmWrestler to mark them OK, but I think they are still not correct, some games displaying "undefined ARM instruction x" msg, probably due to unaligned LDRs returning wrong data. Maybe this is why RaymanDS isn't still working. (this game performs some unaligned LDRs at start, maybe these data are used later, after the 3rd intro screen).

Hard core Rikki : this is my thread, and this isn't against the forum rules. I know that normal people don't understand half of what we're discussing here.

Shash : how did you fix the LDRs in your emu ? In your arm_instructions.c file, they are still using the bad ROR macro.
I think unaligned reads could be the problem of RaymanDS, but I'm not sure at all. I don't know why it doesn't go over the 3rd intro.
__________________
Pcsx2 is great emulator and Megapad is great pad plugin !!!

Last edited by NHervé; May 11th, 2008 at 13:37. Reason: Automerged Doublepost
NHervé is offline   Reply With Quote
Old May 11th, 2008   #298 (permalink)
Eric Cartmenez
 
dreampeppers99's Avatar
 
Join Date: Jul 2006
Location: Brazil
Posts: 362
Well I agree with shashClp... this discussion don't "hurt" any rule ... anyway this is a emulation forum :S

("I know that normal people don't understand half of what we're discussing here") but those that understand... ;D even the minor
__________________
OS: Windows XP Professional SP2 (32bits)
CPU: Athlon XP 2400+ (2.0 Ghz)
Graphics Card: ATI X1650 Pro 512MB
Memory: 1GB DDR
dreampeppers99 is offline   Reply With Quote
Old May 12th, 2008   #299 (permalink)
Plugin author
 
NHervé's Avatar
 
Join Date: Jul 2007
Location: Nulle part
Posts: 413
Shash : I implemented low-power mode for ARM9, but RaymanDS still doesn't work. It's driving me nuts. I tried to log the opcodes, but, when logging is enabled, the emu logs for about 20 seconds and then crashes, giving a log that's not interesting. I wonder what's the problem.

And, what do you mean by "timing problem" ? I guess that the IRQs don't happen when they should do.
__________________
Pcsx2 is great emulator and Megapad is great pad plugin !!!
NHervé is offline   Reply With Quote
Old May 12th, 2008   #300 (permalink)
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 9,746
Quote:
Originally Posted by NHervé View Post
Shash : I implemented low-power mode for ARM9, but RaymanDS still doesn't work. It's driving me nuts. I tried to log the opcodes, but, when logging is enabled, the emu logs for about 20 seconds and then crashes, giving a log that's not interesting. I wonder what's the problem.

And, what do you mean by "timing problem" ? I guess that the IRQs don't happen when they should do.

it could be related to what i think i said earlier in terms of timing. Its common fact, when someone happens on the hardware, its never instant, so you need a delay on the interrupt to simulate the processing time. How long this is i dont know, but it might be worth having an internal timer system which waits xcycles * size for the dmas or what have you, to simulate the bus transfer time.
__________________

http://www.generalemu.net/
Intel Core 2 Quad Q6600 @ 3.4Ghz (425x8), eVGA 8800GTX 768mb, 1.8Tb HDs, 2Gb Corsair DDR2-800 @ DDR2-1020 5-5-5-18 Dual Channel, 14605 3dMark 06 Points
CPU-Z Link
3dMark06 Score Link
Dont PM me for help, use the forums, thats what its for!



refraction is offline   Reply With Quote
Reply