MAMEWorld >> EmuChat
Index   Flat Mode Flat  

darq
MAME Fan
Reged: 04/03/10
Posts: 41
Send PM
About hexa sound 'clicks'
11/06/10 04:50 AM


Hi all,

First of all I don't know if it may be useful regard mame code itself, but in my java emulator I've resolved the sound clicking in this way:

Write Proc:
----------


Code:


.
.

// Sound: AY8910_Write
else if ((addr == 0xD000) || (addr == 0xD001))
{
if (addr == 0xD000)
last_d000_val = val & 255;
else
last_d001_val = val & 255;

ay8910.write (addr - 0xD000, val & 255);
}




Read Proc:
---------

Code:


.
.
// Inputs
else if (addr == 0xD001)
{
if ((last_d000_val == 0x0E) && (last_d001_val == 0x3F))
{
int val = 255;

// 1P - Up
if (hexaPanel.keyBuf [KeyEvent.VK_DOWN])
val &= ~1;

// 1P - Down
if (hexaPanel.keyBuf [KeyEvent.VK_DOWN])
val &= ~2;

// 1P - Left
if (hexaPanel.keyBuf [KeyEvent.VK_LEFT])
val &= ~4;

// 1P - Right
if (hexaPanel.keyBuf [KeyEvent.VK_RIGHT])
val &= ~8;

// 1P - Button 1
if (hexaPanel.keyBuf [KeyEvent.VK_A])
val &= ~16;

// 1P - Start
if (hexaPanel.keyBuf [KeyEvent.VK_1])
val &= ~32;

// 1P - Coin
if (hexaPanel.keyBuf [KeyEvent.VK_5])
val &= ~64;

// 1P - Button 2
if (hexaPanel.keyBuf [KeyEvent.VK_S])
val &= ~128;

return (val);
}

return (dipswitches);
}



I suppose that it isn't the correct way to handle this, anyway I hope it can be useful.

Regards.







Entire thread
Subject Posted by Posted on
* About hexa sound 'clicks' darq 11/06/10 04:50 AM

Extra information Permissions
Moderator:  Robbbert, Tafoid 
0 registered and 283 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 1500