The 1st problem is... Why did the resistor burn-up? Maybe the battery is bad/shorted?

How big is the resistor, physically? You can get a good idea of the resistor's power rating from it's size. (Just look-up some specs/dimensions online.)

A lower value resistor will allow more current and generate more heat. A higher value resistor will generate less heat (and is less-likely to burn-up

) but the battery will charge more slowely.

I'm not sure why the diode is there, unless it's to prevent you from charging the battery "backwards" (discharging it). Or, I wonder if it's a Zener diode, which drops a fixed voltage? A zener diode would have to be big enough to dissipate a few watts of power (maybe 3W). A regular diode can be small and only needs something more than the 500mA

*current* rating. Any diode can handle 12 Volts.

6W max with output DC 12 500mA

OK "worst case'', with minimum resistor value and a shorted battery, you'd need a 6 Watt resistor. If we take one of the power formulas (Voltage squared/R or Current squared x R), we can manipulate the formula and calculate the minimum resistance = 24 Ohms.

A 144 Ohm resistor with 12V applied across it (again assuming a shorted or completely dead battery with no internal resistance) would dissipate 1W. You won't find a 144 Ohm resistor, but you could probably find 150 Ohms.

*Please* double-check my math before you solder anything!

A Zener diode sort-of makes sense... With, say 5V, dropped across the Zener, the resistor & battery only have to share about 7V and you can get-away with a lower-value, lower-power resistor and the battery chould charge faster.