KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
ide.h File Reference

External G2 Bus-based IDE support. More...

#include <arch/types.h>

Go to the source code of this file.

Functions

int ide_read (uint32 linear, uint32 numsects, void *bufptr)
 Read sectors from the hard disk via PIO.
 
int ide_write (uint32 linear, uint32 numsects, void *bufptr)
 Write sectors from the hard disk via PIO.
 
uint32 ide_num_sectors (void)
 Retrieve the number of sectors from the hard disk.
 
int ide_init (void)
 Initialize Navi IDE.
 
void ide_shutdown (void)
 Shutdown Navi IDE.
 

Detailed Description

External G2 Bus-based IDE support.

This file is involved with accessing an IDE controller that is attached to the G2 Bus expansion port. Exact details of how to build such a device have been posted in various places around the Internet. This driver refers to the device built by Megan as a part of the Navi project.

Author
Megan Potter

Function Documentation

◆ ide_init()

int ide_init ( void )

Initialize Navi IDE.

Returns
0 on success (no error conditions defined).

◆ ide_num_sectors()

uint32 ide_num_sectors ( void )

Retrieve the number of sectors from the hard disk.

Returns
The total number of linear sectors.

◆ ide_read()

int ide_read ( uint32 linear,
uint32 numsects,
void * bufptr )

Read sectors from the hard disk via PIO.

Parameters
linearThe address to begin reading from.
numsectsThe number of sectors to read.
bufptrThe buffer to read into.
Returns
0 on success, <0 on error.

◆ ide_shutdown()

void ide_shutdown ( void )

Shutdown Navi IDE.

◆ ide_write()

int ide_write ( uint32 linear,
uint32 numsects,
void * bufptr )

Write sectors from the hard disk via PIO.

Parameters
linearThe address to begin writing to.
numsectsThe number of sectors to write.
bufptrThe buffer to write out of.
Returns
0 on success, <0 on error.