Good day everyone, is there any option in some emulator or any plugin to determine CPU usage when I run a program? I'm really interesting in order to optimize some codes.
Thanks.
Login or register to post comments
Good day everyone, is there any option in some emulator or any plugin to determine CPU usage when I run a program? I'm really interesting in order to optimize some codes.
Thanks.
Tip: take a look at this thread.
Thanks but it seems some kind os ASM routines to inject in your code, maybe? I think about something more external, for example, emulator detecting % of NOP per cycle in order to determine how much CPU is being used for a determined program.
I'm not sure if exists anything like this.
Hmm, not always so easy to detect unless the 'external' source knows what to look for.
For example, CPU could be spinning in a loop, doing some generic stuff.
My script in the thread sd_snatcher pointed to is a TCL script for openMSX. It starts running when a value is output to I/O port 2CH and stops when a value is output to 2DH. This can be done from any language, Assembler, C, Basic, Pascal, etc. If you put those in the right place you can determine the total time it spends idling. You do need to have the ability to modify the source code of course, and know where the wait loop is.
Sadly I don't have source code allways, I'm trying to test 3rd party drivers against self made drivers in order to determine wich works better.
Thanks anyway.
Don't you have an account yet? Become an MSX-friend and register an account!
