|
Post by Jos on Oct 16, 2020 7:46:45 GMT 1
Seems to me “nocachedir” would control caching by DOSBox-X of directory inquiries/lists.
That’s unrelated to the mentioned RL issue/catch. DOSBox (like DOSBox-x ?) uses fread() and fwrite() file data caching functions. So internal data of a DOS program in a multi-user setting can get out of sync with that actually on disk.
Jos
|
|
|
Post by fnavarro on Jun 23, 2022 17:38:24 GMT 1
Well, I could have said "virtually no DOS end-user program uses this.". And vDos is primary meant for running end-user programs. That excludes programming tools, one should then temporary use a virtual DOS machine if Ctrl-Break is needed? I don’t know of other DOS emulators than DOSBox and mods that would be able to run Clarion. Perhaps a virtual FreeDOS would be an option, though that would give you a rather isolated environment. And no idea if for instance printing is a practical feature. With correct settings, DOSBox (don’t know about DOSBox-X) should be able to run faster than vDosPlus (https://www.youtube.com/watch?v=wSo7hYFHA7g). If you don’t get a response/solution from the DOSBox-X team, get back in a week or so. I could eventually add a rather simple: Set the BIOS break flag when appropriate. Starting a DOS function, check if this flag is set. If so and Int 23 is hooked/replaced, start that routine. If it returns AL=0 end the DOS program, else continue with the DOS function (http://www.ctyme.com/intr/rb-4110.htm). Though no idea if this will actually work/suffice. There could be pitfalls like DOS not running in the virtual machine. Jos Hi Jos, It was asked today on the comp.lang.clarion newsgroup about being able to press Ctrl-Break on the Clarion 2.1 Processor as described by zy in the previous post. I was wondering if the solution alternative that you mentioned in this post was tried or could be tried, and how would it be used, also taking into account another inconvenience that notebook keyboards usually do not have that key, would it be through the Windows OSK utility? would it be necessary to set some special configuration in config.txt? Thank you very much
|
|
|
Post by Jos on Jun 23, 2022 18:51:47 GMT 1
I offered zy to have a look at this if he didn’t get a response of DOSBox-X. He replied to stick with DOSBox-X, and didn’t come back again. You could send him a PM to ask if a solution was given by DOSBox-X. Don’t know if OSK will let you use Ctrl-Break, on my PC the Break key is missing from OSK. You could have a look at the registry solution at www.dell.com/community/Laptops-General-Read-Only/break-key-alternative/td-p/3826467. The methods don’t require a config.txt setting, but still won’t work since vDos does not pass on Ctrl-Break to CPRO. Jos
|
|
|
Post by fnavarro on Jun 24, 2022 4:11:46 GMT 1
Jos, I will PM zy. Meanwhile I downloaded Dosbox-X last 0.84 and it does support Ctrl-Break, by pressing Ctrl-NumLock both on Notebook and Desktop keyboards, also from W11 OSK by pressing Ctrl and Pause with at least one of NumLock or ScrollLock in active state, also from its Main pulldown / Send Special Key / Send Ctrl-Break. It worth to say that they worked also through a VNC connection (Real and UltraVnc tested). It works on Clarion 2.1 Processor to switch to the Debugger, two screen captures attached. Also on Clarion3.0 CLAXVID for similar purpose. On SCODE it produces the same behavior as in NTVDM (scancodes 0000 when Ctrl Break pressed), attached screen capture, note there were pressed the different combinations mentioned before and also CTRL C which produces other scancode 2E03 and ALT 3 which produces 0003 vDos 2022 version (please let me omit months and days for shortness) differs from 2021 that it doesn't capture on SCODE the desktop keyboard Ctrl-Break and OSK Ctrl-ScrollLock, 2021 (and 2020 and 2019) shows it as NumPad and hearth symbol scancode 4603. Including 2022 OSK Ctrl Pause with Scroll&NumLock inactive generates Alt Num 3. I couldn't get any combination to generate the 0000 scancode for Ctrl Break. For reference vDosPlus generates the same as Ctrl C for Ctrl Break (scancode 2E03). I could not switch to Clarion Debugger with any of those keys. In case you decide to add a workaround for Ctrl Break in vDos, I would be keen to test it. Regarding notebook keyboard mappings/workarounds I only tested what I mentioned earlier, not every combination in your interesting link. Although I've used in the past that technique of Windows keyboard layout scancode mappings for other purposes. I see DosBox-X approach to Ctrl-NumLock an interesting way to avoid this inconvenience. By the way, on vDos 2021 and 2022 Clarion3 Debugger CLAXVID hungs up at start, while it works on vDos 2019 and 2020. Something may have changed and is affecting that. vDos.log on 2020 showing lots of "CPU exception 0b (d4)" lines (the d4 part is different on each), perhaps newer versions treats them differently? Thanks Federico
|
|
|
Post by Jos on Jun 24, 2022 10:15:07 GMT 1
If it’s still of interest (given DOSBox-X), you could post the involved programs and some documentation how to get those up and running.
Jos
|
|
|
Post by fnavarro on Jun 24, 2022 16:01:36 GMT 1
Jos, ok, to test Ctrl Break with Clarion you need the IDE, either version 2.1 or 3.0/3.1, or at least the modules involved. For 2.1 it would be CPRO.EXE Clarion Processor which runs programs compiled to intermediate code, .PRO files. For 3.x having an .EXE program compiled with debugging options enabled you would need CLAVID.EXE or CLAXVID.EXE, depending on whether protected mode is used, and dependent libraries and the .EXE program with *.DB* symbol files and others. To facilitate the above, we can use this excellent example available from: www.vdos.info/screenshots.htmldemo.vdos.info/demo?appname=Clarion3The basic instructions within vDos/Clarion3 IDE would be: -open an application -check that the compilation with debug option is set -run Build process and debug application -execute action to execute until finding a Breakpoint -press Ctrl Break and check if the debugger console reappears More detailed instructions: -Browse into the previous link -Choose File / Open (F3)... go to EXAMPLE subdirectory and choose an included example application like BILLFOLD for example, note that some applications like DEMO use a graphical mode and might not work. Alternatively use the recent applications list Clarion menu/Load Application (F4) and choose from there if it was recently opened. -Choose Project/Change project file...(Alt-N) , then Debug button and set Enable Source Debugging, then OK OK (already done for BILLFOLD) -Choose Project/Make*1 to Generate Sources, Compile Objs and Link the EXE -Choose Project/Run*2 to test the application directly (note that there is also a quick Make&Run combination) -Choose Project/Debug*2,*3 to test the application from the debugger (note that there is also Make&Debug option) -From the Debugger press Alt G for the GO Menu, then B until Breakpoint, you should see the app running -Press Ctrl Break, you should see the debugger again if it worked -Q Yes to Quit debugger , Ctrl-X to exit from Application, Ctrl-X to exit from Clarion *1 Make: For the last part to work (link .EXE), Clarion needs either vDos AUTOEXEC.TXT to include: PATH C:\CLARION3;C:\CLARION3\LIB;%PATH% or a CLARION.RED file on the application's folder, so you can copy CLARION.RED from C:\CLARION3 to C:\CLARION3\EXAMPLE (already done) *2 Run/Debug: These commands don't work in vDos out of the box (it does work in vDosPlus, maybe older vDos too?). To make it work under vDos you need a DOS 5.0 COMMAND.COM program located in C:\ *3 Clarion3 debug does not work on vDos 2021/2022, it does work on earlier versions Or if you prefer you can send me a vDos patch and I can try it here. Federico
|
|
|
Post by Jos on Jun 24, 2022 16:37:12 GMT 1
Thanks for the detailed explanations. I forgot about the online demo of Clarion 3. Although I have a Clarion (2?) and Clarion3 directory, I never had a close(r) look at those IDE’s.
Since the demo applications are daily reset to their initial setup, I’ll first modify that of Clarion to incorporate your adjustments. Then have a go at your instructions…
Jos
|
|
|
Post by Jos on Jun 25, 2022 8:21:31 GMT 1
The presence of and starting COMMAND.COM is faked to DOS programs. Those commonly check for that file using DOS API Find first matching file. Clarion however uses Get attributes instead. Even if Clarion is satisfied, CLAVID still doesn’t start due to a vDos exception. Probably a file swapping issue. When I debug BILLFOLD directly with CLAVID, I get these screens: Is that correct, shouldn’t the third (CLAVID again) highlight the interrupted line or so? Jos
|
|
|
Post by fnavarro on Jun 25, 2022 15:18:47 GMT 1
Hi Jos, you got it working, that's very good thanks.
Regarding the highlighted line, as the interrupt probably was on Clarion Runtime Library (or Dos Api?) it cannot highlight a source line, but ideally it should highlight the last source line that called into the library. But on DosBox-X the effect is the same. I cannot recall if on DOS days CLAVID behave different. Knowing the program structure it become less problem to manually locate that line. Then one can put a breakpoint pressing GrayPlusKey or GrayAsterisk on the next expected line to run and then choose Go.. until breakpoint again and continue step by step with the correct lines highlighted... or you could choose to debug in assembled mode Alt O (Options) source mode Off, then it will highlight the correct instruction next time Ctrl Break is pressed.
Do you plan to make a patch with this feature ?
|
|
|
Post by Jos on Jun 25, 2022 23:32:02 GMT 1
As a first test, I made it work exclusively to CLA(X)VID. Extending it to Clarion 2 (and perhaps other programs) will be a snap. I just have to remove a test that identifies CLA(X)VID. And choose a key combination that triggers the debugger. I used Ctrl-C, but Ctrl-NumLock seems a good candidate.
Then have a look at why a “PSP file table (JFT) is messed up” exception is generated. For now I just omit this, but that’s of course no real solution. Lastly have a quick look at why Debug in the IDE also generates an exception. If too complex, could be I just let it be.
I don’t provide for patches to existing vDos releases. Basically it will be incorporated in the next (2023) version. But I can send you, and others, a pre-release of that.
I noticed BILLFOLD seemingly redefines four VGA bitmap line segment characters to display the mouse pointer. That doesn’t work with vDos using a TTF font. Furthermore the mouse position is off after the intro message is dismissed…
Jos
|
|
|
Post by fnavarro on Jun 26, 2022 0:30:36 GMT 1
I understand about releases. I would like to receive a prerelease if possible.
The steps for Clarion 2.1 would be: Change to the Clarion directory, run Clarion.com, Select Compiler and if the input file is blank press ENTER to choose an included application, like Options.clw, then ENTER ENTER, this generates Options.PRO, then with the Processor choose the generated file and a window will appear like the previous screenshots. Then press Ctrl-Break and the debugger will appear, also as seen in the other screenshot.
Regarding the problem when opening CLAVID, a hint could be what has changed between versions 2020 and 2021.
Regarding the mouse in BILLFOLD, whether Clarion3 applications can choose to use a graphic cursor or not, it is customizable both in the Clarion Ide and per application, example Clarion menu / System setup / Options... / Under Video Settings has to be unticked Use Smooth Mouse Cursor and Use Graphical Fonts. In other words, it's not a vDos problem, it's just a matter of disabling it in the applications.
Thanks. Federico
|
|
|
Post by Jos on Jun 26, 2022 18:34:47 GMT 1
I made the Ctrl-Break support general, so debugging Clarion2 also works. Both Ctrl-Pause/Break and Ctrl-NumLock can be used, the first isn’t generated correctly by ‘my’ OSK.
The “PSP file table (JFT) is messed up” exception was generated because Clarion sneaky lowers the maximum file handle count in the PSP to 16. No idea what that is good for, but it’s no longer trapped.
I couldn’t get Debug working from inside the IDE, not in any vDos version, DOSBox, or DOSBox-X. Since the exception is caused by a nasty Clarion routine, at the end pushing stuff onto the stack and doing an IRET based on that, I let it be.
I’ll send you a vDos.exe by wetransfer. Mind, it’s only the executable. Not being installed, could be you have to trust it in the properties, general options tab.
Jos
|
|
|
Post by fnavarro on Jun 27, 2022 20:25:57 GMT 1
Hi Jos, thanks, great work, I could breakin to the debugger from Clarion2.1 & 3(*), with the three combinations of keys and type of keyboards, OSK, local and through VNC (in this last Ctrl Numlock didn't worked but local and remote OSK did).
I was delaying this testing with C3 because of the many combinations of vDos/DosBox versions, calling from IDE and outside, and linking memory model (Static, Overlays, Protected Mode). The memory model is selectable in the project settings inside the application (the Alt-N part in the previous message with instructions). Static uses only conventional memory so is limited to relative small programs. I use Protected Mode which eliminates that barrier and is better than overlays, but it is an addon. It is not installed in the online demo.
To sum up
DosBox-X Static: Inside IDE: blank screen,cpu hog&hung up, outside with CLAVID=Works Overlay: Inside and outside IDE: Works Protected Mode: Inside IDE: blank screen,cpu hog&hung up, outside with CLAXVID=Works
vDosPlus Static: Inside IDE: blank screen,cpu hog&hung up, outside with CLAVID=Works Overlay: Inside and outside IDE: "PSP file table (JFT) is messed up" Protected Mode: Inside and outside IDE: Works (but no Ctrl Break)
vDos 2020 Static: Inside IDE: gives error "illegal opcode FF at 488A:77871" (and similar address), outside with CLAVID="PSP file table (JFT) is messed up" Overlay: Inside and outside IDE: "PSP file table (JFT) is messed up" Protected Mode: Inside and outside IDE: Works (but no Ctrl Break)
vDos 2022 Static: Inside IDE: gives error "illegal opcode 63 at 0000:041E", outside with CLAVID="PSP file table (JFT) is messed up" Overlay: Inside and outside IDE: "PSP file table (JFT) is messed up" Protected Mode: blank screen,cpu hog&hung up
vDos 2022/3 prerelease Static: Inside IDE: gives error "illegal opcode 63 at 0000:041E", outside with CLAVID=Works (here i tested Ctrl Break) (*) Overlay: Inside and outside IDE: "PSP file table (JFT) is messed up" Protected Mode: blank screen,cpu hog&hung up
So on this prerelease you could make CLAVID works for Static linking, running outside the IDE. What would be interesting if it can be solved for protected mode as it worked on the 2020 version. Please let me know if you could take a look on it and if you would need the logs or the addon to test.
|
|
|
Post by Jos on Jun 27, 2022 21:27:03 GMT 1
By Static linking you would mean Overlay?
The exception was related to that of Clarion lowering a programs maximum file count in the PSP directly (not using DOS API) below the default/original of 20. A further check in the DOS API called to raise that maximum beyond 20, expected that then to be 20 or greater.
I adjusted that check to allow the set maximum less than 20. Surprisingly Debug then works from inside the IDE with overlay linking! I’ll send you a adjusted vDos.exe.
You could post, or send me a protected mode linked program to have a look at debugging that?
Jos
|
|
|
Post by fnavarro on Jun 27, 2022 23:37:02 GMT 1
I meant Static as in the screen captures attached, just the sentence with "could" looked a bit ambiguos, I meant you already had it working with Static. I confirm now it is working in Overlay mode too, that's much usesful, thanks. I sent you BILLFOLD compiled in protected mode. Update: vDos 2022/3 prerelease2 Static: Inside IDE: gives error "illegal opcode FF at 0000:042B", outside with CLAVID=Works Overlay: Inside and outside IDE: Works! Protected Mode: blank screen,cpu hog&hung up Attachments:
|
|