Re: Window Manager programming in Assembler
Posted: Sun Oct 23, 2016 7:56 pm
And by the way EasySource outputs well commented assembler source code for the menu definition, so there is no magic to it, it's just much easier this way.
RIP Sir Clive Sinclair 1940 - 2021
https://theqlforum.com/
Actually I think you simply don't... WMAN will change it if it needs to.NormanDunbar wrote:Page 104 ...
Wm.swinf, Wm.swlit, Wm.swapp etc set the window to the info window, loose item, application sub window. Then you can use wm.rname or wm.ename from page 124 to edit text in the appropriate area, or us other code to do other stuff with that area.
I've no idea at present, how to set the window back to full size again afterwards! Maybe wm.rptr copes. Never tried it in pure assembly to be honest. As far as I remember ....
QPAC2 does it wrong thenNormanDunbar wrote:Tobias informs me that WM.WDRAW is required.
I have seen that documentation, which seems to make sense for GD2 drivers. But I am looking at standard QL sprites for example this is the code for the MOVE sprite from my QPTR package.mk79 wrote:The sprite format is pretty well documented. QL format in the Qptr manual, extended colour sprites for example here:Martin_Head wrote:No response to question 2. Is it that tricky then? I know there are programs for designing sprites and creating the assembler for them. But I would like to know how it works. That,s why I am trying to avoid things like EasyPointer that do some of the hard work for you.
http://www.kilgus.net/smsqe/display.txt
Not sure if the latter is incorporated into the new Qptr manual. Any specific questions?
Code: Select all
*
* Sprite movespr
*
* Mode 4
* +------|-------+
* |aaaaaaaaaa |
* |awwwwwwwwa |
* |awwrrrrwwa |
* |awwrrrrwwaaaaa|
* |awwrrwwwwwwwwa|
* -awwwwwwwwrrwwa-
* |aaaaawwrrrrwwa|
* | awwrrrrwwa|
* | awwwwwwwwa|
* | aaaaaaaaaa|
* +------|-------+
*
xdef move_spr
xdef mes_move
mes_move
move_spr
dc.w $0100,$0000
dc.w 14,10,6,5
dc.l sc4_movespr-*
dc.l sm4_movespr-*
dc.l 0
sc4_movespr
dc.w $0000,$0000
dc.w $7F7F,$8080
dc.w $617F,$8080
dc.w $617F,$8080
dc.w $677F,$F8F8
dc.w $7F7F,$98F8
dc.w $0607,$18F8
dc.w $0607,$18F8
dc.w $0707,$F8F8
dc.w $0000,$0000
sm4_movespr
dc.w $FFFF,$C0C0
dc.w $FFFF,$C0C0
dc.w $FFFF,$C0C0
dc.w $FFFF,$FCFC
dc.w $FFFF,$FCFC
dc.w $FFFF,$FCFC
dc.w $FFFF,$FCFC
dc.w $0F0F,$FCFC
dc.w $0F0F,$FCFC
dc.w $0F0F,$FCFC
The data is in exactly the same format as the QL screen. In this case Green Byte, Red Byte, Green Byte, Red Byte. 8 pixels per byte. Look at the values in binary and you'll more or less see the sprite already.Martin_Head wrote:I know it works, But I cannot understand how the data corresponds to the bit patterns that appear on the screen.
Martin,Martin_Head wrote: I have seen that documentation, which seems to make sense for GD2 drivers. But I am looking at standard QL sprites for example this is the code for the MOVE sprite from my QPTR package.
I know it works, But I cannot understand how the data corresponds to the bit patterns that appear on the screen.
Martin Head
Code: Select all
Green Red
7654321076543210
GGGGGGGGRRRRRRRR
Code: Select all
0000010000000100
Code: Select all
$0404
If you use the macro library supplied with QPtr then there is a variable which keeps a running total for the working definition:Martin_Head wrote: 1. How do I determine how much memory I need to reserve for the Window Working Definition...