2 ; Christian Groessler, December 2000
4 ; this file provides an equivalent to the BASIC GRAPHICS function
6 ; void __fastcall__ graphics(unsigned char mode);
9 .constructor initscrmem,28
11 .import __graphmode_used
20 rts ; not implemented yet!
25 ; calc. upper memory limit to use
30 beq ignore ; mode 0 doesn't need adjustment
32 bcs ignore ; invalid value
49 ; memory usage of the different graphics modes (0-31)
50 ; values < 0 of "bytes needed" are mappped to 0
51 ; bytes needed ; mode ; val. of MEMTOP
54 .word 0 ;-318 ; 1 ; 40285
55 .word 0 ;-568 ; 2 ; 40535
56 .word 0 ;-558 ; 3 ; 40525
57 .word 0 ;-298 ; 4 ; 40265
59 .word 1182 ; 6 ; 38785
60 .word 3198 ; 7 ; 36769
61 .word 7120 ; 8 ; 32847
62 .word 7146 ; 9 ; 32821
63 .word 7146 ; 10 ; 32821
64 .word 7146 ; 11 ; 32821
65 .word 162 ; 12 ; 39805
66 .word 0 ;-328 ; 13 ; 40295
67 .word 3278 ; 14 ; 36689
68 .word 7120 ; 15 ; 32847
70 .word 0 ;-320 ; 17 ; 40287
71 .word 0 ;-572 ; 18 ; 40539
72 .word 0 ;-560 ; 19 ; 40527
73 .word 0 ;-296 ; 20 ; 40263
74 .word 184 ; 21 ; 39783
75 .word 1192 ; 22 ; 38775
76 .word 3208 ; 23 ; 36759
77 .word 7146 ; 24 ; 32821
78 .word 7146 ; 25 ; 32821
79 .word 7146 ; 26 ; 32821
80 .word 7146 ; 27 ; 32821
81 .word 160 ; 28 ; 39807
82 .word 0 ;-332 ; 29 ; 40299
83 .word 3304 ; 30 ; 36663
84 .word 7146 ; 31 ; 32821
86 ; the program used to get these values (Atari BASIC):
88 ; 110 IF FILE=1 THEN OPEN #1,8,0,"D:FREEMEM.OUT"
89 ; 120 IF FILE<>1 THEN OPEN #1,8,0,"E:"
91 ; 210 FOR I=0 TO 32:GRAPHICS I:GOSUB 1000:G(I)=VAL:NEXT I
93 ; 230 FOR I=0 TO 31:PRINT #1;I;":",G(I);" - ";G(0)-G(I):NEXT I
96 ; 1000 VAL=PEEK(741)+256*PEEK(742)