Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.apple2.programmer > #321

advice on updating text screen from basic?

From aiiadict@gmail.com
Newsgroups comp.sys.apple2.programmer
Subject advice on updating text screen from basic?
Date 2012-07-10 10:58 -0700
Organization http://groups.google.com
Message-ID <1c3a6089-1ca6-4ad5-9ee5-44db21ecbeca@googlegroups.com> (permalink)

Show all headers | View raw


I want to display some text quickly from BASIC.  I know how to do this quickly from 6502...

I have an array, L$(50).  Each is 40 characters wide (to fit the text screen)

I do:

when scroll:
i=i+1:rem get to next data to update screen with
vtab 24:htab1:print L$(i)
call -912:rem scroll screen

it updates reasonably fast, but eats memory for L$(50)

I tried:

storing the data to scroll onto screen in a BINARY file...  Less memory because applesoft doesn't have to keep track of strings.

binary file is at 8192

when update screen:
I=i+1:
vtab 24:htab1:set cursor position
NextLine= 8192+(I*40)
for update = 1 to 40
poke $2000 + update, peek(nextline+update)
next update
call -912

so it peeks the proper character from RAM, and pokes it into the bottom of the screen, then scrolls the screen.

This is even slower than using an array of text screens.


Is there a quick way to do this using BASIC?

this is for a lunchtime project, a text based Mario Bros. type game.  (scrolling sideways is SLOW from BASIC, so I am making it vertical scrolling with gravity out of phase by 90 degrees.)

Rich

Back to comp.sys.apple2.programmer | Previous | NextNext in thread | Find similar


Thread

advice on updating text screen from basic? aiiadict@gmail.com - 2012-07-10 10:58 -0700
  Re: advice on updating text screen from basic? David Schmidt <schmidtd@my-deja.com> - 2012-07-10 16:05 -0400
  Re: advice on updating text screen from basic? mmphosis@macgui.com ( mmphosis) - 2012-07-11 00:05 +0000
    Re: advice on updating text screen from basic? Michael J. Mahon <mjmahon@aol.com> - 2012-07-10 19:53 -0500

csiph-web