Login  •  Register


The time is now: Thu Nov 22, 2018 11:26 am

Emaculation wiki  •  Delete all board cookies



Post new topic  Reply to topic Page 1 of 1 [ 7 posts ]
Print view Previous topic  |  Next topic
Author Message
 Post subject: My fork of Basilisk II
PostPosted: Mon Apr 16, 2018 1:37 am 
Offline
Apple Corer
User avatar

Joined: Fri Aug 27, 2010 1:02 am
Posts: 217
https://github.com/uyjulian/macemu
Check out the "core_cleanup" branch.

I personally want to do the following:
1. remove all support code for other platforms for BasiliskII except macOS/SDL (already done)
2. convert BasiliskII build system to CMake, like Hatari and Previous are doing (already done)
3. Backport CPU from old BasiliskII (this will reduce the amount of differences when porting a new CPU core) (already done)
4. Port JIT from ARAnyM (partially done; currently hangs.)
5. Modularize the Toolbox traps, so that it's easy for anybody to accelerate Toolbox functions with just a trap number and a function definition.

I'll clean up and send #4 and #5 in a PR after those are finished. #1, #2, and #3 are just to get familiar with the source code.

Also, check out my Basilisk II FLTK GUI. viewtopic.php?f=6&t=9467

These are "far off" ideas:
Port Dolphin JIT to SheepShaver
AOT compiler with LLVM
UAE emulation when 68k code is executed in Sheepshaver
Boot from folder in shared directory instead of disk image
Toolbox windows managed by WindowServer/Wayland/X compositor


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Mon Apr 16, 2018 4:30 am 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2275
Location: Emaculation.com
Thanks, Julia! That's a lot of progress already!


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Mon Apr 23, 2018 3:05 am 
Offline
Apple Corer
User avatar

Joined: Fri Aug 27, 2010 1:02 am
Posts: 217
Okay, I decided to put latest BasiliskII uae_core back in, but I used the ARAnyM JIT compiler.
ARM JIT still needs some work to be done.

Oh, and as a bonus, JIT compiler works again on the latest macOS and compilers! pagezero_size was changed to 0x2000; JIT compilers don't work on 64-bit macOS if pagezero_size isn't set properly. Also, the CPUID function was replaced with the one from ARAnyM, which allows the CPUID check to work again.

Also, if you are attempting to compile it yourself, you can just use CMake. Be sure you set CMAKE_BUILD_TYPE to Release to optimize the executable. Also, LTO will just result in an abort trap for some reason.

Also, the "sleep when idle"/"idlewait" functions will result in the Toolbox hanging since no events are processed randomly. Be sure to turn it off/uncheck the option.

Also, if it hangs while you are trying to launch, just do
Code:
killall -KILL BasiliskII
and try again. It takes a few tries.

Here's a benchmark from the 1 March 2014 build for reference:
Image

Initial try with 8192 Translation Cache Size:
Image
Now, processor speed is slow... but look at the disk scores!

Second try with 16384 Translation Cache Size:
Image
The processor speed comes back... but disk scores are lower than even the 1 March 2014 build...
I'm going to mess with it more next week.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Jun 07, 2018 4:20 am 
Offline
Apple Corer
User avatar

Joined: Fri Aug 27, 2010 1:02 am
Posts: 217
Temporary test build 2018-06-06, including fltkbasiliskgui: https://transfer.sh/jg3ZQ/BasiliskII-test1.zip

Source code repository has also been updated. Disable "idlewait" or "Don't use CPU when idle" or events, such as mouse click/keyboard type will stop working randomly.

If my build hangs immediately while you are trying to run it, kill it with
Code:
killall -KILL BasiliskII
then try running it again. It takes a few tries.

Now for some benchmarks:
Image


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Mon Jun 11, 2018 10:34 am 
Offline
Mac Mechanic
User avatar

Joined: Mon Sep 15, 2014 7:59 pm
Posts: 156
Boy, I missed you thread completely! Great work!


Quote:
1. remove all support code for other platforms for BasiliskII except macOS/SDL (already done)
2. convert BasiliskII build system to CMake, like Hatari and Previous are doing (already done)


Why? You want to pissed off Power PC Mac and Linux folks?

Quote:
3. Backport CPU from old BasiliskII (this will reduce the amount of differences when porting a new CPU core) (already done)


Why are you doing this? Can you give me more technical background on this?

Quote:
4. Port JIT from ARAnyM (partially done; currently hangs.)


Very interesting project. What is your motivation? Can you point to me more details so that I can take a quick look?

Quote:
5. Modularize the Toolbox traps, so that it's easy for anybody to accelerate Toolbox functions with just a trap number and a function definition.


Nice work. But what toolbox function is a deal breaker in emulated OS that need acceleration? TBH, in my dated Intel i7 2600k box I have zero performance problem at all in all apps I'm running. Even I can't use JIT.

So far there are some compatible issues that is hard to figure it out why in emulator. That's why I improved the run time debugger last year. Because it crashed in some application. It is a real show stopper to me.

Glad that you make some serious coding work. Please keep us posted!

_________________
There is an App for that!
https://github.com/rickyzhang82


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Jun 12, 2018 5:23 am 
Offline
Apple Corer
User avatar

Joined: Fri Aug 27, 2010 1:02 am
Posts: 217
rickyzhang wrote:
Boy, I missed you thread completely! Great work!


Quote:
1. remove all support code for other platforms for BasiliskII except macOS/SDL (already done)
2. convert BasiliskII build system to CMake, like Hatari and Previous are doing (already done)


Why? You want to pissed off Power PC Mac and Linux folks?


I'm planning on also looking at support for E-UAE PowerPC JIT compiler.

rickyzhang wrote:
Quote:
3. Backport CPU from old BasiliskII (this will reduce the amount of differences when porting a new CPU core) (already done)


Why are you doing this? Can you give me more technical background on this?


Most of the work on this point has been undone. It didn't work very well.
rickyzhang wrote:
Quote:
4. Port JIT from ARAnyM (partially done; currently hangs.)


Very interesting project. What is your motivation? Can you point to me more details so that I can take a quick look?


Make JIT work on 64-bit x86, ARM, and on newer compilers. Look here for source code -> https://github.com/uyjulian/macemu on core_cleanup branch
rickyzhang wrote:
Quote:
5. Modularize the Toolbox traps, so that it's easy for anybody to accelerate Toolbox functions with just a trap number and a function definition.


Nice work. But what toolbox function is a deal breaker in emulated OS that need acceleration? TBH, in my dated Intel i7 2600k box I have zero performance problem at all in all apps I'm running. Even I can't use JIT.


QuickDraw mainly. It would be nice to GPU-accelerate it. I also want to get rid of or work around nested EmulOp calls and JIT, since it causes problems with the "idlewait" function of BasiliskII.
rickyzhang wrote:
So far there are some compatible issues that is hard to figure it out why in emulator. That's why I improved the run time debugger last year. Because it crashed in some application. It is a real show stopper to me.

Glad that you make some serious coding work. Please keep us posted!


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Jun 12, 2018 12:29 pm 
Offline
Mac Mechanic
User avatar

Joined: Mon Sep 15, 2014 7:59 pm
Posts: 156
To accelerate quick draw, I think SDL 2 is an answer not the alternative emulator nor improve JIT.

The pixel from guest OS is written to frame buffer in host OS directly. It is host OS (thus SDL) determine how to plot in host OS screen. It doesn't seem to relate to JIT.

_________________
There is an App for that!
https://github.com/rickyzhang82


Top
 Profile  
Reply with quote Post a reply  
Display posts from previous:  Sort by  
Post new topic  Reply to topic Page 1 of 1 [ 7 posts ]


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
 

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group