mirror of
https://github.com/cc65/cc65.git
synced 2025-01-13 09:31:53 +00:00
73 lines
1.7 KiB
ArmAsm
73 lines
1.7 KiB
ArmAsm
|
;
|
||
|
; Graphics driver for the 80x192x16b (CIO mode 9, ANTIC mode F, GTIA mode $40) on the Atari.
|
||
|
;
|
||
|
; Fatih Aygun (2009)
|
||
|
;
|
||
|
|
||
|
.include "atari.inc"
|
||
|
.include "zeropage.inc"
|
||
|
|
||
|
.include "tgi-kernel.inc"
|
||
|
.include "tgi-mode.inc"
|
||
|
.include "tgi-error.inc"
|
||
|
|
||
|
.macpack generic
|
||
|
|
||
|
; ******************************************************************************
|
||
|
|
||
|
; ----------------------------------------------------------------------
|
||
|
;
|
||
|
; Constants and tables
|
||
|
;
|
||
|
; ----------------------------------------------------------------------
|
||
|
|
||
|
; Graphics mode
|
||
|
.define grmode 9
|
||
|
; X resolution
|
||
|
.define x_res 80
|
||
|
; Y resolution
|
||
|
.define y_res 192
|
||
|
; Number of colors
|
||
|
.define colors 16
|
||
|
; Pixels per byte
|
||
|
.define ppb 2
|
||
|
; Screen memory size in bytes
|
||
|
.define scrsize x_res * y_res / ppb
|
||
|
; Pixel aspect ratio
|
||
|
.define aspect $0400 ; 4:1
|
||
|
; Free memory needed
|
||
|
.define mem_needed 15339
|
||
|
; Number of screen pages
|
||
|
.define pages 2
|
||
|
|
||
|
.rodata
|
||
|
mask_table: ; Mask table to set pixels
|
||
|
.byte %11110000, %00001111
|
||
|
masks: ; Color masks
|
||
|
.byte $00, $11, $22, $33, $44, $55, $66, $77, $88, $99, $aa, $bb, $cc, $dd, $ee, $ff
|
||
|
bar_table: ; Mask table for BAR
|
||
|
.byte %11111111, %00001111, %00000000
|
||
|
default_palette:
|
||
|
.byte $00, $0F, $01, $02, $03, $04, $05, $06, $07, $08, $09, $0A, $0B, $0C, $0D, $0E
|
||
|
|
||
|
.code
|
||
|
|
||
|
; ******************************************************************************
|
||
|
|
||
|
.proc SETPALETTE
|
||
|
|
||
|
; ----------------------------------------------------------------------
|
||
|
;
|
||
|
; SETPALETTE: Set the palette (in ptr1)
|
||
|
;
|
||
|
; ----------------------------------------------------------------------
|
||
|
|
||
|
.code
|
||
|
; No palettes
|
||
|
lda #TGI_ERR_INV_FUNC
|
||
|
sta error
|
||
|
rts
|
||
|
.endproc
|
||
|
|
||
|
.include "atari_tgi_common.inc"
|