strange problem (Sunrise CF)

Page 1/5
| 2 | 3 | 4 | 5

By gdx

Prophet (2356)

gdx's picture

29-01-2018, 11:35

Hi,

I have a problem with SC2VIEW and the Sunrise CF interface that I can not determine.
In FAT12, all SC2 picture can be displayed properly but in FAT16 some pictures are poorly displayed. I tried another CF the same images do not display right. Here are some examples :

On a FAT16 partition:


On a FAT12 partition:

The majority of other images are displayed correctly on FAT12 and FAT16. The ROM is the v2.50. Does anyone have this problem too? Any idea to fix that?

SC2VIEW source code and some picture are here.

Login or register to post comments

By Wolverine_nl

Paladin (990)

Wolverine_nl's picture

30-01-2018, 11:30

I am going to try this tonight and see what happens

By AxelF

Champion (323)

AxelF's picture

30-01-2018, 22:20

On what disk i can find your Rambo Image, its great !.

By saccopharynx

Expert (120)

saccopharynx's picture

31-01-2018, 03:22

Most probably, SC2VIEW does not support FAT16. That technically means if some image segments are stored in sectors beyond the first 32MB of your FAT16 partition, such sectors might not be addressable. In other words, #FFFF is the maximum addressable sector for software using the "original" specifications of the BDOS (#F37D) via the #2F function, which requires the first sector to be loaded into the DE register. Thus, only 65535 (#FFFF) sectors (512 bytes each) can effectively be reached, independently of using an increased cluster size that would extend the maximum volume size of a FAT12 further than 32MB. If SC2VIEW reads sectors via the #2F BDOS function, this could cause the corruption while reading/displaying the images.

By saccopharynx

Expert (120)

saccopharynx's picture

31-01-2018, 03:40

I checked the source code and it doesn't use #2F, but the #27 function of the BDOS which reads random blocks. However, I would not be surprised that at some point, internally, the blocks would be translated into physical sectors to subsequently call the PHYDIO routine of the diskrom, resulting in the same limitation I explained before.

By gdx

Prophet (2356)

gdx's picture

31-01-2018, 11:08

AxelF wrote:

On what disk i can find your Rambo Image, its great !.

Here are all the SC2 images I have.

sc2-pics.zip

Saccopharynx,
Would that mean that the ROM of Sunrise CF has another bug in FAT16?

By Wolverine_nl

Paladin (990)

Wolverine_nl's picture

31-01-2018, 12:19

From what i read saccopharynx wrote, it is the program itself that assumes certain things that work for FAT12 sectors only.
On this forum there are some topics dealing with similar issues.
A good read is maybe this:
http://www.forensicswiki.org/wiki/FAT

By Grauw

Enlighted (7531)

Grauw's picture

31-01-2018, 12:39

The FAT16 driver probably does not support all DOS1 calls equally well...?

By Wolverine_nl

Paladin (990)

Wolverine_nl's picture

31-01-2018, 12:56

Grauw wrote:

The FAT16 driver probably does not support all DOS1 calls equally well...?

It is also the difference with 12 bit and 16 bit, the DOS1 calls probably only assume 12bit
another interesting read:
http://www.pcguide.com/ref/hdd/file/partSizes-c.html

By Wolverine_nl

Paladin (990)

Wolverine_nl's picture

31-01-2018, 13:05

or the program using DOS1 calls must fill in the blanks in the 16bit values...I dunno, can't find ASM examples of how to do it correctly which is FAT12/16 independent

By Grauw

Enlighted (7531)

Grauw's picture

31-01-2018, 13:11

Normally just using the calls should work transparently, though DOS2 calls are preferred over DOS1 calls (Nextor manual also mentions something along those lines). I think this image viewer hits some kind of edge case, or does something unusual.

Page 1/5
| 2 | 3 | 4 | 5
My MSX profile