[Coco] Hi! I'm new here!

Hugo Dufort hugo at seshat.ca
Sun Mar 1 23:38:39 EST 2015


Thanks Robert! I have found the exact address earlier today by fiddling 
with a little basic kamikaze program.
I started by using Basic's hscreen to clear the graphics area, then 
returned to a text screen.
Then I did a few pokes to initialize graphics and move the pointer a bit.
This one seems to work okay for now. I will start working with memory 
pages and fine-tuned scrolling tomorrow.

========
50 rem Clearing graphic viewport, then closing it
60 hscreen 2
70 hcircle(160,100),90
75 hscreen 0
80 cls
81 print "Initializing High-res graphics. Press any key."
82 c$=inkey$
83 if(c$="") goto 82
90 G1=192
95 G0=0
96 G=G1*256+G0
100 poke &hFF98,192
110 poke &hFF99,30
120 poke &hFF9D,G1
130 poke &hFF9E,G0
140 poke &hFF90,76
200 c$=inkey$
220 if(c$="") goto 200
222 G = G+160
225 G1 = FIX(G/256)
226 G0 = G-G1*256
230 poke &hff9d,G1
231 poke &hff9e,G0
240 goto 200


Le 2015-03-01 23:12, Robert Gault a écrit :
> Hugo Dufort wrote:
>> I want to enable the hi-res modes in Basic using only pokes. I'm 
>> pretty sure
>> I've done that in the past.
>>
>> I tried the following naive sequence:
>> poke &hFF98,192(bit7=1 for graphics, bit6=1 for mmu)
>
> $FF98 does not control the MMU registers. That is done at $FF90 which 
> bit6 turns on.
>
>> poke &hFF99,30 (select 320x200x16 using bit mask)
>> poke &hFF90,0 (b7=0 for high-res)
>>
>> Is it necessary to tell the MMU where to map the graphics array?
>>
>> Since I don't have all bit mask defs, I'm pretty sure I'm breaking 
>> things in
>> memory.
>>
>> Hugo
>
> If you want the above to "work" it must be within a program.
> ex
> 10 POKE&HFF98,128:POKE&HFF99,30:POKE&HFF90,0
> 20 GOTO20
>
> However, the above will not display the graphics screen as video is 
> still pointed elsewhere. Also, the value sent to $FF90 will turn off 
> the MMU and disk activity. A "better" value would be the default for 
> Coco3 modes of $4C.
>
> The default location of the hi-res graphics screen is at $60000. 
> Assuming you started in the 32-column low-res text mode, you must 
> clear the Vscroll register at $FF9C and set the Voffset for $6000 with 
> $FF9D-$FF9E=$60000/8=$C000.
> So at a minimum you would need:
> 10 POKE&HFF98,128:POKE&HFF99,30:POKE&HFF90,$4C
> 20 POKE&&HFF9C,0:POKE&HFF9D,&HC0:POKE&HFF9E,0
> 30 GOTO30
> However, the above will likely show a pattern on the screen because it 
> was not cleared. That will get much more complicated as you will need 
> to map the screen into your 64K cpu space and send data to it.
> You must find a $2000 byte block of free memory, point the required 
> MMU register to $60000, write to it, increase the MMU value, write to 
> the next block, and continue until the entire screen has been sent data.
>
> Robert
>


---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
http://www.avast.com



More information about the Coco mailing list