00001 /* ES40 emulator. 00002 * Copyright (C) 2007 by the ES40 Emulator Project 00003 * 00004 * WWW : http://sourceforge.net/projects/es40 00005 * E-mail : camiel@camicom.com 00006 * 00007 * This program is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU General Public License 00009 * as published by the Free Software Foundation; either version 2 00010 * of the License, or (at your option) any later version. 00011 * 00012 * This program is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, write to the Free Software 00019 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00020 * 00021 * Although this is not required, the author would appreciate being notified of, 00022 * and receiving any modifications you may make to the source code that might serve 00023 * the general public. 00024 */ 00025 00041 #if !defined(__DISKDEV_H__) 00042 #define __DISKDEV_H__ 00043 00044 #include "Disk.h" 00045 00049 class CDiskDevice : public CDisk 00050 { 00051 public: 00052 CDiskDevice(CConfigurator* cfg, CSystem* sys, CDiskController* c, 00053 int idebus, int idedev); 00054 virtual ~CDiskDevice(void); 00055 00056 virtual bool seek_byte(off_t_large byte); 00057 virtual size_t read_bytes(void* dest, size_t bytes); 00058 virtual size_t write_bytes(void* src, size_t bytes); 00059 protected: 00060 #if defined(_WIN32) 00061 HANDLE handle; 00062 char* buffer; 00063 size_t buffer_size; 00064 size_t dev_block_size; 00065 #else 00066 FILE* handle; 00067 #endif 00068 char* filename; 00069 }; 00070 #endif