Related code is in winlink.cpp. There's something like a total of 15 lines of inline assembly in that file which I highly doubt you'll have to touch for this.michael flatley wrote:This isn't a bug, it's a design issue. I'm not an asm programmer nor will I ever be. There's little need to program in assembly these days.
Zsnes uses 50 % of CPU for nothing
Moderator: ZSNES Mods
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
Just wanted to show this image from the latest wip feb 2 2005.
http://home.pacific.net.au/~renaissance ... _usage.png.
Zsnes running Killer Instinct: ~15% of the cpu.
Zsnes in the Gui: ~0-2% of the cpu.
Damn good imo.
Astxist
http://home.pacific.net.au/~renaissance ... _usage.png.
Zsnes running Killer Instinct: ~15% of the cpu.
Zsnes in the Gui: ~0-2% of the cpu.
Damn good imo.
Astxist
did you put any thought into that post, or were you just so itching to flame michael that badly? zsnes shouldn't be emulating anything when minimized. it just has to hold state. and it just sits there in the gui. tell us why that should use anything other than minimal cpugrinvader wrote:... You think that when you minimize a program to the taskbar it doesn't use any CPU to do its stuff ?
Nice little metaphor: You're in front of your best friend. You turn around. Do you think your friend stopped breathing just because you can't SEE him breathing ?
Ok, the nice is over now. HAND.
There are still many reasons to write code in assembly these days. Especially if you have some critical code that must run as fast as possible. And even if you never write a shred of assembly in your life, not knowing even a little is just pure ignorance. Any programmer should be aware of what is going on inside the computer. But unfortunatly most places these days just teach programming like this:michael flatley wrote:I'm not an asm programmer nor will I ever be. There's little need to program in assembly these days.
Ok we are goint to teach you printf
printf("Hello World"); prints Hello World on the screen. roflmao@#$@#$%$ it works so we don't need to know anything else#$@
How do arguments get passed to my functions? it just magically happens#@$#@$ an so on. It is a very sad state with all these new people entering the trade and when you put them in front of a real debugger they have nfi.
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
You think that's bad? I see people doing stuff like this:pagefault wrote: printf("Hello World"); prints Hello World on the screen. roflmao@#$@#$%$ it works so we don't need to know anything else#$@
char blah[255];
gets(blah);
printf(blah);
The danger of using gets asside for the moment, these people don't know to do printf("%s", blah);, they think it's the same thing. Input a string with a % and watch the program get stack smashed to hell.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
-
- ZSNES Shake Shake Prinny
- Posts: 5632
- Joined: Wed Jul 28, 2004 4:15 pm
- Location: PAL50, dood !
I did this on a daily basis to play ToP/SO music before getting the SPCs.stale wrote:why anyone would want it to be running while minimized is beyond me. I don't think that's what the original poster was talking about, besides
皆黙って俺について来い!!
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Code: Select all
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
-
- Rookie
- Posts: 42
- Joined: Wed Aug 18, 2004 10:15 pm
I'm glad the issue is settled. I hadn't tested the latest WIP to see what my CPU usage was at.
pagefault, there may be a few opportunities for asm but it's a dangerous practice. ZSNES is living proof that asm is a bad idea all the way around. The gui should be the easiest freaking thing to modify and all I ever hear from the developers is "good feature but the gui is impossible to modify". Unless you are the lead programmer for the next big 3D engine you should be worrying about the readability and understandability of your code as opposed to a few cycles (I won't even go into the arguments on how C can be faster than asm...).
I do agree that teaching asm (and machine code as well) is a good practice that leads to more efficient object oriented code.
pagefault, there may be a few opportunities for asm but it's a dangerous practice. ZSNES is living proof that asm is a bad idea all the way around. The gui should be the easiest freaking thing to modify and all I ever hear from the developers is "good feature but the gui is impossible to modify". Unless you are the lead programmer for the next big 3D engine you should be worrying about the readability and understandability of your code as opposed to a few cycles (I won't even go into the arguments on how C can be faster than asm...).
I do agree that teaching asm (and machine code as well) is a good practice that leads to more efficient object oriented code.
Follow up to my other post. I was running the UD Agent, it was using the cpu. Here's another two screens without the UD Agent running, for you non-believers
.
http://home.pacific.net.au/~renaissance ... e_idle.png.
http://home.pacific.net.au/~renaissance ... unning.png.
Iirc pagefault fixed this, thanks pagefault.
Astxist

http://home.pacific.net.au/~renaissance ... e_idle.png.
http://home.pacific.net.au/~renaissance ... unning.png.
Iirc pagefault fixed this, thanks pagefault.
Astxist
-
- Dark Wind
- Posts: 1271
- Joined: Thu Jul 29, 2004 8:58 pm
- Location: Texas
- Contact:
Is that pagefault's fault? No. You want to complain about that, talk to zsKnight and/or _Demo_.michael flatley wrote:pagefault, there may be a few opportunities for asm but it's a dangerous practice. ZSNES is living proof that asm is a bad idea all the way around. The gui should be the easiest freaking thing to modify and all I ever hear from the developers is "good feature but the gui is impossible to modify".
[u][url=http://bash.org/?577451]#577451[/url][/u]
-
- Locksmith of Hyrule
- Posts: 3634
- Joined: Sun Aug 08, 2004 7:49 am
- Location: 255.255.255.255
- Contact:
No offence NN, but you'd have more luck trying to find _Demo_ than zsKnight.
<Nach> so why don't the two of you get your own room and leave us alone with this stupidity of yours?
NSRT here.
NSRT here.
-
- Locksmith of Hyrule
- Posts: 3634
- Joined: Sun Aug 08, 2004 7:49 am
- Location: 255.255.255.255
- Contact:
Ahh. Then I either need a nice nap, or my sarcasm detection meter needs a new battery,
<Nach> so why don't the two of you get your own room and leave us alone with this stupidity of yours?
NSRT here.
NSRT here.