Karoshi MSX Community
05 de Julio de 2021, 10:46:32 am *
Bienvenido(a), Visitante. Por favor, ingresa o regístrate.

Ingresar con nombre de usuario, contraseña y duración de la sesión
Noticias:
 
   Inicio   Ayuda Buscar Ingresar Registrarse  
Páginas: [1]
  Imprimir  
Autor Tema: about adding msx megarom support from Boriel's ZX-Basic Compiler, help needed  (Leído 3590 veces)
0 Usuarios y 1 Visitante están viendo este tema.
nitrofurano
Karoshi Maniac
****
Mensajes: 259



WWW
« : 16 de Septiembre de 2013, 04:53:23 pm »

i'm interested on adding megarom support (like from konami or ascii, as seen at http://bifi.msxnet.org/msxnet/tech/megaroms.html ), but i'm struggling on this

should we have some initializing code in the rom start somehow, like we need to do on the 32kb .rom versions (which we could add as library), presetting some pages, filling the empty bytes with 0xFF, or anything like?

and which are the limit on the .rom sizes? 2mbyte for konami/ascii 8k, and 4mbyte for ascii 16k?

(i think examples in assembly, like from asmsx or tniasm, can help - i'm really curious to know how to do this! thanks! Smiley )

En línea
pitpan
Karoshi Forum's Guru
*******
Mensajes: 1812


« Respuesta #1 : 18 de Septiembre de 2013, 10:35:16 am »

Theoretically there are no limits to megaROMs, but of course, there ARE limits for the currently known megaROMs. At the moment, 'cause they use a 1 byte (8 bit) selector, they could manage up to 256 pages. As you said, 256 x 8 KB = 2 Mbit and 256 x 16 KB = 4 Mbit, but it is not as easy as it seems, 'cause Konami mappers, for example, do have a limit and only use the lower bits of the selector and reserve the others for different purposes (SCC, etc.).

asMSX has its own MegaROM support and therefore all the examples use the dedicated macros. But if you just disassemble them, you will see how it words. Basically, you just use a memory write to a given address (or range of addresses) and then the bank is switched. As easy as that. But you need to know how to order your code in different pages and make sure that you always load the right one.
En línea
nitrofurano
Karoshi Maniac
****
Mensajes: 259



WWW
« Respuesta #2 : 18 de Septiembre de 2013, 05:29:39 pm »

thanks! for now, the idea would be restricting the code on (the first?) 24kb or 16kb of the rom, and leaving everything else (data, graphics, sound, chiptunes, etc.) after that and accessible as memory paging, just like i use to do on zx-spectrum http://csscgc2013.blogspot.pt/2013/06/walking-around-porto.html
En línea
Páginas: [1]
  Imprimir  
 
Ir a:  

Impulsado por MySQL Impulsado por PHP Powered by SMF 1.1.21 | SMF © 2013, Simple Machines XHTML 1.0 válido! CSS válido!