Where to get started on porting 68k CPM - CP/M

This is a discussion on Where to get started on porting 68k CPM - CP/M ; Hey everybody! I am a rather accomplished C programmer, and one platform I have fun coding for is TI's Ti-89 calculators. (By the way, I have the TIGCC project to thank for retargeting GCC to the platform) Anyway, I was ...

+ Reply to Thread
Results 1 to 9 of 9

Thread: Where to get started on porting 68k CPM

  1. Where to get started on porting 68k CPM

    Hey everybody!

    I am a rather accomplished C programmer, and one platform I have fun
    coding for is TI's Ti-89 calculators. (By the way, I have the TIGCC
    project to thank for retargeting GCC to the platform) Anyway, I was
    poking around for a new, exciting project to start, and remembered that
    rather recently, the first third party OS was made for the 89 series.
    Now, while a good OS, there is really no point in using it, as it has
    no CAS (So no real calculator functionality) and it doesn't improve the
    "handheld computer" aspect of it either. After checking out UClinux
    (Far too bloated for the target platform) I began thinking "older
    school". Suddenly, like a lightningbolt, I remembered CP/M! CP/M
    would be a perfect candidate for this, because even though it removes
    calculator functionality, the large software library makes into more of
    a portable computer. Unfortunatly, there are some issues I think that
    need to be addressed, thus, I came here for help

    First off, some statistics on the series:
    12 MHz MC68000
    188K RAM, 639K Flash ROM
    Screen Size: 160x100 pixels
    Link Port

    Here are some issues I brainstormed:
    1. CP/M is disk based, right? Thus a virtual disk system would have to
    be implemented.
    2. The link port doesn't seem to be standard serial, thus a new driver
    would have to be written.
    3. Actually compiling the source may be difficult. Do you guys think
    the source would compile under a the retargeted version of GCC?

    There really are many smaller problems involved too, but those three
    seem to be the biggest. Could I have your opinions on these problems
    guys? Thanks a ton!


  2. Re: Where to get started on porting 68k CPM

    On 31 May 2006 15:49:14 -0700, Cthulhurulesall@gmail.com wrote:

    >Hey everybody!
    >
    >I am a rather accomplished C programmer, and one platform I have fun
    >coding for is TI's Ti-89 calculators. (By the way, I have the TIGCC
    >project to thank for retargeting GCC to the platform) Anyway, I was
    >poking around for a new, exciting project to start, and remembered that
    >rather recently, the first third party OS was made for the 89 series.
    >Now, while a good OS, there is really no point in using it, as it has
    >no CAS (So no real calculator functionality) and it doesn't improve the
    >"handheld computer" aspect of it either. After checking out UClinux
    >(Far too bloated for the target platform) I began thinking "older
    >school". Suddenly, like a lightningbolt, I remembered CP/M! CP/M
    >would be a perfect candidate for this, because even though it removes
    >calculator functionality, the large software library makes into more of
    >a portable computer. Unfortunatly, there are some issues I think that
    >need to be addressed, thus, I came here for help
    >
    >First off, some statistics on the series:
    >12 MHz MC68000
    >188K RAM, 639K Flash ROM
    >Screen Size: 160x100 pixels
    >Link Port
    >
    >Here are some issues I brainstormed:
    >1. CP/M is disk based, right? Thus a virtual disk system would have to
    >be implemented.


    Yes, but the definition of disk is vary flexible and there is a BIOS
    to help define that.

    FYI, the flash rom could be one of the "disks" as well as the system
    load point. With a bit of care you could even get parts of the OS
    (static parts of BIOS and BDOS) to run directly from rom to preserve
    ramspace.

    >2. The link port doesn't seem to be standard serial, thus a new driver
    >would have to be written.


    Again, an area where cpm uses a user defined bios so while a coding
    effort it's a nominal task for any cpm system.

    >3. Actually compiling the source may be difficult. Do you guys think
    >the source would compile under a the retargeted version of GCC?


    Can't help there but a first pass bet is no, you will have to tweek
    the code to match more current style compilers.

    >There really are many smaller problems involved too, but those three
    >seem to be the biggest. Could I have your opinions on these problems
    >guys? Thanks a ton!


    Can it be done, absolutely. The only thing you need to look at more
    is the calc memory map vs what CP/M68k expects. Even that is likely
    not a big issue.


    Allison


  3. Re: Where to get started on porting 68k CPM

    On 2006-06-01, Allisonnospam@nouce.bellatlantic.net wrote:
    > Can it be done, absolutely. The only thing you need to look at more
    > is the calc memory map vs what CP/M68k expects. Even that is likely
    > not a big issue.


    The memory map for CP/M-68K is described by a table controlled by the
    BIOS. Most of the executables delivered with CP/M-68K were relocatable,
    so CP/M-68K is very flexible regarding memory layout.

    As for porting it, I've found with a few minor changes it's possible to
    push the operating system through a modern C compiler such as gcc. You
    might take a look at exchange over on the unofficial CP/M home page
    (down at the bottom of http://cpm.z80.de/source.html); that is CP/M-68K
    so modified. Of course, I've also worked over the bits of the OS that
    are specific to the processor, so you'll want to take a look at the
    original sources to see how that works.
    --
    roger ivie
    rivie@ridgenet.net

  4. Re: Where to get started on porting 68k CPM


    Roger Ivie wrote:
    > On 2006-06-01, Allisonnospam@nouce.bellatlantic.net wrote:
    > > Can it be done, absolutely. The only thing you need to look at more
    > > is the calc memory map vs what CP/M68k expects. Even that is likely
    > > not a big issue.

    >
    > The memory map for CP/M-68K is described by a table controlled by the
    > BIOS. Most of the executables delivered with CP/M-68K were relocatable,
    > so CP/M-68K is very flexible regarding memory layout.


    As Roger said, it's pretty flexible. There are two basic pre-located
    patterns available; one starting fairly high in memory and one fairly
    low (0?). To that you have to somehow get in a skeleton bios at any
    address you would like. Once you've done that (and the skeleton can be
    very primitive) you've got a running system.

    The very next thing you do, of course, is relocate everything to where
    you REALLY want it to run, including doing up a better BIOS. And since
    the BIOS defines the low-level interface to the disk, you can easily
    make it something other than a classic hard drive.

    All the utilities and languages provided under CP/M-68K are provided as
    relocatables. So they can run pretty much anywhere you have a chunk of
    RAM, be it high or low. [Of course, usually everyone makes them
    absolutes so they load faster, but you can worry about that after you
    get it running.]


  5. Re: Where to get started on porting 68k CPM


    wrote in message
    news:1149115754.112062.4990@i40g2000cwc.googlegrou ps.com...
    .......
    > 3. Actually compiling the source may be difficult. Do you guys think
    > the source would compile under a the retargeted version of GCC?

    .......

    The Sozobon compiler/assembler/linker tool set is a replacement for
    the commercial tools indicated in the CPM-68K archives. Sources for
    the Sozobon tools are available at the University of Michigan Atari
    Archives: http://www.umich.edu/~archive/atari/Languages/. You should
    be able to compile the sources to act as cross-tools with GCC (or
    any 32 bit int compiler?).



  6. Re: Where to get started on porting 68k CPM


    Roger Ivie wrote:
    > On 2006-06-01, Allisonnospam@nouce.bellatlantic.net wrote:
    > > Can it be done, absolutely. The only thing you need to look at more
    > > is the calc memory map vs what CP/M68k expects. Even that is likely
    > > not a big issue.

    >
    > The memory map for CP/M-68K is described by a table controlled by the
    > BIOS. Most of the executables delivered with CP/M-68K were relocatable,
    > so CP/M-68K is very flexible regarding memory layout.
    >
    > As for porting it, I've found with a few minor changes it's possible to
    > push the operating system through a modern C compiler such as gcc. You
    > might take a look at exchange over on the unofficial CP/M home page
    > (down at the bottom of http://cpm.z80.de/source.html); that is CP/M-68K
    > so modified. Of course, I've also worked over the bits of the OS that
    > are specific to the processor, so you'll want to take a look at the
    > original sources to see how that works.
    > --
    > roger ivie


    Thanks for the idea of looking at exchange, its helping me a bunch.
    Since the responses here seem overwhelmingly positive, I'm going to
    begin work in earnest on this project. Thanks for all your help, and
    be sure to chime in if you have some more tips for me!
    > rivie@ridgenet.net



  7. Re: Where to get started on porting 68k CPM

    Cthulhurulesall@gmail.com wrote:

    > I am a rather accomplished C programmer, and one platform I have fun
    > coding for is TI's Ti-89 calculators.


    (snip)

    I was told that the TI-83 series has a processor related to the Z80,
    which would make porting 8080 CP/M easy. I haven't verified that,
    though.

    -- glen


  8. Re: Where to get started on porting 68k CPM

    On Fri, 02 Jun 2006 13:15:31 -0700, glen herrmannsfeldt
    wrote:

    >Cthulhurulesall@gmail.com wrote:
    >
    >> I am a rather accomplished C programmer, and one platform I have fun
    >> coding for is TI's Ti-89 calculators.

    >
    >(snip)
    >
    >I was told that the TI-83 series has a processor related to the Z80,
    >which would make porting 8080 CP/M easy. I haven't verified that,
    >though.


    Is true, the other popular cpu is TI calcs is the z80. However not
    all have a memory map compatable with conventionally laid out CP/M
    (ram at low address).



    Allison

    >
    >-- glen



  9. Re: Where to get started on porting 68k CPM

    Actualy to port CP/M 68k to gcc is not that bad, It could be done within
    a day or two. Even a some sort of virtual disk is not a problem, since
    CP/M 68k is very well documented. The hard think is to retarget the gcc!
    May be as an Idea, not to retarget gcc, but taking an existing port such
    as (suggested) atari mint and rewrite CP/M 68k to exept the executable
    file format. ( the Atari relocation file format was some simularity with
    the CP/M 68k file format).
    But from me own CP/M 68k system, 188K RAM is a bit to small ... the
    original CP/M 68k Clib was about 32k or so..

    regards
    roman

    Cthulhurulesall@gmail.com wrote On 06/01/06 00:49,:
    > Hey everybody!
    >
    > I am a rather accomplished C programmer, and one platform I have fun
    > coding for is TI's Ti-89 calculators. (By the way, I have the TIGCC
    > project to thank for retargeting GCC to the platform) Anyway, I was
    > poking around for a new, exciting project to start, and remembered that
    > rather recently, the first third party OS was made for the 89 series.
    > Now, while a good OS, there is really no point in using it, as it has
    > no CAS (So no real calculator functionality) and it doesn't improve the
    > "handheld computer" aspect of it either. After checking out UClinux
    > (Far too bloated for the target platform) I began thinking "older
    > school". Suddenly, like a lightningbolt, I remembered CP/M! CP/M
    > would be a perfect candidate for this, because even though it removes
    > calculator functionality, the large software library makes into more of
    > a portable computer. Unfortunatly, there are some issues I think that
    > need to be addressed, thus, I came here for help
    >
    > First off, some statistics on the series:
    > 12 MHz MC68000
    > 188K RAM, 639K Flash ROM
    > Screen Size: 160x100 pixels
    > Link Port
    >
    > Here are some issues I brainstormed:
    > 1. CP/M is disk based, right? Thus a virtual disk system would have to
    > be implemented.
    > 2. The link port doesn't seem to be standard serial, thus a new driver
    > would have to be written.
    > 3. Actually compiling the source may be difficult. Do you guys think
    > the source would compile under a the retargeted version of GCC?
    >
    > There really are many smaller problems involved too, but those three
    > seem to be the biggest. Could I have your opinions on these problems
    > guys? Thanks a ton!
    >


+ Reply to Thread