Subversion Repositories pentevo

Rev

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

  1. #pragma once
  2. #include "sndrender/emul_2203.h"
  3. #include "sndrender/sndchip.h"
  4. #include "sndrender/saa1099.h"
  5.  
  6. #define ROMLED_TIME 16
  7.  
  8. #pragma pack(8)
  9. struct PALETTE_OPTIONS
  10. { // custom palettes
  11.    char name[33];
  12.    unsigned ZZ,ZN,NN,NB,BB,ZB;
  13.    unsigned r11,r12,r13,r21,r22,r23,r31,r32,r33;
  14. };
  15. #pragma pack()
  16.  
  17. enum
  18. {
  19.    VK_LMB = 0x101,
  20.    VK_RMB,
  21.    VK_MMB,
  22.    VK_MWU,
  23.    VK_MWD,
  24.    VK_JLEFT,
  25.    VK_JRIGHT,
  26.    VK_JUP,
  27.    VK_JDOWN,
  28.    VK_JFIRE,
  29.    VK_JB0 = VK_JFIRE,
  30.    VK_JB1,
  31.    VK_JB2,
  32.    VK_JB3,
  33.    VK_JB4,
  34.    VK_JB5,
  35.    VK_JB6,
  36.    VK_JB7,
  37.    VK_JB8,
  38.    VK_JB9,
  39.    VK_JB10,
  40.    VK_JB11,
  41.    VK_JB12,
  42.    VK_JB13,
  43.    VK_JB14,
  44.    VK_JB15,
  45.    VK_JB16,
  46.    VK_JB17,
  47.    VK_JB18,
  48.    VK_JB19,
  49.    VK_JB20,
  50.    VK_JB21,
  51.    VK_JB22,
  52.    VK_JB23,
  53.    VK_JB24,
  54.    VK_JB25,
  55.    VK_JB26,
  56.    VK_JB27,
  57.    VK_JB28,
  58.    VK_JB29,
  59.    VK_JB30,
  60.    VK_JB31,
  61.    DIK_MENU,
  62.    DIK_CONTROL,
  63.    DIK_SHIFT,
  64.    VK_MAX
  65. };
  66.  
  67. enum
  68. {
  69.    MEMBITS_R = 0x01, MEMBITS_W = 0x02, MEMBITS_X = 0x04,
  70.    MEMBITS_BPR = 0x10, MEMBITS_BPW = 0x20, MEMBITS_BPX = 0x40
  71. };
  72.  
  73. struct GDIBMP
  74. {
  75.    BITMAPINFO header;
  76.    RGBQUAD waste[0x100];
  77. };
  78.  
  79. class TMainZ80 : public Z80
  80. {
  81. public:
  82.    TMainZ80(u32 Idx,
  83.        TBankNames BankNames, TStep Step, TDelta Delta,
  84.        TSetLastT SetLastT, u8 *membits, const TMemIf *FastMemIf, const TMemIf *DbgMemIf) :
  85.        Z80(Idx, BankNames, Step, Delta, SetLastT, membits, FastMemIf, DbgMemIf) { }
  86. /*
  87.    virtual unsigned char rm(unsigned addr) override;
  88.    virtual unsigned char dbgrm(unsigned addr) override;
  89.    virtual void wm(unsigned addr, unsigned char val) override;
  90.    virtual void dbgwm(unsigned addr, unsigned char val) override;
  91. */
  92.    virtual u8 *DirectMem(unsigned addr) const override; // get direct memory pointer in debuger
  93.  
  94.    virtual unsigned char m1_cycle() override;
  95.    virtual unsigned char in(unsigned port) override;
  96.    virtual void out(unsigned port, unsigned char val) override;
  97.    virtual u8 IntVec() override;
  98.    virtual void CheckNextFrame() override;
  99.    virtual void retn() override;
  100. };
  101.  
  102. extern PALETTE_OPTIONS pals[32];
  103.  
  104. extern CONFIG conf;
  105. extern COMPUTER comp;
  106. extern unsigned char memory[];
  107.  
  108. extern unsigned char cmos[0x100];
  109. extern unsigned char nvram[0x800];
  110.  
  111. extern char ininame[0x200];
  112. extern char helpname[0x200];
  113.  
  114. extern unsigned num_ula;
  115. extern char *ulapreset[64];
  116. extern char *setptr;
  117.  
  118. extern char *aystereo[64];
  119. extern char *ayvols[64];
  120. extern unsigned num_ayvols;
  121. extern unsigned num_aystereo;
  122.  
  123. extern DWORD WinVerMajor;
  124. extern DWORD WinVerMinor;
  125.  
  126. extern HWND wnd;
  127. extern HWND dlg;
  128. extern HINSTANCE hIn;
  129. extern unsigned nowait;
  130.  
  131. extern action ac_main[];
  132. extern action ac_main_xt[];
  133. extern action ac_mon[];
  134. extern action ac_regs[];
  135. extern action ac_trace[];
  136. extern action ac_mem[];
  137. extern RENDER renders[];
  138. extern VOID_FUNC prebuffers[];
  139.  
  140. extern const TMemModel mem_model[N_MM_MODELS];
  141.  
  142. extern zxkeymap zxk_maps[];
  143. extern const size_t zxk_maps_count;
  144.  
  145. extern virtkeyt pckeys[];
  146. extern const size_t pckeys_count;
  147.  
  148. extern keyports inports[VK_MAX];
  149.  
  150. extern unsigned trd_toload; // drive to load
  151. extern unsigned DefaultDrive; // ─шёъютюф яю єьюыўрэш■ т ъюЄюЁ√щ уЁєч Єё  юсЁрч√ фшёъют яЁш ёЄрЁЄх
  152.  
  153. extern unsigned char *base_sos_rom;
  154. extern unsigned char *base_dos_rom;
  155. extern unsigned char *base_128_rom;
  156. extern unsigned char *base_sys_rom;
  157.  
  158. extern ISA_MODEM modem;
  159. extern K_INPUT input;
  160.  
  161. extern unsigned brk_port_in;
  162. extern unsigned brk_port_out;
  163. extern unsigned char brk_port_val;
  164.  
  165. extern uintptr_t watch_script[4][64];
  166. extern unsigned char watch_enabled[4];
  167. extern unsigned char used_banks[MAX_PAGES];
  168. extern unsigned char trace_rom;
  169. extern unsigned char trace_ram;
  170.  
  171. extern TMainZ80 cpu;
  172. extern unsigned char dbgbreak;
  173. extern unsigned char snbuf[4*1048576]; // large temporary buffer (for reading snapshots)
  174. extern unsigned char gdibuf[2*1048576];
  175.  
  176. extern SNDCHIP ay[2];
  177.  
  178. extern unsigned char *bankr[4];
  179. extern unsigned char *bankw[4];
  180.  
  181. #ifdef MOD_GSBASS
  182. extern GSHLE gs;
  183. #endif
  184.  
  185. extern GDIBMP gdibmp;
  186. extern unsigned char needclr; // clear screenbuffer before rendering
  187. extern DWORD mousepos;  // left-clicked point in monitor
  188. extern PALETTEENTRY syspalette[0x100];
  189. extern unsigned char exitflag; // avoid call exit() twice
  190.  
  191. #define PLAYBUFSIZE 16384
  192. extern unsigned sndplaybuf[PLAYBUFSIZE];
  193. extern unsigned spbsize;
  194. extern unsigned char savesndtype; // 0-none,1-wave,2-vtx
  195. extern FILE *savesnd;
  196.  
  197. extern HBITMAP hbm;  // bitmap for repaint background
  198. extern DWORD bm_dx;
  199. extern DWORD bm_dy;
  200.  
  201. extern char droppedFile[512];
  202.  
  203. extern char statusline[128];
  204. extern unsigned statcnt;
  205.  
  206. extern bool normal_exit;
  207.  
  208. extern const char * const ay_schemes[];
  209.  
  210. #ifdef MOD_GSZ80
  211. extern class TGsZ80 gscpu;
  212.  
  213. namespace z80gs
  214. {
  215.     extern SNDRENDER sound;
  216.     extern u8 membits[];
  217. }
  218. #endif
  219.  
  220. extern ATA_PORT hdd;   // not in `comp' - not cleared in reset()
  221. extern char arcbuffer[0x2000]; // extensions and command lines for archivers
  222. extern char skiparc[0x400]; // ignore this files in archive
  223. extern char trd_loaded[4]; // used to get first free drive with no account of autoloaded images
  224. extern unsigned char kbdpc[VK_MAX]; // add cells for mouse & joystick
  225.  
  226. extern char pressedit; //Alone Coder
  227. extern int fmsoundon0; //Alone Coder
  228. extern int tfmstatuson0; //Alone Coder
  229.  
  230. // for leds
  231. extern unsigned char trdos_load;
  232. extern unsigned char trdos_save;
  233. extern unsigned char trdos_format;
  234. extern unsigned char trdos_seek;
  235. extern unsigned char membits[0x10000];
  236.  
  237. extern unsigned char *vtxbuf;
  238. extern unsigned vtxbufsize;
  239. extern unsigned vtxbuffilled;
  240.  
  241. extern unsigned snapsize;
  242.  
  243. extern unsigned char kbdpcEX[6]; //Dexus
  244.