Screen Scrolling [message #414407] |
Fri, 06 May 2022 23:38 |
|
Originally posted by: duhas...@gmail.com
Or not scrolling I guess. I want to fill a the text screen with a character, in assembly. I'm using COUT, but the last character will cause the screen to scroll up one line and leave a line blank at the bottom. Is there a good way to prevent this beside printing everything but the last character and then directly sticking the last character into screen memory?
|
|
|
Re: Screen Scrolling [message #414408 is a reply to message #414407] |
Sat, 07 May 2022 04:46 |
barrym95838
Messages: 130 Registered: April 2013
Karma: 0
|
Senior Member |
|
|
On Friday, May 6, 2022 at 8:38:16 PM UTC-7, duhas...@gmail.com wrote:
> Or not scrolling I guess. I want to fill a the text screen with a character, in assembly.
> I'm using COUT, but the last character will cause the screen to scroll up one line and
> leave a line blank at the bottom. Is there a good way to prevent this beside printing
> everything but the last character and then directly sticking the last character into
> screen memory?
It might be a bit naughty, but have you tried poking a #$19 into ZP location $23?
Proceed at your own risk ... it's way past my bed time.
|
|
|
|
Re: Screen Scrolling [message #414414 is a reply to message #414407] |
Sat, 07 May 2022 17:22 |
gids.rs
Messages: 1395 Registered: October 2012
Karma: 0
|
Senior Member |
|
|
> Or not scrolling I guess. I want to fill a the text screen with a character, in assembly. I'm using COUT, but the last character will cause the screen to scroll up one line and leave a line blank at the bottom. Is there a good way to prevent this beside printing everything but the last character and then directly sticking the last character into screen memory?
The simplest way I have seen so far is to increase the vertical and horizontal window sizes.
Increase $21 by 1 and $23 by 1 of zero page, set your htab and vtab then print your character to the bottom right hand corner using COUT. And reset $21 and $23 back to normal.
Try this:
0300:A9 17 20 5B FB A9 27 85
0308:24 E6 21 E6 23 A9 C1 20
0310:ED FD C6 23 C6 21 A9 14
0318:20 5B FB 4C 8E FD 00 00
|
|
|
Re: Screen Scrolling [message #414418 is a reply to message #414407] |
Sun, 08 May 2022 02:55 |
someone
Messages: 48 Registered: March 2012
Karma: 0
|
Member |
|
|
On 7 May 2022, duhas...@gmail.com wrote
> Or not scrolling I guess. I want to fill a the text screen with a character, in assembly. I'm using COUT, but the last character will cause the screen to scroll up one line and leave a line blank at the bottom. Is there a good way to prevent this beside printing everything but the last character and then directly sticking the last character into screen memory?
As you are working in assembly, you could do as I did with Spectrum when I had a similar problem, and simply copy the screen code, and adapt it as necessary...
You can find the code in a //e manual.
Cheers - Speccie
|
|
|
Re: Screen Scrolling [message #414419 is a reply to message #414413] |
Sun, 08 May 2022 04:24 |
barrym95838
Messages: 130 Registered: April 2013
Karma: 0
|
Senior Member |
|
|
On Saturday, May 7, 2022 at 12:39:03 PM UTC-7, qkumba wrote:
> HLINE and VLINE don't scroll.
.... and could be used to create a cool "wipe" effect @ 1 MHz. Like!
|
|
|
Re: Screen Scrolling [message #414420 is a reply to message #414413] |
Mon, 09 May 2022 00:03 |
|
Originally posted by: kegs
In article <f812d193-6a9e-4bfa-b896-8c6fdcef1f44n@googlegroups.com>,
qkumba <peter.ferrie@gmail.com> wrote:
> HLINE and VLINE don't scroll.
To give a little more detail, try the following:
10 FOR I = 0 TO 23
20 COLOR= 3
30 HLIN 0,39 AT I * 2
40 COLOR= 10
50 HLIN 0,39 AT I * 2 + 1
60 NEXT
70 FOR I = 1 TO 10000000
80 NEXT
The HLIN (and VLIN and PLOT) commands work on the text screen, if you don't
give GR.
This writes "#" characters to the screen, and does not scroll. For the
character you want in hex, (0x23 for #), write each hex digit as decimal,
which is easy for this case: 2 and 3. Put the low digit in the 20 COLOR=
line, and put the upper digit, plus 8 (to not be inverse or flashing) in
the 40 COLOR= line.
To fill the screen with "L", which is 0x5a, do 20 COLOR=10, 40 COLOR=13.
The FOR loop in lines 70,80 just show that the screen isn't scrolling.
Press ctrl-c to stop.
This doesn't work in 80 columns.
Kent
|
|
|
|
|
Re: Screen Scrolling [message #414436 is a reply to message #414420] |
Mon, 09 May 2022 18:40 |
|
Originally posted by: Brian Patrie
Kent Dickey wrote:
> In article <f812d193-6a9e-4bfa-b896-8c6fdcef1f44n@googlegroups.com>,
> qkumba <peter.ferrie@gmail.com> wrote:
>> HLINE and VLINE don't scroll.
>
> To give a little more detail, try the following:
>
> 10 FOR I = 0 TO 23
> 20 COLOR= 3
> 30 HLIN 0,39 AT I * 2
> 40 COLOR= 10
> 50 HLIN 0,39 AT I * 2 + 1
> 60 NEXT
> 70 FOR I = 1 TO 10000000
> 80 NEXT
>
> The HLIN (and VLIN and PLOT) commands work on the text screen,
> if you don't give GR.
Better yet, write directly to the colour mask byte:
10 FOR I = 0 TO 47
20 POKE 48,163
30 HLIN 0,39 AT I
40 NEXT
90 ON PEEK(49152) < 128 GOTO 90 : POKE 49168,.
(That last line just waits for a key, and clears it.)
Or (on a machine with MouseText):
10 PRINT CHR$(17); : POKE 49167,. : TEXT
21 FOR X = 0 TO 38 STEP 2
22 POKE 48,86 : VLIN 0,47 AT X
23 POKE 48,87 : VLIN 0,47 AT X + 1
24 NEXT
90 ON PEEK(49152) < 128 GOTO 90 : POKE 49168,.
(Line 10 ensures 40 columns, alt charset, text mode.)
|
|
|
Re: Screen Scrolling [message #414437 is a reply to message #414433] |
Mon, 09 May 2022 18:51 |
|
Originally posted by: Brian Patrie
qkumba wrote:
>> This doesn't work in 80 columns.
>
> Though it can:
>
> 33 POKE 49237,0
> 35 HLIN 0,39 AT I * 2
> 38 POKE 49236,0
Sorta. This mod will work on a IIe, or IIee, but will misbehave on a
IIc, IIc+, or IIgs--which support DGR in firmware. So you'd need to
determine what you're running on, and act accordingly (or roll your own
PLOT, HLINE, VLINE code).
|
|
|
Re: Screen Scrolling [message #414448 is a reply to message #414436] |
Tue, 10 May 2022 21:55 |
|
Originally posted by: duhas...@gmail.com
On Monday, May 9, 2022 at 6:40:09 PM UTC-4, Brian Patrie wrote:
> Kent Dickey wrote:
>> In article <f812d193-6a9e-4bfa...@googlegroups.com>,
>> qkumba wrote:
>>> HLINE and VLINE don't scroll.
>>
>> To give a little more detail, try the following:
>>
>> 10 FOR I = 0 TO 23
>> 20 COLOR= 3
>> 30 HLIN 0,39 AT I * 2
>> 40 COLOR= 10
>> 50 HLIN 0,39 AT I * 2 + 1
>> 60 NEXT
>> 70 FOR I = 1 TO 10000000
>> 80 NEXT
>>
>> The HLIN (and VLIN and PLOT) commands work on the text screen,
>> if you don't give GR.
> Better yet, write directly to the colour mask byte:
>
> 10 FOR I = 0 TO 47
> 20 POKE 48,163
> 30 HLIN 0,39 AT I
> 40 NEXT
> 90 ON PEEK(49152) < 128 GOTO 90 : POKE 49168,.
>
> (That last line just waits for a key, and clears it.)
>
> Or (on a machine with MouseText):
>
> 10 PRINT CHR$(17); : POKE 49167,. : TEXT
> 21 FOR X = 0 TO 38 STEP 2
> 22 POKE 48,86 : VLIN 0,47 AT X
> 23 POKE 48,87 : VLIN 0,47 AT X + 1
> 24 NEXT
> 90 ON PEEK(49152) < 128 GOTO 90 : POKE 49168,.
>
> (Line 10 ensures 40 columns, alt charset, text mode.)
Ok I tried the BASIC versions and they work like I want, but I tried to right a little assembly program to test it and I can't get it to work.
*300L
0300- A9 A3 LDA #$A3 ;Load "#"
0302- 85 30 STA $30 ;Stick in color
0304- A9 27 LDA #$27 ;Load rightmost
0306- 85 2C STA $2C ;Stick in 2C
0308- A9 09 LDA #$09 ;Load vertical coord
030A- A0 00 LDY #$00 ;load horizontal coord
030C- 20 19 F8 JSR $F819 ; call HLIN
Should have a line of # through the screen and I don;t....
0
*
|
|
|
Re: Screen Scrolling [message #414450 is a reply to message #414448] |
Tue, 10 May 2022 23:57 |
|
Originally posted by: Jerry Penner
"duhas...@gmail.com" <duhast6377@gmail.com> writes:
> On Monday, May 9, 2022 at 6:40:09 PM UTC-4, Brian Patrie wrote:
>> Kent Dickey wrote:
>>> In article <f812d193-6a9e-4bfa...@googlegroups.com>,
>>> qkumba wrote:
>>>> HLINE and VLINE don't scroll.
>>>
>>> To give a little more detail, try the following:
>>>
>>> 10 FOR I = 0 TO 23
>>> 20 COLOR= 3
>>> 30 HLIN 0,39 AT I * 2
>>> 40 COLOR= 10
>>> 50 HLIN 0,39 AT I * 2 + 1
>>> 60 NEXT
>>> 70 FOR I = 1 TO 10000000
>>> 80 NEXT
>>>
>>> The HLIN (and VLIN and PLOT) commands work on the text screen,
>>> if you don't give GR.
>> Better yet, write directly to the colour mask byte:
>>
>> 10 FOR I = 0 TO 47
>> 20 POKE 48,163
>> 30 HLIN 0,39 AT I
>> 40 NEXT
>> 90 ON PEEK(49152) < 128 GOTO 90 : POKE 49168,.
>>
>> (That last line just waits for a key, and clears it.)
>>
>> Or (on a machine with MouseText):
>>
>> 10 PRINT CHR$(17); : POKE 49167,. : TEXT
>> 21 FOR X = 0 TO 38 STEP 2
>> 22 POKE 48,86 : VLIN 0,47 AT X
>> 23 POKE 48,87 : VLIN 0,47 AT X + 1
>> 24 NEXT
>> 90 ON PEEK(49152) < 128 GOTO 90 : POKE 49168,.
>>
>> (Line 10 ensures 40 columns, alt charset, text mode.)
>
> Ok I tried the BASIC versions and they work like I want, but I tried to right a little
> assembly program to test it and I can't get it to work.
>
>
> *300L
> 0300- A9 A3 LDA #$A3 ;Load "#"
> 0302- 85 30 STA $30 ;Stick in color
> 0304- A9 27 LDA #$27 ;Load rightmost
> 0306- 85 2C STA $2C ;Stick in 2C
> 0308- A9 09 LDA #$09 ;Load vertical coord
> 030A- A0 00 LDY #$00 ;load horizontal coord
> 030C- 20 19 F8 JSR $F819 ; call HLIN
>
> Should have a line of # through the screen and I don;t....
>
> 0
> *
You still have to draw two HLINs because with one you're only setting
one half of the byte (the top or the bottom, depending on your
Y-coordinate).
--
--
Jerry jerry+a2 at jpen.ca
|
|
|
Re: Screen Scrolling [message #414451 is a reply to message #414450] |
Wed, 11 May 2022 03:33 |
Oliver Schmidt
Messages: 132 Registered: January 2013
Karma: 0
|
Senior Member |
|
|
Hi,
Looking at the complexity of the HLIN approach, I'm wondering in which
aspect it is preferable over a single POKE into screen RAM. Especially
because AFAIK that POKE would work both in 40 and 80 col mode.
Regards,
Oliver
|
|
|
Re: Screen Scrolling [message #414464 is a reply to message #414437] |
Fri, 13 May 2022 03:15 |
|
Originally posted by: Brian Patrie
Brian Patrie wrote:
> qkumba wrote:
>>> This doesn't work in 80 columns.
>>
>> Though it can:
>>
>> 33 POKE 49237,0
>> 35 HLIN 0,39 AT I * 2
>> 38 POKE 49236,0
>
> Sorta. This mod will work on a IIe, or IIee, but will misbehave on a
> IIc, IIc+, or IIgs--which support DGR in firmware. So you'd need to
> determine what you're running on, and act accordingly (or roll your own
> PLOT, HLINE, VLINE code).
Erratum: This only seems to apply to AppleSoft--not the ml PLOT, VLINE,
and HLINE calls. (Tested with an emulated IIgs3.)
|
|
|
Re: Screen Scrolling [message #414465 is a reply to message #414450] |
Fri, 13 May 2022 03:33 |
|
Originally posted by: Brian Patrie
Jerry Penner wrote:
> "duhas...@gmail.com" <duhast6377@gmail.com> writes:
>
>> On Monday, May 9, 2022 at 6:40:09 PM UTC-4, Brian Patrie wrote:
>>> Kent Dickey wrote:
>>>> In article <f812d193-6a9e-4bfa...@googlegroups.com>,
>>>> qkumba wrote:
>>>>> HLINE and VLINE don't scroll.
>>>>
>>>> To give a little more detail, try the following:
>>>>
>>>> 10 FOR I = 0 TO 23
>>>> 20 COLOR= 3
>>>> 30 HLIN 0,39 AT I * 2
>>>> 40 COLOR= 10
>>>> 50 HLIN 0,39 AT I * 2 + 1
>>>> 60 NEXT
>>>> 70 FOR I = 1 TO 10000000
>>>> 80 NEXT
>>>>
>>>> The HLIN (and VLIN and PLOT) commands work on the text screen,
>>>> if you don't give GR.
>>> Better yet, write directly to the colour mask byte:
>>>
>>> 10 FOR I = 0 TO 47
>>> 20 POKE 48,163
>>> 30 HLIN 0,39 AT I
>>> 40 NEXT
>>> 90 ON PEEK(49152) < 128 GOTO 90 : POKE 49168,.
>>>
>>> (That last line just waits for a key, and clears it.)
>>>
>>> Or (on a machine with MouseText):
>>>
>>> 10 PRINT CHR$(17); : POKE 49167,. : TEXT
>>> 21 FOR X = 0 TO 38 STEP 2
>>> 22 POKE 48,86 : VLIN 0,47 AT X
>>> 23 POKE 48,87 : VLIN 0,47 AT X + 1
>>> 24 NEXT
>>> 90 ON PEEK(49152) < 128 GOTO 90 : POKE 49168,.
>>>
>>> (Line 10 ensures 40 columns, alt charset, text mode.)
>>
>> Ok I tried the BASIC versions and they work like I want, but
>> I tried to right a little assembly program to test it and I
>> can't get it to work.
>>
>>
>> *300L
>> 0300- A9 A3 LDA #$A3 ;Load "#"
>> 0302- 85 30 STA $30 ;Stick in color
>> 0304- A9 27 LDA #$27 ;Load rightmost
>> 0306- 85 2C STA $2C ;Stick in 2C
>> 0308- A9 09 LDA #$09 ;Load vertical coord
>> 030A- A0 00 LDY #$00 ;load horizontal coord
>> 030C- 20 19 F8 JSR $F819 ; call HLIN
>>
>> Should have a line of # through the screen and I don;t....
>>
>> 0
>> *
>
> You still have to draw two HLINs because with one you're only
> setting one half of the byte (the top or the bottom, depending
> on your Y-coordinate).
Which is why i prefer to use VLIN. (Though, from ml, either way is fast
enough not to see the dirt that your eye can catch with HLIN from BASIC
at 1 MHz.)
0300- A9 A3 LDA #$A3 ;"#"
0302- 85 30 STA $30 ;to colour mask byte
0304- A9 2F LDA #$2F ;bottom of line
0306- 85 2D STA $2D
0308- A0 27 LDY #$27 ;start column
030A- A9 00 LDA #$00 ;top of line
030C- 20 28 F8 JSR $F828 ;VLINE
030F- 88 DEY ;next column
0310- 10 F8 BPL $030A
0312- 60 RTS
And, since (contrary to my earlier assumption) the DGR support in
AppleSoft (IIc, IIc+ ,IIgs) doesn't seem to apply to the machine
language PLOT, HLINE, and VLINE calls, you can (with 80STORE enabled, of
course) throw the PAGE2 switch and call this again, to fill the auxmem
columns.
*C055:0 n 300g n C054:0 n 300g
|
|
|
Re: Screen Scrolling [message #414468 is a reply to message #414407] |
Fri, 13 May 2022 12:39 |
mmphosis
Messages: 163 Registered: November 2012
Karma: 0
|
Senior Member |
|
|
ORG $0300
LDA #$A3
LDX #$78
loop
DEX
STA $400,X
STA $480,X
STA $500,X
STA $580,X
STA $600,X
STA $680,X
STA $700,X
STA $780,X
BNE loop
RTS
0FORI=768TO799:READB:POKE
I,B:NEXT:DATA169,163,162,120,202,157,0,4,157,128,4,157,0,5,1 57,128,5,157,0,6,157,128,6,157,0,7,157,128,7,208,229,96
1 C = ASC ("#")
2 POKE 769,C + 128: CALL 768
3 WAIT 49152,128: POKE 49168,0
4 POKE 37,255
|
|
|