Question about timings

Graphic based area of development (Graphics Processing Unit), including the Geometry Transform Engine (GTE), TIM, STR (MDEC), etc.
Post Reply
jman
Rookie Programmer
Rookie Programmer
Posts: 110
Joined: Aug 13, 2013

Question about timings

Post by jman » November 2nd, 2013, 4:35 am

Hello,

I've put up a basic thing that mimics the behaviour of an arcade "enter your name" type screen (I've borrowed the alphabet ribbon sprite from the 'abetro' demo found around here in the homebrew section).

I've followed the PAL guidelines in the scee_dev.pdf document and this thread but the input is still too fast to feel correct.

Forcing 25fps with Vsync(2) helps but it's not enough. Forcing a sluggish frame rate isn't the solution.

I can't decide whether this is because a) running this thing into an emulator will always too fast, so I should try on hardware or b) lack of others tricks (artificial waiting timers) to be sure the user won't enter letters too fast or the letter scrolling is too fast.

Any suggestions?

ISO file and source code attached for inspection (btw comments on the code are welcome too!).

thanks
You do not have the required permissions to view the files attached to this post.

User avatar
bizarro2011
Serious PSXDEV User
Serious PSXDEV User
Posts: 118
Joined: Mar 27, 2012
Location: Brazil

Post by bizarro2011 » November 2nd, 2013, 10:14 am

try this.

change:
VSync(0)

for:
for (i=1; i<7;i++)
VSync(0);

User avatar
Shendo
Verified
C Programming Expert
C Programming Expert
Posts: 250
Joined: Mar 21, 2012
I am a: Programmer
Motto: Never settle
PlayStation Model: SCPH-7502
Discord: ShendoXT
Location: Croatia, EU

Post by Shendo » November 2nd, 2013, 3:14 pm

The way I do it in my software is by using an int variable which holds a gamepad timeout value.
When user presses a button the variable is set to 10 for example.
If the value is nonzero gamepad input is ignored.

Then you decrement that value each VSync untill it reaches zero. Then your user is free to input data again.

That way you have a stable frame rate (50 or 60 fps) and a controllable input delay.
Dev console: SCPH-7502, FreePSXBoot, CH340 serial cable.

jman
Rookie Programmer
Rookie Programmer
Posts: 110
Joined: Aug 13, 2013

Post by jman » November 2nd, 2013, 6:54 pm

Shendo wrote:The way I do it in my software is by using an int variable which holds a gamepad timeout value.
Ok, that's the correct way as I suspected. I have to control this behaviour programmatically instead of forcing a slower frame rate with longer Vsync() iterations.

thanks

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests