Image Map Image Map
Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: Booting CPM for the First Time

  1. #1
    Join Date
    Jul 2009
    Location
    Boulder , Colorado USA
    Posts
    3,011

    Post Booting CPM for the First Time

    Hi all;
    I have the files I needed for each of the CPM sub-systems, CCP, BDOS and BIOS, Since I am loading in these files Serially, I have them compiled in the right region for my system . But, It still won't come up with the prompt... It does the signon message and then it jumps to CCP and from there to BDOS and gets lost in there.. I have put in some terminal signs such as jumped to ccp and jumped to bdos, to see whether it got to anything... it would get to ccp and then to bdos and then back to ccp and then to bdos... I even tried to get it to do the '0A>' prompt, by jumping to that section, from the code listing that I have , but no 0A> prompt.... just the jumping back and forth... I got my files from the DRI PACK, and had to change the Mem size to my system .... Any Ideas on what to do next, or where I or what I need to change, to get it to come up. I have also changed the BIOS to skip over the reading of the Bios Tracks, since there isn't anything there...
    THANK YOU Marty

  2. #2
    Join Date
    Feb 2008
    Location
    Vancouver, WA, USA
    Posts
    205

    Default

    You should get "The Programmer's CP/m Handbook" by Andy Johnson-Laird (1983). It usually goes for $15 lately on ebay or amazon. It has a lot of good info on building and bringing up a cp/m build for the first time, including a lot of debugging tips. I have a copy somewhere, will see if I can find it and see if the book has any hints on your problem.

  3. #3
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    30,680
    Blog Entries
    20

    Default

    Marty, is your cold boot routine loading CCP BDOS and BIOS at cold boot? Has CCP and BDOS been sized correctly for the system (via MOVCPM)? Does your CBIOS use IOBYTE and did you initialize it on cold boot so console messages don't go off into the ether?

    Are you reading your disk correctly? I don't know what format or interleave you're using. Boot tracks are sometimes read at a 1:1 interleave.

    It's really pretty simple; I'd be happy to look at your files and let you know what I see.

    BTW, CP/M generally prompts with just an A> prompt; 0A> is pretty much an MP/M prompt.

  4. #4
    Join Date
    Jul 2009
    Location
    Boulder , Colorado USA
    Posts
    3,011

    Post Cpm

    Hi All;
    I already have the Book by Andy Johnson-laird. So THANK YOU on that..Chuck, I have CPM Loaded at the Top of Memory with CCP at D400H, BDOS at DC00H and my BIOS at EA00H, and I have initialized it by using my monitor to 'g' GO at EA00H , So yes it initializes the system, it has the Sign-on message ' Tarbell 60K CPM' , but it won't put on the 'A>' ... I have put labels into my CPM System, so I can follow if there is a problem, I got them from a Tarbell CPM 1.4 bios, and copied them into the corresponding place for my CPM 2.2 Bios. THANK YOU Marty

  5. #5

    Default

    I'd love to help. It may be simple or complex. It took the N8VEM group about 6 months with at least 15 people working to get an A>, though two people managed to do it in 3 months over at the Propeller forum in an emulation. The Altair simh shows an example of rebuilding an image and I understand some of this but not all of it:
    Code:
    ; Create a bootable image on disk A: of CP/M with CCP
    ; Based on original Digital Research sources for CCP and BDOS
    ; Required sources are CFGCCP.LIB, MOVER.MAC, CCP.MAC, BDOS.MAC, CBIOSX.MAC
    ; Required programs: M80.COM, L80.COM, DDT.COM, BOOT.COM, BOOTGEN.COM
    XSUB
    ; get correct configuration
    PIP MEMCFG.LIB=CFGCCP.LIB
    ; create MOVER.COM
    M80 =MOVER/M
    L80 MOVER,MOVER/N/E
    ERA MOVER.REL
    ; create CCP.COM
    M80 =CCP/M
    L80 CCP,CCP/N/E
    ERA CCP.REL
    ; create BDOS.COM
    M80 =BDOS/M
    L80 BDOS,BDOS/N/E
    ERA BDOS.REL
    ; create CBIOSX.COM
    M80 =CBIOSX/M
    L80 CBIOSX,CBIOSX/N/E
    ERA CBIOSX.REL
    ; put pieces together
    DDT
    F100 5C00 0
    IMOVER.COM
    R0000
    ICCP.COM
    R0900
    IBDOS.COM
    R1100
    ICBIOSX.COM
    R1F00
    G0
    ; create boot file
    SAVE 44 CPMBOOT.COM
    ERA MOVER.COM
    ERA CCP.COM
    ERA BDOS.COM
    ERA CBIOSX.COM
    ERA MEMCFG.LIB
    ; now perform a cold boot to get rid of XSUB
    ; this restores the original BIOS jump vector which is required by BOOTGEN
    BOOT
    ; write boot file to reserved tracks, must be last command
    BOOTGEN CPMBOOT.COM A:
    But your problem may be more fundamental than that. Can you output a single byte to the terminal? Eg what port are you using, and does a machine code OUT to that port with,say, 65, print an 'A'? And if that works, has the BIOS been modified in the CONIN and CONOUT sections to reflect this port? Do you have source code or compiled code or both? And how are you compiling them if you can't get to an A> - on another system using a cross compiler? If so, we can work through some simple tests and build it up. The first bit of code is to output a byte, which is a few lines of assembly.

  6. #6

    Default

    Quote Originally Posted by Marty View Post
    Hi All;
    I already have the Book by Andy Johnson-laird. So THANK YOU on that..Chuck, I have CPM Loaded at the Top of Memory with CCP at D400H, BDOS at DC00H and my BIOS at EA00H, and I have initialized it by using my monitor to 'g' GO at EA00H , So yes it initializes the system, it has the Sign-on message ' Tarbell 60K CPM' , but it won't put on the 'A>' ... I have put labels into my CPM System, so I can follow if there is a problem, I got them from a Tarbell CPM 1.4 bios, and copied them into the corresponding place for my CPM 2.2 Bios. THANK YOU Marty
    Hi
    The fact that you get the signon, leads me to think your conout is OK. It is more
    likely that it is not seeing the disk drive. As I recall, when coming up it expects
    to read something from the A drive before giving the A prompt. I could be wrong
    here because I have a DMA boot from disk system but it seems that each time
    I select the A or B drive, it reads something from the disk.
    I don't have my machine here so I can't test that.
    Do you have a machine with a front panel? if so, you can place the halt instruction
    at various places in the code. Follow the code and each time it does a subroutine
    call, place the halt after. If it doesn't return, it won't stop at the return. If
    you don't have the blinking lights, a logic probe, voltmeter or scope can read the
    address lines. When debugging the halt instruction can be handy
    Dwight

  7. #7
    Join Date
    Jul 2009
    Location
    Boulder , Colorado USA
    Posts
    3,011

    Post cpm

    Hi All;
    Dr. Acula, yes it talks to the ports thru CONIN and CONOT (CONOUT) I Don't have another CPM system to do the different programs (M80, PIP, etc) I assemble the Source Code (CCP.ASM, DBOS.ASM) using Spasm, and tell it where I am putting the Code (eg., D400 for CCP). Dwight, The Disk light comes on and the Head moves, and when I have gone to the 'READ' part of the Bios Code, it has an Error routine that if the Drive Controller is issuing ANy Bad Bits it will tell me so. I am running An Altair with a Front Panel , with a Tarbell Double Density Controller, I am using the Altair Regular Ports, and it seems to be working fine.. It seems to get lost in CCP and/or BDOS. I have Modified the BIOS so that it skips over the Loading from the drive the first 2 Tracks , as right now there is NOTHING there for it to Load... I have instead put there for it to look at Track 2 , Sector 00, and I have also tried sector 7, as that is about where the Directory might be located according to the Johnson-Laird Book. Since I don't know What and Where the Program has in what registers, after it would normally load in the first two tracks, So that I can Fake it out and Pre-Load them , with certain Values before Jumping to CCP. Once I have that up and running I can serially load in 'Sysgen ' and use that to copy the 'System ' to the Disk... I think ????? THANK YOU Marty

  8. #8

    Default

    Hi Marty
    It sounds like walking the halt through your code is the best
    method. This can easily be done through the front panel.
    Place a halt and see if it stops there. If it does, it most likely
    got there correctly ( small chance it didn't ). Each time, manually
    restore the data and restart from the beginning and a new halt
    location.
    Use care on conditional jumps. Try to determine if it is a loop
    or a real forward branch. Placing two halts on each path can
    help from getting lost. On a loop, you'd normally only place
    the halt after the exit of the loop.
    If it doesn't hit the your halt, you have to assume that the code
    may have been corrupted and you need to reload through the
    serial. It is a pain but your options are limited.
    I brought mine up the same basic way but I also had a
    routine to read and write sectors to the disk. Anything I loaded
    serially, I'd write to someplace on the disk. I'd be able to restore
    things quickly with just a small serial load to restore the disk
    loader.
    Dwight

  9. #9
    Join Date
    Jul 2009
    Location
    Boulder , Colorado USA
    Posts
    3,011

    Post cpm

    Hi All;
    Thank You Dwight, I am going to try one more thing beforte I go to Your halt Method. I will try to Load DDT and See if I can get it to do its thing, If I can look at the registers and/or trace the code with breakpoints, that would help alot... I have had in the Past Ran the 'Format' program, only on exit, it goes haywire.. So I will try DDT, before trying to use Your Halt Method ...
    THANK You ALL for Your Great Help and Suggestions and Questions... Marty

  10. #10

    Default

    In terms of 'getting lost' inside the code before it gets to the A>, I was recently debugging the Altair SIMH simulation on a Propeller chip and had a trace on reading 128 byte sectors on the bootup, and it reads about 20 of these before getting to A>. So it would be quite tedious to debug that with trace.

    I'm still not 100% sure what you have working - do you have source files as in things you can read with a text editor, and if so, can you add in little bits of code, eg something that does a CONOUT and prints a letter, so you can see where it is getting to? Eg, a trace on SELDSK would be handy.

    It ought to be possible to at least work out whether it is the drive access that is the problem (and bypass this if you can edit the source files and recompile).]

    From memory, DDT could trace everything except CP/M itself. Or at least, I never got it to work.

    I'm scrolling through the CP/M source files now seeing where you could put some traces...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •