Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
100 user(s) are online (62 user(s) are browsing Forums)

Members: 0
Guests: 100

more...

Headlines

 
  Register To Post  

(1) 2 3 4 5 »
Debuging NallePuh...
Home away from home
Home away from home


See User information
*** Unhandled op_code 31 (subcode 87), Data page fault at 0x00DFF006, instruction 0x0201D1E0
*** Unhandled op_code 34 (subcode 0), Data page fault at 0x00DFF006, instruction 0x02021E28

Anyone have any ideas, what PPC opcodes this are?

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: Debuging NallePuh...
Just popping in
Just popping in


See User information
@LiveForIt

I don’t know what opcodes they are but the address looks suspiciously like something trying to access the Amiga chipset.

Go to top
Re: Debuging NallePuh...
Just popping in
Just popping in


See User information
@LiveForIt

Looks like the 31/87 could be a lbzx. Byte load with index.

Check this and just search for an 87.
https://www.nxp.com/docs/en/reference-manual/MPC82XINSET.pdf

I got stuck on these with CIAgent as it was missing some PPC codes which I fixed. It was showing up on timer registers which meant that timer emulation was broken because the timer value wasn't being set.

The decoder in NallePUH is quite extensive so surprised it got stuck. Still I checked the codes when I got stuck on it. I wonder if it's the codes Petunia is using that were uncommon back when PUH was ported?

Also PUH has a few obvious faults in the emulation. As soon as it catches a register change it sends it to AHI. It doesn't check what it is or if it had changed. A lot of software and especially module players writes redundant data in audio registers like the same value over and over. As well as invalid values like $FF00 as period which is then fixed a few interrupts later. I imagine all this combined is why it used to crash on me. For one thing sending the same value to an audio driver is expensive and redundant.

Go to top
Re: Debuging NallePuh...
Just popping in
Just popping in


See User information
@Steady

Yes NallePUH emulates Paula audio.

Go to top
Re: Debuging NallePuh...
Home away from home
Home away from home


See User information
@Steady

It’s a 68K program (HippoPlayer), buts its translated into PowerPC instructions by Petunia :-/

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: Debuging NallePuh...
Home away from home
Home away from home


See User information
@Hypex

Yes, I think something changed in Petunia, or maybe it stopped working when Petunia was included, I remember first versions of AmigaOS4.0 did not have JIT.

I wonder, can you tell me what, it is, if dump all the register values?

Yes, remember it kind worked once, so getting back to that is a start, all other problem and issues, has to be analyzed.

Anyhow, it has a half word (16bit) access, any word (32bit) wont make sense, not any byte read or write, real Amiga hardware registers don’t support that.

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: Debuging NallePuh...
Not too shy to talk
Not too shy to talk


See User information
@LiveForIt

Yes, Hippoplayer work on Amigaone (with CIAgent). However, the modules are played at too fast, both on Petunia and on the off JIT.

Go to top
Re: Debuging NallePuh...
Home away from home
Home away from home


See User information
@mufa

but I guess no music, unless you used AHI player in HippoPlayer.

(AHI player works with VBL timing in latest version, so no patching needed)

Well I'm trying to play modes using "Paula".

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: Debuging NallePuh...
Not too shy to talk
Not too shy to talk


See User information
Yes i used AHI Player.

Go to top
Re: Debuging NallePuh...
Home away from home
Home away from home


See User information
@Hypex

OK dumped all Register on 0x201D1E0 instruction.

Data page fault at 0x00DFF006, instruction 0x0201D1E0
Stack Pointer: 0x029717A8
Task: 0x6FF20900
xxxx
r0: 00000000
r1: 029717A8
r2: 25050750
r3: 6FFA0000
r4: 02A87920
r5: 6FFBC000
r6: 6FFA0000
r7: 02A8411C
r8: 60B6886C
r9: 0000B02E
r10: 18084089
r11: 00000001
r12: 0201EF04
r13: 029717EC
r14: 00000018
r15: 00000001
r16: 00000000
r17: 6FFA0004
r18: 00000000
r19: 00000000
r20: 52057050
r21: 60B6886A
r22: 6FFA0020
r23: 00DFF006
r24: 00000003
r25: 00000002
r26: 000000B8
r27: 00DFF000
r28: 6FFAC000
r29: 0000001C
r30: 02946EE0
r31: 30000000

i think it might direct load word.

r0: 00000000 is not set, has not value, maybe different reg used.
r26: 00DFF006 so that one is likely used.

I'm thinking something like:
lhw r0,0(r23)

Maybe I'm wrong..

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: Debuging NallePuh...
Home away from home
Home away from home


See User information
@Hypex


sth? r0, r23, r14 (ea: 0 data: 0)
r0: 000040B8
r1: 029717A8
r2: 25050750
r3: 6FFA0000
r4: 02A87920
r5: 6FFBC000
r6: 6FFA0000
r7: 02A8411C
r8: 60B68868
r9: 0000102E
r10: 000849A3
r11: 00000002
r12: FFFFFFF4
r13: 029717EC
r14: 00000006
r15: 00000001
r16: 00000000
r17: 6FFA0004
r18: 00000000
r19: 00000001
r20: 52057050
r21: 60B68866
r22: 6FFA0020
r23: 00DFF000
r24: 00000003
r25: 02021E18
r26: 0000068C
r27: 00DFF000
r28: 6FFAC000
r29: 0000001C
r30: 02946EE0
r31: 00000000

this one has to be..

sth r0,(r23+r14) ; *(DFF000+000006)=r0

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: Debuging NallePuh...
Just popping in
Just popping in


See User information
@LiveForIt

Petunia can be disabled but not easily. Perhaps a patch could be written that disables any JIT flag in EmulationTags()? IF all emulation goes through it that is.

Can always blacklist it if it's from one program.

I could tell what it is if it listed the instruction. But in general JIT needs to be disabled or it messes up the crash log. Most Petunia crash logs are useless as it flags the BLR (return) instruction after the code.

So it's hitting on $DFF006. Looked it up and that's VHPOSR. It's reading the horizontal beam position. It's likely using this as a timer as module players used it in an interrupt as a micro delay to wait until sound DMA started to set loops.

An issue here is that it will get the same value back. Usually a zero. If it is polling it as in the usual case then it tends to freeze system if inside interrupt. Otherwise it should have just caused CPU to go 100%. Surprised it is crashing. Whatever is crashing.

If it's polling it you will likely need CIAgent (or anything else like NallePUH) as it simulates beam position with a counter. Without it CIA player interrupts take down the system. This is also the result of OS4 emulating a 68K interrupt inside a real PPC interrupt.

BTW, 68K programs could read and write 32 bits to Amiga hardware registers. Such as writing a bitplane pointer. Or reading both VPOSR and VHPOSR at once into a CPU register. Can be 16 or 32 bits in this case, but only for a read.

Go to top
Re: Debuging NallePuh...
Home away from home
Home away from home


See User information
@Hypex

Quote:
Surprised it is crashing. Whatever is crashing.


nope, its just stuck i think.. my keyboard is lucked up, but that can easily to be a bad thing.

1000 of expectations with long text message on the AUX port has tendency to be a bad thing.

I only dumped the registers array, to make it easier to guess.

Quote:
So it's hitting on $DFF006. Looked it up and that's VHPOSR. It's reading the horizontal beam position. It's likely using this as a timer as module players used it in an interrupt as a micro delay to wait until sound DMA started to set loops.


Yep thats what I'm thinking too.

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: Debuging NallePuh...
Home away from home
Home away from home


See User information

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: Debuging NallePuh...
Home away from home
Home away from home


See User information
@LiveForIt

latest changes...

https://github.com/khval/NallePuh/commits/main

There is intuition lockup problem…
Wonder, if it’s possible to find out why intuition is locked up,
what task has locked the screen, or something else, at what program counter value.

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: Debuging NallePuh...
Just popping in
Just popping in


See User information
@LiveForIt

Quote:
found it...


Yes, same as in the NXP PDF. That lbxz. It's a doozie.

I suspect it's in a vertical blank interrupt where the polling of $DFF006 is.

That could easily be added also since it catches other hardware hits. NallePUH was really left in incomplete state. For some reason it's like a lot of OS4 ports that were somewhat inferior to the 68K counterpart as they lack a GUI. I don't know why OS4, which should be superior to OS3, has ports that a lack a GUI.

Go to top
Re: Debuging NallePuh...
Home away from home
Home away from home


See User information
@Hypex

Looks like we have a infinity loop of exceptions here, this way it get stuck..

it does not support $DFF006.

Originally this was made for Amiga1200/4000, so there was chipset, so if you had a unhandled expectation, it made sense to by default poke the hardware, if you had unhandled expectation, I guess.

this is what I guess is causing the loop.


Edited by LiveForIt on 2022/11/6 1:26:52
(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: Debuging NallePuh...
Home away from home
Home away from home


See User information
@LiveForIt

stuck at 0x00DFF096
Think I solved that one.


Edited by LiveForIt on 2022/11/6 11:42:15
(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: Debuging NallePuh...
Just popping in
Just popping in


See User information
@LiveForIt

Yes real hardware had $DFF006 so didn't need to catch it. Then again real hardware has real Paula so the idea didn't really make sense on real thing. Useful for Amithlon.

Should be easy enough to fix. Just add $DFF006 as VHPOSR and $DFF004 as VPOSR could be good idea as well. Just keep a running counter and increase on every read. Really is simple when you know how. I knew about it. Better is knowing what values are masked out so a jumping counter based on masking would reduce hits. It could read it 40 or 80 times in a row.

Add here:
https://github.com/khval/NallePuh/blob/main/PUH.c#L659

Go to top
Re: Debuging NallePuh...
Home away from home
Home away from home


See User information
@Hypex

I have invited you, you should have access now to the repo.

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top

  Register To Post
(1) 2 3 4 5 »

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project