Jelajahi Sumber

--- Merging r40956 into '.':
U packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40956 into '.':
U .
--- Merging r40957 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40957 into '.':
G .
--- Merging r40958 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40958 into '.':
G .
--- Merging r40959 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40959 into '.':
G .
--- Merging r40960 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40960 into '.':
G .
--- Merging r40961 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40961 into '.':
G .
--- Merging r40962 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40962 into '.':
G .
--- Merging r40964 into '.':
U packages/graph/src/inc/fills.inc
--- Recording mergeinfo for merge of r40964 into '.':
G .
--- Merging r40965 into '.':
G packages/graph/src/inc/fills.inc
--- Recording mergeinfo for merge of r40965 into '.':
G .
--- Merging r40966 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40966 into '.':
G .
--- Merging r40967 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40967 into '.':
G .
--- Merging r40968 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40968 into '.':
G .
--- Merging r40969 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40969 into '.':
G .
--- Merging r40970 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40970 into '.':
G .
--- Merging r40971 into '.':
G packages/graph/src/inc/fills.inc
--- Recording mergeinfo for merge of r40971 into '.':
G .
--- Merging r40972 into '.':
G packages/graph/src/inc/fills.inc
--- Recording mergeinfo for merge of r40972 into '.':
G .
--- Merging r40973 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40973 into '.':
G .
--- Merging r40974 into '.':
G packages/graph/src/inc/fills.inc
--- Recording mergeinfo for merge of r40974 into '.':
G .
--- Merging r40975 into '.':
G packages/graph/src/inc/fills.inc
--- Recording mergeinfo for merge of r40975 into '.':
G .
--- Merging r40976 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40976 into '.':
G .
--- Merging r40977 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40977 into '.':
G .
--- Merging r40978 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40978 into '.':
G .
--- Merging r40980 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40980 into '.':
G .
--- Merging r40981 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40981 into '.':
G .
--- Merging r40982 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40982 into '.':
G .
--- Merging r40983 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40983 into '.':
G .
--- Merging r40984 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40984 into '.':
G .
--- Merging r40985 into '.':
U packages/graph/src/ptcgraph/ptcgraph.pp
--- Recording mergeinfo for merge of r40985 into '.':
G .
--- Merging r40986 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40986 into '.':
G .
--- Merging r40987 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40987 into '.':
G .
--- Merging r40988 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40988 into '.':
G .
--- Merging r40989 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40989 into '.':
G .
--- Merging r40990 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40990 into '.':
G .
--- Merging r40991 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40991 into '.':
G .
--- Merging r40992 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40992 into '.':
G .
--- Merging r40993 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40993 into '.':
G .
--- Merging r40994 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40994 into '.':
G .
--- Merging r40996 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40996 into '.':
G .
--- Merging r40997 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40997 into '.':
G .
--- Merging r40998 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40998 into '.':
G .
--- Merging r40999 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r40999 into '.':
G .
--- Merging r41000 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41000 into '.':
G .
--- Merging r41001 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41001 into '.':
G .
--- Merging r41002 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41002 into '.':
G .
--- Merging r41003 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41003 into '.':
G .
--- Merging r41004 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41004 into '.':
G .
--- Merging r41005 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41005 into '.':
G .
--- Merging r41006 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41006 into '.':
G .
--- Merging r41007 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41007 into '.':
G .
--- Merging r41009 into '.':
U packages/graph/src/inc/graph.inc
--- Recording mergeinfo for merge of r41009 into '.':
G .
--- Merging r41010 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41010 into '.':
G .
--- Merging r41011 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41011 into '.':
G .
--- Merging r41012 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41012 into '.':
G .
--- Merging r41013 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41013 into '.':
G .
--- Merging r41014 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41014 into '.':
G .
--- Merging r41015 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41015 into '.':
G .
--- Merging r41016 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41016 into '.':
G .
--- Merging r41017 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41017 into '.':
G .
--- Merging r41018 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41018 into '.':
G .
--- Merging r41019 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41019 into '.':
G .
--- Merging r41020 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41020 into '.':
G .
--- Merging r41028 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41028 into '.':
G .
--- Merging r41029 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41029 into '.':
G .
--- Merging r41030 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41030 into '.':
G .
--- Merging r41031 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41031 into '.':
G .
--- Merging r41032 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41032 into '.':
G .
--- Merging r41033 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41033 into '.':
G .
--- Merging r41034 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41034 into '.':
G .
--- Merging r41035 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41035 into '.':
G .
--- Merging r41036 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41036 into '.':
G .
--- Merging r41037 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41037 into '.':
G .
--- Merging r41038 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41038 into '.':
G .
--- Merging r41039 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41039 into '.':
G .
--- Merging r41040 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41040 into '.':
G .
--- Merging r41041 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41041 into '.':
G .
--- Merging r41042 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41042 into '.':
G .
--- Merging r41043 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41043 into '.':
G .
--- Merging r41044 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41044 into '.':
G .
--- Merging r41045 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41045 into '.':
G .
--- Merging r41048 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41048 into '.':
G .
--- Merging r41049 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41049 into '.':
G .
--- Merging r41050 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41050 into '.':
G .
--- Merging r41051 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41051 into '.':
G .
--- Merging r41052 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41052 into '.':
G .
--- Merging r41053 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41053 into '.':
G .
--- Merging r41054 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41054 into '.':
G .
--- Merging r41055 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41055 into '.':
G .
--- Merging r41056 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41056 into '.':
G .
--- Merging r41057 into '.':
G packages/graph/src/msdos/graph.pp
--- Recording mergeinfo for merge of r41057 into '.':
G .
--- Merging r41071 into '.':
U packages/graph/src/go32v2/graph.pp
--- Recording mergeinfo for merge of r41071 into '.':
G .
--- Merging r41072 into '.':
G packages/graph/src/go32v2/graph.pp
--- Recording mergeinfo for merge of r41072 into '.':
G .
--- Merging r41073 into '.':
G packages/graph/src/go32v2/graph.pp
--- Recording mergeinfo for merge of r41073 into '.':
G .
--- Merging r41097 into '.':
G packages/graph/src/go32v2/graph.pp
--- Recording mergeinfo for merge of r41097 into '.':
G .
--- Merging r41098 into '.':
G packages/graph/src/go32v2/graph.pp
--- Recording mergeinfo for merge of r41098 into '.':
G .
--- Merging r41099 into '.':
G packages/graph/src/go32v2/graph.pp
--- Recording mergeinfo for merge of r41099 into '.':
G .
--- Merging r41100 into '.':
G packages/graph/src/go32v2/graph.pp
--- Recording mergeinfo for merge of r41100 into '.':
G .
--- Merging r41101 into '.':
G packages/graph/src/go32v2/graph.pp
--- Recording mergeinfo for merge of r41101 into '.':
G .
--- Merging r41102 into '.':
G packages/graph/src/go32v2/graph.pp
--- Recording mergeinfo for merge of r41102 into '.':
G .
--- Merging r41103 into '.':
G packages/graph/src/go32v2/graph.pp
--- Recording mergeinfo for merge of r41103 into '.':
G .
--- Merging r41107 into '.':
G packages/graph/src/go32v2/graph.pp
--- Recording mergeinfo for merge of r41107 into '.':
G .
--- Merging r41108 into '.':
G packages/graph/src/go32v2/graph.pp
--- Recording mergeinfo for merge of r41108 into '.':
G .
--- Merging r41109 into '.':
G packages/graph/src/go32v2/graph.pp
--- Recording mergeinfo for merge of r41109 into '.':
G .
--- Merging r41110 into '.':
G packages/graph/src/go32v2/graph.pp
--- Recording mergeinfo for merge of r41110 into '.':
G .
--- Merging r41111 into '.':
G packages/graph/src/go32v2/graph.pp
--- Recording mergeinfo for merge of r41111 into '.':
G .
--- Merging r41112 into '.':
G packages/graph/src/go32v2/graph.pp
--- Recording mergeinfo for merge of r41112 into '.':
G .
--- Merging r41113 into '.':
G packages/graph/src/go32v2/graph.pp
--- Recording mergeinfo for merge of r41113 into '.':
G .
--- Merging r41114 into '.':
G packages/graph/src/go32v2/graph.pp
--- Recording mergeinfo for merge of r41114 into '.':
G .
--- Merging r41115 into '.':
G packages/graph/src/go32v2/graph.pp
--- Recording mergeinfo for merge of r41115 into '.':
G .
--- Merging r41116 into '.':
G packages/graph/src/go32v2/graph.pp
--- Recording mergeinfo for merge of r41116 into '.':
G .
--- Merging r41117 into '.':
G packages/graph/src/go32v2/graph.pp
--- Recording mergeinfo for merge of r41117 into '.':
G .
--- Merging r41118 into '.':
G packages/graph/src/go32v2/graph.pp
--- Recording mergeinfo for merge of r41118 into '.':
G .
--- Merging r41143 into '.':
G packages/graph/src/go32v2/graph.pp
--- Recording mergeinfo for merge of r41143 into '.':
G .
--- Merging r41146 into '.':
G packages/graph/src/go32v2/graph.pp
--- Recording mergeinfo for merge of r41146 into '.':
G .
--- Merging r41153 into '.':
G packages/graph/src/go32v2/graph.pp
--- Recording mergeinfo for merge of r41153 into '.':
G .

# revisions: 40956,40957,40958,40959,40960,40961,40962,40964,40965,40966,40967,40968,40969,40970,40971,40972,40973,40974,40975,40976,40977,40978,40980,40981,40982,40983,40984,40985,40986,40987,40988,40989,40990,40991,40992,40993,40994,40996,40997,40998,40999,41000,41001,41002,41003,41004,41005,41006,41007,41009,41010,41011,41012,41013,41014,41015,41016,41017,41018,41019,41020,41028,41029,41030,41031,41032,41033,41034,41035,41036,41037,41038,41039,41040,41041,41042,41043,41044,41045,41048,41049,41050,41051,41052,41053,41054,41055,41056,41057,41071,41072,41073,41097,41098,41099,41100,41101,41102,41103,41107,41108,41109,41110,41111,41112,41113,41114,41115,41116,41117,41118,41143,41146,41153
r40956 | nickysn | 2019-01-21 14:40:41 +0100 (Mon, 21 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

- removed commented out code from DirectPutPixel320
r40957 | nickysn | 2019-01-21 14:42:59 +0100 (Mon, 21 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* only load the low byte of CurrentColor in the asm version of DirectPutPixel320
r40958 | nickysn | 2019-01-21 14:51:40 +0100 (Mon, 21 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

+ implemented all the write modes in the asm version of DirectPutPixel320
r40959 | nickysn | 2019-01-21 14:52:08 +0100 (Mon, 21 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* 8086/8088 support in the asm version of DirectPutPixel320
r40960 | nickysn | 2019-01-21 15:09:25 +0100 (Mon, 21 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

+ enabled the asm version of DirectPutPixel320
r40961 | nickysn | 2019-01-21 15:10:41 +0100 (Mon, 21 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

- removed comment saying that and/or/not put is not implemented, because it is implemented now
r40962 | nickysn | 2019-01-21 15:12:17 +0100 (Mon, 21 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* ignore VideoOfs entirely in mode 13h, since it doesn't support video pages
r40964 | nickysn | 2019-01-21 15:47:48 +0100 (Mon, 21 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/inc/fills.inc

* added check to ensure the memory allocation for DrawnList inside FloodFill hasn't returned nil
r40965 | nickysn | 2019-01-21 15:50:26 +0100 (Mon, 21 Jan 2019) | 3 lines
Changed paths:
M /trunk/packages/graph/src/inc/fills.inc

* moved the check in FloodFill whether x,y are within the current viewport in
the beginning, before any heap memory allocations, to avoid memory leaks when
FloodFill is invoked with a point that is outside the current viewport
r40966 | nickysn | 2019-01-21 16:16:16 +0100 (Mon, 21 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* fixed return of result in the asm version of GetPixel320
r40967 | nickysn | 2019-01-21 16:18:51 +0100 (Mon, 21 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* use the si register instead of di in the asm version of GetPixel320
r40968 | nickysn | 2019-01-21 16:28:22 +0100 (Mon, 21 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* use lodsb with a segment override prefix instead of mov in the asm version of GetPixel320
r40969 | nickysn | 2019-01-21 16:30:58 +0100 (Mon, 21 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* use 'cwd' instead of 'xor dx, dx' in the asm version GetPixel320
r40970 | nickysn | 2019-01-21 16:43:31 +0100 (Mon, 21 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* use 'cbw' and 'cwd' instead of 'xor reg, reg' in the asm version of GetPixel16
r40971 | nickysn | 2019-01-21 16:46:34 +0100 (Mon, 21 Jan 2019) | 3 lines
Changed paths:
M /trunk/packages/graph/src/inc/fills.inc

* moved the s1,s2,s3 scanline memory allocation in FloodFill before changing
CurrentColor, so it doesn't get changed if the function exits prematurely due
to out of memory
r40972 | nickysn | 2019-01-21 17:08:38 +0100 (Mon, 21 Jan 2019) | 2 lines
Changed paths:
M /trunk/packages/graph/src/inc/fills.inc

* store the size of the s1,s2 and s3 buffers, used inside FloodFill in a
variable, so memory allocation and disposal becomes easier, with less ifdefs
r40973 | nickysn | 2019-01-21 17:09:13 +0100 (Mon, 21 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* read the planes in reverse order, so that less shift instructions are required in GetPixel16
r40974 | nickysn | 2019-01-21 17:22:11 +0100 (Mon, 21 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/inc/fills.inc

* unified the out of memory check in FloodFill and perform proper cleanup, so no memory leaks arise
r40975 | nickysn | 2019-01-21 17:24:46 +0100 (Mon, 21 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/inc/fills.inc

* size of the DrawnList buffer moved to a local variable, to avoid repeated code and repeated calculations
r40976 | nickysn | 2019-01-21 17:47:30 +0100 (Mon, 21 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* converted InitModeX to a pure asm routine
r40977 | nickysn | 2019-01-21 18:43:57 +0100 (Mon, 21 Jan 2019) | 3 lines
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* use 'cmp mem,const' to check DontClearGraphMemory, instead of first loading it
into a register in InitModeX. This saves 1 byte of code from an initialization
routine. Hurrah! :)
r40978 | nickysn | 2019-01-21 19:06:07 +0100 (Mon, 21 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* another byte saved in the InitModeX routine :)
r40980 | nickysn | 2019-01-21 23:50:50 +0100 (Mon, 21 Jan 2019) | 3 lines
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

+ added pascal version of InitModeX
r40981 | nickysn | 2019-01-21 23:54:08 +0100 (Mon, 21 Jan 2019) | 3 lines
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* huge memory model fixes in InitModeX
r40982 | nickysn | 2019-01-22 00:07:51 +0100 (Tue, 22 Jan 2019) | 3 lines
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* reenabled the asm version of InitModeX
r40983 | nickysn | 2019-01-22 00:09:58 +0100 (Tue, 22 Jan 2019) | 3 lines
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* save another 2 bytes from the InitModeX code :)
r40984 | nickysn | 2019-01-22 02:29:02 +0100 (Tue, 22 Jan 2019) | 3 lines
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* some optimizations in GetPixel16
r40985 | nickysn | 2019-01-22 10:07:37 +0100 (Tue, 22 Jan 2019) | 3 lines
Changed paths:
M /trunk/packages/graph/src/ptcgraph/ptcgraph.pp

+ enabled the true color support in ptcgraph
r40986 | nickysn | 2019-01-22 13:58:02 +0100 (Tue, 22 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* some more optimizations in GetPixel16
r40987 | nickysn | 2019-01-22 15:27:48 +0100 (Tue, 22 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* replaced the slow mul instruction in GetPixel16 with faster shifts and adds
r40988 | nickysn | 2019-01-22 15:28:46 +0100 (Tue, 22 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* moved the ES register initialization in GetPixel16 to the beginning of the function
r40989 | nickysn | 2019-01-22 15:30:18 +0100 (Tue, 22 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* swapped di and ax in the beginning of GetPixel16
r40990 | nickysn | 2019-01-22 15:32:01 +0100 (Tue, 22 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* moved the initial GC port output to the beginning of GetPixel16
r40991 | nickysn | 2019-01-22 15:33:41 +0100 (Tue, 22 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* use xchg ax,cx instead of mov in GetPixel16
r40992 | nickysn | 2019-01-22 15:34:47 +0100 (Tue, 22 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* replaced bl with al in the final bit read in GetPixel16
r40993 | nickysn | 2019-01-22 15:35:32 +0100 (Tue, 22 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* replaced 'mov al,es:[si]' with 'seges lodsb' in GetPixel16
r40994 | nickysn | 2019-01-22 15:49:18 +0100 (Tue, 22 Jan 2019) | 2 lines
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* swap AL and AH in the last 'or' instruction in GetPixel16, so the result is
combined directly into AL and a 'mov al, ah' instruction is removed
r40996 | nickysn | 2019-01-22 16:32:44 +0100 (Tue, 22 Jan 2019) | 2 lines
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* GetScanLine16 changed so that it reads video memory in 16-bit words, instead
of 32-bit longints, because 16-bit generates more efficient code on the i8086
r40997 | nickysn | 2019-01-22 16:50:31 +0100 (Tue, 22 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* some minor optimizations in PutPixel16 (more efficient register usage, resulting in less mov instructions)
r40998 | nickysn | 2019-01-22 17:04:08 +0100 (Tue, 22 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* optimizations in PutPixel16 that remove the slow 'mul' instruction
r40999 | nickysn | 2019-01-22 17:05:29 +0100 (Tue, 22 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* use stosb instead of mov for writing a byte (the value doesn't matter) into EGA/VGA memory in PutPixel16
r41000 | nickysn | 2019-01-22 17:07:51 +0100 (Tue, 22 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* yet another mov eliminated by using different registers in GetPixel16
r41001 | nickysn | 2019-01-22 17:10:37 +0100 (Tue, 22 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* moved the loading of the X and Y coordinates to registers in the front of the asm block in PutPixel16
r41002 | nickysn | 2019-01-22 17:11:41 +0100 (Tue, 22 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* perform the viewport adjustment in asm instead of pascal in PutPixel16
r41003 | nickysn | 2019-01-22 17:23:47 +0100 (Tue, 22 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* implement the clipping in assembly instead of pascal in PutPixel16
r41004 | nickysn | 2019-01-22 17:40:51 +0100 (Tue, 22 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* PutPixel16 converted to pure asm routine
r41005 | nickysn | 2019-01-22 17:56:16 +0100 (Tue, 22 Jan 2019) | 2 lines
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* perform the clipping before initializing ES in PutPixel320, so it runs faster
when the pixel happens to be outside the viewport
r41006 | nickysn | 2019-01-22 18:20:38 +0100 (Tue, 22 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* optimizations in DirectPutPixel16 to avoid the mul instruction
r41007 | nickysn | 2019-01-22 18:22:06 +0100 (Tue, 22 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* use stosb instead of mov in DirectPutPixel16
r41009 | nickysn | 2019-01-23 13:05:21 +0100 (Wed, 23 Jan 2019) | 2 lines
Changed paths:
M /trunk/packages/graph/src/inc/graph.inc

* all procedures and functions that call NotInGraphicsMode marked 'noreturn' to
avoid warnings about function result not being set, etc.
r41010 | nickysn | 2019-01-23 13:09:08 +0100 (Wed, 23 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* SetVisual200 and SetVisual350 combined into one procedure, because they share the same code
r41011 | nickysn | 2019-01-23 13:10:11 +0100 (Wed, 23 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* only load the low byte from the page parameter in SetVisual200_350
r41012 | nickysn | 2019-01-23 13:20:54 +0100 (Wed, 23 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* factored out the repeating code for setting a BIOS graphics mode into a common procedure InitInt10hMode
r41013 | nickysn | 2019-01-23 14:23:29 +0100 (Wed, 23 Jan 2019) | 3 lines
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* use SegB000 instead of the $B000 constant in InitHGC720. This will make the
code compatible with 16-bit protected mode DOS targets, when they get
implemented.
r41014 | nickysn | 2019-01-23 14:31:43 +0100 (Wed, 23 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

+ also save/restore DS before/after the int 10h call inside SetCGAPalette and SetCGABorder
r41015 | nickysn | 2019-01-23 14:37:06 +0100 (Wed, 23 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* split GetPixelX into strictly pascal and strictly asm version
r41016 | nickysn | 2019-01-23 16:00:03 +0100 (Wed, 23 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* huge model fixes in asm GetPixelX
r41017 | nickysn | 2019-01-23 16:02:38 +0100 (Wed, 23 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* use only 8086/8088-compatible instructions in the asm GetPixelX
r41018 | nickysn | 2019-01-23 16:22:20 +0100 (Wed, 23 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* viewport adjustment converted to asm in the asm version of GetPixelX
r41019 | nickysn | 2019-01-23 16:23:48 +0100 (Wed, 23 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* asm version of GetPixelX converted to pure asm
r41020 | nickysn | 2019-01-23 16:24:32 +0100 (Wed, 23 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* FPC_GRAPH_SUPPORTS_TRUECOLOR support in the asm GetPixelX
r41028 | nickysn | 2019-01-24 14:41:10 +0100 (Thu, 24 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* fixed and enabled the asm version of GetPixelX
r41029 | nickysn | 2019-01-24 14:43:34 +0100 (Thu, 24 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* use SI instead of DI in the asm GetPixelX
r41030 | nickysn | 2019-01-24 14:45:23 +0100 (Thu, 24 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* use lodsb instead of mov in GetPixelX
r41031 | nickysn | 2019-01-24 14:52:00 +0100 (Thu, 24 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* fix register in comment
r41032 | nickysn | 2019-01-24 16:13:02 +0100 (Thu, 24 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* PutPixelX split into pure pascal and asm version
r41033 | nickysn | 2019-01-24 16:18:30 +0100 (Thu, 24 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* use 8086/8088-compatible instructions in the asm version of PutPixelX
r41034 | nickysn | 2019-01-24 16:21:05 +0100 (Thu, 24 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* perform the viewport adjustment in asm instead of pascal in PutPixelX
r41035 | nickysn | 2019-01-24 16:23:13 +0100 (Thu, 24 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

- remove the XorPut support from PutPixelX, since it is not supposed to support different write modes
r41036 | nickysn | 2019-01-24 16:25:34 +0100 (Thu, 24 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* swapped ax and cx in PutPixelX
r41037 | nickysn | 2019-01-24 16:27:05 +0100 (Thu, 24 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* moved the loading of X and Y coordinates to the beginning of the asm block in PutPixelX
r41038 | nickysn | 2019-01-24 16:30:15 +0100 (Thu, 24 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* perform the clipping in asm in PutPixelX
r41039 | nickysn | 2019-01-24 16:31:54 +0100 (Thu, 24 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

+ enabled the asm version of PutPixelX
r41040 | nickysn | 2019-01-24 16:32:46 +0100 (Thu, 24 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* moved the ES segment register initialization earlier in PutPixelX
r41041 | nickysn | 2019-01-24 16:33:54 +0100 (Thu, 24 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* huge model safe initialization of ES in PutPixelX
r41042 | nickysn | 2019-01-24 16:37:37 +0100 (Thu, 24 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* PutPixelX converted to a pure assembler routine
r41043 | nickysn | 2019-01-24 16:39:26 +0100 (Thu, 24 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

- don't save/restore registers that don't need to be preserved by the pascal calling convention
r41044 | nickysn | 2019-01-24 16:43:43 +0100 (Thu, 24 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* only load the low byte of the color in PutPixelX
r41045 | nickysn | 2019-01-24 16:45:52 +0100 (Thu, 24 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* use stosb instead of mov in PutPixelX
r41048 | nickysn | 2019-01-24 17:04:46 +0100 (Thu, 24 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* DirectPutPixelX split into pascal and asm version
r41049 | nickysn | 2019-01-24 17:06:05 +0100 (Thu, 24 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

- removed the unnecessary for the pascal calling convention register save/restores in DirectPutPixelX
r41050 | nickysn | 2019-01-24 17:06:53 +0100 (Thu, 24 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

- removed the regcall ifdefs in DirectPutPixelX
r41051 | nickysn | 2019-01-24 17:11:33 +0100 (Thu, 24 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* use only 8086/8088 compatible instructions in DirectPutPixelX
r41052 | nickysn | 2019-01-24 17:12:58 +0100 (Thu, 24 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* huge model safe initialization of ES in DirectPutPixelX
r41053 | nickysn | 2019-01-24 17:13:40 +0100 (Thu, 24 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* fixed register in comment
r41054 | nickysn | 2019-01-24 17:14:01 +0100 (Thu, 24 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* fixed register in comment
r41055 | nickysn | 2019-01-24 17:18:07 +0100 (Thu, 24 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

* load only the low byte of CurrentColor in DirectPutPixelX
r41056 | nickysn | 2019-01-24 17:27:20 +0100 (Thu, 24 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

+ implemented all the write modes in the asm version of DirectPutPixelX
r41057 | nickysn | 2019-01-24 17:27:59 +0100 (Thu, 24 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/msdos/graph.pp

+ enabled the asm version of DirectPutPixelX
r41071 | nickysn | 2019-01-25 16:26:21 +0100 (Fri, 25 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/go32v2/graph.pp

+ introduce the InitInt10hMode helper routine in the go32v2 graph unit as well
r41072 | nickysn | 2019-01-25 17:14:07 +0100 (Fri, 25 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/go32v2/graph.pp

- removed destroyed register lists from pure asm routines
r41073 | nickysn | 2019-01-25 17:15:31 +0100 (Fri, 25 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/go32v2/graph.pp

- removed 'ifndef tp' directives
r41097 | nickysn | 2019-01-28 18:11:34 +0100 (Mon, 28 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/go32v2/graph.pp

* converted seg_xorword, seg_orword and seg_andword to pure asm routines
r41098 | nickysn | 2019-01-28 18:15:27 +0100 (Mon, 28 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/go32v2/graph.pp

+ added comment in the beginning of seg_bytemove, containing the parameter locations
r41099 | nickysn | 2019-01-28 18:18:37 +0100 (Mon, 28 Jan 2019) | 2 lines
Changed paths:
M /trunk/packages/graph/src/go32v2/graph.pp

+ added comment to CallInt10 with the parameter location
- removed the 'ifndef REGCALL' section from CallInt10
r41100 | nickysn | 2019-01-28 18:22:25 +0100 (Mon, 28 Jan 2019) | 2 lines
Changed paths:
M /trunk/packages/graph/src/go32v2/graph.pp

+ added comments with the parameter locations in SetCGAPalette and SetCGABorder
- removed 'ifndef REGCALL'
r41101 | nickysn | 2019-01-28 18:25:24 +0100 (Mon, 28 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/go32v2/graph.pp

- removed the unnecessary code from SetVisual200 (the start address that is being read isn't written anywhere and is not used)
r41102 | nickysn | 2019-01-28 18:28:10 +0100 (Mon, 28 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/go32v2/graph.pp

* SetVisual200 and SetVisual350 combined into one routine SetVisual200_350, because they share the same code
r41103 | nickysn | 2019-01-28 18:32:14 +0100 (Mon, 28 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/go32v2/graph.pp

* declare all registers as clobbered by int 10h in the asm block in SetVisual200_350 and leave it to fpc to preserve what is necessary
r41107 | nickysn | 2019-01-29 13:58:52 +0100 (Tue, 29 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/go32v2/graph.pp

+ added comment to PutPixel320 with the parameter locations
r41108 | nickysn | 2019-01-29 14:00:24 +0100 (Tue, 29 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/go32v2/graph.pp

- removed the REGCALL ifdefs from PutPixel320
r41109 | nickysn | 2019-01-29 14:01:32 +0100 (Tue, 29 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/go32v2/graph.pp

- removed the commented out video page code from PutPixel320
r41110 | nickysn | 2019-01-29 14:05:12 +0100 (Tue, 29 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/go32v2/graph.pp

- don't save/restore eax and ecx in PutPixel320, because they don't need to be preserved by the register calling convention
r41111 | nickysn | 2019-01-29 14:09:00 +0100 (Tue, 29 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/go32v2/graph.pp

* use different registers to avoid a mov instruction in PutPixel320
r41112 | nickysn | 2019-01-29 14:13:56 +0100 (Tue, 29 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/go32v2/graph.pp

+ comment in GetPixel320 with the parameter locations
r41113 | nickysn | 2019-01-29 14:14:33 +0100 (Tue, 29 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/go32v2/graph.pp

- removed the REGCALL ifdefs from GetPixel320
r41114 | nickysn | 2019-01-29 14:15:14 +0100 (Tue, 29 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/go32v2/graph.pp

- removed commented out video page code from GetPixel320
r41115 | nickysn | 2019-01-29 14:16:14 +0100 (Tue, 29 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/go32v2/graph.pp

- don't preserve edx and ecx in GetPixel320, because they don't need to be preserved in GetPixel320
r41116 | nickysn | 2019-01-29 14:17:22 +0100 (Tue, 29 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/go32v2/graph.pp

* moved the assembler declaration in PutPixel320 and GetPixel320 to be on the same line as the procedure/function declaration
r41117 | nickysn | 2019-01-29 14:19:31 +0100 (Tue, 29 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/go32v2/graph.pp

- ignore VideoOfs completely in the mode 13h routines (this mode has no video page support)
r41118 | nickysn | 2019-01-29 14:39:40 +0100 (Tue, 29 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/go32v2/graph.pp

* use eax instead of edi in GetPixel320, to avoid saving/restoring edi
r41143 | nickysn | 2019-01-30 13:56:17 +0100 (Wed, 30 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/go32v2/graph.pp

* optimizations in SetActive200 and SetActive350
r41146 | nickysn | 2019-01-30 16:49:00 +0100 (Wed, 30 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/go32v2/graph.pp

* optimizations in SetVisualX and SetActiveX by using a table, instead of a case statement
r41153 | nickysn | 2019-01-31 16:19:45 +0100 (Thu, 31 Jan 2019) | 1 line
Changed paths:
M /trunk/packages/graph/src/go32v2/graph.pp

* split the routines with asm versions into strict pascal and strict asm versions

git-svn-id: branches/fixes_3_2@41498 -

marco 6 tahun lalu
induk
melakukan
a92567f056

+ 242 - 296
packages/graph/src/go32v2/graph.pp

@@ -155,9 +155,13 @@ const
      ScrWidth : word absolute $40:$4a;
      inWindows: boolean;
 
-{$ifndef tp}
   Procedure seg_bytemove(sseg : word;source : longint;dseg : word;dest : longint;count : longint); assembler;
     asm
+      {# Var sseg located in register ax
+       # Var source located in register edx
+       # Var dseg located in register cx
+       # Var dest located at ebp+12, size=OS_S32
+       # Var count located at ebp+8, size=OS_S32 }
       push edi
       push esi
       push es
@@ -173,14 +177,11 @@ const
       pop es
       pop esi
       pop edi
-    end ['ECX'];
-{$endif tp}
+    end;
 
  Procedure CallInt10(val_ax : word); assembler;
    asm
-{$IFNDEF REGCALL}
-     mov ax,val_ax
-{$ENDIF REGCALL}
+      {# Var val_ax located in register ax }
       push ebp
       push esi
       push edi
@@ -190,114 +191,125 @@ const
       pop edi
       pop esi
       pop ebp
-   end ['EAX'];
+   end;
 
-  procedure seg_xorword(segment : word;ofs : longint;count : longint;w : word);
-    begin
-      asm
-         push edi
-         mov edi, [ofs]
-         mov ecx, [count]
-         movzx edx, word ptr [w]
-         { load segment }
-         push es
-         mov ax, [segment]
-         mov es, ax
-         { fill eax }
-         mov eax, edx
-         shl eax, 16
-         or eax, edx
-         test edi, 3
-         jz @@aligned
-         xor word ptr es:[edi], ax
-         add edi, 2
-         dec ecx
-         jz @@done
+ Procedure InitInt10hMode(mode : byte);
+   begin
+     if DontClearGraphMemory then
+       CallInt10(mode or $80)
+     else
+       CallInt10(mode);
+   end;
+
+  procedure seg_xorword(segment : word;ofs : longint;count : longint;w : word); assembler;
+    asm
+      {# Var segment located in register ax
+       # Var ofs located in register edx
+       # Var count located in register ecx
+       # Var w located at ebp+8, size=OS_16 }
+      push edi
+      mov edi, edx
+      { load segment }
+      push es
+      mov es, ax
+      { fill eax }
+      movzx edx, word ptr [w]
+      mov eax, edx
+      shl eax, 16
+      or eax, edx
+      test edi, 3
+      jz @@aligned
+      xor word ptr es:[edi], ax
+      add edi, 2
+      dec ecx
+      jz @@done
 @@aligned:
-         mov edx, ecx
-         shr ecx, 1
-@@lp:    xor dword ptr es:[edi], eax
-         add edi, 4
-         dec ecx
-         jnz @@lp
-         test edx, 1
-         jz @@done
-         xor word ptr es:[edi], ax
-@@done:  pop es
-         pop edi
-      end;
+      mov edx, ecx
+      shr ecx, 1
+@@lp: xor dword ptr es:[edi], eax
+      add edi, 4
+      dec ecx
+      jnz @@lp
+      test edx, 1
+      jz @@done
+      xor word ptr es:[edi], ax
+@@done:
+      pop es
+      pop edi
     end;
 
-  procedure seg_orword(segment : word;ofs : longint;count : longint;w : word);
-    begin
-      asm
-         push edi
-         mov edi, [ofs]
-         mov ecx, [count]
-         movzx edx, word ptr [w]
-         { load segment }
-         push es
-         mov ax, [segment]
-         mov es, ax
-         { fill eax }
-         mov eax, edx
-         shl eax, 16
-         or eax, edx
-         test edi, 3
-         jz @@aligned
-         or word ptr es:[edi], ax
-         add edi, 2
-         dec ecx
-         jz @@done
+  procedure seg_orword(segment : word;ofs : longint;count : longint;w : word); assembler;
+    asm
+      {# Var segment located in register ax
+       # Var ofs located in register edx
+       # Var count located in register ecx
+       # Var w located at ebp+8, size=OS_16 }
+      push edi
+      mov edi, edx
+      { load segment }
+      push es
+      mov es, ax
+      { fill eax }
+      movzx edx, word ptr [w]
+      mov eax, edx
+      shl eax, 16
+      or eax, edx
+      test edi, 3
+      jz @@aligned
+      or word ptr es:[edi], ax
+      add edi, 2
+      dec ecx
+      jz @@done
 @@aligned:
-         mov edx, ecx
-         shr ecx, 1
-@@lp:    or dword ptr es:[edi], eax
-         add edi, 4
-         dec ecx
-         jnz @@lp
-         test edx, 1
-         jz @@done
-         or word ptr es:[edi], ax
-@@done:  pop es
-         pop edi
-      end;
+      mov edx, ecx
+      shr ecx, 1
+@@lp: or dword ptr es:[edi], eax
+      add edi, 4
+      dec ecx
+      jnz @@lp
+      test edx, 1
+      jz @@done
+      or word ptr es:[edi], ax
+@@done:
+      pop es
+      pop edi
     end;
 
-  procedure seg_andword(segment : word;ofs : longint;count : longint;w : word);
-    begin
-      asm
-         push edi
-         mov edi, [ofs]
-         mov ecx, [count]
-         movzx edx, word ptr [w]
-         { load segment }
-         push es
-         mov ax, [segment]
-         mov es, ax
-         { fill eax }
-         mov eax, edx
-         shl eax, 16
-         or eax, edx
-         test edi, 3
-         jz @@aligned
-         and word ptr es:[edi], ax
-         add edi, 2
-         dec ecx
-         jz @@done
+  procedure seg_andword(segment : word;ofs : longint;count : longint;w : word); assembler;
+    asm
+      {# Var segment located in register ax
+       # Var ofs located in register edx
+       # Var count located in register ecx
+       # Var w located at ebp+8, size=OS_16 }
+      push edi
+      mov edi, edx
+      { load segment }
+      push es
+      mov es, ax
+      { fill eax }
+      movzx edx, word ptr [w]
+      mov eax, edx
+      shl eax, 16
+      or eax, edx
+      test edi, 3
+      jz @@aligned
+      and word ptr es:[edi], ax
+      add edi, 2
+      dec ecx
+      jz @@done
 @@aligned:
-         mov edx, ecx
-         shr ecx, 1
-@@lp:    and dword ptr es:[edi], eax
-         add edi, 4
-         dec ecx
-         jnz @@lp
-         test edx, 1
-         jz @@done
-         and word ptr es:[edi], ax
-@@done:  pop es
-         pop edi
-      end;
+      mov edx, ecx
+      shr ecx, 1
+@@lp: and dword ptr es:[edi], eax
+      add edi, 4
+      dec ecx
+      jnz @@lp
+      test edx, 1
+      jz @@done
+      and word ptr es:[edi], ax
+@@done:
+      pop es
+      pop edi
     end;
 
 {************************************************************************}
@@ -671,9 +683,7 @@ var
 
 procedure SetCGAPalette(CGAPaletteID: Byte); assembler;
 asm
-{$IFNDEF REGCALL}
-  mov ax,val_ax
-{$ENDIF REGCALL}
+  {# Var CGAPaletteID located in register al }
   push ebp
   push esi
   push edi
@@ -690,9 +700,7 @@ end;
 
 procedure SetCGABorder(CGABorder: Byte); assembler;
 asm
-{$IFNDEF REGCALL}
-  mov ax,val_ax
-{$ENDIF REGCALL}
+  {# Var CGABorder located in register al }
   push ebp
   push esi
   push edi
@@ -722,10 +730,7 @@ end;
 
 procedure InitCGA320C0;
 begin
-  if DontClearGraphMemory then
-    CallInt10($84)
-  else
-    CallInt10($04);
+  InitInt10hMode($04);
   VideoOfs := 0;
   SetCGAPalette(0);
   SetCGABorder(16);
@@ -734,10 +739,7 @@ end;
 
 procedure InitCGA320C1;
 begin
-  if DontClearGraphMemory then
-    CallInt10($84)
-  else
-    CallInt10($04);
+  InitInt10hMode($04);
   VideoOfs := 0;
   SetCGAPalette(1);
   SetCGABorder(16);
@@ -746,10 +748,7 @@ end;
 
 procedure InitCGA320C2;
 begin
-  if DontClearGraphMemory then
-    CallInt10($84)
-  else
-    CallInt10($04);
+  InitInt10hMode($04);
   VideoOfs := 0;
   SetCGAPalette(2);
   SetCGABorder(0);
@@ -758,10 +757,7 @@ end;
 
 procedure InitCGA320C3;
 begin
-  if DontClearGraphMemory then
-    CallInt10($84)
-  else
-    CallInt10($04);
+  InitInt10hMode($04);
   VideoOfs := 0;
   SetCGAPalette(3);
   SetCGABorder(0);
@@ -1054,10 +1050,7 @@ end;
 
 procedure InitCGA640;
 begin
-  if DontClearGraphMemory then
-    CallInt10($86)
-  else
-    CallInt10($06);
+  InitInt10hMode($06);
   VideoOfs := 0;
   CurrentCGABorder := 0; {yes, TP7 CGA.BGI behaves *exactly* like that}
 end;
@@ -1365,10 +1358,7 @@ end;
 
 procedure InitMCGA640;
 begin
-  if DontClearGraphMemory then
-    CallInt10($91)
-  else
-    CallInt10($11);
+  InitInt10hMode($11);
   VideoOfs := 0;
   CurrentCGABorder := 0; {yes, TP7 CGA.BGI behaves *exactly* like that}
 end;
@@ -1664,20 +1654,14 @@ end;
 
   Procedure Init640x200x16;
     begin
-      if DontClearGraphMemory then
-        CallInt10($8e)
-      else
-        CallInt10($e);
+      InitInt10hMode($e);
       VideoOfs := 0;
     end;
 
 
    Procedure Init640x350x16;
     begin
-      if DontClearGraphMemory then
-        CallInt10($90)
-      else
-        CallInt10($10);
+      InitInt10hMode($10);
       VideoOfs := 0;
     end;
 
@@ -1685,21 +1669,17 @@ end;
 
   Procedure Init640x480x16;
     begin
-      if DontClearGraphMemory then
-        CallInt10($92)
-      else
-        CallInt10($12);
+      InitInt10hMode($12);
       VideoOfs := 0;
     end;
 
 
 
 
- Procedure PutPixel16(X,Y : smallint; Pixel: Word);
 {$ifndef asmgraph}
+ Procedure PutPixel16(X,Y : smallint; Pixel: Word);
  var offset: word;
      dummy: byte;
-{$endif asmgraph}
   Begin
     X:= X + StartXViewPort;
     Y:= Y + StartYViewPort;
@@ -1711,7 +1691,6 @@ end;
        if (Y < StartYViewPort) or (Y > (StartYViewPort + ViewHeight)) then
          exit;
      end;
-{$ifndef asmgraph}
      offset := y * 80 + (x shr 3) + VideoOfs;
      PortW[$3ce] := $0f01;       { Index 01 : Enable ops on all 4 planes }
      PortW[$3ce] := (Pixel and $ff) shl 8; { Index 00 : Enable correct plane and write color }
@@ -1721,7 +1700,20 @@ end;
      Mem[Sega000: offset] := dummy;  { Write the data into video memory }
      PortW[$3ce] := $ff08;         { Enable all bit planes.           }
      PortW[$3ce] := $0001;         { Index 01 : Disable ops on all four planes.         }
+   end;
 {$else asmgraph}
+ Procedure PutPixel16(X,Y : smallint; Pixel: Word);
+  Begin
+    X:= X + StartXViewPort;
+    Y:= Y + StartYViewPort;
+    { convert to absolute coordinates and then verify clipping...}
+    if ClipPixels then
+     Begin
+       if (X < StartXViewPort) or (X > (StartXViewPort + ViewWidth)) then
+         exit;
+       if (Y < StartYViewPort) or (Y > (StartYViewPort + ViewHeight)) then
+         exit;
+     end;
       asm
         push eax
         push ebx
@@ -1776,19 +1768,17 @@ end;
         pop ebx
         pop eax
       end;
-{$endif asmgraph}
    end;
+{$endif asmgraph}
 
 
- Function GetPixel16(X,Y: smallint):word;
 {$ifndef asmgraph}
+ Function GetPixel16(X,Y: smallint):word;
  Var dummy, offset: Word;
      shift: byte;
-{$endif asmgraph}
   Begin
     X:= X + StartXViewPort;
     Y:= Y + StartYViewPort;
-{$ifndef asmgraph}
     offset := Y * 80 + (x shr 3) + VideoOfs;
     PortW[$3ce] := $0004;
     shift := 7 - (X and 7);
@@ -1800,7 +1790,12 @@ end;
     Port[$3cf] := 3;
     dummy := dummy or (((Mem[Sega000:offset] shr shift) and 1) shl 3);
     GetPixel16 := dummy;
+  end;
 {$else asmgraph}
+ Function GetPixel16(X,Y: smallint):word;
+  Begin
+    X:= X + StartXViewPort;
+    Y:= Y + StartYViewPort;
     asm
       push eax
       push ebx
@@ -1876,8 +1871,8 @@ end;
       pop ebx
       pop eax
     end;
-{$endif asmgraph}
   end;
+{$endif asmgraph}
 
 Procedure GetScanLine16(x1, x2, y: smallint; var data);
 
@@ -2006,14 +2001,13 @@ Begin
 {$Endif logging}
 End;
 
+{$ifndef asmgraph}
  Procedure DirectPutPixel16(X,Y : smallint);
  { x,y -> must be in global coordinates. No clipping. }
   var
    color: word;
-{$ifndef asmgraph}
   offset: word;
   dummy: byte;
-{$endif asmgraph}
  begin
     If CurrentWriteMode <> NotPut Then
       Color := CurrentColor
@@ -2032,7 +2026,6 @@ End;
        else
          PortW[$3ce]:=$0003}
     end;
-{$ifndef asmgraph}
     offset := Y * 80 + (X shr 3) + VideoOfs;
     PortW[$3ce] := $f01;
     PortW[$3ce] := Color shl 8;
@@ -2045,7 +2038,30 @@ End;
        (CurrentWriteMode = ANDPut) or
        (CurrentWriteMode = ORPut) then
       PortW[$3ce] := $0003;
+ end;
 {$else asmgraph}
+ Procedure DirectPutPixel16(X,Y : smallint);
+ { x,y -> must be in global coordinates. No clipping. }
+  var
+   color: word;
+ begin
+    If CurrentWriteMode <> NotPut Then
+      Color := CurrentColor
+    else Color := not CurrentColor;
+
+    case CurrentWriteMode of
+       XORPut:
+         PortW[$3ce]:=((3 shl 3) shl 8) or 3;
+       ANDPut:
+         PortW[$3ce]:=((1 shl 3) shl 8) or 3;
+       ORPut:
+         PortW[$3ce]:=((2 shl 3) shl 8) or 3;
+       {not needed, this is the default state (e.g. PutPixel16 requires it)}
+       {NormalPut, NotPut:
+         PortW[$3ce]:=$0003
+       else
+         PortW[$3ce]:=$0003}
+    end;
 { note: still needs xor/or/and/notput support !!!!! (JM) }
     asm
       push eax
@@ -2101,8 +2117,8 @@ End;
       pop ebx
       pop eax
     end;
-{$endif asmgraph}
  end;
+{$endif asmgraph}
 
 
   procedure HLine16(x,x2,y: smallint);
@@ -2172,11 +2188,7 @@ End;
          if HLength>0 then
            begin
               Port[$3cf]:=$ff;
-{$ifndef tp}
               seg_bytemove(dosmemselector,$a0000+ScrOfs,dosmemselector,$a0000+ScrOfs,HLength);
-{$else}
-              move(Ptr(SegA000,ScrOfs)^, Ptr(SegA000,ScrOfs)^, HLength);
-{$endif}
               ScrOfs:=ScrOfs+HLength;
            end;
          Port[$3cf]:=RMask;
@@ -2254,78 +2266,32 @@ End;
   End;
 
 
- procedure SetVisual200(page: word);
-  { four page support... }
+ procedure SetVisual200_350(page: word);
   begin
     if page > HardwarePages then exit;
     asm
-      mov ax,[page]    { only lower byte is supPorted. }
+      mov ax,[page]    { only lower byte is supported. }
       mov ah,05h
-      push ebp
-      push esi
-      push edi
-      push ebx
       int 10h
-      pop ebx
-      pop edi
-      pop esi
-      pop ebp
-
-      { read start address }
-      mov dx,3d4h
-      mov al,0ch
-      out dx,al
-      inc dx
-      in  al,dx
-      mov ah,al
-      dec dx
-      mov al,0dh
-      out dx,al
-      in  al,dx
-    end ['EDX','EAX'];
+    end ['EAX','EBX','ECX','EDX','ESI','EDI','EBP'];
   end;
 
  procedure SetActive200(page: word);
   { four page support... }
   begin
-    case page of
-     0 : VideoOfs := 0;
-     1 : VideoOfs := 16384;
-     2 : VideoOfs := 32768;
-     3 : VideoOfs := 49152;
+    if (page >= 0) and (page <= 3) then
+      VideoOfs := page shl 14
     else
       VideoOfs := 0;
-    end;
-  end;
-
- procedure SetVisual350(page: word);
-  { one page supPort... }
-  begin
-    if page > HardwarePages then exit;
-    asm
-      mov ax,[page]    { only lower byte is supPorted. }
-      mov ah,05h
-      push ebp
-      push esi
-      push edi
-      push ebx
-      int 10h
-      pop ebx
-      pop edi
-      pop esi
-      pop ebp
-    end ['EAX'];
   end;
 
  procedure SetActive350(page: word);
   { one page supPort... }
   begin
-    case page of
-     0 : VideoOfs := 0;
-     1 : VideoOfs := 32768;
+    if page = 1 then
+      VideoOfs := 32768
     else
       VideoOfs := 0;
-    end;
   end;
 
 
@@ -2338,31 +2304,21 @@ End;
 
  Procedure Init320;
     begin
-      if DontClearGraphMemory then
-        CallInt10($93)
-      else
-        CallInt10($13);
-      VideoOfs := 0;
+      InitInt10hMode($13);
     end;
 
 
 
- Procedure PutPixel320(X,Y : smallint; Pixel: Word);
+ Procedure PutPixel320(X,Y : smallint; Pixel: Word); assembler;
  { x,y -> must be in local coordinates. Clipping if required. }
-  assembler;
   asm
-      push eax
+      {# Var X located in register ax
+       # Var Y located in register dx
+       # Var Pixel located in register cx }
       push ebx
-      push ecx
       push edi
-{$IFDEF REGCALL}
       movsx  edi, ax
       movsx  ebx, dx
-      mov    al, cl
-{$ELSE REGCALL}
-      movsx  edi, x
-      movsx  ebx, y
-{$ENDIF REGCALL}
       cmp    clippixels, 0
       je     @putpix320noclip
       test   edi, edi
@@ -2374,62 +2330,45 @@ End;
       cmp    bx, ViewHeight
       jg     @putpix320done
 @putpix320noclip:
-      movsx  ecx, StartYViewPort
+      movsx  eax, StartYViewPort
       movsx  edx, StartXViewPort
-      add    ebx, ecx
+      add    ebx, eax
       add    edi, edx
-{    add    edi, [VideoOfs]      no multiple pages in 320*200*256 }
-{$IFNDEF REGCALL}
-      mov    ax, [pixel]
-{$ENDIF REGCALL}
       shl    ebx, 6
       add    edi, ebx
-      mov    fs:[edi+ebx*4+$a0000], al
+      mov    fs:[edi+ebx*4+$a0000], cl
 @putpix320done:
       pop edi
-      pop ecx
       pop ebx
-      pop eax
  end;
 
 
- Function GetPixel320(X,Y: smallint):word;
-  assembler;
+ Function GetPixel320(X,Y: smallint):word; assembler;
   asm
+    {# Var X located in register ax
+     # Var Y located in register dx }
     push ebx
-    push ecx
-    push edx
-    push edi
-{$IFDEF REGCALL}
-    movsx  edi, ax
+    movsx  eax, ax
     movsx  ebx, dx
-{$ELSE REGCALL}
-    movsx  edi, x
-    movsx  ebx, y
-{$ENDIF REGCALL}
     movsx  ecx, StartYViewPort
     movsx  edx, StartXViewPort
     add    ebx, ecx
-    add    edi, edx
- {   add    edi, [VideoOfs]       no multiple pages in 320*200*256 }
+    add    eax, edx
     shl    ebx, 6
-    add    edi, ebx
-    movzx  eax, byte ptr fs:[edi+ebx*4+$a0000]
-    pop edi
-    pop edx
-    pop ecx
+    add    eax, ebx
+    movzx  eax, byte ptr fs:[eax+ebx*4+$a0000]
     pop ebx
   end;
 
 
+{$ifndef asmgraph}
  Procedure DirectPutPixel320(X,Y : smallint);
  { x,y -> must be in global coordinates. No clipping. }
-{$ifndef asmgraph}
  var offset: word;
      dummy: Byte;
  begin
    dummy := CurrentColor;
-   offset := y * 320 + x + VideoOfs;
+   offset := y * 320 + x;
    case CurrentWriteMode of
      XorPut: dummy := dummy xor Mem[Sega000:offset];
      OrPut: dummy := dummy or Mem[Sega000:offset];
@@ -2439,8 +2378,9 @@ End;
    Mem[SegA000:offset] := dummy;
  end;
 {$else asmgraph}
+ Procedure DirectPutPixel320(X,Y : smallint); assembler;
+ { x,y -> must be in global coordinates. No clipping. }
 { note: still needs or/and/notput support !!!!! (JM) }
-  assembler;
     asm
       push eax
       push ebx
@@ -2452,7 +2392,6 @@ End;
       movzx  edi, x
       movzx  ebx, y
 {$ENDIF REGCALL}
-   {   add    edi, [VideoOfs]       no multiple pages in 320*200*256 }
       shl    ebx, 6
       add    edi, ebx
       mov    ax, [CurrentColor]
@@ -2471,19 +2410,19 @@ End;
  procedure SetVisual320(page: word);
   { no page supPort... }
   begin
-    VideoOfs := 0;
   end;
 
  procedure SetActive320(page: word);
   { no page supPort... }
   begin
-    VideoOfs := 0;
   end;
 
  {************************************************************************}
  {*                       Mode-X related routines                        *}
  {************************************************************************}
-const CrtAddress: word = 0;
+const
+  CrtAddress: word = 0;
+  ModeXVideoPageStart: array [0..3] of longint = (0,16000,32000,48000);
 
  procedure InitModeX;
   begin
@@ -2560,18 +2499,21 @@ const CrtAddress: word = 0;
  end;
 
 
- Function GetPixelX(X,Y: smallint): word;
 {$ifndef asmgraph}
+ Function GetPixelX(X,Y: smallint): word;
  var offset: word;
-{$endif asmgraph}
   begin
      X:= X + StartXViewPort;
      Y:= Y + StartYViewPort;
-{$ifndef asmgraph}
      offset := y * 80 + x shr 2 + VideoOfs;
      PortW[$3ce] := ((x and 3) shl 8) + 4;
      GetPixelX := Mem[SegA000:offset];
+ end;
 {$else asmgraph}
+ Function GetPixelX(X,Y: smallint): word;
+  begin
+     X:= X + StartXViewPort;
+     Y:= Y + StartYViewPort;
     asm
      push eax
      push ebx
@@ -2606,11 +2548,11 @@ const CrtAddress: word = 0;
     pop ebx
     pop eax
    end;
-{$endif asmgraph}
  end;
+{$endif asmgraph}
 
  procedure SetVisualX(page: word);
-  { 4 page supPort... }
+  { 4 page support... }
 
    Procedure SetVisibleStart(AOffset: word); Assembler;
    (* Select where the left corner of the screen will be *)
@@ -2663,33 +2605,24 @@ const CrtAddress: word = 0;
 {$undef asmgraph}
 
   begin
-    Case page of
-      0: SetVisibleStart(0);
-      1: SetVisibleStart(16000);
-      2: SetVisibleStart(32000);
-      3: SetVisibleStart(48000);
+    if (page >= 0) and (page <= 3) then
+      SetVisibleStart(ModeXVideoPageStart[page])
     else
       SetVisibleStart(0);
-    end;
   end;
 
  procedure SetActiveX(page: word);
-  { 4 page supPort... }
+  { 4 page support... }
   begin
-   case page of
-     0: VideoOfs := 0;
-     1: VideoOfs := 16000;
-     2: VideoOfs := 32000;
-     3: VideoOfs := 48000;
-   else
-     VideoOfs:=0;
-   end;
+    if (page >= 0) and (page <= 3) then
+      VideoOfs := ModeXVideoPageStart[page]
+    else
+      VideoOfs := 0;
   end;
 
- Procedure PutPixelX(X,Y: smallint; color:word);
 {$ifndef asmgraph}
+ Procedure PutPixelX(X,Y: smallint; color:word);
  var offset: word;
-{$endif asmgraph}
   begin
     X:= X + StartXViewPort;
     Y:= Y + StartYViewPort;
@@ -2701,11 +2634,23 @@ const CrtAddress: word = 0;
        if (Y < StartYViewPort) or (Y > (StartYViewPort + ViewHeight)) then
          exit;
      end;
-{$ifndef asmgraph}
     offset := y * 80 + x shr 2 + VideoOfs;
     PortW[$3c4] := (hi(word(FirstPlane)) shl 8) shl (x and 3)+ lo(word(FirstPlane));
     Mem[SegA000:offset] := color;
+  end;
 {$else asmgraph}
+ Procedure PutPixelX(X,Y: smallint; color:word);
+  begin
+    X:= X + StartXViewPort;
+    Y:= Y + StartYViewPort;
+    { convert to absolute coordinates and then verify clipping...}
+    if ClipPixels then
+     Begin
+       if (X < StartXViewPort) or (X > (StartXViewPort + ViewWidth)) then
+         exit;
+       if (Y < StartYViewPort) or (Y > (StartYViewPort + ViewHeight)) then
+         exit;
+     end;
      asm
       push ax
       push bx
@@ -2748,13 +2693,13 @@ const CrtAddress: word = 0;
       pop bx
       pop ax
     end;
-{$endif asmgraph}
   end;
+{$endif asmgraph}
 
 
+{$ifndef asmgraph}
  Procedure DirectPutPixelX(X,Y: smallint);
  { x,y -> must be in global coordinates. No clipping. }
-{$ifndef asmgraph}
  Var offset: Word;
      dummy: Byte;
  begin
@@ -2782,8 +2727,9 @@ const CrtAddress: word = 0;
    Mem[Sega000: offset] := Dummy;
  end;
 {$else asmgraph}
+ Procedure DirectPutPixelX(X,Y: smallint); Assembler;
+ { x,y -> must be in global coordinates. No clipping. }
 { note: still needs or/and/notput support !!!!! (JM) }
- Assembler;
  asm
    push ax
    push bx
@@ -3607,7 +3553,7 @@ const CrtAddress: word = 0;
          mode.MaxX := 639;
          mode.MaxY := 199;
          mode.HardwarePages := 3;
-         mode.SetVisualPage := @SetVisual200;
+         mode.SetVisualPage := @SetVisual200_350;
          mode.SetActivePage := @SetActive200;
          mode.InitMode := @Init640x200x16;
          mode.XAspect := 4500;
@@ -3622,7 +3568,7 @@ const CrtAddress: word = 0;
          mode.MaxX := 639;
          mode.MaxY := 349;
          mode.HardwarePages := 1;
-         mode.SetVisualPage := @SetVisual350;
+         mode.SetVisualPage := @SetVisual200_350;
          mode.SetActivePage := @SetActive350;
          mode.InitMode := @Init640x350x16;
          mode.XAspect := 7750;
@@ -3780,7 +3726,7 @@ const CrtAddress: word = 0;
          mode.MaxX := 639;
          mode.MaxY := 199;
          mode.HardwarePages := 3;
-         mode.SetVisualPage := @SetVisual200;
+         mode.SetVisualPage := @SetVisual200_350;
          mode.SetActivePage := @SetActive200;
          mode.InitMode := @Init640x200x16;
          mode.XAspect := 4500;
@@ -3795,7 +3741,7 @@ const CrtAddress: word = 0;
          mode.MaxX := 639;
          mode.MaxY := 349;
          mode.HardwarePages := 1;
-         mode.SetVisualPage := @SetVisual350;
+         mode.SetVisualPage := @SetVisual200_350;
          mode.SetActivePage := @SetActive350;
          mode.InitMode := @Init640x350x16;
          mode.XAspect := 7750;

+ 33 - 35
packages/graph/src/inc/fills.inc

@@ -433,36 +433,45 @@ var
    Cont : Boolean;
    BackupColor : ColorType;
    x1, x2, prevy: smallint;
+   SBufferSize, DrawnListSize: SizeUInt;
   Begin
-    GetMem(DrawnList,sizeof(PFloodLine)*((ViewHeight div YResDiv) + 1));
-    FillChar(DrawnList^,sizeof(PFloodLine)*((ViewHeight div YResDiv) + 1),0);
-    { init prevy }
-    prevy := 32767;
-    { Save current drawing color }
-    BackupColor := CurrentColor;
-    CurrentColor := FillSettings.Color;
+    If (x<0) Or (y<0) Or
+       (x>ViewWidth) Or (y>ViewHeight) then Exit;
+    DrawnListSize:=sizeof(PFloodLine)*((ViewHeight div YResDiv) + 1);
     { MaxX is based on zero index }
 {$ifdef FPC_GRAPH_SUPPORTS_TRUECOLOR}
     if MaxColor > 65536 then
-    begin
-      GetMem (s1,(ViewWidth+1)*4);  { A pixel color represents a word }
-      GetMem (s2,(ViewWidth+1)*4);  { A pixel color represents a word }
-      GetMem (s3,(ViewWidth+1)*4);  { A pixel color represents a word }
-    end
+      SBufferSize := (ViewWidth+1)*4   { A pixel color is represented by a longword }
     else
 {$endif FPC_GRAPH_SUPPORTS_TRUECOLOR}
-    begin
-      GetMem (s1,(ViewWidth+1)*2);  { A pixel color represents a word }
-      GetMem (s2,(ViewWidth+1)*2);  { A pixel color represents a word }
-      GetMem (s3,(ViewWidth+1)*2);  { A pixel color represents a word }
-    end;
-    if (not assigned(s1)) or (not assigned(s2)) or (not assigned(s3)) then
+      SBufferSize := (ViewWidth+1)*2;  { A pixel color is represented by a word }
+    DrawnList:=nil;
+    s1:=nil;
+    s2:=nil;
+    s3:=nil;
+    GetMem(DrawnList,DrawnListSize);
+    GetMem (s1,SBufferSize);
+    GetMem (s2,SBufferSize);
+    GetMem (s3,SBufferSize);
+    if (not assigned(DrawnList)) or (not assigned(s1)) or (not assigned(s2)) or (not assigned(s3)) then
       begin
         _GraphResult := grNoFloodMem;
+        if assigned(s1) then
+          System.FreeMem (s1,SBufferSize);
+        if assigned(s2) then
+          System.FreeMem (s2,SBufferSize);
+        if assigned(s3) then
+          System.FreeMem (s3,SBufferSize);
+        if assigned(DrawnList) then
+          System.FreeMem(DrawnList,DrawnListSize);
         exit;
       end;
-    If (x<0) Or (y<0) Or
-       (x>ViewWidth) Or (y>ViewHeight) then Exit;
+    FillChar(DrawnList^,DrawnListSize,0);
+    { init prevy }
+    prevy := 32767;
+    { Save current drawing color }
+    BackupColor := CurrentColor;
+    CurrentColor := FillSettings.Color;
     { Index of points to check  }
     Buffer.WordIndex:=0;
     PushPoint (x,y);
@@ -591,22 +600,11 @@ var
        PatternLine (x1,x2,y);
      End; { end while }
 
-{$ifdef FPC_GRAPH_SUPPORTS_TRUECOLOR}
-    if MaxColor > 65536 then
-    begin
-      System.FreeMem (s1,(ViewWidth+1)*4);
-      System.FreeMem (s2,(ViewWidth+1)*4);
-      System.FreeMem (s3,(ViewWidth+1)*4);
-    end
-    else
-{$endif FPC_GRAPH_SUPPORTS_TRUECOLOR}
-    begin
-      System.FreeMem (s1,(ViewWidth+1)*2);
-      System.FreeMem (s2,(ViewWidth+1)*2);
-      System.FreeMem (s3,(ViewWidth+1)*2);
-    end;
+    System.FreeMem (s1,SBufferSize);
+    System.FreeMem (s2,SBufferSize);
+    System.FreeMem (s3,SBufferSize);
     CleanUpDrawnList;
-    System.FreeMem(DrawnList,sizeof(PFloodLine)*((ViewHeight div YResDiv) + 1));
+    System.FreeMem(DrawnList,DrawnListSize);
     CurrentColor := BackUpColor;
   End;
 

+ 5 - 5
packages/graph/src/inc/graph.inc

@@ -1312,28 +1312,28 @@ end;
      Halt(1);
    end;
 
-  procedure DirectPutPixelDefault(X,Y: smallint);
+  procedure DirectPutPixelDefault(X,Y: smallint); noreturn;
    begin
      NotInGraphicsMode;
    end;
 
-  function GetPixelDefault(X,Y: smallint): ColorType;
+  function GetPixelDefault(X,Y: smallint): ColorType; noreturn;
    begin
      NotInGraphicsMode;
    end;
 
-  procedure PutPixelDefault(X,Y: smallint; Color: ColorType);
+  procedure PutPixelDefault(X,Y: smallint; Color: ColorType); noreturn;
    begin
      NotInGraphicsMode;
    end;
 
-  procedure SetRGBPaletteDefault(ColorNum, RedValue, GreenValue, BlueValue: smallint);
+  procedure SetRGBPaletteDefault(ColorNum, RedValue, GreenValue, BlueValue: smallint); noreturn;
    begin
      NotInGraphicsMode;
    end;
 
   procedure GetRGBPaletteDefault(ColorNum: smallint; var
-            RedValue, GreenValue, BlueValue: smallint);
+            RedValue, GreenValue, BlueValue: smallint); noreturn;
    begin
      NotInGraphicsMode;
    end;

File diff ditekan karena terlalu besar
+ 355 - 340
packages/graph/src/msdos/graph.pp


+ 1 - 1
packages/graph/src/ptcgraph/ptcgraph.pp

@@ -17,7 +17,7 @@
 unit ptcgraph;
 
 {//$define logging}
-{//$define FPC_GRAPH_SUPPORTS_TRUECOLOR}
+{$define FPC_GRAPH_SUPPORTS_TRUECOLOR}
 
 {******************************************************************************}
                                     interface

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini