view bootman/mach_coco.a @ 2811:611715587834 lwtools-port

Updated rules.mak and level1/coco1/bootfiles/makefile Updated the rules.mak file to remove the format entire image related to drivewire server disk images. Updated level1/coco1/bootfiles/makefile to create 3 new bootfile images. These images are stripped down to just the common files needed for vovdg games on os9 level 1. These bootfiles are for becker, dw, and arduino. Also corrected a duplicated dd descriptor when building some bootfiles that had both floppy_40d, floppy_80d, RBDW, RBBECKER, and RBARDUINO. Removed the dd descriptor from each of these sections and made it where the dd descriptor for the specific section was added in the main bootfile list.
author David Ladd <drencor-xeen@users.sf.net>
date Mon, 11 Feb 2013 20:16:24 -0600
parents 2db06bc0742a
children
line wrap: on
line source

         NAM    mach_coco
         TTL    CoCo machine routines

         PSECT  mach_coco,0,0,0,0,mach_init

         VSECT
         ENDSECT

PIA0Base equ   $FF00
PIA1Base equ   $FF20

mach_init:
* CoCo 1/2 Initialization Code
         ldx   #PIA1Base               PIA1
         clr   -3,x                    clear PIA0 Control Register A
         clr   -1,x                    clear PIA0 Control Register B
         clr   -4,x                    set PIA0 side A to input
         ldd   #$FF34
         sta   -2,x                    set PIA0 side B to output
         stb   -3,x                    enable PIA0 peripheral reg, disable PIA0
         stb   -1,x                    MPU interrupts, set CA2, CA1 to outputs
         clr   1,x                     $FF20 = DDR, motoroff
         clr   3,x                     $FF22 = DDR, sound disabled
         deca                          A = $FE after deca
         sta   ,x                      bits 1-7 are outputs, bit 0 is input on PIA1 side A
         lda   #$F8
         sta   2,x                     bits 0-2 are inputs, bits 3-7 are outputs on B side
         stb   1,x                     enable peripheral registers, disable PIA1 MPU
         stb   3,x                     interrupts and set CA2, CB2 as outputs
         clr   2,x                     set 6847 mode to alphanumeric
         ldb   #$02
         stb   ,x                      make RS-232 output marking
         clrb
         tfr   b,dp                    B = 0
         ldb   #$04
         clr   -2,x
         bitb  2,x

         lda   #$37
         sta   PIA1Base+3

         lda   PIA0Base+3
         ora   #$01
         sta   PIA0Base+3

         lda   PIA1Base+2
         anda  #$07
         sta   PIA1Base+2

* 64K DRAM (M0=0, M1=1)
         sta   $FFDA                   RESET M0
         sta   $FFDD                   SET   M1

         rts
         
         endsect