diff --git a/README.md b/README.md index 91541f4391..239130515b 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,41 @@ # DuckStation - LightGun Edition You need to apply Justifier patch for some of the game +Those are included in the rlz zip. Lightgun must be used in joystick mode, using guncon relative aiming +Outputs support either with a direct connection for Gun4IR or with MameHooker. + +For Gun4IR recoil : go to controller settings, your guncon Port, Settings and you should see Gun4Ir Com port option +For Mamehooker : Settings, General, Enable MameHooker checkbox (you need .NET 8 because i use a third party app to make it work) + +Also added some No Flash Gun cheat that were not build in duckstation. + ## Compatibility List -SLUS-00335 : Crypt Killer +SLUS-00335 : Crypt Killer [Recoil support] + +SLES-00445 : Die Hard Trilogy [Recoil support] + +SLUS-00119 : Die Hard Trilogy [Recoil support] -SLES-00445 : Die Hard Trilogy +SLUS-01015 : Die Hard Trilogy 2 - Viva Las Vegas (USA) [Recoil support] -SLUS-00654 : Elemental Gearbolt +SLUS-00654 : Elemental Gearbolt [Recoil support] -SLES-03990 : Extreme ghostbuster +SLES-03990 : Extreme ghostbuster [Recoil support] -SCES-02543 : Ghoul Panic +SCES-02543 : Ghoul Panic [Recoil support] -SLUS-00630 : Judge Dreed +SLUS-00630 : Judge Dreed [Recoil support] -SLUS-00293 : Lethal enforcer +SLUS-00293 : Lethal enforcer [Recoil support] -SLUS-00503 : Maximum force +SLES-00542 : Lethal enforcer [Recoil support] + +SLUS-00503 : Maximum force [Recoil support] + +SLES-02244 : Mighty Hits Special (Europe) (En,Fr,De) SLES-03846 : Moorhen 3 - Chicken Chase @@ -27,34 +43,38 @@ SLES-03278 : Moorhuhn 2 - Die Jagd Geht Weiter SLES-04174 : Moorhuhn X (Germany) -SLUS-01354 : Point Blank 3 +SLUS-01354 : Point Blank 3 [Recoil support] -SLPM-86048 : Policenauts (Japan) (Disc 1) +SLPM-86048 : Policenauts (Japan) (Disc 1) [Recoil support] SLPM-86049 : Policenauts (Japan) (Disc 2) (Untested !) -SCUS-94408 : Project - Horned Owl (USA) +SCUS-94408 : Project - Horned Owl (USA) [Recoil support] + +HASH-2A8EE8AAA2279639 : Horned Owl (Japan) [Recoil support] SCES-02569 : Rescue Shot (Europe) -SLES-02744 : Resident Evil - Survivor (France) (calibration target need to be shoot a little lower) +SLES-02744 : Resident Evil - Survivor (France) (calibration target need to be shoot a little lower) [Recoil support] + +SLES-02732 : Resident Evil - Survivor (Europe) (calibration target need to be shoot a little lower) [Recoil support] -SLES-02732 : Resident Evil - Survivor (Europe) (calibration target need to be shoot a little lower) +SLUS-01087 : Resident Evil - Survivor (USA) [Recoil support] -SLPS-02474 : Simple 1500 Series Vol. 24 - The Gun Shooting (Japan) +SLPS-02474 : Simple 1500 Series Vol. 24 - The Gun Shooting (Japan) [Recoil support] SLPM-86816 : Simple 1500 Series Vol. 63 - The Gun Shooting 2 (Japan) -SLUS-00405 : Time Crisis (USA) +SLUS-00405 : Time Crisis (USA) [Recoil support] SLUS-00381 : Star Wars - Rebel Assault II - The Hidden Empire (USA) (Disc 1) Also working (but didn't need a fix) : -SLUS-01398 Gunfighter - The Legend of Jesse James (USA) +SLUS-01398 Gunfighter - The Legend of Jesse James (USA) [Recoil support] SLPS-01106 Guntu - Western Front June, 1944 - Tetsu no Kioku(Japan) -SLUS-00481 Point Blank 1 & 2 : no need +SLUS-00481 Point Blank 1 & 2 : [Recoil support] (Partial recoil support, when you have unlimited ammo, recoil is triggered for any trigger press) -Time Crisis - Project Titan (USA) \ No newline at end of file +Time Crisis - Project Titan (USA) [Recoil support] \ No newline at end of file diff --git a/ps1 - guncon conversions/Crypt Killer/bin/crypt_killer_guncon_usa.ppf b/ps1 - guncon conversions/Crypt Killer/bin/crypt_killer_guncon_usa.ppf new file mode 100644 index 0000000000..b7acd3b361 Binary files /dev/null and b/ps1 - guncon conversions/Crypt Killer/bin/crypt_killer_guncon_usa.ppf differ diff --git a/ps1 - guncon conversions/Crypt Killer/bin/ppf-o-matic3.exe b/ps1 - guncon conversions/Crypt Killer/bin/ppf-o-matic3.exe new file mode 100644 index 0000000000..4bc26832ec Binary files /dev/null and b/ps1 - guncon conversions/Crypt Killer/bin/ppf-o-matic3.exe differ diff --git a/ps1 - guncon conversions/Crypt Killer/readme.txt b/ps1 - guncon conversions/Crypt Killer/readme.txt new file mode 100644 index 0000000000..82798ee965 --- /dev/null +++ b/ps1 - guncon conversions/Crypt Killer/readme.txt @@ -0,0 +1,26 @@ +Crypt Killer / Henry Explorers + + +Works +> (USA) http://redump.org/disc/11085/ + + +Converts justifiers to dual guncon + + + +Instructions: +1. Rip game cd to bin/cue or ccd/img format +2. Run bin/ppf-o-matic3 +3. Drag-drop bin or img file +4. Drag-drop bin/ppf file +5. Hit patch + + + +Uninstall: +1. Run bin/ppf-o-matic3 +2. Click 'undo patch' +3. Drag-drop bin or img file +4. Drag-drop bin/ppf file +5. Hit patch diff --git a/ps1 - guncon conversions/Crypt Killer/src/code/europe/asm - lethal enforcers.bat b/ps1 - guncon conversions/Crypt Killer/src/code/europe/asm - lethal enforcers.bat new file mode 100644 index 0000000000..5b8c8dc1f7 --- /dev/null +++ b/ps1 - guncon conversions/Crypt Killer/src/code/europe/asm - lethal enforcers.bat @@ -0,0 +1,6 @@ +del *.bin + +spasm -b pad-guncon-1.txt pad-guncon-1.bin +spasm -b pad-guncon-2.txt pad-guncon-2.bin + +pause diff --git a/ps1 - guncon conversions/Crypt Killer/src/code/europe/pad-guncon-1.txt b/ps1 - guncon conversions/Crypt Killer/src/code/europe/pad-guncon-1.txt new file mode 100644 index 0000000000..f24bca5a40 --- /dev/null +++ b/ps1 - guncon conversions/Crypt Killer/src/code/europe/pad-guncon-1.txt @@ -0,0 +1,209 @@ +; 6b550-6b770 +; - 6b550-6b6xx = remap buttons, id, cursor data + + + +org $8006b548 + +j $8006b550 +nop + + + +or at,ra,r0 + + +; player 1 +lui v0,$8006 +jal REMAP_GUNCON +ori v0,$c758 + +; player 2 +lui v0,$8006 +jal REMAP_GUNCON +ori v0,$c7ae + + +or ra,at,r0 + + + +; unlatch dead gun - only 1 active at time +lbu v0,$74(gp) +lui v1,$8006+1 + +bne v0,r0,DEAD_GUN2 +nop + +; gun 1 active - shut down 2 +beq r0,r0,TOTAL_DONE +sb r0,$c7b3(v1) + +; gun 2 active - shut down 1 +DEAD_GUN2: +sb r0,$c75d(v1) + + + +TOTAL_DONE: + +; OLD code +lw a0,$6c4(gp) +nop +j $80035ffc +nop + +; ======================================= +; ======================================= +; ======================================= + +; at, s0, a0, v0, v1, (s1) +; - v0 = guncon data +; - at = jal return +; - s0,a0,v1 + +REMAP_GUNCON: + +; remap guncon ID to justifier +ori s0,r0,$31 +sb s0,1(v0) + + + +; force cursor data (guncon x-y) +lh s0,4(v0) +lh v1,6(v0) +;nop + + + + +; set valid latch data (1,10 = guncon offscreen normally) +slti a0,s0,2 +beq a0,r0,REMAP_XY +ori a0,r0,1 + + +; offscreen shot - force (0,0) +sh r0,4(v0) +sh r0,6(v0) +beq r0,r0,REMAP_GUNCON_BUTTONS +sh r0,8(v0) + + + + +REMAP_XY: + +; signal on-screen shot +sb a0,5(v0) + + +; x-axis + +; 255 guncon (pSX rough center) --> 160 justifier --> 0 center +addi s0,s0,$ffa1 +addi s0,s0,$ff60 + + + +; adjustment range (pSX 384 --> 320) +; - 80 / 96 (384 * 128 / 320) ===> x * (64+16) / 96 +sll a0,s0,6 +sll s0,s0,4 +add s0,s0,a0 + +lui a0,0x02aa +ori a0,0xaaaa +mult s0,a0 +mfhi s0 + +; 0 center --> 160 justifier +addi s0,s0,$a0 + +sh s0,8(v0) + + + +; y-axis + +; 136 guncon (pSX rough center) --> 128 justifier --> 0 center +addi v1,v1,$fff8 +addi v1,v1,$ff80 + +; adjustment range (pSX 240 --> 256 pal range) +; - 256 / 240 = 16/15 +sll v1,v1,4 + +lui a0,0x1111 +ori a0,0x1111 +mult v1,a0 +mfhi v1 + +; 0 center --> 128 justifier +addi v1,v1,$80 + +sh v1,6(v0) + + + + +REMAP_GUNCON_BUTTONS: + +; remap guncon --> justifier buttons + +; $2000 = trigger --> $8000 = trigger +; $0008 = A --> $4000 = auxiliary +; $4000 = B --> $0008 = start + +; at,a0,ra + +lhu s0,2(v0) +ori a0,r0,$ffff + + + +; check trigger (low-assert) +andi v1,s0,$2000 +bne v1,r0,REMAP_A +nop + +; set $8000 bit +andi a0,a0,$7fff + + + +REMAP_A: +; check aux +andi v1,s0,$0008 +bne v1,r0,REMAP_B +nop + +; set $4000 bit +andi a0,a0,$bfff + + + + +REMAP_B: +; check start +andi v1,s0,$4000 +bne v1,r0,REMAP_BUTTONS +nop + +; lower $0008 bit +andi a0,a0,$fff7 + + + +REMAP_BUTTONS: +sh a0,2(v0) + +; ================================ +; ================================ +; ================================ + +DONE: + +jr ra +nop diff --git a/ps1 - guncon conversions/Crypt Killer/src/code/europe/pad-guncon-2.txt b/ps1 - guncon conversions/Crypt Killer/src/code/europe/pad-guncon-2.txt new file mode 100644 index 0000000000..0d95d2bd0d --- /dev/null +++ b/ps1 - guncon conversions/Crypt Killer/src/code/europe/pad-guncon-2.txt @@ -0,0 +1,15 @@ +org $800176f8 + +; in-game x-math +j $8001771c +or v0,r0,v1 + + +; calibration p1 +j $8001a890 +or v0,r0,v1 + + +; calibration p2 +j $8001aa4c +or v0,r0,v1 diff --git a/ps1 - guncon conversions/Crypt Killer/src/code/europe/spasm.exe b/ps1 - guncon conversions/Crypt Killer/src/code/europe/spasm.exe new file mode 100644 index 0000000000..c31eff4a16 Binary files /dev/null and b/ps1 - guncon conversions/Crypt Killer/src/code/europe/spasm.exe differ diff --git a/ps1 - guncon conversions/Crypt Killer/src/code/usa/asm - crypt killer.bat b/ps1 - guncon conversions/Crypt Killer/src/code/usa/asm - crypt killer.bat new file mode 100644 index 0000000000..85538c378d --- /dev/null +++ b/ps1 - guncon conversions/Crypt Killer/src/code/usa/asm - crypt killer.bat @@ -0,0 +1,5 @@ +del *.bin + +spasm -b pad-guncon-1.txt pad-guncon-1.bin + +pause diff --git a/ps1 - guncon conversions/Crypt Killer/src/code/usa/pad-guncon-1.txt b/ps1 - guncon conversions/Crypt Killer/src/code/usa/pad-guncon-1.txt new file mode 100644 index 0000000000..c61ea8b72e --- /dev/null +++ b/ps1 - guncon conversions/Crypt Killer/src/code/usa/pad-guncon-1.txt @@ -0,0 +1,253 @@ +; 45720-45b10 +; - 45880-45axx = remap buttons, id, cursor data + + + +org $80045878 + +j $80045880 +nop + + + +lui v0,$800e +jal REMAP_GUNCON +ori v0,$4c24 + + +; remap latch data +lbu at,5(v0) +lui a0,$8002 +sb at,$2160(a0) + +; remap xy data (game) +lhu at,8(v0) +lui a0,$800e +lhu v1,6(v0) +sh at,$4c08(a0) +sh v1,$4c10(a0) + +; remap xy data (stage) +lhu at,8(v0) +lui a0,$800b+1 +lhu v1,6(v0) + +addi at,at,$ff60 +sw at,$9da0(a0) +addi v1,v1,$ff88 +sw v1,$9da8(a0) + + + + + +; player 2 +lui v0,$800e +jal REMAP_GUNCON +ori v0,$4c46 + + +; remap latch data +lbu at,5(v0) +lui a0,$8002 +sb at,$2161(a0) + +; remap xy data (game) +lhu at,8(v0) +lui a0,$800e +lhu v1,6(v0) +sh at,$4c0c(a0) +sh v1,$4c14(a0) + +; remap xy data (stage) +lhu at,8(v0) +lui a0,$800b+1 +lhu v1,6(v0) + +addi at,at,$ff60 +sw at,$9da4(a0) +addi v1,v1,$ff88 +sw v1,$9dac(a0) + + + + + +; OLD code +lw t1,$18(sp) +nop +j $800517a4 +nop + +; ======================================= +; ======================================= +; ======================================= + +; at, a0, s0, v0, v1 +; - v0 = guncon data +; - at = temp +; - s0 = guncon x +; - v1 = guncon x + + +REMAP_GUNCON: + +; check guncon ID first +lbu at,1(v0) +ori s0,r0,$63 +bne at,s0,DONE +nop + + + +; remap guncon ID to justifier +ori at,r0,$31 +sb at,1(v0) + + + +; force cursor data (guncon x-y) +lh s0,4(v0) +lh v1,6(v0) +;nop + + + + +; set valid latch data (1,10 = guncon offscreen normally) +; - 0 = onscreen, 1 = offscreen +slti at,s0,2 +beq at,r0,REMAP_XY +ori at,r0,1 + + +; offscreen shot - force (0,0) +;sh r0,4(v0) + +; 1 = offscreen (Crypt) +sb at,5(v0) + +sh r0,6(v0) +beq r0,r0,REMAP_GUNCON_BUTTONS +sh r0,8(v0) + + + + +REMAP_XY: + +; signal on-screen shot +;sb at,5(v0) + +; 0 = offscreen (Crypt) +sb r0,5(v0) + + + + +; x-axis + +; 255 guncon (pSX rough center) --> 160 justifier --> 0 center +addi s0,s0,$ffa1 +addi s0,s0,$ff60 + + + +; adjustment range (pSX 384 --> 320) +; - 80 / 96 (384 * 128 / 320) ===> x * (64+16) / 96 +sll at,s0,6 +sll s0,s0,4 +add s0,s0,at + +lui at,0x02aa +ori at,0xaaaa +mult s0,at +mfhi s0 + +; 0 center --> 158 justifier +addi s0,s0,$9e + +sh s0,8(v0) + + + +; y-axis + +; 136 guncon (pSX rough center) --> 120 justifier --> 0 center +addi v1,v1,$fff0 +;addi v1,v1,$ff88 + +; no adjustment range (pSX 240 --> 240 range) +;lui at,0x7800 +;ori at,0x0000 +;mult s1,at +;mfhi s1 + +; 0 center --> 120 justifier +;addi v1,v1,$78 + +sh v1,6(v0) + + + + +REMAP_GUNCON_BUTTONS: + +; remap guncon --> justifier buttons + +; $2000 = trigger --> $8000 = trigger +; $0008 = A --> $4000 = auxiliary +; $4000 = B --> $0008 = start + +; at,a0,ra + +lhu s0,2(v0) +ori a0,r0,$ffff + + + +; check trigger (low-assert) +andi v1,s0,$2000 +bne v1,r0,REMAP_A +nop + +; set $8000 bit +andi a0,a0,$7fff + + + +REMAP_A: +; check aux +andi v1,s0,$0008 +bne v1,r0,REMAP_B +nop + +; set $4000 bit +andi a0,a0,$bfff + + + + +REMAP_B: +; check start +andi v1,s0,$4000 +bne v1,r0,REMAP_BUTTONS +nop + +; lower $0008 bit +andi a0,a0,$fff7 + + + + +REMAP_BUTTONS: +sh a0,2(v0) + +; ================================ +; ================================ +; ================================ + +DONE: + +jr ra +nop diff --git a/ps1 - guncon conversions/Crypt Killer/src/code/usa/spasm.exe b/ps1 - guncon conversions/Crypt Killer/src/code/usa/spasm.exe new file mode 100644 index 0000000000..c31eff4a16 Binary files /dev/null and b/ps1 - guncon conversions/Crypt Killer/src/code/usa/spasm.exe differ diff --git a/ps1 - guncon conversions/Crypt Killer/src/notes/crypt killer - guncon game.txt b/ps1 - guncon conversions/Crypt Killer/src/notes/crypt killer - guncon game.txt new file mode 100644 index 0000000000..88445aa289 --- /dev/null +++ b/ps1 - guncon conversions/Crypt Killer/src/notes/crypt killer - guncon game.txt @@ -0,0 +1,215 @@ +===> remap guncon data around here + + +; data address +8005179c : 8FA90018 LW 800e4c24 (t1), 0018 (801fff80 (sp)) [801fff98] +800517a0 : 00000000 NOP +800517a4 : 000918C0 SLL 800ce218 (v1), 00000000 (t1), 03 (3), +800517a8 : 8FA90030 LW 00000000 (t1), 0030 (801fff80 (sp)) [801fffb0] +800517ac : 24630000 ADDIU 00000000 (v1), 00000000 (v1), 0000 (0), +800517b0 : 01231821 ADDU 00000000 (v1), 800e4c24 (t1), 00000000 (v1), + +800517b4 : 90620002 LBU 00000000 (v0), 0002 (800e4c24 (v1)) [800e4c26] +800517b8 : 90640003 LBU 000d0ec4 (a0), 0003 (800e4c24 (v1)) [800e4c27] +800517bc : 8FA90018 LW 800e4c24 (t1), 0018 (801fff80 (sp)) [801fff98] +800517c0 : 00021200 SLL 000000ff (v0), 000000ff (v0), 08 (8), +800517c4 : 00441027 NOR 0000ff00 (v0), 0000ff00 (v0), 000000ff (a0), +800517c8 : A7A20020 SH ffff0000 (v0), 0020 (801fff80 (sp)) [801fffa0] +800517cc : 3C02800E LUI ffff0000 (v0), 800e (32782), +800517d0 : 24424AF0 ADDIU 800e0000 (v0), 800e0000 (v0), 4af0 (19184), +800517d4 : 02C21021 ADDU 800e4af0 (v0), 00000000 (s6), 800e4af0 (v0), +800517d8 : 97B00020 LHU a000b870 (s0), 0020 (801fff80 (sp)) [801fffa0] + + + +800517dc : 90630001 LBU 800e4c24 (v1), 0001 (800e4c24 (v1)) [800e4c25] +800517e0 : 00491021 ADDU 800e4af0 (v0), 800e4af0 (v0), 00000000 (t1), +800517e4 : A0430000 SB 00000031 (v1), 0000 (800e4af0 (v0)) [800e4af0] + +800517e8 : 90430000 LBU 00000031 (v1), 0000 (800e4af0 (v0)) [800e4af0] +800517ec : 34020012 ORI 800e4af0 (v0), 00000000 (r0), 0012 (18), +800517f0 : 1062000F BEQ 00000031 (v1), 00000012 (v0), 80051830, +800517f4 : 00004021 ADDU 50000000 (t0), 00000000 (r0), 00000000 (r0), +800517f8 : 28620013 SLTI 00000012 (v0), 00000031 (v1), 0013 (19), +800517fc : 10400005 BEQ 00000000 (v0), 00000000 (r0), 80051814, +80051800 : 00000000 NOP + +; justifier ID +80051814 : 34020031 ORI 00000000 (v0), 00000000 (r0), 0031 (49), + +80051818 : 10620152 BEQ 00000031 (v1), 00000031 (v0), 80051d64, +8005181c : 34020041 ORI 00000031 (v0), 00000000 (r0), 0041 (65), +=====> + +player 1 +e4c25 = id +e4c26-27 = buttons + + +player 2 +e4c47 = id + + + +; don't remap here - shared code (!!!) +80051d64 : 3C01800D LUI 800e4c24 (at), 800d (32781), +80051d68 : 24210026 ADDIU 800d0000 (at), 800d0000 (at), 0026 (38), +80051d6c : 00350821 ADDU 800d0026 (at), 800d0026 (at), 000005e8 (s5), + +; don't draw cursor +80051d70 : A0200000 SB 00000000 (r0), 0000 (800d060e (at)) [800d060e] + + + + + +80051d74 : 3C04800E LUI 000000ff (a0), 800e (32782), +80051d78 : 248449F0 ADDIU 800e0000 (a0), 800e0000 (a0), 49f0 (18928), +80051d7c : 3C03800E LUI 00000031 (v1), 800e (32782), +80051d80 : 24634A44 ADDIU 800e0000 (v1), 800e0000 (v1), 4a44 (19012), +80051d84 : 03C31821 ADDU 800e4a44 (v1), 00000000 (fp), 800e4a44 (v1), +80051d88 : 94620000 LHU 00000041 (v0), 0000 (800e4a44 (v1)) [800e4a44] +80051d8c : 03C42021 ADDU 800e49f0 (a0), 00000000 (fp), 800e49f0 (a0), +80051d90 : A4820000 SH 00000000 (v0), 0000 (800e49f0 (a0)) [800e49f0] +80051d94 : A4700000 SH 00000000 (s0), 0000 (800e4a44 (v1)) [800e4a44] +80051d98 : 94820000 LHU 00000000 (v0), 0000 (800e49f0 (a0)) [800e49f0] +80051d9c : 00000000 NOP +80051da0 : 00021027 NOR 00000000 (v0), 00000000 (r0), 00000000 (v0), +80051da4 : 00501024 AND ffffffff (v0), ffffffff (v0), 00000000 (s0), +80051da8 : 3C01800E LUI 800d060e (at), 800e (32782), +80051dac : 242149FC ADDIU 800e0000 (at), 800e0000 (at), 49fc (18940), +80051db0 : 003E0821 ADDU 800e49fc (at), 800e49fc (at), 00000000 (fp), +80051db4 : A4220000 SH 00000000 (v0), 0000 (800e49fc (at)) [800e49fc] +80051db8 : 94620000 LHU 00000000 (v0), 0000 (800e4a44 (v1)) [800e4a44] +80051dbc : 94830000 LHU 800e4a44 (v1), 0000 (800e49f0 (a0)) [800e49f0] +80051dc0 : 00021027 NOR 00000000 (v0), 00000000 (r0), 00000000 (v0), + + + + + + + +; justifier latch (p1 then p2) + +800511b4 : 90220000 LBU 00000000 (v0), 0000 (80022160 (at)) [80022160] +800511b8 : 00000000 NOP + +===> set latch to 0 add +800511bc : 24420001 ADDIU 000000cf (v0), 000000cf (v0), 0001 (1), + +800511c0 : 3C018002 LUI 80022160 (at), 8002 (32770), +800511c4 : 24212160 ADDIU 80020000 (at), 80020000 (at), 2160 (8544), +800511c8 : 00280821 ADDU 80022160 (at), 80022160 (at), 00000000 (t0), +800511cc : A0220000 SB 000000d0 (v0), 0000 (80022160 (at)) [80022160] + + + +8005de10 : 3C018002 LUI 800d0000 (at), 8002 (32770), +8005de14 : 24212160 ADDIU 80020000 (at), 80020000 (at), 2160 (8544), +8005de18 : 00300821 ADDU 80022160 (at), 80022160 (at), 00000000 (s0), + +===> remove latch reset +8005de1c : A0200000 SB 00000000 (r0), 0000 (80022160 (at)) [80022160] + + + + + + + +; ......triggers something with stage select +8005e354 : 92230014 LBU 00000062 (v1), 0014 (800fc170 (s1)) [800fc184] +8005e358 : 34020001 ORI 00610000 (v0), 00000000 (r0), 0001 (1), +8005e35c : 1062003B BEQ 00000002 (v1), 00000001 (v0), 8005e44c, +8005e360 : 28620002 SLTI 00000001 (v0), 00000002 (v1), 0002 (2), +8005e364 : 10400005 BEQ 00000000 (v0), 00000000 (r0), 8005e37c, +8005e368 : 00000000 NOP +8005e37c : 34020002 ORI 00000000 (v0), 00000000 (r0), 0002 (2), +8005e380 : 1062003B BEQ 00000002 (v1), 00000002 (v0), 8005e470, +8005e384 : 34080003 ORI 00000505 (t0), 00000000 (r0), 0003 (3), +8005e470 : A2E00000 SB 00000000 (r0), 0000 (800fc184 (s7)) [800fc184] +8005e474 : 8FA80038 LW 00000003 (t0), 0038 (801fff78 (sp)) [801fffb0] +8005e478 : 00000000 NOP + + + +8005e47c : 3C018002 LUI 8002218c (at), 8002 (32770), +8005e480 : 24211C5B ADDIU 80020000 (at), 80020000 (at), 1c5b (7259), +8005e484 : 00280821 ADDU 80021c5b (at), 80021c5b (at), 00000505 (t0), + + +; check onscreen shot (latch value = 0) +; - 22160 = p1 +; - 22161 = p2 +8005e488 : 90220000 LBU 00000002 (v0), 0000 (80022160 (at)) [80022160] +8005e48c : 00000000 NOP +8005e490 : 10400016 BEQ 000000d7 (v0), 00000000 (r0), 8005e4ec, +8005e494 : 00000000 NOP + +====> + +; onscreen shot (1)? always fc185 +8005e4ec : 92220015 LBU 00000000 (v0), 0015 (800fc170 (s1)) [800fc185] +8005e4f0 : 00000000 NOP +8005e4f4 : 14400006 BNE 00000006 (v0), 00000000 (r0), 8005e510, + +====> force guncon ID here +8005e4f8 : 34020031 ORI 00000006 (v0), 00000000 (r0), 0031 (49), +(..) + +8005e510 : 8FA80040 LW 00000505 (t0), 0040 (801fff78 (sp)) [801fffb8] +8005e514 : 00000000 NOP +8005e518 : 3C01800E LUI 80022160 (at), 800e (32782), +8005e51c : 24214C25 ADDIU 800e0000 (at), 800e0000 (at), 4c25 (19493), +8005e520 : 00280821 ADDU 800e4c25 (at), 800e4c25 (at), 00000000 (t0), + +; justifier check +8005e524 : 90230000 LBU 00000002 (v1), 0000 (800e4c25 (at)) [800e4c25] +8005e528 : 00000000 NOP +8005e52c : 14620023 BNE 00000012 (v1), 00000031 (v0), 8005e5bc, +8005e530 : 00000000 NOP + + + + + +[800e4c08] = p1 x (justifier) [a0] +[800e4c0c] = p2 x (justifier) [a0] +[800e4c10] = p1 y (justifier) [78] +[800e4c14] = p2 y (justifier) [78] + +8005e534 : 3C02800E LUI 00000031 (v0), 800e (32782), +8005e538 : 24424C08 ADDIU 800e0000 (v0), 800e0000 (v0), 4c08 (19464), +8005e53c : 02A21021 ADDU 800e4c08 (v0), 00000000 (s5), 800e4c08 (v0), +8005e540 : 8C420000 LW 800e4c08 (v0), 0000 (800e4c08 (v0)) [800e4c08] +8005e544 : 3C01800E LUI 800e4c25 (at), 800e (32782), +8005e548 : 24214AE0 ADDIU 800e0000 (at), 800e0000 (at), 4ae0 (19168), +8005e54c : 00350821 ADDU 800e4ae0 (at), 800e4ae0 (at), 00000000 (s5), +8005e550 : 8C230000 LW 00000031 (v1), 0000 (800e4ae0 (at)) [800e4ae0] +8005e554 : 3C048002 LUI 00000000 (a0), 8002 (32770), +8005e558 : 84840890 LH 80020000 (a0), 0890 (80020000 (a0)) [80020890] +8005e55c : 00431023 SUBU 00000000 (v0), 00000000 (v0), 000000a0 (v1), +8005e560 : 00441023 SUBU ffffff60 (v0), ffffff60 (v0), 00000000 (a0), +8005e564 : 3C018010 LUI 800e4ae0 (at), 8010 (32784), +8005e568 : 2421C284 ADDIU 80100000 (at), 80100000 (at), c284 (49796), +8005e56c : 00350821 ADDU 800fc284 (at), 800fc284 (at), 00000000 (s5), +8005e570 : AC220000 SW ffffff60 (v0), 0000 (800fc284 (at)) [800fc284] +8005e574 : 3C02800E LUI ffffff60 (v0), 800e (32782), +8005e578 : 24424C10 ADDIU 800e0000 (v0), 800e0000 (v0), 4c10 (19472), +8005e57c : 02A21021 ADDU 800e4c10 (v0), 00000000 (s5), 800e4c10 (v0), +8005e580 : 8C420000 LW 800e4c10 (v0), 0000 (800e4c10 (v0)) [800e4c10] +8005e584 : 3C01800E LUI 800fc284 (at), 800e (32782), +8005e588 : 24214AE8 ADDIU 800e0000 (at), 800e0000 (at), 4ae8 (19176), +8005e58c : 00350821 ADDU 800e4ae8 (at), 800e4ae8 (at), 00000000 (s5), +8005e590 : 8C230000 LW 000000a0 (v1), 0000 (800e4ae8 (at)) [800e4ae8] +8005e594 : 3C048002 LUI 00000000 (a0), 8002 (32770), +8005e598 : 84840892 LH 80020000 (a0), 0892 (80020000 (a0)) [80020892] +8005e59c : 00431023 SUBU 00000000 (v0), 00000000 (v0), 00000078 (v1), +8005e5a0 : 00441023 SUBU ffffff88 (v0), ffffff88 (v0), 00000014 (a0), +8005e5a4 : 3C018010 LUI 800e4ae8 (at), 8010 (32784), +8005e5a8 : 2421C290 ADDIU 80100000 (at), 80100000 (at), c290 (49808), +8005e5ac : 00350821 ADDU 800fc290 (at), 800fc290 (at), 00000000 (s5), +8005e5b0 : AC220000 SW ffffff74 (v0), 0000 (800fc290 (at)) [800fc290] +8005e5b4 : 0801797F J 8005e5fc, +8005e5b8 : 00000000 NOP diff --git a/ps1 - guncon conversions/Crypt Killer/src/notes/crypt killer - guncon menus.txt b/ps1 - guncon conversions/Crypt Killer/src/notes/crypt killer - guncon menus.txt new file mode 100644 index 0000000000..6288b2f3d2 --- /dev/null +++ b/ps1 - guncon conversions/Crypt Killer/src/notes/crypt killer - guncon menus.txt @@ -0,0 +1,152 @@ +800744bc : 3C01800E LUI 800c0000 (at), 800e (32782), +800744c0 : 24214C25 ADDIU 800e0000 (at), 800e0000 (at), 4c25 (19493), +800744c4 : 00330821 ADDU 800e4c25 (at), 800e4c25 (at), 00000000 (s3), +800744c8 : 90230000 LBU 00000340 (v1), 0000 (800e4c25 (at)) [800e4c25] + +===> replace justifier ID +800744cc : 34020031 ORI 0000033f (v0), 00000000 (r0), 0031 (49), +800744d0 : 10620018 BEQ 00000063 (v1), 00000031 (v0), 80074534, + +800744d4 : 28620032 SLTI 00000031 (v0), 00000063 (v1), 0032 (50), +800744d8 : 10400005 BEQ 00000000 (v0), 00000000 (r0), 800744f0, +800744dc : 34020012 ORI 00000000 (v0), 00000000 (r0), 0012 (18), + + +===> remap guncon data around here +; check button state +80074534 : 02002021 ADDU 00000002 (a0), 00000000 (s0), 00000000 (r0), +80074538 : 34050800 ORI 8004495c (a1), 00000000 (r0), 0800 (2048), + +8007453c : 34060003 ORI 00000001 (a2), 00000000 (r0), 0003 (3), +80074540 : 0C0147F6 JAL 80051fd8, 8007423c (ra), +80074544 : 00003821 ADDU 00000000 (a3), 00000000 (r0), 00000000 (r0), +80074548 : 14400009 BNE 00000000 (v0), 00000000 (r0), 80074570, +8007454c : 02002021 ADDU 00000000 (a0), 00000000 (s0), 00000000 (r0), +80074550 : 0801D166 J 80074598, +80074554 : 34050080 ORI 00000800 (a1), 00000000 (r0), 0080 (128), + + + + + + + + + + +options menu +80074dec : 92C30000 LBU 00000002 (v1), 0000 (800e4c25 (s6)) [800e4c25] + +====> change justifier ID +80074df0 : 34020031 ORI 80074dbc (v0), 00000000 (r0), 0031 (49), + +80074df4 : 10620056 BEQ 00000063 (v1), 00000031 (v0), 80074f50, +80074df8 : 28620032 SLTI 00000031 (v0), 00000063 (v1), 0032 (50), +80074dfc : 10400005 BEQ 00000000 (v0), 00000000 (r0), 80074e14, +80074e00 : 34020012 ORI 00000000 (v0), 00000000 (r0), 0012 (18), + + + + +8007560c : 92C30000 LBU 00000008 (v1), 0000 (800e4c25 (s6)) [800e4c25] + +=====> justifier ID (calibration) +80075610 : 34020031 ORI 8007560c (v0), 00000000 (r0), 0031 (49), + +80075614 : 146200A9 BNE 00000063 (v1), 00000031 (v0), 800758bc, +80075618 : 34020020 ORI 00000031 (v0), 00000000 (r0), 0020 (32), + + + + +80075ab0 : 00009021 ADDU 00000000 (s2), 00000000 (r0), 00000000 (r0), + +===> calibration id (p1) +80075ab4 : 34110031 ORI 00000000 (s1), 00000000 (r0), 0031 (49), + +80075ab8 : 00008021 ADDU a000b870 (s0), 00000000 (r0), 00000000 (r0), +80075abc : 3C01800E LUI 80044ae8 (at), 800e (32782), +80075ac0 : 24214C25 ADDIU 800e0000 (at), 800e0000 (at), 4c25 (19493), +80075ac4 : 00300821 ADDU 800e4c25 (at), 800e4c25 (at), 00000000 (s0), +80075ac8 : 90220000 LBU 80075ab0 (v0), 0000 (800e4c25 (at)) [800e4c25] +80075acc : 00000000 NOP +80075ad0 : 1051001C BEQ 00000063 (v0), 00000031 (s1), 80075b44, +80075ad4 : 34020001 ORI 00000063 (v0), 00000000 (r0), 0001 (1), +80075ad8 : 00521023 SUBU 00000001 (v0), 00000001 (v0), 00000000 (s2), +80075adc : 00021900 SLL 00000006 (v1), 00000001 (v0), 04 (4), +80075ae0 : 00621821 ADDU 00000010 (v1), 00000010 (v1), 00000001 (v0), + + + + + + + +; stage select +80079c64 : 28A20002 SLTI 00000001 (v0), 00000000 (a1), 0002 (2), +80079c68 : 10400005 BEQ 00000001 (v0), 00000000 (r0), 80079c80, +80079c6c : 340C0002 ORI 00000040 (t4), 00000000 (r0), 0002 (2), +80079c70 : 10A00009 BEQ 00000000 (a1), 00000000 (r0), 80079c98, + +===> remap justifier ID +80079c74 : 34020031 ORI 00000001 (v0), 00000000 (r0), 0031 (49), + +80079c98 : 3C01800E LUI 800c0000 (at), 800e (32782), +80079c9c : 24214C25 ADDIU 800e0000 (at), 800e0000 (at), 4c25 (19493), +80079ca0 : 00350821 ADDU 800e4c25 (at), 800e4c25 (at), 00000000 (s5), +80079ca4 : 90230000 LBU 00000007 (v1), 0000 (800e4c25 (at)) [800e4c25] +80079ca8 : 00000000 NOP +80079cac : 1062000C BEQ 00000063 (v1), 00000031 (v0), 80079ce0, +80079cb0 : 28620032 SLTI 00000031 (v0), 00000063 (v1), 0032 (50), +80079cb4 : 10400005 BEQ 00000000 (v0), 00000000 (r0), 80079ccc, + + + + + +[800b9da0] = p1 x (justifier) [a0 --> 0] +[800b9da4] = p2 x (justifier) [a0 --> 0] +[800b9da8] = p1 y (justifier) [78 --> 0] +[800b9dac] = p2 y (justifier) [78 --> 0] + + + +; stage select - x/y cursor +80079d30 : 3C01800D LUI 800e49fc (at), 800d (32781), +80079d34 : 2421FFBC ADDIU 800d0000 (at), 800d0000 (at), ffbc (65468), +80079d38 : 00300821 ADDU 800cffbc (at), 800cffbc (at), 00000000 (s0), + +(mouse-x) +80079d3c : 8C220000 LW 00000001 (v0), 0000 (800cffbc (at)) [800cffbc] +80079d40 : 00000000 NOP +80079d44 : AE420000 SW ffffffee (v0), 0000 (800b9da0 (s2)) [800b9da0] +80079d48 : 3C01800D LUI 800cffbc (at), 800d (32781), +80079d4c : 2421FFC4 ADDIU 800d0000 (at), 800d0000 (at), ffc4 (65476), +80079d50 : 00300821 ADDU 800cffc4 (at), 800cffc4 (at), 00000000 (s0), + +(mouse-y) +80079d54 : 8C220000 LW ffffffee (v0), 0000 (800cffc4 (at)) [800cffc4] +80079d58 : 00000000 NOP +80079d5c : AE820000 SW 0000003c (v0), 0000 (800b9da8 (s4)) [800b9da8] +80079d60 : 34020003 ORI 0000003c (v0), 00000000 (r0), 0003 (3), +80079d64 : 0801E7FA J 80079fe8, +80079d68 : A2220000 SB 00000003 (v0), 0000 (800b9e2c (s1)) [800b9e2c] + + + + + +80079d94 : 90220000 LBU 00000003 (v0), 0000 (800e4d49 (at)) [800e4d49] +80079d98 : 00000000 NOP +80079d9c : 10400020 BEQ 00000000 (v0), 00000000 (r0), 80079e20, +80079da0 : 340300FF ORI 00000007 (v1), 00000000 (r0), 00ff (255), +80079e20 : 3C0C800C LUI 00000002 (t4), 800c (32780), +80079e24 : 258C9DA0 ADDIU 800c0000 (t4), 800c0000 (t4), 9da0 (40352), +80079e28 : 020C1021 ADDU 00000000 (v0), 00000000 (s0), 800b9da0 (t4), + +===> remove (interferes) +80079e2c : AC430000 SW 000000ff (v1), 0000 (800b9da0 (v0)) [800b9da0] +80079e30 : 02171021 ADDU 800b9da0 (v0), 00000000 (s0), 800b9da8 (s7), + +===> remove (interferes) +80079e34 : AC430000 SW 000000ff (v1), 0000 (800b9da8 (v0)) [800b9da8] diff --git a/ps1 - guncon conversions/Crypt Killer/src/patcher/europe/cd2dvd.bat b/ps1 - guncon conversions/Crypt Killer/src/patcher/europe/cd2dvd.bat new file mode 100644 index 0000000000..657b78b897 --- /dev/null +++ b/ps1 - guncon conversions/Crypt Killer/src/patcher/europe/cd2dvd.bat @@ -0,0 +1,5 @@ +SET FILE_1=SLES_005.42 +SET FILE_2=DATA.BIN + + +cd2dvd_patcher ___patch.txt %FILE_1% 0 diff --git a/ps1 - guncon conversions/Crypt Killer/src/patcher/europe/cd2dvd_patcher.exe b/ps1 - guncon conversions/Crypt Killer/src/patcher/europe/cd2dvd_patcher.exe new file mode 100644 index 0000000000..1252f70016 Binary files /dev/null and b/ps1 - guncon conversions/Crypt Killer/src/patcher/europe/cd2dvd_patcher.exe differ diff --git a/ps1 - guncon conversions/Crypt Killer/src/patcher/europe/patch/___.PAD b/ps1 - guncon conversions/Crypt Killer/src/patcher/europe/patch/___.PAD new file mode 100644 index 0000000000..e9784eb4c8 Binary files /dev/null and b/ps1 - guncon conversions/Crypt Killer/src/patcher/europe/patch/___.PAD differ diff --git a/ps1 - guncon conversions/Crypt Killer/src/patcher/europe/patch/___patch.txt b/ps1 - guncon conversions/Crypt Killer/src/patcher/europe/patch/___patch.txt new file mode 100644 index 0000000000..fe984e3cab --- /dev/null +++ b/ps1 - guncon conversions/Crypt Killer/src/patcher/europe/patch/___patch.txt @@ -0,0 +1,38 @@ +; ram offset (raw -> ram) +#f800 + + + +; remap guncon --> justifier data +$35ff4 +54AD010800000000 +$6b550 +2508E0030680023C67AD010C58C742340680023C67AD010CAEC7423425F82000740082930780033C030040140000000002000010B3C760A05DC760A0C406848F00000000FFD700080000000031001034010050A004005084060043840200042A0500801001000434040040A4060040A416000010080040A4050044A0A1FF102260FF1022802110000081100020800402AA02043CAAAA84341800040210800000A0001022080050A4F8FF632080FF6320001903001111043C11118434180064001018000080006320060043A402005094FFFF0434002003320200601400000000FF7F8430080003320200601400000000FFBF8430004003320200601400000000F7FF8430020044A40800E00300000000 + + + +; justifier latch reset +$5ba4c +00000000 + + + +; skip x-math +$176f8 +C75D000825100300 + + + +; skip calibration math +$1a874 +246A000825100300 +$1aa30 +936A000825100300 + + + +; default calibration markers (y-axis) +$6b934 +8000 +$6b936 +8000 diff --git a/ps1 - guncon conversions/Crypt Killer/src/patcher/usa/cd2dvd.bat b/ps1 - guncon conversions/Crypt Killer/src/patcher/usa/cd2dvd.bat new file mode 100644 index 0000000000..87304b30a7 --- /dev/null +++ b/ps1 - guncon conversions/Crypt Killer/src/patcher/usa/cd2dvd.bat @@ -0,0 +1,5 @@ +SET FILE_1=SLUS_003.35 +SET FILE_2=DATA.BIN + + +cd2dvd_patcher ___patch.txt %FILE_1% 0 diff --git a/ps1 - guncon conversions/Crypt Killer/src/patcher/usa/cd2dvd_patcher.exe b/ps1 - guncon conversions/Crypt Killer/src/patcher/usa/cd2dvd_patcher.exe new file mode 100644 index 0000000000..1252f70016 Binary files /dev/null and b/ps1 - guncon conversions/Crypt Killer/src/patcher/usa/cd2dvd_patcher.exe differ diff --git a/ps1 - guncon conversions/Crypt Killer/src/patcher/usa/patch/___.PAD b/ps1 - guncon conversions/Crypt Killer/src/patcher/usa/patch/___.PAD new file mode 100644 index 0000000000..e9784eb4c8 Binary files /dev/null and b/ps1 - guncon conversions/Crypt Killer/src/patcher/usa/patch/___.PAD differ diff --git a/ps1 - guncon conversions/Crypt Killer/src/patcher/usa/patch/___patch.txt b/ps1 - guncon conversions/Crypt Killer/src/patcher/usa/patch/___patch.txt new file mode 100644 index 0000000000..d597f172a9 --- /dev/null +++ b/ps1 - guncon conversions/Crypt Killer/src/patcher/usa/patch/___patch.txt @@ -0,0 +1,54 @@ +; ram offset (raw -> ram) +#1f800 + + + +; game - remap guncon --> justifier data +$5179c +2016010800000000 +$45880 +0E80023C4816010C244C4234050041900280043C602181A0080041940E80043C06004394084C81A4104C83A4080041940C80043C0600439460FF2120A09D81AC88FF6320A89D83AC0E80023C4816010C464C4234050041900280043C612181A0080041940E80043C060043940C4C81A4144C83A4080041940C80043C0600439460FF2120A49D81AC88FF6320AC9D83AC1800A98F00000000E9450108000000000100419063001034290030140000000031000134010041A004005084060043840200012A0500201001000134050041A0060040A40F000010080040A4050040A0A1FF102260FF1022800910000081100020800102AA02013CAAAA21341800010210800000A0001022080050A4F0FF6320060043A402005094FFFF0434002003320200601400000000FF7F8430080003320200601400000000FFBF8430004003320200601400000000F7FF8430020044A40800E00300000000 + + + +; game - justifier latch reset +$5de1c +00000000 +$511bc +0000 + + + +; game - justifier ID remap +$5e4f8 +63 + + + +; main menu - justifier ID +$744cc +63 + + +; options menu - justifier ID +$74df0 +63 +$75610 +63 + + +; calibration ID +$75ab4 +63 + + +; stage select - justifier ID +$79c74 +63 + + +; stage select - latch cursor +$79e2c +00000000 +$79e34 +00000000 diff --git a/ps1 - guncon conversions/Crypt Killer/src/src/cd2dvd_patcher/cd2dvd_patcher.dsp b/ps1 - guncon conversions/Crypt Killer/src/src/cd2dvd_patcher/cd2dvd_patcher.dsp new file mode 100644 index 0000000000..8c69312541 --- /dev/null +++ b/ps1 - guncon conversions/Crypt Killer/src/src/cd2dvd_patcher/cd2dvd_patcher.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="cd2dvd_patcher" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=cd2dvd_patcher - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "cd2dvd_patcher.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "cd2dvd_patcher.mak" CFG="cd2dvd_patcher - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "cd2dvd_patcher - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "cd2dvd_patcher - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "cd2dvd_patcher - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"cd2dvd_patcher.exe" + +!ELSEIF "$(CFG)" == "cd2dvd_patcher - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"cd2dvd_patcher.exe" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "cd2dvd_patcher - Win32 Release" +# Name "cd2dvd_patcher - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\patcher.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/ps1 - guncon conversions/Crypt Killer/src/src/cd2dvd_patcher/cd2dvd_patcher.dsw b/ps1 - guncon conversions/Crypt Killer/src/src/cd2dvd_patcher/cd2dvd_patcher.dsw new file mode 100644 index 0000000000..1513cd6c5a --- /dev/null +++ b/ps1 - guncon conversions/Crypt Killer/src/src/cd2dvd_patcher/cd2dvd_patcher.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "cd2dvd_patcher"=".\cd2dvd_patcher.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/ps1 - guncon conversions/Crypt Killer/src/src/cd2dvd_patcher/patcher.cpp b/ps1 - guncon conversions/Crypt Killer/src/src/cd2dvd_patcher/patcher.cpp new file mode 100644 index 0000000000..05ef215011 --- /dev/null +++ b/ps1 - guncon conversions/Crypt Killer/src/src/cd2dvd_patcher/patcher.cpp @@ -0,0 +1,229 @@ +#include +#include + +FILE *fp; +char file_name[4096]; + +unsigned char image[0x100000 * 16]; +int image_size; + +unsigned char patch_src[512][4096]; +unsigned char patch_src_wild[512][4096]; +unsigned char patch_dst[512][4096]; +unsigned char patch_dst_wild[512][4096]; +int patch_fixed[512]; + +int patch_src_len[512]; +int patch_dst_len[512]; + +int patch_index[512]; +int patch_count; + +int lcv; +int ram_offset; + +int main( int argc, char** argv ) +{ + memset( patch_fixed, -1, sizeof(patch_fixed) ); + + + sprintf( file_name, "patch//%s", argv[1] ); + fp = fopen( file_name, "r" ); + if( !fp ) return -1; + + while( !feof(fp) ) + { + fgets( file_name, 4096, fp ); + lcv=0; + + if( file_name[0] == 0x0d || file_name[0] == 0x0a ) + continue; + + + if( file_name[0] == ';' ) + continue; + + + // get code + while( file_name[lcv] != 0x0a && file_name[lcv] != 0x0d ) + { + int value; + + value = 0; + + + if( file_name[0] == '#' ) + { + sscanf( file_name+1, "%X", &ram_offset ); + break; + } + + + if( file_name[0] == '$' ) + { + sscanf( file_name+1, "%X", &value ); + value -= ram_offset; + + patch_fixed[patch_count] = value; + + break; + } + + + if( file_name[lcv+0] == '*' && + file_name[lcv+1] == '*' ) + { + patch_src_wild[patch_count][lcv/2] = 1; + } + else + { + sscanf( file_name+lcv, "%02X", &value ); + + patch_src[patch_count][lcv/2] = value; + } + + patch_src_len[patch_count]++; + lcv += 2; + } + + + fgets( file_name, 4096, fp ); + lcv=0; + + while( file_name[lcv] != 0x0a && file_name[lcv] != 0x0d ) + { + int value; + + value = 0; + if( file_name[lcv+0] == '*' && + file_name[lcv+1] == '*' ) + { + patch_dst_wild[patch_count][lcv/2] = 1; + } + else + { + sscanf( file_name+lcv, "%02X", &value ); + + patch_dst[patch_count][lcv/2] = value; + } + + patch_dst_len[patch_count]++; + lcv += 2; + } + + patch_count++; + } + + fclose( fp ); + + + + sprintf( file_name, "%s", argv[2] ); + fp = fopen( file_name, "rb" ); + if( !fp ) return -1; + + if( argc==4 ) + { + int seeker; + + sscanf( argv[3], "%X", &seeker ); + fseek( fp, seeker, SEEK_SET ); + } + image_size = fread( image, 1, 0x100000 * 16, fp ); + + fclose( fp ); + + + + int patches; + + patches = patch_count; + for( lcv=0; lcv= 0x22853 ) + //lcv2 += 0; + + int idx; + + idx = 0; + lcv = start_lcv; + + for( int lcv3=0; lcv3 (USA 1.1 - Greatest Hits) http://redump.org/disc/2011/ +> (Europe) http://redump.org/disc/894/ + + +Converts justifiers to dual guncon + + + +Instructions: +1. Rip game cd to bin/cue or ccd/img format +2. Run bin/ppf-o-matic3 +3. Drag-drop bin or img file +4. Drag-drop bin/ppf file +5. Hit patch + + + +Uninstall: +1. Run bin/ppf-o-matic3 +2. Click 'undo patch' +3. Drag-drop bin or img file +4. Drag-drop bin/ppf file +5. Hit patch + + + +NOTE: +- Hold Trigger + Aux = fire rockets diff --git a/ps1 - guncon conversions/Die Hard Trilogy/src/code/europe/pad-guncon-1.txt b/ps1 - guncon conversions/Die Hard Trilogy/src/code/europe/pad-guncon-1.txt new file mode 100644 index 0000000000..e05b184424 --- /dev/null +++ b/ps1 - guncon conversions/Die Hard Trilogy/src/code/europe/pad-guncon-1.txt @@ -0,0 +1,169 @@ +; 89a40-89ee0 = remap buttons, id, cursor data + + + +org $800756b0 + +j $80089a40 +nop + + + +; get player address +lui v1,$8001 +ori v1,v1,$2f00 + +; ================================ +; ================================ +; ================================ + +; v1,a1,a3,t0,t8 +; - v1 = guncon data +; - t8 = temp +; - a1 = guncon x +; - a3 = guncon y + +; remap guncon ID to justifier +ori t8,r0,$31 +sb t8,1(v1) + + + +; force cursor data (guncon x-y) +lh a1,4(v1) +lh a3,6(v1) +;nop + + + + +; set valid latch data (1,10 = guncon offscreen normally) +slti t8,a1,2 +beq t8,r0,REMAP_XY +ori t8,r0,1 + + +; offscreen shot - force (0,0) +sh r0,4(v1) +sh r0,6(v1) +beq r0,r0,REMAP_GUNCON_BUTTONS +sh r0,8(v1) + + + + +REMAP_XY: + +; signal on-screen shot +sb t8,5(v1) + + +; x-axis + +; 255 guncon (pSX rough center) --> 256 justifier --> 0 center +addi a1,a1,$0001 +addi a1,a1,$ff00 + +; note: 512x240 screen + +; adjustment range (pSX 384 --> 512) +; - 128 / 96 (384 * 128 / 512) +sll a1,a1,7 + +lui t8,0x02aa +ori t8,0xaaaa +mult a1,t8 +mfhi a1 + +; 0 center --> 256 justifier +addi a1,a1,$100 + +sh a1,8(v1) + + + +; y-axis + +; 135 guncon (pSX rough center) --> 128 justifier --> 0 center +addi a3,a3,$ffed +addi a3,a3,$ff80 + +; adjustment range (pSX 240 --> 256 pal range) +; - 256 / 240 = 16/15 +sll a3,a3,4 + +lui t8,0x1111 +ori t8,0x1111 +mult a3,t8 +mfhi a3 + +; 0 center --> 128+12 justifier +addi a3,a3,$8c + +sh a3,6(v1) + + + + +REMAP_GUNCON_BUTTONS: + +; remap guncon --> justifier buttons + +; $2000 = trigger --> $8000 = trigger +; $0008 = A --> $4000 = auxiliary +; $4000 = B --> $0008 = start + +lhu a1,2(v1) +ori a3,r0,$ffff + + + +; check trigger (low-assert) +andi t8,a1,$2000 +bne t8,r0,REMAP_A +nop + +; set $8000 bit +andi a3,a3,$7fff + + + +REMAP_A: +; check aux +andi t8,a1,$0008 +bne t8,r0,REMAP_B +nop + +; set $4000 bit +andi a3,a3,$bfff + + + + +REMAP_B: +; check start +andi t8,a1,$4000 +bne t8,r0,REMAP_BUTTONS +nop + +; lower $0008 bit +andi a3,a3,$fff7 + + + +REMAP_BUTTONS: +sh a3,2(v1) + +; ================================ +; ================================ +; ================================ + +DONE: + +; OLD code +lui v1,$800c +lh v1,$9ca8(v1) +ori v0,r0,3 + +j $800756bc +nop diff --git a/ps1 - guncon conversions/Die Hard Trilogy/src/code/europe/pad-guncon-2.txt b/ps1 - guncon conversions/Die Hard Trilogy/src/code/europe/pad-guncon-2.txt new file mode 100644 index 0000000000..821cea90e0 --- /dev/null +++ b/ps1 - guncon conversions/Die Hard Trilogy/src/code/europe/pad-guncon-2.txt @@ -0,0 +1,96 @@ +; - 42a40-42e40 = remap buttons, id, cursor data + + + +org $80033384 + +j $80042a40 +nop + + + +; get player address +lui v1,$8001 +ori v1,v1,$2f00 + +; ================================ +; ================================ +; ================================ + +; v1,v0,at,ra +; - v1 = guncon data +; - ra = temp + +; remap guncon ID to justifier +ori a1,r0,$31 +sb a1,1(v1) + + + +; force cursor data (guncon x-y) +lh a1,4(v1) +lh a3,6(v1) +;nop + + + +; remap guncon --> justifier buttons + +; $2000 = trigger --> $8000 = trigger +; $0008 = A --> $4000 = auxiliary +; $4000 = B --> $0008 = start + +lhu v0,2(v1) +ori at,r0,$ffff + + + +; check trigger (low-assert) +andi ra,v0,$2000 +bne ra,r0,REMAP_A +nop + +; set $8000 bit +andi at,at,$7fff + + + +REMAP_A: +; check aux +andi ra,v0,$0008 +bne ra,r0,REMAP_B +nop + +; set $4000 bit +andi at,at,$bfff + + + + +REMAP_B: +; check start +andi ra,v0,$4000 +bne ra,r0,REMAP_BUTTONS +nop + +; lower $0008 bit +andi at,at,$fff7 + + + +REMAP_BUTTONS: +sh at,2(v1) + +; ================================ +; ================================ +; ================================ + +DONE: + +; OLD code +lui v1,$8005 +lh v1,$57d8(v1) +ori v0,r0,3 + +j $80033390 +nop diff --git a/ps1 - guncon conversions/Die Hard Trilogy/src/code/usa - gh/asm - die hard trilogy.bat b/ps1 - guncon conversions/Die Hard Trilogy/src/code/usa - gh/asm - die hard trilogy.bat new file mode 100644 index 0000000000..5b8c8dc1f7 --- /dev/null +++ b/ps1 - guncon conversions/Die Hard Trilogy/src/code/usa - gh/asm - die hard trilogy.bat @@ -0,0 +1,6 @@ +del *.bin + +spasm -b pad-guncon-1.txt pad-guncon-1.bin +spasm -b pad-guncon-2.txt pad-guncon-2.bin + +pause diff --git a/ps1 - guncon conversions/Die Hard Trilogy/src/code/usa - gh/pad-guncon-1.txt b/ps1 - guncon conversions/Die Hard Trilogy/src/code/usa - gh/pad-guncon-1.txt new file mode 100644 index 0000000000..7fbb33af08 --- /dev/null +++ b/ps1 - guncon conversions/Die Hard Trilogy/src/code/usa - gh/pad-guncon-1.txt @@ -0,0 +1,164 @@ +; 88bf0-88e20 + 88e40-892f0 + 89380-89420 + +; - 88e40-88fxx = remap buttons, id, cursor data + + + +org $80074e90 + +j $80088e40 +nop + + + +; get player address +lui v1,$8001 +ori v1,v1,$2f00 + +; ================================ +; ================================ +; ================================ + +; v1,a1,a3,t0,t8 +; - v1 = guncon data +; - t8 = temp +; - a1 = guncon x +; - a3 = guncon y + +; remap guncon ID to justifier +ori t8,r0,$31 +sb t8,1(v1) + + + +; force cursor data (guncon x-y) +lh a1,4(v1) +lh a3,6(v1) +;nop + + + + +; set valid latch data (1,10 = guncon offscreen normally) +slti t8,a1,2 +beq t8,r0,REMAP_XY +ori t8,r0,1 + + +; offscreen shot - force (0,0) +sh r0,4(v1) +sh r0,6(v1) +beq r0,r0,REMAP_GUNCON_BUTTONS +sh r0,8(v1) + + + + +REMAP_XY: + +; signal on-screen shot +sb t8,5(v1) + + +; x-axis + +; 255 guncon (pSX rough center) --> 256 justifier --> 0 center +addi a1,a1,$0001 +addi a1,a1,$ff00 + +; note: 512x240 screen + +; adjustment range (pSX 384 --> 512) +; - 128 / 96 (384 * 128 / 512) +sll a1,a1,7 + +lui t8,0x02aa +ori t8,0xaaaa +mult a1,t8 +mfhi a1 + +; 0 center --> 256 justifier +addi a1,a1,$100 + +sh a1,8(v1) + + + +; y-axis + +; 135 guncon (pSX rough center) --> 116 justifier --> 0 center +addi a3,a3,$ffed +;addi a3,a3,$ff8c + +; no adjustment range (pSX 240 --> 240 range) + +; 0 center --> 116 justifier +;addi a3,a3,$74 + +sh a3,6(v1) + + + + +REMAP_GUNCON_BUTTONS: + +; remap guncon --> justifier buttons + +; $2000 = trigger --> $8000 = trigger +; $0008 = A --> $4000 = auxiliary +; $4000 = B --> $0008 = start + +lhu a1,2(v1) +ori a3,r0,$ffff + + + +; check trigger (low-assert) +andi t8,a1,$2000 +bne t8,r0,REMAP_A +nop + +; set $8000 bit +andi a3,a3,$7fff + + + +REMAP_A: +; check aux +andi t8,a1,$0008 +bne t8,r0,REMAP_B +nop + +; set $4000 bit +andi a3,a3,$bfff + + + + +REMAP_B: +; check start +andi t8,a1,$4000 +bne t8,r0,REMAP_BUTTONS +nop + +; lower $0008 bit +andi a3,a3,$fff7 + + + +REMAP_BUTTONS: +sh a3,2(v1) + +; ================================ +; ================================ +; ================================ + +DONE: + +; OLD code +lui v1,$800b +lh v1,$73a0(v1) +ori v0,r0,3 + +j $80074e9c +nop diff --git a/ps1 - guncon conversions/Die Hard Trilogy/src/code/usa - gh/pad-guncon-2.txt b/ps1 - guncon conversions/Die Hard Trilogy/src/code/usa - gh/pad-guncon-2.txt new file mode 100644 index 0000000000..22cf321c56 --- /dev/null +++ b/ps1 - guncon conversions/Die Hard Trilogy/src/code/usa - gh/pad-guncon-2.txt @@ -0,0 +1,96 @@ +; - 426e0-42ad0 = remap buttons, id, cursor data + + + +org $800331b8 + +j $800426e0 +nop + + + +; get player address +lui v1,$8001 +ori v1,v1,$2f00 + +; ================================ +; ================================ +; ================================ + +; v1,v0,at,ra +; - v1 = guncon data +; - ra = temp + +; remap guncon ID to justifier +ori t8,r0,$31 +sb t8,1(v1) + + + +; force cursor data (guncon x-y) +lh a1,4(v1) +lh a3,6(v1) +;nop + + + +; remap guncon --> justifier buttons + +; $2000 = trigger --> $8000 = trigger +; $0008 = A --> $4000 = auxiliary +; $4000 = B --> $0008 = start + +lhu v0,2(v1) +ori at,r0,$ffff + + + +; check trigger (low-assert) +andi ra,v0,$2000 +bne ra,r0,REMAP_A +nop + +; set $8000 bit +andi at,at,$7fff + + + +REMAP_A: +; check aux +andi ra,v0,$0008 +bne ra,r0,REMAP_B +nop + +; set $4000 bit +andi at,at,$bfff + + + + +REMAP_B: +; check start +andi ra,v0,$4000 +bne ra,r0,REMAP_BUTTONS +nop + +; lower $0008 bit +andi at,at,$fff7 + + + +REMAP_BUTTONS: +sh at,2(v1) + +; ================================ +; ================================ +; ================================ + +DONE: + +; OLD code +lui v1,$8005 +lh v1,$1e88(v1) +ori v0,r0,3 + +j $800331c4 +nop diff --git a/ps1 - guncon conversions/Die Hard Trilogy/src/code/usa - gh/spasm.exe b/ps1 - guncon conversions/Die Hard Trilogy/src/code/usa - gh/spasm.exe new file mode 100644 index 0000000000..c31eff4a16 Binary files /dev/null and b/ps1 - guncon conversions/Die Hard Trilogy/src/code/usa - gh/spasm.exe differ diff --git a/ps1 - guncon conversions/Die Hard Trilogy/src/notes/die hard trilogy - europe - guncon.txt b/ps1 - guncon conversions/Die Hard Trilogy/src/notes/die hard trilogy - europe - guncon.txt new file mode 100644 index 0000000000..596822ad8d --- /dev/null +++ b/ps1 - guncon conversions/Die Hard Trilogy/src/notes/die hard trilogy - europe - guncon.txt @@ -0,0 +1,168 @@ +main menu + + + +12f01 = ID +12f02 = buttons +12f03 = buttons +12f05 = latch state + + +; remap to guncon ID +80033374 : 90C30001 LBU 04000000 (v1), 0001 (80012f80 (a2)) [80012f81] +80033378 : 34020031 ORI 800555e4 (v0), 00000000 (r0), 0031 (49), +8003337c : 14620085 BNE 00000063 (v1), 00000031 (v0), 80033594, +80033380 : 34020041 ORI 00000031 (v0), 00000000 (r0), 0041 (65), + + + +===> just remap buttons here +80033384 : 3C038005 LUI 00000031 (v1), 8005 (32773), +80033388 : 846357D8 LH 80050000 (v1), 57d8 (80050000 (v1)) [800557d8] +8003338c : 34020003 ORI 00000041 (v0), 00000000 (r0), 0003 (3), +===> +80033390 : 10620131 BEQ 00000000 (v1), 00000003 (v0), 80033858, +80033394 : 00041040 SLL 00000003 (v0), 00000000 (a0), 01 (1), +80033398 : 00542021 ADDU 00000000 (a0), 00000000 (v0), 80055410 (s4), +8003339c : 84830000 LH 00000000 (v1), 0000 (80055410 (a0)) [80055410] +800333a0 : 34020004 ORI 00000000 (v0), 00000000 (r0), 0004 (4), +800333a4 : 10620009 BEQ 00000004 (v1), 00000004 (v0), 800333cc, +800333a8 : 34020001 ORI 00000004 (v0), 00000000 (r0), 0001 (1), +800333cc : 02113821 ADDU 00000000 (a3), 00000000 (s0), 800554f8 (s1), +800333d0 : 3C058005 LUI 80054ff0 (a1), 8005 (32773), +800333d4 : 24A55538 ADDIU 80050000 (a1), 80050000 (a1), 5538 (21816), +800333d8 : 8CE20000 LW 00000001 (v0), 0000 (800554f8 (a3)) [800554f8] +800333dc : 02052821 ADDU 80055538 (a1), 00000000 (s0), 80055538 (a1), +800333e0 : 00C04021 ADDU 80055470 (t0), 80012f00 (a2), 00000000 (r0), +800333e4 : ACA20000 SW 00000000 (v0), 0000 (80055538 (a1)) [80055538] +800333e8 : 95020002 LHU 00000000 (v0), 0002 (80012f00 (t0)) [80012f02] +800333ec : 00000000 NOP +800333f0 : 00021027 NOR 0000ffff (v0), 00000000 (r0), 0000ffff (v0), +800333f4 : 3042FFFF ANDI ffff0000 (v0), ffff0000 (v0), ffff (65535), +800333f8 : ACE20000 SW 00000000 (v0), 0000 (800554f8 (a3)) [800554f8] + + + + +12f01 = ID +12f02 = buttons +12f03 = buttons +12f05 = latch state + + +; check justifier ID --> guncon ID +800756a0 : 90C30001 LBU 00000000 (v1), 0001 (80012f00 (a2)) [80012f01] +800756a4 : 34020031 ORI 800b98b0 (v0), 00000000 (r0), 0031 (49), +800756a8 : 14620085 BNE 00000031 (v1), 00000031 (v0), 800758c0, +800756ac : 34020041 ORI 00000031 (v0), 00000000 (r0), 0041 (65), + +; --> Remap buttons here +800756b0 : 3C03800C LUI 00000031 (v1), 800c (32780), +800756b4 : 84639CA8 LH 800c0000 (v1), 9ca8 (800c0000 (v1)) [800b9ca8] +800756b8 : 34020003 ORI 00000041 (v0), 00000000 (r0), 0003 (3), +800756bc : 10620131 BEQ 00000002 (v1), 00000003 (v0), 80075b84, +800756c0 : 00041040 SLL 00000003 (v0), 00000000 (a0), 01 (1), +800756c4 : 00542021 ADDU 00000000 (a0), 00000000 (v0), 800b9468 (s4), +800756c8 : 84830000 LH 00000002 (v1), 0000 (800b9468 (a0)) [800b9468] +800756cc : 34020004 ORI 00000000 (v0), 00000000 (r0), 0004 (4), +800756d0 : 10620009 BEQ 00000004 (v1), 00000004 (v0), 800756f8, +800756d4 : 34020001 ORI 00000004 (v0), 00000000 (r0), 0001 (1), +800756f8 : 02113821 ADDU 800b91c8 (a3), 00000000 (s0), 800b9660 (s1), +800756fc : 3C05800C LUI 800b9088 (a1), 800c (32780), +80075700 : 24A596C0 ADDIU 800c0000 (a1), 800c0000 (a1), 96c0 (38592), +80075704 : 8CE20000 LW 00000001 (v0), 0000 (800b9660 (a3)) [800b9660] +80075708 : 02052821 ADDU 800b96c0 (a1), 00000000 (s0), 800b96c0 (a1), +8007570c : 00C04021 ADDU 800b9538 (t0), 80012f00 (a2), 00000000 (r0), +80075710 : ACA20000 SW 00008008 (v0), 0000 (800b96c0 (a1)) [800b96c0] +80075714 : 95020002 LHU 00008008 (v0), 0002 (80012f00 (t0)) [80012f02] +80075718 : 00000000 NOP +8007571c : 00021027 NOR 0000fff7 (v0), 00000000 (r0), 0000fff7 (v0), +80075720 : 3042FFFF ANDI ffff0008 (v0), ffff0008 (v0), ffff (65535), +80075724 : ACE20000 SW 00000008 (v0), 0000 (800b9660 (a3)) [800b9660] + + + + + +; latch reset - offscreen (00) / onscreen (01+) +8001daf4 : 8CF80000 LW 00000000 (t8), 0000 (800b91c8 (a3)) [800b91c8] +8001daf8 : 10400026 BEQ 00000000 (v0), 00000000 (r0), 8001db94, +--> remove this +8001dafc : A3020000 SB 00000000 (v0), 0000 (80012f05 (t8)) [80012f05] + + + + + + + + + + +; y-center = $74 (116 --> 232) +; x-center = $100 (256 --> 512) + + +80075794 : 91050005 LBU 00000000 (a1), 0005 (80012f00 (t0)) [80012f05] +80075798 : 00003821 ADDU 800b9660 (a3), 00000000 (r0), 00000000 (r0), +8007579c : 00A01021 ADDU 00000001 (v0), 00000001 (a1), 00000000 (r0), +800757a0 : 00021400 SLL 00000001 (v0), 00000001 (v0), 10 (16), +800757a4 : 1040000C BEQ 00010000 (v0), 00000000 (r0), 800757d8, + + +; offset address = (latch mult-1) * 4 +; - $01 = 12f06 (y) / 12f08 (x) +; - $8c ~ y-center (140) +; - $400 ~ x-center (x / $672 ~ 1650) +800757a8 : 24A5FFFF ADDIU 00000001 (a1), 00000001 (a1), ffff (65535), +800757ac : 00051400 SLL 00010000 (v0), 00000000 (a1), 10 (16), +800757b0 : 00021383 SRA 00000000 (v0), 00000000 (v0), 0e (14), +800757b4 : 01021021 ADDU 00000000 (v0), 80012f00 (t0), 00000000 (v0), + +; a2 = y-axis // a3 = x-axis +800757b8 : 94440008 LHU 00008008 (a0), 0008 (80012f00 (v0)) [80012f08] +800757bc : 00A01821 ADDU 00000000 (v1), 00000000 (a1), 00000000 (r0), +800757c0 : 24A5FFFF ADDIU 00000000 (a1), 00000000 (a1), ffff (65535), + +800757c4 : 94420006 LHU 80012f00 (v0), 0006 (80012f00 (v0)) [80012f06] +800757c8 : 00031C00 SLL 00000000 (v1), 00000000 (v1), 10 (16), +800757cc : 00C43021 ADDU 00000000 (a2), 00000000 (a2), 00000135 (a0), +800757d0 : 1460FFF6 BNE 00000000 (v1), 00000000 (r0), 800757ac, +800757d4 : 00E23821 ADDU 00000000 (a3), 00000000 (a3), 00000004 (v0), + +; x-scale #1 +800757d8 : 91020005 LBU 00000004 (v0), 0005 (80012f00 (t0)) [80012f05] +800757dc : 00000000 NOP +800757e0 : 00C2001B DIVU 00000135 (a2), 00000001 (v0), +800757e4 : 14400002 BNE 00000001 (v0), 00000000 (r0), 800757f0, +800757e8 : 00000000 NOP + +; y-scale #1 +800757f0 : 00003012 MFLO 00000135 (a2), 00000135 (lo), +800757f4 : 00E2001B DIVU 00000004 (a3), 00000001 (v0), +800757f8 : 14400002 BNE 00000001 (v0), 00000000 (r0), 80075804, +800757fc : 00000000 NOP +(..) + +80075804 : 00003812 MFLO 00000004 (a3), 00000004 (lo), + +; x-scale here + y-centering (remove) +80075808 : 34020672 ORI 00000001 (v0), 00000000 (r0), 0672 (1650), +8007580c : 24C6FF74 ADDIU 00000135 (a2), 00000135 (a2), ff74 (65396), +--> remove math (sll $0) +80075810 : 00061A40 SLL 00000000 (v1), 000000a9 (a2), 09 (9), +80075814 : 0062001B DIVU 00015200 (v1), 00000672 (v0), +80075818 : 14400002 BNE 00000672 (v0), 00000000 (r0), 80075824, +8007581c : 00000000 NOP +(..) +80075824 : 00003012 MFLO 000000a9 (a2), 00000034 (lo), +80075828 : 3C02800C LUI 00000672 (v0), 800c (32780), +8007582c : 8C429C78 LW 800c0000 (v0), 9c78 (800c0000 (v0)) [800b9c78] +80075830 : 00000000 NOP +80075834 : 8442178A LH 80011000 (v0), 178a (80011000 (v0)) [8001278a] +80075838 : 00000000 NOP +8007583c : 10400003 BEQ 00000000 (v0), 00000000 (r0), 8007584c, +80075840 : 00000000 NOP + +; x-adjust (remove) +8007584c : 24E7FFCA ADDIU 00000004 (a3), 00000004 (a3), ffca (65482), diff --git a/ps1 - guncon conversions/Die Hard Trilogy/src/notes/die hard trilogy - usa gh - guncon.txt b/ps1 - guncon conversions/Die Hard Trilogy/src/notes/die hard trilogy - usa gh - guncon.txt new file mode 100644 index 0000000000..8526182e20 --- /dev/null +++ b/ps1 - guncon conversions/Die Hard Trilogy/src/notes/die hard trilogy - usa gh - guncon.txt @@ -0,0 +1,139 @@ +main menu + +; remap to guncon ID +800331a8 : 90C30001 LBU 04000000 (v1), 0001 (80012f00 (a2)) [80012f01] +800331ac : 34020031 ORI 80051c98 (v0), 00000000 (r0), 0031 (49), +800331b0 : 1462007C BNE 00000063 (v1), 00000031 (v0), 800333a4, +800331b4 : 34020041 ORI 00000031 (v0), 00000000 (r0), 0041 (65), + + +; just remap buttons here +800331b8 : 3C038005 LUI 00000031 (v1), 8005 (32773), +800331bc : 84631E88 LH 80050000 (v1), 1e88 (80050000 (v1)) [80051e88] +800331c0 : 34020003 ORI 00000041 (v0), 00000000 (r0), 0003 (3), +800331c4 : 1062012A BEQ 00000000 (v1), 00000003 (v0), 80033670, +800331c8 : 00041040 SLL 00000003 (v0), 00000000 (a0), 01 (1), +800331cc : 00542021 ADDU 00000000 (a0), 00000000 (v0), 80051ad0 (s4), +800331d0 : 84830000 LH 00000000 (v1), 0000 (80051ad0 (a0)) [80051ad0] +800331d4 : 34020004 ORI 00000000 (v0), 00000000 (r0), 0004 (4), +800331d8 : 1062000A BEQ 00000000 (v1), 00000004 (v0), 80033204, +800331dc : 34020001 ORI 00000004 (v0), 00000000 (r0), 0001 (1), +800331e0 : 3C018005 LUI 80050000 (at), 8005 (32773), +800331e4 : A4221D08 SH 00000001 (v0), 1d08 (80050000 (at)) [80051d08] +800331e8 : 34020004 ORI 00000001 (v0), 00000000 (r0), 0004 (4), +800331ec : A4820000 SH 00000004 (v0), 0000 (80051ad0 (a0)) [80051ad0] + + + + + +12f01 = ID +12f02 = buttons +12f03 = buttons +12f05 = latch state + + +; check justifier ID --> guncon ID +80074e80 : 90C30001 LBU 00000001 (v1), 0001 (80012f00 (a2)) [80012f01] +80074e84 : 34020031 ORI 800b6fb0 (v0), 00000000 (r0), 0031 (49), +80074e88 : 1462007C BNE 00000031 (v1), 00000031 (v0), 8007507c, +80074e8c : 34020041 ORI 00000031 (v0), 00000000 (r0), 0041 (65), + + +; --> Remap buttons here +80074e90 : 3C03800B LUI 00000031 (v1), 800b (32779), +80074e94 : 846373A0 LH 800b0000 (v1), 73a0 (800b0000 (v1)) [800b73a0] +80074e98 : 34020003 ORI 00000041 (v0), 00000000 (r0), 0003 (3), +80074e9c : 1062012A BEQ 00000002 (v1), 00000003 (v0), 80075348, +80074ea0 : 00041040 SLL 00000003 (v0), 00000000 (a0), 01 (1), +80074ea4 : 00542021 ADDU 00000000 (a0), 00000000 (v0), 800b6b70 (s4), +80074ea8 : 84830000 LH 00000002 (v1), 0000 (800b6b70 (a0)) [800b6b70] +80074eac : 34020004 ORI 00000000 (v0), 00000000 (r0), 0004 (4), +80074eb0 : 1062000A BEQ 00000004 (v1), 00000004 (v0), 80074edc, +80074eb4 : 34020001 ORI 00000004 (v0), 00000000 (r0), 0001 (1), +80074edc : 02113821 ADDU 800b68d0 (a3), 00000000 (s0), 800b6d60 (s1), +80074ee0 : 3C05800B LUI 800b67a0 (a1), 800b (32779), +80074ee4 : 24A56DC0 ADDIU 800b0000 (a1), 800b0000 (a1), 6dc0 (28096), +80074ee8 : 8CE20000 LW 00000001 (v0), 0000 (800b6d60 (a3)) [800b6d60] +80074eec : 02052821 ADDU 800b6dc0 (a1), 00000000 (s0), 800b6dc0 (a1), +80074ef0 : 00C04021 ADDU 800b6c40 (t0), 80012f00 (a2), 00000000 (r0), +80074ef4 : ACA20000 SW 00000000 (v0), 0000 (800b6dc0 (a1)) [800b6dc0] + + + + + + +; latch reset - offscreen (00) / onscreen (01+) +8001daf4 : 8CF80000 LW 00000000 (t8), 0000 (800b68d0 (a3)) [800b68d0] +8001daf8 : 10400026 BEQ 00000000 (v0), 00000000 (r0), 8001db94, +--> remove this +8001dafc : A3020000 SB 00000000 (v0), 0000 (80012f05 (t8)) [80012f05] + + + + +; y-center = $74 (116 --> 232) +; x-center = $100 (256 --> 512) + + + + +80074f78 : 91050005 LBU 00000000 (a1), 0005 (80012f00 (t0)) [80012f05] +80074f7c : 00003021 ADDU 00000000 (a2), 00000000 (r0), 00000000 (r0), +80074f80 : 00003821 ADDU 800b6d60 (a3), 00000000 (r0), 00000000 (r0), +80074f84 : 00A01021 ADDU 00000000 (v0), 000000ff (a1), 00000000 (r0), +80074f88 : 00021400 SLL 000000ff (v0), 000000ff (v0), 10 (16), +80074f8c : 1040000C BEQ 00ff0000 (v0), 00000000 (r0), 80074fc0, + + +; offset address = (latch mult-1) * 4 +; - $01 = 12f06 (y) / 12f08 (x) +; - $8c ~ y-center (140) +; - $400 ~ x-center (x / $672 ~ 1650) +80074f90 : 24A5FFFF ADDIU 000000ff (a1), 000000ff (a1), ffff (65535), +80074f94 : 00051400 SLL 00ff0000 (v0), 000000fe (a1), 10 (16), +80074f98 : 00021383 SRA 00fe0000 (v0), 00fe0000 (v0), 0e (14), +80074f9c : 01021021 ADDU 000003f8 (v0), 80012f00 (t0), 000003f8 (v0), + + +; a2 = y-axis // a3 = x-axis +80074fa0 : 94440008 LHU 00000000 (a0), 0008 (800132f8 (v0)) [80013300] +80074fa4 : 00A01821 ADDU 00000000 (v1), 000000fe (a1), 00000000 (r0), +80074fa8 : 24A5FFFF ADDIU 000000fe (a1), 000000fe (a1), ffff (65535), + +80074fac : 94420006 LHU 800132f8 (v0), 0006 (800132f8 (v0)) [800132fe] +80074fb0 : 00031C00 SLL 000000fe (v1), 000000fe (v1), 10 (16), +80074fb4 : 00C43021 ADDU 00000000 (a2), 00000000 (a2), 00002978 (a0), +80074fb8 : 1460FFF6 BNE 00fe0000 (v1), 00000000 (r0), 80074f94, +80074fbc : 00E23821 ADDU 00000000 (a3), 00000000 (a3), 00003430 (v0), + +; x-scale #1 +80074fc0 : 91020005 LBU 000000ef (v0), 0005 (80012f00 (t0)) [80012f05] +80074fc4 : 00000000 NOP +80074fc8 : 00C2001B DIVU 00409b73 (a2), 000000ff (v0), +80074fcc : 14400002 BNE 000000ff (v0), 00000000 (r0), 80074fd8, +80074fd0 : 00000000 NOP +80074fd8 : 00003012 MFLO 00409b73 (a2), 000040dc (lo), + +; y-scale #1 +80074fdc : 00E2001B DIVU 0033019a (a3), 000000ff (v0), +80074fe0 : 14400002 BNE 000000ff (v0), 00000000 (r0), 80074fec, +80074fe4 : 00000000 NOP +(..) +80074fec : 00003812 MFLO 0033019a (a3), 00003334 (lo), + +; x-scale here + y-centering (remove) +80074ff0 : 34020672 ORI 000000ff (v0), 00000000 (r0), 0672 (1650), +80074ff4 : 24C6FF74 ADDIU 000040dc (a2), 000040dc (a2), ff74 (65396), +--> remove math (sll $0) +80074ff8 : 00061A40 SLL 00000000 (v1), 00004050 (a2), 09 (9), +80074ffc : 0062001B DIVU 0080a000 (v1), 00000672 (v0), +80075000 : 14400002 BNE 00000672 (v0), 00000000 (r0), 8007500c, +80075004 : 00000000 NOP +(..) +8007500c : 00003012 MFLO 00004050 (a2), 000013f4 (lo), +(..) + +; x-adjust (remove) +80075030 : 24E7FFF0 ADDIU 000000e0 (a3), 000000e0 (a3), fff0 (65520), diff --git a/ps1 - guncon conversions/Die Hard Trilogy/src/patcher/europe/cd2dvd.bat b/ps1 - guncon conversions/Die Hard Trilogy/src/patcher/europe/cd2dvd.bat new file mode 100644 index 0000000000..8ecb219c49 --- /dev/null +++ b/ps1 - guncon conversions/Die Hard Trilogy/src/patcher/europe/cd2dvd.bat @@ -0,0 +1,6 @@ +SET FILE_1=DH2.EXE +SET FILE_2=LOADER.EXE + + +cd2dvd_patcher ___patch_dh2.txt %FILE_1% 0 +cd2dvd_patcher ___patch_loader.txt %FILE_2% 0 diff --git a/ps1 - guncon conversions/Die Hard Trilogy/src/patcher/europe/cd2dvd_patcher.exe b/ps1 - guncon conversions/Die Hard Trilogy/src/patcher/europe/cd2dvd_patcher.exe new file mode 100644 index 0000000000..1252f70016 Binary files /dev/null and b/ps1 - guncon conversions/Die Hard Trilogy/src/patcher/europe/cd2dvd_patcher.exe differ diff --git a/ps1 - guncon conversions/Die Hard Trilogy/src/patcher/europe/patch/___.PAD b/ps1 - guncon conversions/Die Hard Trilogy/src/patcher/europe/patch/___.PAD new file mode 100644 index 0000000000..e9784eb4c8 Binary files /dev/null and b/ps1 - guncon conversions/Die Hard Trilogy/src/patcher/europe/patch/___.PAD differ diff --git a/ps1 - guncon conversions/Die Hard Trilogy/src/patcher/europe/patch/___patch_dh2.txt b/ps1 - guncon conversions/Die Hard Trilogy/src/patcher/europe/patch/___patch_dh2.txt new file mode 100644 index 0000000000..e3023cbbb7 --- /dev/null +++ b/ps1 - guncon conversions/Die Hard Trilogy/src/patcher/europe/patch/___patch_dh2.txt @@ -0,0 +1,33 @@ +; ram offset (raw -> ram) +#1CD00 + + +; remap guncon --> justifier data +$756b0 +9026020800000000 +$89a40 +0180033C002F633431001834010078A004006584060067840200B8280500001301001834040060A4060060A414000010080060A4050078A00100A52000FFA520C0290500AA02183CAAAA18371800B800102800000001A520080065A4EDFFE72080FFE720003907001111183C111118371800F800103800008C00E720060067A402006594FFFF07340020B8300200001700000000FF7FE7300800B8300200001700000000FFBFE7300040B8300200001700000000F7FFE730020067A40C80033CA89C638403000234AFD5010800000000 + + + +; remove latch reset +$1dafc +00000000 + + + +; remap justifier ID +$756a4 +63 + + + +; remove justifier math +$75808 +0100 +$7580c +0000 +$75810 +00180600 +$7584c +0000 diff --git a/ps1 - guncon conversions/Die Hard Trilogy/src/patcher/europe/patch/___patch_loader.txt b/ps1 - guncon conversions/Die Hard Trilogy/src/patcher/europe/patch/___patch_loader.txt new file mode 100644 index 0000000000..8b7d0b904c --- /dev/null +++ b/ps1 - guncon conversions/Die Hard Trilogy/src/patcher/europe/patch/___patch_loader.txt @@ -0,0 +1,17 @@ +; ram offset (raw -> ram) +; - 16674 --> 33374 +#1cd00 + + + +; remap justifier ID +$33378 +63 + + + +; remap guncon -> justifier data +$33384 +900A010800000000 +$42a40 +0180033C002F633431000534010065A0040065840600678402006294FFFF013400205F300200E01700000000FF7F213008005F300200E01700000000FFBF213000405F300200E01700000000F7FF2130020061A40580033CD857638403000234E4CC000800000000 diff --git a/ps1 - guncon conversions/Die Hard Trilogy/src/patcher/usa - gh/cd2dvd.bat b/ps1 - guncon conversions/Die Hard Trilogy/src/patcher/usa - gh/cd2dvd.bat new file mode 100644 index 0000000000..8ecb219c49 --- /dev/null +++ b/ps1 - guncon conversions/Die Hard Trilogy/src/patcher/usa - gh/cd2dvd.bat @@ -0,0 +1,6 @@ +SET FILE_1=DH2.EXE +SET FILE_2=LOADER.EXE + + +cd2dvd_patcher ___patch_dh2.txt %FILE_1% 0 +cd2dvd_patcher ___patch_loader.txt %FILE_2% 0 diff --git a/ps1 - guncon conversions/Die Hard Trilogy/src/patcher/usa - gh/cd2dvd_patcher.exe b/ps1 - guncon conversions/Die Hard Trilogy/src/patcher/usa - gh/cd2dvd_patcher.exe new file mode 100644 index 0000000000..1252f70016 Binary files /dev/null and b/ps1 - guncon conversions/Die Hard Trilogy/src/patcher/usa - gh/cd2dvd_patcher.exe differ diff --git a/ps1 - guncon conversions/Die Hard Trilogy/src/patcher/usa - gh/patch/___.PAD b/ps1 - guncon conversions/Die Hard Trilogy/src/patcher/usa - gh/patch/___.PAD new file mode 100644 index 0000000000..e9784eb4c8 Binary files /dev/null and b/ps1 - guncon conversions/Die Hard Trilogy/src/patcher/usa - gh/patch/___.PAD differ diff --git a/ps1 - guncon conversions/Die Hard Trilogy/src/patcher/usa - gh/patch/___patch_dh2.txt b/ps1 - guncon conversions/Die Hard Trilogy/src/patcher/usa - gh/patch/___patch_dh2.txt new file mode 100644 index 0000000000..a73ecabb8d --- /dev/null +++ b/ps1 - guncon conversions/Die Hard Trilogy/src/patcher/usa - gh/patch/___patch_dh2.txt @@ -0,0 +1,34 @@ +; ram offset (raw -> ram) +; 6c360 -> 89060 +#1CD00 + + +; remap guncon --> justifier data +$74e90 +9023020800000000 +$88e40 +0180033C002F633431001834010078A004006584060067840200B8280500001301001834040060A4060060A40D000010080060A4050078A00100A52000FFA520C0290500AA02183CAAAA18371800B800102800000001A520080065A4EDFFE720060067A402006594FFFF07340020B8300200001700000000FF7FE7300800B8300200001700000000FFBFE7300040B8300200001700000000F7FFE730020067A40B80033CA073638403000234A7D3010800000000 + + + +; remove latch reset +$1dafc +00000000 + + + +; remap justifier ID +$74e84 +63 + + + +; remove justifier math +$74ff0 +0100 +$74ff4 +0000 +$74ff8 +00180600 +$75030 +0000 diff --git a/ps1 - guncon conversions/Die Hard Trilogy/src/patcher/usa - gh/patch/___patch_loader.txt b/ps1 - guncon conversions/Die Hard Trilogy/src/patcher/usa - gh/patch/___patch_loader.txt new file mode 100644 index 0000000000..15a89b6697 --- /dev/null +++ b/ps1 - guncon conversions/Die Hard Trilogy/src/patcher/usa - gh/patch/___patch_loader.txt @@ -0,0 +1,17 @@ +; ram offset (raw -> ram) +; 164c8 -> 331c8 +#1CD00 + + + +; remap guncon --> justifier data +$331b8 +B809010800000000 +$426e0 +0180033C002F633431001834010078A0040065840600678402006294FFFF013400205F300200E01700000000FF7F213008005F300200E01700000000FFBF213000405F300200E01700000000F7FF2130020061A40580033C881E63840300023471CC000800000000 + + + +; remap justifier ID +$331ac +63 diff --git a/ps1 - guncon conversions/Die Hard Trilogy/src/src/cd2dvd_patcher/cd2dvd_patcher.dsp b/ps1 - guncon conversions/Die Hard Trilogy/src/src/cd2dvd_patcher/cd2dvd_patcher.dsp new file mode 100644 index 0000000000..8c69312541 --- /dev/null +++ b/ps1 - guncon conversions/Die Hard Trilogy/src/src/cd2dvd_patcher/cd2dvd_patcher.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="cd2dvd_patcher" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=cd2dvd_patcher - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "cd2dvd_patcher.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "cd2dvd_patcher.mak" CFG="cd2dvd_patcher - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "cd2dvd_patcher - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "cd2dvd_patcher - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "cd2dvd_patcher - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"cd2dvd_patcher.exe" + +!ELSEIF "$(CFG)" == "cd2dvd_patcher - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"cd2dvd_patcher.exe" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "cd2dvd_patcher - Win32 Release" +# Name "cd2dvd_patcher - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\patcher.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/ps1 - guncon conversions/Die Hard Trilogy/src/src/cd2dvd_patcher/cd2dvd_patcher.dsw b/ps1 - guncon conversions/Die Hard Trilogy/src/src/cd2dvd_patcher/cd2dvd_patcher.dsw new file mode 100644 index 0000000000..1513cd6c5a --- /dev/null +++ b/ps1 - guncon conversions/Die Hard Trilogy/src/src/cd2dvd_patcher/cd2dvd_patcher.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "cd2dvd_patcher"=".\cd2dvd_patcher.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/ps1 - guncon conversions/Die Hard Trilogy/src/src/cd2dvd_patcher/patcher.cpp b/ps1 - guncon conversions/Die Hard Trilogy/src/src/cd2dvd_patcher/patcher.cpp new file mode 100644 index 0000000000..05ef215011 --- /dev/null +++ b/ps1 - guncon conversions/Die Hard Trilogy/src/src/cd2dvd_patcher/patcher.cpp @@ -0,0 +1,229 @@ +#include +#include + +FILE *fp; +char file_name[4096]; + +unsigned char image[0x100000 * 16]; +int image_size; + +unsigned char patch_src[512][4096]; +unsigned char patch_src_wild[512][4096]; +unsigned char patch_dst[512][4096]; +unsigned char patch_dst_wild[512][4096]; +int patch_fixed[512]; + +int patch_src_len[512]; +int patch_dst_len[512]; + +int patch_index[512]; +int patch_count; + +int lcv; +int ram_offset; + +int main( int argc, char** argv ) +{ + memset( patch_fixed, -1, sizeof(patch_fixed) ); + + + sprintf( file_name, "patch//%s", argv[1] ); + fp = fopen( file_name, "r" ); + if( !fp ) return -1; + + while( !feof(fp) ) + { + fgets( file_name, 4096, fp ); + lcv=0; + + if( file_name[0] == 0x0d || file_name[0] == 0x0a ) + continue; + + + if( file_name[0] == ';' ) + continue; + + + // get code + while( file_name[lcv] != 0x0a && file_name[lcv] != 0x0d ) + { + int value; + + value = 0; + + + if( file_name[0] == '#' ) + { + sscanf( file_name+1, "%X", &ram_offset ); + break; + } + + + if( file_name[0] == '$' ) + { + sscanf( file_name+1, "%X", &value ); + value -= ram_offset; + + patch_fixed[patch_count] = value; + + break; + } + + + if( file_name[lcv+0] == '*' && + file_name[lcv+1] == '*' ) + { + patch_src_wild[patch_count][lcv/2] = 1; + } + else + { + sscanf( file_name+lcv, "%02X", &value ); + + patch_src[patch_count][lcv/2] = value; + } + + patch_src_len[patch_count]++; + lcv += 2; + } + + + fgets( file_name, 4096, fp ); + lcv=0; + + while( file_name[lcv] != 0x0a && file_name[lcv] != 0x0d ) + { + int value; + + value = 0; + if( file_name[lcv+0] == '*' && + file_name[lcv+1] == '*' ) + { + patch_dst_wild[patch_count][lcv/2] = 1; + } + else + { + sscanf( file_name+lcv, "%02X", &value ); + + patch_dst[patch_count][lcv/2] = value; + } + + patch_dst_len[patch_count]++; + lcv += 2; + } + + patch_count++; + } + + fclose( fp ); + + + + sprintf( file_name, "%s", argv[2] ); + fp = fopen( file_name, "rb" ); + if( !fp ) return -1; + + if( argc==4 ) + { + int seeker; + + sscanf( argv[3], "%X", &seeker ); + fseek( fp, seeker, SEEK_SET ); + } + image_size = fread( image, 1, 0x100000 * 16, fp ); + + fclose( fp ); + + + + int patches; + + patches = patch_count; + for( lcv=0; lcv= 0x22853 ) + //lcv2 += 0; + + int idx; + + idx = 0; + lcv = start_lcv; + + for( int lcv3=0; lcv3 (USA) http://redump.org/disc/16687/ +> (Europe) http://redump.org/disc/15678/ + + +Converts justifiers to dual guncon + + + +Instructions: +1. Rip game cd to bin/cue or ccd/img format +2. Run bin/ppf-o-matic3 +3. Drag-drop bin or img file +4. Drag-drop bin/ppf file +5. Hit patch + + + +Uninstall: +1. Run bin/ppf-o-matic3 +2. Click 'undo patch' +3. Drag-drop bin or img file +4. Drag-drop bin/ppf file +5. Hit patch diff --git a/ps1 - guncon conversions/Lethal Enforcers/src/code/europe/asm - lethal enforcers.bat b/ps1 - guncon conversions/Lethal Enforcers/src/code/europe/asm - lethal enforcers.bat new file mode 100644 index 0000000000..5b8c8dc1f7 --- /dev/null +++ b/ps1 - guncon conversions/Lethal Enforcers/src/code/europe/asm - lethal enforcers.bat @@ -0,0 +1,6 @@ +del *.bin + +spasm -b pad-guncon-1.txt pad-guncon-1.bin +spasm -b pad-guncon-2.txt pad-guncon-2.bin + +pause diff --git a/ps1 - guncon conversions/Lethal Enforcers/src/code/europe/pad-guncon-1.txt b/ps1 - guncon conversions/Lethal Enforcers/src/code/europe/pad-guncon-1.txt new file mode 100644 index 0000000000..f24bca5a40 --- /dev/null +++ b/ps1 - guncon conversions/Lethal Enforcers/src/code/europe/pad-guncon-1.txt @@ -0,0 +1,209 @@ +; 6b550-6b770 +; - 6b550-6b6xx = remap buttons, id, cursor data + + + +org $8006b548 + +j $8006b550 +nop + + + +or at,ra,r0 + + +; player 1 +lui v0,$8006 +jal REMAP_GUNCON +ori v0,$c758 + +; player 2 +lui v0,$8006 +jal REMAP_GUNCON +ori v0,$c7ae + + +or ra,at,r0 + + + +; unlatch dead gun - only 1 active at time +lbu v0,$74(gp) +lui v1,$8006+1 + +bne v0,r0,DEAD_GUN2 +nop + +; gun 1 active - shut down 2 +beq r0,r0,TOTAL_DONE +sb r0,$c7b3(v1) + +; gun 2 active - shut down 1 +DEAD_GUN2: +sb r0,$c75d(v1) + + + +TOTAL_DONE: + +; OLD code +lw a0,$6c4(gp) +nop +j $80035ffc +nop + +; ======================================= +; ======================================= +; ======================================= + +; at, s0, a0, v0, v1, (s1) +; - v0 = guncon data +; - at = jal return +; - s0,a0,v1 + +REMAP_GUNCON: + +; remap guncon ID to justifier +ori s0,r0,$31 +sb s0,1(v0) + + + +; force cursor data (guncon x-y) +lh s0,4(v0) +lh v1,6(v0) +;nop + + + + +; set valid latch data (1,10 = guncon offscreen normally) +slti a0,s0,2 +beq a0,r0,REMAP_XY +ori a0,r0,1 + + +; offscreen shot - force (0,0) +sh r0,4(v0) +sh r0,6(v0) +beq r0,r0,REMAP_GUNCON_BUTTONS +sh r0,8(v0) + + + + +REMAP_XY: + +; signal on-screen shot +sb a0,5(v0) + + +; x-axis + +; 255 guncon (pSX rough center) --> 160 justifier --> 0 center +addi s0,s0,$ffa1 +addi s0,s0,$ff60 + + + +; adjustment range (pSX 384 --> 320) +; - 80 / 96 (384 * 128 / 320) ===> x * (64+16) / 96 +sll a0,s0,6 +sll s0,s0,4 +add s0,s0,a0 + +lui a0,0x02aa +ori a0,0xaaaa +mult s0,a0 +mfhi s0 + +; 0 center --> 160 justifier +addi s0,s0,$a0 + +sh s0,8(v0) + + + +; y-axis + +; 136 guncon (pSX rough center) --> 128 justifier --> 0 center +addi v1,v1,$fff8 +addi v1,v1,$ff80 + +; adjustment range (pSX 240 --> 256 pal range) +; - 256 / 240 = 16/15 +sll v1,v1,4 + +lui a0,0x1111 +ori a0,0x1111 +mult v1,a0 +mfhi v1 + +; 0 center --> 128 justifier +addi v1,v1,$80 + +sh v1,6(v0) + + + + +REMAP_GUNCON_BUTTONS: + +; remap guncon --> justifier buttons + +; $2000 = trigger --> $8000 = trigger +; $0008 = A --> $4000 = auxiliary +; $4000 = B --> $0008 = start + +; at,a0,ra + +lhu s0,2(v0) +ori a0,r0,$ffff + + + +; check trigger (low-assert) +andi v1,s0,$2000 +bne v1,r0,REMAP_A +nop + +; set $8000 bit +andi a0,a0,$7fff + + + +REMAP_A: +; check aux +andi v1,s0,$0008 +bne v1,r0,REMAP_B +nop + +; set $4000 bit +andi a0,a0,$bfff + + + + +REMAP_B: +; check start +andi v1,s0,$4000 +bne v1,r0,REMAP_BUTTONS +nop + +; lower $0008 bit +andi a0,a0,$fff7 + + + +REMAP_BUTTONS: +sh a0,2(v0) + +; ================================ +; ================================ +; ================================ + +DONE: + +jr ra +nop diff --git a/ps1 - guncon conversions/Lethal Enforcers/src/code/europe/pad-guncon-2.txt b/ps1 - guncon conversions/Lethal Enforcers/src/code/europe/pad-guncon-2.txt new file mode 100644 index 0000000000..0d95d2bd0d --- /dev/null +++ b/ps1 - guncon conversions/Lethal Enforcers/src/code/europe/pad-guncon-2.txt @@ -0,0 +1,15 @@ +org $800176f8 + +; in-game x-math +j $8001771c +or v0,r0,v1 + + +; calibration p1 +j $8001a890 +or v0,r0,v1 + + +; calibration p2 +j $8001aa4c +or v0,r0,v1 diff --git a/ps1 - guncon conversions/Lethal Enforcers/src/code/europe/spasm.exe b/ps1 - guncon conversions/Lethal Enforcers/src/code/europe/spasm.exe new file mode 100644 index 0000000000..c31eff4a16 Binary files /dev/null and b/ps1 - guncon conversions/Lethal Enforcers/src/code/europe/spasm.exe differ diff --git a/ps1 - guncon conversions/Lethal Enforcers/src/code/usa/asm - lethal enforcers.bat b/ps1 - guncon conversions/Lethal Enforcers/src/code/usa/asm - lethal enforcers.bat new file mode 100644 index 0000000000..5b8c8dc1f7 --- /dev/null +++ b/ps1 - guncon conversions/Lethal Enforcers/src/code/usa/asm - lethal enforcers.bat @@ -0,0 +1,6 @@ +del *.bin + +spasm -b pad-guncon-1.txt pad-guncon-1.bin +spasm -b pad-guncon-2.txt pad-guncon-2.bin + +pause diff --git a/ps1 - guncon conversions/Lethal Enforcers/src/code/usa/pad-guncon-1.txt b/ps1 - guncon conversions/Lethal Enforcers/src/code/usa/pad-guncon-1.txt new file mode 100644 index 0000000000..6e36591f08 --- /dev/null +++ b/ps1 - guncon conversions/Lethal Enforcers/src/code/usa/pad-guncon-1.txt @@ -0,0 +1,206 @@ +; 6b6c0-6bcc0 + 6bce0-6be20 + 6be30-6c050 +; - 6be30-6bexx = remap buttons, id, cursor data + + + +org $8006be28 + +j $8006be30 +nop + + + +or at,ra,r0 + + +; player 1 +lui v0,$8006 +jal REMAP_GUNCON +ori v0,$d038 + +; player 2 +lui v0,$8006 +jal REMAP_GUNCON +ori v0,$d08e + + +or ra,at,r0 + + + +; unlatch dead gun - only 1 active at time +lbu v0,$74(gp) +lui v1,$8006+1 + +bne v0,r0,DEAD_GUN2 +nop + +; gun 1 active - shut down 2 +beq r0,r0,TOTAL_DONE +sb r0,$d093(v1) + +; gun 2 active - shut down 1 +DEAD_GUN2: +sb r0,$d03d(v1) + + + +TOTAL_DONE: + +; OLD code +lw a0, $6c4(gp) +nop +j $8003694c +nop + +; ======================================= +; ======================================= +; ======================================= + +; at, s0, a0, v0, v1, (s1) +; - v0 = guncon data +; - at = jal return +; - s0,a0,v1 + +REMAP_GUNCON: + +; remap guncon ID to justifier +ori s0,r0,$31 +sb s0,1(v0) + + + +; force cursor data (guncon x-y) +lh s0,4(v0) +lh v1,6(v0) +;nop + + + + +; set valid latch data (1,10 = guncon offscreen normally) +slti a0,s0,2 +beq a0,r0,REMAP_XY +ori a0,r0,1 + + +; offscreen shot - force (0,0) +sh r0,4(v0) +sh r0,6(v0) +beq r0,r0,REMAP_GUNCON_BUTTONS +sh r0,8(v0) + + + + +REMAP_XY: + +; signal on-screen shot +sb a0,5(v0) + + +; x-axis + +; 255 guncon (pSX rough center) --> 160 justifier --> 0 center +addi s0,s0,$ffa1 +addi s0,s0,$ff60 + + + +; adjustment range (pSX 384 --> 320) +; - 80 / 96 (384 * 128 / 320) ===> x * (64+16) / 96 +sll a0,s0,6 +sll s0,s0,4 +add s0,s0,a0 + +lui a0,0x02aa +ori a0,0xaaaa +mult s0,a0 +mfhi s0 + +; 0 center --> 160 justifier +addi s0,s0,$a0 + +sh s0,8(v0) + + + +; y-axis + +; 136 guncon (pSX rough center) --> 120 justifier --> 0 center +addi v1,v1,$fff0 +;addi v1,v1,$ff88 + +; no adjustment range (pSX 240 --> 240 range) +;lui at,0x7800 +;ori at,0x0000 +;mult s1,at +;mfhi s1 + +; 0 center --> 120 justifier +;addi s1,s1,$78 + +sh v1,6(v0) + + + + +REMAP_GUNCON_BUTTONS: + +; remap guncon --> justifier buttons + +; $2000 = trigger --> $8000 = trigger +; $0008 = A --> $4000 = auxiliary +; $4000 = B --> $0008 = start + +; at,a0,ra + +lhu s0,2(v0) +ori a0,r0,$ffff + + + +; check trigger (low-assert) +andi v1,s0,$2000 +bne v1,r0,REMAP_A +nop + +; set $8000 bit +andi a0,a0,$7fff + + + +REMAP_A: +; check aux +andi v1,s0,$0008 +bne v1,r0,REMAP_B +nop + +; set $4000 bit +andi a0,a0,$bfff + + + + +REMAP_B: +; check start +andi v1,s0,$4000 +bne v1,r0,REMAP_BUTTONS +nop + +; lower $0008 bit +andi a0,a0,$fff7 + + + +REMAP_BUTTONS: +sh a0,2(v0) + +; ================================ +; ================================ +; ================================ + +DONE: + +jr ra +nop diff --git a/ps1 - guncon conversions/Lethal Enforcers/src/code/usa/pad-guncon-2.txt b/ps1 - guncon conversions/Lethal Enforcers/src/code/usa/pad-guncon-2.txt new file mode 100644 index 0000000000..4222bfe1e3 --- /dev/null +++ b/ps1 - guncon conversions/Lethal Enforcers/src/code/usa/pad-guncon-2.txt @@ -0,0 +1,13 @@ +org $800176e4 + +; skip x-math +j $80017708 +or v0,r0,v1 + + +j $8001ab48 +or v0,r0,v1 + + +j $8001ad04 +or v0,r0,v1 diff --git a/ps1 - guncon conversions/Lethal Enforcers/src/code/usa/spasm.exe b/ps1 - guncon conversions/Lethal Enforcers/src/code/usa/spasm.exe new file mode 100644 index 0000000000..c31eff4a16 Binary files /dev/null and b/ps1 - guncon conversions/Lethal Enforcers/src/code/usa/spasm.exe differ diff --git a/ps1 - guncon conversions/Lethal Enforcers/src/notes/lethal enforcers - guncon - europe.txt b/ps1 - guncon conversions/Lethal Enforcers/src/notes/lethal enforcers - guncon - europe.txt new file mode 100644 index 0000000000..4365dedf5c --- /dev/null +++ b/ps1 - guncon conversions/Lethal Enforcers/src/notes/lethal enforcers - guncon - europe.txt @@ -0,0 +1,161 @@ +8005ba30 : 8FA60018 LW 00000000 (a2), 0018 (000085a8 (sp)) [000085c0] +8005ba34 : 3C0F8007 LUI 00000001 (t7), 8007 (32775), +8005ba38 : 25EF13D0 ADDIU 80070000 (t7), 80070000 (t7), 13d0 (5072), +8005ba3c : 00067080 SLL 0000000a (t6), 00000001 (a2), 02 (2), +8005ba40 : 01CF3821 ADDU 0000003f (a3), 00000004 (t6), 800713d0 (t7), +8005ba44 : 8CF80000 LW 00000000 (t8), 0000 (800713d4 (a3)) [800713d4] +8005ba48 : 10400026 BEQ 00000000 (v0), 00000000 (r0), 8005bae4, + + +===> REMOVE THIS - blanks out useful sio data (justifier latch detection) +8005ba4c : A3020000 SB 00000000 (v0), 0000 (8006c7b3 (t8)) [8006c7b3] + + + + + + + + +player 1 (fixed) +8006c759 = justifier ID +8006c75d = justifier latch +8006c75e = justifier y +8006c760 = justifier x + +player 2 (fixed) +8006c7af = justifier ID +8006c7b3 = justifier latch +8006c7b4 = justifier y +8006c7b6 = justifier x + + + +80018c08 : 27BDFFE8 ADDIU 80070774 (sp), 80070774 (sp), ffe8 (65512), +80018c0c : AFBF0014 SW 8005cd7c (ra), 0014 (8007075c (sp)) [80070770] +80018c10 : 0C00D7FD JAL 80035ff4, 8005cd7c (ra), +80018c14 : AFB00010 SW 80070844 (s0), 0010 (8007075c (sp)) [8007076c] + +80018c18 : 0C00D815 JAL 80036054, 80018c18 (ra), +80018c1c : 3050FFFF ANDI 80070844 (s0), 00000000 (v0), ffff (65535), + + + + + + + +; gp = player address + +; NOTE: tries to latch either gun (if dual guns as player #1) + +===> remap ID +80035ff4 : 8F8406C4 LW 00000001 (a0), 06c4 (8006b8e4 (gp)) [8006bfa8] +80035ff8 : 00000000 NOP +===> +80035ffc : 94830000 LHU 1f801070 (v1), 0000 (8006c758 (a0)) [8006c758] +80036000 : 34023100 ORI 80018c08 (v0), 00000000 (r0), 3100 (12544), +80036004 : 14620005 BNE 00003100 (v1), 00003100 (v0), 8003601c, +80036008 : 00000000 NOP +8003600c : 90820005 LBU 00003100 (v0), 0005 (8006c758 (a0)) [8006c75d] +80036010 : 00000000 NOP +80036014 : 1440000C BNE 00000000 (v0), 00000000 (r0), 80036048, +80036018 : 00000000 NOP +8003601c : 3C048007 LUI 8006c758 (a0), 8007 (32775), +80036020 : 8C84BFAC LW 80070000 (a0), bfac (80070000 (a0)) [8006bfac] +80036024 : 00000000 NOP +80036028 : 94830000 LHU 00003100 (v1), 0000 (8006c7ae (a0)) [8006c7ae] +8003602c : 34023100 ORI 00000000 (v0), 00000000 (r0), 3100 (12544), +80036030 : 14620006 BNE 0000ffff (v1), 00003100 (v0), 8003604c, +80036034 : 00001021 ADDU 00003100 (v0), 00000000 (r0), 00000000 (r0), +8003604c : 03E00008 JR 80018c18 (ra), +80036050 : 00000000 NOP + + + + + +; - 6c238 = player # (0/1) +80018cbc : 8F830074 LW 0000ffff (v1), 0074 (8006b8e4 (gp)) [8006b958] +80018cc0 : 00000000 NOP +80018cc4 : 10600005 BEQ 00000001 (v1), 00000000 (r0), 80018cdc, +80018cc8 : 34020001 ORI 00003100 (v0), 00000000 (r0), 0001 (1), +80018ccc : 10620009 BEQ 00000001 (v1), 00000001 (v0), 80018cf4, +80018cd0 : 00002021 ADDU 00000000 (a0), 00000000 (r0), 00000000 (r0), + + + + +; x conversion (div 2.5) (div 2) +; - ((x / 2.5) / 2) - () + +800176f0 : 8C23C360 LW 00000000 (v1), c360 (80070000 (at)) [8006c360] +800176f4 : 00000000 NOP + +; LE1 - skip all this math (in-game) +---> +800176f8 : 00621823 SUBU 0000012c (v1), 0000012c (v1), 00000398 (v0), +800176fc : 3C026666 LUI 00000398 (v0), 6666 (26214), +80017700 : 34426667 ORI 66660000 (v0), 66660000 (v0), 6667 (26215), +80017704 : 00620018 MULT fffffd94 (v1), 66666667 (v0), +80017708 : 00005010 MFHI 000000a0 (t2), ffffff07 (hi), +8001770c : 000A1043 SRA 66666667 (v0), ffffff07 (t2), 01 (1), +80017710 : 00031FC3 SRA fffffd94 (v1), fffffd94 (v1), 1f (31), +80017714 : 00431023 SUBU ffffff83 (v0), ffffff83 (v0), ffffffff (v1), +80017718 : 244200A0 ADDIU ffffff84 (v0), ffffff84 (v0), 00a0 (160), +---> +8001771c : A4A20014 SH 00000024 (v0), 0014 (80078350 (a1)) [80078364] + + + +; NOTE: default y-cursor is way off (!) +; - should be ~$78 (center) for p2 (6b936), not $00b4 / $00b4 + +8001778c : 9422C378 LHU 00000000 (v0), c378 (80070000 (at)) [8006c378] +80017790 : 3C018007 LUI 80070000 (at), 8007 (32775), +80017794 : 00230821 ADDU 80070000 (at), 80070000 (at), 00000000 (v1), +80017798 : 9423B934 LHU 00000000 (v1), b934 (80070000 (at)) [8006b934] +8001779c : 00000000 NOP +; y-math (in-game) + calibration math +800177a0 : 00431023 SUBU 000000ca (v0), 000000ca (v0), 000000b4 (v1), +800177a4 : 24420078 ADDIU 00000016 (v0), 00000016 (v0), 0078 (120), +800177a8 : A4820016 SH 0000008e (v0), 0016 (80078350 (a0)) [80078366] + + + + + + +8001a86c : 8C63C360 LW 80070000 (v1), c360 (80070000 (v1)) [8006c360] +8001a870 : 00000000 NOP + +; LE1 - skip all this math (calibration p1) +---> +8001a874 : 00621823 SUBU 000000ca (v1), 000000ca (v1), 00000107 (v0), +8001a878 : 00730018 MULT ffffffc3 (v1), 66666667 (s3), +8001a87c : 00004010 MFHI 00000800 (t0), ffffffe7 (hi), +8001a880 : 00081043 SRA 00000107 (v0), ffffffe7 (t0), 01 (1), +8001a884 : 00031FC3 SRA ffffffc3 (v1), ffffffc3 (v1), 1f (31), +8001a888 : 00431023 SUBU fffffff3 (v0), fffffff3 (v0), ffffffff (v1), +8001a88c : 244200A0 ADDIU fffffff4 (v0), fffffff4 (v0), 00a0 (160), +---> +8001a890 : A7A20028 SH 00000094 (v0), 0028 (801ff6a8 (sp)) [801ff6d0] + + + + + +8001aa28 : 8C63C36C LW 80070000 (v1), c36c (80070000 (v1)) [8006c36c] +8001aa2c : 00000000 NOP + +; LE1 - skip all this math (calibration p2) +---> +8001aa30 : 00621823 SUBU 000000a0 (v1), 000000a0 (v1), 000000a0 (v0), +8001aa34 : 00730018 MULT 00000000 (v1), 66666667 (s3), +8001aa38 : 00004010 MFHI 00000800 (t0), 00000000 (hi), +8001aa3c : 00081043 SRA 000000a0 (v0), 00000000 (t0), 01 (1), +8001aa40 : 00031FC3 SRA 00000000 (v1), 00000000 (v1), 1f (31), +8001aa44 : 00431023 SUBU 00000000 (v0), 00000000 (v0), 00000000 (v1), +8001aa48 : 244200A0 ADDIU 00000000 (v0), 00000000 (v0), 00a0 (160), +---> +8001aa4c : A7A2005C SH 000000a0 (v0), 005c (801ff618 (sp)) [801ff674] diff --git a/ps1 - guncon conversions/Lethal Enforcers/src/notes/lethal enforcers - guncon - usa.txt b/ps1 - guncon conversions/Lethal Enforcers/src/notes/lethal enforcers - guncon - usa.txt new file mode 100644 index 0000000000..b225fad346 --- /dev/null +++ b/ps1 - guncon conversions/Lethal Enforcers/src/notes/lethal enforcers - guncon - usa.txt @@ -0,0 +1,205 @@ +8005c310 : 8FA60018 LW 00000000 (a2), 0018 (000085a8 (sp)) [000085c0] +8005c314 : 3C0F8007 LUI 00000001 (t7), 8007 (32775), +8005c318 : 25EF1CB0 ADDIU 80070000 (t7), 80070000 (t7), 1cb0 (7344), +8005c31c : 00067080 SLL 0000000a (t6), 00000001 (a2), 02 (2), +8005c320 : 01CF3821 ADDU 000000be (a3), 00000004 (t6), 80071cb0 (t7), +8005c324 : 8CF80000 LW 00000000 (t8), 0000 (80071cb4 (a3)) [80071cb4] +8005c328 : 10400026 BEQ 00000000 (v0), 00000000 (r0), 8005c3c4, + +; REMOVE THIS - blanks out useful sio data (justifier latch detection) +8005c32c : A3020000 SB 00000000 (v0), 0000 (8006d093 (t8)) [8006d093] + + + + +player 1 (fixed) +8006d039 = justifier ID +8006d03d = justifier latch +8006d03e = justifier y +8006d040 = justifier x + +player 2 (fixed) +8006d08f = justifier ID +8006d093 = justifier latch +8006d094 = justifier y +8006d096 = justifier x + + +80018ed4 : 27BDFFE8 ADDIU 80071054 (sp), 80071054 (sp), ffe8 (65512), +80018ed8 : AFBF0014 SW 8005d65c (ra), 0014 (8007103c (sp)) [80071050] +80018edc : 0C00DA51 JAL 80036944, 8005d65c (ra), +80018ee0 : AFB00010 SW 80071124 (s0), 0010 (8007103c (sp)) [8007104c] + +80018ee4 : 0C00DA69 JAL 800369a4, 80018ee4 (ra), +80018ee8 : 3050FFFF ANDI 80071124 (s0), 00000000 (v0), ffff (65535), + + + + +; gp = player address + +; NOTE: tries to latch either gun (if dual guns as player #1) + +===> remap ID +80036944 : 8F8406C4 LW 00000001 (a0), 06c4 (8006c1c4 (gp)) [8006c888] +80036948 : 00000000 NOP +===> + + +8003694c : 94830000 LHU 00000000 (v1), 0000 (8006d038 (a0)) [8006d038] +80036950 : 34023100 ORI 8006d08e (v0), 00000000 (r0), 3100 (12544), +80036954 : 14620005 BNE 00003100 (v1), 00003100 (v0), 8003696c, +80036958 : 00000000 NOP + +; check latch data (#1) +8003695c : 90820005 LBU 00003100 (v0), 0005 (8006d038 (a0)) [8006d03d] +80036960 : 00000000 NOP +80036964 : 1440000C BNE 00000001 (v0), 00000000 (r0), 80036998, +80036968 : 00000000 NOP + + + +; check latch data #2 +8003696c : 3C048007 LUI 8006d038 (a0), 8007 (32775), +80036970 : 8C84C88C LW 80070000 (a0), c88c (80070000 (a0)) [8006c88c] +80036974 : 00000000 NOP +80036978 : 94830000 LHU 00003100 (v1), 0000 (8006d08e (a0)) [8006d08e] +8003697c : 34023100 ORI 00000000 (v0), 00000000 (r0), 3100 (12544), +80036980 : 14620006 BNE 00003100 (v1), 00003100 (v0), 8003699c, +80036984 : 00001021 ADDU 00003100 (v0), 00000000 (r0), 00000000 (r0), +80036988 : 90820005 LBU 00000000 (v0), 0005 (8006d08e (a0)) [8006d093] +8003698c : 00000000 NOP +80036990 : 10400002 BEQ 00000001 (v0), 00000000 (r0), 8003699c, +80036994 : 00001021 ADDU 00000001 (v0), 00000000 (r0), 00000000 (r0), + + +; return x-data +80036998 : 94820008 LHU 00000001 (v0), 0008 (8006d038 (a0)) [8006d040] +8003699c : 03E00008 JR 80018ee4 (ra), +800369a0 : 00000000 NOP + + + + + + + +; - 6c238 = player # (0/1) +80018f2c : 8F830074 LW 00003100 (v1), 0074 (8006c1c4 (gp)) [8006c238] +80018f30 : 00000000 NOP + + + + + +; x conversion (div 2.5) (div 2) +; - ((x / 2.5) / 2) - () + +800176dc : 8C23CC40 LW 00000000 (v1), cc40 (80070000 (at)) [8006cc40] +800176e0 : 00000000 NOP + +; LE1 - skip all this math (in-game) +---> +800176e4 : 00621823 SUBU 00000398 (v1), 00000398 (v1), 00000398 (v0), +800176e8 : 3C026666 LUI 00000398 (v0), 6666 (26214), +800176ec : 34426667 ORI 66660000 (v0), 66660000 (v0), 6667 (26215), +800176f0 : 00620018 MULT 00000000 (v1), 66666667 (v0), +800176f4 : 00005010 MFHI 000000a0 (t2), 00000000 (hi), +800176f8 : 000A1043 SRA 66666667 (v0), 00000000 (t2), 01 (1), +800176fc : 00031FC3 SRA 00000000 (v1), 00000000 (v1), 1f (31), +80017700 : 00431023 SUBU 00000000 (v0), 00000000 (v0), 00000000 (v1), +80017704 : 244200A0 ADDIU 00000000 (v0), 00000000 (v0), 00a0 (160), +---> + +80017708 : A4A20014 SH 000000a0 (v0), 0014 (80078c30 (a1)) [80078c44] + + + + + +8001ab20 : 3C038007 LUI ffffffef (v1), 8007 (32775), +8001ab24 : 8C63CC40 LW 80070000 (v1), cc40 (80070000 (v1)) [8006cc40] +8001ab28 : 00000000 NOP + +; LE1 - skip all this math (calibration p1) +---> +8001ab2c : 00621823 SUBU 00000043 (v1), 00000043 (v1), 000000a1 (v0), +8001ab30 : 00730018 MULT ffffffa2 (v1), 66666667 (s3), +8001ab34 : 00004010 MFHI 00000800 (t0), ffffffda (hi), +8001ab38 : 00081043 SRA 000000a1 (v0), ffffffda (t0), 01 (1), +8001ab3c : 00031FC3 SRA ffffffa2 (v1), ffffffa2 (v1), 1f (31), +8001ab40 : 00431023 SUBU ffffffed (v0), ffffffed (v0), ffffffff (v1), +8001ab44 : 244200A0 ADDIU ffffffee (v0), ffffffee (v0), 00a0 (160), +--> +8001ab48 : A7A20028 SH 0000008e (v0), 0028 (801ff890 (sp)) [801ff8b8] + + + + +8001ace0 : 8C63CC4C LW 80070000 (v1), cc4c (80070000 (v1)) [8006cc4c] +8001ace4 : 00000000 NOP + +; LE1 - skip all this math (calibration p2) +---> +8001ace8 : 00621823 SUBU 00000046 (v1), 00000046 (v1), 000000a0 (v0), +8001acec : 00730018 MULT ffffffa6 (v1), s3), +8001acf0 : 00004010 MFHI 00000800 (t0), ffffffdb (hi), +8001acf4 : 00081043 SRA 000000a0 (v0), ffffffdb (t0), 01 (1), +8001acf8 : 00031FC3 SRA ffffffa6 (v1), ffffffa6 (v1), 1f (31), +8001acfc : 00431023 SUBU ffffffed (v0), ffffffed (v0), ffffffff (v1), +8001ad00 : 244200A0 ADDIU ffffffee (v0), ffffffee (v0), 00a0 (160), +---> +8001ad04 : A7A2005C SH 0000008e (v0), 005c (801ff890 (sp)) [801ff8ec] + + + + + + +; check on-screen or off-screen - 6c23c / 6c240 +800174c8 : 3C018007 LUI 80070014 (at), 8007 (32775), +800174cc : 00240821 ADDU 80070000 (at), 80070000 (at), 00000000 (a0), +800174d0 : 8C22C23C LW 00000000 (v0), c23c (80070000 (at)) [8006c23c] +800174d4 : 00000000 NOP +800174d8 : 10400073 BEQ 00000000 (v0), 00000000 (r0), 800176a8, +800174dc : 00921021 ADDU 00000000 (v0), 00000000 (a0), 801ff8d8 (s2), + + + + +; LE2 - calibration +8001ab20 : 3C038007 LUI ffffdfff (v1), 8007 (32775), +8001ab24 : 8C63CC40 LW 80070000 (v1), cc40 (80070000 (v1)) [8006cc40] +8001ab28 : 00000000 NOP + +--> skip math +8001ab2c : 00621823 SUBU 000000d8 (v1), 000000d8 (v1), 000000a0 (v0), +8001ab30 : 00730018 MULT 00000038 (v1), 66666667 (s3), +8001ab34 : 00004010 MFHI 00000800 (t0), 00000016 (hi), +8001ab38 : 00081043 SRA 000000a0 (v0), 00000016 (t0), 01 (1), +8001ab3c : 00031FC3 SRA 00000038 (v1), 00000038 (v1), 1f (31), +8001ab40 : 00431023 SUBU 0000000b (v0), 0000000b (v0), 00000000 (v1), +8001ab44 : 244200A0 ADDIU 0000000b (v0), 0000000b (v0), 00a0 (160), +--> + +8001ab48 : A7A20028 SH 000000ab (v0), 0028 (801ff628 (sp)) [801ff650] + + + + +; LE2 - calibration +8001acdc : 3C038007 LUI ffff7fff (v1), 8007 (32775), +8001ace0 : 8C63CC4C LW 80070000 (v1), cc4c (80070000 (v1)) [8006cc4c] +8001ace4 : 00000000 NOP + +--> skip math +8001ace8 : 00621823 SUBU 000000b0 (v1), 000000b0 (v1), 00000398 (v0), +8001acec : 00730018 MULT fffffd18 (v1), 66666667 (s3), +8001acf0 : 00004010 MFHI 00000800 (t0), fffffed6 (hi), +8001acf4 : 00081043 SRA 00000398 (v0), fffffed6 (t0), 01 (1), +8001acf8 : 00031FC3 SRA fffffd18 (v1), fffffd18 (v1), 1f (31), +8001acfc : 00431023 SUBU ffffff6b (v0), ffffff6b (v0), ffffffff (v1), +8001ad00 : 244200A0 ADDIU ffffff6c (v0), ffffff6c (v0), 00a0 (160), +--> + +8001ad04 : A7A2005C SH 0000000c (v0), 005c (801ff628 (sp)) [801ff684] diff --git a/ps1 - guncon conversions/Lethal Enforcers/src/patcher/europe/cd2dvd.bat b/ps1 - guncon conversions/Lethal Enforcers/src/patcher/europe/cd2dvd.bat new file mode 100644 index 0000000000..657b78b897 --- /dev/null +++ b/ps1 - guncon conversions/Lethal Enforcers/src/patcher/europe/cd2dvd.bat @@ -0,0 +1,5 @@ +SET FILE_1=SLES_005.42 +SET FILE_2=DATA.BIN + + +cd2dvd_patcher ___patch.txt %FILE_1% 0 diff --git a/ps1 - guncon conversions/Lethal Enforcers/src/patcher/europe/cd2dvd_patcher.exe b/ps1 - guncon conversions/Lethal Enforcers/src/patcher/europe/cd2dvd_patcher.exe new file mode 100644 index 0000000000..1252f70016 Binary files /dev/null and b/ps1 - guncon conversions/Lethal Enforcers/src/patcher/europe/cd2dvd_patcher.exe differ diff --git a/ps1 - guncon conversions/Lethal Enforcers/src/patcher/europe/patch/___.PAD b/ps1 - guncon conversions/Lethal Enforcers/src/patcher/europe/patch/___.PAD new file mode 100644 index 0000000000..e9784eb4c8 Binary files /dev/null and b/ps1 - guncon conversions/Lethal Enforcers/src/patcher/europe/patch/___.PAD differ diff --git a/ps1 - guncon conversions/Lethal Enforcers/src/patcher/europe/patch/___patch.txt b/ps1 - guncon conversions/Lethal Enforcers/src/patcher/europe/patch/___patch.txt new file mode 100644 index 0000000000..fe984e3cab --- /dev/null +++ b/ps1 - guncon conversions/Lethal Enforcers/src/patcher/europe/patch/___patch.txt @@ -0,0 +1,38 @@ +; ram offset (raw -> ram) +#f800 + + + +; remap guncon --> justifier data +$35ff4 +54AD010800000000 +$6b550 +2508E0030680023C67AD010C58C742340680023C67AD010CAEC7423425F82000740082930780033C030040140000000002000010B3C760A05DC760A0C406848F00000000FFD700080000000031001034010050A004005084060043840200042A0500801001000434040040A4060040A416000010080040A4050044A0A1FF102260FF1022802110000081100020800402AA02043CAAAA84341800040210800000A0001022080050A4F8FF632080FF6320001903001111043C11118434180064001018000080006320060043A402005094FFFF0434002003320200601400000000FF7F8430080003320200601400000000FFBF8430004003320200601400000000F7FF8430020044A40800E00300000000 + + + +; justifier latch reset +$5ba4c +00000000 + + + +; skip x-math +$176f8 +C75D000825100300 + + + +; skip calibration math +$1a874 +246A000825100300 +$1aa30 +936A000825100300 + + + +; default calibration markers (y-axis) +$6b934 +8000 +$6b936 +8000 diff --git a/ps1 - guncon conversions/Lethal Enforcers/src/patcher/usa/cd2dvd.bat b/ps1 - guncon conversions/Lethal Enforcers/src/patcher/usa/cd2dvd.bat new file mode 100644 index 0000000000..8a6a9f69a9 --- /dev/null +++ b/ps1 - guncon conversions/Lethal Enforcers/src/patcher/usa/cd2dvd.bat @@ -0,0 +1,5 @@ +SET FILE_1=SLUS_002.93 +SET FILE_2=DATA.BIN + + +cd2dvd_patcher ___patch.txt %FILE_1% 0 diff --git a/ps1 - guncon conversions/Lethal Enforcers/src/patcher/usa/cd2dvd_patcher.exe b/ps1 - guncon conversions/Lethal Enforcers/src/patcher/usa/cd2dvd_patcher.exe new file mode 100644 index 0000000000..1252f70016 Binary files /dev/null and b/ps1 - guncon conversions/Lethal Enforcers/src/patcher/usa/cd2dvd_patcher.exe differ diff --git a/ps1 - guncon conversions/Lethal Enforcers/src/patcher/usa/patch/___.PAD b/ps1 - guncon conversions/Lethal Enforcers/src/patcher/usa/patch/___.PAD new file mode 100644 index 0000000000..e9784eb4c8 Binary files /dev/null and b/ps1 - guncon conversions/Lethal Enforcers/src/patcher/usa/patch/___.PAD differ diff --git a/ps1 - guncon conversions/Lethal Enforcers/src/patcher/usa/patch/___patch.txt b/ps1 - guncon conversions/Lethal Enforcers/src/patcher/usa/patch/___patch.txt new file mode 100644 index 0000000000..778974737d --- /dev/null +++ b/ps1 - guncon conversions/Lethal Enforcers/src/patcher/usa/patch/___patch.txt @@ -0,0 +1,26 @@ +; ram offset (raw -> ram) +#f800 + + + +; remap guncon --> justifier data +$36944 +8CAF010800000000 +$6be30 +2508E0030680023C9FAF010C38D042340680023C9FAF010C8ED0423425F82000740082930780033C03004014000000000200001093D060A03DD060A0C406848F0000000053DA00080000000031001034010050A004005084060043840200042A0500801001000434040040A4060040A40F000010080040A4050044A0A1FF102260FF1022802110000081100020800402AA02043CAAAA84341800040210800000A0001022080050A4F0FF6320060043A402005094FFFF0434002003320200601400000000FF7F8430080003320200601400000000FFBF8430004003320200601400000000F7FF8430020044A40800E00300000000 + + + +; justifier latch reset +$5c32c +00000000 + + + +; skip calibration math +$176e4 +C25D000825100300 +$1ab2c +D26A000825100300 +$1ace8 +416B000825100300 diff --git a/ps1 - guncon conversions/Lethal Enforcers/src/src/cd2dvd_patcher/cd2dvd_patcher.dsp b/ps1 - guncon conversions/Lethal Enforcers/src/src/cd2dvd_patcher/cd2dvd_patcher.dsp new file mode 100644 index 0000000000..8c69312541 --- /dev/null +++ b/ps1 - guncon conversions/Lethal Enforcers/src/src/cd2dvd_patcher/cd2dvd_patcher.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="cd2dvd_patcher" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=cd2dvd_patcher - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "cd2dvd_patcher.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "cd2dvd_patcher.mak" CFG="cd2dvd_patcher - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "cd2dvd_patcher - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "cd2dvd_patcher - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "cd2dvd_patcher - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"cd2dvd_patcher.exe" + +!ELSEIF "$(CFG)" == "cd2dvd_patcher - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"cd2dvd_patcher.exe" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "cd2dvd_patcher - Win32 Release" +# Name "cd2dvd_patcher - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\patcher.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/ps1 - guncon conversions/Lethal Enforcers/src/src/cd2dvd_patcher/cd2dvd_patcher.dsw b/ps1 - guncon conversions/Lethal Enforcers/src/src/cd2dvd_patcher/cd2dvd_patcher.dsw new file mode 100644 index 0000000000..1513cd6c5a --- /dev/null +++ b/ps1 - guncon conversions/Lethal Enforcers/src/src/cd2dvd_patcher/cd2dvd_patcher.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "cd2dvd_patcher"=".\cd2dvd_patcher.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/ps1 - guncon conversions/Lethal Enforcers/src/src/cd2dvd_patcher/patcher.cpp b/ps1 - guncon conversions/Lethal Enforcers/src/src/cd2dvd_patcher/patcher.cpp new file mode 100644 index 0000000000..05ef215011 --- /dev/null +++ b/ps1 - guncon conversions/Lethal Enforcers/src/src/cd2dvd_patcher/patcher.cpp @@ -0,0 +1,229 @@ +#include +#include + +FILE *fp; +char file_name[4096]; + +unsigned char image[0x100000 * 16]; +int image_size; + +unsigned char patch_src[512][4096]; +unsigned char patch_src_wild[512][4096]; +unsigned char patch_dst[512][4096]; +unsigned char patch_dst_wild[512][4096]; +int patch_fixed[512]; + +int patch_src_len[512]; +int patch_dst_len[512]; + +int patch_index[512]; +int patch_count; + +int lcv; +int ram_offset; + +int main( int argc, char** argv ) +{ + memset( patch_fixed, -1, sizeof(patch_fixed) ); + + + sprintf( file_name, "patch//%s", argv[1] ); + fp = fopen( file_name, "r" ); + if( !fp ) return -1; + + while( !feof(fp) ) + { + fgets( file_name, 4096, fp ); + lcv=0; + + if( file_name[0] == 0x0d || file_name[0] == 0x0a ) + continue; + + + if( file_name[0] == ';' ) + continue; + + + // get code + while( file_name[lcv] != 0x0a && file_name[lcv] != 0x0d ) + { + int value; + + value = 0; + + + if( file_name[0] == '#' ) + { + sscanf( file_name+1, "%X", &ram_offset ); + break; + } + + + if( file_name[0] == '$' ) + { + sscanf( file_name+1, "%X", &value ); + value -= ram_offset; + + patch_fixed[patch_count] = value; + + break; + } + + + if( file_name[lcv+0] == '*' && + file_name[lcv+1] == '*' ) + { + patch_src_wild[patch_count][lcv/2] = 1; + } + else + { + sscanf( file_name+lcv, "%02X", &value ); + + patch_src[patch_count][lcv/2] = value; + } + + patch_src_len[patch_count]++; + lcv += 2; + } + + + fgets( file_name, 4096, fp ); + lcv=0; + + while( file_name[lcv] != 0x0a && file_name[lcv] != 0x0d ) + { + int value; + + value = 0; + if( file_name[lcv+0] == '*' && + file_name[lcv+1] == '*' ) + { + patch_dst_wild[patch_count][lcv/2] = 1; + } + else + { + sscanf( file_name+lcv, "%02X", &value ); + + patch_dst[patch_count][lcv/2] = value; + } + + patch_dst_len[patch_count]++; + lcv += 2; + } + + patch_count++; + } + + fclose( fp ); + + + + sprintf( file_name, "%s", argv[2] ); + fp = fopen( file_name, "rb" ); + if( !fp ) return -1; + + if( argc==4 ) + { + int seeker; + + sscanf( argv[3], "%X", &seeker ); + fseek( fp, seeker, SEEK_SET ); + } + image_size = fread( image, 1, 0x100000 * 16, fp ); + + fclose( fp ); + + + + int patches; + + patches = patch_count; + for( lcv=0; lcv= 0x22853 ) + //lcv2 += 0; + + int idx; + + idx = 0; + lcv = start_lcv; + + for( int lcv3=0; lcv3 (Japan) redump.org/disc/1666/ (cd1) +> (Japan) redump.org/disc/1668/ (cd2) + + + +Converts shooting segments to use a Guncon (port2) +- Special thanks to Paubi for much testing and feedback! + + + +Instructions: +0. Rip game cd to bin/cue or ccd/img format +1. Use official English translation patch +2. Run bin/ppf-o-matic3 +3. Drag-drop bin or img file +4. Drag-drop bin/ppf file +5. Hit patch + + + +Uninstall: +1. Run bin/ppf-o-matic3 +2. Click 'undo patch' +3. Drag-drop bin or img file +4. Drag-drop bin/ppf file +5. Hit patch diff --git a/ps1 - guncon conversions/Policenauts/src/code/japan/asm - policenauts.bat b/ps1 - guncon conversions/Policenauts/src/code/japan/asm - policenauts.bat new file mode 100644 index 0000000000..802f8aaa85 --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/code/japan/asm - policenauts.bat @@ -0,0 +1,16 @@ +del *.bin + +spasm -b pad-guncon-1.txt pad-guncon-1.bin +spasm -b pad-guncon-1a.txt pad-guncon-1a.bin +spasm -b pad-guncon-1b.txt pad-guncon-1b.bin +spasm -b pad-guncon-1c.txt pad-guncon-1c.bin +spasm -b pad-guncon-2.txt pad-guncon-2.bin +spasm -b pad-guncon-2a.txt pad-guncon-2a.bin +spasm -b pad-guncon-2b.txt pad-guncon-2b.bin +spasm -b pad-guncon-2c.txt pad-guncon-2c.bin +spasm -b pad-guncon-2d.txt pad-guncon-2d.bin +spasm -b pad-guncon-2e.txt pad-guncon-2e.bin +spasm -b pad-guncon-2f.txt pad-guncon-2f.bin +spasm -b pad-guncon-2g.txt pad-guncon-2g.bin + +pause diff --git a/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-1.txt b/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-1.txt new file mode 100644 index 0000000000..b8a21ca187 --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-1.txt @@ -0,0 +1,223 @@ +; DEBUG +; - 102a0-10730 +; - 11220-113d0 +; - 11410-11770 +; - 11DE0-12330 (Disc swap kit = 11DE0-12030) +; - 12350-12490 +; - 124a0-125c0 + + +; shared mouse input (SLPS) + +org $000044e0 + +j $800102b0 +nop + + + +; $102a0 = buttons +; $102a4 = guncon x +; $102a8 = guncon y +; $102ac = unused temp + + + +; ra,s0,s1,t0,t2 +; ra,a0,t1,t7,t8,a1 + + +; check port2 controller +lui ra,$8001 +ori ra,ra,$02a0 + +lui a0,$8003 +ori a0,a0,$f948 + +; ======================================= +; ======================================= +; ======================================= + +; - ra = guncon target data +; - a0 = guncon data + +; - t1 = temp +; - t7 = guncon x +; - t8 = guncon y + + +REMAP_GUNCON: + +; check guncon ID first +lbu t1,1(a0) +ori t7,r0,$63 +bne t1,t7,DONE +nop + + + +; remap guncon ID to mouse +ori t1,r0,$12 +sb t1,1(a0) + + + +; force cursor data (guncon x-y) +lh t7,4(a0) +lh t8,6(a0) +;nop + +; - no mouse motion +sh r0,4(a0) + + + + +; check valid latch data (1,10 = guncon offscreen normally) +slti t1,t7,2 +beq t1,r0,REMAP_XY +lui t1,0x3ff + + +; offscreen shot - force (03ff.0000 = 16.16 fixed-format) +sw t1,4(ra) +beq r0,r0,REMAP_GUNCON_BUTTONS +sw t1,8(ra) + + + + +REMAP_XY: + +; x-axis + +; 255 guncon (pSX rough center) --> 160 justifier --> 0 center +addi t7,t7,$ffa1 +addi t7,t7,$ff60 + + + +; adjustment range (pSX 384 --> 320) +; - 80 / 96 (384 * 128 / 320) ===> x * (64+16) / 96 +sll t1,t7,6 +sll t7,t7,4 +add t7,t7,t1 + +lui t1,0x02aa +ori t1,0xaaaa +mult t7,t1 +mfhi t7 + +; 0 center --> 158 justifier +addi t7,t7,$9e + +sw t7,4(ra) + + + +; y-axis + +; 136 guncon (pSX rough center) --> 120 justifier --> 0 center +addi t8,t8,$fff0 +;addi t8,t8,$ff88 + +; no adjustment range (pSX 240 --> 240 range) +;lui at,0x7800 +;ori at,0x0000 +;mult t1,at +;mfhi t1 + +; 0 center --> 120 justifier +;addi t8,t8,$78 + +sw t8,8(ra) + + + + +REMAP_GUNCON_BUTTONS: + +; remap guncon --> mouse buttons (fcff) + +; $2000 = trigger --> $0800 = left +; $0008 = A --> $0400 = right +; $4000 = B --> $0400 = right + +lhu t7,2(a0) +ori t8,r0,$fcff + + +; flip bits +xori t7,t7,$ffff + + + +; check trigger (low-assert) +andi t1,t7,$2000 +beq t1,r0,REMAP_A +nop + +; set $0800 bit +andi t8,t8,$f7ff + + + + +REMAP_A: +; check aux +andi t1,t7,$0008 +beq t1,r0,REMAP_B +nop + +; set $0400 bit +andi t8,t8,$fbff + + + + +REMAP_B: +; check start +andi t1,t7,$4000 +beq t1,r0,REMAP_BUTTONS +nop + +; set $0400 bit +andi t8,t8,$fbff + + + + +REMAP_BUTTONS: +sh t8,0(ra) +sh t8,2(a0) + +; ================================ +; ================================ +; ================================ + +; verify port1 = mouse +lui ra,$8003+1 +lbu t7,$f939(ra) +ori a0,r0,$12 +bne t7,a0,DONE +;nop + + +; combine mouse1+guncon2 buttons now (avoid data caching problem) +lbu t8,$f94b(ra) +lbu t7,$f93b(ra) +nop +and t7,t7,t8 +sb t7,$f93b(ra) + +; ================================ +; ================================ +; ================================ + +DONE: + +; OLD code +lui t7,0 +lw t7,$74c4(t7) +j $000049e8 +nop diff --git a/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-1a.txt b/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-1a.txt new file mode 100644 index 0000000000..dbe8a6c52b --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-1a.txt @@ -0,0 +1,45 @@ +; DEBUG +; - 102a0-10730 +; 102a0-102b0 = guncon data +; 102b0-103b0 = guncon remap +; 103b0-104xx = guncon / mouse button shared + +; - 11220-113d0 +; - 11410-11770 +; - 11DE0-12330 (Disc swap kit = 11DE0-12030) +; - 12350-12490 +; - 124a0-125c0 + + + +org $80023584 + +j $800103b0 +nop + + + +; combine mouse buttons to 'super' data +; - at = current port +; - v1,t3 = free + +; ignore port2 data +lui t3,$8003 +ori t3,t3,$f939 +bne t3,at,DONE +nop + + +sb v0,3(a2) + +; ========================== +; ========================== +; ========================== + +DONE: +lw a0,4(a2) +nop + +j $8002358c +nop + diff --git a/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-1b.txt b/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-1b.txt new file mode 100644 index 0000000000..37c158ac02 --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-1b.txt @@ -0,0 +1,50 @@ +; DEBUG +; - 102a0-10730 +; 102a0-102b0 = guncon data +; 102b0-103b0 = guncon remap +; 103b0-103e0 = guncon / mouse button shared +; 103e0-104xx = mouse hooks + +; - 11220-113d0 +; - 11410-11770 +; - 11DE0-12330 (Disc swap kit = 11DE0-12030) +; - 12350-12490 +; - 124a0-125c0 + + +; gun shooting (bin.dpk) = 48458-48560 + +org $80023520 + +j $800103e0 +nop + + + + +; at,v0 = free + + +; install input driver hook (from BIOS code) +lui at,0 +lui v0,$0800 +ori v0,v0,$40ac +sw v0,$49e0(at) +sw r0,$49e4(at) + + + +; install 1-time mouse driver hook (from BIOS code) +lui v0,$0800 +ori v0,v0,$4104 +sw v0,$49d8(at) +sw r0,$49dc(at) + +; ======================== +; ======================== +; ======================== + +DONE: +lui at,$8004 +j $80023528 +addiu at,at,$f939 diff --git a/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-1c.txt b/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-1c.txt new file mode 100644 index 0000000000..8af3152668 --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-1c.txt @@ -0,0 +1,62 @@ +; DEBUG +; - 102a0-10730 +; 102a0-102b0 = guncon data +; 102b0-103b0 = guncon remap +; 103b0-103e0 = guncon / mouse button shared +; 103e0-10410 = mouse hooks +; 10410-104xx = mouse hooks + +; - 11220-113d0 +; - 11410-11770 +; - 11DE0-12330 (Disc swap kit = 11DE0-12030) +; - 12350-12490 +; - 124a0-125c0 + + +; gun shooting (bin.dpk) = 48458-48560 + +org $800049d8 + +j $80010410 +nop + + + +; $102a0 = buttons +; $102a4 = guncon x +; $102a8 = guncon y +; $102ac = unused temp ($0a init) + +; ra,a0 free + +; check mouse init +lui ra,$8001 +lbu a0,$02ac(ra) +nop +beq a0,r0,DONE +;nop + + + +; 1-time mouse init +sb r0,$02ac(ra) + +; mouse ID +lui ra,$8003+1 +ori a0,r0,$12 +sb a0,$f939(ra) + +ori a0,r0,$fcff +sh a0,$f93a(ra) +sh r0,$f93c(ra) + +; ======================== +; ======================== +; ======================== + +DONE: +jal $4498 +addiu a0,r0,1 + +j $49e0 +nop diff --git a/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-2.txt b/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-2.txt new file mode 100644 index 0000000000..bdca201df9 --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-2.txt @@ -0,0 +1,75 @@ +; DEBUG +; - 102a0-10730 +; - 11220-113d0 +; - 11410-11770 +; - 11DE0-12330 (Disc swap kit = 11DE0-12030) +; - 12350-12490 +; - 124a0-125c0 + + +; gun shooting (bin.dpk) = 48458-48560 + +org $80048458 + + + +; $102a0 = buttons +; $102a4 = guncon x +; $102a8 = guncon y +; $102ac = unused temp + +; - a1,a3,at,v0,t0 + +lui a1,$8001 +lui at,$8006 + +; ========================== +; ========================== +; ========================== + +; update x-y values +lw v0,$02a4(a1) +lw t0,$02a8(a1) + +; 16.16 fixed-format +sll v0,v0,16 +sll t0,t0,16 + +sw v0,$2a58(at) +sw t0,$2a5c(at) + +; ========================== +; ========================== +; ========================== + +; check trigger pull +lbu v0,$02a1(a1) +nop +xori v0,v0,$ffff +andi a1,v0,$0c + + +beq a1,r0,NO_TRIGGER +ori v0,r0,1 + + + +; trigger pull +sw r0,$2a80(at) +sw r0,$2a84(at) + +beq r0,r0,DONE +sb v0,$2a55(at) + + + +NO_TRIGGER: +ori s1,r0,1 + +; ========================== +; ========================== +; ========================== + +DONE: +j $8004894c +nop diff --git a/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-2a.txt b/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-2a.txt new file mode 100644 index 0000000000..7326c51c1c --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-2a.txt @@ -0,0 +1,35 @@ +; DEBUG +; - 102a0-10730 +; - 11220-113d0 +; - 11410-11770 +; - 11de0-12330 (Disc swap kit = 11DE0-12030) +; - 12350-12490 +; - 124a0-125c0 + + +; shooting range #2-3 (bin.dpk) = 80087188-800871e0 (parts) + +org $80087188 + + + +; $102a0 = buttons +; $102a4 = guncon x +; $102a8 = guncon y +; $102ac = unused temp + +; t0 = free + +; load xy-cursor +lui v0,$8001 +lw v1,$02a4(v0) +lw t0,$02a8(v0) + +; adjust 16.16 format +sll v1,v1,16 +sw v1,$1c(s0) +sll v1,t0,16 + + +j $800871d8 +ori v0,r0,0 diff --git a/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-2b.txt b/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-2b.txt new file mode 100644 index 0000000000..5b60466ebc --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-2b.txt @@ -0,0 +1,35 @@ +; DEBUG +; - 102a0-10730 +; - 11220-113d0 +; - 11410-11770 +; - 11de0-12330 (Disc swap kit = 11DE0-12030) +; - 12350-12490 +; - 124a0-125c0 + + +; shooting range #1 (bin.dpk) + +org $80087140 + + + +; $102a0 = buttons +; $102a4 = guncon x +; $102a8 = guncon y +; $102ac = unused temp + +; t0 = free + +; load xy-cursor +lui v0,$8001 +lw v1,$02a4(v0) +lw t0,$02a8(v0) + +; adjust 16.16 format +sll v1,v1,16 +sw v1,$1c(s0) +sll v1,t0,16 + + +j $80087204 +sw v1,$20(s0) diff --git a/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-2c.txt b/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-2c.txt new file mode 100644 index 0000000000..8282d1232c --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-2c.txt @@ -0,0 +1,39 @@ +; DEBUG +; - 102a0-10730 +; - 11220-113d0 +; - 11410-11770 +; - 11de0-12330 (Disc swap kit = 11DE0-12030) +; - 12350-12490 +; - 124a0-125c0 + + +; act2 - highway (bin.dpk) + +org $80079f7c + + + +; $102a0 = buttons +; $102a4 = guncon x +; $102a8 = guncon y +; $102ac = unused temp + + + +; load x-cursor +lui v0,$8001 +lw v1,$02a4(v0) +nop + +; adjust 16.16 format +sll v1,v1,16 +sw v1,$1c(s0) + + + +; load y-cursor +lw v1,$02a8(v0) +nop + +j $80079fd4 +sll v0,v1,16 diff --git a/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-2d.txt b/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-2d.txt new file mode 100644 index 0000000000..20f5200754 --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-2d.txt @@ -0,0 +1,39 @@ +; DEBUG +; - 102a0-10730 +; - 11220-113d0 +; - 11410-11770 +; - 11de0-12330 (Disc swap kit = 11DE0-12030) +; - 12350-12490 +; - 124a0-125c0 + + +; act5 - mass driver (bin.dpk) + +org $80092284 + + + +; $102a0 = buttons +; $102a4 = guncon x +; $102a8 = guncon y +; $102ac = unused temp + + + +; load x-cursor +lui v0,$8001 +lw v1,$02a4(v0) +nop + +; adjust 16.16 format +sll v1,v1,16 +sw v1,$1c(s0) + + + +; load y-cursor +lw v1,$02a8(v0) +nop + +j $800922dc +sll v0,v1,16 diff --git a/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-2e.txt b/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-2e.txt new file mode 100644 index 0000000000..671471eb80 --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-2e.txt @@ -0,0 +1,39 @@ +; DEBUG +; - 102a0-10730 +; - 11220-113d0 +; - 11410-11770 +; - 11de0-12330 (Disc swap kit = 11DE0-12030) +; - 12350-12490 +; - 124a0-125c0 + + +; act7 - lobby (bin.dpk) + +org $800922bc + + + +; $102a0 = buttons +; $102a4 = guncon x +; $102a8 = guncon y +; $102ac = unused temp + + + +; load x-cursor +lui v0,$8001 +lw v1,$02a4(v0) +nop + +; adjust 16.16 format +sll v1,v1,16 +sw v1,$1c(s0) + + + +; load y-cursor +lw v1,$02a8(v0) +nop + +j $800927ec +sll v0,v1,16 diff --git a/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-2f.txt b/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-2f.txt new file mode 100644 index 0000000000..162fe8f5da --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-2f.txt @@ -0,0 +1,39 @@ +; DEBUG +; - 102a0-10730 +; - 11220-113d0 +; - 11410-11770 +; - 11de0-12330 (Disc swap kit = 11DE0-12030) +; - 12350-12490 +; - 124a0-125c0 + + +; act7 - garage (bin.dpk) + +org $80091c98 + + + +; $102a0 = buttons +; $102a4 = guncon x +; $102a8 = guncon y +; $102ac = unused temp + + + +; load x-cursor +lui v0,$8001 +lw v1,$02a4(v0) +nop + +; adjust 16.16 format +sll v1,v1,16 +sw v1,$1c(s0) + + + +; load y-cursor +lw v1,$02a8(v0) +nop + +j $80091cf0 +sll v0,v1,16 diff --git a/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-2g.txt b/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-2g.txt new file mode 100644 index 0000000000..566f7d150c --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/code/japan/pad-guncon-2g.txt @@ -0,0 +1,95 @@ +; DEBUG +; - 102a0-10730 +; 102a0-102b0 = guncon data +; 102b0-103b0 = guncon remap +; 103b0-103e0 = guncon / mouse button shared +; 103e0-10410 = mouse hooks +; 10410-10460 = mouse hooks +; 10460-104xx = guncon - dpad remap + +; - 11220-113d0 +; - 11410-11770 +; - 11DE0-12330 (Disc swap kit = 11DE0-12030) +; - 12350-12490 +; - 124a0-125c0 + + +; gun shooting (bin.dpk) +; - guncon -> dpad + +org $8004856c + +j $80010460 +nop + + + +; $102a0 = buttons +; $102a4 = guncon x +; $102a8 = guncon y +; $102ac = unused temp + +; - t0,at,a2,v0 + +; check $3f938 = mouse, then skip +lui a2,$8003+1 +lbu at,$f939(a2) +ori v0,r0,$12 +beq v0,at,DONE +;nop + +; ========================== +; ========================== +; ========================== + +lui a2,$8001 +lui at,$8006 + + +; update x-y values +lw v0,$02a4(a2) +lw t0,$02a8(a2) + +; 16.16 fixed-format +sll v0,v0,16 +sll t0,t0,16 + +sw v0,$2a58(at) +sw t0,$2a5c(at) + +; ========================== +; ========================== +; ========================== + +; compare changed data +lbu v0,$02a1(a2) +lbu t0,$02a2(a2) +nop +sb v0,$02a2(a2) +xori v0,v0,$ff +xori t0,t0,$ff +xor t0,t0,v0 +and t0,t0,v0 + + + +; check trigger pull +andi t0,t0,$0c +beq t0,r0,DONE +;nop + + +; signal gunshot +ori t0,r0,$0080 +sh t0,$2208(at) + +; ========================== +; ========================== +; ========================== + +DONE: +lui t0,$8006 +lhu t0,$2a4e(t0) + +j $80048574 +nop diff --git a/ps1 - guncon conversions/Policenauts/src/code/japan/spasm.exe b/ps1 - guncon conversions/Policenauts/src/code/japan/spasm.exe new file mode 100644 index 0000000000..c31eff4a16 Binary files /dev/null and b/ps1 - guncon conversions/Policenauts/src/code/japan/spasm.exe differ diff --git a/ps1 - guncon conversions/Policenauts/src/notes/policenauts - guncon - type1.txt b/ps1 - guncon conversions/Policenauts/src/notes/policenauts - guncon - type1.txt new file mode 100644 index 0000000000..346e1665bf --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/notes/policenauts - guncon - type1.txt @@ -0,0 +1,453 @@ +; Prologue - LA Downtown + +; - check BIN.DPK for code (#2 find) + +; port1 +; 3f939 = ID +; 3f93a = button1 +; 3f93b = button2 +; 3f93c = mouse-x +; 3f93d = mouse-y + + +; port2 +; 3f949 = ID +; 3f94a = button1 +; 3f94b = button2 +; 3f94c = mouse-x +; 3f94d = mouse-y + + +If both connected, mouse buttons respond to port2 +- mouse motion responds to both + + + + +Problem: Need to remap guncon -before- we reach here (data caching problems) + + + +; note: copies over BIOS code (!!) + +000048e8 : 96390004 LHU ffffffff (t9), 0004 (1f801040 (s1)) [1f801044] +000048ec : 00000000 NOP +000048f0 : 33280002 ANDI 00001013 (t0), 00000007 (t9), 0002 (2), +000048f4 : 15000006 BNE 00000002 (t0), 00000000 (r0), 00004910, +000048f8 : 00000000 NOP +00004910 : 92220000 LBU 00000000 (v0), 0000 (1f801040 (s1)) [1f801040] +00004914 : 24A5FFFF ADDIU 00000002 (a1), 00000002 (a1), ffff (65535), +00004918 : 00052E00 SLL 00000001 (a1), 00000001 (a1), 18 (24), +0000491c : 00021600 SLL 000000fc (v0), 000000fc (v0), 18 (24), +00004920 : 00021603 SRA fc000000 (v0), fc000000 (v0), 18 (24), +00004924 : 00052E03 SRA 01000000 (a1), 01000000 (a1), 18 (24), + +===> buttons port1 +00004928 : A2620000 SB fffffffc (v0), 0000 (8003f93b (s3)) [8003f93b] +0000492c : 1CA0FF8B BGTZ 00000001 (a1), 0000475c, +00004930 : 26730001 ADDIU 8003f93b (s3), 8003f93b (s3), 0001 (1), +000048bc : 0015102B SLTU 00000001 (v0), 00000000 (r0), 00000000 (s5), +00004934 : 8FAB0040 LW 0000001e (t3), 0040 (00008558 (sp)) [00008598] +00004938 : 00001021 ADDU ffffffe3 (v0), 00000000 (r0), 00000000 (r0), +0000493c : 8D6C0000 LW 0000001f (t4), 0000 (000074c8 (t3)) [000074c8] +00004940 : 00000000 NOP +00004944 : A1800000 SB 00000000 (r0), 0000 (8003f938 (t4)) [8003f938] +00004948 : 10000013 BEQ 00000000 (r0), 00000000 (r0), 00004998, +0000494c : A620000A SH 00000000 (r0), 000a (1f801040 (s1)) [1f80104a] +00004998 : 8FBF0034 LW 000048d0 (ra), 0034 (00008558 (sp)) [0000858c] +0000499c : 8FB0001C LW 1f801070 (s0), 001c (00008558 (sp)) [00008574] +000049a0 : 8FB10020 LW 1f801040 (s1), 0020 (00008558 (sp)) [00008578] +000049a4 : 8FB20024 LW 00000005 (s2), 0024 (00008558 (sp)) [0000857c] +000049a8 : 8FB30028 LW 8003f93e (s3), 0028 (00008558 (sp)) [00008580] +000049ac : 8FB4002C LW ffffff7f (s4), 002c (00008558 (sp)) [00008584] +000049b0 : 8FB50030 LW 00000000 (s5), 0030 (00008558 (sp)) [00008588] +000049b4 : 03E00008 JR 000049d8 (ra), +000049b8 : 27BD0068 ADDIU 00008558 (sp), 00008558 (sp), 0068 (104), + + + + +(vector table) +000049bc : 3C0E0000 LUI 0000020d (t6), 0000 (0), +000049c0 : 8DCE74B8 LW 00000000 (t6), 74b8 (00000000 (t6)) [000074b8] +000049c4 : 27BDFFE8 ADDIU 000085d8 (sp), 000085d8 (sp), ffe8 (65512), +000049c8 : 11C0000C BEQ 00000001 (t6), 00000000 (r0), 000049fc, +000049cc : AFBF0014 SW 00000e28 (ra), 0014 (000085c0 (sp)) [000085d4] + +; port1 read +000049d0 : 0C001126 JAL 00004498, 00000e28 (ra), +000049d4 : 00002021 ADDU 00000001 (a0), 00000000 (r0), 00000000 (r0), + +; port2 read +000049d8 : 0C001126 JAL 00004498, 000049d8 (ra), +000049dc : 24040001 ADDIU 0000000a (a0), 00000000 (r0), 0001 (1), + +000049e0 : 3C0F0000 LUI 00003003 (t7), 0000 (0), +000049e4 : 8DEF74C4 LW 00000000 (t7), 74c4 (00000000 (t7)) [000074c4] +000049e8 : 00000000 NOP +000049ec : 11E00003 BEQ 00000000 (t7), 00000000 (r0), 000049fc, +000049f0 : 00000000 NOP +000049fc : 3C180001 LUI 00003013 (t8), 0001 (1), +00004a00 : 8F188914 LW 00010000 (t8), 8914 (00010000 (t8)) [00008914] +00004a04 : 00000000 NOP +00004a08 : 13000005 BEQ 00000000 (t8), 00000000 (r0), 00004a20, +00004a0c : 00000000 NOP +00004a20 : 3C090000 LUI 00000201 (t1), 0000 (0), +00004a24 : 8D2974BC LW 00000000 (t1), 74bc (00000000 (t1)) [000074bc] +00004a28 : 00000000 NOP +00004a2c : 11200004 BEQ 00000001 (t1), 00000000 (r0), 00004a40, +00004a30 : 8FBF0014 LW 000049e0 (ra), 0014 (000085c0 (sp)) [000085d4] +00004a34 : 0C001400 JAL 00005000, 00000e28 (ra), +00004a38 : 00000000 NOP + + + + + +00010348 : 314AF7FF ANDI 0000fcff (t2), 0000fcff (t2), f7ff (63487), + + + + +(SLPS) + +80023520 : 3C018004 LUI 8003f938 (at), 8004 (32772), +80023524 : 2421F939 ADDIU 80040000 (at), 80040000 (at), f939 (63801), +80023528 : 00250821 ADDU 8003f939 (at), 8003f939 (at), 00000000 (a1), + +; check ID (shared code - both ports) +8002352c : 90220000 LBU 00000000 (v0), 0000 (8003f939 (at)) [8003f939] +80023530 : 00000000 NOP +80023534 : 00021102 SRL 00000012 (v0), 00000012 (v0), 04 (4), +80023538 : 104D0010 BEQ 00000001 (v0), 00000001 (t5), 8002357c, +8002353c : 00000000 NOP + +====> + +; MOUSE ONLY = shared code (gun + story) + +8002357c : A0C90000 SB 00000000 (t1), 0000 (8003f958 (a2)) [8003f958] + +; button2 (same target address) (store into cache) +; - note: only store port1 data +80023580 : 90E20000 LBU 00000001 (v0), 0000 (8003f93b (a3)) [8003f93b] +===> +80023584 : 8CC40004 LW f2000003 (a0), 0004 (8003f958 (a2)) [8003f95c] +80023588 : A0C20003 SB 000000f4 (v0), 0003 (8003f958 (a2)) [8003f95b] +===> + +8002358c : 3C018004 LUI 8003f939 (at), 8004 (32772), +80023590 : 2421F93C ADDIU 80040000 (at), 80040000 (at), f93c (63804), +80023594 : 00250821 ADDU 8003f93c (at), 8003f93c (at), 00000000 (a1), + +; mouse-x (store into cache) +80023598 : 90220000 LBU 000000f4 (v0), 0000 (8003f93c (at)) [8003f93c] +8002359c : 00000000 NOP +800235a0 : A0C20001 SB 00000000 (v0), 0001 (8003f958 (a2)) [8003f959] + +800235a4 : 00021600 SLL 00000000 (v0), 00000000 (v0), 18 (24), +800235a8 : 00021603 SRA 00000000 (v0), 00000000 (v0), 18 (24), +800235ac : 3C018004 LUI 8003f93c (at), 8004 (32772), +800235b0 : 2421F93D ADDIU 80040000 (at), 80040000 (at), f93d (63805), +800235b4 : 00250821 ADDU 8003f93d (at), 8003f93d (at), 00000000 (a1), + +; mouse-y (store into cache) +800235b8 : 90230000 LBU 800234dc (v1), 0000 (8003f93d (at)) [8003f93d] +800235bc : 00441021 ADDU 00000000 (v0), 00000000 (v0), 0000f9b0 (a0), + +; final mouse-x...? (last byte important?) +800235c0 : ACC20004 SW 0000f9b0 (v0), 0004 (8003f958 (a2)) [8003f95c] + +800235c4 : 8CC20008 LW 0000f9b0 (v0), 0008 (8003f958 (a2)) [8003f960] +800235c8 : 340B0001 ORI 00000000 (t3), 00000000 (r0), 0001 (1), +800235cc : A0C30002 SB 00000000 (v1), 0002 (8003f958 (a2)) [8003f95a] + +; chop sign bits..? +800235d0 : 00031E00 SLL 00000000 (v1), 00000000 (v1), 18 (24), +800235d4 : 00031E03 SRA 00000000 (v1), 00000000 (v1), 18 (24), +800235d8 : 00621821 ADDU 00000000 (v1), 00000000 (v1), 00010500 (v0), + +; final mouse-y...? +800235dc : ACC30008 SW 00010500 (v1), 0008 (8003f958 (a2)) [8003f960] + + +800235e0 : 3C018004 LUI 8003f93d (at), 8004 (32772), +800235e4 : 2421F964 ADDIU 80040000 (at), 80040000 (at), f964 (63844), +800235e8 : 00280821 ADDU 8003f964 (at), 8003f964 (at), 00000000 (t0), +800235ec : A42A0000 SH 00000000 (t2), 0000 (8003f964 (at)) [8003f964] +800235f0 : 15600003 BNE 00000001 (t3), 00000000 (r0), 80023600, +800235f4 : 25080004 ADDIU 00000000 (t0), 00000000 (t0), 0004 (4), +80023600 : 24E70010 ADDIU 8003f93b (a3), 8003f93b (a3), 0010 (16), +80023604 : 25290001 ADDIU 00000000 (t1), 00000000 (t1), 0001 (1), +80023608 : 29220002 SLTI 00010500 (v0), 00000001 (t1), 0002 (2), +8002360c : 1440FFBD BNE 00000001 (v0), 00000000 (r0), 80023504, +80023610 : 24A50010 ADDIU 00000000 (a1), 00000000 (a1), 0010 (16), +80023614 : 03E00008 JR 800233d8 (ra), +80023618 : 00000000 NOP + + + +====> + +80023748 : 8C42F95C LW 80040000 (v0), f95c (80040000 (v0)) [8003f95c] +8002374c : 00000000 NOP +80023750 : AC820004 SW 0000f8b1 (v0), 0004 (80062a40 (a0)) [80062a44] + +80023754 : 3C028004 LUI 0000f8b1 (v0), 8004 (32772), +80023758 : 8C42F960 LW 80040000 (v0), f960 (80040000 (v0)) [8003f960] +8002375c : 00000000 NOP +80023760 : AC820008 SW 0001057d (v0), 0008 (80062a40 (a0)) [80062a48] + +80023764 : 90620000 LBU 0001057d (v0), 0000 (8003f958 (v1)) [8003f958] +80023768 : 90830004 LBU 8003f958 (v1), 0004 (80062a40 (a0)) [80062a44] +8002376c : A0820000 SB 00000000 (v0), 0000 (80062a40 (a0)) [80062a40] + +; mouse-x draw? old -> new? +80023770 : 3C028004 LUI 00000000 (v0), 8004 (32772), +80023774 : 9042F95C LBU 80040000 (v0), f95c (80040000 (v0)) [8003f95c] +80023778 : 00000000 NOP +8002377c : 00431023 SUBU 000000b1 (v0), 000000b1 (v0), 000000b1 (v1), +80023780 : A0820002 SB 00000000 (v0), 0002 (80062a40 (a0)) [80062a42] + +; mouse-y draw? old -> new? +80023784 : 3C028004 LUI 00000000 (v0), 8004 (32772), +80023788 : 9042F960 LBU 80040000 (v0), f960 (80040000 (v0)) [8003f960] +8002378c : 90830008 LBU 000000b1 (v1), 0008 (80062a40 (a0)) [80062a48] +80023790 : 00000000 NOP +80023794 : 00431023 SUBU 0000007d (v0), 0000007d (v0), 0000007d (v1), +80023798 : A0820003 SB 00000000 (v0), 0003 (80062a40 (a0)) [80062a43] + + + + + +800237b8 : 8C42F95C LW 80040000 (v0), f95c (80040000 (v0)) [8003f95c] +800237bc : 00000000 NOP +800237c0 : AC820004 SW 0000f8b1 (v0), 0004 (80062a40 (a0)) [80062a44] +800237c4 : 3C038004 LUI 0000007d (v1), 8004 (32772), +800237c8 : 8C63F960 LW 80040000 (v1), f960 (80040000 (v1)) [8003f960] + +; signals mouse code to subroutine caller below (!!!) +800237cc : 34020001 ORI 0000f8b1 (v0), 00000000 (r0), 0001 (1), + +800237d0 : AC830008 SW 0001057d (v1), 0008 (80062a40 (a0)) [80062a48] + + + + + + + +80048434 : 3C028006 LUI 00000000 (v0), 8006 (32774), +80048438 : 94422A4E LHU 80060000 (v0), 2a4e (80060000 (v0)) [80062a4e] +8004843c : 00000000 NOP +80048440 : 1440004A BNE 00000000 (v0), 00000000 (r0), 8004856c, +80048444 : 00008021 ADDU 800682a8 (s0), 00000000 (r0), 00000000 (r0), + +; get input data - check mouse +80048448 : 0C011DF0 JAL 800477c0, 80048434 (ra), +8004844c : 00000000 NOP +80048450 : 10400046 BEQ 00000001 (v0), 00000000 (r0), 8004856c, +80048454 : 00000000 NOP + +; gun shooting only - mouse code +80048458 : 3C068006 LUI 00000000 (a2), 8006 (32774), +8004845c : 24C62A80 ADDIU 80060000 (a2), 80060000 (a2), 2a80 (10880), +80048460 : 3C088006 LUI 000020d4 (t0), 8006 (32774), + + +; somehow ends behaving like a dot motion amount + +c0 8003f95c 0001 +c0 80048470 24440000 +subu = 0 + + +; check for laser dot x-delta change +; - a0 = 32-bit + / - +80048464 : 8D082A44 LW 80060000 (t0), 2a44 (80060000 (t0)) [80062a44] +80048468 : 8CC20000 LW 00000001 (v0), 0000 (80062a80 (a2)) [80062a80] +8004846c : 00000000 NOP +80048470 : 01022023 SUBU 00000001 (a0), 0000f9af (t0), 0000f931 (v0), +80048474 : 04810002 BGEZ 0000007e (a0), 80048480, +80048478 : 00801021 ADDU 0000f931 (v0), 0000007e (a0), 00000000 (r0), + +8004847c : 00021023 SUBU fffffff2 (v0), 00000000 (r0), fffffff2 (v0), + + +; (x*2 + 128) * 380 +80048480 : 00021040 SLL 0000007e (v0), 0000007e (v0), 01 (1), +80048484 : 24420080 ADDIU 000000fc (v0), 000000fc (v0), 0080 (128), +80048488 : 00820018 MULT 0000007e (a0), 0000017c (v0), +8004848c : 3C078006 LUI 0000000c (a3), 8006 (32774), +80048490 : 8CE72A48 LW 80060000 (a3), 2a48 (80060000 (a3)) [80062a48] +80048494 : 8CC20004 LW 0000017c (v0), 0004 (80062a80 (a2)) [80062a84] +80048498 : 00001812 MFLO ffff0000 (v1), 0000bb08 (lo), +8004849c : 04610002 BGEZ 0000bb08 (v1), 800484a8, +800484a0 : 00E22823 SUBU 80062a4c (a1), 00010644 (a3), 00010580 (v0), + +800484a4 : 2463007F ADDIU fffff778 (v1), fffff778 (v1), 007f (127), + +800484a8 : 04A10002 BGEZ 000000c4 (a1), 800484b4, +800484ac : 00A01021 ADDU 00010580 (v0), 000000c4 (a1), 00000000 (r0), + +800484b0 : 00021023 SUBU ffffff80 (v0), 00000000 (r0), ffffff80 (v0), + +; (y*2 + 128) * 520 +800484b4 : 00021040 SLL 000000c4 (v0), 000000c4 (v0), 01 (1), +800484b8 : 24420080 ADDIU 00000188 (v0), 00000188 (v0), 0080 (128), +800484bc : 00A20018 MULT 000000c4 (a1), 00000208 (v0), + +*** output x? +800484c0 : 000321C3 SRA 0000007e (a0), 0000bb08 (v1), 07 (7), + +800484c4 : 00001812 MFLO 0000bb08 (v1), 00018e20 (lo), +800484c8 : 04610002 BGEZ 00018e20 (v1), 800484d4, +800484cc : 00000000 NOP + +800484d0 : 2463007F ADDIU ffff4000 (v1), ffff4000 (v1), 007f (127), + +800484d4 : 3C028006 LUI 00000208 (v0), 8006 (32774), +800484d8 : 90422A55 LBU 80060000 (v0), 2a55 (80060000 (v0)) [80062a55] + +*** output y? +800484dc : 000329C3 SRA 000000c4 (a1), 00018e20 (v1), 07 (7), + +800484e0 : ACC80000 SW 0000f9af (t0), 0000 (80062a80 (a2)) [80062a80] +800484e4 : 14400006 BNE 00000000 (v0), 00000000 (r0), 80048500, + +====> JMP IF DELTA CHANGE + + +; gun trigger pulled here +800484e8 : ACC70004 SW 00010644 (a3), 0004 (80062a80 (a2)) [80062a84] +800484ec : 34020001 ORI 00000000 (v0), 00000000 (r0), 0001 (1), +800484f0 : 3C018006 LUI 80060000 (at), 8006 (32774), +800484f4 : A0222A55 SB 00000001 (v0), 2a55 (80060000 (at)) [80062a55] +800484f8 : 08012253 J 8004894c, +800484fc : 00000000 NOP + + +(JMP HERE) +80048500 : 3C038006 LUI 00003a20 (v1), 8006 (32774), +80048504 : 8C63220C LW 80060000 (v1), 220c (80060000 (v1)) [8006220c] +80048508 : 00000000 NOP +8004850c : 2463FFFD ADDIU 00000005 (v1), 00000005 (v1), fffd (65533), +80048510 : 00031040 SLL 00000001 (v0), 00000002 (v1), 01 (1), +80048514 : 00431021 ADDU 00000004 (v0), 00000004 (v0), 00000002 (v1), +80048518 : 00021300 SLL 00000006 (v0), 00000006 (v0), 0c (12), +8004851c : 3403A000 ORI 00000002 (v1), 00000000 (r0), a000 (40960), +80048520 : 00431021 ADDU 00006000 (v0), 00006000 (v0), 0000a000 (v1), +80048524 : 00021083 SRA 00010000 (v0), 00010000 (v0), 02 (2), + +(***) +80048528 : 00820018 MULT 00000001 (a0), 00004000 (v0), +8004852c : 00001812 MFLO 0000a000 (v1), 00004000 (lo), +80048530 : 00A20018 MULT 00000074 (a1), 00004000 (v0), +80048534 : 3C028006 LUI 00004000 (v0), 8006 (32774), + + +; in-game cursor-x + delta-x (instant) +; - 00a0 / 0000 = center (320) +80048538 : 8C422A58 LW 80060000 (v0), 2a58 (80060000 (v0)) [80062a58] +8004853c : 00000000 NOP +80048540 : 00621821 ADDU 00004000 (v1), 00004000 (v1), 00a90000 (v0), +80048544 : 3C018006 LUI 80060000 (at), 8006 (32774), +80048548 : AC232A58 SW 00a94000 (v1), 2a58 (80060000 (at)) [80062a58] + + +; in-game cursor-y + delta-y +8004854c : 3C038006 LUI 00a94000 (v1), 8006 (32774), +80048550 : 8C632A5C LW 80060000 (v1), 2a5c (80060000 (v1)) [80062a5c] +80048554 : 00001012 MFLO 00a90000 (v0), 001d0000 (lo), +80048558 : 00431021 ADDU 001d0000 (v0), 001d0000 (v0), 00594000 (v1), +8004855c : 3C018006 LUI 80060000 (at), 8006 (32774), +80048560 : AC222A5C SW 00764000 (v0), 2a5c (80060000 (at)) [80062a5c] + +80048564 : 08012253 J 8004894c, +80048568 : 34110001 ORI 00000000 (s1), 00000000 (r0), 0001 (1), + + + + + + + +; xy-values for laser dot? (force to zero) +; - also shot marker though +8004913c : 8C910000 LW 00000001 (s1), 0000 (80062a58 (a0)) [80062a58] +80049140 : 8C920004 LW 0000000c (s2), 0004 (80062a58 (a0)) [80062a5c] +80049144 : 00C21024 AND 000c00a0 (v0), 00000000 (a2), 000c00a0 (v0), +80049148 : 10400003 BEQ 00000000 (v0), 00000000 (r0), 80049158, +8004914c : 24850004 ADDIU 80062a5c (a1), 80062a58 (a0), 0004 (4), +80049158 : 3C028007 LUI 00000000 (v0), 8007 (32775), +8004915c : 8C42CED0 LW 80070000 (v0), ced0 (80070000 (v0)) [8006ced0] +80049160 : 00000000 NOP +80049164 : 00C21024 AND 00000010 (v0), 00000000 (a2), 00000010 (v0), +80049168 : 10400003 BEQ 00000000 (v0), 00000000 (r0), 80049178, +8004916c : 00000000 NOP +80049178 : 3C038007 LUI 00040000 (v1), 8007 (32775), +8004917c : 8C63CEE0 LW 80070000 (v1), cee0 (80070000 (v1)) [8006cee0] +80049180 : 3C028007 LUI 00000000 (v0), 8007 (32775), +80049184 : 8C42CEE4 LW 80070000 (v0), cee4 (80070000 (v0)) [8006cee4] +80049188 : 00000000 NOP +8004918c : 00621025 OR 0000000a (v0), 00000005 (v1), 0000000a (v0), +80049190 : 00461024 AND 0000000f (v0), 0000000f (v0), 00000000 (a2), +80049194 : 10400003 BEQ 00000000 (v0), 00000000 (r0), 800491a4, +80049198 : 00C33024 AND 00000000 (a2), 00000000 (a2), 00000005 (v1), +800491a4 : 02202021 ADDU 80062a58 (a0), 00a00000 (s1), 00000000 (r0), +800491a8 : 02402821 ADDU 80062a5c (a1), 00080000 (s2), 00000000 (r0), +800491ac : 0C012E31 JAL 8004b8c4, 800492a0 (ra), +800491b0 : 02003021 ADDU 00000000 (a2), 00000000 (s0), 00000000 (r0), + + +8004bb88 : 3C13BFFF LUI 00000002 (s3), bfff (49151), +8004bb8c : 3C02FFFD LUI 8004bb88 (v0), fffd (65533), + +---> +8004bb90 : 02821821 ADDU 00000000 (v1), 000d0000 (s4), fffd0000 (v0), +8004bb94 : 3C058006 LUI 00080000 (a1), 8006 (32774), +8004bb98 : 8CA52A94 LW 80060000 (a1), 2a94 (80060000 (a1)) [80062a94] + +---> +8004bb9c : 02A21021 ADDU fffd0000 (v0), 00080000 (s5), fffd0000 (v0), + +; draw laser dot1-y +8004bba0 : ACA20018 SW 00050000 (v0), 0018 (8006ca94 (a1)) [8006caac] +8004bba4 : 8CA20000 LW 00050000 (v0), 0000 (8006ca94 (a1)) [8006ca94] +8004bba8 : 3673FFFF ORI bfff0000 (s3), bfff0000 (s3), ffff (65535), + +; draw laser dot1-x +8004bbac : ACA30014 SW 000a0000 (v1), 0014 (8006ca94 (a1)) [8006caa8] + + + + + +; laser dot shot (6caa8 / 6caac) +8004be94 : 8CA52AAC LW 80060000 (a1), 2aac (80060000 (a1)) [80062aac] +---> force addu +8004be98 : 02A21021 ADDU fffd0000 (v0), 00c20000 (s5), fffd0000 (v0), +8004be9c : AC830014 SW 012c0000 (v1), 0014 (8006ca94 (a0)) [8006caa8] +---> +8004bea0 : 0C01267A JAL 800499e8, 8004b9e4 (ra), +---> +8004bea4 : AC820018 SW 00bf0000 (v0), 0018 (8006ca94 (a0)) [8006caac] + + + + + +; laser dot reload (6caa8 / 6caac) +8004bfb4 : 8C842A94 LW 80060000 (a0), 2a94 (80060000 (a0)) [80062a94] +---> force addu +8004bfb8 : 02831021 ADDU 00000000 (v0), 01320000 (s4), fffd0000 (v1), +8004bfbc : AC820014 SW 012f0000 (v0), 0014 (8006ca94 (a0)) [8006caa8] +8004bfc0 : 8C820000 LW 012f0000 (v0), 0000 (8006ca94 (a0)) [8006ca94] +---> force addu +8004bfc4 : 02A31821 ADDU fffd0000 (v1), 00dc0000 (s5), fffd0000 (v1), +8004bfc8 : 3C018006 LUI 80060000 (at), 8006 (32774), +8004bfcc : AC202270 SW 00000000 (r0), 2270 (80060000 (at)) [80062270] +8004bfd0 : 3C018006 LUI 80060000 (at), 8006 (32774), +8004bfd4 : AC2022BC SW 00000000 (r0), 22bc (80060000 (at)) [800622bc] +8004bfd8 : AC830018 SW 00d90000 (v1), 0018 (8006ca94 (a0)) [8006caac] diff --git a/ps1 - guncon conversions/Policenauts/src/notes/policenauts - guncon - type1a.txt b/ps1 - guncon conversions/Policenauts/src/notes/policenauts - guncon - type1a.txt new file mode 100644 index 0000000000..d9df786225 --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/notes/policenauts - guncon - type1a.txt @@ -0,0 +1,242 @@ +; cache mouse button +800237a0 : 9042F95B LBU 80040000 (v0), f95b (80040000 (v0)) [8003f95b] +800237a4 : 00000000 NOP +800237a8 : 00021027 NOR 000000fc (v0), 00000000 (r0), 000000fc (v0), +800237ac : 3042000C ANDI ffffff03 (v0), ffffff03 (v0), 000c (12), +800237b0 : A0820001 SB 00000000 (v0), 0001 (80062a40 (a0)) [80062a41] + + +; mouse cache --> 62208 +80047604 : 90632A41 LBU 80060000 (v1), 2a41 (80060000 (v1)) [80062a41] +80047608 : 00000000 NOP +8004760c : 00031C00 SLL 00000000 (v1), 00000000 (v1), 10 (16), +80047610 : 3C018006 LUI 8003f968 (at), 8006 (32774), +80047614 : AC232208 SW 00000000 (v1), 2208 (80060000 (at)) [80062208] + + + + + + + +80048450 : 10400046 BEQ 00000000 (v0), 00000000 (r0), 8004856c, +80048454 : 00000000 NOP + + +; D-pad +8004856c : 3C088006 LUI 000020d4 (t0), 8006 (32774), +80048570 : 95082A4E LHU 80060000 (t0), 2a4e (80060000 (t0)) [80062a4e] +80048574 : 3C018006 LUI 80060000 (at), 8006 (32774), +80048578 : A0202A55 SB 00000000 (r0), 2a55 (80060000 (at)) [80062a55] +8004857c : 3106F000 ANDI 00000000 (a2), 00000000 (t0), f000 (61440), +80048580 : 10C000C0 BEQ 00000000 (a2), 00000000 (r0), 80048884, +80048584 : 00000000 NOP + + +???? +80048588 : 3C028006 LUI 00002000 (v0), 8006 (32774), +8004858c : 8C422A6C LW 80060000 (v0), 2a6c (80060000 (v0)) [80062a6c] +80048590 : 00000000 NOP +80048594 : 1446000C BNE ffffffff (v0), 00002000 (a2), 800485c8, +80048598 : 34030001 ORI ffff2000 (v1), 00000000 (r0), 0001 (1), +800485c8 : 3C028006 LUI ffffffff (v0), 8006 (32774), +800485cc : 8C422A70 LW 80060000 (v0), 2a70 (80060000 (v0)) [80062a70] +800485d0 : 3C018006 LUI 80060000 (at), 8006 (32774), +800485d4 : A0232A54 SB 00000001 (v1), 2a54 (80060000 (at)) [80062a54] +800485d8 : 3C018006 LUI 80060000 (at), 8006 (32774), +800485dc : AC262A6C SW 00002000 (a2), 2a6c (80060000 (at)) [80062a6c] +800485e0 : 24470001 ADDIU 0000000c (a3), 00000000 (v0), 0001 (1), +800485e4 : 34020002 ORI 00000000 (v0), 00000000 (r0), 0002 (2), +800485e8 : 3C018006 LUI 80060000 (at), 8006 (32774), +800485ec : AC272A70 SW 00000001 (a3), 2a70 (80060000 (at)) [80062a70] +800485f0 : 14E2001C BNE 00000001 (a3), 00000002 (v0), 80048664, +800485f4 : 34020006 ORI 00000002 (v0), 00000000 (r0), 0006 (6), +(..) + +80048664 : 14E2001C BNE 00000001 (a3), 00000006 (v0), 800486d8, +80048668 : 31020040 ANDI 00000006 (v0), 00002000 (t0), 0040 (64), + +??? reload +8004866c : 3C059249 LUI 80062a4c (a1), 9249 (37449), +80048670 : 3C028006 LUI 00000000 (v0), 8006 (32774), +80048674 : 8C42220C LW 80060000 (v0), 220c (80060000 (v0)) [8006220c] +80048678 : 34A52493 ORI 92490000 (a1), 92490000 (a1), 2493 (9363), +8004867c : 2442FFFD ADDIU 00000005 (v0), 00000005 (v0), fffd (65533), +80048680 : 00021840 SLL 00000001 (v1), 00000002 (v0), 01 (1), +80048684 : 00621821 ADDU 00000004 (v1), 00000004 (v1), 00000002 (v0), +80048688 : 00031B40 SLL 00000006 (v1), 00000006 (v1), 0d (13), +8004868c : 3C020001 LUI 00000002 (v0), 0001 (1), +80048690 : 00621821 ADDU 0000c000 (v1), 0000c000 (v1), 00010000 (v0), +80048694 : 00032100 SLL 00000001 (a0), 0001c000 (v1), 04 (4), +80048698 : 00832023 SUBU 001c0000 (a0), 001c0000 (a0), 0001c000 (v1), +8004869c : 00042040 SLL 001a4000 (a0), 001a4000 (a0), 01 (1), +800486a0 : 00850018 MULT 00348000 (a0), 92492493 (a1), +800486a4 : 00031040 SLL 00010000 (v0), 0001c000 (v1), 01 (1), +800486a8 : 00431021 ADDU 00038000 (v0), 00038000 (v0), 0001c000 (v1), +800486ac : 00021040 SLL 00054000 (v0), 00054000 (v0), 01 (1), +800486b0 : 3C018006 LUI 80060000 (at), 8006 (32774), +800486b4 : AC222A78 SW 000a8000 (v0), 2a78 (80060000 (at)) [80062a78] +800486b8 : 00001010 MFHI 000a8000 (v0), ffe98000 (hi), +(..) + + +800486d8 : 3C048006 LUI 00000001 (a0), 8006 (32774), +800486dc : 8C842A7C LW 80060000 (a0), 2a7c (80060000 (a0)) [80062a7c] +800486e0 : 3C038006 LUI 00000001 (v1), 8006 (32774), +800486e4 : 8C632A78 LW 80060000 (v1), 2a78 (80060000 (v1)) [80062a78] +800486e8 : 10400017 BEQ 00000000 (v0), 00000000 (r0), 80048748, +800486ec : 3C059249 LUI 80062a4c (a1), 9249 (37449), + + +; square = fire +80048748 : 30C28000 ANDI 00000000 (v0), 00002000 (a2), 8000 (32768), +8004874c : 1040001A BEQ 00000000 (v0), 00000000 (r0), 800487b8, +80048750 : 30C21000 ANDI 00000000 (v0), 00002000 (a2), 1000 (4096), +(..) + +800487b8 : 30C22000 ANDI 00000000 (v0), 00002000 (a2), 2000 (8192), +800487bc : 10400020 BEQ 00002000 (v0), 00000000 (r0), 80048840, +800487c0 : 30C21000 ANDI 00002000 (v0), 00002000 (a2), 1000 (4096), +800487c4 : 10400008 BEQ 00000000 (v0), 00000000 (r0), 800487e8, +800487c8 : 30C24000 ANDI 00000000 (v0), 00002000 (a2), 4000 (16384), +(..) + +800487e8 : 1040000D BEQ 00000000 (v0), 00000000 (r0), 80048820, +800487ec : 00000000 NOP +(..) + + + + +; left push = x-cursor +80048820 : 3C028006 LUI 00000000 (v0), 8006 (32774), +80048824 : 8C422A58 LW 80060000 (v0), 2a58 (80060000 (v0)) [80062a58] +80048828 : 00000000 NOP +8004882c : 00621021 ADDU 00a00000 (v0), 00010000 (v1), 00a00000 (v0), +80048830 : 3C018006 LUI 80060000 (at), 8006 (32774), +80048834 : AC222A58 SW 00a10000 (v0), 2a58 (80060000 (at)) [80062a58] +80048838 : 08012252 J 80048948, +8004883c : 34110001 ORI 00000000 (s1), 00000000 (r0), 0001 (1), + + + +; down push = y-cursor +80048840 : 10400005 BEQ 00000000 (v0), 00000000 (r0), 80048858, +80048844 : 00000000 NOP +80048858 : 30C24000 ANDI 00000000 (v0), 00004000 (a2), 4000 (16384), +8004885c : 1040003A BEQ 00004000 (v0), 00000000 (r0), 80048948, +80048860 : 34110001 ORI 00000000 (s1), 00000000 (r0), 0001 (1), +80048864 : 3C028006 LUI 00004000 (v0), 8006 (32774), +80048868 : 8C422A5C LW 80060000 (v0), 2a5c (80060000 (v0)) [80062a5c] +8004886c : 00000000 NOP +80048870 : 00621021 ADDU 00580000 (v0), 00010000 (v1), 00580000 (v0), +80048874 : 3C018006 LUI 80060000 (at), 8006 (32774), +80048878 : AC222A5C SW 00590000 (v0), 2a5c (80060000 (at)) [80062a5c] +8004887c : 08012252 J 80048948, +80048880 : 34110001 ORI 00000001 (s1), 00000000 (r0), 0001 (1), + + + + +??? +80048884 : 3C028006 LUI 00000000 (v0), 8006 (32774), +80048888 : 90422A54 LBU 80060000 (v0), 2a54 (80060000 (v0)) [80062a54] +8004888c : 00000000 NOP +80048890 : 1040001E BEQ 00000000 (v0), 00000000 (r0), 8004890c, +80048894 : 00000000 NOP +8004890c : 3C028006 LUI 00000000 (v0), 8006 (32774), +80048910 : 8C422A74 LW 80060000 (v0), 2a74 (80060000 (v0)) [80062a74] +80048914 : 00000000 NOP +80048918 : 2442FFFF ADDIU ffffff33 (v0), ffffff33 (v0), ffff (65535), +8004891c : 3C018006 LUI 80060000 (at), 8006 (32774), +80048920 : AC222A74 SW ffffff32 (v0), 2a74 (80060000 (at)) [80062a74] +80048924 : 04410009 BGEZ ffffff32 (v0), 8004894c, +80048928 : 31100FFF ANDI 00000000 (s0), 00000000 (t0), 0fff (4095), +8004892c : 3C020001 LUI ffffff32 (v0), 0001 (1), +80048930 : 3C018006 LUI 80060000 (at), 8006 (32774), +80048934 : AC222A78 SW 00010000 (v0), 2a78 (80060000 (at)) [80062a78] +80048938 : 3C018006 LUI 80060000 (at), 8006 (32774), +8004893c : AC222A7C SW 00010000 (v0), 2a7c (80060000 (at)) [80062a7c] +80048940 : 3C018006 LUI 80060000 (at), 8006 (32774), +80048944 : AC202A70 SW 00000000 (r0), 2a70 (80060000 (at)) [80062a70] +80048948 : 31100FFF ANDI 00000000 (s0), 00000000 (t0), 0fff (4095), + + + + +(SHARED AREA) + +8004894c : 1220001E BEQ 00000000 (s1), 00000000 (r0), 800489c8, +80048950 : 3C02000C LUI 00010000 (v0), 000c (12), + + +; button area? +800489c8 : 3C038006 LUI ffff0000 (v1), 8006 (32774), +800489cc : 8C632208 LW 80060000 (v1), 2208 (80060000 (v1)) [80062208] +800489d0 : 3C028006 LUI 000c0000 (v0), 8006 (32774), +800489d4 : 8C422A68 LW 80060000 (v0), 2a68 (80060000 (v0)) [80062a68] +800489d8 : 02038025 OR 00000000 (s0), 00000000 (s0), 00000000 (v1), +800489dc : 00021027 NOR 00000000 (v0), 00000000 (r0), 00000000 (v0), +800489e0 : 02021024 AND ffffffff (v0), 00000000 (s0), ffffffff (v0), +800489e4 : 3C018006 LUI 80060000 (at), 8006 (32774), +800489e8 : AC302A60 SW 00000000 (s0), 2a60 (80060000 (at)) [80062a60] +800489ec : 3C018006 LUI 80060000 (at), 8006 (32774), +800489f0 : AC222A64 SW 00000000 (v0), 2a64 (80060000 (at)) [80062a64] +800489f4 : 3C018006 LUI 80060000 (at), 8006 (32774), +800489f8 : AC302A68 SW 00000000 (s0), 2a68 (80060000 (at)) [80062a68] + +800489fc : 8FBF0018 LW 80048450 (ra), 0018 (801b4e14 (sp)) [801b4e2c] +80048a00 : 8FB10014 LW 00000000 (s1), 0014 (801b4e14 (sp)) [801b4e28] +80048a04 : 8FB00010 LW 00000000 (s0), 0010 (801b4e14 (sp)) [801b4e24] +80048a08 : 27BD0020 ADDIU 801b4e14 (sp), 801b4e14 (sp), 0020 (32), +80048a0c : 03E00008 JR 80049298 (ra), +80048a10 : 00000000 NOP + + + + + + + + +80049298 : 0C012443 JAL 8004910c, 80049298 (ra), +8004929c : 00000000 NOP +8004910c : 27BDFFE0 ADDIU 801b4e34 (sp), 801b4e34 (sp), ffe0 (65504), +80049110 : AFB00010 SW 800682a8 (s0), 0010 (801b4e14 (sp)) [801b4e24] +80049114 : 00008021 ADDU 800682a8 (s0), 00000000 (r0), 00000000 (r0), +80049118 : 3C048006 LUI 00000000 (a0), 8006 (32774), +8004911c : 24842A58 ADDIU 80060000 (a0), 80060000 (a0), 2a58 (10840), + + +??? +80049120 : 3C068006 LUI 00000000 (a2), 8006 (32774), +80049124 : 8CC62A64 LW 80060000 (a2), 2a64 (80060000 (a2)) [80062a64] +80049128 : 3C028007 LUI 00000000 (v0), 8007 (32775), +8004912c : 8C42CECC LW 80070000 (v0), cecc (80070000 (v0)) [8006cecc] +80049130 : AFBF001C SW 800492a0 (ra), 001c (801b4e14 (sp)) [801b4e30] +80049134 : AFB20018 SW 0000000c (s2), 0018 (801b4e14 (sp)) [801b4e2c] +80049138 : AFB10014 SW 00000001 (s1), 0014 (801b4e14 (sp)) [801b4e28] + +8004913c : 8C910000 LW 00000001 (s1), 0000 (80062a58 (a0)) [80062a58] +80049140 : 8C920004 LW 0000000c (s2), 0004 (80062a58 (a0)) [80062a5c] +80049144 : 00C21024 AND 000c00a0 (v0), 00000000 (a2), 000c00a0 (v0), +80049148 : 10400003 BEQ 00000000 (v0), 00000000 (r0), 80049158, +8004914c : 24850004 ADDIU 80062a4c (a1), 80062a58 (a0), 0004 (4), + +; square = fire +80049150 : 08012469 J 800491a4, +80049154 : 34100001 ORI 00000000 (s0), 00000000 (r0), 0001 (1), + + + + + + +; x-cursor adjust +8004879c : 8C422A58 LW 80060000 (v0), 2a58 (80060000 (v0)) [80062a58] +800487a0 : 00000000 NOP +800487a4 : 00431023 SUBU 00000000 (v0), 00000000 (v0), 00150000 (v1), +800487a8 : 3C018006 LUI 80060000 (at), 8006 (32774), +800487ac : AC222A58 SW ffeb0000 (v0), 2a58 (80060000 (at)) [80062a58] +800487b0 : 08012252 J 80048948, +800487b4 : 34110001 ORI 00000000 (s1), 00000000 (r0), 0001 (1), diff --git a/ps1 - guncon conversions/Policenauts/src/notes/policenauts - guncon - type2.txt b/ps1 - guncon conversions/Policenauts/src/notes/policenauts - guncon - type2.txt new file mode 100644 index 0000000000..f8ff769c4f --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/notes/policenauts - guncon - type2.txt @@ -0,0 +1,230 @@ +Shooting range #2-3 + +; port1 +; 3f939 = ID +; 3f93a = button1 +; 3f93b = button2 +; 3f93c = mouse-x +; 3f93d = mouse-y + + +; port2 +; 3f949 = ID +; 3f94a = button1 +; 3f94b = button2 +; 3f94c = mouse-x +; 3f94d = mouse-y + + +; aa635 = ID 1 +; aa636 = button1 +; aa637 = button2 +; aa638 = mouse-x +; aa639 = mouse-y + +; aa68d = ID 1 +; aa68e = button1 +; aa68f = button2 +; aa690 = mouse-x +; aa691 = mouse-y + + +; cache joypad data (whole range) +8006f474 : 90820000 LBU 8003f938 (v0), 0000 (8003f938 (a0)) [8003f938] +8006f478 : 00000000 NOP +8006f47c : 3C01800B LUI 800b0000 (at), 800b (32779), +8006f480 : 2421A634 ADDIU 800b0000 (at), 800b0000 (at), a634 (42548), +8006f484 : 00230821 ADDU 800aa634 (at), 800aa634 (at), 00000000 (v1), +8006f488 : A0220000 SB 00000000 (v0), 0000 (800aa634 (at)) [800aa634] +8006f48c : 24630001 ADDIU 00000000 (v1), 00000000 (v1), 0001 (1), +8006f490 : 28620006 SLTI 00000000 (v0), 00000001 (v1), 0006 (6), +8006f494 : 1440FFF7 BNE 00000001 (v0), 00000000 (r0), 8006f474, +8006f498 : 24840001 ADDIU 8003f938 (a0), 8003f938 (a0), 0001 (1), +8006f49c : 0C008E58 JAL 80023960, 8006f46c (ra), +8006f4a0 : 34040002 ORI 8003f93e (a0), 00000000 (r0), 0002 (2), +8006f4a4 : 00001821 ADDU 00000020 (v1), 00000000 (r0), 00000000 (r0), +8006f4a8 : 00402021 ADDU 00000002 (a0), 8003f948 (v0), 00000000 (r0), + + +8006f4ac : 90820000 LBU 8003f948 (v0), 0000 (8003f948 (a0)) [8003f948] +8006f4b0 : 00000000 NOP +8006f4b4 : 3C01800B LUI 800aa639 (at), 800b (32779), +8006f4b8 : 2421A68C ADDIU 800b0000 (at), 800b0000 (at), a68c (42636), +8006f4bc : 00230821 ADDU 800aa68c (at), 800aa68c (at), 00000000 (v1), +8006f4c0 : A0220000 SB 00000000 (v0), 0000 (800aa68c (at)) [800aa68c] + +8006f4c4 : 24630001 ADDIU 00000000 (v1), 00000000 (v1), 0001 (1), +8006f4c8 : 28620006 SLTI 00000000 (v0), 00000001 (v1), 0006 (6), +8006f4cc : 1440FFF7 BNE 00000001 (v0), 00000000 (r0), 8006f4ac, +8006f4d0 : 24840001 ADDIU 8003f948 (a0), 8003f948 (a0), 0001 (1), +8006f4d4 : 3C03800B LUI 00000006 (v1), 800b (32779), +8006f4d8 : 9063A634 LBU 800b0000 (v1), a634 (800b0000 (v1)) [800aa634] +8006f4dc : 340200FF ORI 00000000 (v0), 00000000 (r0), 00ff (255), +8006f4e0 : 1062004A BEQ 00000000 (v1), 000000ff (v0), 8006f60c, +8006f4e4 : 34030010 ORI 00000000 (v1), 00000000 (r0), 0010 (16), + + + + +; check mouse ID +8006f4e8 : 3C02800B LUI 000000ff (v0), 800b (32779), +8006f4ec : 9042A635 LBU 800b0000 (v0), a635 (800b0000 (v0)) [800aa635] +8006f4f0 : 00000000 NOP +8006f4f4 : 304200F0 ANDI 00000012 (v0), 00000012 (v0), 00f0 (240), +8006f4f8 : 14430044 BNE 00000010 (v0), 00000010 (v1), 8006f60c, +8006f4fc : 00000000 NOP + +; MOUSE code +8006f500 : 3C02800B LUI 00000010 (v0), 800b (32779), +8006f504 : 9042A638 LBU 800b0000 (v0), a638 (800b0000 (v0)) [800aa638] +8006f508 : 00000000 NOP +8006f50c : 1440000D BNE 000000ec (v0), 00000000 (r0), 8006f544, +8006f510 : 00000000 NOP + +(..) + +; mouse-xy +8006f544 : 3C03800B LUI 00000010 (v1), 800b (32779), +8006f548 : 8063A638 LB 800b0000 (v1), a638 (800b0000 (v1)) [800aa638] +8006f54c : 3C04800B LUI 8003f94e (a0), 800b (32779), +8006f550 : 8084A639 LB 800b0000 (a0), a639 (800b0000 (a0)) [800aa639] + +8006f554 : 3C02800B LUI 00000080 (v0), 800b (32779), +8006f558 : 8C42A6E4 LW 800b0000 (v0), a6e4 (800b0000 (v0)) [800aa6e4] +8006f55c : 3C05800B LUI 00000000 (a1), 800b (32779), +8006f560 : 8CA5A6E8 LW 800b0000 (a1), a6e8 (800b0000 (a1)) [800aa6e8] +8006f564 : AE000000 SW 00000000 (r0), 0000 (800aab68 (s0)) [800aab68] + + +; update mouse cursor position +8006f568 : 00621821 ADDU ffffff80 (v1), ffffff80 (v1), fffffdf2 (v0), +8006f56c : 00852021 ADDU 0000007f (a0), 0000007f (a0), 000000fa (a1), +8006f570 : AE030004 SW fffffd72 (v1), 0004 (800aab68 (s0)) [800aab6c] +8006f574 : AE040008 SW 00000179 (a0), 0008 (800aab68 (s0)) [800aab70] + + +8006f578 : 3C02800B LUI fffffdf2 (v0), 800b (32779), +8006f57c : 9042A637 LBU 800b0000 (v0), a637 (800b0000 (v0)) [800aa637] +8006f580 : 3C01800B LUI 800aa691 (at), 800b (32779), +8006f584 : AC23A6E4 SW fffffd72 (v1), a6e4 (800b0000 (at)) [800aa6e4] +8006f588 : 3C01800B LUI 800b0000 (at), 800b (32779), +8006f58c : AC24A6E8 SW 00000179 (a0), a6e8 (800b0000 (at)) [800aa6e8] +8006f590 : 00021027 NOR 000000fc (v0), 00000000 (r0), 000000fc (v0), +8006f594 : 30420008 ANDI ffffff03 (v0), ffffff03 (v0), 0008 (8), +8006f598 : 10400002 BEQ 00000000 (v0), 00000000 (r0), 8006f5a4, +8006f59c : 3C028000 LUI 00000000 (v0), 8000 (32768), +8006f5a4 : 3C02800B LUI 80000000 (v0), 800b (32779), +8006f5a8 : 9042A637 LBU 800b0000 (v0), a637 (800b0000 (v0)) [800aa637] +8006f5ac : 00000000 NOP +8006f5b0 : 00021027 NOR 000000fc (v0), 00000000 (r0), 000000fc (v0), +8006f5b4 : 30420004 ANDI ffffff03 (v0), ffffff03 (v0), 0004 (4), +8006f5b8 : 10400005 BEQ 00000000 (v0), 00000000 (r0), 8006f5d0, +8006f5bc : 3C034000 LUI fffffd72 (v1), 4000 (16384), +8006f5d0 : 3C02800B LUI 00000000 (v0), 800b (32779), +8006f5d4 : 9042A637 LBU 800b0000 (v0), a637 (800b0000 (v0)) [800aa637] +8006f5d8 : 00000000 NOP +8006f5dc : 00021027 NOR 000000fc (v0), 00000000 (r0), 000000fc (v0), +8006f5e0 : 30420008 ANDI ffffff03 (v0), ffffff03 (v0), 0008 (8), +8006f5e4 : 10400005 BEQ 00000000 (v0), 00000000 (r0), 8006f5fc, +8006f5e8 : 3C032000 LUI 40000000 (v1), 2000 (8192), +8006f5fc : 3C03800B LUI 20000000 (v1), 800b (32779), +8006f600 : 9063A637 LBU 800b0000 (v1), a637 (800b0000 (v1)) [800aa637] +8006f604 : 0801BDCF J 8006f73c, +8006f608 : 00000000 NOP + + + + +; shoot - joypad #2 +8006f1f0 : 9042A635 LBU 800b0000 (v0), a635 (800b0000 (v0)) [800aa635] +8006f1f4 : 00000000 NOP +8006f1f8 : 304200F0 ANDI 00000041 (v0), 00000041 (v0), 00f0 (240), +8006f1fc : 14430007 BNE 00000040 (v0), 00000040 (v1), 8006f21c, +8006f200 : 00000000 NOP + + + +800759a4 : 8C42AB6C LW 800b0000 (v0), ab6c (800b0000 (v0)) [800aab6c] +800759a8 : 3C04800B LUI 00000179 (a0), 800b (32779), +800759ac : 8C84B03C LW 800b0000 (a0), b03c (800b0000 (a0)) [800ab03c] +800759b0 : 3C03800B LUI 00000001 (v1), 800b (32779), +800759b4 : 8C63AB70 LW 800b0000 (v1), ab70 (800b0000 (v1)) [800aab70] +800759b8 : 3C05800B LUI 000000fa (a1), 800b (32779), + + +800759bc : 8CA5B040 LW 800b0000 (a1), b040 (800b0000 (a1)) [800ab040] +800759c0 : 00441023 SUBU fffffd72 (v0), fffffd72 (v0), fffffdf2 (a0), +800759c4 : 00651823 SUBU 00000179 (v1), 00000179 (v1), 000000fa (a1), +800759c8 : 3C01800B LUI 800b0000 (at), 800b (32779), + +; shot cursor (real) +800759cc : AC22B034 SW ffffff80 (v0), b034 (800b0000 (at)) [800ab034] +800759d0 : 3C01800B LUI 800b0000 (at), 800b (32779), +800759d4 : AC23B038 SW 0000007f (v1), b038 (800b0000 (at)) [800ab038] + + + + + + +; 1b2200 = x-y cache +80087188 : 3C02800B LUI 00000000 (v0), 800b (32779), +8008718c : 8C42B034 LW 800b0000 (v0), b034 (800b0000 (v0)) [800ab034] +80087190 : 8E03001C LW 00000007 (v1), 001c (801b21e4 (s0)) [801b2200] +80087194 : 00021043 SRA 00000000 (v0), 00000000 (v0), 01 (1), +80087198 : 00431021 ADDU 00000000 (v0), 00000000 (v0), 01360000 (v1), +8008719c : AE02001C SW 01360000 (v0), 001c (801b21e4 (s0)) [801b2200] +800871a0 : 3C02800B LUI 01360000 (v0), 800b (32779), +800871a4 : 8C42B038 LW 800b0000 (v0), b038 (800b0000 (v0)) [800ab038] +800871a8 : 8E030020 LW 01360000 (v1), 0020 (801b21e4 (s0)) [801b2204] +800871ac : 08021C76 J 800871d8, +800871b0 : 00021043 SRA 00000000 (v0), 00000000 (v0), 01 (1), + +800871d8 : 00000000 NOP +800871dc : 00431021 ADDU 00000000 (v0), 00000000 (v0), 00e60000 (v1), +800871e0 : AE020020 SW 00e60000 (v0), 0020 (801b21e4 (s0)) [801b2204] + + + + + +80085d58 : 8EA2001C LW fffe0000 (v0), 001c (801b21e4 (s5)) [801b2200] +80085d5c : 8C840008 LW 801aa884 (a0), 0008 (801aa884 (a0)) [801aa88c] + +---> laser dot draw (force offscreen) +80085d60 : 00431023 SUBU 01360000 (v0), 01360000 (v0), 00018000 (v1), +80085d64 : AC820010 SW 01348000 (v0), 0010 (8019873c (a0)) [8019874c] +80085d68 : 8EA20048 LW 01348000 (v0), 0048 (801b21e4 (s5)) [801b222c] +80085d6c : 00000000 NOP +80085d70 : 8C4300C4 LW 00018000 (v1), 00c4 (8018be80 (v0)) [8018bf44] +80085d74 : 8C440094 LW 8019873c (a0), 0094 (8018be80 (v0)) [8018bf14] +80085d78 : 8EA20020 LW 8018be80 (v0), 0020 (801b21e4 (s5)) [801b2204] +80085d7c : 00031BC0 SLL 00000007 (v1), 00000007 (v1), 0f (15), +80085d80 : 8C840008 LW 801aa884 (a0), 0008 (801aa884 (a0)) [801aa88c] + +---> laser dot draw (force offscreen) +80085d84 : 00431023 SUBU 00e60000 (v0), 00e60000 (v0), 00038000 (v1), +80085d88 : AC820014 SW 00e28000 (v0), 0014 (8019873c (a0)) [80198750] + + + + + +80085c48 : 8C630094 LW 8018be80 (v1), 0094 (8018be80 (v1)) [8018bf14] +80085c4c : 00021400 SLL fffffffb (v0), fffffffb (v0), 10 (16), +80085c50 : 8C630008 LW 801aa884 (v1), 0008 (801aa884 (v1)) [801aa88c] + +---> laser dot draw (force offscreen) +80085c54 : 00441021 ADDU fffb0000 (v0), fffb0000 (v0), 01360000 (a0), +80085c58 : AC620010 SW 01310000 (v0), 0010 (8019873c (v1)) [8019874c] +80085c5c : 8FA20014 LW 01310000 (v0), 0014 (800aa45c (sp)) [800aa470] +80085c60 : 8EA30048 LW 8019873c (v1), 0048 (801b21e4 (s5)) [801b222c] +80085c64 : 8EA40020 LW 01360000 (a0), 0020 (801b21e4 (s5)) [801b2204] +80085c68 : 8C630094 LW 8018be80 (v1), 0094 (8018be80 (v1)) [8018bf14] +80085c6c : 00021400 SLL fffffffc (v0), fffffffc (v0), 10 (16), +80085c70 : 8C630008 LW 801aa884 (v1), 0008 (801aa884 (v1)) [801aa88c] + +---> laser dot draw (force offscreen) +80085c74 : 00441021 ADDU fffc0000 (v0), fffc0000 (v0), 007c0000 (a0), +80085c78 : 08021763 J 80085d8c, +80085c7c : AC620014 SW 00780000 (v0), 0014 (8019873c (v1)) [80198750] diff --git a/ps1 - guncon conversions/Policenauts/src/notes/policenauts - guncon - type2a.txt b/ps1 - guncon conversions/Policenauts/src/notes/policenauts - guncon - type2a.txt new file mode 100644 index 0000000000..a30131ff2f --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/notes/policenauts - guncon - type2a.txt @@ -0,0 +1,18 @@ +Shooting Range #1 + + +; 1b2254 = x-y cache +80087140 : 3C02800B LUI 00000000 (v0), 800b (32779), +80087144 : 8C42B034 LW 800b0000 (v0), b034 (800b0000 (v0)) [800ab034] +80087148 : 8E03001C LW 00000004 (v1), 001c (801b2238 (s0)) [801b2254] +8008714c : 00021103 SRA 00000000 (v0), 00000000 (v0), 04 (4), +80087150 : 00431021 ADDU 00000000 (v0), 00000000 (v0), 00aaa000 (v1), +80087154 : AE02001C SW 00aaa000 (v0), 001c (801b2238 (s0)) [801b2254] + +80087158 : 3C02800B LUI 00aaa000 (v0), 800b (32779), +8008715c : 8C42B038 LW 800b0000 (v0), b038 (800b0000 (v0)) [800ab038] +80087160 : 8E030020 LW 00aaa000 (v1), 0020 (801b2238 (s0)) [801b2258] +80087164 : 00021103 SRA 00000000 (v0), 00000000 (v0), 04 (4), +80087168 : 00431021 ADDU 00000000 (v0), 00000000 (v0), 0058a000 (v1), +8008716c : 08021C81 J 80087204, +80087170 : AE020020 SW 0058a000 (v0), 0020 (801b2238 (s0)) [801b2258] diff --git a/ps1 - guncon conversions/Policenauts/src/notes/policenauts - guncon - type2b.txt b/ps1 - guncon conversions/Policenauts/src/notes/policenauts - guncon - type2b.txt new file mode 100644 index 0000000000..65fff007ce --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/notes/policenauts - guncon - type2b.txt @@ -0,0 +1,42 @@ +Act2 - Highway + + +; 1b24f4 = x-y cache +80079f7c : 8E02001C LW 00000000 (v0), 001c (801b24d8 (s0)) [801b24f4] +80079f80 : 3C03800B LUI 00000007 (v1), 800b (32779), +80079f84 : 8C63B034 LW 800b0000 (v1), b034 (800b0000 (v1)) [800ab034] +80079f88 : 00000000 NOP +80079f8c : 00431021 ADDU 00f50000 (v0), 00f50000 (v0), 007f0000 (v1), +80079f90 : AE02001C SW 01740000 (v0), 001c (801b24d8 (s0)) [801b24f4] + +80079f94 : 8E020020 LW 01740000 (v0), 0020 (801b24d8 (s0)) [801b24f8] +80079f98 : 3C03800B LUI 007f0000 (v1), 800b (32779), +80079f9c : 8C63B038 LW 800b0000 (v1), b038 (800b0000 (v1)) [800ab038] +80079fa0 : 0801E7F5 J 80079fd4, +80079fa4 : 00431021 ADDU 00980000 (v0), 00980000 (v0), ffd60000 (v1), +(..) + +80079fd4 : AE020020 SW 006e0000 (v0), 0020 (801b24d8 (s0)) [801b24f8] + + + + + + +; laser dot x (normal) +80079a00 : 8E42001C LW fffe0000 (v0), 001c (801b24d8 (s2)) [801b24f4] +80079a04 : 8C840008 LW 801aa674 (a0), 0008 (801aa674 (a0)) [801aa67c] +80079a08 : 00431023 SUBU 00000000 (v0), 00000000 (v0), 00018000 (v1), +80079a0c : AC820010 SW fffe8000 (v0), 0010 (8019827c (a0)) [8019828c] + +80079a10 : 8E420048 LW fffe8000 (v0), 0048 (801b24d8 (s2)) [801b2520] +80079a14 : 00000000 NOP +80079a18 : 8C4300B8 LW 00018000 (v1), 00b8 (800df4a4 (v0)) [800df55c] +80079a1c : 8C440094 LW 8019827c (a0), 0094 (800df4a4 (v0)) [800df538] +80079a20 : 8E420020 LW 800df4a4 (v0), 0020 (801b24d8 (s2)) [801b24f8] +80079a24 : 00031BC0 SLL 00000007 (v1), 00000007 (v1), 0f (15), + +; laser dot y (normal) +80079a28 : 8C840008 LW 801aa674 (a0), 0008 (801aa674 (a0)) [801aa67c] +80079a2c : 00431023 SUBU 00000000 (v0), 00000000 (v0), 00038000 (v1), +80079a30 : AC820014 SW fffc8000 (v0), 0014 (8019827c (a0)) [80198290] diff --git a/ps1 - guncon conversions/Policenauts/src/notes/policenauts - guncon - type2c.txt b/ps1 - guncon conversions/Policenauts/src/notes/policenauts - guncon - type2c.txt new file mode 100644 index 0000000000..a9bdf41734 --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/notes/policenauts - guncon - type2c.txt @@ -0,0 +1,214 @@ +Act 5 - Mass Driver + + +; port1 +; 3f939 = ID +; 3f93a = button1 +; 3f93b = button2 +; 3f93c = mouse-x +; 3f93d = mouse-y + + +; port2 +; 3f949 = ID +; 3f94a = button1 +; 3f94b = button2 +; 3f94c = mouse-x +; 3f94d = mouse-y + + + + +80088e64 : 3C02800A LUI ffffffc2 (v0), 800a (32778), +80088e68 : 9042BD83 LBU 800a0000 (v0), bd83 (800a0000 (v0)) [8009bd83] +80088e6c : 3C01800A LUI 8009bddd (at), 800a (32778), +80088e70 : AC23BE30 SW ffffffc7 (v1), be30 (800a0000 (at)) [8009be30] +80088e74 : 3C01800A LUI 800a0000 (at), 800a (32778), +80088e78 : AC24BE34 SW 00000032 (a0), be34 (800a0000 (at)) [8009be34] +80088e7c : 00021027 NOR 000000fc (v0), 00000000 (r0), 000000fc (v0), +80088e80 : 30420008 ANDI ffffff03 (v0), ffffff03 (v0), 0008 (8), +80088e84 : 10400002 BEQ 00000000 (v0), 00000000 (r0), 80088e90, +80088e88 : 3C028000 LUI 00000000 (v0), 8000 (32768), + +; button trigger? + +80088e8c : AE020000 SW 80000000 (v0), 0000 (8009be44 (s0)) [8009be44] + + + +80088ed8 : 8E020000 LW 00000008 (v0), 0000 (8009be44 (s0)) [8009be44] +80088edc : 00000000 NOP +80088ee0 : 00431025 OR 80000000 (v0), 80000000 (v0), 20000000 (v1), +80088ee4 : AE020000 SW a0000000 (v0), 0000 (8009be44 (s0)) [8009be44] + + + +800923bc : 3C02800A LUI 00000001 (v0), 800a (32778), +800923c0 : 8C42C374 LW 800a0000 (v0), c374 (800a0000 (v0)) [8009c374] +800923c4 : 00000000 NOP +800923c8 : 8C420008 LW 8011483c (v0), 0008 (8011483c (v0)) [80114844] +800923cc : 00000000 NOP +800923d0 : 14400058 BNE 00000000 (v0), 00000000 (r0), 80092534, +800923d4 : 3C04FFEF LUI 800e0ce8 (a0), ffef (65519), + + + + + + + + +; cache joypad data (whole range) +80088a6c : 90820000 LBU 8003f938 (v0), 0000 (8003f938 (a0)) [8003f938] +80088a70 : 00000000 NOP +80088a74 : 3C01800A LUI 8009bddd (at), 800a (32778), +80088a78 : 2421BD80 ADDIU 800a0000 (at), 800a0000 (at), bd80 (48512), +80088a7c : 00230821 ADDU 8009bd80 (at), 8009bd80 (at), 00000000 (v1), +80088a80 : A0220000 SB 00000000 (v0), 0000 (8009bd80 (at)) [8009bd80] +80088a84 : 24630001 ADDIU 00000000 (v1), 00000000 (v1), 0001 (1), +80088a88 : 28620006 SLTI 00000000 (v0), 00000001 (v1), 0006 (6), +80088a8c : 1440FFF7 BNE 00000001 (v0), 00000000 (r0), 80088a6c, +80088a90 : 24840001 ADDIU 8003f938 (a0), 8003f938 (a0), 0001 (1), +80088a94 : 0C008E58 JAL 80023960, 80088a64 (ra), +80088a98 : 34040002 ORI 8003f93e (a0), 00000000 (r0), 0002 (2), +80088a9c : 00001821 ADDU 00000020 (v1), 00000000 (r0), 00000000 (r0), +80088aa0 : 00402021 ADDU 00000002 (a0), 8003f948 (v0), 00000000 (r0), +80088aa4 : 90820000 LBU 8003f948 (v0), 0000 (8003f948 (a0)) [8003f948] +80088aa8 : 00000000 NOP +80088aac : 3C01800A LUI 8009bd85 (at), 800a (32778), +80088ab0 : 2421BDD8 ADDIU 800a0000 (at), 800a0000 (at), bdd8 (48600), +80088ab4 : 00230821 ADDU 8009bdd8 (at), 8009bdd8 (at), 00000000 (v1), +80088ab8 : A0220000 SB 00000000 (v0), 0000 (8009bdd8 (at)) [8009bdd8] + + + + + + + + +; check mouse ID (joypad first) +80088ad0 : 9063BD80 LBU 800a0000 (v1), bd80 (800a0000 (v1)) [8009bd80] +80088ad4 : 340200FF ORI 00000000 (v0), 00000000 (r0), 00ff (255), +80088ad8 : 1062000D BEQ 00000000 (v1), 000000ff (v0), 80088b10, +80088adc : 34030040 ORI 00000000 (v1), 00000000 (r0), 0040 (64), + + +; MOUSE code +80088ae0 : 3C02800A LUI 000000ff (v0), 800a (32778), +80088ae4 : 9042BD81 LBU 800a0000 (v0), bd81 (800a0000 (v0)) [8009bd81] +80088ae8 : 00000000 NOP +80088aec : 304200F0 ANDI 00000012 (v0), 00000012 (v0), 00f0 (240), +80088af0 : 14430007 BNE 00000010 (v0), 00000040 (v1), 80088b10, +80088af4 : 00000000 NOP + + + + + + + + + + + + + +; mouse-xy +80088e30 : 3C03800A LUI 00000010 (v1), 800a (32778), +80088e34 : 8063BD84 LB 800a0000 (v1), bd84 (800a0000 (v1)) [8009bd84] +80088e38 : 3C04800A LUI 8003f94e (a0), 800a (32778), +80088e3c : 8084BD85 LB 800a0000 (a0), bd85 (800a0000 (a0)) [8009bd85] +80088e40 : 3C02800A LUI 0000007f (v0), 800a (32778), +80088e44 : 8C42BE30 LW 800a0000 (v0), be30 (800a0000 (v0)) [8009be30] +80088e48 : 3C05800A LUI 00000000 (a1), 800a (32778), +80088e4c : 8CA5BE34 LW 800a0000 (a1), be34 (800a0000 (a1)) [8009be34] +80088e50 : AE000000 SW 00000000 (r0), 0000 (8009be44 (s0)) [8009be44] + + + +; update mouse cursor position +80088e54 : 00621821 ADDU 0000007f (v1), 0000007f (v1), fffffef7 (v0), +80088e58 : 00852021 ADDU 0000007f (a0), 0000007f (a0), 000000a4 (a1), +80088e5c : AE030004 SW ffffff76 (v1), 0004 (8009be44 (s0)) [8009be48] +80088e60 : AE040008 SW 00000123 (a0), 0008 (8009be44 (s0)) [8009be4c] + + + + + +8008bb6c : 3C02800A LUI 00000001 (v0), 800a (32778), +8008bb70 : 8C42BE48 LW 800a0000 (v0), be48 (800a0000 (v0)) [8009be48] +8008bb74 : 3C04800A LUI 00000123 (a0), 800a (32778), +8008bb78 : 8C84C74C LW 800a0000 (a0), c74c (800a0000 (a0)) [8009c74c] +8008bb7c : 3C03800A LUI 00000001 (v1), 800a (32778), +8008bb80 : 8C63BE4C LW 800a0000 (v1), be4c (800a0000 (v1)) [8009be4c] +8008bb84 : 3C05800A LUI 000000a4 (a1), 800a (32778), + + +; shot cursor (real) +8008bb88 : 8CA5C750 LW 800a0000 (a1), c750 (800a0000 (a1)) [8009c750] +8008bb8c : 00441023 SUBU ffffff76 (v0), ffffff76 (v0), fffffef7 (a0), +8008bb90 : 00651823 SUBU 00000123 (v1), 00000123 (v1), 000000a4 (a1), +8008bb94 : 3C01800A LUI 800a0000 (at), 800a (32778), +8008bb98 : AC22C744 SW 0000007f (v0), c744 (800a0000 (at)) [8009c744] +8008bb9c : 3C01800A LUI 800a0000 (at), 800a (32778), +8008bba0 : AC23C748 SW 0000007f (v1), c748 (800a0000 (at)) [8009c748] + + + + +; mouse buttons...? +80088e64 : 3C02800A LUI fffffef7 (v0), 800a (32778), +80088e68 : 9042BD83 LBU 800a0000 (v0), bd83 (800a0000 (v0)) [8009bd83] +80088e6c : 3C01800A LUI 8009bddd (at), 800a (32778), +80088e70 : AC23BE30 SW ffffff76 (v1), be30 (800a0000 (at)) [8009be30] +80088e74 : 3C01800A LUI 800a0000 (at), 800a (32778), +80088e78 : AC24BE34 SW 00000123 (a0), be34 (800a0000 (at)) [8009be34] +80088e7c : 00021027 NOR 000000fc (v0), 00000000 (r0), 000000fc (v0), +80088e80 : 30420008 ANDI ffffff03 (v0), ffffff03 (v0), 0008 (8), +80088e84 : 10400002 BEQ 00000000 (v0), 00000000 (r0), 80088e90, + + + + + + + + +; cursor cache +80092284 : 8E02001C LW 00000000 (v0), 001c (800e0ce8 (s0)) [800e0d04] +80092288 : 3C03800A LUI 00000007 (v1), 800a (32778), +8009228c : 8C63C744 LW 800a0000 (v1), c744 (800a0000 (v1)) [8009c744] +80092290 : 00000000 NOP +80092294 : 00431021 ADDU 00b30000 (v0), 00b30000 (v0), 007f0000 (v1), +80092298 : AE02001C SW 01320000 (v0), 001c (800e0ce8 (s0)) [800e0d04] + +8009229c : 8E020020 LW 01320000 (v0), 0020 (800e0ce8 (s0)) [800e0d08] +800922a0 : 3C03800A LUI 007f0000 (v1), 800a (32778), +800922a4 : 8C63C748 LW 800a0000 (v1), c748 (800a0000 (v1)) [8009c748] +800922a8 : 080248B7 J 800922dc, +800922ac : 00431021 ADDU 00640000 (v0), 00640000 (v0), 007f0000 (v1), +(..) + +800922dc : AE020020 SW 00e30000 (v0), 0020 (800e0ce8 (s0)) [800e0d08] + + + + + + +; laser dot draw (normal) - c5e20 +80091dc4 : 8E42001C LW fffe0000 (v0), 001c (800e0ce8 (s2)) [800e0d04] +80091dc8 : 8C840008 LW 800d8ac4 (a0), 0008 (800d8ac4 (a0)) [800d8acc] +80091dcc : 00431023 SUBU 01320000 (v0), 01320000 (v0), 00018000 (v1), +80091dd0 : AC820010 SW 01308000 (v0), 0010 (800c5e10 (a0)) [800c5e20] +80091dd4 : 8E420048 LW 01308000 (v0), 0048 (800e0ce8 (s2)) [800e0d30] +80091dd8 : 00000000 NOP +80091ddc : 8C4300B8 LW 00018000 (v1), 00b8 (80136690 (v0)) [80136748] +80091de0 : 8C440094 LW 800c5e10 (a0), 0094 (80136690 (v0)) [80136724] +80091de4 : 8E420020 LW 80136690 (v0), 0020 (800e0ce8 (s2)) [800e0d08] +80091de8 : 00031BC0 SLL 00000007 (v1), 00000007 (v1), 0f (15), +80091dec : 8C840008 LW 800d8ac4 (a0), 0008 (800d8ac4 (a0)) [800d8acc] +80091df0 : 00431023 SUBU 00e30000 (v0), 00e30000 (v0), 00038000 (v1), +80091df4 : AC820014 SW 00df8000 (v0), 0014 (800c5e10 (a0)) [800c5e24] diff --git a/ps1 - guncon conversions/Policenauts/src/notes/policenauts - guncon - type2d.txt b/ps1 - guncon conversions/Policenauts/src/notes/policenauts - guncon - type2d.txt new file mode 100644 index 0000000000..72e234f65f --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/notes/policenauts - guncon - type2d.txt @@ -0,0 +1,168 @@ +Act 7 - Lobby + + +; port1 +; 3f939 = ID +; 3f93a = button1 +; 3f93b = button2 +; 3f93c = mouse-x +; 3f93d = mouse-y + + +; port2 +; 3f949 = ID +; 3f94a = button1 +; 3f94b = button2 +; 3f94c = mouse-x +; 3f94d = mouse-y + + + + +; cache joypad data (whole range) +80089288 : 00001821 ADDU 00000010 (v1), 00000000 (r0), 00000000 (r0), +8008928c : 00402021 ADDU 00000001 (a0), 8003f938 (v0), 00000000 (r0), +80089290 : 90820000 LBU 8003f938 (v0), 0000 (8003f938 (a0)) [8003f938] +80089294 : 00000000 NOP +80089298 : 3C01800A LUI 80060000 (at), 800a (32778), +8008929c : 24217240 ADDIU 800a0000 (at), 800a0000 (at), 7240 (29248), +800892a0 : 00230821 ADDU 800a7240 (at), 800a7240 (at), 00000000 (v1), +800892a4 : A0220000 SB 00000000 (v0), 0000 (800a7240 (at)) [800a7240] +800892a8 : 24630001 ADDIU 00000000 (v1), 00000000 (v1), 0001 (1), +800892ac : 28620006 SLTI 00000000 (v0), 00000001 (v1), 0006 (6), +800892b0 : 1440FFF7 BNE 00000001 (v0), 00000000 (r0), 80089290, +800892b4 : 24840001 ADDIU 8003f938 (a0), 8003f938 (a0), 0001 (1), +800892b8 : 0C008E58 JAL 80023960, 80089288 (ra), +800892bc : 34040002 ORI 8003f93e (a0), 00000000 (r0), 0002 (2), +800892c0 : 00001821 ADDU 00000020 (v1), 00000000 (r0), 00000000 (r0), +800892c4 : 00402021 ADDU 00000002 (a0), 8003f948 (v0), 00000000 (r0), +800892c8 : 90820000 LBU 8003f948 (v0), 0000 (8003f948 (a0)) [8003f948] +800892cc : 00000000 NOP +800892d0 : 3C01800A LUI 800a7245 (at), 800a (32778), +800892d4 : 24217298 ADDIU 800a0000 (at), 800a0000 (at), 7298 (29336), +800892d8 : 00230821 ADDU 800a7298 (at), 800a7298 (at), 00000000 (v1), +800892dc : A0220000 SB 00000000 (v0), 0000 (800a7298 (at)) [800a7298] + + + + + + + + +; check mouse ID (joypad first) +800892f0 : 3C03800A LUI 00000006 (v1), 800a (32778), +800892f4 : 90637240 LBU 800a0000 (v1), 7240 (800a0000 (v1)) [800a7240] +800892f8 : 340200FF ORI 00000000 (v0), 00000000 (r0), 00ff (255), +800892fc : 10620067 BEQ 00000000 (v1), 000000ff (v0), 8008949c, +80089300 : 34030010 ORI 00000000 (v1), 00000000 (r0), 0010 (16), + + +; Mouse ID + +80089304 : 3C02800A LUI 000000ff (v0), 800a (32778), +80089308 : 90427241 LBU 800a0000 (v0), 7241 (800a0000 (v0)) [800a7241] +8008930c : 00000000 NOP +80089310 : 304200F0 ANDI 00000012 (v0), 00000012 (v0), 00f0 (240), +80089314 : 14430061 BNE 00000010 (v0), 00000010 (v1), 8008949c, +80089318 : 00000000 NOP +8008931c : 3C02800A LUI 00000010 (v0), 800a (32778), +80089320 : 90427244 LBU 800a0000 (v0), 7244 (800a0000 (v0)) [800a7244] +80089324 : 00000000 NOP +80089328 : 1440000D BNE 00000000 (v0), 00000000 (r0), 80089360, +8008932c : 00000000 NOP +80089330 : 3C02800A LUI 00000000 (v0), 800a (32778), +80089334 : 90427245 LBU 800a0000 (v0), 7245 (800a0000 (v0)) [800a7245] +80089338 : 00000000 NOP +8008933c : 14400008 BNE 00000000 (v0), 00000000 (r0), 80089360, +80089340 : 00000000 NOP +80089344 : 3C03800A LUI 00000010 (v1), 800a (32778), +80089348 : 90637243 LBU 800a0000 (v1), 7243 (800a0000 (v1)) [800a7243] +8008934c : 3C02800A LUI 00000000 (v0), 800a (32778), +80089350 : 8C420B00 LW 800a0000 (v0), 0b00 (800a0000 (v0)) [800a0b00] +80089354 : 00000000 NOP +80089358 : 104300BF BEQ 000000fc (v0), 000000fc (v1), 80089658, +8008935c : 00001021 ADDU 000000fc (v0), 00000000 (r0), 00000000 (r0), + + + + + + + + + + + + +; mouse-xy80089360 : 3C03800A LUI 00000010 (v1), 800a (32778), +80089364 : 80637244 LB 800a0000 (v1), 7244 (800a0000 (v1)) [800a7244] +80089368 : 3C04800A LUI 8003f94e (a0), 800a (32778), +8008936c : 8C8472F0 LW 800a0000 (a0), 72f0 (800a0000 (a0)) [800a72f0] +80089370 : 3C02800A LUI 000000fe (v0), 800a (32778), +80089374 : 80427245 LB 800a0000 (v0), 7245 (800a0000 (v0)) [800a7245] +80089378 : 3C05800A LUI 00000000 (a1), 800a (32778), +8008937c : 8CA50B0C LW 800a0000 (a1), 0b0c (800a0000 (a1)) [800a0b0c] +80089380 : 00641821 ADDU 00000000 (v1), 00000000 (v1), 00000001 (a0), +80089384 : 3C04800A LUI 00000001 (a0), 800a (32778), +80089388 : 8C8472F4 LW 800a0000 (a0), 72f4 (800a0000 (a0)) [800a72f4] +8008938c : AE000000 SW 00000000 (r0), 0000 (800a77b0 (s0)) [800a77b0] +80089390 : 3C01800A LUI 800a729d (at), 800a (32778), +80089394 : AC2372F0 SW 00000001 (v1), 72f0 (800a0000 (at)) [800a72f0] +80089398 : AE030004 SW 00000001 (v1), 0004 (800a77b0 (s0)) [800a77b4] +8008939c : 00441021 ADDU fffffffe (v0), fffffffe (v0), 00000008 (a0), +800893a0 : 3C01800A LUI 800a0000 (at), 800a (32778), +800893a4 : AC2272F4 SW 00000006 (v0), 72f4 (800a0000 (at)) [800a72f4] + + + + + +8008eb74 : 8C4277B4 LW 800a0000 (v0), 77b4 (800a0000 (v0)) [800a77b4] +8008eb78 : 3C04800A LUI 00000008 (a0), 800a (32778), +8008eb7c : 8C847C54 LW 800a0000 (a0), 7c54 (800a0000 (a0)) [800a7c54] +8008eb80 : 3C03800A LUI 00000001 (v1), 800a (32778), +8008eb84 : 8C6377B8 LW 800a0000 (v1), 77b8 (800a0000 (v1)) [800a77b8] +8008eb88 : 3C05800A LUI 00000001 (a1), 800a (32778), +8008eb8c : 8CA57C58 LW 800a0000 (a1), 7c58 (800a0000 (a1)) [800a7c58] +8008eb90 : 00441023 SUBU 00000001 (v0), 00000001 (v0), 00000001 (a0), +8008eb94 : 00651823 SUBU 00000006 (v1), 00000006 (v1), 00000008 (a1), +8008eb98 : 3C01800A LUI 800a0000 (at), 800a (32778), +8008eb9c : AC227C4C SW 00000000 (v0), 7c4c (800a0000 (at)) [800a7c4c] +8008eba0 : 3C01800A LUI 800a0000 (at), 800a (32778), +8008eba4 : AC237C50 SW fffffffe (v1), 7c50 (800a0000 (at)) [800a7c50] + + + + +; guncon cache data +80092794 : 8E02001C LW 00000000 (v0), 001c (801ae91c (s0)) [801ae938] +80092798 : 3C03800A LUI 00000007 (v1), 800a (32778), +8009279c : 8C637C4C LW 800a0000 (v1), 7c4c (800a0000 (v1)) [800a7c4c] +800927a0 : 00000000 NOP +800927a4 : 00431021 ADDU 00a00000 (v0), 00a00000 (v0), 00000000 (v1), +800927a8 : AE02001C SW 00a00000 (v0), 001c (801ae91c (s0)) [801ae938] +800927ac : 8E020020 LW 00a00000 (v0), 0020 (801ae91c (s0)) [801ae93c] +800927b0 : 3C03800A LUI 00000000 (v1), 800a (32778), +800927b4 : 8C637C50 LW 800a0000 (v1), 7c50 (800a0000 (v1)) [800a7c50] +800927b8 : 080249FB J 800927ec, +800927bc : 00431021 ADDU 00580000 (v0), 00580000 (v0), 00000000 (v1), +800927ec : AE020020 SW 00580000 (v0), 0020 (801ae91c (s0)) [801ae93c] + + + + +; laser dot (normal) +800922bc : 8E42001C LW fffe0000 (v0), 001c (801ae91c (s2)) [801ae938] +800922c0 : 8C840008 LW 801a58c4 (a0), 0008 (801a58c4 (a0)) [801a58cc] +800922c4 : 00431023 SUBU 00a00000 (v0), 00a00000 (v0), 00018000 (v1), +800922c8 : AC820010 SW 009e8000 (v0), 0010 (80190494 (a0)) [801904a4] +800922cc : 8E420048 LW 009e8000 (v0), 0048 (801ae91c (s2)) [801ae964] +800922d0 : 00000000 NOP +800922d4 : 8C4300B8 LW 00018000 (v1), 00b8 (80181624 (v0)) [801816dc] +800922d8 : 8C440094 LW 80190494 (a0), 0094 (80181624 (v0)) [801816b8] +800922dc : 8E420020 LW 80181624 (v0), 0020 (801ae91c (s2)) [801ae93c] +800922e0 : 00031BC0 SLL 00000007 (v1), 00000007 (v1), 0f (15), +800922e4 : 8C840008 LW 801a58c4 (a0), 0008 (801a58c4 (a0)) [801a58cc] +800922e8 : 00431023 SUBU 00580000 (v0), 00580000 (v0), 00038000 (v1), +800922ec : AC820014 SW 00548000 (v0), 0014 (80190494 (a0)) [801904a8] diff --git a/ps1 - guncon conversions/Policenauts/src/notes/policenauts - guncon - type2e.txt b/ps1 - guncon conversions/Policenauts/src/notes/policenauts - guncon - type2e.txt new file mode 100644 index 0000000000..3736eb0c91 --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/notes/policenauts - guncon - type2e.txt @@ -0,0 +1,148 @@ +Act 7 - Garage + + +; port1 +; 3f939 = ID +; 3f93a = button1 +; 3f93b = button2 +; 3f93c = mouse-x +; 3f93d = mouse-y + + +; port2 +; 3f949 = ID +; 3f94a = button1 +; 3f94b = button2 +; 3f94c = mouse-x +; 3f94d = mouse-y + + + + +; cache joypad data (whole range)80088d90 : 00001821 ADDU 00000010 (v1), 00000000 (r0), 00000000 (r0), +80088d94 : 00402021 ADDU 00000001 (a0), 8003f938 (v0), 00000000 (r0), +80088d98 : 90820000 LBU 8003f938 (v0), 0000 (8003f938 (a0)) [8003f938] +80088d9c : 00000000 NOP +80088da0 : 3C01800A LUI 80060000 (at), 800a (32778), +80088da4 : 2421C1A0 ADDIU 800a0000 (at), 800a0000 (at), c1a0 (49568), +80088da8 : 00230821 ADDU 8009c1a0 (at), 8009c1a0 (at), 00000000 (v1), +80088dac : A0220000 SB 00000000 (v0), 0000 (8009c1a0 (at)) [8009c1a0] +80088db0 : 24630001 ADDIU 00000000 (v1), 00000000 (v1), 0001 (1), +80088db4 : 28620006 SLTI 00000000 (v0), 00000001 (v1), 0006 (6), +80088db8 : 1440FFF7 BNE 00000001 (v0), 00000000 (r0), 80088d98, +80088dbc : 24840001 ADDIU 8003f938 (a0), 8003f938 (a0), 0001 (1), +80088dc0 : 0C008E58 JAL 80023960, 80088d90 (ra), +80088dc4 : 34040002 ORI 8003f93e (a0), 00000000 (r0), 0002 (2), +80088dc8 : 00001821 ADDU 00000020 (v1), 00000000 (r0), 00000000 (r0), +80088dcc : 00402021 ADDU 00000002 (a0), 8003f948 (v0), 00000000 (r0), +80088dd0 : 90820000 LBU 8003f948 (v0), 0000 (8003f948 (a0)) [8003f948] +80088dd4 : 00000000 NOP +80088dd8 : 3C01800A LUI 8009c1a5 (at), 800a (32778), +80088ddc : 2421C1F8 ADDIU 800a0000 (at), 800a0000 (at), c1f8 (49656), +80088de0 : 00230821 ADDU 8009c1f8 (at), 8009c1f8 (at), 00000000 (v1), +80088de4 : A0220000 SB 00000000 (v0), 0000 (8009c1f8 (at)) [8009c1f8] +80088de8 : 24630001 ADDIU 00000000 (v1), 00000000 (v1), 0001 (1), +80088dec : 28620006 SLTI 00000000 (v0), 00000001 (v1), 0006 (6), +80088df0 : 1440FFF7 BNE 00000001 (v0), 00000000 (r0), 80088dd0, +80088df4 : 24840001 ADDIU 8003f948 (a0), 8003f948 (a0), 0001 (1), + + + + + + + +; check mouse ID (joypad first) +80088df8 : 3C03800A LUI 00000006 (v1), 800a (32778), +80088dfc : 9063C1A0 LBU 800a0000 (v1), c1a0 (800a0000 (v1)) [8009c1a0] +80088e00 : 340200FF ORI 00000000 (v0), 00000000 (r0), 00ff (255), +80088e04 : 1062004A BEQ 00000000 (v1), 000000ff (v0), 80088f30, +80088e08 : 34030010 ORI 00000000 (v1), 00000000 (r0), 0010 (16), +80088e0c : 3C02800A LUI 000000ff (v0), 800a (32778), +80088e10 : 9042C1A1 LBU 800a0000 (v0), c1a1 (800a0000 (v0)) [8009c1a1] +80088e14 : 00000000 NOP +80088e18 : 304200F0 ANDI 00000012 (v0), 00000012 (v0), 00f0 (240), +80088e1c : 14430044 BNE 00000010 (v0), 00000010 (v1), 80088f30, + + + + + + + + + + + +; mouse-xy +80088e68 : 3C03800A LUI 00000010 (v1), 800a (32778), +80088e6c : 8063C1A4 LB 800a0000 (v1), c1a4 (800a0000 (v1)) [8009c1a4] +80088e70 : 3C04800A LUI 8003f94e (a0), 800a (32778), +80088e74 : 8084C1A5 LB 800a0000 (a0), c1a5 (800a0000 (a0)) [8009c1a5] +80088e78 : 3C02800A LUI 0000007f (v0), 800a (32778), +80088e7c : 8C42C250 LW 800a0000 (v0), c250 (800a0000 (v0)) [8009c250] +80088e80 : 3C05800A LUI 00000000 (a1), 800a (32778), +80088e84 : 8CA5C254 LW 800a0000 (a1), c254 (800a0000 (a1)) [8009c254] +80088e88 : AE000000 SW 00000000 (r0), 0000 (8009c264 (s0)) [8009c264] +80088e8c : 00621821 ADDU 0000007f (v1), 0000007f (v1), ffffff58 (v0), +80088e90 : 00852021 ADDU 00000051 (a0), 00000051 (a0), 00000034 (a1), +80088e94 : AE030004 SW ffffffd7 (v1), 0004 (8009c264 (s0)) [8009c268] +80088e98 : AE040008 SW 00000085 (a0), 0008 (8009c264 (s0)) [8009c26c] + + + + +8008ba04 : 3C02800A LUI 00000001 (v0), 800a (32778), +8008ba08 : 8C42C268 LW 800a0000 (v0), c268 (800a0000 (v0)) [8009c268] +8008ba0c : 3C04800A LUI 00000085 (a0), 800a (32778), +8008ba10 : 8C84CB8C LW 800a0000 (a0), cb8c (800a0000 (a0)) [8009cb8c] +8008ba14 : 3C03800A LUI 00000001 (v1), 800a (32778), +8008ba18 : 8C63C26C LW 800a0000 (v1), c26c (800a0000 (v1)) [8009c26c] +8008ba1c : 3C05800A LUI 00000034 (a1), 800a (32778), +8008ba20 : 8CA5CB90 LW 800a0000 (a1), cb90 (800a0000 (a1)) [8009cb90] +8008ba24 : 00441023 SUBU ffffffd7 (v0), ffffffd7 (v0), ffffff58 (a0), +8008ba28 : 00651823 SUBU 00000085 (v1), 00000085 (v1), 00000034 (a1), +8008ba2c : 3C01800A LUI 800a0000 (at), 800a (32778), +8008ba30 : AC22CB84 SW 0000007f (v0), cb84 (800a0000 (at)) [8009cb84] +8008ba34 : 3C01800A LUI 800a0000 (at), 800a (32778), +8008ba38 : AC23CB88 SW 00000051 (v1), cb88 (800a0000 (at)) [8009cb88] + + + + + +; guncon cache data +80091c98 : 8E02001C LW 00000000 (v0), 001c (800e0d3c (s0)) [800e0d58] +80091c9c : 3C03800A LUI 00000007 (v1), 800a (32778), +80091ca0 : 8C63CB84 LW 800a0000 (v1), cb84 (800a0000 (v1)) [8009cb84] +80091ca4 : 00000000 NOP +80091ca8 : 00431021 ADDU 00ef0000 (v0), 00ef0000 (v0), 007f0000 (v1), +80091cac : AE02001C SW 016e0000 (v0), 001c (800e0d3c (s0)) [800e0d58] +80091cb0 : 8E020020 LW 016e0000 (v0), 0020 (800e0d3c (s0)) [800e0d5c] +80091cb4 : 3C03800A LUI 007f0000 (v1), 800a (32778), +80091cb8 : 8C63CB88 LW 800a0000 (v1), cb88 (800a0000 (v1)) [8009cb88] +80091cbc : 0802473C J 80091cf0, +80091cc0 : 00431021 ADDU 00c20000 (v0), 00c20000 (v0), 00510000 (v1), +(..) +80091cf0 : AE020020 SW 01130000 (v0), 0020 (800e0d3c (s0)) [800e0d5c] + + + + +; 1059b0 -> 917c4 +; -$741ec + +; laser dot (normal) +800917c4 : 8E42001C LW fffe0000 (v0), 001c (800e0d3c (s2)) [800e0d58] +800917c8 : 8C840008 LW 800d8b48 (a0), 0008 (800d8b48 (a0)) [800d8b50] +800917cc : 00431023 SUBU 01360000 (v0), 01360000 (v0), 00018000 (v1), +800917d0 : AC820010 SW 01348000 (v0), 0010 (800c5f40 (a0)) [800c5f50] +800917d4 : 8E420048 LW 01348000 (v0), 0048 (800e0d3c (s2)) [800e0d84] +800917d8 : 00000000 NOP +800917dc : 8C4300B8 LW 00018000 (v1), 00b8 (80133ae8 (v0)) [80133ba0] +800917e0 : 8C440094 LW 800c5f40 (a0), 0094 (80133ae8 (v0)) [80133b7c] +800917e4 : 8E420020 LW 80133ae8 (v0), 0020 (800e0d3c (s2)) [800e0d5c] +800917e8 : 00031BC0 SLL 00000007 (v1), 00000007 (v1), 0f (15), +800917ec : 8C840008 LW 800d8b48 (a0), 0008 (800d8b48 (a0)) [800d8b50] +800917f0 : 00431023 SUBU 00e60000 (v0), 00e60000 (v0), 00038000 (v1), +800917f4 : AC820014 SW 00e28000 (v0), 0014 (800c5f40 (a0)) [800c5f54] diff --git a/ps1 - guncon conversions/Policenauts/src/patcher/japan/cd2dvd.bat b/ps1 - guncon conversions/Policenauts/src/patcher/japan/cd2dvd.bat new file mode 100644 index 0000000000..d40b6a03c3 --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/patcher/japan/cd2dvd.bat @@ -0,0 +1,14 @@ +SET FILE_1=SLPS_002.15 +SET FILE_2=SLPS_002.16 +SET FILE_3=BIN.DPK + + +cd2dvd_patcher ___patch_slps.txt %FILE_1% 0 +cd2dvd_patcher ___patch_slps.txt %FILE_2% 0 +cd2dvd_patcher ___patch_bin1.txt %FILE_3% 0 +cd2dvd_patcher ___patch_bin2a.txt %FILE_3% 0 +cd2dvd_patcher ___patch_bin2b.txt %FILE_3% 0 +cd2dvd_patcher ___patch_bin2c.txt %FILE_3% 0 +cd2dvd_patcher ___patch_bin2d.txt %FILE_3% 0 +cd2dvd_patcher ___patch_bin2e.txt %FILE_3% 0 +cd2dvd_patcher ___patch_bin2f.txt %FILE_3% 0 diff --git a/ps1 - guncon conversions/Policenauts/src/patcher/japan/cd2dvd_patcher.exe b/ps1 - guncon conversions/Policenauts/src/patcher/japan/cd2dvd_patcher.exe new file mode 100644 index 0000000000..1252f70016 Binary files /dev/null and b/ps1 - guncon conversions/Policenauts/src/patcher/japan/cd2dvd_patcher.exe differ diff --git a/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___.PAD b/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___.PAD new file mode 100644 index 0000000000..e9784eb4c8 Binary files /dev/null and b/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___.PAD differ diff --git a/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___patch_bin1.txt b/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___patch_bin1.txt new file mode 100644 index 0000000000..feb58beba7 --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___patch_bin1.txt @@ -0,0 +1,34 @@ +; ad8c -> 4bb90 +#40e04 + + + +; gun code 1 - guncon data +$48458 +0180053C0680013CA402A28CA802A88C0014020000440800582A22AC5C2A28ACA102A29000000000FFFF42380C0045300500A01001000234802A20AC842A20AC02000010552A22A0010011345322010800000000 + + + +; gun code 1 - hide laser dot (normal) +$4bb90 +ff03033c +$4bb9c +ff03023c + + + +; gun code 1 - hide laser dot (shot marker) +$4be98 +ff03023c +$4be9c +140082ac +$4bea4 +180082ac + + + +; gun code 1 - hide laser dot (reload) +$4bfb8 +ff03023c +$4bfc4 +ff03033c diff --git a/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___patch_bin1a.txt b/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___patch_bin1a.txt new file mode 100644 index 0000000000..6c45737baa --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___patch_bin1a.txt @@ -0,0 +1,14 @@ +; ad8c -> 4bb90 +#40e04 + + + +; gun code 1 - guncon --> d-pad +$4856c +1841000800000000 + + + +; gun code 1 - d-pad x-adjust +$487a4 +00000000 diff --git a/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___patch_bin2.txt b/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___patch_bin2.txt new file mode 100644 index 0000000000..b43d284427 --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___patch_bin2.txt @@ -0,0 +1,50 @@ +; bin.dpk + +; a12a0 -> 87188 +#-1A118 + + + +; act1 - shooting range + +; gun code 2a - guncon data +$87188 +0180023CA402438CA802488C001C03001C0003AE001C0800761C020800000234 + + + +; gun code 2a - hide laser sight (normal) +$85d60 +ff03023c +$85d84 +ff03023c + + + +; gun code 2a - hide laser sight (shot, reload) +$85c54 +ff03023c +$85c74 +ff03023c + + + +; act1 - shooting range + +; gun code 2b - game #1 (guncon data) +$87140 +0180023CA402438CA802488C001C03001C0003AE001C0800811C0208200003AE + + + +; gun code 2c - act2 highway (guncon data) +$79f7c +0180023CA402438C00000000001C03001C0003AEA802438C00000000F5E7010800140300 + + + +; gun code 2c - hide laser sight (normal) +$79a08 +ff03023c +$79a2c +ff03023c diff --git a/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___patch_bin2a.txt b/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___patch_bin2a.txt new file mode 100644 index 0000000000..c0a02b2144 --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___patch_bin2a.txt @@ -0,0 +1,28 @@ +; bin.dpk + +; a12a0 -> 87188 +#-1A118 + + + +; act1 - shooting range + +; gun code 2a - guncon data +$87188 +0180023CA402438CA802488C001C03001C0003AE001C0800761C020800000234 + + + +; gun code 2a - hide laser sight (normal) +$85d60 +ff03023c +$85d84 +ff03023c + + + +; gun code 2a - hide laser sight (shot, reload) +$85c54 +ff03023c +$85c74 +ff03023c diff --git a/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___patch_bin2b.txt b/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___patch_bin2b.txt new file mode 100644 index 0000000000..2acc26d83d --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___patch_bin2b.txt @@ -0,0 +1,12 @@ +; bin.dpk + +; a12a0 -> 87188 +#-1A118 + + + +; act1 - shooting range + +; gun code 2b - game #1 (guncon data) +$87140 +0180023CA402438CA802488C001C03001C0003AE001C0800811C0208200003AE diff --git a/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___patch_bin2c.txt b/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___patch_bin2c.txt new file mode 100644 index 0000000000..14a7f01399 --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___patch_bin2c.txt @@ -0,0 +1,18 @@ +; bin.dpk + +; a12a0 -> 87188 +#-1A118 + + + +; gun code 2c - act2 highway (guncon data) +$79f7c +0180023CA402438C00000000001C03001C0003AEA802438C00000000F5E7010800140300 + + + +; gun code 2c - hide laser sight (normal) +$79a08 +ff03023c +$79a2c +ff03023c diff --git a/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___patch_bin2d.txt b/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___patch_bin2d.txt new file mode 100644 index 0000000000..ca707767ca --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___patch_bin2d.txt @@ -0,0 +1,19 @@ +; bin.dpk + + +; f0c70 -> 92284 +#-5e9ec + + +; act5 - mass driver +; gun code 2d - guncon data +$92284 +0180023CA402438C00000000001C03001C0003AEA802438C00000000B748020800140300 + + + +; gun code 2d - hide laser sight (normal) +$91dcc +ff03023c +$91df0 +ff03023c diff --git a/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___patch_bin2e.txt b/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___patch_bin2e.txt new file mode 100644 index 0000000000..be7aeb658e --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___patch_bin2e.txt @@ -0,0 +1,20 @@ +; bin.dpk + + +; d0980 --> 92794 +#-3E1EC + + +; act7 - lobby + +; gun code 2e- guncon data +$92794 +0180023CA402438C00000000001C03001C0003AEA802438C00000000FB49020800140300 + + + +; gun code 2e - hide laser sight (normal) +$922c4 +ff03023c +$922e8 +ff03023c diff --git a/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___patch_bin2f.txt b/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___patch_bin2f.txt new file mode 100644 index 0000000000..98f6e7971f --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___patch_bin2f.txt @@ -0,0 +1,20 @@ +; bin.dpk + + +; 105e84 -> 91c98 +#-741ec + + +; act7 - garage + +; gun code 2f - guncon data +$91c98 +0180023CA402438C00000000001C03001C0003AEA802438C000000003C47020800140300 + + + +; gun code 2f - hide laser sight (normal) +$917cc +ff03023c +$917f0 +ff03023c diff --git a/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___patch_slps.txt b/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___patch_slps.txt new file mode 100644 index 0000000000..d5cfff4d2a --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/patcher/japan/patch/___patch_slps.txt @@ -0,0 +1,48 @@ +; ab0 -> 102b0 +#f800 + + +; checksum verification (remove) +$1ab7a +0010 + + + +; guncon -> mouse ($49e0 = run-time BIOS code) +;$49e0 +;AC40000800000000 +$102b0 +01801F3CA002FF370380043C48F984340100899063000F3433002F150000000012000934010089A004008F8406009884040080A40200E92904002011FF03093C0400E9AF0E0000100800E9AFA1FFEF2160FFEF2180490F0000790F002078E901AA02093CAAAA29351800E901107800009E00EF210400EFAFF0FF18230800F8AF02008F94FFFC1834FFFFEF390020E9310200201100000000FFF718330800E9310200201100000000FFFB18330040E9310200201100000000FFFB18330000F8A7020098A404801F3C39F9EF93120004340500E4154BF9F8933BF9EF93000000002478F8013BF9EFA300000F3CC474EF8D7A12000800000000 + + + +; ignore guncon buttons (adventure) +$23584 +EC40000800000000 +$103b0 +03800B3C39F96B3502006115000000000300C2A00400C48C00000000638D000800000000 + + + +; install mouse hooks +$23520 +F840000800000000 +$103e0 +0000013C0008023CAC404234E04922ACE44920AC0008023C04414234D84922ACDC4920AC0480013C4A8D000839F92124 + + + +; 1-time mouse driver init +;$49d8 +;0441000800000000 +$10410 +01801F3CAC02E4930000000007008010AC02E0A304801F3C1200043439F9E4A3FFFC04343AF9E4A73CF9E0A72611000C010004247812000800000000 + + + +; guncon --> d-pad remap +;$4856c +;1841000800000000 +$10460 +0480063C39F9C19012000234140041100180063C0680013CA402C28CA802C88C0014020000440800582A22AC5C2A28ACA102C290A202C89000000000A202C2A0FF004238FF00083926400201244002010C0008310200001180000834082228A40680083C4E2A08955D21010800000000 + diff --git a/ps1 - guncon conversions/Policenauts/src/src/cd2dvd_patcher/cd2dvd_patcher.dsp b/ps1 - guncon conversions/Policenauts/src/src/cd2dvd_patcher/cd2dvd_patcher.dsp new file mode 100644 index 0000000000..8c69312541 --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/src/cd2dvd_patcher/cd2dvd_patcher.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="cd2dvd_patcher" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=cd2dvd_patcher - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "cd2dvd_patcher.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "cd2dvd_patcher.mak" CFG="cd2dvd_patcher - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "cd2dvd_patcher - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "cd2dvd_patcher - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "cd2dvd_patcher - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"cd2dvd_patcher.exe" + +!ELSEIF "$(CFG)" == "cd2dvd_patcher - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"cd2dvd_patcher.exe" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "cd2dvd_patcher - Win32 Release" +# Name "cd2dvd_patcher - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\patcher.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/ps1 - guncon conversions/Policenauts/src/src/cd2dvd_patcher/cd2dvd_patcher.dsw b/ps1 - guncon conversions/Policenauts/src/src/cd2dvd_patcher/cd2dvd_patcher.dsw new file mode 100644 index 0000000000..1513cd6c5a --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/src/cd2dvd_patcher/cd2dvd_patcher.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "cd2dvd_patcher"=".\cd2dvd_patcher.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/ps1 - guncon conversions/Policenauts/src/src/cd2dvd_patcher/patcher.cpp b/ps1 - guncon conversions/Policenauts/src/src/cd2dvd_patcher/patcher.cpp new file mode 100644 index 0000000000..05ef215011 --- /dev/null +++ b/ps1 - guncon conversions/Policenauts/src/src/cd2dvd_patcher/patcher.cpp @@ -0,0 +1,229 @@ +#include +#include + +FILE *fp; +char file_name[4096]; + +unsigned char image[0x100000 * 16]; +int image_size; + +unsigned char patch_src[512][4096]; +unsigned char patch_src_wild[512][4096]; +unsigned char patch_dst[512][4096]; +unsigned char patch_dst_wild[512][4096]; +int patch_fixed[512]; + +int patch_src_len[512]; +int patch_dst_len[512]; + +int patch_index[512]; +int patch_count; + +int lcv; +int ram_offset; + +int main( int argc, char** argv ) +{ + memset( patch_fixed, -1, sizeof(patch_fixed) ); + + + sprintf( file_name, "patch//%s", argv[1] ); + fp = fopen( file_name, "r" ); + if( !fp ) return -1; + + while( !feof(fp) ) + { + fgets( file_name, 4096, fp ); + lcv=0; + + if( file_name[0] == 0x0d || file_name[0] == 0x0a ) + continue; + + + if( file_name[0] == ';' ) + continue; + + + // get code + while( file_name[lcv] != 0x0a && file_name[lcv] != 0x0d ) + { + int value; + + value = 0; + + + if( file_name[0] == '#' ) + { + sscanf( file_name+1, "%X", &ram_offset ); + break; + } + + + if( file_name[0] == '$' ) + { + sscanf( file_name+1, "%X", &value ); + value -= ram_offset; + + patch_fixed[patch_count] = value; + + break; + } + + + if( file_name[lcv+0] == '*' && + file_name[lcv+1] == '*' ) + { + patch_src_wild[patch_count][lcv/2] = 1; + } + else + { + sscanf( file_name+lcv, "%02X", &value ); + + patch_src[patch_count][lcv/2] = value; + } + + patch_src_len[patch_count]++; + lcv += 2; + } + + + fgets( file_name, 4096, fp ); + lcv=0; + + while( file_name[lcv] != 0x0a && file_name[lcv] != 0x0d ) + { + int value; + + value = 0; + if( file_name[lcv+0] == '*' && + file_name[lcv+1] == '*' ) + { + patch_dst_wild[patch_count][lcv/2] = 1; + } + else + { + sscanf( file_name+lcv, "%02X", &value ); + + patch_dst[patch_count][lcv/2] = value; + } + + patch_dst_len[patch_count]++; + lcv += 2; + } + + patch_count++; + } + + fclose( fp ); + + + + sprintf( file_name, "%s", argv[2] ); + fp = fopen( file_name, "rb" ); + if( !fp ) return -1; + + if( argc==4 ) + { + int seeker; + + sscanf( argv[3], "%X", &seeker ); + fseek( fp, seeker, SEEK_SET ); + } + image_size = fread( image, 1, 0x100000 * 16, fp ); + + fclose( fp ); + + + + int patches; + + patches = patch_count; + for( lcv=0; lcv= 0x22853 ) + //lcv2 += 0; + + int idx; + + idx = 0; + lcv = start_lcv; + + for( int lcv3=0; lcv3 (USA) http://redump.org/disc/3300/ +> (Japan) SCPS-10016 + + + +Converts justifiers to dual guncon + + + +Instructions: +1. Rip game cd to bin/cue or ccd/img format +2. Run bin/ppf-o-matic3 +3. Drag-drop bin or img file +4. Drag-drop bin/ppf file +5. Hit patch + + + +Uninstall: +1. Run bin/ppf-o-matic3 +2. Click 'undo patch' +3. Drag-drop bin or img file +4. Drag-drop bin/ppf file +5. Hit patch diff --git a/ps1 - guncon conversions/Project Horned Owl/src/code/japan/boot-1.txt b/ps1 - guncon conversions/Project Horned Owl/src/code/japan/boot-1.txt new file mode 100644 index 0000000000..ef5e8eab53 --- /dev/null +++ b/ps1 - guncon conversions/Project Horned Owl/src/code/japan/boot-1.txt @@ -0,0 +1,65 @@ +; 100410-100800 +; - 100410-1004xx = write guncon hooks +; - 100600-100800 = guncon pad code + + + +org $801002b8 + +j $80100410 +nop + + + +; copy guncon --> justifier pad code +lui t0,$8010 +ori t0,t0,$0600 +lui t1,$8002 +ori t1,t1,$2a18 + +ori t2,r0,$100 + + +COPY_CODE1: +lw a0,$0(t0) +addi t2,t2,$fffc +sw a0,$0(t1) + +addiu t0,t0,4 +bne t2,r0,COPY_CODE1 +addiu t1,t1,4 + + + +; install jmp hooks +lui t0,$8002 + + +; #1 - guncon data +lui t1,$0800 +ori t1,t1,$8a86 +sw t1,$2c00(t0) +sw r0,$2c04(t0) + + +; #2 - offscreen shot +ori t1,r0,$1000 +sh t1,$2a12(t0) + + +; #3 - guncon detection +ori t1,r0,$0060 +sh t1,$2860(t0) + +; ================================ +; ================================ +; ================================ + +DONE: + +; OLD code +lw v0,$10(v0) +nop + +j $801002c0 +nop diff --git a/ps1 - guncon conversions/Project Horned Owl/src/code/japan/pad-guncon-1.txt b/ps1 - guncon conversions/Project Horned Owl/src/code/japan/pad-guncon-1.txt new file mode 100644 index 0000000000..2d4136f6fe --- /dev/null +++ b/ps1 - guncon conversions/Project Horned Owl/src/code/japan/pad-guncon-1.txt @@ -0,0 +1,133 @@ +; 22a18-22bxx +; - 22a18-22bxx = remap buttons, id, cursor data + + + +org $80022c00 + +j $80022a18 +nop + + + +; get player address +lw v0,$4fc(gp) +;nop + +; ================================ +; ================================ +; ================================ + +; remap guncon ID to justifier +ori s0,r0,$30 +sb s0,0(at) + + + + +;80022ad4 : 3410007F ORI ffffffff (s0), 00000000 (r0), 007f (127), +;80022ad8 : 341101FF ORI 00000001 (s1), 00000000 (r0), 01ff (511), + +; force cursor data (guncon x-y) +lh s0,4(v0) +lh s1,6(v0) +;nop + + +; x-axis + +; 256 guncon (pSX rough center) --> 129 justifier --> 0 center +addi s0,s0,$ff80 +addi s0,s0,$ff7f + +; 1.48333333333333 adjustment range (pSX 356 --> 240) +; - 89 / 60 ===> x * (64-4) / 89 +sll at,s0,2 +sll s0,s0,6 +sub s0,s0,at + +lui at,0x02e0 +ori at,0x5c0b +mult s0,at +mfhi s0 + +; 0 center --> 129 justifier +addi s0,s0,$81 + + + +; y-axis + +; 136 guncon (pSX rough center) --> 120 justifier --> 0 center +addi s1,s1,$fff0 +;addi s1,s1,$ff88 + +; no adjustment range (pSX 240 --> 240 range) +;lui at,0x7800 +;ori at,0x0000 +;mult s1,at +;mfhi s1 + +; 0 center --> 120 justifier +;addi s1,s1,$78 + + + + +; remap guncon --> justifier buttons + +; $2000 = trigger --> $8000 = trigger +; $0008 = A --> $4000 = auxiliary +; $4000 = B --> $0008 = start + +; at,a0,ra + +lhu at,2(v0) +ori a0,r0,$ffff + + + +; check trigger (low-assert) +andi v1,at,$2000 +bne v1,r0,REMAP_A +nop + +; set $8000 bit +andi a0,a0,$7fff + + + +REMAP_A: +; check aux +andi v1,at,$0008 +bne v1,r0,REMAP_B +nop + +; set $4000 bit +andi a0,a0,$bfff + + + + +REMAP_B: +; check start +andi v1,at,$4000 +bne v1,r0,REMAP_BUTTONS +nop + +; lower $0008 bit +andi a0,a0,$fff7 + + + +REMAP_BUTTONS: +sh a0,2(v0) + +; ================================ +; ================================ +; ================================ + +DONE: + +j $80022c08 +nop diff --git a/ps1 - guncon conversions/Project Horned Owl/src/code/usa/asm - horned owl.bat b/ps1 - guncon conversions/Project Horned Owl/src/code/usa/asm - horned owl.bat new file mode 100644 index 0000000000..9572fe7d47 --- /dev/null +++ b/ps1 - guncon conversions/Project Horned Owl/src/code/usa/asm - horned owl.bat @@ -0,0 +1,6 @@ +del *.bin + +spasm -b pad-guncon-1.txt pad-guncon-1.bin +spasm -b boot-1.txt boot-1.bin + +pause diff --git a/ps1 - guncon conversions/Project Horned Owl/src/code/usa/boot-1.txt b/ps1 - guncon conversions/Project Horned Owl/src/code/usa/boot-1.txt new file mode 100644 index 0000000000..9700937ea7 --- /dev/null +++ b/ps1 - guncon conversions/Project Horned Owl/src/code/usa/boot-1.txt @@ -0,0 +1,65 @@ +; 100410-100800 +; - 100410-1004xx = write guncon hooks +; - 100600-100800 = guncon pad code + + + +org $801001f4 + +j $80100410 +nop + + + +; copy guncon --> justifier pad code +lui t0,$8010 +ori t0,t0,$0600 +lui t1,$8002 +ori t1,t1,$28ec + +ori t2,r0,$100 + + +COPY_CODE1: +lw a0,$0(t0) +addi t2,t2,$fffc +sw a0,$0(t1) + +addiu t0,t0,4 +bne t2,r0,COPY_CODE1 +addiu t1,t1,4 + + + +; install jmp hooks +lui t0,$8002 + + +; #1 - guncon data +lui t1,$0800 +ori t1,t1,$8a3b +sw t1,$2ad4(t0) +sw r0,$2ad8(t0) + + +; #2 - offscreen shot +ori t1,r0,$1000 +sh t1,$28e6(t0) + + +; #3 - guncon detection +ori t1,r0,$0060 +sh t1,$22704(t0) + +; ================================ +; ================================ +; ================================ + +DONE: + +; OLD code +lw v0,$10(v0) +nop + +j $801001fc +nop diff --git a/ps1 - guncon conversions/Project Horned Owl/src/code/usa/pad-guncon-1.txt b/ps1 - guncon conversions/Project Horned Owl/src/code/usa/pad-guncon-1.txt new file mode 100644 index 0000000000..b020c0ea3d --- /dev/null +++ b/ps1 - guncon conversions/Project Horned Owl/src/code/usa/pad-guncon-1.txt @@ -0,0 +1,135 @@ +; 228ec-22ac4 +; - 228ec-229xx = remap buttons, id, cursor data + + + +org $80022ad4 + +j $800228ec +nop + + + +; get player address +lw v0,$534(gp) +;nop + +; ================================ +; ================================ +; ================================ + +; remap guncon ID to justifier +ori s0,r0,$30 +sb s0,0(at) + + + + +;80022ad4 : 3410007F ORI ffffffff (s0), 00000000 (r0), 007f (127), +;80022ad8 : 341101FF ORI 00000001 (s1), 00000000 (r0), 01ff (511), + +; force cursor data (guncon x-y) +lh s0,4(v0) +lh s1,6(v0) +;nop + + +; x-axis + +; 256 guncon (pSX rough center) --> 129 justifier --> 0 center +addi s0,s0,$ff80 +addi s0,s0,$ff7f + +; 256x240 mode +; +; 1.48333333333333 adjustment range (pSX 356 --> 240) +; - 89 / 60 ===> x * (64-4) / 89 +sll at,s0,2 +sll s0,s0,6 +sub s0,s0,at + +lui at,0x02e0 +ori at,0x5c0b +mult s0,at +mfhi s0 + +; 0 center --> 129 justifier +addi s0,s0,$81 + + + +; y-axis + +; 136 guncon (pSX rough center) --> 120 justifier --> 0 center +addi s1,s1,$fff0 +;addi s1,s1,$ff88 + +; no adjustment range (pSX 240 --> 240 range) +;lui at,0x7800 +;ori at,0x0000 +;mult s1,at +;mfhi s1 + +; 0 center --> 120 justifier +;addi s1,s1,$78 + + + + +; remap guncon --> justifier buttons + +; $2000 = trigger --> $8000 = trigger +; $0008 = A --> $4000 = auxiliary +; $4000 = B --> $0008 = start + +; at,a0,ra + +lhu at,2(v0) +ori a0,r0,$ffff + + + +; check trigger (low-assert) +andi v1,at,$2000 +bne v1,r0,REMAP_A +nop + +; set $8000 bit +andi a0,a0,$7fff + + + +REMAP_A: +; check aux +andi v1,at,$0008 +bne v1,r0,REMAP_B +nop + +; set $4000 bit +andi a0,a0,$bfff + + + + +REMAP_B: +; check start +andi v1,at,$4000 +bne v1,r0,REMAP_BUTTONS +nop + +; lower $0008 bit +andi a0,a0,$fff7 + + + +REMAP_BUTTONS: +sh a0,2(v0) + +; ================================ +; ================================ +; ================================ + +DONE: + +j $80022adc +nop diff --git a/ps1 - guncon conversions/Project Horned Owl/src/code/usa/spasm.exe b/ps1 - guncon conversions/Project Horned Owl/src/code/usa/spasm.exe new file mode 100644 index 0000000000..c31eff4a16 Binary files /dev/null and b/ps1 - guncon conversions/Project Horned Owl/src/code/usa/spasm.exe differ diff --git a/ps1 - guncon conversions/Project Horned Owl/src/notes/project_horned_owl - boot.txt b/ps1 - guncon conversions/Project Horned Owl/src/notes/project_horned_owl - boot.txt new file mode 100644 index 0000000000..c6115d7415 --- /dev/null +++ b/ps1 - guncon conversions/Project Horned Owl/src/notes/project_horned_owl - boot.txt @@ -0,0 +1,26 @@ +801002b4 : 3C1F8010 LUI 801002b4 (ra), 8010 (32784), +801002b8 : 8FFF03F0 LW 80100000 (ra), 03f0 (80100000 (ra)) [801003f0] +801002bc : 00000000 NOP +801002c0 : 0C040060 JAL 80100180, bfc03d60 (ra), +801002c4 : 00000000 NOP +(..) +8010017c : 00000000 NOP +801001e4 : 0C040085 JAL 80100214, 801001e4 (ra), +801001e8 : 00000000 NOP +801001ec : 8F820000 LW 00000000 (v0), 0000 (801003ec (gp)) [801003ec] +801001f0 : 00000000 NOP +801001f4 : 8C420010 LW 80010800 (v0), 0010 (80010800 (v0)) [80010810] +801001f8 : 00000000 NOP + + +; start compressed exe +801001fc : 0040F809 JALR 80013430 (v0), 801001ec (ra), +80100200 : 00000000 NOP + + + + +80100000-80100800 = code +80100400-80100800 = code (empty) +($c00) +80100800-80100xxx = data (LZ) diff --git a/ps1 - guncon conversions/Project Horned Owl/src/notes/project_horned_owl - guncon.txt b/ps1 - guncon conversions/Project Horned Owl/src/notes/project_horned_owl - guncon.txt new file mode 100644 index 0000000000..0134ea7ce8 --- /dev/null +++ b/ps1 - guncon conversions/Project Horned Owl/src/notes/project_horned_owl - guncon.txt @@ -0,0 +1,54 @@ +; check controller type (3x = Justifier, 6x = guncon) +800226dc : 80230000 LB 800b6ae0 (v1), 0000 (8008b264 (at)) [8008b264] +800226e0 : 34020020 ORI 00000000 (v0), 00000000 (r0), 0020 (32), +800226e4 : 10620036 BEQ 00000030 (v1), 00000020 (v0), 800227c0, +800226e8 : 28620021 SLTI 00000020 (v0), 00000030 (v1), 0021 (33), + +800226ec : 10400005 BEQ 00000000 (v0), 00000000 (r0), 80022704, +800226f0 : 34020010 ORI 00000000 (v0), 00000000 (r0), 0010 (16), + +; change this to 60 (justifier -> guncon) +80022704 : 34020030 ORI 00000010 (v0), 00000000 (r0), 0030 (48), +80022708 : 1062004B BEQ 00000030 (v1), 00000030 (v0), 80022838, +8002270c : 34020040 ORI 00000030 (v0), 00000000 (r0), 0040 (64), + + + + +; force jump to 'offscreen shot data' reload +800228d8 : 8383053C LB 800b6ae0 (v1), 053c (8008a94c (gp)) [8008ae88] +800228dc : 00000000 NOP +800228e0 : 28620003 SLTI 00000000 (v0), 00000000 (v1), 0003 (3), +800228e4 : 14400078 BNE 00000001 (v0), 00000000 (r0), 80022ac8, +800228e8 : 00005821 ADDU 00000002 (t3), 00000000 (r0), 00000000 (r0), + + + +NOTE: +228ec-22ac4 = justifier math (reusable) + + + + +; manually set guncon data here (x,y) = reload normally +80022ad4 : 3410007F ORI ffffffff (s0), 00000000 (r0), 007f (127), +80022ad8 : 341101FF ORI 00000001 (s1), 00000000 (r0), 01ff (511), + + +; current player address in (gp) +80022adc : 8F820534 LW 00000001 (v0), 0534 (8008a94c (gp)) [8008ae80] + +80022ae0 : 3C01800C LUI 8008b264 (at), 800c (32780), +80022ae4 : 2421BCA6 ADDIU 800c0000 (at), 800c0000 (at), bca6 (48294), +80022ae8 : 00320821 ADDU 800bbca6 (at), 800bbca6 (at), 00000000 (s2), +80022aec : A4300000 SH 0000007f (s0), 0000 (800bbca6 (at)) [800bbca6] +80022af0 : 3C01800C LUI 800bbca6 (at), 800c (32780), +80022af4 : 2421BCA8 ADDIU 800c0000 (at), 800c0000 (at), bca8 (48296), +80022af8 : 00320821 ADDU 800bbca8 (at), 800bbca8 (at), 00000000 (s2), +80022afc : A4310000 SH 000001ff (s1), 0000 (800bbca8 (at)) [800bbca8] + + + +; justifier --> guncon buttons (remap them here or above) +80022b00 : 90430002 LBU 00000000 (v1), 0002 (800b65a0 (v0)) [800b65a2] +80022b04 : 90420003 LBU 800b65a0 (v0), 0003 (800b65a0 (v0)) [800b65a3] diff --git a/ps1 - guncon conversions/Project Horned Owl/src/notes/project_horned_owl - japan - boot.txt b/ps1 - guncon conversions/Project Horned Owl/src/notes/project_horned_owl - japan - boot.txt new file mode 100644 index 0000000000..bed7f25493 --- /dev/null +++ b/ps1 - guncon conversions/Project Horned Owl/src/notes/project_horned_owl - japan - boot.txt @@ -0,0 +1,17 @@ +801002b0 : 8F820000 LW 00000000 (v0), 0000 (8010030c (gp)) [8010030c] +801002b4 : 00000000 NOP +801002b8 : 8C420010 LW 80010800 (v0), 0010 (80010800 (v0)) [80010810] +801002bc : 00000000 NOP + + +; start compressed exe +801002c0 : 0040F809 JALR 80013e38 (v0), 801002b0 (ra), +801002c4 : 00000000 NOP + + + + +80100000-80100800 = code +80100400-80100800 = code (empty) +($c00) +80100800-80100xxx = data (LZ) diff --git a/ps1 - guncon conversions/Project Horned Owl/src/notes/project_horned_owl - japan - guncon.txt b/ps1 - guncon conversions/Project Horned Owl/src/notes/project_horned_owl - japan - guncon.txt new file mode 100644 index 0000000000..cb39a01c81 --- /dev/null +++ b/ps1 - guncon conversions/Project Horned Owl/src/notes/project_horned_owl - japan - guncon.txt @@ -0,0 +1,57 @@ +; check controller type (3x = Justifier, 6x = guncon) +80022838 : 00021E03 SRA 1f801110 (v1), 30000000 (v0), 18 (24), +8002283c : 34020020 ORI 30000000 (v0), 00000000 (r0), 0020 (32), +80022840 : 10620036 BEQ 00000030 (v1), 00000020 (v0), 8002291c, +80022844 : 28620021 SLTI 00000020 (v0), 00000030 (v1), 0021 (33), +80022848 : 10400005 BEQ 00000000 (v0), 00000000 (r0), 80022860, +8002284c : 34020010 ORI 00000000 (v0), 00000000 (r0), 0010 (16), + +; change this to 60 (justifier -> guncon) +80022860 : 34020030 ORI 00000010 (v0), 00000000 (r0), 0030 (48), +80022864 : 1062004B BEQ 00000030 (v1), 00000030 (v0), 80022994, +80022868 : 34020040 ORI 00000030 (v0), 00000000 (r0), 0040 (64), + + + + + +; force jump to 'offscreen shot data' reload +80022a04 : 83830504 LB 800b5e24 (v1), 0504 (80086dac (gp)) [800872b0] +80022a08 : 00000000 NOP +80022a0c : 28620003 SLTI 00000000 (v0), 00000000 (v1), 0003 (3), +80022a10 : 14400078 BNE 00000001 (v0), 00000000 (r0), 80022bf4, +80022a14 : 00005821 ADDU 02820282 (t3), 00000000 (r0), 00000000 (r0), + + + +NOTE: +22a18-22bxx = justifier math (reusable) + + + + +; manually set guncon data here (x,y) = reload normally +80022c00 : 3410007F ORI 800b9f5c (s0), 00000000 (r0), 007f (127), +80022c04 : 341101FF ORI 00000010 (s1), 00000000 (r0), 01ff (511), + + + + +; current player address in (gp) +80022c08 : 8F8304FC LW 00000000 (v1), 04fc (80086dac (gp)) [800872a8] + +80022c0c : 3C01800C LUI 8008768c (at), 800c (32780), +80022c10 : 2421AFFA ADDIU 800c0000 (at), 800c0000 (at), affa (45050), +80022c14 : 00320821 ADDU 800baffa (at), 800baffa (at), 00000000 (s2), +80022c18 : A4300000 SH 0000007f (s0), 0000 (800baffa (at)) [800baffa] +80022c1c : 3C01800C LUI 800baffa (at), 800c (32780), +80022c20 : 2421AFFC ADDIU 800c0000 (at), 800c0000 (at), affc (45052), +80022c24 : 00320821 ADDU 800baffc (at), 800baffc (at), 00000000 (s2), +80022c28 : A4310000 SH 000001ff (s1), 0000 (800baffc (at)) [800baffc] +80022c2c : 08008B0F J 80022c3c, +80022c30 : 00000000 NOP +(..) + +; justifier --> guncon buttons (remap them here or above) +80022c3c : 90620002 LBU 00000001 (v0), 0002 (800b58b4 (v1)) [800b58b6] +80022c40 : 90630003 LBU 800b58b4 (v1), 0003 (800b58b4 (v1)) [800b58b7] diff --git a/ps1 - guncon conversions/Project Horned Owl/src/patcher/japan/cd2dvd.bat b/ps1 - guncon conversions/Project Horned Owl/src/patcher/japan/cd2dvd.bat new file mode 100644 index 0000000000..d1772133a5 --- /dev/null +++ b/ps1 - guncon conversions/Project Horned Owl/src/patcher/japan/cd2dvd.bat @@ -0,0 +1,5 @@ +SET FILE_1=PSX.EXE +SET FILE_2=DATA.BIN + + +cd2dvd_patcher ___patch.txt %FILE_1% 0 diff --git a/ps1 - guncon conversions/Project Horned Owl/src/patcher/japan/cd2dvd_patcher.exe b/ps1 - guncon conversions/Project Horned Owl/src/patcher/japan/cd2dvd_patcher.exe new file mode 100644 index 0000000000..1252f70016 Binary files /dev/null and b/ps1 - guncon conversions/Project Horned Owl/src/patcher/japan/cd2dvd_patcher.exe differ diff --git a/ps1 - guncon conversions/Project Horned Owl/src/patcher/japan/patch/___.PAD b/ps1 - guncon conversions/Project Horned Owl/src/patcher/japan/patch/___.PAD new file mode 100644 index 0000000000..e9784eb4c8 Binary files /dev/null and b/ps1 - guncon conversions/Project Horned Owl/src/patcher/japan/patch/___.PAD differ diff --git a/ps1 - guncon conversions/Project Horned Owl/src/patcher/japan/patch/___patch.txt b/ps1 - guncon conversions/Project Horned Owl/src/patcher/japan/patch/___patch.txt new file mode 100644 index 0000000000..c0ca36c4c5 --- /dev/null +++ b/ps1 - guncon conversions/Project Horned Owl/src/patcher/japan/patch/___patch.txt @@ -0,0 +1,15 @@ +; ram offset (raw -> ram) +#FF800 + + + +; exe hooking ($ab8) +$1002b8 +0401040800000000 +$100410 +1080083C000608350280093C182A293500010A340000048DFCFF4A21000024AD04000825FBFF4015040029250280083C0008093C868A2935002C09AD042C00AD00100934122A09A560000934602809A51000428C00000000B000040800000000 + + +; guncon code +$100600 +FC04828F30001034000030A0040050840600518480FF10227FFF1022800810008081100022800102E002013C0B5C2134180001021080000081001022F0FF312202004194FFFF0434002023300200601400000000FF7F8430080023300200601400000000FFBF8430004023300200601400000000F7FF8430020044A4028B000800000000 diff --git a/ps1 - guncon conversions/Project Horned Owl/src/patcher/usa/cd2dvd.bat b/ps1 - guncon conversions/Project Horned Owl/src/patcher/usa/cd2dvd.bat new file mode 100644 index 0000000000..1ea54b8e13 --- /dev/null +++ b/ps1 - guncon conversions/Project Horned Owl/src/patcher/usa/cd2dvd.bat @@ -0,0 +1,5 @@ +SET FILE_1=SCUS_944.08 +SET FILE_2=DATA.BIN + + +cd2dvd_patcher ___patch.txt %FILE_1% 0 diff --git a/ps1 - guncon conversions/Project Horned Owl/src/patcher/usa/cd2dvd_patcher.exe b/ps1 - guncon conversions/Project Horned Owl/src/patcher/usa/cd2dvd_patcher.exe new file mode 100644 index 0000000000..1252f70016 Binary files /dev/null and b/ps1 - guncon conversions/Project Horned Owl/src/patcher/usa/cd2dvd_patcher.exe differ diff --git a/ps1 - guncon conversions/Project Horned Owl/src/patcher/usa/patch/___.PAD b/ps1 - guncon conversions/Project Horned Owl/src/patcher/usa/patch/___.PAD new file mode 100644 index 0000000000..e9784eb4c8 Binary files /dev/null and b/ps1 - guncon conversions/Project Horned Owl/src/patcher/usa/patch/___.PAD differ diff --git a/ps1 - guncon conversions/Project Horned Owl/src/patcher/usa/patch/___patch.txt b/ps1 - guncon conversions/Project Horned Owl/src/patcher/usa/patch/___patch.txt new file mode 100644 index 0000000000..701a595d8b --- /dev/null +++ b/ps1 - guncon conversions/Project Horned Owl/src/patcher/usa/patch/___patch.txt @@ -0,0 +1,15 @@ +; ram offset (raw -> ram) +#FF800 + + + +; exe hooking +$1001f4 +0401040800000000 +$100410 +1080083C000608350280093CEC28293500010A340000048DFCFF4A21000024AD04000825FBFF4015040029250280083C0008093C3B8A2935D42A09AD00100934E62809A560000934042709A51000428C000000007F00040800000000 + + +; guncon code +$100600 +3405828F30001034000030A0040050840600518480FF10227FFF1022800810008081100022800102E002013C0B5C2134180001021080000081001022F0FF312202004194FFFF0434002023300200601400000000FF7F8430080023300200601400000000FFBF8430004023300200601400000000F7FF8430020044A4B78A000800000000 diff --git a/ps1 - guncon conversions/Project Horned Owl/src/src/cd2dvd_patcher/cd2dvd_patcher.dsp b/ps1 - guncon conversions/Project Horned Owl/src/src/cd2dvd_patcher/cd2dvd_patcher.dsp new file mode 100644 index 0000000000..8c69312541 --- /dev/null +++ b/ps1 - guncon conversions/Project Horned Owl/src/src/cd2dvd_patcher/cd2dvd_patcher.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="cd2dvd_patcher" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=cd2dvd_patcher - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "cd2dvd_patcher.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "cd2dvd_patcher.mak" CFG="cd2dvd_patcher - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "cd2dvd_patcher - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "cd2dvd_patcher - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "cd2dvd_patcher - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"cd2dvd_patcher.exe" + +!ELSEIF "$(CFG)" == "cd2dvd_patcher - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"cd2dvd_patcher.exe" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "cd2dvd_patcher - Win32 Release" +# Name "cd2dvd_patcher - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\patcher.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/ps1 - guncon conversions/Project Horned Owl/src/src/cd2dvd_patcher/cd2dvd_patcher.dsw b/ps1 - guncon conversions/Project Horned Owl/src/src/cd2dvd_patcher/cd2dvd_patcher.dsw new file mode 100644 index 0000000000..1513cd6c5a --- /dev/null +++ b/ps1 - guncon conversions/Project Horned Owl/src/src/cd2dvd_patcher/cd2dvd_patcher.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "cd2dvd_patcher"=".\cd2dvd_patcher.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/ps1 - guncon conversions/Project Horned Owl/src/src/cd2dvd_patcher/patcher.cpp b/ps1 - guncon conversions/Project Horned Owl/src/src/cd2dvd_patcher/patcher.cpp new file mode 100644 index 0000000000..05ef215011 --- /dev/null +++ b/ps1 - guncon conversions/Project Horned Owl/src/src/cd2dvd_patcher/patcher.cpp @@ -0,0 +1,229 @@ +#include +#include + +FILE *fp; +char file_name[4096]; + +unsigned char image[0x100000 * 16]; +int image_size; + +unsigned char patch_src[512][4096]; +unsigned char patch_src_wild[512][4096]; +unsigned char patch_dst[512][4096]; +unsigned char patch_dst_wild[512][4096]; +int patch_fixed[512]; + +int patch_src_len[512]; +int patch_dst_len[512]; + +int patch_index[512]; +int patch_count; + +int lcv; +int ram_offset; + +int main( int argc, char** argv ) +{ + memset( patch_fixed, -1, sizeof(patch_fixed) ); + + + sprintf( file_name, "patch//%s", argv[1] ); + fp = fopen( file_name, "r" ); + if( !fp ) return -1; + + while( !feof(fp) ) + { + fgets( file_name, 4096, fp ); + lcv=0; + + if( file_name[0] == 0x0d || file_name[0] == 0x0a ) + continue; + + + if( file_name[0] == ';' ) + continue; + + + // get code + while( file_name[lcv] != 0x0a && file_name[lcv] != 0x0d ) + { + int value; + + value = 0; + + + if( file_name[0] == '#' ) + { + sscanf( file_name+1, "%X", &ram_offset ); + break; + } + + + if( file_name[0] == '$' ) + { + sscanf( file_name+1, "%X", &value ); + value -= ram_offset; + + patch_fixed[patch_count] = value; + + break; + } + + + if( file_name[lcv+0] == '*' && + file_name[lcv+1] == '*' ) + { + patch_src_wild[patch_count][lcv/2] = 1; + } + else + { + sscanf( file_name+lcv, "%02X", &value ); + + patch_src[patch_count][lcv/2] = value; + } + + patch_src_len[patch_count]++; + lcv += 2; + } + + + fgets( file_name, 4096, fp ); + lcv=0; + + while( file_name[lcv] != 0x0a && file_name[lcv] != 0x0d ) + { + int value; + + value = 0; + if( file_name[lcv+0] == '*' && + file_name[lcv+1] == '*' ) + { + patch_dst_wild[patch_count][lcv/2] = 1; + } + else + { + sscanf( file_name+lcv, "%02X", &value ); + + patch_dst[patch_count][lcv/2] = value; + } + + patch_dst_len[patch_count]++; + lcv += 2; + } + + patch_count++; + } + + fclose( fp ); + + + + sprintf( file_name, "%s", argv[2] ); + fp = fopen( file_name, "rb" ); + if( !fp ) return -1; + + if( argc==4 ) + { + int seeker; + + sscanf( argv[3], "%X", &seeker ); + fseek( fp, seeker, SEEK_SET ); + } + image_size = fread( image, 1, 0x100000 * 16, fp ); + + fclose( fp ); + + + + int patches; + + patches = patch_count; + for( lcv=0; lcv= 0x22853 ) + //lcv2 += 0; + + int idx; + + idx = 0; + lcv = start_lcv; + + for( int lcv3=0; lcv3 (USA) http://redump.org/disc/4817/ + + +Converts justifiers to dual guncon + + + +Instructions: +1. Rip game cd to bin/cue or ccd/img format +2. Run bin/ppf-o-matic3 +3. Drag-drop bin or img file +4. Drag-drop bin/ppf file +5. Hit patch + + + +Uninstall: +1. Run bin/ppf-o-matic3 +2. Click 'undo patch' +3. Drag-drop bin or img file +4. Drag-drop bin/ppf file +5. Hit patch diff --git a/ps1 - guncon conversions/Rebel Assault 2/src/code/usa/asm - rebel2.bat b/ps1 - guncon conversions/Rebel Assault 2/src/code/usa/asm - rebel2.bat new file mode 100644 index 0000000000..85538c378d --- /dev/null +++ b/ps1 - guncon conversions/Rebel Assault 2/src/code/usa/asm - rebel2.bat @@ -0,0 +1,5 @@ +del *.bin + +spasm -b pad-guncon-1.txt pad-guncon-1.bin + +pause diff --git a/ps1 - guncon conversions/Rebel Assault 2/src/code/usa/pad-guncon-1.txt b/ps1 - guncon conversions/Rebel Assault 2/src/code/usa/pad-guncon-1.txt new file mode 100644 index 0000000000..424224aa25 --- /dev/null +++ b/ps1 - guncon conversions/Rebel Assault 2/src/code/usa/pad-guncon-1.txt @@ -0,0 +1,196 @@ +; 2ff80-30320 +; - 30200-30320 = remap buttons, id, cursor data + + + +org $800301f8 + +j $80030200 +nop + + + +lui v0,$800e +ori v0,$5b56 + +; ======================================= +; ======================================= +; ======================================= + +; at, a0, s2, v0, v1,s3,s4 +; - v0 = guncon data +; - at = temp +; - s2 = guncon x +; - v1 = guncon y + + +REMAP_GUNCON: + +; remap guncon ID to justifier +ori at,r0,$31 +sb at,1(v0) + + + +; force cursor data (guncon x-y) +lh s2,4(v0) +lh v1,6(v0) +;nop + + + + +; set valid latch data (1,10 = guncon offscreen normally) +; - 0 = onscreen, 1 = offscreen +slti at,s2,2 +beq at,r0,REMAP_XY +ori at,r0,1 + + +; offscreen shot - force (0,0) +sh r0,4(v0) +sh r0,6(v0) +beq r0,r0,REMAP_GUNCON_BUTTONS +sh r0,8(v0) + + + + +REMAP_XY: + +; signal on-screen shot +sb at,5(v0) + + + + +; x-axis + +; 255 guncon (pSX rough center) --> 160 justifier --> 0 center +addi s2,s2,$ffa1 +;addi s2,s2,$ff60 +addi s2,s2,$ff9d + + + +; adjustment range (pSX 384 --> 320) +; - 80 / 96 (384 * 128 / 320) ===> x * (64+16) / 96 +sll at,s2,6 +sll s2,s2,4 +add s2,s2,at + +lui at,0x02aa +ori at,0xaaaa +mult s2,at +mfhi s2 + +; 0 center --> 160+157 justifier +;addi s2,s2,$13d +addi s2,s2,$100 + +sh s2,8(v0) + + + +; y-axis + +; 136 guncon (pSX rough center) --> 120 justifier --> 0 center +addi v1,v1,$fff0 +addi v1,v1,$ff93 + +; no adjustment range (pSX 240 --> 240 range) +;lui at,0x7800 +;ori at,0x0000 +;mult s1,at +;mfhi s1 + +; 0 center --> 120+12 justifier +addi v1,v1,$88 + +sh v1,6(v0) + + + + +; stage 12 special calibration +lui a0,$800b+1 +lw a0,$da7c(a0) +lui at,$5032 +ori at,at,$316c + +bne a0,at,REMAP_GUNCON_BUTTONS +nop + + +; change xy centering +addi s2,s2,$04 +sh s2,8(v0) +addi v1,v1,$04 +sh v1,6(v0) + + + + +REMAP_GUNCON_BUTTONS: + +; remap guncon --> justifier buttons + +; $2000 = trigger --> $8000 = trigger +; $0008 = A --> $4000 = auxiliary +; $4000 = B --> $0008 = start + +; at,a0,ra + +lhu s2,2(v0) +ori a0,r0,$ffff + + + +; check trigger (low-assert) +andi v1,s2,$2000 +bne v1,r0,REMAP_A +nop + +; set $8000 bit +andi a0,a0,$7fff + + + +REMAP_A: +; check aux +andi v1,s2,$0008 +bne v1,r0,REMAP_B +nop + +; set $4000 bit +andi a0,a0,$bfff + + + + +REMAP_B: +; check start +andi v1,s2,$4000 +bne v1,r0,REMAP_BUTTONS +nop + +; lower $0008 bit +andi a0,a0,$fff7 + + + + +REMAP_BUTTONS: +sh a0,2(v0) + +; ================================ +; ================================ +; ================================ + +DONE: + +; OLD code +ori v0,r0,4 +j $80037c7c +lui at,$800f + diff --git a/ps1 - guncon conversions/Rebel Assault 2/src/code/usa/spasm.exe b/ps1 - guncon conversions/Rebel Assault 2/src/code/usa/spasm.exe new file mode 100644 index 0000000000..c31eff4a16 Binary files /dev/null and b/ps1 - guncon conversions/Rebel Assault 2/src/code/usa/spasm.exe differ diff --git a/ps1 - guncon conversions/Rebel Assault 2/src/notes/rebel assault 2 - guncon.txt b/ps1 - guncon conversions/Rebel Assault 2/src/notes/rebel assault 2 - guncon.txt new file mode 100644 index 0000000000..98d6bb3661 --- /dev/null +++ b/ps1 - guncon conversions/Rebel Assault 2/src/notes/rebel assault 2 - guncon.txt @@ -0,0 +1,138 @@ +e5b01 = p1 ID + + +e5b57 = p2 ID +e5b58 = p2 buttons +e5b5b = p2 latch + + +80037c28 : 90220000 LBU 00000000 (v0), 0000 (800e5b01 (at)) [800e5b01] +80037c2c : 00000000 NOP +80037c30 : 00021902 SRL 00000000 (v1), 00000041 (v0), 04 (4), + +===> justifier ID +80037c34 : 34020003 ORI 00000041 (v0), 00000000 (r0), 0003 (3), + +80037c38 : 1062000E BEQ 00000004 (v1), 00000003 (v0), 80037c74, +80037c3c : 00009021 ADDU 800a7a88 (s2), 00000000 (r0), 00000000 (r0), +80037c40 : 34020004 ORI 00000003 (v0), 00000000 (r0), 0004 (4), +80037c44 : 146200C3 BNE 00000004 (v1), 00000004 (v0), 80037f54, +80037c48 : 00000000 NOP +80037c4c : 3C01800F LUI 800e5b01 (at), 800f (32783), + + + + + +===> remap data here +80037c74 : 34020004 ORI 00000003 (v0), 00000000 (r0), 0004 (4), +80037c78 : 3C01800F LUI 800e5b57 (at), 800f (32783), +===> + +80037c7c : 2421BC0E ADDIU 800f0000 (at), 800f0000 (at), bc0e (48142), +80037c80 : 00300821 ADDU 800ebc0e (at), 800ebc0e (at), 00000118 (s0), +80037c84 : A4220000 SH 00000004 (v0), 0000 (800ebd26 (at)) [800ebd26] +80037c88 : 3C01800E LUI 800ebd26 (at), 800e (32782), +80037c8c : 24215B02 ADDIU 800e0000 (at), 800e0000 (at), 5b02 (23298), +80037c90 : 00310821 ADDU 800e5b02 (at), 800e5b02 (at), 00000056 (s1), +80037c94 : 94230000 LHU 00000003 (v1), 0000 (800e5b58 (at)) [800e5b58] +80037c98 : 3C01800F LUI 800e5b58 (at), 800f (32783), +80037c9c : 2421BC08 ADDIU 800f0000 (at), 800f0000 (at), bc08 (48136), +80037ca0 : 00300821 ADDU 800ebc08 (at), 800ebc08 (at), 00000118 (s0), +80037ca4 : 94220000 LHU 00000004 (v0), 0000 (800ebd20 (at)) [800ebd20] +80037ca8 : 00039027 NOR 00000000 (s2), 00000000 (r0), 0000ffff (v1), +80037cac : 00021027 NOR 00000000 (v0), 00000000 (r0), 00000000 (v0), +80037cb0 : 02421024 AND ffffffff (v0), ffff0000 (s2), ffffffff (v0), +80037cb4 : 30428000 ANDI ffff0000 (v0), ffff0000 (v0), 8000 (32768), +80037cb8 : 10400003 BEQ 00000000 (v0), 00000000 (r0), 80037cc8, +80037cbc : 34040001 ORI 800ebc08 (a0), 00000000 (r0), 0001 (1), +80037cc8 : 3C03800E LUI 0000ffff (v1), 800e (32782), + + + + + + +80093cec : 25EFC11C ADDIU 800c0000 (t7), 800c0000 (t7), c11c (49436), +80093cf0 : 00067080 SLL 0000000a (t6), 00000001 (a2), 02 (2), +80093cf4 : 01CF3821 ADDU ff000000 (a3), 00000004 (t6), 800bc11c (t7), +80093cf8 : 8CF80000 LW 800e5b56 (t8), 0000 (800bc120 (a3)) [800bc120] +80093cfc : 10400026 BEQ 00000000 (v0), 00000000 (r0), 80093d98, + +===> remove justifier latch reset +80093d00 : A3020000 SB 00000000 (v0), 0000 (800e5b5b (t8)) [800e5b5b] + + + + + + +; justifier latch check (1 = okay) +80037d28 : 90290000 LBU 00000000 (t1), 0000 (800e5b5b (at)) [800e5b5b] +80037d2c : 00000000 NOP +80037d30 : 3128FFFF ANDI 00000000 (t0), 00000000 (t1), ffff (65535), +80037d34 : 1100002C BEQ 00000000 (t0), 00000000 (r0), 80037de8, +80037d38 : 00003021 ADDU 1f801070 (a2), 00000000 (r0), 00000000 (r0), + + + +80037de8 : 00002821 ADDU 00000001 (a1), 00000000 (r0), 00000000 (r0), +80037dec : 3C01800C LUI 800e5b5b (at), 800c (32780), +80037df0 : A434DA3C SH 00000001 (s4), da3c (800c0000 (at)) [800bda3c] +80037df4 : 14C00003 BNE 00000000 (a2), 00000000 (r0), 80037e04, +80037df8 : 00000000 NOP +80037dfc : 10A00044 BEQ 00000000 (a1), 00000000 (r0), 80037f10, +80037e00 : 00000000 NOP +80037f10 : 3C01800C LUI 800c0000 (at), 800c (32780), +80037f14 : A434DA3C SH 00000001 (s4), da3c (800c0000 (at)) [800bda3c] + + + +80037d3c : 00003821 ADDU 00007568 (a3), 00000000 (r0), 00000000 (r0), +80037d40 : 11000010 BEQ 00000001 (t0), 00000000 (r0), 80037d84, +80037d44 : 00002821 ADDU 00000001 (a1), 00000000 (r0), 00000000 (r0), +80037d48 : 02202021 ADDU 00000001 (a0), 00000056 (s1), 00000000 (r0), +80037d4c : 3C01800E LUI 800e5b5b (at), 800e (32782), +80037d50 : 24215B08 ADDIU 800e0000 (at), 800e0000 (at), 5b08 (23304), +80037d54 : 00240821 ADDU 800e5b08 (at), 800e5b08 (at), 00000056 (a0), + +; gun-x +80037d58 : 84220000 LH 00000001 (v0), 0000 (800e5b5e (at)) [800e5b5e] +80037d5c : 3C01800E LUI 800e5b5e (at), 800e (32782), +80037d60 : 24215B06 ADDIU 800e0000 (at), 800e0000 (at), 5b06 (23302), +80037d64 : 00240821 ADDU 800e5b06 (at), 800e5b06 (at), 00000056 (a0), + +; gun-y +80037d68 : 84230000 LH 00000000 (v1), 0000 (800e5b5c (at)) [800e5b5c] +80037d6c : 24840004 ADDIU 00000056 (a0), 00000056 (a0), 0004 (4), +80037d70 : 24E70001 ADDIU 00000000 (a3), 00000000 (a3), 0001 (1), +80037d74 : 00C23021 ADDU 00000000 (a2), 00000000 (a2), 00000000 (v0), + + + + +; calibration +; - bda34 = ff69 / ffe2 +80037e08 : 9442DA34 LHU 800c0000 (v0), da34 (800c0000 (v0)) [800bda34] +80037e0c : 3C03800C LUI 000000ef (v1), 800c (32780), +80037e10 : 9463DA38 LHU 800c0000 (v1), da38 (800c0000 (v1)) [800bda38] +80037e14 : 00021400 SLL 0000ff69 (v0), 0000ff69 (v0), 10 (16), +80037e18 : 00021403 SRA ff690000 (v0), ff690000 (v0), 10 (16), + +80037e14 : 00021400 SLL 0000ff69 (v0), 0000ff69 (v0), 10 (16), +80037e18 : 00021403 SRA ff690000 (v0), ff690000 (v0), 10 (16), + +; gun-x - $98 (c2-140???) +80037e1c : 00C21021 ADDU ffffff69 (v0), 00000090 (a2), ffffff69 (v0), +80037e20 : 00031C00 SLL 0000ffe2 (v1), 0000ffe2 (v1), 10 (16), +80037e24 : 00031C03 SRA ffe20000 (v1), ffe20000 (v1), 10 (16), +80037e28 : 3C01800F LUI 80000000 (at), 800f (32783), + + + +; gun-y - $1e (50??-f0??) +80037e44 : 8C220000 LW fffffff9 (v0), 0000 (800ebd30 (at)) [800ebd30] +80037e48 : 00A31821 ADDU ffffffe2 (v1), 000000f0 (a1), ffffffe2 (v1), +80037e4c : 3C01800F LUI 800ebd30 (at), 800f (32783), +80037e50 : 2421BC1C ADDIU 800f0000 (at), 800f0000 (at), bc1c (48156), +80037e54 : 00300821 ADDU 800ebc1c (at), 800ebc1c (at), 00000118 (s0), diff --git a/ps1 - guncon conversions/Rebel Assault 2/src/patcher/usa/cd2dvd.bat b/ps1 - guncon conversions/Rebel Assault 2/src/patcher/usa/cd2dvd.bat new file mode 100644 index 0000000000..79556b8034 --- /dev/null +++ b/ps1 - guncon conversions/Rebel Assault 2/src/patcher/usa/cd2dvd.bat @@ -0,0 +1,6 @@ +SET FILE_1=SLUS_003.81 +SET FILE_2=SLUS_003.86 + + +cd2dvd_patcher ___patch.txt %FILE_1% 0 +cd2dvd_patcher ___patch.txt %FILE_2% 0 diff --git a/ps1 - guncon conversions/Rebel Assault 2/src/patcher/usa/cd2dvd_patcher.exe b/ps1 - guncon conversions/Rebel Assault 2/src/patcher/usa/cd2dvd_patcher.exe new file mode 100644 index 0000000000..1252f70016 Binary files /dev/null and b/ps1 - guncon conversions/Rebel Assault 2/src/patcher/usa/cd2dvd_patcher.exe differ diff --git a/ps1 - guncon conversions/Rebel Assault 2/src/patcher/usa/patch/___.PAD b/ps1 - guncon conversions/Rebel Assault 2/src/patcher/usa/patch/___.PAD new file mode 100644 index 0000000000..e9784eb4c8 Binary files /dev/null and b/ps1 - guncon conversions/Rebel Assault 2/src/patcher/usa/patch/___.PAD differ diff --git a/ps1 - guncon conversions/Rebel Assault 2/src/patcher/usa/patch/___patch.txt b/ps1 - guncon conversions/Rebel Assault 2/src/patcher/usa/patch/___patch.txt new file mode 100644 index 0000000000..7b44f9dc40 --- /dev/null +++ b/ps1 - guncon conversions/Rebel Assault 2/src/patcher/usa/patch/___patch.txt @@ -0,0 +1,21 @@ +; ram offset (raw -> ram) +#f800 + + + +; remap guncon --> justifier data +$37c74 +80C0000800000000 +$30200 +0E80023C565B423431000134010041A004005284060043840200412A0500201001000134040040A4060040A41B000010080040A4050041A0A1FF52229DFF5222800912000091120020904102AA02013CAAAA2134180041021090000002015222080052A4F0FF632093FF632088006320060043A40C80043C7CDA848C3250013C6C312134050081140000000003005222080052A404006320060043A402005294FFFF0434002043320200601400000000FF7F8430080043320200601400000000FFBF8430004043320200601400000000F7FF8430020044A4040002341FDF00080F80013C + + + +; justifier ID +$37c34 +06 + + +; justifier latch reset +$93d00 +00000000 diff --git a/ps1 - guncon conversions/Rebel Assault 2/src/src/cd2dvd_patcher/cd2dvd_patcher.dsp b/ps1 - guncon conversions/Rebel Assault 2/src/src/cd2dvd_patcher/cd2dvd_patcher.dsp new file mode 100644 index 0000000000..8c69312541 --- /dev/null +++ b/ps1 - guncon conversions/Rebel Assault 2/src/src/cd2dvd_patcher/cd2dvd_patcher.dsp @@ -0,0 +1,102 @@ +# Microsoft Developer Studio Project File - Name="cd2dvd_patcher" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=cd2dvd_patcher - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "cd2dvd_patcher.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "cd2dvd_patcher.mak" CFG="cd2dvd_patcher - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "cd2dvd_patcher - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "cd2dvd_patcher - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "cd2dvd_patcher - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"cd2dvd_patcher.exe" + +!ELSEIF "$(CFG)" == "cd2dvd_patcher - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"cd2dvd_patcher.exe" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "cd2dvd_patcher - Win32 Release" +# Name "cd2dvd_patcher - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\patcher.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/ps1 - guncon conversions/Rebel Assault 2/src/src/cd2dvd_patcher/cd2dvd_patcher.dsw b/ps1 - guncon conversions/Rebel Assault 2/src/src/cd2dvd_patcher/cd2dvd_patcher.dsw new file mode 100644 index 0000000000..1513cd6c5a --- /dev/null +++ b/ps1 - guncon conversions/Rebel Assault 2/src/src/cd2dvd_patcher/cd2dvd_patcher.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "cd2dvd_patcher"=".\cd2dvd_patcher.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/ps1 - guncon conversions/Rebel Assault 2/src/src/cd2dvd_patcher/patcher.cpp b/ps1 - guncon conversions/Rebel Assault 2/src/src/cd2dvd_patcher/patcher.cpp new file mode 100644 index 0000000000..05ef215011 --- /dev/null +++ b/ps1 - guncon conversions/Rebel Assault 2/src/src/cd2dvd_patcher/patcher.cpp @@ -0,0 +1,229 @@ +#include +#include + +FILE *fp; +char file_name[4096]; + +unsigned char image[0x100000 * 16]; +int image_size; + +unsigned char patch_src[512][4096]; +unsigned char patch_src_wild[512][4096]; +unsigned char patch_dst[512][4096]; +unsigned char patch_dst_wild[512][4096]; +int patch_fixed[512]; + +int patch_src_len[512]; +int patch_dst_len[512]; + +int patch_index[512]; +int patch_count; + +int lcv; +int ram_offset; + +int main( int argc, char** argv ) +{ + memset( patch_fixed, -1, sizeof(patch_fixed) ); + + + sprintf( file_name, "patch//%s", argv[1] ); + fp = fopen( file_name, "r" ); + if( !fp ) return -1; + + while( !feof(fp) ) + { + fgets( file_name, 4096, fp ); + lcv=0; + + if( file_name[0] == 0x0d || file_name[0] == 0x0a ) + continue; + + + if( file_name[0] == ';' ) + continue; + + + // get code + while( file_name[lcv] != 0x0a && file_name[lcv] != 0x0d ) + { + int value; + + value = 0; + + + if( file_name[0] == '#' ) + { + sscanf( file_name+1, "%X", &ram_offset ); + break; + } + + + if( file_name[0] == '$' ) + { + sscanf( file_name+1, "%X", &value ); + value -= ram_offset; + + patch_fixed[patch_count] = value; + + break; + } + + + if( file_name[lcv+0] == '*' && + file_name[lcv+1] == '*' ) + { + patch_src_wild[patch_count][lcv/2] = 1; + } + else + { + sscanf( file_name+lcv, "%02X", &value ); + + patch_src[patch_count][lcv/2] = value; + } + + patch_src_len[patch_count]++; + lcv += 2; + } + + + fgets( file_name, 4096, fp ); + lcv=0; + + while( file_name[lcv] != 0x0a && file_name[lcv] != 0x0d ) + { + int value; + + value = 0; + if( file_name[lcv+0] == '*' && + file_name[lcv+1] == '*' ) + { + patch_dst_wild[patch_count][lcv/2] = 1; + } + else + { + sscanf( file_name+lcv, "%02X", &value ); + + patch_dst[patch_count][lcv/2] = value; + } + + patch_dst_len[patch_count]++; + lcv += 2; + } + + patch_count++; + } + + fclose( fp ); + + + + sprintf( file_name, "%s", argv[2] ); + fp = fopen( file_name, "rb" ); + if( !fp ) return -1; + + if( argc==4 ) + { + int seeker; + + sscanf( argv[3], "%X", &seeker ); + fseek( fp, seeker, SEEK_SET ); + } + image_size = fread( image, 1, 0x100000 * 16, fp ); + + fclose( fp ); + + + + int patches; + + patches = patch_count; + for( lcv=0; lcv= 0x22853 ) + //lcv2 += 0; + + int idx; + + idx = 0; + lcv = start_lcv; + + for( int lcv3=0; lcv3