How to change the shape of the cursor?
How to change the shape of the cursor?
Hello,
I am wondering is it possible to change the shape of the Oric's cursor?
I know what, and how to "poke" in order to change the /example/ the appearance of the letter "A",
but is it possible to "poke" in order to change the Oric's cursor from it's basic square-shape into something else?
Example: instead of square-flashing cursor, to have a "lower-line"-flashing cursor? Or any other shape? It could be useful in some games?
Brana
I am wondering is it possible to change the shape of the Oric's cursor?
I know what, and how to "poke" in order to change the /example/ the appearance of the letter "A",
but is it possible to "poke" in order to change the Oric's cursor from it's basic square-shape into something else?
Example: instead of square-flashing cursor, to have a "lower-line"-flashing cursor? Or any other shape? It could be useful in some games?
Brana
Re: How to change the shape of the cursor?
Yes it is possible !Brana wrote:Hello,
I am wondering is it possible to change the shape of the Oric's cursor?
I know what, and how to "poke" in order to change the /example/ the appearance of the letter "A",
but is it possible to "poke" in order to change the Oric's cursor from it's basic square-shape into something else?
Example: instead of square-flashing cursor, to have a "lower-line"-flashing cursor? Or any other shape? It could be useful in some games?
Brana
But as far as I remember (so I can be very wrong !), you will not be able to use any shape. The only thing you can do is to setup the "height" of the cursor, thus sticking with a rectangular shape.
With a heigth of 1, for instance, you will get a "lower-line" cursor.
....
(searching data...)
....
found !
Anyway, the Graphic cursor mask resides at address #215, thus an instruction like this :
poke #215,I should do the trick, but I don't know exactly how.
-
- Pilot Officer
- Posts: 97
- Joined: Thu Jan 26, 2006 11:27 pm
- Location: St. Helens, Merseyside, UK
Don't know if this will help, it's taken from the Oric Advanced User Guide.
Scott
Code: Select all
F801 2D 6A 02 AND $026A This routine turns the cursor
F804 4A LSR A on or off depending on value
F805 6A ROR A in A. 0 for off, 1 for on.
F806 8D 65 02 STA $0265 Cursor being turned on is
F809 AC 69 02 LDY $0269 subject to cursor flag being
F80C B1 12 LDA ($12),Y enabled.
F80E 29 7F AND #$7F
F810 0D 65 02 ORA $0265
F813 91 12 STA ($12),Y
F815 60 RTS
I am pretty sure too, but where ??? Most probably in a Theoric issue, but I cannot be sure.mmu_man wrote:Ah I knew I've seen this before, oddly it's not mentionned in the atmos manual.
And the thing is that I don't think it is emulated by euphoric or any other Oric emulator !...Dbug wrote:That's kind of strange it's possible to do that.
I was thinking that the "cursor" was only playing with the bit 7 of the character ot screen to set the video inversion ON and OFF.
This is a nice challenge there, isn't it ?
Re: How to change the shape of the cursor?
waskol wrote: Yes it is possible !
But as far as I remember (so I can be very wrong !), you will not be able to use any shape. The only thing you can do is to setup the "height" of the cursor, thus sticking with a rectangular shape.
With a heigth of 1, for instance, you will get a "lower-line" cursor.
....
(searching data...)
....
found !
Anyway, the Graphic cursor mask resides at address #215, thus an instruction like this :
poke #215,I should do the trick, but I don't know exactly how.
RE: If I understood You correctly, then if I would do something like this:
10 FOR A=0 TO 255
20 POKE #215,A
30 WAIT 150
40 NEXT A
50 END
That should “show” me all the possibilities of the cursor’s shape, but – nothing happens; cursor just continues to “blinks” at it’s basic square shape regardless of the value of “A” in the example above.
Are You sure you gave to me the right address to poke to?
Is it #215 (?)
Brana
Re: How to change the shape of the cursor?
Nope !Brana wrote:
Are You sure you gave to me the right address to poke to?
No it seems to mee to be the graphical cursor address (for curset,Circle,... for instance) :
What could be possible anyway is to write a little asm code that use the slow interupt of page 2 :20 CURSET 120,100,1
Code: Select all
1) disables the cursor
2) - intercept the press of key
- poke to the current cursor position the caracter of your choice (addresses #268 for X and #269 for Y position)
- Goto 2)
Re:
But, now - it seems to me that it can NOT be done from within the Oric Atmos' BASIC
Well, you can in BASIC, but it's just not trivial.
Basically (haha) you can do that:
* Disable the blinking cursor
* each time you move the cursor, you pick up and save the value which is on screen, and you save it somewhere else.
* you use a special reserved character (for example ASCII code 127) and you redefine it with the same values than you find for the other character you just saved, except that you force the two last lines to some _ pattern
* you poke this special character in the place of the previous one on screen
* when moving again, you replace the saved character on the screen
Basically (haha) you can do that:
* Disable the blinking cursor
* each time you move the cursor, you pick up and save the value which is on screen, and you save it somewhere else.
* you use a special reserved character (for example ASCII code 127) and you redefine it with the same values than you find for the other character you just saved, except that you force the two last lines to some _ pattern
* you poke this special character in the place of the previous one on screen
* when moving again, you replace the saved character on the screen
ok, The Oric cursor is simply the inverse of whatever it is currently over, so if you boot the Atmos, then type D then move cursor back left the D appears as inversed D. There are 3 ways to change the cursor shape..
1) Ensure the cursor lyes over a character that modifies its shape and colour as desired
2) Write a complicated asm routine to redefine one of the existing characters(like code 127) to the current character under the cursor position then use this in place of the cursor in some devious way
3) Take some tipex or a black pen and mask out the parts of the cursor you don't want. it does limit you to keep the cursor in the same place tho
But in essence you cannot change the shape of the cursor since it must be able to travel over any background text attribute without corrupting its effect on the rest of the line.
Also note that disabling the cursor does not remove the inverse property at the cursor location but only serves to not display the cursor there
This can be demonstrated by poking an inverse character into the text line, disabing the cursor then moving it (blind folded) over the inversed character, the inversed character is reset to normal video!
For example, boot the oric then type..
Now press CTRL Q to disable cursor and move up to top of page
1) Ensure the cursor lyes over a character that modifies its shape and colour as desired
2) Write a complicated asm routine to redefine one of the existing characters(like code 127) to the current character under the cursor position then use this in place of the cursor in some devious way
3) Take some tipex or a black pen and mask out the parts of the cursor you don't want. it does limit you to keep the cursor in the same place tho
But in essence you cannot change the shape of the cursor since it must be able to travel over any background text attribute without corrupting its effect on the rest of the line.
Also note that disabling the cursor does not remove the inverse property at the cursor location but only serves to not display the cursor there
This can be demonstrated by poking an inverse character into the text line, disabing the cursor then moving it (blind folded) over the inversed character, the inversed character is reset to normal video!
For example, boot the oric then type..
Code: Select all
POKE #BBD2,129