Do you need tutorials ?

SGDK only sub forum

Moderator: Stef

User avatar
Sik
Very interested
Posts: 730
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: Do you need tutorials ?

Post by Sik » Tue Dec 04, 2018 1:47 am

If it ends up inside vblank it means you have lots of free time left so you wouldn't care anyway. But yeah, the method is not perfect (it doesn't play nice with raster effects either), an ideal method would involve a dedicated profiler (either in an emulator or somehow hooked up into real hardware). The HV counter is not perfect either as the V counter may repeat some values during vblank (once ended up with a game advancing too fast in PAL because it saw 224 twice… stopped using HV counter for framerate timing after that)

Note that your last remark is pointless, since slow down is noticeable (period), but the original question was about knowing how much CPU usage was left before slow down would kick in (and for that you need a more-or-less accurate measurement).
Sik is pronounced as "seek", not as "sick".

User avatar
darkjoy2k2
Interested
Posts: 15
Joined: Tue Nov 13, 2018 8:42 pm
Location: Germany
Contact:

Re: Do you need tutorials ?

Post by darkjoy2k2 » Tue Dec 04, 2018 5:51 am

so i think theres no other choice than just moving on
and see when the Genny starts to cry.

For now it works flawless in 50hz and 60hz mode on real hardware.

Anyway the checks are just made when really necessary,
for example:

Which tile are we? its a 94, 94 has a diagonal so lets check that.

an exclude of a certain area could really save some more time by partitioning, if you say MULS are bad...

0?
?1

Player approaching tile from Northwest...
0 is surely free to move. 1 is blocked for sure, so onyly if the player enters Areas X8Y0-X16Y8 or X0Y8 - X8Y16 the "evil" checks are needed.

If the partitioning goes down to its last bit, i gues the MUL really cound be circumvented, but its hard to believe that 300 lines of code more to execute this checks really sum up less than a one line calculation.

I dont have studies Informatics and so i dont know the inner workings of a CPU, least i know is that the old ones dont have "floationg points". For whatever that means... :-D


P.S.:

Mega Drive facts according to https://segaretro.org/Blast_processing#Main_CPU:

Additions 639,000 adds/sec[n 6]
Multiplications 109,000 multiplies/sec
Divisions 54,000 divides/sec (16-bit)[n 12]
“No one in the world gets what they want and that is beautiful.” “You'd be amazed how much research you can get done when you have no life whatsoever.” “I created the OASIS because I never felt at home in the real world."
Ernest Cline

User avatar
Miquel
Very interested
Posts: 360
Joined: Sat Jul 30, 2016 12:33 am

Re: Do you need tutorials ?

Post by Miquel » Wed Dec 05, 2018 12:31 am

mul's and diagonal colliding are two distinct subjects.
Sik wrote:
Tue Dec 04, 2018 1:47 am
since slow down is noticeable (period)
Can you spot when a game drops from a 60 f/s to 59 f/s just a second visually? Wow, you aren't human!

Do you belong to Ganimedes? perhaps Neptune? maybe Triton?... I know... you are from Geminis!

Just kidding! ;)

User avatar
darkjoy2k2
Interested
Posts: 15
Joined: Tue Nov 13, 2018 8:42 pm
Location: Germany
Contact:

Re: Do you need tutorials ?

Post by darkjoy2k2 » Wed Dec 05, 2018 8:08 am

Maybe the benchmark tutorial has some routines to check the load.

How else could it show a result?
“No one in the world gets what they want and that is beautiful.” “You'd be amazed how much research you can get done when you have no life whatsoever.” “I created the OASIS because I never felt at home in the real world."
Ernest Cline

User avatar
Miquel
Very interested
Posts: 360
Joined: Sat Jul 30, 2016 12:33 am

Re: Do you need tutorials ?

Post by Miquel » Thu Dec 06, 2018 5:19 am

Usually ‘noticeable’ refers to the senses in English, something being perceived; that’s at least how I interpret it.

User avatar
darkjoy2k2
Interested
Posts: 15
Joined: Tue Nov 13, 2018 8:42 pm
Location: Germany
Contact:

Re: Do you need tutorials ?

Post by darkjoy2k2 » Thu Dec 06, 2018 3:36 pm

Totally agree...

you surely dont spot the "1 Frame missing".

But you play and you start to feel a kind of stuttering. Not much, but somethings wrong with the flow.

Like experiencing game on PC and looking at PS4/Xbox1 games afterwards :-D
“No one in the world gets what they want and that is beautiful.” “You'd be amazed how much research you can get done when you have no life whatsoever.” “I created the OASIS because I never felt at home in the real world."
Ernest Cline

User avatar
Miquel
Very interested
Posts: 360
Joined: Sat Jul 30, 2016 12:33 am

Re: Do you need tutorials ?

Post by Miquel » Thu Dec 06, 2018 11:36 pm

Owh! really? Then just ask! What’s happening is, I suppose, that I’m so used to those affairs that I take some info as already known. What needs proper explanation?

Anyway, everything I said is true except Sik being from elsewhere, that was just a joke.

We are beginning to develop our own jokes related to other people, and now that you mention it, I recall people looking awkward when we do. For example, when I say “This has less future than a stripper on Neptune”, you don’t follow I presume.

Well the thing is, as far as I know, all intelligent species on Neptune go nude. We believe this is because dressing on water offers no advantages, there is no thermal conservation.

Furthermore, all civs we have found that live in water go naked on their natural habitat. But what makes this joke work is that this planet is only water based so we don’t expect to find dressed people there.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests