/[projet1]/public/pc/tools/oric/OricBinaryTapeImage.h
Defence Force logotype

Annotation of /public/pc/tools/oric/OricBinaryTapeImage.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 314 - (hide annotations)
Tue Apr 27 13:26:32 2010 UTC (9 years, 7 months ago) by Vampire
File MIME type: text/plain
File size: 1280 byte(s)


1 Vampire 314 #pragma once
2    
3     #include "PulseWaveWriter.h"
4     #include "TapeWriter.h"
5    
6     class COricBinaryTapeImage
7     {
8     struct STapeHeader
9     {
10     unsigned char m_FirstZero; // Should be zero
11     unsigned char m_SecondZero; // Should be zero
12    
13     unsigned char m_Type; // 0x00 = basic, 0x80 = assembly
14    
15     unsigned char m_AutoStart; // 0x00 = No Autostart, 0x80 = Basic Autostart or $C7 = Assembly Autostart
16    
17     unsigned char m_HighEnd;
18     unsigned char m_LowEnd;
19    
20     unsigned char m_HighStart;
21     unsigned char m_LowStart;
22    
23     unsigned char m_ThirdZero;
24     };
25    
26     public:
27     COricBinaryTapeImage(void);
28     ~COricBinaryTapeImage(void);
29    
30     bool LoadBinary( CString filename);
31     bool WriteWave( CPulseWaveWriter *wave_writer) const;
32     bool WriteTape( CTapeWriter *tape_writer) const;
33    
34     void SetAutoStart( bool value) { m_Header.m_AutoStart = value ? 0xc7 : 0x00; }
35    
36     private:
37     void WritePair( CPulseWaveWriter *wave_writer, bool long_pulse) const;
38     void WriteByte( CPulseWaveWriter *wave_writer, byte out_byte) const;
39     void WriteByte( CTapeWriter *tape_writer, byte out_byte) const;
40    
41     private:
42     STapeHeader m_Header;
43     CString m_OricFilename;
44     byte * m_Buffer;
45     DWORD m_BufferLength;
46     };

  ViewVC Help
Powered by ViewVC 1.1.26