etabeta's playground

MESS & MAME wip

Archive for May, 2009

Commodore tapes…

without comments

Last weekend, I spent some time to understand why C16 tape emulation was not completely working in MESS.

Since Commodore tape fixes were my first serious contributions to MESS and since C64, C128 and Vic20 tapes were already perfectly working, I had been a bit disappointed when my attempt to fix C16 never produced any result.

I mean, launching C16 in MESS, you were able to load games from cassettes and to play these games. But for some reason the motor was not correctly turned off.
Similarly, recording BASIC programs on tape was not working: the cassette drive was going on and on even after the BASIC routine had printed on screen that saving was finished.

It took me half an hour to spot the mistake in the previous implementation. As a result:

after saving a program….
save01save02

…you can reload it…
load01load02

…and it runs (thinking back, it could have been funnier to make the program write “Hora” 😉 )!
run

Not very exciting, you will probably think. But I’m really satisfied to have moved MESS one step closer to perfect tape emulation for Commodore drivers!

No luck with PET cassettes, unfortunately. Those still remain in my TODO list and might be fixed sometimes in the future…

In the meanwhile, a lot of skeleton drivers have been included in MESS and Curt Coder has done astounding progresses on my barely sketched Kyocera driver. You can now fully enjoy Olivetti M10, Tandy TRS Model 100, NEC PC8201A and Tandy Model 200 (and even some of their successors), by compiling the current svn source! Or you can wait for MESS 0.132…

Written by etabeta

May 21st, 2009 at 3:39 pm

Posted in MESS

I love it when a plan comes together!

without comments

Quite often, drivers which are not actively maintained in MAME/MESS suffer of unexpected regressions when some new functionality is added to MAME core. In the case of MESS drivers, similar regressions are seldom immediately reported [1] and it becomes harder and harder to fix them.

Atari 400/800 floppy disks are a good example of this. In the development cycle between 0.129 and 0.130, PIA emulation was converted to use the MAME device framework. Unfortunately, atari.c and related drivers in MESS were strictly entangled with MAME sources, making hard to understand which functions were used by the various components… As a result, the serial communications between computer and floppy drive got lost in the conversion. But no one realized this fact for months!

A couple of weeks ago, cleaning up a bit the MAME side of Atari emulation (used for Max-A-Flex) from MESS specific code, I noticed that there was a function in atarifdc.c which was not used anywhere. Having no clue about its original use, and being without Atari floppy disks to test floppy emulation, I simply decided to ignore it…

Finally, a couple of days ago, Tafoid pointed out that floppy disks were broken in Atari 400 & 800. And he also found out that the breakage had happened after MESS 0.129.

I studied the source and it turned out that the unused function in atarifdc.c (the one I had noticed in the cleaning up process) should not had been unused at all!! Indeed, it was needed to allow communications between the computer and the floppies.

Checking the source changes made when PIA emulation was updated, I found out where the function was required (in the PIA interface for a400 & a800) and I added it back.

Quite sure that I had solved the problem [2], I launched emulation in MESS and…

a800_1

 

What!?!

 

I spent half a day debugging the floppy code with no success, then I decided to try MESS 0.129 and the result was the same… Boot errors and nothing more.

 

WHAT!?!

 

Wasn’t floppy emulation supposed to work in 0.129?

I was really puzzled, until Tafoid told me he was able to use floppies after my fix… Then, I understood: I was using a broken .atr image in my testing!!! LOL!

Google was my friend and, after few minutes, I was finally able to verify that the floppy emulation was indeed fixed!

a800_3

a800_2

Hooray!

Thanks again to Tafoid for the report: without his testing, we could have noticed the regression in 2012 😉

[1] either because no one uses MESS, or because users stick with older versions rather than file a bugzilla report (depending on the case)
[2] Juergen’s code is very solid even years after it’s been originally written

Written by etabeta

May 1st, 2009 at 11:01 am

Posted in MESS

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close