Jump to content

Photo

Mame and the TI roms.


38 replies to this topic

#26 mizapf OFFLINE  

mizapf

    River Patroller

  • 3,506 posts
  • Location:Germany

Posted Fri Jan 18, 2019 4:57 PM

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.



#27 Retrospect OFFLINE  

Retrospect

    Stargunner

  • Topic Starter
  • 1,139 posts
  • Location:Wakefield, England

Posted Fri Jan 18, 2019 7:31 PM

Thanks for your time, Mizapf.  It would be grand to see the 99/8 fully functional.  I would be interested in making some little games for it.



#28 mizapf OFFLINE  

mizapf

    River Patroller

  • 3,506 posts
  • Location:Germany

Posted Sat Jan 19, 2019 3:14 AM

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

#29 Retrospect OFFLINE  

Retrospect

    Stargunner

  • Topic Starter
  • 1,139 posts
  • Location:Wakefield, England

Posted Sat Jan 19, 2019 4:55 AM

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.



#30 Casey OFFLINE  

Casey

    Moonsweeper

  • 325 posts

Posted Sat Jan 19, 2019 6:56 AM

It should work - I actually created a new disk image just now (a sector dump type image), initialized it with Disk Manager 3 as 40 tracks, DSDD, and it works fine.  What error do you get when you try to save to the disk image?  We should be able to help you out.



#31 mizapf OFFLINE  

mizapf

    River Patroller

  • 3,506 posts
  • Location:Germany

Posted Sat Jan 19, 2019 8:04 AM

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/...2/#entry4199622, you just need to write

 

mame64 ti99_8 -hexbus hx5102 -flop1 ti998_2a.dsk

 

and then try OLD DSK1.HELLO.



#32 Retrospect OFFLINE  

Retrospect

    Stargunner

  • Topic Starter
  • 1,139 posts
  • Location:Wakefield, England

Posted Sun Jan 20, 2019 7:39 AM

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



#33 mizapf OFFLINE  

mizapf

    River Patroller

  • 3,506 posts
  • Location:Germany

Posted Sun Jan 20, 2019 9:45 AM

Please try to load HELLO first from the above image, as I described in my last post, so that I know whether this is working or not.



#34 Rossman OFFLINE  

Rossman

    Star Raider

  • 80 posts

Posted Sun Jan 20, 2019 7:46 PM

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.



#35 mizapf OFFLINE  

mizapf

    River Patroller

  • 3,506 posts
  • Location:Germany

Posted Tue Feb 5, 2019 6:28 PM

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...



#36 acadiel OFFLINE  

acadiel

    Stargunner

  • 1,480 posts
  • www.hexbus.com
  • Location:USA

Posted Wed Feb 6, 2019 8:42 PM

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



#37 JB OFFLINE  

JB

    Quadrunner

  • 9,281 posts
  • With Stereo-Of-The-Art-Sound

Posted Wed Feb 6, 2019 8:55 PM

* 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.

#38 mizapf OFFLINE  

mizapf

    River Patroller

  • 3,506 posts
  • Location:Germany

Posted Thu Feb 7, 2019 2:01 AM

The list only shows the ZIP cartridges, no RPKs. Maybe you can show me your mame.ini file (the paths at the top).

#39 mizapf OFFLINE  

mizapf

    River Patroller

  • 3,506 posts
  • Location:Germany

Posted Mon Feb 11, 2019 7:03 PM

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.






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users