• R/O
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

BASIC compiler/interpreter for PIC32MX/MZ-80K (suspended)


Commit MetaInfo

Revision146 (tree)
Time2016-08-01 08:28:40
Authorkmorimatsu

Log Message

Same tempo of MUSIC/SOUND in graphic mode as in text mode.

Change Summary

Incremental Difference

--- mips/branches/zoea/debug.c (revision 145)
+++ mips/branches/zoea/debug.c (revision 146)
@@ -138,10 +138,8 @@
138138
139139
140140 static const char bastext[]=
141-"CLS\r\n"
142-"\r\n"
143-"DATA 100";
144-//"\r\n";
141+"CLS\n"
142+"\n";
145143
146144 /*
147145 Test function for constructing assemblies from C codes.
--- mips/branches/zoea/library.c (revision 145)
+++ mips/branches/zoea/library.c (revision 146)
@@ -520,6 +520,8 @@
520520 // Stop GRAPHIC if used
521521 set_graphmode(0);
522522 g_use_graphic=0;
523+ // Set timer4 for tempo
524+ PR4=59473; // 3632*262/16-1
523525 } else {
524526 // Prepare GRAPHIC area if not used and not allcated.
525527 allocate_graphic_area();
@@ -538,6 +540,8 @@
538540 if (mode !=3 && !g_use_graphic){
539541 set_graphmode(1);
540542 g_use_graphic=1;
543+ // Set timer4 for tempo
544+ PR4=55756; // ~=3405*262/16-1(55755.875)
541545 }
542546 break;
543547 }
--- mips/branches/zoea/music.c (revision 145)
+++ mips/branches/zoea/music.c (revision 146)
@@ -166,8 +166,8 @@
166166 T3CON=0x0050; // Prescaller: 1:32 (1.8 MHz), not yet started
167167
168168 // Timer4 is used to intterupt every 1/60 sec, just after NTSC view.
169- T4CON=0x0050; // Prescaller: 1:32
170- PR4=29736; // 3632*262/32-1
169+ T4CON=0x0040; // Prescaller: 1:16
170+ PR4=59473; // 3632*262/16-1
171171 // Timer 4 interruption, IPL3
172172 IPC4bits.T4IP=3;
173173 IPC4bits.T4IS=0;