[Coco] [COCO] Putting NitrOS-9 boot track in ROM
David Ladd
davidwladd at gmail.com
Sun Feb 8 13:44:47 EST 2015
Everyone I have a update on the progress of my testing.
After some modifications to the boot_ide.asm I was able to get de-blocking
added so it is possible to boot directly off of the nitros9 volume. I have
tested this code with both VCC using the IDE.DLL(SuperIDE) cart and a image
of my CF card mounted in the master slot.
After my testing was complete on VCC I tried the same ROM image of the boot
track on my SuperIDE and it booted from my CF fine without the need for
HDBDOS, as long as you have a OS9Boot file actually on the os9 volume that
has it linked to LSN0, to boot.
Here is the diff file of the boot_ide.asm file. When building the
deblocking version of the asm file you will need to add a -DDEBLOCK to the
makefile related to the boot_ide or make a new set of lines that creates a
boot_dide with new option.
----------------------------------------------
diff -r 04175ab6b6b3 level1/modules/boot_ide.asm
--- a/level1/modules/boot_ide.asm Thu Jan 29 22:50:30 2015 +0100
+++ b/level1/modules/boot_ide.asm Sun Feb 08 12:04:14 2015 -0600
@@ -55,6 +55,9 @@
bootloc RMB 3 sector pointer; not byte
pointer
bootsize RMB 2 size in bytes
LSN0Ptr RMB 2 LSN0 pointer (used by
boot_common.asm)
+ IFDEF DEBLOCK
+HalfSect RMB 1
+ ENDC
size EQU .
name FCS /Boot/
@@ -125,6 +128,14 @@
pshs x,b
b@ tst Status,y
bmi b@ if =1 then loop
+ IFDEF DEBLOCK
+ clra clear A so we can hold half
sector flag
+ lsr ,s ok shift the 3 bytes on stack
that
+ ror 1,s hold LSN to the right to
create a
+ ror 2,s divide by 2. Then put last
bit in
+ rola A for use as the half sector
flag
+ sta HalfSect,u then store the flag on the
stack
+ ENDC
lda mode,u
sta DevHead,y 0L0d/0hhh device=CHS
r@ ldb Status,y is IDE ready for commands?
@@ -185,6 +196,11 @@
ldx blockloc,u
clr ,s
+ IFDEF DEBLOCK
+ lda HalfSect,u load half sector flag
+ cmpa #$01 check to see which routine we
+ beq Blk2Lp need and branch to it.
+ ENDC
BlkLp
lda DataReg,y A <- IDE
ldb Latch,y
@@ -195,13 +211,27 @@
dec ,s
bne b@
+BlkEnx
leax -256,x
stx 1,s
lda Status,y check for error-bit
- clrb
+ clrb
puls b,x,pc
-
+ IFDEF DEBLOCK
+Blk2Lp
+ lda DataReg,y A <- IDE
+ inc ,s Here we toss out the
+ bpl Blk2Lp first 256 bytes of the sector
+ clr ,s
+b2@
+ lda DataReg,y Now we read the second
+ ldb Latch,y half of the sector and put
+ std ,x++ into RAM
+ inc ,s
+ bpl b2@ go get the rest
+ bra BlkEnx
+ ENDC
* ------------------------------------------
After this code is tested a few more times I hope to submit this to the
repo. With the changes to the makefile's so the new kernel file is created
ready for use.
+----------+
|David Ladd|
+----------+
More information about the Coco
mailing list