Oh? Might have missed that bit o' news then. Then I would suggest ro to lift up his ass and re-route the SEE-data to OPL4 FM-registers.
My PSG sfx loop is just this: (Artrag's psg sfx replayer)
;out buffered sfx data xor a ; --- FIXES BITS 6 AND 7 OF MIXER --- ld hl,AYREGS+Mixer set 7,(hl) res 6,(hl) ld c,$a0 ld hl,AYREGS .sfxloop: out (c),a ;first write to psg register ?? inc c outi ;then write volume value ? not sure dec c inc a cp 13 jr nz,.sfxloop ;/out buffered sfx data
So we write to psg register $a0 after which we write the value to $a1.
That's all.
Any idea how to re-route this to FM registers ?
The 4-op channels work fine btw, don’t know why you think they wouldn’t?
really? fixed since when? in version openMSX 17.0 I have currently it still isn't emulated properly (especially 4 in line and 3 in line algoritmes go wrong is my guess)
blueMSX handles it better...
[edit] Just checked again with the best of hamaraja night (rom version msx world wide), sounds still broken... sometimes interesting in a way I'll give you that
More on topic, I suppose you could just VGM log a "song" playing real fast (60 or 50 steps per seconds). That way you can even have multi channel sound effect (detune & delays etc.) which I imagine can give that extra kick you are looking for... especially as it will be played in contrast to the epic 24 channel wave music
Or even with 18 fm channels at you disposal, someone like ARTRTAG could figure out how to make some cool ISR samples by adding up a bunch of sine waves, I am sure of it
The 4-op channels work fine btw, don’t know why you think they wouldn’t?
really? fixed since when? in version openMSX 17.0 I have currently it still isn't emulated properly (especially 4 in line and 3 in line algoritmes go wrong is my guess)
blueMSX handles it better...
[edit] Just checked again with the best of hamaraja night (rom version msx world wide), sounds still broken... sometimes interesting in a way I'll give you that
Is there a ticket for it in the openMSX database? I don’t recall any issues playing OPL3 FM music with VGMPlay, but then again I usually didn’t know the original music for reference, or maybe the tracks I listened to didn’t use any 4op voices.
OpenMSX uses Burczynski’s OPL3 FM core for the OPL4 FM part. There must be a bug in it then, probably worth checking if there have been any bugfixes for that in other emulators that use the same core, or they could consider switching to the new (and highly accurate) Nuked-OPL3 core.
Anyway for FM sound effects you shouldn’t really need to rely on the 4op voices.
Nope, 640kb Moonsound-RAM and 2op ought to be enough for everyone.
More on topic, I suppose you could just VGM log a "song" playing real fast (60 or 50 steps per seconds). That way you can even have multi channel sound effect (detune & delays etc.) which I imagine can give that extra kick you are looking for... especially as it will be played in contrast to the epic 24 channel wave music
Pretty nice idea. You could try to make the effects in MoonBlaster 1.4 or MoonBlaster FM. The maximum tempo is 23, which equates to 1 step per 2 interrupts, which should already be pretty good for authoring sound effects.
But you could even hack it so that you can select tempo 24, which is 1 step per interrupt… Looking at the source code, in moonblas.gen the maximum tempo is determined by the following code in the tempo
function:
ld a,24 ; 3E 18 ld (maxget),a ; 32 maxget
Change that to 25, and you should be able to select tempo 24 to play at a speed of 1 interrupt per step.
Edit: Used a hex editor to find the sequence 3E 18 32 and changed it to 3E 19 32 (in the MoonBlaster 1.4 disk image) and I was able to select tempo 24, however when I try to play at that speed it doesn’t want to proceed past the first note. Looks like it can’t keep up with that…
Edit: Used a hex editor to find the sequence 3E 18 32 and changed it to 3E 19 32 (in the MoonBlaster 1.4 disk image) and I was able to select tempo 24, however when I try to play at that speed it doesn’t want to proceed past the first note. Looks like it can’t keep up with that…
Ok, the reason is this code when it starts playing the music:
ld a,(speed) ; 3A speed sub 2 ; D6 02 ld (spdcnt),a ; 32 spdcnt
That makes it overflow and set a wrong value in spdcnt when tempo is 24. Speed is calculated as 25 - tempo and thus speed is 1 when you set tempo 24. This makes spdcnt 255 instead of 0 which makes it not work. Change the code to sub 1 and it should work.
So, use a hex editor on the MoonBlaster 1.4 disk image and do the following replacements to make it support tempo 24 (1 step / interrupt):
3E 18 32 -> 3E 19 32 D6 02 32 -> D6 01 32
Now you should be able to edit FM sound effects in MoonBlaster 1.4 .
For playing them back I wouldn’t use the MoonBlaster 1.4 replayer though (with I/O ports modified to play on OPL4), it seems much more CPU efficient to record the sound effects as VGM and then process that down into a short register data stream to include in your code with a small playback loop.
MB seems to be not entirely tight when it comes to VGM recording from openMSX. Bengalack had to fix stuff after I noted that the timing of his vgm-playback was crap. Now, perhaps for sfx this probably doesn't matter much.
From what I understood from Bengalack’s post about that in another thread, I think that was more of a problem of the conversion script initially having trouble dealing with timing variation of the I/O (some of which is bound to be there). That’s something I’ve had to deal with in different VGM conversion contexts as well.
It should not be a problem unless MB’s processing for the playback takes longer than 1/60th of a second, which is hopefully not the case. So I think it’s probably good enough. Anyway it’s something that can be dealt with by massaging the data after the effect is created.