From: Christian B. <cb...@st...> - 2000-09-04 17:02:54
|
Hi! On Sun, Sep 03, 2000 at 01:26:06PM +0200, Gwenole Beauchesne wrote: > (a) In order to mmap() correctly the address space in VideoInit(), I > would like to know what is the current ROMBaseMac. This is currently not > possible since VideoInit() is executed before Init680x0(). I think the complete part in uae_cpu/basilisk_glue.cpp, lines 59..82 (#if REAL_ADDRESSING .. #endif) could be moved into main.cpp/InitAll(), after the call to CheckROM() has been made. > (b) In order to get a chance to mmap() the address space as > above-mentioned, MacRAM would not get allocated before VideoInit() is > executed. This is harder. I placed VideoInit() at the latest possible point in the initialization order because it may switch to a screen mode where it's no longer possible to put up dialog boxes for error messages from modules that are initialized earlier. > (d) Due to the different frame layout that could be used, I implemented > video handling on SIGSEGV (see below). Drawback: DGA mode will be slower > since a temp frame buffer will have to be used too. But the whole point of DGA mode is to avoid a temporary frame buffer... > i.e. the hack is: > void Screen_fault_handler(int, struct sigcontext scs) > { > uint32 faultive_address = scs.cr2; I'm using a similar method to access the CPU registers in the native NetBSD/m68k version. Unfortunately, NetBSD doesn't seem to support siginfo_t. > TC flush will occur when: > - Code is created and executed from Execute68k(), Execute68kTrap() > - FlushCodeCache() is called > - A-Traps: FlushCodeCacheRange, FlushInstructionCache > - BlockMove() Why is this not simply done every time a MOVEC *,CACR or CPUSH is executed to clear the emulated 680x0's caches? > 4. I don't want to break the CVS tree ;-) > I don't really have a "port" so I don't know what I can change in fact. If you are convinced that it will still work on non-x86 machines and other operating systems (including NetBSD/m68k, where it runs without CPU emulation), you can check it in. > Actually, I never used CVS There's a nice tutorial at http://www-classic.be.com/aboutbe/benewsletter/volume_III/Issue40.html#Insight > Should I make it the default one when an i386 cpu is detected ? If it's an improvement, then yes. Bye, Christian -- / Coding on PowerPC and proud of it \/ http://www.uni-mainz.de/~bauec002/ |