Smile that not much a routine, i just add win_left to the mousex and win_top to the mousey.The mouse was the WORST piece of code i did sadly.Some mistakes...
Quote:
1). tried to make a greyscale mouse and got tearing
2). when at the bottom of the screen, the mouse leaves a trail
3). sometimes it went a little further than the end of the stack and crashed

most of these errors came in after i added the GS which is why i sympathize with you in saying there will never be a grayscale DCS. Number 2 was the only problem before the GS
Yes, DrawCustomRectangle and mos_drawrectangle were from DCS6. But neither were actually DCS routines.The remarks said you borrowed them from other people.Just so you know, in my GUI system, win_type is the type of window (0=null, 1=largewin, 2=smallwin, 3=customwin), win_left win_right win_top and win_bottom are the usable area of the screen, and at the start, BC is the address of the stack currently being rendered
Anakclusmos wrote:
Smile that not much a routine, i just add win_left to the mousex and win_top to the mousey.The mouse was the WORST piece of code i did sadly.Some mistakes...
Quote:
1). tried to make a greyscale mouse and got tearing
2). when at the bottom of the screen, the mouse leaves a trail
3). sometimes it went a little further than the end of the stack and crashed

most of these errors came in after i added the GS which is why i sympathize with you in saying there will never be a grayscale DCS. Number 2 was the only problem before the GS
Yes, DrawCustomRectangle and mos_drawrectangle were from DCS6. But neither were actually DCS routines.The remarks said you borrowed them from other people.Just so you know, in my GUI system, win_type is the type of window (0=null, 1=largewin, 2=smallwin, 3=customwin), win_left win_right win_top and win_bottom are the usable area of the screen, and at the start, BC is the address of the stack currently being rendered


Why argue, this is the most pointless thing to argue with him about, if you can prove that is how those work, not just saying they do, making a code, and showing it working, and letting others use the exact code and check it themselves, then you have grounds to argue.
Sonlen, the input are the same as Kerms GUI routines if im not mistaken.He could put them in his guilibs, test them in DoorsCS, and tell you himself
Anakclusmos wrote:
Sonlen, the input are the same as Kerms GUI routines if im not mistaken.He could put them in his guilibs, test them in DoorsCS, and tell you himself


Good slip up, you said earlier they weren't the DCS codes, but now you say they are, congrats.
Mad gah you ass! I done said before that EchoOS libs include not only the DCS ones but an extended set for objects like Custom Sized windows and Combo boxes Heres an exact copy past to show you that my code in comparison to Kerms...

Here's my window rendering routines for Null, LargeWin, SmallWin, and CustomWin...

Code:
GUIRNull:
   xor a
   ld (winType),a
   ld (winTop),a
   ld (winLeft),a
   ld a,95
   ld (winRight),a
   ld a,63
   ld (winBottom),a
   ret

GUIRLargeWin:
   ld a,1
   ld (winType),a
   ld hl,0
   ld d,95
   ld e,63
   jr DrawWindow

GUIRSmallWin:
   ld a,2
   ld (winType),a
   ld a,(bc)
   ld h,a
   inc bc
   ld a,(bc)
   ld l,a
   inc bc
   ld a,79
   add a,h
   dec a
   cp 96
   ret c
   ld d,a
   ld a,47
   add a,l
   dec a
   cp 64
   ret c
   ld e,a
   jr DrawWindow

GUIRCustomWin:
   ld a,3
   ld (winType),a
   ld a,(bc)
   ld h,a
   inc bc
   ld a,(bc)
   ld l,a
   inc bc
   ld a,(bc)
   add a,h
   dec a
   ld d,a
   inc bc
   ld a,(bc)
   add a,l
   dec a
   ld e,a
   inc bc

DrawWindow:
   ld a,l
   sub -9
   ld (winTop),a
   ld a,h
   inc a
   ld (winLeft),a
   ld a,d
   dec a
   ld (winRight),a
   ld a,e
   dec a
   ld (winBottom),a
   push bc
   push hl
   inc l
   push de
   ld a,0
   call DrawCustomRectangle
   pop de
   pop hl
   push hl
   push de
   inc l
   ld a,1
   call mos_fastrectangle
   pop de
   pop hl
   push hl
   inc h
   ld a,9
   add a,l
   ld e,a
   ld a,$FF
   call DrawCustomRectangle
   pop hl
   pop ix
   inc l
   inc h
   inc h
   push hl
   inc l
   ld a,h
   ld b,5
   call iPutSprite
   pop de
   ld a,6
   add a,d
   ld (pencol),a
   ld a,e
   ld (penrow),a
   push ix
   pop hl
   set textinverse,(iy+textflags)
   call _vPutsApp
   res textinverse,(iy+textflags)
   ret

and here's Kerms which has only Null, LargeWin, and SmallWin...

Code:
GUIRNull:
   call RenderGUISetWinType
   xor a
   call RenderGUISetWinX
   xor a
   call RenderGUISetWinY
   ret
GUIRLargeWin:
   push bc
   call RenderGUISetWinType
   ld a,1
   call RenderGUISetWinX
   ld a,9
   call RenderGUISetWinY
   ld hl,gbuf
   ld (hl),0
   push hl
   push hl
   pop de
   inc de
   ld bc,768-1
   ldir
   ld b,8*12
   pop hl
   ld b,64-8
   push hl
   ld de,8*12
   add hl,de
   ld de,11
GUIRLargeWinLoop1:
   ld (hl),$80
   add hl,de
   ld (hl),$01
   inc hl
   djnz GUIRLargeWinLoop1
   pop hl
   ld b,10
   ld (hl),$7f
   inc hl
GUIRLargeWinLoop2:
   ld (hl),$FF
   inc hl
   djnz GUIRLargeWinLoop2
   ld (hl),$fe
   ld b,12
   ld hl,PlotsScreen+(8*12)
GUIRLargeWinLoop3:
   ld (hl),$FF
   inc hl
   djnz GUIRLargeWinLoop3
   ld b,10
   ld hl,PlotsScreen+(63*12)
   ld (hl),$7f
   inc hl
GUIRLargeWinLoop4:
   ld (hl),$FF
   inc hl
   djnz GUIRLargeWinLoop4
   ld (hl),$fe
   pop ix
   push ix
   ld a,2
   ld b,5
   ld c,1
   ld l,a
   call imPutSprite
   pop hl
   ld de,5
   add hl,de
   ld a,8
   ld (pencol),a
   ld a,1
   ld (penrow),a
   bcall(_vPutsApp)
   ld hl,gbuf+12
   ld b,12*7
GUIRLargeWinInvLoop:
   ld a,(hl)
   cpl
   ld (hl),a
   inc hl
   djnz GUIRLargeWinInvLoop
   ret
GUIRSmallWin:
   push bc
   call RenderGUISetWinType
   pop bc
   ;inc bc
   ld a,(bc)
   push af
   push bc
   inc a
   call RenderGUISetWinX
   pop bc
   inc bc
   ld a,(bc)
   pop hl
   ld l,a
   push bc
   push hl
   add a,9
   call RenderGUISetWinY
   pop hl
   ;now erase the window area
   push hl
   ld a,80d
   add a,h
   ld d,a
   ld a,48
   add a,l
   ld e,a
   ld a,0
   call DrawCustomRectangle
   pop hl
   push hl
   ld b,48
   call VertLine
   pop hl
   ld b,48
   push hl
   ld a,80
   add a,h
   ld h,a
   call VertLine
   pop hl
   push hl
   ld a,l
   add a,9
   ld e,a
   ld a,h
   add a,80
   ld d,a
   ld a,255
   call DrawCustomRectangle
   pop hl
   push hl
   ld a,l
   add a,48
   ld l,a
   ld e,a
   ld a,h
   add a,80
   ld d,a
   ld a,255
   call api_drawline_set
   pop de
   pop hl
   inc hl
   push hl
   push de
   push hl
   pop ix
   ld a,d
   inc a
   inc a
   ld l,e
   inc l
   inc l
   ld b,5
   call imPutSprite
   pop hl
   ld a,h
   add a,8
   ld (pencol),a
   ld a,l
   inc a
   ld (penrow),a
   pop bc
   ld hl,5
   add hl,bc
   bcall(_vPutsApp)
   ret

the only difference is that he uses routines to set the window properties instead of just saving them like i do. I cant help it that I have ADD and have a hard time sticking to a long project.Just because I have a hard time finishing projects doesnt mean I'm a complete idiot at assembly.Some of my accompilishments.
Quote:
Checking for Multiple Keypresses without Direct Input (no ones ever done before)
DCS7 stack routines PushGuiStacks and GUIFindThis
Rotating 8x8 sprites with bitshifting

You learn z80 first then tell me how much of a tard im am
Yours is a bit shorter, but will be a lot slower than mine, unfortunately. I use routines to set window properties because of the GUI stack, not sure how you handle that.
For mine, I use the win_type (0=null, 1=largewin, 2=smallwin, 3=customwin) and win_left win_right win_top and win_bottom are use usable portion of the screen.So you just add the x to win_left and the y to win_top to align the objects into the window.I can also post my GUIRWinButton routine that packs up to 4 buttons (?_[]X yeah, i added a four button)

Heres an example of that sets the offset and draws the winbuttons

Code:
GUIRWinButtons:
   ld a,(winType)
   or a
   ret z
   ld a,(winRight)
   sub 6
   ld h,a
   ld a,(winTop)
   sub 8
   ld l,a
   ld a,(bc)
   ld d,a
   ld e,4
   or a
   ret z
   push hl
   push de
   inc l
   ld b,5
   ld a,h
   ld ix,WinBar
   call iPutSprite
   pop de
   pop hl
   ld ix,WinButtonX
   bit 5,d
   res 5,d
   jr nz,PutBtn
Btn2:
   ld ix,WinButtonMax
   bit 6,d
   res 6,d
   jr nz,PutBtn
Btn3:
   ld ix,WinButtonMin
   bit 7,d
   res 7,d
   jr nz,PutBtn
Btn4:
   ld ix,WinButtonQ
   bit 4,d
   res 4,d
   jr nz,PutBtn
   ret
PutBtn:
   ld b,7
   ld a,h
   push hl
   push de
   call iPutSprite
   pop de
   pop hl
   ld a,h
   sub 6
   ld h,a
   dec e
   ld a,e
   cp 3
   jr z,Btn2
   cp 2
   jr z,Btn3
   cp 1
   jr z,Btn4
   ret
Hmm, that's not bad at all. Your reuse of the iPutSprite call is actually quite innovative. Of course, an even smaller method would be a rotating bitmask, but it wouldn't be that much smaller.
I might end up rewriting the routines for my OS, I'll post screenshots to keep Sonlen's mouth shut and everyone else informed.
Anakclusmos wrote:
I might end up rewriting the routines for my OS, I'll post screenshots to keep Sonlen's mouth shut and everyone else informed.
You should post screenshots to keep my mouth shut too; I'm equally skeptical if a bit quieter about it.
seriously? you think that only you could accomplish such a feat? Razz

Cool you cant deny I have mad skillz
Anakclusmos wrote:
seriously? you think that only you could accomplish such a feat? Razz

Cool you cant deny I have mad skillz
I can until I see proof of your abilities. Razz It's certainly impressive to see routines created, but they're much less useful unless you also have the patience, determination, and organizational skills to put them together into a full system.
I'd love to see some screenshots, too. Smile
Anakclusmos wrote:
Checking for Multiple Keypresses without Direct Input (no ones ever done before)

I'd be interested to see your implementation; surely you have to use direct input somewhere? Here's the key input module from Nostromo, for what it's worth.
Ben, I've seen the code that he's talking about; what he really means is translating direct input results into GetCSC keycodes.
Smile no, actually it converts a GetCSC keycode into both a keygroup and mask and then checks the key, so rather than checking 1 key, you can check multiple ones without even touching direct input.

heres a screenie i made of my os so far...


Notice that my _vputs routine clips the text instead of just not displaying letters?I had originally planned to make it use a a chosen custom font.Heres the routines my OS currently has...
Quote:
-----> OS Routines
Sleep CheckKey WriteFlashByte
WriteFlash PutSpriteHL GetPixel
ClipSprOR ClipSprORHL PutSpriteClip
_vPutA _vPutS _vDispABIN
_vDispHLBIN _vDispAOCT _vDispHLOCT
_vDispAHEX _vDispHLHEX

-----> Ion Routines
iFastCopy iGetPixel iPutSprite
iLargeSprite iDecompress

-----> Mos Routines
FastCopyB FastCopyEntry FastCopyS
PutSprite8 LargeSpriteHL CpHLDE
CpHLBC CompStrs CompStrsn
NextStr DirectIn Version
PointOnC PixelOnHL SetPixel
PointOffC PixelOffHL PixelOff
PointXorC PixelXorHL PixelXor
PixelTestHL PixelTest SetVputs
DelayB MultHL MultHE

i've been mostly focussing on working the bugs out of all my routines.I still need to figure out how to setup my filesystem and recieve programs and apps
Quote:
CpHLDE
CpHLBC



Code:
cphlde:
 ld d,h
 ld e,l
 ret

cphlbc:
 ld b,h
 ld c,l
 ret
Am I missing something here?
I guess they're meant to compare, not load, so


Code:
CpHLDE:
    push hl
    or a
    sbc hl,de
    pop hl
    ret


...unless I've misinterpreted your question, that is.
benryves wrote:
I guess they're meant to compare, not load, so


Code:
CpHLDE:
    push hl
    or a
    sbc hl,de
    pop hl
    ret


...unless I've misinterpreted your question, that is.
Eek, I've been doing far too much Linux coding and far too little z80 ASM in the past two weeks, so "cp" registered as "copy" instead of "compare"; my mistake. >_< I was more trying to point out that I thought some of those routines were a bit trivial to mention, even if they are important for an operating system. Smile
The TI-OS provides _CpHLDE, not that that really should be used as a mark of usefulness. I'd like to find a better signed comparison of HL and DE; my current one seems rather kludgy.


Code:
    ld a,h
    xor $80
    ld h,a

    ld a,d
    xor $80
    ld d,a

    sbc hl,de
Quote:
unfortunately ben, that destroys register A and looks a bit complicated...


sorry, just realized you said "signed"


Code:
CpSignedHLDE:
  push hl
  res 7,h
  bit 7,d
  jr z,cpshldecont
  set 7,h
cpshldecont:
  or a
  sbc hl,de
  pop hl
  ret


unless you meant for the sign changes to be permanent...

Code:
CpSignedHLDE:
  res 7,h
  res 7,d
  push hl
  or a
  sbc hl,de
  pop hl
  ret


Try this, I havent tested it, but I think it could work
  
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
Page 3 of 4
» 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