yea, its nicer for some games i think, but perhaps not so important for others.. its a personal choice i think as to which you prefer
![]()
|
|
|
|
Would you like to get all the new info from
PSX-Scene in your email each day?
Want to learn more about the team keeping you up to date with the latest scene news?
Read about them now! Check out our Developer bios, too! | ||
|
|
yea, its nicer for some games i think, but perhaps not so important for others.. its a personal choice i think as to which you prefer
![]()
It took a while but I finally got Snes9x working on a real PS2 so I could do the sound. It promptly crashed on the first few runs, then I found out it was an alignment issue with the fast lsb read/write macros, which works with the x86 instructions PCSX2 uses but not on an actual MIPS cpu.
Then I discovered the video wasn't working properly and I kept doing various fixes to the video code and was thinking Snes9x's tile rendering might have more alignment issues before I discovered I hadn't done any dmac initializing which meant none of my drawing code was being timed right. PCSX2 just emulated the dmatags in the order they were being sent. I did discover two other optimization tweaks in the APU code, which I enabled, and got another small speed increase.
I made so many mods to the video code that I have to go back and refix it. I've got a profile of the code as well. A lot of the overhead seems to be in the tile rendering code, over 12% of the time is spent on a single function. Almost 16% is spent on two functions in tile rendering. The rest of the functions actually only take a fraction of the time with the SPC_DSP code seeming to take the majority of the time.
Code:Each sample counts as 0.001 seconds. % cumulative self self total time seconds seconds calls s/call s/call name 12.58 1.48 1.48 115 0.01 0.01 DrawBackdrop16Add_Normal1x1(unsigned int, unsigned int, unsigned int) 3.28 4.48 0.39 115 0.00 0.00 DrawBackdrop16_Normal1x1(unsigned int, unsigned int, unsigned int)
Thanks ragnarok2040, this is coming together very nice....
DJ
500 INSTALLS DONEOh wow. Well, at least you were able to get it to work, which is obviously very nice. Keep up the great work. Hopefully you won't run into any more big setbacks, if for no other reason because I imagine that it's very...cumbersome when you run into complications like that.
WOW! Nice achievements, Ragnarok2040!
I'm glad you are "up and running", working on snes9x for PS2
Just out of curiosity, what tool do you use for the code profiling?
Keep up the great job!
Is it any working version for scph 10k jap v.0? I've try it but didn't work. Just black screen when i hit the snes9x.elf.
Thanks,, I've gotten the video code fixed. The vsync handler is working fine but snes9x is desynced from the vsync rate until I can add the timer. Working on the sound, right now, then I need to add proper timing.
Not yet, smicbng. I'm not up-to-date on what's neccessary to making a version that is both v0 and later compatible. But I can compile a separate binary for V0 users pretty easily using the non-X versions of the modules and libraries.
Thanks bootsector. I just use gprof, but getting the 'gmon.out' is a bit tricky without a walkthrough.
For profiling:
- Compile with -pg in the EE_CFLAGS/EE_CXXFLAGS, and link with -pg in EE_LDFLAGS, which enables profiling support. The profiling code uses TIMER0, and the time functions in ps2sdk use TIMER1, so if you're using either one, you'll need to temporarily disable it.
- Then you modify your program to call exit(0) to exit which triggers 'host:gmon.out' to be written. The docs say exit(2) but I think any exit code works with ps2sdk. Returning from main is supposed to work as well, but I've had trouble with it.
- Then run your program via ps2link, but without rebooting the IOP, otherwise you'll lose the connection. The profiling code has a bit of overhead so your program will run slower.
- Then you just call 'gprof program.elf > profile' to get a profile written out by gprof. A symbol called 'done' is part of the profiling code, and tends to appear near the top.
The man page for gprof shows some nice commands, like getting gprof to suggest an optimized linking order, and other things, but I haven't gotten that to work correctly, just yet.
Thanks for the profiling setup explanation, ragnarok2040. It makes complete sense to me!
Keep up the great work!
See ya!
bootsector
| « Previous Thread | Next Thread » |