memory banks in z180 (Development Foros MSX)MSX Resource Center PassionMSX MSX2 contest           
                       
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 66 invitados y 1 miembro en línea

Eres un usuario anónimo.
 

Foros MSX


Foros MSX

Development - memory banks in z180

Autor

memory banks in z180

ARTRAG
msx master
Mensajes: 1662
Publicado: Octubre 15 2006, 18:36   
Does anyone has experinece on how memory banks work in z180 cpu?

this code

    global  lcall, lret, lretp, __Lbasecode
    psect   lowtext,class=CODE

BBR equ 39h     ;Bank base register


;   lcall - perform a far call

lcall:  ex  af,af'      ;save new bank number
    in0 a,(BBR)     ;get current bank
    push    af      ;save it
    ex  af,af'      ;restore new bank
    sub __Lbasecode/1000h   ;adjust bank number
    out0    (BBR),a
    jp  (HL)        ;go to new routine

lret:   pop af      ;restore bank number
    out0    (BBR),a     ;select it
    ret         ;back to caller

lretp:  push    bc      ;get adjustment
    exx         ;get some unused regs
    pop hl      ;adjustment value
    pop af      ;bank number
    pop de      ;return address
    add hl,sp
    ld  sp,hl       ;remove parameters
    push    de      ;push return address back
    exx
    out0    (BBR),a     ;restore bank
    ret         ;done.


should manage "long calls" i.e. calls to functions outside the active banks
I need to modify it to support ASCII 8K megaroms.
Any suggestion?



AuroraMSX

msx master
Mensajes: 1247
Publicado: Octubre 17 2006, 10:21   
Quote:

Does anyone has experinece on how memory banks work in z180 cpu?


Does this article help?

The german Wikipedia page on the Z180 suggests, that memory is switched in pages of 4K in the memory area 1000-EFFF. Common areas 0 and 1 would be fixed physical memory at adress ranges 0000-0FFF and EFFF-FFFF respectively.

And Zilog also has the specifications of the z180 available as downloadable PDF ...
Huey
msx professional
Mensajes: 585
Publicado: Octubre 17 2006, 11:41   
Is this of any help?:

[ Memory address management of HI-TECH C ]
...removed......

Never mind it was memory management till 0xFFFF
Huey
msx professional
Mensajes: 585
Publicado: Octubre 17 2006, 12:26   
 
 







(c) 1994 - 2008 Fundación MSX Resource Center. MSX es una marca registrada de MSX Licensing Corporation