Welcome, Guest. Please login or register.


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

Offline Povi

  • EP addict
  • *
  • Posts: 1875
  • 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 #120 on: 2019.March.28. 10:58:07 »
Egyébként az az érdekes, hogy a "lila csíkos" képen, ha jól megnézed,  ott van a rendes kép (4 színű grafikus módot használ az a rész), és csak a paletta csúszik el minden pixelsorban erre a lilás-zöldes cuccra.
*** Speicherplatz zu klein

Offline Povi

  • EP addict
  • *
  • Posts: 1875
  • 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 #121 on: 2019.March.28. 13:48:42 »
The other is, it doesn't work on 10MHz, it starts to move erratically and finally hangs. It is strange because EnterMice adapts itself.

Only the mouse movement hangs, or the game itself? If only the mouse, is it possibble to move the cursor with the joy after the hang?
*** Speicherplatz zu klein

Offline gflorez

  • EP addict
  • *
  • Posts: 2667
  • Country: es
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 65.0 Firefox 65.0
    • View Profile
Re: EnterMice (egér és joy illesztő)
« Reply #122 on: 2019.March.28. 15:15:51 »
Sorry, I still had no time to test your newest version.

With the former version, once the EP put the on 10MHz, first the pointer moves erratically, then the whole computer hangs(painting vertical stripes, not so important, a regular hang...).

Probably you can emulate the error on the emulator.

If you want I can make you a video, but now I have little time.

Offline Povi

  • EP addict
  • *
  • Posts: 1875
  • Country: hu
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 52.0 Firefox 52.0
    • View Profile
    • http://povi.fw.hu
Re: EnterMice (egér és joy illesztő)
« Reply #123 on: 2019.March.28. 15:27:58 »
Sorry, I still had no time to test your newest version.

With the former version, once the EP put the on 10MHz, first the pointer moves erratically, then the whole computer hangs(painting vertical stripes, not so important, a regular hang...).

Probably you can emulate the error on the emulator.

If you want I can make you a video, but now I have little time.
I don't need video
What emulator settings needed for the proper 10MHz emulation? CPU, video, sound freq? Is the original (without mouse support) game also hangs at 10MHz?
*** Speicherplatz zu klein

Offline Povi

  • EP addict
  • *
  • Posts: 1875
  • Country: hu
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 52.0 Firefox 52.0
    • View Profile
    • http://povi.fw.hu
Re: EnterMice (egér és joy illesztő)
« Reply #124 on: 2019.March.28. 19:23:48 »
Lemmings, első próbálkozás.
A lemmingek cselekedete még nem választható egérrel, helyette 0..9 billentyű.
Még nem EXOS kompatibilis.
Igazi gépen még nem teszteltem.

Lemmings, first try.
The action of the lemmings is still not yet selectable by mouse, you should use 0..9 keys.
Not yet EXOS compatible.
I did not tested it on real HW.
*** Speicherplatz zu klein

Offline gflorez

  • EP addict
  • *
  • Posts: 2667
  • Country: es
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 65.0 Firefox 65.0
    • View Profile
Re: EnterMice (egér és joy illesztő)
« Reply #125 on: 2019.March.28. 19:28:53 »
Now I have tested the three versions, the original without mouse, the one with mouse, and the one with mouse and fixed LPT. Let´s name them 0, 1 and 2.

On the 0 version I can switch between 4 and 10MHz and the game remains the same, the movement of the pointer is perfect on both frequencies. The only noticeable change is the pitch of the samples.

Both versions 1 and 2 behaviour the same, perfect movement on all controllers at 4MHz, but if I switch to 10MHz, the pointer jumps outside the grid and freezes on all controllers. Only if I don't touch the mouse, I can return to 4MHz and play normal. If I move the mouse the Enterprise hangs. But it only needs a warm reset to return to Basic.

Sorry, I don't remember the emulator settings for a 10MHz machine.

Offline Povi

  • EP addict
  • *
  • Posts: 1875
  • Country: hu
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 52.0 Firefox 52.0
    • View Profile
    • http://povi.fw.hu
Re: EnterMice (egér és joy illesztő)
« Reply #126 on: 2019.March.28. 19:40:17 »
Both versions 1 and 2 behaviour the same, perfect movement on all controllers at 4MHz, but if I switch to 10MHz, the pointer jumps outside the grid and freezes on all controllers. Only if I don't touch the mouse, I can return to 4MHz and play normal. If I move the mouse the Enterprise hangs. But it only needs a warm reset to return to Basic.


Could you test this program at 10MHz (and also in 4MHz)?
This for test, just writes the relative movement value to status line (so, move the mouse :-) )
*** Speicherplatz zu klein

Offline gflorez

  • EP addict
  • *
  • Posts: 2667
  • Country: es
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 65.0 Firefox 65.0
    • View Profile
Re: EnterMice (egér és joy illesztő)
« Reply #127 on: 2019.March.28. 19:42:29 »
About Lemmings.  An awful ZX conversion.... not your fault...

The pointer moves correct on 4MHz, but it is slow and not pixel perfect. Probably also not your fault....

On 10MHz the mouse jumps to the right border, but it doesn't freeze. I can return to 4MHz and continue the game.

Offline Judge

  • EP fan
  • *
  • Posts: 226
  • Country: hu
  • OS:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 73.0.3683.86 Chrome 73.0.3683.86
    • View Profile
Re: EnterMice (egér és joy illesztő)
« Reply #128 on: 2019.March.28. 19:45:54 »
Az ep128.hu változatban ugyanaz az LPT, mint az első egeresítettben, így nem igazán érthető, miért csak az utóbbi lesz csíkos. Esetleg NICK hiba is lehet.

Lehet, de csak ennél a programnál? Más programoknál, játokoknál nemigen tapasztaltam ilyet.
Ha a két változatnál ugyanaz az LPT, akkor vajon mi válthatja ki a torzulást az egeresített változatban? :smt017
Üdv.Judge

Offline Povi

  • EP addict
  • *
  • Posts: 1875
  • Country: hu
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 52.0 Firefox 52.0
    • View Profile
    • http://povi.fw.hu
Re: EnterMice (egér és joy illesztő)
« Reply #129 on: 2019.March.28. 19:46:11 »
About Lemmings.  An awful ZX conversion.... not your fault...

haha! :-) Yes, I know, it is terribly ugly :-) With 4 colour mode would be much better :-) But the soundtrack is nice.

The pointer moves correct on 4MHz, but it is slow and not pixel perfect. Probably also not your fault....

About the speed: easy to increase, with doubleing the relative movement.
With keyboard control it starts with 1 pixel movement, but if you hold down the pressed key, it will move the cursor by 8 pixel.
What do you mean about "not pixel perfect"?

*** Speicherplatz zu klein

Offline Povi

  • EP addict
  • *
  • Posts: 1875
  • Country: hu
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 52.0 Firefox 52.0
    • View Profile
    • http://povi.fw.hu
Re: EnterMice (egér és joy illesztő)
« Reply #130 on: 2019.March.28. 19:47:36 »
Lehet, de csak ennél a programnál? Más programoknál, játokoknál nemigen tapasztaltam ilyet.
Ha a két változatnál ugyanaz az LPT, akkor vajon mi válthatja ki a torzulást az egeresített változatban? :smt017
jó kérdés, gyanús a gflorez féle 10MHz-es fagyás is.
Van egy sejtésem, majd kipróbálom.
Viszont feléd kérdés: ha nincs bedugva az EnterMice hw a gépbe, úgy mit csinál az egeres verzió nálad?
*** Speicherplatz zu klein

Offline gflorez

  • EP addict
  • *
  • Posts: 2667
  • Country: es
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 65.0 Firefox 65.0
    • View Profile
Re: EnterMice (egér és joy illesztő)
« Reply #131 on: 2019.March.28. 19:53:43 »
I have tested your mouse2.com program.

On 4MHZ I move the mouse and the numbers change, if I stop the mouse the two numbers return to idle, 00 00. But on 10MHZ idle is 80 00, so the displacement is badly read and the pointer goes to Right.

Offline gflorez

  • EP addict
  • *
  • Posts: 2667
  • Country: es
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 65.0 Firefox 65.0
    • View Profile
Re: EnterMice (egér és joy illesztő)
« Reply #132 on: 2019.March.28. 20:02:08 »
Viszont feléd kérdés: ha nincs bedugva az EnterMice hw a gépbe, úgy mit csinál az egeres verzió nálad?

-----------

But you have a question: if you don't have EnterMice hw plugged in, what does the mouse version do for you?


It doesn't move with the internal joystick if there is no EnterMice, sorry.

But I have written a lot about why this happens and how to avoid it, I will search for it.

Offline Povi

  • EP addict
  • *
  • Posts: 1875
  • Country: hu
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 52.0 Firefox 52.0
    • View Profile
    • http://povi.fw.hu
Re: EnterMice (egér és joy illesztő)
« Reply #133 on: 2019.March.28. 20:08:10 »
I have tested your mouse2.com program.

On 4MHZ I move the mouse and the numbers change, if I stop the mouse the two numbers return to idle, 00 00. But on 10MHZ idle is 80 00, so the displacement is badly read and the pointer goes to Right.

What about this (mouse3.com)?

This uses Bruce Tanner's routine, the mouse2.com uses IstvanV's routine

Source codes are also attached.
*** Speicherplatz zu klein

Offline IstvanV

  • EP addict
  • *
  • Posts: 4806
  • OS:
  • Linux Linux
  • Browser:
  • Firefox 58.0 Firefox 58.0
    • View Profile
Re: EnterMice (egér és joy illesztő)
« Reply #134 on: 2019.March.28. 23:58:21 »
Perhaps it just needs a longer wait at 10 MHz, so the LD B, 17 before M_WAIT_LOOP has to be increased? In theory, it waits 25.6 us between the B7h and the first B6h port access on a 10 MHz machine with no wait states, which is just above the minimum of 25 us from the documentation, but maybe in practice it is not enough.

What emulator settings needed for the proper 10MHz emulation? CPU, video, sound freq?

CPU frequency is 10000000, video is always 889846, sound should be 1250000. The latter requires ep128emu 2.0.11.2. However, the mouse emulation currently does not implement the timing of EnterMice, so it works regardless of the clock frequency or amount of wait between port accesses.

By the way, I have another mouse input routine that I added to Bricky Prise, this one is optimized for speed, rather than code size, and it automatically adjusts the amount of waiting depending on the Z80 clock frequency.