From ba982840970a5e0511ba1069a8f1815fd0a4a7cd Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Mon, 11 Jul 2022 01:25:39 +1000 Subject: [PATCH] Minor cleanup: * Don't put full path to target resources in generated version resource file. * apple/sonora.cpp: Only #include "emu.h" as first thing in .cpp file to avoid PCH issues. * taito/rbisland.cpp: Cleaned up a few details. --- scripts/src/main.lua | 4 ++-- src/mame/apple/maclc3.cpp | 4 ++++ src/mame/apple/sonora.cpp | 2 ++ src/mame/apple/sonora.h | 9 ++++----- src/mame/taito/rbisland.cpp | 33 ++++++++++++--------------------- 5 files changed, 24 insertions(+), 28 deletions(-) diff --git a/scripts/src/main.lua b/scripts/src/main.lua index 5e127a73afc..cf81aabbd42 100644 --- a/scripts/src/main.lua +++ b/scripts/src/main.lua @@ -369,7 +369,7 @@ if (STANDALONE~=true) then { MAME_DIR .. "scripts/build/verinfo.py" }, { "@echo Emitting " .. _target .. "_" .. _subtarget .. "_vers.rc" .. "...", - PYTHON .. " $(1) -f rc -t " .. _target .. " -s " .. _subtarget .. " -e " .. exename .. " -r " .. rcincfile .. " -o $(@) $(<)" + PYTHON .. " $(1) -f rc -t " .. _target .. " -s " .. _subtarget .. " -e " .. exename .. " -r " .. path.getname(rcincfile) .. " -o $(@) $(<)" } }, } @@ -382,7 +382,7 @@ if (STANDALONE~=true) then "mkdir \"" .. path.translate(GEN_DIR .. "resource/", "\\") .. "\" 2>NUL", "mkdir \"" .. path.translate(GEN_DIR .. _target .. "/" .. _subtarget .. "/", "\\") .. "\" 2>NUL", "@echo Emitting " .. _target .. "_" .. _subtarget .. "_vers.rc" .. "...", - PYTHON .. " \"" .. path.translate(MAME_DIR .. "scripts/build/verinfo.py", "\\") .. "\" -f rc -t " .. _target .. " -s " .. _subtarget .. " -e " .. exename .. " -o \"" .. path.translate(rcversfile) .. "\" -r \"" .. path.translate(rcincfile, "\\") .. "\" \"" .. path.translate(GEN_DIR .. "version.cpp", "\\") .. "\"", + PYTHON .. " \"" .. path.translate(MAME_DIR .. "scripts/build/verinfo.py", "\\") .. "\" -f rc -t " .. _target .. " -s " .. _subtarget .. " -e " .. exename .. " -o \"" .. path.translate(rcversfile) .. "\" -r \"" .. path.getname(rcincfile) .. "\" \"" .. path.translate(GEN_DIR .. "version.cpp", "\\") .. "\"", } end diff --git a/src/mame/apple/maclc3.cpp b/src/mame/apple/maclc3.cpp index b05a56cc9a5..b4335e30a07 100644 --- a/src/mame/apple/maclc3.cpp +++ b/src/mame/apple/maclc3.cpp @@ -35,6 +35,8 @@ #include "screen.h" #include "softlist_dev.h" +namespace { + static constexpr u32 C7M = 7833600; static constexpr u32 C15M = (C7M * 2); @@ -319,5 +321,7 @@ ROM_START( maclc520 ) ROM_LOAD( "ede66cbd.rom", 0x000000, 0x100000, CRC(a893cb0f) SHA1(c54ee2f45020a4adeb7451adce04cd6e5fb69790) ) ROM_END +} // anonymous namespace + COMP(1993, maclc3, 0, 0, maclc3, macadb, macvail_state, empty_init, "Apple Computer", "Macintosh LC III", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND) COMP(1993, maclc520, 0, 0, maclc520, macadb, macvail_state, empty_init, "Apple Computer", "Macintosh LC 520", MACHINE_NOT_WORKING) diff --git a/src/mame/apple/sonora.cpp b/src/mame/apple/sonora.cpp index 0bcf65a8591..dc2f09cd35d 100644 --- a/src/mame/apple/sonora.cpp +++ b/src/mame/apple/sonora.cpp @@ -21,8 +21,10 @@ #include "emu.h" #include "sonora.h" + #include "formats/ap_dsk35.h" + static constexpr u32 C7M = 7833600; static constexpr u32 C15M = (C7M * 2); diff --git a/src/mame/apple/sonora.h b/src/mame/apple/sonora.h index dd928449286..c435e7f991b 100644 --- a/src/mame/apple/sonora.h +++ b/src/mame/apple/sonora.h @@ -1,12 +1,11 @@ // license:BSD-3-Clause // copyright-holders:R. Belmont -#ifndef MAME_MACHINE_SONORA_H -#define MAME_MACHINE_SONORA_H +#ifndef MAME_APPLE_SONORA_H +#define MAME_APPLE_SONORA_H #pragma once -#include "emu.h" #include "machine/6522via.h" #include "machine/applefdintf.h" #include "machine/mv_sonora.h" @@ -35,7 +34,7 @@ public: void map(address_map &map); - template void set_maincpu_tag(T &&cpu_tag) { m_maincpu.set_tag(std::forward(cpu_tag)); } + template void set_maincpu_tag(T &&... args) { m_maincpu.set_tag(std::forward(args)...); } template void set_rom_tag(T &&... args) { m_rom.set_tag(std::forward(args)...); } void set_ram_info(u32 *ram, u32 size); @@ -104,4 +103,4 @@ private: // device type definition DECLARE_DEVICE_TYPE(SONORA, sonora_device) -#endif // MAME_MACHINE_SONORA_H +#endif // MAME_APPLE_SONORA_H diff --git a/src/mame/taito/rbisland.cpp b/src/mame/taito/rbisland.cpp index 27647480511..af52325dde0 100644 --- a/src/mame/taito/rbisland.cpp +++ b/src/mame/taito/rbisland.cpp @@ -405,7 +405,7 @@ public: void jumpingi(machine_config &config); protected: - virtual void video_start() override; + virtual void machine_start() override; private: uint8_t latch_r(); @@ -451,17 +451,13 @@ uint32_t rbisland_state::screen_update(screen_device &screen, bitmap_ind16 &bitm { m_pc080sn->tilemap_update(); - int layer[2]; - - layer[0] = 0; - layer[1] = 1; - screen.priority().fill(0, cliprect); - m_pc080sn->tilemap_draw(screen, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 1); - m_pc080sn->tilemap_draw(screen, bitmap, cliprect, layer[1], 0, 2); + m_pc080sn->tilemap_draw(screen, bitmap, cliprect, 0, TILEMAP_DRAW_OPAQUE, 1); + m_pc080sn->tilemap_draw(screen, bitmap, cliprect, 1, 0, 2); m_pc090oj->draw_sprites(screen, bitmap, cliprect); + return 0; } @@ -476,8 +472,10 @@ the Y settings are active low. */ -void jumping_state::video_start() +void jumping_state::machine_start() { + base_state::machine_start(); + m_pc080sn->set_trans_pen(1, 15); m_sprite_ctrl = 0; @@ -495,14 +493,9 @@ uint32_t jumping_state::screen_update(screen_device &screen, bitmap_ind16 &bitma // Override values, or foreground layer is in wrong position m_pc080sn->set_scroll(1, 16, 0); - int layer[2]; - - layer[0] = 0; - layer[1] = 1; - screen.priority().fill(0, cliprect); - m_pc080sn->tilemap_draw(screen, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 0); + m_pc080sn->tilemap_draw(screen, bitmap, cliprect, 0, TILEMAP_DRAW_OPAQUE, 0); // Draw the sprites. 128 sprites in total for (int offs = m_spriteram.bytes() / 2 - 8; offs >= 0; offs -= 8) @@ -526,14 +519,10 @@ uint32_t jumping_state::screen_update(screen_device &screen, bitmap_ind16 &bitma } } - m_pc080sn->tilemap_draw(screen, bitmap, cliprect, layer[1], 0, 0); + m_pc080sn->tilemap_draw(screen, bitmap, cliprect, 1, 0, 0); #if 0 - { - char buf[80]; - sprintf(buf,"sprite_ctrl: %04x", m_sprite_ctrl); - popmessage(buf); - } + popmessage(buf,"sprite_ctrl: %04x", m_sprite_ctrl); #endif return 0; } @@ -795,6 +784,8 @@ GFXDECODE_END void rbisland_state::machine_start() { + base_state::machine_start(); + uint8_t *rom = memregion("audiocpu")->base(); membank("soundbank")->configure_entries(0, 4, &rom[0xc000], 0x4000); }