Amiga.org
The "Not Quite Amiga but still computer related category" => Amiga Emulation => Topic started by: Failure on August 02, 2004, 02:45:37 AM
-
I discovered that there is a patch to emulate an mmu for UAE 0.8.20. It's linked right from the main page:
http://www.freiburg.linux.de/~uae/bin/patches/mmu/uae-0.8.20.2-mmu.diff.gz
Has anybody ever gotten this to compile? I haven't had any luck with it so far. So far I have only tried on Debian unstable on x86, with a variety of ./configure options.
I'd like to try and use this to create an emulated Amiga running Amix, to speed compiling stuff. Otherwise, I mean, I'll just wait on the 3000 to compile it but...even without JIT, UAE should blow the 3000 away.
-
Well answered my own question. It doesn't like gcc 3.x.x. Compiled fine with 2.95.
Now to see if it will run anything that needs an mmu.
-
Just curious: Ever heard of cross-compiling?
[EDIT]Though it might be tricky to cross-compile for AMIX... :-)[/EDIT]
The MMU emulation must be really slow btw. Could be slower than the real A3000...
-
Yes, I would love to cross-compile so I can run gcc native, but as you said it is "tricky" for Amix ;-)
The MMU emulation seems to be for 040, which makes it useless for Amix but possibly useful for Linux and other stuff that runs on 040. Isn't one of the major differences between 030 and 040 the way that the MMU behaves? This is from memory so I might be dead wrong. Also there are no docs with the MMU patch, I am making a best guess from reading the patch source code.
If I have time today I'm going to tell it to enable the MMU emulation for the 68020 + FPU combo (requires a source code change) and recompile. I doubt it will work but hey, I'm always interested in seeing new and improved ways of crashing a system! Even if it's just emulated.
*edit* argh I keep saying 030 when I mean 020...020 runs Amix too
-
I dimly recall that a major difference between the 68040 and 68030 MMU is that the 68040 can only handle two page sizes (4 and 8 KB), while the 68030 is much more versatile with around eight or ten. The instruction set to handle the MMU is, from what I remember, more or less the same. Someone with better memory and access to Motorola reference manuals can probably explain things a lot better.
-
Well as expected, forcing the 68020 to use the MMU had nifty results:
Building CPU table for configuration: 68020/881
1866 CPU functions
Building CPU function table (3 0 0).
Using 24 bit visual, 32 bits per pixel
Using normal image buffer.
Resetting frame rate hack
M68K: RESET!
MMU: enabled=1 page=0
MMU: invalid root descriptor for f800d2
MMU: table search for logical=00f800d2 FC=1 ri=00 pi=3e pgi=000 page_frame=00f80000 root_ptr=00000000
MMU: root_des_addr = 0 val=00000000
MMU: ptr_des_addr = 0 val=00000000
MMU: page_des_addr = 0 val=00000000
**SNIP!**
BUS ERROR: fc=1 w=0 log=00f800d2 ssw=0501 fslw=01001040
Exception 2!!
**SNIP! Lots of fun crash stuff...**
BUS ERROR: fc=5 w=0 log=00000008 ssw=0505 fslw=01001040
HALT: Double Bus Error means bad news!
Internal error; file newcpu.c, line 749
Aborted
failure@kos-mos:~/uae-0.8.20$
Oh well. This is the system not even coming up, so I can't really go any further from here. Bummer.
-
The instruction set to handle the MMU is, from what I remember, more or less the same.
Unfortunately not so. 68030 and 68040 use different supervisor instructions to access registers, (some) different supervisor registers and the register bit mappings are different, as well as page descriptors.
68030 MMU indeed supports more pagesizes, and in general is more flexible. I guess the MMU design was simplefied for 68040 to gain speed and reduce complexity.
68040 and 68060 MMUs are almost identical, 68060 just adding some more restrictions on cacheability of mmu tables and renaming few cachemodes. MMU exception processing is different on 68060, too.
-
Piru wrote:
Unfortunately not so. 68030 and 68040 use different supervisor instructions to access registers, (some) different supervisor registers and the register bit mappings are different, as well as page descriptors.
Ick. MMUs were never my strong point, I simply didn't understand what they were doing. And when I did, I knew I didn't want to get involved with them too much. Thanks for the info.
-
From going through the patch, the emulated MMU only supports 4K and 8K pages :-/