WHDLoad MantisBT - Frontier |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0004780 | Frontier | [All Projects] General | public | 2020-08-01 09:08 | 2020-08-14 08:41 |
|
Reporter | MuadDib | |
---|
Assigned To | JOTD | |
---|
Priority | normal | Severity | minor | Reproducibility | always |
---|
Status | closed | Resolution | reopened | |
---|
Platform | | OS | | OS Version | |
---|
Product Version | | |
---|
Target Version | | Fixed in Version | | |
---|
Machine | A1200 |
---|
CPU | Apollo |
---|
CPUSpeed | 75 |
---|
ChipSet | AGA |
---|
GFXCard | Other |
---|
ChipMem | 2 MB |
---|
FastMem | 128 MB |
---|
Workbench | OS 3.1.4 |
---|
KickROM | 45 - Kick 3.1.4 |
---|
KickSoft | None |
---|
WHDLoad | 18.5 |
---|
imported | yes |
---|
|
Summary | 0004780: Many people have noticed that the slave turns off the Instruction Cache. This |
---|
Description | GameVersion: english,pal,2 disks
SlaveVersion: 1.0 from 20.05.2000
Many people have noticed that the slave turns off the Instruction Cache. This is not needed. In fact it makes the game run slower than expected. It has an especially serious effect on Vampire boards, because turning off the Instruction Cache triggers "turtle mode", which slows the computer to 68020 speed.
Is it possible to fix the slave, please?
Thanks! |
---|
Tags | No tags attached. |
---|
Relationships | has duplicate | 0004777 | closed | JOTD | For some reason slave version 1.2 (01.11.08) done by JOTD will disable the CPU |
|
Attached Files | Frontier13_beta.zip (10,264) 2020-08-13 15:05 http://www.whdload.de/mantis/file_download.php?file_id=1030&type=bug |
---|
Notes |
|
(0009034)
|
JOTD
|
2020-08-10 23:05
|
|
hi
can you prove that instruction cache is off?
for instance, by running HRTMon in the background and interrupting the game? or with an emulator?
I just checked and instruction & data caches are on.
I've rebuilt both CD32 & floppy version against new versions of kickemu, can you test that? |
|
|
(0009035)
|
JOTD
|
2020-08-11 09:18
|
|
I'm pretty sure that whdload doesn't expect a 68080 and isn't aware of its cache settings. |
|
|
(0009036)
|
JOTD
|
2020-08-11 22:30
|
|
this is a 68080 specific issue |
|
|
|
Sorry about the late response!
I was able to reproduce this using WinUAE and AmigaOS 3.9, both with the original slave and the new slave you attached.
- On a 68030, the CACR register changes from 00002111 to 00002000 when the slave starts. Meaning: The instruction and data caches get *turned off* by WHDLoad. I can see the problem here.
- On a 68040, the CACR register changes from 00008000 to 80008000 when the slave starts. Meaning: The instruction cache remains on, and the data cache gets turned on by WHDLoad. No problem here.
So, this problem is not specific to the 68080. I feel that, if you fix the problem for the 68030, then it will be fixed for the 68080 automatically as well. If you are planning to do this in the duplicate bug (bug #0004777), then it's fine, you can close this current bug. :)
Still, we have not explained what WHDLoad is *exactly* doing on the 68080.
As far as I know, the 68080 introduces itself to the OS as a 68040. And it behaves just like a 68040. If WHDLoad is detecting it as a 68040, then why isn't it working perfectly, like on a normal 68040??
I have a theory, but I don't know if it makes sense:
WHDLoad detects the 68080 as an "unknown CPU". Then it falls back to the default code path for the 68030. So it calls the OS function to disable the ICache and the DCache. (I don't know if such an OS function exists; I am just assuming things.) The OS function knows that it is a 68040 CPU, and so it "correctly" disables the caches on the 68080.
Is this theory plausible? If you fix the bug for the 68030, and if this automatically fixes the problem on the 68080, then maybe this theory is correct. :)
Thanks and best wishes! |
|
|
|
|
|
|
I've found out that the 68080 enables *both* the 68030 bit and the 68040 bit in SysBase->AttnFlags. So if WHDLoad is checking the 68030 bit *before* checking the 68040 bit, it will detect the 68080 as a 68030. This is fine; the 68080 supports all instructions of the 68030. But then, according to my theory, WHDLoad enters the (buggy) code path where it calls CacheControl() to *turn off* the caches. CacheControl() thinks that this is a 68040 CPU, and so it "correctly" disables the caches on the 68080.
So, if you solve this "accidental cache disabling" problem for the 68030, it should automatically be solved for the 68080. :) |
|
|
(0009041)
|
JOTD
|
2020-08-13 15:06
|
|
68040 is also seen as at least a 68030. It's incremental. No bug.
I have updated the attached .zip with latest fixed slaves. Can you test?
|
|
|
|
Thank you, it works perfectly!! We all are very, very appreciative of your work!! Best wishes!!
(I just opened the bug to say that it worked; you can close it again. :)) |
|
|
(0009044)
|
JOTD
|
2020-08-14 08:41
|
|
glad it worked, learned a new thing on whdload |
|