CPCWiki forum

General Category => Programming => Topic started by: shaymanjohn on 13:49, 27 May 20

Title: Bank switching - instant?
Post by: shaymanjohn on 13:49, 27 May 20
When switching memory banks (on a 6128) does the newly selected bank become immediately available, or does it take some time to switch in (maybe end of hblank, or vblank, or some other time)?


This is the code I'm using to switch banks:


ld b, 0x7f
ld c, 0xc4 ; this value is the scheme
out (c), c
... use data from new bank ...


Thanks



Title: Re: Bank switching - instant?
Post by: GUNHED on 14:29, 27 May 20
Quote from: shaymanjohn on 13:49, 27 May 20
When switching memory banks (on a 6128) does the newly selected bank become immediately available,
Yes, it does.

Quote from: shaymanjohn on 13:49, 27 May 20This is the code I'm using to switch banks:
ld b, 0x7f
ld c, 0xc4 ; this value is the scheme
out (c), c
... use data from new bank ...
Thanks

It's more quick and smaller to use:
LD BC,&7FC4
OUT (C),C



Title: Re: Bank switching - instant?
Post by: shaymanjohn on 14:33, 27 May 20
Ah yes!


Thanks GUNHED  :) 
Powered by SMFPacks Menu Editor Mod