aboutsummaryrefslogtreecommitdiff
path: root/Source/System.c
diff options
context:
space:
mode:
authorXaviDCR92 <xavi.dcr@gmail.com>2018-03-26 08:50:33 +0200
committerXaviDCR92 <xavi.dcr@gmail.com>2018-03-26 08:50:33 +0200
commit2c3b747732efd11fd279c27e1092e63e9f761c96 (patch)
tree95ae7e8a21f96c0c9ab0573ac7e1641d03e38d16 /Source/System.c
parent4887461e35b64c697cbabaf0268c77ae68576c5e (diff)
downloadairport-2c3b747732efd11fd279c27e1092e63e9f761c96.tar.gz
* Game can now compile without PSXSDK_DEBUG flag.
* RCNT2 ISR is now disabled as soon as SystemLoadFileIntoBuffer() is called. Hopefully that will avoid problems with real HW.
Diffstat (limited to 'Source/System.c')
-rw-r--r--Source/System.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/System.c b/Source/System.c
index 2a3513a..f6f8f25 100644
--- a/Source/System.c
+++ b/Source/System.c
@@ -139,7 +139,7 @@ static volatile uint16_t u16_0_01seconds_cnt_prev;
* @author: Xavier Del Campo
*
* @brief:
- * Executed on RCnt2 ISR.
+ * Executed on RCnt2 ISR every 100 us.
*
* *******************************************************************/
void ISR_RootCounter2(void)
@@ -149,7 +149,7 @@ void ISR_RootCounter2(void)
if ((int16_t)(u16_0_01seconds_cnt - 1000) >= (int16_t)(u16_0_01seconds_cnt_prev))
{
u16_0_01seconds_cnt_prev = u16_0_01seconds_cnt;
- DEBUG_PRINT_VAR(u16_0_01seconds_cnt_prev);
+ //~ DEBUG_PRINT_VAR(u16_0_01seconds_cnt_prev);
}
}
@@ -267,7 +267,7 @@ void SystemAcknowledgeFrame(void)
* @author: Xavier Del Campo
*
* @brief:
- * Creates a sine-line (more exactly, a parabola-like) effect and
+ * Creates a sine-like (more exactly, a sawtooth-like) effect and
* stores its value into a variable.
*
* @remarks:
@@ -491,6 +491,8 @@ bool SystemLoadFileToBuffer(char* fname, uint8_t* buffer, uint32_t szBuffer)
// Wait for possible previous operation from the GPU before entering this section.
while ( (SystemIsBusy() != false) || (GfxIsGPUBusy() != false) );
+ SystemDisableRCnt2Interrupt();
+
if (fname == NULL)
{
Serial_printf("SystemLoadFile: NULL fname!\n");
@@ -534,7 +536,6 @@ bool SystemLoadFileToBuffer(char* fname, uint8_t* buffer, uint32_t szBuffer)
system_busy = true;
- SystemDisableRCnt2Interrupt();
SystemDisableVBlankInterrupt();
f = fopen(fname, "r");