Jump to content
IGNORED

Mame and the TI roms.


Retrospect

Recommended Posts

OK, I found the commit that caused the regression:

 

 

$ git bisect good
0f655b0eb792461ca5638d5a4d815957a21056b7 is the first bad commit
commit 0f655b0eb792461ca5638d5a4d815957a21056b7
Author: Michael Zapf <Michael.Zapf@mizapf.de>
Date:   Tue May 1 17:56:39 2018 +0200
    tms9995: Fixed latching of pulsed interrupts

 

As I said, this was an intended change and an effective remedy for the issues with the 99/2. I'll have to carefully check why this breaks the cassette in the 99/8 in turn.

  • Like 3
Link to comment
Share on other sites

But the 99/8 is fully functional, except for the cassette. Why don't you use the floppy drive for developing?

I'm glad you asked that. I selected the FDC thing as it's drive but was unable, after creating a floppy image, to save to it. I'm not a regular user of mame or the 99/8, but my curiosity is there enough to want to experiment.

Link to comment
Share on other sites

Also, you can format a disk with the 99/8 in Extended Basic II:

 

 

OPEN #1:"HEXBUS.FORMAT MEDIA.101"

 

or in Pascal: Select Go, F, device #4, and set the desired values.

 

I noticed that there may be a minor glitch when changing the density of the medium (formatting from single to double or back). In that case you should stop the emulation after formatting and start again.

 

If you use the image from http://atariage.com/forums/topic/263084-need-more-info-about-hx5102/?do=findComment&comment=4199622, you just need to write

 

 

mame64 ti99_8 -hexbus hx5102 -flop1 ti998_2a.dsk

 

and then try OLD DSK1.HELLO.

  • Like 2
Link to comment
Share on other sites

Hi, tried to do it again and I get

* I/O error 66

 

When i try to save to my disk

dunno what im doing wrong but will get back to you later thanks guys

 

Hi, Retrospect. With mizaph's help some months ago I was successful at getting multiple disk drives working on the 99/8 emulation.

 

In case it helps you at all, my mame command line is:

 

mame64 ti99_8 -ui_active -uimodekey PGDN -hexbus hx5102 -hexbus:hx5102:d1 525dd -flop1 [path_to_first_diskette.dsk] -flop2 [path_to_second_diskette.dsk] -cartridge diskman3

 

Good luck, and I hope you are able to sort it out.

 

Best regards,

 

 

R.

Link to comment
Share on other sites

  • 3 weeks later...

I think I found (a part) of the issue with the 99/8 cassette. When I tried to get the 99/2 cassette going, I noticed that TI used interrupt pulses that needed to be latched in the 9995. There are indeed latches inside the 9995, but they were not working in my emulation. But after I tried to fix the latches, I obviously broke the cassette routine in the 99/8, which I did not notice until it was reported in this thread.

 

The problem, as I found, was that two INT1 interrupts were triggered when only one was expected. The reason was that I did not clear the interrupt latch as long as the INT1 line is still active. However, the specs say that the latches are edge-triggered, so when the interrupt is serviced, the latch should immediately be cleared. The way I did it was surely wrong: The interrupt routine typically starts already while the interrupt line is still active; since I did not clear the latch at the point of time when the interrupt was effectively serviced, there was no occasion when the latch would be cleared later, and when the interrupt handler returned, it found the latch still set, triggering a second context switch.

 

I changed this in the MAME emulation, and ... it works most of the time. Grmmpf. Sometimes the save routine still aborts without saving anything, sometimes it works several times in a row. I cannot safely reproduce that behavior. Maybe there is still a non-initialized variable (which I suspected at first) that causes the trouble.

 

As you can see, this cassette issue in the 99/8 emulation is one of the harder challenges...

  • Like 1
Link to comment
Share on other sites

Do we have a thread (I can't seem to locate one) that tells you how to set up Mame 0.206 for use with the TI? I haven't used it in ages (been using Classic99 almost exclusively), and noticed a few issues to start off with:

 

* TI complete ROMs go in roms/ just fine and it sees them

* TI MAME ROMs from Whtech are in there too, but out of the 300 something, it's only showing like 20 in the list

* Trying to configure the UI escape key, in-game menu (tab and `), etc, doesn't ever work. I have tried a gazillion different key combos, and I have to hit CTRL-ALT-DEL and terminate MAME in process manager

Link to comment
Share on other sites

* Trying to configure the UI escape key, in-game menu (tab and `), etc, doesn't ever work. I have tried a gazillion different key combos, and I have to hit CTRL-ALT-DEL and terminate MAME in process manager

Hit scroll-lock to enable "partial keyboard emulation". That regains access to the emulator's functions.
Link to comment
Share on other sites

Another try ... I found something weird, and it looks like I fixed it, and the cassette on the TI-99/8 works in a stable way now. It is always difficult to be sure, because you'd have to continue testing until it fails again, which does not terminate when the code happens to be correct.

 

The 9901 has a timer mode that is used for the cassette (only); it is turned on by loading a value into the clock register in clock mode. The 9901 triggers an interrupt every time the counter reaches 0, and then resets the timer. The issue was that there is some improper use of MAME timers in the TMS9901 emulation. As it was done now, the MAME-internal timer structure was set to some non-zero value and then activated. However, as the timer never ran until then, this activation made the timer fast-forward to the current machine time, triggering hundreds of interrupts. Obviously, in MAME, timers should be kept running from the beginning, and a flag could be used to decide whether the timer have an effect or not. I don't know whether this has changed in the MAME core over time.

 

Now, in combination with the changes of interrupt latching, the following happened: Once the cassette routine reached the activation of the timer, the timer immediately started to fire interrupts, which were now (correctly) latched but got ignored in earlier versions. Accordingly, this interrupt storm had no effect until I added the latching of interrupts.

 

I am still not fully sure that the current fix is the solution. By these interrupts (only the first being of interest, as it sets the latch), the cassette routine got interrupted before the cassette flag was set, which led to a termination of the cassette routine. In theory, this could happen in unfortunate situations at any time. On the other hand, by setting the counter and now without triggering premature interrupts, the code may have proceeded far enough to have reached the instruction that sets the cassette flag; note that every counter step is 64 cycles, and the counter is set to 15, so this could be sufficient.

 

Anyway, I pushed the fix to Github. We'll see.

  • Like 4
Link to comment
Share on other sites

  • 2 weeks later...
  • 6 months later...

Hi, thanks for asking. I am the current maintainer of the TI emulation in MAME. Some points I'd like to clarify first:

 

1. Unless you explicitly want to use the (older) TI-99/4, you should use the TI-99/4A as the standard version. The driver name is "ti99_4a" (for NTSC 60Hz) and "ti99_4ae" (for PAL 50 Hz).

 

2. "Cassettes don't load" is not a helpful problem description for me. How do you conclude that this issue occurs? If there is an error message, how does it look like?

 

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...