Compiling/Building Sheepshaver/Basilisk II for X86, AND X64?

Anything about Mac emulation that does not belong in the above categories.

Moderators: Cat_7, Ronald P. Regensburg

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

Compiling/Building Sheepshaver/Basilisk II for X86, AND X64?

Post by lonestar473 »

Hi :) [And sorry this is a long post :P ]

So.. firstly, sorry if there have been posts covering this that I missed.
Long time browser(only now and again, though), registered to finally post :P

I tried searching, but that didn't really work. I skimmed
the forums somewhat but didn't really find anything.

As for the searching not working.. it seems like all
the kinds of key words I wanted to use were ignored.
Like: how, to, help, build, 64, Sheepshaver, Basilisk II.

Compile, does work, but because of other ignored words,
it ends up being like just searching "compile", all by itself.

Anyway, I did find through google, a guide on setting up a
build environment for sheepshaver and basilisk II, but
I haven't got everything ready yet to it(I am working on
a development VM, so I can have the same *portable*
work environment on both my desktop and laptop).

Also the build instructions didn't mention anything about
compiling for x64, which thats one of the first things
I wanted to try to do was get cdenable.sys and the
network protocol to build for Windows 7 x64.

I haven't done any programming in a while, so I'm a bit
fuzzy, and I need more experience anyway. I previously
did mostly php with xhtml, bit of css, and some sql;
Though I did take classes for and mess around with
Visual Basic .NET, as well as Visual C++ and Java.

I want to sharpen my mind and programming skills,
and have messed around with Basilisk II and Sheepshaver
a fair bit in the past. Always had little ideas for this and
that. And I thought, what better than to start working
with an open source project, right? :)

No idea what really might come of it. And I have
alot of things I'm sure I'll need to learn. But if
anyone would like to give me some help or
advice, I'd be very appreciative!

I have had several ideas for features, in addition
to the aforementioned try to compile cdenable.sys
and the ethernet protocol for x64. Like having
the ability to mount iso images on the fly, and
having a GUI built in similiar to Virtualbox, VMware,
and Virtual PC, that lets you create multiple profiles,
edit settings, select drives/images/etc to mount.

I even thought it might be interesting to combine
Basilisk II and Sheepshaver under one GUI, so you'd
basically have 68k profiles and PPC profiles. The
Emulators themself would still be separate essentially,
but both would be accessible from one GUI, and maybe
even if possible from one executable?

Something else is the lack of an MMU in Sheepshaver,
one idea there is PearPC has an MMU right? Wonder if
it can be imported into Sheepshaver...?

I might be getting too ambitious with all this, especially
since I'm so fuzzy with my skills at the moment. Well,
I have to start somewhere... I figure first that's
just trying to build it from source right? Of course one
big question in that, is, how to build for Windows 64-bit
in addition to 32-bit?

From the instructions I've found it seems to involve
Cygwin, which I only have a passing knowledge of it;
but not really, any practical knowledge of it.

From my understanding its basically doing for Windows,
what Wine does for Linux; IE it is a Linux/Unix API and
compatibility layer for applications to use for running
within Windows.

No idea how that would affect attempts to compile
targeting x64 platforms.

Is it possible to compile it any other way?

So far this is all I've really found, and I'm going to test it after
my VM for a development environment is completed. Right now
I'm doing a bunch of reading.

Compiling BasiliskII and SheepShaver for various host environments
http://www.emaculation.com/doku.php/com ... r_basilisk

Porting Your Driver to 64-Bit Windows
http://msdn.microsoft.com/en-us/library ... 85%29.aspx

Getting Ready for 64-bit Windows
http://msdn.microsoft.com/en-us/library ... 85%29.aspx

Though I suppose either way, I should first work
on being able to compile it at all for a starting point.

So I guess I need to begin with any information on compiling
or links or tips would be great. Thank you :)

P.S. Hope that you were able to understand my post :P
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Compiling/Building Sheepshaver/Basilisk II for X86, AND

Post by Cat_7 »

Hi, great to see you want to invest in the programs.
Also the build instructions didn't mention anything about
compiling for x64, which thats one of the first things
I wanted to try to do was get cdenable.sys and the
network protocol to build for Windows 7 x64.
There is no source code available for the cdenable.sys driver. I would be preferable to get rid of the dependency on the driver and use Windows native code to access cd's. I have partly disassembled the cdenable.sys driver. That provides a list of Windows functions that are used in the driver. But I don't know whether such low level access to devices can be programmed with Windows native code without creating a driver.

There is source code for the BasiliskII ethernet driver.

There is a project by Tycho that has the source code rearranged so it (almost) builds with the MS Visual C environment. Please at the very bottom of this page
http://www.emaculation.com/doku.php/com ... sk#tidbits

Good luck!
Cat_7
User avatar
lonestar473
Student Driver
Posts: 21
Joined: Tue Apr 03, 2012 6:08 am

Re: Compiling/Building Sheepshaver/Basilisk II for X86, AND

Post by lonestar473 »

Ah! Yes! Thank you, I think I saw that section earlier but didn't quite read it well enough :P

Was more sidetracked reading about Cygwin, though didn't really find much
that would be directly useful to this.. Ah.. I get distracted sometimes and
before I know I've read a bunch about some only loosely related to where I
started at :P

I'll try both(that and the normal method), after some searching, I finally found
how to download the source for basilisk II from there(for visual c).

As for cdenable.sys - its windows specific, so, I wonder what methods are
used on linux/mac os x - seeing as thier both unix based would cygwin provide
any possible solution? Or if we could find similar windows functions. Also
from my research, it seems like.. either its possible, or maybe, if I understood
right, for programs to essentially load its own 'driver' upon execution, that's
more of a temporary thing that's part of the program? Or maybe I just
horribly misinterpreted some stuff. I don't have the links on hand anymore,
I'll have to go back through my history. Though right now I'm tired, so
that will have to wait till later.

Thanks again :)
User avatar
lonestar473
Student Driver
Posts: 21
Joined: Tue Apr 03, 2012 6:08 am

Re: Compiling/Building Sheepshaver/Basilisk II for X86, AND

Post by lonestar473 »

I've been doing a bunch of mucking around in the code, and reading, and trying different things..

I managed to build the exes with mingw

The visual c++ thing wasn't really altered at all as far as I could tell, it looked like it was
the same thing as on the official cvs, though I didn't compare the contents of every file.

I'm not sure I can really get it work in visual c++ without massively moving things around,
and I don't want to mess anything up in such a way that would, well basically make
it a windows fork.. I mean even though right now I'm only planning on doing windows
specific stuff, like trying to get the cd and network driver working on x64 I'd like
to keep it compatible with your current setup.

It may be possible to setup visual studio to use mingw as a compiler, so you can use it for an ide,
but its still going to be a pain because you'll have to maintain the structure and setup in both
a makefile and inside the ide.... unless I'm really misunderstanding some stuff.


Also, for CDENABLE.SYS - You said the source from it is not there? I was curious
and did some looking around, and I'm wondering what the code that is there does?
Though I am pretty sure the old win9x cdenable.vxd code is missing, but I'm wondering
if maybe ntcd contains at least some of the code for the NT *.sys driver..

I've found clues like this that lead me to think this:
Basilisk II tech info-
Basilisk II contains three MacOS drivers that implement floppy, disk and
CD-ROM access ("sony.cpp", "disk.cpp" and "cdrom.cpp"). They rely heavily on
the functionality provided by the "sys_*.cpp" module.
So then I looked here,
Inside sys_windows.cpp
and saw this-

Code: Select all

#include "cd_defs.h"
#include "cdenable/ntcd.h"
#include "cdenable/cache.h"
#include "cdenable/eject_nt.h"
Also from the windows makefile:

Code: Select all

CDENABLESRCS = cdenable/cache.cpp cdenable/eject_nt.cpp cdenable/ntcd.cpp
And ntcd.cpp-

Code: Select all

#include "ntcd.h"
#include "cdenable.h"

static char *sDriverShort   = "cdenable";
static char *sDriverLong  = "System32\\Drivers\\cdenable.sys";
static char *sCompleteName  = "\\\\.\\cdenable";
And ntcd.cpp contains the code that is called by the start_driver function which
is used within sys_windows.cpp:

Code: Select all

	// Initialize CD-ROM driver
	sector_buffer = (char *)VirtualAlloc(NULL, 8192, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
	CdenableSysInstallStart();
Which then leads to ntcd.cpp-

Code: Select all

BOOL CdenableSysInstallStart(void)
{
	return(start_driver());
}
And further on the file...

Code: Select all

static BOOL __cdecl start_driver( void )
{
	SC_HANDLE   schSCManager;
	BOOL ret = FALSE;

	schSCManager = OpenSCManager( NULL, NULL, SC_MANAGER_ALL_ACCESS );
	if(!schSCManager) return(FALSE);
	if(!InstallDriver( schSCManager, sDriverShort, sDriverLong )) {
		CloseServiceHandle( schSCManager );
		return(FALSE);
	}
	ret = StartDriver( schSCManager, sDriverShort );
	if(!ret) {
		(void)RemoveDriver( schSCManager, sDriverShort );
	}
	CloseServiceHandle( schSCManager );
	return( ret );
}
And then I followed it here:

Code: Select all

static BOOL InstallDriver(
  IN SC_HANDLE  SchSCManager,
  IN LPCTSTR    DriverName,
  IN LPCTSTR    ServiceExe
)
{
  SC_HANDLE  schService;
  DWORD      err;

  schService = CreateService (
		SchSCManager,          // SCManager database
    DriverName,            // name of service
    DriverName,            // name to display
    SERVICE_ALL_ACCESS,    // desired access
    SERVICE_KERNEL_DRIVER, // service type
		SERVICE_AUTO_START,		 // SERVICE_DEMAND_START,  // start type
    SERVICE_ERROR_NORMAL,  // error control type
    ServiceExe,            // service's binary
    NULL,                  // no load ordering group
    NULL,                  // no tag identifier
    NULL,                  // no dependencies
    NULL,                  // LocalSystem account
    NULL                   // no password
    );
And that is where it goes over my head.. I don't really know much about drivers right now.

Is schSCManager a windows call..? top search result was:
http://msdn.microsoft.com/en-us/library ... 85%29.aspx
So.. maybe?

---Edit1---
I'm tired, its late, I just realized its probably the service control manager.. which now
makes me thing that function is starting the service for the driver, and I'm guessing
then that means none of the stuff I found before matters.. ugh.. either way I need
to take a break and go to bed, and hopefully have fresh eyes tomorrow
---End Edit1---

I'm going to keep doing research, I downloaded both the Windows SDK and DDK,
so I should be able to build a driver if I can figure out how.

Though like you said, removing the dependency would be better, I'm thinking maybe
we could do something similiar to what some CD burning programs do, they don't seem
to always have to install a driver to get the kind of access they do, maybe they
have something load on the fly, or maybe its just windows commands,
I need to do more reading on this subject still yet.

I'm thinking maybe we could use another library or something, kind of like what was
done with the slirp for the networking(though I much prefer the installable protocol,
it seems more stable, slirp always crashed it in the past for me).

Either way I'm just going to keep messing around till I can do some stuff with it!

Also, know anything about getting GTK to work with MinGW like the build instructions
show for SDL? I noticed some messages about it being missing so some stuff was disabled.
If it only applies to the prefs editor then I'll probably not worry about it, I was thinking
about making one with Visual Basic; unless you know of an IDE that lets you make GUI
apps with GTK at least close to the experience you get with VB. I was also considering
Java for a more portable option.. but.. I'm getting ahead of myself.

Thanks for any input :) --And for continuing to read my long posts :P
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Compiling/Building Sheepshaver/Basilisk II for X86, AND

Post by Cat_7 »

Ah,

Yes, you found that the code only interacts with the actual driver!
I'm assuming the driver was either available (so the windows code could be built around it) or required for some low level stuff about reading cd formats that are not native to windows.
Perhaps all of it was borrowed from some linux project (speculation).

I'll post the file content detailing the windows calls that are exposed in the driver. The calls themselves are still valid, only the driver needs signing on 64 bit windows.

The original developer of HFV explorer already used (created) the sys driver. I have written to several people called Lauri Pesonen but either heard nothing or received a "I am not him" responses.

About VC: The source code was restructured to (almost) build in VC.

Best,
Cat_7
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Compiling/Building Sheepshaver/Basilisk II for X86, AND

Post by Cat_7 »

Imported from ntoskrnl:

Address Ordinal Name Library
------- ------- ---- -------
00010200 IoAllocateMdl ntoskrnl
00010204 IoCreateSymbolicLink ntoskrnl
00010208 IoCreateDevice ntoskrnl
0001020C RtlInitUnicodeString ntoskrnl
00010210 ObfDereferenceObject ntoskrnl
00010214 ExFreePool ntoskrnl
00010218 IoFreeMdl ntoskrnl
0001021C KeWaitForSingleObject ntoskrnl
00010220 IofCallDriver ntoskrnl
00010224 KeGetCurrentThread ntoskrnl
00010228 MmBuildMdlForNonPagedPool ntoskrnl
0001022C IoDeleteDevice ntoskrnl
00010230 ExAllocatePoolWithTag ntoskrnl
00010234 IoAllocateIrp ntoskrnl
00010238 KeInitializeEvent ntoskrnl
0001023C ObReferenceObjectByHandle ntoskrnl
00010240 IoFileObjectType ntoskrnl
00010244 IoFreeIrp ntoskrnl
00010248 KeSetEvent ntoskrnl
0001024C IofCompleteRequest ntoskrnl
00010250 IoDeleteSymbolicLink ntoskrnl
00010254 RtlUnwind ntoskrnl

exported:
DriverEntry(x,x) at address 00010312
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Compiling/Building Sheepshaver/Basilisk II for X86, AND

Post by Cat_7 »

Decompilation of cdenable.sys:

#include <windows.h>
#include <defs.h>


//-------------------------------------------------------------------------
// Data declarations

extern _UNKNOWN _ImageBase; // weak
// extern POBJECT_TYPE *IoFileObjectType;
extern wchar_t _SG6236[17]; // weak
extern wchar_t _SG6240[21]; // weak
extern wchar_t _SG6316[21]; // weak

//-------------------------------------------------------------------------
// Function declarations

#define __thiscall __cdecl // Test compile in C mode

// PMDL __stdcall IoAllocateMdl(PVOID VirtualAddress, ULONG Length, BOOLEAN SecondaryBuffer, BOOLEAN ChargeQuota, PIRP Irp);
// NTSTATUS __stdcall IoCreateSymbolicLink(PUNICODE_STRING SymbolicLinkName, PUNICODE_STRING DeviceName);
// NTSTATUS __stdcall IoCreateDevice(PDRIVER_OBJECT DriverObject, ULONG DeviceExtensionSize, PUNICODE_STRING DeviceName, ULONG DeviceType, ULONG DeviceCharacteristics, BOOLEAN Exclusive, PDEVICE_OBJECT *DeviceObject);
// void __stdcall RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString);
// int __thiscall ObfDereferenceObject(_DWORD); weak
// void __stdcall ExFreePool(PVOID P);
// void __stdcall IoFreeMdl(PMDL Mdl);
// NTSTATUS __stdcall KeWaitForSingleObject(PVOID Object, KWAIT_REASON WaitReason, KPROCESSOR_MODE WaitMode, BOOLEAN Alertable, PLARGE_INTEGER Timeout);
// int __fastcall IofCallDriver(_DWORD, _DWORD); weak
// void __stdcall MmBuildMdlForNonPagedPool(PMDL MemoryDescriptorList);
// void __stdcall IoDeleteDevice(PDEVICE_OBJECT DeviceObject);
// PVOID __stdcall ExAllocatePoolWithTag(POOL_TYPE PoolType, SIZE_T NumberOfBytes, ULONG Tag);
// PIRP __stdcall IoAllocateIrp(CCHAR StackSize, BOOLEAN ChargeQuota);
// void __stdcall KeInitializeEvent(PRKEVENT Event, EVENT_TYPE Type, BOOLEAN State);
// NTSTATUS __stdcall ObReferenceObjectByHandle(HANDLE Handle, ACCESS_MASK DesiredAccess, POBJECT_TYPE ObjectType, KPROCESSOR_MODE AccessMode, PVOID *Object, POBJECT_HANDLE_INFORMATION HandleInformation);
// void __stdcall IoFreeIrp(PIRP Irp);
// LONG __stdcall KeSetEvent(PRKEVENT Event, KPRIORITY Increment, BOOLEAN Wait);
// int __fastcall IofCompleteRequest(_DWORD, _DWORD); weak
// NTSTATUS __stdcall IoDeleteSymbolicLink(PUNICODE_STRING SymbolicLinkName);
NTSTATUS __stdcall DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath);
int __stdcall direct_read(HANDLE Object, int a2, unsigned int a3, void *a4);
int __stdcall CDenableIoCompletion(int, PIRP Irp, int); // idb
int __stdcall cdenableDispatch(int, int); // weak
void __stdcall cdenableUnload(int a1);
// PKTHREAD __stdcall KeGetCurrentThread();
_DWORD __cdecl _global_unwind2(_DWORD); // weak
int __cdecl gu_return(int); // weak
signed int __cdecl _unwind_handler(int a1, int a2, int a3, int a4);
_DWORD __cdecl _local_unwind2(_DWORD, _DWORD); // weak
int _abnormal_termination(void);
// void __usercall ___00009(int a1<eax>, char a2<dh>, int a3<esi>);
// signed int __usercall _except_handler3<eax>(int a1<ebp>);
int __stdcall _seh_longjmp_unwind(int a1);
// int __stdcall RtlUnwind(_DWORD, _DWORD, _DWORD, _DWORD); weak


//----- (00010312) --------------------------------------------------------
NTSTATUS __stdcall DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
{
NTSTATUS v2; // ebx@1
char v4; // [sp+Ch] [bp-64h]@1
wchar_t v5; // [sp+34h] [bp-3Ch]@1
const WCHAR SourceString; // [sp+38h] [bp-38h]@1
wchar_t v7; // [sp+58h] [bp-18h]@1
UNICODE_STRING SymbolicLinkName; // [sp+5Ch] [bp-14h]@2
UNICODE_STRING DestinationString; // [sp+64h] [bp-Ch]@1
PDEVICE_OBJECT DeviceObject; // [sp+6Ch] [bp-4h]@1

memcpy((void *)&SourceString, L"\\Device\\cdenable", 0x20u);
v7 = _SG6236[16];
DeviceObject = 0;
memcpy(&v4, L"\\DosDevices\\cdenable", 0x28u);
v5 = _SG6240[20];
RtlInitUnicodeString(&DestinationString, &SourceString);
v2 = IoCreateDevice(DriverObject, 4u, &DestinationString, 0x8301u, 0, 1u, &DeviceObject);
if ( v2 < 0
|| (RtlInitUnicodeString(&SymbolicLinkName, (PCWSTR)&v4),
v2 = IoCreateSymbolicLink(&SymbolicLinkName, &DestinationString),
DriverObject->MajorFunction[14] = (PDRIVER_DISPATCH)cdenableDispatch,
DriverObject->MajorFunction[2] = (PDRIVER_DISPATCH)cdenableDispatch,
DriverObject->MajorFunction[0] = (PDRIVER_DISPATCH)cdenableDispatch,
DriverObject->DriverUnload = (PDRIVER_UNLOAD)cdenableUnload,
v2 < 0) )
{
if ( DeviceObject )
IoDeleteDevice(DeviceObject);
}
return v2;
}
// 102C4: using guessed type wchar_t $SG6236[17];
// 102E8: using guessed type wchar_t $SG6240[21];
// 10542: using guessed type int __stdcall cdenableDispatch(int, int);

//----- (000103BC) --------------------------------------------------------
int __stdcall direct_read(HANDLE Object, int a2, unsigned int a3, void *a4)
{
int v4; // edi@2
PIRP v5; // esi@2
PVOID v6; // eax@3
int v7; // eax@4
int v8; // ecx@4
struct _KEVENT Event; // [sp+4h] [bp-24h]@2
int v11; // [sp+14h] [bp-14h]@1
int v12; // [sp+1Ch] [bp-Ch]@1
PVOID P; // [sp+20h] [bp-8h]@3
PMDL Mdl; // [sp+24h] [bp-4h]@4

v11 = 0;
v12 = 0;
if ( ObReferenceObjectByHandle(Object, 1u, (POBJECT_TYPE)IoFileObjectType, 0, &Object, 0) >= 0 )
{
v4 = *((_DWORD *)Object + 1);
KeInitializeEvent(&Event, SynchronizationEvent, 0);
v5 = IoAllocateIrp(*(_BYTE *)(v4 + 48), 0);
if ( v5 )
{
v6 = ExAllocatePoolWithTag(0, (SIZE_T)&_ImageBase, 0x43446C70u);
P = v6;
if ( v6 )
{
Mdl = IoAllocateMdl(v6, (ULONG)&_ImageBase, 0, 1u, 0);
MmBuildMdlForNonPagedPool(Mdl);
v5->MdlAddress = Mdl;
v5->UserEvent = &Event;
v5->UserIosb = (PIO_STATUS_BLOCK)&v11;
v5->Tail.Overlay.Thread = (PETHREAD)KeGetCurrentThread();
v5->Tail.Overlay.OriginalFileObject = (PFILE_OBJECT)Object;
v7 = (int)((char *)v5->Tail.Overlay.CurrentStackLocation - 36);
v5->RequestorMode = 0;
v5->Flags = 256;
*(_BYTE *)v7 = 3;
*(_BYTE *)(v7 + 1) = 0;
*(_DWORD *)(v7 + 20) = v4;
*(_DWORD *)(v7 + 24) = Object;
v8 = (int)((char *)v5->Tail.Overlay.CurrentStackLocation - 36);
*(_DWORD *)(v8 + 28) = CDenableIoCompletion;
*(_DWORD *)(v8 + 32) = 0;
*(_BYTE *)(v8 + 3) = -32;
*(_DWORD *)(v7 + 4) = a3;
*(_DWORD *)(v7 + 12) = a2;
*(_DWORD *)(v7 + 16) = 0;
IofCallDriver(v4, v5);
KeWaitForSingleObject(&Event, 0, 0, 1u, 0);
if ( v11 >= 0 )
{
v12 = 1;
memcpy(a4, P, a3);
}
IoFreeMdl(Mdl);
ExFreePool(P);
}
}
ObfDereferenceObject(Object);
}
return v12;
}
// 10210: using guessed type int __thiscall ObfDereferenceObject(_DWORD);
// 10220: using guessed type int __fastcall IofCallDriver(_DWORD, _DWORD);

//----- (00010512) --------------------------------------------------------
signed int __stdcall CDenableIoCompletion(int a1, PIRP Irp, int a3)
{
PIO_STATUS_BLOCK v4; // eax@1

v4 = Irp->UserIosb;
v4->Status = Irp->IoStatus.Status;
v4->Information = Irp->IoStatus.Information;
KeSetEvent(Irp->UserEvent, 0, 0);
IoFreeIrp(Irp);
return -1073741802;
}

//----- (00010542) --------------------------------------------------------
#error "FFFFFFFF: variables would overlap: edx/4 and edx/8 (funcsize=74)"

//----- (00010652) --------------------------------------------------------
void __stdcall cdenableUnload(int a1)
{
const WCHAR SourceString; // [sp+8h] [bp-34h]@1
wchar_t v2; // [sp+30h] [bp-Ch]@1
UNICODE_STRING DestinationString; // [sp+34h] [bp-8h]@1

memcpy((void *)&SourceString, L"\\DosDevices\\cdenable", 0x28u);
v2 = _SG6316[20];
RtlInitUnicodeString(&DestinationString, &SourceString);
IoDeleteSymbolicLink(&DestinationString);
IoDeleteDevice(*(PDEVICE_OBJECT *)(a1 + 4));
}
// 10628: using guessed type wchar_t $SG6316[21];

//----- (0001069C) --------------------------------------------------------
int __cdecl _global_unwind2(int a1)
{
return RtlUnwind(a1, gu_return, 0, 0);
}
// 1069C: using guessed type _DWORD __cdecl _global_unwind2(_DWORD);
// 106B4: using guessed type int __cdecl gu_return(int);
// 1082E: using guessed type int __stdcall RtlUnwind(_DWORD, _DWORD, _DWORD, _DWORD);

//----- (000106BC) --------------------------------------------------------
signed int __cdecl _unwind_handler(int a1, int a2, int a3, int a4)
{
signed int result; // eax@1

result = 1;
if ( *(_DWORD *)(a1 + 4) & 6 )
{
*(_DWORD *)a4 = a2;
result = 3;
}
return result;
}

//----- (000106DE) --------------------------------------------------------
int __cdecl _local_unwind2(int a1, int a2)
{
int result; // eax@1
int v3; // ebx@1
int v4; // esi@1
int v5; // esi@3

while ( 1 )
{
result = a1;
v3 = *(_DWORD *)(a1 + 8);
v4 = *(_DWORD *)(a1 + 12);
if ( v4 == -1 )
break;
if ( v4 == a2 )
break;
v5 = 3 * v4;
*(_DWORD *)(a1 + 12) = *(_DWORD *)(v3 + 4 * v5);
if ( !*(_DWORD *)(v3 + 4 * v5 + 4) )
(*(void (**)(void))(v3 + 4 * v5 + 8))();
}
return result;
}
// 106DE: using guessed type _DWORD __cdecl _local_unwind2(_DWORD, _DWORD);

//----- (00010738) --------------------------------------------------------
int _abnormal_termination(void)
{
int result; // eax@1
int v1; // ecx@1
int v2; // ecx@2

result = 0;
if ( *(signed int (__cdecl **)(int, int, int, int))(v1 + 4) == _unwind_handler )
{
if ( *(_DWORD *)(v2 + 8) == *(_DWORD *)(*(_DWORD *)(v2 + 12) + 12) )
result = 1;
}
return result;
}

//----- (0001075B) --------------------------------------------------------
void __usercall ___00009(int a1<eax>, char a2<dh>, int a3<esi>)
{
__asm { int 3 ; Trap to Debugger }
*(_BYTE *)a3 ^= *(_BYTE *)a1 ^ a2;
JUMPOUT(*(int *)_except_handler3);
}

//----- (00010764) --------------------------------------------------------
signed int __usercall _except_handler3<eax>(int a1<ebp>)
{
int v1; // eax@1
int v2; // ebx@1
int v3; // edi@2
int v4; // esi@2
int v5; // eax@5
int v6; // edi@7
signed int result; // eax@9
int v8; // [sp-8h] [bp-20h]@5

v2 = *(_DWORD *)(a1 + 12);
v1 = *(_DWORD *)(a1 + 8);
if ( *(_DWORD *)(v1 + 4) & 6 )
{
_local_unwind2(v2, -1);
result = 1;
}
else
{
*(_DWORD *)(a1 - 8) = v1;
*(_DWORD *)(a1 - 4) = *(_DWORD *)(a1 + 16);
*(_DWORD *)(v2 - 4) = a1 - 8;
v4 = *(_DWORD *)(v2 + 12);
v3 = *(_DWORD *)(v2 + 8);
while ( v4 != -1 )
{
if ( *(_DWORD *)(v3 + 12 * v4 + 4) )
{
v8 = a1;
v5 = (*(int (__thiscall **)(int))(v3 + 12 * v4 + 4))(3 * v4);
a1 = v8;
v2 = *(_DWORD *)(v8 + 12);
if ( v5 )
{
if ( v5 < 0 )
return 0;
v6 = *(_DWORD *)(v2 + 8);
_global_unwind2(*(_DWORD *)(v8 + 12));
a1 = v2 + 16;
_local_unwind2(v2, v4);
*(_DWORD *)(v2 + 12) = *(_DWORD *)(v6 + 12 * v4);
(*(void (__thiscall **)(int))(v6 + 12 * v4 + 8))(3 * v4);
}
}
v3 = *(_DWORD *)(v2 + 8);
v4 = *(_DWORD *)(v3 + 12 * v4);
}
result = 1;
}
return result;
}
// 1069C: using guessed type _DWORD __cdecl _global_unwind2(_DWORD);
// 106DE: using guessed type _DWORD __cdecl _local_unwind2(_DWORD, _DWORD);

//----- (00010812) --------------------------------------------------------
int __stdcall _seh_longjmp_unwind(int a1)
{
return _local_unwind2(*(_DWORD *)(a1 + 24), *(_DWORD *)(a1 + 28));
}
// 106DE: using guessed type _DWORD __cdecl _local_unwind2(_DWORD, _DWORD);

#error "There were 1 decompilation failure(s) on 12 function(s)"
User avatar
lonestar473
Student Driver
Posts: 21
Joined: Tue Apr 03, 2012 6:08 am

Re: Compiling/Building Sheepshaver/Basilisk II for X86, AND

Post by lonestar473 »

Nice, you managed to decompile it! :mrgreen: well.. mostly... wonder what those
errors were.. If they're not big maybe we could reconstruct it? You said you only needed
it to be signed on x64? Did you find a 64 bit build? There are ways to self sign a driver,
but it is probably a bit too much to ask everyone to enable test mode.

And sadly, with Visual C++ Even though I took(and passed) both college courses I
feel I didn't really learn too much, they only ever had us make console applications,
and for compiling all I ever did was click build.

They never bothered to explain how it actually works or what it does. I now
know it is a separate command line based compiler, even the WinDDK seems to
have(or had?) its own compiler and build method.

All they did was teach us a bunch of functions most of which I've forgotten,
and about memory management, like pointers, arrays, stacks, linked lists, etc.

Honestly I can't remember all those function names and this and that, I prefer
more knowing the ideas behind it, how things work, then I can look up function
names, etc as needed. Not sure if I explained that in a way that makes sense.

Like right now if my life depended on it, I couldn't tell you the names of the
functions to read and write to a plain text file, but I know how it works,
like opening the file, making sure your at the beginning, reading till you get
to the end of line character, or really any other thing your looking for,
processing it in a loop, etc.

I know what its doing where and why, but all the class ever seemed to teach
was a set command and what order you use them in blah blah. Right now I'm
probably way behind you on everything.

Anyway, back to cdenable, I just thought about something..

Its only including

Code: Select all

#include <windows.h>
#include <defs.h>
from the looks of it, unless something was lost in decompiliation;
from looking around and messing with the windows DDK, it
seems like real drivers, seem to need ntddk.h so..
maybe its not a 'real' driver? Or at least not kernel mode..?
Which would mean it might be easier to bring it into the main program?

---Edit1---
After some reading and thought, I realize that decompiled code is just
the best guess for the c++ code, so the real headers could've been whatever.

On another note I've discovered this neat thing called Visual DDK
and am messing around with it, also I've been poking around in the
bochs source code to see how they do cd/dvd access, mostly cdrom.cc so far.
---End Edit1---

Eh.. everything is all speculation for me at this point.

I really don't know where to even start right now.. :P
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Compiling/Building Sheepshaver/Basilisk II for X86, AND

Post by Cat_7 »

Hi,

It seems we need to determine what kind of driver cdenable.sys is. It is not installed through an .inf file and doesn't register in the registry. It's is loaded on system start or on SheepShaver start when recently placed in the correct location.

I'm guessing its a kernel plug driver. Question is whether such drivers are allowed in 64 bit windows.

On the other hand, the function calls in ntcd.cpp seem to indicate a service is called. Whether a loaded driver is seen as a service I don't know. (yet?)

Defs.h will most likely contain the definitions of the specific functions used in the driver source. The other definitions coming from windows.h

I'm downloading the latest WDK toolkit.

sources:
http://alter.org.ua/en/docs/win/services/
http://msdn.microsoft.com/en-us/library ... 85%29.aspx
http://tools.sysprogs.org/srvman/cmdline.shtml

Best,
cat_7
Last edited by Cat_7 on Thu Apr 12, 2012 7:57 am, edited 3 times in total.
Reason:  
User avatar
lonestar473
Student Driver
Posts: 21
Joined: Tue Apr 03, 2012 6:08 am

Re: Compiling/Building Sheepshaver/Basilisk II for X86, AND

Post by lonestar473 »

Just a quick addition..

I'm thinking this is the reason a driver is(or was) needed..
seeing as mac cd/dvds are hfs formatted, not iso9660.

Its a bit old but it should still apply, more or less
http://support.microsoft.com/kb/138434

I'm hoping that for vista/7 there is another method by now.
Haven't had much luck, though I'm not too sure where to look,
so far just been doing a bunch of google searches with
terms like:
win, windows, win32, win64, c++, cd, dvd, direct access, ioctl,
ioctl_cdrom, raw access, block access, sector, raw read, block read

And more I can't remember.
User avatar
lonestar473
Student Driver
Posts: 21
Joined: Tue Apr 03, 2012 6:08 am

Re: Compiling/Building Sheepshaver/Basilisk II for X86, AND

Post by lonestar473 »

Ok! So after some more digging(this may have been mentioned before)..

I've found two things..

cdenable.sys and .vxd seem to have been part of hfv explorer,
which seems to be only freeware, and never had the source released.

The second thing.. you did mention that the ethernet driver source was
available, however it was not in the cvs, took a while to figure that out :P

I ended up finding and downloading and old source file from ~2001
it looks like, which seems to have the full source code for all the drivers
for the ethernet, for all windows platforms!

So I am currently attempting to compile a 64-bit version of b2ether.sys

It is really late though so I should really be going to bed.. anyway
just want to post an update.

Also I feel working on something else for a bit, so after I either
have an x64 ether driver or have pulled my hair out, I'll probably
work on some of my ideas with GUI stuff for a bit.

But I am not giving up on the CD working, I just need a break from it.. ugh :P
User avatar
lonestar473
Student Driver
Posts: 21
Joined: Tue Apr 03, 2012 6:08 am

Re: Compiling/Building Sheepshaver/Basilisk II for X86, AND

Post by lonestar473 »

Hey! I still have hair... even if I don't have sleep, yet :P

Here, test away:
b2ether64-TestBuild01-04132012.zip

CRC32: 11A41E0A
MD5: 0DF2287A416F17530A362C0463659542
SHA-1: 810424516396166AD013D1A8F8A16826F55455DD

I built it with help from VisualDDK but god it was a pain!
I can explain details later.. I'm tired ugh!

I wrote a readme incase random people got the file,
its included in the .zip but I'm also going to post it below.

Unfortunately It seems it will require test mode.
I included instructions in the readme.
Test Compile of Basilisk II Ethernet Driver for Windows Vista and 7 64-bit
============================================================================

This is for TESTING ONLY, don't expect it work, you and you alone
are responsible for any consequences of attemping to use this driver.

I DID NOT WRITE THIS DRIVER, Only compile it for x64

If it works, great, you can post about it on emaculation.

The thread I have been disscussing things in at the time of this
writing is here:

http://www.emaculation.com/forum/viewto ... 37&p=42708

For reference this is TEST BUILD 1

INSTALL INSTRUCTIONS LOCATED BELOW HASHES

===============
File Hashs
===============


b2ether64.sys
---------------------------------------------------
CRC32: E0756B17
MD5: A92971992C868DBF8C50B115FC0DAE21
SHA-1: 820FC379C63B19CF38C628D3D7341AFD1BF2A407
===================================================

B2Win7Vista-x64.inf
---------------------------------------------------
CRC32: 01E0CEB4
MD5: A7D02C687F5D6B5EC2055A1290163299
SHA-1: 4B5444BF0FB062D19ED1B578B5BAD87F1C345530
===================================================

If these don't match then you don't have TEST BUILD 1
(or at least not my build, its damaged or been modified)

===================================
Installation
===================================

First

You will need to enable test mode
to load this self signed driver, the easiest
way to do this is to use the 'Driver Signature
Enforcement Overrider' or DSEO.

You can get it here:
http://www.ngohq.com/home.php?page=dseo

Note: to remove 'Test Mode' from the corners of
your desktop use the program's 'Remove Watermark'
options for further instructions.

Otherwise, if you want to do it yourself,
google is your friend :)

A REBOOT IS REQUIRED TO ENABLE TEST MODE!

-----------------------------------

Second

You will need to navagate to where you can see the
network connections, its slightly different between
Vista and 7; and I don't have Vista accessable to test
at the moment.

If you can see something like 'Local Area Connection',
then your in the right place. In windows 7 you click
'change adapter settings' from the network and sharing
center.

Now you need to RIGHT CLICK AND SELECT 'Properties' for
'Local Area Connection' OR WHATEVER YOU USE FOR INTERNET,
like Wireless Connection, etc. It could be any name really.
You'll have to find it yourself. Sorry :(

Now click 'Install' then pick 'Protocol' followed
by 'Have Disk' and browse to the location you extracted
this driver and click 'OK'.

You should now see the Basilisk II Ethernet Driver in
the list, select ok and it should install, you may
see a message to confirm installing, followed by
a message that windows needs a signed driver(if you
continued installing.) If both those things happened
then you are not properly in 'Test Mode'.

Thats all, really. Good luck :)

-Lonestar473
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Compiling/Building Sheepshaver/Basilisk II for X86, AND

Post by Cat_7 »

Hi,

Great! The driver installs and binds to the local area connection.
However, in the SheepShaverGUI I can't select the local area connection to use for network connection. So I edited the sheepshaver_prefs to include the required settings:
ether B2ether
etherguid { some value }

The "some value" is taken from the registry at:
HKEY_LOCAL_MACHINE/SYTEM/CurrentControlSet/services/B2ether/linkage

In my case that is {AC74638C-7831-4C42-864C-D005658044CE}

After creating those settings and starting SheepShaver I get a message that the ethernet device can't be openend. So no success yet.

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

Re: Compiling/Building Sheepshaver/Basilisk II for X86, AND

Post by lonestar473 »

I feel so stupid!

I'm still new to how compiling really works, like linking and all that...

I missed something and just realized what happened.

Somewhere along the line it tried to link to "ntstrsafe.libndis.lib"

And I.. maybe it was because I was tired.. or who knows what..
I thought maybe it was some old file that was renamed now?

So I looked and found ndis.lib so I changed it to that.. but :oops:

It recently occurred to me, that perhaps it was a missing ; and sure enough
there is an ntstrsafe.lib :!: :oops: so I am about to recompile
with that lib included and see if that helps, also I am
going to include both a debug and non-debug build. (last one
was not set to debug).

After I clean things up a bit I can upload the project,
though it will need VisualDDK installed as well as version
7600.16385.1 of the Windows DDK(NOT SDK!)
http://visualddk.sysprogs.org/
http://www.microsoft.com/download/en/de ... n&id=11800
User avatar
lonestar473
Student Driver
Posts: 21
Joined: Tue Apr 03, 2012 6:08 am

b2ether64.sys - Test Build 2

Post by lonestar473 »

Ok! Rebuilt

Sorry I haven't really had time to do testing myself, I've been
going back and forth between a few different things non
computer related. I hope this works. I haven't loaded it yet
but I will test later this evening after I take care of a few
things.

b2ether64-TestBuild02_04132012.zip

CRC32: D9249406
MD5: 8EA7608D7B8F6BF226801CB319F95340
SHA-1: 5E9A464104FB17E1B7E688806CE2670C4C485CB5
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Compiling/Building Sheepshaver/Basilisk II for X86, AND

Post by Cat_7 »

I installed and tried, it won't work. The error I receive stems from the function PacketOpenAdapter in the file ether_windows.cpp

fd = PacketOpenAdapter( dev_name, ether_multi_mode );
if (!fd) {
sprintf(str, "Could not open ethernet adapter %s.", dev_name);
WarningAlert(str);
goto open_error;

I don't know whether that call works in Windows/Vista x64. I tried to find info on it but mostly end up at the winpcap sources.

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

b2ether64.sys - Test Build 3

Post by lonestar473 »

Hmm.. well I found some more stuff that may have been left out.

I'm still trying to figure this all out, but I got it to build now
with the compiler from the Win DDK, before it was
still using visual studio's compilier and just linking
to libs in the DDK.

I zipped up a source folder I cobbled together that builds,
as well as a test build 3. I'm also about to start testing myself.
I just need to reboot to activate testmode. (My development VM
its 32-bit windows 7 so I can't test it there, and I don't want
to build a x64 one just for this :P )

!--Edited--!
I forgot to self-sign this and the last build, while dseo will do it(it what I'm using
for it anyway right now) Its simpler if I do it ahead of time.
b2ether64-TestBuild03[DDK]_04132012_signfix.zip

CRC32: CF3DE9A2
MD5: 80E78C49737EAD71EA31F9ECF27FC7DD
SHA-1: 8BCBEB02BB24BCE31721AA6D61BAA28B87D2F156


b2ether64-TestBuild-src_04132012.zip

CRC32: 9CB7D2F7
MD5: A477D58EA27DB5BC096DBE592BE2DF6C
SHA-1: 3D74BB28DF6867AC1DBFEB29FE2EFD829E3004F7

---Update---
Well, I can't even seem to get basilisk ii or sheepshaver, -any build- to start
on my x64 host, though they run fine in my 32-bit vm...

I can't even try to debug the driver until I can get the emu to at least start. :?
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Compiling/Building Sheepshaver/Basilisk II for X86, AND

Post by Cat_7 »

Hi,

Great news: the SheepShaverGUI now recognizes the local area connection as a valid networking device after your latest driver was installed. The "cannot open ethernet adapter" error has gone.
SheepShaver still crashes on boot, but I'm investigating whether that has something to do with network settings inside the Mac OS 8.5 installation I'm using.

I've tried many different combinations of settings in Mac OS, while selecting the local area connection, but SheepShaver crashes on all of them.

stderr give this:
Illegal instruction at 40810000, opcode = 4cdf1808
Illegal instruction at 40810004, opcode = 4e7591c8
Illegal instruction at 40810018, opcode = 00184a42
Illegal instruction at 40810024, opcode = 00000000
Illegal instruction at 40810028, opcode = 00000000
Illegal instruction at 4081002c, opcode = 00000000
Illegal instruction at 40810030, opcode = 4e56ffe0

I too had big problems to get BII or SS to run on 64 bit windows. A CD in the drive posed problems, even though the cdenable driver doesn't work. Please check programs running in the background and kill as many as you can (Firefox and daemon tools were culprits here). Set memory to max 64 Mb, use the new world rom. Set BII/SS to ignore illegal memory access etc.
Textpad mangled my prefs file.

Best,
Cat_7
Last edited by Cat_7 on Sat Apr 14, 2012 8:49 am, edited 2 times in total.
Reason:  
User avatar
lonestar473
Student Driver
Posts: 21
Joined: Tue Apr 03, 2012 6:08 am

Re: Compiling/Building Sheepshaver/Basilisk II for X86, AND

Post by lonestar473 »

I have had a similar problem with sheepshaver...

It crashes with a standard 'has stopped working', right after I click 'OK' on this dialog...
[APPCRASH; fault module Sheepshaver.exe ... etc]

Image


HOWEVER! :mrgreen:

When it comes to Basilisk II..
Image

INTERNET ! :mrgreen: :!: :!:

Basilisk II is running system 8.0 freshly installed and netscape 3 to test google.

Btw that tip about firefox... oddly enough.. thats it.. for some reason when firefox is running
nothing wants to work with either emu, or they freeze shortly after starting.

I disabled avast, and deamon tools just to make sure, but it seems firefox was the real killer.
Last edited by lonestar473 on Sat Apr 14, 2012 9:05 am, edited 1 time in total.
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Compiling/Building Sheepshaver/Basilisk II for X86, AND

Post by Cat_7 »

Yep, just wanted to post success on Basilisk!!

Great!

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

Re: Compiling/Building Sheepshaver/Basilisk II for X86, AND

Post by lonestar473 »

So does this mean the driver is ok and the problem is Sheepshaver? or that something might still not be quite right with it? or ugh.. both? :?

--Edit--
Hope I didn't sound stupid above.. I'm really on new ground in many ways..
not to mention you've probably been poking around inside the code
for a while.

I find it odd though that your stderr has many things listed, but mine, only lists this:

Illegal instruction at 40810000, opcode = 02020002
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Compiling/Building Sheepshaver/Basilisk II for X86, AND

Post by Cat_7 »

Ha!

Read this: http://www.emaculation.com/doku.php/app ... er_windows
specially the caution in the beginning ;-)

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

Re: Compiling/Building Sheepshaver/Basilisk II for X86, AND

Post by lonestar473 »

So its likely just sheepshaver being... sheepshaver :lol:

I didn't have a complete install on Sheepshaver,
I'm working on doing that right now with networking disabled.

Seems if I start sheepshaver before firefox, it doesn't crash... yet.

Once I have it up I'll try the suggestions in your link.

--Edit--

Ok!

Image

Time for bed...
User avatar
lonestar473
Student Driver
Posts: 21
Joined: Tue Apr 03, 2012 6:08 am

Re: Compiling/Building Sheepshaver/Basilisk II for X86, AND

Post by lonestar473 »

Ok.. so now that it seems to work.

What do we do with it? It should still be considered experimental,
and the process to get it working requires enabling test mode.
(Not sure how hard it would be to get it signed for real, though
I don't think its free, and ouch if you had to pay for every
recompile to be signed, not sure how they do that either.)

The readme should probably be re-written. I didn't
put my name in there either, not sure if its important
but it seems like all the past contributor mentions
had a real name and not a handle.

If its needed my name is Nathan Clarkston.

Also.. after the success of the ether driver, and the headache that
is/was the cdrom support.. I've decided to work on something else
for a bit, before I pull all my hair out :lol:

So I give you the completely non-functional, just beginning,
but I have big ideas for
, and hopefully makes mac emulation
a lot easier, the Virtual PC *Inspired* ---

Virtual Macintosh! A Settings & Profile Manager for Macintosh Emulators
(Basilisk II and Sheepshaver ONLY for now - since I plan on actually
working on those emulators too)

I'm using Visual Basic 2010 (from Visual Studio 2010 Professional [Dreamspark Edition])
Image

I'm planning on having it work similar to the way VPC, VMware, and Vbox do, as in
having a folder with the executable and stuff they need, but the prefs, disk images,
etc, all being kept in a separate folder for each profile.

Also I want to have if possible:
wizards to create profiles
automatic or semi-automatic driver installation
Suggestions and help for problems
Automatic or semi-automatic killing of non responding VMs
Management for HFS(+) disk images(Know of any good libraries I could use?)
Allow use of multiple builds of the emulators and display appropriate config options
Automatic or manual updates for emulators or support files
Automatic or manual error reporting for emulators and the gui
Selection of startup sound per VM(if applicable or gui can play sound instead of VM)
Rebuild preferences from scratch but maintain some information like disk images and rom file

And other stuff I forgot or will think of later :mrgreen:

Also for Basilisk II & Sheepshaver
I want to one day fix that *%^&$@! cdrom on x64 issue!
STABILITY
If possible import the mmu from pear pc(it has one right? has to.. for OS X?) to allow running 9.1 - 9.2.2 - hopefully?
Learn more about c++ and other stuff and hopefully modernize and bugfix in the process?
And I can dream... VM Additions for Mac (Pointer integration etc)?

I hope I'm not aiming too high, but I am serious about all of it; and I will do whatever I can.
If anyone has any kind of technical info on macs or tools like development programs, etc
for OS classic I'd be interested. Really anything that can help.

Also taking naming suggestions for the GUI, I thought about VirtualMac already but don't want Microsoft
to sue me for being too close to their name :?

--Edit--
I should note that I'm primarily a windows person so all development will probably
be windows centric. Sorry Linux and OS X users :(
[I will eventually try, if wanted, to test the GUI with wine and see if I can make it work with it]
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Compiling/Building Sheepshaver/Basilisk II for X86, AND

Post by Cat_7 »

Wow, where to begin? My ideas are below the quotes.
What do we do with it? It should still be considered experimental,
and the process to get it working requires enabling test mode.
(Not sure how hard it would be to get it signed for real, though
I don't think its free, and ouch if you had to pay for every
recompile to be signed, not sure how they do that either.)
Proper driver signing should be the first step to get this code out of the door.
The readme should probably be re-written. I didn't
put my name in there either, not sure if its important
but it seems like all the past contributor mentions
had a real name and not a handle.
If its needed my name is Nathan Clarkston.
This can also partly be solved with a proper driver.

Source code is maintained at a CVS repository. Currently our member Myrd has access to the code. For the code to be included into the source, it would need to be supplied as patches to the current code, or perhaps (in the case of this stand alone driver) as a separate directory that could be included (with a description of how to build/sign the driver).

You can communicate about the code on the Basilisk/SheepShaver development mailing list, accessible here: https://lists.sourceforge.net/lists/lis ... lisk-devel
Also.. after the success of the ether driver, and the headache that
is/was the cdrom support.. I've decided to work on something else
for a bit, before I pull all my hair out
You must be bold by now ;-) You mean you've given up on cd support? A skeleton driver is available from the disassembled code.... I placed links to all function calls that are in the sys driver, thus hopefully making it possible to reconstruct the driver. You can have that code. (I'll post it here in a new topic).
So I give you the completely non-functional, just beginning,
but I have big ideas for, and hopefully makes mac emulation
a lot easier, the Virtual PC *Inspired* ---
This is a awsome idea! It would work great as long as it adheres to the prefs files format.
HFS is read by cdenable.sys (hint ;-) but also by Apple's boot camp drivers. I know of no free libs for windows.
If possible import the mmu from pear pc(it has one right? has to.. for OS X?) to allow running 9.1 - 9.2.2 - hopefully?
Learn more about c++ and other stuff and hopefully modernize and bugfix in the process?
There have been attempts in the past (for other platforms) to include/write a mmu. I'll see if I can find the internet sources.
Also taking naming suggestions for the GUI, I thought about VirtualMac already but don't want Microsoft to sue me for being too close to their name
We'll let others fire away as well...
I should note that I'm primarily a windows person so all development will probably
be windows centric. Sorry Linux and OS X users
This in itself is not a problem, other features are also platform specific. Like stand-alone prefs editors that look like what you are trying to do. (please check the SheepVM thread in the forum). But if you develop code that can't be compiled with the current tools for windows (cygwin), it should get a specific place in the source code (just like the current ability to build in OSX with both command line gcc and Xcode). The ethernet driver you compiled had a visual c project definition and was a stand-alone, windows only driver.

Good luck!
Last edited by Cat_7 on Sun Apr 15, 2012 12:23 pm, edited 1 time in total.
Reason:  
Post Reply