GEMDOS Fseek / Fopen issue

News, questions and bugs reports about CosmosEx by Jookie. Now we have a Raspberry Pi in our machines!

Moderators: Jookie, Moderator Team

User avatar
Cyprian
Atari God
Atari God
Posts: 1404
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

GEMDOS Fseek / Fopen issue

Postby Cyprian » Thu Jan 14, 2016 11:40 pm

I faced an issue with HDD version of Flipo Demo HDD. It loads MSA file a track by track and verifies each of them. On CosmosEx Tanslated drive, after a few tracks it informs that MSA file is bad. There is no issue in case of real floppy drive or emulator.

I did some tests and realized that Fopen from time to time loads data from a wrong file position pointer. In my test it was a one byte earlier that expected.

Also Fseek returns strange values. E.g. when I load 4 bytes Fseek returns $200, for next loaded $1DF bytes it still returns $200. When I load bytes it returns $1200.
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/

User avatar
Cyprian
Atari God
Atari God
Posts: 1404
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: GEMDOS Fseek / Fopen issue

Postby Cyprian » Wed Jan 20, 2016 3:30 pm

Hi Jookie,

attached you can find my test program and below results from Hatari and CosmosEx with Translated drive.

CosmosEx with translated drive:
CosmosEx_ST.gif


Hatari:
CosmosEx_Ha.gif


Legend:
1 - the first word data from loaded data
2 - requested count of bytes to Fread
3 - returned count of bytes by Fread
4 - expected cursor position
5 - returned cursor position by Fseek
You do not have the required permissions to view the files attached to this post.
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/

User avatar
Jookie
Hardware Guru
Hardware Guru
Posts: 1245
Joined: Wed Feb 04, 2004 6:54 pm
Location: Kosice, Slovakia
Contact:

Re: GEMDOS Fseek / Fopen issue

Postby Jookie » Sun Jan 24, 2016 8:02 am

Hello Cyprian,

I tried to run the test tool, but I've hit a problems:
- it complains that there's no Flip*.msa file, but it looks for File_Wri.bin instead. I've took the FLIPO_P.MSA which I've found online, renamed it to File_Wri.bin but it returns different numbers...
Can you please point me in the right direction?

dta_r.jpg


(I've found and fixed the bug in Fseek(..., .., SEEK_CUR) in CE_DD, but I want to test it before claiming I've fixed it ;) ).
You do not have the required permissions to view the files attached to this post.

User avatar
Cyprian
Atari God
Atari God
Posts: 1404
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: GEMDOS Fseek / Fopen issue

Postby Cyprian » Sun Jan 24, 2016 12:24 pm

my fault.
attached you can find all needed files
You do not have the required permissions to view the files attached to this post.
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/

User avatar
Jookie
Hardware Guru
Hardware Guru
Posts: 1245
Joined: Wed Feb 04, 2004 6:54 pm
Location: Kosice, Slovakia
Contact:

Re: GEMDOS Fseek / Fopen issue

Postby Jookie » Tue Feb 02, 2016 9:02 pm

Hello Cyprian.

I finally managed to finish some things, one of them is the Fseek(.., .., SEEK_CUR). That Fseek with SEEK_CUR param (used in your test, and probably in that Flipo demo) never worker correctly, so this time it seems to be working fine for the first time, since the existence of CE_DD. Can you, please, update your device, test that DTA_R test at your place, and if it will seem fine, then also test the Flipo demo at your place?

Cheers,
Jookie

User avatar
Cyprian
Atari God
Atari God
Posts: 1404
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: GEMDOS Fseek / Fopen issue

Postby Cyprian » Tue Feb 02, 2016 9:33 pm

works fine now
thanks Jookie
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/

User avatar
Jookie
Hardware Guru
Hardware Guru
Posts: 1245
Joined: Wed Feb 04, 2004 6:54 pm
Location: Kosice, Slovakia
Contact:

Re: GEMDOS Fseek / Fopen issue

Postby Jookie » Tue Feb 02, 2016 11:21 pm

Cyprian wrote:works fine now


Even the Flipo demo? Because if so, I'll add a note to the Flipo issue thread:
viewtopic.php?f=103&t=29157&p=287190&sid=7c5d55f19eee9c5b1475fefb0b72937c#p287190

Cyprian wrote:thanks Jookie


You're welcome ;)

User avatar
Cyprian
Atari God
Atari God
Posts: 1404
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: GEMDOS Fseek / Fopen issue

Postby Cyprian » Tue Feb 02, 2016 11:27 pm

yes.
I've checked harddish version of Flip-O-Demo and it worked ok with the latest CosmosEx firmware.
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/


Social Media

     

Return to “CosmosEx”

Who is online

Users browsing this forum: No registered users and 2 guests