;\r
\r
\r
-; ------------------------- Defines for the disk management Structures\r
+;-------------------------- Defines for the disk management Structures\r
\r
;----------------------------------------------- Start of Data Segment\r
\r
.dseg\r
\r
\r
+; Partition table offsets:\r
+tmp_tbl:\r
+ .byte PARTENTRY_SIZE*MAXDISKS\r
\r
; ------------------------------- Start of Code Segment\r
.cseg\r
; ====================================================================\r
; Parameters\r
; --------------------------------------------------------------------\r
-; Registers : none\r
-; Variables : [w] temp Status of Operation\r
-; (0x80 - Operation Failure )\r
-; (others - Operation Suceded)\r
+; \r
+; Registers : [w] temp Number of disk images (raw and fat16) found.\r
+; + 0x80 if sd card changes. (not used, doesn't work)\r
+; SREG : Z according to temp\r
; --------------------------------------------------------------------\r
; Description:\r
; This Function scans an SD-Cards Boot-Sector for valid Partitions.\r
\r
mgr_pend:\r
\r
+#if 0 /* ToDo: ramdisks are not in sd-card partitions */\r
; Initialize RAM-Disks\r
rcall rdsk_add_partition\r
+#endif\r
+\r
+/*\r
+ Don't use change info. It doesn't word reliably with partitions, \r
+ and it doesn't work at all with fat images:\r
+*/\r
+#define CHANGEINFO 0\r
\r
;Store new partitions and check if the SD card has been changed.\r
\r
\r
mov temp,temp3\r
sts ndisks,temp\r
+#if CHANGEINFO\r
brtc mgr_pcpe\r
\r
+; SD card changed.\r
+#endif\r
tst temp\r
breq mgr_pcpe\r
\r
-; SD card not changed.\r
\r
#if FAT16_SUPPORT\r
rcall fat_scan_partition\r
rcall fat_reset_cache
#endif\r
lds temp,ndisks\r
+#if CHANGEINFO\r
sbr temp,0x80\r
+#endif\r
\r
mgr_pcpe:\r
\r
+ tst temp\r
ret\r
\r
\r