Disabling auto-refresh of game list by default, as it is causing bugs sometimes
[open-ps2-loader.git] / modules / hdd / ps2hdd / cache.h
blob3af14d9edb8f4be04d7db512cda6acdc32fce9c2
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: cache.h 577 2004-09-14 14:41:46Z pixel $
13 #ifndef _CACHE_H
14 #define _CACHE_H
16 #define CACHE_FLAG_DIRTY 0x01
17 typedef struct sapa_cache
19 struct sapa_cache *next;
20 struct sapa_cache *tail;
21 u16 flags;
22 u16 nused;
23 u32 device;
24 u32 sector;
25 apa_header *header;
26 } apa_cache;
28 ///////////////////////////////////////////////////////////////////////////////
29 // Function declerations
31 int cacheInit(u32 size);
32 void cacheLink(apa_cache *clink, apa_cache *cnew);
33 apa_cache *cacheUnLink(apa_cache *clink);
34 int cacheTransfer(apa_cache *clink, int type);
35 void cacheFlushDirty(apa_cache *clink);
36 int cacheFlushAllDirty(u32 device);
37 apa_cache *cacheGetHeader(u32 device, u32 sector, u32 mode, int *err);
38 void cacheAdd(apa_cache *clink);
39 apa_cache *cacheGetFree();
41 #endif /* _CACHE_H */