{"action":"created","issue":{"url":"https://api.github.com/repos/stsp/dosemu2/issues/717","repository_url":"https://api.github.com/repos/stsp/dosemu2","labels_url":"https://api.github.com/repos/stsp/dosemu2/issues/717/labels{/name}","comments_url":"https://api.github.com/repos/stsp/dosemu2/issues/717/comments","events_url":"https://api.github.com/repos/stsp/dosemu2/issues/717/events","html_url":"https://github.com/stsp/dosemu2/issues/717","id":383986411,"node_id":"MDU6SXNzdWUzODM5ODY0MTE=","number":717,"title":"Bootable lDebug skips some \"press any key\" prompts during boot","user":{"login":"ecm-pushbx","id":31538682,"node_id":"MDQ6VXNlcjMxNTM4Njgy","avatar_url":"https://avatars3.githubusercontent.com/u/31538682?v=4","gravatar_id":"","url":"https://api.github.com/users/ecm-pushbx","html_url":"https://github.com/ecm-pushbx","followers_url":"https://api.github.com/users/ecm-pushbx/followers","following_url":"https://api.github.com/users/ecm-pushbx/following{/other_user}","gists_url":"https://api.github.com/users/ecm-pushbx/gists{/gist_id}","starred_url":"https://api.github.com/users/ecm-pushbx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecm-pushbx/subscriptions","organizations_url":"https://api.github.com/users/ecm-pushbx/orgs","repos_url":"https://api.github.com/users/ecm-pushbx/repos","events_url":"https://api.github.com/users/ecm-pushbx/events{/privacy}","received_events_url":"https://api.github.com/users/ecm-pushbx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-24T12:40:20Z","updated_at":"2018-11-24T14:38:53Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"**Describe the bug**\r\nWhen loading the bootable lDebug assembled with -D_DEBUG4 (enables some d4message and d4pauseforkey calls), several keypresses seem to arrive that were not made by the user.\r\n\r\n**To Reproduce**\r\n\r\nBuild lDebug:\r\n\r\n```\r\n~/coding/proj/lDebug/build/source$ use_build_revision_id=1 ./make -D_BOOTLDR -D_DEBUG2 -D_DEBUG4 && use_build_revision_id=1 ./maked -D_BOOTLDR -D_DEBUG2\r\nCreating debug.com\r\ninit.asm:219: warning: (writepatchtable:51) patch_no386_table: 74 bytes [-w+user]\r\ninit.asm:219: warning: (writepatchtable:52) (Method 2, 13 one-byte patches) [-w+user]\r\ninit.asm:223: warning: (writepatchtable:62) patch_386_table: 28 bytes [-w+user]\r\ninit.asm:223: warning: (writepatchtable:63) (Method 1) [-w+user]\r\nCreating debugx.com\r\ninit.asm:219: warning: (writepatchtable:51) patch_no386_table: 532 bytes [-w+user]\r\ninit.asm:219: warning: (writepatchtable:52) (Method 2, 178 one-byte patches) [-w+user]\r\ninit.asm:223: warning: (writepatchtable:62) patch_386_table: 42 bytes [-w+user]\r\ninit.asm:223: warning: (writepatchtable:63) (Method 1) [-w+user]\r\nCreating ddebug.com\r\ninit.asm:219: warning: (writepatchtable:51) patch_no386_table: 74 bytes [-w+user]\r\ninit.asm:219: warning: (writepatchtable:52) (Method 2, 13 one-byte patches) [-w+user]\r\ninit.asm:223: warning: (writepatchtable:62) patch_386_table: 28 bytes [-w+user]\r\ninit.asm:223: warning: (writepatchtable:63) (Method 1) [-w+user]\r\nCreating ddebugx.com\r\nrun.asm:1838: fatal: Cannot build DDEBUGX: handler switching needs to be fixed\r\n~/coding/proj/lDebug/build/source$\r\n``` \r\n\r\nBuild a bootable kernel with lDebug as payload, both compressed and uncompressed:\r\n\r\n```\r\n~/coding/proj/lDebug$ (cd iniblz/ && blzpack -v9 ../build/bin/debug.com lDOSLOAD.BLZ && ./mak.sh -I../lmacros/ -D_IMAGE_EXE -D_EXEC_OFFSET=32) && (cd ldosboot/ && nasm -D_MAP=iniload.map -l iniload.lst -I../lmacros/ -o LDEBUGPK.COM -D_PAYLOAD_FILE=\"'../iniblz/iniblz.bin'\" -D_IMAGE_EXE_MIN_CALC=\"((($(stat -c %s ../build/bin/debug.com) + _IMAGE_EXE_AUTO_STACK) + 15) & ~15)\" -D_IMAGE_EXE_AUTO_STACK=2048 -D_IMAGE_EXE=1 -D_EXEC_OFFSET=32 iniload.asm)\r\nin 55093 out 43580 ratio 79% time 0.00\r\niniblz.asm:1378: warning: iniblz: 1888 bytes used for depacker [-w+user]\r\niniload.asm:640: warning: 29 bytes in front of ms7_entry [-w+user]\r\niniload.asm:1002: warning: 21 bytes in front of ldos_entry [-w+user]\r\niniload.asm:1340: warning: 4 bytes in front of end [-w+user]\r\niniload.asm:1506: warning: 322 bytes in front of end2 [-w+user]\r\n~/coding/proj/lDebug$ (cd ldosboot/ && nasm -D_MAP=iniload.map -l iniload.lst -I../lmacros/ -o LDEBUG.COM -D_PAYLOAD_FILE=\"'../build/bin/debug.com'\" -D_IMAGE_EXE=1 -D_EXEC_OFFSET=32 iniload.asm)\r\niniload.asm:640: warning: 29 bytes in front of ms7_entry [-w+user]\r\niniload.asm:1002: warning: 21 bytes in front of ldos_entry [-w+user]\r\niniload.asm:1340: warning: 4 bytes in front of end [-w+user]\r\niniload.asm:1506: warning: 322 bytes in front of end2 [-w+user]\r\n~/coding/proj/lDebug$ \r\n```\r\n\r\nLink the bootable lDebug kernel as KERNEL.SYS to boot it when starting dosemu2: (Can use either the compressed or the uncompressed one.)\r\n\r\n```\r\n~/.dosemu/drives/c$ ln -sf ~/coding/proj/lDebug/ldosboot/LDEBUGPK.COM KERNEL.SYS\r\n~/.dosemu/drives/c$ \r\n```\r\n\r\nBooting with either the compressed or the uncompressed bootable lDebug shows:\r\n\r\n```\r\ndosemu2 2.0pre8-20181120-656-g03d08f8ea\r\nConfigured: 2018-11-24 12:10:09 +0100\r\nPlease test against a recent version before reporting bugs and problems.\r\nGet the latest code at http://stsp.github.io/dosemu2\r\nSubmit Bugs via https://github.com/stsp/dosemu2/issues\r\nAsk for help in mail list: linux-msdos@vger.kernel.org\r\n \r\nIn boot loader; press any key\r\n \r\nLoader got i0data; press any key\r\nLoader past RPL detection; press any key\r\nAt .reloc_high\r\nAt .reloc_high past 1st movp\r\n \r\nes=0040 ds=00D0 ss=00D0 cs=00D0 sp=D82A bp=0820 di=9000\r\nsi=9000 dx=9101 cx=0CE9 bx=0E54 ax=00D0 fl=3A96 ip=D08A\r\nAt .reloc_high past 2nd movp\r\nAt .reloc_high discarded\r\nAt .reloc_high past set ds\r\nAt .reloc_high past set es\r\nAt .reloc_high past set ss\r\nAt .reloc_high new stack\r\nImage positioned at final location\r\nAlignment initialised to zero; press any key\r\n```\r\n\r\nNote that I didn't press any keys for the \"In boot loader\", \"Loader got i0data\", \"Loader past RPL detection\" key press prompts.\r\n\r\nBuilding lDebug without _DEBUG4 results in the following display upon booting the compressed or uncompressed bootable lDebug:\r\n\r\n```\r\ndosemu2 2.0pre8-20181120-656-g03d08f8ea\r\nConfigured: 2018-11-24 12:10:09 +0100\r\nPlease test against a recent version before reporting bugs and problems.\r\nGet the latest code at http://stsp.github.io/dosemu2\r\nSubmit Bugs via https://github.com/stsp/dosemu2/issues\r\nAsk for help in mail list: linux-msdos@vger.kernel.org\r\n \r\n \r\n-\r\n```\r\n\r\nie, no keypress appears to be received.\r\n\r\n(Initially it seemed like the compressed and uncompressed builds would receive a differing amount of keypresses but that behaviour vanished during testing.)\r\n\r\n**Expected behavior**\r\nWhen booting lDebug build with _DEBUG4, the debugger should wait for a keypress after \"In boot loader; press any key\".\r\n\r\nThis is where d4getc and d4pauseforkey are defined: https://bitbucket.org/ecm/ldebug/src/2d215f89da6c1652b4b3cbd47075ce5cac5535e2/source/deb.asm?at=default&fileviewer=file-view-default#deb.asm-395\r\n\r\nThis is where d4pauseforkey is first used while booting: https://bitbucket.org/ecm/ldebug/src/2d215f89da6c1652b4b3cbd47075ce5cac5535e2/source/init.asm?at=default&fileviewer=file-view-default#init.asm-449\r\n\r\n\r\n**Attach the log**\r\n[boot.log](https://github.com/stsp/dosemu2/files/2612245/boot.log)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/stsp/dosemu2/issues/comments/441372471","html_url":"https://github.com/stsp/dosemu2/issues/717#issuecomment-441372471","issue_url":"https://api.github.com/repos/stsp/dosemu2/issues/717","id":441372471,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MTM3MjQ3MQ==","user":{"login":"stsp","id":3295627,"node_id":"MDQ6VXNlcjMyOTU2Mjc=","avatar_url":"https://avatars1.githubusercontent.com/u/3295627?v=4","gravatar_id":"","url":"https://api.github.com/users/stsp","html_url":"https://github.com/stsp","followers_url":"https://api.github.com/users/stsp/followers","following_url":"https://api.github.com/users/stsp/following{/other_user}","gists_url":"https://api.github.com/users/stsp/gists{/gist_id}","starred_url":"https://api.github.com/users/stsp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stsp/subscriptions","organizations_url":"https://api.github.com/users/stsp/orgs","repos_url":"https://api.github.com/users/stsp/repos","events_url":"https://api.github.com/users/stsp/events{/privacy}","received_events_url":"https://api.github.com/users/stsp/received_events","type":"User","site_admin":false},"created_at":"2018-11-24T14:38:53Z","updated_at":"2018-11-24T14:38:53Z","author_association":"OWNER","body":"I extended the bug-reporting template a bit, as\r\nI didn't know people are going to follow it literally. :)\r\nNow it says that you need to enable the logging\r\nflags (in case of a keyboard, something like `-D9+#k`),\r\nand attach the binary files."}}
{"actor":{"display_login":"stsp"}}