So I've been wondering how NES game engines use memory mappers for code. I can easily imagine using them for graphics, swapping out patterns and so forth when needed, but say a game engine takes more than one PRG block. How does a game manage jumping between various locations in the code between PRG banks? Is it just when a certain address is written to, that the write is pre-empted and the bank is switched in from PRG-ROM? Or does the engine have to manually perform this switch?