English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 30 May 2013, 06:54   #1
Vot
Registered User
 
Join Date: Aug 2012
Location: Australia
Posts: 651
SCSI Direct Sample Code

Hi,

There is a piece of sample code here for issuing scsi direct commands.

http://wiki.amigaos.net/index.php/SCSI_Device

The issue is this code may be for a newer version of amigaos or NSD or something because it doesn't compile against the 3.1 NDK.

The issue is it uses struct IOStdReq. Then tries to use that with OpenDevice, DoIO and CloseDevice. Which use struct ioRequest...

Im not familiar enough with coding on the amiga to fix it. Anyone know how to get this to compile with NDK 3.1.?
Vot is offline  
Old 30 May 2013, 10:28   #2
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,030
Well, it might be a bit overwhelming, but nevertheless here is an example which gets device info and capacity as well as table of contents and cd-text from an audio CD. It also gives (very) detailed information in case of an error.

It should compile with all NDKs from 2.0 to 4.1.

Regarding your problem: if you want to use a IOStdReq in place of an IORequest, you have to add a type cast:

struct IOStdReq *request;
DoIO ( (struct IORequest *) request);


Edit: there is the same example but does not read audio CDs but reads and writes the first and last block of a harddisk: http://eab.abime.net/showpost.php?p=703586&postcount=5
Attached Files
File Type: c scsi.c (41.0 KB, 273 views)

Last edited by thomas; 30 May 2013 at 10:50.
thomas is offline  
Old 04 July 2013, 04:38   #3
Vot
Registered User
 
Join Date: Aug 2012
Location: Australia
Posts: 651
Thanks for your fast reply, sorry it took so long to say thanks!
Vot is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
PFS3 or PFS3 SCSI Direct xalakibaniou project.ClassicWB 105 27 July 2013 22:08
crappy direct X in winuae 2.30? trydowave support.WinUAE 1 06 January 2011 18:30
a1200 and direct SCSI pbareges support.Hardware 2 08 August 2006 02:25
3D code and/or internet code for Blitz Basic 2.1 EdzUp Retrogaming General Discussion 0 10 February 2002 11:40

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:25.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07516 seconds with 14 queries