Diff for /np2/win9x/debuguty/viewcmn.cpp between versions 1.1.1.1 and 1.8

version 1.1.1.1, 2003/10/16 17:59:09 version 1.8, 2005/03/20 08:58:19
Line 1 Line 1
 #include        "compiler.h"  #include        "compiler.h"
 #include        "resource.h"  #include        "resource.h"
 #include        "np2.h"  #include        "np2.h"
 #include        "i286.h"  
 #include        "memory.h"  
 #include        "pccore.h"  
 #include        "iocore.h"  
 #include        "bios.h"  
 #include        "viewer.h"  #include        "viewer.h"
   #include        "viewcmn.h"
 #include        "viewmenu.h"  #include        "viewmenu.h"
 #include        "viewmem.h"  #include        "viewmem.h"
 #include        "viewreg.h"  #include        "viewreg.h"
Line 14 Line 10
 #include        "view1mb.h"  #include        "view1mb.h"
 #include        "viewasm.h"  #include        "viewasm.h"
 #include        "viewsnd.h"  #include        "viewsnd.h"
   #include        "cpucore.h"
   #include        "pccore.h"
   #include        "iocore.h"
   #include        "bios.h"
   
   
 char viewcmn_hex[16] = {  const char viewcmn_hex[16] = {
                                 '0', '1', '2', '3', '4', '5', '6', '7',                                  '0', '1', '2', '3', '4', '5', '6', '7',
                                 '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};                                  '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
   
   
 void viewcmn_caption(NP2VIEW_T *view, char *buf) {  void viewcmn_caption(NP2VIEW_T *view, TCHAR *buf) {
   
         int             num;          int             num;
         char    *p;          TCHAR   *p;
   
         num = ((int)view - (int)np2view) / sizeof(NP2VIEW_T);          num = ((int)view - (int)np2view) / sizeof(NP2VIEW_T);
   
         if (view->lock) {          if (view->lock) {
                 p = "Locked";                  p = _T("Locked");
         }          }
         else {          else {
                 p = "Realtime";                  p = _T("Realtime");
         }          }
         wsprintf(buf, "%d.%s - NP2 Debug Utility", num+1, p);          wsprintf(buf, _T("%d.%s - NP2 Debug Utility"), num + 1, p);
 }  }
   
   
 void viewcmn_putcaption(NP2VIEW_T *view) {  void viewcmn_putcaption(NP2VIEW_T *view) {
   
         char    buf[256];          TCHAR   buf[256];
   
         viewcmn_caption(view, buf);          viewcmn_caption(view, buf);
         SetWindowText(view->hwnd, buf);          SetWindowText(view->hwnd, buf);
Line 50  void viewcmn_putcaption(NP2VIEW_T *view) Line 50  void viewcmn_putcaption(NP2VIEW_T *view)
   
 // ----  // ----
   
 BOOL viewcmn_alloc(VIEWMEMBUF *buf, DWORD size) {  BOOL viewcmn_alloc(VIEWMEMBUF *buf, UINT32 size) {
   
         if (buf->type == ALOOCTYPE_ERROR) {          if (buf->type == ALLOCTYPE_ERROR) {
                 return(FAILURE);                  return(FAILURE);
         }          }
         if (buf->size < size) {          if (buf->size < size) {
Line 62  BOOL viewcmn_alloc(VIEWMEMBUF *buf, DWOR Line 62  BOOL viewcmn_alloc(VIEWMEMBUF *buf, DWOR
                 ZeroMemory(buf, sizeof(VIEWMEMBUF));                  ZeroMemory(buf, sizeof(VIEWMEMBUF));
                 buf->ptr = malloc(size);                  buf->ptr = malloc(size);
                 if (!buf->ptr) {                  if (!buf->ptr) {
                         buf->type = ALOOCTYPE_ERROR;                          buf->type = ALLOCTYPE_ERROR;
                         return(FAILURE);                          return(FAILURE);
                 }                  }
                 buf->size = size;                  buf->size = size;
Line 97  NP2VIEW_T *viewcmn_find(HWND hwnd) { Line 97  NP2VIEW_T *viewcmn_find(HWND hwnd) {
 }  }
   
   
 void viewcmn_setmode(NP2VIEW_T *dst, NP2VIEW_T *src, BYTE type) {  void viewcmn_setmode(NP2VIEW_T *dst, NP2VIEW_T *src, UINT8 type) {
   
         switch(type) {          switch(type) {
                 case VIEWMODE_REG:                  case VIEWMODE_REG:
Line 155  void viewcmn_setbank(NP2VIEW_T *view) { Line 155  void viewcmn_setbank(NP2VIEW_T *view) {
   
         dmem = &view->dmem;          dmem = &view->dmem;
         dmem->vram = gdcs.disp;          dmem->vram = gdcs.disp;
         dmem->itf = itf.bank;          dmem->itf = CPU_ITFBANK;
         dmem->A20 = (BYTE)((extmem.adrsmask >> 20) & 1);          dmem->A20 = (UINT8)((CPU_ADRSMASK >> 20) & 1);
 }  }
   
   
 // ----  // ----
   
 static void modmenu(HMENU hmenu, int pos, WORD id,  static void modmenu(HMENU hmenu, int pos, UINT16 id,
                                                                                         const char *seg, WORD value) {                                                                                          const TCHAR *seg, UINT16 value) {
   
         char    buf[256];          TCHAR   buf[256];
   
         wsprintf(buf, "Seg = &%s [%04x]", seg, value);          wsprintf(buf, _T("Seg = &%s [%04x]"), seg, value);
         ModifyMenu(hmenu, pos, MF_BYPOSITION | MF_STRING, id, buf);          ModifyMenu(hmenu, pos, MF_BYPOSITION | MF_STRING, id, buf);
 }  }
   
Line 183  void viewcmn_setmenuseg(HWND hwnd) { Line 183  void viewcmn_setmenuseg(HWND hwnd) {
         hmenu = GetSubMenu(hparent, 2);          hmenu = GetSubMenu(hparent, 2);
   
         if (hmenu) {          if (hmenu) {
                 modmenu(hmenu, 2, IDM_SEGCS, "CS", I286_CS);                  modmenu(hmenu, 2, IDM_SEGCS, _T("CS"), CPU_CS);
                 modmenu(hmenu, 3, IDM_SEGDS, "DS", I286_DS);                  modmenu(hmenu, 3, IDM_SEGDS, _T("DS"), CPU_DS);
                 modmenu(hmenu, 4, IDM_SEGES, "ES", I286_ES);                  modmenu(hmenu, 4, IDM_SEGES, _T("ES"), CPU_ES);
                 modmenu(hmenu, 5, IDM_SEGSS, "SS", I286_SS);                  modmenu(hmenu, 5, IDM_SEGSS, _T("SS"), CPU_SS);
                 DrawMenuBar(hwnd);                  DrawMenuBar(hwnd);
         }          }
 }  }
Line 207  void viewcmn_setvscroll(HWND hWnd, NP2VI Line 207  void viewcmn_setvscroll(HWND hWnd, NP2VI
   
 // -----  // -----
   
 void viewcmn_paint(NP2VIEW_T *view, DWORD bkgcolor,  void viewcmn_paint(NP2VIEW_T *view, UINT32 bkgcolor,
                                         void (*callback)(NP2VIEW_T *view, RECT *rc, HDC hdc)) {                                          void (*callback)(NP2VIEW_T *view, RECT *rc, HDC hdc)) {
   
         HDC                     hdc;          HDC                     hdc;

Removed from v.1.1.1.1  
changed lines
  Added in v.1.8


RetroPC.NET-CVS <cvs@retropc.net>