-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathfreedocore.h
More file actions
154 lines (129 loc) · 4.5 KB
/
freedocore.h
File metadata and controls
154 lines (129 loc) · 4.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
/*
www.freedo.org
The first and only working 3DO multiplayer emulator.
The FreeDO licensed under modified GNU LGPL, with following notes:
* The owners and original authors of the FreeDO have full right to develop closed source derivative work.
* Any non-commercial uses of the FreeDO sources or any knowledge obtained by studying or reverse engineering
of the sources, or any other material published by FreeDO have to be accompanied with full credits.
* Any commercial uses of FreeDO sources or any knowledge obtained by studying or reverse engineering of the sources,
or any other material published by FreeDO is strictly forbidden without owners approval.
The above notes are taking precedence over GNU LGPL in conflicting situations.
Project authors:
Alexander Troosh
Maxim Grishin
Allen Wright
John Sammons
Felix Lazarev
*/
#ifndef __3DO_SYSTEM_HEADER_DEFINITION
#define __3DO_SYSTEM_HEADER_DEFINITION
//------------------------------------------------------------------------------
#pragma pack(push,1)
struct VDLLine
//VDLP Line - one VDLP line per patent
{
unsigned short line[320*4];//,line2[320*2*16];
unsigned char xCLUTB[32];
unsigned char xCLUTG[32];
unsigned char xCLUTR[32];
unsigned int xOUTCONTROLL;
unsigned int xCLUTDMA;
unsigned int xBACKGROUND;
};
struct VDLFrame
{
VDLLine lines[240*4];
unsigned int srcw,srch;
};
struct BitmapCrop
{
int left;
int top;
int bottom;
int right;
};
struct GetFrameBitmapParams
{
VDLFrame* sourceFrame;
void* destinationBitmap;
int destinationBitmapWidthPixels;
BitmapCrop* bitmapCrop;
int copyWidthPixels;
int copyHeightPixels;
bool addBlackBorder;
bool copyPointlessAlphaByte;
bool allowCrop;
int scalingAlgorithm;
int resultingWidth;
int resultingHeight;
};
enum ScalingAlgorithm
{
None = 0,
HQ2X = 1,
HQ3X = 2,
HQ4X = 3
};
#pragma pack(pop)
#define EXT_READ_ROMS 1
#define EXT_READ_NVRAM 2
#define EXT_WRITE_NVRAM 3
#define EXT_SWAPFRAME 5 //frame swap (in mutlithreaded) or frame draw(single treaded)
#define EXT_PUSH_SAMPLE 6 //sends sample to the buffer
#define EXT_GET_PBUSLEN 7
#define EXT_GETP_PBUSDATA 8
#define EXT_KPRINT 9
#define EXT_DEBUG_PRINT 10
#define EXT_FRAMETRIGGER_MT 12 //multitasking
#define EXT_READ2048 14 //for XBUS Plugin
#define EXT_GET_DISC_SIZE 15
#define EXT_ON_SECTOR 16
#define EXT_ARM_SYNC 17
typedef void* (__stdcall *_ext_Interface)(int, void*);
#define FDP_FREEDOCORE_VERSION 0
#define FDP_INIT 1 //set ext_interface
#define FDP_DESTROY 2
#define FDP_DO_EXECFRAME 3 //execute 1/60 of second
#define FDP_DO_FRAME_MT 4 //multitasking
#define FDP_DO_EXECFRAME_MT 5 //multitasking
#define FDP_DO_LOAD 6 //load state from buffer, returns !NULL if everything went smooth
#define FDP_GET_SAVE_SIZE 7 //return size of savestatemachine
#define FDP_DO_SAVE 8 //save state to buffer
#define FDP_GETP_NVRAM 9 //returns ptr to NVRAM 32K
#define FDP_GETP_RAMS 10 //returns ptr to RAM 3M
#define FDP_GETP_ROMS 11 //returns ptr to ROM 2M
#define FDP_GETP_PROFILE 12 //returns profile pointer, sizeof = 3M/4
#define FDP_BUGTEMPORALFIX 13
#define FDP_SET_ARMCLOCK 14
#define FDP_SET_TEXQUALITY 15
#define FDP_GETP_WRCOUNT 16
#define FDP_SET_FIX_MODE 17
#define FDP_GET_FRAME_BITMAP 18
#define FIX_BIT_TIMING_1 (0x00000001)
#define FIX_BIT_TIMING_2 (0x00000002)
#define FIX_BIT_TIMING_3 (0x00000004)
#define FIX_BIT_TIMING_4 (0x00000008)
#define FIX_BIT_TIMING_5 (0x00000010)
#define FIX_BIT_TIMING_6 (0x00000020)
#define FIX_BIT_TIMING_7 (0x00000040)
#define FIX_BIT_GRAPHICS_STEP_Y (0x00080000) // Preserve Y coordinate rather than X between CELs.
#ifdef __MSVC__
#ifdef FREEDOCORE_EXPORTS
#define FREEDOCORE_API __declspec(dllexport)
#else
#define FREEDOCORE_API __declspec(dllimport)
#endif
#else
#define FREEDOCORE_API
#endif
extern "C"
{
FREEDOCORE_API void* __stdcall _freedo_Interface(int procedure, void *datum=0);
};
#ifdef __MSVC__
#ifndef FREEDOCORE_EXPORTS
//#pragma comment(lib, "freedocore.lib")
#endif
#endif
//------------------------------------------------------------------------------
#endif