|
Post by ultranarwhal on Apr 25, 2019 21:00:30 GMT
I'm trying to convert my Spectrum game to Amstrad CPC using MPAGD, but currently it has no sound FX as I used the beeper on Speccy.
Does anyone know what tool to use to generate AY FX and how to point MPAGD scripts to generated Sound 0, Sound 1, Sound 2 etc. I tried importing from AGD 4.7 a simple test tape that used Sound 0 to MPAGD, but still no sound on CPC.
Thanks
|
|
|
Post by Jonathan Cauldwell on Apr 28, 2019 19:43:44 GMT
Sounds are presently disabled but it's easy enough to re-enable them with 3 changes to the CPC engine. The call to the sound routine has been commented out and just needs re-inserting. This is how to do it:
In the file EngineCPC.asm change the delay routine from this:
delay push bc ; store loop counter. call vsync ; pause for a frame. ; call plsnd ; time to play sound. pop bc ; restore counter. dec b ; one less iteration. ret z ; done. push bc ; store loop counter again. call vsync ; pause for a frame. pop bc ; restore counter. djnz delay ; repeat. ret
to this:
delay push bc ; store loop counter. call vsync ; pause for a frame. call plsnd ; time to play sound. pop bc ; restore counter. dec b ; one less iteration. ret z ; done. push bc ; store loop counter again. call vsync ; pause for a frame. pop bc ; restore counter. djnz delay ; repeat. ret
Change these 2 lines:
;vsync5 call plsnd ; play sound. vsync5 jp proshr ; shrapnel and stuff.
to look like this:
vsync5 call plsnd ; play sound. jp proshr ; shrapnel and stuff.
and finally, change mloop from this:
mloop call vsync ; synchronise with display.
ld ix,sprtab ; address of sprite table, even sprites. call dspr ; display even sprites.
; call plsnd ; play sounds. call vsync ; synchronise with display. ld ix,sprtab+TABSIZ ; address of first odd sprite.
to this:
mloop call vsync ; synchronise with display.
ld ix,sprtab ; address of sprite table, even sprites. call dspr ; display even sprites.
call plsnd ; play sounds. call vsync ; synchronise with display. ld ix,sprtab+TABSIZ ; address of first odd sprite.
I'll put these back in to the Spectrum and CPC versions for the next release, maybe there needs to be a way of toggling AY sounds on or off as many game designers prefer to use AY music instead.
|
|
|
Post by djcaye on Nov 10, 2022 21:22:23 GMT
I have the same issue. i do not have comments in the lines that you tell us, but SOUND does not work in CPC (version of MPAGD 0.7.10)
Regards!!
|
|
|
Post by ramon on Nov 13, 2022 12:37:15 GMT
I have the same issue. i do not have comments in the lines that you tell us, but SOUND does not work in CPC (version of MPAGD 0.7.10) Regards!! Try this: User routine for CPC Music and FX or this: Sound modAsk me all you need.
|
|
|
Post by djcaye on Nov 14, 2022 6:49:46 GMT
Hola Ramón y gracias!!
Lo he seguido (para crear música) pero, haciendo los pasos, no lo he conseguido.
Descomprimo la ultima versión, Creo la pista de musica y la exporto a ASM, la guardo en la carpeta Resources, cargo la rutina de usuario, y pongo USER 1 en el main loop, pero nada...!!!
Lo más, escucho un zumbido cuando cargo todo!!!
A ver si lo soluciono!!
----
Hi Ramón and thanks.
I follow your tutorial but it does not work for me.
I uncompress the last version, I have made the music track and export as ASM, I put it in "resources" folder, also load the user routine and finally put USER 1 in main loop, but nothing happens...
I only have a small buzz during the game (noise, I mean).
Regards!!
|
|
|
Post by ramon on Nov 14, 2022 20:19:10 GMT
Rutina User CPC:
The last link at the end of the conversation thread contains the correct version. With it you don't need any calls in the mainloop event. Use the command USER 0 for the first song, USER 1 for the next, and so on. Do it at any time you want, it will start the player automatically. Use USER 101 for effect 1 and USER 102 for effect 2, and so on. Use USER 18 to Stop the player at any time. Every time you call the USER n command the player is started again, this is a common error, check it out. Luck.
|
|