Imagen

FM77AV - learning how to program it (english thread)

Avatar de Usuario
jimbobaby
Mensajes: 539
Registrado: 13 Ago 2023 21:17

Re: FM77AV - learning how to program it (english thread)

Mensaje por jimbobaby »

More things googling...

About the EDPLAY published on Oh! FM, i have found this (of the same guy that i've linked before)
https://ameblo-jp.translate.goog/noz-mu ... r_pto=wapp

It seems that on Oh! FM (feb '88), they published a music extension, "77 expanded tones for HGPLAY" (i suppose thats what EDPLAY is, or is related to).

I have also read a lot about something called MML (music macro language). I think is related also to the EDPLAY command (using "high level" commands to do music, as in BASIC "PLAY" command).

I'm not a musician, so this goes waaayy over my head -grin

About MIDI, on the FM77AV flyer https://www.musee-des-jeux-video.com/sc ... 0flyer.pdf, it says this:
FM sound source standard implementation/The FM sound source is a full-fledged synthesizer specification that enables tonal control that was difficult with conventional PSG. It has 77 types of built-in tone data that add sound effects to instrument sounds. It is also equipped with PSG3 sound at the same time.
●Instrumental control via MIDI. /With the optional MIDI adapter, you can connect to a MIDI instrument and program it to play automatically.
On the japanese wikipedia entry of FM7 series (https://ja-m-wikipedia-org.translate.go ... r_pto=wapp) says about this:
FM77-401 MIDI adapter
FMAV-401 Stereo Music Box (Intelligent MIDI instrument equipped with a CPU for MML analysis and an FM sound source separately from the main unit . Can also be used with FM-7/77.)
This is more of a curiosity:
https://www.youtube.com/watch?app=desktop&v=a87QmyUy0fU

Here, i'm surprised at this window (i assume it must be from XM7 emulator... on my english version it only shows the 6 OPN channels, not the rest, but otherwise it's identical)

And testing this game (Shounen Mike) on the XM7 emulator, in tools->configure->volume tab, you can play with the FM and PSG sliders, and you can separate both parts. PSG is the clasical AY-3-8910 i'm used to on the spectrum, FM is the "PC adlib sound" part, and this game uses clearly both.

And last but not least, something offtopic but interesting nonetheless. i have also found this about the classical Ys game https://gyusyabu-ddo-jp.translate.goog/ ... r_pto=wapp.
Talks about the game of course, but there are interesting subtleties about FM77AV display aspect ratio and sounds.

And this is a nice website with lots and lots of very low level details... https://haserin09-la-coocan-jp.translat ... r_pto=wapp

Too much new data for today, need some rest... -507
-sp3zy PC 386 -coam1 -m3s3x
Avatar de Usuario
pser1
Mensajes: 4840
Registrado: 08 Dic 2012 18:34

Re: FM77AV - learning how to program it (english thread)

Mensaje por pser1 »

@jimbobaby
you are right! Too many new things to read!
But here we can read that the expansion I/O bus in the rear pannel accepts a MIDI module ...
I haven't found any example using the EDPLAY and when I try it on XM7 I just get error messages (SYNTAX ERROR) no matter what
parameters I add to the command.
Is there any Basic example?
thanks in advance
pere
Avatar de Usuario
jimbobaby
Mensajes: 539
Registrado: 13 Ago 2023 21:17

Re: FM77AV - learning how to program it (english thread)

Mensaje por jimbobaby »

pser1 escribió: I haven't found any example using the EDPLAY and when I try it on XM7 I just get error messages (SYNTAX ERROR) no matter what
parameters I add to the command.
Is there any Basic example?
It's my understanding that on that Oh!FM feb'88 magazine, there was some standalone program (or extra commands added to F-BASIC, if that's possible), to add this EDPLAY/HGPLAY, that exposes full YM2203 capabilities through F-BASIC or other high level language (MML).

So, on a FM77AV without this software, you can't use it.

But, as both of us don't use basic -507 it's more of a curiosity -thumbup
-sp3zy PC 386 -coam1 -m3s3x
Avatar de Usuario
pser1
Mensajes: 4840
Registrado: 08 Dic 2012 18:34

Re: FM77AV - learning how to program it (english thread)

Mensaje por pser1 »

jimbobaby escribió:It's my understanding that on that Oh!FM feb'88 magazine, there was some standalone program (or extra commands added to F-BASIC, if that's possible), to add this EDPLAY/HGPLAY, that exposes full YM2203 capabilities through F-BASIC or other high level language (MML).
So, on a FM77AV without this software, you can't use it.
But, as both of us don't use basic -507 it's more of a curiosity -thumbup
Right,
we don't use Basic, but if we could give a peek at the code they added to the Basic interpreter, we could learn a bit more about sound.
I am sure that Basic can be extended with 'new' functions in the FM77AV as it is possible with CoCo and Dragon computers ...
Avatar de Usuario
pser1
Mensajes: 4840
Registrado: 08 Dic 2012 18:34

Re: FM77AV - learning how to program it (english thread)

Mensaje por pser1 »

@jimbobaby
reading carefully the article in the Oh!FM magazine, I see that they are talking about a program named "HGFM Editor" that is able
to show on screen all the parameters of a selected voice of the YM2203 inside the AV77FM, so not a player.
Anyway it would be very interesting to learn how this info can be 'seen' and modified.
The Oh!FM February 1988 issue seems an interesting item to have.
cheers!
pere
malikto999
Mensajes: 162
Registrado: 09 Jun 2017 11:20

Re: FM77AV - learning how to program it (english thread)

Mensaje por malikto999 »

The thread was moving so fast that I was late. sorry.
We present the FM77AV system configuration diagram and MIDI-related I/O table.
Connect MIDI devices to the I/O expansion bus connector via a MIDI adapter (FM77-401).
There is an optional stereo music box with eight FM sound sources, which also uses the same I/O as MIDI.
malikto999
Mensajes: 162
Registrado: 09 Jun 2017 11:20

Re: FM77AV - learning how to program it (english thread)

Mensaje por malikto999 »

Really sorry. I can't read all the comments, but what are the hot topics at the moment?
Adjuntos
file.zip
(928.12 KiB) Descargado 48 veces
Avatar de Usuario
pser1
Mensajes: 4840
Registrado: 08 Dic 2012 18:34

Re: FM77AV - learning how to program it (english thread)

Mensaje por pser1 »

malikto999 escribió:Really sorry. I can't read all the comments, but what are the hot topics at the moment?
Hello,
excuse us, please. We tend to talk about a lot of things ... I need some time to read the source code that I have already commented
to change it to add the explanations you have shown us, then I will send a message with the questions that need some explanation
I have translated the two images you uploaded in file.zip but I am not sure if the text of the second one is correct.
So I am uploading them here, maybe anyone that has tried to translate them has had better luck than me ...
cheers!
pack.zip
(374.96 KiB) Descargado 31 veces
malikto999
Mensajes: 162
Registrado: 09 Jun 2017 11:20

Re: FM77AV - learning how to program it (english thread)

Mensaje por malikto999 »

pser1 escribió:
malikto999 escribió:Really sorry. I can't read all the comments, but what are the hot topics at the moment?
Hello,
excuse us, please. We tend to talk about a lot of things ... I need some time to read the source code that I have already commented
to change it to add the explanations you have shown us, then I will send a message with the questions that need some explanation
I have translated the two images you uploaded in file.zip but I am not sure if the text of the second one is correct.
So I am uploading them here, maybe anyone that has tried to translate them has had better luck than me ...
cheers!
pack.zip
I don't want to rush you, so please proceed slowly.
I look at threads every few days, so I tend to be behind on topics.
There are times when I can't provide materials right away, but please forgive me.
Avatar de Usuario
jimbobaby
Mensajes: 539
Registrado: 13 Ago 2023 21:17

Re: FM77AV - learning how to program it (english thread)

Mensaje por jimbobaby »

Hi

After all the info gathered past week, i have read about the vgm file format, and i have modified a bit my code to try to read YM2203 vgm files, and can confirm that the procedure is exactly the same as i was using form ay-8910 sound code, with the "weirdness" noted by Pere (some extra steps to put data on registers).

So all 3 FM channels and the 3 SSG (PSG) ones sound just fine. In fact the lower registers are mapped (if not 1 to 1, very similar) to the AY-8910 ones.

I can also confirm that (at least using XM7), it doesn't matter witch pair of ports do you use, so i can send YM2203 data to FM7 old PSG ports and it sounds the same, but it could be just emulator things, of course. Maybe the new one is just for the extra joystick read command, i don't know.

For now i have sorted the compression problem on YM file format, but i haven't studied the vgm still. And still have some problems reading from disk "big" amounts of data, and of course, the correct timing problem.

Step by step
pser1 escribió: The music player (ChipTunes) I have converted from the CoCo to the Dragon allows working wiht some chips, among them
The AY-3-8910, YM2149 and YM2203
By the way Pere, i have not been able to found it anywere, here or on World of Dragon. It's just for curiosity.
I have seen the "Orchestra" program, but i don't think this is it.
-sp3zy PC 386 -coam1 -m3s3x
Avatar de Usuario
pser1
Mensajes: 4840
Registrado: 08 Dic 2012 18:34

Re: FM77AV - learning how to program it (english thread)

Mensaje por pser1 »

jimbobaby escribió:
pser1 escribió: The music player (ChipTunes) I have converted from the CoCo to the Dragon allows working wiht some chips, among them
The AY-3-8910, YM2149 and YM2203
By the way Pere, i have not been able to found it anywere, here or on World of Dragon. It's just for curiosity.
I have seen the "Orchestra" program, but i don't think this is it.
Hi jimbobaby,
You could find here the vgm player and a lot of other players, some of which do read data right from the SD card (streaming)
viewtopic.php?f=62&t=200037438#p200144146
cheers!
pere

Ps by the way, any question that could arise just let me know in that Dragon thread ...
malikto999
Mensajes: 162
Registrado: 09 Jun 2017 11:20

Re: FM77AV - learning how to program it (english thread)

Mensaje por malikto999 »

In the January 1988 issue of Oh!FM, there was a program that played asynchronously with three FM sound sources, and I had previously analyzed it.
I don't know if it will be useful, but I found the source and will attach the file. (Sorry, the comments in the source are in Japanese)

Oh!FM has posted several performance programs, including extended BASIC, but the method of processing the OPN timer with IRQ interrupts and performing asynchronously is the same. The Mike game should also have a performance routine in the IRQ interrupt handling (M7579), and I've just started reading about it.

Boot BGM.D77 and play music with RUN "PLAY".
Adjuntos
BGM.zip
(18.54 KiB) Descargado 37 veces
Avatar de Usuario
jimbobaby
Mensajes: 539
Registrado: 13 Ago 2023 21:17

Re: FM77AV - learning how to program it (english thread)

Mensaje por jimbobaby »

malikto999 escribió:In the January 1988 issue of Oh!FM, there was a program that played asynchronously with three FM sound sources, and I had previously analyzed it.
I don't know if it will be useful, but I found the source and will attach the file. (Sorry, the comments in the source are in Japanese)

Oh!FM has posted several performance programs, including extended BASIC, but the method of processing the OPN timer with IRQ interrupts and performing asynchronously is the same. The Mike game should also have a performance routine in the IRQ interrupt handling (M7579), and I've just started reading about it.

Boot BGM.D77 and play music with RUN "PLAY".
Thank you! I surely need some IRQ code right now and this is a very nice and small sample to analyze -thumbup . About the comments, no problem, google translate will take care of that -507 .
-sp3zy PC 386 -coam1 -m3s3x
Avatar de Usuario
pser1
Mensajes: 4840
Registrado: 08 Dic 2012 18:34

Re: FM77AV - learning how to program it (english thread)

Mensaje por pser1 »

Hello,
These are the points that need some kind of explanation in the functions (Blocks) where I have already added comments
; ------------------------------------------------------------------------------------------------------
; BLK 300 - called from BLK 297		ZZZZZ - REVISED	PSR20231112
; ------------------------------------------------------------------------------------------------------
Z7FA9   LDB     MFD18                  ; get FDC command status				
        LSRB                           ; pass bit 0 to carry					
        BCC     Z7FB4                  ; if clear (not BUSY), skip 2			
        LDB     #$D0                   ; put $D0 (force interrupt)			
        STB     MFD18                  ; into FDC command register			
Z7FB4   LDA     MFD1B                  ; get a byte from FDC					
        COMA                           ; (1) complement value (255-value)	
        STA     MFD1B                  ; send to FDC data register			
        BSR     Z7F99                  ; call BLK 293 - 23.5 uSec delay		
        CMPA    MFD1B                  ; (2) still same value?					
        BNE     Z7F98                  ; no, go to Entry of BLK 292 		 	
;	(1) - what is the idea behind the sequence: lda, com and sta again?
;	(2) - why verify if value is still the same?
; ------------------------------------------------------------------------------------------------------
; BLK 61 (Z8AEE) - YM2203 related
Seems to use the second parallel port ($0F -> 15) maybe for MIDI?
This could be a set up routine (?)
; ------------------------------------------------------------------------------------------------------
; BLK 65 (Z8B16) - FM related
sends $00,$01,$02 in sequence to register $28. for what?
; ------------------------------------------------------------------------------------------------------
; BLK 66 (Z8B7F) - MIDI related (?)
Why send three times $00 to OPN StatPort ?
How could we know the effect of sending the sequence $40,$4E,$37 ?
; ------------------------------------------------------------------------------------------------------
cheers!
pere
Code03-v22.zip
(237.31 KiB) Descargado 52 veces
Avatar de Usuario
jimbobaby
Mensajes: 539
Registrado: 13 Ago 2023 21:17

Re: FM77AV - learning how to program it (english thread)

Mensaje por jimbobaby »

pser1 escribió:Hello,
These are the points that need some kind of explanation in the functions (Blocks) where I have already added comments
; BLK 61 (Z8AEE) - YM2203 related
Seems to use the second parallel port ($0F -> 15) maybe for MIDI?
This could be a set up routine (?)
; ------------------------------------------------------------------------------------------------------
; BLK 65 (Z8B16) - FM related
sends $00,$01,$02 in sequence to register $28. for what?
; ------------------------------------------------------------------------------------------------------
Well, i don't have the answers -no , but i'm gonna try to help if i can...

As i see, on the net you can easily find the YM2203 pdf, in english, but it's a short schematic/specs pdf.
Within it, you can see the register map, but $28 it's not present. But then later on the "visual" diagram it appears with a description: upper half is "SLOT" and lower half (well, perhaps it's not exactly 4 bits each) labeled "CH", with the description "key ON/OFF".

But if you search more on the net, you will find the YM2608 application manual (there are two versions, the japanese one - the original-, and one translated to english more or less acurately). Apparently the FM/SSG part is YM2203 compatible (and so it seems).

There you can find more info about how to use the chip. The capture below is what it says about the $28 port (google translated).

Besides that, about the I/O ports ($0F), yes, the documentation says that, but where it's connected? I don't know. MIDI has it's own port on the I/O map, so, who knows... In fact it's part of the "AY-8190" registers of the YM2203.
Adjuntos
Capture_.PNG
Capture_.PNG (71.44 KiB) Visto 1930 veces
-sp3zy PC 386 -coam1 -m3s3x
Avatar de Usuario
pser1
Mensajes: 4840
Registrado: 08 Dic 2012 18:34

Re: FM77AV - learning how to program it (english thread)

Mensaje por pser1 »

@jimbobaby
thanks for that info. The YM2608 datasheet helps!
Concerning the YM2203 I/O ports, they must be connected to the data bus or they would not be of any use ...
That said, the data but is present at the external expansion I/O connector at the rear pannel, as there should be the address bus
to allow communications wiht he internal chips ... So we just need to send to the appropriate port (address) the values that the MIDI external
module accepts. Probably, any of the YM2203 parallel ports could be used. In that game the programmer chose the portB
cheers!
pere
Responder

Volver a “Fujitsu FM7”