I've always been interested in CP/M though I'd never really used it and after seeing some recent discussions about it on IRC I decided to take a look since I heard it was pretty 'port'able. Turns out you only really need to write a few platform specific BIOS routines to get it running!

So that's what I did these past couple of days (... I know I should be coding other things) and after adding some very simple console style output stuff I have a somewhat usable version of CP/M 2.2 working on my CE.

Note that apparently CP/M expects an 80-character wide console so I've had to use a very small 3x7 font to make it fit. It's surprisingly not too bad for my eyes, but it is pretty small ...

It's not perfect as I haven't really added any console style escape codes to it so Sargon has some slight glitches if you look in the correct spot. Still it's pretty neat to see an OS from the 70's running on the CE!



To add the programs I'm basically injecting them at runtime and then saving them via the CP/M commands for now, I'll have to look at a way to add 'discs' via appvars or something.

I had to add the ability to cycle between uppercase, lowercase and number/symbol due to the calc keypad layout, so typing is a bit weird. For example typing a '.' forces you to cycle to the number/symbol mode and then back again to keep typing characters. If you look closely you can see the cursor change when the mode is changed.

Like most rushed things I do it's a bit of a hack'n'slash coding job but it was pretty fun. I'll have to redo and tidy up some things before uploading it to github or something.
That's pretty awesome, congratulations!
That's a very cool project. Smile

CP/M 3 has quite a few additional niceties, for example you can specify the width and height of the console during system generation (and redefine at runtime via the system control block) though this will only really work well with CP/M 3-compatible software that knows to check this and third-party software will still likely assume you have a 80-column wide display.

How are you handling the memory layout?
Whoa, great work, tr1p1ea! I've seen a few attempts to port CP/M to our favorite calculators (including at least one for the monochrome calculators), but this is the only one I've seen actually working. I look forward to seeing how this progresses - and you definitely shouldn't feel guilty about spending your time on the projects you want to be working on rather than on the ones that you "should" be working on.
I might consider CP/M 3 since I've seen some nice things about it and that feature would be handy indeed. I thought I'd better start with 2.2 however.

Regarding memory the lcd is set up for 1bpp, leaving the majority of VRAM available, so execution is in z80 mode giving CP/M access to a full 64K of RAM. No paging used and the 'disk drive' for now is just a saferam area that's formatted appropriately on startup. All setup and data copying required to boot CP/M happens prior to entering z80 mode so there is no real need for any memory configurations outside of a flat 64K of RAM.
I've found some good disk image utils and rearranged memory so as to support 2 different 'disks' for CP/M, namely a read-only 'system disk' that is stored within the program itself and a 120KB 'user disk' that can be loaded from an appvar(s).

The system disk will come bundled with:
ASM.COM
DDT.COM
DUMP.COM
ED.COM
LOAD.COM
PIP.COM
STAT.COM
SUBMIT.COM

Which should be nice enough to play around with.

I still need to look at adding terminal escape codes however I'm not sure which machine to support (only planning to pick 1) ... perhaps the VT100?
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement