]> git.sur5r.net Git - cc65/blob - libsrc/atari/atari-11.s
3aa6d614f38ddb8b92a9a305169e9ef15a09bec0
[cc65] / libsrc / atari / atari-11.s
1 ;
2 ; Graphics driver for the 80x192x16h (CIO mode 11, ANTIC mode F, GTIA mode $C0) on the Atari.
3 ;
4 ; Fatih Aygun (2009)
5 ;
6
7         .include        "atari.inc"
8         .include        "zeropage.inc"
9
10         .include        "tgi-kernel.inc"
11         .include        "tgi-mode.inc"
12         .include        "tgi-error.inc"
13
14         .macpack        generic
15
16 ; ******************************************************************************
17
18         ; ----------------------------------------------------------------------
19         ;
20         ; Constants and tables
21         ;
22         ; ----------------------------------------------------------------------
23
24 ; Graphics mode
25         .define grmode 11
26 ; X resolution
27         .define x_res 80
28 ; Y resolution
29         .define y_res 192
30 ; Number of colors
31         .define colors 16
32 ; Pixels per byte
33         .define ppb 2
34 ; Screen memory size in bytes
35         .define scrsize x_res * y_res / ppb
36 ; Pixel aspect ratio
37         .define aspect $0400                            ; 4:1
38 ; Free memory needed
39         .define mem_needed 7147
40 ; Number of screen pages
41         .define pages 1
42
43 .rodata
44         mask_table:                             ; Mask table to set pixels
45                 .byte   %11110000, %00001111
46         masks:                                  ; Color masks
47                 .byte   $00, $11, $22, $33, $44, $55, $66, $77, $88, $99, $aa, $bb, $cc, $dd, $ee, $ff
48         bar_table:                              ; Mask table for BAR
49                 .byte   %11111111, %00001111, %00000000
50         default_palette:
51                 .byte   $00, $10, $20, $30, $40, $50, $60, $70, $80, $90, $A0, $B0, $C0, $D0, $E0, $F0
52
53 .code
54
55 ; ******************************************************************************
56
57 .proc SETPALETTE
58
59         ; ----------------------------------------------------------------------
60         ;
61         ; SETPALETTE: Set the palette (in ptr1)
62         ;
63         ; ----------------------------------------------------------------------
64
65 .code
66         ; No palettes
67         lda     #TGI_ERR_INV_FUNC
68         sta     error
69         rts
70 .endproc
71
72 .include "atari_tgi_common.inc"