Login  •  Register


The time is now: Sat Jul 21, 2018 7:08 pm

Emaculation wiki  •  Delete all board cookies



Post new topic  Reply to topic Page 1 of 1 [ 25 posts ]
Print view Previous topic  |  Next topic
Author Message
 Post subject: Old sources
PostPosted: Sat Feb 14, 2015 12:45 am 
Offline
Student Driver

Joined: Sat Feb 14, 2015 12:34 am
Posts: 10
Hi,

I was cleaning up and found some old Basilisk II sources for the cdenable.sys driver. I believe that somebody asked for these a few years ago but I don't remember who. Please pass them along if you know who could have use for them:

http://www.dropbox.com/sh/a98jxchx4zi94np/AADsgMd91SC-gzyWLvZVrcnba

I will probably delete the folder in a couple of months or a year so please take them now if you need them.

Thanks,
Lauri


Top
 Profile  
Reply with quote Post a reply  
 Post subject: Re: Old sources
PostPosted: Sat Feb 14, 2015 6:52 am 
Offline
Expert User
User avatar

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

Thanks!
It was me asking for them, as we can no longer use cdenable.sys in 64 bit windows hosts.
This is becoming a real problem, not in the least from the perspective of digital preservation. We have had conversations with large museums about keeping Basilisk/SheepShaver functional in modern times.

So please excuse me for jumping to the opportunity to ask you whether you would you be able to build a signed 64 bit version?

Best regards,
Cat_7


Top
 Profile  
Reply with quote Post a reply  
 Post subject: Re: Old sources
PostPosted: Sat Feb 14, 2015 8:22 am 
Offline
Student Driver

Joined: Sat Feb 14, 2015 12:34 am
Posts: 10
Hi Cat_7,

Ok, great, I hope that the code will be of some use to you.

Sorry, I have no means to sign it. I don't write programs for living any more, and I seriously doubt that my previous company would have provided me free driver signing anyway.

I think that there is a group of people (or company?) who might do the signing for you provided that the project is GPL?

Other than signing, building the 64-bit version of the sources should be straightforward. You probably know this already. Just create the project and handle any 32/64 bit conversions in the parameters as needed. Not much to do, as you can see the code is only a couple of hundreds lines.

Heh, I just found the sources for cdenabe.vxd too. I didn't remember what a hack it was. It modifies the executable code of one Win 9x driver (cdvsd.vxd) on the fly to overcome a hard-coded prevention to access the ISO superblock.of CDs. Microsoft was always putting so strange limitations to their code. I never figured out whether this one was a bug or a feature.

Lauri


Top
 Profile  
Reply with quote Post a reply  
 Post subject: Re: Old sources
PostPosted: Sat Feb 14, 2015 6:28 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2160
Location: Emaculation.com
At this point, it might even be worth reaching out to someone at MS (I'm sure there are some of you reading this thread) to see if a more modern shim (or even assistance on modifying the BII and SS code) could be made available for the purpose of supporting historical software.


Top
 Profile  
Reply with quote Post a reply  
 Post subject: Re: Old sources
PostPosted: Mon Feb 16, 2015 11:41 am 
Offline
Student Driver

Joined: Sat Feb 14, 2015 12:34 am
Posts: 10
You could ask Microsoft but I have a rather good guess what the answer would be.

Maybe it's not even necessary. Has anybody tried to see if modern Windows versions even need the driver approach in reading Mac and hybrid CD's anymore? Maybe the limitations plagued by the old Win versions are gone and Mac CD's can be read using normal Windows API calls.

I don't have many Mac DC's but I ran some quick tests under Windows 7 / 64 bit and they were successful. I could read the few HFS disks I have. A hybrid CD worked too (it was a Mac+ISO-9660 w/rock ridge extensions).

If someone is willing to compile Basilisk and SheepShaver and do all the testing + committing, I could write the code for you, if you want.

Lauri


Top
 Profile  
Reply with quote Post a reply  
 Post subject: Re: Old sources
PostPosted: Mon Feb 16, 2015 12:33 pm 
Offline
Expert User
User avatar

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

That's a great offer. I hear you saying the need for a driver is gone ;-)
What environment do you think is needed to build your Basilisk/SheepShaver? I think no one currently has a modern VS chain setup. The latest builds were produced with MinGW or Cygwin.

Best,
Cat_7


Top
 Profile  
Reply with quote Post a reply  
 Post subject: Re: Old sources
PostPosted: Mon Feb 16, 2015 12:58 pm 
Offline
Student Driver

Joined: Sat Feb 14, 2015 12:34 am
Posts: 10
Hi Cat_7,

> I hear you saying the need for a driver is gone ;-)

So it seems, indeed -- but more tests are required because as I said, I only ran the test code with a few CD's. Anyway it looks promising enough to give this a shot.

> What environment do you think is needed to build your Basilisk/SheepShaver? I think no one currently has a modern VS chain setup. The latest builds were produced with MinGW or Cygwin.

Well I have not compiled Basilisk in ages, and I have never build SheepShaver. I don't currently have any build environment for Basilisk either. I can do tests with some versions of Visual Studio. I was hoping that you have some environment, should it be MinGW, Cygwin or anything else. The code what I was thinking to write should work with any of them.

The only thing I would need is the latest ntcd.cpp file, or URL pointing to the file. I would modify it and send it to you. You would build B2 and/or SS and see how it works, testing with as many HFS and hybrid CD's you can.

Would this plan work for you?

Lauri


Top
 Profile  
Reply with quote Post a reply  
 Post subject: Re: Old sources
PostPosted: Mon Feb 16, 2015 2:14 pm 
Offline
Master Emulator

Joined: Fri Sep 17, 2004 4:22 am
Posts: 309
Might I politely inquire if there is any sign of HFV Explorer sources too?


Top
 Profile  
Reply with quote Post a reply  
 Post subject: Re: Old sources
PostPosted: Mon Feb 16, 2015 2:39 pm 
Offline
Student Driver

Joined: Sat Feb 14, 2015 12:34 am
Posts: 10
> Might I politely inquire if there is any sign of HFV Explorer sources too?

I found some HFV Explorer files but not yet a complete set. But I still need to check many old hard disks and a lot of backup media. If I will find a full set of files, I will post them. I would say there is a fair chance that the files are there. It will take some time though.

Hmm, I was pretty sure that these boxes were lost. I already found some family photos and other documents which are of great value to me, so I'm pretty glad now.

Lauri


Top
 Profile  
Reply with quote Post a reply  
 Post subject: Re: Old sources
PostPosted: Mon Feb 16, 2015 2:52 pm 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 5063
Location: Amsterdam, Netherlands
Latest 'official' BasiliskII and SheepShaver source is here: https://github.com/cebix/macemu

The ntcd.cpp file in that source is here: https://github.com/cebix/macemu/blob/ma ... e/ntcd.cpp


Last edited by Ronald P. Regensburg on Mon Feb 16, 2015 2:54 pm, edited 1 time in total.
 


Top
 Profile  
Reply with quote Post a reply  
 Post subject: Re: Old sources
PostPosted: Mon Feb 16, 2015 3:02 pm 
Offline
Student Driver

Joined: Sat Feb 14, 2015 12:34 am
Posts: 10
Thanks, I'll take a look.

Lauri


Top
 Profile  
Reply with quote Post a reply  
 Post subject: Re: Old sources
PostPosted: Mon Feb 16, 2015 10:30 pm 
Offline
Expert User
User avatar

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

Quote:
The only thing I would need is the latest ntcd.cpp file, or URL pointing to the file. I would modify it and send it to you. You would build B2 and/or SS and see how it works, testing with as many HFS and hybrid CD's you can.

Would this plan work for you?


Yes, I'm putting together a build environment, which presents its own share of problems.

Best,
Cat_7


Top
 Profile  
Reply with quote Post a reply  
 Post subject: Re: Old sources
PostPosted: Tue Feb 17, 2015 12:59 am 
Offline
Student Driver

Joined: Sat Feb 14, 2015 12:34 am
Posts: 10
Thank you for taking the trouble to set up the environment. There is only so much time that I can use with this and I'm not in a very good health, but with your help, I believe that we should be able to make it work.

The modified sources are now in the same Dropbox folder; Ntcd.cpp and two other files. The changes in those two are not critical (removes the error message of the missing driver file and frees a memory buffer when shutting down).

I only tested with an account with administrator rights. If you have problems with a normal account, please test as an admin and let me know.

Lauri


Top
 Profile  
Reply with quote Post a reply  
 Post subject: Re: Old sources
PostPosted: Tue Feb 17, 2015 9:14 am 
Offline
Expert User
User avatar

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

Very good news: I built a new basiliskII with MingGW/GCC 4.8 and your sources.
I can now:
-Boot from HFS
-Eject CD's
-Have polling detect changed CDs

Basilisk crashes when an audio CD is in the drive at boot.
Basilisk can detect the audio CD when it is inserted after boot, and seems to play it, but without sound. Changing sound input to internal CD crashes Basilisk. Such a crash renders the hard disk file unbootable. A one-time boot from CD fixes that. This, however, is an old bug ;-)

I haven't tested with other cd's yet. And I still need to find a way to compile SheepShaver.

Best regards,
Cat_7


Top
 Profile  
Reply with quote Post a reply  
 Post subject: Re: Old sources
PostPosted: Tue Feb 17, 2015 10:53 am 
Offline
Student Driver

Joined: Sat Feb 14, 2015 12:34 am
Posts: 10
Ok, that is great! Promising :)

Audio CD's require different sector sizes and alignment and should be read with DeviceIoControl calls. I will change the code accordingly and will let you know.

Btw, is your computer 64 bits and did it previously have working CD access in Basilisk?

I wrote the code so that if one has the .sys driver up and running, it is used as always before, in order not to break existing systems. The new code is used as a fallback if the driver fails to start for any reason.

I should have mentioned that if the driver is running and the user wants to test the new code, the cdenable.sys driver must be either stopped, renamed or deleted (either the service or the file, whichever).

And what about admin rights, does your current user account have those?

Lauri


Top
 Profile  
Reply with quote Post a reply  
 Post subject: Re: Old sources
PostPosted: Tue Feb 17, 2015 12:17 pm 
Offline
Expert User
User avatar

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

My computer runs windows 7 64 bit. So I did not have CD access previously. I could only open cd images.
I did place cdenable.sys in some system folder to prevent the error message about it not being installed when CD support is enabled.

I don't have 32 bit windows running on a machine with cdrom drive, so I can't test the fallback behaviour change.

EDIT 1 Update: I just tested the new build in Windows XP 32 bit, in Virtual box. Both with and without cdenable.sys, I can boot/poll HFS CD's passed through to the guest.

EDIT 2: When running as a normal no-admin user in Windows 7 64 bit, I still have access to CD's. So there is no problem wrt to permissions.

EDIT 3: The error I mentioned above about not being able to find cdenable.sys is gone with the new build in Windows 7 64 bit.

EDIT 4: Hybrid audio/data Cd's only show the audio part.

Best,
Cat_7


Last edited by Cat_7 on Tue Feb 17, 2015 2:12 pm, edited 1 time in total.


Top
 Profile  
Reply with quote Post a reply  
 Post subject: Re: Old sources
PostPosted: Fri Feb 20, 2015 11:04 am 
Offline
Student Driver

Joined: Sat Feb 14, 2015 12:34 am
Posts: 10
Ok. I'm glad that elevated permissions were not needed under Windows 7. Interestingly, the tester code did in fact work correctly in Virtual PC running Windows XP. The virtual user had admin rights.

I know now that it is possible to read audio cd's using ioctl SCSI pass-through calls, using the ATAPI raw read cd command. But I'm not sure whether this code should be married with Basilisk without thorough testing. It could open an unexpected can of worms. If I someday get interested enough to actually build Basilisk I could debug to see what else needs to be done.

Anyway the patch I wrote should be valuable to some people. I edited the code slightly, allocated memory buffer was not checked for alignment. This is essential with SCSI passthrough, I don't know about readfile call that the tester uses.

Based on the information I have now, the cdenable driver would be the best option hands down. I took a look at the ethernet b2ether 64 bit changes in Github. Interestingly, I didn't notice any relevant changes to my old C code, only new 64 bit project files were added. Has this verified to work on Windows 7 for example? Maybe not many, if any, changes are needed for the cd driver code I posted in the first message. So feel free to distribute both the driver code and this patch if you want, perhaps something good will result from it.

I see two other possibilities for someone wanting to proceed with the driver:

- study if the driver can be ported to be an UMDF driver. Because those run in user mode, signing of the driver should not be an issue. The driver package requires signing, but self-signing is allowed if I understood correctly. For this to work, the UMDF model must support all the functions used by cdenable.c. I don't know if this is the case.

- build the 64 bit kernel mode driver using the code I posted. Then sign it yourself with your self-made certificate. Install the certificate as a trusted root authority. It should then run in the local computer.

I may take a look at the new DDK myself if I have a chance.

Lauri


Top
 Profile  
Reply with quote Post a reply  
 Post subject: Re: Old sources
PostPosted: Fri Feb 20, 2015 6:30 pm 
Offline
Expert User
User avatar

Joined: Fri Feb 13, 2004 8:59 am
Posts: 4354
Location: Sittard, The Netherlands
Quote:
- build the 64 bit kernel mode driver using the code I posted. Then sign it yourself with your self-made certificate. Install the certificate as a trusted root authority. It should then run in the local computer.


Hi,
Yes, this a path to follow. However, much like with the 64 bit ethernet driver, this requires everyone to self-sign the drivers. In my humble opinion, this is too much to ask from the average user.

Quote:
I took a look at the ethernet b2ether 64 bit changes in Github. Interestingly, I didn't notice any relevant changes to my old C code, only new 64 bit project files were added. Has this verified to work on Windows 7 for example?


Yes, this works, but I had to run it in test mode. This is what the readme has to say:
-You will need to enable "test mode" in 64 bit Windows Vista/7 to load this self signed driver.
Use F8 during startup and select "disable driver signature enforcement", this puts Windows is test mode.
An alternative is to use 'Driver Signature Enforcement Overrider' or DSEO.

Compiled driver and source are here:
http://www.open.ou.nl/hsp/downloads2/b2 ... 132012.zip

Best,
Cat_7


Top
 Profile  
Reply with quote Post a reply  
 Post subject: Re: Old sources
PostPosted: Sat Feb 21, 2015 3:55 am 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2160
Location: Emaculation.com
I don't know if any of you have been following this week's SuperFish fiasco, but what happened there is Lenovo ended up dropping some adware in their laptops that installs a root certificate with full permissions. Someone figured out the password and private key, so now anyone can write/run software/websites/etc. against that certificate which has full permissions.

The reason I bring this up is that if SuperFish can do this, a similar technique could be used (on purpose) to install a root certificate for these drivers. The certificate would of course be limited to only enabling drivers, and whoever manages the certificate would have to use a much stronger password for the key, and not let it fall into the wrong hands. But the root cert install process looks pretty painless (InstallShield can automate the process) and that would make deployment dead-easy, as someone could install the certificate and drivers all at once.


Top
 Profile  
Reply with quote Post a reply  
 Post subject: Re: Old sources
PostPosted: Sun Feb 22, 2015 12:43 am 
Offline
Student Driver

Joined: Sat Feb 14, 2015 12:34 am
Posts: 10
Hmmm, I would think that Levono as a major multi-billion $ computer manufacturer has access to a certificate cross-signed by Microsoft -- something out of the reach of us mortals. If I understand correctly they didn't do anything technically challenging but just misused the trust.

Lauri


Top
 Profile  
Reply with quote Post a reply  
 Post subject: Re: Old sources
PostPosted: Sun Feb 22, 2015 3:25 pm 
Offline
Apple Corer

Joined: Sun Aug 25, 2013 3:25 am
Posts: 289
Location: Hong Kong
adespoton wrote:
I don't know if any of you have been following this week's SuperFish fiasco, but what happened there is Lenovo ended up dropping some adware in their laptops that installs a root certificate with full permissions. Someone figured out the password and private key, so now anyone can write/run software/websites/etc. against that certificate which has full permissions.

The reason I bring this up is that if SuperFish can do this, a similar technique could be used (on purpose) to install a root certificate for these drivers. The certificate would of course be limited to only enabling drivers, and whoever manages the certificate would have to use a much stronger password for the key, and not let it fall into the wrong hands. But the root cert install process looks pretty painless (InstallShield can automate the process) and that would make deployment dead-easy, as someone could install the certificate and drivers all at once.


how much can a code cert cost?

I'm almost interested in buying one for a project just to bypass the nonsense.

_________________
don't do today what you can put off until tomorrow.


Top
 Profile  
Reply with quote Post a reply  
 Post subject: Re: Old sources
PostPosted: Sun Feb 22, 2015 3:34 pm 
Offline
Expert User
User avatar

Joined: Fri Feb 13, 2004 8:59 am
Posts: 4354
Location: Sittard, The Netherlands
Read here:
https://www.digicert.com/order/order-1.php
Digicert ask around $100 a year


Last edited by Cat_7 on Sun Feb 22, 2015 3:36 pm, edited 1 time in total.
 


Top
 Profile  
Reply with quote Post a reply  
 Post subject: Re: Old sources
PostPosted: Mon Mar 16, 2015 7:32 pm 
Offline
Master Emulator

Joined: Fri Sep 17, 2004 4:22 am
Posts: 309
lpe wrote:
I found some HFV Explorer files but not yet a complete set. But I still need to check many old hard disks and a lot of backup media. If I will find a full set of files, I will post them. I would say there is a fair chance that the files are there. It will take some time though.
Can I ask if those ever turned up? It offers such tantalizing possibilities.


Top
 Profile  
Reply with quote Post a reply  
 Post subject: Re: Old sources
PostPosted: Wed May 06, 2015 6:59 am 
Offline
Inquisitive Elf

Joined: Sat Nov 26, 2011 3:08 am
Posts: 25
+1 to the HFV Explorer source code.

I've mirrored a copy of the CDENABLE.SYS source on my collection of Basilisk II source dumps. https://drive.google.com/open?id=0B7Z23 ... authuser=0

If you have any other versions I'm missing, I'd be happy to copy them there.


Top
 Profile  
Reply with quote Post a reply  
 Post subject: Re: Old sources
PostPosted: Sat Jul 07, 2018 3:01 pm 
Offline
Space Cadet

Joined: Tue Dec 06, 2011 3:45 pm
Posts: 6
Location: The Netherlands
superpete wrote:
+1 to the HFV Explorer source code.


I'd also like access to the source code.
Judging by the program's documentation, the plan once was to make it Free Software.


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


Who is online

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