Previous Thread
Next Thread
Print Thread
Page 1 of 2 1 2
Joined: Apr 2012
Posts: 7
D
Member
OP Offline
Member
D
Joined: Apr 2012
Posts: 7
The DAI was the first personal computer I bought, in 1980. It stayed with me until 1990, when it stopped to function correctly. At this time, I was living in Brazil and I did not find a way to repair it. But I always kept some nostalgia of my DAI! Sometimes I tried to find one for sale in France, putting announcements in journals, but I was not successful.

Recently, I installed the MESS emulation program (mess.145) in my PC and, using DAI´s ROMs, I could see it functioning again. However, I was disappointed by the fact that the emulation does not reproduce the sounds (only the noise generator seems to function well).

I would like to know if it is possible to contact the DAI driver authors, Krzysztof Strzecha and Nathan Woods, or someone who has also worked on this computer in order to solve this problem (in 2004, the authors stated that everything in the emulation was OK). I know that this machine is not very procured, but it is a really rare one, with interesting characteristics.

I can indicate what I observed with the DAI emulation: only the noise is correctly generated by the NOISE function and can be heard from the speakers. But the SOUND function (3 channels) seems to be inactive, giving only a transitory week signal, particularly when glissando is chosen. It seems to me that the D8253 programmable timer is not correctly simulated (or not correctly controlled by the emulation).

The other point is that, when NOISE or SOUND functions are active, the keyboard is very slow, and I guess if there would be an undesired interaction between the TMS5501 and the D8253. The keyboard returns to its normal working after applying the SOUND OFF command.

Is there anybody who could help me to get a good emulation of the DAI Personal Computer with MESS?

Joined: Apr 2012
Posts: 7
D
Member
OP Offline
Member
D
Joined: Apr 2012
Posts: 7
I tried to understand what is the problem in the DAI emulation. Instead of using the SOUND command, I tried to inform the frequency and the volume with POKEs at the DAI I/O addresses. Putting the volume into the #FD04 and #FD05 addresses works well. But when I tried to write the oscillator frequency into #FC00, for instance, the sound generator continued mute. This gives strength to my argument that the PIT 8253 should not be correctly interfaced in the DAI emulation. At this point, I would like to observe that I didn't meet any reference to the mapping of the DAI I/O in the sources, except in remarks. Does it exist, in the MESS simulation, a file in which these parameters are clearly defined? One more time, I would be very happy if someone could help me!

Joined: Mar 2001
Posts: 16,923
Likes: 57
R
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,923
Likes: 57
The code you seek is in src/mess/machine/dai.c. You will see the PIT8253 configuration structure and the 3 output lines connected to the functions "dai_pit_out0", "dai_pit_out1", and "dai_pit_out2".

Joined: Apr 2012
Posts: 7
D
Member
OP Offline
Member
D
Joined: Apr 2012
Posts: 7
I have found easily these three "signals", but in order to get some sounds, they must be read by the DAI audio section, and when I look at src/mess/audio/dai.c, I don't see where dai_pit_out0/1/2 enter, while the noise signal is clearly seen in the STEAM_UPDATE function. Thus the problem could be that these outputs are not transmitted to the audio section.

Actually, I was also thinking about the possibility that the mode and the frequencies needed by the PIT8253 are not written into the PIT by the DAI software because of an erroneous addressing of the PIT. In DAI, the addresses to inform the PIT are #FD06 for commands, and #FD00, #FD02 and #FD04 for the three channel frequencies. And I don't find where this mapping is specified in the MESS emulation. Do you have any idea about that?

Joined: Mar 2001
Posts: 16,923
Likes: 57
R
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,923
Likes: 57
The PIT is mapped in the DAI address map in src/mess/drivers/dai.c.

Specifically:

Code:
static ADDRESS_MAP_START( dai_mem , AS_PROGRAM, 8, dai_state )
	AM_RANGE( 0x0000, 0xbfff) AM_RAMBANK("bank1")
	AM_RANGE( 0xc000, 0xdfff) AM_ROM
	AM_RANGE( 0xe000, 0xefff) AM_ROMBANK("bank2")
	AM_RANGE( 0xf000, 0xf7ff) AM_WRITE(dai_stack_interrupt_circuit_w )
	AM_RANGE( 0xf800, 0xf8ff) AM_RAM
	AM_RANGE( 0xfb00, 0xfbff) AM_READWRITE(dai_amd9511_r, dai_amd9511_w )
	AM_RANGE( 0xfc00, 0xfcff) AM_DEVREADWRITE_LEGACY("pit8253", pit8253_r, pit8253_w )
	AM_RANGE( 0xfd00, 0xfdff) AM_READWRITE(dai_io_discrete_devices_r, dai_io_discrete_devices_w )
	AM_RANGE( 0xfe00, 0xfeff) AM_DEVREADWRITE("ppi8255", i8255_device, read, write)
	AM_RANGE( 0xff00, 0xffff) AM_DEVREADWRITE_LEGACY("tms5501", tms5501_r, tms5501_w )
ADDRESS_MAP_END


The PIT is mapped at 0xFC00. 0xFD00/02/04 go to "dai_io_discrete_devices_r" and "dai_io_discrete_devices_w" which are again defined in src/mess/machine/dai.c. That code believes the only sound-related things in that range are volumes at 0xFD04 and 0xFD05.

Incidentally, what version of MESS are you using? The PIT emulation got a lot of bugfixes relatively recently to enable e.g. Windows to boot in our PC driver.

Joined: Apr 2012
Posts: 7
D
Member
OP Offline
Member
D
Joined: Apr 2012
Posts: 7
Thank you very much for this check. Effectively, I wrote #FD0x for the PIT address, but I was wrong. Thus, the map is correctly informed in the DAI driver. What is preoccupating me is the fact thap this mapping does not inform the details of the addresses. But may be, for the PIT 8253 works well, all the addresses used by the DAI software (#FC00, #FC02, #FC04 and #FC06) are equivalent (the PIT 8253 has a unique I/O port). If it is so, my preoccupation does not have sense.

The version I am using is Mess0145b-64. My computer is a DELL Inspiron running with Windows7.

Joined: Apr 2012
Posts: 7
D
Member
OP Offline
Member
D
Joined: Apr 2012
Posts: 7
Is it possible to know what are the recently corrected bugs that were affecting the normal working of the PIT8253? From the analysis of these bugs, could it be possible to find an explaination to the absence of sounds in the DAI emulation? Do I use the correct version of MESS (145b-64)? Who fixed these bugs?

Joined: Mar 2001
Posts: 16,923
Likes: 57
R
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,923
Likes: 57
Apparently I confused the 8253 with something else, the 8253 has had very little serious debugging work done on it since 2010. In either case, it's quite possible it has bugs in it due to specific cases that the DAI uses and other computers don't.

Joined: Apr 2012
Posts: 7
D
Member
OP Offline
Member
D
Joined: Apr 2012
Posts: 7
I couldn't spend many time to verify all the code relative to sound emulation in MESS. But I saw that three lines from the PIT8253 are present in the ..\MESS\Mess-Sources\src\mess\machine\DAI.c file:

const struct pit8253_config dai_pit8253_intf =
{
{
{
2000000,
DEVCB_NULL,
DEVCB_LINE(dai_pit_out0)
},
{
2000000,
DEVCB_NULL,
DEVCB_LINE(dai_pit_out1)
},
{
2000000,
DEVCB_NULL,
DEVCB_LINE(dai_pit_out2)
}
}
};

As the noise channel is working well, this fact tends to confirm that the problem is in the PIT8253 simulation.

I tried to understand how the pit8253 code works, but I recognize that it is not very easy. As R. Belmont suggested that there may have a bug in the PIT8253 code that could have appeared in the last updates, I would like to know if it is possible to obtain the various releases of this code since 2010, or before. Perhaps by comparing the consecutive versions, it would be possible to detect the problem existing in the DAI emulation. Is there anyboby who could help me?

Joined: Jun 2010
Posts: 26
S
Member
Offline
Member
S
Joined: Jun 2010
Posts: 26
@Denis

I have tried to fix the sound and now the PIT seems work and the frequency is generated correctly, but the keyboard problem is still present. Anyway when you have time please check if the sound now is correct.

Page 1 of 2 1 2

Link Copied to Clipboard
Who's Online Now
1 members (Golden Child), 19 guests, and 3 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,102
Posts119,263
Members5,019
Most Online890
Jan 17th, 2020
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Forum hosted by www.retrogamesformac.com