Enterprise Forever

:UK => Programming => Topic started by: gflorez on 2017.August.07. 01:49:56

Title: ScoreTrack, Vilmos Kopácsy MIDI attempt
Post by: gflorez on 2017.August.07. 01:49:56
Thanks to IstvanV for the new beta (https://enterpriseforever.com/ep128emu/ep128emu/?action=dlattach;attach=18462) of his superb EP emulator. It brings some juicy add-ons, one of them MIDI capability. (Configure the MIDI-IN port on the emulator on Options/Sound/Configure, and use the Keyboard.com (https://enterpriseforever.com/sound/midi/?action=dlattach;attach=18439) program to listen a MIDI song played on your PC being reproduced on the emulated EP.... ESC exits, F1-F6 use different frequency scale)

He also has modified the Rom found (https://enterpriseforever.com/sound/midi/?action=dlattach;attach=18461) on one of the MIDI interface prototypes that Vilmos Kopácsy(aka GUY KOPEXY) gifted to Werner Lindner. Now it can be put to work on the 06 and 07 memory segments on the emulator. The only problem is that it only works on these two segments, because the interface uses a memory zone to transfer the information, just like the SD-reader Rom does on the same segment 07....

But not all is lost, we can put the VHD disk image on the emulated IDE interface.

The Rom program stands for ST(ScoreTrack) when searched with :HELP.

I have loaded the songs (https://enterpriseforever.com/sound/midi/?action=dlattach;attach=18437)(*.SNG) on floppies A, B or F(Kazakhstan HD interfaces?), and tried to load a song, but the program can't complete a DIR like is shown on this picture from Zozo:

(https://enterpriseforever.com/sound/midi/?action=dlattach;attach=18432;image)

What I am doing wrong?
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: endi on 2017.August.07. 06:47:43
is this an ep program?
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: gflorez on 2017.August.07. 07:29:35
Yes, a Rom.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: endi on 2017.August.07. 08:19:33
so is this a music editor with midi support?
it can load midis and its format is sng? interesting...
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: Zozosoft on 2017.August.07. 09:04:00
is this an ep program?
ROM of the MIDI cartridge. (http://ep128.hu/Album/Pic/MIDI_01.jpg)

it can load midis and its format is sng? interesting...
I think the .SNG is a file format of music editor on Atari ST.
In a lot of 'a' Studio programs used Atari ST songs.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: gflorez on 2017.August.07. 13:14:51
The "Directory" command is not working properly on my emulation. Also, I can't save a song, it doesn't produces a file.

On the other side, selecting A, B or F, seems to read from the selected drive. The two first green drive lights change accordingly, being the F light red coloured. 

It is only me? How can I configure this Rom to work?
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: IstvanV on 2017.August.07. 13:38:25
He also has modified the Rom found (https://enterpriseforever.com/sound/midi/?action=dlattach;attach=18461) on one of the MIDI interface prototypes that Vilmos Kopácsy(aka GUY KOPEXY) gifted to Werner Lindner. Now it can be put to work on the 06 and 07 memory segments on the emulator. The only problem is that it only works on these two segments, because the interface uses a memory zone to transfer the information, just like the SD-reader Rom does on the same segment 07....

Actually, the emulator uses I/O ports (F6h and F7h) instead of memory mapped I/O, that is why the ROM had to be modified, it is not compatible with the original interface. Fortunately, only a few bytes needed to be changed in the ROM code. However, the ROM is not "EXOS compatible", it uses hardcoded segment numbers, so it still needs to be loaded to 06-07 even without the MMIO.

By the way, here is how the emulated ports can be programmed (this may change later):

Port F6h is a command/status register, writing 0 to it clears the 255 byte FIFO, while reading the port returns the following:

bit 7 = 0 if input is available on port F7h (the device is in input mode and the buffer is not empty), otherwise FFh would be read
bit 6 = 0 if output can be sent on port F7h (the device is in output mode and the buffer is not full), otherwise the data would be discarded
bits 2 to 5 are unused, currently always 1
bit 1 = 0 if a valid output device is opened
bit 0 = 0 if a valid input device is opened

Without MIDI emulation support, or with no device opened, FFh is read from the port.

Port F7h is the data register. It can be read or written depending on the type of the currently opened MIDI device (I = input, O = output in the sound configuration).

If bit 7 of port F6h indicates that input is available, then a complete MIDI message can always be read, the emulator will not send truncated data. Currently, it also does not use the "repeat status" feature, nor nested MIDI messages, and most system messages are filtered out with the exception of Clock (F8h), Start (FAh), Continue (FBh) and Stop (FCh). These make it easier to parse the input data, but it could be difficult to implement the filtering if the interface was actually built as hardware. The emulator uses a FIFO of 255 bytes (the size may be increased if necessary), if the Z80 code does not consume the input fast enough, then further data is lost.

The MIDI output does support repeating the status byte between channel messages, but parsing the data is otherwise somewhat limited and may be buggy. It only supports the same few types of system messages as the input, and nested messages like an F8h in the middle of a Note On do not work.

For the ScoreTrack ROM, an output device is needed, like the Windows software synthesizer.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: IstvanV on 2017.August.07. 14:29:52
On the other side, selecting A, B or F, seems to read from the selected drive. The two first green drive lights change accordingly, being the F light red coloured.  

Selecting the drive does not seem to be enough, it is also needed to use "Directory" to refresh the file listing. Of course, a floppy image is required as well with some SNG files, and DISK: needs to be the default device. And the first icon that looks like an IC with a "D" letter has to be toggled, otherwise the output is sent is some non-MIDI compatible format and there is no sound.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: gflorez on 2017.August.07. 16:17:18
It doesn't work for me:

The first snapshot is a simple DIR command made from Basic, and the second the same within ScoreTrack:

Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: IstvanV on 2017.August.07. 17:50:55
Is it possible that the memory configuration is causing problems? The ROM does not seem to be "EXOS compatible", and it may work correctly only on a specific configuration, like 128K RAM, EXDOS on segments 20h and 21h, and ScoreTrack on 06h and 07h. I used "EP_128k_EXDOS_FileIO.cfg".
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: gflorez on 2017.August.07. 22:37:02
Curiously it is not compatible with the language Roms. If the :UK command is executed before entering ScoreTrack, the DIR command works flawlessly. The EGI has the same error.


I will put here other aspects of the program that I could find.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: endi on 2017.August.07. 23:04:02
wow this program looks serious.
but I cant use... after some actions I can move only the cursor, but nothing happens.
I can write notes, make adsr, but no sound - it works only with midi output?
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: gflorez on 2017.August.08. 08:36:08
The same for me, from the start I can select Dave or Midi output (the first icon from the left) but none of them sound once a .SNG file is loaded and pressed play. (Dave seems to first need an envelope)

Then the program freezes and only let me to move the cursor over the icons.

I think it is a problem with W7+, as it has no MIDI mapper, and then I can't select Microsoft GS output.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: geco on 2017.August.08. 08:53:25
I think it is a problem with W7+, as it has no MIDI mapper, and then I can't select Microsoft GS output.
You can install loopMIDI, it creates MIDI in/out ports.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: gflorez on 2017.August.08. 09:17:37
I already have installed LoopMidi to make work the new beta emulator and the Keyboard.com.

But on the emulator you only can select the source for MIDI-IN, MIDI-OUT is let as the default, and on W7 the Midi-Mapper was removed, so you can't select Microsoft GS as output directly.

I have found MidiSelector (https://es.osdn.net/projects/openmidiproject/downloads/62459/MIDISelector4.0.zip/), but it still doesn't work for me. I have to try more.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: IstvanV on 2017.August.08. 10:01:57
It works for me on Windows 7 with the latest beta:
[attachthumb=1]

Edit: STRACK2.ROM also works and has sound, both with MIDI output and DAVE as well (after loading DAVE.ENV first).
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: endi on 2017.August.08. 10:46:38
It works for me on Windows 7 with the latest beta:
(Attachment Link)

Edit: STRACK2.ROM also works and has sound, both with MIDI output and DAVE as well (after loading DAVE.ENV first).

wow it works with dave too?
somebody please make a video :)
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: gflorez on 2017.August.08. 15:50:02
At last I have managed it to work....  I installed the first Win32 beta, then forgot to rename "ep128emu32.exe" to only "ep128emu.exe" on the second beta...

I can't do a video now as I'm on holidays..... But here follows the procedure:

You must paste all the files from the second beta (https://enterpriseforever.com/ep128emu/ep128emu/?action=dlattach;attach=18462) on the same installation directory of your EP128emu.

Then take the file that matches your PC, "ep128emu32.exe" or "ep128emu64.exe" and rename it to "ep128emu.exe".

Start the emulator as usual. Any configuration seems to work.

Now you only have to select "Microsoft GS Wavetable Synth" as Midi output on Options/Settings/Configure. The first beta only allowed me to select Midi-inputs.

Install the "strack2.rom" on segments 06 and 07 on Machine/Configure/Memory then click on OK. The emulated EP will restart

Remember to execute :UK if you use the HUN.Rom or other language Rom on your emulation.

Execute :ST to start the ScoreTrack application.

As pointed by IstvanV, if you select Dave as output (leftmost icon), then you must first load a Dave envelope(.ENV).

F unit works!

----------

To IstvanV: Can you put on the emulator separate selection boxes for Midi input and for Midi output?
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: IstvanV on 2017.August.08. 16:48:36
To IstvanV: Can you put on the emulator separate selection boxes for Midi input and for Midi output?

In the current beta, the type of the port is shown next to its name in parentheses (I = input, O = output), that should make it easy to find the correct ports. At the moment, the emulation does not support opening both an input and an output device at the same time.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: gflorez on 2017.August.08. 17:23:16
Ok sorry, I don't need input and output at the same time. I have seen an O after the name, but I didn't relate it to I/O.

Thanks for your hard work. You seem to me like a benevolent father giving all the whims to his children....
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: gflorez on 2017.August.10. 00:41:00
I have been comparing .SNG files. On the Atari ST the files are produced by Steinberg PRO24, but are totally different to the produced by ScoreTrack.

Here you have a link (http://retrowiki.es/download/file.php?id=200011505) to some of them.

Also, the :MID files produced by Scoretrack aren't real MIDI files, they only describe the instruments and possibly other data of the song, but without the notation.

The .ENV  and .PAT files have very little information.

All of the files can be saved and loaded.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: Zozosoft on 2017.August.10. 13:43:39
There is a collection of .SNG files from various 'a' Studio programs. The header is "Mstudio" then I found: Music Studio (1986, Activision) used for the Atari ST in the 'a' Studio.

I searched Music Studio Atari songs collections. And found the music of this Nasa Guy demo (http://ep128.hu/Ep_Demo/Prg/NasaGuy10.rar) (N.SNG in the pack) in the Atari collection, original name SIDESTEP.SNG. Many others (from Ed Bogas and Davidow) are also found in the Atari collection, but not 100% same file. Need to find another Atari collections, but also possible these files are edited for Enterprise usage.

I think the ScoreTrack use similar, or same but modified SNG format of Music Studio. Least the header are different, contain longer string: "Enterprise Computers Ltd EED 1990 Scoretrack v1.0"

I hope IstvanV can make a converter for SNG files :oops:
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: IstvanV on 2017.August.10. 13:59:28
I hope IstvanV can make a converter for SNG files :oops:

Milyen formátumra kellene konvertálni? Ha DAVE lejátszás a cél, akkor azt egyszerűen fel lehetne venni a program futása közben. Ha SOUND: eszközt használ, akkor az escape szekvenciákat, egyébként a DAVE regiszterek értékeit (pl. a dave_rec.lua segítségével). Azok pedig tömöríthetők a SIDBASIC-hez hasonló módon, esetleg ha nem túl bonyolult a zene, akkor használható lehet a Xorgame zenéit konvertáló music_conv_3.cpp is.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: Zozosoft on 2017.August.10. 14:13:20
Milyen formátumra kellene konvertálni?
Az eredeti Ataris SNG-t (amit az 'a' Studios programokba is raktak) ScoreTrack-be tölthető formára. Vagy ha nem nagy a különbség, akkor a ROM-ot módosítani, és akkor nem kéne külön konvertálni, egyből ott az a pár száz Ataris zene hozzá.

The original Atari SNG (which are also used in 'a' Studio programs) for a loadable to ScoreTrack. Or if it is only little difference in the formats, modify the ROM for using the original format, then not needed converting musics, can be used hundreds of Atari SNGs.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: IstvanV on 2017.August.10. 15:30:29
The original Atari SNG (which are also used in 'a' Studio programs) for a loadable to ScoreTrack. Or if it is only little difference in the formats, modify the ROM for using the original format, then not needed converting musics, can be used hundreds of Atari SNGs.

The formats look quite different, both the header and the data. Are there any songs that exist in both formats? Also, is there already a way to convert the Atari format to MIDI?
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: Zozosoft on 2017.August.10. 16:02:15
The formats look quite different, both the header and the data.
Bad news :-(

Quote
Also, is there already a way to convert the Atari format to MIDI?
If I remember right do it these using Music Studio in Atari emulator.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: gflorez on 2017.August.11. 09:41:37
Even as I have no idea of writing music, I have been looking at the program to know how it can be used.

There are two lines of icons at the bottom of the screen. When starting the program, the leftmost icon of the upper line is highlighted. We can move with the joystick over the two lines of icons.

The icon with a D on top of a chip is used to select Dave or Midi-Out as the output of the reproduction. Although it can be toggled at any time, better don't do it when playing a song, because notes can be left hanging.

Then, to the right of the upper line, the six player icons follow, and then more to the right, another six icons for Octave, Velocity and Tempo.

The four rightmost icons enter to edit one of four aspects of the program: Notation, Names of the instruments, Load and Save, and ADSR. To exit from that separate screens, the Stop key must be pressed.

While on the Notation, Names and ADSR separate edit screens, the two lines of icons are still accessible by pressing ESC. one more press at ESC return to the Editing cursor.

On some editing screens the bottom icons line can be toggled to other icons with the CTRL key. Then, the line will show other useful icons to configure the program, and even to erase the current song. 

The Notation is the most important edit screen of all. Once on it, the shift keys can be used to move by the music sheet. But we also can use INS, SUPR, DEL like on a text editor. A symbol can be selected from the bottom icon line toggling cursors with ESC.

Other keys of the Notation mode are B, L, M, O, R, S and F1-F6, some of them have unknown use for me.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: endi on 2017.August.11. 10:43:01
I cant get any sound via dave.
I write some notes, set output to dave, pressing play... nothing.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: Zozosoft on 2017.August.11. 10:44:17
I cant get any sound via dave.
I write some notes, set output to dave, pressing play... nothing.
Do you loaded DAVE.ENV first?
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: gflorez on 2017.August.11. 21:54:52
Blame me, but I sincerely don't think that the original idea of this Midi interface and program was the job of Vilmos and his company.

He played like nobody with the Iron Curtain isolation, and is not the first time that he borrows others work....

On the other side, who was Jeffrey?

-----------


The keyboard at the bottom line, what is it for?

-----------

I have found that the Spectrum program "Wham, the music box (http://www.worldofspectrum.org/infoseek.cgi)" has a similar layout.

(http://www.worldofspectrum.org/warajevo/wham.gif)
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: IstvanV on 2017.August.12. 11:15:06
Do you loaded DAVE.ENV first?

Also, even if DAVE output is selected, the program still tries to write to the MIDI port. If a valid MIDI output is not selected in the emulator, then the ROM will freeze in this routine because bit 6 of port F6h will never be 0:
Code: ZiLOG Z80 Assembler
  1. .   DCAC  C5           PUSH  BC
  2. .   DCAD  F5           PUSH  AF
  3. .   DCAE  0E B2        LD    C, B2
  4. .   DCB0  ED 40        IN    B, (C)
  5. .   DCB2  3E 07        LD    A, 07
  6. .   DCB4  D3 B2        OUT   (B2), A
  7. .   DCB6  00           NOP
  8. .   DCB7  DB F6        IN    A, (F6)
  9. .   DCB9  CB 77        BIT   6, A
  10. .   DCBB  20 FA        JR    NZ, DCB7
  11. .   DCBD  F1           POP   AF
  12. .   DCBE  D3 F7        OUT   (F7), A
  13. .   DCC0  00           NOP
  14. .   DCC1  ED 41        OUT   (C), B
  15. .   DCC3  C1           POP   BC
  16. .   DCC4  C9           RET
Although a version of the ROM where the MIDI output code is simply patched out could be made, I do not know if anyone actually wants to use it. With more work, it could also be made EXOS compatible and loadable from a .com file, include DAVE.ENV by default, and perhaps use the FILE extension.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: gflorez on 2017.August.12. 12:23:27
I think it is a great program with some faults. It can be used for learning, for composing or only as a player.

I would like to have a copy of  the interface....

------------------

What are that letters under the xtal on the interface picture?
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: Tutus on 2017.August.12. 15:30:03
Blame me, but I sincerely don't think that the original idea of this Midi interface and program was the job of Vilmos and his company.

He played like nobody with the Iron Curtain isolation, and is not the first time that he borrows others work....

On the other side, who was Jeffrey?

-----------


The keyboard at the bottom line, what is it for?

-----------

I have found that the Spectrum program "Wham, the music box (http://www.worldofspectrum.org/infoseek.cgi)" has a similar layout.


:evil:  He had stolen everything that he could...
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: gflorez on 2017.August.12. 16:55:24
I know, but it would have been even worse without his "worthy help", in a way he preserved what he borrowed....

If you execute :HELP ST it also returns "WRITTEN BY JEFFREY" that I think is the only not modified text.

I wonder, what is Jeffrey's complete name?
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: gflorez on 2017.August.12. 17:35:35
Not related, but I've found this interview (http://good-evil.net/features/interview-with-alberto-gonzalez-part-1) to Alberto José González, a Spanish composer that made the music and graphics of some serious games of the 8-bit era, like Hostages, North & South, Light Corridor and Mystical.

He started to make music with a Spectrum and a copy of "Wham!, the Music Box" program.


Another interview (https://translate.google.com/translate?hl=es&sl=es&tl=en&u=http%3A%2F%2Felmundodelspectrum.com%2Fcontenido.php%3Fid%3D330), in Spanish translated to English by Google.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: gflorez on 2017.August.13. 01:30:29
Zozo, Werner has a lot more .SNG files:

(https://enterpriseforever.com/hall-of-fame/qa-with-werner-lindner-technical-director-of-the-enterprise-computers-gmbh/?action=dlattach;attach=11989;image)

(https://enterpriseforever.com/hall-of-fame/qa-with-werner-lindner-technical-director-of-the-enterprise-computers-gmbh/?action=dlattach;attach=12003;image)
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: Tutus on 2017.August.13. 08:21:48
If a Midi hardware and software came into being, it would be a dream :)
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: IstvanV on 2017.August.13. 12:34:36
If a Midi hardware and software came into being, it would be a dream :)

The software can happen, we already have ScoreTrack and this program (https://enterpriseforever.com/sound/midi/msg65425/#msg65425) plays real time MIDI input with DAVE instruments. Unfortunately, those who could make the hardware do not seem to be active these days.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: gflorez on 2017.August.13. 13:45:23
Thanks to your superb emulator we can taste how it can be to have a Midi interface.

But now you can go a step further: Midi recording...  You can use your EP Midi instrument program to save the song on a ScoreTrack format file. Then the song can be played, modified, and even returned to the PC. What do you think?

-----------

About the hardware,it will be no more necessary if you add recording capabilities. But I will love to have a clone of the interface.

First of all we need the schematics, probably de-soldering  the components to track all the circuits. But it collides with the SD-reader working address at 07 segment, so probably a stand alone card is a better solution. I imagine that strange loooong cartridge protruding uglily the EP.

But it is only a serial port, so may be a module for the incoming EPNet card could be the best solution. You only have to adapt the program to the EPNet serial port, completely EXOS friendly.


I am only thinking aloud....
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: IstvanV on 2017.August.13. 14:44:19
But now you can go a step further: Midi recording...  You can use your EP Midi instrument program to save the song on a ScoreTrack format file. Then the song can be played, modified, and even returned to the PC. What do you think?

Unfortunetely, I do not know the SNG file format, it would need to be reverse engineered first if it is not already documented. Recording a MIDI file with an Enterprise program should be possible, but when I tried to open an existing MIDI file with ScoreTrack, it did not work. Perhaps only format 0 (single track) files are supported, or MIDI file reading was not implemented yet and the SNG format is required.

Quote
But it is only a serial port, so may be a module for the incoming EPNet card could be the best solution. You only have to adapt the program to the EPNet serial port, completely EXOS friendly.

The emulated input port has features like buffering (making it possible to receive multiple bytes of MIDI data only at video interrupts), and the data is also filtered in a way that makes it easier to parse on the Enterprise side. But the program could still be modified to work on real hardware, as long as it does not require continuous attention from the Z80 (no interrupts).
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: gflorez on 2017.August.14. 14:22:38
Tip: to change the values on the Names and ADSR modes, move the cursor Up or Down while pressing Space, but without a song loaded the program hangs.

--------------------

I've been playing with the .MID ScoreTrack file(not to be confused with standard MIDI files).

It is an instruments description that is also exactly the first part of the .SNG ScoreTrack file.

0000h-0030h "Enterprise Computers Ltd EED 1990 Scoretrack v1.0"
0031h-00D9h Name of the 14 instruments, 12 characters each.
00DAh-00E6h 14 bytes, channel number.
00E7h-00F4h 14 bytes, volume.
00F5h-0102h 14 bytes, pan.
0103h-0110h 14 bytes, program.
0111h-011Eh 14 bytes, octave.
011Fh-0132h 20 bytes, unknown.
0133h-0139h 7  bytes, unknown.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: IstvanV on 2017.August.15. 12:42:26
011Fh-0132h 20 bytes, unknown.

These always seem to contain the string "ABCDEFGHIJKLMNOPQRST". Perhaps unused or reserved for some feature that was not implemented.

0133h-0139h 7  bytes, unknown.

0136h is the tempo (bpm)?

013Ah-04C7h: envelopes (65 bytes per channel), each envelope segment is 4 bytes long:
- duration (FFh = end of envelope)
- pitch change (8 bits, signed)
- left volume change
- right volume change

04C8h: the event list begins here, I still need to figure out the format. It begins and ends with an FFh byte, and seems to be organized more like the notation shown on screen than MIDI data. Notes are 4 bytes long:
- channel number (?)
- duration (12 = quarter note (1 beat), 6 = eighth note, etc.)
- MIDI pitch
- MIDI velocity
A single 00h byte means end of the current note/chord, or empty space on the notation. This simple "music":
[attachthumb=1]
Translates to the following data:
000004C0 .. .. .. .. │ .. .. .. .. │ FF 01 0C 47 │ 7F 01 0C 43
000004D0 7F 00 01 0C │ 48 7F 00 01 │ 06 45 7F 00 │ 01 06 41 7F
000004E0 00 00 00 00 │ 00 00 00 00 │ FF
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: gflorez on 2017.August.15. 17:27:29
0135h Tone of the score or sheet music, from 1 to 15, C to C♭:

[attach=1]

0136h Tempo.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: IstvanV on 2017.August.15. 17:33:59
But it is only a serial port, so may be a module for the incoming EPNet card could be the best solution. You only have to adapt the program to the EPNet serial port, completely EXOS friendly.

Newer keyboards connect to the USB port, but they still support serial as well with the traditional 5-pin DIN connectors.

It may be an interesting idea to combine the SID card (https://enterpriseforever.com/hardver/sid-illesztes-ep-hez/) with a MIDI port, if the card is actually completed and released.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: gflorez on 2017.August.15. 19:59:38
I said EPNet because soon it will be a reality, more accessible and usable than a lonely prototype SID card.

But I would like to  see that, of course.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: gflorez on 2017.August.16. 21:05:55
 I have tried changing the 0133h-0134h and 0137h-0139h values without results on the melody played nor in the program presentation. I even have found the positions on memory, but modifying  them with the debugger while playing didn't produce any change.

I think: the program "is" still on early development. Some main features don't work, like the moving screen while playing a song while highlighting the notes on the score(I imagine it because there is some flickering), or entering the notes with the external keyboard(I can imagine this also for the unused keyboard at the bottom of the screen, but IstvanV says that the program doesn't use the existing MIDI input)   

I have found that some of the available songs modify the 0137h-0139h values, but again, resetting the values to default doesn't produce any change. ¿May be the songs where produced with a newer version?

Vilmos gifted Werner with another Midi interface, but a sort of development kit, with static Ram instead of this Rom, so probably he had a newer code.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: Zozosoft on 2017.August.16. 22:14:20
Vilmos gifted Werner with another Midi interface, but a sort of development kit, with static Ram instead of this Rom, so probably he had a newer code.
This is what is on Villmos's disk. And it is compared, same with the EPROM in the another interface.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: gflorez on 2017.August.17. 00:54:29
Still thinking aloud...

It is said by Werner: "The software was far away from being ready...", so probably the .MID file format given by the program was not the definitive MIDI standard, only a proof of concept for the loading/saving screen.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI atempt
Post by: gflorez on 2020.February.26. 02:55:26
Now we can mimic the sound of the MIDI songs that came with the interface and the Scoretrack Rom. The Roland MT32 was a pre-GeneralMidi synthesiser, so it sounds estrange on actual MIDI gears. On the other side, prices of real MT32 units are unreachable....
 

Download the attached file, uncompress it and install the executable version 2020-02-08. Also, check here (https://sourceforge.net/projects/munt/) for a newer version.

Put the MT32 Roms on a known place. Open MUNT(MT32 emulator by kingguppy & sergm), and go to the menu Options/ROM Configuration. Search for the directory where you put the roms and click Select Drawer or something similar. Check one control Rom and one PCM Rom and close the window.

Now go to marvellous EP128emu, menu Options/Sound/Configure, MIDI option, you must select the MT32 Synth Emulator. Close the menu. You will see a message from the MUNT program,  EP128emu has been linked to the MT32 emulator.

But.... IstvanV adverts (https://enterpriseforever.com/programming/scoretrack-vilmos-kopacsy-midi-atempt/msg65309/#msg65309) that the messages are filtered by the emulator, so it can be that the emulation not sounds exactly the same as original:

"Currently, it also does not use the "repeat status" feature, nor nested MIDI messages, and most system messages are filtered out with the exception of Clock (F8h), Start (FAh), Continue (FBh) and Stop (FCh). These make it easier to parse the input data, but it could be difficult to implement the filtering if the interface was actually built as hardware."

........

Remember, for ScoreTrack to work on the emulator you must put the Strack2.Rom on segments 6 and 7, and load the songs on an disk image, selecting it on the Options/Disk menu(all the necessary files are on the first post (https://enterpriseforever.com/programming/scoretrack-vilmos-kopacsy-midi-atempt/msg65291/#msg65291) of this thread).

Once the emulated Enterprise booted, deactivate the language Rom with :UK +Enter, an then execute :SC +Enter.

On this same thread there are explanations on how to manage the program. The leftmost upper button selects Dave or MIDI-OUT playing, but for internal sound you must first load  the file DAVE.ENV.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI attempt
Post by: gflorez on 2020.February.26. 13:02:58
I want to release here this Youtube Video:

   https://youtu.be/mJxSwXEm6lw

This is the text I have put:

First of all, sorry for the very bad quality of this video, but I am very excited of this milestone.


What you are viewing is a mix of several achievements of the CPC SymbiFace3 multi-purpose card and the SE-ONE MSX cartridge adapted to the Enterprise computer... It is boring to repeat the explanation on how we(Hans from TMTLogig and me) have arrived to this stage, you can see the other videos on my channel to know. All the hardware and software credits to Hans, I am only the beta-tester.


Now I am going to describe what is seen on this video:



- 1st: SF3 has injected a modified ScoreTrack.rom(an unfinished software written for an unreleased MIDI interface on cartridge....) on the segments 06 and 07(cartridge area), of course I cant use the SD cartridge, only floppy(HxD).


- 2nd: The debugging serial port on the SE-ONE has been converted to a MIDI interface adding some discrete components.



-3rd: IstvanV already modified the ScoreTrack.rom, to give PC MIDI capabilities to his superb emulator EP128emu, I have only modified the ports used from F6-F7 to 21-22. Hans has emulated part of the UART chip used on the original Vilmos Kopácsy MIDI interface, following IstvanV indications.


And now.... what is not seen on this video...:


My monitor refuses to show the complete ScoreTrack screen, so I have cut it on the upper side.


Don't expect super high quality MIDI sound from my toy keyboard...


---------
On a given point I focus a button with the schematic image of a electronic chip with a D over it, Dave is used to play. Then it changes to an image of a DIN connector, it is the moment that the program starts to send MIDI OUT.


Also note that there is no cartridge attached. The Roms inside the cartridge would collide with the Rom injected by the SF3.


Enjoy!
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI attempt
Post by: lgb on 2020.February.26. 19:46:19
Just for curiosity: would it be hard to modify the ROM that it wouldn't be segment-dependent, ie no need for fixed 6/7 segment all the time? As far as I can imagine that is kinda an unfortunate because of the SD-card cartridge.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI attempt
Post by: gflorez on 2020.February.26. 20:37:06
The SD reader has been created segment independent, so moving it would be the better logical step. You can ask Zozo a demonstration of an external cartridge port adapter(hand made by me following his instructions) that can be positioned on any 64KB boundary by jumpers. The SD reader works comfortably on any position.

What is needed is "somebody" skilled enough(probably you, not me...) to overcome the Scoretrack development, because the segment-dependent issue is the minor of its problems.  It is unfinished on a lot of its options. For example, it only plays MIDI OUT, not saves nor plays IN-coming data.

Another issue is the lack of a MIDI compatible file mode, so I think that Vilmos used an external converter to pass real MIDI data to the program.

It is an almost "silent" program, when playing it does nothing on the screen, it doesn't move the pages of the sheet music or mark the played keys on the keyboard at the screen. There is not a metronome to mark the rhythm.

Its file manager is incompatible with the language Roms(BRD, HUN, ESP, etc).

It would be great to add mouse control.

Surely there are more things to fix than these.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI attempt
Post by: lgb on 2020.February.26. 20:49:11
The SD reader has been created segment independent, so moving it would be the better logical step. You can ask Zozo a demonstration of an external cartridge port adapter(hand made by me following his instructions) that can be positioned on any 64KB boundary by jumpers. The SD reader works comfortably on any position.

Hmm I'm not sure. What about SymbOS, probably others in the future, using SD-card hardware directly, without its ROM? Or is it written well enough to work even that? Also, I am not sure, but SD-card cartridge connects to the cartridge port, so it cannot see other segments than what assigned for that cartridge port ... but I can be wrong here! Surely, the situation is different in the expansion port ... I guess it's still easier to modify this ROM of the MIDI stuff still. Or is it ....

EDIT: oh, or do you mean that using another segment, not 6,7, since IIRC 4 segments can be used for a cartridge having 16 bit address bus exposed IIRC in the second 64K of physical address space of EP, so maybe 4,5,6,7 segments?

Quote
What is needed is "somebody" skilled enough(probably you, not me...) to overcome the Scoretrack development, because the segment-dependent issue is the minor of its problems.  It is unfinished on a lot of its options. For example, it only plays MIDI OUT, not saves nor plays IN-coming data.

Another issue is the lack of a MIDI compatible file mode, so I think that Vilmos used an external converter to pass real MIDI data to the program.

It is an almost "silent" program, when playing it does nothing on the screen, it doesn't move the pages of the sheet music or mark the played keys on the keyboard at the screen. There is not a metronome to mark the rhythm.

Its file manager is incompatible with the language Roms(BRD, HUN, ESP, etc).

It would be great to add mouse control.

Surely there are more things to fix than these.

Probably more easy to write a new software? Also for being "silent" on the screen can be because of lack of CPU power to do fancy things, or EP would loose some MIDI events meanwhile?
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI attempt
Post by: Zozosoft on 2020.February.26. 21:02:32
SD can work at any segment. Probably wrote by more better programmer than the 'a' Studio programmers :twisted:

Gflorez made a external cartridge bay (https://enterpriseforever.com/interface-57/external-cartridge-bay-interface/msg75343/#msg75343), where another memory area decoded to the inserted cartridge. As I see the SymbOS also worked.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI attempt
Post by: gflorez on 2020.February.26. 21:16:53
SymbOS ask for EXDOS (hard) drive units before booting, it doesn't manage these hardware directly. Zozo inspired this when Prodatron decided to create the Enterprise SymbOS port. This means that any new driver added on a future to EXDOS would work on SymbOS.

Now I don't remember the thread, but when I made the external cartridge adapter it was very clear that the SD software made by Zozo was a superb job.

I have found it. This (https://enterpriseforever.com/interface-57/external-cartridge-bay-interface/msg75054/#msg75054) is the thread.


I think there is still processing time to show something, except for complex Midi controllers(these need some filtering), because I can send and receive notes with nothing more than a slow Basic program doing IN(XX) and OUT XX,DD instructions.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI attempt
Post by: lgb on 2020.February.26. 21:54:47
SD can work at any segment. Probably wrote by more better programmer than the 'a' Studio programmers :twisted:

Gflorez made a external cartridge bay (https://enterpriseforever.com/interface-57/external-cartridge-bay-interface/msg75343/#msg75343), where another memory area decoded to the inserted cartridge. As I see the SymbOS also worked.

Ohohohohoooo! So the trick is there :) I couldn't get the point how can work anywhere when it needs the cartridge port. Clever!

But anyway, I would still prefer (If i had ... hehehehehe) the cartridge port for SD, it's nice, not so "intrusive" and "out of machine" feeling sticking everywhere a full death-star size add-on of connected PCBs in right angle :) Sorry it meant to be funny, please do not take it seriously :) However remapping the cartridge port itself would be an interesting project as well, by some internal jumpers or whatever, which allows standard cartridges (connects to real cartridge port) allowed to be mapped to some other area of the memory map, than 4-7 segments ...
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI attempt
Post by: Zozosoft on 2020.February.26. 22:25:58
When I wrote SDEXT I expected expansion card version of SD interface also will be released.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI attempt
Post by: lgb on 2020.February.26. 22:52:36
When I wrote SDEXT I expected expansion card version of SD interface also will be released.

Oh, that's new information. Nice work.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI attempt
Post by: gflorez on 2020.February.27. 00:10:43
New step on SF3+MIDI: Hans has redirected the Midi OUT to the VS1053 music chip inside the SF3. It has 64 voice polyphony and GeneralMidi standard instrument banks.

From now on there is no need to have external equipment to play with  Midi music.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI attempt
Post by: Zozosoft on 2020.February.27. 02:19:56
Wow! This is what i wanted to ask, but don't know it is possible!
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI attempt
Post by: TMTLOGIC on 2020.February.27. 08:03:20
it is possible on the real SE-ONE.
This option will also come later for the SF3.
 just have to wait. because the SF3 must then be reconfigured.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI attempt
Post by: gflorez on 2020.February.27. 08:08:47
Ok, yes,.... The tests are being made on the SE-ONE, to not disturb SF3 development, but all the midi stuff will be incorporated at the end to the SE-ONE the SF3 has inside. Is for that I am naming the two cards indistinctly.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI attempt
Post by: gflorez on 2020.March.17. 12:14:08
Questions, aren't they the fuel that drives us humans?

----

I don't know from where to start, because I must return to some facts that I explained on the first commentary of this thread.

I think that the Midi interface that has arrived to our hands after so long time was made for the cartridge port for one very good reason. It was always an underused expansion port, out of being the place to put the necessary Basic Rom cartridge.

Probably the main reason for the unknown Jefrey(the name of the Rom writer and probably real developer) was to offer an interface that could be connected to all Enterprises, independently of the other expansions connected at the right side of the computer. The same objective than guided Szörg to put the SD reader there.  

But it is a very limited port to put devices, because the signals that arrive to it are oriented only to manage memory. This problem has been excellently solved in the case of the SD reader, using a memory zone as the interchange gate to the SD content.

On the Midi interface they did some similar, the two necessary ports where paginated on memory positions BFF8 and BFF9, on segment 7 put on page 03. The Rom is 32KB wide, and is placed on the 06 and 07 segments, allowing the cartridge to still hold copies of the language Rom on 04 and Basic Rom on 05 segments.

I have found that almost all Midi interfaces of that era made for MSX, BBC, CPC, PCW, Spectrum, used the same UART chip, the MC68B50 (http://www.classiccmp.org/dunfield/r/6850.pdf). This chip doesn't have internally a lot of baud-rates to select, only 3 but related to the external oscillator used(1:1, 1:16, and 1:64). The 3 variants of the chip are the 1, 1.5 and 2Mhz versions, and the several Midi interface makers always selected the MC68B50 because its 2MH oscillator frequency, on the third selection, gives exactly the Midi baud-rate: 2.000.000/64=31250. Then only remains to select the serial protocol, 8bit and 1 stop bit and the chip has been configured.

It has 4 x 8 bit registers, Control(write), Status(read), Transmit Data(write) and Receive Data(read), and usually the interface makers joint all on only 2 ports, Control/Status and Data. Control is only used for initialisation, and is where we define the baud-rate and serial protocol.

 [attachimg=1]

Bits 5, 6 and 7 are used for interrupts, not applicable on the Cartridge Bus. They will go as Zeros.

Then you can see that  the initialisation is well defined, first we reset the chip writing 03h(00000011b) on the Control register, and then we write 16h(00010110d, 22d), this is, select 1:64 frequency and 8bit word with 1 stop bit.

Now, let's see what happens on the ScoreTrack Rom( I know the position because it was where IstvanV modified the Rom to work on the emulator):

Code: [Select]
*C146  32 F8 BF     LD    (BFF8), A     ; A arrives here with 00000111, perfect to reset the chip
  C149  3E 16        LD    A, 16h        ; 00010110 sets 1:64 frequency, 8 bit, 1 stop bit
  C14B  32 F8 BF     LD    (BFF8), A

Not needing any control except erasing the emulator Midi buffers, IstvanV modified it as this:

Code: [Select]
*C146  00     NOP
  C147  00     NOP
  C148  00     NOP
  C149  00     NOP
  C14A  00     NOP
  C14B  AF           XOR   A
  C14C  D3 F6        OUT   (F6), A       ; a Zero clears out buffer

To transmit data, the chip has the Status register, that has to be watched by the processor to know when there is data to receive or when it can send.  The Receive register is the bit 0, and the Send register is bit 1. The rest of bits are not important here.

On the ScoreTrack Rom there is only Midi OUT because the program is unfinished:

Code: [Select]
*DCB6  3A F8 BF     LD    A, (BFF8)
  DCB9  CB 4F        BIT   1, A         ; bit 1 marks if the data has been send
  DCBB  28 F9        JR    Z, DCB6
  DCBD  F1           POP   AF
  DCBE  32 F9 BF     LD    (BFF9), A    ;write the Midi OUT buffer

IstvanV modified it as this:

Code: [Select]
*DCB6  00           NOP
  DCB7  DB F6        IN    A, (F6)
  DCB9  CB 77        BIT   6, A          ; Send bit
  DCBB  20 FA        JR    NZ, DCB7
  DCBD  F1           POP   AF
  DCBE  D3 F7        OUT   (F7), A       ;Midi OUT
  DCC0  00           NOP


And then, here come my questions:

Why has made IstvanV so drastic changes to the code? Where they necessary? Some of you can contact him?

Because, we have to decide NOW if we must follow his changes, and remain compatible with the EP emulator and the Midi utilities, or on the contrary, emulate correctly the MC68B50, that will allow further development of the ScoreTrack program, share the chip emulation on the other computers that are supported by the  SF3, and probably we will have the opportunity to see easier sequencer conversions from other platforms that use the same chip, like CPC, even MSX.

Edit: if not evident, I want to mark the things that have been changed and apply or not apply to a good MC68B50 emulation:

-He has substituted the memory paginated ports for real unused ports. Good.
-Instead of the sequence 03h,16h written on the Control register for the chip initialisation he has opted to only write a Zero. Bad.
-On the Status byte, the Receive and Transmit bits have been changed from 0 and 1 bits to the 7 and 6 bits. Bad.
-The values of the bits inside the status byte has been negated, as you can see on the conditional jump. Bad.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI attempt
Post by: gflorez on 2020.March.19. 11:48:21
I propose to make some changes on the Midi emulation(MC68B50), both on the EP128emu and on the SF3, and then on the ScoreTrack Rom:

Code: [Select]
First modification: Control Register initialisation.
 *C146  3E 03        LD    A, 3          ; 00000011, resets the MC68B50 chip, clears EP128emu and SF3 Midi buffers
  C148  D3 21        OUT   (21), A      
  C14A  3E 16        LD    A, 16h        ; 00010110 sets 1:64 frequency, 8 bit, 1 stop bit, EP128emu and SF3 IGNORE THIS!
  C14C  D3 21        OUT   (21), A       ; Future use: bits 5 and 6 = Transmit interrupt, bit 7 = Receive interrupt

And

Code: [Select]
Second modification: Midi OUT.
 *DCB6  00           NOP
  DCB7  DB 21        IN    A, (21)
  DCB9  CB 4F        BIT   1, A          ; bit 1 set marks if the data has been sent, bit 2 the same on receiving
  DCBB  28 FA        JR    Z, DCB7
  DCBD  F1           POP   AF
  DCBE  D3 22        OUT   (22), A       ; write the Midi OUT buffer
  DCC0  00           NOP

If the use of  21h and 22h ports on the EP128emu MIDI emulation is a problem, SF3 can also decode the F6h and F7h ports.

The SF3 will use 512Bytes on each FIFO buffer, IN and OUT.

On the test with the SE-ONE cartridge, the Midi output(the song being played) is unchanged by the Z80 frequency, because the output is managed by the emulated Midi interface.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI attempt
Post by: gflorez on 2020.March.19. 16:59:52
Sorry again.... Geco has explained me that IstvanV created his emulated Midi interface before studying the ScoreTrack Rom, so he adapted the Rom to HIS working protocol.
Title: Re: ScoreTrack, Vilmos Kopácsy MIDI attempt
Post by: gflorez on 2020.September.05. 18:54:04
Great news! Geco is modest to announce it as a great release, but he has fixed the ScoreTrack Rom (https://enterpriseforever.com/letoltesek-downloads/enterprise-software/?action=dlattach;attach=25424) to work from any segment on the 4MB memory range, not only 06-07 on the cartridge area.

He also has fixed other errors on the Rom, like allow the use of language Roms or scan for available massive storage drives.

Now the Rom works both on the Emulator and on the SF3 MIDI OUTs, and of course also on DAVE.

Download the needed files from the first messages on this thread. DAVE.ENV must be on the default directory when the Rom is launched with the :ST command + Enter.