clean up some stuff (nw)

This commit is contained in:
Vas Crabb 2019-05-30 00:05:33 +10:00
parent c910c1cf0a
commit 0e7b688283
2 changed files with 7 additions and 12 deletions

View File

@ -196,7 +196,7 @@ bool jvc_format::load(io_generic *io, uint32_t form_factor, floppy_image *image)
uint8_t sector_data[10000];
int sector_offset = 0;
// standard RS-DOS interleave
int interleave[18] = { 0, 11, 4, 15, 8, 1, 12, 5, 16, 9, 2, 13, 6, 17, 10, 3, 14, 7 };
static constexpr int interleave[18] = { 0, 11, 4, 15, 8, 1, 12, 5, 16, 9, 2, 13, 6, 17, 10, 3, 14, 7 };
for (int i = 0; i < sector_count; i++)
{
sectors[interleave[i]].track = track;

View File

@ -14,11 +14,11 @@
*********************************************************************/
#include <assert.h>
#include "emu.h"
#include "formats/os9_dsk.h"
#include "formats/imageutl.h"
#include "formats/os9_dsk.h"
os9_format::os9_format() : wd177x_format(formats)
{
@ -64,19 +64,14 @@ int os9_format::find_size(io_generic *io, uint32_t form_factor)
// now let's see if we have valid info
if ((os9_tracks * os9_heads * os9_sectors * 256) == size) {
for(int i=0; formats[i].form_factor; i++) {
for (int i=0; formats[i].form_factor; i++) {
const format &f = formats[i];
if(form_factor != floppy_image::FF_UNKNOWN && form_factor != f.form_factor)
if (form_factor != floppy_image::FF_UNKNOWN && form_factor != f.form_factor)
continue;
if(os9_tracks == f.track_count) {
if( os9_heads == f.head_count ) {
if(os9_sectors == f.sector_count ) {
return i;
}
}
}
if ((os9_tracks == f.track_count) && (os9_heads == f.head_count) && (os9_sectors == f.sector_count))
return i;
}
}
}