The 1.2 engine does not support 'E' jokers.
Announcement
Collapse
No announcement yet.
gtlcpimp's CodeDesigner
Collapse
X
-
Yeah let me make it D type real fast and test that.
That seems to freeze... Tried a different codelist and that worked. Remade the map editor codelist with your manager and that freezes.Code:From: E002???? 001EE682 A B C D To: D01EE682 0000???? A B D01EE682 0000???? C D
Okay tried a code I made that allows you to save your coordinates and then reload the coordinates.
It uses the same hook to save coordinates (UP + O) and load them (DOWN + O). Oh that does work... Maybe it was because I was a noob back when I used your stuff.
Thanks for the help. I will try to get that RemotePS2 working some time.Last edited by dnawrkshp; 08-23-2012, 12:16:42 AM.
Comment
-
@Gtlcpimp
Do you have any plans on releasing the souce code to Code Designer 2.3? If you are no longer actively updating, or planning to update any further versions, I would be happy to continue that for you.. CD2.0 was written in VB6 according to the "about" info.. Is this also the case for CD2.3?
I am pretty proficient in VB6 as all of my hacking Software (Ps2 HackKnife) is written in VB6. Would love to be able to
add functionality to CD2.3 and or issue any updates resulting from that. Have some ideas as well as I have noticed in using it there are some error traps which might benefit it. Quite a few times have clicked that compile button and recieved "Error 53" and then *poof* all is gone.. Otherwise great program man.. Let me know if I can continue the mission for you.
Comment
-
I stated in my last post "Quite a few times have clicked that compile button and recieved "Error 53" and then *poof* all is gone..".. Im sorry, that was incorrect.. Error53 is a file not found error.. it was actually Error 13 (type mismatch) error i am referring to.. Something in the (my) mips source isnt correct possibly and the compiler isn't catching the error, but rather the error is causing a VB error code 13 to be generated , and then the program exits...
Comment
-
Well.. that's hard to do since i really don't know what caused the error.. i was just writing a sub and went to compile it and got that error..its happened a few times to me.. and as yet i have never had the opportunity to catch why it occurred..
just something in my sub i'm assuming it didn't like.. i could have had a syntax error on one of my lines.. i really dont know for sure. But this is why i asked if you had any plans to release the source.. i figured i would just run the program from VB every time i use it until it occurs again , at which point i could catch it.
Oh.. on another note.. The code injector.. works great.. with one minor thing i have a request for (if you update any new versions).. you obviously made what with the intention of injecting into Elfs.. I'm using it to inject into a existing game bin.. so i have to subtract 000FF000 from the address i want to inject to each time I do to make sure it goes to the correct location..so anyway you can put in a Offset option?
Comment
-
Subj: Code Designer - Error 13 - Type Mismatch
================================================== ===
Ok.. I incorrectly typed in my beq as this:
beq s1, zero, _0029d160
which accidentally omitted the ":" before the label
beq s1, zero, :_0029d160
Result: Error 13 - Type Mismatch ---> Program terminates
This i imagine would be the same result if you omitted any part of the :_xxxx label structure
on any Jal or branch instruction. I did not test every one so i cant be sure of that.
================================================== ==========
Also i believe if you place an 'unsupported' instruction in the code..
you will also receive this error.. Why might you ask would you do this given you
have clearly outlined what instructions are supported in your readme file?
I'll explain why i came to this conclusion. I wrote an add-on for code designer
which basically allows your to Ctrl-C on any process in Ps2dis and it will
automatically convert that process to Code Designer format. Initially I did
not put anything that verified the given instructions being read from the clipboard
dump were on your list of 'supported' instructions.. I have since corrected this
in my add-on.. however it might not be a bad idea to add some sort of error trap
in Code Designer which catches this type of thing should someone forget a
particular instruction is not supported.
If anyone is interested in this add-on btw..
https://www.box.net/shared/bcqrjq71laiu7bnh5p5u
Comment
-
That's definitely very curious sir... for here is a screen shot.. same version of CD... same instruction... different result:
http://i580.photobucket.com/albums/s...er_error13.jpg
Comment
-
Just FYI.. Im running Windows 7.. I have VB6.0 installed... So.. hmmm.. yeah definitely got me scratchin my head...
however.. that said.. being a 20+year VB programmer myself.. have seen all too often a program run flawlessly on my PC
only to have some weird unforeseen problem on an end-users machine... Gotta love Microsoft..
By the way.. this is totally unrelated to this topic.. but since i dont know where i should post a Q like this and being
as I have you attention on this thread, How does one go about making a sub that will simply print a string to screen in-game. For example (not my real purpose , but will suffice as an example).. lets say i simply wanted to see my name displayed at the top of the screen while playing a Ps2 game.. Is the process of doing this a lengthy one, or can it be accomplished with a simple hooked sub?Last edited by ORCXodus; 09-12-2012, 02:41:44 AM.
Comment
-
By the way... this is the source code (very simple, 2 functions) for the add-on I mentioned in my earlier post. It simply grabs the clipboard data (which was placed there by pressing Ctrl-C or Edit/Copy in Ps2dis) and outputs to a text box
Maybe you can add this as a menu in Code Designer in any future updates.
"Paste Ps2dis Copy" or something of that nature.. have it paste directly to your code input box in code dsigner.
I wrote it quick and dirty in about 10 mins.. so i didnt waste much time on variable declarations or anything like that
Private Sub Command1_Click()
' GRABS CLIPBOARD COPY FROM PS2DIS AND CONVERTS IT TO CODE DESIGNER FORMAT
CDformat.Text = ""
Dim CodeInput As String
CodeInput = Clipboard.GetText
'STORE THE INPUT AS A TEMPORARY TEXT FILE
Open "code.tmp" For Output As #1
Print #1, CodeInput
Close #1
'OPEN THE TEXT FILE FOR LINE BY LINE READ
Open "code.tmp" For Input As #1
'BEGIN LOOP
Do Until EOF(1)
'GET LINE OF CODE
Line Input #1, CODELINE
'HANDLE BLANK LINES
If CODELINE = "" Then
CDformat.Text = CDformat.Text + vbCrLf
GoTo NEXTLOOP
End If
'HANDLE FNC LABLE
If Left(CODELINE, 3) = "FNC" Then
CODELINE = Mid(CODELINE, 4, 10)
CDformat.Text = CDformat.Text + CODELINE & vbCrLf
GoTo NEXTLOOP
End If
'HANDLE BRANCH LABLES
If Left(CODELINE, 2) = "__" Then
CODELINE = Mid(CODELINE, 2, 10)
CDformat.Text = CDformat.Text + vbCrLf
CDformat.Text = CDformat.Text + CODELINE & vbCrLf
GoTo NEXTLOOP
End If
'HANDLE MIPS CODE LINES
newcode = ""
INSTANCE = 0
CODELINE = Trim(CODELINE)
'REMOVE COMMENT
LAB = InStr(CODELINE, "#")
CODELINE = Left(CODELINE, LAB - 1)
'REMOVE TABS (ASCII CODE 9)
For REMTAB = 1 To Len(CODELINE)
getc = Asc(Mid(CODELINE, REMTAB, 1))
Select Case getc
Case 9
INSTANCE = INSTANCE + 1
If INSTANCE = 3 Then newcode = newcode + Chr$(32)
Case Else
newcode = newcode + Chr$(getc)
End Select
Next REMTAB
'HANDLE BRANCHES & JALS
flag = False
If InStr(newcode, "beq") <> 0 Then flag = True
If InStr(newcode, "bne") <> 0 Then flag = True
If InStr(newcode, "bnel") <> 0 Then flag = True
If InStr(newcode, "beql") <> 0 Then flag = True
If InStr(newcode, "bltz") <> 0 Then flag = True
If InStr(newcode, "blez") <> 0 Then flag = True
If InStr(newcode, "bgtz") <> 0 Then flag = True
If InStr(newcode, "bgez") <> 0 Then flag = True
If InStr(newcode, "bgezal") <> 0 Then flag = True
If InStr(newcode, "j ") <> 0 Then flag = True
If InStr(newcode, "jal ") <> 0 Then flag = True
If flag = True Then
leftpart = Left(newcode, Len(newcode) - 9)
rightpart = Right(newcode, 9)
rightpart = ":_" & Right(newcode, 8)
newcode = leftpart + rightpart
End If
'check is instruction supported by CodeDesigner?
csp = InStr(newcode, " ")
InsToChk$ = Left$(newcode, csp)
ISP = IsCommandSupported(InsToChk$)
If ISP = False Then
newcode = "//Unsupported Instruction: " & newcode
End If
'output the line of code
CDformat.Text = CDformat.Text + newcode & vbCrLf
NEXTLOOP:
DoEvents
Loop
Close #1
End Sub
Function IsCommandSupported(checkcode As String) As Boolean
getc = InStr(checkcode, " ")
cmd = Left(checkcode, getc - 1)
Select Case cmd
Case "nop", "sll", "srl", "sra", "sllv", "srlv", "srav", "j", "jr", "jal", "jalr", "syscall", "sync", "mult", "multu", "div", "divu", "Add", "addu", "sub", "subu", "and", "or", "xor", "slt", "sltu", "dadd", "daddu", "dsub", "dsubu", "addi", "addiu", "slti", "sltiu", "andi", "ori", "xori", "lui", "daddi", "daddiu", "lq", "sq", "lb", "lh", "lw", "lbu", "lhu", "lwu", "sb", "sh", "sw", "ld", "lwc1", "swc1", "sd", "mtc0", "mfc0", "mtc1", "mfc1", "Add.s", "sub.s", "mul.s", "div.s", "sqrt.s", "abs.s", "mov.s", "neg.s", "cvt.w.s", "cvt.s.w", "beq", "bne", "bnel", "beql", "bltz", "blez", "bgtz", "bgez", "bgezal", "sync.p"
IsCommandSupported = True
Case Else
IsCommandSupported = False
End Select
End FunctionLast edited by ORCXodus; 09-11-2012, 12:25:38 PM.
Comment
-
I run Windows XP Service Pack 2. There might have been some changes in the functions utilized on XP versus Windows 7 when it comes to error traps, who knows. I will try to check into it when I get around to it.
However I do not feel like putting CodeDesigner open source, so I do apologize for not sharing the source for you to manipulate. I don't mind making changes to it and uploading the changes to an attachment, as long as the ideas are provided to me. I am not actively working on it anymore, I have completely gotten out of the Playstation 2 hacking / development scene since there is no money being made there. CodeDesigner was entirely developed to assist with code hacking/making for the Playstation 2 (obviously), so it serves me no use in updating it for any personal gain. Also on your thought for the Copy + Paste from PS2Dis, I honestly did not know until you mentioned it that you can copy straight from the PS2Dis window! I would have added that in a LONG time ago if I had known that. The whole time if I made something in PS2Dis I just saved it as a .RAW or .BIN and imported with CodeDesigner or just extracted the section if it were already a .RAW or .BIN. That I can easily add to the program when I find some time for it.
If you do find actual errors like the one you presented to me, please do post them. I may not be actively updating CodeDesigner but I still do not mind fixing a few bugs here and there.Last edited by Gtlcpimp; 09-12-2012, 03:43:40 PM.
Comment
-
Well.. I never really meant Open source as in post it to the world and let everyone download a copy.. I was really meaning just me
I (as do a few friends) still actively hack ps2 games for fun.. so Idk.. if you might consider the possibility of sharing it with me only.. I would have no problems guaranteeing that i will not publicize it. I have all the time in the world to improve upon it and have many ideas which i would seek to incorporate into it.
For example. You did a little in the way of supplying some built in commands (print, setReg,etc).. but I would add in a function codebase.. one example of this would be to be able to click a menu.. "new sub"... a pop-up appears giving your the choices of registers to preserve.. and then it would auto generate the source code for everything from the addiu sp,sp to the Jr Ra.
Or for example the ability to save code snippets (like for example i have a sub routine that converts an address and outputs it as a hex string).. I might wish to use this sub again in a future project.. and being able to bring up a code snippet list to choose my saved routines.. would save a lot of time over having to dig them out of another CDS file or from my notes.
I wouldn't mind adding more commands to the command structure, and also adding more supported mips commands.
Again.. the program is really nice in and of itself.. but there is still alot of room for improvements to make it a function rich Mips interpreter..
Actually.. Visual Basic is a good example.. think of how it works.. Where you have each routine in their own location, and it has drop downs to jump from function to function.. A lot of what I see in VB (as a programming interpreter and Gui) I wouldn't mind adding to Code Designer.
Well.. think about it.. If you change your mind, please let me know. If not, I might just set about building my own version from scratch.. I just figured, why re-invent the wheel, when the existing wheel can be pimped
Comment
Comment