VOGONS


Reply 900 of 929, by FreddyV

User metadata
Rank Oldbie
Rank
Oldbie
MobyGamer wrote on 2022-07-21, 03:16:
FreddyV wrote on 2022-07-04, 06:37:

More promotion of the player is welcome anyway, I don't see new videos on it on youtube.

I will make a video on it either late 2022 or early 2023, don't worry 😀

I understood after seeing your Tweeter post.
Thanks 😀
I just checked the plane, hostel for the comming demo party, it is quite complicated...

Reply 902 of 929, by FreddyV

User metadata
Rank Oldbie
Rank
Oldbie

Some work in progress.

Mix speed increased by 3% on 8086 (Pure mixing, so global increase is a little lower)

Little code size reduction.
I may work on improving thee PC Speaker output quality, with a PWM value conversion table modified with the output frequency

Thinking about doing the Audio mix 2x slower than the speaker output, to mix 8 Channels on a 8086 and output at 16KHz for example.

Reply 903 of 929, by MobyGamer

User metadata
Rank Member
Rank
Member

The 1/2 mixing rate vs. output rate is a good tradeoff to eliminate the PC Speaker carrier noise, for sure. (Some games in the late 80s did that.)

For the PWM conversion table, here's how I do it: Values are 1 to N where N is (1193182 / samplerate) -1. The 1 to N-1 range ensures no timer issues (0 will actually count down as 65536 in some timer modes). However, there is still "beating" between the PIT divisor and the DRAM refresh divisor (18), so for 100% clean results, you must use a divisor that is a multiple of dram refresh. So for no carrier whine and no beating, you can use divisors of 36 (33144 Hz), 54 (22096 Hz), and 72 (16572 Hz). IMO, the only practical choices are 54 and 72, as they are close to "6-bit" results. Going faster (18, 66286 Hz) means you're effectively down to 4-bit audio, and would need a 486 to play back anyway.

I was able to achieve divisor 54 (22KHz) on a 4.77MHz 8088, but it required the PIC to be set to auto-EOI, and that had some side effects, so I don't recommend rates that high on 4.77 MHz systems.

Reply 904 of 929, by FreddyV

User metadata
Rank Oldbie
Rank
Oldbie
MobyGamer wrote on 2022-08-29, 18:48:

The 1/2 mixing rate vs. output rate is a good tradeoff to eliminate the PC Speaker carrier noise, for sure. (Some games in the late 80s did that.)

Yes, this is the Goal, I realized how to do it only some days ago:
When doing the Loop to apply the conversion to the Timer value, write the result twice.
Otherwise, it require to change the Timer IRQ and slow it down...
AND we can take the opportunity to Add Linear interpolation 😀 It is "Just a SUB / SHR / ADD" and may improve the result.

MobyGamer wrote on 2022-08-29, 18:48:

For the PWM conversion table, here's how I do it: Values are 1 to N where N is (1193182 / samplerate) -1. The 1 to N-1 range ensures no timer issues (0 will actually count down as 65536 in some timer modes). However, there is still "beating" between the PIT divisor and the DRAM refresh divisor (18), so for 100% clean results, you must use a divisor that is a multiple of dram refresh. So for no carrier whine and no beating, you can use divisors of 36 (33144 Hz), 54 (22096 Hz), and 72 (16572 Hz). IMO, the only practical choices are 54 and 72, as they are close to "6-bit" results. Going faster (18, 66286 Hz) means you're effectively down to 4-bit audio, and would need a 486 to play back anyway.

I will take a look.

If the Interrupt frequency is too low, there PWN does not work well (We can't really call it PWN with so low frequencies) and the Timer delay can't cover the full period.
Then, it may be always better to output at around 16KHz, even if the mixing rate is lower.
We can also mix at 10KHz and scale the result, it will always be faster than mix at 16KHz. Why not...
But I think that 8KHz Mix, 16KHz output will be the only possibility for a 5150 with 4 Channels.

MobyGamer wrote on 2022-08-29, 18:48:

I was able to achieve divisor 54 (22KHz) on a 4.77MHz 8088, but it required the PIC to be set to auto-EOI, and that had some side effects, so I don't recommend rates that high on 4.77 MHz systems.

Somebody already asked me for Auto EOI, I never tried and as I don't understand its initialization code, I am quite "frightened" to test.
If I have time, maybe implement both, in case of compatibility issue .

If one day, I can motivate some PPls to work on an Amstrad PC1512 Demo, I would like to try having an end screen with an 8 Channel module (Or more) on the PC Speaker... This can be cool 😀

Reply 906 of 929, by MobyGamer

User metadata
Rank Member
Rank
Member

I used to use linear when I didn't have the speaker hooked up to anything, but ever since I hooked it to an amplifier and volume knob, I use log.

I agree that 8286 Hz mixing, 16572 Hz output is best, but that might not be possible with 4 channels @ 4.77 MHz. I think I only got modmxt as high as 5KHz with PC speaker output. 7.16MHz, yes.

As for linear interpolation, it's nearly "free" but with PC speaker as the output, wasted effort 😉 But might be nice to add to all the mixing, especially if you support 16-bit mixing to 16-bit output.

Reply 907 of 929, by FreddyV

User metadata
Rank Oldbie
Rank
Oldbie
MobyGamer wrote on 2022-08-31, 00:03:

I used to use linear when I didn't have the speaker hooked up to anything, but ever since I hooked it to an amplifier and volume knob, I use log.

I agree that 8286 Hz mixing, 16572 Hz output is best, but that might not be possible with 4 channels @ 4.77 MHz. I think I only got modmxt as high as 5KHz with PC speaker output. 7.16MHz, yes.

As for linear interpolation, it's nearly "free" but with PC speaker as the output, wasted effort 😉 But might be nice to add to all the mixing, especially if you support 16-bit mixing to 16-bit output.

If I try to push a litlte further, with Auto EOI and put the Audio buffer in the code segment, we can see what is possible.
Also the idea to have some samples with pre computed pitch is still there....
Not in Mod Master itself, but in the Audio Library version.

Reply 908 of 929, by MobyGamer

User metadata
Rank Member
Rank
Member

Do not use Auto-EOI. It has bad side effects (like not being able to use the keyboard properly, or having a hung keyboard even after the PIC is reset and auto-EOI turned off). As for buffers in the code segment, not sure how that would help because you'd need CS: overrides; it might be better to use the stack segment, as [bp], [bp+xx] etc. default to it. You'd need to switch stacks of course, and put the buffer in the beginning and the actual SP at the top to ensure no collisions.

Reply 910 of 929, by FreddyV

User metadata
Rank Oldbie
Rank
Oldbie
Niezgodka wrote on 2022-09-03, 19:52:

I just want to say, this program is so great. Freddy, keep working on it. Please translate it fully into English and add more features from late dos era.
Again, player is so great!

Thanks,
Do you still see french somewhere ?

Reply 911 of 929, by NightSprinter

User metadata
Rank Member
Rank
Member

Question: what keeps me from seeing the directory listing of other drives in this program? I have all my songs on a separate partition of my RL's CF card, but trying to change drive only lists everything for the drive that the program is on.

Reply 912 of 929, by FreddyV

User metadata
Rank Oldbie
Rank
Oldbie
NightSprinter wrote on 2022-09-11, 13:25:

Question: what keeps me from seeing the directory listing of other drives in this program? I have all my songs on a separate partition of my RL's CF card, but trying to change drive only lists everything for the drive that the program is on.

I will need to check, thanks for the info

Reply 913 of 929, by FreddyV

User metadata
Rank Oldbie
Rank
Oldbie

Mod Master use the DOS Structures to read the disk name/Letter
What is the DOs Version you use ? It is probably not compatible (I Just check, it does not work under DOSBOX)
INT 21 U - DOS 2+ internal - "SYSVARS" - GET LIST OF LISTS
AH = 52h

Reply 914 of 929, by MobyGamer

User metadata
Rank Member
Rank
Member

You probably shouldn't do that; undocumented DOS functions aren't consistent. There's a better way that works with all DOS versions, int 21h,AH=29h ("parse filename"). I've attached some sample code.

If it doesn't work with DOSBOX, it won't work with at least one compatible or clone system out there...

Attachments

  • Filename
    SHOWDRVS.TXT
    File size
    1.17 KiB
    Downloads
    50 downloads
    File license
    Public domain

Reply 915 of 929, by NightSprinter

User metadata
Rank Member
Rank
Member
FreddyV wrote on 2022-09-12, 12:11:
Mod Master use the DOS Structures to read the disk name/Letter What is the DOs Version you use ? It is probably not compatible ( […]
Show full quote

Mod Master use the DOS Structures to read the disk name/Letter
What is the DOs Version you use ? It is probably not compatible (I Just check, it does not work under DOSBOX)
INT 21 U - DOS 2+ internal - "SYSVARS" - GET LIST OF LISTS
AH = 52h

Tandy DOS 3.3

Reply 917 of 929, by VileR

User metadata
Rank l33t
Rank
l33t

Agreed, INT 21h/AH=29h is the most widely supported and most consistent method - I had to look into that for my font editor (see discussion here).

Note that floppy drives may need special handling in case only one is present, see http://www.fysnet.net/getdrvs.htm

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

Reply 918 of 929, by audiocrush

User metadata
Rank Newbie
Rank
Newbie

Hi,
is there any special trick to run this software properly?
I can't seem to get anything but crackles and pops out of this software.
Does it require special hardware requirements like specific display modes or a minimum amount of memory?
My system has got a 8088/8087 that I can run from 4,77MHz to 10MHz, 512k of ram and a Soundblaster 2

https://www.nerdsh.org/ - my blog, a bit neglected though
https://www.youtube.com/channel/UChsU6woi3lhLhtT_ILbSCCw - Some videos of mine

Reply 919 of 929, by MobyGamer

User metadata
Rank Member
Rank
Member

I can run modmxt on my PC (4.77 MHz, Sound Blaster Pro) just fine. It should run on yours, and sound great at 10 MHz too. What settings (port, irq, dma) is your soundcard set to? Do you have a BLASTER environment variable set up that matches the settings, and does modmxt show those settings on startup?

For an additional successful test, run "modm" as it is lighter on memory usage, and use a simple 4-channel .MOD file for your first test to ensure the software is working.