if in WB-ASS2 I type
>page 2,3,0,6
>bload "stars.bin"
Geladen tot: $ABAF
>page 2,3,0,4
then this means that I have loaded the file stars.bin
into page 2, bank 6.
And after that I switch to bank 4 in that page.
Now my question is, how do I make an assembly file
that does the same?
I'm using a load routine to load .bin files into ram
Should i do something like:
ld a,6
out ($fe),a ;switch page 2 to bank 6
call loadfile ;this routine bloads "stars.bin"
ld a,4
out ($fe),a ;switch page 2 to bank 4
???is this the right way to switch those banks, because
i tried it and it sort of worked (but it gives me some
bugs now and then....)
|
That should do it. If it has bugs, then the loader probably has one. And I assume the code is not in page 2 of course. Also, if you start using DOS2 at some point, you should use the DOS2 functions for mapper access.
Note that bank 6 is not really related to page 2, but just to the mapper in slot 3-0. You can bring up the same bank in page 1 for instance.
|