Path: utzoo!attcan!uunet!cbmvax!fred From: fred@cbmvax.UUCP (Fred Bowen) Newsgroups: comp.sys.cbm Subject: Re: C64 text screen Keywords: text xcreen page swapping Message-ID: <5498@cbmvax.UUCP> Date: 13 Dec 88 22:24:00 GMT References: <5673@saturn.ucsc.edu> Reply-To: fred@cbmvax.UUCP (Fred Bowen) Organization: Commodore Technology, West Chester, PA Lines: 73 In article <5673@saturn.ucsc.edu> lechner@ucscb.UCSC.EDU (Eric Lechner) writes: >I am writing an assembly language "life" program and would like to do this: >It needs to alternate between two screens, without copying the screen (due to >time considerations. I am trying to optimize running time). >I would like to keep each screen in a different place in memory, so >that I need only change the pointer to the text screen. > >I have tried the 128 programmer's reference guide, and have tried >altering location 648 (a page pointer to the top of the text screen) but >the display does not change when I change that pointer. > >What am I doing wrong? Is there a pointer in the video chip that I need to >alter as well as the other pointer? Am I overlooking anything else, as well? > > Eric Lechner 115 Seton Way Santa Cruz, CA 95060 > lechner@ucscb.ucsc.edu ...ucbvax!ucscc!ucscb!lechner I don't know where you found "648"- if that's decimal, you're poking around in the C128 input buffer, and if that's hex, you're poking the VIC screen. Here's a little thing I did many, many moons ago: 0 REM ******************************* 1 REM * MOVING THE C128 TEXT SCREEN * 2 REM * * 3 REM * SCREENS MAY BE PLACED IN * <<<<<< note these conditions 4 REM * THE BITMAP RAM AREA. * 5 REM * ALL SCREENS SHARE THE SAME * 6 REM * LINE LINK TABLE AND COLOR * 7 REM * RAM. * 8 REM ******************************* 9 : 10 GRAPHIC1,1:GRAPHIC0,1:REM ALLOC RAM 12 V1=DEC("0A2C"):REM ED -> $D018 14 SP=DEC("0A3B"):REM ED SCREEN PAGE 16 TRAP9000 19 : 30 REM CLEAR AND PRINT ON EACH SCREEN 40 GOSUB100:A$="$0800":GOSUB500:SLEEP1 50 GOSUB200:A$="$2000":GOSUB500:SLEEP1 60 GOSUB300:A$="$2400":GOSUB500:SLEEP1 69 : 70 REM CYCLE THRU SCREENS 80 FORK=1TO3:ONKGOSUB100,200,300:SLEEP1:NEXT:GOTO80 99 : 100 REM NORMAL SCREEN AT $0400 120 POKEV1,DEC("14") 130 POKESP,DEC("04") 190 RETURN 199 : 200 REM ALTERNATE SCREEN AT $2000 220 POKEV1,DEC("84") 230 POKESP,DEC("20") 290 RETURN 299 : 300 REM ALTERNATE SCREEN AT $2400 320 POKEV1,DEC("94") 330 POKESP,DEC("24") 390 RETURN 399 : 500 REM PRINT TEXT ON SCREEN 510 PRINT"<^s><^q><^q>":FORK=1TO8:PRINT"<^q> THIS SCREEN IS AT "A$:NEXT 590 RETURN 599 : 9000 REM TRAP TO NORMAL SCREEN 9010 GOSUB100:TRAP:STOP -- -- -- Fred Bowen uucp: {uunet|rutgers|pyramid}!cbmvax!fred arpa: cbmvax!fred@uunet.uu.net tele: 215 431-9100 Commodore Electronics, Ltd., 1200 Wilson Drive, West Chester, PA, 19380