typical memory problems.
Try to leave only one DIMM in one BANK of the motherboard and power on.
If it goes fine, it will boot correctly.
If the memory module is wrong, it will probably fail.
Do the same with the other module.
Run the windows memory test or linux memtest86+ and see what memory problems are you having.
You should have the same memory in both banks.
P4 motherboards normally uses twin banks with the same amount of memory to run properly.
PROCESSOR DIMM BANKS.
......................---A1 B1 A2 B2
[processor] - - | | - - | |
[slot P4 ]--- - - | | - - | |
Normally banks in P4 mainboards are paired, so you must put, in example:
BankA1 - BankB1/BankA2 - BankB2
512 - 0 / 512 - 0
Or 512 - 256 / 512 - 256
Or 256 - 128 / 256 - 128 ...
The same amount and type of memory in A1+A2 or in B1+B2
and so on...
Good luck with this issue.