FreddyV wrote on 2020-05-08, 06:32:
I am motivated to start working on Tandy chip, so I need to free up some code size and it can be an opportunity to convert your .PAS Code to assembly.
I used your pascal code in case you improve Monotone (And to have the best replay possible), but it may not come soon.
MONOTONE is a "dead" product, so I'm in no hurry, really. I probably won't be coding it ever again unless I decide to completely revamp it with instrument definitions, volume envelopes, 3-voice beeper engine, etc.
I located a Tandy RLX in my collection, so I am happy to test Tandy DAC if you get that ready. Tandy DAC programming info is in tspak181.zip and you can do it either 100% using BIOS calls (!) or you can support the chip directly. I recommend supporting the chip directly, as there are two different types of DACs and you have to treat each differently. Also, I seem to recall that playing continuous auto-init DMA using BIOS calls has a click between buffers, but I could be wrong about that.
If DOSBox's Tandy DAC support is broken, let me know and I might be able to find time to code the DAC support in about 2-3 weeks.
Why not a "Tandy HX/EX" version without GUS/OPL2 driver, for Tandy 1000, PC Junior or IBM PC with 256Kb. They could play 100Kb MOD File probably.
I'd be worried about "featuritis" -- no need to go crazy supporting things that don't really have use cases. Anyone running a Tandy 1000 or PCjr these days who would want to play a MOD is going to have 640K or 768K installed. (For that matter, you really should remove the .MON support, it's a dead format!)
Since the player is in TP, it is indeed very possible to use overlays; I use them when debugging if my program won't fit into memory with the IDE loaded. This way you dedicate some RAM to overlay buffer space and then the overlay system will load only the code for file formats called on demand. Supports EMS for the overlay too. I'm very familiar with the overlay system; LMK offline if you are interested in implementing them. It doesn't take that much code change to use overlays. The only drawback is that all overlaid procedures and functions become far calls, but that's a very minor speed penalty.