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
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:
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:
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...
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.