-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.txt
144 lines (99 loc) · 5.28 KB
/
README.txt
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
dmf2asm v0.1 readme
dmf2asm utility to convert YM2151-based DefleMask tracker files to 6502
DASM assembly data, suitable for playback with the Atari 7800 XM module.
Also included is the companion 6502-based xmym tracker, which will play
the assembly songs output from dmf2asm.
Legal Stuff
-----------
drm2asm is created by Mike Saarna, copyright 2020. It's provided here under
the GPL v2 license. See the included LICENSE.txt file for details.
The 6502-based xmym tracker software was also created by Mike Saarna,
copyright 2020. It's provide here under the CC0 license. The CC0 license is
a public domain license, so you may do with it as you wish. See the included
LICENSE.txt file for details.
What Is It?
-----------
dmf2asm allows you to use DefleMask tracker to author your YM2151 music, and
convert the DefleMask DMF file into assembly data, which can be played with
the included xmym tracker.
dmf2asm and xmym tracker were written for use with the Atari 7800 XM module.
DefleMask tracker is available at no cost for most PC platforms, and can be
downloaded from: http://www.deflemask.com/
Dfm2asm and Xmym Tracker Features
---------------------------------
dmf2asm actively tries to reduce the data output size using a couple of
different strategies.
First, dmf2asm does pattern deduplication, by only storing patterns that
ar unique.
Second, dmf2asm will check if all of the pattern data only has rests on the
odd-numbered beats. If this is true, all patterns will be squeezed by
dropping those odd beat resets and adjusting the tick rates appropriately.
This squeezing is repeated until the DMF data can be squeezed no more.
Each song can be run with a different priority value, which will determine
if a new song may interrupt a playing one. This can be useful if you don't
want some small sound-effect ditty interrupting a grand end-of-level opus.
The service routine of the xmym tracker is safe to run from NMI, or you
can run it manually each frame.
xmym tracker also has macros to pause/resume or stop any running music.
Getting Started Converting Files
--------------------------------
dmf2asm is a command-line program. To convert a DMF file to DASM format
assembly data (printing it to the screen) just run the dfm2asm command with
the -i argument to specify the input file:
dmf2asm -i INPUTFILE.DMF
If you want to create an assembly output file, run the above command with the
-o argument:
dmf2asm -i INPUTFILE.DMF -o OUTFILE.ASM
When in doubt, run dmf2asm without any arguments to get a summary of it's
usage.
Restrictions When Authoring DMF Files
-------------------------------------
DefleMask tracker is a full featured program, and to you need to follow
certain restrictions for best results. In brief:
- You should use the YM2151 target system, within DefleMask. dmf2asm can't
import data from other systems.
- You should only use the F1-F8 voices in your composition. dmf2asm doesn't
support export of the S1-S5 PCM sample voices.
- You should limite yourself to 8 instruments in DiflMask. dmf2asm will only
export and use the first 8 instruments. This was done to avoid costly
instrument reloads mid-song, to avoid bogging down the 6502.
- You should stick to NTSC or PAL based clock in DefleMask. Custom clocks
aren't supported by dmf2asm.
- DefleMask doesn't save the enabled/disabled state of operators in any of
the instruments in the DMF file. If you want an operator muted, handle
that via the ADSR envelope controls.
You should also be advised that dmf2asm assumes that you've used all eight
instruments. You're not required to use all eight, but all of the instrument
related structures will be padded out to a width of eight instruments. This
is for easier and quick parsing of structure sizes based on powers-of-two
on the 6502.
Using the Atari 7800 XMYM tracker
---------------------------------
The main steps to incorporate 7800 XMYM tracker in your own program is:
1) include the xmym.h macro definition file near the top of your code
2) include the xmym.asm and any converted song assembly elsewhere in
your code, out of the way of the program flow.
3) define these zero-page RAM locations:
xmym_songpointerlo
xmym_songpointerhi
xmym_pmpointerlo
xmym_pmpointerhi
xmym_ppointerlo
xmym_ppointerhi
4) define these other RAM locations:
xmym_songpriority
xmym_playsremaining
xmym_pausestate
xmym_patternindex
xmym_tick
5) use the "xmym_init" macro prior to playing any music.
6) use the "xmym_play" macro to play music...
e.g. xmym_play zanac,3,7
...where "zanac" is the name used with the -n switch when you ran the
the dmf2asm utility, where 3 is the priority setting for this song,
and where 7 is the number of times you wish the song to play. Numbers
larger than 127 indicated infinite repeat.
7) (optional) You may use the xmym_stop macro to stop a playing song, or
the xmym_pause or xmym_resume macros to temporarily halt the music.
There are 7800basic and Assembly language examples of how to use the XMYM
tracker in the samples directory.