THOMSON MO6 SOUND CARD
Modérateurs : Papy.G, fneck, Carl
Re: THOMSON MO6 SOUND CARD
yes, when your program reads the data, send each byte to the sound chip until you have :
- value $38 : no more data to send for this frame (1/50s), next frame : send the remaining data
- value $39 : no more data to send for this frame (1/50s), next frame : do nothing, next frame+1 : send the remaining data
- value $3A : no more data to send for this frame (1/50s), next frame and next frame+1 : do nothing, next frame+2 : send the remaining data
... this is valid up to $3f
if you have : $3f $3f $39
it means doing nothing during the next 15 frames
- value $38 : no more data to send for this frame (1/50s), next frame : send the remaining data
- value $39 : no more data to send for this frame (1/50s), next frame : do nothing, next frame+1 : send the remaining data
- value $3A : no more data to send for this frame (1/50s), next frame and next frame+1 : do nothing, next frame+2 : send the remaining data
... this is valid up to $3f
if you have : $3f $3f $39
it means doing nothing during the next 15 frames
-
- Messages : 312
- Inscription : 01 févr. 2020 20:31
- Localisation : Rome - Italy
Re: THOMSON MO6 SOUND CARD
I think there sonething wrong in my assembly code..
The files sound in this way:
https://filebin.net/qz3wmud9gt20ps40
The files sound in this way:
https://filebin.net/qz3wmud9gt20ps40
-
- Messages : 312
- Inscription : 01 févr. 2020 20:31
- Localisation : Rome - Italy
Re: THOMSON MO6 SOUND CARD
Here is my code:
Code : Tout sélectionner
ldy #$602a ; start data address
ldx base,pcr ; 1/50 sec delay
loop
lda ,y+ ; read data
beq exit ; if 0 exit
tfr a,b
andb #$c0 ; check if control byte
beq delay ; jump to delay subrout
sta $a7c4 ; write to sn76489
ret
bra loop ; main loop
exit
rts ; exit
delay
anda #$07 ; get n frames
inca ; +1
loop2 ; delay 1/50 sec loop
leax -1,x
bne loop2
ldx base,pcr
deca ; decrement n frames
bne loop2
bra ret
base fcw $0b29
-
- Messages : 7989
- Inscription : 18 sept. 2010 12:08
- Localisation : Brest et parfois les Flandres
Re: THOMSON MO6 SOUND CARD
You can optimize(8 cycles) with (2 cycles)
Code : Tout sélectionner
tfr a,b
andb #$c0
beq ...
Code : Tout sélectionner
bita #$C0
beq ...
Samuel.
A500 Vampire V2+ ^8^, A1200 (030@50mhz/fpu/64mb/cf 8go),
A500 GVP530(MMU/FPU) h.s., R-Pi, TO9, TO8D, TO8.Démos
A500 Vampire V2+ ^8^, A1200 (030@50mhz/fpu/64mb/cf 8go),
A500 GVP530(MMU/FPU) h.s., R-Pi, TO9, TO8D, TO8.Démos
Re: THOMSON MO6 SOUND CARD
Noise channel is recognizable.
The problem seems to be from the 3 square channels
Track is Arabian Nights
https://www.smspower.org/Music/Aladdin-SMS
Can you share the dcmoto state (.mrx file) ?
For the timing :
4+1 leax -1,x
3 bne loop2
gives 8 cycles x 2857 ($0b29) = 22856
it's a bit high you should have around 20000 for 1/50 with 6809
If you don't use VBL for sync, you can play at 60hz (original master system freq).
So use $0823 (16666/8) for base.
It will not solve the sound problem, but will play at the right speed.
First thing I would check :
look your data in the dcmoto debugger and see if bytes are of the same values as the .psg files.
On my side I will try to check the data on my file to see if there is a problem.
The problem seems to be from the 3 square channels
Track is Arabian Nights
https://www.smspower.org/Music/Aladdin-SMS
Can you share the dcmoto state (.mrx file) ?
For the timing :
4+1 leax -1,x
3 bne loop2
gives 8 cycles x 2857 ($0b29) = 22856
it's a bit high you should have around 20000 for 1/50 with 6809
If you don't use VBL for sync, you can play at 60hz (original master system freq).
So use $0823 (16666/8) for base.
It will not solve the sound problem, but will play at the right speed.
First thing I would check :
look your data in the dcmoto debugger and see if bytes are of the same values as the .psg files.
On my side I will try to check the data on my file to see if there is a problem.
Dernière modification par Bentoc le 23 févr. 2021 07:43, modifié 1 fois.
-
- Messages : 312
- Inscription : 01 févr. 2020 20:31
- Localisation : Rome - Italy
Re: THOMSON MO6 SOUND CARD
Thanks at all.
This evening i will share the mrx and i want to try to code in basic, checking sound byte by byte.
This evening i will share the mrx and i want to try to code in basic, checking sound byte by byte.
Re: THOMSON MO6 SOUND CARD
I checked the first frame data of the file, it gives :
Code : Tout sélectionner
$86 : 10000110 : latch - Ch 0 - Tone - 0110
$4d : 01001101 : data - 001101 - PLAY 522,63 hz (C5) (3579000 / 32 * 214)
$9c : 10011100 : latch - Ch 0 - Vol - 1100 (12/15)
$aa : 10101010 : latch - Ch 1 - Tone - 1010
$63 : 01100011 : data - 100011 - PLAY 196,22 hz (G3) (3579000 / 32 * 570)
$bb : 10111011 : latch - Ch 1 - Vol - 1011 (11/15)
$cd : 11001101 : latch - Ch 2 - Tone - 1101
$57 : 01010111 : data - 010111 - PLAY 293,55 hz (D4) (3579000 / 32 * 381)
$db : 11011011 : latch - Ch 2 - Vol - 1011 (11/15)
$e6 : 11100110 : latch - noise - Tone - 0110
$ff : 11111111 : latch - noise - Vol - 1111 (15/15)
$38 : end of frame
-
- Messages : 312
- Inscription : 01 févr. 2020 20:31
- Localisation : Rome - Italy
Re: THOMSON MO6 SOUND CARD
Good news.
Now it playng well.
I had a bug on the sn76489 emulator so when the data bit was set the frequency was turned low.
Now i have fixed but i have to test to real machine.
I think the result will be better.
https://filebin.net/pr8p1jc6io45hcjj
Now it playng well.
I had a bug on the sn76489 emulator so when the data bit was set the frequency was turned low.
Now i have fixed but i have to test to real machine.
I think the result will be better.
https://filebin.net/pr8p1jc6io45hcjj
-
- Messages : 312
- Inscription : 01 févr. 2020 20:31
- Localisation : Rome - Italy
Re: THOMSON MO6 SOUND CARD
Bentoc, do you have another sounds to suggest me?
Re: THOMSON MO6 SOUND CARD
I so happy it works !
Very nice job
You can download the VGM for Sonic Green Hill Zone
https://www.smspower.org/Music/SonicTheHedgehog-SMS
You have to convert the file to PSG with vgm2psg.exe :
https://github.com/sverx/PSGlib/tree/master/tools
This is just what I did with Aladdin music intro.
You will have to implement the loop and maybe the (small) compression algorithm that is described in the file format I send yesterday.
I really need to build this card for my TO8, but I don't know which address to use, if someone can help me ... Sam ? Daniel ? Another nice guy ? ...
I plan to use the card in conjunction with SDDRIVE.
Thanks dinoprodest for your work !
Very nice job
You can download the VGM for Sonic Green Hill Zone
https://www.smspower.org/Music/SonicTheHedgehog-SMS
You have to convert the file to PSG with vgm2psg.exe :
https://github.com/sverx/PSGlib/tree/master/tools
This is just what I did with Aladdin music intro.
You will have to implement the loop and maybe the (small) compression algorithm that is described in the file format I send yesterday.
I really need to build this card for my TO8, but I don't know which address to use, if someone can help me ... Sam ? Daniel ? Another nice guy ? ...
I plan to use the card in conjunction with SDDRIVE.
Thanks dinoprodest for your work !
-
- Messages : 312
- Inscription : 01 févr. 2020 20:31
- Localisation : Rome - Italy
Re: THOMSON MO6 SOUND CARD
Thanks you very much Bentoc, without your help i was in stall. For your board i will very happy to help you.
Consider that the test is emulated. As soon as possible i will test on real machine.
Consider that the test is emulated. As soon as possible i will test on real machine.
-
- Messages : 312
- Inscription : 01 févr. 2020 20:31
- Localisation : Rome - Italy
-
- Messages : 312
- Inscription : 01 févr. 2020 20:31
- Localisation : Rome - Italy
Re: THOMSON MO6 SOUND CARD
Hello, at link below, my test on real machine, playng psg file.
https://www.facebook.com/groups/thomson ... 3/?app=fbl
https://www.facebook.com/groups/thomson ... 3/?app=fbl
Re: THOMSON MO6 SOUND CARD
Wonderboy ! nice choice