AAmbrosio wrote:I´m writing a Prince of Persia for MSX system. I'm having a hard time re-creating the sounds of game.
As MSX use the PSG AY-3-8910 (same as YM-2149 of Atari ST) I think to use the disassembled code for find the sequence of sounds commands.
Unfortunately I don't know the assembler 68000 and I don't find the code.
Someone can help me. Information where are the play sound subroutine and the commands sequences of PSG.
Disassemble of game's executable, Atari v. is available here: http://atari.8bitchip.info/GameDisasm/PrincOfPersia/PRIP322.S
As you may see, I criticized game's sample playback code here. But even with some optimizations done sample playback - and that makes sounds during play - like door openings, run, hero's sounds .... it visibly slows down game - CPU load on 8 MHz 68000 is too high. In big part because samplerate (freq.) is high for that kind of playback. So, my concern is that it will be even much worse on slower MSX - with Z80 CPU, if I remember correct. If sample playback is possible at all on MSX at some acceptable quality.
Just to describe how it goes: there is interrupt generated in accurate intervals, controlled by timer chip. Then sound sample data is read from RAM, and it is converted via table to data for YM chip, and then write 6x in YM, 2 for each sound channel. If freq of interrupts is some 5KHz, it makes big slowdown on Atari, so on slower MSX probably will need lower samplerate - conversion is not problem in fact. Problem may by speed, RAM usage ... I think that better idea would be to look some other version of game, what uses not sampled sounds, but usual, less CPU loading sound generating. For instance Amstrad CPC version, I guess.
I mean, I can give help, but somehow I don't expect that it will work in acceptable quality on MSX.
To add here, that I recently did mod of Atari version, where sample playback goes not via YM, but via STE DMA audio system - it has 0 CPU load during sound play, so game is much better - no slowdowns, quality is better. You may see how it looks here:
Will see YT links for org sound, and DMA sound versions, so can compare.
One question: what source of game you using ? I see a lot for POP online, but that's mostly usable on PC, as I see. Do you have some Z80 code, graphics, sprites usable on MSX ? Game is really good, and was big hit in it's time, I would say that inspired somehow Tomb Rider, for instance. So, idea is good, indeed.