Autor Tema: The Ruins of Machi Itcza  (Leído 11231 veces)

0 Usuarios y 1 Visitante están viendo este tema.

theNestruo

  • Karoshi Lover
  • ***
  • Mensajes: 236
    • Email
Re: The Ruins of Machi Itcza
« Respuesta #15 en: 14 de Septiembre de 2013, 07:31:44 pm »
(...) and the 9x9 (resulting a 32kb .rom) doesn't open on openmsx with cbios (...)
Don't know if this is problem, but in 32KB ROMs you need to select the right slot of the page 2 manually. More info (Spanish) in this thread or in Z80STSoftware blog.
If you just want the code, grab SETPAGES from here or get asMSX and look for the .search macro definition (source of the macro is in the manual).
theNestruo."Old BASIC programmers never die; they GOSUB but never RETURN."

nitrofurano

  • Karoshi Maniac
  • ****
  • Mensajes: 259
Re: The Ruins of Machi Itcza
« Respuesta #16 en: 14 de Septiembre de 2013, 07:51:09 pm »
(...) and the 9x9 (resulting a 32kb .rom) doesn't open on openmsx with cbios (...)
Don't know if this is problem, but in 32KB ROMs you need to select the right slot of the page 2 manually. More info (Spanish) in this thread or in Z80STSoftware blog.
If you just want the code, grab SETPAGES from here

even that the other .rom files, those 16kb and 8kb (that actually works, as you probably tested and opened fine, i think?), are also allocated at 0x4000?

btw, the 32k version seems to take less than 50 bytes - you mean that it could be placed in a kind of template from the compiling script (not the game code, for avoiding confusions), placed somewhere between 0x4010 and 0x4040, for example? and so, c-bios would recognize this resulting .rom as taking, as rom, from 0x4000 and 0xBFFF, and starting from 0x4010 as well?

Citar
or get asMSX and look for the .search macro definition (source of the macro is in the manual).
where can i find?
« Última modificación: 14 de Septiembre de 2013, 08:56:33 pm por nitrofurano »

pitpan

  • Karoshi Forum's Guru
  • *******
  • Mensajes: 1812
Re: The Ruins of Machi Itcza
« Respuesta #17 en: 14 de Septiembre de 2013, 09:10:10 pm »
For 32 KB ROMs you need to

- Make sure that the resulting ROM is exactly 32 KB (32768 bytes)
- Add at the starting of the ROM some code so that the second page (last 16 KB) are also seen by the MSX

By default, the MSX system only loads the first ROM page (first 16 KB). Use the following code (taken from asMSX, refurbished from Konami disassembled ROMs).

Código: [Seleccionar]
     call    0138h ;RSLREG
        rrca
        rrca
        and     03h
; Secondary Slot
        ld      c,a
        ld      hl,0FCC1h
        add     a,l
        ld      l,a
        ld      a,[hl]
        and     80h
        or      c
        ld      c,a
        inc     l
        inc     l
        inc     l
        inc     l
        ld      a,[hl]
; Define slot ID
        and     0ch
        or      c
        ld      h,80h
; Enable
        call    0024h ;ENASLT

nitrofurano

  • Karoshi Maniac
  • ****
  • Mensajes: 259
Re: The Ruins of Machi Itcza
« Respuesta #18 en: 14 de Septiembre de 2013, 11:41:37 pm »
For 32 KB ROMs you need to

- Make sure that the resulting ROM is exactly 32 KB (32768 bytes)
- Add at the starting of the ROM some code so that the second page (last 16 KB) are also seen by the MSX

By default, the MSX system only loads the first ROM page (first 16 KB). Use the following code (taken from asMSX, refurbished from Konami disassembled ROMs).

Código: [Seleccionar]
     call    0138h ;RSLREG
        rrca
        rrca
        and     03h
; Secondary Slot
        ld      c,a
        ld      hl,0FCC1h
        add     a,l
        ld      l,a
        ld      a,[hl]
        and     80h
        or      c
        ld      c,a
        inc     l
        inc     l
        inc     l
        inc     l
        ld      a,[hl]
; Define slot ID
        and     0ch
        or      c
        ld      h,80h
; Enable
        call    0024h ;ENASLT

thanks, it works fine! :) - updated https://drive.google.com/#folders/0B7Iw8X7IB4-nVi1vTnFOOWE0aG8 - it's the test01j - added this code you sent at ./library/msx32kslotcompatibilitytemplate.bas  (btw, how should i credit that code there? :) )




pitpan

  • Karoshi Forum's Guru
  • *******
  • Mensajes: 1812
Re: The Ruins of Machi Itcza
« Respuesta #19 en: 15 de Septiembre de 2013, 01:09:47 pm »
I'm glad it worked for you. It's the code that the .SEARCH macro uses in asMSX and it appears to be more or less an standard in any >16 KB ROM, even megaROMs do use it.

nitrofurano

  • Karoshi Maniac
  • ****
  • Mensajes: 259
Re: The Ruins of Machi Itcza
« Respuesta #20 en: 15 de Septiembre de 2013, 09:05:17 pm »
thanks! :)