mgh: fix for default HDD DMA mode, that wasn't correctly set
[open-ps2-loader.git] / modules / hdd / ps2hdd / apa.h
blob8fef40e3ee4f7f9ce765c44165d80c4511e9c5ff
1 /*
2 # _____ ___ ____ ___ ____
3 # ____| | ____| | | |____|
4 # | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5 #-----------------------------------------------------------------------
6 # Copyright 2001-2004, ps2dev - http://www.ps2dev.org
7 # Licenced under Academic Free License version 2.0
8 # Review ps2sdk README & LICENSE files for further details.
10 # $Id: apa.h 577 2004-09-14 14:41:46Z pixel $
13 #ifndef _APA_H
14 #define _APA_H
16 ///////////////////////////////////////////////////////////////////////////////
17 // Function declerations
19 void apaSaveError(u32 device, void *buffer, u32 lba, u32 err_lba);
20 void setPartErrorSector(u32 device, u32 lba);
21 int getPartErrorSector(u32 device, u32 lba, int *lba_out);
22 int getPartErrorName(u32 device, char *name);
24 int apaCheckPartitionMax(u32 device, s32 size);
25 apa_cache *apaFillHeader(u32 device, input_param *params, int start, int next, int prev, int length, int *err);
26 apa_cache *apaInsertPartition(u32 device, input_param *params, u32 sector, int *err);
27 apa_cache *apaFindPartition(u32 device, char *id, int *err);
28 void addEmptyBlock(apa_header *header, u32 *EmptyBlocks);
29 apa_cache *apaAddPartitionHere(u32 device, input_param *params, u32 *EmptyBlocks, u32 sector, int *err);
30 int apaOpen(u32 device, hdd_file_slot_t *fileSlot, input_param *params, int mode);
31 int apaRemove(u32 device, char *id);
32 apa_cache *apaRemovePartition(u32 device, u32 start, u32 next, u32 prev, u32 length);
33 void apaMakeEmpty(apa_cache *clink);
34 apa_cache *apaDeleteFixPrev(apa_cache *clink1, int *err);
35 apa_cache *apaDeleteFixNext(apa_cache *clink, int *err);
36 int apaDelete(apa_cache *clink);
37 int apaCheckSum(apa_header *header);
38 int apaReadHeader(u32 device, apa_header *header, u32 lba);
39 int apaWriteHeader(u32 device, apa_header *header, u32 lba);
40 int apaGetFormat(u32 device, int *format);
41 int apaGetPartitionMax(int totalLBA);
42 apa_cache *apaGetNextHeader(apa_cache *clink, int *err);
43 //int apaGetFreeSectors(u32 device, u32 *free, hdd_hddDeviceBuf *deviceinfo);
45 #endif /* _APA_H */