Previous Thread
Next Thread
Print Thread
Page 65 of 536 1 2 63 64 65 66 67 535 536
Joined: May 2007
Posts: 566
Likes: 2
M
Senior Member
Offline
Senior Member
M
Joined: May 2007
Posts: 566
Likes: 2
Oh, is this my dear old friend "double-steps" that you resurrected?

Seems so as all my disks fail again after reading halfway. I have to look at the code.

Michael

P.S.: Argh ... what happened to mflopimg.c? This had the vital part in it, to make the floppy work again for the ti99 family.

Last edited by mizapf; 09/20/09 04:30 PM.
Joined: Jul 2007
Posts: 4,625
A
Anna Wu Offline OP
Very Senior Member
OP Offline
Very Senior Member
A
Joined: Jul 2007
Posts: 4,625
Quote:
Seems so as all my disks fail again after reading halfway. I have to look at the code.


I can boot my disks by using the E.Basic/Assembler cartridge.
or you are talking about PCode-Card disks ?


Last edited by Anna Wu; 09/20/09 04:59 PM.
Joined: Feb 2008
Posts: 326
M
Senior Member
Offline
Senior Member
M
Joined: Feb 2008
Posts: 326
mizapf: All is still there translate function is set as before.

Anna:
Strange thing is I can not activate pCard at all, I set it in dip switch but when I look again it is off.

Joined: Jul 2007
Posts: 4,625
A
Anna Wu Offline OP
Very Senior Member
OP Offline
Very Senior Member
A
Joined: Jul 2007
Posts: 4,625
Originally Posted By Anna Wu
Quote:
Seems so as all my disks fail again after reading halfway. I have to look at the code.


I can boot my disks by using the E.Basic/Assembler cartridge.
or you are talking about PCode-Card disks ?



I tried more disks.
You are right, some disks i can boot and some can not as example TI-Artist. So problem not only for PCode-Card exist.

Last edited by Anna Wu; 09/20/09 05:01 PM.
Joined: Jul 2007
Posts: 4,625
A
Anna Wu Offline OP
Very Senior Member
OP Offline
Very Senior Member
A
Joined: Jul 2007
Posts: 4,625
Originally Posted By Micko
mizapf: All is still there translate function is set as before.

Anna:
Strange thing is I can not activate pCard at all, I set it in dip switch but when I look again it is off.


Maybe this thread can be helpful. Anyway, I will send you the .cfg file.

Joined: May 2007
Posts: 566
Likes: 2
M
Senior Member
Offline
Senior Member
M
Joined: May 2007
Posts: 566
Likes: 2
You can verify the problem when using the Disk Manager cartridge and do a disk check. It will fail after half of the tracks.

@Micko: It is not a matter of the track translate function - the problem is that the TI disk controllers try to handle drive/media track count mismatches. Specifically, if the drive can handle 80 tracks and you insert a 40 track disk, the controller ROM tries to detect that and will apply double physical steps for each logical track step. This is a behaviour from the TI ROMs, not from the MESS emulator.

Version 0.98 MESS introduced code on the assumption that one can safely set the media track count equal to the drive track count - which instantly broke the whole TI emulation (until v0.123 where I fixed it). My solution was to include a check in mflopimg.c, internal_floppy_device_load (look for DEVINFO_INT_KEEP_DRIVE_GEOMETRY). Have you moved that somewhere else?

I am aware that a much better solution would be to create a specific drive/image implementation instead of these tricks using basicdsk, and I already planned to do some work there, but for the time being, please make sure that the drive emulation and the medium emulation allow for different track counts. This is simply mirroring the real situation.

Michael

Joined: Jul 2007
Posts: 4,625
A
Anna Wu Offline OP
Very Senior Member
OP Offline
Very Senior Member
A
Joined: Jul 2007
Posts: 4,625
Quote:
You can verify the problem when using the Disk Manager cartridge and do a disk check. It will fail after half of the tracks.


SVN r5817
ti99_4ae driver
Pitfall (Floppy Disk)
Disk Manager 3 (Cartridge)

I can boot the disk and play the game
but

if I check the tracks with the Disk Manager, I get errors.

1st Screenshot: SVN r5817, 2nd Screenshot: official MESS 0.134



Joined: Feb 2008
Posts: 326
M
Senior Member
Offline
Senior Member
M
Joined: Feb 2008
Posts: 326
Michael:

You are right, it is exacly that option that is missing, looking now for easiest way to add it, but it seams I need to update all floppy defs for drivers, with new param.

Joined: Feb 2008
Posts: 326
M
Senior Member
Offline
Senior Member
M
Joined: Feb 2008
Posts: 326
Should be ok now. Parameter added to all configs.

Joined: May 2007
Posts: 566
Likes: 2
M
Senior Member
Offline
Senior Member
M
Joined: May 2007
Posts: 566
Likes: 2
@Micko: Apologies in the name of the TI systems for causing these troubles. As I said, I already planned to clean up the handling, but that turned out not to be so easy as I had to dig deeply into the call stacks and to learn a lot about the device handling in MESS. I think I found a call with depth 20 for reading a sector somewhere, so that's not really something for the coffee break.

I think I have now understood the major part, will try to catch up with your changes. But I would appreciate if you can achieve some workaround for now, promising that I will take care of the restructuring afterwards.

Some more details which I found out two years ago when working on the fix: The TI system allows for industry floppy drives, no special devices from TI, just the controllers. Earlier controllers (with wd17xx) only allow 40 tracks, later controllers (smc92x4) also allowed for 80 track drives. Instead of doing a test seek, the creator of the advanced controller decided to make use of dip switches to inform the controller about the number of physical tracks of the attached drive.

We now have a majority of disk images from 40 track drives and also some images from 80 track drives. Consequently, we need to support the 80 track drives which must also cope with 40 track images.

The disk controller reads the actual number of tracks from an entry in sector 0 of the disk. If it finds it as 40 tracks (from the disk image) but it is an 80 track drive (from the dip switch), it knows that it will have to issue two seek actions per medium track. This is done by the disk controller ROM.

If you now override the device track count with the medium track count, you will get into trouble: From the 40th track on, the drive will refuse any further seek commands, but the controller believes to be at medium track 20. This will raise an error condition. As SSSD disk images on the TI have 360 sectors, you get a seek error from sector 180 upwards.

Now for Anna's observation: The disk directory is located in early sectors, so you have a good chance that the directory is fully intact, and so are all files below the middle of the disk. Within the image emulation, the track translation maps the track count back to the logical track number/2, so everything is again readable up to that point. But any file that extends beyond the middle track will be unreadable.

Michael

Page 65 of 536 1 2 63 64 65 66 67 535 536

Link Copied to Clipboard
Who's Online Now
2 members (R. Belmont, 1 invisible), 42 guests, and 7 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,980
Posts117,953
Members5,003
Most Online890
Jan 17th, 2020
Forum Host
These forums are hosted by www.retrogamesformac.com
Forum hosted by www.retrogamesformac.com