Closed dirkwhoffmann closed 1 year ago
Great! …so it could be added the 68882 with 68020 ✌🏻
Hi,
Excellent news, thanks!
Cheers
It is using one of these net yet implemented 020 features?
I don't know yet. Which DM2 version did you use (please don't upload the game, just the exact filename)? Does it boot from floppy disk? I'm asking, because I found a version that needs to be installed on HD.
I'm using the hdf version which I found here: https://www.planetemu.net/rom/commodore-amiga-hardfiles-hdf/dungeon-master-ii-1994-interplay-aga
I tried it and it actually works ...
but it does flood the console with thousands of log output ... seems as if every cpu instruction is logged ...
execBitFieldEa(137,5,4,e9eb)
(Index):876 execExtb(155,0,4,49c3)
(Index):876 execBitFieldEa(137,5,4,e9eb)
(Index):876 execExtb(155,0,4,49c3)
(Index):876 execBitFieldEa(137,5,4,e9eb)
(Index):876 execExtb(155,0,4,49c3)
2(Index):876 execBitFieldEa(137,5,4,e9eb)
4(Index):876 execBitFieldEa(137,5,4,e9e8)
...
thats why it seems to freeze
the line which is responsible for that logging is here I guess https://github.com/dirkwhoffmann/vAmiga/blob/7de0d51f0fa1860c367b352004a9fbe1f100cd00/Emulator/CPU/Moira/MoiraExec_cpp.h#L12
BTW: nice side effect of 68020 support is, that now also kickstart meant for A1200 is usable (which contains probably 68020 instructions)
the line which is responsible for that logging is here I guess
Yes. This is a debug statement which gets active if a 68020-only instruction is executed. It's only meant to be used during debugging.
Yeah! I had the console still on, I switched it off and now it is working fine! So it seems that this 020 emulation is quite complete and reliable after all? I think the main item is the bitfields instructions?
It also seems that The Settlers detects the processor type but doesn't use extra instructions, otherwise it would have lagged as well when I tried?
When I wrote that it worked fine... I hadn't switched the sound on. Now I have done it, and it is pretty sluggish. I guess that the system is still slowed on with this logging even though I turned the console off!?
if you turn debugging console off reduces maybe the slow down a bit, but that extensive logging will still happen in background so, maybe I better will comment that printf statment out ...
@dirkwhoffmann what is the proper way to remove the logging ? maybe some config setting e.g. in MoiraConfig.h?
I guess that the system is still slowed on with this logging even though I turned the console off!?
Yes, the logging statement has to be removed. It's a performance killer.
It also seems that The Settlers detects the processor type but doesn't use extra instructions
True. I think it simply uses the CPU modes as an estimate for overall system performance
@dirkwhoffmann what is the proper way to remove the logging ? maybe some config setting e.g. in MoiraConfig.h?
Change the code to
// if constexpr ((cpu) == M68020) { printf("%s(%d,%d,%d,%x)\n", __func__, I, M, S, opcode); }
#define AVAILABILITY(cpu) \
if constexpr (WILL_EXECUTE) willExecute(__func__, I, M, S, opcode); \
assert(C >= (cpu)); \
if constexpr (C == M68020) cp = 0;
I understand that the only differences between the 020 and 030 are not in the instruction set but in the MMU which is not useful in emulation, and data cache + burst mode which probably add nothing much in performance either in emulation, so could it be possible to have a 030 setting that would be identical to the 020 emulation save for the identification bits? So that Settlers can have map size to 8...
Roots 2.0 by Sanity is another good test case for 020 without AGA (requires ECS).
Roots 2.0 by Sanity is another good test case for 020 without AGA (requires ECS).
Excellent stuff, thanks! Seems to work quite well. Except that after the credits the screen goes black and you only have the music... Is it normal? Or maybe the start of the AGA part?
Brief update:
SIMPLE
test suite now.Next steps:
Fixed in v2.2b1
Recently, I had another look at the Musashi core and noticed that supporting the 68010 and 68020 isn't as difficult as I originally thought. As a starting point, I've decided to add a 68010 and 68020 mode to Moira that tries to replicate Musashi to 100%. This worked quite well and I'm already able to run Sysinfo in vAmiga:
As already stated, this is only a starting point. A lot of stuff is missing (the 68020 deals with all kinds of different stack frames, has multiple trace modes etc.). All these features are not emulated yet.