DOSBox-X
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
src/hardware/parport/directlpt_win32.h
00001 /*
00002  *  Copyright (C) 2002-2020  The DOSBox Team
00003  *
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 2 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU General Public License along
00015  *  with this program; if not, write to the Free Software Foundation, Inc.,
00016  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017  */
00018 
00019 // include guard
00020 #ifndef DOSBOX_DIRECTLPT_WIN32_H
00021 #define DOSBOX_DIRECTLPT_WIN32_H
00022 
00023 #include "config.h"
00024 #include "setup.h"
00025 
00026 #if C_DIRECTLPT
00027 #ifdef WIN32
00028 
00029 
00030 
00031 #define DIRECTLPT_AVAILIBLE
00032 #include "parport.h"
00033 //#include <windows.h>
00034 
00035 
00036 class CDirectLPT : public CParallel {
00037 public:
00038         //HANDLE driverHandle;
00039         Bit32u realbaseaddress = 0;
00040         Bit8u originalECPControlReg = 0;
00041         
00042         CDirectLPT(
00043                         Bitu nr,
00044                         Bit8u initIrq,
00045                         CommandLine* cmd
00046             );
00047         
00048 
00049         ~CDirectLPT();
00050         
00051         bool interruptflag = false;
00052         bool isECP = false;
00053         bool InstallationSuccessful = false;    // check after constructing. If
00054                                                                         // something was wrong, delete it right away.
00055         bool ack_polarity = false;
00056 
00057         Bitu Read_PR();
00058         Bitu Read_COM();
00059         Bitu Read_SR();
00060 
00061         void Write_PR(Bitu);
00062         void Write_CON(Bitu);
00063         void Write_IOSEL(Bitu);
00064         bool Putchar(Bit8u);
00065 
00066         void handleUpperEvent(Bit16u type);
00067 };
00068 
00069 #endif  // WIN32
00070 #endif  // C_DIRECTLPT
00071 #endif  // include guard