]> cloudbase.mooo.com Git - avrcpm.git/blobdiff - avrcpm/avr/init.asm
* This code is experimental and may destroy data on disk images!
[avrcpm.git] / avrcpm / avr / init.asm
index 4ffff96751146fe23503e3211ed2cf09f066c5e9..a1b80ac234090b65537964a2f01e4cde930c7ed1 100644 (file)
@@ -201,7 +201,7 @@ ramfillw:
 
 boot_again:
        printnewline
-       printstring "Initing mmc...",0
+       printstring "Initing mmc..."
        printnewline
        lcall   mgr_init_partitions
 
@@ -222,17 +222,14 @@ boot_ipl2:
        lcall   mgr_prnt_parttbl
        printnewline
        printstring "Partinit done."
+       
+       ldi     temp,0
+       rcall   dsk_img_type            ;parameter for boot disk image.
 
-       rcall   dsk_cboot               ;init (de)blocking buffer
+       lcall   dsk_inval_hostbuf       ;init (de)blocking buffer
 
 ; Read first sector of first CP/M partition (ipl)
 
-;      lds     xl,hostparttbl+1
-;      lds     xh,hostparttbl+2
-;      lds     yl,hostparttbl+3
-;      lds     yh,hostparttbl+4
-;      rcall   mmcReadSect
-
 ;      Disk 0
        sts     seekdsk,_0
 ;      Track 0
@@ -241,22 +238,13 @@ boot_ipl2:
 ;      Sector 0
        sts     seeksec,_0
 
-       rcall   dsk_read
-
-;      rcall   dsk_cboot               ;init (de)blocking buffer
-
-;First sector of disk or first CP/M partition is in hostbuf.
+;      Destination
+       ldiw    x,IPLADDR
+       stsw    dmaadr,x
+       
+       lcall   dsk_read
 
-;Save to Z80 RAM (only 128 bytes because that's retro)
-       ldiw z,hostbuf
-       ldiw x,IPLADDR
-iplwriteloop:
-       ld temp,z+
-       rcall   dram_write_pp
-       cpi zl,low(hostbuf+128)
-       brne iplwriteloop
-       cpi zh,high(hostbuf+128)
-       brne iplwriteloop
+;      lift off
        ljmp z80_init