mirror of
https://github.com/libretro/dosbox-libretro.git
synced 2026-10-17 14:36:01 +00:00
The core is replaced by dosbox-core as of libretro/dosbox-core d38fcb50 (its history is in that repository), with the following on top: - Frontend VFS for mounted drives (libretro/dosbox-core#11): Android content:// and saf:// content works. - Built as dosbox_libretro and called DOSBox, so it installs next to dosbox-core without sharing its options, saves directory or config file. Option keys keep their dosbox_core_ prefix. - ZIP files as content, from DOSBox Pure (Bernhard Schelling): its zipDrive, unionDrive and memoryDrive, and the helpers they share (drive_dbp.cpp). The archive is mounted as C: without being extracted and the game's changes go to <name>.save.zip in the saves directory. DOS_Drive and DOS_File get the few members those drives need, with defaults. - The game in a ZIP is started when there is nothing to choose: the single program in the root, or in the one folder the root holds, leaving setup and install programs aside. - Disk images inside a ZIP: CD images (cue sheets with data and audio tracks, or ISOs) as D:, floppy images as A:, hard disk images as E: and on. Files on emulated drives can be named "$C:\PATH" as in DOSBox Pure; host_stat, fopen_wrap, the CD image reader and the audio track decoder open them through the drive, finding files by their long names. CDs and floppies go to RetroArch's disc control. - A start menu after DOSBox Pure's when a ZIP leaves a choice: it lists the programs on C: and on the mounted images, starts the one picked, can make it start on its own next time (kept in C:\DOSBOX.RUN, in the save file), and comes back when the program exits. Keyboard and gamepad; it can be turned off in the core options. - Automatic gamepad mapping from DOSBox Pure's Keyb2Joypad database (original data by Jemy Murphy and bigjim, used by DOSBox Pure with permission): a game the database knows, as a ZIP or from a directory, gets its keys, mouse and joystick actions on the first gamepad instead of the DOS joystick, with the action names shown in RetroArch. It can be turned off. - The CPU speed from the game's year, from its name or the database, as in DOSBox Pure; it can be turned off. - Roland SC-55 MIDI with Nuked-SC55 (nukeykt), from DOSBox Pure, as a new MIDI driver taking the module's ROMs from the system directory.
107 lines
2.6 KiB
C
107 lines
2.6 KiB
C
/*
|
|
* Copyright (C) 2002-2021 The DOSBox Team
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
*/
|
|
|
|
#ifndef DOSBOX_RENDER_H
|
|
#define DOSBOX_RENDER_H
|
|
|
|
// 0: complex scalers off, scaler cache off, some simple scalers off, memory requirements reduced
|
|
// 1: complex scalers off, scaler cache off, all simple scalers on
|
|
// 2: complex scalers off, scaler cache on
|
|
// 3: complex scalers on
|
|
#ifndef RENDER_USE_ADVANCED_SCALERS
|
|
#define RENDER_USE_ADVANCED_SCALERS 3
|
|
#endif
|
|
|
|
#include "../src/gui/render_scalers.h"
|
|
|
|
#define RENDER_SKIP_CACHE 16
|
|
//Enable this for scalers to support 0 input for empty lines
|
|
//#define RENDER_NULL_INPUT
|
|
|
|
typedef struct {
|
|
struct {
|
|
Bit8u red;
|
|
Bit8u green;
|
|
Bit8u blue;
|
|
Bit8u unused;
|
|
} rgb[256];
|
|
union {
|
|
Bit16u b16[256];
|
|
Bit32u b32[256];
|
|
} lut;
|
|
bool changed;
|
|
Bit8u modified[256];
|
|
Bitu first;
|
|
Bitu last;
|
|
} RenderPal_t;
|
|
|
|
typedef struct {
|
|
struct {
|
|
Bitu width, start;
|
|
Bitu height;
|
|
Bitu bpp;
|
|
bool dblw,dblh;
|
|
double ratio;
|
|
float fps;
|
|
} src;
|
|
struct {
|
|
int count;
|
|
int max;
|
|
Bitu index;
|
|
Bit8u hadSkip[RENDER_SKIP_CACHE];
|
|
} frameskip;
|
|
struct {
|
|
Bitu size;
|
|
scalerMode_t inMode;
|
|
scalerMode_t outMode;
|
|
scalerOperation_t op;
|
|
bool clearCache;
|
|
bool forced;
|
|
ScalerLineHandler_t lineHandler;
|
|
ScalerLineHandler_t linePalHandler;
|
|
ScalerComplexHandler_t complexHandler;
|
|
Bitu blocks, lastBlock;
|
|
Bitu outPitch;
|
|
Bit8u *outWrite;
|
|
Bitu cachePitch;
|
|
Bit8u *cacheRead;
|
|
Bitu inHeight, inLine, outLine;
|
|
} scale;
|
|
#if C_OPENGL
|
|
char* shader_src;
|
|
#endif
|
|
RenderPal_t pal;
|
|
bool updating;
|
|
bool active;
|
|
bool aspect;
|
|
bool fullFrame;
|
|
bool forceUpdate;
|
|
} Render_t;
|
|
|
|
extern Render_t render;
|
|
extern ScalerLineHandler_t RENDER_DrawLine;
|
|
void RENDER_SetSize(Bitu width,Bitu height,Bitu bpp,float fps,double ratio,bool dblw,bool dblh);
|
|
bool RENDER_StartUpdate(void);
|
|
void RENDER_EndUpdate(bool abort);
|
|
void RENDER_SetPal(Bit8u entry,Bit8u red,Bit8u green,Bit8u blue);
|
|
bool RENDER_GetForceUpdate(void);
|
|
void RENDER_SetForceUpdate(bool);
|
|
|
|
|
|
#endif
|