Search
lxdream.org :: lxdream/src/gdrom/gdrom.h
lxdream 0.9.1
released Jun 29
Download Now
filename src/gdrom/gdrom.h
changeset 125:49bf45f8210a
next138:afabd7e6d26d
author nkeynes
date Wed Mar 22 14:29:02 2006 +0000 (14 years ago)
permissions -rw-r--r--
last change Rename IDE DMA registers appropriately
Remove forced irq hack
Add correct irq handling for IDE
Miscellaneous WIP for the GD-rom drive
file annotate diff log raw
nkeynes@125
     1
/**
nkeynes@125
     2
 * $Id: gdrom.h,v 1.1 2006-03-22 14:29:02 nkeynes Exp $
nkeynes@125
     3
 *
nkeynes@125
     4
 * This file defines the structures and functions used by the GD-Rom
nkeynes@125
     5
 * disc driver. (ie, the modules that supply a CD image to be used by the
nkeynes@125
     6
 * system).
nkeynes@125
     7
 *
nkeynes@125
     8
 * Copyright (c) 2005 Nathan Keynes.
nkeynes@125
     9
 *
nkeynes@125
    10
 * This program is free software; you can redistribute it and/or modify
nkeynes@125
    11
 * it under the terms of the GNU General Public License as published by
nkeynes@125
    12
 * the Free Software Foundation; either version 2 of the License, or
nkeynes@125
    13
 * (at your option) any later version.
nkeynes@125
    14
 *
nkeynes@125
    15
 * This program is distributed in the hope that it will be useful,
nkeynes@125
    16
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@125
    17
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@125
    18
 * GNU General Public License for more details.
nkeynes@125
    19
 */
nkeynes@125
    20
nkeynes@125
    21
#ifndef dream_gdrom_H
nkeynes@125
    22
#define dream_gdrom_H 1
nkeynes@125
    23
nkeynes@125
    24
#include "dream.h"
nkeynes@125
    25
nkeynes@125
    26
typedef struct gdrom_toc {
nkeynes@125
    27
    uint32_t tracks[99];
nkeynes@125
    28
    uint32_t first, last, leadout;
nkeynes@125
    29
} *gdrom_toc_t;
nkeynes@125
    30
nkeynes@125
    31
nkeynes@125
    32
typedef struct gdrom_disc {
nkeynes@125
    33
    
nkeynes@125
    34
    gboolean (*read_toc)( gdrom_toc_t toc );
nkeynes@125
    35
nkeynes@125
    36
    gboolean (*read_data_sectors)( uint32_t lba, uint32_t sector_count,
nkeynes@125
    37
				   char *buf );
nkeynes@125
    38
} *gdrom_disc_t;
nkeynes@125
    39
nkeynes@125
    40
void gdrom_mount( gdrom_disc_t disc );
nkeynes@125
    41
nkeynes@125
    42
void gdrom_unmount( void );
nkeynes@125
    43
nkeynes@125
    44
#endif
.