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 March 1st, 2008   #141 (permalink)
Registered User
 
Tony Luey's Avatar
 
Join Date: Nov 2006
Location: Philippines
Posts: 366
I start to load, "New Super Mario Bros. (USA)" after that it crash. "Error Report" show up after it crash. Do you think what is the problem?
Tony Luey is offline   Reply With Quote

Advertisement [Remove Advertisement]
Old March 1st, 2008   #142 (permalink)
Emu author
 
shashClp's Avatar
 
Join Date: Sep 2006
Location: VisualC
Posts: 1,055
Afaik, New Super Mario Bros won't get ingame with the lastest mod, so don't try to do so.
__________________
Emulator development blog
shashClp is offline   Reply With Quote
Old March 2nd, 2008   #143 (permalink)
Formerly NHervé
 
Luigi__'s Avatar
 
Join Date: Jul 2007
Location: Peach__'s castle
Posts: 712
Yes, the problem is GXFIFO IRQ is missing. I tried hacking it, but the IRQ never occurs because bit 21 of REG_IE is always 0, whereas in the other emus it is 1 when the IRQ is needed. Another bug to fix.
__________________
If you're wondering where Mario__ is, he is currently saving Peach__ once again.
Luigi__ is offline   Reply With Quote
Old March 2nd, 2008   #144 (permalink)
Emu author
 
shashClp's Avatar
 
Join Date: Sep 2006
Location: VisualC
Posts: 1,055
NHervé: Just reviewed your code, and if you don't update your working copy to the lastest CVS revision, I won't be able to retrofit most of your changes to the official CVS. I don't know how much you care about that, but I can't merge old source bases with the CVS without a huge amount of work.
__________________
Emulator development blog
shashClp is offline   Reply With Quote
Old March 2nd, 2008   #145 (permalink)
Formerly NHervé
 
Luigi__'s Avatar
 
Join Date: Jul 2007
Location: Peach__'s castle
Posts: 712
Guess what ??? I'm a big boss !!! I got the bit 21 to be 1 when expected, and after that, I hacked GXFIFO IRQ supposing the FIFO is always empty, and the game is damn slow, but I can get ingame !!!

Shash : Sorry for that, I'll review it.
__________________
If you're wondering where Mario__ is, he is currently saving Peach__ once again.

Last edited by Luigi__; March 2nd, 2008 at 22:49.. Reason: Automerged Doublepost
Luigi__ is offline   Reply With Quote
Old March 2nd, 2008   #146 (permalink)
Emu author
 
shashClp's Avatar
 
Join Date: Sep 2006
Location: VisualC
Posts: 1,055
Quote:
Originally Posted by NHervé View Post
Guess what ??? I'm a big boss !!! I got the bit 21 to be 1 when expected, and after that, I hacked GXFIFO IRQ supposing the FIFO is always empty, and the game is damn slow, but I can get ingame !!!.
That's more or less how I got it working the first time, long ago. But it's a hack, and not how the DS works. Now that you know how it works, you only have to implement it properly :P

EDIT: By the way, you still have to modify both zips to add the file "COPYING", which must be added due to GPL. It's not optional, that file must be added to both zip files due to the license:

1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.

I'll repeat that this isn't optional, and it's breaking the license, so please modify the zip files.
__________________
Emulator development blog

Last edited by shashClp; March 3rd, 2008 at 00:31..
shashClp is offline   Reply With Quote
Old March 3rd, 2008   #147 (permalink)
Formerly NHervé
 
Luigi__'s Avatar
 
Join Date: Jul 2007
Location: Peach__'s castle
Posts: 712
I don't mind very much implementing properly, maybe I'll do it further, but now I've to optimize the emu which is damn slow. For the moment this hack works well, assuming the FIFO is always empty, so less-than-half-full, because there's no FIFO. But IRQ won't occur if IRQ condition is Never, as on the real DS.
__________________
If you're wondering where Mario__ is, he is currently saving Peach__ once again.
Luigi__ is offline   Reply With Quote
Old March 3rd, 2008   #148 (permalink)
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 9,822
Quote:
Originally Posted by NHervé View Post
I don't mind very much implementing properly, maybe I'll do it further, but now I've to optimize the emu which is damn slow. For the moment this hack works well, assuming the FIFO is always empty, so less-than-half-full, because there's no FIFO. But IRQ won't occur if IRQ condition is Never, as on the real DS.
The point shash was making is hacking it is much easier than actually fixing it, but doing so could cause many games to break. The whole point in writing an emulator is to accurately reproduce what the original console does, hacking avoids this.

What i suggest you do, now you know what it should be doing, find out Why it doesnt do it, then fix that as the hardware documentation (or tests from a real DS) suggest.
__________________

http://www.generalemu.net/
Intel Core 2 Quad Q6600 @ 3.4Ghz (425x8), Leadtek GTX 280 1Gb, 1.8Tb HDs, 2Gb Corsair DDR2-800 @ DDR2-1020 5-5-5-18 Dual Channel
Dont PM me for help, use the forums, thats what its for!



refraction is offline   Reply With Quote
Old March 3rd, 2008   #149 (permalink)
Banned
 
Join Date: Feb 2007
Location: Lost.
Posts: 1,767
Quote:
The whole point in writing an emulator is to accurately reproduce what the original console does, hacking avoids this
So, your of the mentality,that the whole point of any emulator is a documentation effort? What about emulators with different mentalities, like PJ64 or Jnes? Do they go against the point of emulation?

Sure, I agree, hacks are bad, but I think there are other mentalities than from a emulator being a documentation project, like MAME.....*shudders*

Last edited by mudlord; March 3rd, 2008 at 13:04..
mudlord is offline   Reply With Quote
Old March 3rd, 2008   #150 (permalink)
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 9,822
Quote:
Originally Posted by mudlord View Post
So, your of the mentality,that the whole point of any emulator is a documentation effort? What about emulators with different mentalities, like PJ64 or Jnes? Do they go against the point of emulation?

Sure, I agree, hacks are bad, but I think there are other mentalities than from a emulator being a documentation project, like MAME.....*shudders*
well its not ALL documentation is it? i mean, i dont think ive come across a console where everything is documented 100%, apart from maybe NES and stuff where there has been massive communities working on hardware docs. A lot of things come down to actually reverse engineering it yourself. Sure there might be some things that cant be emulated properly and those have to be hacked in a way, but hacking where it isnt needed is not really a clever thing to do.

I dont know what you are referring to in PJ64 or Jnes, but im sure there are different ways of doing some things to optimize the program, but in the end it must work similar to how the console does, else games just arent gonna work.

I realise im limited in the consoles i know this to be the case with, primarily the PS2 is bad for this, it can be silly little things like status flags or control of interrupt/control masks (which he's talking about above). Hacking is a good way to find out how these are suppose to be working, then try and work out why its not doing it afterwards.
__________________

http://www.generalemu.net/
Intel Core 2 Quad Q6600 @ 3.4Ghz (425x8), Leadtek GTX 280 1Gb, 1.8Tb HDs, 2Gb Corsair DDR2-800 @ DDR2-1020 5-5-5-18 Dual Channel
Dont PM me for help, use the forums, thats what its for!



refraction is offline   Reply With Quote
Old March 3rd, 2008   #151 (permalink)
Formerly NHervé
 
Luigi__'s Avatar
 
Join Date: Jul 2007
Location: Peach__'s castle
Posts: 712
Shash : how do you speed up an emu ? I need this because the emu is damn slow, a dynarec would be more adapted.
__________________
If you're wondering where Mario__ is, he is currently saving Peach__ once again.
Luigi__ is offline   Reply With Quote
Old March 3rd, 2008   #152 (permalink)
Emu author
 
shashClp's Avatar
 
Join Date: Sep 2006
Location: VisualC
Posts: 1,055
Quote:
Originally Posted by NHervé View Post
Shash : how do you speed up an emu ? I need this because the emu is damn slow, a dynarec would be more adapted.
Exactly like any other app:

1. Profile
2. Locate and understand bottlenecks
3. Optimize as much as possible
4. Go to first point

There's little magic on emu coding :P
__________________
Emulator development blog
shashClp is offline   Reply With Quote
Old March 3rd, 2008   #153 (permalink)
Formerly NHervé
 
Luigi__'s Avatar
 
Join Date: Jul 2007
Location: Peach__'s castle
Posts: 712
Okay. Thanks.

Just a last question : how can I profile CPU usage ?
__________________
If you're wondering where Mario__ is, he is currently saving Peach__ once again.

Last edited by Luigi__; March 3rd, 2008 at 21:52.. Reason: Automerged Doublepost
Luigi__ is offline   Reply With Quote
Old March 3rd, 2008   #154 (permalink)
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 9,822
with either Intels VTune or AMD's Code Analyst, AMD's is probably easier for you to understand mind, V Tune is quite complex
__________________

http://www.generalemu.net/
Intel Core 2 Quad Q6600 @ 3.4Ghz (425x8), Leadtek GTX 280 1Gb, 1.8Tb HDs, 2Gb Corsair DDR2-800 @ DDR2-1020 5-5-5-18 Dual Channel
Dont PM me for help, use the forums, thats what its for!



refraction is offline   Reply With Quote
Old March 4th, 2008   #155 (permalink)
Banned
 
Join Date: Feb 2007
Location: Lost.
Posts: 1,767
Quote:
well its not ALL documentation is it? i mean, i dont think ive come across a console where everything is documented 100%, apart from maybe NES and stuff where there has been massive communities working on hardware docs. A lot of things come down to actually reverse engineering it yourself. Sure there might be some things that cant be emulated properly and those have to be hacked in a way, but hacking where it isnt needed is not really a clever thing to do.

I dont know what you are referring to in PJ64 or Jnes, but im sure there are different ways of doing some things to optimize the program, but in the end it must work similar to how the console does, else games just arent gonna work.

I realise im limited in the consoles i know this to be the case with, primarily the PS2 is bad for this, it can be silly little things like status flags or control of interrupt/control masks (which he's talking about above). Hacking is a good way to find out how these are suppose to be working, then try and work out why its not doing it afterwards.
I guess we misunderstood each other . What I was referring to in regards to being a "documentation effort" is that the main focus of a emulator is simply that: a documentation effort to document hardware, and thats that. Like what MAME is. and what side effects come from that aren't significant, so optimizations are thrown out of the window and instead cycle or even subcycle accuracy is pursued to the point of fanaticism. Of course in all cases, reverse engineering and some accuracy is needed, as you well put it, or the games won't boot at all. And definately, hacks are not really nice to fix things on a permanent basis.

When I referred to PJ64 and Jnes, I was referring to the fact they have completely different methodologies and built on different outcomes than what MAME is. For instance, I know zilmar built the emulator mainly as a enjoyment thing, and not as a documentation project. And so, its features reflect that. Same with Jnes, except Jabo written it to be minimalist and intuitive.

And so, what I originally asked you, is that do you see that all emulators should follow what MAME does and be's a documentation based project only, or are you open to that different emulators can have different objectives and goals. Thats mainly what I was really asking, since I got the vibe that you were of the purist emulation approach in that emulation is not done for enjoyment, but done purely for the sake of documenting in 100% detail how a piece of hardware runs. Which is exactly what MAME aspires to be.
mudlord is offline   Reply With Quote
Old March 4th, 2008   #156 (permalink)
The Alpha and Omega
 
ShakirMole's Avatar
 
Join Date: Mar 2007
Location: Tanzania
Posts: 304
and i must say mame has gone pretty far
This topic should be restricted for noobs like me to read and converse in since i may be interrupting an important topic except the 1st page
__________________
------------------------------------------------------
Join Irc server #thegoldcafe on channel irc.star-fleet.net and get rom compatibility lists for iDeaS,no$gba,and others and all your emulation needs
Alternatively, you could join through the java website which links directly to thegoldcafe channel
http://www.dscompatibilitydatabases.co.nr/

Professor Layton Walkthrough with excellent coverage and pics http://professorlaytonwalkthrough.blogspot.com/
ShakirMole is offline   Reply With Quote
Old March 4th, 2008   #157 (permalink)
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 9,822
Quote:
Originally Posted by mudlord View Post

When I referred to PJ64 and Jnes, I was referring to the fact they have completely different methodologies and built on different outcomes than what MAME is. For instance, I know zilmar built the emulator mainly as a enjoyment thing, and not as a documentation project. And so, its features reflect that. Same with Jnes, except Jabo written it to be minimalist and intuitive.

And so, what I originally asked you, is that do you see that all emulators should follow what MAME does and be's a documentation based project only, or are you open to that different emulators can have different objectives and goals. Thats mainly what I was really asking, since I got the vibe that you were of the purist emulation approach in that emulation is not done for enjoyment, but done purely for the sake of documenting in 100% detail how a piece of hardware runs. Which is exactly what MAME aspires to be.
ah i see what you mean now. well, i dont think it should be done purely for the purpose of documenting the hardware, in my mind that is interesting, but kind of pointless to do as a hobby! Emulators should always be made for your own enjoyment, hell if i didnt enjoy it, i wouldnt still be working on PCSX2.

The point i was making about documenting things which arent laid out in the original hardware docs, is merely to help homebrew developers and those who also want to make emulators, without hitting a brick wall. Not everybody can find every hardware quirk/difference on their own, i feel as a community we should help each other out
__________________

http://www.generalemu.net/
Intel Core 2 Quad Q6600 @ 3.4Ghz (425x8), Leadtek GTX 280 1Gb, 1.8Tb HDs, 2Gb Corsair DDR2-800 @ DDR2-1020 5-5-5-18 Dual Channel
Dont PM me for help, use the forums, thats what its for!



refraction is offline   Reply With Quote
Old March 7th, 2008   #158 (permalink)
Registered User
 
Join Date: Mar 2008
Location: Kaunas
Posts: 1
about this

I know this is funny,but how do I make this thing work? Do I need a somekinda program or something?Thank you.
Haris_Kaprex is offline   Reply With Quote
Old March 7th, 2008   #159 (permalink)
Formerly NHervé
 
Luigi__'s Avatar
 
Join Date: Jul 2007
Location: Peach__'s castle
Posts: 712
What do you mean ? getting New Super Mario Bros to work on DeSmuME ? The mod 3 will support this. If you want to get it to work yourself, you must download the source and add GXFIFO IRQ support (it is IRQ #21). The IRQs are documented here :
Specifications
And the GXFIFO is documented here :
Specifications

To get New Super Mario Bros to work, you must emulate this IRQ, else the game will freeze, waiting indefinitely for an IRQ that never occurs. Hacking it is not so hard.
__________________
If you're wondering where Mario__ is, he is currently saving Peach__ once again.
Luigi__ is offline   Reply With Quote
Old March 7th, 2008   #160 (permalink)
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 9,822
Quote:
Originally Posted by NHervé View Post
To get New Super Mario Bros to work, you must emulate this IRQ, else the game will freeze, waiting indefinitely for an IRQ that never occurs. Hacking it is not so hard.
you missed the point entirely. correct hacking it is not so hard. fixing it properly is the challenge, its also least likely to break things.

take this for example:-

a game waits for IRQ #21 to be cleared, this will work in DeSmuME's current state as the IRQ isnt emulated properly, but youve hacked it to always be 1, the game will loop indefinately.

so you will have made another game do exactly what super mario does to the other extreme. Games do have silly code like this. Okami on the PS2 doesnt work exactly for a reason like this. It wants to see DMA's busy for so long, then see it clear, else the game will loop. This is why Okami doesnt work in PCSX2.

So while hacking works in this instance, it may not work in others, which is why its important to try and emulate the IRQ correctly rather than just hacking it.


from what little ive read in that document (and understand of the DS, which is nothing :P), IRQ 21 should be set when a DMA transfer is done directly to the GXFIFO ( (DMACNT Bit27-29) = 111 (7) also bit 14 (IRQ upon end of Word Count) is set to 1) and the wordcount is completely transferred. i think you should debug Mario a bit to see if this is the case.
__________________

http://www.generalemu.net/
Intel Core 2 Quad Q6600 @ 3.4Ghz (425x8), Leadtek GTX 280 1Gb, 1.8Tb HDs, 2Gb Corsair DDR2-800 @ DDR2-1020 5-5-5-18 Dual Channel
Dont PM me for help, use the forums, thats what its for!




Last edited by refraction; March 7th, 2008 at 22:24..
refraction is offline   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 04:11.

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


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