Files
86Box/src/VIDEO/video.h

131 lines
2.7 KiB
C
Raw Normal View History

/* Copyright holders: Sarah Walker, Tenshi
see COPYING for more details
*/
#ifdef __unix
#include "allegro-main.h"
#else
typedef struct
{
int w, h;
uint8_t *dat;
2017-04-30 13:23:02 -05:00
uint8_t *line[];
} BITMAP;
extern BITMAP *screen;
BITMAP *create_bitmap(int w, int h);
typedef struct
{
uint8_t r, g, b;
} RGB;
typedef RGB PALETTE[256];
#define makecol(r, g, b) ((b) | ((g) << 8) | ((r) << 16))
#define makecol32(r, g, b) ((b) | ((g) << 8) | ((r) << 16))
#endif
extern BITMAP *buffer, *buffer32;
int video_card_available(int card);
char *video_card_getname(int card);
struct device_t *video_card_getdevice(int card);
int video_card_has_config(int card);
int video_card_getid(char *s);
int video_old_to_new(int card);
int video_new_to_old(int card);
char *video_get_internal_name(int card);
int video_get_video_from_internal_name(char *s);
extern int video_fullscreen, video_fullscreen_scale, video_fullscreen_first;
enum
{
FULLSCR_SCALE_FULL = 0,
FULLSCR_SCALE_43,
FULLSCR_SCALE_SQ,
FULLSCR_SCALE_INT
};
extern int egareads,egawrites;
extern int fullchange;
extern int changeframecount;
extern uint8_t fontdat[256][8];
extern uint8_t fontdatm[256][16];
Applied all mainline PCem commits; Added experimental NVidia Riva TNT2 emulation (patch from MoochMcGee); ASUS P/I-P54TP4XE, ASUS P/I-P55T2P4, and ASUS P/I-P55TVP4 are back; National Semiconductor PC87306 Super I/O chip now correctly reenables devices after a chip power cycle; Several FDC improvements and the behavior is now a bit closer to real hardware (based on actual tests); Added MR Intel Advanced/ATX with Microid Research BIOS with support for 4 floppy drives and up to 4 IDE controllers; Added floppy drives 3 and 4, bringing the maximum to 4; You can now connect hard disks to the tertiary IDE controller; Correct undocumented behavior of the LEA instruction with register is back on 286 and later CPU's; Pentium-rea models with Intel chipsets now have port 92 (with alternate reset and alternate A20 toggle); Overhauled DMA channel read and write routines and fixed cascading; Improved IMG detection of a bad BPB (or complete lack of a BPB); Added preliminary emulation of PS/2 1.44 MB and PC-98 1.25 MB 3-mode drives (both have an inverted DENSEL pin); Removed the incorrect Amstrad mouse patch from TheCollector1995; Fixed ATAPI CD-ROM disk change detection; Windows IOCTL CD-ROM handler now tries to use direct SCSI passthrough for more things, including obtaining CD-ROM capacity; The Diamond Stealth32 (ET4000/W32p) now also works correctly on the two Award SiS 496/497 boxes; The (S)VGA handler now converts 6-bit RAMDAC RGB channels to standard 8-bit RGB using a lookup table generated at emulator start, calculated using the correct intensity conversion method and treating intensity 64 as equivalent to 63; Moved a few options from the Configuration dialog box to the menu; SIO, PIIX, and PIIX3 now have the reset control register on port CF9 as they should; Several bugfixes.
2016-12-23 03:16:24 +01:00
extern uint32_t *video_6to8, *video_15to32, *video_16to32;
extern int xsize,ysize;
extern float cpuclock;
extern int emu_fps, frames;
extern int readflash;
extern void (*video_recalctimings)();
void video_blit_memtoscreen(int x, int y, int y1, int y2, int w, int h);
void video_blit_memtoscreen_8(int x, int y, int w, int h);
extern void (*video_blit_memtoscreen_func)(int x, int y, int y1, int y2, int w, int h);
extern void (*video_blit_memtoscreen_8_func)(int x, int y, int w, int h);
/* Enable EGA/(S)VGA overscan border. */
extern int enable_overscan;
extern int overscan_x, overscan_y;
/* Forcibly stretch emulated video output to 4:3 or not. */
extern int force_43;
extern int video_timing_b, video_timing_w, video_timing_l;
extern int video_speed;
extern int video_res_x, video_res_y, video_bpp;
extern int vid_resize;
void video_wait_for_blit();
void video_wait_for_buffer();
extern int winsizex,winsizey;
#ifdef __cplusplus
extern "C" {
#endif
void take_screenshot();
void d3d_take_screenshot(wchar_t *fn);
void d3d_fs_take_screenshot(wchar_t *fn);
void ddraw_take_screenshot(wchar_t *fn);
void ddraw_fs_take_screenshot(wchar_t *fn);
#ifdef __cplusplus
}
#endif
extern int cga_palette;
extern int vid_cga_contrast;
extern int video_grayscale;
extern int video_graytype;
void loadfont(wchar_t *s, int format);
void initvideo();
void video_init();
void closevideo();
void video_updatetiming();
void hline(BITMAP *b, int x1, int y, int x2, uint32_t col);
void updatewindowsize(int x, int y);
#ifdef ENABLE_VRAM_DUMP
void svga_dump_vram();
#endif