ACME_Lib: reformatted ted.a and add 264/petscii.a

git-svn-id: https://svn.code.sf.net/p/acme-crossass/code-0/trunk@117 4df02467-bbd4-4a76-a152-e7ce94205b78
This commit is contained in:
marcobaye 2019-08-05 23:39:15 +00:00
parent c68cefcab0
commit 07a7a00b1a
2 changed files with 202 additions and 121 deletions

View File

@ -0,0 +1,46 @@
;ACME 0.96.4
!ifdef lib_cbm_264_petscii_a !eof
lib_cbm_264_petscii_a = 1
!source <cbm/petscii.a>
; the sixteen predefined color/luma combinations available via petscii:
petscii_BLACK = 144 ; $00 here's the actual bits given to TED
petscii_WHITE = 5 ; $71 (first digit is luma bits,
petscii_RED = 28 ; $32 second digit is color nibble)
petscii_CYAN = 159 ; $63
petscii_PURPLE = 156 ; $44
petscii_GREEN = 30 ; $35
petscii_BLUE = 31 ; $46
petscii_YELLOW = 158 ; $77
petscii_ORANGE = 129 ; $48
petscii_BROWN = 149 ; $29
petscii_YELLOWGREEN = 150 ; $5a
petscii_PINK = 151 ; $6b
petscii_BLUEGREEN = 152 ; $5c
petscii_LIGHTBLUE = 153 ; $6d
petscii_DARKBLUE = 154 ; $2e
petscii_LIGHTGREEN = 155 ; $5f
; switching character set (same as C64)
petscii_LOCK = 8 ; forbid CBM-shift (C128 uses 11 instead)
petscii_UNLOCK = 9 ; allow CBM-shift (C128 uses 12 instead)
petscii_LOWERCASE = 14 ; switch to lowercase/uppercase character set
petscii_UPPERCASE = 142 ; switch to uppercase/graphics character set
; 264-specific stuff
petscii_FLASHON = 130 ; (C128 uses 15 instead)
petscii_FLASHOFF = 131 ; (C128 uses 143 instead)
; function keys
petscii_F1 = 133
petscii_F3 = 134
petscii_F5 = 135
petscii_F7 = 136
petscii_F2 = 137
petscii_F4 = 138
petscii_F6 = 139
petscii_HELP = 140 ; (C128 uses 132 instead)
petscii_ESCAPE = 27

View File

@ -8,8 +8,10 @@ lib_cbm_264_ted_a = 1
; Definitions: ; Definitions:
; HiRes: High resolution (320x200 pixels, two colors per 8x8 block) ; HiRes: High resolution (320x200 pixels, two colors per 8x8 block)
; MCM: Multi-color mode (160x200 pixels, four colors per 4x8 block) ; MCM: Multi-color mode (160x200 pixels, four colors per 4x8 block)
; Text mode: Pixel data is taken from charset, index/color/luminance is taken from video ram. ; Text mode: Pixel data is taken from charset, index/color/luminance is
; Bitmap mode: Pixel data is taken from 8 KiB bitmap, color/luminance is taken from video ram. ; taken from video ram.
; Bitmap mode: Pixel data is taken from 8 KiB bitmap, color/luminance is taken
; from video ram.
; ECM: Extended color mode. Like HiRes text mode, but instead of 256 ; ECM: Extended color mode. Like HiRes text mode, but instead of 256
; different characters on a shared background color, 64 different ; different characters on a shared background color, 64 different
; characters on four different background colors are displayed. ; characters on four different background colors are displayed.
@ -29,11 +31,15 @@ lib_cbm_264_ted_a = 1
; %.....210 MCM: color ; %.....210 MCM: color
; %....3210 HiRes and ECM: color ; %....3210 HiRes and ECM: color
; second $0400 bytes hold screen codes: ; second $0400 bytes hold screen codes:
; %76543210 HiRes and MCM: screen code (in HiRes, bit 7 can be configured to be "hardware reverse", see register $ff07) ; %76543210 HiRes and MCM: screen code (in HiRes, bit 7 can
; %76...... ECM: background color index (see registers $ff15..$ff18) ; be configured to be "hardware reverse",
; see register $ff07)
; %76...... ECM: background color index (see registers
; $ff15..$ff18)
; %..543210 ECM: screen code ; %..543210 ECM: screen code
; in bitmap mode: ; in bitmap mode:
; CAUTION! low nibble of luma corresponds to high nibble of color and vice versa! ; CAUTION!
; LOW nibble of luma corresponds to HIGH nibble of color and vice versa!
; first $0400 bytes is luminance info: ; first $0400 bytes is luminance info:
; %7....... unused ; %7....... unused
; %.654.... luminance of %0 HiRes pixels or %01 MC pixels ; %.654.... luminance of %0 HiRes pixels or %01 MC pixels
@ -43,25 +49,39 @@ lib_cbm_264_ted_a = 1
; %7654.... color of %1 pixels or %10 MC pixels ; %7654.... color of %1 pixels or %10 MC pixels
; %....3210 color of %0 pixels or %01 MC pixels ; %....3210 color of %0 pixels or %01 MC pixels
; colors:
; color codes: tedcolor_BLACK = $0 ; ignores luminance, black is always black!
; WORK IN PROGRESS, MAY CHANGE! tedcolor_WHITE = $1 ; actually gray, only max luminance gives white
tedcolor_BLACK = $0 ; (all luminances the same)
tedcolor_GRAY = $1 ; white for max luminance
tedcolor_RED = $2 tedcolor_RED = $2
tedcolor_CYAN = $3 tedcolor_CYAN = $3
tedcolor_PURPLE = $4 tedcolor_PURPLE = $4
tedcolor_GREEN1 = $5 tedcolor_GREEN = $5
tedcolor_BLUE1 = $6 tedcolor_BLUE = $6
tedcolor_YELLOW = $7 tedcolor_YELLOW = $7 ; needs high luminance to look yellow...
; these cannot be used as main color in MCM:
tedcolor_ORANGE = $8 tedcolor_ORANGE = $8
tedcolor_BROWN = $9 tedcolor_BROWN = $9
tedcolor_GREEN2 = $a ; yellow-ish when bright tedcolor_YELLOWGREEN = $a
tedcolor_VIOLET = $b ; or maybe pink? tedcolor_PINK = $b
tedcolor_GREEN3 = $c ; cyan-ish when bright tedcolor_BLUEGREEN = $c
tedcolor_BLUE2 = $d tedcolor_LIGHTBLUE = $d
tedcolor_BLUE3 = $e ; purple-ish when bright tedcolor_DARKBLUE = $e
tedcolor_GREEN4 = $f tedcolor_LIGHTGREEN = $f
; the color names are somewhat useless, because they refer not to the sixteen
; base colors, but to the sixteen pre-defined luminance/color combinations
; available by pressing the ctrl or cbm key with a digit key (see the ROM table
; at $e143 for these combined values).
; for a "nice" color display, use this order: 2,8,9,7,a,f,5,c,3,d,6,e,4,b,
; that will give a red/yellow/green/blue/purple spectrum.
; to display the whole palette, try this program:
; 10 for i = 0 to 15:color 1, 1
; 20 read c$:print " " c$ " ";
; 30 poke 194, 128:for lu = 0 to 7
; 40 color 1, dec(c$) + 1, lu
; 50 print " ";
; 60 next:print:next:color 1, 1
; 70 data 0,1,2,8,9,7,a,f
; 80 data 5,c,3,d,6,e,4,b
; TED registers ; TED registers
!addr ted_base = $ff00 !addr ted_base = $ff00
@ -82,6 +102,7 @@ lib_cbm_264_ted_a = 1
tedvert_ENABLE = %...#.... ; display enable (0: blank screen) tedvert_ENABLE = %...#.... ; display enable (0: blank screen)
tedvert_25ROWS = %....#... ; 0: 24 rows, 1: 25 rows tedvert_25ROWS = %....#... ; 0: 24 rows, 1: 25 rows
tedvert_SMOOTH = %.....### ; vertical smooth scroll (std: %011, higher values move text down) tedvert_SMOOTH = %.....### ; vertical smooth scroll (std: %011, higher values move text down)
ted_horzctrl = ted_base + $07 ; most similar VIC-reg is $d016 ted_horzctrl = ted_base + $07 ; most similar VIC-reg is $d016
tedhorz_256CHRS = %#....... ; 0: 128 characters and hardware reverse, 1: 256 characters tedhorz_256CHRS = %#....... ; 0: 128 characters and hardware reverse, 1: 256 characters
tedhorz_NTSC = %.#...... ; 0: PAL, 1: NTSC tedhorz_NTSC = %.#...... ; 0: PAL, 1: NTSC
@ -105,20 +126,33 @@ lib_cbm_264_ted_a = 1
tedjoy_UP = %.......# tedjoy_UP = %.......#
; interrupts ; interrupts
ted_irq = ted_base + $09 ; interrupt request register (write back its value to acknowledge interrupt) ted_irq = ted_base + $09 ; interrupt request register
tedirq_ACTIVE = %#....... ; this bit indicates TED has actually pulled the interrupt line low. ; if bit is set, interrupt has occurred.
tedirq_COUNTER3 = %.#...... ; counter #3 ; to acknowledge interrupts, write back the value read from this register
; = %..#..... ; unused ; (setting bits clears them, i.e. writing $82 clears ACTIVE and RASTER
tedirq_COUNTER2 = %...#.... ; counter #2 ; but does not change the COUNTER bits)
tedirq_COUNTER1 = %....#... ; counter #1 tedirq_ACTIVE = %#....... ; 1: TED is signalling interrupt to cpu
; = %.....#.. ; light pen (not implemented) tedirq_COUNTER3 = %.#...... ; 1: counter #3 underflow
tedirq_RASTER = %......#. ; raster line ; %..#..... ; always 1 (unused)
; = %.......# ; unused tedirq_COUNTER2 = %...#.... ; 1: counter #2 underflow
ted_irqmask = ted_base + $0a ; interrupt mask register (enables/disables interrupts) tedirq_COUNTER1 = %....#... ; 1: counter #1 underflow
; = %#....... ; unused ; %.....#.. ; always 1 (light pen, not implemented)
; = %.######. ; same as tedirq_* constants above tedirq_RASTER = %......#. ; 1: raster line reached
tedirq_LINEBIT8 = %.......# ; bit 8 of raster line register $ff0b (see below) ; %.......# ; always 1 (unused)
ted_line = ted_base + $0b ; raster line register. bit 8 is in bit 0 of $ff0a (see above)
ted_mask = ted_base + $0a ; interrupt mask register (enable/disable)
; if bit is set, interrupt is enabled.
; use the tedirq_* constants from above.
; %#....... ; always 1 (unused)
;COUNTER3 = %.#...... ; 1: enable counter #3 underflow interrupt
; = %..#..... ; always 1 (unused)
;COUNTER2 = %...#.... ; 1: enable counter #2 underflow interrupt
;COUNTER1 = %....#... ; 1: enable counter #1 underflow interrupt
; = %.....#.. ; always 1 (light pen, not implemented)
;RASTER = %......#. ; 1: enable raster line interrupt
tedmask_LINEBIT8= %.......# ; bit 8 of raster line register $ff0b (see below)
ted_line = ted_base + $0b ; raster line to trigger interrupt. bit 8 is in bit 0 of $ff0a (see above)
; hardware cursor, given as screen offset (0...999). use 1000 or greater to hide. ; hardware cursor, given as screen offset (0...999). use 1000 or greater to hide.
ted_hwcursor_hi = ted_base + $0c ; %765432.. are unused, %......10 are MSBs of hw cursor offset ted_hwcursor_hi = ted_base + $0c ; %765432.. are unused, %......10 are MSBs of hw cursor offset
@ -146,8 +180,9 @@ lib_cbm_264_ted_a = 1
ted_mem = ted_base + $13 ; ted_mem = ted_base + $13 ;
tedmem_CHARGEN = %######.. ; high address bits of character generator tedmem_CHARGEN = %######.. ; high address bits of character generator
tedmem_SCLOCK = %......#. ; force single clock mode tedmem_SCLOCK = %......#. ; 1: force single clock mode
tedmem_ROM = %.......# ; read-only: ROM is active over $8000 tedmem_ROM = %.......# ; read-only: ROM is active over $8000
ted_videoram = ted_base + $14 ; bits 7..3 are the high address bits of video ram ted_videoram = ted_base + $14 ; bits 7..3 are the high address bits of video ram
; color registers ; color registers
@ -170,11 +205,11 @@ lib_cbm_264_ted_a = 1
ted_horizontal = ted_base + $1e ; horizontal position (given in double pixels) ted_horizontal = ted_base + $1e ; horizontal position (given in double pixels)
ted_count = ted_base + $1f ted_count = ted_base + $1f
; = %#....... ; unused ; = %#....... ; always 1 (unused)
tedcount_FLASH = %.####... ; flashing counter tedcount_FLASH = %.####... ; flashing counter
tedcount_CHAR = %.....### ; raster line in character row tedcount_CHAR = %.....### ; raster line in character row (r/w!)
; pseudo registers ; pseudo registers
; these are not really registers inside TED, but here they are, anyway: ; these are not really registers inside TED, but here they are, anyway:
!addr ted_enable_roms = $ff3e ; any write here enables ROMs above $8000 !addr ted_enable_roms = $ff3e ; any write here enables ROMs above $8000
!addr ted_enable_rams = $ff4f ; any write here enables RAM above $8000 !addr ted_enable_rams = $ff3f ; any write here enables RAM above $8000