Hi everybody, almost a year after cutemouse 2.1 beta 3 I can present ctmouse 2.1 beta 4 :-). This is a version with debugging output in the PS2 config stuff.
Compared to beta 3, it adds support for touchpads in Dell Inspiron 1501 (where int 15.c204 PS2 ident fails) and changes the meaning of /O from "disable wheel" to "enable wheel" - default is now NO wheel because only very few DOS apps use the wheel and the wheel detection does not work on all systems. Option /M (disable mouse systems / old genius) is now ignored. A new option /Y enables old genius. I will need YOUR help to get the message files and documentation in sync again now. Only the English sources and com / exe files are supposed to be okay but even they may still contain wrong messages or version numbers or whatever. Feedback welcome! The main change, however, is under the hood: The original ctmouse was written in TASM 2, using a bit of "ideal mode" and other extensions. Ctmouse is soaked in trippy macros and the sources are really big. So it was not possible to compile it with the free ArrowASM nor was it possible to convert it to NASM syntax with Michael'S helpful NoMySo tool. However, Japheth's JWASM MASM clone did at least have a rough idea of what to do with the cutemouse sources :-). I had to remove piles of fancy macro invocations and simplify macros to finally be able to compile with JWASM. I think if you simplify the code a little more or make NoMySo a bit more flexible, you could even convert the sources to NASM now :-). The new compiles are almost byte-identical to the old TASM version (old TASM-made binaries included). My mousetst (replaces old C version) already is in NASM anyway. The main ctmouse exe and comtest.com compile as identical versions in JWASM. Only the protocol.com tool differs - I decided not to fix a difference which looks like a bug in the TASM-made version :-p. In several cases, I had to manually tune the sources to force byte identical results: - TASM evendata pads with 0, JWASM even pads with 0fch I do not know how to change this, I just used "db 0". - sbb ch,ch xchg dx,si xchg cl,bh xchg si,di sbb al,al xchg dh,bl xchg cx,si xchg cx,bx xchg dl,al xchg dl,ah xchg dx,si xchg ah,al (but not ALL "xchg" instructions) all swap the arguments when compiled with JWASM as compared to compiled with TASM - I used "db ..." here. - cmp ax, valuebelow128 uses "cmp ax,word" in TASM but I cannot make JWASM do that - it uses "cmp ax,byte" - adc ax,0 has the same problem as cmp ax,4 ... - JWASM does not support testflag / setflag / maskflag which compile into test / or / and in an "intelligent" way. For example "testflag [bx],400h" would create a "test [bx+1],4" in a TASM made binary... Differences between TASM and MASM: - MASM needs double "::" after labels to make them globally visible, TASM has keyword "locals" to make all labels global ... however I had to use "::" at ONLY 28 places and having the global-hints explicit makes the code more readable ... - MASM uses even where TASM uses evendata - MASM uses "STRUCNAME ends" where TASM uses "ends" - the size info in "MYLABEL label byte" can be optional in TASM - JWASM / TASM do not understand "warn" and various "%settings" - macro options can be of type "rest" and "vararg" only in TASM - TASM allows push and pop with multiple arguments... Dunno about MASM but JWASM does not support this. I think NASM does...? Other JWASM specifics I had to work around: - JWASM seems to have pretty bad support for "record" bitfields, I had to remove most references to them to avoid broken code - JWASM uses only 8 instead of 16 bytes for "foo db 8 dup (?,?)" - JWASM does not allow structures to be named OPTION ;-) It also can do less magic with macros compared to TASM... You can find all sorts of related simplifications I had to use in jw-tasm.* - in TASM you can say "offset X" instead of "offset PAIR.X" in cases where this is not ambiguous (PAIR is a struct). You cannot say [si].foo either, only [si+offset WHAT.foo]. You can also say "ends" instead of "STRUCTNAME ends" in TASM and "LABNAME label byte" does not need the "byte" in TASM if it can be inferred. Instead of ".model use16 tiny" I had to use the JWASM -mt command line option. - to make a COM file with JWASM, several changes were needed: Instead of .startup I had to say: org 100h assume ds:DGROUP and start:: (and at the end: end start). Using tlink /x /t does not work, I have to use tlink /x and call exe2bin after that (Watcom exe2bin) for ctmouse. However, tlink /x /t did work for the utilities! Maybe related to the map info? The ctmouse binary had 14e4 bytes _text, 2 _data, 5b9h const in the version before I run exe2bin and com2exe. While exe to com via exe sounds odd, it has use - gives smaller headers. - you cannot say ERRIF in JWASM and I could not get the "hll" (if_ loop_ etc) macros by Arkady nor the CODE_ or out_ ones to work in a syntax suitable for JWASM... - instead of PS2WHEELCODE I had to say byte ptr [PS2WHEELCODE+1] Change stats: 15 files edited, 2 files removed (file.mac, hll.mac), 787 lines removed, 1538 lines added (this often means "replaced a line by a comment and added a new line"). Sum of lines of makefiles, include files and source files: 9317. Unified diff: 4981 lines. You can download this epic in my new "mixed directory" at the URL www.coli.uni-saarland.de/~eric/stuff/soft/mixed/ - filename is cutemouse21b4-jwasm.zip - Please try / read that new version :-). Let me know if the other mixed stuff is useful for anything for you and / or has proper licenses. Thanks in advance. Sorry for the epic mail and thanks for reading - in particular if you plan to tune ctmouse, nomyso, jwasm, docs, translations :-). Cheers, Eric ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Freedos-user mailing list Freedosfirstname.lastname@example.org https://lists.sourceforge.net/lists/listinfo/freedos-user