Announcement

Collapse
No announcement yet.

CheatDevicePS2

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

  • #61
    Originally posted by Kobra2015 View Post
    Dear root670,

    I have tried but it doesn't work ....displays a black screen. Meanwhile, I had to install a old version again

    I question whether there is any solution.

    Kind regards.
    Try this elf instead of the one included in the v1.2.1 zip: https://mega.nz/#!KEZl1DDa!UB4xNlo2v...bs2UK77rdud6j8
    It's an unpacked version of the v1.2.1 ELF. The packed version might have issues with certain versions of uLaunchElf it seems.

    Comment


    • #62
      Originally posted by root670 View Post
      Try this elf instead of the one included in the v1.2.1 zip: https://mega.nz/#!KEZl1DDa!UB4xNlo2v...bs2UK77rdud6j8
      It's an unpacked version of the v1.2.1 ELF. The packed version might have issues with certain versions of uLaunchElf it seems.
      Dear root670,

      This was corrected and it is functioning properly now

      Many thanks for your support.

      Best regards.

      Comment


      • #63
        I updated your file with 1856 games.
        http://1drv.ms/1jEoJBj
        Attached Files
        Last edited by Leonildo; 01-08-2017, 03:02:01 PM.

        Comment


        • #64
          Would it be possible to be able to change the font size and have a custom jpg or png background?

          Comment


          • #65
            Custom backgrounds could be implemented in a cinch, but font changes will require a bit of work. I'm using stb_font for font rendering (http://nothings.org/stb/font/) and it requires a header file with the font to be generated before compiling it into a program. The font could be scaled pretty easily, but the quality would suffer. If you'd like to change the font for a build, just use the tool on nothings.org to generate a new stb_font.h file before compiling Cheat Device.
            Last edited by root670; 10-17-2015, 02:33:06 PM.

            Comment


            • #66
              I'm no compiler/builder so I'm not worried about a new font right now. An option for a custom background would be great though, thanks.

              Comment


              • #67
                I get the error: 'unable to find cheat database cbd error please wait'. It freezes on this screen. The cbd file is in the same directory as the elf. I have tried putting all the files from your v1.21 archive in a separate folder and on root of my usb pen with the same result. Same error when I remove cbd file out of directory.

                Comment


                • #68
                  Originally posted by ploder View Post
                  I get the error: 'unable to find cheat database cbd error please wait'. It freezes on this screen. The cbd file is in the same directory as the elf. I have tried putting all the files from your v1.21 archive in a separate folder and on root of my usb pen with the same result. Same error when I remove cbd file out of directory.
                  Did you set the correct database path in the settings ini? It has to be set there. In the future I'll probably have it load a cdb from the same directory by default, but for now you have to set the path in the ini.

                  Comment


                  • #69
                    Originally posted by root670 View Post
                    Did you set the correct database path in the settings ini? It has to be set there. In the future I'll probably have it load a cdb from the same directory by default, but for now you have to set the path in the ini.
                    I thought it was set by default to look in the same directory as the elf file and hence the blank space before the file name? My apologies. I'll try that out and let you know. *EDIT* Yes, this has fixed it. This is the only cheat elf that works on my system, thanks.
                    [CheatDevicePS2]
                    database = cb10.cdb
                    boot1 = mass:BOOT/BOOT.ELF
                    boot2 = mass:BOOT/ESR.ELF
                    boot3 = mc0:BOOT/BOOT.ELF
                    boot4 = mc1:BOOT/BOOT.ELF
                    boot5 = rom:OSDSYS
                    So that should be:
                    mass:cb10.cdb if the cbd is on the root of the usb stick and mass:CheatdevicePS2/cb10.cdb if in a folder on USB stick named CheatdevicePS2?
                    Last edited by ploder; 01-03-2016, 03:30:36 AM.

                    Comment


                    • #70
                      Yes that should be correct.

                      Comment


                      • #71
                        Any ETA on the next release? Thanks.

                        Comment


                        • #72
                          error loanding Cheats database.cdb

                          "error loanding Cheats database.cdb" how to fix ?

                          Comment


                          • #73
                            Originally posted by root670 View Post
                            "Game Name"
                            Enable
                            90000000 88888888
                            Cheat 1
                            27654321 12345678
                            Cheat 2
                            12345678 98765432
                            Cheat Section
                            Cheat 3
                            11111111 00000000
                            I would recommended upgrading the engine to support the commands used by every other cheat device so codes can be ported over to this easier. I can post the source to my 1.3 engine (used in my RemotePS2 application) for you to learn from if you like
                            Last edited by Gtlcpimp; 03-21-2016, 02:20:18 PM.

                            Comment


                            • #74
                              Originally posted by Gtlcpimp View Post
                              I would recommended upgrading the engine to support the commands used by every other cheat device so codes can be ported over to this easier. I can post the source to my 1.3 engine (used in my RemotePS2 application) for you to learn from if you like
                              Which code types would need to be added? The only ones that might be different iirc are the 6 type, where other devices can do multiple levels of derefrencing, and the F type enable code, which this engine doesn't support. If you can post the source for the 1.3 engine, I'd be glad to take a look to see what I'm missing!

                              Originally posted by 47iscool View Post
                              Any ETA on the next release? Thanks.
                              I've attached a new version for testing if you or anyone else would like to try it out. There are three main improvements:
                              1. Cheats can now be stored in CDB databases or TXT files. The formatting of the txt files is the same as the format used to generate CDB databases. Just be sure to set the proper path in the settings ini file and ensure that the cheat file has a .txt extension.
                              2. Previously selected cheats will be remembered and re-enabled the next time Cheat Device is run. It will keep track of them by hashing the game's title and the code lines of each cheat and saving them to a file named "CheatDeviceHistory.bin" in the same directory Cheat Device was run from.
                              3. The first cheat for each game is expected to be the enable code and will be hidden from the cheat menu. When starting a game, the enable cheat will be enabled automatically.

                              Couldn't pack this one as I'm now using OS X as my development environment and couldn't get ps2-packer to compile. Once this release seems stable I'll get it packed and release it as v1.3.

                              Thanks for everyone's continued support!
                              Attached Files
                              Last edited by root670; 03-22-2016, 05:48:24 PM.

                              Comment


                              • #75
                                Originally posted by root670 View Post
                                Which code types would need to be added? The only ones that might be different iirc are the 6 type, where other devices can do multiple levels of derefrencing, and the F type enable code, which this engine doesn't support. If you can post the source for the 1.3 engine, I'd be glad to take a look to see what I'm missing!
                                Get away from "Enable" Codes. Get into using a static hook instead of a "Master Code" (glorified term for engine hook).

                                1.3 Engine command structure:
                                0 - 8 Bit Constant Write
                                1 - 16 Bit Constant Write
                                2 - 32 Bit Constant Write
                                3 - 8 / 16 / 32 Bit Increment / Decrement
                                4 - 32-bit Multiple Address Write
                                5 - 8 / 16 / 32 Bit Copy Bytes
                                6 - Line specific Pointer Write
                                7 - 8 / 16 / 32 Bit Boolean
                                8 - 8 / 16 / 32 Bit Replace Bytes
                                9 - Execute specified data
                                A - *open* (Used to be: DNAS Patch Configuration)
                                B - Delayed write (x cycles before each write)
                                C - 32 Bit Compare and Kill
                                D - Boolean: Half (Aka: Joker)
                                E - Line specific Boolean: Half (Aka: Joker)
                                F - Extend Command Structure

                                F: 0 - 8 Bit IOP Constant Write
                                F: 1 - 16 Bit IOP Constant Write
                                F: 2 - 32 Bit IOP Constant Write
                                F: 3 - *open*
                                F: 4 - *open*
                                F: 5 - *open*
                                F: 6 - *open*
                                F: 7 - *open*
                                F: 8 - *open*
                                F: 9 - *open* (Supposed to be: IOP Delayed execute specified data)
                                F: A - *open*
                                F: B - *open*
                                F: C - *open*
                                F: D - *open* (Supposed to be: IOP Chunk Boolean: Half)
                                F: E - *open* (Supposed to be: IOP Line specific chunk Boolean: Half)
                                F: F - *open*

                                Forgive how sloppy the source looks. I have so many revisions of it (and Code Designer) during the development of it, and it was basically slapped together without much thought.
                                Engine Source:
                                Code:
                                /*
                                  ==========================================================
                                 CheatersLounge CheatsEngine v1.3r03b Cheat Engine v2.1
                                 CodeDesigner v2.0 Source Copyright ©
                                 Created by Gtlcpimp
                                
                                  ==========================================================
                                */
                                address $80078910
                                //address $0107F010
                                
                                _init:
                                addiu sp, sp, $FFF0
                                sq ra, $0000(sp)
                                jalr k0
                                nop
                                //call _debugGenerate
                                call _start
                                lq ra, $0000(sp)
                                jr ra
                                addiu sp, sp, $0010
                                
                                //==========================================================
                                _start:
                                addiu sp, sp, $FE00
                                sq at, $0000(sp)
                                sq v0, $0010(sp)
                                sq v1, $0020(sp)
                                sq a0, $0030(sp)
                                sq a1, $0040(sp)
                                sq a2, $0050(sp)
                                sq a3, $0060(sp)
                                sq t0, $0070(sp)
                                sq t1, $0080(sp)
                                sq t2, $0090(sp)
                                sq t3, $00a0(sp)
                                sq t4, $00b0(sp)
                                sq t5, $00c0(sp)
                                sq t6, $00d0(sp)
                                sq t7, $00e0(sp)
                                sq s0, $00f0(sp)
                                sq s1, $0100(sp)
                                sq s2, $0110(sp)
                                sq s3, $0120(sp)
                                sq s4, $0130(sp)
                                sq s5, $0140(sp)
                                sq s6, $0150(sp)
                                sq s7, $0160(sp)
                                sq t8, $0170(sp)
                                sq t9, $0180(sp)
                                sq k0, $0190(sp)
                                sq k1, $01a0(sp)
                                sq fp, $01b0(sp)
                                sq gp, $01c0(sp)
                                sq ra, $01d0(sp)
                                
                                lui v0, $8008
                                lb v1, $8900(v0)
                                bne v1, zero, 7
                                nop
                                addiu v1, zero, 1
                                sb v1, $8900(v0)
                                
                                call _main
                                
                                lui v0, $8008
                                sb zero, $8900(v0)
                                
                                
                                lq at, $0000(sp)
                                lq v0, $0010(sp)
                                lq v1, $0020(sp)
                                lq a0, $0030(sp)
                                lq a1, $0040(sp)
                                lq a2, $0050(sp)
                                lq a3, $0060(sp)
                                lq t0, $0070(sp)
                                lq t1, $0080(sp)
                                lq t2, $0090(sp)
                                lq t3, $00a0(sp)
                                lq t4, $00b0(sp)
                                lq t5, $00c0(sp)
                                lq t6, $00d0(sp)
                                lq t7, $00e0(sp)
                                lq s0, $00f0(sp)
                                lq s1, $0100(sp)
                                lq s2, $0110(sp)
                                lq s3, $0120(sp)
                                lq s4, $0130(sp)
                                lq s5, $0140(sp)
                                lq s6, $0150(sp)
                                lq s7, $0160(sp)
                                lq t8, $0170(sp)
                                lq t9, $0180(sp)
                                lq k0, $0190(sp)
                                lq k1, $01a0(sp)
                                lq fp, $01b0(sp)
                                lq gp, $01c0(sp)
                                lq ra, $01d0(sp)
                                jr ra
                                addiu sp, sp, $0200
                                
                                
                                //==========================================================
                                _main:
                                
                                addiu sp, sp, $FFF0
                                sq ra, $0000(sp)
                                
                                //lui s0, $0108
                                lui s0, $8008
                                addiu s0, s0, $8250
                                
                                _mainLoop:
                                
                                
                                lw a0, $0000(s0)
                                bne a0, zero, 3
                                nop
                                goto _mainQuit
                                
                                
                                /*
                                Chunk Style
                                
                                00000000
                                
                                TTWWAAAA
                                
                                T: Type
                                   00 Normal Code
                                   01 Embeded Data -------------> Not Implemented Yet
                                   02 Embeded Routine ----------> Not Implemented Yet
                                W: Write
                                   00 Normal Code Write
                                   01 Embeded Data Write -------> Not Implemented Yet
                                   02 Embeded Routine No Write -> Not Implemented Yet
                                A: Address on stack
                                
                                */
                                
                                
                                lh a0, $0000(s0)
                                addiu a0, a0, -1
                                
                                sll a0, a0, 2
                                
                                //lui v0, $0103
                                lui v0, $8003
                                addu a0, v0, a0
                                
                                call _processChunk
                                
                                addiu s0, s0, 4
                                goto _mainLoop
                                nop
                                
                                _mainQuit:
                                lq ra, $0000(sp)
                                jr ra
                                addiu sp, sp, $0010
                                
                                
                                //==========================================================
                                _processChunk:
                                
                                addiu sp, sp, $FFE0
                                sq ra, $0000(sp)
                                sq s0, $0010(sp)
                                
                                addu s0, a0, zero
                                
                                _processChunkLoop:
                                
                                lw v0, $0000(s0)
                                bne v0, zero, 3
                                nop
                                goto _processChunkQuit
                                
                                daddu a2, s0, zero
                                srl a0, v0, 28
                                srl a1, v0, 24
                                call _writeCode
                                
                                
                                addiu a0, zero, -1
                                bne a0, v0, 3
                                nop
                                goto _processChunkQuit
                                
                                addu s0, s0, v0
                                goto _processChunkLoop
                                
                                
                                
                                _processChunkQuit:
                                lq s0, $0010(sp)
                                lq ra, $0000(sp)
                                jr ra
                                addiu sp, sp, $0020
                                
                                
                                //==========================================================
                                _handleBoolean:
                                
                                // a0 = List Pointer
                                
                                addiu sp, sp, $FFF0
                                sq ra, $0000(sp)
                                
                                lw v1, $0000(a0)
                                
                                srl a1, v1, 28
                                
                                addiu v1, zero, $0007
                                bne a1, v1, 3
                                nop
                                goto _hb_7
                                
                                addiu v1, zero, $000D
                                bne a1, v1, 3
                                nop
                                goto _hb_D
                                
                                addiu v1, zero, $000E
                                bne a1, v1, 3
                                nop
                                goto _hb_E
                                
                                lb v1, $0003(a0)
                                addiu v1, zero, $00FD
                                bne v0, v1, 3
                                nop
                                goto _hb_FD
                                
                                
                                addiu v0, zero, -1
                                goto _handleBooleanQuit
                                
                                // ---------------------------
                                _hb_7:
                                
                                lw v0, $0000(a0)
                                sll v1, v1, 28
                                subu v0, v0, v1
                                
                                lw a1, $0000(v0)
                                lw v1, $0004(a0)
                                bne a1, v1, 4
                                nop
                                addiu v0, zero, 8
                                goto _handleBooleanQuit
                                
                                addiu v0, zero, -1
                                goto _handleBooleanQuit
                                
                                // ---------------------------
                                _hb_D:
                                
                                lw v0, $0000(a0)
                                sll v1, a1, 28
                                subu v0, v0, v1
                                lh a1, $0000(v0)
                                
                                lb v1, $0006(a0)
                                beq v1, zero, 10
                                nop
                                lh v1, $0004(a0)
                                beq a1, v1, 4
                                nop
                                addiu v0, zero, 8
                                goto _handleBooleanQuit
                                addiu v0, zero, -1
                                goto _handleBooleanQuit
                                
                                lh v1, $0004(a0)
                                bne a1, v1, 4
                                nop
                                addiu v0, zero, 8
                                goto _handleBooleanQuit
                                addiu v0, zero, -1
                                goto _handleBooleanQuit
                                
                                // ---------------------------
                                _hb_E:
                                
                                lw v0, $0000(a0)
                                lh t0, $0004(a0)
                                sll v1, a1, 28
                                subu v0, v0, v1
                                lh t2, $0006(a0)
                                srl t1, t2, 4
                                sll t1, t1, 4
                                subu t2, t2, t1
                                srl t1, t1, 8
                                sll t1, t1, 3
                                addiu t1, t1, 8
                                
                                lh t3, $0000(v0)
                                
                                beq t2, zero, 4
                                nop
                                addiu t4, zero, 1
                                beq t2, t4, 9
                                nop
                                
                                bne t3, t0, 4
                                nop
                                addiu v0, zero, 8
                                goto _handleBooleanQuit
                                addu v0, t1, zero
                                goto _handleBooleanQuit
                                
                                beq t3, t0, 4
                                nop
                                addiu v0, zero, 8
                                goto _handleBooleanQuit
                                addu v0, t1, zero
                                goto _handleBooleanQuit
                                
                                // ---------------------------
                                _hb_FD:
                                
                                
                                
                                addiu v0, zero, -1
                                goto _handleBooleanQuit
                                
                                
                                _handleBooleanQuit:
                                lq ra, $0000(sp)
                                jr ra
                                addiu sp, sp, $0010
                                
                                
                                
                                
                                //==========================================================
                                _writeCode:
                                
                                
                                addiu sp, sp, $FFF0
                                sq ra, $0000(sp)
                                
                                
                                // a0 = 8 Bit command (0xD)
                                // a1 = 16 Bit command (0xFD)
                                // a2 = List Pointer
                                // v0 = Size return
                                
                                addu v0, zero, zero
                                
                                
                                // ---------------------------
                                addiu v1, zero, $0000
                                bne v1, a0, 3
                                nop
                                goto _cw_8
                                
                                // ---------------------------
                                addiu v1, zero, $0001
                                bne v1, a0, 3
                                nop
                                goto _cw_16
                                
                                // ---------------------------
                                addiu v1, zero, $0002
                                bne v1, a0, 3
                                nop
                                goto _cw_32
                                
                                // ---------------------------
                                addiu v1, zero, $0003
                                bne v1, a0, 3
                                nop
                                goto _cw_inc_dec
                                
                                // ---------------------------
                                addiu v1, zero, $0004
                                bne v1, a0, 3
                                nop
                                goto _cw_maw_32
                                
                                // ---------------------------
                                addiu v1, zero, $0005
                                bne v1, a0, 3
                                nop
                                goto _cw_copy
                                
                                // ---------------------------
                                addiu v1, zero, $0006
                                bne v1, a0, 3
                                nop
                                goto _cw_pointer
                                
                                // ---------------------------
                                addiu v1, zero, $0007
                                bne v1, a0, 6
                                nop
                                addu a0, a2, zero
                                call _handleBoolean
                                goto _cw_exit
                                
                                // ---------------------------
                                addiu v1, zero, $0008
                                bne v1, a0, 3
                                nop
                                goto _cw_replace
                                
                                // ---------------------------
                                addiu v1, zero, $0009
                                bne v1, a0, 14
                                nop
                                lw a1, $0000(a2)
                                srl a0, a1, 28
                                sll a0, a0, 28
                                subu a1, a1, a0
                                lw v1, $0000(a1)
                                lw a0, $0004(a2)
                                beq v1, zero, 3
                                nop
                                call _execRoutine
                                addiu v0, zero, 8
                                goto _cw_exit
                                
                                // ---------------------------
                                addiu v1, zero, $000A
                                bne v1, a0, 3
                                nop
                                goto _cw_A
                                
                                // ---------------------------
                                addiu v1, zero, $000B
                                bne v1, a0, 3
                                nop
                                goto _cw_delay
                                
                                // ---------------------------
                                addiu v1, zero, $000C
                                bne v1, a0, 3
                                nop
                                goto _cw_stopper
                                
                                // ---------------------------
                                addiu v1, zero, $000D
                                bne v1, a0, 6
                                nop
                                daddu a0, a2, zero
                                call _handleBoolean
                                goto _cw_exit
                                
                                // ---------------------------
                                addiu v1, zero, $000E
                                bne v1, a0, 6
                                nop
                                daddu a0, a2, zero
                                call _handleBoolean
                                goto _cw_exit
                                
                                // ---------------------------
                                addiu v1, zero, $000F
                                bne v1, a0, 3
                                nop
                                goto _cw_extended
                                
                                
                                addiu v0, zero, -1
                                goto _cw_exit
                                
                                _cw_extended:
                                
                                // ---------------------------
                                addiu v1, zero, $00F0
                                bne v1, a1, 3
                                nop
                                goto _cw_iop_8
                                
                                // ---------------------------
                                addiu v1, zero, $00F1
                                bne v1, a1, 3
                                nop
                                goto _cw_iop_16
                                
                                // ---------------------------
                                addiu v1, zero, $00F2
                                bne v1, a1, 3
                                nop
                                goto _cw_iop_32
                                
                                
                                addiu v0, zero, -1
                                goto _cw_exit
                                
                                // ---------------------------
                                _cw_8:
                                lw t0, $0000(a2)
                                lb t1, $0004(a2)
                                lui v0, $2000
                                addu t0, t0, v0
                                sb t1, $0000(t0)
                                addiu v0, zero, 8
                                goto _cw_exit
                                
                                // ---------------------------
                                _cw_16:
                                sll t2, a0, 28
                                lw t0, $0000(a2)
                                subu t0, t0, t2
                                lh t1, $0004(a2)
                                lui v0, $2000
                                addu t0, t0, v0
                                sh t1, $0000(t0)
                                addiu v0, zero, 8
                                goto _cw_exit
                                
                                // ---------------------------
                                _cw_32:
                                sll t2, a0, 28
                                lw t0, $0000(a2)
                                subu t0, t0, t2
                                lw t1, $0004(a2)
                                lui v0, $2000
                                addu t0, t0, v0
                                sw t1, $0000(t0)
                                addiu v0, zero, 8
                                goto _cw_exit
                                
                                // ---------------------------
                                _cw_inc_dec:
                                
                                lw t0, $0004(a2)
                                lb t1, $0002(a2)
                                
                                bne t1, zero, 3
                                nop
                                goto _cw_inc_dec_0
                                
                                addiu v1, zero, $0010
                                bne t1, v1, 3
                                nop
                                goto _cw_inc_dec_1
                                
                                addiu v1, zero, $0020
                                bne t1, v1, 3
                                nop
                                goto _cw_inc_dec_2
                                
                                addiu v1, zero, $0030
                                bne t1, v1, 3
                                nop
                                goto _cw_inc_dec_3
                                
                                addiu v1, zero, $0040
                                bne t1, v1, 3
                                nop
                                goto _cw_inc_dec_4
                                
                                addiu v1, zero, $0050
                                bne t1, v1, 3
                                nop
                                goto _cw_inc_dec_5
                                
                                addiu v0, zero, -1
                                goto _cw_exit
                                
                                // -------------------
                                _cw_inc_dec_0:
                                
                                lb t1, $0000(t0)
                                lb t2, $0000(a2)
                                addu t1, t1, t2
                                sb t1, $0000(t0)
                                
                                addiu v0, zero, 8
                                goto _cw_exit
                                
                                // -------------------
                                _cw_inc_dec_1:
                                
                                lb t1, $0000(t0)
                                lb t2, $0000(a2)
                                subu t1, t1, t2
                                sb t1, $0000(t0)
                                
                                addiu v0, zero, 8
                                goto _cw_exit
                                
                                // -------------------
                                _cw_inc_dec_2:
                                
                                lh t1, $0000(t0)
                                lh t2, $0000(a2)
                                addu t1, t1, t2
                                sh t1, $0000(t0)
                                
                                addiu v0, zero, 8
                                goto _cw_exit
                                
                                // -------------------
                                _cw_inc_dec_3:
                                
                                lh t1, $0000(t0)
                                lh t2, $0000(a2)
                                subu t1, t1, t2
                                sh t1, $0000(t0)
                                
                                addiu v0, zero, 8
                                goto _cw_exit
                                
                                // -------------------
                                _cw_inc_dec_4:
                                
                                lw t1, $0000(t0)
                                lw t2, $0008(a2)
                                addu t1, t1, t2
                                sw t1, $0000(t0)
                                
                                addiu v0, zero, 16
                                goto _cw_exit
                                
                                // -------------------
                                _cw_inc_dec_5:
                                
                                lw t1, $0000(t0)
                                lw t2, $0008(a2)
                                subu t1, t1, t2
                                sw t1, $0000(t0)
                                
                                addiu v0, zero, 16
                                goto _cw_exit
                                
                                // ---------------------------
                                _cw_maw_32:
                                
                                lw t0, $0000(a2)
                                sll t2, a0, 28
                                subu t0, t0, t2
                                lh t1, $0004(a2)
                                lh t2, $0006(a2)
                                lw t3, $0008(a2)
                                lw t4, $000C(a2)
                                
                                sll t1, t1, 2
                                
                                _cw_maw_32_loop:
                                
                                bne t2, zero, 3
                                nop
                                goto _cw_maw_32_exit
                                
                                sw t3, $0000(t0)
                                
                                addu t3, t3, t4
                                addiu t0, t0, 4
                                addu t0, t0, t1
                                addiu t2, t2, -1
                                goto _cw_maw_32_loop
                                
                                _cw_maw_32_exit:
                                addiu v0, zero, 16
                                goto _cw_exit
                                
                                // ---------------------------
                                _cw_copy:
                                
                                lw t0, $0000(a2)
                                sll t1, a0, 28
                                subu t0, t0, t1
                                lw t1, $0008(a2)
                                lw t2, $0004(a2)
                                
                                _cw_copy_loop:
                                bne t2, zero, 3
                                nop
                                goto _cw_copy_exit
                                
                                
                                lb t3, $0000(t0)
                                sb t3, $0000(t1)
                                
                                addiu t0, t0, 1
                                addiu t1, t1, 1
                                addiu t2, t2, -1
                                goto _cw_copy_loop
                                
                                _cw_copy_exit:
                                addiu v0, zero, 16
                                goto _cw_exit
                                
                                // ---------------------------
                                _cw_pointer:
                                addu v0, zero, zero
                                addu v1, a2, zero
                                addu t8, zero, zero
                                
                                lw t0, $0000(a2)
                                sll t1, a0, 28
                                subu t0, t0, t1
                                lw t1, $0004(a2)
                                
                                lw t0, $0000(t0)
                                
                                addiu v0, v0, 8
                                addiu v1, v1, 8
                                
                                _cw_pointer_loop:
                                
                                addiu t5, zero, -1
                                bne t1, t5, 3
                                nop
                                goto _cw_pointer_exit
                                
                                lb t3, $0003(v1)
                                
                                addiu t4, zero, $0006
                                bne t3, t4, 3
                                nop
                                goto _cw_pointer_point
                                
                                addiu t4, zero, $0001
                                bne t3, t4, 3
                                nop
                                goto _cw_pointer_write_0
                                
                                addiu t4, zero, $0002
                                bne t3, t4, 3
                                nop
                                goto _cw_pointer_write_1
                                
                                addiu t4, zero, $0003
                                bne t3, t4, 3
                                nop
                                goto _cw_pointer_write_2
                                
                                addiu v0, zero, -1
                                goto _cw_pointer_exit
                                
                                // -------------------
                                _cw_pointer_point:
                                
                                lh t4, $0000(v1)
                                sll t4, t4, 2
                                addu t0, t0, t4
                                lw t0, $0000(t0)
                                
                                goto _cw_pointer_skip
                                
                                // -------------------
                                _cw_pointer_write_0:
                                
                                lh t4, $0000(v1)
                                addu t0, t0, t4
                                lb t2, $0004(v1)
                                sb t2, $0000(t0)
                                
                                goto _cw_pointer_skip
                                
                                // -------------------
                                _cw_pointer_write_1:
                                
                                lh t4, $0000(v1)
                                sll t4, t4, 1
                                addu t0, t0, t4
                                lh t2, $0004(v1)
                                sh t2, $0000(t0)
                                
                                
                                goto _cw_pointer_skip
                                
                                // -------------------
                                _cw_pointer_write_2:
                                
                                lh t4, $0000(v1)
                                sll t4, t4, 2
                                addu t0, t0, t4
                                lw t2, $0004(v1)
                                sw t2, $0000(t0)
                                
                                goto _cw_pointer_skip
                                
                                
                                _cw_pointer_skip:
                                
                                addiu t5, zero, 1
                                subu t8, t5, t8
                                
                                addiu v0, v0, 4
                                addiu v1, v1, 4
                                addiu t1, t1, -1
                                goto _cw_pointer_loop
                                
                                
                                _cw_pointer_exit:
                                bne t8, zero, 2
                                nop
                                addiu v0, v0, 4
                                addiu v0, v0, 4
                                goto _cw_exit
                                
                                // ---------------------------
                                _cw_replace:
                                
                                lw t0, $0000(a2)
                                sll t1, a0, 28
                                subu t0, t0, t1
                                lh t3, $000C(a2)
                                lb t4, $000E(a2)
                                
                                bne t4, zero, 3
                                nop
                                goto _cw_replace_0
                                
                                addiu t1, zero, $0010
                                bne t4, t1, 3
                                nop
                                goto _cw_replace_1
                                
                                addiu t1, zero, $0020
                                bne t4, t1, 3
                                nop
                                goto _cw_replace_2
                                
                                addiu v0, zero, -1
                                goto _cw_exit
                                
                                // -------------------
                                _cw_replace_0:
                                lb t1, $0004(a2)
                                lb t2, $0008(a2)
                                
                                _cw_replace_0_loop:
                                
                                bne t3, zero, 3
                                nop
                                goto _cw_replace_exit
                                
                                lb v1, $0000(t0)
                                bne t1, v1, 2
                                nop
                                sb t2, $0000(t0)
                                
                                addiu t0, t0, 1
                                addiu t3, t3, -1
                                goto _cw_replace_0_loop
                                
                                // -------------------
                                _cw_replace_1:
                                lh t1, $0004(a2)
                                lh t2, $0008(a2)
                                sll t3, t3, 1
                                
                                _cw_replace_1_loop:
                                
                                bne t3, zero, 3
                                nop
                                goto _cw_replace_exit
                                
                                lh v1, $0000(t0)
                                bne t1, v1, 2
                                nop
                                sh t2, $0000(t0)
                                
                                addiu t0, t0, 2
                                addiu t3, t3, -2
                                goto _cw_replace_1_loop
                                
                                // -------------------
                                _cw_replace_2:
                                lw t1, $0004(a2)
                                lw t2, $0008(a2)
                                sll t3, t3, 2
                                
                                _cw_replace_2_loop:
                                
                                bne t3, zero, 3
                                nop
                                goto _cw_replace_exit
                                
                                lw v1, $0000(t0)
                                bne t1, v1, 2
                                nop
                                sw t2, $0000(t0)
                                
                                addiu t0, t0, 4
                                addiu t3, t3, -4
                                goto _cw_replace_2_loop
                                
                                _cw_replace_exit:
                                addiu v0, zero, 16
                                goto _cw_exit
                                
                                // ---------------------------
                                /* Used to be DNAS Patch
                                   command, but was removed
                                   since manual IOP writes
                                   were easier to use.
                                */
                                _cw_A:
                                
                                
                                _cw_A_exit:
                                
                                lq ra, $0000(sp)
                                jr ra
                                addiu sp, sp, $0010
                                
                                
                                // ---------------------------
                                _cw_delay:
                                addu v0, zero, zero
                                goto _cw_exit
                                
                                // ---------------------------
                                _cw_stopper:
                                
                                
                                addu v0, zero, zero
                                goto _cw_exit
                                
                                // ---------------------------
                                _cw_iop_8:
                                
                                lw t0, $0000(a2)
                                sll t1, a1, 24
                                subu t0, t0, t1
                                lui t1, $BC00
                                addu t1, t1, t0
                                
                                lb t2, $0004(a2)
                                sb t2, $0000(t1)
                                
                                addiu v0, zero, 8
                                goto _cw_exit
                                
                                
                                // ---------------------------
                                _cw_iop_16:
                                
                                lw t0, $0000(a2)
                                sll t1, a1, 24
                                subu t0, t0, t1
                                lui t1, $BC00
                                addu t1, t1, t0
                                
                                lh t2, $0004(a2)
                                sh t2, $0000(t1)
                                
                                addiu v0, zero, 8
                                goto _cw_exit
                                
                                
                                // ---------------------------
                                _cw_iop_32:
                                
                                lw t0, $0000(a2)
                                sll t1, a1, 24
                                subu t0, t0, t1
                                lui t1, $BC00
                                addu t1, t1, t0
                                
                                lw t2, $0004(a2)
                                sw t2, $0000(t1)
                                
                                addiu v0, zero, 8
                                goto _cw_exit
                                
                                
                                _cw_exit:
                                lq ra, $0000(sp)
                                jr ra
                                addiu sp, sp, $0010
                                
                                //==========================================================
                                _execRoutine:
                                
                                addiu sp, sp, $FE00
                                sq at, $0000(sp)
                                sq v0, $0010(sp)
                                sq v1, $0020(sp)
                                sq a0, $0030(sp)
                                sq a1, $0040(sp)
                                sq a2, $0050(sp)
                                sq a3, $0060(sp)
                                sq t0, $0070(sp)
                                sq t1, $0080(sp)
                                sq t2, $0090(sp)
                                sq t3, $00a0(sp)
                                sq t4, $00b0(sp)
                                sq t5, $00c0(sp)
                                sq t6, $00d0(sp)
                                sq t7, $00e0(sp)
                                sq s0, $00f0(sp)
                                sq s1, $0100(sp)
                                sq s2, $0110(sp)
                                sq s3, $0120(sp)
                                sq s4, $0130(sp)
                                sq s5, $0140(sp)
                                sq s6, $0150(sp)
                                sq s7, $0160(sp)
                                sq t8, $0170(sp)
                                sq t9, $0180(sp)
                                sq k0, $0190(sp)
                                sq k1, $01a0(sp)
                                sq fp, $01b0(sp)
                                sq gp, $01c0(sp)
                                sq ra, $01d0(sp)
                                
                                jalr a1
                                nop
                                
                                lq at, $0000(sp)
                                lq v0, $0010(sp)
                                lq v1, $0020(sp)
                                lq a0, $0030(sp)
                                lq a1, $0040(sp)
                                lq a2, $0050(sp)
                                lq a3, $0060(sp)
                                lq t0, $0070(sp)
                                lq t1, $0080(sp)
                                lq t2, $0090(sp)
                                lq t3, $00a0(sp)
                                lq t4, $00b0(sp)
                                lq t5, $00c0(sp)
                                lq t6, $00d0(sp)
                                lq t7, $00e0(sp)
                                lq s0, $00f0(sp)
                                lq s1, $0100(sp)
                                lq s2, $0110(sp)
                                lq s3, $0120(sp)
                                lq s4, $0130(sp)
                                lq s5, $0140(sp)
                                lq s6, $0150(sp)
                                lq s7, $0160(sp)
                                lq t8, $0170(sp)
                                lq t9, $0180(sp)
                                lq k0, $0190(sp)
                                lq k1, $01a0(sp)
                                lq fp, $01b0(sp)
                                lq gp, $01c0(sp)
                                lq ra, $01d0(sp)
                                jr ra
                                addiu sp, sp, $0200
                                
                                
                                //==========================================================
                                _debugGenerate:
                                
                                
                                nop
                                nop
                                nop
                                nop
                                nop
                                nop
                                nop
                                nop
                                nop
                                nop
                                nop
                                nop
                                nop
                                nop
                                nop
                                nop
                                nop
                                nop
                                nop
                                nop
                                nop
                                nop
                                nop
                                nop
                                Last edited by Gtlcpimp; 03-23-2016, 07:39:03 AM.

                                Comment

                                Working...
                                X