Moved ISR to pal.S, fixed some bugs (but still broken)