Close

Other Work

A project log for My CP/M Version 1A

I decided to do a minor upgrade to My CP/M (Version 1). Swap RST6.5 for RST7.5 and increase the FRAM disk capacity from 32k to 256k.

agpcooperagp.cooper 07/24/2020 at 07:320 Comments

Unlocking the Boot Block

Finally found out how to unlock the Boot Block on the Flash Chip. It's undocumented but:

instead of:

  [0x0000]=0x00

as used in the Boot Block lock sequence (documented), its:

  [0x2AAA]=0xAA

 This unlocks both the lower and upper boot blocks.

I16HEX

I8HEX can be upgraded to I16HEX by added the segment prefix record code (0x02).

Done.

CP/M EMU

Need to update my CP/M emulator of I16HEX as the Flash Disk is more than 64k.

Still working on this, getting close. Found a precedence error:

  ROM[PAGE*0x8000+addr&0x7fff][DISK];

Must be:

  ROM[PAGE*0x8000+(addr&0x7fff)][DISK];

Working better but TYPE only lists 128b of a 254b file?

Loading Some Files Crashes CP/M

I need it to work out why CP/M crashed when I exit some (larger) but not all (generally smaller) programs.

Solved (I think). The faulty logic is that directory record size is 128b (as per Internet directory format documentation). For a 2048b block, it should be 256b per record. My directory calculations are based on 128b per record. This made CP/M load twice the required disk data, over-writing CCP. Or at least I think so, I will fine out tomorrow.

My TEST.COM program works but upon return HALTS the emulator:

$ ./myCPM_EMU
my CP/M EMU Console - Written by Alan Cooper (AlanCooper@StartMail.com)

my CP/M 2.2 V1A

A>B:
B>DIR
B: CC       COM : CC       COM : CC       MSG : AS       COM
B: LN       COM : C        LIB : C        LIB : M        LIB
B: STDIO    H   : MATH     H   : COMPILE  TXT : TEST     C  
B: TEST     COM
B>TYPE TEST.C
#include "stdio.h"
#include "math.h"
main()
{
    char buf[80];
    float r;
    printf("please enter your name: ");
    gets(buf);
    r=sqrt(1.1);
    printf("hello, %s, %f welcome to the growing community of Aztec C users\n", buf,r);
}

B>TEST
please enter your name: AlanX
hello, AlanX, 1.048798 welcome to the growing community of Aztec C users

my CP/M 2.2 V1A

8085 halted
$

So an improvement but CCP is still being trashed(?).

Reloaded all the Flash Disks and ran the machine.

Still the same "my CPM 2.2 V1A" loop. I can run 8k program and return safely but not my 14k TEST program. I must be double loading (28k) and wiping out CCP. Must be something I have to change somewhere.

I can't work it out! Spent a whole day on this. Thinking I should go back to 1kb blocks. 

My CP/M V2

The board is ready and I have the components. For version 2 I am still using software serial but RAM is increased to 56kb (enough for the C compiler) and the Flash disk capacity is increased to 512kb (e.i. W29C040-90B).

New Flash ROM Programmer

Need to design a new flash ROM programmer using a MEGA 2560.

AlanX

Discussions