Subversion Repositories pentevo

Rev

Rev 883 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed | ?url?

  1. #pragma once
  2.  
  3. struct GSHLE
  4. {
  5.    unsigned char gsstat;// command and data bits
  6.    unsigned char gscmd;
  7.    unsigned char busy;  // don't play fx
  8.    unsigned char mod_playing;
  9.  
  10.    unsigned modvol, fxvol; // module and FX master volumes
  11.    unsigned used;       // used memory
  12.    unsigned char *mod; unsigned modsize; // for modplayer
  13.    unsigned total_fx;      // samples loaded
  14.    unsigned cur_fx;        // selected sample
  15.  
  16.    u8 speed;
  17.    u8 tempo;
  18.  
  19.    unsigned char data_in[8];// data register
  20.    unsigned char gstmp[8], *resptr; unsigned resmode; // from GS
  21.    unsigned char *to_ptr; unsigned resmod2; // to GS
  22.  
  23.    unsigned char *streamstart; unsigned streamsize;
  24.  
  25.    // 0 - close, 1 - load module, 2 - load unsigned sample, 3 - load signed sample
  26.    // 4 - covox
  27.    unsigned char load_stream;
  28.  
  29.    unsigned char loadmod, loadfx; // leds flags
  30.  
  31.    unsigned char badgs[0x100]; // unrecognized commands
  32.    float note2rate[0x100];
  33.  
  34.    struct SAMPLE {
  35.       unsigned char *start; // └фЁхё эрўрыр ё¤ьяыр т ярь Єш GS
  36.       unsigned loop;
  37.       unsigned end; // ╨рчьхЁ ё¤ьяыр т срщЄрї
  38.       unsigned char volume, note;
  39.       u8 Priority;
  40.       u8 SeekFirst;
  41.       u8 SeekLast;
  42.       u8 FineTune;
  43.  
  44.       // GS0,1 - ╦хт√х
  45.       // GS2,3 - ╧Ёрт√х
  46.       //     3210 - ═юьхЁр ърэрыют GS (шёяюы№чє■Єё  т ьрёърї SeekFirst/SeekLast)
  47.       //     ||||
  48.       // 00001111
  49.       //     ||||
  50.       //     3241 - ═юьхЁр ърэрыют Amiga (шёяюы№чє■Єё  тэєЄЁш ьюфєыхщ)
  51.    } sample[64];
  52.  
  53.    struct CHANNEL {
  54.       unsigned char *start;
  55.       unsigned loop, end, ptr;
  56.       unsigned volume;
  57.       float freq;
  58.       u8 Priority;
  59.       u8 FineTune;
  60.       HSTREAM bass_ch;
  61.       unsigned char busy;
  62.    } chan[4];
  63.  
  64.    CHANNEL DebugCh; // ╩рэры фы  яЁюшуЁ√трэш  ё¤ьяыют шч юЄырфўшър
  65.  
  66.  
  67.    unsigned char in(unsigned char port);
  68.    void out(unsigned char port, unsigned char byte);
  69.    void reset();
  70.    void reset_sound();
  71.    void applyconfig();
  72.  
  73.    void set_busy(unsigned char newval);
  74.    void start_fx(unsigned fx, unsigned chan, unsigned char vol, unsigned char note);
  75.    void flush_gs_frame(); // calc volume values for leds
  76.  
  77.    HMUSIC hmod;
  78.  
  79.    void runBASS();
  80.    void initChannels();
  81.    void setmodvol(unsigned vol);
  82.    void SetModSpeed();
  83.    void init_mod();
  84.    void restart_mod(unsigned order, unsigned row);
  85.    void startfx(CHANNEL *ch, float pan);
  86.    void resetmod();
  87.    void resetfx();
  88.    DWORD modgetpos();
  89.    void stop_mod();
  90.    void cont_mod();
  91.    void debug_note(unsigned i);
  92.    void debug_save_note(unsigned i, const char *FileName);
  93.    void debug_save_mod(const char *FileName);
  94.  
  95.    void reportError(const char *err, bool fatal = false);
  96. };
  97.