-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Advice required: CP/M-86 Emulator #52
Comments
I think it would be excellent and quite useful, but I'm a CP/M fan, so I have a somewhat skewed view. |
What I would need is a set of (real) CP/M-86 programs to try this on. It should not be that difficult to do a few adaptations. |
VEDIT-PLUS, dBase-86, WordStar, Turbo Pascal, CBASIC-86 (with CB86-EDIT), Tetris, and VFILER would be a decent range of real programs for CP/M-86, to start with. There are many more available at various locations. |
There is also quite a large range of native programming languages (BASIC, C, Pascal, Modula-2, Prolog, PL/I, FORTH, FORTRAN, Assemblers) and tools for CP/M-86. |
I actually assembled a quick cross compilation environment using your emulator for cp/m-86 development using the aztec c compiler and a couple of other tools at https://github.com/tsupplis/cpm86-crossdev Aside from @johnsonjh tools mentioned above, I put together a couple of simple tools and libraries on CP/M-86: I have also reassembled the CP/M-86 1.1 kernel sources project and patched it with all the existing patches but I cannot share on git because of the license. I am trying to put together an 'extractor' project that collects all the necessary bits without storing the CP/M code but I am not finished. I can give the pointers I use nonetheless. |
There are quite a few CP/M-80 runtimes similar to emu2 (COM, RunCPM, izcpm, CPM80, etc.) but not for CP/M-86, so I think this is actually a great idea, since emu2 does such a good job of emulating the IBM PC hardware - nothing else works nearly as well. There are actually multiple 16-bit CP/M derivatives, some even called CP/M-16 but not running on IBM hardware - it can be a rather confusing thing. However, for the purposes of emu2, the CP/M-86 Software Repository has a lot of tools that are specific to the IBM PC, some of which will likely be useful for testing. |
I have a (quite specific) version of MicroEMACS I can provide too, for testing. There isn't anything exactly special about it, except that it's the exact same editor on CP/M-68K and CP/M-86 as well as on UNIX. There are at least three versions of vi also. Something interesting to note is that quite a few of these CP/M-86 programs will directly output terminal escape sequences, usually for at least the VT52/100/102 and ADM3A, and others will output directly to the video memory of the computer, or offer both options. |
@johnsonjh you are correct, you have a lot of variations
They all have slightly different api support. The best source of information for the call stack of CP/M vs DOS is at: It covers all the CP/M-86 variations and calling model for 8086. It is astonishingly close to a subset of the DOS APIs but with different register conventions. I think CP/M-86 1.1 is probably the core subset to consider as the others are moving to multi task. |
Hello @tsupplis,
I am curious... what issues exactly did you encounter with existing CP/M-86 emulators? (I see that you mentioned Thank you! |
@tkchia, one of the main issues if file closure and completion. file processing regularly fails unless the process takes the time of aligning the files on 128 bytes. Outputs end up being truncated. So it really depends. it is particularly true from key tools on cp/m-86 like asm86.cmd or gencmd.cmd. For example for those two tools I had to resort to using the cp/m-80 versions. Another interesting test is executing binaries compiled with aztec c vs binaries compiled with DR C. The .cmd generated work perfectly on cp/m-86 but only DR-C binaries work with ame86.exe or cpm86.exe. There are other symptoms of course but the file issue is the main one. Some combinations kinda work. cpm86.exe is packaged with the historical native aztec c compiler for cp/m-86. the output seems to be ok. But it is try and fail really. Mind you they are definitely very sophisticated pieces of software but without the source you are stuck. the advantage of emu2 is it already works a treat on dos, is open source ... so, worth a try? Let's correct the word, decent is a bit strong, reliable is more accurate 😉 |
So I started to prototype 4E interrupt based on legacy functions of 21. It is very ugly right now but progressing. I did not tackle the loading of cmd executables at all. Working with com files right now. There is still a fair amount of work |
Hi,
Now that your emulation is supporting most of the calls inherited from CP/M it is actually quite easy to create a CP/M-86 emulator by implementing
How would you approach that? I think it is too messy to overlap both, and a fork could do the job better, what do you think? Worse trying a single one? The appeal of it is far more limited than dos ...
The text was updated successfully, but these errors were encountered: