changeset 2191:d280490500a8

dw3 target added to makefile
author boisy
date Wed, 11 Mar 2009 02:36:56 +0000
parents 7887b4e72100
children 36f6b076fd05
files bootman/bootman.a bootman/mach_coco3.a bootman/makefile makefile rules.mak
diffstat 5 files changed, 37 insertions(+), 44 deletions(-) [+]
line wrap: on
line diff
--- a/bootman/bootman.a	Wed Mar 11 02:20:19 2009 +0000
+++ b/bootman/bootman.a	Wed Mar 11 02:36:56 2009 +0000
@@ -3,57 +3,49 @@
 
 BOOTTRACK equ   0
 
-         PSECT  bootman,$11,0,0,0,entry
+
+         PSECT  bootman,$11,$80,0,0,entry
 
          VSECT
          ENDSECT
 
 TOP      EQU   $FE00
 
-*         ORG   $2600
-
-* This code is executed first - it moves the actual boot manager code
-* into high RAM so it is out of the way to load boot files
-         fcc    "OS"
-entry
-         lds    #TOP-1             set stack to absolute TOP - 1
-         ldd    #bmgrsiz           get size of boot manager
-         pshs   d                  save on stack
-         ldd    #TOP               get address at top
-         subd   ,s++               subtract size of boot manager
-         clrb                      D now holds the address where we copy boot manager
-         deca                      minus 256 bytes for stack 
-         deca                      minus 256 bytes for statics
-         
-         pshs   d                  save address for later
-
-         tfr    d,u                place boot manager's dest addr in U
-         ldd    #bmgrsiz
-         leax   bootmain,pcr
-cloop    ldy    ,x++
-         sty    ,u++
-         subd   #$0002
-         bgt    cloop
-
-         jmp    ,s++               send control to moved code
-         
 * The entry point of the boot manager
 * Entry: stack is set up, U points to static storage
          csect
 sectptr  rmb    2
          endsect
 
-bootmain lbsr   mach_init   initialize the machine we're running on
-         lds    #$FDFF      set up stack
-         ldu    #$F200      set up static storage
-         leax   256,u
+entry    lbsr   mach_init   initialize the machine we're running on
+         leas   entry,pcr   set up stack
+         leau   entry-256,pcr set up static storage
+         leax   entry-512,pcr set up sector buffer pointer
          stx    sectptr,u
          leax   welcome,pcr
          bsr    writestr
+
+* start booter calling
+bootup
+         leax   cfg_boot,pcr
+         ldy    ,x             get address of booter
+         beq    bootup         if 0, try again
+
+* call booter's get info entry
+         leax   attempt,pcr
+         bsr    writestr
+         jsr    12,y
+         bsr    writestr
+         leax   crlf,pcr
+         bsr    writestr
+
 loop     bra    loop
 
 
+attempt  fcc     "Attempting to boot from "
+         fcb     0
 welcome  fcc     "NitrOS-9 Boot Manager"
+crlf     fcb     13,10
          fcb     0
 
 * Helpful routines
@@ -71,6 +63,4 @@
 writedone
          rts
          
-bmgrsiz  equ     *-bootmain
-
          endsect
--- a/bootman/mach_coco3.a	Wed Mar 11 02:20:19 2009 +0000
+++ b/bootman/mach_coco3.a	Wed Mar 11 02:36:56 2009 +0000
@@ -1,7 +1,7 @@
          NAM    mach_coco
          TTL    CoCo machine routines
 
-         PSECT  mach_coco,0,0,0,0,mach_init
+         PSECT  mach_coco3,0,0,0,0,mach_init
 
          VSECT
          ENDSECT
--- a/bootman/makefile	Wed Mar 11 02:20:19 2009 +0000
+++ b/bootman/makefile	Wed Mar 11 02:36:56 2009 +0000
@@ -1,7 +1,12 @@
 include ../rules.mak
 
+all: bootman_loader bootman
+
+bootman_loader: bootman_loader.a
+	mamou $^ -o$@ -mb
+
 bootman: bootman.r boot_config.r mach_coco3.r llio_6551.r llbt_1773.r
-	$(LINKER) $^ -o=$@ -B
+	$(LINKER) $^ -o=$@
 
 dsk: bootman
 	decb dskini bootman.dsk
--- a/makefile	Wed Mar 11 02:20:19 2009 +0000
+++ b/makefile	Wed Mar 11 02:36:56 2009 +0000
@@ -24,10 +24,8 @@
 	$(foreach dir, $(dirs), ($(CD) $(dir); make dskclean);)
 
 # DriveWire 3 DSK images
-dw3:	dsk
-	$(CP) level1/coco/nos96809l1coco1_dw3.dsk .
-	$(CP) level1/coco/nos96809l1coco2_dw3.dsk .
-	$(CP) level2/coco3/nos96809l2_dw3.dsk .
-	$(CP) level2/coco3_6309/nos96309l2_dw3.dsk .
-	zip -C nitros9.zip nos96809l1coco1_dw3.dsk nos96809l1coco2_dw3.dsk \
-	nos96809l2_dw3.dsk nos96309l2_dw3.dsk
+dw3dsk = $(LEVEL1)/coco/nos96809l1coco1_dw3.dsk $(LEVEL1)/coco/nos96809l1coco2_dw3.dsk \
+	$(LEVEL2)/coco3/nos96809l2_dw3.dsk $(LEVEL2)/coco3_6309/nos96309l2_dw3.dsk
+
+dw3:
+	$(ARCHIVE) nitros9_drivewire3.zip $(dw3dsk)
--- a/rules.mak	Wed Mar 11 02:20:19 2009 +0000
+++ b/rules.mak	Wed Mar 11 02:36:56 2009 +0000
@@ -89,7 +89,7 @@
 LOSETUP		= sudo /sbin/losetup
 LINK		= ln
 SOFTLINK	= $(LINK) -s
-ARCHIVE		= zip -D
+ARCHIVE		= zip -D -j
 
 # Directories
 3RDPARTY	= $(NITROS9DIR)/3rdparty