Files
pcem/includes/private/wx-ui/viewer.h
sarah-walker-pcem a0db379ed7 Add debug viewers (#277)
* Fix up global variable definitions in ibm.h

This fixes multiple definition errors when including ibm.h in C++ code.

* viewers: Add viewer infrastructure

Viewers are windows showing the status of a particular component of the emulated
machine; primarily for amusement, though may be useful for debugging in some
situations. This commit adds the basic infrastructure for viewers.

* viewers: Add (S)VGA palette viewers

This adds two basic viewers for the (S)VGA palette; one for the 16-entry
attribute controller palette, and one for the 256-entry RAMDAC palette.

* viewers: Add (S)VGA font viewer

Add a simple viewer to display the current (S)VGA font.

* viewers: Add (S)VGA video memory viewer

Add a viewer for (S)VGA video memory. This allows viewing of on and off screen
video memory in the various supported bitmap formats.

* viewers: Add 3DFX viewer

Add a viewer for 3DFX state. This shows all triangles and textures involved in
the most recent frame, and allows showing of framebuffer, depth buffer, and
wireframes.

It currently does not work properly in SLI configurations (only the first card
will be viewed) and trilinear textures will not display correctly.
2024-11-24 23:28:19 -08:00

64 lines
1.1 KiB
C++

#ifndef _VIEWER_H_
#define _VIEWER_H_
#ifdef __cplusplus
extern "C" {
#endif
typedef struct viewer_t
{
void *(*open)(void *parent, void *p, const char *title);
} viewer_t;
void viewer_reset();
void viewer_add(char *title, viewer_t *viewer, void *p);
void viewer_open(void *hwnd, int id);
void viewer_remove(void *viewer);
void viewer_update(viewer_t *viewer, void *p);
void viewer_call(viewer_t *viewer, void *p, void (*func)(void *v, void *param), void *param);
void viewer_close_all();
void viewer_notify_pause();
void viewer_notify_resume();
void update_viewers_menu(void *menu);
extern viewer_t viewer_font;
extern viewer_t viewer_palette;
extern viewer_t viewer_palette_16;
extern viewer_t viewer_voodoo;
extern viewer_t viewer_vram;
#define IDM_VIEWER 1600
#define IDM_VIEWER_MAX 1700
#ifdef __cplusplus
}
class Viewer: public wxFrame
{
public:
void *p;
Viewer(wxWindow *parent, wxString title, wxSize size, void *p)
: wxFrame(parent, wxID_ANY, title, wxPoint(50, 50), size, wxDEFAULT_FRAME_STYLE),
p(p)
{
SetClientSize(size);
}
virtual ~Viewer()
{
}
virtual void NotifyPause()
{
}
virtual void NotifyResume()
{
}
};
#endif
#endif