msx2: save map_table before switching pages
authorgeijoenr <enric.geijo@gmail.com>
Tue, 30 May 2017 17:59:48 +0000 (19:59 +0200)
committergeijoenr <geijoenr@gmail.com>
Mon, 5 Jun 2017 18:23:50 +0000 (20:23 +0200)
commit4761aee038cbda03f75a545b358549c73ec21c13
tree81a807e0851eef256551cf77c92fd05337b2e8eb
parent467fbe2b4a204f7ed99382b36605ef0eb309051f
msx2: save map_table before switching pages

If an interrupt happens between setting the mapper register
and the update of map_table, map_save will take the wrong
input for restoring the mapping when returning from the interrupt.
By saving the map_table at the beginning we ensure that no matter
when the interrupt happens, map_restore sets the right pages.

This prevents some random hangs when doing lots of usermem operations.
Kernel/platform-msx2/msx2.s