# HG changeset patch # User boisy # Date 1062435590 0 # Node ID 1f0995cd0431339727677efc0c4fab983e96cb28 # Parent bfb91dc51fb6065909483e6c8a5e899ed501e681 REL is now back-ported to OS-9 Level One diff -r bfb91dc51fb6 -r 1f0995cd0431 level1/ChangeLog --- a/level1/ChangeLog Mon Sep 01 16:25:55 2003 +0000 +++ b/level1/ChangeLog Mon Sep 01 16:59:50 2003 +0000 @@ -1,4 +1,5 @@ OS-9 Level One V03.01.05: +- REL is now back-ported to OS-9 Level One. - The faster PipeMan, Piper and Pipe have been back-ported from OS-9 Level Two. - The MDir utility now shows proper module revision of 0 and other minor improvements in extended output. diff -r bfb91dc51fb6 -r 1f0995cd0431 level1/modules/makefile --- a/level1/modules/makefile Mon Sep 01 16:25:55 2003 +0000 +++ b/level1/modules/makefile Mon Sep 01 16:59:50 2003 +0000 @@ -7,7 +7,7 @@ BOOTERS = boot_1773_6ms boot_1773_30ms \ boot_burke boot_idelba boot_rampak boot_wd1002 -BOOTTRACK = oscode $(BOOTERS) +BOOTTRACK = rel $(BOOTERS) KERNEL = os9 os9p2 SYSMODS = ioman init sysgo_dd sysgo_h0 CLOCKS = clock_elim clock_disto2 clock_disto4 clock_bnb \ @@ -98,7 +98,7 @@ d2_80d.dd: ccdiskdesc.asm $(AS) $< $(ASOUT)$@ $(AFLAGS) $(DSDD80) -aDNum=2 -oscode: oscode.asm +rel: rel.asm $(AS) $(AFLAGS) $(ASOUT)$@ $< -aDragon64=0 sysgo_dd: sysgo.asm diff -r bfb91dc51fb6 -r 1f0995cd0431 level1/modules/oscode.asm --- a/level1/modules/oscode.asm Mon Sep 01 16:25:55 2003 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -******************************************************************** -* oscode - OS-9 Level One V2 bootstrap code -* -* $Id$ -* -* Ed. Comments Who YY/MM/DD -* ------------------------------------------------------------------ -* From Tandy OS-9 Level One VR 02.00.00 -* Also put in conditionals for the Dragon 64 - - IFP1 - use defsfile - ENDC - -ScrnLoc equ $8000 - -* Initial code executed upon booting up to OS-9 - -Start fcc /OS/ - bra L2620 - - fdb $1204 -BootMsg fcc /OSy/ - fcb $60 - fcc /BOOT/ -BootMLen equ *-BootMsg - -L2620 clr PIA0Base+3 - - IFNE Dragon64 - clr PIA0Base+1 added for Dragon, works on CoCo - ENDC - - sta $FFDF turn off ROM -* locate Boot Text Screen at $8000 - ldb #$06 - ldx #$FFC6 -L262B sta ,x++ - decb - bne L262B - sta 1,x - -* Clear VDG screen - ldx #ScrnLoc - ldy #512 - lda #$60 -L263B sta ,x+ - leay -1,y - bne L263B - -* Copy "OS9 BOOT" to screen area - ldx #ScrnLoc+$10C - leay Start,pcr - ldx #$FE80-Bt.Start - ldy #Bt.Start -L2663 lda ,u+ - sta ,y+ - leax -1,x - bne L2663 - jmp >Bt.Start+L266E -L266E leax $FFDF added for OS-9 ROM Kit boots +BGP+ + +start1 orcc #IntMasks turn off IRQ's + clr >PIA0Base+3 turn off SAM IRQ's + clra make A=0 for later + IFNE H6309 + tfr 0,dp set direct page to $0000 + ELSE + tfr a,dp + ENDC + clr $FFA0 map in block 0 + lds #$1FFF set stack to the end of the block + stb ,-s save status of start, $00=cold, $01=warm +* This is done so I can tell what went on in the direct page if there's +* a crash. 0(crash) 1(reset) -1(startup) + beq Cont --don't clear out direct page is it's a crash + ldb #$20 start out at $20 + tfr d,x here, too +L0072 sta ,x+ clear out the direct page + incb Boot won't be using any of it! + bne L0072 BUT RAMMER/MD DOES!!! + inc $FFD9 set to high speed + leay -$0100,x (saves 1 byte) +L0084 ldu ,y++ get the bytes + stu d,x save in the hardware + stu ,x++ and in the direct page + cmpx #$00A0 end of video hardware yet? + bcs L0084 + + IFEQ Width-32 + ldd #$1200 color 0=$12, 1=$00 i.e. black on green + ELSE + ldd #$3F00 color 0=$3F, 1=$00, i.e. black on white + ENDC + std >$FFB0 set only the first two palettes, B=$00 already + lda #Bt.Block + sta >$FFA4 map in the block + + ldx #$8000 start of the block + IFNE H6309 + ldq #Bt.Flag*65536+8 + ELSE + ldd #Bt.Flag + ENDC + tst ,s check status : 0(crash) 1(reset) -1(startup) + bmi StoreQ if NOT a crash or reset, start at the start... + cmpd ,x are they the same? + beq MoveTxt don't bother clearing the screen if it's there +StoreQ + IFNE H6309 + stq ,x otherwise save the bytes on-screen + ELSE + std ,x + ldd #8 + std 2,x + ENDC + + leax 8,x point to the start of the screen in memory + IFNE H6309 + ldw #$2000-8 clear out the entire block of memory + leau $FF40 turn off disk drives +L00E0 bra L00E0 loop forever + +Move1 ldy ,u++ get where to put the text + IFNE H6309 +Move ldf ,u+ get the size of the block to move +L00FD tfm u+,y+ + ELSE +Move clra + ldb ,u+ + tfr d,x +L00FD lda ,u+ + sta ,y+ + leax -1,x + bne L00FD + ENDC + rts + +L0011 fdb ScStart+(11*Width)+((Width-L1)/2) + fcb L1 length of the text below +T1 equ * + IFNE NitrOS9 + fcc /NITR/ + ENDC + fcc /OS9 BOOT/ +L1 equ *-T1 + + fdb ScStart+(13*Width)+((Width-LFail)/2) + fcb LFail length of the 'FAILED' string +TFail fcc /FAILED/ +LFail equ *-TFail + +* saves 2 bytes over leax Offset+L0101 + +BtDebug pshs cc,d,x save the register + orcc #IntMasks turn IRQ's off + ldb #Bt.Block block to map in + stb >$FFA0 map the boot screen into block 0 + ldx >$0002 where to put the bytes + sta ,x+ put the character on-screen + stx >$0002 save updated address + clr >$FFA0 map block 0 in again + puls cc,d,x,pc restore X and exit + +L0101 + lda #$7E RTS + sta $FF91 go to map type 0 - called by CC3Go from map 1 + jmp >Offset+crash + + fcb $00 warm start flag + fdb $0074 go to $0074, next routine + +* reset vector: map ROMs out and go to REL in the default DECB block map, +* which is still block $3F at the top fo memory + nop required for the ROMs to believe it's a reset vector + clr >$FFDF go to all RAM mode + jmp >Offset+reset and re-start the boot + +Pad fill $39,$127-* + + ELSE + +start clr PIA0Base+3 + + IFNE Dragon64 + clr PIA0Base+1 added for Dragon, works on CoCo + ENDC + + sta $FFDF turn off ROM +* locate Boot Text Screen at $8000 + ldb #$06 + ldx #$FFC6 +L262B sta ,x++ + decb + bne L262B + sta 1,x + +* Clear VDG screen + ldx #ScStart + ldy #512 + lda #$60 +L263B sta ,x+ + leay -1,y + bne L263B + +* Copy "OS9 BOOT" to screen area + ldx #ScStart+$10C + leay Begin,pcr + ldx #$FE80-Bt.Start + ldy #Bt.Start +L2663 lda ,u+ + sta ,y+ + leax -1,x + bne L2663 + jmp >Bt.Start+L266E +L266E leax $FFDF added for OS-9 ROM Kit boots +BGP+ - -start1 orcc #IntMasks turn off IRQ's - clr >$FF03 turn off SAM IRQ's - clra make A=0 for later - IFNE H6309 - tfr 0,dp set direct page to $0000 - ELSE - tfr a,dp - ENDC - clr $FFA0 map in block 0 - lds #$1FFF set stack to the end of the block - stb ,-s save status of start, $00=cold, $01=warm -* This is done so I can tell what went on in the direct page if there's -* a crash. 0(crash) 1(reset) -1(startup) - beq Cont --don't clear out direct page is it's a crash - ldb #$20 start out at $20 - tfr d,x here, too -L0072 sta ,x+ clear out the direct page - incb Boot won't be using any of it! - bne L0072 BUT RAMMER/MD DOES!!! - inc $FFD9 set to high speed - leay -$0100,x (saves 1 byte) -L0084 ldu ,y++ get the bytes - stu d,x save in the hardware - stu ,x++ and in the direct page - cmpx #$00A0 end of video hardware yet? - bcs L0084 - - IFEQ Width-32 - ldd #$1200 color 0=$12, 1=$00 i.e. black on green - ELSE - ldd #$3F00 color 0=$3F, 1=$00, i.e. black on white - ENDC - std >$FFB0 set only the first two palettes, B=$00 already - lda #Bt.Block - sta >$FFA4 map in the block - - ldx #$8000 start of the block - IFNE H6309 - ldq #Bt.Flag*65536+8 - ELSE - ldd #Bt.Flag - ENDC - tst ,s check status : 0(crash) 1(reset) -1(startup) - bmi StoreQ if NOT a crash or reset, start at the start... - cmpd ,x are they the same? - beq MoveTxt don't bother clearing the screen if it's there -StoreQ - IFNE H6309 - stq ,x otherwise save the bytes on-screen - ELSE - std ,x - ldd #8 - std 2,x - ENDC - - leax 8,x point to the start of the screen in memory - IFNE H6309 - ldw #$2000-8 clear out the entire block of memory - leau $FF40 turn off disk drives -L00E0 bra L00E0 loop forever - -Move1 ldy ,u++ get where to put the text - IFNE H6309 -Move ldf ,u+ get the size of the block to move -L00FD tfm u+,y+ - ELSE -Move clra - ldb ,u+ - tfr d,x -L00FD lda ,u+ - sta ,y+ - leax -1,x - bne L00FD - ENDC - rts - -L0011 fdb ScStart+(11*Width)+((Width-L1)/2) - fcb L1 length of the text below -T1 equ * - IFNE NitrOS9 - fcc /NITR/ - ENDC - fcc /OS9 BOOT/ -L1 equ *-T1 - - fdb ScStart+(13*Width)+((Width-LFail)/2) - fcb LFail length of the 'FAILED' string -TFail fcc /FAILED/ -LFail equ *-TFail - -* saves 2 bytes over leax Offset+L0101 - -BtDebug pshs cc,d,x save the register - orcc #IntMasks turn IRQ's off - ldb #Bt.Block block to map in - stb >$FFA0 map the boot screen into block 0 - ldx >$0002 where to put the bytes - sta ,x+ put the character on-screen - stx >$0002 save updated address - clr >$FFA0 map block 0 in again - puls cc,d,x,pc restore X and exit - -L0101 - lda #$7E RTS - sta $FF91 go to map type 0 - called by CC3Go from map 1 - jmp >Offset+crash - - fcb $00 warm start flag - fdb $0074 go to $0074, next routine - -* reset vector: map ROMs out and go to REL in the default DECB block map, -* which is still block $3F at the top fo memory - nop required for the ROMs to believe it's a reset vector - clr >$FFDF go to all RAM mode - jmp >Offset+reset and re-start the boot - -Pad fill $39,$127-* - - emod -eom equ * - end