|
|
Search
|
|||||||
| Home | Register | Downloads | FAQ | Members List | Calendar | Arcade | Mark Forums Read |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#301 (permalink) |
|
Formerly NHervé
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jul 2007
Location: Peach__'s castle
Posts: 712
|
After some debugging, I remarked that MarioKart calls SWI #3 in ARM9, which means "delay loop". This is not supported by DeSmuME that only returns the cycle count. Shash told me that the MarioKart failure was related to timing, maybe this's because of this opcode that's not implemented correctly.
__________________
If you're wondering where Mario__ is, he is currently saving Peach__ once again.
|
|
|
|
| Advertisement | [Remove Advertisement] | ||
|
|
|
|
#302 (permalink) |
|
PCSX2 Coder
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jan 2004
Location: Plymouth, UK
Posts: 9,822
|
quite possibly. Give it a go, find 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! |
|
|
|
|
|
#303 (permalink) | |
|
Emu author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Sep 2006
Location: VisualC
Posts: 1,055
|
Quote:
__________________
Emulator development blog |
|
|
|
|
|
|
#304 (permalink) |
|
Formerly NHervé
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jul 2007
Location: Peach__'s castle
Posts: 712
|
I think the problem is this SWI #3 : some games call it, but R0 being always 1, this SWI becomes a dummy opcode. Whereas, MarioKart calls this SWI with different values than 1, so the game is executing delays for a special purpose, and it fails probably because DeSmuME doesn't support it. I'll try to implement it and tell you the results (if it works : some beautiful screenshots, else... nothing particular).
__________________
If you're wondering where Mario__ is, he is currently saving Peach__ once again.
|
|
|
|
|
|
#305 (permalink) |
|
Formerly NHervé
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jul 2007
Location: Peach__'s castle
Posts: 712
|
Here's what I could discover after more debugging : The emu gets caught in a loop. R0 must be 1 for the emu to exit this loop. Each time, the game loads to R0 the content of [PC+0x24] (=0x215122A). R0 is 0x40000, and the game calls SWI #3, then loops to start point, where it first checks if R0 is 1.
__________________
If you're wondering where Mario__ is, he is currently saving Peach__ once again.
|
|
|
|
|
|
#306 (permalink) |
|
PCSX2 Coder
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jan 2004
Location: Plymouth, UK
Posts: 9,822
|
isnt R0 suppose to be a constant?
__________________
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! |
|
|
|
|
|
#308 (permalink) |
|
PCSX2 Coder
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jan 2004
Location: Plymouth, UK
Posts: 9,822
|
im not sure no, but usually on a system there is a constant register which the value is always 1 in for multiplication/division purposes.
__________________
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! |
|
|
|
|
|
#310 (permalink) |
|
PCSX2 Coder
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jan 2004
Location: Plymouth, UK
Posts: 9,822
|
so there isnt. btw if you dont have any proper ARM docs on the cpu's themselves (always better than a tech sheet like the no$gba ones etc) there seems to be some nice ones here emu-docs: CPU ARM
__________________
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! |
|
|
|
|
|
#311 (permalink) | |
|
Registered User
Join Date: Nov 2007
Location: NZ
Posts: 12
|
Quote:
so here is my fixed implementation (untested). Code:
u32 delayLoop(armcpu_t * cpu)
{
u32 cycles = 0;
u32 delay = cpu->R[0] & 0x7FFFFFFF;
if(cpu->proc_ID)
{
cycles = delay * 4;
}
else
{
if((armcp15->ctrl>>12)&1)
{
cycles = delay * 2;
}
else
{
cycles = delay * 8;
}
}
return cycles;
}
|
|
|
|
|
|
|
#312 (permalink) |
|
Formerly NHervé
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jul 2007
Location: Peach__'s castle
Posts: 712
|
Thanks. I'll test it and tell you the result. EDIT : It doesn't make MarioKart work, but I'm currently debugging this game. I actually found that the ARM9 gets caught in a loop, and the game wants R0 to be 1 to jump out from this loop. I need more debugging to know why R0 is not 1. Maybe it's DMA fault, or timing problem (as Shash said), or even unsupported I/O port or unaligned 32-bit read.
__________________
If you're wondering where Mario__ is, he is currently saving Peach__ once again.
Last edited by Luigi__; May 14th, 2008 at 20:32.. Reason: Automerged Doublepost |
|
|
|
|
|
#313 (permalink) |
|
Slow, careful & precise
Join Date: Jan 2006
Location: Australia
Posts: 33
|
I put the SDL in the root folder, load up SM64DS and... Code:
Problem signature: Problem Event Name: APPCRASH Application Name: desmume.exe Application Version: 0.0.0.0 Application Timestamp: 4825a806 Fault Module Name: desmume.exe Fault Module Version: 0.0.0.0 Fault Module Timestamp: 4825a806 Exception Code: c0000005 Exception Offset: 000471cb OS Version: 6.0.6000.2.0.0.768.3 Locale ID: 3081 Additional Information 1: 17ba Additional Information 2: 4443eb8d185bad98a0d9398208759c99 Additional Information 3: 0998 Additional Information 4: 17751bbd515f9fd87f0026eb0a3a9806 |
|
|
|
|
|
#314 (permalink) | |
|
Registered User
Join Date: Nov 2007
Location: NZ
Posts: 12
|
Quote:
|
|
|
|
|
|
|
#315 (permalink) | |
|
PCSX2 Coder
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jan 2004
Location: Plymouth, UK
Posts: 9,822
|
Quote:
1. the instruction calls the service and R0 gives the result (1 for pass, 0 for error etc) 2. R0 is actually the service that it wants to interrupt and the result is like that of 1.
__________________
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! |
|
|
|
|
|
|
#316 (permalink) |
|
Formerly NHervé
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jul 2007
Location: Peach__'s castle
Posts: 712
|
Here is the routine in asm where MarioKart freezes : Note : NeonDS seems to freeze on the same routine. The failure is because of a NDS feature not supported by both DeSmuME and NeonDS. Code:
02151202 : ADD R0, R7 02151204 : ADD R1, R6 02151206 : ADD R2, R5 02151208 : ADD R3, R4 0215120A : long branch - set LR 0215120C : long branch - BL 02151288 //A long routine that must presumably set R0 to 1 0215120E : CMP R0, 1 02151210 : BEQ 0215121A //Exit routine 02151212 : LDR R0, [PC, 14] //Set R0 = 00040000 02151214 : long branch - set LR 02151216 : long branch - BL 02000664 //Just SWI #3 02151218 : B 02151202 //Loop to start of routine EDIT2 : it is on the ARM9, and before that routine, R7 is set to 2.
__________________
If you're wondering where Mario__ is, he is currently saving Peach__ once again.
Last edited by Luigi__; May 15th, 2008 at 17:07.. |
|
|
|
|
|
#318 (permalink) |
|
Formerly NHervé
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jul 2007
Location: Peach__'s castle
Posts: 712
|
ShadowPlayer : of which game are you talking ? If you're not happy of DeSmuME mods, download the sources of DeSmuME and release your mods, you'll see how it's hard.
__________________
If you're wondering where Mario__ is, he is currently saving Peach__ once again.
|
|
|
|
|
|
#319 (permalink) |
|
Big DBZ fan
![]() ![]() ![]() Join Date: Dec 2007
Location: Kastel Stafilic,Croatia
Posts: 467
|
I'm happy with DeSmuMe mods and I know how hard is to make emulator. Sorry if I said something wrong I just wanted to know is it possible to speed it up because I love playing handheld games on bigger speeds.
__________________
DBZ FOREVER |
|
|
|
|
|
#320 (permalink) |
|
Rockman fan
![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: May 2002
Location: Earth!
Posts: 5,098
|
Be patient and NHerve and Shash will have speed improvement in the future or go to other emulators or better yet, play them on a real DS. Be patient.
__________________
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 |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|