{"action":"created","issue":{"url":"https://api.github.com/repos/stsp/dosemu2/issues/301","repository_url":"https://api.github.com/repos/stsp/dosemu2","labels_url":"https://api.github.com/repos/stsp/dosemu2/issues/301/labels{/name}","comments_url":"https://api.github.com/repos/stsp/dosemu2/issues/301/comments","events_url":"https://api.github.com/repos/stsp/dosemu2/issues/301/events","html_url":"https://github.com/stsp/dosemu2/issues/301","id":207435326,"number":301,"title":"Graphic artefacts in PC/GEOS with a lot of VESA modes (mouse not erased completely)","user":{"login":"bolle732","id":8956508,"avatar_url":"https://avatars.githubusercontent.com/u/8956508?v=3","gravatar_id":"","url":"https://api.github.com/users/bolle732","html_url":"https://github.com/bolle732","followers_url":"https://api.github.com/users/bolle732/followers","following_url":"https://api.github.com/users/bolle732/following{/other_user}","gists_url":"https://api.github.com/users/bolle732/gists{/gist_id}","starred_url":"https://api.github.com/users/bolle732/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bolle732/subscriptions","organizations_url":"https://api.github.com/users/bolle732/orgs","repos_url":"https://api.github.com/users/bolle732/repos","events_url":"https://api.github.com/users/bolle732/events{/privacy}","received_events_url":"https://api.github.com/users/bolle732/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2017-02-14T07:07:25Z","updated_at":"2017-02-16T09:19:56Z","closed_at":null,"body":"I'll rise an 'old' problem of PC/GEOS under DOSEmu which happens in most of the VESA modes. This problem exist since the 1.x days of DOSEmu. Under DOSBox or on real hardware, the problem does not occur.\r\n\r\nIf I move the mouse from top to bottom, the mouse cursor is not erased correctly all the time. It leaves the top most line of the cursor on the screen as an artefact. When I move up the mouse and pass by this artefacts, they get removed.\r\n\r\n![mouse-glitches](https://cloud.githubusercontent.com/assets/8956508/22916989/6c7ece66-f282-11e6-8005-fab4a61a7e34.png)\r\n\r\nFurther interesting, the problem only seems to exist on the right side of the screen and not on the whole.\r\n\r\nThere is no clear indication of a systematic problem depending on resolution or colour depth. For example (x, y, bpp):\r\n```\r\nGOOD: 640x480x8, 800x600x8, 1024x768x16\r\nBAD : 640x480x[15|16|24], 800x600x[15|16|24], 1024x768x[8|15|24]\r\n```\r\nI've checked the mouse code with the help of putting debug statements into it. I ended up in `gcursor.c`, function `erase_graphics_cursor`. But surprise, this code get never executed. A quick research told me, that in VBE, no standard for a hardware cursor exist. Therefore, I believe that the program is drawing the mouse cursor itself.\r\n\r\nThen I tried to check the VGAEMU / VBE code. But there, I got a little lost. From the debug log, I see that we should be in 'bank' mode and not in 'lfb' mode.\r\n```\r\nVGAEmu: vga_emu_fault: write access to bank region, address 0xa0000, page 0xa0, vga page 0x0\r\nVGAEmu: vga_emu_fault: cs:eip = 41d8:14fa, instr: f3 ab 2b fa 2b fa 4d 74 14 03 fe 72 08 2e 39 3e\r\n```\r\n\r\nInitialization has been this:\r\n```\r\nINT10: near fc00:00000113\r\nINT10: AH=4f AL=00\r\nVBE: [0x00] vbe_info: es:di = 0x45c9:0x0000\r\nVBE: [0x00] vbe_info: return value 0\r\nINT10: near fc00:00000113\r\nINT10: AH=4f AL=01\r\nVBE: [0x01] vbe_mode_info: cx = 0x0112, es:di = 0x45c9:0x0000\r\nVBE: [0x01] vbe_mode_info: return value 0\r\nINT10: near fc00:00000113\r\nINT10: AH=4f AL=02\r\nVBE: [0x02] vbe_set_mode: bx = 0x0112\r\nINT10: set_video_mode: mode 0x112\r\nVGAEmu: vga_emu_setmode: requested mode: 0x112 (80 x 30)\r\nVGAEmu: vga_emu_setmode: mode found in first run\r\nVGAEmu: vga_emu_setmode: mode 0x112, (640 x 480 x 24, 80 x 30, 8 x 16, 64k at 0xa000)\r\nVGAEmu: vga_emu_setmode: scan_len = 1920\r\nVGAEmu: vga_emu_setmode: setting up components...\r\nVGAEmu: DAC_init done\r\nVGAEmu: Attr_init done\r\nVGAEmu: Seq: Setting font offsets to 0x0000/0x0000 (0x00)\r\nVGAEmu: Seq: Seq_init done\r\nVGAEmu: CRTC_init done\r\nVGAEmu: GFX_init done\r\nVGAEmu: Misc_init done\r\nVGAEmu: Herc_init done\r\nVGAEmu: vgaemu_adj_cfg: seq.addr_mode = chain4 (dword)\r\nVGAEmu: vgaemu_adj_cfg: horizontal_total = 100\r\nVGAEmu: vgaemu_adj_cfg: horizontal_retrace_start = 84\r\nVGAEmu: vgaemu_adj_cfg: horizontal_retrace_end = 0\r\nVGAEmu: vgaemu_adj_cfg: horizontal_blanking_start = 80\r\nVGAEmu: vgaemu_adj_cfg: horizontal_blanking_end = 2\r\nVGAEmu: vgaemu_adj_cfg: horizontal_display_end = 80\r\nVGAEmu: vgaemu_adj_cfg: multiplier = 8\r\nVGAEmu: vgaemu_adj_cfg: width = 640\r\nVGAEmu: vgaemu_adj_cfg: vertical_total = 523\r\nVGAEmu: vgaemu_adj_cfg: vertical_retrace_start = 490\r\nVGAEmu: vgaemu_adj_cfg: vertical_retrace_end = 12\r\nVGAEmu: vgaemu_adj_cfg: vertical_blanking_start = 479\r\nVGAEmu: vgaemu_adj_cfg: vertical_blanking_end = 4\r\nVGAEmu: vgaemu_adj_cfg: vertical_display_end = 479\r\nVGAEmu: vgaemu_adj_cfg: vertical_multiplier = 1\r\nVGAEmu: vgaemu_adj_cfg: height = 480\r\nVGAEmu: vgaemu_adj_cfg: line_compare = 1023\r\nVGAEmu: vga_emu_setmode: mode initialized\r\nINT10: mapped cursor: start 14, end 15\r\nscanlines=d1f9 480\r\nVBE: [0x02] vbe_set_mode: return value 0\r\nmodify_mode: geometry changed to 640 x 480, scan_len = 1920 bytes\r\nvgaemu: set page 0 dirty\r\nvgaemu: set page 1 dirty\r\nvgaemu: set page 2 dirty\r\nvgaemu: set page 3 dirty\r\nvgaemu: set page 4 dirty\r\nvgaemu: set page 5 dirty\r\nVBE: [0x01] vbe_mode_info: return value 0\r\n```\r\nWhat I've seen, are a lot of `vgaemu: set page <#> dirty`. But I think this shouldn't be a reason for the problem.\r\n\r\nShould I upload the `boot.log` (`-D9+v`) ? Can this be tracked down ?"},"comment":{"url":"https://api.github.com/repos/stsp/dosemu2/issues/comments/280276993","html_url":"https://github.com/stsp/dosemu2/issues/301#issuecomment-280276993","issue_url":"https://api.github.com/repos/stsp/dosemu2/issues/301","id":280276993,"user":{"login":"bolle732","id":8956508,"avatar_url":"https://avatars.githubusercontent.com/u/8956508?v=3","gravatar_id":"","url":"https://api.github.com/users/bolle732","html_url":"https://github.com/bolle732","followers_url":"https://api.github.com/users/bolle732/followers","following_url":"https://api.github.com/users/bolle732/following{/other_user}","gists_url":"https://api.github.com/users/bolle732/gists{/gist_id}","starred_url":"https://api.github.com/users/bolle732/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bolle732/subscriptions","organizations_url":"https://api.github.com/users/bolle732/orgs","repos_url":"https://api.github.com/users/bolle732/repos","events_url":"https://api.github.com/users/bolle732/events{/privacy}","received_events_url":"https://api.github.com/users/bolle732/received_events","type":"User","site_admin":false},"created_at":"2017-02-16T09:19:56Z","updated_at":"2017-02-16T09:19:56Z","body":"Ok, I've made a PR which is needed to be able to debug the VGAEMU updates.\r\n\r\nThe code of the VGAEMU is a little bit complicated. Would be nice to clean up the obsolete part... Worth a week of work :(\r\n\r\nRegarding my problem, I can fix the artefacts with the following change in 'vgaemu.c' / '__vga_emu_update()':\r\n\r\n```\r\n-  veut->update_start = i << 12;\r\n+  veut->update_start = i << 12 - 1;\r\n```\r\n\r\nIn my eyes, this is a quick fix / workaround. Any comments / ideas ?"}}
{"actor":{"display_login":"bolle732"}}