Changing the chat display order.

Hi, can you tell me how to change the display order of the chat messages so that the newest are on top? And if the only way is to change the code, feel free to let me know the details (I'm experienced in development). Thanks very much.