E-Maculation
https://www.emaculation.com/forum/

64-bit Version?
https://www.emaculation.com/forum/viewtopic.php?f=6&t=9737
Page 1 of 1

Author:  pheriwinkle [ Tue Jun 12, 2018 12:55 am ]
Post subject:  64-bit Version?

Since it looks like Mac OS X will soon be ending support for 32-bit apps, I was wondering if anyone has the expertise and kindness to make a 64-bit version of Basilisk II?

Author:  uyjulian [ Tue Jun 12, 2018 5:14 am ]
Post subject:  Re: 64-bit Version?

I'm currently working on a 64-bit port.

Author:  emendelson [ Tue Jun 12, 2018 11:22 am ]
Post subject:  Re: 64-bit Version?

David Ludwig also has a 64-bit version, but the Unix folder feature doesn't work. Search the forum for David Ludwig and you'll find it.

Author:  rickyzhang [ Tue Jun 12, 2018 12:25 pm ]
Post subject:  Re: 64-bit Version?

pheriwinkle wrote:
Since it looks like Mac OS X will soon be ending support for 32-bit apps, I was wondering if anyone has the expertise and kindness to make a 64-bit version of Basilisk II?


Kencu makes BII into macport. You can build a 64 bit version in your Mac by yourself with a simple command like
Code:
sudo port install basiliskii

Author:  adespoton [ Tue Jun 12, 2018 6:26 pm ]
Post subject:  Re: 64-bit Version?

rickyzhang wrote:
pheriwinkle wrote:
Since it looks like Mac OS X will soon be ending support for 32-bit apps, I was wondering if anyone has the expertise and kindness to make a 64-bit version of Basilisk II?


Kencu makes BII into macport. You can build a 64 bit version in your Mac by yourself with a simple command like
Code:
sudo port install basiliskii


Is there a homebrew cask for this? I generally avoid macports these days.

Interesting that we've essentially got three forks of 64-bit BII going now. I hope we can merge them all back to the master in the near future.

Author:  rickyzhang [ Tue Jun 12, 2018 7:05 pm ]
Post subject:  Re: 64-bit Version?

This is not a fork. But different packaging. It is a common practice in Linux that you get tons of distributor where all source from the same kernel or package.

If you check macport build file of BII. Nothing special is done there. It just setup basic dependency like GTK and SDLV1.

PS: I love macports because it still support Power PC. That's how I build git in my PowerBook G4.

Author:  emendelson [ Tue Jun 12, 2018 7:10 pm ]
Post subject:  Re: 64-bit Version?

rickyzhang wrote:
Kencu makes BII into macport. You can build a 64 bit version in your Mac by yourself with a simple command like
Code:
sudo port install basiliskii


This page says the architecture is i386, not 64-bit:

https://github.com/macports/macports-po ... i/Portfile

Quote:
platform darwin i386 {
supported_archs i386


Does that really build a 64-bit BasiliskII executable??

Author:  rickyzhang [ Tue Jun 12, 2018 10:07 pm ]
Post subject:  Re: 64-bit Version?

Well, you have keen eyes. I did an install myself. I have never done that before because I always build from source code in development.

It is 32 bit:

Code:
Ricky@imac:~/repo/github/CuraEngine$ sudo port contents basiliskii
Port basiliskii contains:
  /Applications/MacPorts/BasiliskII/BasiliskII.app/Contents/Info.plist
  /Applications/MacPorts/BasiliskII/BasiliskII.app/Contents/MacOS/BasiliskII
  /Applications/MacPorts/BasiliskII/BasiliskII.app/Contents/PkgInfo
  /Applications/MacPorts/BasiliskII/BasiliskII.app/Contents/Resources/BasiliskII.icns
  /Applications/MacPorts/BasiliskII/BasiliskII.app/Contents/Resources/Credits.html
  /Applications/MacPorts/BasiliskII/BasiliskII.app/Contents/Resources/English.lproj/InfoPlist.strings
  /Applications/MacPorts/BasiliskII/BasiliskII.app/Contents/Resources/English.lproj/MainMenu.nib/Collapsed.tiff
  /Applications/MacPorts/BasiliskII/BasiliskII.app/Contents/Resources/English.lproj/MainMenu.nib/Expanded.tiff
  /Applications/MacPorts/BasiliskII/BasiliskII.app/Contents/Resources/English.lproj/MainMenu.nib/classes.nib
  /Applications/MacPorts/BasiliskII/BasiliskII.app/Contents/Resources/English.lproj/MainMenu.nib/info.nib
  /Applications/MacPorts/BasiliskII/BasiliskII.app/Contents/Resources/English.lproj/MainMenu.nib/objects.nib
  /Applications/MacPorts/BasiliskII/BasiliskII.app/Contents/Resources/English.lproj/MainMenu.nib/resetH.tiff
  /Applications/MacPorts/BasiliskII/BasiliskII.app/Contents/Resources/English.lproj/MainMenu.nib/resetN.tiff
  /Applications/MacPorts/BasiliskII/BasiliskII.app/Contents/Resources/English.lproj/MainMenu.nib/shutdownH.tiff
  /Applications/MacPorts/BasiliskII/BasiliskII.app/Contents/Resources/English.lproj/MainMenu.nib/shutdownN.tiff
  /Applications/MacPorts/BasiliskII/BasiliskII.app/Contents/Resources/HowTo.html
  /Applications/MacPorts/BasiliskII/BasiliskII.app/Contents/Resources/README.txt
  /Applications/MacPorts/BasiliskII/BasiliskII.app/Contents/Resources/ToDo.html
  /Applications/MacPorts/BasiliskII/BasiliskII.app/Contents/Resources/Versions.html
  /Applications/MacPorts/BasiliskII/BasiliskII_idiosyncracies.txt
  /opt/local/bin/BasiliskII
  /opt/local/share/BasiliskII/fbdevices
  /opt/local/share/BasiliskII/keycodes
  /opt/local/share/BasiliskII/tunconfig
  /opt/local/share/man/man1/BasiliskII.1.gz

Ricky@imac:~/repo/github/CuraEngine$ file /opt/local/bin/BasiliskII
/opt/local/bin/BasiliskII: Mach-O executable i386


Let me shoot an email to kencu to change this. There is no reason to use 32bit at all. Because I build BII in 64 bit all the time.

Thanks for finding this!

Author:  rickyzhang [ Tue Jun 12, 2018 10:13 pm ]
Post subject:  Re: 64-bit Version?

A ticket is filed :https://trac.macports.org/ticket/56656#ticket

I believe Kencu the maintainer of macport will come up a solution very quick.

Author:  rickyzhang [ Tue Jun 12, 2018 10:30 pm ]
Post subject:  Re: 64-bit Version?

If you get SDL and GTK from macport, you can follow the build instruction in https://github.com/cebix/macemu/wiki/Basilisk-II-Compilation-Guide:

Code:
...
g++ -o BasiliskII     obj/main.o obj/prefs.o obj/prefs_items.o obj/sys_unix.o obj/rom_patches.o obj/slot_rom.o obj/rsrc_patches.o obj/emul_op.o obj/macos_util.o obj/xpram.o obj/xpram_unix.o obj/timer.o obj/timer_unix.o obj/adb.o obj/serial.o obj/ether.o obj/sony.o obj/disk.o obj/cdrom.o obj/scsi.o obj/video.o obj/audio.o obj/extfs.o obj/disk_sparsebundle.o obj/tinyxml2.o obj/user_strings.o obj/user_strings_unix.o obj/sshpty.o obj/strlcpy.o obj/rpc_unix.o obj/vm_alloc.o obj/sigsegv.o obj/video_blit.o obj/video_sdl.o obj/extfs_macosx.o obj/serial_unix.o obj/ether_unix.o obj/scsi_dummy.o obj/audio_sdl.o obj/prefs_editor_gtk.o obj/mon.o obj/mon_6502.o obj/mon_z80.o obj/mon_cmd.o obj/mon_disass.o obj/mon_ppc.o obj/mon_lowmem.o obj/floatformat.o obj/i386-dis.o obj/m68k-dis.o obj/m68k-opc.o obj/sys_darwin.o obj/main_unix.o obj/prefs_unix.o obj/clip_macosx64.o obj/pict.o obj/utils_macosx.o obj/basilisk_glue.o obj/memory.o obj/newcpu.o obj/readcpu.o obj/fpu_ieee.o obj/cpustbl.o obj/cpudefs.o obj/cpuemu1.o obj/cpuemu2.o obj/cpuemu3.o obj/cpuemu4.o obj/cpuemu5.o obj/cpuemu6.o obj/cpuemu7.o obj/cpuemu8.o obj/bootp.o obj/ip_output.o obj/tcp_input.o obj/cksum.o obj/mbuf.o obj/tcp_output.o obj/debug.o obj/misc.o obj/tcp_subr.o obj/if.o obj/sbuf.o obj/tcp_timer.o obj/ip_icmp.o obj/slirp.o obj/tftp.o obj/ip_input.o obj/socket.o obj/udp.o -lm -lreadline -lncurses  -L/opt/local/lib -lSDLmain -Wl,-framework,AppKit -lSDL -Wl,-framework,Cocoa -lstdc++ -framework AppKit -framework Carbon -framework IOKit -framework CoreFoundation -L/opt/local/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -lgio-2.0 -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lXfixes -lX11 -lXext -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lfribidi -lglib-2.0 -lintl -Wl,-framework -Wl,CoreFoundation -lfontconfig -lfreetype
/usr/bin/true BasiliskII

Ricky@imac:~/repo/github/macemu/BasiliskII/src/Unix$ file BasiliskII
BasiliskII: Mach-O 64-bit executable x86_64

Author:  emendelson [ Wed Jun 13, 2018 2:30 am ]
Post subject:  Re: 64-bit Version?

rickyzhang, is there any chance you would be willing to share your 64-bit build (if it is a static build that can be used on other systems)?

Author:  kencu [ Wed Jun 13, 2018 3:43 am ]
Post subject:  Re: 64-bit Version?

Hello, all. The MacPorts build Portfile is very malleable. The reason I prefer MacPorts over homebrew and Fink is the power of the TCL language for building things. You can easily do almost anything in TCL.

There are downsides to the 64bit build of BasiliskII -- no networking, no JIT -- and when I last dove into it deeply, there were also serious screen glitches in the full-screen use of basiliskii (I usually use it full screen). These occurred in the Menu Bar region of the screen.

FYI, you can very easily modify the Portfile to your liking, and modify the build as you wish! IMHO this is much easier than building outside MacPorts, or building with Xcode.

First of all, a command like

bbedit `port file basiliskii-devel`

will bring up the Portfile for editing. If you comment out the line with the "supported_archs" in it, then you will be able to build it with the native arch, which is almost always x86_64 these days. You can build it "fat binary" as well.

You can very easily try adding or removing configure options or build settings by tweaking the Portfile.

I will put together a "variant" that has 64 bit build features (no JIT, no networking). But honestly, I have to wonder, why? It seems to me to work much more poorly on macOS at present. I can see no advantage in either speed or functionality. So for now, the 32bit build will remain the default on macOS, I think.

One day (two, three, four years from now?) 32bit software will no longer function on macOS. Hopefully by then the slirp networking and JIT will be all 64 bit and we won't even talk about 32bit any longer!

If there is anything else you desire in the basiliskii build on MacPorts, just ask! It's very easily added, or you can do it yourself!

Author:  rickyzhang [ Wed Jun 13, 2018 8:51 am ]
Post subject:  Re: 64-bit Version?

@emendelson, my build didn't link dependency library file as static library. That will require me some serious hacking.

@kencu, you got a rocket speed tech support! You must love macport to contribute this detailed steps. I myself like macports as well. One simple reason is that macport deploy it in /opt/local, instead of /usr/local. That alone help me resolve the conflict between my home build library (which is in /usr/local) and macport.

In any case, I replied you in macport ticket. I don't think we need JIT in beefy modern Intel CPU. But we do need a 64 bit clean slirp. If you are interested in fixing it, we can do it either in your github repo or mine together.

Author:  adespoton [ Wed Jun 13, 2018 4:32 pm ]
Post subject:  Re: 64-bit Version?

kencu wrote:
One day (two, three, four years from now?) 32bit software will no longer function on macOS. Hopefully by then the slirp networking and JIT will be all 64 bit and we won't even talk about 32bit any longer!


According to this year's WWDC, some 32-bit interfaces to system-level functions are going away this fall. 32-bit support for MachO binaries is supposed to be gone fall of 2019.

Of course, this doesn't mean everything will stop working; likely it will just begin with Apple no longer providing build support in XCode, and new APIs will not include 32-bit code. But I'd guess that yes, by three or four years from now, 32-bit x86 code will no longer run natively on OS X. We may need an OS X version of WINE or some sort of a dynarec shim to run 32-bit code under 10.17.

It makes sense to me for the 32-bit to stay the default build under MacPorts until it no longer works, as there's still work being done to get everything functional in 64-bit land.

But I'm not as bleak on this front as I was a year ago; SheepShaver has come a long way and now runs with almost perfect feature parity in 64-bit; this means that we still have the knowledge and skill to make the same changes to BII, if we also have the desire.

Author:  kencu [ Thu Jun 14, 2018 1:12 am ]
Post subject:  Re: 64-bit Version?

OK. There is now a 64bit variant easily available.

Note: the JIT doesn't work. Networking will crash unless "none" is selected in the network interface. And finally, there is still a non-functional menu bar in full screen mode, at least on all my tests. It seems to only work in windowed mode.

Hopefully having the 64bit variant easily available might lead to these things getting fixes!

To install it, do this:

"sudo port -v install basiliskii-devel +SixtyFour"

Good luck!

Author:  pheriwinkle [ Thu Jun 14, 2018 5:23 am ]
Post subject:  Re: 64-bit Version?

Wonderful news!

Author:  kanjitalk755 [ Thu Jun 14, 2018 1:38 pm ]
Post subject:  Re: 64-bit Version?

I have merged jvernet/macemu repo (including DavidLudwig/macemu), and fixed some bugs.

https://github.com/kanjitalk755/macemu/ ... nd_jvernet

features:
    64-bit
    SDL2
    file sharing (HFS+/APFS)
    networking
    no JIT

To build, open BasiliskII/src/MacOSX/BasiliskII.xcodeproj.

Author:  pheriwinkle [ Thu Jun 14, 2018 1:46 pm ]
Post subject:  Re: 64-bit Version?

This is totally awesome to hear. I looked on github and didn't see binaries. Will someone post binaries of a stable, official release? I wouldn't know how to make them myself.
Thanks,
Kevin

Author:  uyjulian [ Thu Jun 14, 2018 1:57 pm ]
Post subject:  Re: 64-bit Version?

To build kanjitalk755's branch, you need to put SDL2.framework (from https://www.libsdl.org/release/SDL2-2.0.8.dmg ) in /Library/Frameworks

Also, after git cloning kanjitalk755's repo + checking out DavidLudwig_and_jvernet branch, you can just change directory to (repo)/BasiliskII/src/MacOSX and run xcodebuild to build. Binaries are output in (repo)/BasiliskII/src/MacOSX/build/Release . If you want to make the output application self contained, make the directory (repo)/BasiliskII/src/MacOSX/build/Release/BasiliskII.app/Contents/Frameworks, then move SDL2.framework in the created directory. You may need to codesign again (if you did that) after moving SDL2.framework.

I hope to get my JIT branch in a mergeable state so that we can have both 64-bit m68k JIT and 64-bit PPC JIT with SDL2 :-)

Author:  rickyzhang [ Thu Jun 14, 2018 5:29 pm ]
Post subject:  Re: 64-bit Version?

XCodebuild, SDL2 and even JIT doesn't really interest me. I'm happy with Makefile, SDL1 and fast enough CPU without JIT.

What really missing is 64bit clean Slipr in Mac OS X. Why nobody cares?

Author:  adespoton [ Thu Jun 14, 2018 5:51 pm ]
Post subject:  Re: 64-bit Version?

If 64-bit clean SLIrP is missing, what exactly is present as far as networking?

Author:  kanjitalk755 [ Fri Jun 15, 2018 6:40 am ]
Post subject:  Re: 64-bit Version?

64-bit clean slirp was imported by https://github.com/jvernet/macemu.

Author:  rickyzhang [ Fri Jun 15, 2018 2:14 pm ]
Post subject:  Re: 64-bit Version?

kanjitalk755 wrote:
64-bit clean slirp was imported by https://github.com/jvernet/macemu.


Well, hacker style commit history. Is he willing to send a PR for 64bit clean slirp?

Author:  rickyzhang [ Fri Jun 15, 2018 2:15 pm ]
Post subject:  Re: 64-bit Version?

adespoton wrote:
If 64-bit clean SLIrP is missing, what exactly is present as far as networking?

None in Mac OS X if you are in 64bit build.

But you can networking in Linux by using sheep_net

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/