Is it possible to drain the batteries quicker through poor code ?

Yes. The following table illustrates power usage by the GBC. Sound is enabled by setting bit 7 of register NR52 ($ff26). Using assembly language command HALT in your main game loop saves power. 2X Spd is double speed mode. Infrared Receive is enabled by setting bits 6 & 7 of register RP ($ff56). Infrared Transmit is turned on by setting bit 0 of register RP ($$ff56).

These measurements are for total current (cart & GBC) drawn from the batteries. The cart used for testing was an original MBC5 cart with the ROM replaced with a low-power flash chip. As a result, these measurements should compare to a Nintendo published ROM cart within 1-2 milliamps. The code in this example used about 85% of the clock cycles available each game loop. (With low power consumption for 15% of each game loop when HALT was used.) This probably closely resembles many games.

As can be seen by the results, the best results are obtained by using none of the special features available, sound disabled, and using HALT in the main game loop. Ideally, your game should use as little battery power as is necessary. In other words, do NOT use features that require more battery power unless you can not accomplish what you are trying to do without using them.

For those that are confused by the values below, consider that a game that uses 55 milliamps will run on batteries for twice as many hours as a game that uses 110 milliamps. Actually, it will run for a little over twice as long but this gets into battery physics that are beyond the scope of these FAQs.

Milliamps   Enable Sound No HALT 2X Spd Enable IR Rx IR Tx On
             
55   - - - - -
70   X - - - -
58   - X - - -
62   - - X - -
57   - - - X -
128   - - - - X
74   X X - - -
78   X - X - -
83   X X X - -
162   X X X X X