Skip to content

Commit

Permalink
Merge pull request #98 from mactcp/main
Browse files Browse the repository at this point in the history
Support for image files larger than 4GB
  • Loading branch information
erichelgeson authored Apr 22, 2022
2 parents aa751dc + 961ae0b commit 7b7f194
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/BlueSCSI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -966,8 +966,8 @@ void writeDataPhaseSD(uint32_t adds, uint32_t len)
SCSI_PHASE_CHANGE(SCSI_PHASE_DATAIN);
//Bus settle delay 400ns, file.seek() measured at over 1000ns.

uint32_t pos = adds * m_img->m_blocksize;
m_img->m_file.seek(pos);
uint64_t pos = (uint64_t)adds * m_img->m_blocksize;
m_img->m_file.seekSet(pos);

SCSI_DB_OUTPUT()
for(uint32_t i = 0; i < len; i++) {
Expand Down Expand Up @@ -1061,8 +1061,8 @@ void readDataPhaseSD(uint32_t adds, uint32_t len)
SCSI_PHASE_CHANGE(SCSI_PHASE_DATAOUT);
//Bus settle delay 400ns, file.seek() measured at over 1000ns.

uint32_t pos = adds * m_img->m_blocksize;
m_img->m_file.seek(pos);
uint64_t pos = (uint64_t)adds * m_img->m_blocksize;
m_img->m_file.seekSet(pos);
for(uint32_t i = 0; i < len; i++) {
m_resetJmp = true;
#if WRITE_SPEED_OPTIMIZE
Expand Down Expand Up @@ -1093,8 +1093,8 @@ void verifyDataPhaseSD(uint32_t adds, uint32_t len)
SCSI_PHASE_CHANGE(SCSI_PHASE_DATAOUT);
//Bus settle delay 400ns, file.seek() measured at over 1000ns.

uint32_t pos = adds * m_img->m_blocksize;
m_img->m_file.seek(pos);
uint64_t pos = (uint64_t)adds * m_img->m_blocksize;
m_img->m_file.seekSet(pos);
for(uint32_t i = 0; i < len; i++) {
#if WRITE_SPEED_OPTIMIZE
readDataLoop(m_img->m_blocksize, m_buf);
Expand Down

0 comments on commit 7b7f194

Please sign in to comment.