*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
* the following tests are wrong because lots of functions don't require the
* tray to be closed with a CD inside
*/
- TRACE("CDROM device driver -> command <%d>\n", (unsigned char)driver_request[2]);
+ TRACE("CDROM device driver -> command <%d>\n", driver_request[2]);
MSCDEX_Dump("Beg", driver_request, dorealmode);
PTR_AT(driver_request, 3, WORD) = 0;
devName[4] = 'A' + CDROM_GetHeap()->hdr.drive + driver_request[1];
h = CreateFileA(devName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0);
- if (!h) {
+ if (h == INVALID_HANDLE_VALUE) {
WARN("Couldn't open cdrom handle\n");
driver_request[4] |= 0x80;
driver_request[3] = 1; /* unknown unit */
ERR("CD-ROM driver: unsupported addressing mode !!\n");
Error = 0x0c;
}
- TRACE(" ----> HEAD LOCATION <%ld>\n", PTR_AT(io_stru, 2, DWORD));
+ TRACE(" ----> HEAD LOCATION <%d>\n", PTR_AT(io_stru, 2, DWORD));
break;
case 4: /* Audio channel info */
* 0 see below (Door closed/opened)
*/
if (!present) PTR_AT(io_stru, 1, DWORD) |= 1;
- TRACE(" ----> DEVICE STATUS <0x%08lx>\n", PTR_AT(io_stru, 1, DWORD));
+ TRACE(" ----> DEVICE STATUS <0x%08x>\n", PTR_AT(io_stru, 1, DWORD));
break;
case 8: /* Volume size */
PTR_AT(io_stru, 1, DWORD) = FRAME_OF_TOC(toc, toc.LastTrack + 1) -
FRAME_OF_TOC(toc, toc.FirstTrack) - 1;
- TRACE(" ----> VOLUME SIZE <%ld>\n", PTR_AT(io_stru, 1, DWORD));
+ TRACE(" ----> VOLUME SIZE <%d>\n", PTR_AT(io_stru, 1, DWORD));
break;
case 9: /* media changed ? */
MSCDEX_StoreMSF(FRAME_OF_TOC(toc, toc.LastTrack + 1) -
FRAME_OF_TOC(toc, toc.FirstTrack) - 1, io_stru + 3);
- TRACE(" ----> AUDIO DISK INFO <%d-%d/%08lx>\n",
+ TRACE(" ----> AUDIO DISK INFO <%d-%d/%08x>\n",
io_stru[1], io_stru[2], PTR_AT(io_stru, 3, DWORD));
break;
PTR_AT(io_stru, 2, DWORD) = 0;
io_stru[6] = 0;
}
- TRACE(" ----> AUDIO TRACK INFO[%d] = [%08lx:%d]\n",
+ TRACE(" ----> AUDIO TRACK INFO[%d] = [%08x:%d]\n",
io_stru[1], PTR_AT(io_stru, 2, DWORD), io_stru[6]);
break;
PTR_AT(io_stru, 3, DWORD) = FRAME_OF_TOC(toc, toc.FirstTrack);
PTR_AT(io_stru, 7, DWORD) = FRAME_OF_TOC(toc, toc.LastTrack + 1);
}
- TRACE("Audio status info: status=%04x startLoc=%ld endLoc=%ld\n",
+ TRACE("Audio status info: status=%04x startLoc=%d endLoc=%d\n",
PTR_AT(io_stru, 1, WORD), PTR_AT(io_stru, 3, DWORD), PTR_AT(io_stru, 7, DWORD));
break;
at = PTR_AT(driver_request, 20, DWORD);
- TRACE(" --> SEEK AUDIO mode :<0x%02X>, [%ld]\n",
- (BYTE)driver_request[13], at);
+ TRACE(" --> SEEK AUDIO mode :<0x%02X>, [%d]\n", driver_request[13], at);
switch (driver_request[13]) {
case 1: /* Red book addressing mode = 0:m:s:f */
beg = end = PTR_AT(driver_request, 14, DWORD);
end += PTR_AT(driver_request, 18, DWORD);
- TRACE(" --> PLAY AUDIO mode :<0x%02X>, [%ld-%ld]\n",
- (BYTE)driver_request[13], beg, end);
+ TRACE(" --> PLAY AUDIO mode :<0x%02X>, [%d-%d]\n", driver_request[13], beg, end);
switch (driver_request[13]) {
case 1:
if (!driver_request) {
/* FIXME - to be deleted ?? */
ERR("ES:BX==0 ! SEGFAULT ?\n");
- ERR("-->BX=0x%04x, ES=0x%04lx, DS=0x%04lx, CX=0x%04x\n",
+ ERR("-->BX=0x%04x, ES=0x%04x, DS=0x%04x, CX=0x%04x\n",
BX_reg(context), context->SegEs, context->SegDs, CX_reg(context));
driver_request[4] |= 0x80;
driver_request[3] = 5; /* bad request length */