WHDLoad MantisBT - Cult_PublicAttack
View Issue Details
0003722Cult_PublicAttack[All Projects] Generalpublic2017-09-04 22:542018-10-12 12:43
ReporterWepl 
Assigned ToStingRay 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
MachineA4000
CPU68060 + PPC
CPUSpeed60
ChipSetAGA
GFXCardCyberVision 64/3D
ChipMem2 MB
FastMem144 MB
WorkbenchOS 3.9
KickROM40 - Kick 3.1
KickSoftSelfmade
WHDLoad18.4beta
importedyes
Summary0003722: demo hangs after the cult logo, no quit key or other keys works, nocache/snoop
DescriptionGameVersion: download link
SlaveVersion: only one

demo hangs after the cult logo, no quit key or other keys works, nocache/snoop doesn't help, sound plays sample endless
TagsNo tags attached.
Attached Files? PublicAttack_Ack.slave (1,416) 2017-09-11 13:31
http://mantis.whdload.de/file_download.php?file_id=565&type=bug
? PublicAttack_Int.slave (1,424) 2017-09-11 13:32
http://mantis.whdload.de/file_download.php?file_id=566&type=bug
? PublicAttackNoPart1.slave (1,428) 2017-09-12 23:35
http://mantis.whdload.de/file_download.php?file_id=567&type=bug
? PublicAttackNoLev6.slave (1,424) 2017-09-13 15:27
http://mantis.whdload.de/file_download.php?file_id=568&type=bug
? PublicAttackRelStack.slave (1,436) 2017-09-13 21:08
http://mantis.whdload.de/file_download.php?file_id=569&type=bug
? PublicAttack_RelStack2.slave (1,436) 2017-09-14 07:32
http://mantis.whdload.de/file_download.php?file_id=570&type=bug
? PublicAttack_SPBase.slave (1,428) 2017-09-15 15:05
http://mantis.whdload.de/file_download.php?file_id=571&type=bug

Notes
(0005736)
StingRay   
2017-09-11 13:31   
I have no possibility to test right now but I guess this is an interrupt related problem. Try the 2 attached slaves, do they still have the same problem?
(0005741)
Wepl   
2017-09-12 21:31   
Tested both Slaves. No difference, hangs after Cult logo.
Maybe you can change the code so that keyboard interrupt still works to allow a dump?
(0005744)
StingRay   
2017-09-12 23:05   
Level 2/keyboard interrupt is enabled all the time. There must be something seriously wrong somewhere. I'll see if I can find the reason.
(0005745)
StingRay   
2017-09-12 23:35   
I have attached a slave which skips the logo part (demo waits for raster line 311 in that part which could be possible reason for freezing), does the rest of the demo work?
(0005746)
Wepl   
2017-09-13 01:04   
It works until the sine scroller, where it hangs the same way. Plasma effect before is working.
(0005749)
StingRay   
2017-09-13 15:06   
OK, so the raster line wait is not the problem as it's the same in all of these parts. I'll have to dig deeper as this is really strange. My bet is still on interrupt/timing problem though.
(0005750)
StingRay   
2017-09-13 15:27   
Attached is another slave with disabled NoisePacker replayer which in turn means: no level 6 interrupts. Does the problem still occur?
(0005751)
Wepl   
2017-09-13 20:03   
It's the same with this Slave.
If there is a problem with stack (double bus fault), it would maybe help to increase BaseMem and set the SP to the end of BaseMem?
(0005752)
StingRay   
2017-09-13 20:57   
I can try that (currently stack is set to low mem) but I doubt it fixes the problem as then the demo shouldn't just freeze but crash completely. Worth checking though.
(0005753)
StingRay   
2017-09-13 21:08   
Slave attached which uses ext. mem for USP and SSP, any difference?
(0005754)
Wepl   
2017-09-14 00:47   
No difference.
I made a dump at the Cult logo, SSP is stiil at $7f8?!
(0005755)
StingRay   
2017-09-14 07:32   
Indeed, I didn't set ExpMem correctly in the slave header, sorry. Has been fixed, USP/SSP are definitely in ExpMem now (I checked), any difference now?
(0005758)
Wepl   
2017-09-14 23:49   
It still freezes.
I don't understand why you have moved the stack to Exp. If due a problem the stack usage increases a lot and causes a double bus fault when it leaves the allowed ram, this will happen in ExpMem the same like on address 0. I suggested to put it at the end of BaseMem. Then it will probably overwrite the own code which may end in fault detectable by WHDLoad.
But maybe it is also a different problem..
(0005759)
StingRay   
2017-09-15 08:37   
End of base mem doesn't work as demo accesses the whole chip mem! Which was the reason that I moved it down to low mem at $1000.w initially. And as I already said, I doubt the stack location is the problem as then then demo should crash instead of freeze. My guess is still interrupt/timing problem.

I'll inspect the code some more, seeing that the plasma part does not freeze there's at least something I can work with.
(0005761)
StingRay   
2017-09-15 15:05   
To rule out the stack pointer as cause of the problem I have attached a new slave which uses stack set to end of BaseMem. I've only adapted the code for the first part so demo will definitely crash in later parts. If it doesn't freeze anymore in the logo part that is.
(0005762)
Wepl   
2017-09-16 11:22   
The new Slave hangs the same way. Sorry.
(0005768)
Psygore   
2017-09-18 16:02   
I assume that the slave runs always in supervisor mode, maybe in user mode (with different location for usp and ssp) could help...just an idea.
(0005967)
StingRay   
2017-12-27 15:13   
I finally got around to trying Psygore's suggestion and what can I say? Thanks Psygore, your hint regarding running the demo in user mode was spot on, it fixed the problem. Thanks. :)
(0005968)
Psygore   
2017-12-28 09:23   
You are welcome StingRay :)

Happy holidays :)

Issue History
2017-09-04 22:54administratorNew Issue
2017-09-04 22:54administratorStatusnew => assigned
2017-09-04 22:54administratorAssigned To => StingRay
2017-09-11 13:31StingRayNote Added: 0005736
2017-09-11 13:31StingRayFile Added: PublicAttack_Ack.slave
2017-09-11 13:32StingRayFile Added: PublicAttack_Int.slave
2017-09-12 21:31WeplNote Added: 0005741
2017-09-12 23:05StingRayNote Added: 0005744
2017-09-12 23:35StingRayFile Added: PublicAttackNoPart1.slave
2017-09-12 23:35StingRayNote Added: 0005745
2017-09-13 01:04WeplNote Added: 0005746
2017-09-13 15:06StingRayNote Added: 0005749
2017-09-13 15:27StingRayFile Added: PublicAttackNoLev6.slave
2017-09-13 15:27StingRayNote Added: 0005750
2017-09-13 20:03WeplNote Added: 0005751
2017-09-13 20:57StingRayNote Added: 0005752
2017-09-13 21:08StingRayFile Added: PublicAttackRelStack.slave
2017-09-13 21:08StingRayNote Added: 0005753
2017-09-14 00:47WeplNote Added: 0005754
2017-09-14 07:32StingRayNote Added: 0005755
2017-09-14 07:32StingRayFile Added: PublicAttack_RelStack2.slave
2017-09-14 23:49WeplNote Added: 0005758
2017-09-15 08:37StingRayNote Added: 0005759
2017-09-15 15:05StingRayFile Added: PublicAttack_SPBase.slave
2017-09-15 15:05StingRayNote Added: 0005761
2017-09-16 11:22WeplNote Added: 0005762
2017-09-18 16:02PsygoreNote Added: 0005768
2017-12-27 15:13StingRayNote Added: 0005967
2017-12-27 15:13StingRayStatusassigned => resolved
2017-12-27 15:13StingRayResolutionopen => fixed
2017-12-28 09:23PsygoreNote Added: 0005968
2018-10-12 12:43StingRayStatusresolved => closed