Article 53192 of comp.sys.cbm: Xref: undergrad.math.uwaterloo.ca comp.sys.cbm:53192 Newsgroups: comp.sys.cbm Path: undergrad.math.uwaterloo.ca!csbruce From: csbruce@ccnga.uwaterloo.ca (Craig Bruce) Subject: Looking for hard-to-find knowledge on the VDC Sender: news@undergrad.math.uwaterloo.ca (news spool owner) Message-ID: Date: Sun, 28 Apr 1996 22:40:32 GMT Nntp-Posting-Host: ccnga.uwaterloo.ca Organization: University of Waterloo, Canada (eh!) Yo! >I am looking for a way to get a "double-height" interlaced screen on the >128 (with 64K VDC RAM). I have seen a program (in Compute's Gazette, I >believe) that enables 80x50 text mode, but I don't know exactly how. How >could someone do this, and could the same technique be used in bitmap >mode? The ACE operating system supports the 80x50 (up to 80x51, actually) mode. The VDC memory is used as follows: $0000 = screen matrix $1000 = color matrix $2000 = uppercase/graphics character set $3000 = lowercase character set You have to change the color address from its default $0800. Here is the ACE code that goes into 80x.A interlaced mode: vdcRegSaves .buf 5 vdcRegSave5 .buf 1 vdcRegSave7 .buf 1 vdcRegSaveIndex .byte 0,4,8,9,6,5,7 vdcVerticalCrossover = * ;( .A=rows ) : .A=vdcReg5, .Y=vdcReg7 cmp #51 bcc + lda #51 + pha ldy #6 - lda vdcRegSaveIndex,y tax lda vdcRegFiftyRows,y jsr vdcWrite dey bpl - pla ldx #6 jsr vdcWrite tay clc adc #1 lsr and #%11111110 clc adc #27 cpy #50 bcc + lda #53 + ldx #7 jsr vdcWrite rts vdcRegFiftyRows .byte $80,$38,$ff,$e8,51,$06,$35 The following ML code is extracted from my (standalone) VBM image viewer program for the C128. It will set up the screen for 640x491 interlaced monochrome bitmapped graphics. .$1329 [a0 00 ] ldy #$00 .$132b [be 4a 13] ldx $134a,y .$132e [b9 5e 13] lda $135e,y .$1331 [e0 19 ] cpx #$19 .$1333 [d0 08 ] bne $133d .$1335 [20 1b 13] jsr $131b ;read VDC register #.X into .A .$1338 [29 0f ] and #$0f .$133a [19 5e 13] ora $135e,y .$133d [20 0f 13] jsr $130f ;write value .A into VDC register #.X .$1340 [c8 ] iny .$1341 [c0 14 ] cpy #$14 .$1343 [90 e6 ] bcc $132b $134a: 00 01 02 04 05 06 07 08 09 18 19 1b 1c 14 15 0c 0d 1a 0c 0d $135e: 7e 50 66 4c 06 4c 47 03 06 00 80 00 10 a6 e0 00 e0 00 00 48 >Also, I read somewhere that 8x1 (that's right, 1) color cell mode >_should_ be possible. It didn't say whether it's ever been done, or how >to do it. Anyone know? Yes, the bitmap would take 80x200 bytes = 16000 bytes. The color map would take another 16000 bytes, for a total of 32000 bytes. In fact, if there were 4x1 display cells, then it would all fit in 64000 bytes. I've tried to get 8x1 color cells before, but the hardware freaks out if I try anything beneath 8x2. I'd also like to know how to get characters that are fewer than eight pixels wide, say 4x8 characters, without using a bitmap. Keep on Hackin'! -Craig Bruce csbruce@ccnga.uwaterloo.ca "I just got paid and I want to get ..." - Bud, Married... With Children