Page 5 of 9 FirstFirst ... 34567 ... LastLast
Results 61 to 75 of 126

Thread: Mips disassembler v0.1

  1. #61
    Join Date
    Jan 2005
    Posts
    127
    Quote Originally Posted by jkozee
    I am trying to run this on tivoapp (7.1b) and receive this error in the load_got routine:
    "Reading GOT ...Reading file tivoapp failed"
    Seems to be a read failure on the exe file. You might want to get the errno so you can see why the read failed. All your data matches mine, and it works for me, so I suspect you have a problem with your tivoapp file. My script version is v.0.4.2b running on FC4 with perl 5.8.6.

  2. #62
    Join Date
    Mar 2005
    Posts
    235
    Thanks for the reply 7.1. So, it looks like it's just me that is the lucky one

    I think I have solved the problem, but I'm new to perl, so let me know if this makes sense.

    I didn't check the errno, but I suspected that the error was from trying to read past the end of the file. I verified that to be the case by repositioning the file with seek(EXE, $offset + $i * 4, 0) during each iteration and didn't get the same error. Then I stumbled onto binmode(). I have now put a binmode() after every open statement and I think this has solved my problems.

    So, I guess my questions now are:
    1) Does this make sense as the solution?
    2) Has something changed between perl 5.8.0 and 5.8.2 in regards to how it opens files by default?
    3) Is there a global setting for perl to tell it to open every file in binary mode instead of text mode that should be set?

    TIA

  3. #63
    Join Date
    Jan 2005
    Posts
    127
    Looks like this is an interaction between perl 5.8.0 (which added a bunch of UTF-8 character set stuff) and RH 8 and 9 that default the locale to UTF-8. Perl 5.8.1 backtracked on the "automatic UTF-8-ification" of file handles, which resolved the problem. See the perl 5.8.1 release notes: here.

    It's probably a good idea to use binmode on the files anyway. Might even be necessary to run on windows with ActiveState perl.
    Last edited by 7.1; 08-04-2005 at 03:22 PM.

  4. #64
    Join Date
    Mar 2005
    Posts
    235
    7.1,

    Thanks for the insight. I'll upgrade perl tonight to get current, but I'll leave the binmode statements in for completeness. I don't think a posted diff is needed, but I can if anyone needs it.

    One other thing. Is Xbyre's MIPS viewer tool available any longer. I'd like to take a look, but it looks like the site is down.

  5. #65
    Join Date
    Jan 2005
    Posts
    127
    Here's a 0.4.3 variant of the mips.dasm.pl script that adds support for some of the addressing modes used in the 7.2 tivoapps. For example, procedures are now mostly called with jal instead of jalr, and strings are referenced directly rather than through the global offset table. As far as I know it should still work with older tivoapps, but I didn't test it on anything but the 7.2.0 versions.

    Indentation had drifted with the previous patches, and it wasn't "use strict" clean, so I'm posting a full version with those things fixed.

  6. #66
    Join Date
    Apr 2003
    Posts
    33
    Quote Originally Posted by NutKase
    OK, I've gotten the mips.dasm.pl to work and have disassembled tivoapp.

    When I load it into viewmips I see it processing then "Analysis Complete"

    For some reason, I see no information in the window, or on any of the tabs.

    ...just a blank window.

    NutKase

    EDIT: I've gotten it working now using drnull's 04.2 update.

    Now let's see what all this is telling me.
    I'm also having trouble with the viewmips program.

    I cannot get anything displayed under the disassembly tab. I've made my 6.2 tivoapp.S file using the 0.4.3 mips-dasm file and using the unistd.h file from the version 4 zip file.

    Can anyone shed some light on why this may not be working for me?

  7. #67
    Join Date
    Jul 2005
    Posts
    228
    Can anyone tell me what I am doing wrong. I have built the toolchain, ran the mips disassembler version 0.4.3 and it creates a dump and S file with no problems. I then try and open the .S file using viewmips program and it keeps crashing (exception 0xc0000005).

    What am I doing wrong? I am currently reading the file by opening in textpad and I think I have been able to port the bufferhack but I don't think I am getting all the information to 100% guarantee I am getting the right locations for the patches.

    Thanks.

  8. #68
    Join Date
    Aug 2004
    Posts
    4,075

    Smile

    Quote Originally Posted by shutterfriend
    Can anyone tell me what I am doing wrong. I have built the toolchain, ran the mips disassembler version 0.4.3 and it creates a dump and S file with no problems. I then try and open the .S file using viewmips program and it keeps crashing (exception 0xc0000005).

    What am I doing wrong? I am currently reading the file by opening in textpad and I think I have been able to port the bufferhack but I don't think I am getting all the information to 100% guarantee I am getting the right locations for the patches.
    viewmips was released as an unsupported tool without source code. The author hasn't posted here in over a year. You could try to email him directly (there's an email link on the viewmips web page.) My suggestion is you don't use it.

  9. #69
    Join Date
    Jul 2005
    Posts
    228
    Jamie,

    Thanks for the quick reply. So after I disassemble the tivoapp using mips-dasm.0.4.3.pl and create the .S file what should I use to read the file? Currently I am using just textpad but I am not 100% sure I am doing it right. I am going to see if I can correctly identify the superpatches from 722 to 722b and see if I get the correct locations but is this the best way to do this?

    Thanks.

  10. #70
    Join Date
    Aug 2004
    Posts
    4,075
    Quote Originally Posted by shutterfriend
    Thanks for the quick reply. So after I disassemble the tivoapp using mips-dasm.0.4.3.pl and create the .S file what should I use to read the file? Currently I am using just textpad but I am not 100% sure I am doing it right. I am going to see if I can correctly identify the superpatches from 722 to 722b and see if I get the correct locations but is this the best way to do this?
    Yes, any text editor that can read the large files should be fine. You can use the perl scripts in this thread, or write your own, to generate call cross references and other analysis.

  11. #71
    Join Date
    Jul 2005
    Posts
    228
    Jamie,

    Thanks for the help. I will keep plugging away at this. Are you referring to the xrefs.pl and calltree.pl? For the xrefs.pl it requires a start address. What do I put as the start address?

    Thanks again for your guidance. I hope to get this figured out this week to hopefully be able to provide patch porting for others to use and be able to contribute to this forum as it has done for me.

  12. #72
    Join Date
    Jul 2005
    Posts
    228
    Jamie,

    Would the start address be the start address indicated in the .S file near the top of the file?

    Thanks.

  13. #73
    Join Date
    Aug 2004
    Posts
    4,075
    Quote Originally Posted by shutterfriend
    Thanks for the help. I will keep plugging away at this. Are you referring to the xrefs.pl and calltree.pl? For the xrefs.pl it requires a start address. What do I put as the start address?
    That's not a script I use. If I had to guess, I'd guess the "start address" is the start address of a function and xrefs.pl may go off and find all the callers of that function.

    These tools are unsupported too, but at least there is source so you can read them to understand what they do and adjust them as necessary.

  14. #74
    Join Date
    Jul 2005
    Posts
    228
    Jamie,

    What scripts do you use?

    Also, I think I hit a dead end already. For the bufferhack for 7.2.2 and 7.2.2b the AddrA was always between li v0,300 and sw v0,252(s5) but 7.3 doesn't have this at all in the file.

    I guess I am way off track.

  15. #75
    Join Date
    Nov 2004
    Posts
    221
    How does the .proc file get created? I saw it asked in here but never answered. Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •