ugBASIC 1.18
An isomorphic BASIC language compiler for retrocomputers
Loading...
Searching...
No Matches
put_image.c
Go to the documentation of this file.
1/*****************************************************************************
2 * ugBASIC - an isomorphic BASIC language compiler for retrocomputers *
3 *****************************************************************************
4 * Copyright 2021-2026 Marco Spedaletti (asimov@mclink.it)
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *----------------------------------------------------------------------------
18 * Concesso in licenza secondo i termini della Licenza Apache, versione 2.0
19 * (la "Licenza"); è proibito usare questo file se non in conformità alla
20 * Licenza. Una copia della Licenza è disponibile all'indirizzo:
21 *
22 * http://www.apache.org/licenses/LICENSE-2.0
23 *
24 * Se non richiesto dalla legislazione vigente o concordato per iscritto,
25 * il software distribuito nei termini della Licenza è distribuito
26 * "COSÌ COM'È", SENZA GARANZIE O CONDIZIONI DI ALCUN TIPO, esplicite o
27 * implicite. Consultare la Licenza per il testo specifico che regola le
28 * autorizzazioni e le limitazioni previste dalla medesima.
29 ****************************************************************************/
30
31/****************************************************************************
32 * INCLUDE SECTION
33 ****************************************************************************/
34
35#include "../../ugbc.h"
36
37/****************************************************************************
38 * CODE SECTION
39 ****************************************************************************/
40
41extern char DATATYPE_AS_STRING[][16];
42
53
54 void put_image_vars_original( Environment * _environment, char * _image, char * _x1, char * _y1, char * _x2, char * _y2, char * _frame, char * _sequence, char * _flags ) {
55
56 if ( _environment->emptyProcedure ) {
57 return;
58 }
59
61
62 Variable * image = variable_retrieve( _environment, _image );
63
64 Resource * resource = build_resource_for_sequence( _environment, _image, _frame, _sequence );
65
66 switch( resource->type ) {
67 case VT_SEQUENCE:
68 if ( image->bankAssigned != -1 ) {
69
70 char alreadyLoadedLabel[MAX_TEMPORARY_STORAGE];
71 sprintf(alreadyLoadedLabel, "%salready", label );
72
73 char bankWindowId[MAX_TEMPORARY_STORAGE];
74 sprintf( bankWindowId, "(BANKWINDOW%2.2x-2)", image->residentAssigned );
75
76 char bankWindowName[MAX_TEMPORARY_STORAGE];
77 sprintf( bankWindowName, "BANKWINDOW%2.2x", image->residentAssigned );
78
79 // cpu_compare_and_branch_16bit_const( _environment, bankWindowId, image->variableUniqueId, alreadyLoadedLabel, 1 );
80 // if ( image->uncompressedSize ) {
81 // bank_uncompress_semi_var( _environment, image->bankAssigned, image->absoluteAddress, bankWindowName );
82 // } else {
83 // bank_read_semi_var( _environment, image->bankAssigned, image->absoluteAddress, bankWindowName, image->size );
84 // }
85 // cpu_store_16bit(_environment, bankWindowId, image->variableUniqueId );
86 // cpu_label( _environment, alreadyLoadedLabel );
87
88 // Variable * frameSize = variable_temporary( _environment, VT_WORD, "(temporary)");
89 // variable_store( _environment, frameSize->name, image->frameSize );
90 // Variable * bank = variable_temporary( _environment, VT_BYTE, "(temporary)");
91 // variable_store( _environment, bank->name, image->bankAssigned );
92 // Variable * offset = variable_temporary( _environment, VT_ADDRESS, "(temporary)");
93
94 outline1("LDY #$%4.4x", image->absoluteAddress );
95
96 Variable * frame = NULL;
97 if ( _frame ) {
98 frame = variable_retrieve_or_define( _environment, _frame, VT_BYTE, 0 );
99 }
100 Variable * sequence = NULL;
101 if ( _sequence ) {
102 sequence = variable_retrieve_or_define( _environment, _sequence, VT_BYTE, 0 );
103 }
104
105 if ( !sequence ) {
106 if ( !frame ) {
107 ef936x_calculate_sequence_frame_offset_regy(_environment, "", "", image->frameSize, image->frameCount );
108 } else {
109 ef936x_calculate_sequence_frame_offset_regy(_environment, "", frame->name, image->frameSize, image->frameCount );
110 }
111 } else {
112 if ( !_frame ) {
113 ef936x_calculate_sequence_frame_offset_regy(_environment, sequence->name, "", image->frameSize, image->frameCount );
114 } else {
115 ef936x_calculate_sequence_frame_offset_regy(_environment, sequence->name, frame->name, image->frameSize, image->frameCount );
116 }
117 }
118
119 // Variable * address = variable_temporary( _environment, VT_ADDRESS, "(temporary)");
120 // variable_store( _environment, address->name, image->absoluteAddress );
121 // variable_add_inplace_vars( _environment, address->name, offset->name );
122 // bank_read_vars_direct( _environment, bank->name, address->name, bankWindowName, frameSize->name );
123 // cpu_math_add_16bit_const( _environment, offset->realName, image->absoluteAddress, offset->realName );
124
125 // Optimization: inline read from bank.
126
127 // bank_read_vars_bank_direct_size_vars( _environment, image->bankAssigned, offset->name, bankWindowName, image->frameSize );
128
129 deploy_preferred( duff, src_hw_6809_duff_asm );
130 deploy_preferred( msc1, src_hw_6809_msc1_asm );
131 deploy_preferred( bank, src_hw_pc128op_bank_asm );
132
133 outline1("LDU #$%4.4x", image->frameSize );
134 if ( banks_get_default_resident( _environment, image->bankAssigned ) == image->residentAssigned ) {
135 outline1("JSR BANKREADBANK%2.2xXSDR", image->bankAssigned );
136 _environment->bankAccessOptimization.readn = 1;
137 } else {
138 outline1("LDX #%s", bankWindowName );
139 outline1("JSR BANKREADBANK%2.2xXS", image->bankAssigned );
140 _environment->bankAccessOptimization.readn = 1;
141 };
142
143 if ( _environment->residentDetectionEnabled ) {
144 // Optimization: D = $FFFF at the end of any BANKREAD
145 outline1( "STD %s", bankWindowId );
146 }
147
148 Resource resource;
149 resource.realName = strdup( bankWindowName );
150 resource.isAddress = 0;
151
152 ef936x_put_image( _environment, &resource, _x1, _y1, NULL, NULL, image->frameSize, 0, _flags );
153
154 } else {
155 Variable * frame = NULL;
156 if ( _frame) {
157 frame = variable_retrieve_or_define( _environment, _frame, VT_BYTE, 0 );
158 }
159 Variable * sequence = NULL;
160 if ( _sequence) {
161 sequence = variable_retrieve_or_define( _environment, _sequence, VT_BYTE, 0 );
162 }
163
164 if ( !sequence ) {
165 if ( !frame ) {
166 ef936x_put_image( _environment, resource, _x1, _y1, "", "", image->frameSize, image->frameCount, _flags );
167 } else {
168 ef936x_put_image( _environment, resource, _x1, _y1, frame->name, "", image->frameSize, image->frameCount, _flags );
169 }
170 } else {
171 if ( !frame ) {
172 ef936x_put_image( _environment, resource, _x1, _y1, "", sequence->name, image->frameSize, image->frameCount, _flags );
173 } else {
174 ef936x_put_image( _environment, resource, _x1, _y1, frame->name, sequence->name, image->frameSize, image->frameCount, _flags );
175 }
176 }
177 }
178 break;
179 case VT_IMAGES:
180 if ( image->bankAssigned != -1 ) {
181
182 char alreadyLoadedLabel[MAX_TEMPORARY_STORAGE];
183 sprintf(alreadyLoadedLabel, "%salready", label );
184
185 char bankWindowId[MAX_TEMPORARY_STORAGE];
186 sprintf( bankWindowId, "BANKWINDOWID%2.2x", image->residentAssigned );
187
188 char bankWindowName[MAX_TEMPORARY_STORAGE];
189 sprintf( bankWindowName, "BANKWINDOW%2.2x", image->residentAssigned );
190
191 // cpu_compare_and_branch_16bit_const( _environment, bankWindowId, image->variableUniqueId, alreadyLoadedLabel, 1 );
192 // if ( image->uncompressedSize ) {
193 // bank_uncompress_semi_var( _environment, image->bankAssigned, image->absoluteAddress, bankWindowName );
194 // } else {
195 // bank_read_semi_var( _environment, image->bankAssigned, image->absoluteAddress, bankWindowName, image->size );
196 // }
197 // cpu_store_16bit(_environment, bankWindowId, image->variableUniqueId );
198 // cpu_label( _environment, alreadyLoadedLabel );
199
200 // Variable * frameSize = variable_temporary( _environment, VT_WORD, "(temporary)");
201 // variable_store( _environment, frameSize->name, image->frameSize );
202 // Variable * bank = variable_temporary( _environment, VT_BYTE, "(temporary)");
203 // variable_store( _environment, bank->name, image->bankAssigned );
204 // Variable * offset = variable_temporary( _environment, VT_ADDRESS, "(temporary)");
205
206 Variable * sequence = NULL;
207 if ( _sequence ) {
208 sequence = variable_retrieve_or_define( _environment, _sequence, VT_BYTE, 0 );
209 }
210
211 outline1("LDY #$%4.4x", image->absoluteAddress );
212
213 Variable * realFrame = NULL;
214 Variable * frame = NULL;
215 if ( _frame ) {
216 frame = variable_retrieve_or_define( _environment, _frame, VT_BYTE, 0 );
217 realFrame = frame;
218 }
219
220 if ( sequence ) {
221 if ( image->strips ) {
222 realFrame = variable_temporary( _environment, VT_BYTE, "(real frame)" );
223 outline0("PSHS Y,D");
224 outline1("LDY #%sstrip", image->realName );
225 outline1("LDA %s", sequence->realName );
226 outline0("LSLA" );
227 outline0("LDY A, Y");
228 outline1("LDA %s", frame->realName );
229 outline0("LDB A, Y" );
230 outline1("STB %s", realFrame->realName );
231 outline0("PULS Y,D");
232 } else {
234 }
235 }
236
237 if ( !frame ) {
238 ef936x_calculate_sequence_frame_offset_regy(_environment, NULL, "", image->frameSize, 0 );
239 } else {
240 ef936x_calculate_sequence_frame_offset_regy(_environment, NULL, realFrame->name, image->frameSize, 0 );
241 }
242
243 // Variable * address = variable_temporary( _environment, VT_ADDRESS, "(temporary)");
244 // variable_store( _environment, address->name, image->absoluteAddress );
245 // variable_add_inplace_vars( _environment, address->name, offset->name );
246 // cpu_math_add_16bit_const( _environment, offset->realName, image->absoluteAddress, offset->realName );
247
248 deploy_preferred( duff, src_hw_6809_duff_asm );
249 deploy_preferred( msc1, src_hw_6809_msc1_asm );
250 deploy_preferred( bank, src_hw_pc128op_bank_asm );
251
252 // outline1("LDY %s", offset->realName );
253 outline1("LDU #$%4.4x", image->frameSize );
254 if ( banks_get_default_resident( _environment, image->bankAssigned ) == image->residentAssigned ) {
255 outline1("JSR BANKREADBANK%2.2xXSDR", image->bankAssigned );
256 _environment->bankAccessOptimization.readn = 1;
257 } else {
258 outline1("LDX #%s", bankWindowName );
259 outline1("JSR BANKREADBANK%2.2xXS", image->bankAssigned );
260 _environment->bankAccessOptimization.readn = 1;
261 };
262
263 if ( _environment->residentDetectionEnabled ) {
264 // Optimization: D = $FFFF at the end of any BANKREAD
265 outline1( "STD %s", bankWindowId );
266 }
267
268 Resource resource;
269 resource.realName = strdup( bankWindowName );
270 resource.isAddress = 0;
271
272 ef936x_put_image( _environment, &resource, _x1, _y1, NULL, NULL, image->frameSize, 0, _flags );
273
274 } else {
275 Variable * sequence = NULL;
276 if ( _sequence ) {
277 sequence = variable_retrieve_or_define( _environment, _sequence, VT_BYTE, 0 );
278 }
279
280 Variable * realFrame = NULL;
281 Variable * frame = NULL;
282 if ( _frame) {
283 frame = variable_retrieve_or_define( _environment, _frame, VT_BYTE, 0 );
284 realFrame = frame;
285 }
286
287 if ( sequence ) {
288 if ( image->strips ) {
289 realFrame = variable_temporary( _environment, VT_BYTE, "(real frame)" );
290 outline1("LDY #%sstrip", image->realName );
291 outline1("LDA %s", sequence->realName );
292 outline0("LSLA" );
293 outline0("LDY A, Y");
294 outline1("LDA %s", frame->realName );
295 outline0("LDB A, Y" );
296 outline1("STB %s", realFrame->realName );
297 } else {
299 }
300 }
301
302 if ( !frame ) {
303 ef936x_put_image( _environment, resource, _x1, _y1, "", NULL, image->frameSize, 0, _flags );
304 } else {
305 ef936x_put_image( _environment, resource, _x1, _y1, frame->name, NULL, image->frameSize, 0, _flags );
306 }
307 }
308 break;
309 case VT_IMAGE:
310 case VT_TARRAY:
311 if ( image->bankAssigned != -1 ) {
312
313 char alreadyLoadedLabel[MAX_TEMPORARY_STORAGE];
314 sprintf(alreadyLoadedLabel, "%salready", label );
315
316 char bankWindowId[MAX_TEMPORARY_STORAGE];
317 sprintf( bankWindowId, "BANKWINDOWID%2.2x", image->residentAssigned );
318
319 char bankWindowName[MAX_TEMPORARY_STORAGE];
320 sprintf( bankWindowName, "BANKWINDOW%2.2x", image->residentAssigned );
321
322 deploy_preferred( duff, src_hw_6809_duff_asm );
323 deploy_preferred( msc1, src_hw_6809_msc1_asm );
324 deploy_preferred( bank, src_hw_pc128op_bank_asm );
325
326 if ( _environment->residentDetectionEnabled ) {
327 cpu_compare_and_branch_16bit_const( _environment, bankWindowId, image->variableUniqueId, alreadyLoadedLabel, 1 );
328 }
329 if ( image->uncompressedSize ) {
330 outline1("LDX #$%4.4x", image->absoluteAddress );
331 // bank_uncompress_semi_var( _environment, image->bankAssigned, image->absoluteAddress, bankWindowName );
332 if ( banks_get_default_resident( _environment, image->bankAssigned ) == image->residentAssigned ) {
333 outline1("JSR BANKUNCOMPRESS%2.2xXSDR", image->bankAssigned );
334 _environment->bankAccessOptimization.readn = 1;
335 } else {
336 outline1("LDY #%s", bankWindowName );
337 outline1("JSR BANKUNCOMPRESS%2.2xXS", image->bankAssigned );
338 _environment->bankAccessOptimization.readn = 1;
339 };
340 } else {
341 // bank_read_semi_var( _environment, image->bankAssigned, image->absoluteAddress, bankWindowName, image->size );
342 outline1("LDY #$%4.4x", image->absoluteAddress );
343 outline1("LDU #$%4.4x", image->size );
344 if ( banks_get_default_resident( _environment, image->bankAssigned ) == image->residentAssigned ) {
345 outline1("JSR BANKREADBANK%2.2xXSDR", image->bankAssigned );
346 _environment->bankAccessOptimization.readn = 1;
347 } else {
348 outline1("LDX #%s", bankWindowName );
349 outline1("JSR BANKREADBANK%2.2xXS", image->bankAssigned );
350 _environment->bankAccessOptimization.readn = 1;
351 };
352 }
353 if ( _environment->residentDetectionEnabled ) {
354 cpu_store_16bit(_environment, bankWindowId, image->variableUniqueId );
355 cpu_label( _environment, alreadyLoadedLabel );
356 }
357
358 Resource resource;
359 resource.realName = strdup( bankWindowName );
360 resource.isAddress = 0;
361
362 ef936x_put_image( _environment, &resource, _x1, _y1, NULL, NULL, 1, 0, _flags );
363 } else {
364 ef936x_put_image( _environment, resource, _x1, _y1, NULL, NULL, 1, 0, _flags );
365 }
366 break;
367 default:
369 }
370
371
372}
373
374void put_image_vars_imageref( Environment * _environment, char * _image, char * _x1, char * _y1, char * _x2, char * _y2, char * _frame, char * _sequence, char * _flags ) {
375
377
378 char labelNoBank[MAX_TEMPORARY_STORAGE]; sprintf( labelNoBank, "%snobank", label );
379 char labelNoBankCompressed[MAX_TEMPORARY_STORAGE]; sprintf( labelNoBankCompressed, "%snocompressed", label );
380 char labelDecompressionDone[MAX_TEMPORARY_STORAGE]; sprintf( labelDecompressionDone, "%sdecompression", label );
381 char labelDone[MAX_TEMPORARY_STORAGE]; sprintf( labelDone, "%sdone", label );
382
383 Variable * image = variable_retrieve( _environment, _image );
384
385 Variable * frame = NULL;
386 if ( _frame) {
387 frame = variable_retrieve_or_define( _environment, _frame, VT_BYTE, 0 );
388 }
389 Variable * sequence = NULL;
390 if ( _sequence) {
391 sequence = variable_retrieve_or_define( _environment, _sequence, VT_BYTE, 0 );
392 }
393
394 // Y = OFFSET
395
396 if ( _sequence ) {
397 outline0("LDY #$3" );
398 if ( strlen(_sequence) == 0 ) {
399 } else {
400 outline1("LDB %s", sequence->realName );
401 outline1("JSR [%s+10]", image->realName );
402 }
403 if ( _frame ) {
404 if ( strlen(_frame) == 0 ) {
405 } else {
406 outline1("LDB %s", frame->realName );
407 outline1("JSR [%s+8]", image->realName );
408 }
409 }
410 } else {
411 if ( _frame ) {
412 outline0("LDY #$3" );
413 if ( strlen(_frame) == 0 ) {
414 } else {
415 outline1("LDB %s", frame->realName );
416 outline1("JSR [%s+8]", image->realName );
417 }
418 } else {
419 outline0("LDY #$0" );
420 }
421 }
422
423 // Y = BASE + OFFSET
424 outline0( "TFR Y, D" );
425 outline1( "ADDD %s", image->realName );
426 outline0( "TFR D, Y" );
427
428 // Bank assigned?
429 outline1( "LDA %s+5", image->realName );
430 outline0( "ANDA #$04" );
431 outline1( "BEQ %s", labelNoBank );
432
433 // Image compressed?
434 outline1( "LDA %s+5", image->realName );
435 outline0( "ANDA #$40" );
436 outline1( "BEQ %s", labelNoBankCompressed );
437
438 // ; U : number of bank
439 // ; Y : address on bank
440 // ; D : size to read
441 // ; X : address on memory
442
443 deploy_preferred( duff, src_hw_6809_duff_asm );
444 deploy_preferred( msc1, src_hw_6809_msc1_asm );
445 deploy_preferred( bank, src_hw_pc128op_bank_asm );
446
447 // outline0("; bank uncompress (1)")
448 // Variable * previous = bank_get( _environment );
449 // bank_set( _environment, _bank );
450 // int realAddress = 0x6000 + _address1;
451 // char realAddressAsString[MAX_TEMPORARY_STORAGE];
452 // sprintf(realAddressAsString, "$%4.4x", realAddress);
453 // cpu_msc1_uncompress_direct_direct( _environment, realAddressAsString, _address2 );
454 // bank_set_var( _environment, previous->name );
455 // outline0("; end bank uncompress (1)")
456
457 outline1("LDB %s+4", image->realName );
458 outline0("TFR Y, X" );
459 // outline0("LEAX $6000, X" );
460 outline1("LDY %s+6", image->realName );
461 outline1("LDU %s+2", image->realName );
462 outline0("JSR BANKUNCOMPRESS");
463 _environment->bankAccessOptimization.readn = 1;
464
465 cpu_jump( _environment, labelDecompressionDone );
466
467 cpu_label( _environment, labelNoBankCompressed );
468
469 outline1("LDB %s+4", image->realName );
470 outline1("LDX %s+6", image->realName );
471 outline1("LDU %s+2", image->realName );
472 outline0("JSR BANKREAD");
473 _environment->bankAccessOptimization.readn = 1;
474
475 cpu_label( _environment, labelDecompressionDone );
476
477 Variable * address = variable_temporary( _environment, VT_ADDRESS, "(stub)" );
478
479 if ( !_environment->putImageRefUnsafe ) {
480 outline1("LDA %s", address_displacement( _environment, image->realName, "5") );
481 outline1("LBEQ %sskip", label );
482 }
483
484 outline1("LDX %s+6", image->realName );
485 outline1("STX %s", address->realName );
486 if ( _environment->residentDetectionEnabled ) {
487 outline0("LEAX -2, X");
488 outline0("LDD #$FFFF");
489 outline0("STD , X");
490 }
491
492 Resource resource;
493 resource.realName = strdup( address->realName );
494 resource.isAddress = 1;
495
496 ef936x_put_image( _environment, &resource, _x1, _y1, NULL, NULL, 1, 0, _flags );
497
498 cpu_jump( _environment, labelDone );
499
500 cpu_label( _environment, labelNoBank );
501
502 outline1("STY %s", address->realName );
503
504 resource.realName = strdup( address->realName );
505 resource.isAddress = 1;
506
507 ef936x_put_image( _environment, &resource, _x1, _y1, NULL, NULL, 1, 0, _flags );
508
509 cpu_label( _environment, labelDone );
510
511 if ( !_environment->putImageRefUnsafe ) {
512 outhead1("%sskip", label );
513 }
514
515}
516
517void put_image_vars( Environment * _environment, char * _image, char * _x1, char * _y1, char * _x2, char * _y2, char * _frame, char * _sequence, char * _flags ) {
518
519 if ( _environment->emptyProcedure ) {
520 return;
521 }
522
523 Variable * image = variable_retrieve( _environment, _image );
524
525 switch( image->type ) {
526 case VT_IMAGE:
527 case VT_IMAGES:
528 case VT_SEQUENCE:
529 case VT_ADDRESS:
530 put_image_vars_original( _environment, _image, _x1, _y1, _x2, _y2, _frame, _sequence, _flags );
531 break;
532 case VT_IMAGEREF:
533 put_image_vars_imageref( _environment, _image, _x1, _y1, _x2, _y2, _frame, _sequence, _flags );
534 break;
535 default:
537 }
538
539}
540
541void put_image_vars_flags( Environment * _environment, char * _image, char * _x1, char * _y1, char * _x2, char * _y2, char * _frame, char * _sequence, int _flags ) {
542
543 _flags = _flags & ( ( FLAG_DOUBLE_Y << 8 ) | FLAG_TRANSPARENCY );
544
545 char flagsConstantName[MAX_TEMPORARY_STORAGE];
546 char flagsConstantParameter[MAX_TEMPORARY_STORAGE];
547
548 if ( _flags ) {
549 sprintf( flagsConstantName, "PUTIMAGEFLAGS%4.4x", _flags );
550 sprintf( flagsConstantParameter, "#PUTIMAGEFLAGS%4.4x", _flags );
551
552 Constant * flagsConstant = constant_find( _environment, flagsConstantName );
553
554 if ( !flagsConstant ) {
555 flagsConstant = malloc( sizeof( Constant ) );
556 memset( flagsConstant, 0, sizeof( Constant ) );
557 flagsConstant->name = strdup( flagsConstantName );
558 flagsConstant->realName = strdup( flagsConstantName );
559 flagsConstant->value = _flags;
560 flagsConstant->type = CT_INTEGER;
561 flagsConstant->next = _environment->constants;
562 _environment->constants = flagsConstant;
563 }
564
565 } else {
566 sprintf( flagsConstantParameter, "#0000" );
567 }
568
569 put_image_vars( _environment, _image, _x1, _y1, _x2, _y2, _frame, _sequence, flagsConstantParameter );
570}
571
void cpu_store_16bit(Environment *_environment, char *_destination, int _value)
CPU 6309: emit code to store 16 bit
Definition 6309.c:1503
void cpu_compare_and_branch_16bit_const(Environment *_environment, char *_source, int _destination, char *_label, int _positive)
CPU 6309: emit code to compare two 8 bit values and jump if they are equal/different
Definition 6309.c:1578
void cpu_label(Environment *_environment, char *_label)
Definition 6309.c:356
void cpu_jump(Environment *_environment, char *_label)
Definition 6309.c:3739
Variable * variable_retrieve(Environment *_environment, char *_name)
Variable * variable_retrieve_or_define(Environment *_environment, char *_name, VariableType _type, int _value)
Resource * build_resource_for_sequence(Environment *_environment, char *_image, char *_frame, char *_sequence)
Variable * variable_temporary(Environment *_environment, VariableType _type, char *_meaning)
Define a temporary variable.
char * address_displacement(Environment *_environment, char *_address, char *_displacement)
Constant * constant_find(Environment *_environment, char *_name)
void put_image_vars_original(Environment *_environment, char *_image, char *_x1, char *_y1, char *_x2, char *_y2, char *_frame, char *_sequence, char *_flags)
Emit ASM code for PUT IMAGE [image] AT [int],[int].
Definition put_image.c:53
void put_image_vars_imageref(Environment *_environment, char *_image, char *_x1, char *_y1, char *_x2, char *_y2, char *_frame, char *_sequence, char *_flags)
Definition put_image.c:289
void put_image_vars_flags(Environment *_environment, char *_image, char *_x1, char *_y1, char *_x2, char *_y2, char *_frame, char *_sequence, int _flags)
Definition put_image.c:430
void put_image_vars(Environment *_environment, char *_image, char *_x1, char *_y1, char *_x2, char *_y2, char *_frame, char *_sequence, char *_flags)
Definition put_image.c:406
int banks_get_default_resident(Environment *_environment, int _bank)
Definition _banks.c:107
void ef936x_put_image(Environment *_environment, Resource *_image, char *_x, char *_y, char *_frame, char *_sequence, int _frame_size, int _frame_count, char *_flags)
Definition ef936x.c:1920
void ef936x_calculate_sequence_frame_offset_regy(Environment *_environment, char *_sequence, char *_frame, int _frame_size, int _frame_count)
Definition ef936x.c:2233
char * name
Definition ugbc.h:800
int value
Definition ugbc.h:815
ConstantType type
Definition ugbc.h:805
struct _Constant * next
Definition ugbc.h:832
char * realName
Definition ugbc.h:803
BankAccessOptimization bankAccessOptimization
Definition ugbc.h:3269
int putImageRefUnsafe
Definition ugbc.h:3271
Constant * constants
Definition ugbc.h:2611
int residentDetectionEnabled
Definition ugbc.h:3192
int emptyProcedure
Definition ugbc.h:2932
int isAddress
Definition ugbc.h:557
VariableType type
Definition ugbc.h:559
char * realName
Definition ugbc.h:555
char * name
Definition ugbc.h:979
VariableType type
Definition ugbc.h:988
char * realName
Definition ugbc.h:982
void * malloc(YYSIZE_T)
struct _Resource Resource
#define MAX_TEMPORARY_STORAGE
Definition ugbc.h:563
#define FLAG_TRANSPARENCY
Definition ugbc.h:4567
@ CT_INTEGER
Definition ugbc.h:788
struct _Variable Variable
Structure of a single variable.
struct _Environment Environment
Structure of compilation environment.
@ VT_TARRAY
Definition ugbc.h:480
@ VT_BYTE
Definition ugbc.h:450
@ VT_IMAGEREF
Definition ugbc.h:537
@ VT_IMAGES
Definition ugbc.h:495
@ VT_ADDRESS
Definition ugbc.h:465
@ VT_IMAGE
Definition ugbc.h:489
@ VT_SEQUENCE
Definition ugbc.h:513
#define deploy_preferred(s, e)
Definition ugbc.h:4299
struct _Constant Constant
Structure of a single constant.
#define CRITICAL_CANNOT_PUT_IMAGE_WITHOUT_STRIP(s)
Definition ugbc.h:3855
#define outline0(s)
Definition ugbc.h:4252
#define CRITICAL_PUT_IMAGE_UNSUPPORTED(v, t)
Definition ugbc.h:3532
#define outline1(s, a)
Definition ugbc.h:4253
#define FLAG_DOUBLE_Y
Definition ugbc.h:4568
#define MAKE_LABEL
Definition ugbc.h:3351
#define outhead1(s, a)
Definition ugbc.h:4247
char DATATYPE_AS_STRING[][16]