Well, I've got a mountain of summer work that I should have done weeks ago...but this sounds like so much more fun Very Happy Ok sure, I'll try to make one at some point (give me a couple days). What exactly do you want with it? Here's what I'm thinking:

1. NxN pixel grid in the center (How big is the mouse)
2. Blinking pixel = current pixel that you are editting
3. 2nd acts as a pixelChg
4. Saves to appvar? (I'll leave where it is stored to you, but I'll make it export to some area of safe ram)

Now my questions to you:

1. What areas of safe ram are available to me
2. How big is the mouse
3. How should it be stored
just a question born out of stupidity... your current program makes the cursor, and is asm... why not incorporate that directly into DCS??
That one takes an image from the graphscreen and creates a cursor out of it. We want to avoid that, and have an editor within DCS. The hard part isn't really the converting of an already created cursor, but rather the editor itself. Well, that isn't that hard either, but you get my point.
Ok, I think I get it. Smile

It will be neat to see this using the "windows". Smile
Exactly. Chipmaster, you can have whatever you want in AppBackupScreen for now. The mouse is a masked sprite: you need an 8x8 icon and an 8x8 mask, where black areas of the mask are transparent and white areas are opaque. The mask is applied first, then the icon. Just make it an 8px wide by 16px tall area, since the mask just goes 8 bytes after the icon.
Oh, I forgot it was masked. This gives me some ideas for the editor.

Black Pixel = Opaque Black pixel
Grey Pixel = Opaque White pixel (That's right, greyscale. w00t)
White = Transparent White pixel

You can't have a transparent black pixel in a masked sprite, right...
That's correct. So yeah, you really only have 3 pixel states. Oh, and since you only need grayscale in an 8x8 (or 16x16, or 32x32) area, I bet you won't have to use all of that saferam, right? Smile I think I might need some of it for Cn2.
You could always use the DSC mouse instead of a blinking dot.

By the way, how does DCS know what the mouse is clicking on? Does it go by the top-right corner of the mouse? If it does, you need to make sure that the editor forces you to have top-right pxl opaque black.
I'm sure that whatever I use in appbackupscreen can be reused when you are running cn2, unless you are going to be running both at the same time. In which case I will try to be as minimalistic as possible.

2 more questions come to mind. Can I use Mirage or ion libs? Do I need to do anything special for you to be able to put this in a window?

foamy3 wrote:
By the way, how does DCS know what the mouse is clicking on? Does it go by the top-right corner of the mouse? If it does, you need to make sure that the editor forces you to have top-right pxl opaque black.
You mean top left Wink

Edit: Where will the mouse cursor be permanently residing? I know I can do any self-modifying code, so will it be in the appvar or in saferam?
Nope, nothing special. I can just wrap it in a window for ya. And of course minimal is better, but worry about features first, size second, and speed third for this kind of application. You can use any MOS or Ion lib. Hmm, I should really hook you up with a dev package of DCS, shouldn't I, so you can test this? Unless you want to just test it as a standalone MOS program and then I can integrate it into DCS for you.
I think I'll just do a stand alone program for now because I wouldn't know where in Doors (read: hell) to put it. I'll leave incoorporating it to you. How big should it be?

Also, where do you want the saved cursor to go? Saferam or appvar?
I guess 16x16, 24x24, or 32x32 all work for me. Just leave it whereever it is in SafeRAM; I'll use my specially-designed routine to pull it into the appvar. I also need to write myself some documentation about what part ofthe appvar does what...
I meant how big should the program be, in terms of filesize. I don't want to make it too big.
Go nuts. Do you think you can get it under about 700 or 800 bytes? That would be preferable.
Alright, I'll shoot for under that. Shouldn't really be a problem. I'll get started later today.
Hotness. Thanks so much for all your help with my projects, this and SC2. Smile
I made excellent progress today. I'm almost done (took only 30min so far). So far it's 400 bytes (exactly funny enough). I've been using ion's isprite, but I just realized that I'm going to need a masked sprite routine. Do you have one in Doors? If so, could you post a copy of it (for developement purposes), and tell me what the inputs are? Hopefully you'll post sooner rather than later as I can't advance any further without this.
tifreak8x wrote:
well, what kind of mouse options could you want? Confused Speed was already discussed, and it has something to do with the way things are built, if he slowed the mouse down, everything else would slow down...

Well maby he could add support w/o SE's to use TICI mice. That would be cool. Smile
Ok, I found a masked sprite routine I'm using. I expect that you will want to replace it with yours when you integrate it.

I'm using sigma's masked sprite routine. Sorry sigma, but GOD DAMNIT bug fix your tutorials before you post them. This is the second sprite routine I got from asmin28days, and the second I had to fix. This one had 3, that's right, 3 bugs with it. One of them was laughable:

Code:
ld 8

So I had to figure out what was getting 8 loaded into. Along with 2 other fixes. Took me an hour just to bug fix his code. Turns out I should have just made my own from scratch. Well, at least it's back on track and only 490 bytes, that includes the masked sprite routine you'll probably get rid of.

Edit: Actually, that routine is not working either actually. Can you please post your *working* masked sprite routine as I previously requested.

Code:
; Ion Extended Routines by Joe Wingbermuehle and Kerm Martian

;Inputs: Exactly the same as iPutSprite, but with 16 bytes at ix.

iPutSpriteMask:
   ld   e,l
   ld   h,$00
   ld   d,h
   add   hl,de
   add   hl,de
   add   hl,hl
   add   hl,hl
   ld   e,a
   and   $07
   ld   c,a
   srl   e
   srl   e
   srl   e
   add   hl,de
   ld   de,gbuf
   add   hl,de
iPutSpriteLoop1Mask:
   ld   d,(ix)
   ld   e,$FF
   ld   a,c
   or   a
   jr   z,iPutSpriteSkip1Mask
iPutSpriteLoop2Mask:
   srl   d
   rr   e
   set 7,d
   dec   a
   jr   nz,iPutSpriteLoop2Mask
iPutSpriteSkip1Mask:
   ld   a,(hl)
   and   d
   ld   (hl),a
   inc   hl
   ld   a,(hl)
   and   e
   ld   (hl),a
   push ix
   dec hl
   ld de,8
   add ix,de
iPutSpriteLoop1AND:
   ld   d,(ix)
   ld   e,$00
   ld   a,c
   or   a
   jr   z,iPutSpriteSkip1AND
iPutSpriteLoop2AND:
   srl   d
   rr   e
   dec   a
   jr   nz,iPutSpriteLoop2AND
iPutSpriteSkip1AND:
   ld   a,(hl)
   xor   d
   ld   (hl),a
   inc   hl
   ld   a,(hl)
   xor   e
   ld   (hl),a

   pop ix
   ld   de,$0B
   add   hl,de
   inc   ix
   djnz   iPutSpriteLoop1Mask
   ret
   


Once you finalize it, just use imPutSpriteMask.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
» Goto page Previous  1, 2, 3, 4, 5, 6  Next
» View previous topic :: View next topic  
Page 3 of 6
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement