Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

Job1541 Class Reference

#include <1541job.h>

Collaboration diagram for Job1541:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Job1541 (uint8 *ram1541, C64 *c64)
 ~Job1541 ()
void GetState (Job1541State *state)
void SetState (Job1541State *state)
void NewPrefs (Prefs *prefs)
void MoveHeadOut (void)
void MoveHeadIn (void)
bool SyncFound (void)
uint8 ReadGCRByte (void)
uint8 WPState (void)
void WriteSector (void)
void FormatTrack (void)

Private Member Functions

void open_d64_file (char *filepath)
void close_d64_file (void)
bool read_sector (int track, int sector, uint8 *buffer)
bool write_sector (int track, int sector, uint8 *buffer)
void format_disk (void)
int secnum_from_ts (int track, int sector)
int offset_from_ts (int track, int sector)
void gcr_conv4 (uint8 *from, uint8 *to)
void sector2gcr (int track, int sector)
void disk2gcr (void)

Private Attributes

uint8ram
FILE * the_file
int image_header
uint8 id1
uint8 id2
uint8 error_info [683]
uint8gcr_data
uint8gcr_ptr
uint8gcr_track_start
uint8gcr_track_end
int current_halftrack
bool write_protected
bool disk_changed
PrefsThePrefs

Constructor & Destructor Documentation

Job1541::Job1541 uint8 ram1541,
C64 c64
 

Definition at line 72 of file 1541job.cpp.

References __CHECK_NULL, CTOR, current_halftrack, disk_changed, Prefs::DrivePath, Prefs::Emul1541Proc, gcr_data, GCR_DISK_SIZE, gcr_ptr, gcr_track_end, GCR_TRACK_SIZE, gcr_track_start, open_d64_file(), the_file, ThePrefs, ThePrefs, and uint8.

Job1541::~Job1541  ) 
 

Definition at line 96 of file 1541job.cpp.

References close_d64_file(), DTOR, and gcr_data.


Member Function Documentation

void Job1541::close_d64_file void   )  [private]
 

Definition at line 190 of file 1541job.cpp.

References fclose, and the_file.

Referenced by NewPrefs(), and ~Job1541().

void Job1541::disk2gcr void   )  [private]
 

Definition at line 401 of file 1541job.cpp.

References num_sectors, NUM_TRACKS, and sector2gcr().

Referenced by open_d64_file().

void Job1541::format_disk void   )  [private]
 

void Job1541::FormatTrack void   ) 
 

Definition at line 219 of file 1541job.cpp.

References error_info, id1, id2, memset, NUM_SECTORS, num_sectors, ram, sector2gcr(), uint8, and write_sector().

Referenced by MOS6502_1541::EmulateLine().

void Job1541::gcr_conv4 uint8 from,
uint8 to
[private]
 

Definition at line 322 of file 1541job.cpp.

References gcr_table, and uint16.

Referenced by sector2gcr().

void Job1541::GetState Job1541State state  ) 
 

Definition at line 448 of file 1541job.cpp.

References current_halftrack, Job1541State::current_halftrack, disk_changed, Job1541State::disk_changed, gcr_data, gcr_ptr, Job1541State::gcr_ptr, write_protected, and Job1541State::write_protected.

Referenced by C64::Save1541JobState().

void Job1541::MoveHeadIn void   ) 
 

Definition at line 431 of file 1541job.cpp.

References current_halftrack, gcr_data, gcr_ptr, GCR_SECTOR_SIZE, gcr_track_end, GCR_TRACK_SIZE, gcr_track_start, num_sectors, and NUM_TRACKS.

Referenced by MOS6502_1541::write_byte_io().

void Job1541::MoveHeadOut void   ) 
 

Definition at line 414 of file 1541job.cpp.

References current_halftrack, gcr_data, gcr_ptr, GCR_SECTOR_SIZE, gcr_track_end, GCR_TRACK_SIZE, gcr_track_start, and num_sectors.

Referenced by MOS6502_1541::write_byte_io().

void Job1541::NewPrefs Prefs prefs  ) 
 

Definition at line 109 of file 1541job.cpp.

References close_d64_file(), disk_changed, Prefs::DrivePath, Prefs::Emul1541Proc, open_d64_file(), strcmp, and ThePrefs.

Referenced by C64::NewPrefs().

int Job1541::offset_from_ts int  track,
int  sector
[private]
 

Definition at line 303 of file 1541job.cpp.

References num_sectors, NUM_TRACKS, and sector_offset.

Referenced by read_sector(), and write_sector().

void Job1541::open_d64_file char *  filepath  )  [private]
 

Definition at line 132 of file 1541job.cpp.

References disk2gcr(), error_info, fclose, fopen, fread, fseek, ftell, gcr_data, GCR_DISK_SIZE, id1, id2, image_header, memset, NUM_SECTORS, read_sector(), the_file, uint8, and write_protected.

Referenced by Job1541(), and NewPrefs().

bool Job1541::read_sector int  track,
int  sector,
uint8 buffer
[private]
 

Definition at line 251 of file 1541job.cpp.

References fread, fseek, ftell, image_header, offset_from_ts(), and the_file.

Referenced by open_d64_file(), and sector2gcr().

uint8 Job1541::ReadGCRByte void   )  [inline]
 

Definition at line 92 of file 1541job.h.

References gcr_ptr, gcr_track_end, gcr_track_start, and uint8.

Referenced by MOS6502_1541::read_byte_io().

int Job1541::secnum_from_ts int  track,
int  sector
[private]
 

Definition at line 298 of file 1541job.cpp.

References sector_offset.

void Job1541::sector2gcr int  track,
int  sector
[private]
 

Definition at line 351 of file 1541job.cpp.

References gcr_conv4(), gcr_data, GCR_SECTOR_SIZE, GCR_TRACK_SIZE, id1, id2, memset, read_sector(), and uint8.

Referenced by disk2gcr(), FormatTrack(), and WriteSector().

void Job1541::SetState Job1541State state  ) 
 

Definition at line 461 of file 1541job.cpp.

References Job1541State::current_halftrack, current_halftrack, Job1541State::disk_changed, disk_changed, gcr_data, Job1541State::gcr_ptr, gcr_ptr, GCR_SECTOR_SIZE, gcr_track_end, GCR_TRACK_SIZE, gcr_track_start, num_sectors, Job1541State::write_protected, and write_protected.

Referenced by C64::Load1541JobState().

bool Job1541::SyncFound void   )  [inline]
 

Definition at line 75 of file 1541job.h.

References gcr_ptr, gcr_track_end, and gcr_track_start.

Referenced by MOS6502_1541::read_byte_io().

uint8 Job1541::WPState void   )  [inline]
 

Definition at line 105 of file 1541job.h.

References disk_changed, uint8, and write_protected.

Referenced by MOS6502_1541::read_byte_io().

bool Job1541::write_sector int  track,
int  sector,
uint8 buffer
[private]
 

Definition at line 275 of file 1541job.cpp.

References fseek, ftell, fwrite, image_header, offset_from_ts(), and the_file.

Referenced by FormatTrack(), and WriteSector().

void Job1541::WriteSector void   ) 
 

Definition at line 203 of file 1541job.cpp.

References ram, sector2gcr(), uint16, and write_sector().

Referenced by MOS6502_1541::EmulateLine().


Member Data Documentation

int Job1541::current_halftrack [private]
 

Definition at line 55 of file 1541job.h.

Referenced by GetState(), Job1541(), MoveHeadIn(), MoveHeadOut(), and SetState().

bool Job1541::disk_changed [private]
 

Definition at line 58 of file 1541job.h.

Referenced by GetState(), Job1541(), NewPrefs(), SetState(), and WPState().

uint8 Job1541::error_info[683] [private]
 

Definition at line 49 of file 1541job.h.

Referenced by FormatTrack(), and open_d64_file().

uint8* Job1541::gcr_data [private]
 

Definition at line 51 of file 1541job.h.

Referenced by GetState(), Job1541(), MoveHeadIn(), MoveHeadOut(), open_d64_file(), sector2gcr(), SetState(), and ~Job1541().

uint8* Job1541::gcr_ptr [private]
 

Definition at line 52 of file 1541job.h.

Referenced by GetState(), Job1541(), MoveHeadIn(), MoveHeadOut(), ReadGCRByte(), SetState(), and SyncFound().

uint8* Job1541::gcr_track_end [private]
 

Definition at line 54 of file 1541job.h.

Referenced by Job1541(), MoveHeadIn(), MoveHeadOut(), ReadGCRByte(), SetState(), and SyncFound().

uint8* Job1541::gcr_track_start [private]
 

Definition at line 53 of file 1541job.h.

Referenced by Job1541(), MoveHeadIn(), MoveHeadOut(), ReadGCRByte(), SetState(), and SyncFound().

uint8 Job1541::id1 [private]
 

Definition at line 48 of file 1541job.h.

Referenced by FormatTrack(), open_d64_file(), and sector2gcr().

uint8 Job1541::id2 [private]
 

Definition at line 48 of file 1541job.h.

Referenced by FormatTrack(), open_d64_file(), and sector2gcr().

int Job1541::image_header [private]
 

Definition at line 46 of file 1541job.h.

Referenced by open_d64_file(), read_sector(), and write_sector().

uint8* Job1541::ram [private]
 

Definition at line 44 of file 1541job.h.

Referenced by FormatTrack(), and WriteSector().

FILE* Job1541::the_file [private]
 

Definition at line 45 of file 1541job.h.

Referenced by close_d64_file(), Job1541(), open_d64_file(), read_sector(), and write_sector().

Prefs& Job1541::ThePrefs [private]
 

Definition at line 59 of file 1541job.h.

Referenced by Job1541(), and NewPrefs().

bool Job1541::write_protected [private]
 

Definition at line 57 of file 1541job.h.

Referenced by GetState(), open_d64_file(), SetState(), and WPState().


The documentation for this class was generated from the following files:
Generated on Tue Feb 8 04:12:14 2005 for E32frodo by doxygen 1.3.3