]> git.sur5r.net Git - cc65/blob - libsrc/atari/atari-9.s
changes from Fatih
[cc65] / libsrc / atari / atari-9.s
1 ;
2 ; Graphics driver for the 80x192x16b (CIO mode 9, ANTIC mode F, GTIA mode $40) 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         grmode = 9
26 ; X resolution
27         x_res = 80
28 ; Y resolution
29         y_res = 192
30 ; Number of colors
31         colors = 16
32 ; Pixels per byte
33         ppb = 2
34 ; Screen memory size in bytes
35         scrsize = x_res * y_res / ppb
36 ; Pixel aspect ratio
37         aspect = $0400                          ; 4:1
38 ; Free memory needed
39         mem_needed = 7147
40 ; Number of screen pages
41         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, $0F, $01, $02, $03, $04, $05, $06, $07, $08, $09, $0A, $0B, $0C, $0D, $0E
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"