BasiliskII for windows revived!

About BasiliskII, a 68k Mac emulator for Windows, MacOSX, and Linux that can run System 7.x through MacOS 8.1.

Moderators: Cat_7, Ronald P. Regensburg

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

BasiliskII for windows revived!

Post by Cat_7 »

Hello,

I gather from the development list Gwenole has revived Basilisk II for Windows. He states it is now possible to compile BII for windows again, using Cygwin.

It now uses the latest JIT-Compiler too!

Read the message at:
http://sourceforge.net/mailarchive/foru ... um_id=7009

Best wishes,

Cat_7
ataxy
Master Emulator
Posts: 374
Joined: Sun Jan 25, 2004 3:49 pm
Location: Canada
Contact:

Post by ataxy »

did you try to build it
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Post by Cat_7 »

Yep,

But it got stuck on the esd sound daemon development package and gtk+ packages.
My Cygwin installation is not the best out there...

I mailed Gwenole for instructions on how to build and what is needed exactly.
When I receive his answer, I will post it here.

Best Wishes,
Cat_7
ataxy
Master Emulator
Posts: 374
Joined: Sun Jan 25, 2004 3:49 pm
Location: Canada
Contact:

Post by ataxy »

cool cant wait to see
AZEnigma
Student Driver
Posts: 19
Joined: Tue Nov 16, 2004 10:43 pm

Got it compiled

Post by AZEnigma »

You just need to install the esound, xwindows, and GCC compiler. It is working right now, but very slow. I think this is due to the fact that I can't figure out how to go fullscreen.[/img]
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Post by Cat_7 »

Here is my question to Gwenole, and his answer.

Cat_7:
Could you give us a small walk-through the compilation process? and define which packages should be installed on cygwin?

Gwenole:
Simply basic install + a compiler + a manual build of SDL (see www.libsdl.org for instructions).
then, ./configure --enable-jit-compiler --enable-sdl-video --enable-sdl-audio.

I don't have a sound card, someone else will have to test audio himself.

EDIT:
from BasiliskII/src/Unix run:

aclocal
autoheader
autoconf
./configure --enable-jit-compiler --enable-sdl-video --enable-sdl-audio


Best wishes
Cat_7
Last edited by Cat_7 on Wed Nov 17, 2004 4:57 pm, 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

Post by Cat_7 »

How to install SDL in Cygwin:

Step 1. Run the Cygwin setup program, install the default packages and
the development packages (adding any extras you want, like vim).
Step 2. Run the Cygwin shell. Further instructions assume you're in this shell.
Step 3. Extract the SDL source into a directory and run:
./configure && make && make install
Step 4. When you're ready to build SDL applications, copy SDL.dll from
/usr/local/lib to whereever your SDL application source resides.

From: http://libsdl.org/extras/win32/cygwin/README.txt

Cat_7
Last edited by Cat_7 on Wed Nov 17, 2004 4:27 pm, edited 1 time in total.
AZEnigma
Student Driver
Posts: 19
Joined: Tue Nov 16, 2004 10:43 pm

Full Screen

Post by AZEnigma »

Cat, have you found a way to enable fullscreen?
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Post by Cat_7 »

Nope,

Just compiling SDL right now and it seems to hang....

Cat_7
AZEnigma
Student Driver
Posts: 19
Joined: Tue Nov 16, 2004 10:43 pm

Post by AZEnigma »

If you like I can just email you the precompiled exe and sdl.dll?
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Post by Cat_7 »

Nice offer,

but I would like to do it myself, just for educational purposes..
Things are going well, second time...

Cat_7
Mac Emu
Forum All-Star
Posts: 1208
Joined: Mon May 20, 2002 11:50 am
Location: Ouraion

Post by Mac Emu »

Cool!

cvs -d :pserver:anoncvs@down.physik.uni-mainz.de:/cvs login
cvs -d :pserver:anoncvs@down.physik.uni-mainz.de:/cvs checkout BasiliskII
cd BasiliskII/src/Unix
aclocal
autoheader
autoconf
./configure --enable-jit-compiler --enable-sdl-video --enable-sdl-audio
make

After manually adding SDL and running configure, I get the following:

Basilisk II configuration summary:
SDL support ............................ : video audio
XFree86 DGA support .................... : no
XFree86 VidMode support ................ : no
fbdev DGA support ...................... : no
Enable video on SEGV signals ........... : yes
ESD sound support ...................... : yes
GTK user interface ..................... : yes
mon debugger support ................... : no
Running m68k code natively ............. : no
Use JIT compiler ....................... : yes
JIT debug mode ......................... : no
Floating-Point emulation core .......... : IEEE fpu core
Assembly optimizations ................. : i386
Addressing mode ........................ : direct
Bad memory access recovery type ........ : win32
Configuration done. Now type "make" (or "gmake").


However, when I make it I get this far

$ make
g++ -I../include -I. -I../uae_cpu -DHAVE_CONFIG_H -DOS_cygwin -DDIRECT_ADDRESSI
NG -DUNALIGNED_PROFITABLE -DREGPARAM="__attribute__((regparm(3)))" -DX86_ASSEMBL
Y -DOPTIMIZED_FLAGS -DSAHF_SETO_PROFITABLE -DUSE_JIT -DUSE_JIT_FPU -DFPU_IEEE -D
_REENTRANT -DDATADIR=\"/usr/local/share/BasiliskII\" -O2 -I/usr/local/include/SD
L -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/
X11R6/include -I/opt/gnome/include/gnome-1.0 -DNEED_GNOMESUPPORT_H -I/opt/gnome/
lib/gnome-libs/include -I/opt/gnome/include/gtk-1.2 -I/opt/gnome/include/glib-1.
2 -I/opt/gnome/lib/glib/include -I/usr/X11R6/include -fomit-frame-pointer -fno-e
xceptions -fno-merge-constants -fno-gcse-sm -c main_unix.cpp -o obj/main_unix.o
In file included from main_unix.cpp:62:
/opt/gnome/include/gnome-1.0/gnome.h:15:23: gdk_imlib.h: No such file or directo
ry
In file included from /opt/gnome/include/gnome-1.0/libgnomeui/libgnomeui.h:10,
from /opt/gnome/include/gnome-1.0/gnome.h:17,
from main_unix.cpp:62:
/opt/gnome/include/gnome-1.0/libgnomeui/gnome-animator.h:28:23: gdk_imlib.h: No
such file or directory

plus a few more missing header errors. I do have the gdk_imlib.h file located at d:\cygwin\opt\gnome\include

Do you know how to add an include path to Cygwin (Linux)?
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Post by Cat_7 »

some portions of my ./configure results:

checking for GCC 2.7 or higher... yes
checking for GCC 3.0 or higher... yes
checking whether GCC supports constants merging... yes
checking whether GCC supports store motion... yes
checking floating point format... IEEE (little-endian)
checking ieee754.h usability... no
checking ieee754.h presence... no
checking for ieee754.h... no
checking ieeefp.h usability... yes
checking ieeefp.h presence... yes
checking for ieeefp.h... yes
checking floatingpoint.h usability... no
checking floatingpoint.h presence... no
checking for floatingpoint.h... no
checking nan.h usability... no
checking nan.h presence... no
checking for nan.h... no
checking for isnanl... no
checking for isinfl... no
checking for logl... no
checking for log10l... no
checking for expl... no
checking for powl... no
checking for fabsl... no
checking for sqrtl... no
checking for sinl... no
checking for cosl... no
checking for tanl... no
checking for sinhl... no
checking for coshl... no
checking for tanhl... no
checking for asinl... no
checking for acosl... no
checking for atanl... no
checking for asinhl... no
checking for acoshl... no
checking for atanhl... no
checking for floorl... no
checking for ceill... no
checking for atanh... yes
checking for isnan... yes
checking for isinf... yes
checking for finite... yes
checking for isnormal... no
checking for signbit... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged

***all these : no's above don't look good to me.

Basilisk II configuration summary:

SDL support ............................ : video audio
XFree86 DGA support .................... : no
XFree86 VidMode support ................ : no
fbdev DGA support ...................... : no
Enable video on SEGV signals ........... : yes
ESD sound support ...................... : yes
GTK user interface ..................... : yes
mon debugger support ................... : no
Running m68k code natively ............. : no
Use JIT compiler ....................... : yes
JIT debug mode ......................... : no
Floating-Point emulation core .......... : IEEE fpu core
Assembly optimizations ................. : i386
Addressing mode ........................ : direct
Bad memory access recovery type ........ : win32

Configuration done. Now type "make" (or "gmake").


g++ -I../include -I. -I../uae_cpu -DHAVE_CONFIG_H -DOS_cygwin -DDIRECT_ADDRESSI
NG -DUNALIGNED_PROFITABLE -DREGPARAM="__attribute__((regparm(3)))" -DX86_ASSEMBL
Y -DOPTIMIZED_FLAGS -DSAHF_SETO_PROFITABLE -DUSE_JIT -DUSE_JIT_FPU -DFPU_IEEE -D
_REENTRANT -DDATADIR=\"/usr/local/share/BasiliskII\" -O2 -I/usr/local/include/SD
L -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/
X11R6/include -fomit-frame-pointer -fno-exceptions -fno-merge-constants -fno-gcs
e-sm -c prefs_editor_gtk.cpp -o obj/prefs_editor_gtk.o
prefs_editor_gtk.cpp:29:24: net/if_arp.h: No such file or directory
make: *** [obj/prefs_editor_gtk.o] Error 1

***make crashes with the gtk or /net/if_arp.h error above.

I am trying to disable the gtk user interface as it would probably not run in windows. Haven't figured out how yet.
For now, I am going to install the net features of cygwin.


Best wishes

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

Post by Cat_7 »

OK,

I had to copy the files in/usr/include/net from my mandrake installation to cygwin to get any further. Now I am stuck at:

In file included from ../Windows/clip_windows.cpp:35:
../include/debug.h: In function `void winbug(char*, ...)':
../include/debug.h:37: error: aggregate `_timeb tstruct' has incomplete type
and cannot be defined
../include/debug.h:39: error: `_ftime' undeclared (first use this function)
../include/debug.h:39: error: (Each undeclared identifier is reported only once
for each function it appears in.)
../include/debug.h:40: error: `_strtime' undeclared (first use this function)
../include/debug.h:41: error: `_strdate' undeclared (first use this function)
make: *** [obj/clip_windows.o] Error 1

Oh, well. Enough for now. More later,

best wishes

Cat_7
Mac Emu
Forum All-Star
Posts: 1208
Joined: Mon May 20, 2002 11:50 am
Location: Ouraion

Post by Mac Emu »

That's where I am as well

cvs -d :pserver:anoncvs@down.physik.uni-mainz.de:/cvs login
cvs -d :pserver:anoncvs@down.physik.uni-mainz.de:/cvs checkout BasiliskII
cd BasiliskII/src/Unix
aclocal
autoheader
autoconf
./configure --enable-jit-compiler --enable-sdl-video --enable-sdl-audio --with-gtk=no
make

In file included from ../Windows/clip_windows.cpp:35:
../include/debug.h: In function `void winbug(char*, ...)':
../include/debug.h:37: error: aggregate `_timeb tstruct' has incomplete type
and cannot be defined
../include/debug.h:39: error: `_ftime' undeclared (first use this function)
../include/debug.h:39: error: (Each undeclared identifier is reported only once

for each function it appears in.)
../include/debug.h:40: error: `_strtime' undeclared (first use this function)
../include/debug.h:41: error: `_strdate' undeclared (first use this function)
make: *** [obj/clip_windows.o] Error 1

doing a Google search looks like "Use ftime instead of _ftime" might be required.

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

Post by Cat_7 »

EDIT: Sources of 11-21-2004 and later no longer make this step neccessary.

OK, I commented out this:

/* static void _cdecl inline winbug( char *s, ...)
{
va_list vargs;
char msg[1024], date[50], hours[50];
struct _timeb tstruct;

_ftime( &tstruct );
_strtime( hours );
_strdate( date );
sprintf( msg, "B2: %s %s:%03u ", date, hours, tstruct.millitm );

va_start( vargs, s );
vsprintf( &msg[strlen(msg)], s, vargs );
va_end( vargs );

OutputDebugString(msg);
}
*/

in include/debug.h and it compiled OK. See if it runs...

To get it to run I had to copy SDL.dll and cygwin1.dll to windows/system32
What rests is to move a hd, a config and a rom file from linux to windows...

Cat_7
Last edited by Cat_7 on Sun Nov 21, 2004 3:09 pm, edited 1 time in total.
Mac Emu
Forum All-Star
Posts: 1208
Joined: Mon May 20, 2002 11:50 am
Location: Ouraion

Post by Mac Emu »

Excellent. You will probably enounter the same problem I'm experiencing.

BasiliskII.exe
Basilisk II V1.0 by Christian Bauer et al.
ERROR: Cannot open ROM file.

The BasiliskII_prefs file exists in the same directory as BasiliskII.exe and I don't seem to have any additional prefs file created by the executable on my hard drive.
AZEnigma
Student Driver
Posts: 19
Joined: Tue Nov 16, 2004 10:43 pm

Hmmmm...

Post by AZEnigma »

I did not need to modify any code to get this to compile on my box??? I have built it with GTK and without, both work fine. The command I used to build without was --without-gtk

Of course if you do want the GUI configuration you will need to keep GTK and launch it through X.


When I ran Basilisk for the first time, it created a .basilisk_ii_prefs in my CYGWIN users home directory.


I think you guys are missing some component to cygwin.....
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Post by Cat_7 »

How did you guess????

I have tried some 6 rom files, none of which are recognized by BII
So what now?

Cat_7
AZEnigma
Student Driver
Posts: 19
Joined: Tue Nov 16, 2004 10:43 pm

config

Post by AZEnigma »

Here is my .basilisk_ii_prefs file, maybe this will help. In this config I have the harddisk file and the rom in the root of cygwin.

disk /os8.HFV
extfs /
screen win/512/384
seriala
serialb
udptunnel true
udpport 6066
rom /PERFORMA.ROM
bootdrive 0
bootdriver 0
ramsize 81788928
frameskip 0
modelid 14
cpu 4
fpu true
nocdrom false
nosound false
noclipconversion false
nogui false
jit true
jitfpu true
jitdebug false
jitcachesize 8192
jitlazyflush false
keyboardtype 5
keycodes false
mousewheelmode 1
mousewheellines 3
dsp /dev/dsp
mixer /dev/dsp
ignoresegv false
AZEnigma
Student Driver
Posts: 19
Joined: Tue Nov 16, 2004 10:43 pm

Post by AZEnigma »

also note in my config that I changed frameskip to 0, per Gwenole. This has improved video significantly
Mac Emu
Forum All-Star
Posts: 1208
Joined: Mon May 20, 2002 11:50 am
Location: Ouraion

Post by Mac Emu »

Got it working. On-the-fly screen resolution and color depth changes works (cool). It seems slow though as far as the mouse responsivness. I'll play more with it.

We have to launch Basilisk II via Cygwin?
AZEnigma
Student Driver
Posts: 19
Joined: Tue Nov 16, 2004 10:43 pm

Post by AZEnigma »

As long as you did not compile with GTK, and you copy the cygwin1.dll to the same directory as the .exe you can launch it through windows like a normal application.
Mac Emu
Forum All-Star
Posts: 1208
Joined: Mon May 20, 2002 11:50 am
Location: Ouraion

Post by Mac Emu »

AZEnigma wrote:As long as you did not compile with GTK, and you copy the cygwin1.dll to the same directory as the .exe you can launch it through windows like a normal application.
And put the .basilisk_ii_prefs file in the same directory as BasiliskII.exe? Thanks. :D

Image
User avatar
wiebeest
Tinkerer
Posts: 69
Joined: Sun Aug 22, 2004 11:54 am
Location: Holland

Post by wiebeest »

I have no clue to what you guys are working on,
but I'd love to see a more advanced OS 8.1/Bassalisk II version for windowsXP...
Post Reply