Debian Codegraph @

docs/PORTING

raw
1 Some notes about porting DOSBox to systems with certain restrictions,
2 like handheld devices.
3
4 General:
5 - depending on where you start off with the port, assure that the
6 config.h entries are correct/exhausting, like GCC_ATTRIBUTE is
7 required (struct packing) but is undefined if you base the port
8 on msvc sources which have a special config.h
9
10 If memory is a constraint:
11 - in paging.h out-comment the USE_FULL_TLB define to enable special
12 TLB linking code that uses less memory
13 drawback: none (the code is not heavily tested though)
14 gain: reduces memory requirements about ~15mb
15 - in render.h lower the scaler integration:
16 #define RENDER_USE_ADVANCED_SCALERS 1
17 or
18 #define RENDER_USE_ADVANCED_SCALERS 0
19 drawback: complex scalers and the scaler cache are disabled,
20 be sure to test if this affects speed!
21 with define RENDER_USE_ADVANCED_SCALERS==0 most simple
22 scalers are disabled as well, some graphics modes won't
23 work due to reduced cache sizes
24 gain: ~2mb with RENDER_USE_ADVANCED_SCALERS==1
25 ~5mb with RENDER_USE_ADVANCED_SCALERS==0
26 - in dos_system.h reduce the drive cache entries:
27 #define MAX_OPENDIRS 256
28 drawback: some apps might not work with large directory trees
29 gain: ~1mb per mounted drive
30 - remove the GUS emulation (gus.cpp, especially GUSRam[1024*1024] )
31 drawback: no gravis ultrasound
32 gain: reduces memory requirements about 1mb
33 - reduce the size of the emulated graphics memory:
34 see the memory sizing in SVGA_Setup_*, especially the defaults
35 in vga_s3.cpp's SVGA_Setup_S3Trio
36 drawback: some graphics modes won't work then
37 gain: reduces memory requirements
38 TODO: fully check this, introduce hard limits
39
40 If speed is a constraint:
41 - see if the simple core is faster, possibly remove the normal core
42 set the simple core as default
43 drawback: one game is known to not work with the simple core;
44 the simple core does only work for games which don't use paging
45 (when paging is requested the normal core is used automatically)
46 gain: the simple core should be somewhat faster
47 TODO: add possibility to easily remove the normal core, use fullcore fallback
48 - raise the default frameskip value
49 drawback: minor graphics smoothness loss for some games (video playback)
50 gain: reduces graphics load