[Coco] Access to 225 lines in BASIC

Robert Gault robert.gault at att.net
Mon Oct 20 13:54:38 EDT 2014


Nick Marentes wrote:
> On 20/10/2014 7:00 AM, Nick Marentes wrote:
>> I am creating a program in BASIC but I require the use of more vertical screen
>> space than what BASIC allows.
>>
>> Basic restricts all graphics (HSCREEN2) to a maximum of 192 vertical lines yet
>> the display can be extended up to 255 (with a POKE).
>>
>> The BASIC drawing commands restrict their drawing to 192 although they accept
>> values up to 255 (I think) but truncate to 192.
>>
>> Are there any magical POKEs to BASIC that allow it to draw up to the maximum?
>>
>> Nick
>>
>
>
> Call the search off. I found it. It was in the "CoCo III Secrets Revealed" book.
>
> POKE&HE06C,&H35
> POKE&HE06D,&H3E
> POKE&HE06E,&H34
> POKE&HE06F,&H3D
> POKE&HEB75,199
> POKE&HE7BA,200
> POKE&HE7BE,199
> POKE&HEF8F,18
>
> This allows BASIC to draw down to 200 lines (Actually 201 lines).
>
> I fiddled with the numbers and I actually got it down to 204 lines but I needed
> 208 as a minimum. This required setting the screenmode to 225 scanlines but
> BASIC could only handle up to 204.
>
> I wonder why the Super Extended Basic designers forced it to 192 when it could
> have easily done 200. Maybe to keep it consistant with the VDG modes max of 192?
>
> Nick
>
>

So far so good, but you wanted 225 lines. That gets very tricky as it requires 
160x225=$8CA0 bytes but Task1 (used for hi-res graphics) currently has $8000 
bytes available.

I have been able to make Basic use 225 lines in HSCREEN2 mode but it requires 
tricking Basic into using an additional MMU block in Task1. If you try all the 
needed POKEs at once, Basic crashes. You have to gradually increase the amount 
of memory used by HCLS at $E6E6 until the full $8CA0 amount has been accessed.

As yet I've not been able to force the 320x225x16 mode in a single pass of a 
Basic program.

If you want a demo program, let me know.

Robert



More information about the Coco mailing list