Login  •  Register


The time is now: Wed Nov 26, 2014 4:04 pm

Emaculation wiki  •  Delete all board cookies



Post new topic  Reply to topic Page 1 of 1 [ 20 posts ]
Print view Previous topic  |  Next topic
Author Message
PostPosted: Tue Aug 11, 2009 5:57 am 
Offline
Tinkerer

Joined: Sun Jul 05, 2009 10:33 pm
Posts: 72
Regarding the problem of SheepShaver crashing when you attempt to boot OS 7.5 with no initial NVRAM...

I've found the magic byte. All you need is 0x25 at NVRAM offset 0x138a.

SheepShaver does not initialize this value.

If you boot with an Old World ROM, it reads this value and if it is 0x00, it changes it to 0x05.

If you boot with OS 8 it must be getting set to 0x25. (I haven't run that trace to confirm.)

I don't know what 0x25 means. The "5" means that 32-bit addressing is on. If the high nybble was 8 then it would mean that the 68040 cache was on. But a "2" isn't documented.

So it is likely it has something to do with memory or cache.

A simple fix would be to have SheepShaver init this NVRAM byte to 0x25.

But what we don't know is if there would be consequences. I'm wondering about impact on Mac OS prior to 7.5.5.

Note: OS 7.5.5 was the last to support non-32 bit clean Macs, including all with less than a 68030 CPU.


Top
 Profile  
Post a reply  
PostPosted: Tue Aug 11, 2009 10:20 am 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 4036
Location: Amsterdam, Netherlands
mschmitt wrote:
I'm wondering about impact on Mac OS prior to 7.5.5.

Which system versions are you referring to? SheepShaver does not run anything earlier than 7.5.3, or does it?


Top
 Profile  
Post a reply  
PostPosted: Wed Aug 12, 2009 12:56 am 
Offline
Tinkerer

Joined: Sun Jul 05, 2009 10:33 pm
Posts: 72
Ronald P. Regensburg wrote:
Which system versions are you referring to? SheepShaver does not run anything earlier than 7.5.3, or does it?

Oops, you're right.


Meanwhile, I now know what this XPRAM setting is for: 25 means the Modern Memory Manager is turned on, which should be the default for System 7 on PowerPC machines. 05 means the Modern Memory Manager is turned off.

What is the Modern Memory Manager? The previous memory manager was written in 680x0 assembly-language. When Apple did the transition to PowerPC processors, they rewrote the memory manager in C and compiled it into native PowerPC code.

The API to the both versions of the memory manager was the same.

In System 7.5.x users can choose to run with the old memory manager if they want.

It would appear that something in SheepShaver doesn't like running with the 680x0 version of the memory manager.


Top
 Profile  
Post a reply  
PostPosted: Wed Aug 12, 2009 8:55 am 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 4036
Location: Amsterdam, Netherlands
mschmitt wrote:
It would appear that something in SheepShaver doesn't like running with the 680x0 version of the memory manager.


I tried switching between modern memory management on and off in 7.5.5. System 7.5.5 runs fine in SheepShaver with modern memory manager either on or off. However, switching between the two memory management versions (in both directions) appears to be problematic. I have no time today to investigate further. Possibly there is a timing problem writing to and reading from the nvram file.


Top
 Profile  
Post a reply  
PostPosted: Thu Aug 13, 2009 3:40 am 
Offline
Tinkerer

Joined: Sun Jul 05, 2009 10:33 pm
Posts: 72
Ronald P. Regensburg wrote:
I tried switching between modern memory management on and off in 7.5.5. System 7.5.5 runs fine in SheepShaver with modern memory manager either on or off. However, switching between the two memory management versions (in both directions) appears to be problematic. I have no time today to investigate further. Possibly there is a timing problem writing to and reading from the nvram file.

I was testing with System 7.5.3 Revision 2. I upgraded to System 7.5.5, but I get the same results:
  • If the Modern Memory Manager is On, it boots fine.
  • If the MMM is off, then it gets a SIGSEGV when it boots.
  • If I start without an NVRAM, on boot it sets the MMM off. And then dies with the SIGSEGV.
  • But if I change SheepShaver so it initializes new nvram files with the MMM set to be on, then it works.
  • Result is the same regardless of whether I boot from a physical CD, an image of the CD, or a hard drive file.
I'm testing with the host as OS X Intel.

Note: The Modern Memory Manager setting is read when it starts up, so if you change it in the control panel, the change won't take effect until you restart.

Also, SheepShaver only saves the nvram once per minute. I haven't figured out yet whether it will always save it when you shut down or restart.

I have some more testing to do.


Top
 Profile  
Post a reply  
 Post subject:
PostPosted: Thu Aug 20, 2009 3:53 am 
Offline
Tinkerer

Joined: Sun Jul 05, 2009 10:33 pm
Posts: 72
Status report:

I tested my NVRAM initialization fix using System 7.5, OS 8, OS 8.5 and OS 9, on a PowerMac 8500 ROM (Old World, TNT), Mac OS ROM 1.2.1 and Mac OS ROM 1.6.

The good news is it has two beneficial effects:
  1. It fixes booting System 7.5 without an NVRAM file
  2. For some reason, it helps with the problem of OS 8 & OS 8.5 ejecting the CD
Further good news is I can find no harmful effects.

The bad news is I get a SIGSEGV booting OS 8 on the Old World ROM, both with and without my fix. So I'll have to do some more investigating; perhaps there is another NVRAM setting at work.


Top
 Profile  
Post a reply  
 Post subject:
PostPosted: Mon Aug 24, 2009 12:15 am 
Offline
Tinkerer

Joined: Sun Jul 05, 2009 10:33 pm
Posts: 72
I've uploaded a new SheepShaver Universal Binary, built from the most recent CVS.

It contains:
  • The RAM-anywhere changes.
  • The logic for handling sheepvm bundles.
  • The recently committed changes for precise timing under OS X.

    Note: The build issue is now fixed in CVS.

    (I wonder if the precise timer has any effect on some of the outstanding SheepShaver bugs, such as QuickTime support? Or the freeze that happens when you run the Mac OS network setup wizard?)
  • The fix discussed in this thread to initialize the NVRAM to use the PPC memory manager, intended to fix issues with creating new OS 7.5 machines.
  • A new fix: If the ROM file is being found because it has the magic name "ROM" or "Mac OS ROM", then it will continue to be found even after the Preferences editor is used.

    This is intended to fix the issue where a user creates a new machine, with the ROM file in the SheepShaver application folder, then uses the Preferences editor to create the hard disk, but does not change the ROM path.
Try it out. If it works, I'll submit the patches for the last two items.

Here's the download link:

http://bit.ly/SheepShaver_UB_2009-08-23


Top
 Profile  
Post a reply  
 Post subject:
PostPosted: Mon Aug 24, 2009 12:37 pm 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 4036
Location: Amsterdam, Netherlands
Finding a "Mac OS ROM" or "ROM" file without a rom defined in the prefs file works.

The nvram fix seems to work for when no initial nvram file is present, but a couple of times I got a SIGSEGV while booting with a pre-existing nvram file (or ~/.sheepshaver_nvram file) that was created with a different setup (different MacOS version, different rom, earlier SheepShaver build). So far, I have not been able to reproduce this reliably.

(I am getting a little confused about what is and what is not (yet) committed to CVS and I do not know how your work and Myrd's work relate. The better default settings for a new VM are not available when the SheepShaver executable from this latest build is used in the SheepShaverLauncher.)


Top
 Profile  
Post a reply  
 Post subject:
PostPosted: Mon Aug 24, 2009 1:05 pm 
Offline
Tinkerer

Joined: Sun Jul 05, 2009 10:33 pm
Posts: 72
Ronald P. Regensburg wrote:
The nvram fix seems to work for when no initial nvram file is present, but a couple of times I got a SIGSEGV while booting with a pre-existing nvram file (or ~/.sheepshaver_nvram file) that was created with a different setup (different MacOS version, different rom, earlier SheepShaver build). So far, I have not been able to reproduce this reliably.

My fix only affects when SheepShaver initializes a new NVRAM file (or after the NVRAM/PRAM/XPRAM has been zapped). It has no effect on any processing that takes place with an existing NVRAM.

Note: I'm still having trouble booting OS 8 on an Old World ROM, with and without my change. I suspect another NVRAM issue but I'm not sure yet.

Quote:
(I am getting a little confused about what is and what is not (yet) committed to CVS and I do not know how your work and Myrd's work relate. The better default settings for a new VM are not available when the SheepShaver executable from this latest build is used in the SheepShaverLauncher.)

When you build SheepShaver now, it picks up a different version of the built-in preferences editor. The Launcher is a separate Xcode project, which has to be built separately, in Xcode. It is not built by the "make" build system.

Maybe the code for the better default settings is not in CVS yet.


Top
 Profile  
Post a reply  
 Post subject:
PostPosted: Tue Aug 25, 2009 1:22 pm 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 4036
Location: Amsterdam, Netherlands
mschmitt wrote:
Note: I'm still having trouble booting OS 8 on an Old World ROM, with and without my change. I suspect another NVRAM issue but I'm not sure yet.

There may be a problem with the "The RAM-anywhere changes" in combination with certain MacOS installations, rather than a problem with the fix for no initial nvram. I have here a 7.5.5 installation that will consistently give me a SIGSEGV (late in the startup process) with both your 090726 build and your 090823 build, whether or not there is a initial nvram file, but that will boot and run fine with my 090319 build if a proper nvram file is present.

I have another 7.5.5 installation and also a 8.1 installation that do not have a problem with the newer builds. Both 7.5.5 installations are set to use Modern Memory Management.


Top
 Profile  
Post a reply  
 Post subject:
PostPosted: Tue Aug 25, 2009 3:29 pm 
Offline
Tinkerer

Joined: Sun Jul 05, 2009 10:33 pm
Posts: 72
Ronald P. Regensburg wrote:
There may be a problem with the "The RAM-anywhere changes" in combination with certain MacOS installations, rather than a problem with the fix for no initial nvram. I have here a 7.5.5 installation that will consistently give me a SIGSEGV (late in the startup process) with both your 090726 build and your 090823 build, whether or not there is a initial nvram file, but that will boot and run fine with my 090319 build if a proper nvram file is present.

I have another 7.5.5 installation and also a 8.1 installation that do not have a problem with the newer builds. Both 7.5.5 installations are set to use Modern Memory Management.

Exactly what ROM are you using? Are you testing on PPC or Intel?

Your test results don't match mine. One thing I tried was booting 7.5.3 with the "pinned" SheepShaver version, and it created the same Modern Memory Manager related SIGSEGV.

So I'm thinking it might be the ROM version.


Top
 Profile  
Post a reply  
 Post subject:
PostPosted: Tue Aug 25, 2009 9:55 pm 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 4036
Location: Amsterdam, Netherlands
I am testing in 10.5.8 on Intel and I use the same old world rom for all 7.5.3 through 8.1 installations. (What do you mean with "pinned" version?)

The 7.5.5 installation that gives a SIGSEGV* with your latest builds, both with or without a pre-existing nvram present, appears to boot normally with those builds with extensions off.

But it does boot normally with extensions enabled with the 090319 build (of course, as I wrote above, with a initial nvram file already present).

The extensions set in this 7.5.5 installation is different from the extensions set in the other 7.5.5 installation that does not have the problem with your builds. I will try to find which extension(s) is/are involved.

* This SIGSEGV seems different from the Modern Memory Related one and occurs later in the startup process.


Top
 Profile  
Post a reply  
 Post subject:
PostPosted: Wed Aug 26, 2009 11:37 am 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 4036
Location: Amsterdam, Netherlands
The extension in 7.5.5 that makes the latest builds crash with a SIGSEGV is "Video Digitizer Update".

I found four descriptions of the Video Digitizer Update extension:

- Part of the Apple MPEG Media System. Provides the software interface between the built-in video and the hardware MPEG card.
- Part of Apple MPEG Media System Software, this is the low level software interface to the video hardware for support of the Apple MPEG Media System card.
- Video Digitizer Component which supports the YUV protocol on older Macs with the built-in AV board.
- Installed by the Apple Video System for support of CU-SeeMe when using the Apple Video Card. Supposedly, all of the Apple Video Player options work perfectly without this file, but CU-SeeMe will not show your own picture in the "Self" window, nor will it provide options for sending video.

Obviously, this extension should not be used in SheepShaver because the hardware (the Apple MPEG card) is not available. Still, it is strange that the problem does not occur with the older build (without the "RAM-anywhere" changes) and only with the newer builds.

In this case the extension came with the original software bundle from a restore CD for a PPC Performa 5300 with System 7.5.1, first updated to 7.5.3 and next updated to 7.5.5.


Top
 Profile  
Post a reply  
 Post subject:
PostPosted: Wed Aug 26, 2009 1:44 pm 
Offline
Mac Mechanic

Joined: Fri Oct 26, 2007 7:56 am
Posts: 169
mschmitt wrote:
(I wonder if the precise timer has any effect on some of the outstanding SheepShaver bugs, such as QuickTime support?


I'm afraid QuickTime support is just as buggy as it has always been. Last night I installed QuickTime 6.0.3, but it isn't any better than it used to be. So I went back to version 5.0.2, which, for me, is reasonably stable (except for MIDI play).


Top
 Profile  
Post a reply  
PostPosted: Thu Aug 27, 2009 5:06 am 
Offline
Tinkerer

Joined: Sun Jul 05, 2009 10:33 pm
Posts: 72
Ronald P. Regensburg wrote:
What do you mean with "pinned" version?

I mean the 090319 version.

I have recreated the SIGSEGV with Ronald's extension.


Top
 Profile  
Post a reply  
 Post subject:
PostPosted: Sun Aug 30, 2009 11:48 pm 
Offline
Tinkerer

Joined: Sun Jul 05, 2009 10:33 pm
Posts: 72
The two fixes (NVRAM init for PPC memory manager, finding ROM in default location) are committed to CVS.

As for Roland's problem with the video extension: it appears that this extension was coded to expect the ROM to be loaded at a particular address, so it doesn't work when you relocate the ROM.

The SIGSEGV dump has an execution address of 0x48000012; the ROM used to be loaded at 0x4800000.

So when the ROM is loaded contiguous with the RAM, and the RAM is a small amount, then that address is unallocated.

This is disturbing -- where there is one program with such a dependency, there may be others.


I'm experimenting with Plan B: keeping the ROM at a fixed address, but trying to do the memory allocations before SDL inits the Cocoa application. This way the RAM should get a chance to load while the address space is still clean.


Top
 Profile  
Post a reply  
 Post subject:
PostPosted: Mon Sep 21, 2009 1:29 am 
Offline
Inquisitive Elf

Joined: Tue May 25, 2004 9:11 am
Posts: 37
Location: Russia
Where is download new build for Win32?


Top
 Profile  
Post a reply  
 Post subject:
PostPosted: Mon Sep 21, 2009 10:34 pm 
Offline
Tinkerer

Joined: Thu May 14, 2009 10:53 pm
Posts: 49
Location: Sidcup, England
ZOleg wrote:
Where is download new build for Win32?

http://www.emaculation.com/forum/viewto ... 25&start=0
or, more specifically,
http://www.open.ou.nl/hsp/downloads/She ... 3_2009.zip


Top
 Profile  
Post a reply  
 Post subject: Download Statistics
PostPosted: Tue Oct 20, 2009 4:35 pm 
Offline
Tinkerer

Joined: Sun Jul 05, 2009 10:33 pm
Posts: 72
The "SheepShaver UB 2009-08-23" version I posted has a download link via bit.ly. This provides download statistics.

As of today, it has been download 197 times:

96 United States
19 Japan
13 Other
13 France
10 Germany
9 United Kingdom
7 Canada
7 Australia
3 Sweden
3 Netherlands
3 Italy
3 Switzerland
2 New Zealand
2 Mexico
2 Spain
5 Other Countries


Top
 Profile  
Post a reply  
 Post subject:
PostPosted: Wed Oct 21, 2009 3:05 pm 
Offline
Site Admin
User avatar

Joined: Mon May 20, 2002 4:37 am
Posts: 3297
Location: Canada
I'm in love with statistics!

We get a lot of Japanese visitors to the site. But as far as I can tell, none of them post to the forum. :(

For the whole site, the visitors for the month so far come from these countries:

USA: 34%
Japan: 7%
Germany: 5%
UK: 5%
Canada: 5%
France: 5%
Australia: 4%
Netherlands: 4% (hey guys!)
Italy: 3%
Spain: 2%


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


Who is online

Users browsing this forum: No registered users and 4 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