diff options
-rw-r--r-- | apps/codecs/SOURCES | 2 | ||||
-rw-r--r-- | apps/codecs/libgme/emu2413.c | 2 | ||||
-rw-r--r-- | apps/codecs/libgme/emu8950.c | 20 | ||||
-rw-r--r-- | manual/appendix/file_formats.tex | 6 |
4 files changed, 19 insertions, 11 deletions
diff --git a/apps/codecs/SOURCES b/apps/codecs/SOURCES index bbceae45b0..6862eeda8e 100644 --- a/apps/codecs/SOURCES +++ b/apps/codecs/SOURCES | |||
@@ -35,9 +35,9 @@ wmapro.c | |||
35 | ay.c | 35 | ay.c |
36 | gbs.c | 36 | gbs.c |
37 | hes.c | 37 | hes.c |
38 | #if MEMORYSIZE > 2 | ||
39 | nsf.c | 38 | nsf.c |
40 | sgc.c | 39 | sgc.c |
40 | #if MEMORYSIZE > 2 | ||
41 | vgm.c | 41 | vgm.c |
42 | kss.c | 42 | kss.c |
43 | #endif | 43 | #endif |
diff --git a/apps/codecs/libgme/emu2413.c b/apps/codecs/libgme/emu2413.c index e7acebc63f..def6d60b7f 100644 --- a/apps/codecs/libgme/emu2413.c +++ b/apps/codecs/libgme/emu2413.c | |||
@@ -210,7 +210,7 @@ static e_uint32 dphaseARTable[16][16]; | |||
210 | static e_uint32 dphaseDRTable[16][16]; | 210 | static e_uint32 dphaseDRTable[16][16]; |
211 | 211 | ||
212 | /* KSL + TL Table */ | 212 | /* KSL + TL Table */ |
213 | static e_uint32 tllTable[16][8][1 << TL_BITS][4]; | 213 | e_uint8 tllTable[16][8][1 << TL_BITS][4]; |
214 | static e_int32 rksTable[2][8][2]; | 214 | static e_int32 rksTable[2][8][2]; |
215 | 215 | ||
216 | /* We may not have too much SRAM in rockbox */ | 216 | /* We may not have too much SRAM in rockbox */ |
diff --git a/apps/codecs/libgme/emu8950.c b/apps/codecs/libgme/emu8950.c index 0e9c4864eb..e75bf66d64 100644 --- a/apps/codecs/libgme/emu8950.c +++ b/apps/codecs/libgme/emu8950.c | |||
@@ -36,7 +36,12 @@ static unsigned int dphaseARTable[16][16]; | |||
36 | /** Phase incr table for Decay and Release. */ | 36 | /** Phase incr table for Decay and Release. */ |
37 | static unsigned int dphaseDRTable[16][16]; | 37 | static unsigned int dphaseDRTable[16][16]; |
38 | /** KSL + TL Table. */ | 38 | /** KSL + TL Table. */ |
39 | static int tllTable[16][8][1<<TL_BITS][4]; | 39 | #if !defined(ROCKBOX) |
40 | static unsigned char tllTable[16][8][1<<TL_BITS][4]; | ||
41 | #else | ||
42 | /* Use the table calculated in emu2413 which is identical. */ | ||
43 | extern unsigned char tllTable[16][8][1<<TL_BITS][4]; | ||
44 | #endif | ||
40 | static int rksTable[2][8][2]; | 45 | static int rksTable[2][8][2]; |
41 | /** Since we wont change clock rate in rockbox we can | 46 | /** Since we wont change clock rate in rockbox we can |
42 | skip this table */ | 47 | skip this table */ |
@@ -193,6 +198,7 @@ static void makeDphaseTable(int sampleRate, int clockRate) | |||
193 | } | 198 | } |
194 | #endif | 199 | #endif |
195 | 200 | ||
201 | #if !defined(ROCKBOX) | ||
196 | static void makeTllTable(void) | 202 | static void makeTllTable(void) |
197 | { | 203 | { |
198 | #define dB2(x) (int)((x)*2) | 204 | #define dB2(x) (int)((x)*2) |
@@ -209,17 +215,17 @@ static void makeTllTable(void) | |||
209 | for (TL=0; TL<64; TL++) | 215 | for (TL=0; TL<64; TL++) |
210 | for (KL=0; KL<4; KL++) { | 216 | for (KL=0; KL<4; KL++) { |
211 | if (KL==0) { | 217 | if (KL==0) { |
212 | tllTable[fnum][block][TL][KL] = ALIGN(TL, TL_STEP, EG_STEP); | 218 | tllTable[fnum][block][TL][KL] = (ALIGN(TL, TL_STEP, EG_STEP) ) >> 1; |
213 | } else { | 219 | } else { |
214 | int tmp = kltable[fnum] - dB2(3.000) * (7 - block); | 220 | int tmp = kltable[fnum] - dB2(3.000) * (7 - block); |
215 | if (tmp <= 0) | 221 | if (tmp <= 0) |
216 | tllTable[fnum][block][TL][KL] = ALIGN(TL, TL_STEP, EG_STEP); | 222 | tllTable[fnum][block][TL][KL] = (ALIGN(TL, TL_STEP, EG_STEP) ) >> 1; |
217 | else | 223 | else |
218 | tllTable[fnum][block][TL][KL] = (int)((tmp>>(3-KL))/EG_STEP) + ALIGN(TL, TL_STEP, EG_STEP); | 224 | tllTable[fnum][block][TL][KL] = ((int)((tmp>>(3-KL))/EG_STEP) + ALIGN(TL, TL_STEP, EG_STEP) ) >> 1; |
219 | } | 225 | } |
220 | } | 226 | } |
221 | } | 227 | } |
222 | 228 | #endif | |
223 | 229 | ||
224 | // Rate Table for Attack | 230 | // Rate Table for Attack |
225 | static void makeDphaseARTable(int sampleRate, int clockRate) | 231 | static void makeDphaseARTable(int sampleRate, int clockRate) |
@@ -313,7 +319,7 @@ static inline void slotUpdatePG(struct Slot* slot) | |||
313 | 319 | ||
314 | static inline void slotUpdateTLL(struct Slot* slot) | 320 | static inline void slotUpdateTLL(struct Slot* slot) |
315 | { | 321 | { |
316 | slot->tll = tllTable[slot->fnum>>6][slot->block][slot->patch.TL][slot->patch.KL]; | 322 | slot->tll = (int)(tllTable[slot->fnum>>6][slot->block][slot->patch.TL][slot->patch.KL]) << 1; |
317 | } | 323 | } |
318 | 324 | ||
319 | static inline void slotUpdateRKS(struct Slot* slot) | 325 | static inline void slotUpdateRKS(struct Slot* slot) |
@@ -457,7 +463,9 @@ void OPL_init(struct Y8950* this, byte* ramBank, int sampleRam) | |||
457 | 463 | ||
458 | makeAdjustTable(); | 464 | makeAdjustTable(); |
459 | makeDB2LinTable(); | 465 | makeDB2LinTable(); |
466 | #if !defined(ROCKBOX) | ||
460 | makeTllTable(); | 467 | makeTllTable(); |
468 | #endif | ||
461 | makeRksTable(); | 469 | makeRksTable(); |
462 | makeSinTable(); | 470 | makeSinTable(); |
463 | 471 | ||
diff --git a/manual/appendix/file_formats.tex b/manual/appendix/file_formats.tex index a54debb9ca..f75bd53786 100644 --- a/manual/appendix/file_formats.tex +++ b/manual/appendix/file_formats.tex | |||
@@ -222,11 +222,12 @@ | |||
222 | \nopt{clipv1,c200v2}{ | 222 | \nopt{clipv1,c200v2}{ |
223 | MSX Konami Sound System | 223 | MSX Konami Sound System |
224 | & \fname{.kss} | 224 | & \fname{.kss} |
225 | & Progress bar and seek use subtracks instead of seconds.\\ | 225 | & Progress bar and seek use subtracks instead of seconds.\\} |
226 | SMS/GG/CV Sound Format | 226 | SMS/GG/CV Sound Format |
227 | & \fname{.sgc} | 227 | & \fname{.sgc} |
228 | & Supports Sega Master System and Game Gear Sound Format. | 228 | & Supports Sega Master System and Game Gear Sound Format. |
229 | Progress bar and seek use subtracks instead of seconds.\\ | 229 | Progress bar and seek use subtracks instead of seconds.\\ |
230 | \nopt{clipv1,c200v2}{ | ||
230 | Video Game Music Format | 231 | Video Game Music Format |
231 | & \fname{.vgm} | 232 | & \fname{.vgm} |
232 | & \\ | 233 | & \\ |
@@ -236,10 +237,9 @@ | |||
236 | MOD | 237 | MOD |
237 | & \fname{.mod} | 238 | & \fname{.mod} |
238 | & \\ | 239 | & \\ |
239 | \nopt{clipv1,c200v2}{ | ||
240 | NES Sound Format | 240 | NES Sound Format |
241 | & \fname{.nsf}, \fname{.nsfe} | 241 | & \fname{.nsf}, \fname{.nsfe} |
242 | & Progress bar and seek use subtracks instead of seconds.\\} | 242 | & Progress bar and seek use subtracks instead of seconds.\\ |
243 | Atari SAP | 243 | Atari SAP |
244 | & \fname{.sap} | 244 | & \fname{.sap} |
245 | & \\ | 245 | & \\ |