Overview   Project   Class   Tree   Deprecated   Index 
Nestopia Core API
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

api
Class Nes::Api::Fds

Base
   |
   +--Nes::Api::Fds


class Nes::Api::Fds
extends Base

Famicom Disk System interface.


Inner Classes, Typedefs, and Enums
typedef Nes::Api::Fds::DiskCallback
          Disk event callback prototype.
struct Nes::Api::Fds::DiskData
          Disk data context.
typedef Nes::Api::Fds::DriveCallback
          Drive event callback prototype.
enum Nes::Api::Fds::Event
          Disk event.
enum Nes::Api::Fds::Motor
          Drive event.
 
Field Summary
 static Nes::Api::Fds::DiskCaller diskCallback
          Disk event callback manager.
 static Nes::Api::Fds::DriveCaller driveCallback
          Drive event callback manager.
 
Constructor Summary
Fds( T& instance )
          Interface constructor.
 
Method Summary
 bool CanChangeDiskSide() const
          Checks if the current disk can change side.
 Result ChangeSide()
          Changes disk side.
 Result EjectDisk()
          Ejects disk.
 Result GetBIOS( std::ostream& stream ) const
          Stores the current BIOS in an output stream.
 int GetCurrentDisk() const
          Returns the current disk inserted.
 int GetCurrentDiskSide() const
          Returns the current disk side.
 Result GetDiskData( uint side, Nes::Api::Fds::DiskData& data ) const
          Returns disk information.
 uint GetNumDisks() const
          Returns the total number of disks.
 uint GetNumSides() const
          Returns the total number of disks and their sides.
 bool HasBIOS() const
          Checks if a BIOS has been loaded.
 bool HasHeader() const
          Checks if the current loaded image comes with a file header.
 Result InsertDisk( uint disk, uint side )
          Inserts a disk.
 bool IsAnyDiskInserted() const
          Checks if a disk is inserted.
 Result SetBIOS( std::istream* stream )
          Sets BIOS.
 

Field Detail

diskCallback

public static Nes::Api::Fds::DiskCaller diskCallback;
Disk event callback manager. Static object used for adding the user defined callback.

driveCallback

public static Nes::Api::Fds::DriveCaller driveCallback;
Drive event callback manager. Static object used for adding the user defined callback.


Constructor Detail

Fds

public Fds( T& instance );
Interface constructor.
Parameters:
instance - emulator instance


Method Detail

CanChangeDiskSide

public bool CanChangeDiskSide() const throw();
Checks if the current disk can change side.
Returns:
true if disk can change side

ChangeSide

public Result ChangeSide() throw();
Changes disk side.
Returns:
result code

EjectDisk

public Result EjectDisk() throw();
Ejects disk.
Returns:
result code

GetBIOS

public Result GetBIOS( std::ostream& stream ) const throw();
Stores the current BIOS in an output stream.
Parameters:
output - stream
Returns:
result code

GetCurrentDisk

public int GetCurrentDisk() const throw();
Returns the current disk inserted.
Returns:
current disk or NO_DISK if none

GetCurrentDiskSide

public int GetCurrentDiskSide() const throw();
Returns the current disk side.
Returns:
0(A), 1(B) or NO_DISK if no disk inserted

GetDiskData

public Result GetDiskData( uint side, Nes::Api::Fds::DiskData& data ) const throw();
Returns disk information.
Parameters:
side - disks and sides index
data - object to be filled
Returns:
result code

GetNumDisks

public uint GetNumDisks() const throw();
Returns the total number of disks.
Returns:
number

GetNumSides

public uint GetNumSides() const throw();
Returns the total number of disks and their sides.
Returns:
number

HasBIOS

public bool HasBIOS() const throw();
Checks if a BIOS has been loaded.
Returns:
true if a BIOS has been loaded.

HasHeader

public bool HasHeader() const throw();
Checks if the current loaded image comes with a file header.
Returns:
true if it comes with a file header

InsertDisk

public Result InsertDisk( uint disk, uint side ) throw();
Inserts a disk.
Parameters:
disk - disk number
side - disk side, 0(A) or 1(B)
Returns:
result code

IsAnyDiskInserted

public bool IsAnyDiskInserted() const throw();
Checks if a disk is inserted.
Returns:
true if a disk is inserted

SetBIOS

public Result SetBIOS( std::istream* stream ) throw();
Sets BIOS.
Parameters:
input - stream to ROM binary or iNES file, set to NULL to remove current BIOS

 Overview   Project   Class   Tree   Deprecated   Index 
Nestopia Core API
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD