From 910e8f1af06b0364372cc6252a9d4e203f3c1482 Mon Sep 17 00:00:00 2001 From: wavemotion-dave <75039837+wavemotion-dave@users.noreply.github.com> Date: Fri, 25 Dec 2020 17:03:44 -0500 Subject: [PATCH] Improved START/RESET/PAUSE/Keypad timing. --- A5200DS.nds | Bin 485376 -> 485376 bytes arm9/source/a5200utils.c | 10 ++++++++++ 2 files changed, 10 insertions(+) diff --git a/A5200DS.nds b/A5200DS.nds index 000a59642055dc8efdea88725bf8ee4ed9f37016..ad69c29e47eef8de1789b4446464871cb36cd8a2 100644 GIT binary patch delta 3046 zcmYk84Nz3q6@c%3?5;?lSzu8lsEdNG7WHX2jY%o2uvJ2F1aT6Z+73o+NNX)={F_+a z6=R?X39#ZasM*)l$iEwI*ZfBc<$T%R*HI{cV3G&@vP1^tmcE~rNMDMK z_dQ)HZ%BE$!CWQ#%vH+Ii=@;4i*}{TJe?$@vqAb4Na&M3)A9ozr(4KiiIB;uLUtlg zK`rEG3OPAn$VArT#X=6l{U?Q-S|enmiXQH<_s}<38?b*2T`T?*g+g{iBOHQcs3G3e z*NFj*AYiyacw}7x&g+C6;DD*MLXJQ;)Il@4<_$t>$Qq=PKr*u5MIn$314TksfQcls zk=yaPWo1vAkmXPS!BiouNnp=rAyw=GxvyNv9pxT^ZX#PJPU5P@Fi?3ge=9U#z8EY zUQR;L3SO|n)GE3P1*^FKAkG7;$sT&xTn=sy%7qKq>R=jM2(0MJ7Yli930;C*2<8xQ zDR&P>0*y!wT|SK4NgO$f+ymQSjQw?xxQxW}xc@p9HF>l?7YC~BNB#udAV}sORpcYb z@Ec*>2;+;W225~&A@>dr7-!h7Ws|I%4k627`YE~ud!RFggpA+V$Ff*^_&2bCps)>$ zE67HMnAU4>78;?}kl60i0Yh53%aII*4P0=ZN3{m5OuC9Ro`PiLD1I6of@UxhaNut| z1=nmsn%(>hHsqz4`|?sOOTC`{?E$^t5zt-E4*gQU@jj}G_E?9)HNnl1Wa~-&q8JKa z;`eWn%Y{ginig*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+ShO?ZT%Kyz6@;bsVymd&iT1 zfZyJ*lnv)iY#6g+sqUHJC&%^O^TIs(vqM%_LCESh??mmpqY+MTz<(B>SKM)F3;wiC z-{ISbuPXnfWe{H~t+A3WZ$fv4qq>BnrABLPaGN(#LX5%OUUXktdM|o;&b{cnu8P<~ z>d+)|`u`I^t=np6UY{p6aJMm9p{67A4sff*%ns@|%3;rVfS4DD;*b^7>Lsn6w zHFjd@jp6I%;pi!M@Y8lZZ?PZ0=DHcTlcY-fNU9tg*^H{My6g@K zi3I<1T>nuptzFMe5!n))->xsn3eOE$4&%>J-3X_M(c@fyY> zQ^))2eSS80CaUm_|Eod~Rmhs~uf)G^qB=iGCXWP%J9J~&DSmjIngd$M`omO7i1~)K zz&seUk5?eV9faez@Mq=nD}?bi#_r%}0e$+SYL*Gwt5{k_n#)XO&~`$}*V}E)yX56v z8=2Z>g9=%PZ4vanlDb%i9JRXYy$QQjC#x`>Rg+aXPk&DK&P@E1y^}kc+2M} Wr}TfW?H&8Oo}mIYTH*O&z2$!@mff5H diff --git a/arm9/source/a5200utils.c b/arm9/source/a5200utils.c index bdf3b74..2c17016 100644 --- a/arm9/source/a5200utils.c +++ b/arm9/source/a5200utils.c @@ -804,6 +804,7 @@ ITCM_CODE void dsMainLoop(void) { unsigned int keys_pressed,keys_touch=0, romSel; int iTx,iTy, shiftctrl; bool showFps=false; + int hold_touch = 0; myCart.use_analog = 0; @@ -864,6 +865,11 @@ ITCM_CODE void dsMainLoop(void) { gTotalAtariFrames = 0; } + if (hold_touch > 0) + { + hold_touch--; + continue; + } // Read keys keys_pressed=keysCurrent(); key_consol = CONSOL_NONE; //|= (CONSOL_OPTION | CONSOL_SELECT | CONSOL_START); /* OPTION/START/SELECT key OFF */ @@ -892,14 +898,17 @@ ITCM_CODE void dsMainLoop(void) { else if ((iTx>27) && (iTx<50) && (iTy>111) && (iTy<122)) { // 28,112 -> 49,121 pause soundPlaySample(clickNoQuit_wav, SoundFormat_16Bit, clickNoQuit_wav_size, 22050, 127, 64, false, 0); key_code = AKEY_5200_PAUSE + key_code; + hold_touch = 5; } else if ((iTx>16) && (iTx<39) && (iTy>122) && (iTy<133)) { // 17,123 -> 38,132 reset soundPlaySample(clickNoQuit_wav, SoundFormat_16Bit, clickNoQuit_wav_size, 22050, 127, 64, false, 0); key_code = AKEY_5200_RESET + key_code; + hold_touch = 5; } else if ((iTx>4) && (iTx<27) && (iTy>111) && (iTy<122)) { // 5,112 -> 26,121 start soundPlaySample(clickNoQuit_wav, SoundFormat_16Bit, clickNoQuit_wav_size, 22050, 127, 64, false, 0); key_code = AKEY_5200_START + key_code; + hold_touch = 5; } else if ((iTx>9) && (iTx<44) && (iTy>135) && (iTy<181)) { // 10,136 -> 43,180 numeric pad char padKey[] = {AKEY_5200_1,AKEY_5200_2,AKEY_5200_3,AKEY_5200_4,AKEY_5200_5,AKEY_5200_6,AKEY_5200_7,AKEY_5200_8,AKEY_5200_9,AKEY_5200_ASTERISK,AKEY_5200_0,AKEY_5200_HASH}; @@ -910,6 +919,7 @@ ITCM_CODE void dsMainLoop(void) { } else key_code = padKey[iTx]; + hold_touch = 5; } else if ((iTx>71) && (iTx<183) && (iTy>7) && (iTy<43)) { // 72,8 -> 182,42 cartridge slot irqDisable(IRQ_TIMER2); fifoSendValue32(FIFO_USER_01,(1<<16) | (0) | SOUND_SET_VOLUME);