Sonic and Sega Retro Message Board: CPKREDIR - loading and combining mods for Sonic Generations - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 6 Pages +
  • 1
  • 2
  • 3
  • 4
  • 5
  • Last ►
    Locked
    Locked Forum

CPKREDIR - loading and combining mods for Sonic Generations New version 0.5, now for Sonic Lost World?

#31 User is offline iGamr 

Posted 12 May 2012 - 07:16 PM

  • Posts: 547
  • Joined: 16-April 12
  • Gender:Male

View PostKorama, on 12 May 2012 - 07:06 PM, said:

The DLL, of course. And the txt file, maybe.
But replacing the other files shouldn't do any harm either. Just be aware that overwriting any ini file will naturally reset any settings you might have customized.


I was thinking it was along those lines, but I just figured I'd check. Thanks for the confirmation, though!

(Also, damn... I'm getting close to the 20-post limit. Does anybody know if they generally wait until you hit 20 to decide whether or not you become a full member?)

#32 User is offline Josh 

Posted 13 May 2012 - 02:33 PM

  • TGC Warrior
  • Posts: 1364
  • Joined: 22-January 08
  • Gender:Male
  • Location:USA
  • Wiki edits:1
Could anyone put together a little tutorial on how to customize the music with this tool? I've always been interested in doing that, and I think this'll make it worthwhile.

#33 User is offline Guess Who 

Posted 13 May 2012 - 02:38 PM

  • It's a miracle!
  • Posts: 4258
  • Joined: 22-December 03
  • Gender:Male
  • Location:New Mexico
  • Project:lol
  • Wiki edits:2

View PostJosh, on 13 May 2012 - 02:33 PM, said:

Could anyone put together a little tutorial on how to customize the music with this tool? I've always been interested in doing that, and I think this'll make it worthwhile.


Oh hello there.

#34 User is offline Josh 

Posted 13 May 2012 - 04:02 PM

  • TGC Warrior
  • Posts: 1364
  • Joined: 22-January 08
  • Gender:Male
  • Location:USA
  • Wiki edits:1
Wow, I dunno how I missed that one, haha. Thanks a ton!

#35 User is offline Dario FF 

Posted 16 May 2012 - 01:32 PM

  • Tech Support Hotline
  • Posts: 1056
  • Joined: 03-April 10
  • Gender:Male
  • Location:Mar del Plata, Argentina
  • Project:SonicGLvl
I believe this tool's logging mode has been the cause of many stability issues, since I've disabled it and I got rid of:
- Endless loading when quitting the stages
- Varying performance when playing the same stage again(increased pop-in and loading times)

It's widely known that printing to the console can be a source of lag for repeated operations(even more for a game that streams from the disk constantly), so my question is, is CPKREDIR's process in the same thread? How does the logging work that it could be causing these issues? It could just be luck and I'm drawing false conclusions, but since I've disabled it the game's been running much better for me.

In any case, could you provide the default option in the INI as not-logging if it turns out to be the problem?
This post has been edited by Dario FF: 16 May 2012 - 01:33 PM

#36 User is offline Korama 

Posted 16 May 2012 - 05:10 PM

  • Posts: 272
  • Joined: 18-May 04

View PostDario FF, on 16 May 2012 - 01:32 PM, said:

I believe this tool's logging mode has been the cause of many stability issues, since I've disabled it and I got rid of:
- Endless loading when quitting the stages
- Varying performance when playing the same stage again(increased pop-in and loading times)


Weird, I've never had any of those issues. But my system is fairly fast and very stable.

Quote

It's widely known that printing to the console can be a source of lag for repeated operations(even more for a game that streams from the disk constantly),

Do you have any sources for that? Never heard anything of the sort.
But yeah, if you print a ton of text to the console window, I guess it could slow things down, depending on how fast those console text output functions by Windows are.

Quote

so my question is, is CPKREDIR's process in the same thread? How does the logging work that it could be causing these issues? It could just be luck and I'm drawing false conclusions, but since I've disabled it the game's been running much better for me.

Sonic Generations has a bunch of threads, over a dozen, I think. CPKREDIR gets called by a CRI file loader thread that handles read requests by other threads, which will wait until the requested data has been retrieved.
If you do grab the scrollbar thumb of the console window, or select text in it, then you WILL stall CPKREDIR's thread, which is the mentioned loader thread, and this will of course stall the thread that is waiting for the read request to finish. But if you leave the console window alone, it shouldn't be a problem, or so I thought at least.

Funny thing is, even if you disable logging (LogType=0), CPKREDIR still performs exactly the same steps, that is preparing the logging messages, except for the final write to console or write to file calls. Yeah, I could obviously optimize that (don't waste time on building strings if they aren't output in the end), but I haven't gotten around to it yet. So, if disabling the console actually helps with your issues, then the problem aren't my logging routines but rather the output. Maybe console writes really are too slow. Have you checked if logging to file (LogType=2) has the same issues as the console? That'd be interesting to know. There's also an undocumented LogType=3 setting, which uses the OutputDebugString WinAPI function.

Quote

In any case, could you provide the default option in the INI as not-logging if it turns out to be the problem?

Sure, that was my intention for the "finished" version anyway. But for these early releases, I thought it would be better if people had some immediate feedback whether CPKREDIR was actually running or not, via the console window.

#37 User is offline Dario FF 

Posted 16 May 2012 - 05:37 PM

  • Tech Support Hotline
  • Posts: 1056
  • Joined: 03-April 10
  • Gender:Male
  • Location:Mar del Plata, Argentina
  • Project:SonicGLvl

View PostKorama, on 16 May 2012 - 05:10 PM, said:

Do you have any sources for that? Never heard anything of the sort.
But yeah, if you print a ton of text to the console window, I guess it could slow things down, depending on how fast those console text output functions by Windows are.

Not that I can find instantly, but you can try writing something simple in C to check. I think it's related to how Windows handles the I/O of the console in its own, it just seems to stall your program until it's done updating that console window.

What you describe pretty much sounds like printing to the console is indeed the culprit.
This post has been edited by Dario FF: 16 May 2012 - 05:37 PM

#38 User is offline Yarharhar 

Posted 16 May 2012 - 06:23 PM

  • Posts: 54
  • Joined: 20-November 06
Dario is correct; printing to the windows console is really slow. That's why a lot of console apps offer a 'silent' mode. Windows console IO is simple/easy to work with, but man does it muck up performance.

#39 User is offline Korama 

Posted 16 May 2012 - 06:58 PM

  • Posts: 272
  • Joined: 18-May 04
You're right. I did some research and found a couple of sources that confirm that console output is inherently slow.
Thanks for making me aware of it. I'll disable the console by default in the next release.

#40 User is offline Bareirito 

Posted 16 May 2012 - 10:05 PM

  • Posts: 102
  • Joined: 20-October 08
  • Gender:Male
  • Location:Argentina
  • Project:Sonic - Mystery of the Chaos Emeralds
  • Wiki edits:4
I just don't know if it's related about the situation Dario and Korama mentioned, but I have a problem. I installed this program and installed the Unleashed mod, everything fine (save for some random crashes), but when I restored the original file and start a new save file, the game for some reason crashes after Modern GHZ when loading the main HUB world, not allowing me to continue any further. The worst thing is when I tried with another save file, I do pass through Modern GHZ and the game saves just fine! I tried reinstalling it, deleted the mod, CPKREDIR and I still have this problem, considering it worked fine before. :(

I hope someone gets the solution of this problem.

#41 User is offline Korama 

Posted 17 May 2012 - 02:06 PM

  • Posts: 272
  • Joined: 18-May 04
So you're saying you removed CPKREDIR, completely reinstalled Sonic Generations, but the game crashes after GHZ Act 2 with your old save file?
That's strange. The only thing that I can think of is that maybe your save file got corrupted somehow, but I've never heard of that happening before.

#42 User is offline Bareirito 

Posted 17 May 2012 - 03:49 PM

  • Posts: 102
  • Joined: 20-October 08
  • Gender:Male
  • Location:Argentina
  • Project:Sonic - Mystery of the Chaos Emeralds
  • Wiki edits:4

View PostKorama, on 17 May 2012 - 02:06 PM, said:

So you're saying you removed CPKREDIR, completely reinstalled Sonic Generations, but the game crashes after GHZ Act 2 with your old save file?
That's strange. The only thing that I can think of is that maybe your save file got corrupted somehow, but I've never heard of that happening before.


No. I can get through GHZ 2 with an older save file, in which I beated the game. I wanted to play through the game again, I started a new save, but it crashes after GHZ 2 when loading the HUB. It happens everytime when I start a new save. Nevermind by the way, I can use that '100% complete' save.

#43 User is offline Dude 

Posted 30 May 2012 - 02:31 PM

  • Posts: 3135
  • Joined: 11-September 04
  • Gender:Male
  • Location:Southbridge, MA
  • Project:Random VR/AR trash
  • Wiki edits:43
I just upgraded to 0.31 and it broke compatibility with my mod. I can't figure out what's wrong because I can't read the debug window, it disappears when the program crashes (as well as having video corruption so I can't read it). Whenever I try loading emerald coast, it just crashes with a generic windows error. It's not saving to a logfile halp!

(I'd like to mention that it's loading files from bb2 and bb3 just fine, it's not liking files from bb1)

NVM, I fixed it by disabling console logging.
This post has been edited by Dude: 30 May 2012 - 02:56 PM

#44 User is offline Azu 

Posted 30 May 2012 - 02:39 PM

  • I must be stupid.
  • Posts: 1527
  • Joined: 23-February 08
  • Gender:Male
  • Location:Home
Question, I noticed that in the Unleashed mod, the music isn't packed in a cpk. so, can I leave the ar.* files unpacked?

#45 User is offline Dario FF 

Posted 30 May 2012 - 02:45 PM

  • Tech Support Hotline
  • Posts: 1056
  • Joined: 03-April 10
  • Gender:Male
  • Location:Mar del Plata, Argentina
  • Project:SonicGLvl
The music is packed in a cpk... :v:

  • 6 Pages +
  • 1
  • 2
  • 3
  • 4
  • 5
  • Last ►
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users