Some improvements for SheepShaver

About SheepShaver, a PPC Mac emulator for Windows, MacOS X, and Linux that can run System 7.5.3 to MacOS 9.0.4.

Moderators: Cat_7, Ronald P. Regensburg, ClockWise

User avatar
UbuntuXP
Tinkerer
Posts: 68
Joined: Sat Feb 08, 2014 8:15 pm

Some improvements for SheepShaver

Post by UbuntuXP »

Hi,

I would like to know the programming language(s) for SheepShaver. I want to add new features and hardware emulation (MMU, integration mode, etc). I just need to know 1. Programming language and 2. PPC coding. We have computer powerful enough to do so, we are missing the people who know how to implement these features.

https://www.icloud.com/photostream/#ABG ... 6689901693

Something like the image above.
"Unix was not designed to stop you from doing stupid things, because that would also stop you from doing clever things."

Doug Gwyn
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Some improvements for SheepShaver

Post by Cat_7 »

Hi,

SheepShaver and Basilisk are written in C.
You can download the source code and communicate with developers at github: https://github.com/cebix/macemu

Best,
Cat_7
User avatar
UbuntuXP
Tinkerer
Posts: 68
Joined: Sat Feb 08, 2014 8:15 pm

Re: Some improvements for SheepShaver

Post by UbuntuXP »

Thanks, I'll learn C when I have the chance. I figure that since right now, no new features are being added, so I was thinking about adding some of those features myself.
"Unix was not designed to stop you from doing stupid things, because that would also stop you from doing clever things."

Doug Gwyn
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Some improvements for SheepShaver

Post by adespoton »

Sounds like you're planning to start off from square one. If you've only ever worked in interpreted languages (.Net, Python, Java, Perl, Ruby, PHP, etc.) then you've got a steep learning curve ahead for learning C. Partially because what you actually need to learn is hardware programming; not just the PPC chipset (and boardset if you're planning to implement the MMU), but also the target architectures. You also have to have a firm grasp of memory management (C doesn't do it for you), proper use of pointers and arrays, etc.

If what you already know is C++ or Objective C, the task will be a bit easier; just go through an "introduction to ANSI C" book and familiarize yourself with the parts of what you already know that are available to you, and the parts that you have to think about a bit differently.

I'd highly suggest attempting some tweaks to existing emulators (debugging some of the MESS Mac code for example) before jumping into a complex emulator like SheepShaver and BII. But once you feel comfortable, start tweaking those to get an understanding for how things work; then feel free to ask questions here, as there are a number of us with (at least some of) the knowledge but not the time to do what you're wanting to do.

You do have the benefit of there now being a few MMU implementations out there (none of them complete) to use as a reference; there's code in MESS Mac, in Shoebill, at least one abandoned project related with QEmu, and a few others.

Personally, I'd like to see a few of the features currently available in VirtualBox come to BII and SheepShaver; the ability to use vbox images and networking first and foremost (if you install VirtualBox, it already sets up the TUN and TAP features needed for many networking modes; this is something these two emulators should be able to take advantage of "pretty easily"). This is relatively easy compared to getting into the guts of the MacOS signal handling and hooking the MMU calls in a stable and predictable manner.
User avatar
UbuntuXP
Tinkerer
Posts: 68
Joined: Sat Feb 08, 2014 8:15 pm

Re: Some improvements for SheepShaver

Post by UbuntuXP »

Thank you for letting me know in advance before I started. And yes, I am starting from square one. I will post any major progress on this post.
"Unix was not designed to stop you from doing stupid things, because that would also stop you from doing clever things."

Doug Gwyn
User avatar
UbuntuXP
Tinkerer
Posts: 68
Joined: Sat Feb 08, 2014 8:15 pm

Re: Some improvements for SheepShaver

Post by UbuntuXP »

Getting ready to set up a build environment in Ubuntu 14.04 x64. If anyone wants to help, just let me know.
"Unix was not designed to stop you from doing stupid things, because that would also stop you from doing clever things."

Doug Gwyn
User avatar
lonestar473
Student Driver
Posts: 21
Joined: Tue Apr 03, 2012 6:08 am

Re: Some improvements for SheepShaver

Post by lonestar473 »

I'm wanting to do something similiar, ie, help improve Basilisk II & Sheepshaver.

I'm pretty much starting from "square one" (or maybe square 1.125) myself. My major experience is in PHP & HTML/CSS, and some (not much.. really) visual basic .net with a little bit of c++ and java from school, and just general tinkering around and all that. I already started (a while back) trying to get some things updated for Windows x64. I am preparing to try again after a hiatus for a while.

You can see the details in this thread: http://www.emaculation.com/forum/viewto ... f=1&t=7537

I need to get a build environment setup as well, as right now I don't have one anymore. (I want to setup a Virtual Machine for this. Portable, and no other cruft to muck things up.)

I like some of the ideas presented in this thread, I had thought about the virtualbox stuff before, but it's beyond my abilities at the moment, I believe. And my first priority was just trying to make the things we have work, even if it's not great. Then try to improve things.

I would also like to, at some point, overhaul the UI entirely on windows, make the config GUI part of the program itself, like how VirtualBox and VMware do it, though that may be a fairly big undertaking.

Right now I'm just trying to find material to read/watch and learn from to figure out some more fundamental things, that I think I'll need to know to get things like networking and CD/DVD support overhauled.

I've also started poking around the dev mailing list archives. I think the idea of starting off with simpler stuff sounds good too. I plan to work on a better prefs GUI for Windows too, something I can definitely do in VB .NET, with my current skills & knowledge.

I'll take any suggestions on what would be good things to work on or look at, too, if something besides what I was looking at would be better to put energy into.
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Some improvements for SheepShaver

Post by adespoton »

lonestar473 wrote:I would also like to, at some point, overhaul the UI entirely on windows, make the config GUI part of the program itself, like how VirtualBox and VMware do it, though that may be a fairly big undertaking.

Right now I'm just trying to find material to read/watch and learn from to figure out some more fundamental things, that I think I'll need to know to get things like networking and CD/DVD support overhauled.
If you're overhauling the UI, learn Qt, as then your UI will be portable across Windows/Linux/BSD/OS X, and everyone will benefit :)

Qt's useful to learn anyway as a cross-platform UI package. The other one that's useful is SDL, although that's a bit lower-level.

CD/DVD support really just depends on one thing: signed drivers. If you have access to a Windows Driver signing key, you can sign the current drivers and they'll work. Otherwise, it'd be easier to add a bit to the UI that creates a disk image of an inserted disk and autoloads that image on boot.
User avatar
UbuntuXP
Tinkerer
Posts: 68
Joined: Sat Feb 08, 2014 8:15 pm

Re: Some improvements for SheepShaver

Post by UbuntuXP »

Development has stalled, you can see why in the link below.

http://www.emaculation.com/forum/viewto ... 130#p48130

EDIT: Development will resume in a few months, because I have other things to take care of first.
Last edited by UbuntuXP on Tue Jun 10, 2014 1:34 am, edited 1 time in total.
"Unix was not designed to stop you from doing stupid things, because that would also stop you from doing clever things."

Doug Gwyn
Jorpho
Master Emulator
Posts: 380
Joined: Fri Sep 17, 2004 4:22 am

Re: Some improvements for SheepShaver

Post by Jorpho »

lonestar473 wrote:I'll take any suggestions on what would be good things to work on or look at, too, if something besides what I was looking at would be better to put energy into.
I think it would be awesome to have a new HFV Explorer with integrated components from The Unarchiver and obliterate all this unpleasantness with Stuffit. (It's a shame that no one's apparently been able to get the HFV Explorer source code from Lauri Pesonen.) In theory, you could use it to get rid of the Finder entirely, but that's probably a bit farfetched.
UbuntuXP wrote:you can see why in the link below.
Yes, development is difficult. If it was easy, everyone would be doing it.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Some improvements for SheepShaver

Post by Cat_7 »

It's a shame that no one's apparently been able to get the HFV Explorer source code from Lauri Pesonen
He doesn't have it anymore. He said he had distributed the code to several people. I contacted one person he mentioned, but that person didn't even know what I was talking about ;-). Same is true for the cdenable.sys source code.

Best,
Cat_7
uyjulian
Apple Corer
Posts: 244
Joined: Fri Aug 27, 2010 1:02 am

Re: Some improvements for SheepShaver

Post by uyjulian »

HFV explorer uses source code for hfsutils: http://www.mars.org/home/rob/proj/hfs/
also fusehfs http://namedfork.net/fusehfs is based on hfsutils.
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Some improvements for SheepShaver

Post by adespoton »

speaking of which, I keep intending to create an osxfuse plugin based on that, as the hfsfuse one is 10.6- only.

What would people prefer -- a fuse plugin that's compatible with osxfuse, or a fsplugin that's compatible with OS X 10.7+ itself (so you can just mount hfs images using Disk Utility again)?

What I'd really prefer is something like this written to be cross-platform. Right now, I tend to use Mini vMac, as it does the best job, even if it requires an actual OS.
uyjulian
Apple Corer
Posts: 244
Joined: Fri Aug 27, 2010 1:02 am

Re: Some improvements for SheepShaver

Post by uyjulian »

I think just relinking to the OSXFuse libs then recompiling would do the trick.
archtop
Inquisitive Elf
Posts: 27
Joined: Mon Sep 16, 2013 9:47 pm

Re: Some improvements for SheepShaver

Post by archtop »

I would love to be able to mount HFS images in Mavericks using Disk Utility.
KingVidiot
Student Driver
Posts: 13
Joined: Sun Aug 05, 2012 1:30 am

Re: Some improvements for SheepShaver

Post by KingVidiot »

Someone please fix the lack of MIDI interfacing in BII or SS if possible.

I know it's been discussed before, but the fact that I can do it in VMWare running WinXP on my Mac but not in a Mac emu on my Mac is painful.
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Some improvements for SheepShaver

Post by adespoton »

Please see my response on the BII thread where you made this comment to see why your comparison is similar to saying "the fact that I can talk to my mother or my friend in English but not to my mother in Swahili is painful."
User avatar
UbuntuXP
Tinkerer
Posts: 68
Joined: Sat Feb 08, 2014 8:15 pm

Re: Some improvements for SheepShaver

Post by UbuntuXP »

I'm thinking about going back to older source code and start there. If you have any objections, please explain why using newer source code will be easier/better.

Here's the problem with newer source code:
1. Builds on Ubuntu 14.04, but won't run with more than 16mb RAM (true for Basilisk II as well).
2. Won't build on OS X Mavericks, fails about basic-dyngen-ops.hpp and Tiger SDK missing, even when I set target build to Mavericks and 64-bit.
"Unix was not designed to stop you from doing stupid things, because that would also stop you from doing clever things."

Doug Gwyn
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Some improvements for SheepShaver

Post by Ronald P. Regensburg »

I doubt that older source code will build SheepShaver on OSX 10.9 Mavericks either. As far as I know, the latest OSX configuration on which SheepShaver can be built from the current source is 10.6.8 (Snow Leopard) with Xcode 3.2.6 installed. That is true for both the Xcode project and the command line and also for 64-bit. The results will run fine in Mavericks, though.

I do not know which "older" source you want to use. Many later improvements, at least for OSX, will not be included.
Last edited by Ronald P. Regensburg on Sun Jun 22, 2014 8:44 am, edited 2 times in total.
Reason:  
uyjulian
Apple Corer
Posts: 244
Joined: Fri Aug 27, 2010 1:02 am

Re: Some improvements for SheepShaver

Post by uyjulian »

Also, the (very old) dyngen code has been there for a while, it is only compatible with gcc. it is not compatible with llvm-gcc/clang.
User avatar
UbuntuXP
Tinkerer
Posts: 68
Joined: Sat Feb 08, 2014 8:15 pm

Re: Some improvements for SheepShaver

Post by UbuntuXP »

I'm beginning to wonder if SheepShaver and Basilisk II needs to be rewritten for newer compilers, since there's trouble compiling both on newer OSes. Maybe once that's done, both will be more stable.
"Unix was not designed to stop you from doing stupid things, because that would also stop you from doing clever things."

Doug Gwyn
uyjulian
Apple Corer
Posts: 244
Joined: Fri Aug 27, 2010 1:02 am

Re: Some improvements for SheepShaver

Post by uyjulian »

There's few trouble compiling Basilisk II.
Sheepshaver on the other hand...
User avatar
UbuntuXP
Tinkerer
Posts: 68
Joined: Sat Feb 08, 2014 8:15 pm

Re: Some improvements for SheepShaver

Post by UbuntuXP »

OK, think I have a barebones MMU made. Next thing to do is compile it on OS X Mavericks.

BTW, code doesn't look like C, but more like C++ or C#.
"Unix was not designed to stop you from doing stupid things, because that would also stop you from doing clever things."

Doug Gwyn
uyjulian
Apple Corer
Posts: 244
Joined: Fri Aug 27, 2010 1:02 am

Re: Some improvements for SheepShaver

Post by uyjulian »

UbuntuXP wrote:OK, think I have a barebones MMU made. Next thing to do is compile it on OS X Mavericks.

BTW, code doesn't look like C, but more like C++ or C#.
Yeah, that's fine, C++/C# style is much easier to read
PeterHolbrook
Apple Corer
Posts: 273
Joined: Fri Oct 26, 2007 7:56 am

Re: Some improvements for SheepShaver

Post by PeterHolbrook »

UbuntuXP wrote:OK, think I have a barebones MMU made. Next thing to do is compile it on OS X Mavericks.

BTW, code doesn't look like C, but more like C++ or C#.
That's great. Seeing OS 9.2 run on it would be really something.
Post Reply