mirror of
https://github.com/erichelgeson/BlueSCSI.git
synced 2025-01-11 09:29:43 +00:00
Merge pull request #98 from mactcp/main
Support for image files larger than 4GB
This commit is contained in:
commit
7b7f19413c
@ -966,8 +966,8 @@ void writeDataPhaseSD(uint32_t adds, uint32_t len)
|
|||||||
SCSI_PHASE_CHANGE(SCSI_PHASE_DATAIN);
|
SCSI_PHASE_CHANGE(SCSI_PHASE_DATAIN);
|
||||||
//Bus settle delay 400ns, file.seek() measured at over 1000ns.
|
//Bus settle delay 400ns, file.seek() measured at over 1000ns.
|
||||||
|
|
||||||
uint32_t pos = adds * m_img->m_blocksize;
|
uint64_t pos = (uint64_t)adds * m_img->m_blocksize;
|
||||||
m_img->m_file.seek(pos);
|
m_img->m_file.seekSet(pos);
|
||||||
|
|
||||||
SCSI_DB_OUTPUT()
|
SCSI_DB_OUTPUT()
|
||||||
for(uint32_t i = 0; i < len; i++) {
|
for(uint32_t i = 0; i < len; i++) {
|
||||||
@ -1061,8 +1061,8 @@ void readDataPhaseSD(uint32_t adds, uint32_t len)
|
|||||||
SCSI_PHASE_CHANGE(SCSI_PHASE_DATAOUT);
|
SCSI_PHASE_CHANGE(SCSI_PHASE_DATAOUT);
|
||||||
//Bus settle delay 400ns, file.seek() measured at over 1000ns.
|
//Bus settle delay 400ns, file.seek() measured at over 1000ns.
|
||||||
|
|
||||||
uint32_t pos = adds * m_img->m_blocksize;
|
uint64_t pos = (uint64_t)adds * m_img->m_blocksize;
|
||||||
m_img->m_file.seek(pos);
|
m_img->m_file.seekSet(pos);
|
||||||
for(uint32_t i = 0; i < len; i++) {
|
for(uint32_t i = 0; i < len; i++) {
|
||||||
m_resetJmp = true;
|
m_resetJmp = true;
|
||||||
#if WRITE_SPEED_OPTIMIZE
|
#if WRITE_SPEED_OPTIMIZE
|
||||||
@ -1093,8 +1093,8 @@ void verifyDataPhaseSD(uint32_t adds, uint32_t len)
|
|||||||
SCSI_PHASE_CHANGE(SCSI_PHASE_DATAOUT);
|
SCSI_PHASE_CHANGE(SCSI_PHASE_DATAOUT);
|
||||||
//Bus settle delay 400ns, file.seek() measured at over 1000ns.
|
//Bus settle delay 400ns, file.seek() measured at over 1000ns.
|
||||||
|
|
||||||
uint32_t pos = adds * m_img->m_blocksize;
|
uint64_t pos = (uint64_t)adds * m_img->m_blocksize;
|
||||||
m_img->m_file.seek(pos);
|
m_img->m_file.seekSet(pos);
|
||||||
for(uint32_t i = 0; i < len; i++) {
|
for(uint32_t i = 0; i < len; i++) {
|
||||||
#if WRITE_SPEED_OPTIMIZE
|
#if WRITE_SPEED_OPTIMIZE
|
||||||
readDataLoop(m_img->m_blocksize, m_buf);
|
readDataLoop(m_img->m_blocksize, m_buf);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user