Announcement

Collapse
No announcement yet.

[PS2][SLUS_214.26]Call of Duty 3: Codes

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [PS2][SLUS_214.26]Call of Duty 3: Codes

    My Codes:

    Code:
    DNAS Bypass
    D0322894 1440001F
    20322894 00000000
    
    Infinite Ammo
    2023DC40 00000000
    
    Rapid Fire
    20240BF8 00000000
    
    Player movement speed
    205D4778 40800000
    The code below is an example of how to print text. You can use it to print anything to the screen.

    Source code to print text:
    Code:
    /*
    This function prints text to the screen. It must be called constantly to render text.
    */
    
    // HOOK
    address $201F8544 //-- constant hook //202308E8 //-- in game hook
    j $000A0000
    
    // My function start address
    address $200A0000
    
    addiu sp, sp, $FF80
    sw ra, $0000(sp)
    
    // example "Hello World"
    setreg a0, $000B0000 // text ptr
    setreg a1, $42480000 // X offset
    setreg a2, $42D40000 // Y offset
    setreg a3, $3f000000 // text size width
    setreg t0, $3f000000 // text size height
    setreg t1, $FFFFAF00 // text color ARGB
    jal :__PRINT_TEXT
    nop
    
    lw ra, $0000(sp)
    jr ra
    addiu sp, sp, $80
    
    
    __PRINT_TEXT:
    /*
    a0 - text pointer
    a1 - X offset
    a2 - Y offset
    a3 - text size width
    t0 - text size height
    t1 - text color ARGB
    */
    addiu sp, sp, $FF80
    sw ra, $0000(sp)
    sw s0, $0004(sp)
    sw s1, $0008(sp)
    
    // stack location. this can be changed to any blank area.
    setreg s1, $000A1000
    // default data
    lui s0, $3f80
    sw s0, $0000(s1)
    lui s0, $41A0
    sw s0, $0004(s1)
    addiu s0, zero, $4
    sw s0, $000C(s1)
    setreg s0, $0079E290 // text fnc stack
    sw s0, $0010(s1) 
    // default data
    lui s0, $C387
    sw s0, $0020(s1) 
    // store X and Y screen offsets
    sw a1, $002C(s1) 
    sw a2, $0030(s1) 
    // default data
    lui s0, $3F80
    sw s0, $0038(s1)
    sw s0, $003C(s1)
    sw s0, $0044(s1)
    sw s0, $0048(s1)
    // store size
    sw a3, $0050(s1) 
    sw t0, $0054(s1) 
    // store color
    sw t1, $0060(s1) // ARGB
    // default data
    addiu s0, zero, $15
    sw s0, $006C(s1)
    
    // save text pointer pointer (pointer1 >> pointer2 >> string)
    // s1+100 = pointer1 start. This is needed for the native print text function.
    addiu s0, s1, $100 // set pointer1
    sw s0, $001C(s1)
    addiu s0, s1, $10C // set pointer2
    sw s0, $0100(s1)
    setreg s0, $00400040 // text length set high
    sw s0, $0104(s1)
    
    // copy text pointer string to stack pointer
    daddu a1, a0, zero // source
    addiu a0, s1, $10C // location to copy to
    jal $0050EEF0 //strcpy
    addiu a2, zero, $100
    
    // PRINT TEXT
    daddu a0, s1, zero
    addiu a1, zero, $0
    jal $001D0A5C // native print text fnc
    nop
    
    lw ra, $0000(sp)
    lw s0, $0004(sp)
    lw s1, $0008(sp)
    jr ra
    addiu sp, sp, $80
    
    // text to print
    address $200B0000
    print "Hello World"
    nop
    Print text example compiled:
    Code:
    201F8544 08028000
    200A0000 27BDFF80
    200A0004 AFBF0000
    200A0008 3C04000B
    200A000C 34840000
    200A0010 3C054248
    200A0014 34A50000
    200A0018 3C0642D4
    200A001C 34C60000
    200A0020 3C073F00
    200A0024 34E70000
    200A0028 3C083F00
    200A002C 35080000
    200A0030 3C09FFFF
    200A0034 3529AF00
    200A0038 0C028013
    200A003C 00000000
    200A0040 8FBF0000
    200A0044 03E00008
    200A0048 27BD0080
    200A004C 27BDFF80
    200A0050 AFBF0000
    200A0054 AFB00004
    200A0058 AFB10008
    200A005C 3C11000A
    200A0060 36311000
    200A0064 3C103F80
    200A0068 AE300000
    200A006C 3C1041A0
    200A0070 AE300004
    200A0074 24100004
    200A0078 AE30000C
    200A007C 3C100079
    200A0080 3610E290
    200A0084 AE300010
    200A0088 3C10C387
    200A008C AE300020
    200A0090 AE25002C
    200A0094 AE260030
    200A0098 3C103F80
    200A009C AE300038
    200A00A0 AE30003C
    200A00A4 AE300044
    200A00A8 AE300048
    200A00AC AE270050
    200A00B0 AE280054
    200A00B4 AE290060
    200A00B8 24100015
    200A00BC AE30006C
    200A00C0 26300100
    200A00C4 AE30001C
    200A00C8 2630010C
    200A00CC AE300100
    200A00D0 3C100040
    200A00D4 36100040
    200A00D8 AE300104
    200A00DC 0080282D
    200A00E0 2624010C
    200A00E4 0C143BBC
    200A00E8 24060100
    200A00EC 0220202D
    200A00F0 24050000
    200A00F4 0C074297
    200A00F8 00000000
    200A00FC 8FBF0000
    200A0100 8FB00004
    200A0104 8FB10008
    200A0108 03E00008
    200A010C 27BD0080
    200B0000 6C6C6548
    200B0004 6F57206F
    200B0008 00646C72
    200B000C 00000000
Working...
X