Attention : Attempt at your own risk, dont blame me if you damage something
today i decided to connect this pioneer d4 i had laying around with my pc ...here are the steps involved, if you have a woofer and an amplifier present :
- purchase a computer power supply or psu .i got a second hand imported one for 1000rs . the only determinant of which power supply you should get is the ampere current it provides when used at 12V(as this must be nearly as much power as the amp produces(power=current*voltage)...i bought one which provides 25A current at 12V(12*25=300W) ...as the amplifier is 400W.

- get some connecting cables to connect your woofer to your amplifier and also get a cable which converts a single 3.5mm jack into 2 RCA audio outputs
3.cut the yellow wire(which is the 12V wire on all psu's) as shown in the picture and the black wire beside it .
Taped wires are the ones to cut:

now connect the yellow wire to the +ve terminal of the amplifier and the black wire to the ground of the amplifier. also make a U shaped wire loop and connect it from the +ve terminal to the REM terminal(the rem terminal is acctually used to turn the amp on when the head unit in the car is turned on)
Black U shaped wire


- locate the motherboard connector(the largest one) of the psu and short circuit the green and black wires by using a U shaped loop....this turns on the psu when it is connected to power...


5.connect the woofer to the amplifier output(mine was connected previously in the car so i only had to remember what connections were used to connect the woofer to the amp)
- connect the RCA cables to the amplifier input and connect to an audio device such as pc/mobile etc...and adjust the amplifier gain ...dont make it too much ad that might make the power supply insufficient for the amp and may cauze failure....
conclusion:
the setup works great. the sounds is exactly like it was in the car. Before doing this i went to a couple of car audio shops and they said it was impossible and the computer power supply.. well i proved them wrong.
Questions and comments are welcome.
References:
https://www.pakwheels.com/forums/car-entertainment-electronics/83523-how-hook-car-audio-system-home-d
YouTube - How to connect a car Amplifier in your home