VOGONS


First post, by matze79

User metadata
Rank l33t
Rank
l33t
tndytrk_006.png
Filename
tndytrk_006.png
File size
4.83 KiB
Views
3153 views
File license
Public domain

Hi,

first Version of Tandy Tracker is released!

- PC-Speaker as additional Voice
- Import MOD Patterns (4 Channel) - experimental
- Import Musik Resources from Sierra AGI
- Hercules Monochrome Support

Dragonsphere / Jan Knipperts invested a bit of his time to get this done.
Maybe at some Point there is CMS Support too.

I hope you like it!

Initial Post:
https://dosreloaded.de/forum/index.php?thread … -3-voice-sound/

Filename
TNDYTRK.zip
File size
73.26 KiB
Downloads
194 downloads
File license
Public domain
Last edited by matze79 on 2020-09-20, 16:19. Edited 1 time in total.

https://www.retrokits.de - blog, retro projects, hdd clicker, diy soundcards etc
https://www.retroianer.de - german retro computer board

Reply 1 of 50, by matze79

User metadata
Rank l33t
Rank
l33t

No Release without Bugs.
Tandy Tracker crashes on my XT, and sndplay plays all AGI Files too fast.

Does it work for anyone else ? 😀

It works fine on dosbox.

Also works fine on my 486.
On Dreamblasters Pentium also.

https://www.retrokits.de - blog, retro projects, hdd clicker, diy soundcards etc
https://www.retroianer.de - german retro computer board

Reply 2 of 50, by Benedikt

User metadata
Rank Oldbie
Rank
Oldbie

Is it even expected to run on an XT?
The later Borland compilers for DOS, for instance, need a compiler switch for 8088/8086 compatibility.
Maybe retry on an emulated XT or Tandy with PCem!

Reply 3 of 50, by matze79

User metadata
Rank l33t
Rank
l33t

Maybe its just a mistake, i already wrote DragonSphere ( Jan Knipperts )
but he has very limited in time so it may take quite some time to fix it up.

Maybe you`re right as i had similar problem with tandy test program some time ago.

https://www.retrokits.de - blog, retro projects, hdd clicker, diy soundcards etc
https://www.retroianer.de - german retro computer board

Reply 4 of 50, by DragonSphere

User metadata
Rank Newbie
Rank
Newbie

Hi, I am Jan, the one who wrote this tracker.
I've been meaning to sign up here for a long time and now I finally did it. Thanks to Matze some of my programs made it to Vogons before I did 😀
Since I knew that Matze uses an XT, I tried to support this system. But I cannot test it myself. I wrote the program in Borland Pascal 7.0 and Assembler on a 486 DX4 with 100 MHz.
The compiler options should be correct, but I will check again.
On the XT there is a stack overflow error (runtime error 202), if a song should be played. Everything else works.
I have tested with the 486 and a Pentium 166, there the tracker runs without any problems.

Dreamblaster found me another bug when switching from TNDY to TNDLPT. Then notes get stuck or the TNDLPT has a distorted sound. I will fix this with the next release.

Reply 5 of 50, by keropi

User metadata
Rank l33t++
Rank
l33t++

great work! thanks for sharing!
I will give it a test first chance I get on my xt

🎵 🎧 PCMIDI MPU , OrpheusII , Action Rewind , Megacard and 🎶GoldLib soundcard website

Reply 6 of 50, by Benedikt

User metadata
Rank Oldbie
Rank
Oldbie
DragonSphere wrote on 2020-09-20, 18:18:

Hi, I am Jan, the one who wrote this tracker.
I've been meaning to sign up here for a long time and now I finally did it. Thanks to Matze some of my programs made it to Vogons before I did 😀

Welcome!

DragonSphere wrote on 2020-09-20, 18:18:

Since I knew that Matze uses an XT, I tried to support this system. But I cannot test it myself. I wrote the program in Borland Pascal 7.0 and Assembler on a 486 DX4 with 100 MHz.
The compiler options should be correct, but I will check again.
On the XT there is a stack overflow error (runtime error 202), if a song should be played. Everything else works.

In that case, my first guess is that your inline assembler code is not 8088 compatible. I doubt that Borland Pascal tries to rewrite that.
Certain stack manipulation instructions, like e.g. pusha, popa and push <immediate> were introduced with the 80186.
I have stumbled into that trap on multiple occasions, even when I tried to write 8088 compatible code.

Reply 7 of 50, by matze79

User metadata
Rank l33t
Rank
l33t

Then it should work on Nec V20 ^^ but it does not.
i have NEC V20 installed with 8087.

https://www.retrokits.de - blog, retro projects, hdd clicker, diy soundcards etc
https://www.retroianer.de - german retro computer board

Reply 8 of 50, by FreddyV

User metadata
Rank Oldbie
Rank
Oldbie
DragonSphere wrote on 2020-09-20, 18:18:

Hi, I am Jan, the one who wrote this tracker.

Since I knew that Matze uses an XT, I tried to support this system. But I cannot test it myself. I wrote the program in Borland Pascal 7.0 and Assembler on a 486 DX4 with 100 MHz.

Hi !

I did look some of your code in GitHub and I am interested by your Port redirection code to do a software to RIP Tandy and PC Speaker music 😀

Anyway, welcome here;

We can surely collaborate together as I Wrote Mod Master XT in Turbo Pascal 7.0 as well,.

To be sure all the code is compiled for 8086, you can add {G-} at the begining of all the files.
If you use external .ASM files, don't put .286 and then, you will be sure it is Ok.

What I am looking for a Tandy Tracker is to be able to define instruments with Volume / Period envelop and Vibrato, this is how the more advanced Tandy Music are done
Also, add support for .MON Files plus Add the 3 Channels support for PC Speaker, like Monotone is doing. (I will try it with Mod Master)

Also, please share your file format, we can work on it together to simplify its support in Mod Master 😀

Reply 9 of 50, by VileR

User metadata
Rank l33t
Rank
l33t

Nice work!

My XT doesn't have any kind of Tandy sound output device, so I can't test on real hardware. But for what it's worth, it fails to run on an emulated Tandy 1000 in PCem.

With the DOSBox debugger (and in IDA), it doesn't take long before I start to see instructions like

seg003:0345                 push    8
seg003:0347 push 0
[...]
seg003:034E leave

...so yes, an 8088/6 is gonna take the gas-pipe pretty quick there.
Those instructions should be supported on a V20, but there may be some others that aren't.

Also: how is timing implemented? At least in DOSBox, playback speed changes with the cycles count... so something appears to be off there.

Anyway, good luck with any continuing work on this. A Tandy tracker with the potential of running on real hardware would be nice indeed.
(Also... PCjr support?) 😉

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 10 of 50, by DosWorld

User metadata
Rank Newbie
Rank
Newbie

Hi!

Did you have plane to open source this tracker (full or just player) ?

CPU: Amd K6/450, RAM: 256M, VIDEO: S3Trio V+, SOUND: EWS64XXL/64M
CPU: iP/100, RAM: 16M, VIDEO: S3Trio V+, SOUND: SB AWE32
IBM Aptiva, CPU i486DX/80, RAM: 96M
Compaq Contura 4/25 2820D, CPU: i486SX/25, RAM: 4M, VGA.
HP 200LX/2M

Reply 11 of 50, by FreddyV

User metadata
Rank Oldbie
Rank
Oldbie
VileR wrote on 2020-09-21, 19:29:

...so yes, an 8088/6 is gonna take the gas-pipe pretty quick there.
Those instructions should be supported on a V20, but there may be some others that aren't.

If he Add {G-} in all the source file, it will be Ok.
Enter/Leave is added by the Turbo Pascal compiler.

Reply 12 of 50, by DragonSphere

User metadata
Rank Newbie
Rank
Newbie

Hi!
Many thanks for the nice welcome and I'm very happy about your support in troubleshooting the tracker. Thanks a lot!

The $G- switch is set (avoid 80286 instructions). Besides that I have the possibility to choose 8087/80287 or emulation for numeric processing. So far the setting is emulation. Maybe I should change it for Matze's NEC V20, since he has an 8087 installed?
But he can start the tracker, enter notes, save and load songs... just not play them. So there should be nothing basic about the code for his CPU that doesn't fit. My guess is also more on the timing side.

@VileR:
I implemented the timing by hooking interrupt 1Ch.
The tempo (ticks per second) is set by setting the PIT to the corresponding frequency and firing 1Ch at each tick int. My int 1Ch calls the original routine every 18 ticks to prevent the clock from going completely wrong and plays a row according to the current speed (ticks per row) of the song. In the ticks in between effects are updated.
That is all, no unusual procedure as I think...
In DOSBOX the timing is much less accurate at low cycles. If I increase the cycles, it gets faster and more accurate.... But on real hardware I could see absolutely no difference between a Pentium 166 and a 486 100. Also turning off the cache on the 486 doesn't really affect the playback speed of the tracker (but it does affect the screen buildup etc.).
In DOSBOX (I use the SVN-daum buid) there is another problem: When a note is played, it stops suddenly after about half a pattern. On the real hardware the note sounds further, so it's not on my code.

@DosWorld:
Yes! The tracker will be open source soon. I will make the source code freely available at GitHub under MIT license within the next days. But before I publish it, I still have to clean up the code a bit, translate some germans comments and adapt the encoding (since I wrote a lot under real DOS, Windows sometimes messes with that).

@FreddyV :
Mod Master XT looks like a very interesting project. I urgently need to have a look at it further.
I thought a lot about instruments and came to the conclusion that they are not absolutely necessary due to the possibilities of effects. But tremolo and vibrato are really missing.
My considerations for further features have been more in the direction of supporting more sound devices.CMS (direct and via Dreamblasters CMSLPT) would be a hot candidate. Maybe with the option to set an output device for each channel. Tandy-3-voice together with CMS Stereo paning and maybe an OPL-2 drumtrack would be cool, wouldn't it? *g*

My file format is no secret. I have already described it in a text file. Have a look at the format.txt, which is already in the ZIP with the tracker.
To intercept ports I recommend to use the function of EMM386 if possible. This is simple and very stable. For the Tandy-Ports 0Ch etc. I had to solve it differently and switch to V86 mode myself. And to program this is hell. I used code from the TEMU Tandy emulator, but still... There are always some unhandled exceptions and so on.
But this is not part of the topic here 😀

Reply 13 of 50, by root42

User metadata
Rank l33t
Rank
l33t

Welcome! And I've already tried your tracker as well. Plays fine on my 486, using matze's TNDY card. Looking forward on how it evolves!

YouTube and Bonus
80486DX@33 MHz, 16 MiB RAM, Tseng ET4000 1 MiB, SnarkBarker & GUSar Lite, PC MIDI Card+X2+SC55+MT32, OSSC

Reply 14 of 50, by matze79

User metadata
Rank l33t
Rank
l33t

Your code anyway would not use FPU or ?
So i would avoid adding support for it, the majority of early devices don`t have one.

https://www.retrokits.de - blog, retro projects, hdd clicker, diy soundcards etc
https://www.retroianer.de - german retro computer board

Reply 15 of 50, by Benedikt

User metadata
Rank Oldbie
Rank
Oldbie
DragonSphere wrote on 2020-09-22, 11:22:

The $G- switch is set (avoid 80286 instructions). Besides that I have the possibility to choose 8087/80287 or emulation for numeric processing. So far the setting is emulation. Maybe I should change it for Matze's NEC V20, since he has an 8087 installed?
But he can start the tracker, enter notes, save and load songs... just not play them. So there should be nothing basic about the code for his CPU that doesn't fit. My guess is also more on the timing side.

But there appear to be 80186 instructions in there (see above). Maybe some external units have been compiled for later non-8088 processors?

DragonSphere wrote on 2020-09-22, 11:22:

Yes! The tracker will be open source soon. I will make the source code freely available at GitHub under MIT license within the next days. But before I publish it, I still have to clean up the code a bit, translate some germans comments and adapt the encoding (since I wrote a lot under real DOS, Windows sometimes messes with that).

Great!
Keep the encoding the way it is. It is a DOS program, after all and people can use encoding-aware text editors.
While I get the impression that at least half the people participating in this thread would not mind the German comments, translating them might be a good idea.
Just publish the code when you feel like it.

Reply 16 of 50, by VileR

User metadata
Rank l33t
Rank
l33t
DragonSphere wrote on 2020-09-22, 11:22:

In DOSBOX the timing is much less accurate at low cycles. If I increase the cycles, it gets faster and more accurate.... But on real hardware I could see absolutely no difference between a Pentium 166 and a 486 100. Also turning off the cache on the 486 doesn't really affect the playback speed of the tracker (but it does affect the screen buildup etc.).

I was thinking more about the cases of much slower systems - like, well, the original Tandy 1000s. Hopefully, if the 8086-support issue can be tackled, it will be easier to determine whether or not the issue is just a quirk in DOSBox.

In DOSBOX (I use the SVN-daum buid) there is another problem: When a note is played, it stops suddenly after about half a pattern. On the real hardware the note sounds further, so it's not on my code.

I didn't notice such a thing... but I'd recommend leaving SVN-Daum alone - as you might know, it's ancient (and buggy in its last few builds), and it's missing more than 5 years of DOSBox SVN updates. Some of them probably have to do with 3-voice Tandy support.
DOSBox-X is a current build which has Daum's 'extras', and it's actively maintained so that would be a good one to switch to.

I also concur w/Benedikt that there's no reason to change encodings if the program is to be compiled under DOS. If anything, it's likely to create problems (byte-order marks and other such wonderful inventions). 😉
My own code and docs tend to have snippets of DOS ASCII art in them... it may look like vomit when viewed on GitHub, but at least the encoding is preserved when it's cloned.

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 17 of 50, by MobyGamer

User metadata
Rank Member
Rank
Member
DragonSphere wrote on 2020-09-22, 11:22:

The $G- switch is set (avoid 80286 instructions). Besides that I have the possibility to choose 8087/80287 or emulation for numeric processing. So far the setting is emulation. Maybe I should change it for Matze's NEC V20, since he has an 8087 installed?

For maximum compatibility, you should have {$G-, N-, E-} at the top of every source file, then reBuild all your source. This will not use 286 instructions, and will also never assume an FPU is installed (most 808x systems don't have one), nor attempt IEEE floating point emulation. If you need floating point (you shouldn't, in a tracker!), use the "real" datatype as that doesn't require a math coprocessor.

This is my wheelhouse (I wrote MONOTONE, portions of 8088 MPH, etc.), all on an XT in Turbo Pascal 7. So if you need any help squashing all of the XT bugs, I have real Tandy systems here (Tandy 1000, TX, EX, TL2) and I would be happy to debug and test on real hardware, just send me a PM or something if the source isn't publicly available.

Reply 18 of 50, by DosWorld

User metadata
Rank Newbie
Rank
Newbie
DragonSphere wrote on 2020-09-22, 11:22:

I implemented the timing by hooking interrupt 1Ch.

Sorry, small grumble from me: timer IRQ is int 8, and then (from int 8 handler) call int 1Ch.

DragonSphere wrote on 2020-09-22, 11:22:

Yes! The tracker will be open source soon. I will make the source code freely available at GitHub under MIT license within the next days.

Cool! Thanks!

CPU: Amd K6/450, RAM: 256M, VIDEO: S3Trio V+, SOUND: EWS64XXL/64M
CPU: iP/100, RAM: 16M, VIDEO: S3Trio V+, SOUND: SB AWE32
IBM Aptiva, CPU i486DX/80, RAM: 96M
Compaq Contura 4/25 2820D, CPU: i486SX/25, RAM: 4M, VGA.
HP 200LX/2M

Reply 19 of 50, by MobyGamer

User metadata
Rank Member
Rank
Member
DosWorld wrote on 2020-09-23, 18:45:
DragonSphere wrote on 2020-09-22, 11:22:

I implemented the timing by hooking interrupt 1Ch.

Sorry, small grumble from me: timer IRQ is int 8, and then (from int 8 handler) call int 1Ch.

If you're changing the PIT firing rate for IRQ0/INT 08h, then you should hook INT 08h, not 1Ch. INT 1Ch is meant for user programs to hook at a guaranteed rate of 18.2Hz (so if you were trying to "behave" properly, you'd change the rate of INT08 but still put in your 08 handler to call 1Ch at 18.2 Hz, or as close to that rate as you can).