BANKSWITCHIN (Development MSX Fora)MSX Resource Center PassionMSX MSX2 contest           
            
English Nederlands Español Português Russian         
 Nieuws
   Voorpagina
  Nieuws archief
  Nieuws onderwerpen

 Informatie
   MSX Fora
  Artikelen
  Recensies
  Beursverslagen
  Fotoreportages
  Beurzen en meetings
  Enquêtes
  Links
  Zoek

 Software
   Downloads
  Webshop

 MRC
   Wie we zijn
  Kom bij ons team
  Doneren
  Policies
  Contact met het MRC
  Link naar Ons
  Statistieken

 Zoek
 
  

  

 Login
 

Gebruikersnaam

Wachtwoord




Ben je nog niet lid? Klik hier en word MSX vriend!


 Statistieken
 

Er zijn 116 gasten en 1 MSX vriend online

Je bent een anonieme bezoeker.
 

MSX Fora


MSX Fora

Development - BANKSWITCHIN

Schrijver

BANKSWITCHIN

norakomi
msx professional
Berichten: 861
Geplaatst: 17 Juni 2005, 13:44   
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....)
Edwin
msx professional
Berichten: 591
Geplaatst: 17 Juni 2005, 16:46   
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.
 
 







(c) 1994 - 2008 Stichting MSX Resource Center. MSX is een trademark van MSX Licensing Corporation.