mirror of
https://github.com/holub/mame
synced 2025-04-25 01:40:16 +03:00
abc80x: Fix sector dump floppy image loading. [Curt Coder]
This commit is contained in:
parent
50ac51c146
commit
eb7a055bfa
@ -26,7 +26,7 @@ const char *abc800_format::description() const
|
||||
|
||||
const char *abc800_format::extensions() const
|
||||
{
|
||||
return "dsk";
|
||||
return "dsk,img";
|
||||
}
|
||||
|
||||
const abc800_format::format abc800_format::formats[] = {
|
||||
@ -163,3 +163,22 @@ void abc800_format::build_sector_description(const format &f, uint8_t *sectdata,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int abc800_format::get_image_offset(const format &f, int head, int track) const
|
||||
{
|
||||
int offset = 0;
|
||||
|
||||
if(head) {
|
||||
for(int trk=0; trk < f.track_count; trk++) {
|
||||
const format &tf = get_track_format(f, 0, trk);
|
||||
offset += compute_track_size(tf);
|
||||
}
|
||||
}
|
||||
|
||||
for(int trk=0; trk < track; trk++) {
|
||||
const format &tf = get_track_format(f, head, trk);
|
||||
offset += compute_track_size(tf);
|
||||
}
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
@ -25,6 +25,7 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void build_sector_description(const format &d, uint8_t *sectdata, desc_s *sectors, int track, int head) const override;
|
||||
virtual int get_image_offset(const format &f, int head, int track) const override;
|
||||
|
||||
private:
|
||||
static const format formats[];
|
||||
|
Loading…
Reference in New Issue
Block a user