Login  •  Register


The time is now: Wed Mar 29, 2017 11:10 am

Emaculation wiki  •  Delete all board cookies



Post new topic  Reply to topic Page 1 of 1 [ 21 posts ]
Print view Previous topic  |  Next topic
Author Message
PostPosted: Tue May 07, 2013 4:54 pm 
Offline
Space Cadet

Joined: Tue May 07, 2013 4:37 pm
Posts: 2
I'm trying to get Basilisk running on a Raspberry Pi, and so far I've been partially successful! It runs just fine from within Xorg, but i'd like to be able to run it directly from the command line, as seen in this video:

Basilisk II on the Raspberry Pi

When I try to run it from the command line without starting X first, I get an error saying:

Code:
(BasiliskII:2430): Gtk-WARNING **: cannot open display:


Anyone have any reccomendations on what I can try to get this working? I know it can work, because the video shows Basilisk II being launched from the command line, but I can't figure it out. Running through X is very slow on the underpowered Raspberry Pi.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue May 07, 2013 6:55 pm 
Offline
Expert User
User avatar

Joined: Fri Feb 13, 2004 8:59 am
Posts: 4059
Location: Sittard, The Netherlands
Hi,

Did you follow his instructions on how to build your own version of Basilisk on the PI?:

# apt-get install git libsdl1.2-dev
# git clone github.com/cebix/macemu
# cd macemu/BasiliskII/src/Unix
# NO_CONFIGURE=1 ./autogen.sh
# ./configure --enable-sdl-video --enable-sdl-audio --disable-vosf --disable-jit-compiler
# make install

Best,
Cat_7


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue May 07, 2013 7:03 pm 
Offline
Space Cadet

Joined: Tue May 07, 2013 4:37 pm
Posts: 2
I did, and they got me as far as being able to launch the app in X11. He actually skipped a step in those instructions, you need to run ./autogen.sh before you can run ./configure. I still can't run from the command line though. On a computer like the RaspberryPi, X11 uses a huge portion of its resources, and makes Basilisk less than useful.

I've emailed the maker of the video and he's gotten back to me with a couple of good suggestions. It looks like it might be unable to use SDL for some reason and is defaulting to X instead. I'll post back here if I figure it out.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Jun 11, 2014 1:44 am 
Offline
Space Cadet

Joined: Wed Jun 11, 2014 1:35 am
Posts: 1
I have been successful in compiling and running Basilisk II on my Raspberry. However, I cannot run it at any other screen resolution than 512x384. If I try to run at any other resolution, the system boots but the display gives me a slow horizontal roll left to right. (remember when TV's had a vertical and horizontal roll adjustment?, just like that...) The bigger the screen the slower the roll. Larger screens also introduce a slow upward vertical roll as well.

Running 30 Hz refresh. Quadra 900, 68040, System 7.5.3

Any ideas? I do have software that won't run at 512x384.

I've been running the pre-compiled Basilisk II and SheepShaver for years on my Intel Mac with no problems. Can set screen resolution at will. Generally use 1024x768.

[added info]

All above using hdmi cable direct to monitor...

Have found that when viewing the Raspberry via Apple's Screen Sharing, even running at 512x384 causes a slow vertical roll. Sounds like it is more than just a compile or preferences issue.

[more info]

I have found that the following MAX refresh rates are working for me without scroll issues using hdmi direct to a monitor.

512 x 384 60Hz
640 x 480 10 Hz
800 x 600 10 Hz
1024 x 768 5 Hz


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sun Jun 15, 2014 8:15 am 
Offline
Master Emulator
User avatar

Joined: Tue Feb 23, 2010 7:35 am
Posts: 430
Honestly it looked as though he edited the X11 startup files to start up Basilisk II instead of a display manager, when startx is run. That's what I thought when I saw that one second at the start of the video.

*EDIT* Sorry for not actually contributing to the post. And it seems I misread a bit; Xorg IS being used here. I'm not exactly experienced with Linux distros, although I use them, but I'll see if I can help. Give me some time to research too.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sun Jun 15, 2014 8:17 am 
Offline
Master Emulator
User avatar

Joined: Tue Feb 23, 2010 7:35 am
Posts: 430
Cat_7 wrote:
Hi,

Did you follow his instructions on how to build your own version of Basilisk on the PI?:

# apt-get install git libsdl1.2-dev
# git clone github.com/cebix/macemu
# cd macemu/BasiliskII/src/Unix
# NO_CONFIGURE=1 ./autogen.sh
# ./configure --enable-sdl-video --enable-sdl-audio --disable-vosf --disable-jit-compiler
# make install

Best,
Cat_7


I believe he also mentioned "--without-gtk". Are you sure that's not important?


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sat May 14, 2016 10:15 pm 
Offline
Student Driver
User avatar

Joined: Mon May 09, 2016 3:04 pm
Posts: 22
Sorry for digging up an old topic. But I've succeeded to successfully compile BasiliskII on my Pi 1B and to run the game Prince of Persia 2 - The Shadow and the Falme full screen on it. Not without X, but I think that the "bloat" of X is not that bad...

Here's how I did it. If anyone's interested I could be somewhat more elaborate. Notice that the procedure mentioned earlier in this post and on https://vimeo.com/62033644 leave us w/ a Basilisk version that can not run in 8 bit color (= 256 color) mode. Prince of Persia 2 - The Shadow and the Flame demands 256 colors, no less and no more.

I use a Raspberry Pi 1B. I run a Raspbian version based on Debian 8 "Jessie". Also note that I replaced libgtk2-dev with libgtk2.0-dev and "github.com/cebix/macemu" with "https://github.com/cebix/macemu.git" and that I did NOT use SDL video (I DID use SDL audio!) but a framebuffer option.
Code:
apt-get install git libsdl1.2-dev autoconf libgtk2[b].0[/b]-dev libxxf86dga-dev libxxf86vm-dev libesd0-dev
git clone https://github.com/cebix/macemu.git
cd macemu/BasiliskII/src/Unix
./configure --disable-vosf --disable-jit-compiler --without-gtk --enable-sdl-audio --enable-fbdev-dga
make
sudo make install


My '/home/pi/.basilisk_ii_prefs' file is like below. Notice that I set BesiliskII to use 'ignoresegv true' else Prince2 crashes the emulator. If you wish a higher resolution then alter the line "screen win/512/384" to 640x480 or what you'd like. You also have to set the proper Model ID etc. etc. See the BasiliskII readme from it's website.
Code:
#disk /home/pi/mac/DiskTools_MacOS8.image
#disk /home/pi/mac/150MB_Pi
disk /home/pi/mac/200MB
#disk /home/pi/mac/Stuff-it_(no_install_needed).dsk

#rom /home/pi/mac/Quadra900.rom
rom /home/pi/mac/QUAD650.ROM

screen win/512/384
#screen dga/640/480
#screen dga/512/384
fbdevicefile /usr/local/share/BasiliskII/fbdevices
#screen dga/cgsix

ignoresegv true

extfs /home/pi/mac/

frameskip 0

seriala /dev/ttyS0
serialb /dev/ttyS1
udptunnel false
udpport 6066
bootdrive 0
bootdriver 0
#ramsize 8388608
ramsize 32000000

modelid 14
cpu 4
fpu false
nocdrom true
nosound false
noclipconversion false
nogui false
jit false
jitfpu false
jitdebug false
jitcachesize 0
jitlazyflush false
jitinline false
keyboardtype 5
keycodes false
mousewheelmode 1
mousewheellines 3
dsp /dev/dsp
mixer /dev/mixer
ignoresegv false
idlewait true


If you want to play Prince2 fulll screen (which is 512x384) you'll have to start your Pi in 512x384 pixels faramebuffer (or whatever it's called). Edit your /boot/config.txt like so:
Code:
framebuffer_width=512
framebuffer_height=384


Now startx (actually: LXDE) and run "BasiliskII" from a terminal. Make it full screen with Alt + F11. The hard part is obtaining a Mackintosh hard drive image that works for you. See the l.a.r.g.e Emaculation about that here. Or download the "Total Pack" for Windows from the Prince of Persia fan site. That has the proper ROM and hard disk image to play Prince2 (and some other games).

Then you might have to set your wide screen 16:9 TV to old fashioned 4:3, else the aspect ratio is wrong.

P.S. I did manage to run BasiliskII without X. Compile it with the option "--enable-sdl-video" instead of "--enable-fbdev-dga". Start your Pi in "CEA mode" (which is meant for TV's, the other mode, DMT, is meant for computer monitors) by setting in your /boot/config.txt:
Code:
hdmi_group=1
hdmi_mode=1



Good luck w/ Apple gaming! :)


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri Aug 12, 2016 3:39 am 
Offline
Tinkerer
User avatar

Joined: Mon Sep 15, 2014 7:59 pm
Posts: 70
I don't get it. How can you resolve the 256 color problem? I have lemmings but it requires 256 color. I tried set screen win/800/600/8. It doesn't work.

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


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri Aug 12, 2016 4:23 am 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 1511
...and has anyone attempted building against Wayland instead of Xorg yet? This would get away from X, although not by using direct framebuffers or ncurses etc. I thought that you still needed SDL 1.2 to build BII on Linux, which means you need an SDL 1 target architecture.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri Aug 12, 2016 12:25 pm 
Offline
Student Driver
User avatar

Joined: Mon May 09, 2016 3:04 pm
Posts: 22
rickyzhang wrote:
I don't get it. How can you resolve the 256 color problem? I have lemmings but it requires 256 color. I tried set screen win/800/600/8. It doesn't work.

You have to compile BasiliskII from source code. The executable that comes w/ Linux (Debian) has SDL video enabled. I disabled that en enabled Frame Buffer. So the line that configures BII to be compiled fron source code becomes (see my post from 15 May 2016, 00:15):
Code:
./configure --disable-vosf --disable-jit-compiler --without-gtk --enable-sdl-audio --enable-fbdev-dga

If you're not familiar w/ compiling applications from source code then all this might look intimidating. But in my opinion it's worth the trouble alone for Prince2.

Good luck! :)


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri Aug 12, 2016 10:55 pm 
Offline
Apple Corer

Joined: Fri Sep 17, 2004 4:22 am
Posts: 280
rickyzhang wrote:
I don't get it. How can you resolve the 256 color problem? I have lemmings but it requires 256 color. I tried set screen win/800/600/8. It doesn't work.
Just to be clear: even after you get the Basilisk II settings correct, it is frequently necessary to go to the "Monitors & Sound" control panel within Mac OS, after you start Basilisk II, and select 256 colors. Some programs may not otherwise recognize that you are in fact running in 256 colors.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sat Aug 13, 2016 10:53 am 
Offline
Space Cadet

Joined: Sun Jun 13, 2010 3:50 am
Posts: 1
After much trial and error, for those getting the slow horizontal scroll out of the sdl framebuffer with Basilisk. The issue appears to be somekind of semaphore/mutex issue that affects single core setups.

Inside your .basilisk_ii_prefs file change

frameskip 0

to

frameskip 2

try and see. You may have to go slightly higher than 2 but 2 was the lowest that worked for me to get a solid screen.

on multicore pi this does not seem to be an issue.

Have fun!


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sun Aug 21, 2016 4:09 pm 
Offline
Tinkerer
User avatar

Joined: Mon Sep 15, 2014 7:59 pm
Posts: 70
MeneerJansen wrote:
rickyzhang wrote:
I don't get it. How can you resolve the 256 color problem? I have lemmings but it requires 256 color. I tried set screen win/800/600/8. It doesn't work.

You have to compile BasiliskII from source code. The executable that comes w/ Linux (Debian) has SDL video enabled. I disabled that en enabled Frame Buffer. So the line that configures BII to be compiled fron source code becomes (see my post from 15 May 2016, 00:15):
Code:
./configure --disable-vosf --disable-jit-compiler --without-gtk --enable-sdl-audio --enable-fbdev-dga

If you're not familiar w/ compiling applications from source code then all this might look intimidating. But in my opinion it's worth the trouble alone for Prince2.

Good luck! :)


I used sdl video to resolve 8bit color problem. My pull request has been merged to macemu upstream repo (https://github.com/cebix/macemu/commit/ ... 22730ab3af)

In your ~/.basilisk_ii_prefs, manually add
displaycolordepth [bit of color depth]
,eg
Code:
 displaycolordepth 8

2^8 = 256.

I have confirmed that it works for any customized window and full screen 256 color in X86-64 Linux, Intel and PPC Mac

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


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sun Aug 21, 2016 8:15 pm 
Offline
Student Driver
User avatar

Joined: Mon May 09, 2016 3:04 pm
Posts: 22
rickyzhang wrote:
MeneerJansen wrote:
rickyzhang wrote:
I don't get it. How can you resolve the 256 color problem? I have lemmings but it requires 256 color. I tried set screen win/800/600/8. It doesn't work.

You have to compile BasiliskII from source code. The executable that comes w/ Linux (Debian) has SDL video enabled. I disabled that en enabled Frame Buffer. So the line that configures BII to be compiled fron source code becomes (see my post from 15 May 2016, 00:15):
Code:
./configure --disable-vosf --disable-jit-compiler --without-gtk --enable-sdl-audio --enable-fbdev-dga

If you're not familiar w/ compiling applications from source code then all this might look intimidating. But in my opinion it's worth the trouble alone for Prince2.

Good luck! :)


I used sdl video to resolve 8bit color problem. My pull request has been merged to macemu upstream repo (https://github.com/cebix/macemu/commit/ ... 22730ab3af)

In your ~/.basilisk_ii_prefs, manually add
displaycolordepth [bit of color depth]
,eg
Code:
 displaycolordepth 8

2^8 = 256.

I have confirmed that it works for any customized window and full screen 256 color in X86-64 Linux, Intel and PPC Mac

There is this topic about Prince Of Persia 2 and BasiliskII: viewtopic.php?f=6&t=8940&start=25

I don't remember if I recompiled BII to run PoP2 on my "big" Linux computer too. But on my Raspberry Pi BII wouldn't run in 8 bit mode when compiled w/ SDL. Is the 'displaycolordepth' a new option that BII accepts through its config file?


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Mon Aug 22, 2016 12:37 am 
Offline
Tinkerer
User avatar

Joined: Mon Sep 15, 2014 7:59 pm
Posts: 70
I just added it last week.

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


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Mon Aug 22, 2016 3:30 am 
Offline
Tinkerer

Joined: Sat Jul 02, 2016 12:28 pm
Posts: 42
Is there any reason you do not add it on the screen line, as it used to be and as still works on some older Win compiles IIRC, like:

screen win/1024/768/8


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Mon Aug 22, 2016 9:43 am 
Offline
Tinkerer
User avatar

Joined: Mon Sep 15, 2014 7:59 pm
Posts: 70
If you use SDL, no matter what host OS Windows/Mac/Linux, it always enumerate all available color depth and pick the highest one. There is no way to override it. Because it didn't parse the fourth parameter (ie [1]/[2/[3]/[4]) in the source.

I have carefully review the monitor code in SDL part.

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


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Aug 24, 2016 8:39 am 
Offline
Student Driver
User avatar

Joined: Mon May 09, 2016 3:04 pm
Posts: 22
rickyzhang wrote:
I just added it last week.

Are you the maintainer of the source code then?


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Aug 24, 2016 8:50 am 
Offline
Tinkerer
User avatar

Joined: Mon Sep 15, 2014 7:59 pm
Posts: 70
No. It is my pull request. I believe Christian Bauer have handed over pull request merge to others.

It is pity that someone has fixed 64bit issues for slirp. But he just stopped in the middle. Kids nowadays doesn't have too much passion or patient.

The BII dev mailing list and github repo is QUITE. I want to migrate new QEMU Tiny Code Generator to BII so that it can be free from compiler constraint in JIT. But I don't see/hear anyone's response.

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


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Aug 24, 2016 9:48 am 
Offline
Student Driver
User avatar

Joined: Mon May 09, 2016 3:04 pm
Posts: 22
rickyzhang wrote:
No. It is my pull request. I believe Christian Bauer have handed over pull request merge to others.

It is pity that someone has fixed 64bit issues for slirp. But he just stopped in the middle. Kids nowadays doesn't have too much passion or patient.

The BII dev mailing list and github repo is QUITE. I want to migrate new QEMU Tiny Code Generator to BII so that it can be free from compiler constraint in JIT. But I don't see/hear anyone's response.

Unfortunately I am no programmer so I do not completely understand everything you're wrote. But am I correct in thinking that the option to set BII to 8 bit color in the settings file is not (yet) accepted by BII? At least for the SDL version?


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Aug 24, 2016 11:27 am 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 4692
Location: Amsterdam, Netherlands
rickyzhang wrote:
No. It is my pull request. I believe Christian Bauer have handed over pull request merge to others.

Indeed, there is no main developer for BasiliskII and SheepShaver anymore since 2006. The source code is guarded by "asvitkine", who also handles pull requests.

You pull request regarding customized color depth in SDL was merged 9 days ago.


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


Who is online

Users browsing this forum: No registered users and 2 guests


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

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