Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to FFH! Where all your dreams come true!

Pages: 1 2 [3] 4
SaGa Frontier Hacker
Pickle Girl Fanboy [Posts: 1482] Logged
  • View Profile
  • Bio Research Lab
  • share
  • [April 26, 2012, 10:08:23 PM]
Re: (App) MassHexASM: Encode directly to little endian
« Reply #40 on: April 26, 2012, 10:08:23 PM »
after finally managing to install Java 1.7 (I was getting the "Unsupported major.minor version" error before then). For some reason, apt-get didn't work for me, so I had to follow these instructions (top answer). I downloaded the JDK, but I imagine the same instructions would work for the JRE.
Didn't see this here last time.  And gee golly, Oracle sure does fucking love it's users - see how easy they make updating!
SaGa Frontier Hacker
Pickle Girl Fanboy [Posts: 1482] Logged
  • View Profile
  • Bio Research Lab
  • share
  • [April 26, 2012, 10:19:23 PM]
Re: (App) MassHexASM: Encode directly to little endian
« Reply #41 on: April 26, 2012, 10:19:23 PM »
What portions of each bash script should I change, and what should I change them to?  I'm installing the Java Runtime Environment, not the JDK.

This really makes me want to quit.  Fuck you, Oracle.
Glain [Posts: 410] Logged
  • View Profile
  • share
  • [April 26, 2012, 11:29:13 PM]
Re: (App) MassHexASM: Encode directly to little endian
« Reply #42 on: April 26, 2012, 11:29:13 PM »
You could probably just follow this. I'd also look to make sure they haven't added it to apt-get before writing that off.

Honestly, though... I may just deprecate the Java version (although I suppose it could still be useful). It's annoying to maintain both a C# and a Java version.

You might as well just get everything working with Wine. I'll play around on Ubuntu and see if I can get it to work.

I've got an update coming, mostly for pseudoinstruction support, but that's the C# version.
SaGa Frontier Hacker
Pickle Girl Fanboy [Posts: 1482] Logged
  • View Profile
  • Bio Research Lab
  • share
  • [April 26, 2012, 11:38:13 PM]
Re: (App) MassHexASM: Encode directly to little endian
« Reply #43 on: April 26, 2012, 11:38:13 PM »
I don't really need all the latest features, just bug-fixes.  Though I'll be the only person using the Java version, so IDK about that.

There are C# and VB compilers that are cross-platform.  And I bet that it will work with Wine, but I can't update Wine until I update my OS, can't update my OS until I have an external (this is getting old).
SaGa Frontier Hacker
Pickle Girl Fanboy [Posts: 1482] Logged
  • View Profile
  • Bio Research Lab
  • share
  • [April 27, 2012, 09:13:07 PM]
Re: (App) MassHexASM: Encode directly to little endian
« Reply #44 on: April 27, 2012, 09:13:07 PM »
Okay, I have JRE 1.7 installed.  However, there doesn't seem to be any way to open JMassHexASM with anything but the JDK 1.6, which is what I used to have installed.  I tried to add JRE 1.7 to the Open With prompt, but JRE 1.7 doesn't appear.
Glain [Posts: 410] Logged
  • View Profile
  • share
  • [April 27, 2012, 09:52:18 PM]
Re: (App) MassHexASM: Encode directly to little endian
« Reply #45 on: April 27, 2012, 09:52:18 PM »
If java -version is telling you anything but 1.7 (might be 1.7.(something)), then 1.7 still isn't being used as the default java version.
If java -version does give you 1.7, then java -jar JMassHexASM.jar should run it. Not sure why the UI would be dumb there.
SaGa Frontier Hacker
Pickle Girl Fanboy [Posts: 1482] Logged
  • View Profile
  • Bio Research Lab
  • share
  • [April 27, 2012, 10:06:23 PM]
Re: (App) MassHexASM: Encode directly to little endian
« Reply #46 on: April 27, 2012, 10:06:23 PM »
Code: [Select]
ryan@bacon ~ $ java -version
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) Client VM (build 21.0-b17, mixed mode)
ryan@bacon ~ $
Thanks!

Feature request: Fixed width font.  Like Monospace, which distinguishes between O and 0 (unlike Courier New or Courier 10 Pitch, which is a free version of Courier New).  It doesn't actually matter at all, because I can format my hex data in leafpad (and windows users can format in notepad), but it is something you may want to consider for your next major release.
Glain [Posts: 410] Logged
  • View Profile
  • share
  • [April 28, 2012, 03:13:52 PM]
Re: (App) MassHexASM: Encode directly to little endian
« Reply #47 on: April 28, 2012, 03:13:52 PM »
Just released version 9, mostly for pseudoinstruction support. This should also fix a few annoying bugs.
SaGa Frontier Hacker
Pickle Girl Fanboy [Posts: 1482] Logged
  • View Profile
  • Bio Research Lab
  • share
  • [April 28, 2012, 08:28:43 PM]
Re: (App) MassHexASM: Encode directly to little endian
« Reply #48 on: April 28, 2012, 08:28:43 PM »
Are psudo-instructions used in existing games?  Because I came across some lines that probably aren't data, yet can't to be decoded.
Glain [Posts: 410] Logged
  • View Profile
  • share
  • [April 28, 2012, 10:38:41 PM]
Re: (App) MassHexASM: Encode directly to little endian
« Reply #49 on: April 28, 2012, 10:38:41 PM »
Pseudoinstructions are an intermediate step -- they have to be translated to real instructions before being encoded. They don't even have an encoding. Actual program code consists of all real instructions, without exception.

There could just be a few instructions that your disassembler doesn't recognize. I know LEDecoder for one isn't perfect... there are even a few commands in FFT that it marks as unknown. I think they may be graphics or coprocessor calls but I'm not sure. (Example: Some effect files have ASM at the top of them and I get some unknowns in there.)

If everything around the unknown line(s) seems to be valid code in the normal construct of a subroutine, it's probably that. And by that I mean:

(subtract from sp/r29 - pSX makes this look like a huge addition)
(save things to sp/r29, notably ra/r31)
(valid code)
(unknown)
(valid code)
(load things from sp/r29, notably ra/r31)
(add to sp/r29)
(jr ra/r31)
(usually a nop)
SaGa Frontier Hacker
Pickle Girl Fanboy [Posts: 1482] Logged
  • View Profile
  • Bio Research Lab
  • share
  • [April 28, 2012, 11:03:16 PM]
Re: (App) MassHexASM: Encode directly to little endian
« Reply #50 on: April 28, 2012, 11:03:16 PM »
SaGa Frontier
SCUS_942.30
Code: [Select]
0x00000800 : lb r2,0x0014(r0)
0x00000804 : lb r2,0x2adc(r0)
0x00000808 : lb r2,0x3084(r0)
0x0000080C : lb r2,0x3630(r0)
0x00000810 : lb r2,0x3e34(r0)
0x00000814 : lw r1,-0x7200(r16)
0x00000800 : lb r2,0x0014(r0)
0x00000804 : lb r2,0x2adc(r0)
0x00000808 : lb r2,0x3084(r0)
0x0000080C : lb r2,0x3630(r0)
0x00000810 : lb r2,0x3e34(r0)
0X00000814 : FAILED TO DECODE LINE : 02 06 00 5C
0x00000818 : lw r1,-0x7200(r16)
0x0000081C : FAILED TO DECODE LINE : 03 06 04 9C
Glain [Posts: 410] Logged
  • View Profile
  • share
  • [April 28, 2012, 11:21:36 PM]
Re: (App) MassHexASM: Encode directly to little endian
« Reply #51 on: April 28, 2012, 11:21:36 PM »
None of that is actually code.

Data can coincidentally be "decoded" to real instructions a lot of the time, because there are only so many possible encodings and a LOT of them are valid. It's just a matter of seeing whether or not what's there actually makes any sense as code.

That doesn't. It isn't. (Why would they overwrite r2 every single line?) Generally only the stuff that follows the "subroutine structure" that I mentioned in my last post is actually code. (Without the unknown, and the sp/r29 stuff may or may not happen) Try searching for jr r31 to try to find real code blocks.
Pride [Posts: 727] Logged
  • View Profile
  • share
  • [May 06, 2012, 07:31:01 AM]
Re: (App) MassHexASM: Encode directly to little endian
« Reply #52 on: May 06, 2012, 07:31:01 AM »
Sometimes when I'm putting code into v. 9 I get a different, slightly longer code then what I originally put in and I'm not sure why. For example, I get this code output:
Code: [Select]

lui r3,0x800d
addiu r3,r3,0x4644
lw r2,0x0000(r3)
nop
ori r2,r2,0x0002
jr r31
sw r2,0x0000(r3)
lui r2,0x8014
add r2,r2,r3
lui r1,0x8000
addu r1,r1,r2
lbu r2,-0x2a00(r1)
lbu r3,0x0016(r3)
nop
slt r2,r2,r3
bne r2,r0,0x0013d5d4
nop
j 0x00091614
nop
j 0x000915f8
nop

From this one, the hex I put in comes out as the code above with the extra, unnecessary commands of lui r1,0x8000
addu r1,r1,r2

Code: [Select]
lui r3,0x800d
addiu r3,r3,0x4644
lw r2,0x0000(r3)
nop
ori r2,r2,0x0002
jr r31
sw r2,0x0000(r3)
lui r2,0x8014
add r2,r2,r3
lbu r2,-0x2A00(r2)
lbu r3,0x0016(r3)
nop
slt r2,r2,r3
bne r2,r0,0x0013d5d4
nop
j 0x00091614
nop
j 0x000915f8
nop

My Youtube account. Doesn't have much yet >.<
Glain [Posts: 410] Logged
  • View Profile
  • share
  • [May 06, 2012, 03:01:27 PM]
Re: (App) MassHexASM: Encode directly to little endian
« Reply #53 on: May 06, 2012, 03:01:27 PM »
Ack, that's pretty bad. Uploading v10 to fix that problem. (Also updating patcher)
Pride [Posts: 727] Logged
  • View Profile
  • share
  • [May 11, 2012, 08:25:15 AM]
Re: (App) MassHexASM: Encode directly to little endian
« Reply #54 on: May 11, 2012, 08:25:15 AM »
It also doesn't appear to convert jalr commands correctly as well

jalr r2,r31 - 00400009

My Youtube account. Doesn't have much yet >.<
Glain [Posts: 410] Logged
  • View Profile
  • share
  • [May 11, 2012, 04:50:50 PM]
Re: (App) MassHexASM: Encode directly to little endian
« Reply #55 on: May 11, 2012, 04:50:50 PM »
That's interesting. I had the wrong encoding for jalr.

Try opening mips_encode.dat in a text editor, find the line for jalr, and replace it with this:
jalr : 5 : 000000s00000t00000001001

Then save the change and reload MHA. For "jalr r2,r31", you should get: 0040F809 (big endian). That seems to match up with what the pSX disassembler says the encoding is.

I can add that fix to the next version of MHA, but that should do for now. I can also add a default r31 for the second argument fo jalr. From what I can tell, that's what it's supposed to default to, but for now, it'll just require both args.
Pride [Posts: 727] Logged
  • View Profile
  • share
  • [May 11, 2012, 05:51:34 PM]
Re: (App) MassHexASM: Encode directly to little endian
« Reply #56 on: May 11, 2012, 05:51:34 PM »
Perfect, thank you ^__^

My Youtube account. Doesn't have much yet >.<
Choto [Posts: 703] Logged
  • View Profile
  • share
  • [January 07, 2013, 02:31:33 AM]
Re: (App) MassHexASM: Encode directly to little endian
« Reply #57 on: January 07, 2013, 02:31:33 AM »
I'm gonna make one small quality of life request.. It would be awesome if there were a checkbox that toggled deletion of text that isn't in code format. alot of times I make notes on the ASM routine in notepad and then c/p it to masshex, but then I have to erase each line of notes. If possible, thanks but it's requested at your liesure :P
Glain [Posts: 410] Logged
  • View Profile
  • share
  • [January 07, 2013, 04:43:00 AM]
Re: (App) MassHexASM: Encode directly to little endian
« Reply #58 on: January 07, 2013, 04:43:00 AM »
You mean for notes being added to the end of ASM lines without any separator at all?  Any text following # is treated as a comment and will be ignored (I'm also adding ; to that for the next iteration).

Without some kind of character as a separator for a comment, I'm not sure if I can come up with a rule to determine where the ASM ends and where the comment begins.  There are a few special characters (for example, the comma character, which separates the parameters for an instruction), and if a comment includes one of those characters, it's going to mess up the parsing of the instruction.  If I have a separator character like #, I can just ignore that character and everything after it (which is what it currently does).
Choto [Posts: 703] Logged
  • View Profile
  • share
  • [January 07, 2013, 12:26:17 PM]
Re: (App) MassHexASM: Encode directly to little endian
« Reply #59 on: January 07, 2013, 12:26:17 PM »
Oh crap! that # key is magical! That's perfect, life just got much more convenient lol thanks Glain!
Pages: 1 2 [3] 4