VOGONS


Reply 220 of 929, by FreddyV

User metadata
Rank Oldbie
Rank
Oldbie

I found some code, with it we can resize the DOS memory used by the pascal, and we can probably change the heap pointers.
(HeapEnd^)
I am not sure if maxavail is a variable or a function and if we can change it. need some test.

  NewHeapEnd:=Seg(HeapPtr^)-PrefixSeg; 
OldHeapEnd:=Seg(HeapEnd^)-PrefixSeg;
asm
mov ah,4Ah
mov bx,NewHeapEnd
mov es,PrefixSeg
Int 21h

http://computer-programming-forum.com/29-pasc … a53e8483621.htm

Reply 221 of 929, by MobyGamer

User metadata
Rank Member
Rank
Member

I told you I would respond later, so I'm responding. Here's my code for shrinking the heap:

  {determine end of actual memory used}
NewHeapEnd:=Seg(HeapPtr^)-PrefixSeg;
OldHeapEnd:=Seg(HeapEnd^)-PrefixSeg;
{resize our own DOS memory block to end of USED heap}
asm
mov ah,4Ah
mov bx,NewHeapEnd
mov es,PrefixSeg
int 21h
jnc @EXIT
mov mError,ax
@EXIT:

(do your thing here)

  {resize it back to the end of TOTAL heap}
asm
mov ah,4Ah
mov bx,OldHeapEnd
mov es,PrefixSeg
Int 21h
jnc @EXIT
mov mError,ax
@EXIT:

As for why the monotone code takes up so much room, it allocates 64K for song data no matter how big the song is, and the pascal compiled code itself takes up room too. It's all pointer-based so you could fork the code and rewrite it to use your own memory pointers instead of the heap if you'd like.

maxavail is a function but it uses the heap pointers so it should continue to report the correct heap data.

Reply 222 of 929, by FreddyV

User metadata
Rank Oldbie
Rank
Oldbie

Hi.

Tanks for your time, I appreciate.

The code you listed is the same that the one I found.
It does not modify the heap itself, it only free some space for the DOS.
When doing this we cant use the heap anymore.

I Will find a way to use it anyway.
I saw that monotone allocate 64k all the time and i corrected it. The problem is during the PC speaker object init.

Before my updates in the code, monotone used 120kb of memory To play a 10k file.
I would Like To continue to use your code because any update done in it will benefits To my player and i can contribute To monotone as well.
If I change the way my player use the memory I will not need to modify how monotone use the memory.

I stopper for the moment the code for adlib to better integrate monotone.

Reply 223 of 929, by MobyGamer

User metadata
Rank Member
Rank
Member
FreddyV wrote:

The code you listed is the same that the one I found.
...
When doing this we cant use the heap anymore.

The code I posted allows you to shrink the heap to the minimum size. The later part allows you to expand it back to the size in the {$M} directive. So you could start MODM, init the program, shrink to minimum size, and then only expand it when you need it (ie. playing monotone) and then shrink it again after done playing.

I saw that monotone allocate 64k all the time and i corrected it. The problem is during the PC speaker object init.

I saw that too... I think it's just OOP code bloat, but I'm not sure because when I traced it, memory usage suddenly jumped 64K between the start of the init and the very first line of the init 🙁 so I'm not sure what's going on. I'll see if I can figure it out since I don't like that 64K is disappearing.

I stopper for the moment the code for adlib to better integrate monotone.

MONOTONE was created as a joke to make Necros laugh (and it did!) so you really don't need to keep going 😀 Work on Adlib and I'll see if I can figure out what's going on in the init code.

Reply 224 of 929, by xjas

User metadata
Rank l33t
Rank
l33t

^^ I'm not Necros, but I think it's pretty awesome that Monotone got made. I still have to finish a track in it though.

twitch.tv/oldskooljay - playing the obscure, forgotten & weird - most Tuesdays & Thursdays @ 6:30 PM PDT. Bonus streams elsewhen!

Reply 225 of 929, by MobyGamer

User metadata
Rank Member
Rank
Member
FreddyV wrote:

The problem is during the PC speaker object init.

Found the bug -- I was an idiot when I created the diskwriter. It's fixed now; you can view the diffs or just grab the new MT_OUTP.PAS file.

Reply 226 of 929, by FreddyV

User metadata
Rank Oldbie
Rank
Oldbie
MobyGamer wrote:

MONOTONE was created as a joke to make Necros laugh (and it did!) so you really don't need to keep going 😀 Work on Adlib and I'll see if I can figure out what's going on in the init code.

I already spent too many hours on it to giveup, and it is fun 😀

I like the idea to be able to demonstrate PC Speaker, Tandy, Adlib and Trackers with one software.
And I "Need" it for my retro computing expositions.

I am also planning to integrate SBVGM, Not really integrate it but have the .VGM files recognized and Mod Master will launch the SBVGM in command line.

Reply 227 of 929, by alvaro84

User metadata
Rank Member
Rank
Member

Sorry for the late response... I've been preoccupied with (life and) the C64 world, cleaning, repairing, making cables, experimenting, cutting holes in floppy disks, and so on...

So I've just tried MM10 on a(nother) 286-20 and EHA-CH07 was purrrrfect with the new 6-octave MOD limit. Unfortunately I couldn't try DOPE.MOD as this one, although having 16MiB(!) of RAM doesn't have EMS functionality. And even my permanent 4-MiB build doesn't have UMBs, only EMS. Is there a hope for me? Besides booting up a newer computer, of course.

Shame on us, doomed from the start
May God have mercy on our dirty little hearts

Reply 228 of 929, by FreddyV

User metadata
Rank Oldbie
Rank
Oldbie

Hi,

Strange to have 16Mb and no UMB. It is only a matter of Drivers.
16Mb and no EMS on a 286 is almost useless 😀 I believe you know that.

I play partially dope.mod on my XT with no umb and no EMS with a GUS and a modified version of mod master that does not load all the patterns.
With no EMS, you can't load the samples on this music to play it on Sound Blaster.

I tried to check me code for the GUS problem you have but I am can not detect if I need to add some delay somewhere. As it is working for me on a 486, Adding delay on a 286 may not help anyway 😀

Do you use Ultrinit to initialize the card ? It my help.
Also, if still not working can you do a Video so that I can at least hear the problem ?
Do you have the problem on multiple PC ?

Reply 229 of 929, by alvaro84

User metadata
Rank Member
Rank
Member

Don't worry, it's specific to that very system. I'm not sure if I can make a video, never done that. Perhaps our tablet or my girlfriend's relatively new phone can do it...?

I'm also well aware that 16MiB in a 286 is basically useless. I can't even imagine what software could make good use of it. Last weekend I used cache to speed up copying to 1541 disks but I think a bog standard 1-MiB 286 could hold a .D64 image in its XMS, so... But hey, just having that 16 megs there is fun. I have plenty of 30-pin SIMMs so I enjoy that I can max out such a system. One needs some joy in life 🤣

Btw DOPE.MOD could load on my next test system (Acorp 5ALI61 + K6-2+) without EMS and/or UMB but with GUS. So it could work, I guess. Next time I boot up my 'permanent' 286 I'll give it a try.

Shame on us, doomed from the start
May God have mercy on our dirty little hearts

Reply 230 of 929, by MobyGamer

User metadata
Rank Member
Rank
Member

16MB in a 286 isn't useless, it can be used with anything that only supports XMS for example. You can emulate EMS with XMS, but it's slow because XMS is a copy-only standard (EMS hardware is typically faster because it is a bank-switching standard). Some programs only support EMS for things like program overlays, so it couldn't hurt to load HIMEM.SYS to provide XMS, and then load an EMS emulator -- running slowly is better than not running at all, depending on the application. (I would not recommend emulated EMS for the modplayer though)

Reply 231 of 929, by matze79

User metadata
Rank l33t
Rank
l33t

I ran Borland C++ Builder on 286-16 with 16Mb RAM,
The RAM really Helps if you run Windows 3.1 IDE.

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

Reply 232 of 929, by matze79

User metadata
Rank l33t
Rank
l33t
FreddyV wrote:
matze79 wrote:

This happens with SB, Covox and Speaker, i have no idea why, is there a Debug Mode ?
GLX Player just works fine here.

On my NEC V20 it works 😀

Are you sure that the mixing frequency is not too High ?

i got it.
i used James Pearce Lo-Tech Combatible ISA Card in this Machine and its missing the 2k2 PullUp on READY Line, this was cause of the Problem.

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

Reply 233 of 929, by FreddyV

User metadata
Rank Oldbie
Rank
Oldbie

Hi.

When I Say 16mb is useless on a 286 it is more for a rétro gaming point of view

Next release should be in 3 weeks. (Holidays)

I did work on some code optimisation.
I succeeded to have the sound system api working and i worked on a way to better debug the player: more debug infos in 40 lines mode, output waveform display in vga.
I also started the .xm loader.
Lots of xm files may play correctly as not using advanced xm function.

For next releases, any idea for the next priority ?
- SB16 stereo.
- 16 bit mixing.
- SB AWE32
- "Better" XM support.
- Advanced channels "compression" system (for exemple play 16 channels mod using 8 channels) -> "16 channels" replay at 14khz on XT
- Adlib music files format

Reply 234 of 929, by matze79

User metadata
Rank l33t
Rank
l33t

Does not work on VIA C7 with CN700 Chipset:

photo_2019-10-17_16-38-57.jpg
Filename
photo_2019-10-17_16-38-57.jpg
File size
152.79 KiB
Views
934 views
File license
Fair use/fair dealing exception

wanted to try Mod Master with a PCI LPT Port Card with Custom DAC Feature.
The Card maps to FA00

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

Reply 236 of 929, by matze79

User metadata
Rank l33t
Rank
l33t

Ah thanks, i was not aware of that 😀

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

Reply 237 of 929, by MobyGamer

User metadata
Rank Member
Rank
Member
FreddyV wrote:

I succeeded to have the sound system api working and i worked on a way to better debug the player: more debug infos in 40 lines mode, output waveform display in vga.

Nice 😀

For next releases, any idea for the next priority ?

My personal priority -- assuming you will release the source publically someday -- is all on the API. Now that we have a viable mixing engine for XT-class systems, including non-DMA GUS support, this opens up a whole new world of sound support for homebrew DOS games. Once the API takes shape, I can offer API suggestions (I won't clutter this thread with them until necessary).

- SB16 stéréo.
- 16 bit mixing.
- "Better" XM support.

These are good, and should be done in this order because XM support is going to require 16-bit mixing for XMs that have 16-bit instruments. (With XM support, you may find yourself trying to optimize the player portions after they're finished -- for .XM chiptunes with a lot of effects and instruments, the calcs part might actually take more time than the mixing part 😉

I would add to the list "PAS 16 support". If you don't have a PAS 16 card, I can add support for it, or I can send you a free card, your choice.

- Advanced channels "compression" system (for exemple play 16 channels mod using 8 channels) -> "16 channels" replay at 14khz on XT

I don't understand this. How is this better than just mixing 16 channels? Are you proposing pre-mixing pairs of channels, so that a 16-channel song can be played back with only 8 channels realtime? I don't think 512KB RAM is enough to pre-render that much...

- Adlib music files format

I'm not as interested in this because we already have adlib song trackers/players with XT replay code (edlib, RAD, adlib tracker II, etc.), but of course you should work on whatever is fun.

Reply 238 of 929, by FreddyV

User metadata
Rank Oldbie
Rank
Oldbie

Hi,

I agree with you about the priority, and the PAS16.
I did not propose the PAS16 because I don't have one. I have around 30 sound cards, but no PAS.
PAS16 support is more for a 286 as 16 bit mixing may be so slow that a fast 8Bit mixing will be better.

Now that I found why the "Sound System" was not working, I can start to do some more interesting things.

I simply configured the output device After the file loading... With Sound Blaster Replay, the loader did put the samples in the GUS.
All the bugs are always something really stupid.....

MobyGamer wrote:

I don't understand this. How is this better than just mixing 16 channels? Are you proposing pre-mixing pairs of channels, so that a 16-channel song can be played back with only 8 channels realtime? I don't think 512KB RAM is enough to pre-render that much...

Currently, Mod Master stop to mix the channels when it start to be too slow. Then, the skipped channels can be important ones.

I you check my other sound system, USMPlay, we can limit the maximum number of channels to mix.
Before doing the mixing, there is an algorythm selecting the channels to mix in priority.
Then, it can play a 24 channels music using 16 channels. or anything else.

I remember that it was really efficient, and it give a good result.

The idea is this one:
During the Replay, Mod Master can know rapidly the real maximum number of channels it can play.
Then, later, the max numbers of channels to mix is configured and the 2nd algorythm start to be used...

We are then sure that it will do the best with the power it has.

MobyGamer wrote:

- Adlib music files format

I'm not as interested in this because we already have adlib song trackers/players with XT replay code (edlib, RAD, adlib tracker II, etc.), but of course you should work on whatever is fun.

I am interested by this to use only one player 😀
Or I did not found so far all the XT compatible players you are talking about.
If some of them can be used in command line, I can simply start them in DOS Shell to use Mod Master code to select the files only.

Reply 239 of 929, by MobyGamer

User metadata
Rank Member
Rank
Member
FreddyV wrote:
The idea is this one: During the Replay, Mod Master can know rapidly the real maximum number of channels it can play. Then, lat […]
Show full quote

The idea is this one:
During the Replay, Mod Master can know rapidly the real maximum number of channels it can play.
Then, later, the max numbers of channels to mix is configured and the 2nd algorythm start to be used...
We are then sure that it will do the best with the power it has.

Interesting. So it's a more graceful way of dropping work to fit inside the CPU power you have available. Instead of dropping a channel for one row, you drop the entire channel for one pattern, which sounds more natural. Knowing which channels to drop, however, I would have no idea how to determine since each piece of music is different... If USMplay sources are available (hornet.org?) I can check...

I can see this useful for the API: In a game, we'd want to fix mixing at N channels at M samplerate, so that there is time left over for game/display code to run.

Or I did not found so far all the XT compatible players you are talking about.
If some of them can be used in command line, I can simply start them in DOS Shell to use Mod Master code to select the files only.

I meant replayer code. Edlib has a .obj and JCH/Vibrants page has player source, I think. HSC Chicken has either .obj or source. RAD comes with full source. etc.