The requirement for fighting the pirate masters true form is collecting all 20 dark magic (by defeating Cackle Bats). The fight itself is relatively easy, when you know where to crouch so you won't get hit by the canon balls or the boots in the 2nd phase of the boss fight. The bullets can do you no harm with bubble shield equipped
Items needed: 3x bubble shield
Items recomended: 3x Super Monster Milk, 3x Super Pike Ball
When the cannon balls come from the left, crouch directly in the right corner of the screen front of Risky Boots. When the cannon balls come from the right, move to the second stone block on the floor and crouch over its left edge. This is 100% SAFE and easier then dodging them. (see the picture below)
When the boots fly towards you, again crouch at the right edge of the screen where Risky is. They wont hit you there.
The rest is pretty straight forward.
At the final phase, when Risky commands the cannon and aims at the Pirate Master constantly spam him with your attack, so he cant move away, than shoot the cannon at him. Do this four or five times until he is finally defeated.
Here is also a video from a "no damage" attempt. Its not made by me.
And, as always: Before you downvote this solution, please write down a comment first and tell me what might be the problem. Random downvotes are uncool. Thx.