Karoshi MSX Community
06 de Julio de 2021, 12:26:10 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 [2]
  Imprimir  
Autor Tema: Replayer PT3 desde ROM compilable con asMSX  (Leído 9126 veces)
0 Usuarios y 1 Visitante están viendo este tema.
ARTRAG
Visitante
« Respuesta #15 : 28 de Noviembre de 2008, 06:55:05 pm »

I think you can get inspired to save some bytes of ram.
e.g. Bulba's code reuses the same locations for different meanings (especially for the ROM patch).
Probably he relies on the fact that the branches of code interested are never used at the same time.
look here:
Código:
CrPsPtr DW 0
AddToEn DB 0
AdInPtA DW 0
AdInPtB DW 0
AdInPtC DW 0
Env_Del DB 0
MODADDR DW 0
ESldAdd DW 0
Delay DB 0
PDSP_
CSP_
PSP_ DW 0
SamPtrs DW 0
OrnPtrs DW 0
PatsPtr DW 0
LPosPtr DW 0
L3
M2
PrSlide DW 0
PrNote DB 0
Version DB 0
;end of moved vars and self-modified code

we have PDSP_, CSP_, PSP_   in the same location and L3, M2, PrSlide in the same location.
This saves 8 bytes in ram.

The extra size in ROM allows the use of the version byte, for the different versions of the pt3 files: for sure you can strip the first 99 bytes also with this code, as no other data are taken from the header apart that (from what i see at least).

The real difference between the versions of replayer seems the volume table, or not ?

« Última modificación: 28 de Noviembre de 2008, 07:18:22 pm por AR » En línea
SapphiRe_MSX
Visitante
« Respuesta #16 : 28 de Noviembre de 2008, 07:47:44 pm »

I think you can get inspired to save some bytes of ram.
e.g. Bulba's code reuses the same locations for different meanings (especially for the ROM patch).
Probably he relies on the fact that the branches of code interested are never used at the same time.

Mmm, cool, I will take a more detailed look after Barcelona's RU Cheesy

Citar
The extra size in ROM allows the use of the version byte, for the different versions of the pt3 files: for sure you can strip the first 99 bytes also with this code, as no other data are taken from the header apart that (from what i see at least).

The version byte is the 13th byte of the PT3 module. We can see it here:

Código:
LD A,(IX+13-100) ;EXTRACT VERSION NUMBER

So you can only strip 13 bytes instead of 99... unless you strip first 99 bytes except byte 13th and change this line. My question is: we really need the version byte and a more generic PT3 player?

There are also some extra code on this version to be used on Spectrum, because it needs extra instructions to set the upper byte of the output port:

Código:
ROUT XOR A
ROUT_A0 LD DE,#FFBF
LD BC,#FFFD
LD HL,AYREGS

And, of course, it doesn't take on mind the upper bits of REG#7... Grin Grin

Citar
The real difference between the versions of replayer seems the volume table, or not ?

No, no. The volume table is generated with the original routine in both ("fixed table" and "all tables") MSX versions. And the "all tables" version also uses the same tone table generator than the S.Bulba version.

I guess both (Bulba's and "all tables") codes are pretty similar.

Regards and thanks for the info
--
Sph.
En línea
Páginas: 1 [2]
  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!