[Coco] Interbank Incident for Drivewire ?

Robert Gault robert.gault at att.net
Mon Nov 26 11:00:16 EST 2012


Boisy G. Pitre wrote:
> Look in the kernel itself. It sets up the memory map initially, and there may be something incorrectly set.
>

You are right on Boisy. Here is, I think, the offending code. Note the use of 
MaxMem which is, I believe, for Level2 only.

* link to init module
          lda   #Systm+0
          leax  >InitNam,pcr
          os9   F$Link
          lbcs  OS9Cold
          stu   <D.Init
          lda   Feature1,u		get feature byte 1
          bita  #CRCOn			CRC on?
          beq   GetMem			branch if not (already cleared earlier)
          inc   <D.CRC			else turn on CRC checking
GetMem   ldd   MaxMem+1,u		I don't think this exists for Level1 RG
          clrb
          cmpd  <D.MLIM			starts at $EE00
          bcc   L0158
          std   <D.MLIM                  here is the BAD CODE RG
L0158    ldx   <D.FMBM
		IFNE	atari
* In the Atari, memory $0000-$08FF is used by the system
          ldb   #%11111111
          stb   ,x				mark $0000-$07FF as allocated
          stb   $1A,x			mark $D000-$D7FF I/O area as allocated
          ldb   #%10000000		
          stb   1,x				mark $0800-$08FF as allocated
		ELSE
* In the CoCo, memory $0000-$04FF is used by the system
          ldb   #%11111000
          stb   ,x
          	ENDC
          clra
          ldb   <D.MLIM			should be $EE but was corrupted above RG
          negb				should be $12 RG
          tfr   d,y			regY $12 bits to set RG
          negb				$EE first bit number RG
          lbsr  L065A                    F$AllBit

I tested the above by commenting out
          bcc   L0158
          std   <D.MLIM
and when I did that, NitrOS-9 Level1 booted with the missing memory. What really 
should be removed is the whole beginning of GetMem. For Level1 I think it should be
GetMem   clra
L0158    ldx   <D.FMBM

I will patch level1/modules/kernel/krn.asm, create a Drivewire Level1 boot disk, 
stock it with Interbank files, and see what happens.

Robert




More information about the Coco mailing list