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 February 18th, 2008   #61 (permalink)
Emu author
 
shashClp's Avatar
 
Join Date: Sep 2006
Location: VisualC
Posts: 1,055
Quote:
Originally Posted by dreampeppers99 View Post
Some move on DesMuMe project....
Better check again :P

NHervé: I just saw, debugged and tried to hack what you reported, but I've quite a lot to read to see why it's failing and how it should work, as I basically don't know a single bit about the TCM. As of now, I can't get it to work, I'll try harder whenever I've some free time (maybe later, maybe tomorrow, I don't know).
__________________
Emulator development blog
shashClp is offline   Reply With Quote

Advertisement [Remove Advertisement]
Old February 18th, 2008   #62 (permalink)
Formerly NHervé
 
Luigi__'s Avatar
 
Join Date: Jul 2007
Location: Peach__'s castle
Posts: 712
I've fixed the reversed screens with homebrews, the screens were initialized with wrong offsets (192 for top, 0 for bottom)(old 2d core).

My ITCM implementation starts to work, it does not work with NSMB but it works with my PAlib TextColors demo, with the version 0.7.2 the ITCM is zero-filled, in my desmume it is filled with the good values compared with NeonDS.
__________________
If you're wondering where Mario__ is, he is currently saving Peach__ once again.
Luigi__ is offline   Reply With Quote
Old February 18th, 2008   #63 (permalink)
Emu author
 
shashClp's Avatar
 
Join Date: Sep 2006
Location: VisualC
Posts: 1,055
Quote:
Originally Posted by NHervé View Post
I've fixed the reversed screens with homebrews, the screens were initialized with wrong offsets (192 for top, 0 for bottom)(old 2d core).
Well, I already fixed that on the official CVS almost two weeks ago, and told you so, so you could fix it or update your working copy :P

Quote:
Originally Posted by NHervé View Post
My ITCM implementation starts to work, it does not work with NSMB but it works with my PAlib TextColors demo, with the version 0.7.2 the ITCM is zero-filled, in my desmume it is filled with the good values compared with NeonDS.
Kudos, I'll work on it later, basically focused on New Super Mario Bros, as it fill the ITCM on startup.
__________________
Emulator development blog
shashClp is offline   Reply With Quote
Old February 19th, 2008   #64 (permalink)
Registered User
 
dreampeppers99's Avatar
 
Join Date: Jul 2006
Location: you know...
Posts: 506
Wink

Quote:
Originally Posted by shashClp View Post
Better check again :P
Sorry Shash's:
Follow the correction...

Log of /desmume/src/mem.h
(4 hours, 26 minutes ago) by shashclp
- Fixed remaining armwrestler failing opcodes (LDM* mostly), now it's 100% correct, or atleast it does report to be correct (doesn't affect any games that I know of)

Log of /desmume/src/arm_instructions.c
(4 hours, 26 minutes ago) by shashclp
- Fixed remaining armwrestler failing opcodes (LDM* mostly), now it's 100% correct, or atleast it does report to be correct (doesn't affect any games that I know of)


From official CVS ...
Thanks shashClp and NHervé...
dreampeppers99 is offline   Reply With Quote
Old February 19th, 2008   #65 (permalink)
Formerly NHervé
 
Luigi__'s Avatar
 
Join Date: Jul 2007
Location: Peach__'s castle
Posts: 712
Shash : when I visit current CVS (with my Internet Explorer), I visit MMU.c and OGLRender.c, and I can't see any GXFIFO IRQ implementation, these files don't differ with mines.
__________________
If you're wondering where Mario__ is, he is currently saving Peach__ once again.
Luigi__ is offline   Reply With Quote
Old February 19th, 2008   #66 (permalink)
Emu author
 
shashClp's Avatar
 
Join Date: Sep 2006
Location: VisualC
Posts: 1,055
Quote:
Originally Posted by NHervé View Post
Shash : when I visit current CVS (with my Internet Explorer), I visit MMU.c and OGLRender.c, and I can't see any GXFIFO IRQ implementation, these files don't differ with mines.
That's normal, my GFX FIFO irq handling isn't public. Neither I know when it'll be.

----------------------------------------------------------

About the ITCM/DTCM issue, that's what I've found so far:
  1. I hacked the ITCM handling needed by New Super Mario Bros. Currently it's not doing full mirroring (as it should, as it's using an ITCM virtual size of 32MB) through 0..1FFFFFFh, because I only logged the writes to that range and hacked the handling. That makes the first 32kb of the ARM9 memory and the 32kb from 01FF8000 equal (thus mirrored). It's still missing all the other mirrors. I don't know if the mini-games fail due to this. I'll implement full mirroring later.


  2. The code that shown the issue with the ITCM is reading uninitialized data (in desmume, that's zeros, because memory is set up to zeros on startup). That was quite nice as it showed the ITCM issue, but also means it's not reading the data it expects. For example, all registers are set to zero due to the uninitialized memory. I'll be a bit more concise about this on the next point.


  3. The routine starting on memory offset 0 (first on ITCM), it's doing some division and sqrt with the hardware registers. Using ITCM for this is logical, as code will execute faster there, even if using those registers still means that it has to wait for the results. When exiting, it's using LR (r14) to return to the calling routine. When this is called before freezing (call on offset 0x01FFD82C), LR is 0. If we check the preceding code, it's loading a value on r12, then assigning it to LR, and calling the routine. The r12 register is loaded from memory, exactly from location [r13+24h], being the base offset (r13) 0x027FFE00. This resembles quite a lot to the DTCM 16kb area (it's default offset is 0x27C0000, but on this case it's changed to 0x27E0000 on game init), so it could be an issue with mirroring. The problem is that it's virtual size matches it's set exactly as it's physical size, so theoretically it shouldn't mirror. If I compare that memory location with NeonDS, it has initialized values on the later, so we're missing something.

And that's all I could discover in 2 hours, I'll try to work more on the issue later/tomorrow.

EDIT: 0x027FFE00 isn't related to the DCTM at all. It's the cartridge header! Gonna implement it now, and tell the results :P

EDIT2: And that does the trick, the cookie is for me!!!!!!!!!!! (Attached screenshot ) Not bad for 4 hours of work

EDIT3 (hopefully, last): Uploaded fix to the CVS.
Attached Images
File Type: png desmume_fixed.png (58.3 KB, 46 views)

Last edited by shashClp; February 20th, 2008 at 00:04..
shashClp is offline   Reply With Quote
Old February 20th, 2008   #67 (permalink)
Registered User
 
dreampeppers99's Avatar
 
Join Date: Jul 2006
Location: you know...
Posts: 506
Quote:
Originally Posted by shashClp View Post
Isn't public. Neither I know when it'll be.


Quote:
Originally Posted by shashClp View Post
And that's all I could discover in 2 hours, I'll try to work more on the issue later/tomorrow.

Quote:
Originally Posted by shashClp View Post
And that does the trick, the cookie is for me!!!!!!!!!!! (Attached screenshot ) Not bad for 4 hours of work
You rock !!!


See this conversation is very nice...

Quote:
EDIT3 (hopefully, last): Uploaded fix to the CVS.
Nice!!!

Follow the commited "history" here.

The fix:
- Fix for the freeze on "New Super Mario Bros" minigames, reported by NHerv�. After investigating, I found that the whole ROM header wasn't copied to Main RAM as it's meant to be. This fixes "New Super Mario Bros" minigames, and probably others.

11 hours ago:
The last changes...

Don't lose any minute of that history... (wainting for the next chapters)

Jokes on side, it's good see progress, one more time congratulations Shash's by discovery in 4 hours.

Last edited by dreampeppers99; February 20th, 2008 at 11:56.. Reason: Automerged Doublepost
dreampeppers99 is offline   Reply With Quote
Old February 20th, 2008   #68 (permalink)
Emu author
 
shashClp's Avatar
 
Join Date: Sep 2006
Location: VisualC
Posts: 1,055
Quote:
Originally Posted by dreampeppers99 View Post
(...)
Jokes on side, it's good see progress, one more time congratulations Shash's by discovery in 4 hours.
Thanks
__________________
Emulator development blog
shashClp is offline   Reply With Quote
Old February 20th, 2008   #69 (permalink)
Formerly NHervé
 
Luigi__'s Avatar
 
Join Date: Jul 2007
Location: Peach__'s castle
Posts: 712
shash : you got mini-games to work, congrats and thanks for header info !
I'll try to fix them and then I'll release mod 2.
__________________
If you're wondering where Mario__ is, he is currently saving Peach__ once again.
Luigi__ is offline   Reply With Quote
Old February 20th, 2008   #70 (permalink)
Emulation Master
 
MasterPhW's Avatar
 
Join Date: Mar 2004
Location: in-hell
Posts: 389
Quote:
Originally Posted by shashClp View Post
That's normal, my GFX FIFO irq handling isn't public. Neither I know when it'll be.

----------------------------------------------------------

About the ITCM/DTCM issue, that's what I've found so far:
  1. I hacked the ITCM handling needed by New Super Mario Bros. Currently it's not doing full mirroring (as it should, as it's using an ITCM virtual size of 32MB) through 0..1FFFFFFh, because I only logged the writes to that range and hacked the handling. That makes the first 32kb of the ARM9 memory and the 32kb from 01FF8000 equal (thus mirrored). It's still missing all the other mirrors. I don't know if the mini-games fail due to this. I'll implement full mirroring later.


  2. The code that shown the issue with the ITCM is reading uninitialized data (in desmume, that's zeros, because memory is set up to zeros on startup). That was quite nice as it showed the ITCM issue, but also means it's not reading the data it expects. For example, all registers are set to zero due to the uninitialized memory. I'll be a bit more concise about this on the next point.


  3. The routine starting on memory offset 0 (first on ITCM), it's doing some division and sqrt with the hardware registers. Using ITCM for this is logical, as code will execute faster there, even if using those registers still means that it has to wait for the results. When exiting, it's using LR (r14) to return to the calling routine. When this is called before freezing (call on offset 0x01FFD82C), LR is 0. If we check the preceding code, it's loading a value on r12, then assigning it to LR, and calling the routine. The r12 register is loaded from memory, exactly from location [r13+24h], being the base offset (r13) 0x027FFE00. This resembles quite a lot to the DTCM 16kb area (it's default offset is 0x27C0000, but on this case it's changed to 0x27E0000 on game init), so it could be an issue with mirroring. The problem is that it's virtual size matches it's set exactly as it's physical size, so theoretically it shouldn't mirror. If I compare that memory location with NeonDS, it has initialized values on the later, so we're missing something.

And that's all I could discover in 2 hours, I'll try to work more on the issue later/tomorrow.

EDIT: 0x027FFE00 isn't related to the DCTM at all. It's the cartridge header! Gonna implement it now, and tell the results :P

EDIT2: And that does the trick, the cookie is for me!!!!!!!!!!! (Attached screenshot ) Not bad for 4 hours of work

EDIT3 (hopefully, last): Uploaded fix to the CVS.
It's always so interesting to read your posts!
Thanks for sharing that infos with us, was a great read and am still hoping you update your blog in near future!
Quote:
Originally Posted by NHervé View Post
shash : you got mini-games to work, congrats and thanks for header info !
I'll try to fix them and then I'll release mod 2.
Nice, looking forward to it! It's great to see some improvements over the public desmume source aswell! Hope you won't stop that fast!
__________________
The Future of Emulation: Emulate a High End Computer on a Low End System
Current PC specs:
Portable: Intel C2D T7250 (2x2.0Ghz, 800Mhz) | 2048 MB DDR2 PC800 | Geforce Go 7950 GTX PCI-E | Realtek HD Audio |
180Gbyte Internal SATA2 + 4x500GB external | Windows Vista Business X64 MSDNAA
Desktop: AMD Athlon 64 X2 4200+ (2x2.5Ghz, S939) | MSI KbT Neo2-F V2.0
| 2x1GB Corsair Value VS1GBKIT400 | MSI Geforce NX 7800GS-TD256/AGP8x
| Creative SB Audigy LS | 2,5TB (4 SATA2 HDDs in Raid0) | Windows Vista Business MSDNAA


Visit my Blog
MasterPhW is offline   Reply With Quote
Old February 20th, 2008   #71 (permalink)
Emu author
 
shashClp's Avatar
 
Join Date: Sep 2006
Location: VisualC
Posts: 1,055
Quote:
Originally Posted by NHervé View Post
shash : you got mini-games to work, congrats and thanks for header info !
No problem, it was fun to debug.

Quote:
Originally Posted by NHervé View Post
I'll try to fix them and then I'll release mod 2.
Just copy the code you'll find in the CVS. I committed this changes to the official CVS so you didn't have to recode it. Just copy-paste on NDSSystem.c, and done :P
__________________
Emulator development blog
shashClp is offline   Reply With Quote
Old February 21st, 2008   #72 (permalink)
Registered User
 
dreampeppers99's Avatar
 
Join Date: Jul 2006
Location: you know...
Posts: 506
Talking

Quote:
Originally Posted by MasterPhW View Post
It's always so interesting to read your posts!
I agree totaly...
Quote:
Originally Posted by MasterPhW View Post
Thanks for sharing that infos with us, was a great read and am still hoping you update your blog in near future!
The future's post... about some comparison... I'll wait it too!!!
Shash's saids before that is very busy when he should has some spare time he can write... anyway it's nice see that content... (high quality)
dreampeppers99 is offline   Reply With Quote
Old February 21st, 2008   #73 (permalink)
Formerly NHervé
 
Luigi__'s Avatar
 
Join Date: Jul 2007
Location: Peach__'s castle
Posts: 712
I implemented it and got mini-games to work, but they have many graphical bugs, even NeonDS renders better !!! I'll try to fix these bugs and release mod 2.
__________________
If you're wondering where Mario__ is, he is currently saving Peach__ once again.
Luigi__ is offline   Reply With Quote
Old February 21st, 2008   #74 (permalink)
Registered User
 
dreampeppers99's Avatar
 
Join Date: Jul 2006
Location: you know...
Posts: 506
Quote:
Originally Posted by NHervé View Post
I'll try to fix these bugs and release mod 2.
Nice news
dreampeppers99 is offline   Reply With Quote
Old February 24th, 2008   #75 (permalink)
Formerly NHervé
 
Luigi__'s Avatar
 
Join Date: Jul 2007
Location: Peach__'s castle
Posts: 712
I noticed that Worms2 and Rayman Raving Rabbids 2 don't work at all, it seems they have a problem with this instruction :

STMDA SP!, {R0-R3, R12, LR}

This instruction uses SP register, and when the ARM7 calls it, it is in IRQ mode (mode 12), and the SP reg can change when the proc is in irq mode. I think this is the problem : the SP reg (r13) must be r13_irq and not r13.

EDIT : I don't think this is the problem.
__________________
If you're wondering where Mario__ is, he is currently saving Peach__ once again.

Last edited by Luigi__; February 24th, 2008 at 23:19.. Reason: Automerged Doublepost
Luigi__ is offline   Reply With Quote
Old February 24th, 2008   #76 (permalink)
Emu author
 
shashClp's Avatar
 
Join Date: Sep 2006
Location: VisualC
Posts: 1,055
Quote:
Originally Posted by NHervé View Post
I noticed that Worms2 and Rayman Raving Rabbids 2 don't work at all, it seems they have a problem with this instruction :

STMDA SP!, {R0-R3, R12, LR}

This instruction uses SP register, and when the ARM7 calls it, it is in IRQ mode (mode 12), and the SP reg can change when the proc is in irq mode. I think this is the problem : the SP reg (r13) must be r13_irq and not r13.
I don't know what you're talking about, and I won't be working on desmume for a while, so you're on your own for this bug :P
__________________
Emulator development blog
shashClp is offline   Reply With Quote
Old February 25th, 2008   #77 (permalink)
Formerly NHervé
 
Luigi__'s Avatar
 
Join Date: Jul 2007
Location: Peach__'s castle
Posts: 712
Recently I worked on the GUI, I added a status bar and a tool bar to make it more user-friendly. I've attached a screenshot. Yes, this new GUI is very similar to the GUI of iDeaS, except the screens can't be separated.
Attached Images
File Type: jpg desmume_new_gui.JPG (38.8 KB, 62 views)
__________________
If you're wondering where Mario__ is, he is currently saving Peach__ once again.
Luigi__ is offline   Reply With Quote
Old February 26th, 2008   #78 (permalink)
Rockman fan
 
RockmanForte's Avatar
 
Join Date: May 2002
Location: Earth!
Posts: 5,098
I like this GUI looking!
__________________
I have:

Wii: Starfall, Neogamma R8 beta 11, and currently on 3.2u
PSP PHAT: 1001k [TA-081] Custom Firmware 5.50 GEN-D2(FULL)

CASE: EagleTech Sidewinder Gaming Tower Case w/420W Power Supply Black
OS: Windows 7 Ultimate 64bit
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 February 26th, 2008   #79 (permalink)
Formerly NHervé
 
Luigi__'s Avatar
 
Join Date: Jul 2007
Location: Peach__'s castle
Posts: 712
thanks.
__________________
If you're wondering where Mario__ is, he is currently saving Peach__ once again.
Luigi__ is offline   Reply With Quote
Old February 26th, 2008   #80 (permalink)
Registered User
 
dreampeppers99's Avatar
 
Join Date: Jul 2006
Location: you know...
Posts: 506
I like it too!
Good works NHervé
dreampeppers99 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 01:36.

© 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