ƒgeos128Sym      \ PRG formatted GEOS file V1.0ż˙˙˙€˙ˆ‹˙ÁŠAŠ˙ńŠ€ŠŽŠ€Šż‘Š€ŠŸŠ€Šż‘Ž€‚ż‘ƒ€€€€˙ń˙˙˙ƒ˙˙Write Image V2.1geoWrite V1.1đĐ÷ KÁŠ…. <9Š(New equates, variables and constants - see Transactor 9:4 with VDC colour valuesl… HÁŠ EÁŠ…8I &˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ ; New Equates, Variables and Constants (Geos128Sym) ; AccessCache = $c2ef ColorCard = $c2f8 ColorRectangle = $c2fb DoBOp = $c2ec HideOnlyMouse = $c2f2 JmpIndX = $9d80 MoveBData = $c2e3 NormalizeX = $c2e0 SetColorMode = $c2f5 SetMsePic = $c2da SetNewMode = $c2dd SwapBData = $c2e6 TempHideMouse = $c2d7 VerifyBData = $c2e9 ; graphMode = $003f ;bit 7 set = 80 column mode scr80Polar = $88bc ;copy of VDC reg 24 scr80Colors = $88bd ;copy of VDC reg 26 keyreg = $d02f clkreg = $d030 mmu = $d500 VDC = $d600 MOUSEBASE = $fd00 ENDMOUSE = $fe80 config = $ff00 c128flag= $c013;bit 7 set if on 128 ; ADD1_W = $2000 ADD1_B = $20 ARROW = 0 ;pass this to SetMsePic CIOIN = $7e CKRNLBASIOIN = $40 CKRNLIOIN = $4e CRAM64K = $7f DOUBLE_W = $8000 DOUBLE_B = $80 GR_40 = 0 ;use these two to test GR_80 = $80 ;graphMode INCOMPATIBLE = 14 ;new disk error INPUT128 = 15 ;new input device KEYHELP = 25 KEYALT = 26 KEYESC = 27 KEYNOSCRL = 7 KEYENTER = 11 OFF128FLAGS = 96 ;offset into header block SCREENBYTEWIDTH = 80 SCREENPIXELWIDTH = 640 ; ;VDC Colours vdcBlack = 0 vdcDkGray = 1;light black vdcDkBlue = 2 vdcLtBlue = 3 vdcDkGreen = 4 vdcLtGreen = 5 vdcDkCyan = 6 vdcLtCyan = 7 vdcDkRed = 8 vdcLtRed = 9 vdcDkPurple = 10 vdcLtPurple = 11 vdcDkYellow = 12 vdcLtYellow = 13 vdcLtGray = 14;dark white vdcWhite = 15  ; some sample code followed by some info from Rob N. Thanx Rob : ) .if Pass1 .include geosSym .include geos128Sym .endif .psect BeginHere: LoadB dispBufferOn,# (ST_WR_FORE | ST_WR_BACK) jsr NewDisk jsr MouseUp lda #2 jsr SetPattern jsr i_Rectangle; clear standard screen .byte 0,199 .word 0,639 lda #1 jsr SetColorMode; set to 640x176 mode (16k VDC ram) jsr ClrScreen LoadW r0,IconTable jsr DoIcons ;set up Icons LoadW r0,MenuTable lda #1 ;MENU POS/MOUSE jsr DoMenu rts DoExit: jsr DoPreviousMenu rts DoQuit: jmp EnterDeskTop ClrScreen: LoadB r2L,0; clear VDC screen memory LoadB r2H,175; bottom is 175 for 16k VDC, 199 for 64k VDC LoadW r3,0 LoadW r4,639 lda #vdcLtGray jsr ColorRectangle rts IconTable: .byte 1,0,0,0,0,0,0,0,0,0,0,0 ; one dummy Icon Endcode: SUBJ: 80 column colour FROM: RobertN4 01/01/91 S#: 824650 There are three routines of interest. The first is SetColorMode at $c2f5. This is used to setup the color card size (i.e. 8x8, 8x4 etc pixels). You pass the option in register A. options are: A = 0 no color, 16K bitmap (this is called during booting and rebooting). A = 1 color, 16K VDC, reduced screen size. This changes the screen to 17 character lines to squeeze the attribute data into the last bit of the 16K. A = 2 color, 8x8 cell size, 64K VDC. Back to a 20 character line screen, but needs a 64K VDC since the attribute data is stored at $4000. A = 3, color, 8x4 cells size, 64K VDC. A = 4, color, 8x2 cell size, 64K VDC. Then to draw, you have two routines. The first is ColorRectangle ($c2fb). You pass the following: r2l ($06) = starting Y r2H ($07) = ending Y r3 ($08/9) = starting X word r4 ($0a/b) = ending X word A = colour This will fill a rectangle with the required color. This routine works both in 40 and 80 columns, but I have not checked whether or not doubling bits work on the X values (I assume they do like all 40/80 column routines). This uses the other subroutine, ColorCard (at $c2f8). You pass this the following: r3 ($08/9) = x location of card start (the routine adjusts to the closest 8 bit location, so you don't have to be exactly on the start of a card) r11L ($18) = y location of card A = color to set or color required C (carry bit). If set, the put color into screeen. If clear then put current screen color in A. I have just looked and it does seem that doubling bits are taken into account. Rob Norton