Post: [Beta Release] CodeWizard PS3 1.2.1 (PPC Assembler)
12-12-2013, 12:12 AM #1
Renton
Hurah!
(adsbygoogle = window.adsbygoogle || []).push({}); CodeWizard PS3 is a makeshift PowerPC Assembly assembler, disassembler, and emulator (emulates the supported instructions). It allows you to write the assembly and assemble it into NetCheat format, byte array (C#), and a hex string array. It allows for multiple tabs, coloring, labels, custom psuedo instructions, and an auto complete menu.

Assembly:
Format:
Instructions must be lowercase (addi, not ADDI).
Psuedo instructions must be laid out like so:
    
Name: sub (what is called)
Format: %rD, %rA, %rB (variables in order, can be registers or immediate or labels)
Code: subf %rD, %rB, %rA

Usage: sub r3, r3, r4
Translation: subf r3, r4, r3

Registers prefixes are % and $, but you can have no prefix. Registers must be lowercase.
Decimal values must have no prefix.
Hexadecimal values must have a 0x or $ prefix.
Single line comments start with //
Multiline comments start with /* and end with */
Label declarations must end with : and label referring is just the label name
    label1:
bl label1


CodeWizard supports a limited number of operations (this is why it is in beta):
    addis
addi
add
blr
bl
beq
bne
ble
bge
bgt
blt
b
cmpwi
cmplwi
cmpw
cmplw
fadd
fdiv
fmr
fmul
fsub
fsqrt
lbz
ld
lfs
lhz
lis
li
lwz
mfspr
mtspr
mullw
mulli
nop
ori
slwi
srwi
stb
stdu
std
stfs
sth
stw
stwu
subf


Conditional branches use labels or offsets. The offsets are relative to the current address.
Unconditional branches use labels or addresses. The addresses are not relative.
    label1:
beq 0x4 //Branches if cr0 is equal to the next line
bl 0x001ADCC0

beq label1
bl label1

Instructions like stw (stw rA, 0xXXXX(rD)) must be laid out like shown. You can't write "stw rA, rD, 0xXXXX" or anything similar.

Special Instructions:
"address 0xXXXXXXXX" - Sets the current address in the assembler.
"hook 0xXXXXXXXX" - One time use, sets the passed address to a *branch* to the first "address" instruction (hooks the beginning of the sub to the passed argument).
"hookl 0xXXXXXXXX" - One time use, sets the passed address to a *branch and link* to the first "address" instruction (hooks the beginning of the sub to the passed argument).
"setreg rD, 0xXXXXXXXX" - Sets the register rD to the passed 32 bit immediate. Doesn't have to be hexadecimal.
"hexcode 0xXXXXXXXX" - In the assembled code, the value will be equal to the passed 32 bit value. This is great for unsupported instructions.
"import [PATH]" - Imports the file at [PATH] into the subroutine at assemble time. Puts it after the already loaded imports.
"float [FLOAT]" - Inserts into the assembled code as assemble time the hexadecimal version of the float specified. Ex: float 1.23 => 3F9D70A4
"string [STRING]" - Converts the string into a hex version and inserts it into the code at assemble time. Ex: string aBbCcd => 61426243 :: 63640000

Output Type:
NetCheat format; 2 ADDR8 VAL8.
Byte array: byte[] NAME = { 0xBYTES ... }
Hex string array: BYTES ...
    address 0x01020304
li r5, 0x9876
---
NC: 2 01020304 38A09876
BA: byte[] NAME = { 0x38, 0xA0, 0x98, 0x76 };
Hex: 38 A0 98 76



Disassembly:

The format must be in NetCheat PS3 format. If it is not then you must use the Conversion form under Tools. Labels and address instructions will be used as much as possible. Only other thing is that it erases the currently open tab if you accept the prompt.


Emulation:

Images: You must login or register to view this content.You must login or register to view this content.You must login or register to view this content.
Please understand that the emulator is very basic and is just to find errors in the assembly. It only emulates the assembly.

Registers are completely modifiable during execution and turn red when they are modified by the code. You may switch between the register types by clicking on the lable above the register list. The stack pointer (register 1) is set in the options menu and is defaulted to 02000000.

Controls are fairly simple. Aside from the buttons, you may press F11 to step into. The debug box just displays any errors that occur like unsupported op or invalid memory access.


Video example:


So I am releasing this as beta to get some feedback as to what instructions should be added. Also if you have find any bugs or have questions please don't be afraid to reply.
You must login or register to view this content.
You must login or register to view this content.
You must login or register to view this content.
(adsbygoogle = window.adsbygoogle || []).push({});

The following 23 users say thank you to Renton for this useful post:

-SuperMan, Asian, Bad Luck Brian, Bad Luck Kevin, BaSs_HaXoR, Cyb3r, Dan Dactyl, danilo_BR, DANNY G, ErasedDev, dnawrkshp, ExceptionHell, ioritree, kiwi_modz, LilBad, Mango_Knife, John, RouletteBoi, ICS Vortex, Smoky420, Taylors Bish, therifboy, xMGMoDz
01-26-2014, 06:14 PM #20
xSd
Do a barrel roll!
cheers mate going to try this out now
04-18-2014, 02:44 AM #21
thanks Bro, great work
04-18-2014, 05:09 AM #22
This is such a good idea, can't believe no body thought of this before!
04-18-2014, 05:57 PM #23
Asian
Banned
dunno wot this is but im sure its usefull :P nice relece

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo