mirror of
https://github.com/holub/mame
synced 2025-04-19 23:12:11 +03:00
parent
324e79adc9
commit
d285f15c31
@ -2886,8 +2886,8 @@ inline void r5900le_device::handle_dmfc2(uint32_t op)
|
||||
{
|
||||
rtval[i] = reg[i];
|
||||
}
|
||||
m_core->r[rt] = util::icat<uint64_t>(rtval[1], rtval[0]);
|
||||
m_core->rh[rt] = util::icat<uint64_t>(rtval[3], rtval[2]);
|
||||
m_core->r[rt] = ((uint64_t)rtval[1] << 32) | rtval[0];
|
||||
m_core->rh[rt] = ((uint64_t)rtval[3] << 32) | rtval[2];
|
||||
}
|
||||
|
||||
inline void r5900le_device::handle_dmtc2(uint32_t op)
|
||||
@ -3784,7 +3784,7 @@ void r5900le_device::handle_idt(uint32_t op)
|
||||
break;
|
||||
}
|
||||
}
|
||||
m_core->r[rd] = util::icat<uint64_t>(count[1], count[0]);
|
||||
m_core->r[rd] = ((uint64_t)count[1] << 32) | count[0];
|
||||
}
|
||||
break;
|
||||
case 0x08: /* MMI0 */
|
||||
@ -4271,8 +4271,8 @@ void r5900le_device::handle_mmi0(uint32_t op)
|
||||
uint64_t rsval = m_core->r[rs];
|
||||
uint64_t rtval = m_core->r[rt];
|
||||
uint32_t rdval[4] = { (uint32_t)rtval, (uint32_t)rsval, (uint32_t)(rtval >> 32), (uint32_t)(rsval >> 32) };
|
||||
m_core->r[rd] = util::icat<uint64_t>(rdval[1], rdval[0]);
|
||||
m_core->rh[rd] = util::icat<uint64_t>(rdval[3], rdval[2]);
|
||||
m_core->r[rd] = (uint64_t)rdval[1] << 32 | rdval[0];
|
||||
m_core->rh[rd] = (uint64_t)rdval[3] << 32 | rdval[2];
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -913,11 +913,7 @@ TIMER_CALLBACK_MEMBER(mc6845_device::handle_line_timer)
|
||||
update_cursor_state();
|
||||
|
||||
if (has_screen())
|
||||
{
|
||||
// HACK: prevent asoccer from hanging MAME by repeatedly stalling VBLANK periods and attendant frame updates
|
||||
if (!m_vsync || !new_vsync)
|
||||
screen().reset_origin();
|
||||
}
|
||||
screen().reset_origin();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -14,7 +14,7 @@
|
||||
#define LOG_COMMAND (1 << 1)
|
||||
#define LOG_INTR (1 << 2)
|
||||
#define LOG_READ (1 << 3)
|
||||
#define VERBOSE (LOG_IR)
|
||||
#define VERBOSE (0)
|
||||
#include "logmacro.h"
|
||||
|
||||
|
||||
|
@ -1523,7 +1523,7 @@ void sound_manager::update(int param)
|
||||
}
|
||||
|
||||
#if (SOUND_DEBUG)
|
||||
if (lscale != m_compressor_scale && m_compressor_enabled)
|
||||
if (lscale != m_compressor_scale)
|
||||
printf("scale=%.5f\n", m_compressor_scale);
|
||||
#endif
|
||||
|
||||
@ -1541,27 +1541,35 @@ void sound_manager::update(int param)
|
||||
|
||||
// ensure that changing the compression won't reverse direction to reduce "pops"
|
||||
stream_buffer::sample_t lsamp = m_leftmix[sampindex];
|
||||
if (lscale != m_compressor_scale && sample != m_finalmix_leftover)
|
||||
lscale = adjust_toward_compressor_scale(lscale, lprev, lsamp);
|
||||
|
||||
lprev = lsamp * lscale;
|
||||
if (m_compressor_enabled)
|
||||
{
|
||||
if (lscale != m_compressor_scale && sample != m_finalmix_leftover)
|
||||
lscale = adjust_toward_compressor_scale(lscale, lprev, lsamp);
|
||||
lprev = lsamp *= lscale;
|
||||
}
|
||||
lsamp = lprev;
|
||||
|
||||
// clamp the left side
|
||||
finalmix[finalmix_offset++] = s16(std::clamp<stream_buffer::sample_t>(lsamp, -1.0, 1.0) * 32767.0);
|
||||
if (lsamp > 1.0)
|
||||
lsamp = 1.0;
|
||||
else if (lsamp < -1.0)
|
||||
lsamp = -1.0;
|
||||
finalmix[finalmix_offset++] = s16(lsamp * 32767.0);
|
||||
|
||||
// ensure that changing the compression won't reverse direction to reduce "pops"
|
||||
stream_buffer::sample_t rsamp = m_rightmix[sampindex];
|
||||
if (rscale != m_compressor_scale && sample != m_finalmix_leftover)
|
||||
rscale = adjust_toward_compressor_scale(rscale, rprev, rsamp);
|
||||
|
||||
rprev = rsamp * rscale;
|
||||
if (m_compressor_enabled)
|
||||
{
|
||||
if (rscale != m_compressor_scale && sample != m_finalmix_leftover)
|
||||
rscale = adjust_toward_compressor_scale(rscale, rprev, rsamp);
|
||||
rprev = rsamp *= rscale;
|
||||
}
|
||||
rsamp = rprev;
|
||||
|
||||
// clamp the right side
|
||||
finalmix[finalmix_offset++] = s16(std::clamp<stream_buffer::sample_t>(rsamp, -1.0, 1.0) * 32767.0);
|
||||
if (rsamp > 1.0)
|
||||
rsamp = 1.0;
|
||||
else if (rsamp < -1.0)
|
||||
rsamp = -1.0;
|
||||
finalmix[finalmix_offset++] = s16(rsamp * 32767.0);
|
||||
}
|
||||
m_finalmix_leftover = sample - m_samples_this_update * 1000;
|
||||
|
||||
|
@ -58,7 +58,7 @@
|
||||
// CONSTANTS / MACROS
|
||||
//**************************************************************************
|
||||
|
||||
#define LOG 1
|
||||
#define LOG 0
|
||||
|
||||
namespace {
|
||||
|
||||
@ -147,7 +147,6 @@ public:
|
||||
m_ikbd_mouse_py(IKBD_MOUSE_PHASE_STATIC),
|
||||
m_ikbd_mouse_pc(0),
|
||||
m_ikbd_joy(1),
|
||||
m_psg_pa(0),
|
||||
m_monochrome(1),
|
||||
m_video(*this, "video"),
|
||||
m_screen(*this, "screen"),
|
||||
@ -180,8 +179,8 @@ protected:
|
||||
TIMER_CALLBACK_MEMBER(mouse_tick);
|
||||
|
||||
// driver
|
||||
uint16_t fdc_data_r();
|
||||
void fdc_data_w(uint16_t data);
|
||||
uint16_t fdc_data_r(offs_t offset);
|
||||
void fdc_data_w(offs_t offset, uint16_t data);
|
||||
uint16_t dma_status_r();
|
||||
void dma_mode_w(uint16_t data);
|
||||
uint8_t dma_counter_r(offs_t offset);
|
||||
@ -239,7 +238,6 @@ protected:
|
||||
int m_fdc_fifo_msb = 0;
|
||||
int m_fdc_fifo_empty[2]{};
|
||||
int m_fdc_dmabytes = 0;
|
||||
uint8_t m_psg_pa;
|
||||
|
||||
/* timers */
|
||||
emu_timer *m_mouse_timer = nullptr;
|
||||
@ -550,7 +548,7 @@ void st_state::fdc_dma_transfer()
|
||||
// fdc_data_r -
|
||||
//-------------------------------------------------
|
||||
|
||||
uint16_t st_state::fdc_data_r()
|
||||
uint16_t st_state::fdc_data_r(offs_t offset)
|
||||
{
|
||||
uint8_t data = 0;
|
||||
|
||||
@ -582,7 +580,7 @@ uint16_t st_state::fdc_data_r()
|
||||
// fdc_data_w -
|
||||
//-------------------------------------------------
|
||||
|
||||
void st_state::fdc_data_w(uint16_t data)
|
||||
void st_state::fdc_data_w(offs_t offset, uint16_t data)
|
||||
{
|
||||
if (m_fdc_mode & DMA_MODE_SECTOR_COUNT)
|
||||
{
|
||||
@ -1539,7 +1537,7 @@ void st_state::st_map(address_map &map)
|
||||
map(0xff8001, 0xff8001).rw(FUNC(st_state::mmu_r), FUNC(st_state::mmu_w));
|
||||
map(0xff8200, 0xff8203).rw(m_video, FUNC(st_video_device::shifter_base_r), FUNC(st_video_device::shifter_base_w)).umask16(0x00ff);
|
||||
map(0xff8204, 0xff8209).r(m_video, FUNC(st_video_device::shifter_counter_r)).umask16(0x00ff);
|
||||
map(0xff820a, 0xff820a).rw(m_video, FUNC(st_video_device::glue_sync_r), FUNC(st_video_device::glue_sync_w));
|
||||
map(0xff820a, 0xff820a).rw(m_video, FUNC(st_video_device::shifter_sync_r), FUNC(st_video_device::shifter_sync_w));
|
||||
map(0xff8240, 0xff825f).rw(m_video, FUNC(st_video_device::shifter_palette_r), FUNC(st_video_device::shifter_palette_w));
|
||||
map(0xff8260, 0xff8260).rw(m_video, FUNC(st_video_device::shifter_mode_r), FUNC(st_video_device::shifter_mode_w));
|
||||
map(0xff8604, 0xff8605).rw(FUNC(st_state::fdc_data_r), FUNC(st_state::fdc_data_w));
|
||||
@ -1570,7 +1568,7 @@ void st_state::megast_map(address_map &map)
|
||||
map(0xff8001, 0xff8001).rw(FUNC(st_state::mmu_r), FUNC(st_state::mmu_w));
|
||||
map(0xff8200, 0xff8203).rw(m_video, FUNC(st_video_device::shifter_base_r), FUNC(st_video_device::shifter_base_w)).umask16(0x00ff);
|
||||
map(0xff8204, 0xff8209).r(m_video, FUNC(st_video_device::shifter_counter_r)).umask16(0x00ff);
|
||||
map(0xff820a, 0xff820a).rw(m_video, FUNC(st_video_device::glue_sync_r), FUNC(st_video_device::glue_sync_w));
|
||||
map(0xff820a, 0xff820a).rw(m_video, FUNC(st_video_device::shifter_sync_r), FUNC(st_video_device::shifter_sync_w));
|
||||
map(0xff8240, 0xff825f).rw(m_video, FUNC(st_video_device::shifter_palette_r), FUNC(st_video_device::shifter_palette_w));
|
||||
map(0xff8260, 0xff8260).rw(m_video, FUNC(st_video_device::shifter_mode_r), FUNC(st_video_device::shifter_mode_w));
|
||||
map(0xff8604, 0xff8605).rw(FUNC(st_state::fdc_data_r), FUNC(st_state::fdc_data_w));
|
||||
@ -1670,14 +1668,14 @@ void stbook_state::stbook_map(address_map &map)
|
||||
map(0xfc0000, 0xfeffff).rom().region(M68000_TAG, 0);
|
||||
/* map(0xf00000, 0xf1ffff).rw(FUNC(stbook_state::stbook_ide_r), FUNC(stbook_state::stbook_ide_w));
|
||||
map(0xff8000, 0xff8001).rw(FUNC(stbook_state::stbook_mmu_r), FUNC(stbook_state::stbook_mmu_w));
|
||||
map(0xff8200, 0xff8203).rw(m_video, FUNC(stbook_video_device::shifter_base_r), FUNC(stbook_video_device::shifter_base_w));
|
||||
map(0xff8204, 0xff8209).rw(m_video, FUNC(stbook_video_device::shifter_counter_r), FUNC(stbook_video_device::shifter_counter_w));
|
||||
map(0xff820a, 0xff820a).rw(m_video, FUNC(stbook_video_device::shifter_sync_r), FUNC(stbook_video_device::shifter_sync_w));
|
||||
map(0xff820c, 0xff820d).rw(m_video, FUNC(stbook_video_device::shifter_base_low_r), FUNC(stbook_video_device::shifter_base_low_w));
|
||||
map(0xff820e, 0xff820f).rw(m_video, FUNC(stbook_video_device::shifter_lineofs_r), FUNC(stbook_video_device::shifter_lineofs_w));
|
||||
map(0xff8240, 0xff8241).rw(m_video, FUNC(stbook_video_device::shifter_palette_r), FUNC(stbook_video_device::shifter_palette_w));
|
||||
map(0xff8260, 0xff8260).rw(m_video, FUNC(stbook_video_device::shifter_mode_r), FUNC(stbook_video_device::shifter_mode_w));
|
||||
map(0xff8264, 0xff8265).rw(m_video, FUNC(stbook_video_device::shifter_pixelofs_r), FUNC(stbook_video_device::shifter_pixelofs_w));
|
||||
map(0xff8200, 0xff8203).rw(m_video, FUNC(stbook_video_device::stbook_shifter_base_r), FUNC(stbook_video_device::stbook_shifter_base_w));
|
||||
map(0xff8204, 0xff8209).rw(m_video, FUNC(stbook_video_device::stbook_shifter_counter_r), FUNC(stbook_video_device::stbook_shifter_counter_w));
|
||||
map(0xff820a, 0xff820a).rw(m_video, FUNC(stbook_video_device::stbook_shifter_sync_r), FUNC(stbook_video_device::stbook_shifter_sync_w));
|
||||
map(0xff820c, 0xff820d).rw(m_video, FUNC(stbook_video_device::stbook_shifter_base_low_r), FUNC(stbook_video_device::stbook_shifter_base_low_w));
|
||||
map(0xff820e, 0xff820f).rw(m_video, FUNC(stbook_video_device::stbook_shifter_lineofs_r), FUNC(stbook_video_device::stbook_shifter_lineofs_w));
|
||||
map(0xff8240, 0xff8241).rw(m_video, FUNC(stbook_video_device::stbook_shifter_palette_r), FUNC(stbook_video_device::stbook_shifter_palette_w));
|
||||
map(0xff8260, 0xff8260).rw(m_video, FUNC(stbook_video_device::stbook_shifter_mode_r), FUNC(stbook_video_device::stbook_shifter_mode_w));
|
||||
map(0xff8264, 0xff8265).rw(m_video, FUNC(stbook_video_device::stbook_shifter_pixelofs_r), FUNC(stbook_video_device::stbook_shifter_pixelofs_w));
|
||||
map(0xff827e, 0xff827f).w(m_video, FUNC(stbook_video_device::lcd_control_w));*/
|
||||
map(0xff8800, 0xff8800).rw(YM3439_TAG, FUNC(ay8910_device::data_r), FUNC(ay8910_device::address_w));
|
||||
map(0xff8802, 0xff8802).w(YM3439_TAG, FUNC(ay8910_device::data_w));
|
||||
@ -2035,8 +2033,6 @@ void st_state::psg_pa_w(uint8_t data)
|
||||
|
||||
// centronics strobe
|
||||
m_centronics->write_strobe(BIT(data, 5));
|
||||
|
||||
m_psg_pa = data;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -2145,7 +2141,6 @@ void st_state::state_save()
|
||||
save_item(NAME(m_fdc_mode));
|
||||
save_item(NAME(m_fdc_sectors));
|
||||
save_item(NAME(m_fdc_dmabytes));
|
||||
save_item(NAME(m_psg_pa));
|
||||
save_item(NAME(m_ikbd_keylatch));
|
||||
save_item(NAME(m_ikbd_mouse));
|
||||
save_item(NAME(m_ikbd_mouse_x));
|
||||
@ -2318,7 +2313,6 @@ void st_state::common(machine_config &config)
|
||||
YM2149(config, m_ymsnd, Y2/16);
|
||||
m_ymsnd->set_flags(AY8910_SINGLE_OUTPUT);
|
||||
m_ymsnd->set_resistors_load(RES_K(1), 0, 0);
|
||||
m_ymsnd->port_a_read_callback().set([this] { return m_psg_pa; });
|
||||
m_ymsnd->port_a_write_callback().set(FUNC(st_state::psg_pa_w));
|
||||
m_ymsnd->port_b_write_callback().set("cent_data_out", FUNC(output_latch_device::write));
|
||||
|
||||
@ -2560,7 +2554,6 @@ void stbook_state::stbook(machine_config &config)
|
||||
ym3439_device &ym3439(YM3439(config, YM3439_TAG, U517/8));
|
||||
ym3439.set_flags(AY8910_SINGLE_OUTPUT);
|
||||
ym3439.set_resistors_load(RES_K(1), 0, 0);
|
||||
ym3439.port_a_read_callback().set([this] { return m_psg_pa; });
|
||||
ym3439.port_a_write_callback().set(FUNC(stbook_state::psg_pa_w));
|
||||
ym3439.port_b_write_callback().set("cent_data_out", FUNC(output_latch_device::write));
|
||||
ym3439.add_route(ALL_OUTPUTS, "mono", 1.00);
|
||||
|
@ -10,7 +10,7 @@
|
||||
// CONSTANTS / MACROS
|
||||
//**************************************************************************
|
||||
|
||||
DEFINE_DEVICE_TYPE(ST_BLITTER, st_blitter_device, "st_blitter", "Atari ST BLiTTER")
|
||||
DEFINE_DEVICE_TYPE(ST_BLITTER, st_blitter_device, "st_blitter", "Atari ST Blitter")
|
||||
|
||||
static const int BLITTER_NOPS[16][4] =
|
||||
{
|
||||
|
@ -34494,9 +34494,6 @@ pdp11ub //
|
||||
pdp11ub2 //
|
||||
sms1000 //
|
||||
|
||||
@source:pdp1145.cpp
|
||||
pdp1145 //
|
||||
|
||||
@source:pdt3100.cpp
|
||||
pdt3100 //
|
||||
|
||||
|
@ -206,7 +206,7 @@ TIMER_CALLBACK_MEMBER(st_video_device::glue_tick)
|
||||
int v = (y >= m_shifter_y_start) && (y < m_shifter_y_end);
|
||||
int h = (x >= m_shifter_x_start) && (x < m_shifter_x_end);
|
||||
|
||||
if(m_shifter_mode == 1 && (m_glue_sync & 0x02)) {
|
||||
if(m_shifter_mode == 1 && (m_shifter_sync & 0x02)) {
|
||||
int dt = 8;
|
||||
h = (x >= m_shifter_x_start-dt) && (x < m_shifter_x_end-dt);
|
||||
}
|
||||
@ -295,7 +295,7 @@ TIMER_CALLBACK_MEMBER(st_video_device::glue_tick)
|
||||
|
||||
void st_video_device::set_screen_parameters()
|
||||
{
|
||||
if (m_glue_sync & 0x02)
|
||||
if (m_shifter_sync & 0x02)
|
||||
{
|
||||
m_shifter_x_start = ATARIST_HBDEND_PAL*2;
|
||||
m_shifter_x_end = ATARIST_HBDSTART_PAL*2;
|
||||
@ -388,23 +388,23 @@ uint8_t st_video_device::shifter_counter_r(offs_t offset)
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// glue_sync_r -
|
||||
// shifter_sync_r -
|
||||
//-------------------------------------------------
|
||||
|
||||
uint8_t st_video_device::glue_sync_r()
|
||||
uint8_t st_video_device::shifter_sync_r()
|
||||
{
|
||||
return m_glue_sync;
|
||||
return m_shifter_sync;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// glue_sync_w -
|
||||
// shifter_sync_w -
|
||||
//-------------------------------------------------
|
||||
|
||||
void st_video_device::glue_sync_w(uint8_t data)
|
||||
void st_video_device::shifter_sync_w(uint8_t data)
|
||||
{
|
||||
m_glue_sync = data;
|
||||
logerror("GLUE Sync %x\n", m_glue_sync);
|
||||
m_shifter_sync = data;
|
||||
logerror("SHIFTER Sync %x\n", m_shifter_sync);
|
||||
set_screen_parameters();
|
||||
}
|
||||
|
||||
@ -636,7 +636,7 @@ void st_video_device::device_start()
|
||||
// register for state saving
|
||||
save_item(NAME(m_shifter_base));
|
||||
save_item(NAME(m_shifter_ofs));
|
||||
save_item(NAME(m_glue_sync));
|
||||
save_item(NAME(m_shifter_sync));
|
||||
save_item(NAME(m_shifter_mode));
|
||||
save_item(NAME(m_shifter_palette));
|
||||
save_item(NAME(m_shifter_rr));
|
||||
@ -650,6 +650,8 @@ void st_video_device::device_start()
|
||||
m_shifter_base = 0;
|
||||
m_shifter_ofs = 0;
|
||||
m_shifter_mode = 0;
|
||||
|
||||
set_screen_parameters();
|
||||
}
|
||||
|
||||
void ste_video_device::device_start()
|
||||
@ -664,8 +666,7 @@ void ste_video_device::device_start()
|
||||
|
||||
void st_video_device::device_reset()
|
||||
{
|
||||
m_glue_sync = 0;
|
||||
set_screen_parameters();
|
||||
// TODO: reset glue chip
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user