Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbbert committed Dec 20, 2024
2 parents 78e2dc7 + 70f0fca commit c9a32ea
Show file tree
Hide file tree
Showing 17 changed files with 2,041 additions and 1,110 deletions.
25 changes: 15 additions & 10 deletions src/frontend/mame/ui/filemngr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,13 @@ void menu_file_manager::recompute_metrics(uint32_t width, uint32_t height, float
float const max_width(1.0F - (4.0F * lr_border()));
m_warnings_layout.emplace(create_layout(max_width, text_layout::text_justify::LEFT));
m_warnings_layout->add_text(m_warnings, ui().colors().text_color());
}

set_custom_space(
m_warnings_layout ? ((m_warnings_layout->lines() * line_height()) + 3.0F * tb_border()) : 0.0F,
line_height() + 3.0F * tb_border());
set_custom_space(0.0F, (float(m_warnings_layout->lines() + 1) * line_height()) + (6.0F * tb_border()));
}
else
{
set_custom_space(0.0F, line_height() + (3.0F * tb_border()));
}
}


Expand All @@ -87,23 +89,24 @@ void menu_file_manager::recompute_metrics(uint32_t width, uint32_t height, float

void menu_file_manager::custom_render(uint32_t flags, void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
{
// access the path
if (m_selected_device && m_selected_device->exists())
extra_text_render(top, (3.0F * tb_border()) + line_height(), origx1, origy1, origx2, origy2, std::string_view(), m_selected_device->filename());

// show the warnings if any
if (m_warnings_layout)
{
ui().draw_outlined_box(
container(),
((1.0F + m_warnings_layout->actual_width()) * 0.5F) + lr_border(), origy1 - (3.0F * tb_border()) - (m_warnings_layout->lines() * line_height()),
((1.0F - m_warnings_layout->actual_width()) * 0.5F) - lr_border(), origy1 - tb_border(),
((1.0F + m_warnings_layout->actual_width()) * 0.5F) + lr_border(), origy2 + (4.0F * tb_border()) + line_height(),
((1.0F - m_warnings_layout->actual_width()) * 0.5F) - lr_border(), origy2 + bottom,
ui().colors().background_color());
m_warnings_layout->emit(
container(),
(1.0F - m_warnings_layout->actual_width()) * 0.5F,
origy1 - (2.0F * tb_border()) - (m_warnings_layout->lines() * line_height()));
origy2 + (5.0F * tb_border()) + line_height());
}

// access the path
std::string_view path = m_selected_device && m_selected_device->exists() ? m_selected_device->filename() : std::string_view();
extra_text_render(top, bottom, origx1, origy1, origx2, origy2, std::string_view(), path);
}


Expand Down Expand Up @@ -136,7 +139,9 @@ void menu_file_manager::fill_image_line(device_image_interface &img, std::string
}
}
else
{
filename.assign("---");
}
}

//-------------------------------------------------
Expand Down
240 changes: 159 additions & 81 deletions src/mame/acorn/aristmk5.cpp

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions src/mame/dataeast/brkthru.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1046,8 +1046,7 @@ ROM_START( darwin )
ROM_LOAD( "darw_11.rom", 0x08000, 0x8000, CRC(548ce2d1) SHA1(3b1757c70346ab4ee19ec85e7ae5137f8ccf446f) )
ROM_LOAD( "darw_12.rom", 0x10000, 0x8000, CRC(faba5fef) SHA1(848da4d4888f0218b737f1dc9b62944f68349a43) )

// A PCB has been found with the first PROM substituted with a TBP28S42 (4b56a744) SHA1(5fdc336d90c8a289c146c66f241dd217fc11bf35), see brkthrut ROM loading for how they did it.
// With that in mind, there's a one byte difference at 0x55 (0xf0 instead of 0x70). It is unknown if it's bitrot or if it's intended.
// A PCB has been found with the first PROM substituted with a TBP28S42, see brkthrut ROM loading for how they did it.
ROM_REGION( 0x0200, "proms", 0 )
ROM_LOAD( "df.12", 0x0000, 0x0100, CRC(89b952ef) SHA1(77dc4020a2e25f81fae1182d58993cf09d13af00) ) // red and green component
ROM_LOAD( "df.13", 0x0100, 0x0100, CRC(d595e91d) SHA1(5e9793f6602455c79afdc855cd13183a7f48ab1e) ) // blue component
Expand Down
85 changes: 35 additions & 50 deletions src/mame/dataeast/bwing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ Known issues:
- Zaviga's DIPs are incomplete. (manual missing)
- "RGB dip-switch" looks kludgy at best;
*****************************************************************************/


Expand All @@ -44,8 +42,8 @@ namespace {
class bwing_state : public driver_device
{
public:
bwing_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
bwing_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_subcpu(*this, "subcpu"),
m_audiocpu(*this, "audiocpu"),
Expand All @@ -58,10 +56,12 @@ class bwing_state : public driver_device
m_fgscrollram(*this, "fgscrollram"),
m_bgscrollram(*this, "bgscrollram"),
m_gfxram(*this, "gfxram", 0x6000, ENDIANNESS_BIG),
m_vramview(*this, "vramview") { }
m_vramview(*this, "vramview")
{ }

void init_bwing();
void bwing(machine_config &config);

DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
DECLARE_INPUT_CHANGED_MEMBER(tilt_pressed);

Expand Down Expand Up @@ -128,6 +128,9 @@ class bwing_state : public driver_device
};


//****************************************************************************
// Video Hardware

void bwing_state::videoram_w(offs_t offset, uint8_t data)
{
m_videoram[offset] = data;
Expand Down Expand Up @@ -165,52 +168,33 @@ void bwing_state::scrollreg_w(offs_t offset, uint8_t data)

switch (offset)
{
case 6: m_palatch = data; break; // one of the palette components is latched through I/O(yike)
case 6:
// one of the palette components is latched through I/O(yike)
m_palatch = data;
break;

case 7:
m_mapmask = data;
m_vramview.select(data >> 6);
break;
break;
}
}


void bwing_state::paletteram_w(offs_t offset, uint8_t data)
{
static const float rgb[4][3] = {
{0.85f, 0.95f, 1.00f},
{0.90f, 1.00f, 1.00f},
{0.80f, 1.00f, 1.00f},
{0.75f, 0.90f, 1.10f}
};

m_paletteram[offset] = data;

int r = ~data & 7;
int g = ~(data >> 4) & 7;
int b = ~m_palatch & 7;

r = ((r << 5) + (r << 2) + (r >> 1));
g = ((g << 5) + (g << 2) + (g >> 1));
b = ((b << 5) + (b << 2) + (b >> 1));

int i;

if ((i = ioport("EXTRA")->read()) < 4)
{
r = (float)r * rgb[i][0];
g = (float)g * rgb[i][1];
b = (float)b * rgb[i][2];
if (r > 0xff) r = 0xff;
if (g > 0xff) g = 0xff;
if (b > 0xff) b = 0xff;
}
int r = pal3bit(~data & 7);
int g = pal3bit(~(data >> 4) & 7);
int b = pal3bit(~m_palatch & 7);

m_palette->set_pen_color(offset, rgb_t(r, g, b));
}


//****************************************************************************
// Initializations
// Video Initialization

TILE_GET_INFO_MEMBER(bwing_state::get_fgtileinfo)
{
Expand Down Expand Up @@ -246,8 +230,9 @@ void bwing_state::video_start()
m_sreg[i] = 0;
}


//****************************************************************************
// Realtime
// Screen Update

void bwing_state::draw_sprites(bitmap_ind16 &bmp, const rectangle &clip, uint8_t *ram, int pri)
{
Expand Down Expand Up @@ -282,9 +267,9 @@ void bwing_state::draw_sprites(bitmap_ind16 &bmp, const rectangle &clip, uint8_t

// single/double
if (!(attrib & 0x10))
gfx->transpen(bmp, clip, code, color, fx, fy, x, y, 0);
gfx->transpen(bmp, clip, code, color, fx, fy, x, y, 0);
else
gfx->zoom_transpen(bmp, clip, code, color, fx, fy, x, y, 1 << 16, 2 << 16, 0);
gfx->zoom_transpen(bmp, clip, code, color, fx, fy, x, y, 1 << 16, 2 << 16, 0);
}
}

Expand Down Expand Up @@ -353,6 +338,7 @@ INTERRUPT_GEN_MEMBER(bwing_state::p3_interrupt)
device.execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
}


//****************************************************************************
// Memory and I/O Handlers

Expand Down Expand Up @@ -400,7 +386,7 @@ void bwing_state::p1_ctrl_w(offs_t offset, uint8_t data)
m_soundlatch->write(data);
m_audiocpu->set_input_line(DECO16_IRQ_LINE, HOLD_LINE); // SNDREQ
}
break;
break;

// BANKSEL(supposed to bank-switch CPU0 4000-7fff(may also 8000-bfff) 00=bank 0, 80=bank 1, unused)
case 6: break;
Expand All @@ -425,6 +411,7 @@ void bwing_state::p2_ctrl_w(offs_t offset, uint8_t data)
}
}


//****************************************************************************
// CPU Memory Maps

Expand All @@ -436,7 +423,7 @@ void bwing_state::p1_map(address_map &map)
map(0x1000, 0x13ff).ram().w(FUNC(bwing_state::videoram_w)).share(m_videoram);
map(0x1400, 0x17ff).ram();
map(0x1800, 0x19ff).ram().share(m_spriteram);
map(0x1a00, 0x1aff).ram().w(FUNC(bwing_state::paletteram_w)).share("paletteram");
map(0x1a00, 0x1a3f).ram().w(FUNC(bwing_state::paletteram_w)).share("paletteram");
map(0x1b00, 0x1b00).portr("DSW0");
map(0x1b01, 0x1b01).portr("DSW1");
map(0x1b02, 0x1b02).portr("IN0");
Expand Down Expand Up @@ -484,6 +471,7 @@ void bwing_state::p3_io_map(address_map &map)
map(0x00, 0x00).portr("VBLANK").w(FUNC(bwing_state::p3_u8f_w));
}


//****************************************************************************
// I/O Port Maps

Expand Down Expand Up @@ -582,16 +570,9 @@ static INPUT_PORTS_START( bwing )

PORT_START("VBLANK")
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("screen", FUNC(screen_device::vblank))

PORT_START("EXTRA") // a matter of taste
PORT_DIPNAME( 0x07, 0x00, "RGB" )
PORT_DIPSETTING( 0x00, "Default" )
PORT_DIPSETTING( 0x01, "More Red" )
PORT_DIPSETTING( 0x02, "More Green" )
PORT_DIPSETTING( 0x03, "More Blue" )
PORT_DIPSETTING( 0x04, "Max" )
INPUT_PORTS_END


//****************************************************************************
// Graphics Layouts

Expand Down Expand Up @@ -637,6 +618,7 @@ static GFXDECODE_START( gfx_bwing )
GFXDECODE_RAM( "gfxram", 0x1000, ram_tilelayout, 0x30, 2 ) // background tiles
GFXDECODE_END


//****************************************************************************
// Hardware Definitions

Expand Down Expand Up @@ -675,12 +657,12 @@ void bwing_state::bwing(machine_config &config)
MC6809E(config, m_subcpu, 24_MHz_XTAL / 16); // MC68A09E
m_subcpu->set_addrmap(AS_PROGRAM, &bwing_state::p2_map);

DECO16(config, m_audiocpu, 2'000'000); // FIXME: clock probably wrong
DECO16(config, m_audiocpu, 24_MHz_XTAL / 16);
m_audiocpu->set_addrmap(AS_PROGRAM, &bwing_state::p3_map);
m_audiocpu->set_addrmap(AS_IO, &bwing_state::p3_io_map);
m_audiocpu->set_periodic_int(FUNC(bwing_state::p3_interrupt), attotime::from_hz(1'000));

config.set_maximum_quantum(attotime::from_hz(18'000)); // high enough?
config.set_maximum_quantum(attotime::from_hz(18'000)); // high enough?

// video hardware
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
Expand All @@ -704,6 +686,7 @@ void bwing_state::bwing(machine_config &config)
DAC08(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.1);
}


//****************************************************************************
// ROM Maps

Expand Down Expand Up @@ -841,8 +824,9 @@ ROM_START( zavigaj )
ROM_LOAD( "as13.1h", 0x08000, 0x04000, CRC(15d0922b) SHA1(b8d715a9e610531472d516c19f6035adbce93c84) )
ROM_END


//****************************************************************************
// Initializations
// Driver Initialization

void bwing_state::init_bwing()
{
Expand All @@ -860,6 +844,7 @@ void bwing_state::init_bwing()

} // anonymous namespace


//****************************************************************************
// Game Entries

Expand Down
Loading

0 comments on commit c9a32ea

Please sign in to comment.