I'm pretty sure the firmware knows on cameras that don't use a dummy battery.
On D10 if you have a battery in the camera and plug or unplug in the AC with the camera on, the camera shuts down.
It looks like on this camera physw_status[1] & 0x00004000 is 0 if external power is plugged in, 1 if not.
Both of the above only apply if there is actually power on the plug.
edit:
The above does suggest that incorrect bit fiddling on in physw_status might have side effects depending on the power state, but this shouldn't vary between cards!
AC adapter:
ShowPhySwStatus
NotifyMask 95-64 |0x1770fbff| 63-32 |0x00000000| 31-0 |0x00000000|
SwitchMask 95-64 |0x1770fbff| 63-32 |0x00000000| 31-0 |0x00000000|
InvertData 95-64 |0x0100fbff| 63-32 |0x00000000| 31-0 |0x00000000|
ChataNone 95-64 |0x04700000| 63-32 |0x00000000| 31-0 |0x00000000|
ChataDefault 95-64 |0x1300fbff| 63-32 |0x00000000| 31-0 |0x00000000|
GpioStatus 95-64 |0x0410fbff| 63-32 |0x0090507d| 31-0 |0x00600001|
SwitchStatus 95-64 |0x05100000| 63-32 |0x00000000| 31-0 |0x00000000|
battery:
ShowPhySwStatus
NotifyMask 95-64 |0x1770fbff| 63-32 |0x00000000| 31-0 |0x00000000|
SwitchMask 95-64 |0x1770fbff| 63-32 |0x00000000| 31-0 |0x00000000|
InvertData 95-64 |0x0100fbff| 63-32 |0x00000000| 31-0 |0x00000000|
ChataNone 95-64 |0x04700000| 63-32 |0x00000000| 31-0 |0x00000000|
ChataDefault 95-64 |0x1300fbff| 63-32 |0x00000000| 31-0 |0x00000000|
GpioStatus 95-64 |0x0410fbff| 63-32 |0x0090503d| 31-0 |0x33600001|
SwitchStatus 95-64 |0x05100000| 63-32 |0x00000000| 31-0 |0x00000000|
Looks like there isn't gpio for AC adapter/battery. AC adapter has only two pins but battery three.