TI99/4A

HxC Floppy emulator support for all others computers...
Post Reply
floppydev
Posts: 17
Joined: Mon Apr 11, 2011 8:33 am

TI99/4A

Post by floppydev »

Hello,

I tried out SDCard HxC Floppy Emulator on the TI99/4A. I found several problems (detailed description with possible fix later on) with it:
1.) PC99 to HFE format conversion isn't correctly implemented (works on ORDERED disks)
2.) V9T9 to HFE format conversion isn't correctly implemented (doesn't work at all for me)
3.) HFE to IMG format conversion for TI99/4A is not implemented/other track order not preserved
4.) Crash with V1.6.0.0

Is the source code up to date?
If yes, I can implement correct ones (I've already done some work here for V9T9).

===================================================================
Ad 1.)
Main problem is that code assumes that sectors are numbered from 0 .. n and therefore have a fixed location in the file, but this must not be the case!!!
Format looks like: n times sectors, where information on that particular sector is included in the sector as meta information!

Details:
ftp://ftp.whtech.com/emulators/pc99/fmt21-22.txt

When tracks are ordered from 0 .. n on PC99 format it can be read correctly on the TI99, tested with SSSD, SSDD, DSSD, DSDD floppies generated with TI99Dir and files are made full with some content from other disks.

Output from disk.exe from Ti99sim on a non correct disk (unordered sectors):
http://www.mrousseau.org/programs/ti99s ... tml#TOC_4C

E.g.:
Track: 0 Side: 0 - 0 7 5 3 1 8 6 4 2
Track: 1 Side: 0 - 6 4 2 0 7 5 3 1 8
Track: 2 Side: 0 - 3 1 8 6 4 2 0 7 5
Track: 3 Side: 0 - 0 7 5 3 1 8 6 4 2
Track: 4 Side: 0 - 6 4 2 0 7 5 3 1 8

Also 35 track floppies generated with Ti99Dir can not be converted.

Ti99sim looks like to have a correct implementation.
ti99sim-0.0.10\src\core\diskio.cpp
===================================================================
Ad 2.) In the V9T9 file format tracks are ordered in the file position dependent:
Side 0: Track 0 to Track 39
and then on Side 1 from Track 39 DOWNTO Track 0

This can be easily fixed.
===================================================================
Ad 3.) Tried the IMG export option from HFE to IMG (nearly V9T9 format): Same as 2 but an option is missing from the conversion from HFE to V9T9 that tracks are ordered differently
Side 0: Track 0 to Track 39
and the on Side 1 from Track 39 DOWNTO Track 0

Option can be easily added.
===================================================================
Ad 4.) Had a crash when selecting files. Red SDCARD led was on.
===================================================================

Resources:
Helpful programs to generate/modify floppy disks: TI99Dir
http://members.ziggo.nl/fgkaal/Software/sw_ti99dir.html
http://www.mrousseau.org/programs/ti99s ... tml#TOC_4C
disk.exe for showing/converting TI99 floppy disks.

TI99 Disk format:
http://www.texasinstrumentsnotes.info/t ... nfo-needed

Any comments?

Thank you.

floppydev

Jeff
Site Admin
Posts: 8092
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: TI99/4A

Post by Jeff »

floppydev wrote: Is the source code up to date?
No it doesn't.

floppydev
Posts: 17
Joined: Mon Apr 11, 2011 8:33 am

Re: TI99/4A

Post by floppydev »

Jeff wrote:
floppydev wrote: Is the source code up to date?
No it doesn't.
Can you upload the latest version that I can test with it and that we don't have to merge, etc.?

floppydev

Jeff
Site Admin
Posts: 8092
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: TI99/4A

Post by Jeff »

floppydev wrote:
Jeff wrote:
floppydev wrote: Is the source code up to date?
No it doesn't.
Can you upload the latest version that I can test with it and that we don't have to merge, etc.?

floppydev
No since this is a major update (lot of modifications...).
this version cannot be released yet.

floppydev
Posts: 17
Joined: Mon Apr 11, 2011 8:33 am

Re: TI99/4A

Post by floppydev »

Jeff wrote: No since this is a major update (lot of modifications...).
this version cannot be released yet.
Does it make sense to make modifications on the old code?

floppydev

Jeff
Site Admin
Posts: 8092
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: TI99/4A

Post by Jeff »

floppydev wrote:
Jeff wrote: No since this is a major update (lot of modifications...).
this version cannot be released yet.
Does it make sense to make modifications on the old code?

floppydev
Well it's probably time to mount a sourceforge project page....

floppydev
Posts: 17
Joined: Mon Apr 11, 2011 8:33 am

Re: TI99/4A

Post by floppydev »

Jeff wrote:
floppydev wrote:
Jeff wrote: No since this is a major update (lot of modifications...).
this version cannot be released yet.
Does it make sense to make modifications on the old code?

floppydev
Well it's probably time to mount a sourceforge project page....
Good idea with subversion or git ...

floppydev

Jeff
Site Admin
Posts: 8092
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: TI99/4A

Post by Jeff »

floppydev wrote: Good idea with subversion or git ...

floppydev
You can download the last version here :

https://hxc2001.com/floppy_drive_emulat ... rc_dev.zip

floppydev
Posts: 17
Joined: Mon Apr 11, 2011 8:33 am

Re: TI99/4A

Post by floppydev »

Jeff wrote: You can download the last version here :

https://hxc2001.com/floppy_drive_emulat ... rc_dev.zip
Thank you.

floppydev

floppydev
Posts: 17
Joined: Mon Apr 11, 2011 8:33 am

Re: TI99/4A

Post by floppydev »

floppydev wrote:
Jeff wrote: You can download the last version here :

https://hxc2001.com/floppy_drive_emulat ... rc_dev.zip
Thank you.

floppydev
v9t9 "try coding" is completed. I have to set up a build environment ...

Questions regarding ti99pc99loader.c:
1.) Might the tracks/sectors be unordered added in the code (That will made coding easier but I guess still not 100% correct but ready for day2day use):
e.g. put that in that order:
Track 24: Sectors 7 8 6 3 11 ...
Track 22: Sectors 11 8 1 12 ...
...
2.) patchTrackFM/patchtrackMFM:Search algorithm: The bytes which is searched for: Are they only valid in the header or could that data also be detected in the data section and therefore patch wrong?

floppydev

floppydev
Posts: 17
Joined: Mon Apr 11, 2011 8:33 am

Re: TI99/4A

Post by floppydev »

floppydev wrote: You can download the last version here :

https://hxc2001.com/floppy_drive_emulat ... rc_dev.zip

Thank you.

floppydev
BTW: V9T9 loader: Can you review the code regarding FM/MFM track handling. PC version is used. Is this also valid for TI99 Western Digital Floppy Disc controller? Mustn't there also some bytes patched like in the PC99 loader (e.g. CRC, sector header, sector leadout, etc.)?

floppydeb

Jeff
Site Admin
Posts: 8092
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: TI99/4A

Post by Jeff »

floppydev wrote: Questions regarding ti99pc99loader.c:
1.) Might the tracks/sectors be unordered added in the code (That will made coding easier but I guess still not 100% correct but ready for day2day use):
e.g. put that in that order:
Track 24: Sectors 7 8 6 3 11 ...
Track 22: Sectors 11 8 1 12 ...
...
I don't understand why you want change the sector ording since this file image already contains an MFM/FM track with sector into the right order and format.
The only thing to do is to "patch" the track to add missing clock and recompute the crc.
floppydev wrote: 2.) patchTrackFM/patchtrackMFM:Search algorithm: The bytes which is searched for: Are they only valid in the header or could that data also be detected in the data section and therefore patch wrong?
No since if a sector is found we jump outside of it once patched (i=i+sectorsize+2;)

Jeff
Site Admin
Posts: 8092
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: TI99/4A

Post by Jeff »

floppydev wrote: BTW: V9T9 loader: Can you review the code regarding FM/MFM track handling. PC version is used. Is this also valid for TI99 Western Digital Floppy Disc controller? Mustn't there also some bytes patched like in the PC99 loader (e.g. CRC, sector header, sector leadout, etc.)?

floppydeb
This is ok. This is just a normal track with an index mark.

floppydev
Posts: 17
Joined: Mon Apr 11, 2011 8:33 am

Re: TI99/4A

Post by floppydev »

Jeff wrote:
floppydev wrote: Questions regarding ti99pc99loader.c:
1.) Might the tracks/sectors be unordered added in the code (That will made coding easier but I guess still not 100% correct but ready for day2day use):
e.g. put that in that order:
Track 24: Sectors 7 8 6 3 11 ...
Track 22: Sectors 11 8 1 12 ...
...
I don't understand why you want change the sector ording since this file image already contains an MFM/FM track with sector into the right order and format.
The only thing to do is to "patch" the track to add missing clock and recompute the crc.
Sector order in the original PC99 image (an "unordered" one) practically looks like:
Track 0: Sectors 7 8 6 3 11 ...
...
Track 22: Sectors 11 8 1 12 ...
...
Track 24: Sectors 7 8 6 3 11 ...
...
Track 39: Sectors 11 8 1 12 ...
(tracks are ORDERED but from the specification they might also be unordered, but sectors are unordered).

As the whole track is read from the image HFE image also looks like:
Track 24: Sectors 7 8 6 3 11 ...
Track 22: Sectors 11 8 1 12 ...
(tracks are unordered, but also sectors are unordered).

But theoretically an image might look like (random sector wise), I've not seen such one:
Track 30/Sector 2
Track 29/Sector 11
Track 30/Sector 2
Track 0/Sector 12
...

I hope this is now clear. If not, just ask.

But as it works on the TI99/4A I think we can ignore that topic with non existing "random sector wise" images.

floppydev

floppydev
Posts: 17
Joined: Mon Apr 11, 2011 8:33 am

Re: TI99/4A

Post by floppydev »

floppydev wrote:
Jeff wrote: You can download the last version here :

https://hxc2001.com/floppy_drive_emulat ... rc_dev.zip
Thank you.

floppydev
I get a compile error:
1>ipf_loader.c
1>c:\work\svn\projects\head\hxc2001\software\common\plugins\ipf_loader\ipf_loader.c(65) : fatal error C1083: Cannot open include file: './libs/capslib/Comtype.h': No such file or directory

Looks like some missing files/libs.

floppydev

Post Reply