-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRolandE28ROM.bt
204 lines (184 loc) · 5.08 KB
/
RolandE28ROM.bt
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
//------------------------------------------------
//--- 010 Editor v12.0 Binary Template
//
// File: RolandE28ROM.bt
// Authors: Daniel Stien <[email protected]>
// Version:
// Purpose: Roland E-28 program ROM.
// Category: Misc
// File Mask: *.bin
// ID Bytes: 0C 07 00 48
// History:
//------------------------------------------------
BigEndian();
#include "RolandArrangerTypes.bt"
FSeek(0x2718);
Label ModelBanner(16);
FSeek(0x2B104);
Label Version(16);
FSeek(0x6D84);
char Credits[28];
FSeek(0x6F1B);
char GsBanner[16];
FSeek(0xBADE);
char DemoBanner[55];
// Style definitions
FSeek(0xCE07);
local int64 StyleSegments[7];
local int i;
for (i = 0; i < 7; i++) {
StyleSegments[i] = 0x40000 + (0x8000 * (i - i % 2));
Printf("Segment %d : Addr %05X\n", i+1, StyleSegments[i]);
}
local struct {
local char Value[9];
} StyleNames[64];
StyleNames[ 0].Value = "ROCK ";
StyleNames[ 1].Value = "BALROCK ";
StyleNames[ 2].Value = "RAP ";
StyleNames[ 3].Value = "HOUSE ";
StyleNames[ 4].Value = "DANCE 1 ";
StyleNames[ 5].Value = "DANCE 2 ";
StyleNames[ 6].Value = "FUNK ";
StyleNames[ 7].Value = "CONTEMP ";
StyleNames[ 8].Value = "8 BEAT 1";
StyleNames[ 9].Value = "8 BEAT 2";
StyleNames[10].Value = "8 BEAT 3";
StyleNames[11].Value = "8 BEAT 4";
StyleNames[12].Value = "16 BEAT1";
StyleNames[13].Value = "16 BEAT2";
StyleNames[14].Value = "16 BEAT3";
StyleNames[15].Value = "16 BEAT4";
StyleNames[16].Value = "BOOGIE ";
StyleNames[17].Value = "ROCK'N 1";
StyleNames[18].Value = "ROCK'N 2";
StyleNames[19].Value = "SLROCK 1";
StyleNames[20].Value = "SLROCK 2";
StyleNames[21].Value = "TWIST ";
StyleNames[22].Value = "BALLAD 1";
StyleNames[23].Value = "BALLAD 2";
StyleNames[24].Value = "SLSWING1";
StyleNames[25].Value = "SLSWING2";
StyleNames[26].Value = "SWING ";
StyleNames[27].Value = "BIGBAND ";
StyleNames[28].Value = "R&B ";
StyleNames[29].Value = "SHUFFLE ";
StyleNames[30].Value = "DIXIE ";
StyleNames[31].Value = "CHARLEST";
StyleNames[32].Value = "BOSSA ";
StyleNames[33].Value = "LATIN ";
StyleNames[34].Value = "CHA CHA ";
StyleNames[35].Value = "MERENGUE";
StyleNames[36].Value = "POPROCK ";
StyleNames[37].Value = "RHUMBA ";
StyleNames[38].Value = "BEGUINE ";
StyleNames[39].Value = "TANGO ";
StyleNames[40].Value = "SAMBA 1 ";
StyleNames[41].Value = "SAMBA 2 ";
StyleNames[42].Value = "SALSA ";
StyleNames[43].Value = "MAMBO 1 ";
StyleNames[44].Value = "MAMBO 2 ";
StyleNames[45].Value = "REGGAE ";
StyleNames[46].Value = "FUSION ";
StyleNames[47].Value = "BAROQUE ";
StyleNames[48].Value = "SL WALTZ";
StyleNames[49].Value = "JZ WALTZ";
StyleNames[50].Value = "WALTZ ";
StyleNames[51].Value = "MARCH ";
StyleNames[52].Value = "FOXTROT ";
StyleNames[53].Value = "POLKA ";
StyleNames[54].Value = "D MARSCH";
StyleNames[55].Value = "SCHLAGER";
StyleNames[56].Value = "BLUES ";
StyleNames[57].Value = "COUNTRY ";
StyleNames[58].Value = "SEVILLA ";
StyleNames[59].Value = "SPRHUMBA";
StyleNames[60].Value = "MUSETTE ";
StyleNames[61].Value = "FR WALTZ";
StyleNames[62].Value = "SCOUNTRY";
StyleNames[63].Value = "S BOOGIE";
local int s;
for (s = 0; s < 64; s++) {
// TODO: Verify style order.
StyleHeader StyleHeaders(StyleNames[s].Value, StyleSegments, EventVersion1)<optimize=false>;
}
// Instruments
FSeek(0x10000);
Instrument Instruments[224];
Sample Samples[144];
// Drums
FSeek(0x20000);
DrumSample DrumSamples2[65];
// Something...
FSeek(0x27000);
struct {
ubyte b0, b1, b2, b3;
} Something[2048];
FSeek(0x29D93);
char RomTestBanner[32];
FSeek(0x2A516);
struct {
Label Str(-1)[57];
} MenuLabels;
FSeek(0x2AEE8);
char TestMenuLabels[540];
FSeek(0x2B104);
char VersionBanner[16];
FSeek(0x2BD00);
Sample DrumSamples3[37];
// Drums
//Instrument Drums[65];
FSeek(0x30000);
uint16 indices[128];
FSeek(0x38080);
Drumset Drumsets[13];
// GS init
FSeek(0x3CA00);
GsInit GsInits;
// Style events
FSeek(0x40000);
ChunkCollection Chunks1(51);
FSeek(0x48000);
ChunkCollection Chunks2(88);
FSeek(0x50000);
ChunkCollection Chunks3(130);
FSeek(0x58000);
ChunkCollection Chunks4(182);
FSeek(0x60000);
ChunkCollection Chunks5(240);
FSeek(0x68000);
ChunkCollection Chunks6(353);
FSeek(0x70000);
ChunkCollection Chunks7(785);
FSeek(0x78000);
typedef struct (int length) {
ubyte unknown0[3];
ubyte style;
ubyte unknown1[21];
ubyte tempo;
ubyte unknown2[16];
ubyte style1;
ubyte unknown3[length - 43];
} StyleDemoChunk<read=Str("%s @ %d BPM", StyleNames[style].Value, tempo)>;
struct {
struct {
uint16 Segment;
uint16 Offset;
} TOC[8];
local int c, o;
for (c = 0; c < 8; c++) {
struct {
uint16 Offsets[4];
uint8 Segments[2];
ubyte UnknownChunk1[Offsets[1] - Offsets[0]];
ubyte ToneDemoChunk[Offsets[2] - Offsets[1]];
ubyte UnknownChunk2[Offsets[3] - Offsets[2]];
if (c < 7) {
StyleDemoChunk StyleDemo(TOC[c + 1].Offset - Offsets[3]);
}
else {
StyleDemoChunk StyleDemo(560);
}
} DemoContainer;
}
} Demos;