Author Topic: Music/Song Player and AY Collection ?  (Read 1599 times)

0 Members and 1 Guest are viewing this topic.

Offline SuTeKH/Epyteor

  • 6128 Plus
  • ******
  • Posts: 1.414
  • Country: 00
    • Awards
Re: Music/Song Player and AY Collection ?
« Reply #25 on: 11:48, 20 August 21 »
Well, there are plenty of AY Players out there, even a player for the ZX Spectrum so it should be possible to play them directly on CPC too since the AY files got the z80 code inside for driving the AY Chip directly ... question is how to get these into memory and play them on a CPC ?
Firstly, you will need to know if the tune/player is ZX or CPC.
Then, you need to know the address to load the .AY file to memory.
Finally, you need to know the addresses to CALL to play the music.


For example; JUBILEE-3.AY
This is a CPC tune.
The load address is &3FEE.
The CALLs to play the music are: &402E (initialise?), &4031 (play music), &4034 (stop music)


See attached .dsk for a demo! Type RUN"PLAYER"
like
0
No reactions

Online SkulleateR

  • 464 Plus
  • *****
  • Posts: 469
  • Country: de
    • Awards
Re: Music/Song Player and AY Collection ?
« Reply #26 on: 12:03, 20 August 21 »
Firstly, you will need to know if the tune/player is ZX or CPC.
Then, you need to know the address to load the .AY file to memory.
Finally, you need to know the addresses to CALL to play the music.


For example; JUBILEE-3.AY
This is a CPC tune.
The load address is &3FEE.
The CALLs to play the music are: &402E (initialise?), &4031 (play music), &4034 (stop music)


See attached .dsk for a demo! Type RUN"PLAYER"


Yes, allready figured that out ;) Is there a way to read this out ? Are these infos stored in the file itself ?
like
0
No reactions

Offline SuTeKH/Epyteor

  • 6128 Plus
  • ******
  • Posts: 1.414
  • Country: 00
    • Awards
Re: Music/Song Player and AY Collection ?
« Reply #27 on: 12:46, 20 August 21 »
Is there a way to read this out ? Are these infos stored in the file itself ?
The only reference I can find is the "Initialise" and "Play music" addresses in the header.
- xx28 & xx29 has the address of the JP xxxx command to initialise the music (I presume)
- xx2A & xx2B has the address of the JP xxxx command to play 1 note of music.


If you load any .AY file into memory, you can see that the first 40 bytes are the header created for AYEmul. Then the 3 JPs to initialise, play and stop music, then each assembler program(s), then the music data!

like
0
No reactions

Online SkulleateR

  • 464 Plus
  • *****
  • Posts: 469
  • Country: de
    • Awards
Re: Music/Song Player and AY Collection ?
« Reply #28 on: 12:51, 20 August 21 »
The only reference I can find is the "Initialise" and "Play music" addresses in the header.
- xx28 & xx29 has the address of the JP xxxx command to initialise the music (I presume)
- xx2A & xx2B has the address of the JP xxxx command to play 1 note of music.


If you load any .AY file into memory, you can see that the first 40 bytes are the header created for AYEmul. Then the 3 JPs to initialise, play and stop music, then each assembler program(s), then the music data!


Okay, that helps ... I will look into it, thanks :)
like
0
No reactions