datajerk / c2t

Retro Code (Apple II, Cosmac VIP) to Tape/Text
BSD 3-Clause "New" or "Revised" License
64 stars 11 forks source link

WARNING: simulated inflate failed at 1000 #1

Closed goretkin closed 8 years ago

goretkin commented 8 years ago

With the disk image: https://archive.org/download/a2_asimov_dangerous_dave When doing ./c2t dangerous_dave.dsk dangerous_dave.wav

I get the following errors:

WARNING: simulated inflate failed at 1000 Segment: 0, start: 0x503D, length: 16322, deflated: 43.07%, data time:14, inflate time:0.00 WARNING: simulated inflate failed at 1000 Segment: 1, start: 0x5960, length: 13983, deflated: 51.23%, data time:12, inflate time:0.00 WARNING: simulated inflate failed at 1001 Segment: 2, start: 0x6CE7, length: 8984, deflated: 68.67%, data time:8, inflate time:0.00 WARNING: simulated inflate failed at 1000 Segment: 3, start: 0x5B2D, length: 13522, deflated: 52.84%, data time:12, inflate time:0.00 WARNING: simulated inflate failed at 1000 Segment: 4, start: 0x7071, length: 8078, deflated: 71.83%, data time:7, inflate time:0.00

From glancing through the code, I'm not sure why compression is on by default. I thought it would be controlled by the flag here: https://github.com/datajerk/c2t/blob/dc09517573b80980e44dfcacbd024ee0c36de30f/c2t.c#L158

It's awesome that you are emulating the decompression!

datajerk commented 8 years ago

Hi, sorry for the late reply, I missed this issue. I just tested:

$ c2t dangerous_dave.dsk dangerous_dave.wav

Reading dangerous_dave.dsk, type disk, segment 1, start: 0x1000, length: 28672
Reading dangerous_dave.dsk, type disk, segment 2, start: 0x1000, length: 28672
Reading dangerous_dave.dsk, type disk, segment 3, start: 0x1000, length: 28672
Reading dangerous_dave.dsk, type disk, segment 4, start: 0x1000, length: 28672
Reading dangerous_dave.dsk, type disk, segment 5, start: 0x1000, length: 28672

Writing dangerous_dave.wav as Apple II formatted wave.

Segment: 0, start: 0x503D, length: 16322, deflated: 43.07%, data time:14, inflate time:6.55
Segment: 1, start: 0x5960, length: 13983, deflated: 51.23%, data time:12, inflate time:5.96
Segment: 2, start: 0x6CE7, length:  8984, deflated: 68.67%, data time:8, inflate time:4.27
Segment: 3, start: 0x5B2D, length: 13522, deflated: 52.84%, data time:12, inflate time:5.72
Segment: 4, start: 0x7071, length:  8078, deflated: 71.83%, data time:7, inflate time:3.89

To load up and run on your Apple II, type:

        LOAD

No problems. Can you check that the disk is 143360 bytes? Also OS/X, Linux, or Windows binary?

thanks.

goretkin commented 8 years ago

I am running on OS X, and if I recall I had compiled it from source.

datajerk commented 8 years ago

@goretkin I just uploaded c2t-96h, can you try that version? Also I recommend with the older c2t to always use -8. BTW, compression is always enabled for disk images (it cannot be disabled).

Output:

$ ~/src/c2t/c2t-96h dangerous_dave.dsk dangerous_dave.aif

Reading dangerous_dave.dsk, type disk, segment 1, start: 0x1000, length: 28672
Reading dangerous_dave.dsk, type disk, segment 2, start: 0x1000, length: 28672
Reading dangerous_dave.dsk, type disk, segment 3, start: 0x1000, length: 28672
Reading dangerous_dave.dsk, type disk, segment 4, start: 0x1000, length: 28672
Reading dangerous_dave.dsk, type disk, segment 5, start: 0x1000, length: 28672

Writing dangerous_dave.aif as Apple II formatted aiff.

Segment: 0, start: 0x503D, length: 16322, deflated: 43.07%, data time: 13.90, inflate time:  6.55
Segment: 1, start: 0x5960, length: 13983, deflated: 51.23%, data time: 11.94, inflate time:  5.96
Segment: 2, start: 0x6CE7, length:  8984, deflated: 68.67%, data time:  7.74, inflate time:  4.27
Segment: 3, start: 0x5B2D, length: 13522, deflated: 52.84%, data time: 11.53, inflate time:  5.72
Segment: 4, start: 0x7071, length:  8078, deflated: 71.83%, data time:  6.96, inflate time:  3.89

Times: Data: 52.069834, Inflate: 26.402116, Audio: 150.470627, File: dangerous_dave.dsk

Play List:

000.00  770Hz Preamble + Sync Bit
004.02  BASIC Header + 770Hz Preamble
008.02  BASIC Stub/Assembly 9600 BPS Code @ 1333 BPS
009.81  INSTA-DISK Code + DOS Load @ 9600 BPS
018.62  Format Disk Delay (2000 Hz)
046.62  Load Segment @ 9600 BPS
060.28  Inflate + Write Delay (2000 Hz)
076.28  Load Segment @ 9600 BPS
087.97  Inflate + Write Delay (2000 Hz)
100.97  Load Segment @ 9600 BPS
108.47  Inflate + Write Delay (2000 Hz)
119.47  Load Segment @ 9600 BPS
130.76  Inflate + Write Delay (2000 Hz)
143.76  Load Segment @ 9600 BPS
150.47  Inflate + Exit

To load up and run on your Apple II, type:

        LOAD