Skip to content

Commit

Permalink
Merge branch 'milkytracker-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
MBeijer committed Aug 17, 2022
2 parents 219b713 + 4daf1f9 commit 31ddf9b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 78 deletions.
2 changes: 1 addition & 1 deletion src/milkyplay/XModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ class XModule
mp_sint32 saveExtendedModule(const SYSCHAR* fileName, bool isMagic = false, const char* trackerString = NULL); // FT2 (.XM)
mp_sint32 saveProtrackerModule(const SYSCHAR* fileName, bool isMagic = false); // Protracker compatible (.MOD)
mp_sint32 saveMagicalModule(const SYSCHAR* fileName, bool isExtended = true); // Titan's Magic Module (.TMM)

///////////////////////////////////////////////////
// module loaded? //
///////////////////////////////////////////////////
Expand Down
78 changes: 4 additions & 74 deletions src/ppui/fastfill.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,88 +28,18 @@
*
*/

#ifdef __GNUC__
static __attribute__((noinline)) void fill_dword(pp_uint32* buff, pp_uint32 dw, pp_uint32 len)
#else
static inline void fill_dword(pp_uint32* buff, pp_uint32 dw, pp_uint32 len)
#endif
{
#if defined(__ppc__) && defined(__GNUC__) && !defined(__macos__)
// PPC assembly FTW!!1!
// r3 = buff
// r4 = dw
// r5 = len
asm volatile("li r9, 0\n"
"srawi r10, r5, 2\n"
"nop\n" // align loop start to 16 byte boundary
"cmpw cr7,r10,r9\n"
"nop\n" // see above
"beq cr7,$+36\n"
"2:\n"
"stw r4,0(r3)\n"
"stw r4,4(r3)\n"
"stw r4,8(r3)\n"
"stw r4,12(r3)\n"
"addi r10,r10,-1\n"
"addi r3,r3,16\n" // advance by 16
"cmpw cr7,r10,r9\n"
"bne cr7,2b\n"
"clrlwi r11, r5, 30\n"
"nop\n" // align loop start to 16 byte boundary
"cmpw cr7,r11,r9\n"
"beq cr7,$+24\n"
"1:\n"
"stw r4,0(r3)\n"
"addi r11,r11,-1\n"
"addi r3,r3,4\n" // advance by 4
"cmpw cr7,r11,r9\n"
"bne cr7,1b");
#else
pp_uint32 newlen = len >> 2;
pp_uint32 remlen = len & 3;
if (newlen)
{
do
{
*buff = dw;
*(buff+1) = dw;
*(buff+2) = dw;
*(buff+3) = dw;
buff+=4;
} while (--newlen);
}
if (remlen)
{
do
{
*buff++ = dw;
} while (--remlen);
}
#endif
while (len--)
*(buff++) = dw;
}

#ifdef __GNUC__
static __attribute__((noinline)) void fill_dword_vertical(pp_uint32* buff, pp_uint32 dw, pp_uint32 len, pp_uint32 pitch)
#else
static inline void fill_dword_vertical(pp_uint32* buff, pp_uint32 dw, pp_uint32 len, pp_uint32 pitch)
#endif
{
#if defined(__ppc__) && defined(__GNUC__) && !defined(__macos__)
asm volatile("nop\n" // align loop start to 16 byte boundary
"nop\n" // same
"nop\n" // same
"li r9,0\n"
"1:\n"
"stw r4,0(r3)\n"
"addi r5,r5,-1\n"
"add r3,r3,r6\n"
"cmpw cr7,r5,r9\n"
"bne cr7,1b");
#else
pitch >>= 2;
do
{
*buff = dw;
buff+=(pitch>>2);
buff += pitch;
} while (--len);
#endif
}
1 change: 1 addition & 0 deletions src/tracker/SampleEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3049,6 +3049,7 @@ void SampleEditor::tool_generateHalfSine(const FilterParameters* par)
{
setFloatSampleInWaveform(i, 0);
}

finishUndo();

postFilter();
Expand Down
3 changes: 0 additions & 3 deletions src/tracker/TrackerKeyboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,6 @@ void Tracker::initKeyBindings()
eventKeyDownBindingsMilkyTracker->addBinding('V', KeyModifierCTRL | KeyModifierSHIFT, &Tracker::eventKeyDownBinding_InvokePatternCapture);


eventKeyDownBindingsMilkyTracker->addBinding('V', KeyModifierCTRL | KeyModifierSHIFT, &Tracker::eventKeyDownBinding_InvokePatternCapture);


// Key-down bindings for Fasttracker
// tab stuff
eventKeyDownBindingsFastTracker->addBinding('T', KeyModifierCTRL|KeyModifierSHIFT, &Tracker::eventKeyDownBinding_OpenTab);
Expand Down

0 comments on commit 31ddf9b

Please sign in to comment.