[go: up one dir, main page]

Menu

[r8]: / in_vgm / trunk / in_vgm.txt  Maximize  Restore  History

Download this file

759 lines (603 with data), 28.9 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
VGM input plugin 0.35
=====================
PROBLEMS
========
Here are the things that can go wrong, right at the start so you can
find them easily.
1. VGM files play too fast
If you have in_gym then disable its VGM handling. It is weird.
2. Anything else
Please contact me!
Introduction
============
This is a Winamp (2.xx and 5.xx) plugin for playing VGM files. VGM is a
standard for frame-accurate logging of SN76489/SN76496 and various
YMxxxx writes, originated by Dave, allowing various systems' games'
music to be stored. See http://www.smspower.org/music for more
information, and to download VGM music files.
Open this URL in Winamp to hear a demo:
http://www.smspower.org/music/vgm/demo/Golvellius.m3u
To use: put in_vgm in Winamp's plugins\ folder, and restart Winamp. If
you got the self-installing version then it should already be working.
Load .vgm or .vgz files in Winamp; go to the "File types" preferences
page to associate these extensions:
1. Open the Preferences dialogue box (press Ctrl+P, or right-click and
choose Options -> Preferences...)
2. Choose "File types" from the tree on the left (it's the second item
unless Winamp has changed since I wrote this)
3. Make sure "vgm" and "vgz" are selected in the "Associated extensions"
list (if they aren't in the list it's because you have another buggy
plugin installed)
Be sure to check out the file info and plugin configuration dialogues.
The YM2413 emulation engine is EMU2413 by Mitsutaka Okazaki
(http://www.angel.ne.jp/~okazaki/ym2413). The PSG engine is by me. The
YM2612 engine is from Gens by Stephane Dallongeville
(http://gens.consolemul.com). The YM2151 engine is from MAME
(http://www.mame.net) and was added by BlackAura. ZLib decompression
is by Jean-loup Gailly and Mark Adler.
Dialogue boxes
==============
1. VGM file & GD3 tag information
To open:
- In the main window, press Alt+3; or double-click on the track title;
or right-click on the track title and choose "File info".
- In the playlist editor, select some files and press Alt+3; or right-
click and choose "File info"; or press the "MISC" button, choose
"FILE INF" and then "File info..."; or right-click the "MISC" button,
choose " File info" and then "File info...".
This shows you information about the file and, if it has a GD3
information tag, it shows you information from there too. It's similar
to the ID3 information box for MP3s, except that you can't edit the GD3
tag from within Winamp.
Choose "English" or "Japanese" to display the GD3 information for that
language, if available.
If you see something like "????" for a GD3 entry then your version of
Windows doesn't support Unicode, or translation from Unicode to a valid
MBCS.
Click on "View GD3 in browser" to open either "Now Playing" (the
MiniBrowser in older versions of Winamp) or your regular web browser,
with a page showing the GD3 tag. The reason this is done is, HTML 4.0
compliant browsers *do* generally have the ability to display Unicode
text. You'll need to have appropriate fonts installed (Arial Unicode is
a good one to have).
Click on "Configure plugin..." to open the plugin configuration
dialogue box.
If you open this dialogue box for several files in the playlist editor,
it will appear once for each file. Press Esc or press the [X] button to
abort showing it once per file.
2. VGM plugin configuration
To open:
- Open the "VGM file & GD3 tag information" dialogue box; then press the
"Configure plugin..." button or press Alt+P.
- Or open the Winamp Preferences dialogue box (Right-click or menu
button -> Options -> Preferences...; or press Ctrl+P), choose the
Plug-ins -> Input page, then double-click on the "VGM input plugin
v0.xx ( IN_VGM.DLL)" item, or select it and click on the Configure
button.
Playback tab:
- Looping:
"Repeat looped section x times"
Choose how many times to play the looped section in a VGM file, if
it has one. A value of 0 will play through the looped section once.
"Then fade out over x ms"
When repeating looped sections, there is no "end" to the music.
Enter a time in ms (1000ms = 1s) over which the music will fade out
after looping the desired number of times. A setting of 0 will give
no fadeout.
"Loop forever"
Ignore the looping counter and loop forever. Note that this disables
seeking (in Winamp) and thus also the "Immediate update" option.
- Pause after non-looped tracks
"Pause x ms"
Even when a track does have an end, it does not sound good if the
next track follows on immediately. Enter a time in ms (1000ms = 1s)
to pause at the end of each track.
- Playback rate:
"Recorded rate"
If this is selected, all VGM v1.01+ files will be played at the
rate specified in the file. VGM 1.00 files will be played at 60Hz.
"50Hz"
"60Hz"
If 50Hz or 60Hz is selected, all files will be played at that rate -
50Hz corresponds to PAL/SECAM home systems used in Europe and
Australia/NZ; 60Hz corresponds to NTSC/PAL-M systems used in Asia
and the Americas.
"Other: x Hz"
If you choose this you can enter any rate, to play files extra
slowly or quickly. Extreme values and fractional values are not
allowed. Note that seeking is buggy with unusual rates.
The effect will only be heard when you restart the track, or when the
next track starts.
- Volume, muting and panning
"Overdrive"
Amplifies all sound to levels that are in danger of being clipped,
but are similar to regular MP3s so visualisations work better.
"Keep muting when track changes"
If checked, per-muting will remain when the track changes; otherwise
all channels are unmuted.
"Randomise panning on track start"
For chanels with configurable fake stereo, this will apply a
Guassian randomisation to the stereo panning for every channel.
GD3 tags tab:
- Data formatting:
"Prefer Japanese text"
If checked, the media library and advanced title formatting will
use Japanese text if available, otherwise English. If unchecked,
English text is used in preference to Japanese.
"Append (FM) to game name for YM2413"
To make it easier to tell FM and PSG soundtracks apart, this will
make the returned game name (given as the album name) end with
"(FM)". Note that some emulators incorrectly specify an FM clock in
the VGM file, causing this to be displayed wrongly.
- File Type:
"Return file type ID"
Winamp's Media Library comes by default with filtered views for
"Audio" and "Video", as well as other views for htings like
recently played files. If you right-click on the tree you can edit
them and add new views for more advanced filters.
If, like me, you don't want VGMs to play mixed in with your regular
MP3s, you can use this to make it very easy to filter VGMs out of
the "Audio" view and into another. Here's the procedure:
1. Change the number to another value (I use 262144)
2. Add a new view to the Media Library
3. On the advanced tab, change the query to TYPE=262144 (or whatever
number you chose)
4. Refresh your Media Library from the Library button.
Note that Winamp does not define meanings for values other than 0
(audio) and 1 (video). It might in later versions, so try to use a
value that is unlikely to be used in the future (2 is more likely
to be used than 262144).
- Now Playing:
"Display GD3 tags as HTML in "Now Playing""
If checked, displaying a GD3 tag as HTML (using the "View GD3 in
browser" button described above) will use Now Playing. If unckecked,
it will use your regular web browser.
"Display them automatically"
If checked, GD3 tags will automatically be displayed in Now Playing
when tracks start. This will also block most other parts of Winamp
from changing the Now Playing page while a VGM file is playing.
"Open "Now Playing" if it is closed"
If checked, when auto-displaying GD3 tags, Now Playing will be
opened if it is closed.
Note that in older versions of Winamp, the MiniBrowser is the
equivalent of Now Playing.
- Legacy title formatting
Enter text to control what title Winamp shows for the file. Enter
special codes like "%t" to insert various GD3 entries. If the file
has no GD3 tag then the filename will be used as the title.
Winamp 5's Advanced Title Formatting bypasses this, instead using
data from the Media Library.
PSG tab:
- Chip control
You can choose the relative volume of the chip (default: centre = 1.00)
and globally enable/disable it.
- Channel control
If the current track includes PSG data, the checkboxes will allow you
to enable and disable indivisual sound channels.
The trackbars allow you to apply "fake" stereo to the channels. This
can result in a more pleasing sound but is totally inaccurate :) The
original chip was strictly mono.
That is, apart from the Game Gear's extended version which allows
"digital" stereo (where the sound is either 100% left, centre or 100%
right). If the track includes such data then the "fake" stereo for the
affected channel is overridden.
Press the "Centre all" button to reset all channels to a centre
position.
- Emulation
"Smooth PSG vol curve"
Applies a smooth logarithmic volume curve to the PSG volume levels;
if unchecked, values taken from a real SMS's output are used
instead. These values have reduced definition at high volume levels.
YM2413 tab:
- Chip control
You can choose the relative volume of the chip (default: centre = 1.00)
and globally enable/disable it.
- Channel control
If the current track includes PSG data, the checkbozes will allow you
to enable and disable indivisual sound channels. You can also apply
"fake" stereo as above.
- Emulation
"High quality YM2413"
This runs the YM2413 engine at the true clock rate and resamples to
44100Hz. The effect is marginal.
YM2612/YM2151 tab:
- YM2612
You can choose the relative volume of the chip (default: 0.25)
and globally enable/disable it. You can also enable and disable
individual channels. "Fake" stereo is unavailable because the YM2612
supports real stereo.
- YM2151
Relative volume and global enabling as above.
Bottom part of window:
"Immediate update"
If this is selected, the effect of changing some of the settings will
be instant, but it may introduce jumps or pauses to the sound,
depending on the output plugin and the type of VGM file playing. If
it is not selected then the effect will take the length of the output
buffer (usually two seconds) to be heard.
Note that cancelling this dialogue box does *not* restore the previous
settings for many options.
Actually asked questions
========================
> y doesnt the winamp show vgms as associted files? i always have to
> select .vgm .vgz from the drop down menu.
This is a bug in old versions of Winamp, fixed in version 2.77. If your
Winamp is older you should update.
> FM music is not based on SINE waves, is it?!
Yes, it is. "Frequency modulation" means using one sine wave to change
the frequency of another, thereby producing quite complex waveforms
from two simple sine waves, a Good Thing when it comes to making cheap
sound chips. Although one source says "Note that the name 'FM' is a
misnomer; in actual fact the Yamaha chips all use phase modulation (PM)
to create their sounds." So now you know.
> The latest VGM plugin is much slower on my p133. The last one works
> fine, but with the new one the songs stops and then continues after a
> second all the time. Why?
Because FM emulation is a lot more complicated than PSG emulation, so
it takes more time. You might like to get VGMTool to optimise any VGMs
with unnecessary chip data in them, or possibly re-download the files
if they've been updated with optimised versions.
How to play VGM files direct from your webpage
==============================================
You can make it so people can click on a link and have a VGM played in
Winamp the same way as you can do it for MP3s...
1. Make a playlist file for the file(s) you want, listed as full URLs
2. Link to that
Winamp sets it up so IE will download and open the playlist without
prompting the user; the plugin then downloads the file itself and plays
it. I think Netscape does a similar thing, because most servers have
the MIME types properly set up for playlist files.
Known issues:
=============
You can choose to loop a VGM a lot of times. However, Winamp doesn't
like that...
- the playlist will either display the wrong track length or nothing,
if it is over about 500 minutes
- some output plugins don't like it - eg. in Winamp 2.77, the waveOut
plugin will display the wrong time while playing past 202:53
- very high values will make the main window/posbar length wrong too
On my computer, turning on the equaliser will make it use 3 times as
much CPU for PSG tunes, and 1.8 times as much for FM.
The equaliser does not process square waves well. I recommend you turn
it off if you can.
I tried a DSP plugin, "Dee". It crashes Winamp whenever you turn on the
3D thing, I have no idea why. So don't do that.
I tried another, "AlienDSP". It works quite well, and the "Pseudo
Stereo" is quite cool.
Fake stereo for SN76489 and YM2413 changes the apparent volume of the
channel being panned. I need to learn about panning laws and constant
power output; I didn't do that yet. Please help me if you can!
History:
========
0.35 26/3/05
============
+ Fixed crash reading extended file info on files with no GD3 tag
+ Added per-chip enabling and preamplification controls
+ Settings saving is now updated for Winamp's user profile support
+ Added per-channel muting for YM2612
+ Added "loop forever" option
+ Improved HTML information display
0.34 7/12/05
============
+ Added high-pass filter for PCM to Gens sound core (by Blargg)
+ Pausing after non-looped tracks was broken in 0.33
+ This also broke skipping with short tracks
+ Fixed a couple of typos in the readme
+ Improved HTML information display
0.33 20/11/05
=============
+ Added support for YM2612 sample banks and VGM 1.50
+ Fixed some stupid old bugs with unlooped VGMs that nobody ever noticed
+ Updated ZLib to latest version
+ (Hopefully) removed dependency on MSVCRT*.DLL
+ Added file sniffer functionality so it will automagically play VGM
files even if you change the extension (although that's not
recommended)
+ Improved file info box chip usage display
+ Added tag caching for tag queries, to speed up media library tag
retrieval
+ Changed to NSIS installer and packed in another demo VGM
0.32 30/10/05
=============
+ Added icons to config dialogue
+ Fixed issue with Now Playing loading information pages over the HTML
information display
+ Added file length information into HTML information display
+ Updated downloader code to use Winamp's built-in downloader instead of
using IE
+ Added msvcrt71.dll to installer
+ Enabled support for VGM 1.10
+ Re-integrated and extended Charles' MAME-style SMS Plus conversion of
sn76489.c to hopefully make it more discoverable and re-usable by
others
+ Added PSG panning support
+ Reorganised config interface
+ Added magical track number extraction for the Media Library by
guessing the filename of the associated playlist file and finding
which number entry it is in there - works well for most SMS Power
releases, at least
+ Fixed Media Library year problems
+ Improved time formatting
+ Added YM2413 panning support
+ Added panning Gaussian randomisation
+ Improved emulation of non-Sega variant SN76489 for the Beeb fans
0.31 12/12/04
=============
+ Added Media Library extended title support and lots of associated
options
+ And various other stuff too
0.30 28/5/03
============
+ Added pause between tracks and looping fadeout options
+ Updated to EMU2413 0.60: "Fixed HH&CYM generator and all voice datas."
+ Unupdated back to EMU2413 0.55 - percussion sounds terrible!
+ Added support for VGM v1.02 (custom PSG noise feedback)
+ Replaced MAME YM2612 core with Gens 2.10
0.29 31/10/02
=============
+ Added PSG noise boost option
+ Added PSG smooth volume curve option
+ Fixed bug in GD3 tag display
0.28 12/9/02
============
+ Configuration now uses a tabbed dialogue
+ Added WinXP "visual styles" support
+ Japanese text now shows under WinXP (hopefully)
+ Seeking bugs fixed
+ Cancelling the File Info dialogue box for a group of files now works
properly
+ Improved mixing
+ Volume levels now match better for different chips
+ Fixed a typo which caused the YM2162 core not to be closed
+ Added some documentation to this file
+ Added a Help button which opens this file
0.27 1/5/02
===========
+ Fixed a bug with invalid GD3s
+ Updated to YM2413 0.55, which included a higher quality mode (12%
higher sampling rate plus conversion). Use "High quality YM2413"
checkbox to control it.
+ Modified PSG core to produce output similar to FM cores, ie. much
quieter
+ Added Overdrive mode which amplifies the sound to levels similar to a
typical MP3 file. It can cause clipping, though.
0.26 14/4/02
============
+ Added MAME YM2151 FM core thanks again to BlackAura
+ Fixed credits in About box
0.25 8/4/02
===========
+ Fixed PSG 2-byte noise write behaviour based on chip tests
+ Added MAME 0.36 YM2612 core thanks to BlackAura
+ Finally fixed the seek bug
0.24 25/3/02
============
+ Improved PSG tone channel oversampling (or rather sub-sample accuracy)
a huge amount - aliasing is gone and it sounds great. It's now always
turned on.
+ Rewrote PSG noise simulation to be 100% accurate to how the real chip
works
+ Reverse engineered SMS SN76489 (PSG) feedback network so noise
pattern is bit-accurate
+ Updated to ZLib 1.1.4
0.23 17/3/02
============
+ Added PSG oversampling, hoping to reduce aliasing effects but it
doesn't.
+ Improved channel selection, it now remembers it if you stop and re-
play a track.
+ Released early as I had broken the self-installer last time
0.22 12/2/02
============
+ Total/loop lengths in file info box are now to 1 decimal place,
rather than rounded down to the nearest second
+ Added some protection for truncated (broken) files
+ Looked into why VGZ files don't show up on the Open dialogue until
you select them from the dropdown list... it's a Winamp bug, see the
AAQ above.
+ Worked on the internet download code a bit... note that when you
close the minibrowser, it tends to switch off IE's offline mode :(
0.21 6/1/02
===========
+ Added HTML display of GD3 information, hopefully allowing Japanese
text to be displayed on all systems
+ Fixed a memory leak
+ Loads of other stuff
+ Never actually got around to releasing this one
0.2 20/11/01
============
+ Ported the plugin to C
+ so now the YM2413 is emulated via EMU2413
+ ported my SN76489 emulator
+ ported playback engine, including variable-speed playback and
seeking
+ Re-implemented file downloader using URLMon.dll (makes code simpler)
+ Implemented loop skipping when seeking, so you can seek through a
file looped a lot of times much faster than before
+ Change title formatting - now you can display Japanese text too (if
supported).
+ Fixed a bug when stopping/skipping just before the end of the track
+ Moved settings to plugin.ini in the plugins folder. You can delete
the section from winamp.ini if you like. You'll have to re-set your
preferences if you don't like my defaults.
+ Changed FM/PSG mixing so the Japanese BIOS music sounds better... if
anyone can send me a recording (from a real SMS with an FM chip) of
the Japanese BIOS music (or any game using both the PSG and FM chip)
I'd be grateful.
+ Added some stuff to the file info dialogue
+ Added YM2413 channel muting
+ Updated to EMU2413 0.51, with modifications
0.12 1/10/01
============
+ Fixed typo in About box (0.1 -> 1.0)
+ Added user-configurable playback rate - now you can choose to play
music at the speed you remember.
+ Made it so PSG flip-flops don't get stuck at zero frequency (made it
sound strange sometimes)
+ Changed config dialogue to Verdana font (file info already was)
+ Added useless icon to config dialogue. If anyone wants to design a
logo I can show it this way :)
+ Fixed tab order in file info dialogue
+ Added SMS Power URL button to file info dialogue
+ Fixed a bug caused by the flip-flop fix
+ Cleaned up source code a lot
+ DLL is now compressed as well as WinAligned
+ Ported EMU2413 to Delphi... but it doesn't work yet
+ Removed the above flip-flop thing because it broke voices...
On a real SMS, quite often a channel's frequency is set to 0
without turning it off. On my simulated PSG that leaves a permanent
DC offset; on a real SMS that offset decays in a fraction of a
second. The effect of this is to make the wave appear to "move" up
and down; it has a small effect on the sound, as speakers operate
better without a DC offset. Unfortunately the same effect is used
for voices, so when I activate the code to remove the offset,
voices stop working. To see this in effect, try "Out Run 3D -
Magical Sound Shower" or "Micro Machines - Title Screen", among
others.
+ Added HTTP downloading via WinINet.dll... which is part of IE, but
should be on almost every PC
0.11 4/9/01
===========
+ Fixed a bug in the PSG tone emulation that caused problems with Micro
Machines.
+ Relaxed version checking, now it only insists on VGM and GD3 1.xx and
still offers to play other files.
0.1 3/9/01
==========
+ Added a button to set MIME types in the registry. If a server is set
up to descibe VGM/VGZ files as "Content-Type: audio/vgm" and these
values are set, Netscape will be able to play VGM files from URLs. IE
doesn't need it, it ignores the MIME type when it sees the file
association with Winamp and will open the file properly (after a
prompt).
+ VGM is verging on going public, so it's reset to 1.00 and the plugin
gets out of alpha
Alpha 13 26/8/01
================
+ Fixed a worse bug in the previous bugfix :P
+ Added track title formatting stuff
+ Increased play thread priority to stop skipping when the CPU is busy
Alpha 12a 25/8/01
=================
+ Fixed looping bug
Alpha 12 25/8/01
================
+ For some reason the GZip code limited the path to 79 characters,
causing "Not an AYM file" errors on files with long paths. I fixed it.
+ Switched to VGM instead of AYM. ****DELETE IN_AYM.DLL****
+ Added configuration dialogue; the tone channel checkboxes have moved
there from the file info box
+ Added looping support
+ Updated to VGM 1.12
+ Added loop configuration to config dialogue, saving the loop count to
winamp.ini
+ Added a button in the file info dialogue for the config dialogue, so
you can get at it quicker
+ Setting the loop to a high value allows me to test seeking speed. 400
minutes in 8 seconds is 3000x...
Alpha 11 20/8/01
================
+ Synchronous noise tested against a real system. Apart from the
different sound due to the real system's imperfections, it works
properly now.
+ Updated to use the GD3 tag location properly. Decrease the offset by
0x14 in existing files for it to work. I'm not going to code for it
to handle both, sorry...
+ Volumes use values measured from a real SMS. I may switch to
logarithmic values, or maybe have an option eventually?
+ Speed modifying code added. If you want to play back at 120Hz or 13.
47Hz, you can. Except you can't, I commented that code out. Thanks to
Bock for pointing out how to do it.
Alpha 10 19/8/01
================
+ It now looks for and uses the .ayz file extension. It actually
doesn't matter which extension you give a file, compressed or not.
+ AYM 1.11, plus you can now choose to try and play versions not in the
supported range (1.08-1.11).
Alpha 9 19/8/01
===============
+ Switched to AYM instead of DYM
+ Invalid files were displaying a track length before, they don't now
+ Added GZip support. There are problems with the .aym.gz extension -
Winamp won't automatically pass it to the plugin, because it sees the
extension as .gz. That has been worked around. Windows won't
associate . aym.gz files with Winamp, because it too sees them just
as .gz files. I don't see any way around this. GZip also ballooned
the DLL size a bit... WinAligning makes it seem even bigger. (Was:
~42KB -> 64KB aftar aligning, now it's ~75KB -> 92KB after aligning.)
Alpha 8a 17/8/01
================
+ Fixed problem with DirectSound output plugin
+ Fixed EQ problem
Alpha 8 17/8/01
===============
+ Fixed an error which cause all sound to be half the correct frequency
(1 octave lower than it should)
+ That also fixed voices
Alpha 7 16/8/01
===============
+ DYM 1.10, with GG stereo port writes. It's untested because there is
no test stream yet :)
+ Improved method of muting channels, although as far as the sound is
concerned it's the same.
+ Tweaked volume so the (theoretical) maximum is now 98% of the
available volume. It seems this is the "right" thing to do...
+ Since compatibility hasn't broken since DYM 1.08 (it uses default
values for older versions), the version checking now accepts a range
of values.
Alpha 6 15/8/01
===============
+ DYM 1.09, with the PSG clock rate in the header. That is all.
Alpha 5 15/8/01
===============
+ Fixed up the channel disabling, although it's still in the info box
(it'll probably end up somewhere else). Before it took until the next
volume change on that channel to mute, now it's only the output
plugin' s buffer length that stops it being instant. Noise can be
disabled too. Unmuting still needs a volume change though.
+ DYM 1.08 already...
+ Added noise emulation according to the MAME/Hiro-shi method. It's
terrible, completely inaccurate.
+ Dave's Sonic DYM highlighted a problem - out of laziness, I was not
buffering the file myself, hoping that Windows would do enough. So,
every byte read was actually using quite a lot of CPU. I've now got a
32KB buffer - voices work now (almost... I'm not sure what the
problem is now, it could be an issue with DYM itself), and seeking is
incredibly fast! It took 6 seconds to seek 1 minute into the GG
Shinobi DYM before, now it's instant! Seeking nearly 3 minutes into
the Sonic DYM takes a fraction of a second. And now, CPU use is way
down. It depends on the DYM file, but it's typically around 4%, a
quarter what alpha 4 used :)
+ I switched to my determined PSG clock speed, but it seems to cause
some problems (with voice) if it's not what the DYM creator used. DYM
1.09 addition?
+ WinAligned DLL... it's 64KB instead of 45, but it now executes from
the disk cache on Win98 and higher.
Alpha 4 13/8/01
===============
+ Added proper file info box, without invoking Delphi's RTTI filesize
overhead. It's a lot more hassle :( but it's kept the plugin at 44KB.
+ Rewrote tone generators to act EXACTLY like the hardware (counters
and flip-flops). The last version used another method which I thought
up based on maths and stuff like that, which sounded OK until the
sound started using vibrato, in which case it sounded terrible. Now
it sounds perfect (except for emulation of the "fading"
flip-flops...). As an added bonus it seems to be a bit faster too,
the decoding thread uses about 16.2% CPU for me now.
+ Added VERY quick and dirty noise emulation. It's just volume*random(),
and sounds crappy. It's better than nothing though. It also accounts
for about 25% of the CPU use...
+ Added DYM version checking, because some people were trying to play
old DYM files and crashing Winamp... :)
Alphas 1 to 3
=============
I didn't record what I did then...
...but I ought to thank Jason for help translating the C.
while (! *((int *)b) )
is quite confusing, I think
while integer(b^)=0 do
is much more readable :) (translation: while what pointer b points to,
typecast as an integer, is zero, do...)
Maxim
http://mwos.cjb.net
http://www.smspower.org