TI-994a How-to

rhester72
Posts: 449
Joined: Thu Jun 11, 2020 2:31 am
Been thanked: 36 times

Re: TI-994a How-to

Unread post by rhester72 »

@Flandango, ignore - I could have *sworn* I'd tested this case at least twice before, but it now reproduces on all versions of the core, suggesting pretty strongly it's not a regression (or likely even a core problem). More stuff for me to chase down, sorry about that!

Some other quick questions, if I may...sorry for coming off as the 'ungrateful feature-requesting user' (I've been on the other side of that fence MANY times), feel free to tell me to jump in a lake. Even better, tell me how/where to donate - what you've done for us already is WELL worth reward!

The easy ones (I think):

- Should the 99/4 system ROM/GROMs work? I thought they would, but it just hangs... (V2.2 works as expected, though, including lockout <G>)
- Any chance of being able to switch the 32K expansion on and off? It'd be especially helpful in tracking down GROMulated RAM-loading cartridges (without requiring being competent to disassemble TMS9900)

and the progressively less-easy wish-list ones that every developer dreads:

- How hard would it be to implement true mini-memory support, with the appropriate memory range loaded/saved automatically a la SRAM in other cores (where the contents are checked/dumped upon entry of the MiSTer menu)?
- Cassette (in pass-through WAV format, because HUGE nostalgia waves for that cassette sound!) read support (with media stop/play/rewind/ffwd controls)? Shoot, let's swing for the fences...write support? <G> (While the amount of cassette-only software is small, it does exist.)
- Any hope of expansion ROM (e.g. Arcturus) or huge ROM (Don't Mess With Texas demo, Dragon's Lair) support?
- p-code expansion card? LOL (Guessing this is super-unlikely, because as a kid it always seemed hyper-complex...but who knows, maybe it's just another mega-DSR in sheep's clothing?) I may be one of the only dozen people on earth that actually knows how to use one... *laughs*
- Other storage? (Myarc HFDC with IDE support comes to mind as a personal favorite, but there are other choices like CF...)

Ironically, I personally have little to no interest in higher-end VDP, Geneve, etc. - I was (and am) a bit of a purist when it comes to TI, for better or worse. If anything, I'd love to get some conversation started on the above and more...you've reignited my interest in the 99 more than anything that's ever come before, because it *genuinely* feels like the real thing! Thanks to EVERYONE who has contributed!

(And to everyone else, no, I haven't forgot to send up my fullROM set. I needed to test TI-CALC and have a few more small things to iron out, but it's coming very soon!)
rhester72
Posts: 449
Joined: Thu Jun 11, 2020 2:31 am
Been thanked: 36 times

Re: TI-994a How-to

Unread post by rhester72 »

Flandango wrote: Fri Jun 18, 2021 4:45 pm
rhester72 wrote: Fri Jun 18, 2021 4:15 pm I can supply a super specific test case if it's not immediately obvious what's going on.
If you can I would appreciate it.
Well, I'll be damned. There is some sort of defect, but it's been present since your first build. It'll take me a bit to (re)create the test case so you know what to expect. Sorry for the confusion!
rhester72
Posts: 449
Joined: Thu Jun 11, 2020 2:31 am
Been thanked: 36 times

Re: TI-994a How-to

Unread post by rhester72 »

@Flandango:

OK, steps to reproduce the problem that appears to be specific to disk swapping (only drive 1 tested), using the contents of the attachment cutthroats.zip:

1) Insert the Extended Basic ROM
2) Insert disk1.dsk into drive 1
3) Start Extended Basic and the disk will automatically boot (this takes a while)
4) When you see "Insert game disk 2 and strike any key", insert disk2.dsk into drive 1 (effectively swapping the disk - NOTE: I think it's this disk swap that triggers the bug) and press Enter
5) At the three --MORE-- prompts, press the spacebar and you will come to a ">" prompt
6) Type "$verify" (without quotes) at the prompt and press Enter
7) "When you see "Insert game disk 1 and strike any key", insert disk1.dsk into drive 1 (effectively swapping the disk) and press Enter (note that this stage _appears_ to pass without error, which I believe is validating the GAME1 file on disk 1)
8) "When you see "Insert game disk 2 and strike any key", insert disk2.dsk into drive 1 (effectively swapping the disk) and press Enter (and this stage will take a while before it errors out)

You will observe the following error:

What you _should_ see is "Yup. Game correct." (per this screenshot from Classic99):
screenshot_ok.png
screenshot_ok.png (1.85 KiB) Viewed 1074 times
The error produced on the MiSTer core (faked screenshot from Classic99 identical to MiSTer output):
screenshot_err.png
screenshot_err.png (5.77 KiB) Viewed 1074 times
The reason I suspect it's related to disk swapping, specifically, is that if you take FIAD dumps of all the files from both disks (LOAD, LOAD1, BOOT, BOOT1, GAME1, and GAME2) and put them on an empty DSSD V9T9 disk image and use it instead (and just press Enter every time it asks you to swap disks), the verify works on the MiSTer core. I've now attached a DSSD of that very thing for comparison.
Attachments
cutthroats-dssd.zip
(96.18 KiB) Downloaded 8 times
cutthroats.zip
(94.96 KiB) Downloaded 8 times
tmop
Posts: 41
Joined: Mon May 25, 2020 6:53 am
Has thanked: 18 times
Been thanked: 22 times

Re: TI-994a How-to

Unread post by tmop »

As promised, I've updated my TI99 MegaPack for MiSTer to support the new enhancement from @Flandango (disk support and Paged7 ROMs).

I've also inluded the last homebrews published in 2020/2021 (Escape North Korea, Dodger, Phenix, etc.) and the various disks for Adventure, TOD, Multiplan, etc.

Have fun! :D

Download from:
https://atariage.com/forums/topic/31265 ... nt=4847007
rhester72
Posts: 449
Joined: Thu Jun 11, 2020 2:31 am
Been thanked: 36 times

Re: TI-994a How-to

Unread post by rhester72 »

@Flandango - if it helps, Deadline's even worse (and therefore perhaps better for troubleshooting) - it breaks on game start with the same disk read error, no verification process required. If it boots without errors (all the way through game start after disk 2), you've fixed whatever's wrong. =)
Attachments
deadline.zip
(95.59 KiB) Downloaded 8 times
Flandango
Posts: 23
Joined: Wed May 26, 2021 9:35 pm
Been thanked: 28 times

Re: TI-994a How-to

Unread post by Flandango »

rhester72 wrote: Sat Jun 19, 2021 4:19 pm @Flandango - if it helps, Deadline's even worse (and therefore perhaps better for troubleshooting) - it breaks on game start with the same disk read error, no verification process required. If it boots without errors (all the way through game start after disk 2), you've fixed whatever's wrong. =)
Thanks, I'll look into this one too. So far it's been slow troubleshooting since I don't know of an easy way to peek in the core to see what exactly is going wrong except through SignalTap...which for each simple change takes me 20 minutes to recompile and start testing again.
rhester72
Posts: 449
Joined: Thu Jun 11, 2020 2:31 am
Been thanked: 36 times

Re: TI-994a How-to

Unread post by rhester72 »

Flandango wrote: Sat Jun 19, 2021 4:48 pm
rhester72 wrote: Sat Jun 19, 2021 4:19 pm @Flandango - if it helps, Deadline's even worse (and therefore perhaps better for troubleshooting) - it breaks on game start with the same disk read error, no verification process required. If it boots without errors (all the way through game start after disk 2), you've fixed whatever's wrong. =)
Thanks, I'll look into this one too. So far it's been slow troubleshooting since I don't know of an easy way to peek in the core to see what exactly is going wrong except through SignalTap...which for each simple change takes me 20 minutes to recompile and start testing again.
Yeah, I figured as much. If there's anything at all I can do to help, please advise. This is a tough one.
tmop
Posts: 41
Joined: Mon May 25, 2020 6:53 am
Has thanked: 18 times
Been thanked: 22 times

Re: TI-994a How-to

Unread post by tmop »

@Flandango.

Some other feedback for the latest version of the core:

- Old Dark Caves now seems to work fine. I've tested with both versions I have (with fast and normal loaders). I've mounted first the dsk image, then run a full rom with XB. However, I was able also to run it correctly mounting the disk after having loaded XB and it worked;

- Display Master: it's working fine now;

- My version of Deadline (on MegaPack) works fine. It's on a DSSD disk and uses the V1.3 of the interpreter. The "$verify" commands was ok. Not sure if this could help the troubleshooting;

- The companion disks for Multiplan and TI Writer work fine;

- The Tax Investment Record Keeping seems to work fine (I've initialized its db disk);

- I've tested more than 40 roms that I had ro rebuilt with disk support and they seems to run fine;


I've noticed that the TURBO menu now is not working. To check just load a BASIC program, LIST it. Then set the Turbo to ON and try to LIST the program. The TURBO was working fine on latest official core.
User avatar
pgimeno
Posts: 223
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 71 times
Been thanked: 38 times

Re: TI-994a How-to

Unread post by pgimeno »

rhester72 wrote: Sat Jun 19, 2021 4:19 pm @Flandango - if it helps, Deadline's even worse (and therefore perhaps better for troubleshooting) - it breaks on game start with the same disk read error, no verification process required. If it boots without errors (all the way through game start after disk 2), you've fixed whatever's wrong. =)
Does it work if you first remove the disk (by pressing Backspace in the file browser) and then select the new one?
rhester72
Posts: 449
Joined: Thu Jun 11, 2020 2:31 am
Been thanked: 36 times

Re: TI-994a How-to

Unread post by rhester72 »

pgimeno wrote: Sun Jun 20, 2021 1:20 am
rhester72 wrote: Sat Jun 19, 2021 4:19 pm @Flandango - if it helps, Deadline's even worse (and therefore perhaps better for troubleshooting) - it breaks on game start with the same disk read error, no verification process required. If it boots without errors (all the way through game start after disk 2), you've fixed whatever's wrong. =)
Does it work if you first remove the disk (by pressing Backspace in the file browser) and then select the new one?
I thought you might be on to something - but no, it makes no difference at all.

It does, however, seem to have -something to do with perhaps specific sector locations or something? Consider this: Boot disk 1, all is well (which means it presumably read every requested sector correctly). It asks for disk 2, you insert it and continue, it blows up - so that means a bad read on disk 2. However...reinsert disk 1, restart XB (*not* the core!), and boot again...and the cycle repeats, which means it can *consistently* read disk 1, suggesting the issue isn't _really_ about disk swapping but something specific about data locations *on the disk itself*.

I'm going to experiment with this theory like so: Create an artificial SSSD image with the 'header sector' valid for a blank disk, and every subsequent sector from 0 onward set with the first byte to the sector number (or closest equivalent) and every other byte set to 0x55. If you then attempt to do a sector-level copy of that disk from with MiSTer itself, theoretically, if there are any areas where the read (or write) isn't acting as expected, it should be readily identifiable on the copy. *shrugs* It's a theory...don't have much else better to do trying to chase this down.
rhester72
Posts: 449
Joined: Thu Jun 11, 2020 2:31 am
Been thanked: 36 times

Re: TI-994a How-to

Unread post by rhester72 »

Hrm...I think I've blown my latest theory. I left Disk Utilities 4.2 running a destructive test on a SSSD in loop mode overnight without a single failure, so unless it's an alignment problem, sector-level reads and writes both appear to be just fine.

I'm still going to attempt a known-hand-constructed-bad sector copy to see what the result is, but I expect it will work perfectly...and then I'm not quite sure where to look. If it's not swapping and it's not the image, what on earth is going on?
Flandango
Posts: 23
Joined: Wed May 26, 2021 9:35 pm
Been thanked: 28 times

Re: TI-994a How-to

Unread post by Flandango »

I believe I figured out the issue. I'm running through a bunch of tests, once I have 100% repeated success, I'll post it.
Flandango
Posts: 23
Joined: Wed May 26, 2021 9:35 pm
Been thanked: 28 times

Re: TI-994a How-to

Unread post by Flandango »

Ok. I have been using Old Caves, Cutthroats and Deadline as my test cases for the floppy issues. I got them working 100% of the time on my rig.
I had to tweak clock speeds so VGA/CRT video may be off especially for PAL (it's reporting as 50.2HZ) so if anybody is testing/playing on a pal CRT/TV, let me know how it goes.
Attachments
Ti994a_20210620.zip
(1.14 MiB) Downloaded 16 times
rhester72
Posts: 449
Joined: Thu Jun 11, 2020 2:31 am
Been thanked: 36 times

Re: TI-994a How-to

Unread post by rhester72 »

Can you elaborate on what the problem was? I'm intellectually VERY curious.
Flandango
Posts: 23
Joined: Wed May 26, 2021 9:35 pm
Been thanked: 28 times

Re: TI-994a How-to

Unread post by Flandango »

Timing. The floppy drive (not the controller) is passed the clock frequency used by the core (in this case it was 42.666.....) so it can do some calculations.
Unfortunately, during compile time, the clock was adjusted slightly from what was specified.
Normally it's not an issue if you the floppy drive was actually running off that clock, but it was using it to make various calculations which in the end it was off by a few pulses after millions.
And apparently some software is VERY picky on when it wants the data. If it doesn't get it within the specs it aborts.
So in the end I had to find a core frequency that would make the System clock and all the derived clocks happy, and not get too adjusted by the compiler (Quartus) that throws off the floppy drive.
rhester72
Posts: 449
Joined: Thu Jun 11, 2020 2:31 am
Been thanked: 36 times

Re: TI-994a How-to

Unread post by rhester72 »

Wow. I thought the 2600 racing the beam was bad...that's shockingly bad!

There's no way to key the floppy off a fixed multiplier of the system clock to keep them in sync, or at least have both similarly maligned at compile? (Again, sorry for the ignorance - and causing all this trouble!)
rhester72
Posts: 449
Joined: Thu Jun 11, 2020 2:31 am
Been thanked: 36 times

Re: TI-994a How-to

Unread post by rhester72 »

Hrm. Your mention of the number of revolutions keyed me on to something.

Nearly every V9T9 image I have has fixed interlave - 0 1 2 3 4 5 6 blah blah blah, which is NOT ideal for the stock controller.

Is anyone aware of software that will make a copy of a (virtual) floppy and re-interleave it on the receiving side? TI native, Linux manipulating dsk images, whatever - anything capable of such a thing. I'm keenly curious in seeing if correcting interleave on a virtual floppy will actually improve clock load time on MiSTer (as it would on real hardware), because (for example) loading Deadline takes a *LOT* longer than I'd expect on actual hardware.
rhester72
Posts: 449
Joined: Thu Jun 11, 2020 2:31 am
Been thanked: 36 times

Re: TI-994a How-to

Unread post by rhester72 »

@Flandango - you're going to hate me. Something's still slightly off.

Deadline works now, but trying to format a SSSD (tried with DM3) ends with "DISK ERROR 43, LOST DATA ON PRINT" after a bit. (I've literally never seen that error in my life, I don't even know what it means!)
Flandango
Posts: 23
Joined: Wed May 26, 2021 9:35 pm
Been thanked: 28 times

Re: TI-994a How-to

Unread post by Flandango »

Not sure, looking into it. Disk Utilities worked fine for me but Disk Manager doesn't so testing it now.
rhester72
Posts: 449
Joined: Thu Jun 11, 2020 2:31 am
Been thanked: 36 times

Re: TI-994a How-to

Unread post by rhester72 »

rhester72 wrote: Mon Jun 21, 2021 12:25 am Hrm. Your mention of the number of revolutions keyed me on to something.

Nearly every V9T9 image I have has fixed interlave - 0 1 2 3 4 5 6 blah blah blah, which is NOT ideal for the stock controller.

Is anyone aware of software that will make a copy of a (virtual) floppy and re-interleave it on the receiving side? TI native, Linux manipulating dsk images, whatever - anything capable of such a thing. I'm keenly curious in seeing if correcting interleave on a virtual floppy will actually improve clock load time on MiSTer (as it would on real hardware), because (for example) loading Deadline takes a *LOT* longer than I'd expect on actual hardware.
Self-answering...nope. The limitation lies in the v9t9 format itself (unlike PC99), where there's no means of capturing interleave information of any kind. It's not optimal, but it's not clear to me whether that has any real impact on (low-level) emulation performance with respect to floppy read/writes. Doesn't much matter either way, nothing can be done to correct it short of choosing another format (for little real-world benefit).

Also, the only way I found to actually do a copy that changes interleave is to format the target with MDM5 specifying interleave, then doing file-level copies from source disk to the new interleaved one - again, talking about physical hardware or PC99-format-supporting emulators, NOT v9t9-style images. If you need to do a sector-level copy, from what I can tell, you're out of luck trying to adjust interleave.
Flandango
Posts: 23
Joined: Wed May 26, 2021 9:35 pm
Been thanked: 28 times

Re: TI-994a How-to

Unread post by Flandango »

The way the sectors are laid out on the image is irrelevant to the speed it gets read. It's up to the hardware/emulator/core on how to retrieve that data from the image.
The speed that Mister reads the data/sector/info from the SD Card is pretty fast. Faster than the core can actually read it.
One of the main goals of the Mister project is to try to get the systems as close to cycle perfect as possible. Therefore the Floppy Drive controller and the Floppy Drive portions of the core are written to perform as close to the real thing as possible.
The Floppy Drive Controller I used in this core is the same one used in the Mist core, which is the WD1771. It's also used in the Atari ST core. It was written without interleave in mind (flat 1-X, TI is 0-8). When the "virtual" drive told the Controller that the sector it's looking for is under the virtual head, the controller will start reading/writing the data to and from the SD card/RAM as needed.

With that said, since I had a huge problem trying to get everything working (I'll fix Old Caves and Cutthroat but will brake XB's ability to read the directory, fix that and it will break Formatting only from Disk Manager but not from Disk Utilities), I tweaked a few things with timing and changed the Floppy Drive to interleave the way the TI Controller actually does it (0,7,5,3,1,8,6,4,2) and that kind of helped it a bit. I don't have a real TI99/a with drives to compare it to and Classic99 and Mame differ a little between them on my machine so I can't rely on them as a true comparison.
So attached is the latest beta, which, as far as I know, should work with most of the software we had issues with lately (Old Caves, Cutthroats, Deadline...).

Let me know what I may have broken this time.
As for the Turbo option. I'm still looking into it. It seems to work on a few Groms/Carts that I tried (ex Popeye) but Extended Basic is not happy...at all.
Attachments
Ti994a_20210624.zip
(1.06 MiB) Downloaded 22 times
rhester72
Posts: 449
Joined: Thu Jun 11, 2020 2:31 am
Been thanked: 36 times

Re: TI-994a How-to

Unread post by rhester72 »

Thanks for the incredibly detailed explanation and effort, sincerely! I agree, Classic99 at least is WAY off how a real drive works. MAME is closer-ish.

Unfortunately a lot of my time was invested in command modules thus far, so I'll have to switch my guns to disks and see what I can scare out of trees. :)
tmop
Posts: 41
Joined: Mon May 25, 2020 6:53 am
Has thanked: 18 times
Been thanked: 22 times

Re: TI-994a How-to

Unread post by tmop »

@Flandango: many thanks for this update.

@rhester72: yes, we need now to focus on tests with the disk system! :D
akeley
Posts: 344
Joined: Mon May 25, 2020 7:54 pm
Has thanked: 57 times
Been thanked: 44 times

Re: TI-994a How-to

Unread post by akeley »

I said I'll post some pics, but got distracted by ao486 in the meantime....

Image

This is the latest core in NTSC. The dark area between the red line and TV's bezel is ok, it's not the actual display. The dark part between the red line and TI image is what's "missing".The horizontal fill is fine.

Below is the NTSC image from older version of the core (21-06-07). The vertical fill was ok there. I don't have a real TI, but I think it originally filled the whole screen. In this thread you can see some photos of real TIs in action: https://atariage.com/forums/topic/32115 ... o-problem/

Image

And this is PAL image from the latest core. Not sure if there is anything wrong with it or not, since I can't compare it to anything - the old core's PAL filled the screen completely, which wasn't probably right anyway. So this is just for the record.

Image
MiSTer_Kirk
Posts: 137
Joined: Thu Feb 04, 2021 11:42 pm
Has thanked: 10 times
Been thanked: 23 times

Re: TI-994a How-to

Unread post by MiSTer_Kirk »

So, how close are we now to packing-up our real Ti99/4a machines, and sticking to this latest core ?
I have a Ti99/4a, Nanopeb, Flashrom99, FinalGrom99, and a PHP2700 Tape Deck. So, I can run pretty-much everything on real hardware. I understand there isn't any tape support, yet, but glad to see disk support finally added.

Speaking of disk support, Flandango - don't suppose you would think of looking at other cores that lack disk support ? BBC Micro/Master core, Apple II core, etc...
Post Reply