Does any one know how to write .sav file to s-ram and w-ram on cartridge?
You need some sort of dumper something like the CopyNES, Kazzo, or similar.
Really the .sav file is a raw dump of the WRAM from what I understand. If you got tricky with a EPROM programmer or something you could actually make something work if you made use of a chip clip or something.
You might be able to find someone to help you get the job done if you don't own a dumper and don't plan on acquiring one. I could help out but I don't know how expeditious I'd be.
In most cases, SAV files are just the exact contents of the WRAM chip. Some emulators compact their SAV files though, in which case you'd have to decompress them before copying their contents to carts.
Like infiniteneslives said, with an EPROM programmer you might be able to read/write the WRAM chip. You'd have to connect a bunch of wires from the programmer to the cart (using 2 sockets connected by wires might work) and program/read the chip normally. I'm not sure how you'd go about powering the chip, considering there's a battery that keep the chip alive...
Using a chip clip is the best way I can think. You'd want to power the cart edge with 5V though that way you weren't running off battery power during programming. It's kind of a hack job idea though. Lots of effort with all those wires and high chance of failure...