ENTERPRISE KLUB
2019. január 26., 1055 Budapest, Nyugati tér 9. 14-19 óráig
Nyugati terem - Részletek
Welcome, Guest. Please login or register.


Author Topic: EnterMice (egér és joy illesztő) (Read 7434 times)

Offline Povi

  • EP addict
  • *
  • Posts: 1734
  • Country: hu
  • OS:
  • Linux Linux
  • Browser:
  • Chrome 70.0.3538.77 Chrome 70.0.3538.77
    • View Profile
    • http://povi.fw.hu
Re: EnterMice (egér és joy illesztő)
« Reply #60 on: 2019.January.13. 10:47:14 »
Hi,
no problem, nobody blames you about of the cursor positioning problem :-)
I guessed the error casue similar as you wrote. It seems, some internal variables are not updated, when exos variable for positioning is set.
Currently I am working other part of the game, later I'll try to fix the issue, thanks for the source code. In my opinion, "hacking" is not desirable, it should be works with EXOS coordinates, in any graphics mode.
*** Speicherplatz zu klein

Online gflorez

  • EP addict
  • *
  • Posts: 2425
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 52.0 Firefox 52.0
    • View Profile
Re: EnterMice (egér és joy illesztő)
« Reply #61 on: 2019.January.13. 22:36:11 »
Think that the mouse driver itself is a hack that writes directly on the memory of the video page whose channel is associated to the mouse channel.

I have already fixed the update of all the mouse driver coordinates when written, on my last driver fix, you can see it at loc_C073 on :

Before:
Code: [Select]
loc_C073: ; write  
ld a, d
ld (hl), a

loc_C075: ;
ld c, 0
ld d, a
xor a
ret

Fixed:
Code: [Select]
loc_C073: ; write  
push hl
push de
call sub_C4F0; erase mouse pointer
pop de
pop hl

ld a, d
ld (hl), a               ; here the variable is written

ld bc, (X_LOW) ; EXOS Variable 184 & 185  ;Here the value is made effective
ld (X1), bc
ld bc, (Y_LOW) ; EXOS Variable 186 & 187
ld (Y1), bc
push af
call sub_C40B; draw mouse pointer
                pop af

loc_C075: ;
ld c, 0
ld d, a
xor a
ret

But probably I have introduced the double pointer error.
« Last Edit: 2019.January.13. 23:05:52 by gflorez »