BANKSWITCHIN (Development Foros MSX)MSX Resource Center MSXdev 2008 - MSX1 development bonanza!           
                       
English Nederlands Español Português Russian                  
 Noticias
   Página principal
  Almacén de noticias
  Temas de noticias

 Recursos
   Foros MSX
  Artículos
  Analisis
  Informe de ferias/RUs
  Álbum de fotos
  Ferias y encuentros
  Encuestas
  Enlaces
  Buscar

 Software
   Descargas
  Tienda Online

 MRC
   Quiénes somos
  Únete a nuestro equipo
  Donar
  Políticas
  Contacta con nosotros
  Enlázanos
  Estadísticas

 Buscar
 
  

  

 Login
 

Login

Contraseña




¿Aún no tienes una cuenta? ¡Conviértete en miembro del MSX Resource Center! ¡Únete a nosotros!.


 Estadísticas
 

Hay 133 invitados y 2 miembros en línea

Eres un usuario anónimo.
 

Foros MSX


Foros MSX

Development - BANKSWITCHIN

Autor

BANKSWITCHIN

norakomi
msx professional
Mensajes: 861
Publicado: Junio 17 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
Mensajes: 620
Publicado: Junio 17 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 Fundación MSX Resource Center. MSX es una marca registrada de MSX Licensing Corporation