@@ -34,17 +34,16 @@ void main()
3434 Desactiva temporalmente cualquier tipo de interrupción (Vertical, Horizontal and External) al
3535 VDP, de esa forma podemos 'toquetearlo' a placer sin que una interrupción pare lo que estamos
3636 haciendo y deje a mitad el trabajo*/
37- SYS_disableInts ();
3837
3938 VDP_loadFont (& font1 ,DMA );
4039
4140 //--------------------------------------
42- JOY_setEventHandler (& inputHandler );
4341
4442 VDP_drawImageEx (BG_B ,& disclaimer ,1 ,20 - 10 ,14 - 6 ,TRUE,TRUE);
45- SYS_enableInts ();
43+
44+ JOY_setEventHandler (& inputHandler );
45+
4646 JOY_waitPressBtnTime (900 );
47- SYS_disableInts ();
4847
4948 XGM_startPlay (M_titulo );
5049
@@ -69,7 +68,6 @@ static void SEGALOGO(){
6968 VDP_setPaletteColors (0 ,palette_black ,16 );
7069
7170 VDP_drawImageEx (BG_B ,& logosega ,1 ,20 - 6 ,14 - 2 ,FALSE,TRUE);
72- SYS_enableInts ();
7371
7472 for (u8 i = 1 ;i < 13 ;i ++ ){
7573 PAL_fadeIn (i ,i ,& paleta16or [i ],3 ,TRUE);
@@ -82,8 +80,7 @@ static void SEGALOGO(){
8280 else VDP_setPalette (PAL0 ,logosega .palette -> data );
8381
8482 PAL_fadeOutAll (20 ,FALSE);
85-
86- SYS_disableInts ();
83+
8784}
8885
8986
@@ -96,15 +93,12 @@ static void SGDKlogo(){
9693 VDP_setPaletteColors (0 ,palette_black ,16 );
9794
9895 VDP_drawImageEx (BG_B ,& sgdklogo ,1 ,20 - 4 ,14 - 4 ,FALSE,TRUE);
99- SYS_enableInts ();
10096 PAL_fadeIn (0 ,15 ,& paleta16or [0 ],10 ,TRUE);
10197
10298 if (BUTTONS [0 ]== 0 )JOY_waitPressBtnTime (750 );
10399 else VDP_setPalette (PAL0 ,sgdklogo .palette -> data );
104100
105101 PAL_fadeOutAll (20 ,FALSE);
106- SYS_disableInts ();
107-
108102}
109103
110104
@@ -119,7 +113,6 @@ static void ALICESIM1(){
119113 VDP_setPaletteColors (0 ,palette_black ,16 );
120114 VDP_drawImageEx (BG_B ,& alicesim1 ,1 ,20 - 11 ,14 - 3 ,FALSE,TRUE);
121115 //Volvemos a activar las interrupciones del VDP
122- SYS_enableInts ();
123116
124117 u8 i ;
125118 for (i = 1 ;i < 16 ;i += 2 ){
@@ -141,7 +134,6 @@ static void ALICESIM1(){
141134
142135 PAL_fadeOutAll (20 ,FALSE);
143136
144- SYS_disableInts ();
145137}
146138
147139static void TITUTLO (){
@@ -196,9 +188,7 @@ static void TITUTLO(){
196188 u8 num_lin ;
197189 for (num_lin = 9 ;num_lin < 120 ;num_lin += 2 ) VDP_setHorizontalScrollLine (BG_A ,num_lin ,vectorB ,2 ,CPU );
198190
199- //Volvemos a activar las interrupciones del VDP
200- SYS_enableInts ();
201-
191+
202192 //FACE IN
203193 /* PAL_fadeIn(from_color, to_color, pal_final, num_frames, asyn)
204194 Esta función realiza un fade-in de la paleta actual a la paleta 'pal_final',
@@ -289,14 +279,15 @@ static void TITUTLO(){
289279 }while (!ok );
290280
291281 PAL_fadeOutAll (120 ,FALSE);
292- XGM_stopPlay ();
293- SYS_disableInts ();
294282
295283 VDP_clearPlane (BG_A ,TRUE);VDP_clearPlane (BG_B ,TRUE);
296284
297285 VDP_setTextPalette (PAL0 );
298286 VDP_setScrollingMode (HSCROLL_PLANE ,VSCROLL_PLANE );//titulo
299287
288+ XGM_stopPlay ();
289+
290+ SYS_doVBlankProcess ();
300291 SYS_doVBlankProcess ();
301292}
302293
0 commit comments