or maybe the machine or toy has a dc in socket but all you have is your mobile phone charger...
or maybe you are living free from the mains supply, using either fresh electricity from a diy generator or stored electricity from a rechargable battery
so before you get scissors, cut the plug off, bare the wires, and try wrapping them around the terminals in the battery compartment,
stop and simply make one of these.......
all you need is
*some bits of a tree, i used elder because it has a soft pith, but bamboo would have worked being hollow,
*a phone charger, nokia chargers are an abundant rubbish, so i make a socket for these
*some wire, one single core steel,for the centre positive, one multi core copper for the ground
*a bike spoke suitably cut to serve as a drill bit
i saw using wooden doweling as batteries in michael barfuß's book on converting to 12v for off grid systems, so this is an adaption of that but the diy female socket is my own invention
in this case the branches are cut to length, and appropriately to diameter whether triple A, double A or larger batteries, and hollowed using a sharpened bike spoke.
in the case of the gameboy it expected 3v and i was giving it 5+ v but it was happy. if the machine expects 6v( ie 4x1.5v cells) 5v may still work, but if it expects 9v or 12v then a larger power supply can be used with so many diodes to drop the voltage.