Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Darkstalkers Chronicle: The Chaos Tower
01-06-2014, 09:28 PM (This post was last modified: 01-06-2014 09:43 PM by sum2012.)
Post: #16
RE: Darkstalkers Chronicle The Chaos Tower
Yes I find it
Code:
Task Level0  E[HLE]: hle\scekernelthread.cpp:695 Unable to remove thread 326 from queue 50 - was not there
user_main    N[HLE]: hle\scekernelthread.cpp:1777 Removed thread 326 from ready queue 50 for delete


Attached File(s)
.zip  ppssppdebugm2log.zip (Size: 352.66 KB / Downloads: 155)

I want to be a crash fixer
PM me if you want to me look a game
Find all posts by this user
Quote this message in a reply
01-07-2014, 02:11 AM
Post: #17
RE: Darkstalkers Chronicle The Chaos Tower
So suddenly it's at 50? Hmm. Oh wait.

326=sceKernelCreateThread(name=Task Level0, entry=0885575c, prio=32, stacksize=12288)
sceKernelStartThread(thread=326, argSize=0, argPtr=00000000)
Unable to remove thread 326 from queue 50 - was not there <-- I thought this was wrong but it isn't, 0x32 = 50.

...

sceKernelChangeThreadPriority(326, 63) <-- at this point it should be 63 no matter what.
Unable to remove thread 326 from queue 63 - was not there <-- okay, good

...

Unable to remove thread 326 from queue 63 - was not there <-- okay, still fine
sceKernelTerminateThread(326)
Unable to remove thread 326 from queue 50 - was not there <-- what this means is that initPriority was 50
Kernel: Bad object handle 326 (00000146)
ACK ACK ACK ACK Invalid thread id 326 on thread queue <-- so then, where is it on the queue?

I'm guessing it must somehow have managed to get back onto the queue somewhere, but not sure how?

This calls for more drastic changes. Change __KernelNextThread() to:

Code:
Thread *__KernelNextThread() {
    SceUID bestThread;
    u32 popped_prio;

    // If the current thread is running, it's a valid candidate.
    Thread *cur = __GetCurrentThread();
    if (cur && cur->isRunning())
    {
        bestThread = threadReadyQueue.pop_first_better(cur->nt.currentPriority, popped_prio);
        if (bestThread != 0)
            __KernelChangeReadyState(cur, currentThread, true);
    }
    else
        bestThread = threadReadyQueue.pop_first(popped_prio);

    // Assume threadReadyQueue has not become corrupt.
    if (bestThread != 0) {
        u32 errorIgnored;
        Thread *t = kernelObjects.Get<Thread>(bestThread, errorIgnored);
        if (t == NULL && bestThread != 0) {
            NOTICE_LOG(HLE, "ACK ACK ACK ACK Invalid thread id %d on thread queue at %d", bestThread, popped_prio);
            // popped_prio is the interesting thing here.
            DebugBreak();
            // Try, try again?
            t = __KernelNextThread();
        }
        if (t == NULL) {
            NOTICE_LOG(HLE, "ACK ACK ACK ACK Thread queue empty");
            DebugBreak();
            // Just brute force it, hopefully...
            return kernelObjects.Get<Thread>(threadIdleID[0], errorIgnored);
        }
        return t;
    } else {
        return 0;
    }
}

And then, change these:

Code:
inline SceUID pop_first()
        {
                Queue *cur = first;
                while (cur != invalid())
                {
                        if (cur->end - cur->first > 0)
                                return cur->data[cur->first++];
                        cur = cur->next;
                }

                _dbg_assert_msg_(SCEKERNEL, false, "ThreadQueueList should not be empty.");
                return 0;
        }

        inline SceUID pop_first_better(u32 priority)
        {
                Queue *cur = first;
                Queue *stop = &queues[priority];
                while (cur < stop)
                {
                        if (cur->end - cur->first > 0)
                                return cur->data[cur->first++];
                        cur = cur->next;
                }

                return 0;
        }

To:

Code:
inline SceUID pop_first(u32 &popped_priority)
        {
                for (int i = 0; i < NUM_QUEUES; ++i)
                {
                        if (queues[i].data == NULL)
                                continue;

                        Queue *cur = &queues[i];
                        popped_priority = i;
                        if (cur->end - cur->first > 0)
                                return cur->data[cur->first++];
                }

                _dbg_assert_msg_(SCEKERNEL, false, "ThreadQueueList should not be empty.");
                return 0;
        }

        inline SceUID pop_first_better(u32 priority, u32 &popped_priority)
        {
                return pop_first(popped_priority);
        }

This should identify which queue priority level the thread id came from (it'll be slower but won't matter much on desktop.)

If it's 50 or 63, then I guess somehow it's being added back to the queue somewhere after being terminated? If it's something else... then gotta figure out when it's added to that level.

-[Unknown]
Find all posts by this user
Quote this message in a reply
01-07-2014, 11:45 AM
Post: #18
RE: Darkstalkers Chronicle The Chaos Tower
@Unknown
Your change make black screen (even release build)

Fast test of my saved build
good
v0.9.5-47-g52eb46c

bad
v0.9.5-81-g86514ec

I want to be a crash fixer
PM me if you want to me look a game
Find all posts by this user
Quote this message in a reply
01-07-2014, 01:01 PM (This post was last modified: 01-07-2014 01:03 PM by sum2012.)
Post: #19
RE: Darkstalkers Chronicle The Chaos Tower
@Unknown
   
Do
ABI_CallFunction(negSin ? (void *)&SinCosNegSin : (void *)&SinCos, fpr.V(sreg));
change to
ABI_CallFunction(negSin ? (void *)&SinCosNegSin : (void *)&SinCos);
is correct compile fix for win32 build ?

I want to be a crash fixer
PM me if you want to me look a game
Find all posts by this user
Quote this message in a reply
01-07-2014, 02:49 PM
Post: #20
RE: Darkstalkers Chronicle The Chaos Tower
Should be, ABI_CallFunctionA.

But what does it say in the log? It should still say e.g.:

ACK ACK ACK ACK Invalid thread id 326 on thread queue

But with which priority level, which is what I'm after. Or does it not say that anymore?

-[Unknown]
Find all posts by this user
Quote this message in a reply
01-07-2014, 04:54 PM (This post was last modified: 01-07-2014 05:13 PM by sum2012.)
Post: #21
RE: Darkstalkers Chronicle The Chaos Tower
git bisect result
   
this commit https://github.com/hrydgard/ppsspp/commi...eb6b9f8373

I just test it to revent the commit in current master.And NEED turn off fast memory to fix it.

1 more quesion:You said "This calls for more drastic changes. Change __KernelNextThread() to:"
Do you mean change from "Thread *__KernelNextThread() {" ?

I think it still need correct fix.
Code:
08:05:971 Task Level4  W[MM]: MemmapFunctions.cpp:131 WriteToHardware: Invalid address 00000014
08:05:971 Task Level4  W[MM]: MemmapFunctions.cpp:131 WriteToHardware: Invalid address 00000018


Attached File(s)
.txt  ppssppm5log.txt (Size: 29.27 KB / Downloads: 135)
.zip  ppssppm5debuglog.zip (Size: 311.37 KB / Downloads: 115)

I want to be a crash fixer
PM me if you want to me look a game
Find all posts by this user
Quote this message in a reply
01-08-2014, 12:50 AM
Post: #22
RE: Darkstalkers Chronicle The Chaos Tower
Yes, I meant that gunc.

-[Unknown]
Find all posts by this user
Quote this message in a reply
01-08-2014, 12:10 PM (This post was last modified: 01-08-2014 12:21 PM by sum2012.)
Post: #23
RE: Darkstalkers Chronicle The Chaos Tower
I decide to run the code 1 day.Hope not black screen

I want to be a crash fixer
PM me if you want to me look a game
Find all posts by this user
Quote this message in a reply
01-09-2014, 11:49 AM
Post: #24
RE: Darkstalkers Chronicle The Chaos Tower
@unknown ,I hope you can find out your change why black screen (from this debug log)


Attached File(s)
.zip  ppssppm6debuglog.zip (Size: 123.87 KB / Downloads: 159)

I want to be a crash fixer
PM me if you want to me look a game
Find all posts by this user
Quote this message in a reply
01-10-2014, 05:01 AM
Post: #25
RE: Darkstalkers Chronicle The Chaos Tower
Aha. I found it, I'm stupid.

-[Unknown]
Find all posts by this user
Quote this message in a reply
01-10-2014, 01:02 PM
Post: #26
RE: Darkstalkers Chronicle The Chaos Tower
Thanks unknown ,now the game do not crash
Can you see why it is "Missing menu options" ?


Attached File(s) Thumbnail(s)
       

.txt  ppssppinfolog.txt (Size: 31.72 KB / Downloads: 130)
.zip  ppssppdebuglogv0.9.6-389.txt.zip (Size: 693.29 KB / Downloads: 159)

I want to be a crash fixer
PM me if you want to me look a game
Find all posts by this user
Quote this message in a reply
01-18-2014, 08:29 PM
Post: #27
RE: Darkstalkers Chronicle The Chaos Tower
Just enable Read Framebuffers to Memory(either CPU or GPU) and you should see the missing elements. Note that this can lower the speed of the game(especially the music), and you'll still experience odd things happening in the background occasionally, while characters can block the pause menu. Would the game's status be considered playable at this point, or would that have to wait until setting Read Framebuffers to Memory is no longer required?

OS: Windows 8.1
Video chipset: AMD Radeon HD 8400
Processor: AMD A6 5200 2.0Ghz quad core.
Find all posts by this user
Quote this message in a reply
02-24-2014, 10:23 PM
Post: #28
RE: Darkstalkers Chronicle The Chaos Tower
I'd say it's definitely not playable just yet,it takes like 30 seconds just for one punch to finish plus it's either have background and no characters or have characters and no background but at least it's getting farther.Hopefully with a few more updates it will be more playable then now.
Find all posts by this user
Quote this message in a reply
04-05-2014, 11:25 AM
Post: #29
RE: Darkstalkers Chronicle The Chaos Tower
on 0.9.7.2-233-gfc65068,by enabling the framebuffers to gpu,the game is perfectly playable,with background,characters and all.i played some reounds in arcade mode and spent some time in training mode,and no issues or slowdown whatsoever
Find all posts by this user
Quote this message in a reply
04-05-2014, 03:47 PM
Post: #30
RE: Darkstalkers Chronicle The Chaos Tower
Moved Smile

♦ Intel Core i7-6700HQ | 16 GB RAM | NVIDIA GeForce GTX 960M | Debian Testing
♦ Intel Core i7-2630QM | 4 GB RAM | NVIDIA GeForce GT 540M | Debian Testing
♦ PSP-3004 | 6.60 PRO-C2
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: