forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

PS2 exceptions

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
cosmito



Joined: 04 Mar 2007
Posts: 314
Location: Portugal

PostPosted: Sat Mar 29, 2008 2:24 am    Post subject: PS2 exceptions Reply with quote

The tutorial at http://lukasz.dk/playstation-2-programming/ps2link-debugging/ is very helpful (thanks Lukasz!) but I wonder if there is documentation about the meaning of the Cause, BadVAddr and Status things...
Or are they classified as confidential being described only on official Sony SDK documents?
Back to top
View user's profile Send private message Visit poster's website
Lukasz



Joined: 19 Jan 2004
Posts: 248
Location: Denmark

PostPosted: Sat Mar 29, 2008 4:18 am    Post subject: Re: PS2 exceptions Reply with quote

ptek wrote:
The tutorial at http://lukasz.dk/playstation-2-programming/ps2link-debugging/ is very helpful (thanks Lukasz!) but I wonder if there is documentation about the meaning of the Cause, BadVAddr and Status things...
Or are they classified as confidential being described only on official Sony SDK documents?


These values are MIPS COP0 registers, which are documented in alot of MIPS manuals, but for a more PS2 specific one, check the tx79 manual at my site http://lukasz.dk/playstation-2-programming/file-mirror/

Check section 4, about CPU and COP0 registers, there you will see the description of Status, BadVAddr and Cause. There is also a more detailed description of the different exceptions in section 5 of the manual.

The PS2 has hardware support for virtual memory in the form of TLB. If you get an TLB exception, this is because the PS2 assumes that if you referer to an "illegal" address, then this is a virtual address. But since you havn't registered a TLB (virtual address) handler in the kernel, you just get an error in PS2Link, stating its a Bad Virtual Address (BadVAddr).

If you printf memory access addresses in the function which caused the exception (locate this either by ee-addr2line or EPC) and if you get the same address as BadVAddr, you found your bug :-)
_________________
Lukasz.dk
Back to top
View user's profile Send private message Visit poster's website
cosmito



Joined: 04 Mar 2007
Posts: 314
Location: Portugal

PostPosted: Sat Mar 29, 2008 11:54 pm    Post subject: Reply with quote

OK thanks
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group