; Various functions: init, (RAM) disk, mmc, timer
-; This file needs to get split up.
;
; Copyright (C) 2010 Sprite_tm
; Copyright (C) 2010 Leo C.
.if BOOTWAIT
ldi temp,10
- rcall delay_ms
+ call delay_ms
.endif
ramtestw:
mov temp,xh
eor temp,xl
- mem_write
- adiw xl,1
+ rcall dram_write_pp
brcc ramtestw
printstring "wait..."
ldi temp2,8
ramtestwl:
ldi temp,255
- rcall delay_ms
+ call delay_ms
dec temp2
brne ramtestwl
ldiw x,0
ramfillw:
ldi temp,MEMFILL_VAL
- mem_write
- adiw xl,1
+ rcall dram_write_pp
brcc ramfillw
.endif
printnewline
printstring "Partinit done."
- rcall dsk_cboot ;init (de)blocking buffer\r
+ rcall dsk_cboot ;init (de)blocking buffer
-; Read first sector of first CP/M partition
+; Read first sector of first CP/M partition (ipl)
lds xl,hostparttbl+1
lds xh,hostparttbl+2
lds yh,hostparttbl+4
rcall mmcReadSect
- rcall dsk_cboot ;init (de)blocking buffer
+; rcall dsk_cboot ;init (de)blocking buffer
;First sector of disk or first CP/M partition is in hostbuf.
ldiw x,IPLADDR
iplwriteloop:
ld temp,z+
- mem_write
- adiw xl,1
+ rcall dram_write_pp
cpi zl,low(hostbuf+128)
brne iplwriteloop
cpi zh,high(hostbuf+128)